diff --git a/tools/ui/node_modules/runed/dist/utilities/use-event-listener/use-event-listener.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-event-listener/use-event-listener.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4268e1b60bc7e15b4943355b081f96afb1fd8510 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-event-listener/use-event-listener.svelte.d.ts @@ -0,0 +1,54 @@ +import type { MaybeGetter } from "../../internal/types.js"; +export type EventHandler = (this: TTarget, event: TEvent & { + currentTarget: TTarget; +}) => unknown; +/** + * Adds an event listener to the specified target element for the given event(s), and returns a function to remove it. + * @param target The target element to add the event listener to. + * @param event The event(s) to listen for. + * @param handler The function to be called when the event is triggered. + * @param options An optional object that specifies characteristics about the event listener. + * + * @see {@link https://runed.dev/docs/utilities/use-event-listener} + */ +export declare function useEventListener(target: MaybeGetter, event: MaybeGetter, handler: EventHandler, options?: AddEventListenerOptions): void; +/** + * Adds an event listener to the specified target element for the given event(s), and returns a function to remove it. + * @param target The target element to add the event listener to. + * @param event The event(s) to listen for. + * @param handler The function to be called when the event is triggered. + * @param options An optional object that specifies characteristics about the event listener. + * + * @see {@link https://runed.dev/docs/utilities/use-event-listener} + */ +export declare function useEventListener(target: MaybeGetter, event: MaybeGetter, handler: EventHandler, options?: AddEventListenerOptions): void; +/** + * Adds an event listener to the specified target element for the given event(s), and returns a function to remove it. + * @param target The target element to add the event listener to. + * @param event The event(s) to listen for. + * @param handler The function to be called when the event is triggered. + * @param options An optional object that specifies characteristics about the event listener. + * + * @see {@link https://runed.dev/docs/utilities/use-event-listener} + */ +export declare function useEventListener(target: MaybeGetter, event: MaybeGetter, handler: EventHandler, options?: AddEventListenerOptions): void; +/** + * Adds an event listener to the specified target element for the given event(s), and returns a function to remove it. + * @param target The target element to add the event listener to. + * @param event The event(s) to listen for. + * @param handler The function to be called when the event is triggered. + * @param options An optional object that specifies characteristics about the event listener. + * + * @see {@link https://runed.dev/docs/utilities/use-event-listener} + */ +export declare function useEventListener(target: MaybeGetter, event: MaybeGetter, handler: EventHandler, options?: AddEventListenerOptions): void; +/** + * Adds an event listener to the specified target element for the given event(s), and returns a function to remove it. + * @param target The target element to add the event listener to. + * @param event The event(s) to listen for. + * @param handler The function to be called when the event is triggered. + * @param options An optional object that specifies characteristics about the event listener. + * + * @see {@link https://runed.dev/docs/utilities/use-event-listener} + */ +export declare function useEventListener(target: MaybeGetter, event: MaybeGetter, handler: EventListener, options?: AddEventListenerOptions): void; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-event-listener/use-event-listener.svelte.js b/tools/ui/node_modules/runed/dist/utilities/use-event-listener/use-event-listener.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..be9c76e74cde0f2709ab9d2d800dc74b0405d58f --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-event-listener/use-event-listener.svelte.js @@ -0,0 +1,18 @@ +import { extract } from "../extract/extract.svelte.js"; +import { on } from "svelte/events"; +export function useEventListener(_target, _events, handler, options) { + $effect(() => { + const target = extract(_target); + if (target == null) + return; + const events = extract(_events); + if (Array.isArray(events)) { + for (const event of events) { + $effect(() => on(target, event, handler, options)); + } + } + else { + return on(target, events, handler, options); + } + }); +} diff --git a/tools/ui/node_modules/runed/dist/utilities/use-geolocation/index.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-geolocation/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..17cc63e7f2e569664aa659e76dcef850cd75df88 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-geolocation/index.d.ts @@ -0,0 +1 @@ +export * from "./use-geolocation.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-geolocation/index.js b/tools/ui/node_modules/runed/dist/utilities/use-geolocation/index.js new file mode 100644 index 0000000000000000000000000000000000000000..17cc63e7f2e569664aa659e76dcef850cd75df88 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-geolocation/index.js @@ -0,0 +1 @@ +export * from "./use-geolocation.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-geolocation/use-geolocation.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-geolocation/use-geolocation.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0ae0d88349aa12bce2eca22a77f003b5f4e983ac --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-geolocation/use-geolocation.svelte.d.ts @@ -0,0 +1,27 @@ +import { type ConfigurableNavigator } from "../../internal/configurable-globals.js"; +export type UseGeolocationOptions = Partial & { + /** + * Whether to start the watcher immediately upon creation. If set to `false`, the watcher + * will only start tracking the position when `resume()` is called. + * + * @defaultValue true + */ + immediate?: boolean; +} & ConfigurableNavigator; +export type UseGeolocationPosition = Omit & { + coords: Omit; +}; +export type UseGeolocationReturn = { + readonly isSupported: boolean; + readonly position: UseGeolocationPosition; + readonly error: GeolocationPositionError | null; + readonly isPaused: boolean; + resume: () => void; + pause: () => void; +}; +/** + * Reactive access to the browser's [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API). + * + * @see https://runed.dev/docs/utilities/use-geolocation + */ +export declare function useGeolocation(options?: UseGeolocationOptions): UseGeolocationReturn; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-geolocation/use-geolocation.svelte.js b/tools/ui/node_modules/runed/dist/utilities/use-geolocation/use-geolocation.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..9eba5e2fae69d022cac15d2c8435fc992948bf72 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-geolocation/use-geolocation.svelte.js @@ -0,0 +1,71 @@ +import { defaultNavigator, } from "../../internal/configurable-globals.js"; +/** + * Reactive access to the browser's [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API). + * + * @see https://runed.dev/docs/utilities/use-geolocation + */ +export function useGeolocation(options = {}) { + const { enableHighAccuracy = true, maximumAge = 30000, timeout = 27000, immediate = true, navigator = defaultNavigator, } = options; + const isSupported = Boolean(navigator); + let error = $state.raw(null); + let position = $state({ + timestamp: 0, + coords: { + accuracy: 0, + latitude: Number.POSITIVE_INFINITY, + longitude: Number.POSITIVE_INFINITY, + altitude: null, + altitudeAccuracy: null, + heading: null, + speed: null, + }, + }); + let isPaused = $state(false); + function updatePosition(_position) { + error = null; + position.timestamp = _position.timestamp; + position.coords.accuracy = _position.coords.accuracy; + position.coords.altitude = _position.coords.altitude; + position.coords.altitudeAccuracy = _position.coords.altitudeAccuracy; + position.coords.heading = _position.coords.heading; + position.coords.latitude = _position.coords.latitude; + position.coords.longitude = _position.coords.longitude; + position.coords.speed = _position.coords.speed; + } + let watcher; + function resume() { + if (!navigator) + return; + watcher = navigator.geolocation.watchPosition(updatePosition, (err) => (error = err), { + enableHighAccuracy, + maximumAge, + timeout, + }); + isPaused = false; + } + function pause() { + if (watcher && navigator) { + navigator.geolocation.clearWatch(watcher); + } + isPaused = true; + } + $effect(() => { + if (immediate) + resume(); + return () => pause(); + }); + return { + get isSupported() { + return isSupported; + }, + position, + get error() { + return error; + }, + get isPaused() { + return isPaused; + }, + resume, + pause, + }; +} diff --git a/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/index.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d972de5d99c4a3c9cab2abb66769e5f3f0c69cd8 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/index.d.ts @@ -0,0 +1 @@ +export * from "./use-intersection-observer.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/index.js b/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d972de5d99c4a3c9cab2abb66769e5f3f0c69cd8 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/index.js @@ -0,0 +1 @@ +export * from "./use-intersection-observer.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/use-intersection-observer.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/use-intersection-observer.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..57dba73ebc3a855eb8b5c26b447ac600bc46d66e --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/use-intersection-observer.svelte.d.ts @@ -0,0 +1,28 @@ +import type { MaybeElementGetter, MaybeGetter } from "../../internal/types.js"; +import { type ConfigurableWindow } from "../../internal/configurable-globals.js"; +export interface UseIntersectionObserverOptions extends Omit, ConfigurableWindow { + /** + * Whether to start the observer immediately upon creation. If set to `false`, the observer + * will only start observing when `resume()` is called. + * + * @defaultValue true + */ + immediate?: boolean; + /** + * The root document/element to use as the bounding box for the intersection. + */ + root?: MaybeElementGetter; +} +/** + * Watch for intersection changes of a target element. + * + * @see https://runed.dev/docs/utilities/useIntersectionObserver + * @see https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver IntersectionObserver MDN + */ +export declare function useIntersectionObserver(target: MaybeGetter, callback: IntersectionObserverCallback, options?: UseIntersectionObserverOptions): { + readonly isActive: boolean; + stop: () => void; + pause(): void; + resume(): void; +}; +export type UseIntersectionObserverReturn = ReturnType; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/use-intersection-observer.svelte.js b/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/use-intersection-observer.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..dfa5e4f6c93f80fce0f1a16ee3ee311d04216fbc --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-intersection-observer/use-intersection-observer.svelte.js @@ -0,0 +1,49 @@ +import { extract } from "../extract/extract.svelte.js"; +import { get } from "../../internal/utils/get.js"; +import { defaultWindow } from "../../internal/configurable-globals.js"; +/** + * Watch for intersection changes of a target element. + * + * @see https://runed.dev/docs/utilities/useIntersectionObserver + * @see https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver IntersectionObserver MDN + */ +export function useIntersectionObserver(target, callback, options = {}) { + const { root, rootMargin = "0px", threshold = 0.1, immediate = true, window = defaultWindow, } = options; + let isActive = $state(immediate); + let observer; + const targets = $derived.by(() => { + const value = extract(target); + return new Set(value ? (Array.isArray(value) ? value : [value]) : []); + }); + const stop = $effect.root(() => { + $effect(() => { + if (!targets.size || !isActive || !window) + return; + observer = new window.IntersectionObserver(callback, { + rootMargin, + root: get(root), + threshold, + }); + for (const el of targets) + observer.observe(el); + return () => { + observer?.disconnect(); + }; + }); + }); + $effect(() => { + return stop; + }); + return { + get isActive() { + return isActive; + }, + stop, + pause() { + isActive = false; + }, + resume() { + isActive = true; + }, + }; +} diff --git a/tools/ui/node_modules/runed/dist/utilities/use-interval/index.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-interval/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c938dc01048f07556311789f5b304e4b2fb77e8d --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-interval/index.d.ts @@ -0,0 +1 @@ +export * from "./use-interval.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-interval/index.js b/tools/ui/node_modules/runed/dist/utilities/use-interval/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c938dc01048f07556311789f5b304e4b2fb77e8d --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-interval/index.js @@ -0,0 +1 @@ +export * from "./use-interval.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-interval/use-interval.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-interval/use-interval.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7020affb5967a34a4f9fc25cd6d8c968646051cf --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-interval/use-interval.svelte.d.ts @@ -0,0 +1,51 @@ +import type { MaybeGetter } from "../../internal/types.js"; +export type UseIntervalOptions = { + /** + * Start the timer immediately + * + * @default true + */ + immediate?: boolean; + /** + * Execute the callback immediately after calling `resume` + * + * @default false + */ + immediateCallback?: boolean; + /** + * Callback to execute on every interval tick, receives the current counter value + */ + callback?: (count: number) => void; +}; +export type UseIntervalReturn = { + /** + * Pause the interval + */ + pause: () => void; + /** + * Resume the interval + */ + resume: () => void; + /** + * Reset the counter to 0 + */ + reset: () => void; + /** + * Whether the interval is currently active + */ + readonly isActive: boolean; + /** + * The current counter value + */ + readonly counter: number; +}; +/** + * Wrapper for `setInterval` with controls for pausing and resuming. + * + * @see https://runed.dev/docs/utilities/use-interval + * + * @param delay - The interval in milliseconds between executions + * @param options - Configuration options + * @returns Object with pause, resume, reset methods, counter and isActive state + */ +export declare function useInterval(delay: MaybeGetter, options?: UseIntervalOptions): UseIntervalReturn; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-interval/use-interval.svelte.js b/tools/ui/node_modules/runed/dist/utilities/use-interval/use-interval.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..e925ceb8bbf27d4dd1d54b0e5cc4144544c50b21 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-interval/use-interval.svelte.js @@ -0,0 +1,61 @@ +import { extract } from "../extract/index.js"; +import { watch } from "../watch/watch.svelte.js"; +/** + * Wrapper for `setInterval` with controls for pausing and resuming. + * + * @see https://runed.dev/docs/utilities/use-interval + * + * @param delay - The interval in milliseconds between executions + * @param options - Configuration options + * @returns Object with pause, resume, reset methods, counter and isActive state + */ +export function useInterval(delay, options = {}) { + const { immediate = true, immediateCallback = false, callback } = options; + let intervalId = $state(null); + let counter = $state(0); + const delay$ = $derived(extract(delay)); + const isActive = $derived(intervalId !== null); + function runCallback() { + counter++; + callback?.(counter); + } + function createInterval() { + intervalId = setInterval(runCallback, delay$); + } + const pause = () => { + if (intervalId === null) + return; + clearInterval(intervalId); + intervalId = null; + }; + const resume = () => { + if (intervalId !== null) + return; + if (immediateCallback) + runCallback(); + createInterval(); + }; + if (immediate) { + resume(); + } + // Sync interval's delay with the prop + watch(() => delay$, () => { + if (!isActive) + return; + pause(); + createInterval(); + }); + // Cleanup on disposal + $effect(() => pause); + return { + pause, + resume, + reset: () => (counter = 0), + get isActive() { + return isActive; + }, + get counter() { + return counter; + }, + }; +} diff --git a/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/index.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8a9360150f5f5a38cf0110017aa3f1ccd8fb6734 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/index.d.ts @@ -0,0 +1 @@ +export * from "./use-mutation-observer.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/index.js b/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8a9360150f5f5a38cf0110017aa3f1ccd8fb6734 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/index.js @@ -0,0 +1 @@ +export * from "./use-mutation-observer.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/use-mutation-observer.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/use-mutation-observer.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a4f1a3c918d520792ca8074b7dcc8fd15442b82d --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/use-mutation-observer.svelte.d.ts @@ -0,0 +1,15 @@ +import type { MaybeGetter } from "../../internal/types.js"; +import { type ConfigurableWindow } from "../../internal/configurable-globals.js"; +export interface UseMutationObserverOptions extends MutationObserverInit, ConfigurableWindow { +} +/** + * Watch for changes being made to the DOM tree. + * + * @see https://runed.dev/docs/utilities/useMutationObserver + * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN + */ +export declare function useMutationObserver(target: MaybeGetter, callback: MutationCallback, options?: UseMutationObserverOptions): { + stop: () => void; + takeRecords(): MutationRecord[] | undefined; +}; +export type UseMutationObserverReturn = ReturnType; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/use-mutation-observer.svelte.js b/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/use-mutation-observer.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..768f03cc6b3b5b4cbb9fe23763289b19ddc43f96 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-mutation-observer/use-mutation-observer.svelte.js @@ -0,0 +1,38 @@ +import { extract } from "../extract/extract.svelte.js"; +import { defaultWindow } from "../../internal/configurable-globals.js"; +/** + * Watch for changes being made to the DOM tree. + * + * @see https://runed.dev/docs/utilities/useMutationObserver + * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN + */ +export function useMutationObserver(target, callback, options = {}) { + const { window = defaultWindow } = options; + let observer; + const targets = $derived.by(() => { + const value = extract(target); + return new Set(value ? (Array.isArray(value) ? value : [value]) : []); + }); + const stop = $effect.root(() => { + $effect(() => { + if (!targets.size || !window) + return; + observer = new window.MutationObserver(callback); + for (const el of targets) + observer.observe(el, options); + return () => { + observer?.disconnect(); + observer = undefined; + }; + }); + }); + $effect(() => { + return stop; + }); + return { + stop, + takeRecords() { + return observer?.takeRecords(); + }, + }; +} diff --git a/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/index.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..532ba69de8269827446ce0d82bb285a491be3788 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/index.d.ts @@ -0,0 +1 @@ +export { useResizeObserver } from "./use-resize-observer.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/index.js b/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/index.js new file mode 100644 index 0000000000000000000000000000000000000000..532ba69de8269827446ce0d82bb285a491be3788 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/index.js @@ -0,0 +1 @@ +export { useResizeObserver } from "./use-resize-observer.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/use-resize-observer.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/use-resize-observer.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..84d0e1dd7155560149472040f3f249b60d78f1c4 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/use-resize-observer.svelte.d.ts @@ -0,0 +1,39 @@ +import type { MaybeGetter } from "../../internal/types.js"; +import { type ConfigurableWindow } from "../../internal/configurable-globals.js"; +export interface ResizeObserverSize { + readonly inlineSize: number; + readonly blockSize: number; +} +export interface ResizeObserverEntry { + readonly target: Element; + readonly contentRect: DOMRectReadOnly; + readonly borderBoxSize?: ReadonlyArray; + readonly contentBoxSize?: ReadonlyArray; + readonly devicePixelContentBoxSize?: ReadonlyArray; +} +export type ResizeObserverCallback = (entries: ReadonlyArray, observer: ResizeObserver) => void; +export interface UseResizeObserverOptions extends ConfigurableWindow { + /** + * Sets which box model the observer will observe changes to. Possible values + * are `content-box` (the default), `border-box` and `device-pixel-content-box`. + * + * @default 'content-box' + */ + box?: ResizeObserverBoxOptions; +} +declare class ResizeObserver { + constructor(callback: ResizeObserverCallback); + disconnect(): void; + observe(target: Element, options?: UseResizeObserverOptions): void; + unobserve(target: Element): void; +} +/** + * Reports changes to the dimensions of an Element's content or the border-box + * + * @see https://runed.dev/docs/utilities/useResizeObserver + */ +export declare function useResizeObserver(target: MaybeGetter, callback: ResizeObserverCallback, options?: UseResizeObserverOptions): { + stop: () => void; +}; +export type UseResizeObserverReturn = ReturnType; +export {}; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/use-resize-observer.svelte.js b/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/use-resize-observer.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..177ab31cb0707d7a1a3e4c279dee50b50295f348 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-resize-observer/use-resize-observer.svelte.js @@ -0,0 +1,34 @@ +import { extract } from "../extract/extract.svelte.js"; +import { defaultWindow } from "../../internal/configurable-globals.js"; +/** + * Reports changes to the dimensions of an Element's content or the border-box + * + * @see https://runed.dev/docs/utilities/useResizeObserver + */ +export function useResizeObserver(target, callback, options = {}) { + const { window = defaultWindow } = options; + let observer; + const targets = $derived.by(() => { + const value = extract(target); + return new Set(value ? (Array.isArray(value) ? value : [value]) : []); + }); + const stop = $effect.root(() => { + $effect(() => { + if (!targets.size || !window) + return; + observer = new window.ResizeObserver(callback); + for (const el of targets) + observer.observe(el, options); + return () => { + observer?.disconnect(); + observer = undefined; + }; + }); + }); + $effect(() => { + return stop; + }); + return { + stop, + }; +} diff --git a/tools/ui/node_modules/runed/dist/utilities/use-search-params/index.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-search-params/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6283320476351eb70301541930bb82c853299738 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-search-params/index.d.ts @@ -0,0 +1,2 @@ +export { useSearchParams, createSearchParamsSchema, validateSearchParams, } from "./use-search-params.svelte.js"; +export type { SearchParamsOptions, StandardSchemaV1, SchemaTypeConfig, ReturnUseSearchParams, } from "./use-search-params.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-search-params/index.js b/tools/ui/node_modules/runed/dist/utilities/use-search-params/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e352c882acbafa5e7595fd945381c31479c99687 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-search-params/index.js @@ -0,0 +1 @@ +export { useSearchParams, createSearchParamsSchema, validateSearchParams, } from "./use-search-params.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-search-params/use-search-params.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-search-params/use-search-params.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d76f8e316ae07ed659a1bcf38960e02715d07ca --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-search-params/use-search-params.svelte.d.ts @@ -0,0 +1,448 @@ +/** + * Configuration options for useSearchParams + */ +export interface SearchParamsOptions { + /** + * If true, parameters set to their default values will be shown in the URL. + * If false, parameters with default values will be omitted from the URL. + * @default false + */ + showDefaults?: boolean; + /** + * The number of milliseconds to delay URL updates when parameters change. + * This helps avoid cluttering browser history when values change rapidly + * (like during typing in an input field). + * @default 0 (no debounce) + */ + debounce?: number; + /** + * Controls whether URL updates create new browser history entries. + * If true (default), each update adds a new entry to the browser history. + * If false, updates replace the current URL without creating new history entries. + * @default true + */ + pushHistory?: boolean; + /** + * Enable lz-string compression for all parameters. + * When true, all parameters are compressed into a single parameter in the URL. + * This helps reduce URL length and provides basic parameter obfuscation. + * @default false + */ + compress?: boolean; + /** + * The name of the parameter used to store compressed data when compression is enabled. + * You can customize this to avoid conflicts with your schema parameters. + * + * For example, if your schema already uses '_data', you might want to use '_compressed' + * or another unique name. + * + * @default '_data' + */ + compressedParamName?: string; + /** + * Controls whether to update the URL when parameters change. + * If `true` (default), changes to parameters will update the URL. + * If `false`, parameters will only be stored in memory without updating the URL. + * + * Note: When `false`, compress option will be ignored. + * @default true + */ + updateURL?: boolean; + /** + * If `true`, the scroll position will be preserved when the URL is updated. + * + * If `false`, the scroll position will be reset to the top when the URL is updated. + * @default false + */ + noScroll?: boolean; +} +/** The Standard Schema interface. */ +export interface StandardSchemaV1 { + /** The Standard Schema properties. */ + readonly "~standard": StandardSchemaV1.Props; +} +export declare namespace StandardSchemaV1 { + /** The Standard Schema properties interface. */ + interface Props { + /** The version number of the standard. */ + readonly version: 1; + /** The vendor name of the schema library. */ + readonly vendor: string; + /** Validates unknown input values. */ + readonly validate: (value: unknown) => Result | Promise>; + /** Inferred types associated with the schema. */ + readonly types?: Types | undefined; + } + /** The result interface of the validate function. */ + type Result = SuccessResult | FailureResult; + /** The result interface if validation succeeds. */ + interface SuccessResult { + /** The typed output value. */ + readonly value: T; + /** The non-existent issues. */ + readonly issues?: undefined; + } + /** The result interface if validation fails. */ + interface FailureResult { + /** The issues of failed validation. */ + readonly issues: ReadonlyArray; + } + /** The issue interface of the failure output. */ + interface Issue { + /** The error message of the issue. */ + readonly message: string; + /** The path of the issue, if any. */ + readonly path?: ReadonlyArray | undefined; + } + /** The path segment interface of the issue. */ + interface PathSegment { + /** The key representing a path segment. */ + readonly key: PropertyKey; + } + /** The Standard Schema types interface. */ + interface Types { + /** The input type of the schema. */ + readonly input: Input; + /** The output type of the schema. */ + readonly output: Output; + } + /** Infers the input type of a Standard Schema. */ + type InferInput = NonNullable["input"]; + /** Infers the output type of a Standard Schema. */ + type InferOutput = NonNullable["output"]; +} +/** + * Core class that handles URL search parameter operations with schema validation + * + * This class provides the foundation for the useSearchParams hook. It: + * 1. Validates values against a schema + * 2. Handles type conversion between URL strings and JavaScript types + * 3. Updates the URL when values change + * 4. Maintains a cache of valid schema keys for performance + */ +declare class SearchParams { + #private; + /** + * Create a new SearchParams instance with the given schema and options + * + * @param schema A StandardSchemaV1-compatible schema + * @param options Configuration options + */ + constructor(schema: Schema, options?: SearchParamsOptions); + /** + * Get a typed parameter value by key + * Retrieves the current value from the local cache, runs it through schema validation, + * and returns the validated, typed result + * + * @param key The parameter key to get + * @returns The typed value after schema validation + */ + get>(key: K & string): StandardSchemaV1.InferOutput[K]; + /** + * Set a parameter value and update the URL + * Validates the value through the schema before updating the URL + * + * @param key The parameter key to set + * @param value The value to set (will be type-converted and validated) + */ + set>(key: K & string, value: StandardSchemaV1.InferOutput[K]): void; + /** + * Clean up resources used by this instance + * + * IMPORTANT: You only need to call this method when using the debounce option. + * If you're not using debounce, there's no need to call cleanup. + * + * Call this when the component unmounts to prevent memory leaks from debounce timers. + * + * @example + * Example in a Svelte component with Svelte 5 runes: + * ```svelte + * + * ``` + */ + cleanup(): void; + /** + * Update multiple parameters at once + * + * This is more efficient than setting multiple parameters individually + * because it only triggers one URL update or one in-memory store update. + * + * @param values An object containing parameter key-value pairs to update + */ + update(values: Partial>): void; + /** + * Check if a key exists in the schema + * This is a critical method used by the Proxy handler to determine + * which properties should be treated as URL parameters + * + * @param key The key to check + * @returns True if the key is defined in the schema + */ + has(key: string): boolean; + /** + * Reset all parameters to their default values + * + * This method removes all current URL parameters or in-memory parameters + * and optionally sets parameters with non-default values back to their defaults. + * + * @param showDefaults Whether to show default values in the URL or in-memory store after reset. + * If not provided, uses the instance's showDefaults option. + */ + reset(showDefaults?: boolean): void; + /** + * Validate a value against the schema + * This is the core method that enforces schema validation + * + * @param value The value to validate + * @returns A StandardSchemaV1.Result containing either the validated value or validation errors + */ + validate(value: unknown): StandardSchemaV1.Result>; +} +/** + * Schema type for createSearchParamsSchema + * Allows specifying more precise types for arrays and objects + */ +export type SchemaTypeConfig = { + type: "string"; + default?: string; +} | { + type: "number"; + default?: number; +} | { + type: "boolean"; + default?: boolean; +} | { + type: "array"; + default?: ArrayType[]; + arrayType?: ArrayType; +} | { + type: "object"; + default?: ObjectType; + objectType?: ObjectType; +}; +/** + * Creates a simple schema compatible with useSearchParams without requiring external validation libraries. + * + * This is a lightweight alternative to using full schema validation libraries like Zod, Valibot, or Arktype. + * Use this when you need basic type conversion and default values without adding dependencies. + * + * Limitations: + * - For 'array' type: supports basic arrays, but doesn't validate array items + * - For 'object' type: supports generic objects, but doesn't validate nested properties + * - No custom validation rules or transformations + * - No granular reactivity: nested property changes require whole-value reassignment + * (e.g., params.items = [...params.items, newItem] instead of params.items.push(newItem)) + * + * For complex validation needs (nested validation, refined rules, etc.), use a dedicated + * validation library instead. + * + * Example usage: + * ``` + * const productSearchSchema = createSearchParamsSchema({ + * // Basic types with defaults + * page: { type: 'number', default: 1 }, + * filter: { type: 'string', default: '' }, + * sort: { type: 'string', default: 'newest' }, + * + * // Array type with specific element type + * tags: { + * type: 'array', + * default: ['new'], + * arrayType: '' // Specify string[] type + * }, + * + * // Object type with specific shape + * config: { + * type: 'object', + * default: { theme: 'light' }, + * objectType: { theme: '' } // Specify { theme: string } type + * } + * }); + * ``` + * + * URL storage format: + * - Arrays are stored as JSON strings: ?tags=["sale","featured"] + * - Objects are stored as JSON strings: ?config={"theme":"dark","fontSize":14} + * - Primitive values are stored directly: ?page=2&filter=red + */ +export declare function createSearchParamsSchema>(schema: T): StandardSchemaV1 : O : string; +}>; +/** + * A utility function to extract, validate and convert URL search parameters to [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) + * + * This function makes it easy to use the same schema validation in + * both client-side components (via useSearchParams) and server-side load functions. + * Unlike useSearchParams, this function doesn't modify the URL - it only validates + * parameters and returns them as a new URLSearchParams object. + * + * **Important for SvelteKit fine-grained reactivity**: This function only accesses URL parameters + * that are defined in your schema, ensuring that load functions only re-run when schema-defined + * parameters change, not when any URL parameter changes. + * + * Handles both standard URL parameters and compressed parameters (when compression is enabled). + * + * @param url The URL object from SvelteKit load function + * @param schema A validation schema (createSearchParamsSchema, Zod, Valibot, etc.) + * @param options Optional configuration (like custom compressedParamName) + * @returns URLSearchParams object with the validated values + * + * Example with SvelteKit page or layout load function: + * ```ts + * import { validateSearchParams } from '../../hooks/useSearchParams.svelte'; + * import { productSchema } from './schemas'; + * + * export const load = ({ url }) => { + * // Get validated search params as URLSearchParams object + * // Only accesses 'page', 'filter', 'sort' parameters from the URL + * // Load function will only re-run when these specific parameters change + * const searchParams = validateSearchParams(url, productSchema, { + * compressedParamName: '_compressed' + * }); + * + * // Use URLSearchParams directly with fetch + * const response = await fetch(`/api/products?${searchParams.toString()}`); + * return { + * products: await response.json() + * }; + * }; + * ``` + */ +export declare function validateSearchParams(url: URL, schema: Schema, options?: { + compressedParamName?: string; +}): { + searchParams: URLSearchParams; + data: StandardSchemaV1.InferOutput; +}; +export type ReturnUseSearchParams = SearchParams & StandardSchemaV1.InferOutput & { + /** + * Convert the current schema parameters to a URLSearchParams object + * This includes all values defined in the schema, regardless of their presence in the URL + * @returns URLSearchParams object containing all current parameter values + */ + toURLSearchParams(): URLSearchParams; +}; +/** + * Hook to create a reactive search params object with property access + * + * This client-side hook automatically updates the URL when parameters change. + * It provides type-safe access to URL search parameters through direct property access. + * + * @param schema A validation schema compatible with StandardSchemaV1 + * @param options Configuration options that affect URL behavior + * @returns A reactive object for working with typed search parameters + * + * Available options: + * - `showDefaults` (boolean): When true, parameters with default values will be shown in the URL. + * When false (default), parameters with default values will be omitted from the URL. + * - `debounce` (number): Milliseconds to delay URL updates when parameters change. + * Useful to avoid cluttering browser history when values change rapidly (default: 0, no debounce). + * - `pushHistory` (boolean): Controls whether URL updates create new browser history entries. + * If true (default), each update adds a new entry to the browser history. + * If false, updates replace the current URL without creating new history entries. + * - `compress` (boolean): When true, all parameters are compressed into a single parameter + * using lz-string compression. This helps reduce URL length and provides basic obfuscation (default: false). + * Use validateSearchParams with the same compressedParamName option when handling compressed URLs server-side. + * - `compressedParamName` (string): The name of the parameter used to store compressed data + * when compression is enabled. Customize this to avoid conflicts with parameters in your schema. + * Default is '_data'. + * - `updateURL` (boolean): When true (default), the URL is updated when parameters change. + * When false, only in-memory parameters are updated. + * + * Example with Zod: + * ``` + * import { z } from 'zod'; + * + * const productSearchSchema = z.object({ + * page: z.number().catch(1), + * filter: z.string().catch(''), + * sort: z.enum(['newest', 'oldest', 'price']).catch('newest'), + * }); + * + * const params = useSearchParams(productSearchSchema); + * + * // Access parameters directly + * const page = $derived(params.page); // number (defaults to 1) + * const sort = $derived(params.sort); // 'newest' | 'oldest' | 'price' + * + * // Update parameters directly + * params.page = 2; // Updates URL to include ?page=2 + * params.sort = 'price'; // Updates URL to include &sort=price + * ``` + * + * Example with options: + * ```typescript + * // Show default values in URL, debounce updates by 300ms, + * // don't create new history entries, and compress params + * const params = useSearchParams(schema, { + * showDefaults: true, + * debounce: 300, + * pushHistory: false, + * compress: true, + * compressedParamName: '_compressed' // Custom name to avoid conflicts + * }); + * + * // Great for binding to input fields (updates URL without cluttering history) + * + * // Resulting URL will be something like: /?_compressed=N4IgDgTg9g... + * ``` + * Example with Valibot: + * ``` + * import * as v from 'valibot'; + * + * const productSearchSchema = v.object({ + * page: v.optional(v.fallback(v.number(), 1), 1), + * filter: v.optional(v.fallback(v.string(), ''), ''), + * sort: v.optional(v.fallback(v.picklist(['newest', 'oldest', 'price']), 'newest'), 'newest'), + * }); + * + * const params = useSearchParams(productSearchSchema); + * ``` * Example with Arktype: + * ``` + * import { type } from 'arktype'; + * + * const productSearchSchema = type({ + * page: 'number = 1', + * filter: 'string = ""', + * sort: '"newest" | "oldest" | "price" = "newest"', + * }); + * + * const params = useSearchParams(productSearchSchema); + * ``` + * Or with our built-in schema creator (no additional dependencies): + * + * ``` + * const productSearchSchema = createSearchParamsSchema({ + * page: { type: 'number', default: 1 }, + * filter: { type: 'string', default: '' }, + * sort: { type: 'string', default: 'newest' } + * }); + * + * const params = useSearchParams(productSearchSchema); + * ``` + */ +export declare function useSearchParams(schema: Schema, options?: SearchParamsOptions): ReturnUseSearchParams; +export {}; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-search-params/use-search-params.svelte.js b/tools/ui/node_modules/runed/dist/utilities/use-search-params/use-search-params.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..a61b8d16429f7c1f04b8341f9553bdd47cb9f65b --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-search-params/use-search-params.svelte.js @@ -0,0 +1,1277 @@ +import { SvelteURLSearchParams } from "svelte/reactivity"; +import { dequal } from "dequal/lite"; +import * as lzString from "lz-string"; +import { browser, building } from "$app/environment"; +import { goto } from "$app/navigation"; +import { page } from "$app/state"; +import { IsMounted } from "../is-mounted/is-mounted.svelte.js"; +import { BROWSER } from "esm-env"; +import { untrack } from "svelte"; +/** + * Extract and pre-process values from URLSearchParams + * + * This is a shared utility used by both validateSearchParams and the SearchParams class + * to ensure consistent conversion of URL string values to JavaScript types. + * + * @param searchParams The URLSearchParams object to extract values from + * @param numberFields Optional set of field names that should be treated as numbers + * @returns An object with processed parameter values + * @internal + */ +function extractParamValues(searchParams, numberFields = new Set()) { + const params = {}; + for (const [key, value] of searchParams.entries()) { + try { + // Special handling for empty arrays and objects + if (value === "[]") { + params[key] = []; + continue; + } + if (value === "{}") { + params[key] = {}; + continue; + } + // Try to parse as JSON for complex objects/arrays + // This handles cases like ?obj={"foo":"bar"} or ?arr=[1,2,3] + if (value.startsWith("{") || value.startsWith("[")) { + params[key] = JSON.parse(value); + } + // Boolean values are stored as strings, convert them + else if (value === "true" || value === "false") { + params[key] = value === "true"; + } + // Only convert to number if it looks numeric AND the schema expects a number + else if (numberFields.has(key) && value.trim() !== "" && !isNaN(Number(value))) { + params[key] = Number(value); + } + // Handle comma-separated values as arrays (fallback format) + else if (value.includes(",")) { + params[key] = value.split(","); + } + // Keep everything else as strings + else { + params[key] = value; + } + } + catch { + // If JSON parsing fails, treat as regular string + // This ensures we don't throw errors during type conversion + params[key] = value; + } + } + return params; +} +/** + * Extract schema information by validating an empty object. + * This consolidates multiple schema validation calls into one for efficiency. + * Works with any StandardSchemaV1-compatible schema (Zod, Valibot, Arktype, etc.) + * + * Note: This function expects schemas used with useSearchParams to have defaults for all fields, + * which is the recommended pattern since URL parameters are inherently optional. + * + * @param schema A StandardSchemaV1-compatible schema + * @returns Object containing schema keys, number fields, and default values + * @internal + */ +function extractSchemaInfo(schema) { + const validationResult = schema["~standard"].validate({}); + if (!validationResult || !("value" in validationResult)) { + return { keys: [], numberFields: new Set(), defaultValues: {} }; + } + const defaultValues = validationResult.value; + const keys = Object.keys(defaultValues); + const numberFields = new Set(); + // Determine which fields are number types by checking default value types + for (const [key, defaultValue] of Object.entries(defaultValues)) { + if (typeof defaultValue === "number") { + numberFields.add(key); + } + } + return { keys, numberFields, defaultValues }; +} +/** + * Extract and pre-process values from URLSearchParams, but only for keys defined in the schema. + * This enables SvelteKit's fine-grained reactivity by only accessing specific parameters + * instead of all parameters via searchParams.entries(). + * + * @param searchParams The URLSearchParams object to extract values from + * @param schemaKeys Array of parameter keys that are defined in the schema + * @param numberFields Set of field names that should be treated as numbers + * @returns An object with processed parameter values for schema-defined keys only + * @internal + */ +function extractSelectiveParamValues(searchParams, schemaKeys, numberFields = new Set()) { + const params = {}; + // Only access parameters that are defined in the schema + // This maintains SvelteKit's fine-grained reactivity + for (const key of schemaKeys) { + const value = searchParams.get(key); + if (value === null) + continue; + try { + if (value === "[]") { + params[key] = []; + continue; + } + if (value === "{}") { + params[key] = {}; + continue; + } + // Try to parse as JSON for complex objects/arrays + // This handles cases like ?obj={"foo":"bar"} or ?arr=[1,2,3] + if (value.startsWith("{") || value.startsWith("[")) { + params[key] = JSON.parse(value); + } + // Boolean values are stored as strings, convert them + else if (value === "true" || value === "false") { + params[key] = value === "true"; + } + // Only convert to number if it looks numeric AND the schema expects a number + // This handles cases like ?page=2 or ?price=19.99 + else if (numberFields.has(key) && value.trim() !== "" && !isNaN(Number(value))) { + params[key] = Number(value); + } + // Handle comma-separated values as arrays (fallback format) + else if (value.includes(",")) { + params[key] = value.split(","); + } + // Keep everything else as strings + else { + params[key] = value; + } + } + catch { + // If JSON parsing fails, treat as regular string + // This ensures we don't throw errors during type conversion + params[key] = value; + } + } + return params; +} +/** + * Core class that handles URL search parameter operations with schema validation + * + * This class provides the foundation for the useSearchParams hook. It: + * 1. Validates values against a schema + * 2. Handles type conversion between URL strings and JavaScript types + * 3. Updates the URL when values change + * 4. Maintains a cache of valid schema keys for performance + */ +class SearchParams { + /** The schema used for validation and type conversion */ + #schema; + /** + * A lookup object containing all valid keys from the schema + * Used for fast property existence checking without re-validating + * Format: { propertyName1: true, propertyName2: true, ... } + */ + #schemaShape; + /** + * Options that configure behavior + */ + #options; + /** + * Default values from the schema, used for comparison when showDefaults is false + */ + #defaultValues; + /** + * Set of field names that expect number types based on schema validation + * Used to intelligently convert URL string values to numbers only when appropriate + */ + #numberFields; + /** + * Timer ID for debouncing URL updates + * @private + */ + #debounceTimer = null; + /** + * Local cache for immediate reads/writes + * Used regardless of updateURL setting to prevent input lag + * When updateURL is true, this cache is synced to the URL (with optional debouncing) + * When updateURL is false, this cache is the sole source of truth + * @private + */ + #localCache = $state(new URLSearchParams()); + /** + * Flag to track if local cache has been initialized from URL + * @private + */ + #cacheInitialized = false; + /** + * Create a new SearchParams instance with the given schema and options + * + * @param schema A StandardSchemaV1-compatible schema + * @param options Configuration options + */ + constructor(schema, options = {}) { + this.#schema = schema; + this.#options = { + showDefaults: false, + debounce: 0, + pushHistory: true, + compress: false, + compressedParamName: "_data", + updateURL: true, + noScroll: false, + ...options, + }; + // Extract schema information (keys, number fields, defaults) in one pass + const schemaInfo = extractSchemaInfo(schema); + // Store schema shape for property checking + this.#schemaShape = schemaInfo.keys.reduce((acc, key) => { + acc[key] = true; + return acc; + }, {}); + // Store default values and number fields + this.#defaultValues = { ...schemaInfo.defaultValues }; + this.#numberFields = schemaInfo.numberFields; + } + /** + * Initialize the local cache from the URL on first access + * @private + */ + #initializeCacheFromURL() { + if (this.#cacheInitialized) + return; + this.#cacheInitialized = true; + // only initialize from URL if updateURL is true and we're in browser + if (!this.#options.updateURL || !BROWSER || building) + return; + const urlParams = page.url.searchParams; + const compressedParamName = this.#options.compressedParamName || "_data"; + // Handle compressed mode + if (this.#options.compress && urlParams.has(compressedParamName)) { + try { + const compressedData = urlParams.get(compressedParamName) || ""; + const decompressed = lzString.decompressFromEncodedURIComponent(compressedData); + if (decompressed) { + const decompressedObj = JSON.parse(decompressed); + const newCache = new URLSearchParams(); + // populate cache with decompressed values + for (const [key, value] of Object.entries(decompressedObj)) { + const stringValue = this.#serializeValue(value); + newCache.set(key, stringValue); + } + untrack(() => (this.#localCache = newCache)); + return; + } + } + catch (e) { + console.error("Error initializing cache from compressed URL", e); + } + } + // Normal mode - copy current URL params to cache + const newCache = new SvelteURLSearchParams(); + for (const [key, value] of urlParams.entries()) { + newCache.set(key, value); + } + untrack(() => (this.#localCache = newCache)); + } + /** + * Get a typed parameter value by key + * Retrieves the current value from the local cache, runs it through schema validation, + * and returns the validated, typed result + * + * @param key The parameter key to get + * @returns The typed value after schema validation + */ + get(key) { + this.#initializeCacheFromURL(); + return this.#getTypedValue(key); + } + /** + * Set a parameter value and update the URL + * Validates the value through the schema before updating the URL + * + * @param key The parameter key to set + * @param value The value to set (will be type-converted and validated) + */ + set(key, value) { + this.#setValue(key, value); + } + /** + * Clean up resources used by this instance + * + * IMPORTANT: You only need to call this method when using the debounce option. + * If you're not using debounce, there's no need to call cleanup. + * + * Call this when the component unmounts to prevent memory leaks from debounce timers. + * + * @example + * Example in a Svelte component with Svelte 5 runes: + * ```svelte + * + * ``` + */ + cleanup() { + // Clear any debounce timer + if (this.#debounceTimer) { + clearTimeout(this.#debounceTimer); + this.#debounceTimer = null; + } + } + /** + * Update multiple parameters at once + * + * This is more efficient than setting multiple parameters individually + * because it only triggers one URL update or one in-memory store update. + * + * @param values An object containing parameter key-value pairs to update + */ + update(values) { + this.#initializeCacheFromURL(); + if (!values || typeof values !== "object") + return; + // Quick optimization: Filter out non-schema keys upfront + const filteredValues = {}; + let anyValid = false; + for (const [key, value] of Object.entries(values)) { + if (this.has(key)) { + filteredValues[key] = value; + anyValid = true; + } + } + // no valid keys to update + if (!anyValid) + return; + // Always use local cache for immediate state + const paramsObject = this.#extractParamValues(this.#localCache); + // Check if there are any actual changes + let hasChanges = false; + for (const [key, value] of Object.entries(filteredValues)) { + const currentValue = paramsObject[key]; + // Optimization: For primitives, use direct comparison; use dequal only for objects + const isPrimitive = typeof currentValue !== "object" && + typeof value !== "object" && + currentValue !== null && + value !== null; + if (isPrimitive ? currentValue !== value : !dequal(currentValue, value)) { + hasChanges = true; + break; + } + } + // no changes, skip update + if (!hasChanges) + return; + // Create a new object with the updated values + const newParamsObject = { ...paramsObject, ...filteredValues }; + // Validate against schema + const result = this.validate(newParamsObject); + if (result && "value" in result) { + const validatedResult = result.value; + // Always update local cache immediately (for instant reads) + const updatedCache = this.#updateParamsWithValidatedValues(this.#localCache, filteredValues, validatedResult, true // always treat as in-memory for cache updates + ); + this.#localCache = updatedCache; + // If updateURL is true and we're in browser, sync to URL + if (this.#options.updateURL && BROWSER && !building) { + // Handle the compression mode if enabled + if (this.#options.compress) { + this.#handleCompressedUpdate(validatedResult); + } + else { + // Normal mode - update the URL + // Start from the current local cache to preserve all params + const urlParams = this.#updateParamsWithValidatedValues(this.#localCache, filteredValues, validatedResult, false // use URLSearchParams for URL updates + ); + this.#navigateWithParams(urlParams); + } + } + } + } + /** + * Check if a key exists in the schema + * This is a critical method used by the Proxy handler to determine + * which properties should be treated as URL parameters + * + * @param key The key to check + * @returns True if the key is defined in the schema + */ + has(key) { + return key in this.#schemaShape; + } + /** + * Reset all parameters to their default values + * + * This method removes all current URL parameters or in-memory parameters + * and optionally sets parameters with non-default values back to their defaults. + * + * @param showDefaults Whether to show default values in the URL or in-memory store after reset. + * If not provided, uses the instance's showDefaults option. + */ + reset(showDefaults) { + this.#initializeCacheFromURL(); + const useShowDefaults = showDefaults !== undefined ? showDefaults : this.#options.showDefaults; + if (useShowDefaults) { + // Reuse the filtered default values for both cache and URL updates + const validDefaultValues = {}; + // Filter out null/undefined values + for (const [key, defaultValue] of Object.entries(this.#defaultValues)) { + if (defaultValue !== null && defaultValue !== undefined) { + validDefaultValues[key] = defaultValue; + } + } + // Always update local cache immediately + const newCache = new SvelteURLSearchParams(); + for (const [key, value] of Object.entries(validDefaultValues)) { + const stringValue = this.#serializeValue(value); + newCache.set(key, stringValue); + } + this.#localCache = newCache; + // If updateURL is true, sync to URL + if (this.#options.updateURL && BROWSER && !building) { + const urlParams = new URLSearchParams(); + for (const [key, value] of Object.entries(validDefaultValues)) { + const stringValue = this.#serializeValue(value); + urlParams.set(key, stringValue); + } + this.#navigateWithParams(urlParams); + } + } + else { + // Not showing defaults - just clear everything + this.#localCache = new SvelteURLSearchParams(); + // If updateURL is true, clear the URL + if (this.#options.updateURL && BROWSER && !building) { + goto("?", { replaceState: true, noScroll: this.#options.noScroll }); + } + } + } + /** + * Validate a value against the schema + * This is the core method that enforces schema validation + * + * @param value The value to validate + * @returns A StandardSchemaV1.Result containing either the validated value or validation errors + */ + validate(value) { + return this.#schema["~standard"].validate(value); + } + /** + * Helper method to create a new search params object + * Works with both URLSearchParams and SvelteURLSearchParams + * @private + */ + #createSearchParams(base, isInMemory) { + if (isInMemory) { + // For in-memory, always return SvelteURLSearchParams + return new SvelteURLSearchParams(base.toString()); + } + else { + // For URL updates, always return URLSearchParams + return new URLSearchParams(base.toString()); + } + } + /** + * Helper method to update search params with validated values + * Works with both URLSearchParams and SvelteURLSearchParams + * @private + */ + #updateParamsWithValidatedValues(searchParams, updates, validatedValues, isInMemory) { + const newSearchParams = this.#createSearchParams(searchParams, isInMemory); + for (const key of Object.keys(updates)) { + // Skip keys not in schema + if (!this.has(key)) + continue; + const validatedValue = validatedValues[key]; + // Check if the value should be omitted + const isDefaultValue = !this.#options.showDefaults && dequal(validatedValue, this.#defaultValues[key]); + if (validatedValue === undefined || validatedValue === null || isDefaultValue) { + newSearchParams.delete(key); + } + else { + const stringValue = this.#serializeValue(validatedValue); + newSearchParams.set(key, stringValue); + } + } + return newSearchParams; + } + /** + * Helper method to handle updates when compression is enabled + * @private + */ + #handleCompressedUpdate(fullParamsObject) { + try { + // Convert the entire parameters object to JSON + const jsonData = JSON.stringify(fullParamsObject); + // Compress the JSON string + const compressed = lzString.compressToEncodedURIComponent(jsonData); + // Create new params with just the compressed data + const newSearchParams = new URLSearchParams(); + const compressedParamName = this.#options.compressedParamName || "_data"; + newSearchParams.set(compressedParamName, compressed); + // Update URL + this.#navigateWithParams(newSearchParams); + } + catch (e) { + console.error("Error compressing data, falling back to normal mode", e); + // Create new params with all values as fallback + const newSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(fullParamsObject)) { + if (value === undefined || value === null) { + continue; + } + const stringValue = this.#serializeValue(value); + newSearchParams.set(key, stringValue); + } + this.#navigateWithParams(newSearchParams); + } + } + /** + * Helper method to navigate with URL parameters + * Handles debouncing and history state + * @private + */ + #navigateWithParams(params) { + const navigateToNewUrl = () => { + if (!BROWSER) + return; + // When pushHistory is false, use replaceState to avoid creating a browser history entry + const gotoOptions = !this.#options.pushHistory + ? { replaceState: true, keepFocus: true } + : { keepFocus: true }; + goto("?" + params.toString(), { ...gotoOptions, noScroll: this.#options.noScroll }); + }; + // If debounce is set, delay the URL update + if (this.#options.debounce && this.#options.debounce > 0) { + // Clear any existing timer + if (this.#debounceTimer) { + clearTimeout(this.#debounceTimer); + } + // Set a new timer + this.#debounceTimer = setTimeout(navigateToNewUrl, this.#options.debounce); + } + else { + // No debounce, update immediately + navigateToNewUrl(); + } + } + /** + * Converts a value to a URL-compatible string representation + * Handles arrays, objects, and primitive values + * @private + */ + #serializeValue(value) { + if (Array.isArray(value)) { + return JSON.stringify(value); + } + else if (typeof value === "object" && value !== null) { + return JSON.stringify(value); + } + else { + return String(value); + } + } + #extractParamValues(searchParams) { + const compressedParamName = this.#options.compressedParamName || "_data"; + // Check if we're using compression mode and have a compressed parameter + if (this.#options.compress && searchParams.has(compressedParamName)) { + try { + const compressedData = searchParams.get(compressedParamName) || ""; + const decompressed = lzString.decompressFromEncodedURIComponent(compressedData); + if (decompressed) { + try { + // Parse the decompressed JSON + return JSON.parse(decompressed); + } + catch (e) { + console.error("Failed to parse decompressed data", e); + return {}; + } + } + } + catch (e) { + console.error("Error decompressing data", e); + } + return {}; + } + // If not using compression, use the normal extraction with number field detection + return extractParamValues(searchParams, this.#numberFields); + } + /** + * Get typed values from the local cache using schema validation + * + * This method: + * 1. Gets the current search parameters from the local cache + * 2. Extracts and processes parameter values + * 3. Validates them against the schema + * 4. Returns the typed value for the requested key + * + * @param key The parameter key to get + * @returns The typed value after validation or undefined if invalid + * @private + */ + #getTypedValue(key) { + // Always read from local cache for immediate state + const paramsObject = this.#extractParamValues(this.#localCache); + const result = this.validate(paramsObject); + if (result instanceof Promise) { + throw new Error("Async validation is not supported in validateSearchParams"); + } + if (result && "value" in result) { + return result.value[key]; + } + else if (result && "issues" in result) { + // If validation fails, use defaults + const emptyResult = this.validate({}); + const defaultValues = emptyResult && "value" in emptyResult ? emptyResult.value : {}; + // find valid params in the paramsObject and use them, do not override all default values + const validParams = Object.fromEntries(Object.entries(paramsObject).filter(([key]) => !result.issues?.some((issue) => issue.path?.includes(key)))); + return { + ...(typeof defaultValues === "object" && defaultValues !== null ? defaultValues : {}), + ...validParams, + }[key]; + } + // If validation failed, return undefined + return undefined; + } + /** + * Set a parameter value and update the local cache and optionally the URL + * + * This method: + * 1. Gets the current search parameters from the local cache + * 2. Extracts and processes all current parameters + * 3. Updates the parameter with the new value + * 4. Validates the complete parameter object against the schema + * 5. Updates the local cache immediately (for instant reads) + * 6. Optionally updates the browser URL if updateURL is true + * + * @param key The parameter key to set + * @param value The value to set + * @private + */ + #setValue(key, value) { + this.#initializeCacheFromURL(); + // Optimization: Skip if the key is not in schema + if (!this.has(key)) + return; + // Always use local cache for immediate state + const paramsObject = this.#extractParamValues(this.#localCache); + // Check if the new value is the same as the current value + // Optimization: For primitives, use direct comparison; use dequal only for objects + const currentValue = paramsObject[key]; + const isPrimitive = typeof currentValue !== "object" && + typeof value !== "object" && + currentValue !== null && + value !== null; + if (isPrimitive ? currentValue === value : dequal(currentValue, value)) { + // Skip the update if values are the same + return; + } + // Create a new object with the updated value + const newParamsObject = { ...paramsObject, [key]: value }; + // Validate against schema to ensure type correctness + const result = this.validate(newParamsObject); + if (result && "value" in result) { + const validatedResult = result.value; + const updateObj = { [key]: value }; + // Always update local cache immediately (for instant reads) + const updatedCache = this.#updateParamsWithValidatedValues(this.#localCache, updateObj, validatedResult, true // always treat as in-memory for cache updates + ); + this.#localCache = updatedCache; + // If updateURL is true, sync to URL + if (this.#options.updateURL && BROWSER && !building) { + // Handle the compression mode if enabled + if (this.#options.compress) { + this.#handleCompressedUpdate(validatedResult); + } + else { + // Normal mode - update the URL + // Start from the current local cache to preserve all params + const urlParams = this.#updateParamsWithValidatedValues(this.#localCache, updateObj, validatedResult, false // use URLSearchParams for URL updates + ); + this.#navigateWithParams(urlParams); + } + } + } + } +} +/** + * Creates a simple schema compatible with useSearchParams without requiring external validation libraries. + * + * This is a lightweight alternative to using full schema validation libraries like Zod, Valibot, or Arktype. + * Use this when you need basic type conversion and default values without adding dependencies. + * + * Limitations: + * - For 'array' type: supports basic arrays, but doesn't validate array items + * - For 'object' type: supports generic objects, but doesn't validate nested properties + * - No custom validation rules or transformations + * - No granular reactivity: nested property changes require whole-value reassignment + * (e.g., params.items = [...params.items, newItem] instead of params.items.push(newItem)) + * + * For complex validation needs (nested validation, refined rules, etc.), use a dedicated + * validation library instead. + * + * Example usage: + * ``` + * const productSearchSchema = createSearchParamsSchema({ + * // Basic types with defaults + * page: { type: 'number', default: 1 }, + * filter: { type: 'string', default: '' }, + * sort: { type: 'string', default: 'newest' }, + * + * // Array type with specific element type + * tags: { + * type: 'array', + * default: ['new'], + * arrayType: '' // Specify string[] type + * }, + * + * // Object type with specific shape + * config: { + * type: 'object', + * default: { theme: 'light' }, + * objectType: { theme: '' } // Specify { theme: string } type + * } + * }); + * ``` + * + * URL storage format: + * - Arrays are stored as JSON strings: ?tags=["sale","featured"] + * - Objects are stored as JSON strings: ?config={"theme":"dark","fontSize":14} + * - Primitive values are stored directly: ?page=2&filter=red + */ +export function createSearchParamsSchema(schema) { + return { + "~standard": { + version: 1, + vendor: "", + validate: (input) => { + const output = {}; + const issues = []; + // Set default values first + for (const [key, config] of Object.entries(schema)) { + output[key] = + config.default !== undefined ? config.default : null; + } + if (input && typeof input === "object") { + for (const [key, config] of Object.entries(schema)) { + const inputValue = input[key]; + if (inputValue !== undefined) { + try { + switch (config.type) { + case "number": { + const num = typeof inputValue === "number" ? inputValue : Number(inputValue); + if (typeof num !== "number" || !Number.isFinite(num)) { + issues.push({ + message: `Invalid number for "${key}"`, + path: [key], + }); + } + else { + output[key] = num; + } + break; + } + case "boolean": { + if (typeof inputValue === "boolean" || + inputValue === "true" || + inputValue === "false") { + output[key] = + typeof inputValue === "boolean" ? inputValue : inputValue === "true"; + } + else { + issues.push({ + message: `Invalid boolean for "${key}"`, + path: [key], + }); + } + break; + } + case "array": { + if (Array.isArray(inputValue)) { + output[key] = inputValue; + } + else { + issues.push({ + message: `Invalid array for "${key}"`, + path: [key], + }); + } + break; + } + case "object": { + if (typeof inputValue === "object" && + inputValue !== null && + !Array.isArray(inputValue)) { + output[key] = inputValue; + } + else { + issues.push({ + message: `Invalid object for "${key}"`, + path: [key], + }); + } + break; + } + case "string": + default: { + output[key] = String(inputValue); + } + } + } + catch (e) { + issues.push({ + message: `Error parsing "${key}": ${e.message}`, + path: [key], + }); + } + } + } + } + if (issues.length > 0) { + return { issues }; + } + return { value: output }; + }, + types: { + input: {}, + output: {}, + }, + }, + }; +} +/** + * A utility function to extract, validate and convert URL search parameters to [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) + * + * This function makes it easy to use the same schema validation in + * both client-side components (via useSearchParams) and server-side load functions. + * Unlike useSearchParams, this function doesn't modify the URL - it only validates + * parameters and returns them as a new URLSearchParams object. + * + * **Important for SvelteKit fine-grained reactivity**: This function only accesses URL parameters + * that are defined in your schema, ensuring that load functions only re-run when schema-defined + * parameters change, not when any URL parameter changes. + * + * Handles both standard URL parameters and compressed parameters (when compression is enabled). + * + * @param url The URL object from SvelteKit load function + * @param schema A validation schema (createSearchParamsSchema, Zod, Valibot, etc.) + * @param options Optional configuration (like custom compressedParamName) + * @returns URLSearchParams object with the validated values + * + * Example with SvelteKit page or layout load function: + * ```ts + * import { validateSearchParams } from '../../hooks/useSearchParams.svelte'; + * import { productSchema } from './schemas'; + * + * export const load = ({ url }) => { + * // Get validated search params as URLSearchParams object + * // Only accesses 'page', 'filter', 'sort' parameters from the URL + * // Load function will only re-run when these specific parameters change + * const searchParams = validateSearchParams(url, productSchema, { + * compressedParamName: '_compressed' + * }); + * + * // Use URLSearchParams directly with fetch + * const response = await fetch(`/api/products?${searchParams.toString()}`); + * return { + * products: await response.json() + * }; + * }; + * ``` + */ +export function validateSearchParams(url, schema, options = {}) { + const compressedParamName = options.compressedParamName || "_data"; + let validatedValue = {}; + // Check if we're dealing with compressed data and handle appropriately + if (url.searchParams.has(compressedParamName)) { + try { + // Get and decompress the data + const compressedData = url.searchParams.get(compressedParamName) || ""; + const decompressed = lzString.decompressFromEncodedURIComponent(compressedData); + if (decompressed) { + try { + // Parse the decompressed JSON + const decompressedObj = JSON.parse(decompressed); + // Validate against schema + const result = schema["~standard"].validate(decompressedObj); + if (result && "value" in result) { + validatedValue = result.value; + } + else { + // Use defaults if validation fails + const emptyResult = schema["~standard"].validate({}); + validatedValue = (emptyResult && "value" in emptyResult ? emptyResult.value : {}); + } + } + catch (e) { + console.error("Failed to parse decompressed data", e); + // Use defaults if parsing fails + const emptyResult = schema["~standard"].validate({}); + validatedValue = (emptyResult && "value" in emptyResult ? emptyResult.value : {}); + } + } + else { + // Use defaults if decompression fails + const emptyResult = schema["~standard"].validate({}); + validatedValue = (emptyResult && "value" in emptyResult ? emptyResult.value : {}); + } + } + catch (e) { + console.error("Error decompressing data", e); + // Use defaults if decompression errors + const emptyResult = schema["~standard"].validate({}); + validatedValue = (emptyResult && "value" in emptyResult ? emptyResult.value : {}); + } + } + else { + // Normal (uncompressed) extraction - use selective extraction for fine-grained reactivity + const schemaInfo = extractSchemaInfo(schema); + const paramsObject = extractSelectiveParamValues(url.searchParams, schemaInfo.keys, schemaInfo.numberFields); + // Validate the parameters against the schema + let result = schema["~standard"].validate(paramsObject); + if (result instanceof Promise) { + throw new Error("Async validation is not supported in validateSearchParams"); + } + if (result && "value" in result) { + validatedValue = result.value; + } + else if (result && "issues" in result) { + // If validation fails, use defaults + const emptyResult = schema["~standard"].validate({}); + validatedValue = (emptyResult && "value" in emptyResult ? emptyResult.value : {}); + // find valid params in the paramsObject and use them, do not override all default values + const validParams = Object.fromEntries(Object.entries(paramsObject).filter(([key]) => !result.issues?.some((issue) => issue.path?.includes(key)))); + validatedValue = { ...validatedValue, ...validParams }; + } + } + // Create a new URLSearchParams object with the validated values + const newSearchParams = new URLSearchParams(); + // Helper function to serialize values + const serializeValue = (value) => { + if (Array.isArray(value)) { + return JSON.stringify(value); + } + else if (typeof value === "object" && value !== null) { + return JSON.stringify(value); + } + else { + return String(value); + } + }; + // Add each validated parameter to the URLSearchParams + for (const [key, value] of Object.entries(validatedValue)) { + if (value === undefined || value === null) + continue; + const stringValue = serializeValue(value); + newSearchParams.set(key, stringValue); + } + return { + searchParams: newSearchParams, + data: validatedValue, + }; +} +/** + * Hook to create a reactive search params object with property access + * + * This client-side hook automatically updates the URL when parameters change. + * It provides type-safe access to URL search parameters through direct property access. + * + * @param schema A validation schema compatible with StandardSchemaV1 + * @param options Configuration options that affect URL behavior + * @returns A reactive object for working with typed search parameters + * + * Available options: + * - `showDefaults` (boolean): When true, parameters with default values will be shown in the URL. + * When false (default), parameters with default values will be omitted from the URL. + * - `debounce` (number): Milliseconds to delay URL updates when parameters change. + * Useful to avoid cluttering browser history when values change rapidly (default: 0, no debounce). + * - `pushHistory` (boolean): Controls whether URL updates create new browser history entries. + * If true (default), each update adds a new entry to the browser history. + * If false, updates replace the current URL without creating new history entries. + * - `compress` (boolean): When true, all parameters are compressed into a single parameter + * using lz-string compression. This helps reduce URL length and provides basic obfuscation (default: false). + * Use validateSearchParams with the same compressedParamName option when handling compressed URLs server-side. + * - `compressedParamName` (string): The name of the parameter used to store compressed data + * when compression is enabled. Customize this to avoid conflicts with parameters in your schema. + * Default is '_data'. + * - `updateURL` (boolean): When true (default), the URL is updated when parameters change. + * When false, only in-memory parameters are updated. + * + * Example with Zod: + * ``` + * import { z } from 'zod'; + * + * const productSearchSchema = z.object({ + * page: z.number().catch(1), + * filter: z.string().catch(''), + * sort: z.enum(['newest', 'oldest', 'price']).catch('newest'), + * }); + * + * const params = useSearchParams(productSearchSchema); + * + * // Access parameters directly + * const page = $derived(params.page); // number (defaults to 1) + * const sort = $derived(params.sort); // 'newest' | 'oldest' | 'price' + * + * // Update parameters directly + * params.page = 2; // Updates URL to include ?page=2 + * params.sort = 'price'; // Updates URL to include &sort=price + * ``` + * + * Example with options: + * ```typescript + * // Show default values in URL, debounce updates by 300ms, + * // don't create new history entries, and compress params + * const params = useSearchParams(schema, { + * showDefaults: true, + * debounce: 300, + * pushHistory: false, + * compress: true, + * compressedParamName: '_compressed' // Custom name to avoid conflicts + * }); + * + * // Great for binding to input fields (updates URL without cluttering history) + * + * // Resulting URL will be something like: /?_compressed=N4IgDgTg9g... + * ``` + * Example with Valibot: + * ``` + * import * as v from 'valibot'; + * + * const productSearchSchema = v.object({ + * page: v.optional(v.fallback(v.number(), 1), 1), + * filter: v.optional(v.fallback(v.string(), ''), ''), + * sort: v.optional(v.fallback(v.picklist(['newest', 'oldest', 'price']), 'newest'), 'newest'), + * }); + * + * const params = useSearchParams(productSearchSchema); + * ``` * Example with Arktype: + * ``` + * import { type } from 'arktype'; + * + * const productSearchSchema = type({ + * page: 'number = 1', + * filter: 'string = ""', + * sort: '"newest" | "oldest" | "price" = "newest"', + * }); + * + * const params = useSearchParams(productSearchSchema); + * ``` + * Or with our built-in schema creator (no additional dependencies): + * + * ``` + * const productSearchSchema = createSearchParamsSchema({ + * page: { type: 'number', default: 1 }, + * filter: { type: 'string', default: '' }, + * sort: { type: 'string', default: 'newest' } + * }); + * + * const params = useSearchParams(productSearchSchema); + * ``` + */ +export function useSearchParams(schema, options = {}) { + // Create the SearchParams instance to handle validation and URL updates + // This is the core class that implements the actual functionality + const searchParams = new SearchParams(schema, options); + // Wait for hydration to complete before executing browser-specific initialization + const isMounted = new IsMounted(); + // Only run initialization logic after hydration is complete + $effect(() => { + if (!isMounted.current || !browser || building) + return; + // Remove incorrect params on initialization (only after hydration) + if (options.updateURL !== false) { + const schemaInfo = extractSchemaInfo(schema); + const currentParams = extractParamValues(page.url.searchParams, schemaInfo.numberFields); + const validationResult = schema["~standard"].validate(currentParams); + if (validationResult && + "issues" in validationResult && + Array.isArray(validationResult.issues) && + validationResult.issues.length > 0) { + // Find all incorrect param keys + const invalidKeys = validationResult.issues + .map((issue) => Array.isArray(issue.path) && issue.path.length > 0 ? issue.path[0] : null) + .filter(Boolean); + if (invalidKeys.length > 0) { + const newSearchParams = new URLSearchParams(page.url.searchParams.toString()); + for (const key of invalidKeys) { + newSearchParams.delete(String(key)); + } + goto("?" + newSearchParams.toString(), { replaceState: true }); + } + } + } + // If showDefaults is true, we need to initialize the URL with all default values (only after hydration) + if (options.showDefaults) { + // Get all the schema information in one pass + const schemaInfo = extractSchemaInfo(schema); + if (schemaInfo.keys.length > 0) { + // If compression is enabled, use SearchParams.update() method which handles compression + if (options.compress) { + // Call the update method with the default values to properly handle compression + searchParams.update(schemaInfo.defaultValues); + } + else { + // For non-compressed mode, use the original approach + const currentParams = extractParamValues(page.url.searchParams, schemaInfo.numberFields); + const newSearchParams = new URLSearchParams(page.url.searchParams.toString()); + let needsUpdate = false; + // For each default value, add it to the URL if not already present + for (const [key, defaultValue] of Object.entries(schemaInfo.defaultValues)) { + // Skip if the parameter is already in the URL (don't override user values) + if (key in currentParams) + continue; + needsUpdate = true; + if (defaultValue === null || defaultValue === undefined) { + continue; + } + let stringValue; + if (Array.isArray(defaultValue)) { + stringValue = JSON.stringify(defaultValue); + } + else if (typeof defaultValue === "object" && defaultValue !== null) { + stringValue = JSON.stringify(defaultValue); + } + else { + stringValue = String(defaultValue); + } + newSearchParams.set(key, stringValue); + } + // Only update the URL if we added parameters + if (needsUpdate) { + // Always use replaceState: true for initialization to avoid creating a new history entry + // Don't use debouncing for initialization as this is a one-time operation + goto("?" + newSearchParams.toString(), { replaceState: true }); + } + } + } + } + }); + // Only run this logic in the browser and if debounce is enabled + if (browser && !building && options.debounce && options.debounce > 0) { + $effect(() => { + // This effect runs once when the hook is initialized within a component. + // It has no dependencies, so it doesn't re-run. + return () => { + searchParams.cleanup(); + }; + }); + } + // Create a proxy to intercept property access/assignment + // This enables the direct property syntax: params.page instead of params.get('page') + // The proxy pattern is what makes the API feel natural and type-safe + // + // IMPORTANT LIMITATION: This proxy only provides top-level reactivity + // - Direct property access works: params.page, params.filter + // - Nested property changes require whole-object updates: params.fields = {...fields, newProp: value} + // - Arrays/objects are not granularly reactive: params.items[0].name = 'new' won't trigger URL updates + // + // For granular nested reactivity, you would need: + // 1. Recursive proxy creation for nested objects/arrays + // 2. Path tracking system (e.g., "fields.0.name") + // 3. Granular URL serialization instead of JSON + // 4. Complete rewrite of validation and type systems + // This would be a breaking change requiring a new major version + const handler = { + get: (target, prop) => { + // Special methods we want to expose directly with proper binding + if (prop === "reset") { + // We need to handle each method individually to satisfy TypeScript + return function (showDefaults) { + return target.reset(showDefaults); + }; + } + else if (prop === "update") { + return function (values) { + return target.update(values); + }; + } + else if (prop === "cleanup") { + return function () { + return target.cleanup(); + }; + } + else if (prop === "toURLSearchParams") { + // Implementation of toURLSearchParams + return function () { + const newSearchParams = new URLSearchParams(); + // Get the schema's default values + current values + const validationResult = schema["~standard"].validate({}); + if (validationResult && "value" in validationResult) { + const schemaValues = validationResult.value; + // Create an object with all the values from the schema + // First set the default values + const allValues = { ...schemaValues }; + // Then override with the current values from the proxy + // This ensures we get the most up-to-date values that might not yet be in the URL or in-memory store + for (const key of Object.keys(schemaValues)) { + // Get the current value using the proxy's access + if (typeof key === "string" && target.has(key)) { + const currentValue = target.get(key); + if (currentValue !== undefined) { + allValues[key] = currentValue; + } + } + } + // Add each parameter to the URLSearchParams + for (const [key, value] of Object.entries(allValues)) { + // Skip undefined/null values + if (value === undefined || value === null) { + continue; + } + // Serialize the value + let stringValue; + if (Array.isArray(value)) { + stringValue = JSON.stringify(value); + } + else if (typeof value === "object" && value !== null) { + stringValue = JSON.stringify(value); + } + else { + stringValue = String(value); + } + // Set the parameter + newSearchParams.set(key, stringValue); + } + } + return newSearchParams; + }; + } + // IMPORTANT: We use the has() method to determine if this is a schema parameter + // This is why the has() method must be maintained + if (typeof prop === "string" && target.has(prop)) { + // Type assertion needed here because TypeScript can't infer that our runtime check + // with target.has() guarantees that prop is a valid key of our schema output type + // NOTE: This returns the raw value (object/array/primitive) without nested proxification + // If the value is an object or array, changes to its nested properties won't trigger + // URL updates automatically. Users must reassign the entire object/array to trigger updates: + // ❌ Won't work: params.config.theme = 'dark' + // ✅ Works: params.config = {...params.config, theme: 'dark'} + // ❌ Won't work: params.items.push(newItem) + // ✅ Works: params.items = [...params.items, newItem] + return target.get(prop); + } + return Reflect.get(target, prop); + }, + set: (target, prop, value) => { + // Similar to get(), we use has() to determine if this is a schema parameter + if (typeof prop === "string" && target.has(prop)) { + // Same type assertion needed here to tell TypeScript that we've verified + // this string is a valid key in our schema through the target.has() check + // NOTE: This triggers a complete re-serialization of the value to the URL + // For objects/arrays, the entire structure is JSON-stringified and stored + // This is why nested property mutations don't work - they don't trigger this setter + // Only direct assignment to the top-level property triggers URL updates + target.set(prop, value); + return true; + } + return Reflect.set(target, prop, value); + }, + }; + return new Proxy(searchParams, handler); +} diff --git a/tools/ui/node_modules/runed/dist/utilities/use-throttle/index.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-throttle/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..368505fb9b74af6fdb57af863494a243c0dbf196 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-throttle/index.d.ts @@ -0,0 +1 @@ +export * from "./use-throttle.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-throttle/index.js b/tools/ui/node_modules/runed/dist/utilities/use-throttle/index.js new file mode 100644 index 0000000000000000000000000000000000000000..368505fb9b74af6fdb57af863494a243c0dbf196 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-throttle/index.js @@ -0,0 +1 @@ +export * from "./use-throttle.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-throttle/use-throttle.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/use-throttle/use-throttle.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1096c26e4b7e9075eefad1dd03b2afc572781d9e --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-throttle/use-throttle.svelte.d.ts @@ -0,0 +1,7 @@ +import type { MaybeGetter } from "../../internal/types.js"; +type UseThrottleReturn = ((this: unknown, ...args: Args) => Promise) & { + cancel: () => void; + pending: boolean; +}; +export declare function useThrottle(callback: (...args: Args) => Return, interval?: MaybeGetter): UseThrottleReturn; +export {}; diff --git a/tools/ui/node_modules/runed/dist/utilities/use-throttle/use-throttle.svelte.js b/tools/ui/node_modules/runed/dist/utilities/use-throttle/use-throttle.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..93b44008bbba291975f2dc15b71bf46d468b170c --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/use-throttle/use-throttle.svelte.js @@ -0,0 +1,82 @@ +import { untrack } from "svelte"; +export function useThrottle(callback, interval = 250) { + let lastCall = 0; + let timeout = $state(); + let resolve = null; + let reject = null; + let promise = null; + function reset() { + timeout = undefined; + promise = null; + resolve = null; + reject = null; + } + function throttled(...args) { + return untrack(() => { + const now = Date.now(); + const intervalValue = typeof interval === "function" ? interval() : interval; + const nextAllowedTime = lastCall + intervalValue; + if (!promise) { + promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + } + if (now < nextAllowedTime) { + if (!timeout) { + timeout = setTimeout(async () => { + try { + const result = await callback.apply(this, args); + resolve?.(result); + } + catch (error) { + reject?.(error); + } + finally { + clearTimeout(timeout); + reset(); + lastCall = Date.now(); + } + }, nextAllowedTime - now); + } + return promise; + } + if (timeout) { + clearTimeout(timeout); + timeout = undefined; + } + lastCall = now; + try { + const result = callback.apply(this, args); + resolve?.(result); + } + catch (error) { + reject?.(error); + } + finally { + reset(); + } + return promise; + }); + } + throttled.cancel = async () => { + if (timeout) { + if (timeout === undefined) { + // Wait one event loop to see if something triggered the throttled function + await new Promise((resolve) => setTimeout(resolve, 0)); + if (timeout === undefined) + return; + } + clearTimeout(timeout); + reject?.("Cancelled"); + reset(); + } + }; + Object.defineProperty(throttled, "pending", { + enumerable: true, + get() { + return !!timeout; + }, + }); + return throttled; +} diff --git a/tools/ui/node_modules/runed/dist/utilities/watch/index.d.ts b/tools/ui/node_modules/runed/dist/utilities/watch/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..58ed11fdce466c67f4ad5d6196d54e9e4f9046b9 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/watch/index.d.ts @@ -0,0 +1 @@ +export * from "./watch.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/watch/index.js b/tools/ui/node_modules/runed/dist/utilities/watch/index.js new file mode 100644 index 0000000000000000000000000000000000000000..58ed11fdce466c67f4ad5d6196d54e9e4f9046b9 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/watch/index.js @@ -0,0 +1 @@ +export * from "./watch.svelte.js"; diff --git a/tools/ui/node_modules/runed/dist/utilities/watch/watch.svelte.d.ts b/tools/ui/node_modules/runed/dist/utilities/watch/watch.svelte.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4b1e67b2afd2c3ee9c4b928af0c87194355b11e1 --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/watch/watch.svelte.d.ts @@ -0,0 +1,36 @@ +import type { Getter } from "../../internal/types.js"; +export type WatchOptions = { + /** + * If `true`, the effect doesn't run until one of the `sources` changes. + * + * @default false + */ + lazy?: boolean; +}; +export declare function watch>(sources: { + [K in keyof T]: Getter; +}, effect: (values: T, previousValues: { + [K in keyof T]: T[K] | undefined; +}) => void | VoidFunction, options?: WatchOptions): void; +export declare function watch(source: Getter, effect: (value: T, previousValue: T | undefined) => void | VoidFunction, options?: WatchOptions): void; +export declare namespace watch { + var pre: typeof watchPre; +} +declare function watchPre>(sources: { + [K in keyof T]: Getter; +}, effect: (values: T, previousValues: { + [K in keyof T]: T[K] | undefined; +}) => void | VoidFunction, options?: WatchOptions): void; +declare function watchPre(source: Getter, effect: (value: T, previousValue: T | undefined) => void | VoidFunction, options?: WatchOptions): void; +export declare function watchOnce>(sources: { + [K in keyof T]: Getter; +}, effect: (values: T, previousValues: T) => void | VoidFunction): void; +export declare function watchOnce(source: Getter, effect: (value: T, previousValue: T) => void | VoidFunction): void; +export declare namespace watchOnce { + var pre: typeof watchOncePre; +} +declare function watchOncePre>(sources: { + [K in keyof T]: Getter; +}, effect: (values: T, previousValues: T) => void | VoidFunction): void; +declare function watchOncePre(source: Getter, effect: (value: T, previousValue: T) => void | VoidFunction): void; +export {}; diff --git a/tools/ui/node_modules/runed/dist/utilities/watch/watch.svelte.js b/tools/ui/node_modules/runed/dist/utilities/watch/watch.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..5c01891565e1ed7f238e23e5240e3edcaa283d6c --- /dev/null +++ b/tools/ui/node_modules/runed/dist/utilities/watch/watch.svelte.js @@ -0,0 +1,69 @@ +import { untrack } from "svelte"; +function runEffect(flush, effect) { + switch (flush) { + case "post": + $effect(effect); + break; + case "pre": + $effect.pre(effect); + break; + } +} +function runWatcher(sources, flush, effect, options = {}) { + const { lazy = false } = options; + // Run the effect immediately if `lazy` is `false`. + let active = !lazy; + // On the first run, if the dependencies are an array, pass an empty array + // to the previous value instead of `undefined` to allow destructuring. + // + // watch(() => [a, b], ([a, b], [prevA, prevB]) => { ... }); + let previousValues = Array.isArray(sources) + ? [] + : undefined; + runEffect(flush, () => { + const values = Array.isArray(sources) ? sources.map((source) => source()) : sources(); + if (!active) { + active = true; + previousValues = values; + return; + } + const cleanup = untrack(() => effect(values, previousValues)); + previousValues = values; + return cleanup; + }); +} +function runWatcherOnce(sources, flush, effect) { + const cleanupRoot = $effect.root(() => { + let stop = false; + runWatcher(sources, flush, (values, previousValues) => { + if (stop) { + cleanupRoot(); + return; + } + // Since `lazy` is `true`, `previousValues` is always defined. + const cleanup = effect(values, previousValues); + stop = true; + return cleanup; + }, + // Running the effect immediately just once makes no sense at all. + // That's just `onMount` with extra steps. + { lazy: true }); + }); + $effect(() => { + return cleanupRoot; + }); +} +export function watch(sources, effect, options) { + runWatcher(sources, "post", effect, options); +} +function watchPre(sources, effect, options) { + runWatcher(sources, "pre", effect, options); +} +watch.pre = watchPre; +export function watchOnce(source, effect) { + runWatcherOnce(source, "post", effect); +} +function watchOncePre(source, effect) { + runWatcherOnce(source, "pre", effect); +} +watchOnce.pre = watchOncePre; diff --git a/tools/ui/node_modules/runed/package.json b/tools/ui/node_modules/runed/package.json new file mode 100644 index 0000000000000000000000000000000000000000..217f99060e07f55ecb65653b16e1f0e13bca6b3f --- /dev/null +++ b/tools/ui/node_modules/runed/package.json @@ -0,0 +1,106 @@ +{ + "name": "runed", + "version": "0.35.1", + "type": "module", + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "license": "MIT", + "keywords": [ + "svelte", + "svelte5", + "sveltekit", + "svelte utilities", + "svelte helpers", + "sveltekit utilities", + "sveltekit helpers", + "svelte 5 runes", + "runes", + "typescript" + ], + "contributors": [ + { + "name": "Thomas G. Lopes", + "url": "https://thomasglopes.com" + }, + { + "name": "Hunter Johnston", + "url": "https://x.com/huntabyte" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/svecosystem/runed", + "directory": "packages/runed" + }, + "funding": [ + "https://github.com/sponsors/huntabyte", + "https://github.com/sponsors/tglide" + ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js", + "default": "./dist/index.js" + }, + "./kit": { + "types": "./dist/kit/index.d.ts", + "svelte": "./dist/kit/index.js", + "default": "./dist/kit/index.js" + } + }, + "files": [ + "dist", + "!dist/**/*.test.*", + "!dist/**/*.spec.*" + ], + "peerDependencies": { + "svelte": "^5.7.0", + "@sveltejs/kit": "^2.21.0" + }, + "peerDependenciesMeta": { + "@sveltejs/kit": { + "optional": true + } + }, + "devDependencies": { + "@playwright/test": "^1.55.0", + "@sveltejs/kit": "^2.42.0", + "@sveltejs/package": "^2.3.0", + "@sveltejs/vite-plugin-svelte": "^6.2.0", + "@testing-library/dom": "^10.2.0", + "@testing-library/jest-dom": "^6.4.6", + "@testing-library/svelte": "^5.2.0", + "@testing-library/user-event": "^14.5.2", + "@types/node": "^20.19.16", + "@vitest/browser": "^3.2.4", + "@vitest/coverage-v8": "^3.2.4", + "@vitest/ui": "^3.2.4", + "jsdom": "^24.0.0", + "msw": "^2.7.0", + "playwright": "^1.55.0", + "publint": "^0.1.9", + "resize-observer-polyfill": "^1.5.1", + "svelte": "^5.39.3", + "svelte-check": "^4.3.1", + "tslib": "^2.4.1", + "typescript": "^5.9.2", + "vite": "^7.1.5", + "vitest": "^3.2.4" + }, + "dependencies": { + "dequal": "^2.0.3", + "esm-env": "^1.0.0", + "lz-string": "^1.5.0" + }, + "scripts": { + "dev": "pnpm sync && pnpm watch", + "build": "pnpm package", + "package": "svelte-kit sync && svelte-package && publint", + "test": "vitest --run && playwright test", + "test:watch": "vitest --watch", + "test:ui": "vitest --watch --ui", + "test:integration": "playwright test", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "watch": "svelte-kit sync && svelte-package --watch" + } +} \ No newline at end of file diff --git a/tools/ui/node_modules/rw/.eslintrc b/tools/ui/node_modules/rw/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..bbad38067ab5c775830371fe23698d10c8bfd92e --- /dev/null +++ b/tools/ui/node_modules/rw/.eslintrc @@ -0,0 +1,5 @@ +env: + node: true + +extends: + "eslint:recommended" diff --git a/tools/ui/node_modules/rw/.npmignore b/tools/ui/node_modules/rw/.npmignore new file mode 100644 index 0000000000000000000000000000000000000000..e5c7a3b22c66a3b51e277ac57752fdff39702291 --- /dev/null +++ b/tools/ui/node_modules/rw/.npmignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +test/input.txt diff --git a/tools/ui/node_modules/rw/LICENSE b/tools/ui/node_modules/rw/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..da8230d35203598a24354437a3ddb3df5de8fdf9 --- /dev/null +++ b/tools/ui/node_modules/rw/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2014-2016, Michael Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* The name Michael Bostock may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/ui/node_modules/rw/README.md b/tools/ui/node_modules/rw/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b3c2f713a5537e01b30223852308c25da0138026 --- /dev/null +++ b/tools/ui/node_modules/rw/README.md @@ -0,0 +1,120 @@ +# rw - Now stdin and stdout are files. + +How do you read a file from stdin? If you thought, + +```js +var contents = fs.readFileSync("/dev/stdin", "utf8"); +``` + +you’d be wrong, because Node only reads up to the size of the file reported by fs.stat rather than reading until it receives an EOF. So, if you redirect a file to your program (`cat file | program`), you’ll only read the first 65,536 bytes of your file. Oops. + +What about writing a file to stdout? If you thought, + +```js +fs.writeFileSync("/dev/stdout", contents, "utf8"); +``` + +you’d also be wrong, because this tries to close stdout, so you get this error: + +``` +Error: UNKNOWN, unknown error + at Object.fs.writeSync (fs.js:528:18) + at Object.fs.writeFileSync (fs.js:975:21) +``` + +(Also, this doesn’t work on Windows, because Windows doesn’t support /dev/stdout, /dev/stdin and /dev/stderr!) + +Shucks. So what should you do? + +You could use a different pattern for reading from stdin: + +```js +var chunks = []; + +process.stdin + .on("data", function(chunk) { chunks.push(chunk); }) + .on("end", function() { console.log(chunks.join("").length); }) + .setEncoding("utf8"); +``` + +But that’s a pain, since now your code has two different code paths for reading inputs depending on whether you’re reading a real file or stdin. And the code gets even more complex if you want to [read that file synchronously](https://github.com/mbostock/rw/blob/master/lib/rw/read-file-sync.js). + +You could also try a different pattern for writing to stdout: + +```js +process.stdout.write(contents); +``` + +Or even: + +```js +console.log(contents); +``` + +But if you try to pipe your output to `head`, you’ll get this error: + +``` +Error: write EPIPE + at errnoException (net.js:904:11) + at Object.afterWrite (net.js:720:19) +``` + +Huh. + +The **rw** module fixes these problems. It provides an interface just like readFile, readFileSync, writeFile and writeFileSync, but with implementations that work the way you expect on stdin and stdout. If you use these methods on files other than /dev/stdin or /dev/stdout, they simply delegate to the fs methods, so you can trust that they behave identically to the methods you’re used to. + +For example, now you can read stdin synchronously like so: + +```js +var contents = rw.readFileSync("/dev/stdin", "utf8"); +``` + +Or to write to stdout: + +```js +rw.writeFileSync("/dev/stdout", contents, "utf8"); +``` + +And rw automatically squashes EPIPE errors, so you can pipe the output of your program to `head` and you won’t get a spurious stack trace. + +To install, `npm install rw`. + +### Note + +If you want to read synchronously from stdin using [readFileSync](#readFileSync), you cannot also use process.stdin in the same program. Likewise, if you want to write synchronously to stdout or stderr using [writeFileSync](#writeFileSync), you cannot use process.stdout or process.stderr, respectively. (This includes using console.log and the like!) Failure to heed this warning may result in error: EAGAIN, resource temporarily unavailable. Unfortunately, it does not appear possible for this library to fix this issue automatically, so please use caution. + +Only the asynchronous methods [readFile](#readFile) and [writeFile](#writeFile) are supported on Windows. Node has no synchronous API for reading from process.[stdin](https://nodejs.org/api/process.html#process_process_stdin) or writing to process.[stdout](https://nodejs.org/api/process.html#process_process_stdout) or process.[stderr](https://nodejs.org/api/process.html#process_process_stderr), so you’re out of luck! + +## API Reference + +# rw.readFile(path[, options], callback) + +Reads the file at the specified *path* completely into memory, invoking the specified *callback* once the data is available and the file is closed. The *callback* is invoked with two arguments: the *error* that occurred during read (hopefully null), and the read data. If *options* is a string, it specifies the encoding to use, in which case the read data will be a string; otherwise *options* is an object, and may specify encoding and flag properties. This method is a drop-in replacement for [fs.readFile](https://nodejs.org/api/fs.html#fs_fs_readfile_file_options_callback) and fixes the behavior of special files such as /dev/stdin. + +# rw.readFileSync(path[, options]) + +Reads the file at the specified *path* completely into memory, synchronously, returning the data. If an error occurred during read, this function throws an error instead. If *options* is a string, it specifies the encoding to use, in which case the read data will be a string; otherwise *options* is an object, and may specify encoding and flag properties. This method is a drop-in replacement for [fs.readFileSync](https://nodejs.org/api/fs.html#fs_fs_readfilesync_file_options) and fixes the behavior of special files such as /dev/stdin. + +# rw.writeFile(path, data[, options], callback) + +Writes the specified *data* (completely in memory) to a file at the specified *path*, invoking the specified *callback* once the data is completely written and the file is closed. The *callback* is invoked with a single argument: the *error* that occurred during write (hopefully null). If *options* is a string, it specifies the encoding to use, in which case the *data* must be a string; otherwise *options* is an object, and may specify encoding, mode and flag properties. This method is a drop-in replacement for [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) and fixes the behavior of special files such as /dev/stdout. + +# rw.writeFileSync(path, data[, options]) + +Writes the specified *data* (completely in memory) to a file at the specified *path*, synchronously, returning once the data is completely written and the file is closed. Throws an *error* if one occurs during write. If *options* is a string, it specifies the encoding to use, in which case the *data* must be a string; otherwise *options* is an object, and may specify encoding, mode and flag properties. This method is a drop-in replacement for [fs.writeFileSync](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) and fixes the behavior of special files such as /dev/stdout. + +# rw.dash.readFile(path[, options], callback) + +Equivalent to [rw.readFile](#readFile), except treats a *path* of `-` as `/dev/stdin`. Useful for command-line arguments. + +# rw.dash.readFileSync(path[, options]) + +Equivalent to [rw.readFileSync](#readFileSync), except treats a *path* of `-` as `/dev/stdin`. Useful for command-line arguments. + +# rw.dash.writeFile(path, data[, options], callback) + +Equivalent to [rw.writeFile](#writeFile), except treats a *path* of `-` as `/dev/stdout`. Useful for command-line arguments. + +# rw.dash.writeFileSync(path, data[, options]) + +Equivalent to [rw.writeFileSync](#writeFileSync), except treats a *path* of `-` as `/dev/stdout`. Useful for command-line arguments. diff --git a/tools/ui/node_modules/rw/index.js b/tools/ui/node_modules/rw/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b0c9dc6d95d45e967ceccb23690e54af0464fefe --- /dev/null +++ b/tools/ui/node_modules/rw/index.js @@ -0,0 +1,5 @@ +exports.dash = require("./lib/rw/dash"); +exports.readFile = require("./lib/rw/read-file"); +exports.readFileSync = require("./lib/rw/read-file-sync"); +exports.writeFile = require("./lib/rw/write-file"); +exports.writeFileSync = require("./lib/rw/write-file-sync"); diff --git a/tools/ui/node_modules/rw/lib/rw/dash.js b/tools/ui/node_modules/rw/lib/rw/dash.js new file mode 100644 index 0000000000000000000000000000000000000000..0c005f13c5df90f40c770549e9485453c2bcea91 --- /dev/null +++ b/tools/ui/node_modules/rw/lib/rw/dash.js @@ -0,0 +1,14 @@ +var slice = Array.prototype.slice; + +function dashify(method, file) { + return function(path) { + var argv = arguments; + if (path == "-") (argv = slice.call(argv)).splice(0, 1, file); + return method.apply(null, argv); + }; +} + +exports.readFile = dashify(require("./read-file"), "/dev/stdin"); +exports.readFileSync = dashify(require("./read-file-sync"), "/dev/stdin"); +exports.writeFile = dashify(require("./write-file"), "/dev/stdout"); +exports.writeFileSync = dashify(require("./write-file-sync"), "/dev/stdout"); diff --git a/tools/ui/node_modules/rw/lib/rw/decode.js b/tools/ui/node_modules/rw/lib/rw/decode.js new file mode 100644 index 0000000000000000000000000000000000000000..008779b16525292932737384061656198e071b23 --- /dev/null +++ b/tools/ui/node_modules/rw/lib/rw/decode.js @@ -0,0 +1,23 @@ +module.exports = function(options) { + if (options) { + if (typeof options === "string") return encoding(options); + if (options.encoding !== null) return encoding(options.encoding); + } + return identity(); +}; + +function identity() { + var chunks = []; + return { + push: function(chunk) { chunks.push(chunk); }, + value: function() { return Buffer.concat(chunks); } + }; +} + +function encoding(encoding) { + var chunks = []; + return { + push: function(chunk) { chunks.push(chunk); }, + value: function() { return Buffer.concat(chunks).toString(encoding); } + }; +} diff --git a/tools/ui/node_modules/rw/lib/rw/encode.js b/tools/ui/node_modules/rw/lib/rw/encode.js new file mode 100644 index 0000000000000000000000000000000000000000..4a3926eb3a9678d86120aa56f9fc8b18e5c529d5 --- /dev/null +++ b/tools/ui/node_modules/rw/lib/rw/encode.js @@ -0,0 +1,7 @@ +module.exports = function(data, options) { + return typeof data === "string" + ? new Buffer(data, typeof options === "string" ? options + : options && options.encoding !== null ? options.encoding + : "utf8") + : data; +}; diff --git a/tools/ui/node_modules/rw/lib/rw/read-file-sync.js b/tools/ui/node_modules/rw/lib/rw/read-file-sync.js new file mode 100644 index 0000000000000000000000000000000000000000..374c2a0c1c18ab0e8b969a72738df373b67590e2 --- /dev/null +++ b/tools/ui/node_modules/rw/lib/rw/read-file-sync.js @@ -0,0 +1,29 @@ +var fs = require("fs"), + decode = require("./decode"); + +module.exports = function(filename, options) { + if (fs.statSync(filename).isFile()) { + return fs.readFileSync(filename, options); + } else { + var fd = fs.openSync(filename, options && options.flag || "r"), + decoder = decode(options); + + while (true) { // eslint-disable-line no-constant-condition + try { + var buffer = new Buffer(bufferSize), + bytesRead = fs.readSync(fd, buffer, 0, bufferSize); + } catch (e) { + if (e.code === "EOF") break; + fs.closeSync(fd); + throw e; + } + if (bytesRead === 0) break; + decoder.push(buffer.slice(0, bytesRead)); + } + + fs.closeSync(fd); + return decoder.value(); + } +}; + +var bufferSize = 1 << 16; diff --git a/tools/ui/node_modules/rw/lib/rw/read-file.js b/tools/ui/node_modules/rw/lib/rw/read-file.js new file mode 100644 index 0000000000000000000000000000000000000000..02aa122eaff26f89c568ae4a39f60d2d09922ca4 --- /dev/null +++ b/tools/ui/node_modules/rw/lib/rw/read-file.js @@ -0,0 +1,23 @@ +var fs = require("fs"), + decode = require("./decode"); + +module.exports = function(path, options, callback) { + if (arguments.length < 3) callback = options, options = null; + + switch (path) { + case "/dev/stdin": return readStream(process.stdin, options, callback); + } + + fs.stat(path, function(error, stat) { + if (error) return callback(error); + if (stat.isFile()) return fs.readFile(path, options, callback); + readStream(fs.createReadStream(path, options ? {flags: options.flag || "r"} : {}), options, callback); // N.B. flag / flags + }); +}; + +function readStream(stream, options, callback) { + var decoder = decode(options); + stream.on("error", callback); + stream.on("data", function(d) { decoder.push(d); }); + stream.on("end", function() { callback(null, decoder.value()); }); +} diff --git a/tools/ui/node_modules/rw/lib/rw/write-file-sync.js b/tools/ui/node_modules/rw/lib/rw/write-file-sync.js new file mode 100644 index 0000000000000000000000000000000000000000..0b04a2a61bef299744815d2e5c9f3b94f2339188 --- /dev/null +++ b/tools/ui/node_modules/rw/lib/rw/write-file-sync.js @@ -0,0 +1,32 @@ +var fs = require("fs"), + encode = require("./encode"); + +module.exports = function(filename, data, options) { + var stat; + + try { + stat = fs.statSync(filename); + } catch (error) { + if (error.code !== "ENOENT") throw error; + } + + if (!stat || stat.isFile()) { + fs.writeFileSync(filename, data, options); + } else { + var fd = fs.openSync(filename, options && options.flag || "w"), + bytesWritten = 0, + bytesTotal = (data = encode(data, options)).length; + + while (bytesWritten < bytesTotal) { + try { + bytesWritten += fs.writeSync(fd, data, bytesWritten, bytesTotal - bytesWritten, null); + } catch (error) { + if (error.code === "EPIPE") break; // ignore broken pipe, e.g., | head + fs.closeSync(fd); + throw error; + } + } + + fs.closeSync(fd); + } +}; diff --git a/tools/ui/node_modules/rw/lib/rw/write-file.js b/tools/ui/node_modules/rw/lib/rw/write-file.js new file mode 100644 index 0000000000000000000000000000000000000000..2e2c0b2673dc9d8b2ca04e231d61cf68d4bc4f12 --- /dev/null +++ b/tools/ui/node_modules/rw/lib/rw/write-file.js @@ -0,0 +1,22 @@ +var fs = require("fs"), + encode = require("./encode"); + +module.exports = function(path, data, options, callback) { + if (arguments.length < 4) callback = options, options = null; + + switch (path) { + case "/dev/stdout": return writeStream(process.stdout, "write", data, options, callback); + case "/dev/stderr": return writeStream(process.stderr, "write", data, options, callback); + } + + fs.stat(path, function(error, stat) { + if (error && error.code !== "ENOENT") return callback(error); + if (stat && stat.isFile()) return fs.writeFile(path, data, options, callback); + writeStream(fs.createWriteStream(path, options ? {flags: options.flag || "w"} : {}), "end", data, options, callback); // N.B. flag / flags + }); +}; + +function writeStream(stream, send, data, options, callback) { + stream.on("error", function(error) { callback(error.code === "EPIPE" ? null : error); }); // ignore broken pipe, e.g., | head + stream[send](encode(data, options), function(error) { callback(error && error.code === "EPIPE" ? null : error); }); +} diff --git a/tools/ui/node_modules/rw/package.json b/tools/ui/node_modules/rw/package.json new file mode 100644 index 0000000000000000000000000000000000000000..af00b84275a8220526fc167bb84dc3b6bac480e4 --- /dev/null +++ b/tools/ui/node_modules/rw/package.json @@ -0,0 +1,32 @@ +{ + "name": "rw", + "version": "1.3.3", + "description": "Now stdin and stdout are files.", + "keywords": [ + "fs", + "readFile", + "writeFile", + "stdin", + "stdout" + ], + "homepage": "https://github.com/mbostock/rw", + "license": "BSD-3-Clause", + "author": { + "name": "Mike Bostock", + "url": "http://bost.ocks.org/mike" + }, + "main": "index.js", + "repository": { + "type": "git", + "url": "http://github.com/mbostock/rw.git" + }, + "scripts": { + "test": "test/run-tests && eslint index.js lib", + "prepublish": "npm test", + "postpublish": "git push && git push --tags" + }, + "devDependencies": { + "d3-queue": "3", + "eslint": "3" + } +} diff --git a/tools/ui/node_modules/rw/test/cat-async b/tools/ui/node_modules/rw/test/cat-async new file mode 100644 index 0000000000000000000000000000000000000000..f229958d8e821a22bb5734ef6b242c13424abc61 --- /dev/null +++ b/tools/ui/node_modules/rw/test/cat-async @@ -0,0 +1,10 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.readFile(process.argv[2] || "-", "utf8", function(error, contents) { + if (error) throw error; + rw.writeFile("-", contents, "utf8", function(error) { + if (error) throw error; + }); +}); diff --git a/tools/ui/node_modules/rw/test/cat-sync b/tools/ui/node_modules/rw/test/cat-sync new file mode 100644 index 0000000000000000000000000000000000000000..9ef307f4a5f1a493ef55a3f25ccf0c8973ec7d53 --- /dev/null +++ b/tools/ui/node_modules/rw/test/cat-sync @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.writeFileSync("-", rw.readFileSync(process.argv[2] || "-", "utf8"), "utf8"); diff --git a/tools/ui/node_modules/rw/test/encode-object-async b/tools/ui/node_modules/rw/test/encode-object-async new file mode 100644 index 0000000000000000000000000000000000000000..0351d6368ae54d5039c8ef63e31758ae16e5a2bf --- /dev/null +++ b/tools/ui/node_modules/rw/test/encode-object-async @@ -0,0 +1,7 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.writeFile(process.argv[2] || "-", "gréén\n", {encoding: process.argv[3]}, function(error) { + if (error) throw error; +}); diff --git a/tools/ui/node_modules/rw/test/encode-object-sync b/tools/ui/node_modules/rw/test/encode-object-sync new file mode 100644 index 0000000000000000000000000000000000000000..60c641c8ce743dc423cb6f66db39b507c304ce34 --- /dev/null +++ b/tools/ui/node_modules/rw/test/encode-object-sync @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.writeFileSync(process.argv[2] || "-", "gréén\n", {encoding: process.argv[3]}); diff --git a/tools/ui/node_modules/rw/test/encode-string-async b/tools/ui/node_modules/rw/test/encode-string-async new file mode 100644 index 0000000000000000000000000000000000000000..348e00ca279313b9752a9ffe451b1273f04ac699 --- /dev/null +++ b/tools/ui/node_modules/rw/test/encode-string-async @@ -0,0 +1,7 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.writeFile(process.argv[2] || "-", "gréén\n", process.argv[3], function(error) { + if (error) throw error; +}); diff --git a/tools/ui/node_modules/rw/test/encode-string-sync b/tools/ui/node_modules/rw/test/encode-string-sync new file mode 100644 index 0000000000000000000000000000000000000000..5fdc4c3cbca693af430a9f97d1e31b8e0986946a --- /dev/null +++ b/tools/ui/node_modules/rw/test/encode-string-sync @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.writeFileSync(process.argv[2] || "-", "gréén\n", process.argv[3]); diff --git a/tools/ui/node_modules/rw/test/encoding-async b/tools/ui/node_modules/rw/test/encoding-async new file mode 100644 index 0000000000000000000000000000000000000000..9782c92a62979a3c524911b27f8c202987b809a5 --- /dev/null +++ b/tools/ui/node_modules/rw/test/encoding-async @@ -0,0 +1,42 @@ +#!/usr/bin/env node + +var fs = require("fs"), + queue = require("d3-queue").queue, + rw = require("../"); + +var code = 0; + +queue(1) + .defer(testRead, "utf8", "gréén\n") + .defer(testRead, {encoding: "utf8"}, "gréén\n") + .defer(testRead, "ascii", "grC)C)n\n") + .defer(testRead, {encoding: "ascii"}, "grC)C)n\n") + .defer(testWrite, "utf8", "gréén\n") + .defer(testWrite, {encoding: "utf8"}, "gréén\n") + .defer(testWrite, "ascii", "gr��n\n") + .defer(testWrite, {encoding: "ascii"}, "gr��n\n") + .await(done); + +function testRead(options, expected, callback) { + rw.readFile("test/utf8.txt", options, function(error, actual) { + if (error) return void callback(error); + if (actual !== expected) console.warn(actual + " !== " + expected), code = 1; + callback(null); + }); +} + +function testWrite(options, expected, callback) { + rw.writeFile("test/encoding-async.out", "gréén\n", options, function(error) { + if (error) return void callback(error); + fs.readFile("test/encoding-async.out", "utf8", function(error, actual) { + if (error) return void callback(error); + if (actual !== expected) console.warn(actual + " !== " + expected), code = 1; + callback(null); + }); + }); +} + +function done(error) { + if (error) throw error; + process.exit(code); +} diff --git a/tools/ui/node_modules/rw/test/encoding-sync b/tools/ui/node_modules/rw/test/encoding-sync new file mode 100644 index 0000000000000000000000000000000000000000..80f7e4e8fcb7925ccf52e56db61c91fd44a49f42 --- /dev/null +++ b/tools/ui/node_modules/rw/test/encoding-sync @@ -0,0 +1,20 @@ +#!/usr/bin/env node + +var fs = require("fs"), + rw = require("../"); + +var code = 0, + actual, + expected; + +if ((actual = rw.readFileSync("test/utf8.txt", "utf8")) !== (expected = "gréén\n")) code = 1, console.warn(actual + " !== " + expected); +if ((actual = rw.readFileSync("test/utf8.txt", {encoding: "utf8"})) !== (expected = "gréén\n")) code = 1, console.warn(actual + " !== " + expected); +if ((actual = rw.readFileSync("test/utf8.txt", "ascii")) !== (expected = "grC)C)n\n")) code = 1, console.warn(actual + " !== " + expected); +if ((actual = rw.readFileSync("test/utf8.txt", {encoding: "ascii"})) !== (expected = "grC)C)n\n")) code = 1, console.warn(actual + " !== " + expected); + +rw.writeFileSync("test/encoding-sync.out", "gréén\n", "utf8"); if ((actual = fs.readFileSync("test/encoding-sync.out", "utf8")) !== (expected = "gréén\n")) code = 1, console.warn(actual + " !== " + expected); +rw.writeFileSync("test/encoding-sync.out", "gréén\n", {encoding: "utf8"}); if ((actual = fs.readFileSync("test/encoding-sync.out", "utf8")) !== (expected = "gréén\n")) code = 1, console.warn(actual + " !== " + expected); +rw.writeFileSync("test/encoding-sync.out", "gréén\n", "ascii"); if ((actual = fs.readFileSync("test/encoding-sync.out", "utf8")) !== (expected = "gr��n\n")) code = 1, console.warn(actual + " !== " + expected); +rw.writeFileSync("test/encoding-sync.out", "gréén\n", {encoding: "ascii"}); if ((actual = fs.readFileSync("test/encoding-sync.out", "utf8")) !== (expected = "gr��n\n")) code = 1, console.warn(actual + " !== " + expected); + +process.exit(code); diff --git a/tools/ui/node_modules/rw/test/run-tests b/tools/ui/node_modules/rw/test/run-tests new file mode 100644 index 0000000000000000000000000000000000000000..5b3272fdc0093a081db29da02b50431c39865750 --- /dev/null +++ b/tools/ui/node_modules/rw/test/run-tests @@ -0,0 +1,53 @@ +#!/bin/bash + +FILE=test/input.txt + +rm -f -- $FILE +for i in {1..10000}; do printf '%09X\n' $RANDOM >> $FILE; done + +function test() +{ + if [[ $1 -eq 0 ]] + then + echo -e "\x1B[1;32m✓ $2\x1B[0m" + else + echo -e "\x1B[1;31m✗ $2\x1B[0m" + fi +} + +test/encoding-sync; test $? "encoding-sync applies the specified encodings" +test/encoding-async; test $? "encoding-async applies the specified encodings" +[ "$(test/wc-async $FILE)" = "100000" ]; test $? "wc-async reads an entire file" +[ "$(test/wc-sync $FILE)" = "100000" ]; test $? "wc-sync reads an entire file" +[ "$(test/wc-async < $FILE)" = "100000" ]; test $? "wc-async reads an entire file from stdin" +[ "$(test/wc-sync < $FILE)" = "100000" ]; test $? "wc-sync reads an entire file from stdin" +[ "$(cat $FILE | test/wc-async)" = "100000" ]; test $? "wc-async reads an entire file from a pipe" +[ "$(cat $FILE | test/wc-sync)" = "100000" ]; test $? "wc-sync reads an entire file from a pipe" +[ "$(test/cat-async $FILE | wc -c | tr -d ' ')" = "100000" ]; test $? "cat-async reads an entire file and writes it to a pipe" +[ "$(test/cat-sync $FILE | wc -c | tr -d ' ')" = "100000" ]; test $? "cat-sync reads an entire file and writes it to a pipe" +[ "$(test/cat-async $FILE | test/wc-async)" = "100000" ]; test $? "cat-async reads an entire file and writes it to a pipe to wc-async " +[ "$(test/cat-async $FILE | test/wc-sync)" = "100000" ]; test $? "cat-async reads an entire file and writes it to a pipe to wc-sync " +[ "$(test/cat-sync $FILE | test/wc-async)" = "100000" ]; test $? "cat-sync reads an entire file and writes it to a pipe to wc-async " +[ "$(test/cat-sync $FILE | test/wc-sync)" = "100000" ]; test $? "cat-sync reads an entire file and writes it to a pipe to wc-sync " +[ "$(test/cat-async < $FILE | wc -c | tr -d ' ')" = "100000" ]; test $? "cat-async reads an entire file from stdin and writes it to a pipe" +[ "$(test/cat-sync < $FILE | wc -c | tr -d ' ')" = "100000" ]; test $? "cat-sync reads an entire file from stdin and writes it to a pipe" +[ "$(test/cat-async < $FILE | test/wc-async)" = "100000" ]; test $? "cat-async reads an entire file from stdin and writes it to a pipe to wc-async" +[ "$(test/cat-async < $FILE | test/wc-sync)" = "100000" ]; test $? "cat-async reads an entire file from stdin and writes it to a pipe to wc-sync" +[ "$(test/cat-sync < $FILE | test/wc-async)" = "100000" ]; test $? "cat-sync reads an entire file from stdin and writes it to a pipe to wc-async" +[ "$(test/cat-sync < $FILE | test/wc-sync)" = "100000" ]; test $? "cat-sync reads an entire file from stdin and writes it to a pipe to wc-sync" +[ "$(cat $FILE | test/cat-async | test/wc-async)" = "100000" ]; test $? "cat-async reads an entire file from a pipe and writes it to a pipe to wc-async" +[ "$(cat $FILE | test/cat-async | test/wc-sync)" = "100000" ]; test $? "cat-async reads an entire file from a pipe and writes it to a pipe to wc-sync" +[ "$(cat $FILE | test/cat-sync | test/wc-async)" = "100000" ]; test $? "cat-sync reads an entire file from a pipe and writes it to a pipe to wc-async" +[ "$(cat $FILE | test/cat-sync | test/wc-sync)" = "100000" ]; test $? "cat-sync reads an entire file from a pipe and writes it to a pipe to wc-sync" +[ "$(cat $FILE | test/cat-async | head -n 100 | test/wc-async)" = "1000" ]; test $? "cat-async reads an entire file from a pipe and writes it to a pipe to head to wc-async" +[ "$(cat $FILE | test/cat-async | head -n 100 | test/wc-sync)" = "1000" ]; test $? "cat-async reads an entire file from a pipe and writes it to a pipe to head to wc-sync" +[ "$(cat $FILE | test/cat-sync | head -n 100 | test/wc-async)" = "1000" ]; test $? "cat-sync reads an entire file from a pipe and writes it to a pipe to head to wc-async" +[ "$(cat $FILE | test/cat-sync | head -n 100 | test/wc-sync)" = "1000" ]; test $? "cat-sync reads an entire file from a pipe and writes it to a pipe to head to wc-sync" +[ "$(cat $FILE 2> /dev/null | head -n 100 | test/cat-async | test/wc-async)" = "1000" ]; test $? "cat-async reads the head of a file from a pipe and writes it to wc-async" +[ "$(cat $FILE 2> /dev/null | head -n 100 | test/cat-async | test/wc-sync)" = "1000" ]; test $? "cat-async reads the head of a file from a pipe and writes it to wc-sync" +[ "$(cat $FILE 2> /dev/null | head -n 100 | test/cat-sync | test/wc-async)" = "1000" ]; test $? "cat-sync reads the head of a file from a pipe and writes it to wc-async" +[ "$(cat $FILE 2> /dev/null | head -n 100 | test/cat-sync | test/wc-sync)" = "1000" ]; test $? "cat-sync reads the head of a file from a pipe and writes it to wc-sync" +[ "$(test/write-async test/write.out && cat test/write.out)" = "Hello, world!" ]; test $? "write-async writes an entire file" +[ "$(test/write-sync test/write.out && cat test/write.out)" = "Hello, world!" ]; test $? "write-sync writes an entire file" + +rm -f -- $FILE test/write.out test/encoding-sync.out test/encoding-async.out diff --git a/tools/ui/node_modules/rw/test/utf8.txt b/tools/ui/node_modules/rw/test/utf8.txt new file mode 100644 index 0000000000000000000000000000000000000000..23bfe766067d2e83d4705c95d7a737699d0ca65b --- /dev/null +++ b/tools/ui/node_modules/rw/test/utf8.txt @@ -0,0 +1 @@ +gréén diff --git a/tools/ui/node_modules/rw/test/wc-async b/tools/ui/node_modules/rw/test/wc-async new file mode 100644 index 0000000000000000000000000000000000000000..0810271819d71c13e12779501a1483ef997e1a28 --- /dev/null +++ b/tools/ui/node_modules/rw/test/wc-async @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.readFile(process.argv[2] || "-", function(error, contents) { + if (error) throw error; + console.log(contents.length); +}); diff --git a/tools/ui/node_modules/rw/test/wc-sync b/tools/ui/node_modules/rw/test/wc-sync new file mode 100644 index 0000000000000000000000000000000000000000..6a8d1d79534aeea675e4ef09466afe174a529a22 --- /dev/null +++ b/tools/ui/node_modules/rw/test/wc-sync @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +console.log(rw.readFileSync(process.argv[2] || "-", "utf8").length); diff --git a/tools/ui/node_modules/rw/test/write-async b/tools/ui/node_modules/rw/test/write-async new file mode 100644 index 0000000000000000000000000000000000000000..2444ad0b64b7713ed328289d553d9aa33afa4cf7 --- /dev/null +++ b/tools/ui/node_modules/rw/test/write-async @@ -0,0 +1,7 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.writeFile(process.argv[2] || "-", "Hello, world!", "utf8", function(error) { + if (error) throw error; +}); diff --git a/tools/ui/node_modules/rw/test/write-sync b/tools/ui/node_modules/rw/test/write-sync new file mode 100644 index 0000000000000000000000000000000000000000..ef8d0d80f4ff8b2775a94d42803b68c02c2f8082 --- /dev/null +++ b/tools/ui/node_modules/rw/test/write-sync @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +var rw = require("../").dash; + +rw.writeFileSync(process.argv[2] || "-", "Hello, world!", "utf8"); diff --git a/tools/ui/node_modules/sade/index.d.ts b/tools/ui/node_modules/sade/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4a269ecc2c96589d74050189accbf0558cc41614 --- /dev/null +++ b/tools/ui/node_modules/sade/index.d.ts @@ -0,0 +1,37 @@ +import type * as mri from 'mri'; + +type Arrayable = T | T[]; + +declare function sade(usage: string, isSingle?: boolean): sade.Sade; + +declare namespace sade { + export type Handler = (...args: any[]) => any; + export type Value = number | string | boolean | null; + + export interface LazyOutput { + name: string; + handler: Handler; + args: string[]; + } + + export interface Sade { + command(usage: string, description?: string, options?: { + alias?: Arrayable; + default?: boolean; + }): Sade; + + option(flag: string, description?: string, value?: Value): Sade; + action(handler: Handler): Sade; + describe(text: Arrayable): Sade; + alias(...names: string[]): Sade; + example(usage: string): Sade; + + parse(arr: string[], opts: { lazy: true } & mri.Options): LazyOutput; + parse(arr: string[], opts?: { lazy?: boolean } & mri.Options): void; + + version(value: string): Sade; + help(cmd?: string): void; + } +} + +export = sade; diff --git a/tools/ui/node_modules/sade/lib/index.js b/tools/ui/node_modules/sade/lib/index.js new file mode 100644 index 0000000000000000000000000000000000000000..146fb9799d1b38a416d3a5a61966e741e58170a9 --- /dev/null +++ b/tools/ui/node_modules/sade/lib/index.js @@ -0,0 +1 @@ +const e=require("mri"),t="__all__",i="__default__",s="\n";function r(e){if(!e.length)return"";let t=function(e){let t=0,i=0,s=0,r=e.length;if(r)for(;r--;)i=e[r].length,i>t&&(s=r,t=i);return e[s].length}(e.map(e=>e[0]))+4;return e.map(e=>e[0]+" ".repeat(t-e[0].length)+e[1]+(null==e[2]?"":` (default ${e[2]})`))}function n(e){return e}function l(e,t,i){if(!t||!t.length)return"";let r=0,n="";for(n+="\n "+e;r0,this.bin=r,this.ver="0.0.0",this.default="",this.tree={},this.command(t),this.command([i].concat(s?n:"").join(" ")),this.single=s,this.curr=""}command(e,t,i={}){if(this.single)throw new Error('Disable "single" mode to add commands');let s=[],r=[],n=/(\[|<)/;if(e.split(/\s+/).forEach(e=>{(n.test(e.charAt(0))?r:s).push(e)}),s=s.join(" "),s in this.tree)throw new Error("Command already exists: "+s);return s.includes("__")||r.unshift(s),r=r.join(" "),this.curr=s,i.default&&(this.default=s),this.tree[s]={usage:r,alibi:[],options:[],alias:{},default:{},examples:[]},i.alias&&this.alias(i.alias),t&&this.describe(t),this}describe(e){return this.tree[this.curr||i].describe=Array.isArray(e)?e:function(e){return(e||"").replace(/([.?!])\s*(?=[A-Z])/g,"$1|").split("|")}(e),this}alias(...e){if(this.single)throw new Error('Cannot call `alias()` in "single" mode');if(!this.curr)throw new Error("Cannot call `alias()` before defining a command");return(this.tree[this.curr].alibi=this.tree[this.curr].alibi.concat(...e)).forEach(e=>this.tree[e]=this.curr),this}option(e,i,s){let r=this.tree[this.curr||t],[n,l]=function(e){return(e||"").split(/^-{1,2}|,|\s+-{1,2}|\s+/).filter(Boolean)}(e);if(l&&l.length>1&&([n,l]=[l,n]),e="--"+n,l&&l.length>0){e=`-${l}, ${e}`;let t=r.alias[l];r.alias[l]=(t||[]).concat(n)}let a=[e,i||""];return void 0!==s?(a.push(s),r.default[n]=s):l||(r.default[n]=void 0),r.options.push(a),this}action(e){return this.tree[this.curr||i].handler=e,this}example(e){return this.tree[this.curr||i].examples.push(e),this}version(e){return this.ver=e,this}parse(s,r={}){s=s.slice();let n,l,o,h,u=2,c=e(s.slice(u),{alias:{h:"help",v:"version"}}),f=this.single,p=this.bin,d="";if(f)h=this.tree[i];else{let e,t=1,i=c._.length+1;for(;t"<"===e.charAt(0)),v=m._.splice(0,_.length);if(v.length<_.length)return d&&(p+=" "+d),a(p,"Insufficient arguments!");b.filter(e=>"["===e.charAt(0)).forEach(e=>{v.push(m._.shift())}),v.push(m);let $=h.handler;return r.lazy?{args:v,name:d,handler:$}:$.apply(null,v)}help(e){console.log(function(e,a,o,h){let u="",c=a[o],f="$ "+e,p=a[t],d=e=>`${f} ${e}`.replace(/\s+/g," "),g=[["-h, --help","Displays this message"]];if(o===i&&g.unshift(["-v, --version","Displays current version"]),c.options=(c.options||[]).concat(p.options,g),c.options.length>0&&(c.usage+=" [options]"),u+=l("Description",c.describe,n),u+=l("Usage",[c.usage],d),h||o!==i)h||o===i||(u+=l("Aliases",c.alibi,d));else{let e,t=/^__/,i="",o=[];for(e in a)"string"==typeof a[e]||t.test(e)||o.push([e,(a[e].describe||[""])[0]])<3&&(i+=`\n ${f} ${e} --help`);u+=l("Available Commands",r(o),n),u+="\n For more info, run any command with the `--help` flag"+i+s}return u+=l("Options",r(c.options),n),u+=l("Examples",c.examples.map(d),n),u}(this.bin,this.tree,e||i,this.single))}_version(){console.log(`${this.bin}, ${this.ver}`)}}module.exports=(e,t)=>new o(e,t); diff --git a/tools/ui/node_modules/sade/lib/index.mjs b/tools/ui/node_modules/sade/lib/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..76d35dc1efecba316b1ae67e43dc339c88a44d86 --- /dev/null +++ b/tools/ui/node_modules/sade/lib/index.mjs @@ -0,0 +1 @@ +import e from"mri";const t="__all__",i="__default__",s="\n";function r(e){if(!e.length)return"";let t=function(e){let t=0,i=0,s=0,r=e.length;if(r)for(;r--;)i=e[r].length,i>t&&(s=r,t=i);return e[s].length}(e.map(e=>e[0]))+4;return e.map(e=>e[0]+" ".repeat(t-e[0].length)+e[1]+(null==e[2]?"":` (default ${e[2]})`))}function n(e){return e}function l(e,t,i){if(!t||!t.length)return"";let r=0,n="";for(n+="\n "+e;r0,this.bin=r,this.ver="0.0.0",this.default="",this.tree={},this.command(t),this.command([i].concat(s?n:"").join(" ")),this.single=s,this.curr=""}command(e,t,i={}){if(this.single)throw new Error('Disable "single" mode to add commands');let s=[],r=[],n=/(\[|<)/;if(e.split(/\s+/).forEach(e=>{(n.test(e.charAt(0))?r:s).push(e)}),s=s.join(" "),s in this.tree)throw new Error("Command already exists: "+s);return s.includes("__")||r.unshift(s),r=r.join(" "),this.curr=s,i.default&&(this.default=s),this.tree[s]={usage:r,alibi:[],options:[],alias:{},default:{},examples:[]},i.alias&&this.alias(i.alias),t&&this.describe(t),this}describe(e){return this.tree[this.curr||i].describe=Array.isArray(e)?e:function(e){return(e||"").replace(/([.?!])\s*(?=[A-Z])/g,"$1|").split("|")}(e),this}alias(...e){if(this.single)throw new Error('Cannot call `alias()` in "single" mode');if(!this.curr)throw new Error("Cannot call `alias()` before defining a command");return(this.tree[this.curr].alibi=this.tree[this.curr].alibi.concat(...e)).forEach(e=>this.tree[e]=this.curr),this}option(e,i,s){let r=this.tree[this.curr||t],[n,l]=function(e){return(e||"").split(/^-{1,2}|,|\s+-{1,2}|\s+/).filter(Boolean)}(e);if(l&&l.length>1&&([n,l]=[l,n]),e="--"+n,l&&l.length>0){e=`-${l}, ${e}`;let t=r.alias[l];r.alias[l]=(t||[]).concat(n)}let a=[e,i||""];return void 0!==s?(a.push(s),r.default[n]=s):l||(r.default[n]=void 0),r.options.push(a),this}action(e){return this.tree[this.curr||i].handler=e,this}example(e){return this.tree[this.curr||i].examples.push(e),this}version(e){return this.ver=e,this}parse(s,r={}){s=s.slice();let n,l,o,h,u=2,f=e(s.slice(u),{alias:{h:"help",v:"version"}}),c=this.single,p=this.bin,d="";if(c)h=this.tree[i];else{let e,t=1,i=f._.length+1;for(;t"<"===e.charAt(0)),v=m._.splice(0,_.length);if(v.length<_.length)return d&&(p+=" "+d),a(p,"Insufficient arguments!");b.filter(e=>"["===e.charAt(0)).forEach(e=>{v.push(m._.shift())}),v.push(m);let $=h.handler;return r.lazy?{args:v,name:d,handler:$}:$.apply(null,v)}help(e){console.log(function(e,a,o,h){let u="",f=a[o],c="$ "+e,p=a[t],d=e=>`${c} ${e}`.replace(/\s+/g," "),g=[["-h, --help","Displays this message"]];if(o===i&&g.unshift(["-v, --version","Displays current version"]),f.options=(f.options||[]).concat(p.options,g),f.options.length>0&&(f.usage+=" [options]"),u+=l("Description",f.describe,n),u+=l("Usage",[f.usage],d),h||o!==i)h||o===i||(u+=l("Aliases",f.alibi,d));else{let e,t=/^__/,i="",o=[];for(e in a)"string"==typeof a[e]||t.test(e)||o.push([e,(a[e].describe||[""])[0]])<3&&(i+=`\n ${c} ${e} --help`);u+=l("Available Commands",r(o),n),u+="\n For more info, run any command with the `--help` flag"+i+s}return u+=l("Options",r(f.options),n),u+=l("Examples",f.examples.map(d),n),u}(this.bin,this.tree,e||i,this.single))}_version(){console.log(`${this.bin}, ${this.ver}`)}}export default(e,t)=>new o(e,t); diff --git a/tools/ui/node_modules/sade/license b/tools/ui/node_modules/sade/license new file mode 100644 index 0000000000000000000000000000000000000000..d46889ae35762abe2fc2f33a4b2ef0825fd1a6dc --- /dev/null +++ b/tools/ui/node_modules/sade/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Luke Edwards (https://lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tools/ui/node_modules/sade/package.json b/tools/ui/node_modules/sade/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bb40f10deb81050edb14430a71c73caeaa69317f --- /dev/null +++ b/tools/ui/node_modules/sade/package.json @@ -0,0 +1,45 @@ +{ + "name": "sade", + "version": "1.8.1", + "description": "Smooth (CLI) operator 🎶", + "repository": "lukeed/sade", + "module": "lib/index.mjs", + "main": "lib/index.js", + "types": "index.d.ts", + "license": "MIT", + "files": [ + "*.d.ts", + "lib" + ], + "author": { + "name": "Luke Edwards", + "email": "luke.edwards05@gmail.com", + "url": "https://lukeed.com" + }, + "scripts": { + "build": "rollup -c", + "test": "tape -r esm test/*.js | tap-spec" + }, + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "keywords": [ + "cli", + "cli-app", + "commander", + "arguments", + "parser", + "yargs", + "argv" + ], + "devDependencies": { + "esm": "3.2.25", + "rollup": "1.32.1", + "tap-spec": "4.1.2", + "tape": "4.14.0", + "terser": "4.8.0" + } +} diff --git a/tools/ui/node_modules/sade/readme.md b/tools/ui/node_modules/sade/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..fb8f70c52bb89176a0d5c3a288e6b96c09002465 --- /dev/null +++ b/tools/ui/node_modules/sade/readme.md @@ -0,0 +1,672 @@ +# sade [![Build Status](https://travis-ci.org/lukeed/sade.svg?branch=master)](https://travis-ci.org/lukeed/sade) + +> Smooth (CLI) Operator 🎶 + +Sade is a small but powerful tool for building command-line interface (CLI) applications for Node.js that are fast, responsive, and helpful! + +It enables default commands, git-like subcommands, option flags with aliases, default option values with type-casting, required-vs-optional argument handling, command validation, and automated help text generation! + +Your app's UX will be as smooth as butter... just like [Sade's voice](https://www.youtube.com/watch?v=4TYv2PhG89A). 😉 + + +## Install + +``` +$ npm install --save sade +``` + + +## Usage + +***Input:*** + +```js +#!/usr/bin/env node + +const sade = require('sade'); + +const prog = sade('my-cli'); + +prog + .version('1.0.5') + .option('--global, -g', 'An example global flag') + .option('-c, --config', 'Provide path to custom config', 'foo.config.js'); + +prog + .command('build ') + .describe('Build the source directory. Expects an `index.js` entry file.') + .option('-o, --output', 'Change the name of the output file', 'bundle.js') + .example('build src build --global --config my-conf.js') + .example('build app public -o main.js') + .action((src, dest, opts) => { + console.log(`> building from ${src} to ${dest}`); + console.log('> these are extra opts', opts); + }); + +prog.parse(process.argv); +``` + +***Output:*** + +```a +$ my-cli --help + + Usage + $ my-cli [options] + + Available Commands + build Build the source directory. + + For more info, run any command with the `--help` flag + $ my-cli build --help + + Options + -v, --version Displays current version + -g, --global An example global flag + -c, --config Provide path to custom config (default foo.config.js) + -h, --help Displays this message + + +$ my-cli build --help + + Description + Build the source directory. + Expects an `index.js` entry file. + + Usage + $ my-cli build [options] + + Options + -o, --output Change the name of the output file (default bundle.js) + -g, --global An example global flag + -c, --config Provide path to custom config (default foo.config.js) + -h, --help Displays this message + + Examples + $ my-cli build src build --global --config my-conf.js + $ my-cli build app public -o main.js +``` + +## Tips + +- **Define your global/program-wide version, options, description, and/or examples first.**
+ _Once you define a Command, you can't access the global-scope again._ + +- **Define all commands & options in the order that you want them to appear.**
+ _Sade will not mutate or sort your CLI for you. Global options print before local options._ + +- **Required arguments without values will error & exit**
+ _An `Insufficient arguments!` error will be displayed along with a help prompt._ + +- **Don't worry about manually displaying help~!**
+ _Your help text is displayed automatically... including command-specific help text!_ + +- **Automatic default/basic patterns**
+ _Usage text will always append `[options]` & `--help` and `--version` are done for you._ + +- **Only define what you want to display!**
+ _Help text sections (example, options, etc) will only display if you provide values._ + + +## Subcommands + +Subcommands are defined & parsed like any other command! When defining their [`usage`](#usage-1), everything up until the first argument (`[foo]` or ``) is interpreted as the command string. + +They should be defined in the order that you want them to appear in your general `--help` output. + +Lastly, it is _not_ necessary to define the subcommand's "base" as an additional command. However, if you choose to do so, it's recommended that you define it first for better visibility. + +```js +const prog = sade('git'); + +// Not necessary for subcommands to work, but it's here anyway! +prog + .command('remote') + .describe('Manage set of tracked repositories') + .action(opts => { + console.log('~> Print current remotes...'); + }); + +prog + .command('remote add ', 'Demo...') + .action((name, url, opts) => { + console.log(`~> Adding a new remote (${name}) to ${url}`); + }); + +prog + .command('remote rename ', 'Demo...') + .action((old, nxt, opts) => { + console.log(`~> Renaming from ${old} to ${nxt}~!`); + }); +``` + + +## Single Command Mode + +In certain circumstances, you may only need `sade` for a single-command CLI application. + +> **Note:** Until `v1.6.0`, this made for an awkward pairing. + +To enable this, you may make use of the [`isSingle`](#issingle) argument. Doing so allows you to pass the program's entire [`usage` text](#usage-1) into the `name` argument. + +With "Single Command Mode" enabled, your entire binary operates as one command. This means that any [`prog.command`](#progcommandusage-desc-opts) calls are disallowed & will instead throw an Error. Of course, you may still define a program version, a description, an example or two, and declare options. You are customizing the program's attributes as a whole.* + +> * This is true for multi-command applications, too, up until your first `prog.command()` call! + +***Example*** + +Let's reconstruct [`sirv-cli`](https://github.com/lukeed/sirv), which is a single-command application that (optionally) accepts a directory from which to serve files. It also offers a slew of option flags: + +```js +sade('sirv [dir]', true) + .version('1.0.0') + .describe('Run a static file server') + .example('public -qeim 31536000') + .example('--port 8080 --etag') + .example('my-app --dev') + .option('-D, --dev', 'Enable "dev" mode') + .option('-e, --etag', 'Enable "Etag" header') + // There are a lot... + .option('-H, --host', 'Hostname to bind', 'localhost') + .option('-p, --port', 'Port to bind', 5000) + .action((dir, opts) => { + // Program handler + }) + .parse(process.argv); +``` + +When `sirv --help` is run, the generated help text is trimmed, fully aware that there's only one command in this program: + +``` + Description + Run a static file server + + Usage + $ sirv [dir] [options] + + Options + -D, --dev Enable "dev" mode + -e, --etag Enable "Etag" header + -H, --host Hostname to bind (default localhost) + -p, --port Port to bind (default 5000) + -v, --version Displays current version + -h, --help Displays this message + + Examples + $ sirv public -qeim 31536000 + $ sirv --port 8080 --etag + $ sirv my-app --dev +``` + +## Command Aliases + +Command aliases are alternative names (aliases) for a command. They are often used as shortcuts or as typo relief! + +The aliased names do not appear in the general help text.
+Instead, they only appear within the Command-specific help text under an "Aliases" section. + +***Limitations*** + +* You cannot assign aliases while in [Single Command Mode](#single-command-mode) +* You cannot call [`prog.alias()`](#progaliasnames) before defining any Commands (via `prog.commmand()`) +* You, the developer, must keep track of which aliases have already been used and/or exist as Command names + +***Example*** + +Let's reconstruct the `npm install` command as a Sade program: + +```js +sade('npm') + // ... + .command('install [package]', 'Install a package', { + alias: ['i', 'add', 'isntall'] + }) + .option('-P, --save-prod', 'Package will appear in your dependencies.') + .option('-D, --save-dev', 'Package will appear in your devDependencies.') + .option('-O, --save-optional', 'Package will appear in your optionalDependencies') + .option('-E, --save-exact', 'Save exact versions instead of using a semver range operator') + // ... +``` + +When we run `npm --help` we'll see this general help text: + +``` + Usage + $ npm [options] + + Available Commands + install Install a package + + For more info, run any command with the `--help` flag + $ npm install --help + + Options + -v, --version Displays current version + -h, --help Displays this message +``` + +When we run `npm install --help` — ***or*** the help flag with any of `install`'s aliases — we'll see this command-specific help text: + +``` + Description + Install a package + + Usage + $ npm install [package] [options] + + Aliases + $ npm i + $ npm add + $ npm isntall + + Options + -P, --save-prod Package will appear in your dependencies. + -D, --save-dev Package will appear in your devDependencies. + -O, --save-optional Package will appear in your optionalDependencies + -E, --save-exact Save exact versions instead of using a semver range operator + -h, --help Displays this message +``` + + + +## API + +### sade(name, isSingle) +Returns: `Program` + +Returns your chainable Sade instance, aka your `Program`. + +#### name +Type: `String`
+Required: `true` + +The name of your `Program` / binary application. + +#### isSingle +Type: `Boolean`
+Default: `name.includes(' ');` + +If your `Program` is meant to have ***only one command***.
+When `true`, this simplifies your generated `--help` output such that: + +* the "root-level help" is your _only_ help text +* the "root-level help" does not display an `Available Commands` section +* the "root-level help" does not inject `$ name ` into the `Usage` section +* the "root-level help" does not display `For more info, run any command with the `--help` flag` text + +You may customize the `Usage` of your command by modifying the `name` argument directly.
+Please read [Single Command Mode](#single-command-mode) for an example and more information. + +> **Important:** Whenever `name` includes a custom usage, then `isSingle` is automatically assumed and enforced! + +### prog.command(usage, desc, opts) + +Create a new Command for your Program. This changes the current state of your Program. + +All configuration methods (`prog.describe`, `prog.action`, etc) will apply to this Command until another Command has been created! + +#### usage + +Type: `String` + +The usage pattern for your current Command. This will be included in the general or command-specific `--help` output. + +_Required_ arguments are wrapped with `<` and `>` characters; for example, `` and ``. + +_Optional_ arguments are wrapped with `[` and `]` characters; for example, `[foo]` and `[bar]`. + +All arguments are ***positionally important***, which means they are passed to your current Command's [`handler`](#handler) function in the order that they were defined. + +When optional arguments are defined but don't receive a value, their positionally-equivalent function parameter will be `undefined`. + +> **Important:** You **must** define & expect required arguments _before_ optional arguments! + +```js +sade('foo') + + .command('greet ') + .action((adjective, noun, opts) => { + console.log(`Hello, ${adjective} ${noun}!`); + }) + + .command('drive [color] [speed]') + .action((vehicle, color, speed, opts) => { + let arr = ['Driving my']; + arr.push(color ? `${color} ${vehicle}` : vehicle); + speed && arr.push(`at ${speed}`); + opts.yolo && arr.push('...YOLO!!'); + let str = arr.join(' '); + console.log(str); + }); +``` + +```sh +$ foo greet beautiful person +# //=> Hello, beautiful person! + +$ foo drive car +# //=> Driving my car + +$ foo drive car red +# //=> Driving my red card + +$ foo drive car blue 100mph --yolo +# //=> Driving my blue car at 100mph ...YOLO!! +``` + + +#### desc + +Type: `String`
+Default: `''` + +The Command's description. The value is passed directly to [`prog.describe`](#progdescribetext). + +#### opts + +Type: `Object`
+Default: `{}` + +##### opts.alias +Type: `String|Array` + +Optionally define one or more aliases for the current Command.
+When declared, the `opts.alias` value is passed _directly_ to the [`prog.alias`](#progaliasnames) method. + +```js +// Program A is equivalent to Program B +// --- + +const A = sade('bin') + .command('build', 'My build command', { alias: 'b' }) + .command('watch', 'My watch command', { alias: ['w', 'dev'] }); + +const B = sade('bin') + .command('build', 'My build command').alias('b') + .command('watch', 'My watch command').alias('w', 'dev'); +``` + + +##### opts.default + +Type: `Boolean` + +Manually set/force the current Command to be the Program's default command. This ensures that the current Command will run if no command was specified. + +> **Important:** If you run your Program without a Command _and_ without specifying a default command, your Program will exit with a `No command specified` error. + +```js +const prog = sade('greet'); + +prog.command('hello'); +//=> only runs if :: `$ greet hello` + +// $ greet +//=> error: No command specified. + +prog.command('howdy', '', { default:true }); +//=> runs as `$ greet` OR `$ greet howdy` + +// $ greet +//=> runs 'howdy' handler + +// $ greet foobar +//=> error: Invalid command +``` + + +### prog.describe(text) + +Add a description to the current Command. + +#### text + +Type: `String|Array` + +The description text for the current Command. This will be included in the general or command-specific `--help` output. + +Internally, your description will be separated into an `Array` of sentences. + +For general `--help` output, ***only*** the first sentence will be displayed. However, **all sentences** will be printed for command-specific `--help` text. + +> **Note:** Pass an `Array` if you don't want internal assumptions. However, the first item is _always_ displayed in general help, so it's recommended to keep it short. + + +### prog.alias(...names) + +Define one or more aliases for the current Command. + +> **Important:** An error will be thrown if:
1) the program is in [Single Command Mode](#single-command-mode); or
2) `prog.alias` is called before any `prog.command`. + +#### names + +Type: `String` + +The list of alternative names (aliases) for the current Command.
+For example, you may want to define shortcuts and/or common typos for the Command's full name. + +> **Important:** Sade _does not_ check if the incoming `names` are already in use by other Commands or their aliases.
During conflicts, the Command with the same `name` is given priority, otherwise the first Command (according to Program order) with `name` as an alias is chosen. + +The `prog.alias()` is append-only, so calling it multiple times within a Command context will _keep_ all aliases, including those initially passed via [`opts.alias`](#optsdefault). + +```js +sade('bin') + .command('hello ', 'Greet someone by their name', { + alias: ['hey', 'yo'] + }) + .alias('hi', 'howdy') + .alias('hola', 'oi'); +//=> hello aliases: hey, yo, hi, howdy, hola, oi +``` + + +### prog.action(handler) + +Attach a callback to the current Command. + +#### handler + +Type: `Function` + +The function to run when the current Command is executed. + +Its parameters are based (positionally) on your Command's [`usage`](#usage-1) definition. + +All options, flags, and extra/unknown values are included as the last parameter. + +> **Note:** Optional arguments are also passed as parameters & may be `undefined`! + +```js +sade('foo') + .command('cp ') + .option('-f, --force', 'Overwrite without confirmation') + .option('-c, --clone-dir', 'Copy files to additional directory') + .option('-v, --verbose', 'Enable verbose output') + .action((src, dest, opts) => { + console.log(`Copying files from ${src} --> ${dest}`); + opts.c && console.log(`ALSO copying files from ${src} --> ${opts['clone-dir']}`); + console.log('My options:', opts); + }) + +// $ foo cp original my-copy -v +//=> Copying files from original --> my-copy +//=> My options: { _:[], v:true, verbose:true } + +// $ foo cp original my-copy --clone-dir my-backup +//=> Copying files from original --> my-copy +//=> ALSO copying files from original --> my-backup +//=> My options: { _:[], c:'my-backup', 'clone-dir':'my-backup' } +``` + + +### prog.example(str) + +Add an example for the current Command. + +#### str + +Type: `String` + +The example string to add. This will be included in the general or command-specific `--help` output. + +> **Note:** Your example's `str` will be prefixed with your Program's [`name`](#sadename). + + +### prog.option(flags, desc, value) + +Add an Option to the current Command. + +#### flags + +Type: `String` + +The Option's flags, which may optionally include an alias. + +You may use a comma (`,`) or a space (` `) to separate the flags. + +> **Note:** The short & long flags can be declared in any order. However, the alias will always be displayed first. + +> **Important:** If using hyphenated flag names, they will be accessible **as declared** within your [`action()`](#progactionhandler) handler! + +```js +prog.option('--global'); // no alias +prog.option('-g, --global'); // alias first, comma +prog.option('--global -g'); // alias last, space +// etc... +``` + +#### desc + +Type: `String` + +The description for the Option. + +#### value + +Type: `String` + +The **default** value for the Option. + +Flags and aliases, if parsed, are `true` by default. See [`mri`](https://github.com/lukeed/mri#minimist) for more info. + +> **Note:** You probably only want to define a default `value` if you're expecting a `String` or `Number` value type. + +If you _do_ pass a `String` or `Number` value type, your flag value will be casted to the same type. See [`mri#options.default`](https://github.com/lukeed/mri#optionsdefault) for info~! + + +### prog.version(str) + +The `--version` and `-v` flags will automatically output the Program version. + +#### str + +Type: `String`
+Default: `0.0.0` + +The new version number for your Program. + +> **Note:** Your Program `version` is `0.0.0` until you change it. + +### prog.parse(arr, opts) + +Parse a set of CLI arguments. + +#### arr + +Type: `Array` + +Your Program's `process.argv` input. + +> **Important:** Do not `.slice(2)`! Doing so will break parsing~! + +#### opts + +Type: `Object`
+Default: `{}` + +Additional `process.argv` parsing config. See [`mri`'s options](https://github.com/lukeed/mri#mriargs-options) for details. + +> **Important:** These values _override_ any internal values! + +```js +prog + .command('hello') + .option('-f, --force', 'My flag'); +//=> currently has alias pair: f <--> force + +prog.parse(process.argv, { + alias: { + f: ['foo', 'fizz'] + }, + default: { + abc: 123 + } +}); +//=> ADDS alias pair: f <--> foo +//=> REMOVES alias pair: f <--> force +//=> ADDS alias pair: f <--> fizz +//=> ADDS default: abc -> 123 (number) +``` + +#### opts.unknown + +Type: `Function`
+Default: `undefined` + +Callback to run when an unspecified option flag has been found. This is [passed directly to `mri`](https://github.com/lukeed/mri#optionsunknown). + +Your handler will receive the unknown flag (string) as its only argument.
+You may return a string, which will be used as a custom error message. Otherwise, a default message is displayed. + +```js +sade('sirv') + .command('start [dir]') + .parse(process.argv, { + unknown: arg => `Custom error message: ${arg}` + }); + +/* +$ sirv start --foobar + + ERROR + Custom error message: --foobar + + Run `$ sirv --help` for more info. +*/ +``` + +#### opts.lazy + +Type: `Boolean`
+Default: `false` + +If true, Sade will not immediately execute the `action` handler. Instead, `parse()` will return an object of `{ name, args, handler }` shape, wherein the `name` is the command name, `args` is all arguments that _would be_ passed to the action handler, and `handler` is the function itself. + +From this, you may choose when to run the `handler` function. You also have the option to further modify the `args` for any reason, if needed. + +```js +let { name, args, handler } = prog.parse(process.argv, { lazy:true }); +console.log('> Received command: ', name); + +// later on... +handler.apply(null, args); +``` + +### prog.help(cmd) + +Manually display the help text for a given command. If no command name is provided, the general/global help is printed. + +Your general and command-specific help text is automatically attached to the `--help` and `-h` flags. + +> **Note:** You don't have to call this directly! It's automatically run when you `bin --help` + +#### cmd +Type: `String`
+Default: `null` + +The name of the command for which to display help. Otherwise displays the general help. + + +## License + +MIT © [Luke Edwards](https://lukeed.com) diff --git a/tools/ui/node_modules/safe-array-concat/.eslintrc b/tools/ui/node_modules/safe-array-concat/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..fc909f1ef09d0e7aa98cf8aee0ee8df3ace93952 --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "max-lines-per-function": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/tools/ui/node_modules/safe-array-concat/.github/FUNDING.yml b/tools/ui/node_modules/safe-array-concat/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..bbd94cdb9d0f1ecc47178b6b93bae719a16c0fc3 --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/safe-array-concat +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/tools/ui/node_modules/safe-array-concat/.nycrc b/tools/ui/node_modules/safe-array-concat/.nycrc new file mode 100644 index 0000000000000000000000000000000000000000..1826526e091b89c896e7099ccd891db79165e329 --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/tools/ui/node_modules/safe-array-concat/CHANGELOG.md b/tools/ui/node_modules/safe-array-concat/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..d2b77760e431a94a4bd83f14100c3018d1bbff97 --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/CHANGELOG.md @@ -0,0 +1,81 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.4](https://github.com/ljharb/safe-array-concat/compare/v1.1.3...v1.1.4) - 2026-04-19 + +### Commits + +- [actions] update workflows [`6747b8f`](https://github.com/ljharb/safe-array-concat/commit/6747b8fb6b6ffe374b4421de5a36d012d7971f7f) +- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/isarray`, `@types/tape`, `eslint`, `npmignore` [`aa30c94`](https://github.com/ljharb/safe-array-concat/commit/aa30c941d4ebda29ec4dfa0e9592e44fbd145342) +- [types] improve types [`21276eb`](https://github.com/ljharb/safe-array-concat/commit/21276eb73f9ec5ed1119655382f38cf79030c9dd) +- [Deps] update `call-bound`, `get-intrinsic` [`efb5138`](https://github.com/ljharb/safe-array-concat/commit/efb513816ab84c1bebc0852d4aca68e5bcd27ff8) +- [Deps] update `call-bind` [`dbe4255`](https://github.com/ljharb/safe-array-concat/commit/dbe42554607a0143e0b4c720266f81c7ecb712fb) +- [Dev Deps] update `@ljharb/eslint-config` [`470988c`](https://github.com/ljharb/safe-array-concat/commit/470988cb3edfe1ffa7313cdb6d1e89101ed1dd15) +- [Dev Deps] update `@ljharb/eslint-config` [`8a8f4ec`](https://github.com/ljharb/safe-array-concat/commit/8a8f4ec87aca0eca53f31d537dd523f2d60803cb) + +## [v1.1.3](https://github.com/ljharb/safe-array-concat/compare/v1.1.2...v1.1.3) - 2024-12-11 + +### Commits + +- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `mock-property`, `tape` [`9452ca7`](https://github.com/ljharb/safe-array-concat/commit/9452ca7dc6e22d89fb1bbf4f604d3e058a6813c0) +- [actions] split out node 10-20, and 20+ [`8166059`](https://github.com/ljharb/safe-array-concat/commit/8166059134d555337faf7574f40c746deaecfa99) +- [Deps] update `call-bind`, `get-intrinsic`, `has-symbols` [`d35014a`](https://github.com/ljharb/safe-array-concat/commit/d35014a2f8240ca70c336ef694744726b03a042b) +- [Refactor] use `call-bound` directly [`0bdddbd`](https://github.com/ljharb/safe-array-concat/commit/0bdddbdbdd887f12ecc58ee9fd1f358ec13560d3) +- [Tests] replace `aud` with `npm audit` [`c62dae0`](https://github.com/ljharb/safe-array-concat/commit/c62dae04b6eb56c460132fdd6e10de432228757e) +- [Dev Deps] add missing peer dep [`4860aae`](https://github.com/ljharb/safe-array-concat/commit/4860aae938375ae69ecf1c8d6caf58632ca57715) + +## [v1.1.2](https://github.com/ljharb/safe-array-concat/compare/v1.1.1...v1.1.2) - 2024-03-09 + +### Commits + +- [types] use a generic [`a1d744d`](https://github.com/ljharb/safe-array-concat/commit/a1d744d749033c91f0c108b28ac6dbc6016ecce4) +- [Dev Deps] update `@ljharb/tsconfig`, `set-function-length` [`3d3da0a`](https://github.com/ljharb/safe-array-concat/commit/3d3da0ab110bce21f466381c5d09f93200a20f85) + +## [v1.1.1](https://github.com/ljharb/safe-array-concat/compare/v1.1.0...v1.1.1) - 2024-03-09 + +### Commits + +- [types] use shared config [`f509f80`](https://github.com/ljharb/safe-array-concat/commit/f509f80fb2dd9734c309ccb59ca9451c5a5de885) +- [actions] remove redundant finisher; use reusable workflows [`b5f5ff4`](https://github.com/ljharb/safe-array-concat/commit/b5f5ff497976a48e291788b26b741cd4f3d388eb) +- [types] use handwritten d.ts instead of emit [`e717048`](https://github.com/ljharb/safe-array-concat/commit/e717048433b52d3a3240b7c697b5736756ed296e) +- [Dev Deps] update `set-function-length`, `tape` [`dde26a7`](https://github.com/ljharb/safe-array-concat/commit/dde26a7600ebe8ebc8f45d1bf8f1a970175604d8) +- [Deps] update `call-bind`, `get-intrinsic` [`d5d2cde`](https://github.com/ljharb/safe-array-concat/commit/d5d2cde9e5b7179d00d85e007b80b138969c5968) +- [Dev Deps] update `tape` [`9454c5a`](https://github.com/ljharb/safe-array-concat/commit/9454c5a3beacb08200b4b00b7ffa54a572cb76ab) +- [Tests] add `@arethetypeswrong/cli [`00a5243`](https://github.com/ljharb/safe-array-concat/commit/00a5243a5b923ff2b694b3b5ef4ce39027e30f6e) +- [Deps] update `get-intrinsic` [`c935764`](https://github.com/ljharb/safe-array-concat/commit/c9357646c3923a1351dca21f175b2b421dd15da5) + +## [v1.1.0](https://github.com/ljharb/safe-array-concat/compare/v1.0.1...v1.1.0) - 2024-01-15 + +### Commits + +- [New] add types [`bd92413`](https://github.com/ljharb/safe-array-concat/commit/bd92413643b2bd0ad62e854172fad129d3899dc1) +- [Dev Deps] update `aud`, `mock-property`, `npmignore`, `set-function-length`, `tape` [`497ffcb`](https://github.com/ljharb/safe-array-concat/commit/497ffcbb271ad61752756ec363ad5b9400e4d367) +- [Deps] update `call-bind`, `get-intrinsic` [`770f870`](https://github.com/ljharb/safe-array-concat/commit/770f8704d3751b947c7f4772d9ee38d8bcdecf44) +- [Dev Deps] update `mock-property`, `tape` [`be76bd9`](https://github.com/ljharb/safe-array-concat/commit/be76bd958fa73607a105122a8770677ecbdf78f0) +- [Tests] use `set-function-length/env` [`89b1167`](https://github.com/ljharb/safe-array-concat/commit/89b116758d91ad521f963cccf056f9a3f0b18c20) +- [meta] add missing npmrc values [`3185cc7`](https://github.com/ljharb/safe-array-concat/commit/3185cc7a6773baf625c65bb58ffb9b7ee5f3306e) +- [meta] add `sideEffects` flag [`df6c7eb`](https://github.com/ljharb/safe-array-concat/commit/df6c7ebca7f2fd2f152fe2c2a2260d21728e70a3) + +## [v1.0.1](https://github.com/ljharb/safe-array-concat/compare/v1.0.0...v1.0.1) - 2023-09-05 + +### Fixed + +- [Perf] set `Symbol.isConcatSpreadable` only when required [`#2`](https://github.com/ljharb/safe-array-concat/issues/2) + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`c0791b0`](https://github.com/ljharb/safe-array-concat/commit/c0791b00b74e70113921c32d4d1fd494b7e8f555) +- [Deps] update `get-intrinsic` [`7d07ae6`](https://github.com/ljharb/safe-array-concat/commit/7d07ae69d512bb3b6fb2131f1c824b5ffd85af9f) + +## v1.0.0 - 2023-04-20 + +### Commits + +- Initial implementation, tests, readme [`31b8e70`](https://github.com/ljharb/safe-array-concat/commit/31b8e709bbba4b01ebc51cc15cdcc7012fe58341) +- Initial commit [`83d38c6`](https://github.com/ljharb/safe-array-concat/commit/83d38c6f4cde453063393482d9129b134d403d0a) +- npm init [`516fdc2`](https://github.com/ljharb/safe-array-concat/commit/516fdc2bef306ec13f98b1f1b49c929b5308907f) +- Only apps should have lockfiles [`9cfa07b`](https://github.com/ljharb/safe-array-concat/commit/9cfa07b9112107b5ba22c74baca8cb80934a09f2) diff --git a/tools/ui/node_modules/safe-array-concat/LICENSE b/tools/ui/node_modules/safe-array-concat/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b4213ac640ad53446325d2dab2c2bc8620406b72 --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/safe-array-concat/README.md b/tools/ui/node_modules/safe-array-concat/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c7e1d4514461e5335fc36df64cdd7e9568a20dfd --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/README.md @@ -0,0 +1,53 @@ +# safe-array-concat [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable + +## Getting started + +```sh +npm install --save safe-array-concat +``` + +## Usage/Examples + +```js +var safeConcat = require('safe-array-concat'); +var assert = require('assert'); + +assert.deepEqual([].concat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with normal concat'); +assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with safe concat'); + +String.prototype[Symbol.isConcatSpreadable] = true; +assert.deepEqual([].concat('foo', Object('bar')), ['foo', 'b', 'a', 'r'], 'spreadable String objects are spread with normal concat!!!'); +assert.deepEqual(safeConcat('foo', Object('bar')), ['foo', Object('bar')], 'spreadable String objects are not spread with safe concat'); + +Array.prototype[Symbol.isConcatSpreadable] = false; +assert.deepEqual([].concat([1, 2], 3, [[4]]), [[], [1, 2], 3, [[4]]], 'non-concat-spreadable arrays do not spread with normal concat!!!'); +assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'non-concat-spreadable arrays still spread with safe concat'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/safe-array-concat +[npm-version-svg]: https://versionbadg.es/ljharb/safe-array-concat.svg +[deps-svg]: https://david-dm.org/ljharb/safe-array-concat.svg +[deps-url]: https://david-dm.org/ljharb/safe-array-concat +[dev-deps-svg]: https://david-dm.org/ljharb/safe-array-concat/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/safe-array-concat#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/safe-array-concat.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/safe-array-concat.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/safe-array-concat.svg +[downloads-url]: https://npm-stat.com/charts.html?package=safe-array-concat +[codecov-image]: https://codecov.io/gh/ljharb/safe-array-concat/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/safe-array-concat/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-array-concat +[actions-url]: https://github.com/ljharb/safe-array-concat/actions diff --git a/tools/ui/node_modules/safe-array-concat/index.d.ts b/tools/ui/node_modules/safe-array-concat/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d9df8ed330443355d92e766fdd5a26d063b44b9b --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/index.d.ts @@ -0,0 +1,6 @@ +declare function safeArrayConcat( + item: T | readonly T[], + ...items: (T | readonly T[])[], +): T[]; + +export = safeArrayConcat; diff --git a/tools/ui/node_modules/safe-array-concat/index.js b/tools/ui/node_modules/safe-array-concat/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f2630ceaa1b244238a5e8b03548fe07d38b6cc5e --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $concat = GetIntrinsic('%Array.prototype.concat%'); + +var callBind = require('call-bind'); + +var callBound = require('call-bound'); +var $slice = callBound('Array.prototype.slice'); + +var hasSymbols = require('has-symbols/shams')(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; + +/** @type {never[]} */ var empty = []; +var $concatApply = isConcatSpreadable ? callBind.apply($concat, empty) : null; + +// eslint-disable-next-line no-extra-parens +var isArray = isConcatSpreadable ? /** @type {(value: unknown) => value is unknown[]} */ (require('isarray')) : null; + +/** @type {import('.')} */ +module.exports = isConcatSpreadable + // eslint-disable-next-line no-unused-vars + ? function safeArrayConcat(item) { + for (var i = 0; i < arguments.length; i += 1) { + /** @type {typeof item} */ var arg = arguments[i]; + // @ts-expect-error ts(2538) see https://github.com/microsoft/TypeScript/issues/9998#issuecomment-1890787975; works if `const` + if (arg && typeof arg === 'object' && typeof arg[isConcatSpreadable] === 'boolean') { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + if (!empty[isConcatSpreadable]) { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + empty[isConcatSpreadable] = true; + } + // @ts-expect-error ts(2721) ts(18047) not sure why TS can't figure out this can't be null + var arr = isArray(arg) ? $slice(arg) : [arg]; + // @ts-expect-error ts(7015) TS can't handle expandos on an array + arr[isConcatSpreadable] = true; // shadow the property. TODO: use [[Define]] + arguments[i] = arr; + } + } + // @ts-expect-error ts(2345) https://github.com/microsoft/TypeScript/issues/57164 TS doesn't understand that apply can take an arguments object + return $concatApply(arguments); + } + : callBind($concat, empty); diff --git a/tools/ui/node_modules/safe-array-concat/package.json b/tools/ui/node_modules/safe-array-concat/package.json new file mode 100644 index 0000000000000000000000000000000000000000..00fdbbd290eb3e83d19743fee64c62f8def10214 --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/package.json @@ -0,0 +1,89 @@ +{ + "name": "safe-array-concat", + "version": "1.1.4", + "description": "`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc && attw -P", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "nyc tape test", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production" + }, + "keywords": [ + "safe", + "Array", + "concat", + "push", + "isConcatSpreadable" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/safe-array-concat.git" + }, + "bugs": { + "url": "https://github.com/ljharb/safe-array-concat/issues" + }, + "homepage": "https://github.com/ljharb/safe-array-concat#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.18.2", + "@ljharb/eslint-config": "^22.2.2", + "@ljharb/tsconfig": "^0.3.2", + "@types/call-bind": "^1.0.5", + "@types/get-intrinsic": "^1.2.3", + "@types/isarray": "^2.0.3", + "@types/tape": "^5.8.1", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "^8.57.1", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.1.0", + "npmignore": "^0.3.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "set-function-length": "^1.2.2", + "tape": "^5.9.0", + "typescript": "next" + }, + "dependencies": { + "call-bind": "^1.0.9", + "call-bound": "^1.0.4", + "get-intrinsic": "^1.3.0", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">=0.4" + } +} diff --git a/tools/ui/node_modules/safe-array-concat/test/index.js b/tools/ui/node_modules/safe-array-concat/test/index.js new file mode 100644 index 0000000000000000000000000000000000000000..1e0341ac2a77e105af97ff5f0edc83ef7f4ac8d6 --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/test/index.js @@ -0,0 +1,100 @@ +'use strict'; + +var test = require('tape'); +var mockProperty = require('mock-property'); +var hasSymbols = require('has-symbols/shams')(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; +var species = hasSymbols && Symbol.species; + +var boundFnsHaveConfigurableLengths = require('set-function-length/env').boundFnsHaveConfigurableLengths; + +var safeConcat = require('../'); + +test('safe-array-concat', function (t) { + t.equal(typeof safeConcat, 'function', 'is a function'); + t.equal( + safeConcat.length, + boundFnsHaveConfigurableLengths ? 1 : 0, + 'has a length of ' + (boundFnsHaveConfigurableLengths ? 1 : '0 (function lengths are not configurable)') + ); + + t.deepEqual( + // eslint-disable-next-line no-extra-parens + safeConcat(/** @type {(string | number | number[])[]} */ ([1, 2]), [3, 4], 'foo', 5, 6, [[7]]), + [1, 2, 3, 4, 'foo', 5, 6, [7]], + 'works with flat and nested arrays' + ); + + t.deepEqual( + safeConcat(undefined, 1, 2), + [undefined, 1, 2], + 'first item as undefined is not the concat receiver, which would throw via ToObject' + ); + t.deepEqual( + safeConcat(null, 1, 2), + [null, 1, 2], + 'first item as null is not the concat receiver, which would throw via ToObject' + ); + + var arr = [1, 2]; + arr.constructor = function C() { + return { args: arguments }; + }; + t.deepEqual( + safeConcat(arr, 3, 4), + [1, 2, 3, 4], + 'first item as an array with a nonArray .constructor; ignores constructor' + ); + + t.test('has Symbol.species', { skip: !species }, function (st) { + var speciesArr = [1, 2]; + // @ts-expect-error ts(2740) TS's `constructor` type requires a function + speciesArr.constructor = {}; + // @ts-expect-error ts(2538) TS can't type narrow from tape's `skip` + speciesArr.constructor[species] = function Species() { + return { args: arguments }; + }; + + st.deepEqual( + safeConcat(speciesArr, 3, 4), + [1, 2, 3, 4], + 'first item as an array with a .constructor object with a Symbol.species; ignores constructor and species' + ); + + st.end(); + }); + + t.test('has isConcatSpreadable', { skip: !isConcatSpreadable }, function (st) { + // TS can't type narrow from tape's `skip` + if (isConcatSpreadable) { + st.teardown(mockProperty( + // eslint-disable-next-line no-extra-parens + /** @type {Record} */ (/** @type {unknown} */ (String.prototype)), + isConcatSpreadable, + { value: true } + )); + + var nonSpreadable = [1, 2]; + // @ts-expect-error ts(7015) TS can't handle expandos on an array + nonSpreadable[isConcatSpreadable] = false; + + st.deepEqual( + safeConcat(nonSpreadable, 3, 4, 'foo', Object('bar')), + [1, 2, 3, 4, 'foo', Object('bar')], + 'a non-concat-spreadable array is spreaded, and a concat-spreadable String is not spreaded' + ); + + st.teardown(mockProperty(Array.prototype, isConcatSpreadable, { value: false })); + + st.deepEqual( + safeConcat([1, 2], 3, 4, 'foo', Object('bar')), + [1, 2, 3, 4, 'foo', Object('bar')], + 'all arrays marked non-concat-spreadable are still spreaded, and a concat-spreadable String is not spreaded' + ); + } + + st.end(); + }); + + t.end(); +}); diff --git a/tools/ui/node_modules/safe-array-concat/tsconfig.json b/tools/ui/node_modules/safe-array-concat/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..0ce1896d10cdec1dc2e6fc181a65fd41b7fc8208 --- /dev/null +++ b/tools/ui/node_modules/safe-array-concat/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/tools/ui/node_modules/safe-buffer/LICENSE b/tools/ui/node_modules/safe-buffer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..0c068ceecbd48fc4e8279e6451793fec2bf12178 --- /dev/null +++ b/tools/ui/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tools/ui/node_modules/safe-buffer/README.md b/tools/ui/node_modules/safe-buffer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e9a81afd0406f030ba21169f0c7a1dba70b3a93b --- /dev/null +++ b/tools/ui/node_modules/safe-buffer/README.md @@ -0,0 +1,584 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/tools/ui/node_modules/safe-buffer/index.d.ts b/tools/ui/node_modules/safe-buffer/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e9fed809a5ab515658d6e71f7ba5f631be769be4 --- /dev/null +++ b/tools/ui/node_modules/safe-buffer/index.d.ts @@ -0,0 +1,187 @@ +declare module "safe-buffer" { + export class Buffer { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + } +} \ No newline at end of file diff --git a/tools/ui/node_modules/safe-buffer/index.js b/tools/ui/node_modules/safe-buffer/index.js new file mode 100644 index 0000000000000000000000000000000000000000..22438dabbbceef6954a1a7a68038f8c440a90c79 --- /dev/null +++ b/tools/ui/node_modules/safe-buffer/index.js @@ -0,0 +1,62 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/tools/ui/node_modules/safe-buffer/package.json b/tools/ui/node_modules/safe-buffer/package.json new file mode 100644 index 0000000000000000000000000000000000000000..623fbc3f6b0c480fb0b3257fc666b1db827378bf --- /dev/null +++ b/tools/ui/node_modules/safe-buffer/package.json @@ -0,0 +1,37 @@ +{ + "name": "safe-buffer", + "description": "Safer Node.js Buffer API", + "version": "5.1.2", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + } +} diff --git a/tools/ui/node_modules/safe-push-apply/.eslintrc b/tools/ui/node_modules/safe-push-apply/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..fc909f1ef09d0e7aa98cf8aee0ee8df3ace93952 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "max-lines-per-function": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/tools/ui/node_modules/safe-push-apply/.github/FUNDING.yml b/tools/ui/node_modules/safe-push-apply/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..0489356212bc1334477539d9e76bb399facc8247 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/safe-push-apply +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/tools/ui/node_modules/safe-push-apply/.nycrc b/tools/ui/node_modules/safe-push-apply/.nycrc new file mode 100644 index 0000000000000000000000000000000000000000..1826526e091b89c896e7099ccd891db79165e329 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/tools/ui/node_modules/safe-push-apply/CHANGELOG.md b/tools/ui/node_modules/safe-push-apply/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..24570a1ed77b0858740695bc760f92dfdcbb7834 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2024-12-28 + +### Commits + +- Initial implementation, tests, readme, types [`6e85f82`](https://github.com/ljharb/safe-push-apply/commit/6e85f82b116286503ff377e15708cd1584531c5f) +- Initial commit [`93928d9`](https://github.com/ljharb/safe-push-apply/commit/93928d9a1304ccc25b799528a4bbca8615f7614e) +- npm init [`5da39da`](https://github.com/ljharb/safe-push-apply/commit/5da39da33bb096e633d1e631a9374cfa0d7dc06b) +- Only apps should have lockfiles [`83fc8b4`](https://github.com/ljharb/safe-push-apply/commit/83fc8b4be29d680a27225329cc1ef5505626effa) diff --git a/tools/ui/node_modules/safe-push-apply/LICENSE b/tools/ui/node_modules/safe-push-apply/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f82f38963b0d282b529f64def2bcd40be3a9a947 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/safe-push-apply/README.md b/tools/ui/node_modules/safe-push-apply/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e2c56bd005d2e5019f1a488977b24e40ffff5534 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/README.md @@ -0,0 +1,59 @@ +# safe-push-apply [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Push an array of items into an array, while being robust against prototype modification. + +## Getting started + +```sh +npm install --save safe-push-apply +``` + +## Usage/Examples + +```js +var safePushApply = require('safe-push-apply'); +var assert = require('assert'); + +var arr = [1, 2, 3]; + +var orig = Array.prototype[Symbol.iterator]; +delete Array.prototype[Symbol.iterator]; +assert.throws(() => { + try { + arr.push(...[3, 4, 5]); + } finally { + Array.prototype[Symbol.iterator] = orig; + } +}, 'array is not iterable anymore'); + +delete Array.prototype.push; +safePushApply(arr, [3, 4, 5]); + +assert.deepEqual(arr, [1, 2, 3, 3, 4, 5]); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/safe-push-apply +[npm-version-svg]: https://versionbadg.es/ljharb/safe-push-apply.svg +[deps-svg]: https://david-dm.org/ljharb/safe-push-apply.svg +[deps-url]: https://david-dm.org/ljharb/safe-push-apply +[dev-deps-svg]: https://david-dm.org/ljharb/safe-push-apply/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/safe-push-apply#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/safe-push-apply.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/safe-push-apply.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/safe-push-apply.svg +[downloads-url]: https://npm-stat.com/charts.html?package=safe-push-apply +[codecov-image]: https://codecov.io/gh/ljharb/safe-push-apply/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/safe-push-apply/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-push-apply +[actions-url]: https://github.com/ljharb/safe-push-apply/actions diff --git a/tools/ui/node_modules/safe-push-apply/index.d.ts b/tools/ui/node_modules/safe-push-apply/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..28d78ddbad62848aff6310ae5b01b1cd7fb3d51a --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/index.d.ts @@ -0,0 +1,6 @@ +declare function safePushApply( + target: T[], + source: ArrayLike, +): void; + +export = safePushApply; diff --git a/tools/ui/node_modules/safe-push-apply/index.js b/tools/ui/node_modules/safe-push-apply/index.js new file mode 100644 index 0000000000000000000000000000000000000000..080a1b85c7fcfe21d9d96c318d7d341cfeee85e9 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/index.js @@ -0,0 +1,15 @@ +'use strict'; + +var $TypeError = require('es-errors/type'); + +var isArray = require('isarray'); + +/** @type {import('.')} */ +module.exports = function safePushApply(target, source) { + if (!isArray(target)) { + throw new $TypeError('target must be an array'); + } + for (var i = 0; i < source.length; i++) { + target[target.length] = source[i]; // eslint-disable-line no-param-reassign + } +}; diff --git a/tools/ui/node_modules/safe-push-apply/package.json b/tools/ui/node_modules/safe-push-apply/package.json new file mode 100644 index 0000000000000000000000000000000000000000..cc7bc6ba0925252a7f5f6a6be394568af8521739 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/package.json @@ -0,0 +1,82 @@ +{ + "name": "safe-push-apply", + "version": "1.0.0", + "description": "Push an array of items into an array, while being robust against prototype modification", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc && attw -P", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "nyc tape test", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production" + }, + "keywords": [ + "array", + "push", + "apply", + "pushApply", + "safe" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/safe-push-apply.git" + }, + "bugs": { + "url": "https://github.com/ljharb/safe-push-apply/issues" + }, + "homepage": "https://github.com/ljharb/safe-push-apply#readme", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.1", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.2", + "@types/isarray": "^2.0.3", + "@types/tape": "^5.6.5", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/tools/ui/node_modules/safe-push-apply/test/index.js b/tools/ui/node_modules/safe-push-apply/test/index.js new file mode 100644 index 0000000000000000000000000000000000000000..46fd1afcd9a39c7798d597f05e24dccc253c957c --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/test/index.js @@ -0,0 +1,30 @@ +'use strict'; + +var test = require('tape'); + +var safePushApply = require('../'); + +test('safe-push-apply', function (t) { + t.equal(typeof safePushApply, 'function', 'is a function'); + t.equal(safePushApply.length, 2, 'has a length of 2'); + + t['throws']( + // @ts-expect-error + function () { safePushApply({}, []); }, + TypeError, + 'throws if target is not an array' + ); + + var a = [1, 2]; + var b = [3, 4]; + safePushApply(a, b); + t.deepEqual(a, [1, 2, 3, 4], 'b is pushed into a'); + t.deepEqual(b, [3, 4], 'b is not modified'); + + var c = '567'; + // @ts-expect-error TS ArrayLike doesn't accept strings for some reason + safePushApply(a, c); + t.deepEqual(a, [1, 2, 3, 4, '5', '6', '7'], 'works with arraylike source'); + + t.end(); +}); diff --git a/tools/ui/node_modules/safe-push-apply/tsconfig.json b/tools/ui/node_modules/safe-push-apply/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..0ce1896d10cdec1dc2e6fc181a65fd41b7fc8208 --- /dev/null +++ b/tools/ui/node_modules/safe-push-apply/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/tools/ui/node_modules/safe-regex-test/.eslintrc b/tools/ui/node_modules/safe-regex-test/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..ff89be3cc8eed9586cdb0174825afe4edc29c566 --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + }, +} diff --git a/tools/ui/node_modules/safe-regex-test/.github/FUNDING.yml b/tools/ui/node_modules/safe-regex-test/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..ef4a2679821bd749a7a4063dc5973db4cce70df2 --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/safe-regex-test +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/tools/ui/node_modules/safe-regex-test/.nycrc b/tools/ui/node_modules/safe-regex-test/.nycrc new file mode 100644 index 0000000000000000000000000000000000000000..1826526e091b89c896e7099ccd891db79165e329 --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/tools/ui/node_modules/safe-regex-test/CHANGELOG.md b/tools/ui/node_modules/safe-regex-test/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..8ed1eb473839afe75eebedde870d6fce06e2f3cf --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/CHANGELOG.md @@ -0,0 +1,55 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.0](https://github.com/ljharb/safe-regex-test/compare/v1.0.3...v1.1.0) - 2024-12-12 + +### Commits + +- [actions] split out node 10-20, and 20+ [`b4a46bb`](https://github.com/ljharb/safe-regex-test/commit/b4a46bb30542251df8051aec52561ce2bb162f85) +- [New] add types [`5cb24eb`](https://github.com/ljharb/safe-regex-test/commit/5cb24eb6d074fdae200446e172f1ab485460c34e) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-value-fixtures`, `object-inspect`, `tape` [`e225ca0`](https://github.com/ljharb/safe-regex-test/commit/e225ca081b77ea105b5e913a00473066efeb471d) +- [Refactor] use `call-bound` directly [`9be3cd2`](https://github.com/ljharb/safe-regex-test/commit/9be3cd2f390f23c0075ec93e5abdace0ee5d9d9d) +- [Deps] update `call-bind`, `is-regex` [`524b736`](https://github.com/ljharb/safe-regex-test/commit/524b73677e16de9dde27dfb8f30ac4760071bbda) +- [Tests] replace `aud` with `npm audit` [`f3cd537`](https://github.com/ljharb/safe-regex-test/commit/f3cd5379e48152daeb51fdd09e15d3ec74797761) +- [Dev Deps] add missing peer dep [`14da559`](https://github.com/ljharb/safe-regex-test/commit/14da559a0620b99a262ab9610dba13720915360f) + +## [v1.0.3](https://github.com/ljharb/safe-regex-test/compare/v1.0.2...v1.0.3) - 2024-02-06 + +### Commits + +- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`d6ba2f9`](https://github.com/ljharb/safe-regex-test/commit/d6ba2f948c679c3104ce6d6c897bedff0f1c5b74) +- [Deps] update `call-bind`, `get-intrinsic` [`5a3b1d7`](https://github.com/ljharb/safe-regex-test/commit/5a3b1d755e46f010e6930f15ec30eae023feffd3) +- [Dev Deps] update `tape` [`75fb719`](https://github.com/ljharb/safe-regex-test/commit/75fb71937c5daf1326052c59d6f251f439cd9332) + +## [v1.0.2](https://github.com/ljharb/safe-regex-test/compare/v1.0.1...v1.0.2) - 2024-01-11 + +### Commits + +- [meta] package.json `sideEffects` should be boolean [`094bb88`](https://github.com/ljharb/safe-regex-test/commit/094bb88d93ce25e26d20f5badee4e45acf0e3ac5) + +## [v1.0.1](https://github.com/ljharb/safe-regex-test/compare/v1.0.0...v1.0.1) - 2024-01-09 + +### Commits + +- [Tests] add nyc for coverage [`7e3f525`](https://github.com/ljharb/safe-regex-test/commit/7e3f5254efdf0979f72492f0e7f52a3a9814591f) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `object-inspect`, `tape` [`e7e0169`](https://github.com/ljharb/safe-regex-test/commit/e7e016949b78602f24debc1185c26f33cc4e9d1b) +- [actions] update rebase action [`2962694`](https://github.com/ljharb/safe-regex-test/commit/2962694bce7ffa278e873911072c11119bb3a608) +- [readme] add testing badges; remove david-dm badges [`e9dfd83`](https://github.com/ljharb/safe-regex-test/commit/e9dfd830655ac702ac7b7947f7076bb524994968) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`496fe99`](https://github.com/ljharb/safe-regex-test/commit/496fe99aa66f20cadb1cf79f6d479b87ae95b620) +- [Deps] update `call-bind`, `get-intrinsic` [`d94c5ba`](https://github.com/ljharb/safe-regex-test/commit/d94c5badd0362df8ff7ced38b50d20550fd629c1) +- [meta] add missing `engines.node` [`f3d4711`](https://github.com/ljharb/safe-regex-test/commit/f3d4711a51b21330e34f5f27e45452fbdb924715) +- [Deps] update `get-intrinsic` [`0eeedd7`](https://github.com/ljharb/safe-regex-test/commit/0eeedd74d0313fab9b0718895c02905f702ecb4d) +- [meta] add `sideEffects` flag [`fe1655f`](https://github.com/ljharb/safe-regex-test/commit/fe1655f16449208d987d9f4b7dafb15564ca80f7) + +## v1.0.0 - 2022-09-22 + +### Commits + +- Initial implementation, tests, readme [`0273e9f`](https://github.com/ljharb/safe-regex-test/commit/0273e9f96f4b09df413523f4faacc8ae9ac5e6cb) +- Initial commit [`b6c1edf`](https://github.com/ljharb/safe-regex-test/commit/b6c1edf740e6105fb71c34c1c69fadd837e8f7ab) +- npm init [`c7f5765`](https://github.com/ljharb/safe-regex-test/commit/c7f576580607b16458b5a16e6bfa3b639e49c6bd) +- Only apps should have lockfiles [`1162bf0`](https://github.com/ljharb/safe-regex-test/commit/1162bf011835040f7e2c9936734294b2d98536bf) diff --git a/tools/ui/node_modules/safe-regex-test/LICENSE b/tools/ui/node_modules/safe-regex-test/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6abfe1434ebd5c15c245b9f0a7c25e36b581df19 --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/safe-regex-test/README.md b/tools/ui/node_modules/safe-regex-test/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fca66d436bccf7502a16e6ad269ee334e46a7f52 --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/README.md @@ -0,0 +1,46 @@ +# safe-regex-test [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Give a regex, get a robust predicate function that tests it against a string. This will work even if `RegExp.prototype` is altered later. + +## Getting started + +```sh +npm install --save safe-regex-test +``` + +## Usage/Examples + +```js +var regexTester = require('safe-regex-test'); +var assert = require('assert'); + +var tester = regexTester('a'); +assert.ok(tester('a')); +assert.notOk(tester('b')); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/safe-regex-test +[npm-version-svg]: https://versionbadg.es/ljharb/safe-regex-test.svg +[deps-svg]: https://david-dm.org/ljharb/safe-regex-test.svg +[deps-url]: https://david-dm.org/ljharb/safe-regex-test +[dev-deps-svg]: https://david-dm.org/ljharb/safe-regex-test/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/safe-regex-test#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/safe-regex-test.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/safe-regex-test.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/safe-regex-test.svg +[downloads-url]: https://npm-stat.com/charts.html?package=safe-regex-test +[codecov-image]: https://codecov.io/gh/ljharb/safe-regex-test/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/safe-regex-test/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-regex-test +[actions-url]: https://github.com/ljharb/safe-regex-test/actions diff --git a/tools/ui/node_modules/safe-regex-test/index.d.ts b/tools/ui/node_modules/safe-regex-test/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1267e44f668195b89b68c6950e20773c57b2c46 --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/index.d.ts @@ -0,0 +1,3 @@ +declare function regexTester(regex: RegExp): (string: string) => boolean; + +export = regexTester; \ No newline at end of file diff --git a/tools/ui/node_modules/safe-regex-test/index.js b/tools/ui/node_modules/safe-regex-test/index.js new file mode 100644 index 0000000000000000000000000000000000000000..bf751bc3dda0a7a06054b7f8762e6dd7e9f3618c --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var callBound = require('call-bound'); +var isRegex = require('is-regex'); + +var $exec = callBound('RegExp.prototype.exec'); +var $TypeError = require('es-errors/type'); + +/** @type {import('.')} */ +module.exports = function regexTester(regex) { + if (!isRegex(regex)) { + throw new $TypeError('`regex` must be a RegExp'); + } + return function test(s) { + return $exec(regex, s) !== null; + }; +}; diff --git a/tools/ui/node_modules/safe-regex-test/package.json b/tools/ui/node_modules/safe-regex-test/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f8f982ebb53ff55174e99cba0ebb286711914acd --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/package.json @@ -0,0 +1,87 @@ +{ + "name": "safe-regex-test", + "version": "1.1.0", + "description": "Give a regex, get a robust predicate function that tests it against a string.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc && attw -P", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "nyc tape test", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/safe-regex-test.git" + }, + "keywords": [ + "regex", + "regexp", + "test", + "tester", + "safe", + "robust", + "exec" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/safe-regex-test/issues" + }, + "homepage": "https://github.com/ljharb/safe-regex-test#readme", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.1", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.2", + "@types/for-each": "^0.3.3", + "@types/object-inspect": "^1.13.0", + "@types/tape": "^5.6.5", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "es-value-fixtures": "^1.5.0", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/tools/ui/node_modules/safe-regex-test/test/index.js b/tools/ui/node_modules/safe-regex-test/test/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6420e0771a3070a82ad03d6a227e78ce2f0ebdc7 --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/test/index.js @@ -0,0 +1,41 @@ +'use strict'; + +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var regexTester = require('../'); + +test('regex tester', function (t) { + t.equal(typeof regexTester, 'function', 'is a function'); + + t.test('non-regexes', function (st) { + forEach([].concat( + // @ts-expect-error TS sucks with concat + v.primitives, + v.objects + ), function (val) { + st['throws']( + function () { regexTester(val); }, + TypeError, + inspect(val) + ' is not a regex' + ); + }); + + st.end(); + }); + + t.test('regexes', function (st) { + var tester = regexTester(/a/); + + st.equal(typeof tester, 'function', 'returns a function'); + st.equal(tester('a'), true, 'returns true for a match'); + st.equal(tester('b'), false, 'returns false for a non-match'); + st.equal(tester('a'), true, 'returns true for a match again'); + + st.end(); + }); + + t.end(); +}); diff --git a/tools/ui/node_modules/safe-regex-test/tsconfig.json b/tools/ui/node_modules/safe-regex-test/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..6c2a8a0b95f9fcd636ae49c6331cc3a3ad2b4cc7 --- /dev/null +++ b/tools/ui/node_modules/safe-regex-test/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + // "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} \ No newline at end of file diff --git a/tools/ui/node_modules/safer-buffer/LICENSE b/tools/ui/node_modules/safer-buffer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4fe9e6f10036e619c2407f08ead54802bbfbcbd1 --- /dev/null +++ b/tools/ui/node_modules/safer-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Nikita Skovoroda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/safer-buffer/Porting-Buffer.md b/tools/ui/node_modules/safer-buffer/Porting-Buffer.md new file mode 100644 index 0000000000000000000000000000000000000000..68d86bab032fabc624b2e312ec3a87666a12b07c --- /dev/null +++ b/tools/ui/node_modules/safer-buffer/Porting-Buffer.md @@ -0,0 +1,268 @@ +# Porting to the Buffer.from/Buffer.alloc API + + +## Overview + +- [Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x.](#variant-1) (*recommended*) +- [Variant 2: Use a polyfill](#variant-2) +- [Variant 3: manual detection, with safeguards](#variant-3) + +### Finding problematic bits of code using grep + +Just run `grep -nrE '[^a-zA-Z](Slow)?Buffer\s*\(' --exclude-dir node_modules`. + +It will find all the potentially unsafe places in your own code (with some considerably unlikely +exceptions). + +### Finding problematic bits of code using Node.js 8 + +If you’re using Node.js ≥ 8.0.0 (which is recommended), Node.js exposes multiple options that help with finding the relevant pieces of code: + +- `--trace-warnings` will make Node.js show a stack trace for this warning and other warnings that are printed by Node.js. +- `--trace-deprecation` does the same thing, but only for deprecation warnings. +- `--pending-deprecation` will show more types of deprecation warnings. In particular, it will show the `Buffer()` deprecation warning, even on Node.js 8. + +You can set these flags using an environment variable: + +```console +$ export NODE_OPTIONS='--trace-warnings --pending-deprecation' +$ cat example.js +'use strict'; +const foo = new Buffer('foo'); +$ node example.js +(node:7147) [DEP0005] DeprecationWarning: The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead. + at showFlaggedDeprecation (buffer.js:127:13) + at new Buffer (buffer.js:148:3) + at Object. (/path/to/example.js:2:13) + [... more stack trace lines ...] +``` + +### Finding problematic bits of code using linters + +Eslint rules [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) +or +[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) +also find calls to deprecated `Buffer()` API. Those rules are included in some pre-sets. + +There is a drawback, though, that it doesn't always +[work correctly](https://github.com/chalker/safer-buffer#why-not-safe-buffer) when `Buffer` is +overriden e.g. with a polyfill, so recommended is a combination of this and some other method +described above. + + +## Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x. + +This is the recommended solution nowadays that would imply only minimal overhead. + +The Node.js 5.x release line has been unsupported since July 2016, and the Node.js 4.x release line reaches its End of Life in April 2018 (→ [Schedule](https://github.com/nodejs/Release#release-schedule)). This means that these versions of Node.js will *not* receive any updates, even in case of security issues, so using these release lines should be avoided, if at all possible. + +What you would do in this case is to convert all `new Buffer()` or `Buffer()` calls to use `Buffer.alloc()` or `Buffer.from()`, in the following way: + +- For `new Buffer(number)`, replace it with `Buffer.alloc(number)`. +- For `new Buffer(string)` (or `new Buffer(string, encoding)`), replace it with `Buffer.from(string)` (or `Buffer.from(string, encoding)`). +- For all other combinations of arguments (these are much rarer), also replace `new Buffer(...arguments)` with `Buffer.from(...arguments)`. + +Note that `Buffer.alloc()` is also _faster_ on the current Node.js versions than +`new Buffer(size).fill(0)`, which is what you would otherwise need to ensure zero-filling. + +Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) +or +[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) +is recommended to avoid accidential unsafe Buffer API usage. + +There is also a [JSCodeshift codemod](https://github.com/joyeecheung/node-dep-codemod#dep005) +for automatically migrating Buffer constructors to `Buffer.alloc()` or `Buffer.from()`. +Note that it currently only works with cases where the arguments are literals or where the +constructor is invoked with two arguments. + +_If you currently support those older Node.js versions and dropping them would be a semver-major change +for you, or if you support older branches of your packages, consider using [Variant 2](#variant-2) +or [Variant 3](#variant-3) on older branches, so people using those older branches will also receive +the fix. That way, you will eradicate potential issues caused by unguarded Buffer API usage and +your users will not observe a runtime deprecation warning when running your code on Node.js 10._ + + +## Variant 2: Use a polyfill + +Utilize [safer-buffer](https://www.npmjs.com/package/safer-buffer) as a polyfill to support older +Node.js versions. + +You would take exacly the same steps as in [Variant 1](#variant-1), but with a polyfill +`const Buffer = require('safer-buffer').Buffer` in all files where you use the new `Buffer` api. + +Make sure that you do not use old `new Buffer` API — in any files where the line above is added, +using old `new Buffer()` API will _throw_. It will be easy to notice that in CI, though. + +Alternatively, you could use [buffer-from](https://www.npmjs.com/package/buffer-from) and/or +[buffer-alloc](https://www.npmjs.com/package/buffer-alloc) [ponyfills](https://ponyfill.com/) — +those are great, the only downsides being 4 deps in the tree and slightly more code changes to +migrate off them (as you would be using e.g. `Buffer.from` under a different name). If you need only +`Buffer.from` polyfilled — `buffer-from` alone which comes with no extra dependencies. + +_Alternatively, you could use [safe-buffer](https://www.npmjs.com/package/safe-buffer) — it also +provides a polyfill, but takes a different approach which has +[it's drawbacks](https://github.com/chalker/safer-buffer#why-not-safe-buffer). It will allow you +to also use the older `new Buffer()` API in your code, though — but that's arguably a benefit, as +it is problematic, can cause issues in your code, and will start emitting runtime deprecation +warnings starting with Node.js 10._ + +Note that in either case, it is important that you also remove all calls to the old Buffer +API manually — just throwing in `safe-buffer` doesn't fix the problem by itself, it just provides +a polyfill for the new API. I have seen people doing that mistake. + +Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) +or +[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) +is recommended. + +_Don't forget to drop the polyfill usage once you drop support for Node.js < 4.5.0._ + + +## Variant 3 — manual detection, with safeguards + +This is useful if you create Buffer instances in only a few places (e.g. one), or you have your own +wrapper around them. + +### Buffer(0) + +This special case for creating empty buffers can be safely replaced with `Buffer.concat([])`, which +returns the same result all the way down to Node.js 0.8.x. + +### Buffer(notNumber) + +Before: + +```js +var buf = new Buffer(notNumber, encoding); +``` + +After: + +```js +var buf; +if (Buffer.from && Buffer.from !== Uint8Array.from) { + buf = Buffer.from(notNumber, encoding); +} else { + if (typeof notNumber === 'number') + throw new Error('The "size" argument must be of type number.'); + buf = new Buffer(notNumber, encoding); +} +``` + +`encoding` is optional. + +Note that the `typeof notNumber` before `new Buffer` is required (for cases when `notNumber` argument is not +hard-coded) and _is not caused by the deprecation of Buffer constructor_ — it's exactly _why_ the +Buffer constructor is deprecated. Ecosystem packages lacking this type-check caused numereous +security issues — situations when unsanitized user input could end up in the `Buffer(arg)` create +problems ranging from DoS to leaking sensitive information to the attacker from the process memory. + +When `notNumber` argument is hardcoded (e.g. literal `"abc"` or `[0,1,2]`), the `typeof` check can +be omitted. + +Also note that using TypeScript does not fix this problem for you — when libs written in +`TypeScript` are used from JS, or when user input ends up there — it behaves exactly as pure JS, as +all type checks are translation-time only and are not present in the actual JS code which TS +compiles to. + +### Buffer(number) + +For Node.js 0.10.x (and below) support: + +```js +var buf; +if (Buffer.alloc) { + buf = Buffer.alloc(number); +} else { + buf = new Buffer(number); + buf.fill(0); +} +``` + +Otherwise (Node.js ≥ 0.12.x): + +```js +const buf = Buffer.alloc ? Buffer.alloc(number) : new Buffer(number).fill(0); +``` + +## Regarding Buffer.allocUnsafe + +Be extra cautious when using `Buffer.allocUnsafe`: + * Don't use it if you don't have a good reason to + * e.g. you probably won't ever see a performance difference for small buffers, in fact, those + might be even faster with `Buffer.alloc()`, + * if your code is not in the hot code path — you also probably won't notice a difference, + * keep in mind that zero-filling minimizes the potential risks. + * If you use it, make sure that you never return the buffer in a partially-filled state, + * if you are writing to it sequentially — always truncate it to the actuall written length + +Errors in handling buffers allocated with `Buffer.allocUnsafe` could result in various issues, +ranged from undefined behaviour of your code to sensitive data (user input, passwords, certs) +leaking to the remote attacker. + +_Note that the same applies to `new Buffer` usage without zero-filling, depending on the Node.js +version (and lacking type checks also adds DoS to the list of potential problems)._ + + +## FAQ + + +### What is wrong with the `Buffer` constructor? + +The `Buffer` constructor could be used to create a buffer in many different ways: + +- `new Buffer(42)` creates a `Buffer` of 42 bytes. Before Node.js 8, this buffer contained + *arbitrary memory* for performance reasons, which could include anything ranging from + program source code to passwords and encryption keys. +- `new Buffer('abc')` creates a `Buffer` that contains the UTF-8-encoded version of + the string `'abc'`. A second argument could specify another encoding: For example, + `new Buffer(string, 'base64')` could be used to convert a Base64 string into the original + sequence of bytes that it represents. +- There are several other combinations of arguments. + +This meant that, in code like `var buffer = new Buffer(foo);`, *it is not possible to tell +what exactly the contents of the generated buffer are* without knowing the type of `foo`. + +Sometimes, the value of `foo` comes from an external source. For example, this function +could be exposed as a service on a web server, converting a UTF-8 string into its Base64 form: + +``` +function stringToBase64(req, res) { + // The request body should have the format of `{ string: 'foobar' }` + const rawBytes = new Buffer(req.body.string) + const encoded = rawBytes.toString('base64') + res.end({ encoded: encoded }) +} +``` + +Note that this code does *not* validate the type of `req.body.string`: + +- `req.body.string` is expected to be a string. If this is the case, all goes well. +- `req.body.string` is controlled by the client that sends the request. +- If `req.body.string` is the *number* `50`, the `rawBytes` would be 50 bytes: + - Before Node.js 8, the content would be uninitialized + - After Node.js 8, the content would be `50` bytes with the value `0` + +Because of the missing type check, an attacker could intentionally send a number +as part of the request. Using this, they can either: + +- Read uninitialized memory. This **will** leak passwords, encryption keys and other + kinds of sensitive information. (Information leak) +- Force the program to allocate a large amount of memory. For example, when specifying + `500000000` as the input value, each request will allocate 500MB of memory. + This can be used to either exhaust the memory available of a program completely + and make it crash, or slow it down significantly. (Denial of Service) + +Both of these scenarios are considered serious security issues in a real-world +web server context. + +when using `Buffer.from(req.body.string)` instead, passing a number will always +throw an exception instead, giving a controlled behaviour that can always be +handled by the program. + + +### The `Buffer()` constructor has been deprecated for a while. Is this really an issue? + +Surveys of code in the `npm` ecosystem have shown that the `Buffer()` constructor is still +widely used. This includes new code, and overall usage of such code has actually been +*increasing*. diff --git a/tools/ui/node_modules/safer-buffer/Readme.md b/tools/ui/node_modules/safer-buffer/Readme.md new file mode 100644 index 0000000000000000000000000000000000000000..14b0822909320ff4ffafb1526212866f159470c5 --- /dev/null +++ b/tools/ui/node_modules/safer-buffer/Readme.md @@ -0,0 +1,156 @@ +# safer-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![javascript style guide][standard-image]][standard-url] [![Security Responsible Disclosure][secuirty-image]][secuirty-url] + +[travis-image]: https://travis-ci.org/ChALkeR/safer-buffer.svg?branch=master +[travis-url]: https://travis-ci.org/ChALkeR/safer-buffer +[npm-image]: https://img.shields.io/npm/v/safer-buffer.svg +[npm-url]: https://npmjs.org/package/safer-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com +[secuirty-image]: https://img.shields.io/badge/Security-Responsible%20Disclosure-green.svg +[secuirty-url]: https://github.com/nodejs/security-wg/blob/master/processes/responsible_disclosure_template.md + +Modern Buffer API polyfill without footguns, working on Node.js from 0.8 to current. + +## How to use? + +First, port all `Buffer()` and `new Buffer()` calls to `Buffer.alloc()` and `Buffer.from()` API. + +Then, to achieve compatibility with outdated Node.js versions (`<4.5.0` and 5.x `<5.9.0`), use +`const Buffer = require('safer-buffer').Buffer` in all files where you make calls to the new +Buffer API. _Use `var` instead of `const` if you need that for your Node.js version range support._ + +Also, see the +[porting Buffer](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md) guide. + +## Do I need it? + +Hopefully, not — dropping support for outdated Node.js versions should be fine nowdays, and that +is the recommended path forward. You _do_ need to port to the `Buffer.alloc()` and `Buffer.from()` +though. + +See the [porting guide](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md) +for a better description. + +## Why not [safe-buffer](https://npmjs.com/safe-buffer)? + +_In short: while `safe-buffer` serves as a polyfill for the new API, it allows old API usage and +itself contains footguns._ + +`safe-buffer` could be used safely to get the new API while still keeping support for older +Node.js versions (like this module), but while analyzing ecosystem usage of the old Buffer API +I found out that `safe-buffer` is itself causing problems in some cases. + +For example, consider the following snippet: + +```console +$ cat example.unsafe.js +console.log(Buffer(20)) +$ ./node-v6.13.0-linux-x64/bin/node example.unsafe.js + +$ standard example.unsafe.js +standard: Use JavaScript Standard Style (https://standardjs.com) + /home/chalker/repo/safer-buffer/example.unsafe.js:2:13: 'Buffer()' was deprecated since v6. Use 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0') instead. +``` + +This is allocates and writes to console an uninitialized chunk of memory. +[standard](https://www.npmjs.com/package/standard) linter (among others) catch that and warn people +to avoid using unsafe API. + +Let's now throw in `safe-buffer`! + +```console +$ cat example.safe-buffer.js +const Buffer = require('safe-buffer').Buffer +console.log(Buffer(20)) +$ standard example.safe-buffer.js +$ ./node-v6.13.0-linux-x64/bin/node example.safe-buffer.js + +``` + +See the problem? Adding in `safe-buffer` _magically removes the lint warning_, but the behavior +remains identiсal to what we had before, and when launched on Node.js 6.x LTS — this dumps out +chunks of uninitialized memory. +_And this code will still emit runtime warnings on Node.js 10.x and above._ + +That was done by design. I first considered changing `safe-buffer`, prohibiting old API usage or +emitting warnings on it, but that significantly diverges from `safe-buffer` design. After some +discussion, it was decided to move my approach into a separate package, and _this is that separate +package_. + +This footgun is not imaginary — I observed top-downloaded packages doing that kind of thing, +«fixing» the lint warning by blindly including `safe-buffer` without any actual changes. + +Also in some cases, even if the API _was_ migrated to use of safe Buffer API — a random pull request +can bring unsafe Buffer API usage back to the codebase by adding new calls — and that could go +unnoticed even if you have a linter prohibiting that (becase of the reason stated above), and even +pass CI. _I also observed that being done in popular packages._ + +Some examples: + * [webdriverio](https://github.com/webdriverio/webdriverio/commit/05cbd3167c12e4930f09ef7cf93b127ba4effae4#diff-124380949022817b90b622871837d56cR31) + (a module with 548 759 downloads/month), + * [websocket-stream](https://github.com/maxogden/websocket-stream/commit/c9312bd24d08271687d76da0fe3c83493871cf61) + (218 288 d/m, fix in [maxogden/websocket-stream#142](https://github.com/maxogden/websocket-stream/pull/142)), + * [node-serialport](https://github.com/node-serialport/node-serialport/commit/e8d9d2b16c664224920ce1c895199b1ce2def48c) + (113 138 d/m, fix in [node-serialport/node-serialport#1510](https://github.com/node-serialport/node-serialport/pull/1510)), + * [karma](https://github.com/karma-runner/karma/commit/3d94b8cf18c695104ca195334dc75ff054c74eec) + (3 973 193 d/m, fix in [karma-runner/karma#2947](https://github.com/karma-runner/karma/pull/2947)), + * [spdy-transport](https://github.com/spdy-http2/spdy-transport/commit/5375ac33f4a62a4f65bcfc2827447d42a5dbe8b1) + (5 970 727 d/m, fix in [spdy-http2/spdy-transport#53](https://github.com/spdy-http2/spdy-transport/pull/53)). + * And there are a lot more over the ecosystem. + +I filed a PR at +[mysticatea/eslint-plugin-node#110](https://github.com/mysticatea/eslint-plugin-node/pull/110) to +partially fix that (for cases when that lint rule is used), but it is a semver-major change for +linter rules and presets, so it would take significant time for that to reach actual setups. +_It also hasn't been released yet (2018-03-20)._ + +Also, `safer-buffer` discourages the usage of `.allocUnsafe()`, which is often done by a mistake. +It still supports it with an explicit concern barier, by placing it under +`require('safer-buffer/dangereous')`. + +## But isn't throwing bad? + +Not really. It's an error that could be noticed and fixed early, instead of causing havoc later like +unguarded `new Buffer()` calls that end up receiving user input can do. + +This package affects only the files where `var Buffer = require('safer-buffer').Buffer` was done, so +it is really simple to keep track of things and make sure that you don't mix old API usage with that. +Also, CI should hint anything that you might have missed. + +New commits, if tested, won't land new usage of unsafe Buffer API this way. +_Node.js 10.x also deals with that by printing a runtime depecation warning._ + +### Would it affect third-party modules? + +No, unless you explicitly do an awful thing like monkey-patching or overriding the built-in `Buffer`. +Don't do that. + +### But I don't want throwing… + +That is also fine! + +Also, it could be better in some cases when you don't comprehensive enough test coverage. + +In that case — just don't override `Buffer` and use +`var SaferBuffer = require('safer-buffer').Buffer` instead. + +That way, everything using `Buffer` natively would still work, but there would be two drawbacks: + +* `Buffer.from`/`Buffer.alloc` won't be polyfilled — use `SaferBuffer.from` and + `SaferBuffer.alloc` instead. +* You are still open to accidentally using the insecure deprecated API — use a linter to catch that. + +Note that using a linter to catch accidential `Buffer` constructor usage in this case is strongly +recommended. `Buffer` is not overriden in this usecase, so linters won't get confused. + +## «Without footguns»? + +Well, it is still possible to do _some_ things with `Buffer` API, e.g. accessing `.buffer` property +on older versions and duping things from there. You shouldn't do that in your code, probabably. + +The intention is to remove the most significant footguns that affect lots of packages in the +ecosystem, and to do it in the proper way. + +Also, this package doesn't protect against security issues affecting some Node.js versions, so for +usage in your own production code, it is still recommended to update to a Node.js version +[supported by upstream](https://github.com/nodejs/release#release-schedule). diff --git a/tools/ui/node_modules/safer-buffer/dangerous.js b/tools/ui/node_modules/safer-buffer/dangerous.js new file mode 100644 index 0000000000000000000000000000000000000000..ca41fdc549b6553e811d35e44730a51bec68be99 --- /dev/null +++ b/tools/ui/node_modules/safer-buffer/dangerous.js @@ -0,0 +1,58 @@ +/* eslint-disable node/no-deprecated-api */ + +'use strict' + +var buffer = require('buffer') +var Buffer = buffer.Buffer +var safer = require('./safer.js') +var Safer = safer.Buffer + +var dangerous = {} + +var key + +for (key in safer) { + if (!safer.hasOwnProperty(key)) continue + dangerous[key] = safer[key] +} + +var Dangereous = dangerous.Buffer = {} + +// Copy Safer API +for (key in Safer) { + if (!Safer.hasOwnProperty(key)) continue + Dangereous[key] = Safer[key] +} + +// Copy those missing unsafe methods, if they are present +for (key in Buffer) { + if (!Buffer.hasOwnProperty(key)) continue + if (Dangereous.hasOwnProperty(key)) continue + Dangereous[key] = Buffer[key] +} + +if (!Dangereous.allocUnsafe) { + Dangereous.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } + return Buffer(size) + } +} + +if (!Dangereous.allocUnsafeSlow) { + Dangereous.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } + return buffer.SlowBuffer(size) + } +} + +module.exports = dangerous diff --git a/tools/ui/node_modules/safer-buffer/package.json b/tools/ui/node_modules/safer-buffer/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d452b04aef3bb41ead6816e2b5de24f27279680c --- /dev/null +++ b/tools/ui/node_modules/safer-buffer/package.json @@ -0,0 +1,34 @@ +{ + "name": "safer-buffer", + "version": "2.1.2", + "description": "Modern Buffer API polyfill without footguns", + "main": "safer.js", + "scripts": { + "browserify-test": "browserify --external tape tests.js > browserify-tests.js && tape browserify-tests.js", + "test": "standard && tape tests.js" + }, + "author": { + "name": "Nikita Skovoroda", + "email": "chalkerx@gmail.com", + "url": "https://github.com/ChALkeR" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/ChALkeR/safer-buffer.git" + }, + "bugs": { + "url": "https://github.com/ChALkeR/safer-buffer/issues" + }, + "devDependencies": { + "standard": "^11.0.1", + "tape": "^4.9.0" + }, + "files": [ + "Porting-Buffer.md", + "Readme.md", + "tests.js", + "dangerous.js", + "safer.js" + ] +} diff --git a/tools/ui/node_modules/safer-buffer/safer.js b/tools/ui/node_modules/safer-buffer/safer.js new file mode 100644 index 0000000000000000000000000000000000000000..37c7e1aa6cbd4effd94ee28bd7b0655756b80cea --- /dev/null +++ b/tools/ui/node_modules/safer-buffer/safer.js @@ -0,0 +1,77 @@ +/* eslint-disable node/no-deprecated-api */ + +'use strict' + +var buffer = require('buffer') +var Buffer = buffer.Buffer + +var safer = {} + +var key + +for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue + if (key === 'SlowBuffer' || key === 'Buffer') continue + safer[key] = buffer[key] +} + +var Safer = safer.Buffer = {} +for (key in Buffer) { + if (!Buffer.hasOwnProperty(key)) continue + if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue + Safer[key] = Buffer[key] +} + +safer.Buffer.prototype = Buffer.prototype + +if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) + } + if (value && typeof value.length === 'undefined') { + throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) + } + return Buffer(value, encodingOrOffset, length) + } +} + +if (!Safer.alloc) { + Safer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } + var buf = Buffer(size) + if (!fill || fill.length === 0) { + buf.fill(0) + } else if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + return buf + } +} + +if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding('buffer').kStringMaxLength + } catch (e) { + // we can't determine kStringMaxLength in environments where process.binding + // is unsupported, so let's not set it + } +} + +if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + } + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength + } +} + +module.exports = safer diff --git a/tools/ui/node_modules/safer-buffer/tests.js b/tools/ui/node_modules/safer-buffer/tests.js new file mode 100644 index 0000000000000000000000000000000000000000..7ed2777c92a7991807c516027d5f73d0b47e781b --- /dev/null +++ b/tools/ui/node_modules/safer-buffer/tests.js @@ -0,0 +1,406 @@ +/* eslint-disable node/no-deprecated-api */ + +'use strict' + +var test = require('tape') + +var buffer = require('buffer') + +var index = require('./') +var safer = require('./safer') +var dangerous = require('./dangerous') + +/* Inheritance tests */ + +test('Default is Safer', function (t) { + t.equal(index, safer) + t.notEqual(safer, dangerous) + t.notEqual(index, dangerous) + t.end() +}) + +test('Is not a function', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.equal(typeof impl, 'object') + t.equal(typeof impl.Buffer, 'object') + }); + [buffer].forEach(function (impl) { + t.equal(typeof impl, 'object') + t.equal(typeof impl.Buffer, 'function') + }) + t.end() +}) + +test('Constructor throws', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.throws(function () { impl.Buffer() }) + t.throws(function () { impl.Buffer(0) }) + t.throws(function () { impl.Buffer('a') }) + t.throws(function () { impl.Buffer('a', 'utf-8') }) + t.throws(function () { return new impl.Buffer() }) + t.throws(function () { return new impl.Buffer(0) }) + t.throws(function () { return new impl.Buffer('a') }) + t.throws(function () { return new impl.Buffer('a', 'utf-8') }) + }) + t.end() +}) + +test('Safe methods exist', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.equal(typeof impl.Buffer.alloc, 'function', 'alloc') + t.equal(typeof impl.Buffer.from, 'function', 'from') + }) + t.end() +}) + +test('Unsafe methods exist only in Dangerous', function (t) { + [index, safer].forEach(function (impl) { + t.equal(typeof impl.Buffer.allocUnsafe, 'undefined') + t.equal(typeof impl.Buffer.allocUnsafeSlow, 'undefined') + }); + [dangerous].forEach(function (impl) { + t.equal(typeof impl.Buffer.allocUnsafe, 'function') + t.equal(typeof impl.Buffer.allocUnsafeSlow, 'function') + }) + t.end() +}) + +test('Generic methods/properties are defined and equal', function (t) { + ['poolSize', 'isBuffer', 'concat', 'byteLength'].forEach(function (method) { + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl.Buffer[method], buffer.Buffer[method], method) + t.notEqual(typeof impl.Buffer[method], 'undefined', method) + }) + }) + t.end() +}) + +test('Built-in buffer static methods/properties are inherited', function (t) { + Object.keys(buffer).forEach(function (method) { + if (method === 'SlowBuffer' || method === 'Buffer') return; + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl[method], buffer[method], method) + t.notEqual(typeof impl[method], 'undefined', method) + }) + }) + t.end() +}) + +test('Built-in Buffer static methods/properties are inherited', function (t) { + Object.keys(buffer.Buffer).forEach(function (method) { + if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return; + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl.Buffer[method], buffer.Buffer[method], method) + t.notEqual(typeof impl.Buffer[method], 'undefined', method) + }) + }) + t.end() +}) + +test('.prototype property of Buffer is inherited', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl.Buffer.prototype, buffer.Buffer.prototype, 'prototype') + t.notEqual(typeof impl.Buffer.prototype, 'undefined', 'prototype') + }) + t.end() +}) + +test('All Safer methods are present in Dangerous', function (t) { + Object.keys(safer).forEach(function (method) { + if (method === 'Buffer') return; + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl[method], safer[method], method) + if (method !== 'kStringMaxLength') { + t.notEqual(typeof impl[method], 'undefined', method) + } + }) + }) + Object.keys(safer.Buffer).forEach(function (method) { + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl.Buffer[method], safer.Buffer[method], method) + t.notEqual(typeof impl.Buffer[method], 'undefined', method) + }) + }) + t.end() +}) + +test('Safe methods from Dangerous methods are present in Safer', function (t) { + Object.keys(dangerous).forEach(function (method) { + if (method === 'Buffer') return; + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl[method], dangerous[method], method) + if (method !== 'kStringMaxLength') { + t.notEqual(typeof impl[method], 'undefined', method) + } + }) + }) + Object.keys(dangerous.Buffer).forEach(function (method) { + if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return; + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl.Buffer[method], dangerous.Buffer[method], method) + t.notEqual(typeof impl.Buffer[method], 'undefined', method) + }) + }) + t.end() +}) + +/* Behaviour tests */ + +test('Methods return Buffers', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 10))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 'a'))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10, 'x'))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(9, 'ab'))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(''))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string'))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string', 'utf-8'))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([0, 42, 3]))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(new Uint8Array([0, 42, 3])))) + t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([]))) + }); + ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { + t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](0))) + t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](10))) + }) + t.end() +}) + +test('Constructor is buffer.Buffer', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl.Buffer.alloc(0).constructor, buffer.Buffer) + t.equal(impl.Buffer.alloc(0, 10).constructor, buffer.Buffer) + t.equal(impl.Buffer.alloc(0, 'a').constructor, buffer.Buffer) + t.equal(impl.Buffer.alloc(10).constructor, buffer.Buffer) + t.equal(impl.Buffer.alloc(10, 'x').constructor, buffer.Buffer) + t.equal(impl.Buffer.alloc(9, 'ab').constructor, buffer.Buffer) + t.equal(impl.Buffer.from('').constructor, buffer.Buffer) + t.equal(impl.Buffer.from('string').constructor, buffer.Buffer) + t.equal(impl.Buffer.from('string', 'utf-8').constructor, buffer.Buffer) + t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').constructor, buffer.Buffer) + t.equal(impl.Buffer.from([0, 42, 3]).constructor, buffer.Buffer) + t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).constructor, buffer.Buffer) + t.equal(impl.Buffer.from([]).constructor, buffer.Buffer) + }); + [0, 10, 100].forEach(function (arg) { + t.equal(dangerous.Buffer.allocUnsafe(arg).constructor, buffer.Buffer) + t.equal(dangerous.Buffer.allocUnsafeSlow(arg).constructor, buffer.SlowBuffer(0).constructor) + }) + t.end() +}) + +test('Invalid calls throw', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.throws(function () { impl.Buffer.from(0) }) + t.throws(function () { impl.Buffer.from(10) }) + t.throws(function () { impl.Buffer.from(10, 'utf-8') }) + t.throws(function () { impl.Buffer.from('string', 'invalid encoding') }) + t.throws(function () { impl.Buffer.from(-10) }) + t.throws(function () { impl.Buffer.from(1e90) }) + t.throws(function () { impl.Buffer.from(Infinity) }) + t.throws(function () { impl.Buffer.from(-Infinity) }) + t.throws(function () { impl.Buffer.from(NaN) }) + t.throws(function () { impl.Buffer.from(null) }) + t.throws(function () { impl.Buffer.from(undefined) }) + t.throws(function () { impl.Buffer.from() }) + t.throws(function () { impl.Buffer.from({}) }) + t.throws(function () { impl.Buffer.alloc('') }) + t.throws(function () { impl.Buffer.alloc('string') }) + t.throws(function () { impl.Buffer.alloc('string', 'utf-8') }) + t.throws(function () { impl.Buffer.alloc('b25ldHdvdGhyZWU=', 'base64') }) + t.throws(function () { impl.Buffer.alloc(-10) }) + t.throws(function () { impl.Buffer.alloc(1e90) }) + t.throws(function () { impl.Buffer.alloc(2 * (1 << 30)) }) + t.throws(function () { impl.Buffer.alloc(Infinity) }) + t.throws(function () { impl.Buffer.alloc(-Infinity) }) + t.throws(function () { impl.Buffer.alloc(null) }) + t.throws(function () { impl.Buffer.alloc(undefined) }) + t.throws(function () { impl.Buffer.alloc() }) + t.throws(function () { impl.Buffer.alloc([]) }) + t.throws(function () { impl.Buffer.alloc([0, 42, 3]) }) + t.throws(function () { impl.Buffer.alloc({}) }) + }); + ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { + t.throws(function () { dangerous.Buffer[method]('') }) + t.throws(function () { dangerous.Buffer[method]('string') }) + t.throws(function () { dangerous.Buffer[method]('string', 'utf-8') }) + t.throws(function () { dangerous.Buffer[method](2 * (1 << 30)) }) + t.throws(function () { dangerous.Buffer[method](Infinity) }) + if (dangerous.Buffer[method] === buffer.Buffer.allocUnsafe) { + t.skip('Skipping, older impl of allocUnsafe coerced negative sizes to 0') + } else { + t.throws(function () { dangerous.Buffer[method](-10) }) + t.throws(function () { dangerous.Buffer[method](-1e90) }) + t.throws(function () { dangerous.Buffer[method](-Infinity) }) + } + t.throws(function () { dangerous.Buffer[method](null) }) + t.throws(function () { dangerous.Buffer[method](undefined) }) + t.throws(function () { dangerous.Buffer[method]() }) + t.throws(function () { dangerous.Buffer[method]([]) }) + t.throws(function () { dangerous.Buffer[method]([0, 42, 3]) }) + t.throws(function () { dangerous.Buffer[method]({}) }) + }) + t.end() +}) + +test('Buffers have appropriate lengths', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.equal(impl.Buffer.alloc(0).length, 0) + t.equal(impl.Buffer.alloc(10).length, 10) + t.equal(impl.Buffer.from('').length, 0) + t.equal(impl.Buffer.from('string').length, 6) + t.equal(impl.Buffer.from('string', 'utf-8').length, 6) + t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').length, 11) + t.equal(impl.Buffer.from([0, 42, 3]).length, 3) + t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).length, 3) + t.equal(impl.Buffer.from([]).length, 0) + }); + ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { + t.equal(dangerous.Buffer[method](0).length, 0) + t.equal(dangerous.Buffer[method](10).length, 10) + }) + t.end() +}) + +test('Buffers have appropriate lengths (2)', function (t) { + t.equal(index.Buffer.alloc, safer.Buffer.alloc) + t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) + var ok = true; + [ safer.Buffer.alloc, + dangerous.Buffer.allocUnsafe, + dangerous.Buffer.allocUnsafeSlow + ].forEach(function (method) { + for (var i = 0; i < 1e2; i++) { + var length = Math.round(Math.random() * 1e5) + var buf = method(length) + if (!buffer.Buffer.isBuffer(buf)) ok = false + if (buf.length !== length) ok = false + } + }) + t.ok(ok) + t.end() +}) + +test('.alloc(size) is zero-filled and has correct length', function (t) { + t.equal(index.Buffer.alloc, safer.Buffer.alloc) + t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) + var ok = true + for (var i = 0; i < 1e2; i++) { + var length = Math.round(Math.random() * 2e6) + var buf = index.Buffer.alloc(length) + if (!buffer.Buffer.isBuffer(buf)) ok = false + if (buf.length !== length) ok = false + var j + for (j = 0; j < length; j++) { + if (buf[j] !== 0) ok = false + } + buf.fill(1) + for (j = 0; j < length; j++) { + if (buf[j] !== 1) ok = false + } + } + t.ok(ok) + t.end() +}) + +test('.allocUnsafe / .allocUnsafeSlow are fillable and have correct lengths', function (t) { + ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { + var ok = true + for (var i = 0; i < 1e2; i++) { + var length = Math.round(Math.random() * 2e6) + var buf = dangerous.Buffer[method](length) + if (!buffer.Buffer.isBuffer(buf)) ok = false + if (buf.length !== length) ok = false + buf.fill(0, 0, length) + var j + for (j = 0; j < length; j++) { + if (buf[j] !== 0) ok = false + } + buf.fill(1, 0, length) + for (j = 0; j < length; j++) { + if (buf[j] !== 1) ok = false + } + } + t.ok(ok, method) + }) + t.end() +}) + +test('.alloc(size, fill) is `fill`-filled', function (t) { + t.equal(index.Buffer.alloc, safer.Buffer.alloc) + t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) + var ok = true + for (var i = 0; i < 1e2; i++) { + var length = Math.round(Math.random() * 2e6) + var fill = Math.round(Math.random() * 255) + var buf = index.Buffer.alloc(length, fill) + if (!buffer.Buffer.isBuffer(buf)) ok = false + if (buf.length !== length) ok = false + for (var j = 0; j < length; j++) { + if (buf[j] !== fill) ok = false + } + } + t.ok(ok) + t.end() +}) + +test('.alloc(size, fill) is `fill`-filled', function (t) { + t.equal(index.Buffer.alloc, safer.Buffer.alloc) + t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) + var ok = true + for (var i = 0; i < 1e2; i++) { + var length = Math.round(Math.random() * 2e6) + var fill = Math.round(Math.random() * 255) + var buf = index.Buffer.alloc(length, fill) + if (!buffer.Buffer.isBuffer(buf)) ok = false + if (buf.length !== length) ok = false + for (var j = 0; j < length; j++) { + if (buf[j] !== fill) ok = false + } + } + t.ok(ok) + t.deepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 97)) + t.notDeepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 98)) + + var tmp = new buffer.Buffer(2) + tmp.fill('ok') + if (tmp[1] === tmp[0]) { + // Outdated Node.js + t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('ooooo')) + } else { + t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('okoko')) + } + t.notDeepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('kokok')) + + t.end() +}) + +test('safer.Buffer.from returns results same as Buffer constructor', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.deepEqual(impl.Buffer.from(''), new buffer.Buffer('')) + t.deepEqual(impl.Buffer.from('string'), new buffer.Buffer('string')) + t.deepEqual(impl.Buffer.from('string', 'utf-8'), new buffer.Buffer('string', 'utf-8')) + t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), new buffer.Buffer('b25ldHdvdGhyZWU=', 'base64')) + t.deepEqual(impl.Buffer.from([0, 42, 3]), new buffer.Buffer([0, 42, 3])) + t.deepEqual(impl.Buffer.from(new Uint8Array([0, 42, 3])), new buffer.Buffer(new Uint8Array([0, 42, 3]))) + t.deepEqual(impl.Buffer.from([]), new buffer.Buffer([])) + }) + t.end() +}) + +test('safer.Buffer.from returns consistent results', function (t) { + [index, safer, dangerous].forEach(function (impl) { + t.deepEqual(impl.Buffer.from(''), impl.Buffer.alloc(0)) + t.deepEqual(impl.Buffer.from([]), impl.Buffer.alloc(0)) + t.deepEqual(impl.Buffer.from(new Uint8Array([])), impl.Buffer.alloc(0)) + t.deepEqual(impl.Buffer.from('string', 'utf-8'), impl.Buffer.from('string')) + t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from([115, 116, 114, 105, 110, 103])) + t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from(impl.Buffer.from('string'))) + t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), impl.Buffer.from('onetwothree')) + t.notDeepEqual(impl.Buffer.from('b25ldHdvdGhyZWU='), impl.Buffer.from('onetwothree')) + }) + t.end() +}) diff --git a/tools/ui/node_modules/sass/LICENSE b/tools/ui/node_modules/sass/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5ebf51b74dffdf55fe45b6dd2670506dc9c8032c --- /dev/null +++ b/tools/ui/node_modules/sass/LICENSE @@ -0,0 +1,1720 @@ +Dart Sass license: + +Copyright (c) 2016, Google Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-------------------------------------------------------------------------------- + +Dart SDK license: + +Copyright 2012, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +_fe_analyzer_shared license: + +Copyright 2019, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +analyzer, protobuf and protoc_plugin license: + +Copyright 2013, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +archive license: + +The MIT License + +Copyright (c) 2013-2021 Brendan Duncan. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------------------- + +args, csslib and logging license: + +Copyright 2013, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +async, cli_util, collection, mime, stream_channel and typed_data license: + +Copyright 2015, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +boolean_selector, meta and shelf_packages_handler license: + +Copyright 2016, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +charcode license: + +Copyright 2014, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +checked_yaml license: + +Copyright 2019, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +cli_config license: + +Copyright 2023, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------------------- + +cli_pkg license: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +-------------------------------------------------------------------------------- + +cli_repl license: + +Copyright (c) 2018, Jennifer Thakar. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the project nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +convert, crypto, shelf_static, source_map_stack_trace and vm_service license: + +Copyright 2015, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +coverage, dart_style, dartdoc, glob, http, http_parser, matcher, path, pool, +pub_semver, source_span, string_scanner, test and watcher license: + +Copyright 2014, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +dart_mappable and type_plus license: + +MIT License + +Copyright (c) 2021 Kilian Schulte + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------------------------------------------------------- + +ffi and package_config license: + +Copyright 2019, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +file license: + +Copyright 2017, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------------------- + +fixnum, http_multi_server, oauth2, shelf, shelf_web_socket, source_maps and +stack_trace license: + +Copyright 2014, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +frontend_server_client license: + +Copyright 2020, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +grinder and webkit_inspection_protocol license: + +Copyright 2013, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +html license: + +Copyright (c) 2006-2012 The Authors + +Contributors: +James Graham - jg307@cam.ac.uk +Anne van Kesteren - annevankesteren@gmail.com +Lachlan Hunt - lachlan.hunt@lachy.id.au +Matt McDonald - kanashii@kanashii.ca +Sam Ruby - rubys@intertwingly.net +Ian Hickson (Google) - ian@hixie.ch +Thomas Broyer - t.broyer@ltgt.net +Jacques Distler - distler@golem.ph.utexas.edu +Henri Sivonen - hsivonen@iki.fi +Adam Barth - abarth@webkit.org +Eric Seidel - eric@webkit.org +The Mozilla Foundation (contributions from Henri Sivonen since 2008) +David Flanagan (Mozilla) - dflanagan@mozilla.com +Google LLC (contributed the Dart port) - misc@dartlang.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-------------------------------------------------------------------------------- + +io, stream_transform and term_glyph license: + +Copyright 2017, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +js license: + +Copyright 2012, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +json_annotation license: + +Copyright 2017, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +lints license: + +Copyright 2021, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +markdown license: + +Copyright 2012, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +native_stack_traces license: + +Copyright 2020, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +native_synchronization license: + +Copyright 2023, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +node_interop license: + +Copyright (c) 2017, Anatoly Pulyaevskiy. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +node_preamble license: + +The MIT License (MIT) + +Copyright (c) 2015 Michael Bullington + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=== + +Copyright 2012, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +petitparser license: + +The MIT License + +Copyright (c) 2006-2024 Lukas Renggli. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +-------------------------------------------------------------------------------- + +posix license: + +MIT License + +Copyright (c) 2020 Brett Sutton + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +-------------------------------------------------------------------------------- + +pub_api_client license: + +MIT License + +Copyright (c) 2020 Leo Farias + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +-------------------------------------------------------------------------------- + +pubspec_parse license: + +Copyright 2018, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +retry license: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------------------------------------------------------------------- + +test_api and test_core license: + +Copyright 2018, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +test_descriptor and web_socket_channel license: + +Copyright 2016, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +test_process license: + +Copyright 2017, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +web license: + +Copyright 2023, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +web_socket license: + +Copyright 2024, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- + +xml license: + +The MIT License + +Copyright (c) 2006-2025 Lukas Renggli. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +-------------------------------------------------------------------------------- + +yaml license: + +Copyright (c) 2014, the Dart project authors. +Copyright (c) 2006, Kirill Simonov. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/sass/README.md b/tools/ui/node_modules/sass/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c7ad5914d738727111466cc3b4d7f0a5bdfb6297 --- /dev/null +++ b/tools/ui/node_modules/sass/README.md @@ -0,0 +1,173 @@ +A pure JavaScript implementation of [Sass][sass]. **Sass makes CSS fun again**. + + + + + + + +
+ Sass logo + + npm statistics + + GitHub actions build status +
+ Appveyor build status +
+ +[sass]: https://sass-lang.com/ + +This package is a distribution of [Dart Sass][], compiled to pure JavaScript +with no native code or external dependencies. It provides a command-line `sass` +executable and a Node.js API. + +[Dart Sass]: https://github.com/sass/dart-sass + +* [Usage](#usage) +* [See Also](#see-also) +* [Behavioral Differences from Ruby Sass](#behavioral-differences-from-ruby-sass) + +## Usage + +You can install Sass globally using `npm install -g sass` which will provide +access to the `sass` executable. You can also add it to your project using +`npm install --save-dev sass`. This provides the executable as well as a +library: + +[npm]: https://www.npmjs.com/package/sass + +```js +const sass = require('sass'); + +const result = sass.compile(scssFilename); + +// OR + +// Note that `compileAsync()` is substantially slower than `compile()`. +const result = await sass.compileAsync(scssFilename); +``` + +See [the Sass website][js api] for full API documentation. + +[js api]: https://sass-lang.com/documentation/js-api + +### Legacy API + +Dart Sass also supports an older JavaScript API that's fully compatible with +[Node Sass] (with a few exceptions listed below), with support for both the +[`render()`] and [`renderSync()`] functions. This API is considered deprecated +and will be removed in Dart Sass 2.0.0, so it should be avoided in new projects. + +[Node Sass]: https://github.com/sass/node-sass +[`render()`]: https://sass-lang.com/documentation/js-api/functions/render +[`renderSync()`]: https://sass-lang.com/documentation/js-api/functions/renderSync + +Sass's support for the legacy JavaScript API has the following limitations: + +* Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are + supported. + +* Dart Sass doesn't support the [`precision`] option. Dart Sass defaults to a + sufficiently high precision for all existing browsers, and making this + customizable would make the code substantially less efficient. + +* Dart Sass doesn't support the [`sourceComments`] option. Source maps are the + recommended way of locating the origin of generated selectors. + +[`outputStyle`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle +[`precision`]: https://github.com/sass/node-sass#precision +[`sourceComments`]: https://github.com/sass/node-sass#sourcecomments + +## See Also + +* [Dart Sass][], from which this package is compiled, can be used either as a + stand-alone executable or as a Dart library. Running Dart Sass on the Dart VM + is substantially faster than running the pure JavaScript version, so this may + be appropriate for performance-sensitive applications. The Dart API is also + (currently) more user-friendly than the JavaScript API. See + [the Dart Sass README][Using Dart Sass] for details on how to use it. + +* [Node Sass][], which is a wrapper around [LibSass][], the C++ implementation + of Sass. Node Sass supports the same API as this package and is also faster + (although it's usually a little slower than Dart Sass). However, it requires a + native library which may be difficult to install, and it's generally slower to + add features and fix bugs. + +[Using Dart Sass]: https://github.com/sass/dart-sass#using-dart-sass +[Node Sass]: https://www.npmjs.com/package/node-sass +[LibSass]: https://sass-lang.com/libsass + +## Behavioral Differences from Ruby Sass + +There are a few intentional behavioral differences between Dart Sass and Ruby +Sass. These are generally places where Ruby Sass has an undesired behavior, and +it's substantially easier to implement the correct behavior than it would be to +implement compatible behavior. These should all have tracking bugs against Ruby +Sass to update the reference behavior. + +1. `@extend` only accepts simple selectors, as does the second argument of + `selector-extend()`. See [issue 1599][]. + +2. Subject selectors are not supported. See [issue 1126][]. + +3. Pseudo selector arguments are parsed as ``s rather than + having a more limited custom parsing. See [issue 2120][]. + +4. The numeric precision is set to 10. See [issue 1122][]. + +5. The indented syntax parser is more flexible: it doesn't require consistent + indentation across the whole document. See [issue 2176][]. + +6. Colors do not support channel-by-channel arithmetic. See [issue 2144][]. + +7. Unitless numbers aren't `==` to unit numbers with the same value. In + addition, map keys follow the same logic as `==`-equality. See + [issue 1496][]. + +8. `rgba()` and `hsla()` alpha values with percentage units are interpreted as + percentages. Other units are forbidden. See [issue 1525][]. + +9. Too many variable arguments passed to a function is an error. See + [issue 1408][]. + +10. Allow `@extend` to reach outside a media query if there's an identical + `@extend` defined outside that query. This isn't tracked explicitly, because + it'll be irrelevant when [issue 1050][] is fixed. + +11. Some selector pseudos containing placeholder selectors will be compiled + where they wouldn't be in Ruby Sass. This better matches the semantics of + the selectors in question, and is more efficient. See [issue 2228][]. + +12. The old-style `:property value` syntax is not supported in the indented + syntax. See [issue 2245][]. + +13. The reference combinator is not supported. See [issue 303][]. + +14. Universal selector unification is symmetrical. See [issue 2247][]. + +15. `@extend` doesn't produce an error if it matches but fails to unify. See + [issue 2250][]. + +16. Dart Sass currently only supports UTF-8 documents. We'd like to support + more, but Dart currently doesn't support them. See [dart-lang/sdk#11744][], + for example. + +[issue 1599]: https://github.com/sass/sass/issues/1599 +[issue 1126]: https://github.com/sass/sass/issues/1126 +[issue 2120]: https://github.com/sass/sass/issues/2120 +[issue 1122]: https://github.com/sass/sass/issues/1122 +[issue 2176]: https://github.com/sass/sass/issues/2176 +[issue 2144]: https://github.com/sass/sass/issues/2144 +[issue 1496]: https://github.com/sass/sass/issues/1496 +[issue 1525]: https://github.com/sass/sass/issues/1525 +[issue 1408]: https://github.com/sass/sass/issues/1408 +[issue 1050]: https://github.com/sass/sass/issues/1050 +[issue 2228]: https://github.com/sass/sass/issues/2228 +[issue 2245]: https://github.com/sass/sass/issues/2245 +[issue 303]: https://github.com/sass/sass/issues/303 +[issue 2247]: https://github.com/sass/sass/issues/2247 +[issue 2250]: https://github.com/sass/sass/issues/2250 +[dart-lang/sdk#11744]: https://github.com/dart-lang/sdk/issues/11744 + +Disclaimer: this is not an official Google product. diff --git a/tools/ui/node_modules/sass/package.json b/tools/ui/node_modules/sass/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bc5949b709c1a2433fa1d3895c1d0948ff80dafb --- /dev/null +++ b/tools/ui/node_modules/sass/package.json @@ -0,0 +1 @@ +{"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=20.19.0"},"dependencies":{"chokidar":"^5.0.0","immutable":"^5.1.5","source-map-js":">=0.6.2 <2.0.0"},"optionalDependencies":{"@parcel/watcher":"^2.4.1"},"keywords":["style","scss","sass","preprocessor","css"],"types":"types/index.d.ts","exports":{"types":"./types/index.d.ts","node":{"require":"./sass.node.js","default":"./sass.node.mjs"},"default":{"require":"./sass.default.cjs","default":"./sass.default.js"}},"version":"1.100.0","bin":{"sass":"sass.js"},"main":"sass.node.js"} \ No newline at end of file diff --git a/tools/ui/node_modules/sass/sass.dart.js b/tools/ui/node_modules/sass/sass.dart.js new file mode 100644 index 0000000000000000000000000000000000000000..9bf0faeb4d007816f638c337bc6fd2538fee123a --- /dev/null +++ b/tools/ui/node_modules/sass/sass.dart.js @@ -0,0 +1,133161 @@ +// Because of vitejs/vite#12340, there's no way to reliably detect whether we're +// running as a (possibly bundled/polyfilled) ESM module or as a CommonJS +// module. In order to work everywhere, we have to provide the load function via +// a side channel on the global object. We write it as a stack so that multiple +// cli_pkg packages can depend on one another without clobbering their exports. +if (!globalThis._cliPkgExports) { + globalThis._cliPkgExports = []; +} +let _cliPkgExports = {}; +globalThis._cliPkgExports.push(_cliPkgExports); + +_cliPkgExports.load = function(_cliPkgRequires, _cliPkgExportParam) { +var dartNodeIsActuallyNode = typeof process !== "undefined" && (process.versions || {}).hasOwnProperty('node'); + +// make sure to keep this as 'var' +// we don't want block scoping +var self = dartNodeIsActuallyNode ? Object.create(globalThis) : globalThis; + +self.scheduleImmediate = typeof setImmediate !== "undefined" + ? function (cb) { + setImmediate(cb); + } + : function(cb) { + setTimeout(cb, 0); + }; + +// CommonJS globals. +if (typeof require !== "undefined") { + self.require = require; +} +self.exports = _cliPkgExportParam || _cliPkgExports; + +// Node.js specific exports, check to see if they exist & or polyfilled + +if (typeof process !== "undefined") { + self.process = process; +} + +if (typeof __dirname !== "undefined") { + self.__dirname = __dirname; +} + +if (typeof __filename !== "undefined") { + self.__filename = __filename; +} + +if (typeof Buffer !== "undefined") { + self.Buffer = Buffer; +} + +// if we're running in a browser, Dart supports most of this out of box +// make sure we only run these in Node.js environment + +if (dartNodeIsActuallyNode) { + // This line is to: + // 1) Prevent Webpack from bundling. + // 2) In Webpack on Node.js, make sure we're using the native Node.js require, which is available via __non_webpack_require__ + // https://github.com/mbullington/node_preamble.dart/issues/18#issuecomment-527305561 + var url = ("undefined" !== typeof __webpack_require__ ? __non_webpack_require__ : require)("url"); + + // Setting `self.location=` in Electron throws a `TypeError`, so we define it + // as a property instead to be safe. + Object.defineProperty(self, "location", { + value: { + get href() { + if (url.pathToFileURL) { + return url.pathToFileURL(process.cwd()).href + "/"; + } else { + // This isn't really a correct transformation, but it's the best we have + // for versions of Node <10.12.0 which introduced `url.pathToFileURL()`. + // For example, it will fail for paths that contain characters that need + // to be escaped in URLs. + return "file://" + (function() { + var cwd = process.cwd(); + if (process.platform != "win32") return cwd; + return "/" + cwd.replace(/\\/g, "/"); + })() + "/" + } + } + } + }); + + (function() { + function computeCurrentScript() { + try { + throw new Error(); + } catch(e) { + var stack = e.stack; + var re = new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "mg"); + var lastMatch = null; + do { + var match = re.exec(stack); + if (match != null) lastMatch = match; + } while (match != null); + return lastMatch[1]; + } + } + + // Setting `self.document=` isn't known to throw an error anywhere like + // `self.location=` does on Electron, but it's better to be future-proof + // just in case.. + var cachedCurrentScript = null; + Object.defineProperty(self, "document", { + value: { + get currentScript() { + if (cachedCurrentScript == null) { + cachedCurrentScript = {src: computeCurrentScript()}; + } + return cachedCurrentScript; + } + } + }); + })(); + + self.dartDeferredLibraryLoader = function(uri, successCallback, errorCallback) { + try { + load(uri); + successCallback(); + } catch (error) { + errorCallback(error); + } + }; +} + +Object.defineProperty(self, 'parcel_watcher', { get: _cliPkgRequires.parcel_watcher }); +self.immutable = _cliPkgRequires.immutable; +self.chokidar = _cliPkgRequires.chokidar; +self.readline = _cliPkgRequires.readline; +self.fs = _cliPkgRequires.fs; +self.nodeModule = _cliPkgRequires.nodeModule; +self.stream = _cliPkgRequires.stream; +self.util = _cliPkgRequires.util; +// Generated by dart2js (, trust primitives, omit checks, lax runtime type, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.12.0. +// The code supports the following hooks: +// dartPrint(message): +// if this function is defined it is called instead of the Dart [print] +// method. +// +// dartMainRunner(main, args): +// if this function is defined, the Dart [main] method will not be invoked +// directly. Instead, a closure that will invoke [main], and its arguments +// [args] is passed to [dartMainRunner]. +// +// dartDeferredLibraryLoader(uri, successCallback, errorCallback, loadId, loadPriority): +// if this function is defined, it will be called when a deferred library +// is loaded. It should load and eval the javascript of `uri`, and call +// successCallback. If it fails to do so, it should call errorCallback with +// an error. The loadId argument is the deferred import that resulted in +// this uri being loaded. The loadPriority argument is an arbitrary argument +// string forwarded from the 'dart2js:load-priority' pragma option. +// dartDeferredLibraryMultiLoader(uris, successCallback, errorCallback, loadId, loadPriority): +// if this function is defined, it will be called when a deferred library +// is loaded. It should load and eval the javascript of every URI in `uris`, +// and call successCallback. If it fails to do so, it should call +// errorCallback with an error. The loadId argument is the deferred import +// that resulted in this uri being loaded. The loadPriority argument is an +// arbitrary argument string forwarded from the 'dart2js:load-priority' +// pragma option. +// +// dartCallInstrumentation(id, qualifiedName): +// if this function is defined, it will be called at each entry of a +// method or constructor. Used only when compiling programs with +// --experiment-call-instrumentation. +(function dartProgram() { + function copyProperties(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + to[key] = from[key]; + } + } + function mixinPropertiesHard(from, to) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!to.hasOwnProperty(key)) { + to[key] = from[key]; + } + } + } + function mixinPropertiesEasy(from, to) { + Object.assign(to, from); + } + var supportsDirectProtoAccess = function() { + var cls = function() { + }; + cls.prototype = {p: {}}; + var object = new cls(); + if (!(Object.getPrototypeOf(object) && Object.getPrototypeOf(object).p === cls.prototype.p)) + return false; + try { + if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) + return true; + if (typeof version == "function" && version.length == 0) { + var v = version(); + if (/^\d+\.\d+\.\d+\.\d+$/.test(v)) + return true; + } + } catch (_) { + } + return false; + }(); + function inherit(cls, sup) { + cls.prototype.constructor = cls; + cls.prototype["$is" + cls.name] = cls; + if (sup != null) { + if (supportsDirectProtoAccess) { + Object.setPrototypeOf(cls.prototype, sup.prototype); + return; + } + var clsPrototype = Object.create(sup.prototype); + copyProperties(cls.prototype, clsPrototype); + cls.prototype = clsPrototype; + } + } + function inheritMany(sup, classes) { + for (var i = 0; i < classes.length; i++) { + inherit(classes[i], sup); + } + } + function mixinEasy(cls, mixin) { + mixinPropertiesEasy(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function mixinHard(cls, mixin) { + mixinPropertiesHard(mixin.prototype, cls.prototype); + cls.prototype.constructor = cls; + } + function lazy(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) { + holder[name] = initializer(); + } + holder[getterName] = function() { + return this[name]; + }; + return holder[name]; + }; + } + function lazyFinal(holder, name, getterName, initializer) { + var uninitializedSentinel = holder; + holder[name] = uninitializedSentinel; + holder[getterName] = function() { + if (holder[name] === uninitializedSentinel) { + var value = initializer(); + if (holder[name] !== uninitializedSentinel) { + A.throwLateFieldADI(name); + } + holder[name] = value; + } + var finalValue = holder[name]; + holder[getterName] = function() { + return finalValue; + }; + return finalValue; + }; + } + function makeConstList(list, rti) { + if (rti != null) + A._setArrayType(list, rti); + list.$flags = 7; + return list; + } + function convertToFastObject(properties) { + function t() { + } + t.prototype = properties; + new t(); + return properties; + } + function convertAllToFastObject(arrayOfObjects) { + for (var i = 0; i < arrayOfObjects.length; ++i) { + convertToFastObject(arrayOfObjects[i]); + } + } + var functionCounter = 0; + function instanceTearOffGetter(isIntercepted, parameters) { + var cache = null; + return isIntercepted ? function(receiver) { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(receiver, this); + } : function() { + if (cache === null) + cache = A.closureFromTearOff(parameters); + return new cache(this, null); + }; + } + function staticTearOffGetter(parameters) { + var cache = null; + return function() { + if (cache === null) + cache = A.closureFromTearOff(parameters).prototype; + return cache; + }; + } + var typesOffset = 0; + function tearOffParameters(container, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + if (typeof funType == "number") { + funType += typesOffset; + } + return {co: container, iS: isStatic, iI: isIntercepted, rC: requiredParameterCount, dV: optionalParameterDefaultValues, cs: callNames, fs: funsOrNames, fT: funType, aI: applyIndex || 0, nDA: needsDirectAccess}; + } + function installStaticTearOff(holder, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) { + var parameters = tearOffParameters(holder, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, false); + var getterFunction = staticTearOffGetter(parameters); + holder[getterName] = getterFunction; + } + function installInstanceTearOff(prototype, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, needsDirectAccess) { + isIntercepted = !!isIntercepted; + var parameters = tearOffParameters(prototype, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex, !!needsDirectAccess); + var getterFunction = instanceTearOffGetter(isIntercepted, parameters); + prototype[getterName] = getterFunction; + } + function setOrUpdateInterceptorsByTag(newTags) { + var tags = init.interceptorsByTag; + if (!tags) { + init.interceptorsByTag = newTags; + return; + } + copyProperties(newTags, tags); + } + function setOrUpdateLeafTags(newTags) { + var tags = init.leafTags; + if (!tags) { + init.leafTags = newTags; + return; + } + copyProperties(newTags, tags); + } + function updateTypes(newTypes) { + var types = init.types; + var length = types.length; + types.push.apply(types, newTypes); + return length; + } + function updateHolder(holder, newHolder) { + copyProperties(newHolder, holder); + return holder; + } + var hunkHelpers = function() { + var mkInstance = function(isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { + return function(container, getterName, name, funType) { + return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex, false); + }; + }, + mkStatic = function(requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) { + return function(container, getterName, name, funType) { + return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex); + }; + }; + return {inherit: inherit, inheritMany: inheritMany, mixin: mixinEasy, mixinHard: mixinHard, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, updateHolder: updateHolder, convertToFastObject: convertToFastObject, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags}; + }(); + function initializeDeferredHunk(hunk) { + typesOffset = init.types.length; + hunk(hunkHelpers, init, holders, $); + } + var J = { + makeDispatchRecord(interceptor, proto, extension, indexability) { + return {i: interceptor, p: proto, e: extension, x: indexability}; + }, + getNativeInterceptor(object) { + var proto, objectProto, $constructor, interceptor, t1, + record = object[init.dispatchPropertyName]; + if (record == null) + if ($.initNativeDispatchFlag == null) { + A.initNativeDispatch(); + record = object[init.dispatchPropertyName]; + } + if (record != null) { + proto = record.p; + if (false === proto) + return record.i; + if (true === proto) + return object; + objectProto = Object.getPrototypeOf(object); + if (proto === objectProto) + return record.i; + if (record.e === objectProto) + throw A.wrapException(A.UnimplementedError$("Return interceptor for " + A.S(proto(object, record)))); + } + $constructor = object.constructor; + if ($constructor == null) + interceptor = null; + else { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + interceptor = $constructor[t1]; + } + if (interceptor != null) + return interceptor; + interceptor = A.lookupAndCacheInterceptor(object); + if (interceptor != null) + return interceptor; + if (typeof object == "function") + return B.JavaScriptFunction_methods; + proto = Object.getPrototypeOf(object); + if (proto == null) + return B.PlainJavaScriptObject_methods; + if (proto === Object.prototype) + return B.PlainJavaScriptObject_methods; + if (typeof $constructor == "function") { + t1 = $._JS_INTEROP_INTERCEPTOR_TAG; + if (t1 == null) + t1 = $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js"); + Object.defineProperty($constructor, t1, {value: B.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + return B.UnknownJavaScriptObject_methods; + } + return B.UnknownJavaScriptObject_methods; + }, + JSArray_JSArray$fixed($length, $E) { + if ($length < 0 || $length > 4294967295) + throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); + }, + JSArray_JSArray$allocateFixed($length, $E) { + if ($length > 4294967295) + throw A.wrapException(A.RangeError$range($length, 0, 4294967295, "length", null)); + return J.JSArray_JSArray$markFixed(new Array($length), $E); + }, + JSArray_JSArray$growable($length, $E) { + if ($length < 0) + throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); + return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); + }, + JSArray_JSArray$allocateGrowable($length, $E) { + if ($length < 0) + throw A.wrapException(A.ArgumentError$("Length must be a non-negative integer: " + $length, null)); + return A._setArrayType(new Array($length), $E._eval$1("JSArray<0>")); + }, + JSArray_JSArray$markFixed(allocation, $E) { + var t1 = A._setArrayType(allocation, $E._eval$1("JSArray<0>")); + t1.$flags = 1; + return t1; + }, + JSArray__compareAny(a, b) { + return J.compareTo$1$ns(a, b); + }, + JSString__isWhitespace(codeUnit) { + if (codeUnit < 256) + switch (codeUnit) { + case 9: + case 10: + case 11: + case 12: + case 13: + case 32: + case 133: + case 160: + return true; + default: + return false; + } + switch (codeUnit) { + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8232: + case 8233: + case 8239: + case 8287: + case 12288: + case 65279: + return true; + default: + return false; + } + }, + JSString__skipLeadingWhitespace(string, index) { + var t1, codeUnit; + for (t1 = string.length; index < t1;) { + codeUnit = string.charCodeAt(index); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + ++index; + } + return index; + }, + JSString__skipTrailingWhitespace(string, index) { + var index0, codeUnit; + for (; index > 0; index = index0) { + index0 = index - 1; + codeUnit = string.charCodeAt(index0); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + } + return index; + }, + getInterceptor$(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSNumNotInt.prototype; + } + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return J.JSNull.prototype; + if (typeof receiver == "boolean") + return J.JSBool.prototype; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ansx(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$asx(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$ax(receiver) { + if (receiver == null) + return receiver; + if (Array.isArray(receiver)) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$in(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSNumNotInt.prototype; + } + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$ns(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$s(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + getInterceptor$x(receiver) { + if (receiver == null) + return receiver; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + if (typeof receiver == "symbol") + return J.JavaScriptSymbol.prototype; + if (typeof receiver == "bigint") + return J.JavaScriptBigInt.prototype; + return receiver; + } + if (receiver instanceof A.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }, + getInterceptor$z(receiver) { + if (receiver == null) + return receiver; + if (!(receiver instanceof A.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }, + set$AsyncCompiler$x(receiver, value) { + return J.getInterceptor$x(receiver).set$AsyncCompiler(receiver, value); + }, + set$CalculationInterpolation$x(receiver, value) { + return J.getInterceptor$x(receiver).set$CalculationInterpolation(receiver, value); + }, + set$CalculationOperation$x(receiver, value) { + return J.getInterceptor$x(receiver).set$CalculationOperation(receiver, value); + }, + set$Compiler$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Compiler(receiver, value); + }, + set$Exception$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Exception(receiver, value); + }, + set$FALSE$x(receiver, value) { + return J.getInterceptor$x(receiver).set$FALSE(receiver, value); + }, + set$Logger$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Logger(receiver, value); + }, + set$NULL$x(receiver, value) { + return J.getInterceptor$x(receiver).set$NULL(receiver, value); + }, + set$NodePackageImporter$x(receiver, value) { + return J.getInterceptor$x(receiver).set$NodePackageImporter(receiver, value); + }, + set$SassArgumentList$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassArgumentList(receiver, value); + }, + set$SassBoolean$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassBoolean(receiver, value); + }, + set$SassCalculation$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassCalculation(receiver, value); + }, + set$SassColor$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassColor(receiver, value); + }, + set$SassFunction$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassFunction(receiver, value); + }, + set$SassList$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassList(receiver, value); + }, + set$SassMap$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassMap(receiver, value); + }, + set$SassMixin$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassMixin(receiver, value); + }, + set$SassNumber$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassNumber(receiver, value); + }, + set$SassString$x(receiver, value) { + return J.getInterceptor$x(receiver).set$SassString(receiver, value); + }, + set$TRUE$x(receiver, value) { + return J.getInterceptor$x(receiver).set$TRUE(receiver, value); + }, + set$Value$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Value(receiver, value); + }, + set$Version$x(receiver, value) { + return J.getInterceptor$x(receiver).set$Version(receiver, value); + }, + set$cli_pkg_main_0_$x(receiver, value) { + return J.getInterceptor$x(receiver).set$cli_pkg_main_0_(receiver, value); + }, + set$compile$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compile(receiver, value); + }, + set$compileAsync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileAsync(receiver, value); + }, + set$compileString$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileString(receiver, value); + }, + set$compileStringAsync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$compileStringAsync(receiver, value); + }, + set$context$x(receiver, value) { + return J.getInterceptor$x(receiver).set$context(receiver, value); + }, + set$dartValue$x(receiver, value) { + return J.getInterceptor$x(receiver).set$dartValue(receiver, value); + }, + set$deprecations$x(receiver, value) { + return J.getInterceptor$x(receiver).set$deprecations(receiver, value); + }, + set$exitCode$x(receiver, value) { + return J.getInterceptor$x(receiver).set$exitCode(receiver, value); + }, + set$info$x(receiver, value) { + return J.getInterceptor$x(receiver).set$info(receiver, value); + }, + set$initAsyncCompiler$x(receiver, value) { + return J.getInterceptor$x(receiver).set$initAsyncCompiler(receiver, value); + }, + set$initCompiler$x(receiver, value) { + return J.getInterceptor$x(receiver).set$initCompiler(receiver, value); + }, + set$length$asx(receiver, value) { + return J.getInterceptor$asx(receiver).set$length(receiver, value); + }, + set$loadParserExports_$x(receiver, value) { + return J.getInterceptor$x(receiver).set$loadParserExports_(receiver, value); + }, + set$render$x(receiver, value) { + return J.getInterceptor$x(receiver).set$render(receiver, value); + }, + set$renderSync$x(receiver, value) { + return J.getInterceptor$x(receiver).set$renderSync(receiver, value); + }, + set$sassFalse$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassFalse(receiver, value); + }, + set$sassNull$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassNull(receiver, value); + }, + set$sassTrue$x(receiver, value) { + return J.getInterceptor$x(receiver).set$sassTrue(receiver, value); + }, + set$types$x(receiver, value) { + return J.getInterceptor$x(receiver).set$types(receiver, value); + }, + get$$prototype$x(receiver) { + return J.getInterceptor$x(receiver).get$$prototype(receiver); + }, + get$_dartException$x(receiver) { + return J.getInterceptor$x(receiver).get$_dartException(receiver); + }, + get$alertAscii$x(receiver) { + return J.getInterceptor$x(receiver).get$alertAscii(receiver); + }, + get$alertColor$x(receiver) { + return J.getInterceptor$x(receiver).get$alertColor(receiver); + }, + get$argv$x(receiver) { + return J.getInterceptor$x(receiver).get$argv(receiver); + }, + get$brackets$x(receiver) { + return J.getInterceptor$x(receiver).get$brackets(receiver); + }, + get$charset$x(receiver) { + return J.getInterceptor$x(receiver).get$charset(receiver); + }, + get$code$x(receiver) { + return J.getInterceptor$x(receiver).get$code(receiver); + }, + get$current$x(receiver) { + return J.getInterceptor$x(receiver).get$current(receiver); + }, + get$dartValue$x(receiver) { + return J.getInterceptor$x(receiver).get$dartValue(receiver); + }, + get$debug$x(receiver) { + return J.getInterceptor$x(receiver).get$debug(receiver); + }, + get$denominatorUnits$x(receiver) { + return J.getInterceptor$x(receiver).get$denominatorUnits(receiver); + }, + get$env$x(receiver) { + return J.getInterceptor$x(receiver).get$env(receiver); + }, + get$exitCode$x(receiver) { + return J.getInterceptor$x(receiver).get$exitCode(receiver); + }, + get$fatalDeprecations$x(receiver) { + return J.getInterceptor$x(receiver).get$fatalDeprecations(receiver); + }, + get$fiber$x(receiver) { + return J.getInterceptor$x(receiver).get$fiber(receiver); + }, + get$file$x(receiver) { + return J.getInterceptor$x(receiver).get$file(receiver); + }, + get$filename$x(receiver) { + return J.getInterceptor$x(receiver).get$filename(receiver); + }, + get$first$ax(receiver) { + return J.getInterceptor$ax(receiver).get$first(receiver); + }, + get$functions$x(receiver) { + return J.getInterceptor$x(receiver).get$functions(receiver); + }, + get$futureDeprecations$x(receiver) { + return J.getInterceptor$x(receiver).get$futureDeprecations(receiver); + }, + get$hashCode$(receiver) { + return J.getInterceptor$(receiver).get$hashCode(receiver); + }, + get$id$x(receiver) { + return J.getInterceptor$x(receiver).get$id(receiver); + }, + get$importer$x(receiver) { + return J.getInterceptor$x(receiver).get$importer(receiver); + }, + get$importers$x(receiver) { + return J.getInterceptor$x(receiver).get$importers(receiver); + }, + get$isEmpty$asx(receiver) { + return J.getInterceptor$asx(receiver).get$isEmpty(receiver); + }, + get$isNotEmpty$asx(receiver) { + return J.getInterceptor$asx(receiver).get$isNotEmpty(receiver); + }, + get$isTTY$x(receiver) { + return J.getInterceptor$x(receiver).get$isTTY(receiver); + }, + get$iterator$ax(receiver) { + return J.getInterceptor$ax(receiver).get$iterator(receiver); + }, + get$last$ax(receiver) { + return J.getInterceptor$ax(receiver).get$last(receiver); + }, + get$length$asx(receiver) { + return J.getInterceptor$asx(receiver).get$length(receiver); + }, + get$loadPaths$x(receiver) { + return J.getInterceptor$x(receiver).get$loadPaths(receiver); + }, + get$logger$x(receiver) { + return J.getInterceptor$x(receiver).get$logger(receiver); + }, + get$message$x(receiver) { + return J.getInterceptor$x(receiver).get$message(receiver); + }, + get$method$x(receiver) { + return J.getInterceptor$x(receiver).get$method(receiver); + }, + get$mtime$x(receiver) { + return J.getInterceptor$x(receiver).get$mtime(receiver); + }, + get$name$x(receiver) { + return J.getInterceptor$x(receiver).get$name(receiver); + }, + get$numeratorUnits$x(receiver) { + return J.getInterceptor$x(receiver).get$numeratorUnits(receiver); + }, + get$options$x(receiver) { + return J.getInterceptor$x(receiver).get$options(receiver); + }, + get$parent$z(receiver) { + return J.getInterceptor$z(receiver).get$parent(receiver); + }, + get$path$x(receiver) { + return J.getInterceptor$x(receiver).get$path(receiver); + }, + get$platform$x(receiver) { + return J.getInterceptor$x(receiver).get$platform(receiver); + }, + get$quietDeps$x(receiver) { + return J.getInterceptor$x(receiver).get$quietDeps(receiver); + }, + get$quotes$x(receiver) { + return J.getInterceptor$x(receiver).get$quotes(receiver); + }, + get$realpathSync$x(receiver) { + return J.getInterceptor$x(receiver).get$realpathSync(receiver); + }, + get$release$x(receiver) { + return J.getInterceptor$x(receiver).get$release(receiver); + }, + get$reversed$ax(receiver) { + return J.getInterceptor$ax(receiver).get$reversed(receiver); + }, + get$runtimeType$(receiver) { + return J.getInterceptor$(receiver).get$runtimeType(receiver); + }, + get$separator$x(receiver) { + return J.getInterceptor$x(receiver).get$separator(receiver); + }, + get$sign$in(receiver) { + if (typeof receiver === "number") + return receiver > 0 ? 1 : receiver < 0 ? -1 : receiver; + return J.getInterceptor$in(receiver).get$sign(receiver); + }, + get$silenceDeprecations$x(receiver) { + return J.getInterceptor$x(receiver).get$silenceDeprecations(receiver); + }, + get$single$ax(receiver) { + return J.getInterceptor$ax(receiver).get$single(receiver); + }, + get$sourceMap$x(receiver) { + return J.getInterceptor$x(receiver).get$sourceMap(receiver); + }, + get$sourceMapIncludeSources$x(receiver) { + return J.getInterceptor$x(receiver).get$sourceMapIncludeSources(receiver); + }, + get$space$x(receiver) { + return J.getInterceptor$x(receiver).get$space(receiver); + }, + get$span$x(receiver) { + return J.getInterceptor$x(receiver).get$span(receiver); + }, + get$stderr$x(receiver) { + return J.getInterceptor$x(receiver).get$stderr(receiver); + }, + get$stdout$x(receiver) { + return J.getInterceptor$x(receiver).get$stdout(receiver); + }, + get$style$x(receiver) { + return J.getInterceptor$x(receiver).get$style(receiver); + }, + get$syntax$x(receiver) { + return J.getInterceptor$x(receiver).get$syntax(receiver); + }, + get$trace$z(receiver) { + return J.getInterceptor$z(receiver).get$trace(receiver); + }, + get$url$x(receiver) { + return J.getInterceptor$x(receiver).get$url(receiver); + }, + get$verbose$x(receiver) { + return J.getInterceptor$x(receiver).get$verbose(receiver); + }, + get$warn$x(receiver) { + return J.getInterceptor$x(receiver).get$warn(receiver); + }, + get$weight$x(receiver) { + return J.getInterceptor$x(receiver).get$weight(receiver); + }, + $add$ansx(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver + a0; + return J.getInterceptor$ansx(receiver).$add(receiver, a0); + }, + $eq$(receiver, a0) { + if (receiver == null) + return a0 == null; + if (typeof receiver != "object") + return a0 != null && receiver === a0; + return J.getInterceptor$(receiver).$eq(receiver, a0); + }, + $index$asx(receiver, a0) { + if (typeof a0 === "number") + if (Array.isArray(receiver) || typeof receiver == "string" || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) + if (a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0]; + return J.getInterceptor$asx(receiver).$index(receiver, a0); + }, + $indexSet$ax(receiver, a0, a1) { + if (typeof a0 === "number") + if ((Array.isArray(receiver) || A.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) && !(receiver.$flags & 2) && a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0] = a1; + return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); + }, + $set$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).$set$2(receiver, a0, a1); + }, + add$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).add$1(receiver, a0); + }, + addAll$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).addAll$1(receiver, a0); + }, + allMatches$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).allMatches$1(receiver, a0); + }, + allMatches$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).allMatches$2(receiver, a0, a1); + }, + any$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).any$1(receiver, a0); + }, + apply$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).apply$2(receiver, a0, a1); + }, + asImmutable$0$x(receiver) { + return J.getInterceptor$x(receiver).asImmutable$0(receiver); + }, + asMutable$0$x(receiver) { + return J.getInterceptor$x(receiver).asMutable$0(receiver); + }, + canonicalize$4$baseImporter$baseUrl$forImport$x(receiver, a0, a1, a2, a3) { + return J.getInterceptor$x(receiver).canonicalize$4$baseImporter$baseUrl$forImport(receiver, a0, a1, a2, a3); + }, + cast$1$0$ax(receiver, $T1) { + return J.getInterceptor$ax(receiver).cast$1$0(receiver, $T1); + }, + close$0$x(receiver) { + return J.getInterceptor$x(receiver).close$0(receiver); + }, + codeUnitAt$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).codeUnitAt$1(receiver, a0); + }, + compareTo$1$ns(receiver, a0) { + return J.getInterceptor$ns(receiver).compareTo$1(receiver, a0); + }, + contains$1$asx(receiver, a0) { + return J.getInterceptor$asx(receiver).contains$1(receiver, a0); + }, + createInterface$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).createInterface$1(receiver, a0); + }, + createRequire$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).createRequire$1(receiver, a0); + }, + elementAt$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0); + }, + error$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).error$1(receiver, a0); + }, + every$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).every$1(receiver, a0); + }, + existsSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).existsSync$1(receiver, a0); + }, + expand$1$1$ax(receiver, a0, $T1) { + return J.getInterceptor$ax(receiver).expand$1$1(receiver, a0, $T1); + }, + fillRange$3$ax(receiver, a0, a1, a2) { + return J.getInterceptor$ax(receiver).fillRange$3(receiver, a0, a1, a2); + }, + fold$2$ax(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).fold$2(receiver, a0, a1); + }, + forEach$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); + }, + getRange$2$ax(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).getRange$2(receiver, a0, a1); + }, + getTime$0$x(receiver) { + return J.getInterceptor$x(receiver).getTime$0(receiver); + }, + isDirectory$0$x(receiver) { + return J.getInterceptor$x(receiver).isDirectory$0(receiver); + }, + isFile$0$x(receiver) { + return J.getInterceptor$x(receiver).isFile$0(receiver); + }, + isSymbolicLink$0$x(receiver) { + return J.getInterceptor$x(receiver).isSymbolicLink$0(receiver); + }, + join$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).join$1(receiver, a0); + }, + log$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).log$1(receiver, a0); + }, + lstatSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).lstatSync$1(receiver, a0); + }, + map$1$1$ax(receiver, a0, $T1) { + return J.getInterceptor$ax(receiver).map$1$1(receiver, a0, $T1); + }, + matchAsPrefix$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1); + }, + mkdirSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).mkdirSync$1(receiver, a0); + }, + native$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).native$1(receiver, a0); + }, + noSuchMethod$1$(receiver, a0) { + return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0); + }, + on$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).on$2(receiver, a0, a1); + }, + parse$0$z(receiver) { + return J.getInterceptor$z(receiver).parse$0(receiver); + }, + readFileSync$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).readFileSync$2(receiver, a0, a1); + }, + readdirSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).readdirSync$1(receiver, a0); + }, + removeRange$2$ax(receiver, a0, a1) { + return J.getInterceptor$ax(receiver).removeRange$2(receiver, a0, a1); + }, + replaceFirst$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).replaceFirst$2(receiver, a0, a1); + }, + resolve$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).resolve$1(receiver, a0); + }, + run$0$x(receiver) { + return J.getInterceptor$x(receiver).run$0(receiver); + }, + run$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).run$1(receiver, a0); + }, + setRange$4$ax(receiver, a0, a1, a2, a3) { + return J.getInterceptor$ax(receiver).setRange$4(receiver, a0, a1, a2, a3); + }, + skip$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).skip$1(receiver, a0); + }, + sort$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).sort$1(receiver, a0); + }, + startsWith$1$s(receiver, a0) { + return J.getInterceptor$s(receiver).startsWith$1(receiver, a0); + }, + statSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).statSync$1(receiver, a0); + }, + sublist$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).sublist$1(receiver, a0); + }, + substring$2$s(receiver, a0, a1) { + return J.getInterceptor$s(receiver).substring$2(receiver, a0, a1); + }, + take$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).take$1(receiver, a0); + }, + then$1$2$onError$x(receiver, a0, a1, $T1) { + return J.getInterceptor$x(receiver).then$1$2$onError(receiver, a0, a1, $T1); + }, + then$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).then$2(receiver, a0, a1); + }, + toArray$0$x(receiver) { + return J.getInterceptor$x(receiver).toArray$0(receiver); + }, + toList$0$ax(receiver) { + return J.getInterceptor$ax(receiver).toList$0(receiver); + }, + toString$0$(receiver) { + return J.getInterceptor$(receiver).toString$0(receiver); + }, + toString$1$color$(receiver, a0) { + return J.getInterceptor$(receiver).toString$1$color(receiver, a0); + }, + trim$0$s(receiver) { + return J.getInterceptor$s(receiver).trim$0(receiver); + }, + unlinkSync$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).unlinkSync$1(receiver, a0); + }, + visitAtRootRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitAtRootRule$1(receiver, a0); + }, + visitAtRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitAtRule$1(receiver, a0); + }, + visitAttributeSelector$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitAttributeSelector$1(receiver, a0); + }, + visitBinaryOperationExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitBinaryOperationExpression$1(receiver, a0); + }, + visitBooleanExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitBooleanExpression$1(receiver, a0); + }, + visitClassSelector$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitClassSelector$1(receiver, a0); + }, + visitColorExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitColorExpression$1(receiver, a0); + }, + visitContentBlock$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitContentBlock$1(receiver, a0); + }, + visitContentRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitContentRule$1(receiver, a0); + }, + visitDebugRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitDebugRule$1(receiver, a0); + }, + visitDeclaration$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitDeclaration$1(receiver, a0); + }, + visitEachRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitEachRule$1(receiver, a0); + }, + visitErrorRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitErrorRule$1(receiver, a0); + }, + visitExtendRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitExtendRule$1(receiver, a0); + }, + visitForRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitForRule$1(receiver, a0); + }, + visitForwardRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitForwardRule$1(receiver, a0); + }, + visitFunctionExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitFunctionExpression$1(receiver, a0); + }, + visitFunctionRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitFunctionRule$1(receiver, a0); + }, + visitIDSelector$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIDSelector$1(receiver, a0); + }, + visitIfConditionFunction$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfConditionFunction$1(receiver, a0); + }, + visitIfConditionNegation$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfConditionNegation$1(receiver, a0); + }, + visitIfConditionOperation$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfConditionOperation$1(receiver, a0); + }, + visitIfConditionParenthesized$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfConditionParenthesized$1(receiver, a0); + }, + visitIfConditionRaw$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfConditionRaw$1(receiver, a0); + }, + visitIfConditionSass$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfConditionSass$1(receiver, a0); + }, + visitIfExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfExpression$1(receiver, a0); + }, + visitIfRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIfRule$1(receiver, a0); + }, + visitImportRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitImportRule$1(receiver, a0); + }, + visitIncludeRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitIncludeRule$1(receiver, a0); + }, + visitInterpolatedFunctionExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitInterpolatedFunctionExpression$1(receiver, a0); + }, + visitLegacyIfExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitLegacyIfExpression$1(receiver, a0); + }, + visitListExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitListExpression$1(receiver, a0); + }, + visitLoudComment$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitLoudComment$1(receiver, a0); + }, + visitMapExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitMapExpression$1(receiver, a0); + }, + visitMediaRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitMediaRule$1(receiver, a0); + }, + visitMixinRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitMixinRule$1(receiver, a0); + }, + visitNullExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitNullExpression$1(receiver, a0); + }, + visitNumberExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitNumberExpression$1(receiver, a0); + }, + visitParentSelector$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitParentSelector$1(receiver, a0); + }, + visitParenthesizedExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitParenthesizedExpression$1(receiver, a0); + }, + visitPlaceholderSelector$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitPlaceholderSelector$1(receiver, a0); + }, + visitPseudoSelector$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitPseudoSelector$1(receiver, a0); + }, + visitReturnRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitReturnRule$1(receiver, a0); + }, + visitSelectorExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitSelectorExpression$1(receiver, a0); + }, + visitSilentComment$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitSilentComment$1(receiver, a0); + }, + visitStringExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitStringExpression$1(receiver, a0); + }, + visitStyleRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitStyleRule$1(receiver, a0); + }, + visitStylesheet$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitStylesheet$1(receiver, a0); + }, + visitSupportsExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitSupportsExpression$1(receiver, a0); + }, + visitSupportsRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitSupportsRule$1(receiver, a0); + }, + visitTypeSelector$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitTypeSelector$1(receiver, a0); + }, + visitUnaryOperationExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitUnaryOperationExpression$1(receiver, a0); + }, + visitUniversalSelector$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitUniversalSelector$1(receiver, a0); + }, + visitUseRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitUseRule$1(receiver, a0); + }, + visitValueExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitValueExpression$1(receiver, a0); + }, + visitVariableDeclaration$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitVariableDeclaration$1(receiver, a0); + }, + visitVariableExpression$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitVariableExpression$1(receiver, a0); + }, + visitWarnRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitWarnRule$1(receiver, a0); + }, + visitWhileRule$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).visitWhileRule$1(receiver, a0); + }, + watch$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).watch$2(receiver, a0, a1); + }, + where$1$ax(receiver, a0) { + return J.getInterceptor$ax(receiver).where$1(receiver, a0); + }, + write$1$x(receiver, a0) { + return J.getInterceptor$x(receiver).write$1(receiver, a0); + }, + writeFileSync$2$x(receiver, a0, a1) { + return J.getInterceptor$x(receiver).writeFileSync$2(receiver, a0, a1); + }, + yield$0$x(receiver) { + return J.getInterceptor$x(receiver).yield$0(receiver); + }, + Interceptor: function Interceptor() { + }, + JSBool: function JSBool() { + }, + JSNull: function JSNull() { + }, + JavaScriptObject: function JavaScriptObject() { + }, + LegacyJavaScriptObject: function LegacyJavaScriptObject() { + }, + PlainJavaScriptObject: function PlainJavaScriptObject() { + }, + UnknownJavaScriptObject: function UnknownJavaScriptObject() { + }, + JavaScriptFunction: function JavaScriptFunction() { + }, + JavaScriptBigInt: function JavaScriptBigInt() { + }, + JavaScriptSymbol: function JavaScriptSymbol() { + }, + JSArray: function JSArray(t0) { + this.$ti = t0; + }, + JSArraySafeToStringHook: function JSArraySafeToStringHook() { + }, + JSUnmodifiableArray: function JSUnmodifiableArray(t0) { + this.$ti = t0; + }, + ArrayIterator: function ArrayIterator(t0, t1, t2) { + var _ = this; + _._iterable = t0; + _._length = t1; + _._index = 0; + _._current = null; + _.$ti = t2; + }, + JSNumber: function JSNumber() { + }, + JSInt: function JSInt() { + }, + JSNumNotInt: function JSNumNotInt() { + }, + JSString: function JSString() { + } + }, + A = {JS_CONST: function JS_CONST() { + }, + CastIterable_CastIterable(source, $S, $T) { + if (type$.EfficientLengthIterable_dynamic._is(source)) + return new A._EfficientLengthCastIterable(source, $S._eval$1("@<0>")._bind$1($T)._eval$1("_EfficientLengthCastIterable<1,2>")); + return new A.CastIterable(source, $S._eval$1("@<0>")._bind$1($T)._eval$1("CastIterable<1,2>")); + }, + LateError$fieldADI(fieldName) { + return new A.LateError("Field '" + fieldName + "' has been assigned during initialization."); + }, + LateError$fieldNI(fieldName) { + return new A.LateError("Field '" + fieldName + "' has not been initialized."); + }, + LateError$localNI(localName) { + return new A.LateError("Local '" + localName + "' has not been initialized."); + }, + LateError$fieldAI(fieldName) { + return new A.LateError("Field '" + fieldName + "' has already been initialized."); + }, + hexDigitValue(char) { + var letter, + digit = char ^ 48; + if (digit <= 9) + return digit; + letter = char | 32; + if (97 <= letter && letter <= 102) + return letter - 87; + return -1; + }, + SystemHash_combine(hash, value) { + hash = hash + value & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; + return hash ^ hash >>> 6; + }, + SystemHash_finish(hash) { + hash = hash + ((hash & 67108863) << 3) & 536870911; + hash ^= hash >>> 11; + return hash + ((hash & 16383) << 15) & 536870911; + }, + checkNotNullable(value, $name, $T) { + return value; + }, + isToStringVisiting(object) { + var t1, i; + for (t1 = $._toStringVisiting.length, i = 0; i < t1; ++i) + if (object === $._toStringVisiting[i]) + return true; + return false; + }, + SubListIterable$(_iterable, _start, _endOrLength, $E) { + A.RangeError_checkNotNegative(_start, "start"); + if (_endOrLength != null) { + A.RangeError_checkNotNegative(_endOrLength, "end"); + if (_start > _endOrLength) + A.throwExpression(A.RangeError$range(_start, 0, _endOrLength, "start", null)); + } + return new A.SubListIterable(_iterable, _start, _endOrLength, $E._eval$1("SubListIterable<0>")); + }, + MappedIterable_MappedIterable(iterable, $function, $S, $T) { + if (type$.EfficientLengthIterable_dynamic._is(iterable)) + return new A.EfficientLengthMappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); + return new A.MappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("MappedIterable<1,2>")); + }, + TakeIterable_TakeIterable(iterable, takeCount, $E) { + var _s9_ = "takeCount"; + A.ArgumentError_checkNotNull(takeCount, _s9_); + A.RangeError_checkNotNegative(takeCount, _s9_); + if (type$.EfficientLengthIterable_dynamic._is(iterable)) + return new A.EfficientLengthTakeIterable(iterable, takeCount, $E._eval$1("EfficientLengthTakeIterable<0>")); + return new A.TakeIterable(iterable, takeCount, $E._eval$1("TakeIterable<0>")); + }, + SkipIterable_SkipIterable(iterable, count, $E) { + var _s5_ = "count"; + if (type$.EfficientLengthIterable_dynamic._is(iterable)) { + A.ArgumentError_checkNotNull(count, _s5_); + A.RangeError_checkNotNegative(count, _s5_); + return new A.EfficientLengthSkipIterable(iterable, count, $E._eval$1("EfficientLengthSkipIterable<0>")); + } + A.ArgumentError_checkNotNull(count, _s5_); + A.RangeError_checkNotNegative(count, _s5_); + return new A.SkipIterable(iterable, count, $E._eval$1("SkipIterable<0>")); + }, + FollowedByIterable_FollowedByIterable$firstEfficient(first, second, $E) { + if (type$.EfficientLengthIterable_dynamic._is(second)) + return new A.EfficientLengthFollowedByIterable(first, second, $E._eval$1("EfficientLengthFollowedByIterable<0>")); + return new A.FollowedByIterable(first, second, $E._eval$1("FollowedByIterable<0>")); + }, + IterableElementError_noElement() { + return new A.StateError("No element"); + }, + IterableElementError_tooMany() { + return new A.StateError("Too many elements"); + }, + IterableElementError_tooFew() { + return new A.StateError("Too few elements"); + }, + Sort__doSort(a, left, right, compare) { + if (right - left <= 32) + A.Sort__insertionSort(a, left, right, compare); + else + A.Sort__dualPivotQuicksort(a, left, right, compare); + }, + Sort__insertionSort(a, left, right, compare) { + var i, t1, el, j, j0; + for (i = left + 1, t1 = J.getInterceptor$asx(a); i <= right; ++i) { + el = t1.$index(a, i); + j = i; + for (;;) { + if (!(j > left && compare.call$2(t1.$index(a, j - 1), el) > 0)) + break; + j0 = j - 1; + t1.$indexSet(a, j, t1.$index(a, j0)); + j = j0; + } + t1.$indexSet(a, j, el); + } + }, + Sort__dualPivotQuicksort(a, left, right, compare) { + var t0, less, great, pivots_are_equal, k, ak, comp, great0, less0, t2, + sixth = B.JSInt_methods._tdivFast$1(right - left + 1, 6), + index1 = left + sixth, + index5 = right - sixth, + index3 = B.JSInt_methods._tdivFast$1(left + right, 2), + index2 = index3 - sixth, + index4 = index3 + sixth, + t1 = J.getInterceptor$asx(a), + el1 = t1.$index(a, index1), + el2 = t1.$index(a, index2), + el3 = t1.$index(a, index3), + el4 = t1.$index(a, index4), + el5 = t1.$index(a, index5); + if (compare.call$2(el1, el2) > 0) { + t0 = el2; + el2 = el1; + el1 = t0; + } + if (compare.call$2(el4, el5) > 0) { + t0 = el5; + el5 = el4; + el4 = t0; + } + if (compare.call$2(el1, el3) > 0) { + t0 = el3; + el3 = el1; + el1 = t0; + } + if (compare.call$2(el2, el3) > 0) { + t0 = el3; + el3 = el2; + el2 = t0; + } + if (compare.call$2(el1, el4) > 0) { + t0 = el4; + el4 = el1; + el1 = t0; + } + if (compare.call$2(el3, el4) > 0) { + t0 = el4; + el4 = el3; + el3 = t0; + } + if (compare.call$2(el2, el5) > 0) { + t0 = el5; + el5 = el2; + el2 = t0; + } + if (compare.call$2(el2, el3) > 0) { + t0 = el3; + el3 = el2; + el2 = t0; + } + if (compare.call$2(el4, el5) > 0) { + t0 = el5; + el5 = el4; + el4 = t0; + } + t1.$indexSet(a, index1, el1); + t1.$indexSet(a, index3, el3); + t1.$indexSet(a, index5, el5); + t1.$indexSet(a, index2, t1.$index(a, left)); + t1.$indexSet(a, index4, t1.$index(a, right)); + less = left + 1; + great = right - 1; + pivots_are_equal = J.$eq$(compare.call$2(el2, el4), 0); + if (pivots_are_equal) + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + comp = compare.call$2(ak, el2); + if (comp === 0) + continue; + if (comp < 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else + for (;;) { + comp = compare.call$2(t1.$index(a, great), el2); + if (comp > 0) { + --great; + continue; + } else { + great0 = great - 1; + if (comp < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + great = great0; + less = less0; + break; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + great = great0; + break; + } + } + } + } + else + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + if (compare.call$2(ak, el2) < 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else if (compare.call$2(ak, el4) > 0) + for (;;) + if (compare.call$2(t1.$index(a, great), el4) > 0) { + --great; + if (great < k) + break; + continue; + } else { + great0 = great - 1; + if (compare.call$2(t1.$index(a, great), el2) < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + less = less0; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + } + great = great0; + break; + } + } + t2 = less - 1; + t1.$indexSet(a, left, t1.$index(a, t2)); + t1.$indexSet(a, t2, el2); + t2 = great + 1; + t1.$indexSet(a, right, t1.$index(a, t2)); + t1.$indexSet(a, t2, el4); + A.Sort__doSort(a, left, less - 2, compare); + A.Sort__doSort(a, great + 2, right, compare); + if (pivots_are_equal) + return; + if (less < index1 && great > index5) { + while (J.$eq$(compare.call$2(t1.$index(a, less), el2), 0)) + ++less; + while (J.$eq$(compare.call$2(t1.$index(a, great), el4), 0)) + --great; + for (k = less; k <= great; ++k) { + ak = t1.$index(a, k); + if (compare.call$2(ak, el2) === 0) { + if (k !== less) { + t1.$indexSet(a, k, t1.$index(a, less)); + t1.$indexSet(a, less, ak); + } + ++less; + } else if (compare.call$2(ak, el4) === 0) + for (;;) + if (compare.call$2(t1.$index(a, great), el4) === 0) { + --great; + if (great < k) + break; + continue; + } else { + great0 = great - 1; + if (compare.call$2(t1.$index(a, great), el2) < 0) { + t1.$indexSet(a, k, t1.$index(a, less)); + less0 = less + 1; + t1.$indexSet(a, less, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + less = less0; + } else { + t1.$indexSet(a, k, t1.$index(a, great)); + t1.$indexSet(a, great, ak); + } + great = great0; + break; + } + } + A.Sort__doSort(a, less, great, compare); + } else + A.Sort__doSort(a, less, great, compare); + }, + _CastIterableBase: function _CastIterableBase() { + }, + CastIterator: function CastIterator(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastIterable: function CastIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + _EfficientLengthCastIterable: function _EfficientLengthCastIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + _CastListBase: function _CastListBase() { + }, + _CastListBase_sort_closure: function _CastListBase_sort_closure(t0, t1) { + this.$this = t0; + this.compare = t1; + }, + CastList: function CastList(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastSet: function CastSet(t0, t1, t2) { + this._source = t0; + this._emptySet = t1; + this.$ti = t2; + }, + CastMap: function CastMap(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + CastMap_forEach_closure: function CastMap_forEach_closure(t0, t1) { + this.$this = t0; + this.f = t1; + }, + CastMap_entries_closure: function CastMap_entries_closure(t0) { + this.$this = t0; + }, + LateError: function LateError(t0) { + this._message = t0; + }, + CodeUnits: function CodeUnits(t0) { + this._string = t0; + }, + nullFuture_closure: function nullFuture_closure() { + }, + SentinelValue: function SentinelValue() { + }, + EfficientLengthIterable: function EfficientLengthIterable() { + }, + ListIterable: function ListIterable() { + }, + SubListIterable: function SubListIterable(t0, t1, t2, t3) { + var _ = this; + _.__internal$_iterable = t0; + _._start = t1; + _._endOrLength = t2; + _.$ti = t3; + }, + ListIterator: function ListIterator(t0, t1, t2) { + var _ = this; + _.__internal$_iterable = t0; + _.__internal$_length = t1; + _.__internal$_index = 0; + _.__internal$_current = null; + _.$ti = t2; + }, + MappedIterable: function MappedIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + EfficientLengthMappedIterable: function EfficientLengthMappedIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + MappedIterator: function MappedIterator(t0, t1, t2) { + var _ = this; + _.__internal$_current = null; + _._iterator = t0; + _._f = t1; + _.$ti = t2; + }, + MappedListIterable: function MappedListIterable(t0, t1, t2) { + this._source = t0; + this._f = t1; + this.$ti = t2; + }, + WhereIterable: function WhereIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + WhereIterator: function WhereIterator(t0, t1) { + this._iterator = t0; + this._f = t1; + }, + ExpandIterable: function ExpandIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + ExpandIterator: function ExpandIterator(t0, t1, t2, t3) { + var _ = this; + _._iterator = t0; + _._f = t1; + _._currentExpansion = t2; + _.__internal$_current = null; + _.$ti = t3; + }, + TakeIterable: function TakeIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._takeCount = t1; + this.$ti = t2; + }, + EfficientLengthTakeIterable: function EfficientLengthTakeIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._takeCount = t1; + this.$ti = t2; + }, + TakeIterator: function TakeIterator(t0, t1, t2) { + this._iterator = t0; + this._remaining = t1; + this.$ti = t2; + }, + SkipIterable: function SkipIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._skipCount = t1; + this.$ti = t2; + }, + EfficientLengthSkipIterable: function EfficientLengthSkipIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._skipCount = t1; + this.$ti = t2; + }, + SkipIterator: function SkipIterator(t0, t1) { + this._iterator = t0; + this._skipCount = t1; + }, + SkipWhileIterable: function SkipWhileIterable(t0, t1, t2) { + this.__internal$_iterable = t0; + this._f = t1; + this.$ti = t2; + }, + SkipWhileIterator: function SkipWhileIterator(t0, t1) { + this._iterator = t0; + this._f = t1; + this._hasSkipped = false; + }, + EmptyIterable: function EmptyIterable(t0) { + this.$ti = t0; + }, + EmptyIterator: function EmptyIterator() { + }, + FollowedByIterable: function FollowedByIterable(t0, t1, t2) { + this.__internal$_first = t0; + this._second = t1; + this.$ti = t2; + }, + EfficientLengthFollowedByIterable: function EfficientLengthFollowedByIterable(t0, t1, t2) { + this.__internal$_first = t0; + this._second = t1; + this.$ti = t2; + }, + FollowedByIterator: function FollowedByIterator(t0, t1) { + this._currentIterator = t0; + this._nextIterable = t1; + }, + WhereTypeIterable: function WhereTypeIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + WhereTypeIterator: function WhereTypeIterator(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + NonNullsIterable: function NonNullsIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + NonNullsIterator: function NonNullsIterator(t0) { + this._source = t0; + this.__internal$_current = null; + }, + FixedLengthListMixin: function FixedLengthListMixin() { + }, + UnmodifiableListMixin: function UnmodifiableListMixin() { + }, + UnmodifiableListBase: function UnmodifiableListBase() { + }, + ReversedListIterable: function ReversedListIterable(t0, t1) { + this._source = t0; + this.$ti = t1; + }, + Symbol: function Symbol(t0) { + this.__internal$_name = t0; + }, + __CastListBase__CastIterableBase_ListMixin: function __CastListBase__CastIterableBase_ListMixin() { + }, + ConstantMap_ConstantMap$from(other, $K, $V) { + var allStrings, k, object, index, index0, map, + keys = A.List_List$from(other.get$keys(other), true, $K), + t1 = keys.length, + _i = 0; + for (;;) { + if (!(_i < t1)) { + allStrings = true; + break; + } + k = keys[_i]; + if (typeof k != "string" || "__proto__" === k) { + allStrings = false; + break; + } + ++_i; + } + if (allStrings) { + object = {}; + for (index = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i, index = index0) { + k = keys[_i]; + other.$index(0, k); + index0 = index + 1; + object[k] = index; + } + map = new A.ConstantStringMap(object, A.List_List$from(other.get$values(other), true, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("ConstantStringMap<1,2>")); + map.$keys = keys; + return map; + } + return new A.ConstantMapView(A.LinkedHashMap_LinkedHashMap$from(other, $K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("ConstantMapView<1,2>")); + }, + ConstantMap__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable Map")); + }, + ConstantSet__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot modify constant Set")); + }, + instantiate1(f, $T1) { + var t1 = new A.Instantiation1(f, $T1._eval$1("Instantiation1<0>")); + t1.Instantiation$1(f); + return t1; + }, + unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; + if (preserved != null) + return preserved; + return rawClassName; + }, + isJsIndexable(object, record) { + var result; + if (record != null) { + result = record.x; + if (result != null) + return result; + } + return type$.JavaScriptIndexingBehavior_dynamic._is(object); + }, + S(value) { + var result; + if (typeof value == "string") + return value; + if (typeof value == "number") { + if (value !== 0) + return "" + value; + } else if (true === value) + return "true"; + else if (false === value) + return "false"; + else if (value == null) + return "null"; + result = J.toString$0$(value); + return result; + }, + JSInvocationMirror$(_memberName, _internalName, _kind, _arguments, _namedArgumentNames, _typeArgumentCount) { + return new A.JSInvocationMirror(_memberName, _kind, _arguments, _namedArgumentNames, _typeArgumentCount); + }, + Primitives_objectHashCode(object) { + var hash, + property = $.Primitives__identityHashCodeProperty; + if (property == null) + property = $.Primitives__identityHashCodeProperty = Symbol("identityHashCode"); + hash = object[property]; + if (hash == null) { + hash = Math.random() * 0x3fffffff | 0; + object[property] = hash; + } + return hash; + }, + Primitives_parseInt(source, radix) { + var decimalMatch, maxCharCode, digitsPart, t1, i, _null = null, + match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); + if (match == null) + return _null; + decimalMatch = match[3]; + if (radix == null) { + if (decimalMatch != null) + return parseInt(source, 10); + if (match[2] != null) + return parseInt(source, 16); + return _null; + } + if (radix < 2 || radix > 36) + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", _null)); + if (radix === 10 && decimalMatch != null) + return parseInt(source, 10); + if (radix < 10 || decimalMatch == null) { + maxCharCode = radix <= 10 ? 47 + radix : 86 + radix; + digitsPart = match[1]; + for (t1 = digitsPart.length, i = 0; i < t1; ++i) + if ((digitsPart.charCodeAt(i) | 32) > maxCharCode) + return _null; + } + return parseInt(source, radix); + }, + Primitives_parseDouble(source) { + var result, trimmed; + if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s*$/.test(source)) + return null; + result = parseFloat(source); + if (isNaN(result)) { + trimmed = B.JSString_methods.trim$0(source); + if (trimmed === "NaN" || trimmed === "+NaN" || trimmed === "-NaN") + return result; + return null; + } + return result; + }, + Primitives_objectTypeName(object) { + var interceptor, dispatchName, $constructor, constructorName; + if (object instanceof A.Object) + return A._rtiToString(A.instanceType(object), null); + interceptor = J.getInterceptor$(object); + if (interceptor === B.Interceptor_methods || interceptor === B.JavaScriptObject_methods || type$.UnknownJavaScriptObject._is(object)) { + dispatchName = B.C_JS_CONST(object); + if (dispatchName !== "Object" && dispatchName !== "") + return dispatchName; + $constructor = object.constructor; + if (typeof $constructor == "function") { + constructorName = $constructor.name; + if (typeof constructorName == "string" && constructorName !== "Object" && constructorName !== "") + return constructorName; + } + } + return A._rtiToString(A.instanceType(object), null); + }, + Primitives_safeToString(object) { + var hooks, i, hookResult; + if (object == null || typeof object == "number" || A._isBool(object)) + return J.toString$0$(object); + if (typeof object == "string") + return JSON.stringify(object); + if (object instanceof A.Closure) + return object.toString$0(0); + if (object instanceof A._Record) + return object._toString$1(true); + hooks = $.$get$_safeToStringHooks(); + for (i = 0; i < 1; ++i) { + hookResult = hooks[i].tryFormat$1(object); + if (hookResult != null) + return hookResult; + } + return "Instance of '" + A.Primitives_objectTypeName(object) + "'"; + }, + Primitives_currentUri() { + if (!!self.location) + return self.location.href; + return null; + }, + Primitives__fromCharCodeApply(array) { + var result, i, i0, chunkEnd, + end = array.length; + if (end <= 500) + return String.fromCharCode.apply(null, array); + for (result = "", i = 0; i < end; i = i0) { + i0 = i + 500; + chunkEnd = i0 < end ? i0 : end; + result += String.fromCharCode.apply(null, array.slice(i, chunkEnd)); + } + return result; + }, + Primitives_stringFromCodePoints(codePoints) { + var t1, _i, i, + a = A._setArrayType([], type$.JSArray_int); + for (t1 = codePoints.length, _i = 0; _i < codePoints.length; codePoints.length === t1 || (0, A.throwConcurrentModificationError)(codePoints), ++_i) { + i = codePoints[_i]; + if (!A._isInt(i)) + throw A.wrapException(A.argumentErrorValue(i)); + if (i <= 65535) + a.push(i); + else if (i <= 1114111) { + a.push(55296 + (B.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 1023)); + a.push(56320 + (i & 1023)); + } else + throw A.wrapException(A.argumentErrorValue(i)); + } + return A.Primitives__fromCharCodeApply(a); + }, + Primitives_stringFromCharCodes(charCodes) { + var t1, _i, i; + for (t1 = charCodes.length, _i = 0; _i < t1; ++_i) { + i = charCodes[_i]; + if (!A._isInt(i)) + throw A.wrapException(A.argumentErrorValue(i)); + if (i < 0) + throw A.wrapException(A.argumentErrorValue(i)); + if (i > 65535) + return A.Primitives_stringFromCodePoints(charCodes); + } + return A.Primitives__fromCharCodeApply(charCodes); + }, + Primitives_stringFromNativeUint8List(charCodes, start, end) { + var i, result, i0, chunkEnd; + if (end <= 500 && start === 0 && end === charCodes.length) + return String.fromCharCode.apply(null, charCodes); + for (i = start, result = ""; i < end; i = i0) { + i0 = i + 500; + chunkEnd = i0 < end ? i0 : end; + result += String.fromCharCode.apply(null, charCodes.subarray(i, chunkEnd)); + } + return result; + }, + Primitives_stringFromCharCode(charCode) { + var bits; + if (0 <= charCode) { + if (charCode <= 65535) + return String.fromCharCode(charCode); + if (charCode <= 1114111) { + bits = charCode - 65536; + return String.fromCharCode((B.JSInt_methods._shrOtherPositive$1(bits, 10) | 55296) >>> 0, bits & 1023 | 56320); + } + } + throw A.wrapException(A.RangeError$range(charCode, 0, 1114111, null, null)); + }, + Primitives_lazyAsJsDate(receiver) { + if (receiver.date === void 0) + receiver.date = new Date(receiver._value); + return receiver.date; + }, + Primitives_getYear(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getFullYear() + 0; + return t1; + }, + Primitives_getMonth(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMonth() + 1; + return t1; + }, + Primitives_getDay(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getDate() + 0; + return t1; + }, + Primitives_getHours(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getHours() + 0; + return t1; + }, + Primitives_getMinutes(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMinutes() + 0; + return t1; + }, + Primitives_getSeconds(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getSeconds() + 0; + return t1; + }, + Primitives_getMilliseconds(receiver) { + var t1 = A.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0; + return t1; + }, + Primitives_functionNoSuchMethod($function, positionalArguments, namedArguments) { + var $arguments, namedArgumentList, t1 = {}; + t1.argumentCount = 0; + $arguments = []; + namedArgumentList = []; + t1.argumentCount = positionalArguments.length; + B.JSArray_methods.addAll$1($arguments, positionalArguments); + t1.names = ""; + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + namedArguments.forEach$1(0, new A.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments)); + return J.noSuchMethod$1$($function, new A.JSInvocationMirror(B.Symbol_call, 0, $arguments, namedArgumentList, 0)); + }, + Primitives_applyFunction($function, positionalArguments, namedArguments) { + var t1, argumentCount, jsStub; + if (Array.isArray(positionalArguments)) + t1 = namedArguments == null || namedArguments.__js_helper$_length === 0; + else + t1 = false; + if (t1) { + argumentCount = positionalArguments.length; + if (argumentCount === 0) { + if (!!$function.call$0) + return $function.call$0(); + } else if (argumentCount === 1) { + if (!!$function.call$1) + return $function.call$1(positionalArguments[0]); + } else if (argumentCount === 2) { + if (!!$function.call$2) + return $function.call$2(positionalArguments[0], positionalArguments[1]); + } else if (argumentCount === 3) { + if (!!$function.call$3) + return $function.call$3(positionalArguments[0], positionalArguments[1], positionalArguments[2]); + } else if (argumentCount === 4) { + if (!!$function.call$4) + return $function.call$4(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3]); + } else if (argumentCount === 5) + if (!!$function.call$5) + return $function.call$5(positionalArguments[0], positionalArguments[1], positionalArguments[2], positionalArguments[3], positionalArguments[4]); + jsStub = $function["call" + "$" + argumentCount]; + if (jsStub != null) + return jsStub.apply($function, positionalArguments); + } + return A.Primitives__generalApplyFunction($function, positionalArguments, namedArguments); + }, + Primitives__generalApplyFunction($function, positionalArguments, namedArguments) { + var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, maxArguments, missingDefaults, keys, _i, defaultValue, used, t2; + if (Array.isArray(positionalArguments)) + $arguments = positionalArguments; + else + $arguments = A.List_List$_of(positionalArguments, type$.dynamic); + argumentCount = $arguments.length; + requiredParameterCount = $function.$requiredArgCount; + if (argumentCount < requiredParameterCount) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + defaultValuesClosure = $function.$defaultValues; + t1 = defaultValuesClosure == null; + defaultValues = !t1 ? defaultValuesClosure() : null; + interceptor = J.getInterceptor$($function); + jsFunction = interceptor["call*"]; + if (typeof jsFunction == "string") + jsFunction = interceptor[jsFunction]; + if (t1) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if (argumentCount === requiredParameterCount) + return jsFunction.apply($function, $arguments); + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + if (Array.isArray(defaultValues)) { + if (namedArguments != null && namedArguments.__js_helper$_length !== 0) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + maxArguments = requiredParameterCount + defaultValues.length; + if (argumentCount > maxArguments) + return A.Primitives_functionNoSuchMethod($function, $arguments, null); + if (argumentCount < maxArguments) { + missingDefaults = defaultValues.slice(argumentCount - requiredParameterCount); + if ($arguments === positionalArguments) + $arguments = A.List_List$_of($arguments, type$.dynamic); + B.JSArray_methods.addAll$1($arguments, missingDefaults); + } + return jsFunction.apply($function, $arguments); + } else { + if (argumentCount > requiredParameterCount) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + if ($arguments === positionalArguments) + $arguments = A.List_List$_of($arguments, type$.dynamic); + keys = Object.keys(defaultValues); + if (namedArguments == null) + for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + defaultValue = defaultValues[keys[_i]]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } + else { + for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, A.throwConcurrentModificationError)(keys), ++_i) { + t2 = keys[_i]; + if (namedArguments.containsKey$1(t2)) { + ++used; + B.JSArray_methods.add$1($arguments, namedArguments.$index(0, t2)); + } else { + defaultValue = defaultValues[t2]; + if (B.C__Required === defaultValue) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + B.JSArray_methods.add$1($arguments, defaultValue); + } + } + if (used !== namedArguments.__js_helper$_length) + return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments); + } + return jsFunction.apply($function, $arguments); + } + }, + Primitives_extractStackTrace(error) { + var jsError = error.$thrownJsError; + if (jsError == null) + return null; + return A.getTraceFromException(jsError); + }, + Primitives_trySetStackTrace(error, stackTrace) { + var jsError; + if (error.$thrownJsError == null) { + jsError = new Error(); + A.initializeExceptionWrapper(error, jsError); + error.$thrownJsError = jsError; + jsError.stack = stackTrace.toString$0(0); + } + }, + diagnoseIndexError(indexable, index) { + var $length, _s5_ = "index"; + if (!A._isInt(index)) + return new A.ArgumentError(true, index, _s5_, null); + $length = J.get$length$asx(indexable); + if (index < 0 || index >= $length) + return A.IndexError$withLength(index, $length, indexable, null, _s5_); + return A.RangeError$value(index, _s5_, null); + }, + diagnoseRangeError(start, end, $length) { + if (start < 0 || start > $length) + return A.RangeError$range(start, 0, $length, "start", null); + if (end != null) + if (end < start || end > $length) + return A.RangeError$range(end, start, $length, "end", null); + return new A.ArgumentError(true, end, "end", null); + }, + argumentErrorValue(object) { + return new A.ArgumentError(true, object, null, null); + }, + wrapException(ex) { + return A.initializeExceptionWrapper(ex, new Error()); + }, + initializeExceptionWrapper(ex, wrapper) { + var t1; + if (ex == null) + ex = new A.TypeError(); + wrapper.dartException = ex; + t1 = A.toStringWrapper; + if ("defineProperty" in Object) { + Object.defineProperty(wrapper, "message", {get: t1}); + wrapper.name = ""; + } else + wrapper.toString = t1; + return wrapper; + }, + toStringWrapper() { + return J.toString$0$(this.dartException); + }, + throwExpression(ex, wrapper) { + throw A.initializeExceptionWrapper(ex, wrapper == null ? new Error() : wrapper); + }, + throwUnsupportedOperation(o, operation, verb) { + var wrapper; + if (operation == null) + operation = 0; + if (verb == null) + verb = 0; + wrapper = Error(); + A.throwExpression(A._diagnoseUnsupportedOperation(o, operation, verb), wrapper); + }, + _diagnoseUnsupportedOperation(o, encodedOperation, encodedVerb) { + var operation, table, tableLength, index, verb, object, flags, article, adjective; + if (typeof encodedOperation == "string") + operation = encodedOperation; + else { + table = "[]=;add;removeWhere;retainWhere;removeRange;setRange;setInt8;setInt16;setInt32;setUint8;setUint16;setUint32;setFloat32;setFloat64".split(";"); + tableLength = table.length; + index = encodedOperation; + if (index > tableLength) { + encodedVerb = index / tableLength | 0; + index %= tableLength; + } + operation = table[index]; + } + verb = typeof encodedVerb == "string" ? encodedVerb : "modify;remove from;add to".split(";")[encodedVerb]; + object = type$.List_dynamic._is(o) ? "list" : "ByteData"; + flags = o.$flags | 0; + article = "a "; + if ((flags & 4) !== 0) + adjective = "constant "; + else if ((flags & 2) !== 0) { + adjective = "unmodifiable "; + article = "an "; + } else + adjective = (flags & 1) !== 0 ? "fixed-length " : ""; + return new A.UnsupportedError("'" + operation + "': Cannot " + verb + " " + article + adjective + object); + }, + throwConcurrentModificationError(collection) { + throw A.wrapException(A.ConcurrentModificationError$(collection)); + }, + TypeErrorDecoder_extractPattern(message) { + var match, $arguments, argumentsExpr, expr, method, receiver; + message = A.quoteStringForRegExp(message.replace(String({}), "$receiver$")); + match = message.match(/\\\$[a-zA-Z]+\\\$/g); + if (match == null) + match = A._setArrayType([], type$.JSArray_String); + $arguments = match.indexOf("\\$arguments\\$"); + argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); + expr = match.indexOf("\\$expr\\$"); + method = match.indexOf("\\$method\\$"); + receiver = match.indexOf("\\$receiver\\$"); + return new A.TypeErrorDecoder(message.replace(new RegExp("\\\\\\$arguments\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$", "g"), "((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$", "g"), "((?:x|[^x])*)"), $arguments, argumentsExpr, expr, method, receiver); + }, + TypeErrorDecoder_provokeCallErrorOn(expression) { + return function($expr$) { + var $argumentsExpr$ = "$arguments$"; + try { + $expr$.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }(expression); + }, + TypeErrorDecoder_provokePropertyErrorOn(expression) { + return function($expr$) { + try { + $expr$.$method$; + } catch (e) { + return e.message; + } + }(expression); + }, + JsNoSuchMethodError$(_message, match) { + var t1 = match == null, + t2 = t1 ? null : match.method; + return new A.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); + }, + unwrapException(ex) { + if (ex == null) + return new A.NullThrownFromJavaScriptException(ex); + if (ex instanceof A.ExceptionAndStackTrace) + return A.saveStackTrace(ex, ex.dartException); + if (typeof ex !== "object") + return ex; + if ("dartException" in ex) + return A.saveStackTrace(ex, ex.dartException); + return A._unwrapNonDartException(ex); + }, + saveStackTrace(ex, error) { + if (type$.Error._is(error)) + if (error.$thrownJsError == null) + error.$thrownJsError = ex; + return error; + }, + _unwrapNonDartException(ex) { + var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match; + if (!("message" in ex)) + return ex; + message = ex.message; + if ("number" in ex && typeof ex.number == "number") { + number = ex.number; + ieErrorCode = number & 65535; + if ((B.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) + switch (ieErrorCode) { + case 438: + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(A.S(message) + " (Error " + ieErrorCode + ")", null)); + case 445: + case 5007: + A.S(message); + return A.saveStackTrace(ex, new A.NullError()); + } + } + if (ex instanceof TypeError) { + nsme = $.$get$TypeErrorDecoder_noSuchMethodPattern(); + notClosure = $.$get$TypeErrorDecoder_notClosurePattern(); + nullCall = $.$get$TypeErrorDecoder_nullCallPattern(); + nullLiteralCall = $.$get$TypeErrorDecoder_nullLiteralCallPattern(); + undefCall = $.$get$TypeErrorDecoder_undefinedCallPattern(); + undefLiteralCall = $.$get$TypeErrorDecoder_undefinedLiteralCallPattern(); + nullProperty = $.$get$TypeErrorDecoder_nullPropertyPattern(); + $.$get$TypeErrorDecoder_nullLiteralPropertyPattern(); + undefProperty = $.$get$TypeErrorDecoder_undefinedPropertyPattern(); + undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); + match = nsme.matchTypeError$1(message); + if (match != null) + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(message, match)); + else { + match = notClosure.matchTypeError$1(message); + if (match != null) { + match.method = "call"; + return A.saveStackTrace(ex, A.JsNoSuchMethodError$(message, match)); + } else if (nullCall.matchTypeError$1(message) != null || nullLiteralCall.matchTypeError$1(message) != null || undefCall.matchTypeError$1(message) != null || undefLiteralCall.matchTypeError$1(message) != null || nullProperty.matchTypeError$1(message) != null || nullLiteralCall.matchTypeError$1(message) != null || undefProperty.matchTypeError$1(message) != null || undefLiteralProperty.matchTypeError$1(message) != null) + return A.saveStackTrace(ex, new A.NullError()); + } + return A.saveStackTrace(ex, new A.UnknownJsTypeError(typeof message == "string" ? message : "")); + } + if (ex instanceof RangeError) { + if (typeof message == "string" && message.indexOf("call stack") !== -1) + return new A.StackOverflowError(); + message = function(ex) { + try { + return String(ex); + } catch (e) { + } + return null; + }(ex); + return A.saveStackTrace(ex, new A.ArgumentError(false, null, null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message)); + } + if (typeof InternalError == "function" && ex instanceof InternalError) + if (typeof message == "string" && message === "too much recursion") + return new A.StackOverflowError(); + return ex; + }, + getTraceFromException(exception) { + var trace; + if (exception instanceof A.ExceptionAndStackTrace) + return exception.stackTrace; + if (exception == null) + return new A._StackTrace(exception); + trace = exception.$cachedTrace; + if (trace != null) + return trace; + trace = new A._StackTrace(exception); + if (typeof exception === "object") + exception.$cachedTrace = trace; + return trace; + }, + objectHashCode(object) { + if (object == null) + return J.get$hashCode$(object); + if (typeof object == "object") + return A.Primitives_objectHashCode(object); + return J.get$hashCode$(object); + }, + constantHashCode(key) { + if (typeof key == "number") + return B.JSNumber_methods.get$hashCode(key); + if (key instanceof A._Type) + return A.Primitives_objectHashCode(key); + if (key instanceof A._Record) + return key.get$hashCode(key); + if (key instanceof A.Symbol) + return key.get$hashCode(0); + return A.objectHashCode(key); + }, + fillLiteralMap(keyValuePairs, result) { + var index, index0, index1, + $length = keyValuePairs.length; + for (index = 0; index < $length; index = index1) { + index0 = index + 1; + index1 = index0 + 1; + result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); + } + return result; + }, + fillLiteralSet(values, result) { + var index, + $length = values.length; + for (index = 0; index < $length; ++index) + result.add$1(0, values[index]); + return result; + }, + _invokeClosure(closure, numberOfArguments, arg1, arg2, arg3, arg4) { + switch (numberOfArguments) { + case 0: + return closure.call$0(); + case 1: + return closure.call$1(arg1); + case 2: + return closure.call$2(arg1, arg2); + case 3: + return closure.call$3(arg1, arg2, arg3); + case 4: + return closure.call$4(arg1, arg2, arg3, arg4); + } + throw A.wrapException(new A._Exception("Unsupported number of arguments for wrapped closure")); + }, + convertDartClosureToJS(closure, arity) { + var $function; + if (closure == null) + return null; + $function = closure.$identity; + if (!!$function) + return $function; + $function = A.convertDartClosureToJSUncached(closure, arity); + closure.$identity = $function; + return $function; + }, + convertDartClosureToJSUncached(closure, arity) { + var entry; + switch (arity) { + case 0: + entry = closure.call$0; + break; + case 1: + entry = closure.call$1; + break; + case 2: + entry = closure.call$2; + break; + case 3: + entry = closure.call$3; + break; + case 4: + entry = closure.call$4; + break; + default: + entry = null; + } + if (entry != null) + return entry.bind(closure); + return function(closure, arity, invoke) { + return function(a1, a2, a3, a4) { + return invoke(closure, arity, a1, a2, a3, a4); + }; + }(closure, arity, A._invokeClosure); + }, + Closure_fromTearOff(parameters) { + var $prototype, $constructor, t2, trampoline, applyTrampoline, i, stub, stub0, stubName, stubCallName, + container = parameters.co, + isStatic = parameters.iS, + isIntercepted = parameters.iI, + needsDirectAccess = parameters.nDA, + applyTrampolineIndex = parameters.aI, + funsOrNames = parameters.fs, + callNames = parameters.cs, + $name = funsOrNames[0], + callName = callNames[0], + $function = container[$name], + t1 = parameters.fT; + t1.toString; + $prototype = isStatic ? Object.create(new A.StaticClosure().constructor.prototype) : Object.create(new A.BoundClosure(null, null).constructor.prototype); + $prototype.$initialize = $prototype.constructor; + $constructor = isStatic ? function static_tear_off() { + this.$initialize(); + } : function tear_off(a, b) { + this.$initialize(a, b); + }; + $prototype.constructor = $constructor; + $constructor.prototype = $prototype; + $prototype.$_name = $name; + $prototype.$_target = $function; + t2 = !isStatic; + if (t2) + trampoline = A.Closure_forwardCallTo($name, $function, isIntercepted, needsDirectAccess); + else { + $prototype.$static_name = $name; + trampoline = $function; + } + $prototype.$signature = A.Closure__computeSignatureFunction(t1, isStatic, isIntercepted); + $prototype[callName] = trampoline; + for (applyTrampoline = trampoline, i = 1; i < funsOrNames.length; ++i) { + stub = funsOrNames[i]; + if (typeof stub == "string") { + stub0 = container[stub]; + stubName = stub; + stub = stub0; + } else + stubName = ""; + stubCallName = callNames[i]; + if (stubCallName != null) { + if (t2) + stub = A.Closure_forwardCallTo(stubName, stub, isIntercepted, needsDirectAccess); + $prototype[stubCallName] = stub; + } + if (i === applyTrampolineIndex) + applyTrampoline = stub; + } + $prototype["call*"] = applyTrampoline; + $prototype.$requiredArgCount = parameters.rC; + $prototype.$defaultValues = parameters.dV; + return $constructor; + }, + Closure__computeSignatureFunction(functionType, isStatic, isIntercepted) { + if (typeof functionType == "number") + return functionType; + if (typeof functionType == "string") { + if (isStatic) + throw A.wrapException("Cannot compute signature for static tearoff."); + return function(recipe, evalOnReceiver) { + return function() { + return evalOnReceiver(this, recipe); + }; + }(functionType, A.BoundClosure_evalRecipe); + } + throw A.wrapException("Error in functionType of tearoff"); + }, + Closure_cspForwardCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf; + switch (needsDirectAccess ? -1 : arity) { + case 0: + return function(entry, receiverOf) { + return function() { + return receiverOf(this)[entry](); + }; + }(stubName, getReceiver); + case 1: + return function(entry, receiverOf) { + return function(a) { + return receiverOf(this)[entry](a); + }; + }(stubName, getReceiver); + case 2: + return function(entry, receiverOf) { + return function(a, b) { + return receiverOf(this)[entry](a, b); + }; + }(stubName, getReceiver); + case 3: + return function(entry, receiverOf) { + return function(a, b, c) { + return receiverOf(this)[entry](a, b, c); + }; + }(stubName, getReceiver); + case 4: + return function(entry, receiverOf) { + return function(a, b, c, d) { + return receiverOf(this)[entry](a, b, c, d); + }; + }(stubName, getReceiver); + case 5: + return function(entry, receiverOf) { + return function(a, b, c, d, e) { + return receiverOf(this)[entry](a, b, c, d, e); + }; + }(stubName, getReceiver); + default: + return function(f, receiverOf) { + return function() { + return f.apply(receiverOf(this), arguments); + }; + }($function, getReceiver); + } + }, + Closure_forwardCallTo(stubName, $function, isIntercepted, needsDirectAccess) { + if (isIntercepted) + return A.Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess); + return A.Closure_cspForwardCall($function.length, needsDirectAccess, stubName, $function); + }, + Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function) { + var getReceiver = A.BoundClosure_receiverOf, + getInterceptor = A.BoundClosure_interceptorOf; + switch (needsDirectAccess ? -1 : arity) { + case 0: + throw A.wrapException(new A.RuntimeError("Intercepted function with no arguments.")); + case 1: + return function(entry, interceptorOf, receiverOf) { + return function() { + return interceptorOf(this)[entry](receiverOf(this)); + }; + }(stubName, getInterceptor, getReceiver); + case 2: + return function(entry, interceptorOf, receiverOf) { + return function(a) { + return interceptorOf(this)[entry](receiverOf(this), a); + }; + }(stubName, getInterceptor, getReceiver); + case 3: + return function(entry, interceptorOf, receiverOf) { + return function(a, b) { + return interceptorOf(this)[entry](receiverOf(this), a, b); + }; + }(stubName, getInterceptor, getReceiver); + case 4: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c); + }; + }(stubName, getInterceptor, getReceiver); + case 5: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c, d) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d); + }; + }(stubName, getInterceptor, getReceiver); + case 6: + return function(entry, interceptorOf, receiverOf) { + return function(a, b, c, d, e) { + return interceptorOf(this)[entry](receiverOf(this), a, b, c, d, e); + }; + }(stubName, getInterceptor, getReceiver); + default: + return function(f, interceptorOf, receiverOf) { + return function() { + var a = [receiverOf(this)]; + Array.prototype.push.apply(a, arguments); + return f.apply(interceptorOf(this), a); + }; + }($function, getInterceptor, getReceiver); + } + }, + Closure_forwardInterceptedCallTo(stubName, $function, needsDirectAccess) { + var arity, t1; + if ($.BoundClosure__interceptorFieldNameCache == null) + $.BoundClosure__interceptorFieldNameCache = A.BoundClosure__computeFieldNamed("interceptor"); + if ($.BoundClosure__receiverFieldNameCache == null) + $.BoundClosure__receiverFieldNameCache = A.BoundClosure__computeFieldNamed("receiver"); + arity = $function.length; + t1 = A.Closure_cspForwardInterceptedCall(arity, needsDirectAccess, stubName, $function); + return t1; + }, + closureFromTearOff(parameters) { + return A.Closure_fromTearOff(parameters); + }, + BoundClosure_evalRecipe(closure, recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, A.instanceType(closure._receiver), recipe); + }, + BoundClosure_receiverOf(closure) { + return closure._receiver; + }, + BoundClosure_interceptorOf(closure) { + return closure._interceptor; + }, + BoundClosure__computeFieldNamed(fieldName) { + var names, i, $name, + template = new A.BoundClosure("receiver", "interceptor"), + t1 = Object.getOwnPropertyNames(template); + t1.$flags = 1; + names = t1; + for (t1 = names.length, i = 0; i < t1; ++i) { + $name = names[i]; + if (template[$name] === fieldName) + return $name; + } + throw A.wrapException(A.ArgumentError$("Field name " + fieldName + " not found.", null)); + }, + getIsolateAffinityTag($name) { + return init.getIsolateTag($name); + }, + defineProperty(obj, property, value) { + Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); + }, + lookupAndCacheInterceptor(obj) { + var interceptor, interceptorClass, altTag, mark, t1, + tag = $.getTagFunction.call$1(obj), + record = $.dispatchRecordsForInstanceTags[tag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[tag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[tag]; + if (interceptorClass == null) { + altTag = $.alternateTagFunction.call$2(obj, tag); + if (altTag != null) { + record = $.dispatchRecordsForInstanceTags[altTag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[altTag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[altTag]; + tag = altTag; + } + } + if (interceptorClass == null) + return null; + interceptor = interceptorClass.prototype; + mark = tag[0]; + if (mark === "!") { + record = A.makeLeafDispatchRecord(interceptor); + $.dispatchRecordsForInstanceTags[tag] = record; + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + if (mark === "~") { + $.interceptorsForUncacheableTags[tag] = interceptor; + return interceptor; + } + if (mark === "-") { + t1 = A.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } + if (mark === "+") + return A.patchInteriorProto(obj, interceptor); + if (mark === "*") + throw A.wrapException(A.UnimplementedError$(tag)); + if (init.leafTags[tag] === true) { + t1 = A.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } else + return A.patchInteriorProto(obj, interceptor); + }, + patchInteriorProto(obj, interceptor) { + var proto = Object.getPrototypeOf(obj); + Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); + return interceptor; + }, + makeLeafDispatchRecord(interceptor) { + return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); + }, + makeDefaultDispatchRecord(tag, interceptorClass, proto) { + var interceptor = interceptorClass.prototype; + if (init.leafTags[tag] === true) + return A.makeLeafDispatchRecord(interceptor); + else + return J.makeDispatchRecord(interceptor, proto, null, null); + }, + initNativeDispatch() { + if (true === $.initNativeDispatchFlag) + return; + $.initNativeDispatchFlag = true; + A.initNativeDispatchContinue(); + }, + initNativeDispatchContinue() { + var map, tags, fun, i, tag, proto, record, interceptorClass; + $.dispatchRecordsForInstanceTags = Object.create(null); + $.interceptorsForUncacheableTags = Object.create(null); + A.initHooks(); + map = init.interceptorsByTag; + tags = Object.getOwnPropertyNames(map); + if (typeof window != "undefined") { + window; + fun = function() { + }; + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + proto = $.prototypeForTagFunction.call$1(tag); + if (proto != null) { + record = A.makeDefaultDispatchRecord(tag, map[tag], proto); + if (record != null) { + Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + fun.prototype = proto; + } + } + } + } + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + if (/^[A-Za-z_]/.test(tag)) { + interceptorClass = map[tag]; + map["!" + tag] = interceptorClass; + map["~" + tag] = interceptorClass; + map["-" + tag] = interceptorClass; + map["+" + tag] = interceptorClass; + map["*" + tag] = interceptorClass; + } + } + }, + initHooks() { + var transformers, i, transformer, getTag, getUnknownTag, prototypeForTag, + hooks = B.C_JS_CONST0(); + hooks = A.applyHooksTransformer(B.C_JS_CONST1, A.applyHooksTransformer(B.C_JS_CONST2, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST3, A.applyHooksTransformer(B.C_JS_CONST4, A.applyHooksTransformer(B.C_JS_CONST5, A.applyHooksTransformer(B.C_JS_CONST6(B.C_JS_CONST), hooks))))))); + if (typeof dartNativeDispatchHooksTransformer != "undefined") { + transformers = dartNativeDispatchHooksTransformer; + if (typeof transformers == "function") + transformers = [transformers]; + if (Array.isArray(transformers)) + for (i = 0; i < transformers.length; ++i) { + transformer = transformers[i]; + if (typeof transformer == "function") + hooks = transformer(hooks) || hooks; + } + } + getTag = hooks.getTag; + getUnknownTag = hooks.getUnknownTag; + prototypeForTag = hooks.prototypeForTag; + $.getTagFunction = new A.initHooks_closure(getTag); + $.alternateTagFunction = new A.initHooks_closure0(getUnknownTag); + $.prototypeForTagFunction = new A.initHooks_closure1(prototypeForTag); + }, + applyHooksTransformer(transformer, hooks) { + return transformer(hooks) || hooks; + }, + _RecordN__equalValues(a, b) { + var i; + for (i = 0; i < a.length; ++i) + if (!J.$eq$(a[i], b[i])) + return false; + return true; + }, + createRecordTypePredicate(shape, fieldRtis) { + var $length = fieldRtis.length, + $function = init.rttc["" + $length + ";" + shape]; + if ($function == null) + return null; + if ($length === 0) + return $function; + if ($length === $function.length) + return $function.apply(null, fieldRtis); + return $function(fieldRtis); + }, + JSSyntaxRegExp_makeNative(source, multiLine, caseSensitive, unicode, dotAll, extraFlags) { + var m = multiLine ? "m" : "", + i = caseSensitive ? "" : "i", + u = unicode ? "u" : "", + s = dotAll ? "s" : "", + regexp = function(source, modifiers) { + try { + return new RegExp(source, modifiers); + } catch (e) { + return e; + } + }(source, m + i + u + s + extraFlags); + if (regexp instanceof RegExp) + return regexp; + throw A.wrapException(A.FormatException$("Illegal RegExp pattern (" + String(regexp) + ")", source, null)); + }, + stringContainsUnchecked(receiver, other, startIndex) { + var t1; + if (typeof other == "string") + return receiver.indexOf(other, startIndex) >= 0; + else if (other instanceof A.JSSyntaxRegExp) { + t1 = B.JSString_methods.substring$1(receiver, startIndex); + return other._nativeRegExp.test(t1); + } else + return !J.allMatches$1$s(other, B.JSString_methods.substring$1(receiver, startIndex)).get$isEmpty(0); + }, + escapeReplacement(replacement) { + if (replacement.indexOf("$", 0) >= 0) + return replacement.replace(/\$/g, "$$$$"); + return replacement; + }, + stringReplaceFirstRE(receiver, regexp, replacement, startIndex) { + var match = regexp._execGlobal$2(receiver, startIndex); + if (match == null) + return receiver; + return A.stringReplaceRangeUnchecked(receiver, match._match.index, match.get$end(0), replacement); + }, + quoteStringForRegExp(string) { + if (/[[\]{}()*+?.\\^$|]/.test(string)) + return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); + return string; + }, + stringReplaceAllUnchecked(receiver, pattern, replacement) { + var nativeRegexp; + if (typeof pattern == "string") + return A.stringReplaceAllUncheckedString(receiver, pattern, replacement); + if (pattern instanceof A.JSSyntaxRegExp) { + nativeRegexp = pattern.get$_nativeGlobalVersion(); + nativeRegexp.lastIndex = 0; + return receiver.replace(nativeRegexp, A.escapeReplacement(replacement)); + } + return A.stringReplaceAllGeneral(receiver, pattern, replacement); + }, + stringReplaceAllGeneral(receiver, pattern, replacement) { + var t1, startIndex, t2, match; + for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), startIndex = 0, t2 = ""; t1.moveNext$0();) { + match = t1.get$current(t1); + t2 = t2 + receiver.substring(startIndex, match.get$start(match)) + replacement; + startIndex = match.get$end(match); + } + t1 = t2 + receiver.substring(startIndex); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + stringReplaceAllUncheckedString(receiver, pattern, replacement) { + var $length, t1, i; + if (pattern === "") { + if (receiver === "") + return replacement; + $length = receiver.length; + for (t1 = replacement, i = 0; i < $length; ++i) + t1 = t1 + receiver[i] + replacement; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + if (receiver.indexOf(pattern, 0) < 0) + return receiver; + if (receiver.length < 500 || replacement.indexOf("$", 0) >= 0) + return receiver.split(pattern).join(replacement); + return receiver.replace(new RegExp(A.quoteStringForRegExp(pattern), "g"), A.escapeReplacement(replacement)); + }, + stringReplaceFirstUnchecked(receiver, pattern, replacement, startIndex) { + var index, t1, matches, match; + if (typeof pattern == "string") { + index = receiver.indexOf(pattern, startIndex); + if (index < 0) + return receiver; + return A.stringReplaceRangeUnchecked(receiver, index, index + pattern.length, replacement); + } + if (pattern instanceof A.JSSyntaxRegExp) + return startIndex === 0 ? receiver.replace(pattern._nativeRegExp, A.escapeReplacement(replacement)) : A.stringReplaceFirstRE(receiver, pattern, replacement, startIndex); + t1 = J.allMatches$2$s(pattern, receiver, startIndex); + matches = t1.get$iterator(t1); + if (!matches.moveNext$0()) + return receiver; + match = matches.get$current(matches); + return B.JSString_methods.replaceRange$3(receiver, match.get$start(match), match.get$end(match), replacement); + }, + stringReplaceRangeUnchecked(receiver, start, end, replacement) { + return receiver.substring(0, start) + replacement + receiver.substring(end); + }, + _Record_1: function _Record_1(t0) { + this._0 = t0; + }, + _Record_2: function _Record_2(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_2_forImport: function _Record_2_forImport(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_2_imports_modules: function _Record_2_imports_modules(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_2_loadedUrls_stylesheet: function _Record_2_loadedUrls_stylesheet(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_2_sourceMap: function _Record_2_sourceMap(t0, t1) { + this._0 = t0; + this._1 = t1; + }, + _Record_3: function _Record_3(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_3_deprecation_message_span: function _Record_3_deprecation_message_span(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_3_forImport: function _Record_3_forImport(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_3_importer_isDependency: function _Record_3_importer_isDependency(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_3_originalUrl: function _Record_3_originalUrl(t0, t1, t2) { + this._0 = t0; + this._1 = t1; + this._2 = t2; + }, + _Record_5_named_namedNodes_positional_positionalNodes_separator: function _Record_5_named_namedNodes_positional_positionalNodes_separator(t0) { + this._values = t0; + }, + ConstantMapView: function ConstantMapView(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + ConstantMap: function ConstantMap() { + }, + ConstantStringMap: function ConstantStringMap(t0, t1, t2) { + this._jsIndex = t0; + this._values = t1; + this.$ti = t2; + }, + _KeysOrValues: function _KeysOrValues(t0, t1) { + this._elements = t0; + this.$ti = t1; + }, + _KeysOrValuesOrElementsIterator: function _KeysOrValuesOrElementsIterator(t0, t1, t2) { + var _ = this; + _._elements = t0; + _.__js_helper$_length = t1; + _.__js_helper$_index = 0; + _.__js_helper$_current = null; + _.$ti = t2; + }, + ConstantSet: function ConstantSet() { + }, + ConstantStringSet: function ConstantStringSet(t0, t1, t2) { + this._jsIndex = t0; + this.__js_helper$_length = t1; + this.$ti = t2; + }, + GeneralConstantSet: function GeneralConstantSet(t0, t1) { + this._elements = t0; + this.$ti = t1; + }, + Instantiation: function Instantiation() { + }, + Instantiation1: function Instantiation1(t0, t1) { + this._genericClosure = t0; + this.$ti = t1; + }, + JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) { + var _ = this; + _.__js_helper$_memberName = t0; + _.__js_helper$_kind = t1; + _._arguments = t2; + _._namedArgumentNames = t3; + _._typeArgumentCount = t4; + }, + Primitives_functionNoSuchMethod_closure: function Primitives_functionNoSuchMethod_closure(t0, t1, t2) { + this._box_0 = t0; + this.namedArgumentList = t1; + this.$arguments = t2; + }, + SafeToStringHook: function SafeToStringHook() { + }, + TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._pattern = t0; + _._arguments = t1; + _._argumentsExpr = t2; + _._expr = t3; + _._method = t4; + _._receiver = t5; + }, + NullError: function NullError() { + }, + JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) { + this.__js_helper$_message = t0; + this._method = t1; + this._receiver = t2; + }, + UnknownJsTypeError: function UnknownJsTypeError(t0) { + this.__js_helper$_message = t0; + }, + NullThrownFromJavaScriptException: function NullThrownFromJavaScriptException(t0) { + this._irritant = t0; + }, + ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) { + this.dartException = t0; + this.stackTrace = t1; + }, + _StackTrace: function _StackTrace(t0) { + this._exception = t0; + this._trace = null; + }, + Closure: function Closure() { + }, + Closure0Args: function Closure0Args() { + }, + Closure2Args: function Closure2Args() { + }, + TearOffClosure: function TearOffClosure() { + }, + StaticClosure: function StaticClosure() { + }, + BoundClosure: function BoundClosure(t0, t1) { + this._receiver = t0; + this._interceptor = t1; + }, + RuntimeError: function RuntimeError(t0) { + this.message = t0; + }, + _Required: function _Required() { + }, + JsLinkedHashMap: function JsLinkedHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t0; + }, + JsLinkedHashMap_addAll_closure: function JsLinkedHashMap_addAll_closure(t0) { + this.$this = t0; + }, + LinkedHashMapCell: function LinkedHashMapCell(t0, t1) { + var _ = this; + _.hashMapCellKey = t0; + _.hashMapCellValue = t1; + _._previous = _._next = null; + }, + LinkedHashMapKeysIterable: function LinkedHashMapKeysIterable(t0, t1) { + this.__js_helper$_map = t0; + this.$ti = t1; + }, + LinkedHashMapKeyIterator: function LinkedHashMapKeyIterator(t0, t1, t2) { + var _ = this; + _.__js_helper$_map = t0; + _._modifications = t1; + _._cell = t2; + _.__js_helper$_current = null; + }, + LinkedHashMapValuesIterable: function LinkedHashMapValuesIterable(t0, t1) { + this.__js_helper$_map = t0; + this.$ti = t1; + }, + LinkedHashMapValueIterator: function LinkedHashMapValueIterator(t0, t1, t2) { + var _ = this; + _.__js_helper$_map = t0; + _._modifications = t1; + _._cell = t2; + _.__js_helper$_current = null; + }, + LinkedHashMapEntriesIterable: function LinkedHashMapEntriesIterable(t0, t1) { + this.__js_helper$_map = t0; + this.$ti = t1; + }, + LinkedHashMapEntryIterator: function LinkedHashMapEntryIterator(t0, t1, t2, t3) { + var _ = this; + _.__js_helper$_map = t0; + _._modifications = t1; + _._cell = t2; + _.__js_helper$_current = null; + _.$ti = t3; + }, + JsIdentityLinkedHashMap: function JsIdentityLinkedHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t0; + }, + JsConstantLinkedHashMap: function JsConstantLinkedHashMap(t0) { + var _ = this; + _.__js_helper$_length = 0; + _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t0; + }, + initHooks_closure: function initHooks_closure(t0) { + this.getTag = t0; + }, + initHooks_closure0: function initHooks_closure0(t0) { + this.getUnknownTag = t0; + }, + initHooks_closure1: function initHooks_closure1(t0) { + this.prototypeForTag = t0; + }, + _Record: function _Record() { + }, + _Record2: function _Record2() { + }, + _Record1: function _Record1() { + }, + _Record3: function _Record3() { + }, + _RecordN: function _RecordN() { + }, + JSSyntaxRegExp: function JSSyntaxRegExp(t0, t1) { + var _ = this; + _.pattern = t0; + _._nativeRegExp = t1; + _._hasCapturesCache = _._nativeAnchoredRegExp = _._nativeGlobalRegExp = null; + }, + _MatchImplementation: function _MatchImplementation(t0) { + this._match = t0; + }, + _AllMatchesIterable: function _AllMatchesIterable(t0, t1, t2) { + this._re = t0; + this.__js_helper$_string = t1; + this.__js_helper$_start = t2; + }, + _AllMatchesIterator: function _AllMatchesIterator(t0, t1, t2) { + var _ = this; + _._regExp = t0; + _.__js_helper$_string = t1; + _._nextIndex = t2; + _.__js_helper$_current = null; + }, + StringMatch: function StringMatch(t0, t1) { + this.start = t0; + this.pattern = t1; + }, + _StringAllMatchesIterable: function _StringAllMatchesIterable(t0, t1, t2) { + this._input = t0; + this._pattern = t1; + this.__js_helper$_index = t2; + }, + _StringAllMatchesIterator: function _StringAllMatchesIterator(t0, t1, t2) { + var _ = this; + _._input = t0; + _._pattern = t1; + _.__js_helper$_index = t2; + _.__js_helper$_current = null; + }, + throwLateFieldADI(fieldName) { + throw A.initializeExceptionWrapper(A.LateError$fieldADI(fieldName), new Error()); + }, + throwUnnamedLateFieldNI() { + throw A.initializeExceptionWrapper(A.LateError$fieldNI(""), new Error()); + }, + throwUnnamedLateFieldAI() { + throw A.initializeExceptionWrapper(A.LateError$fieldAI(""), new Error()); + }, + throwUnnamedLateFieldADI() { + throw A.initializeExceptionWrapper(A.LateError$fieldADI(""), new Error()); + }, + _Cell$() { + var t1 = new A._Cell(); + return t1.__late_helper$_value = t1; + }, + _Cell: function _Cell() { + this.__late_helper$_value = null; + }, + _ensureNativeList(list) { + return list; + }, + NativeFloat64List_NativeFloat64List$fromList(elements) { + return new Float64Array(A._ensureNativeList(elements)); + }, + NativeInt8List__create1(arg) { + return new Int8Array(arg); + }, + NativeUint8List_NativeUint8List($length) { + return new Uint8Array($length); + }, + _checkValidIndex(index, list, $length) { + if (index >>> 0 !== index || index >= $length) + throw A.wrapException(A.diagnoseIndexError(list, index)); + }, + _checkValidRange(start, end, $length) { + var t1; + if (!(start >>> 0 !== start)) + if (end == null) + t1 = start > $length; + else + t1 = end >>> 0 !== end || start > end || end > $length; + else + t1 = true; + if (t1) + throw A.wrapException(A.diagnoseRangeError(start, end, $length)); + if (end == null) + return $length; + return end; + }, + NativeByteBuffer: function NativeByteBuffer() { + }, + NativeTypedData: function NativeTypedData() { + }, + NativeByteData: function NativeByteData() { + }, + NativeTypedArray: function NativeTypedArray() { + }, + NativeTypedArrayOfDouble: function NativeTypedArrayOfDouble() { + }, + NativeTypedArrayOfInt: function NativeTypedArrayOfInt() { + }, + NativeFloat32List: function NativeFloat32List() { + }, + NativeFloat64List: function NativeFloat64List() { + }, + NativeInt16List: function NativeInt16List() { + }, + NativeInt32List: function NativeInt32List() { + }, + NativeInt8List: function NativeInt8List() { + }, + NativeUint16List: function NativeUint16List() { + }, + NativeUint32List: function NativeUint32List() { + }, + NativeUint8ClampedList: function NativeUint8ClampedList() { + }, + NativeUint8List: function NativeUint8List() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin() { + }, + _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() { + }, + Rti__getFutureFromFutureOr(universe, rti) { + var future = rti._precomputed1; + return future == null ? rti._precomputed1 = A._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future; + }, + Rti__isUnionOfFunctionType(rti) { + var kind = rti._kind; + if (kind === 6 || kind === 7) + return A.Rti__isUnionOfFunctionType(rti._primary); + return kind === 11 || kind === 12; + }, + Rti__getCanonicalRecipe(rti) { + return rti._canonicalRecipe; + }, + pairwiseIsTest(fieldRtis, values) { + var i, + $length = values.length; + for (i = 0; i < $length; ++i) + if (!fieldRtis[i]._is(values[i])) + return false; + return true; + }, + findType(recipe) { + return A._Universe_eval(init.typeUniverse, recipe, false); + }, + instantiatedGenericFunctionType(genericFunctionRti, instantiationRti) { + var t1, cache, key, probe, rti; + if (genericFunctionRti == null) + return null; + t1 = instantiationRti._rest; + cache = genericFunctionRti._bindCache; + if (cache == null) + cache = genericFunctionRti._bindCache = new Map(); + key = instantiationRti._canonicalRecipe; + probe = cache.get(key); + if (probe != null) + return probe; + rti = A._substitute(init.typeUniverse, genericFunctionRti._primary, t1, 0); + cache.set(key, rti); + return rti; + }, + _substitute(universe, rti, typeArguments, depth) { + var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, t1, fields, substitutedFields, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument, + kind = rti._kind; + switch (kind) { + case 5: + case 1: + case 2: + case 3: + case 4: + return rti; + case 6: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupQuestionRti(universe, substitutedBaseType, true); + case 7: + baseType = rti._primary; + substitutedBaseType = A._substitute(universe, baseType, typeArguments, depth); + if (substitutedBaseType === baseType) + return rti; + return A._Universe__lookupFutureOrRti(universe, substitutedBaseType, true); + case 8: + interfaceTypeArguments = rti._rest; + substitutedInterfaceTypeArguments = A._substituteArray(universe, interfaceTypeArguments, typeArguments, depth); + if (substitutedInterfaceTypeArguments === interfaceTypeArguments) + return rti; + return A._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments); + case 9: + base = rti._primary; + substitutedBase = A._substitute(universe, base, typeArguments, depth); + $arguments = rti._rest; + substitutedArguments = A._substituteArray(universe, $arguments, typeArguments, depth); + if (substitutedBase === base && substitutedArguments === $arguments) + return rti; + return A._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments); + case 10: + t1 = rti._primary; + fields = rti._rest; + substitutedFields = A._substituteArray(universe, fields, typeArguments, depth); + if (substitutedFields === fields) + return rti; + return A._Universe__lookupRecordRti(universe, t1, substitutedFields); + case 11: + returnType = rti._primary; + substitutedReturnType = A._substitute(universe, returnType, typeArguments, depth); + functionParameters = rti._rest; + substitutedFunctionParameters = A._substituteFunctionParameters(universe, functionParameters, typeArguments, depth); + if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters) + return rti; + return A._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters); + case 12: + bounds = rti._rest; + depth += bounds.length; + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, depth); + base = rti._primary; + substitutedBase = A._substitute(universe, base, typeArguments, depth); + if (substitutedBounds === bounds && substitutedBase === base) + return rti; + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true); + case 13: + index = rti._primary; + if (index < depth) + return rti; + argument = typeArguments[index - depth]; + if (argument == null) + return rti; + return argument; + default: + throw A.wrapException(A.AssertionError$("Attempted to substitute unexpected RTI kind " + kind)); + } + }, + _substituteArray(universe, rtiArray, typeArguments, depth) { + var changed, i, rti, substitutedRti, + $length = rtiArray.length, + result = A._Utils_newArrayOrEmpty($length); + for (changed = false, i = 0; i < $length; ++i) { + rti = rtiArray[i]; + substitutedRti = A._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result[i] = substitutedRti; + } + return changed ? result : rtiArray; + }, + _substituteNamed(universe, namedArray, typeArguments, depth) { + var changed, i, t1, t2, rti, substitutedRti, + $length = namedArray.length, + result = A._Utils_newArrayOrEmpty($length); + for (changed = false, i = 0; i < $length; i += 3) { + t1 = namedArray[i]; + t2 = namedArray[i + 1]; + rti = namedArray[i + 2]; + substitutedRti = A._substitute(universe, rti, typeArguments, depth); + if (substitutedRti !== rti) + changed = true; + result.splice(i, 3, t1, t2, substitutedRti); + } + return changed ? result : namedArray; + }, + _substituteFunctionParameters(universe, functionParameters, typeArguments, depth) { + var result, + requiredPositional = functionParameters._requiredPositional, + substitutedRequiredPositional = A._substituteArray(universe, requiredPositional, typeArguments, depth), + optionalPositional = functionParameters._optionalPositional, + substitutedOptionalPositional = A._substituteArray(universe, optionalPositional, typeArguments, depth), + named = functionParameters._named, + substitutedNamed = A._substituteNamed(universe, named, typeArguments, depth); + if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named) + return functionParameters; + result = new A._FunctionParameters(); + result._requiredPositional = substitutedRequiredPositional; + result._optionalPositional = substitutedOptionalPositional; + result._named = substitutedNamed; + return result; + }, + _setArrayType(target, rti) { + target[init.arrayRti] = rti; + return target; + }, + closureFunctionType(closure) { + var signature = closure.$signature; + if (signature != null) { + if (typeof signature == "number") + return A.getTypeFromTypesTable(signature); + return closure.$signature(); + } + return null; + }, + instanceOrFunctionType(object, testRti) { + var rti; + if (A.Rti__isUnionOfFunctionType(testRti)) + if (object instanceof A.Closure) { + rti = A.closureFunctionType(object); + if (rti != null) + return rti; + } + return A.instanceType(object); + }, + instanceType(object) { + if (object instanceof A.Object) + return A._instanceType(object); + if (Array.isArray(object)) + return A._arrayInstanceType(object); + return A._instanceTypeFromConstructor(J.getInterceptor$(object)); + }, + _arrayInstanceType(object) { + var rti = object[init.arrayRti], + defaultRti = type$.JSArray_dynamic; + if (rti == null) + return defaultRti; + if (rti.constructor !== defaultRti.constructor) + return defaultRti; + return rti; + }, + _instanceType(object) { + var rti = object.$ti; + return rti != null ? rti : A._instanceTypeFromConstructor(object); + }, + _instanceTypeFromConstructor(instance) { + var $constructor = instance.constructor, + probe = $constructor.$ccache; + if (probe != null) + return probe; + return A._instanceTypeFromConstructorMiss(instance, $constructor); + }, + _instanceTypeFromConstructorMiss(instance, $constructor) { + var effectiveConstructor = instance instanceof A.Closure ? Object.getPrototypeOf(Object.getPrototypeOf(instance)).constructor : $constructor, + rti = A._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name); + $constructor.$ccache = rti; + return rti; + }, + getTypeFromTypesTable(index) { + var rti, + table = init.types, + type = table[index]; + if (typeof type == "string") { + rti = A._Universe_eval(init.typeUniverse, type, false); + table[index] = rti; + return rti; + } + return type; + }, + getRuntimeTypeOfDartObject(object) { + return A.createRuntimeType(A._instanceType(object)); + }, + getRuntimeTypeOfClosure(closure) { + var rti = A.closureFunctionType(closure); + return A.createRuntimeType(rti == null ? A.instanceType(closure) : rti); + }, + _structuralTypeOf(object) { + var functionRti; + if (object instanceof A._Record) + return A.evaluateRtiForRecord(object.$recipe, object._getFieldValues$0()); + functionRti = object instanceof A.Closure ? A.closureFunctionType(object) : null; + if (functionRti != null) + return functionRti; + if (type$.TrustedGetRuntimeType._is(object)) + return J.get$runtimeType$(object)._rti; + if (Array.isArray(object)) + return A._arrayInstanceType(object); + return A.instanceType(object); + }, + createRuntimeType(rti) { + var t1 = rti._cachedRuntimeType; + return t1 == null ? rti._cachedRuntimeType = new A._Type(rti) : t1; + }, + evaluateRtiForRecord(recordRecipe, valuesList) { + var bindings, i, + values = valuesList, + $length = values.length; + if ($length === 0) + return type$.Record_0; + bindings = A._Universe_evalInEnvironment(init.typeUniverse, A._structuralTypeOf(values[0]), "@<0>"); + for (i = 1; i < $length; ++i) + bindings = A._Universe_bind(init.typeUniverse, bindings, A._structuralTypeOf(values[i])); + return A._Universe_evalInEnvironment(init.typeUniverse, bindings, recordRecipe); + }, + typeLiteral(recipe) { + return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); + }, + _installSpecializedIsTest(object) { + var testRti = this; + testRti._is = A._specializedIsTest(testRti); + return testRti._is(object); + }, + _specializedIsTest(testRti) { + var kind, simpleIsFn, $name, predicate; + if (testRti === type$.Object) + return A._isObject; + if (A.isTopType(testRti)) + return A._isTop; + kind = testRti._kind; + if (kind === 6) + return A._generalNullableIsTestImplementation; + if (kind === 1) + return A._isNever; + if (kind === 7) + return A._isFutureOr; + simpleIsFn = A._simpleSpecializedIsTest(testRti); + if (simpleIsFn != null) + return simpleIsFn; + if (kind === 8) { + $name = testRti._primary; + if (testRti._rest.every(A.isTopType)) { + testRti._specializedTestResource = "$is" + $name; + if ($name === "List") + return A._isListTestViaProperty; + if (testRti === type$.JSObject) + return A._isJSObject; + return A._isTestViaProperty; + } + } else if (kind === 10) { + predicate = A.createRecordTypePredicate(testRti._primary, testRti._rest); + return predicate == null ? A._isNever : predicate; + } + return A._generalIsTestImplementation; + }, + _simpleSpecializedIsTest(testRti) { + if (testRti._kind === 8) { + if (testRti === type$.int) + return A._isInt; + if (testRti === type$.double || testRti === type$.num) + return A._isNum; + if (testRti === type$.String) + return A._isString; + if (testRti === type$.bool) + return A._isBool; + } + return null; + }, + _installSpecializedAsCheck(object) { + var testRti = this, + asFn = A._generalAsCheckImplementation; + if (A.isTopType(testRti)) + asFn = A._asTop; + else if (testRti === type$.Object) + asFn = A._asObject; + else if (A.isNullable(testRti)) { + asFn = A._generalNullableAsCheckImplementation; + if (testRti === type$.nullable_int) + asFn = A._asIntQ; + else if (testRti === type$.nullable_String) + asFn = A._asStringQ; + else if (testRti === type$.nullable_bool) + asFn = A._asBoolQ; + else if (testRti === type$.nullable_num) + asFn = A._asNumQ; + else if (testRti === type$.nullable_double) + asFn = A._asDoubleQ; + else if (testRti === type$.nullable_JSObject) + asFn = A._asJSObjectQ; + } else if (testRti === type$.int) + asFn = A._asInt; + else if (testRti === type$.String) + asFn = A._asString; + else if (testRti === type$.bool) + asFn = A._asBool; + else if (testRti === type$.num) + asFn = A._asNum; + else if (testRti === type$.double) + asFn = A._asDouble; + else if (testRti === type$.JSObject) + asFn = A._asJSObject; + testRti._as = asFn; + return testRti._as(object); + }, + _generalIsTestImplementation(object) { + var testRti = this; + if (object == null) + return A.isNullable(testRti); + return A.isSubtype(init.typeUniverse, A.instanceOrFunctionType(object, testRti), testRti); + }, + _generalNullableIsTestImplementation(object) { + if (object == null) + return true; + return this._primary._is(object); + }, + _isTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A.isNullable(testRti); + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _isListTestViaProperty(object) { + var tag, testRti = this; + if (object == null) + return A.isNullable(testRti); + if (typeof object != "object") + return false; + if (Array.isArray(object)) + return true; + tag = testRti._specializedTestResource; + if (object instanceof A.Object) + return !!object[tag]; + return !!J.getInterceptor$(object)[tag]; + }, + _isJSObject(object) { + var t1 = this; + if (object == null) + return false; + if (typeof object == "object") { + if (object instanceof A.Object) + return !!object[t1._specializedTestResource]; + return true; + } + if (typeof object == "function") + return true; + return false; + }, + _isJSObjectStandalone(object) { + if (typeof object == "object") { + if (object instanceof A.Object) + return type$.JSObject._is(object); + return true; + } + if (typeof object == "function") + return true; + return false; + }, + _generalAsCheckImplementation(object) { + var testRti = this; + if (object == null) { + if (A.isNullable(testRti)) + return object; + } else if (testRti._is(object)) + return object; + throw A.initializeExceptionWrapper(A._errorForAsCheck(object, testRti), new Error()); + }, + _generalNullableAsCheckImplementation(object) { + var testRti = this; + if (object == null || testRti._is(object)) + return object; + throw A.initializeExceptionWrapper(A._errorForAsCheck(object, testRti), new Error()); + }, + _errorForAsCheck(object, testRti) { + return new A._TypeError("TypeError: " + A._Error_compose(object, A._rtiToString(testRti, null))); + }, + _Error_compose(object, checkedTypeDescription) { + return A.Error_safeToString(object) + ": type '" + A._rtiToString(A._structuralTypeOf(object), null) + "' is not a subtype of type '" + checkedTypeDescription + "'"; + }, + _TypeError__TypeError$forType(object, type) { + return new A._TypeError("TypeError: " + A._Error_compose(object, type)); + }, + _isFutureOr(object) { + var testRti = this; + return testRti._primary._is(object) || A.Rti__getFutureFromFutureOr(init.typeUniverse, testRti)._is(object); + }, + _isObject(object) { + return object != null; + }, + _asObject(object) { + if (object != null) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "Object"), new Error()); + }, + _isTop(object) { + return true; + }, + _asTop(object) { + return object; + }, + _isNever(object) { + return false; + }, + _isBool(object) { + return true === object || false === object; + }, + _asBool(object) { + if (true === object) + return true; + if (false === object) + return false; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "bool"), new Error()); + }, + _asBoolQ(object) { + if (true === object) + return true; + if (false === object) + return false; + if (object == null) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "bool?"), new Error()); + }, + _asDouble(object) { + if (typeof object == "number") + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "double"), new Error()); + }, + _asDoubleQ(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "double?"), new Error()); + }, + _isInt(object) { + return typeof object == "number" && Math.floor(object) === object; + }, + _asInt(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "int"), new Error()); + }, + _asIntQ(object) { + if (typeof object == "number" && Math.floor(object) === object) + return object; + if (object == null) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "int?"), new Error()); + }, + _isNum(object) { + return typeof object == "number"; + }, + _asNum(object) { + if (typeof object == "number") + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "num"), new Error()); + }, + _asNumQ(object) { + if (typeof object == "number") + return object; + if (object == null) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "num?"), new Error()); + }, + _isString(object) { + return typeof object == "string"; + }, + _asString(object) { + if (typeof object == "string") + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "String"), new Error()); + }, + _asStringQ(object) { + if (typeof object == "string") + return object; + if (object == null) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "String?"), new Error()); + }, + _asJSObject(object) { + if (A._isJSObjectStandalone(object)) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "JSObject"), new Error()); + }, + _asJSObjectQ(object) { + if (object == null) + return object; + if (A._isJSObjectStandalone(object)) + return object; + throw A.initializeExceptionWrapper(A._TypeError__TypeError$forType(object, "JSObject?"), new Error()); + }, + _rtiArrayToString(array, genericContext) { + var s, sep, i; + for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ") + s += sep + A._rtiToString(array[i], genericContext); + return s; + }, + _recordRtiToString(recordType, genericContext) { + var fieldCount, names, namesIndex, s, comma, i, + partialShape = recordType._primary, + fields = recordType._rest; + if ("" === partialShape) + return "(" + A._rtiArrayToString(fields, genericContext) + ")"; + fieldCount = fields.length; + names = partialShape.split(","); + namesIndex = names.length - fieldCount; + for (s = "(", comma = "", i = 0; i < fieldCount; ++i, comma = ", ") { + s += comma; + if (namesIndex === 0) + s += "{"; + s += A._rtiToString(fields[i], genericContext); + if (namesIndex >= 0) + s += " " + names[namesIndex]; + ++namesIndex; + } + return s + "})"; + }, + _functionRtiToString(functionType, genericContext, bounds) { + var boundsLength, offset, i, t1, typeParametersText, typeSep, boundRti, kind, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", ", outerContextLength = null; + if (bounds != null) { + boundsLength = bounds.length; + if (genericContext == null) + genericContext = A._setArrayType([], type$.JSArray_String); + else + outerContextLength = genericContext.length; + offset = genericContext.length; + for (i = boundsLength; i > 0; --i) + genericContext.push("T" + (offset + i)); + for (t1 = type$.nullable_Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) { + typeParametersText = typeParametersText + typeSep + genericContext[genericContext.length - 1 - i]; + boundRti = bounds[i]; + kind = boundRti._kind; + if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1)) + typeParametersText += " extends " + A._rtiToString(boundRti, genericContext); + } + typeParametersText += ">"; + } else + typeParametersText = ""; + t1 = functionType._primary; + parameters = functionType._rest; + requiredPositional = parameters._requiredPositional; + requiredPositionalLength = requiredPositional.length; + optionalPositional = parameters._optionalPositional; + optionalPositionalLength = optionalPositional.length; + named = parameters._named; + namedLength = named.length; + returnTypeText = A._rtiToString(t1, genericContext); + for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_) + argumentsText += sep + A._rtiToString(requiredPositional[i], genericContext); + if (optionalPositionalLength > 0) { + argumentsText += sep + "["; + for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_) + argumentsText += sep + A._rtiToString(optionalPositional[i], genericContext); + argumentsText += "]"; + } + if (namedLength > 0) { + argumentsText += sep + "{"; + for (sep = "", i = 0; i < namedLength; i += 3, sep = _s2_) { + argumentsText += sep; + if (named[i + 1]) + argumentsText += "required "; + argumentsText += A._rtiToString(named[i + 2], genericContext) + " " + named[i]; + } + argumentsText += "}"; + } + if (outerContextLength != null) { + genericContext.toString; + genericContext.length = outerContextLength; + } + return typeParametersText + "(" + argumentsText + ") => " + returnTypeText; + }, + _rtiToString(rti, genericContext) { + var questionArgument, s, argumentKind, $name, $arguments, t1, + kind = rti._kind; + if (kind === 5) + return "erased"; + if (kind === 2) + return "dynamic"; + if (kind === 3) + return "void"; + if (kind === 1) + return "Never"; + if (kind === 4) + return "any"; + if (kind === 6) { + questionArgument = rti._primary; + s = A._rtiToString(questionArgument, genericContext); + argumentKind = questionArgument._kind; + return (argumentKind === 11 || argumentKind === 12 ? "(" + s + ")" : s) + "?"; + } + if (kind === 7) + return "FutureOr<" + A._rtiToString(rti._primary, genericContext) + ">"; + if (kind === 8) { + $name = A._unminifyOrTag(rti._primary); + $arguments = rti._rest; + return $arguments.length > 0 ? $name + ("<" + A._rtiArrayToString($arguments, genericContext) + ">") : $name; + } + if (kind === 10) + return A._recordRtiToString(rti, genericContext); + if (kind === 11) + return A._functionRtiToString(rti, genericContext, null); + if (kind === 12) + return A._functionRtiToString(rti._primary, genericContext, rti._rest); + if (kind === 13) { + t1 = rti._primary; + return genericContext[genericContext.length - 1 - t1]; + } + return "?"; + }, + _unminifyOrTag(rawClassName) { + var preserved = init.mangledGlobalNames[rawClassName]; + if (preserved != null) + return preserved; + return rawClassName; + }, + _Universe_findRule(universe, targetType) { + var rule = universe.tR[targetType]; + while (typeof rule == "string") + rule = universe.tR[rule]; + return rule; + }, + _Universe_findErasedType(universe, cls) { + var $length, erased, $arguments, i, $interface, + metadata = universe.eT, + probe = metadata[cls]; + if (probe == null) + return A._Universe_eval(universe, cls, false); + else if (typeof probe == "number") { + $length = probe; + erased = A._Universe__lookupTerminalRti(universe, 5, "#"); + $arguments = A._Utils_newArrayOrEmpty($length); + for (i = 0; i < $length; ++i) + $arguments[i] = erased; + $interface = A._Universe__lookupInterfaceRti(universe, cls, $arguments); + metadata[cls] = $interface; + return $interface; + } else + return probe; + }, + _Universe_addRules(universe, rules) { + return A._Utils_objectAssign(universe.tR, rules); + }, + _Universe_addErasedTypes(universe, types) { + return A._Utils_objectAssign(universe.eT, types); + }, + _Universe_eval(universe, recipe, normalize) { + var rti, + cache = universe.eC, + probe = cache.get(recipe); + if (probe != null) + return probe; + rti = A._Parser_parse(A._Parser_create(universe, null, recipe, false)); + cache.set(recipe, rti); + return rti; + }, + _Universe_evalInEnvironment(universe, environment, recipe) { + var probe, rti, + cache = environment._evalCache; + if (cache == null) + cache = environment._evalCache = new Map(); + probe = cache.get(recipe); + if (probe != null) + return probe; + rti = A._Parser_parse(A._Parser_create(universe, environment, recipe, true)); + cache.set(recipe, rti); + return rti; + }, + _Universe_bind(universe, environment, argumentsRti) { + var argumentsRecipe, probe, rti, + cache = environment._bindCache; + if (cache == null) + cache = environment._bindCache = new Map(); + argumentsRecipe = argumentsRti._canonicalRecipe; + probe = cache.get(argumentsRecipe); + if (probe != null) + return probe; + rti = A._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 9 ? argumentsRti._rest : [argumentsRti]); + cache.set(argumentsRecipe, rti); + return rti; + }, + _Universe__installTypeTests(universe, rti) { + rti._as = A._installSpecializedAsCheck; + rti._is = A._installSpecializedIsTest; + return rti; + }, + _Universe__lookupTerminalRti(universe, kind, key) { + var rti, t1, + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = kind; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupQuestionRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "?", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createQuestionRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createQuestionRti(universe, baseType, key, normalize) { + var baseKind, t1, rti; + if (normalize) { + baseKind = baseType._kind; + t1 = true; + if (!A.isTopType(baseType)) + if (!(baseType === type$.Null || baseType === type$.JSNull)) + if (baseKind !== 6) + t1 = baseKind === 7 && A.isNullable(baseType._primary); + if (t1) + return baseType; + else if (baseKind === 1) + return type$.Null; + } + rti = new A.Rti(null, null); + rti._kind = 6; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupFutureOrRti(universe, baseType, normalize) { + var t1, + key = baseType._canonicalRecipe + "/", + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createFutureOrRti(universe, baseType, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createFutureOrRti(universe, baseType, key, normalize) { + var t1, rti; + if (normalize) { + t1 = baseType._kind; + if (A.isTopType(baseType) || baseType === type$.Object) + return baseType; + else if (t1 === 1) + return A._Universe__lookupInterfaceRti(universe, "Future", [baseType]); + else if (baseType === type$.Null || baseType === type$.JSNull) + return type$.nullable_Future_Null; + } + rti = new A.Rti(null, null); + rti._kind = 7; + rti._primary = baseType; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Universe__lookupGenericFunctionParameterRti(universe, index) { + var rti, t1, + key = "" + index + "^", + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 13; + rti._primary = index; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__canonicalRecipeJoin($arguments) { + var s, sep, i, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",") + s += sep + $arguments[i]._canonicalRecipe; + return s; + }, + _Universe__canonicalRecipeJoinNamed($arguments) { + var s, sep, i, t1, nameSep, + $length = $arguments.length; + for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") { + t1 = $arguments[i]; + nameSep = $arguments[i + 1] ? "!" : ":"; + s += sep + t1 + nameSep + $arguments[i + 2]._canonicalRecipe; + } + return s; + }, + _Universe__lookupInterfaceRti(universe, $name, $arguments) { + var probe, rti, t1, + s = $name; + if ($arguments.length > 0) + s += "<" + A._Universe__canonicalRecipeJoin($arguments) + ">"; + probe = universe.eC.get(s); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 8; + rti._primary = $name; + rti._rest = $arguments; + if ($arguments.length > 0) + rti._precomputed1 = $arguments[0]; + rti._canonicalRecipe = s; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(s, t1); + return t1; + }, + _Universe__lookupBindingRti(universe, base, $arguments) { + var newBase, newArguments, key, probe, rti, t1; + if (base._kind === 9) { + newBase = base._primary; + newArguments = base._rest.concat($arguments); + } else { + newArguments = $arguments; + newBase = base; + } + key = newBase._canonicalRecipe + (";<" + A._Universe__canonicalRecipeJoin(newArguments) + ">"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 9; + rti._primary = newBase; + rti._rest = newArguments; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupRecordRti(universe, partialShapeTag, fields) { + var rti, t1, + key = "+" + (partialShapeTag + "(" + A._Universe__canonicalRecipeJoin(fields) + ")"), + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 10; + rti._primary = partialShapeTag; + rti._rest = fields; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupFunctionRti(universe, returnType, parameters) { + var sep, key, probe, rti, t1, + s = returnType._canonicalRecipe, + requiredPositional = parameters._requiredPositional, + requiredPositionalLength = requiredPositional.length, + optionalPositional = parameters._optionalPositional, + optionalPositionalLength = optionalPositional.length, + named = parameters._named, + namedLength = named.length, + recipe = "(" + A._Universe__canonicalRecipeJoin(requiredPositional); + if (optionalPositionalLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + recipe += sep + "[" + A._Universe__canonicalRecipeJoin(optionalPositional) + "]"; + } + if (namedLength > 0) { + sep = requiredPositionalLength > 0 ? "," : ""; + recipe += sep + "{" + A._Universe__canonicalRecipeJoinNamed(named) + "}"; + } + key = s + (recipe + ")"); + probe = universe.eC.get(key); + if (probe != null) + return probe; + rti = new A.Rti(null, null); + rti._kind = 11; + rti._primary = returnType; + rti._rest = parameters; + rti._canonicalRecipe = key; + t1 = A._Universe__installTypeTests(universe, rti); + universe.eC.set(key, t1); + return t1; + }, + _Universe__lookupGenericFunctionRti(universe, baseFunctionType, bounds, normalize) { + var t1, + key = baseFunctionType._canonicalRecipe + ("<" + A._Universe__canonicalRecipeJoin(bounds) + ">"), + probe = universe.eC.get(key); + if (probe != null) + return probe; + t1 = A._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize); + universe.eC.set(key, t1); + return t1; + }, + _Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize) { + var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti; + if (normalize) { + $length = bounds.length; + typeArguments = A._Utils_newArrayOrEmpty($length); + for (count = 0, i = 0; i < $length; ++i) { + bound = bounds[i]; + if (bound._kind === 1) { + typeArguments[i] = bound; + ++count; + } + } + if (count > 0) { + substitutedBase = A._substitute(universe, baseFunctionType, typeArguments, 0); + substitutedBounds = A._substituteArray(universe, bounds, typeArguments, 0); + return A._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds); + } + } + rti = new A.Rti(null, null); + rti._kind = 12; + rti._primary = baseFunctionType; + rti._rest = bounds; + rti._canonicalRecipe = key; + return A._Universe__installTypeTests(universe, rti); + }, + _Parser_create(universe, environment, recipe, normalize) { + return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; + }, + _Parser_parse(parser) { + var t1, i, ch, u, array, end, item, + source = parser.r, + stack = parser.s; + for (t1 = source.length, i = 0; i < t1;) { + ch = source.charCodeAt(i); + if (ch >= 48 && ch <= 57) + i = A._Parser_handleDigit(i + 1, ch, source, stack); + else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124) + i = A._Parser_handleIdentifier(parser, i, source, stack, false); + else if (ch === 46) + i = A._Parser_handleIdentifier(parser, i, source, stack, true); + else { + ++i; + switch (ch) { + case 44: + break; + case 58: + stack.push(false); + break; + case 33: + stack.push(true); + break; + case 59: + stack.push(A._Parser_toType(parser.u, parser.e, stack.pop())); + break; + case 94: + stack.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, stack.pop())); + break; + case 35: + stack.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); + break; + case 64: + stack.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); + break; + case 126: + stack.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); + break; + case 60: + stack.push(parser.p); + parser.p = stack.length; + break; + case 62: + A._Parser_handleTypeArguments(parser, stack); + break; + case 38: + A._Parser_handleExtendedOperations(parser, stack); + break; + case 63: + u = parser.u; + stack.push(A._Universe__lookupQuestionRti(u, A._Parser_toType(u, parser.e, stack.pop()), parser.n)); + break; + case 47: + u = parser.u; + stack.push(A._Universe__lookupFutureOrRti(u, A._Parser_toType(u, parser.e, stack.pop()), parser.n)); + break; + case 40: + stack.push(-3); + stack.push(parser.p); + parser.p = stack.length; + break; + case 41: + A._Parser_handleArguments(parser, stack); + break; + case 91: + stack.push(parser.p); + parser.p = stack.length; + break; + case 93: + array = stack.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = stack.pop(); + stack.push(array); + stack.push(-1); + break; + case 123: + stack.push(parser.p); + parser.p = stack.length; + break; + case 125: + array = stack.splice(parser.p); + A._Parser_toTypesNamed(parser.u, parser.e, array); + parser.p = stack.pop(); + stack.push(array); + stack.push(-2); + break; + case 43: + end = source.indexOf("(", i); + stack.push(source.substring(i, end)); + stack.push(-4); + stack.push(parser.p); + parser.p = stack.length; + i = end + 1; + break; + default: + throw "Bad character " + ch; + } + } + } + item = stack.pop(); + return A._Parser_toType(parser.u, parser.e, item); + }, + _Parser_handleDigit(i, digit, source, stack) { + var t1, ch, + value = digit - 48; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (!(ch >= 48 && ch <= 57)) + break; + value = value * 10 + (ch - 48); + } + stack.push(value); + return i; + }, + _Parser_handleIdentifier(parser, start, source, stack, hasPeriod) { + var t1, ch, t2, string, environment, recipe, + i = start + 1; + for (t1 = source.length; i < t1; ++i) { + ch = source.charCodeAt(i); + if (ch === 46) { + if (hasPeriod) + break; + hasPeriod = true; + } else { + if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124)) + t2 = ch >= 48 && ch <= 57; + else + t2 = true; + if (!t2) + break; + } + } + string = source.substring(start, i); + if (hasPeriod) { + t1 = parser.u; + environment = parser.e; + if (environment._kind === 9) + environment = environment._primary; + recipe = A._Universe_findRule(t1, environment._primary)[string]; + if (recipe == null) + A.throwExpression('No "' + string + '" in "' + A.Rti__getCanonicalRecipe(environment) + '"'); + stack.push(A._Universe_evalInEnvironment(t1, environment, recipe)); + } else + stack.push(string); + return i; + }, + _Parser_handleTypeArguments(parser, stack) { + var base, + universe = parser.u, + $arguments = A._Parser_collectArray(parser, stack), + head = stack.pop(); + if (typeof head == "string") + stack.push(A._Universe__lookupInterfaceRti(universe, head, $arguments)); + else { + base = A._Parser_toType(universe, parser.e, head); + switch (base._kind) { + case 11: + stack.push(A._Universe__lookupGenericFunctionRti(universe, base, $arguments, parser.n)); + break; + default: + stack.push(A._Universe__lookupBindingRti(universe, base, $arguments)); + break; + } + } + }, + _Parser_handleArguments(parser, stack) { + var requiredPositional, returnType, parameters, + universe = parser.u, + head = stack.pop(), + optionalPositional = null, named = null; + if (typeof head == "number") + switch (head) { + case -1: + optionalPositional = stack.pop(); + break; + case -2: + named = stack.pop(); + break; + default: + stack.push(head); + break; + } + else + stack.push(head); + requiredPositional = A._Parser_collectArray(parser, stack); + head = stack.pop(); + switch (head) { + case -3: + head = stack.pop(); + if (optionalPositional == null) + optionalPositional = universe.sEA; + if (named == null) + named = universe.sEA; + returnType = A._Parser_toType(universe, parser.e, head); + parameters = new A._FunctionParameters(); + parameters._requiredPositional = requiredPositional; + parameters._optionalPositional = optionalPositional; + parameters._named = named; + stack.push(A._Universe__lookupFunctionRti(universe, returnType, parameters)); + return; + case -4: + stack.push(A._Universe__lookupRecordRti(universe, stack.pop(), requiredPositional)); + return; + default: + throw A.wrapException(A.AssertionError$("Unexpected state under `()`: " + A.S(head))); + } + }, + _Parser_handleExtendedOperations(parser, stack) { + var $top = stack.pop(); + if (0 === $top) { + stack.push(A._Universe__lookupTerminalRti(parser.u, 1, "0&")); + return; + } + if (1 === $top) { + stack.push(A._Universe__lookupTerminalRti(parser.u, 4, "1&")); + return; + } + throw A.wrapException(A.AssertionError$("Unexpected extended operation " + A.S($top))); + }, + _Parser_collectArray(parser, stack) { + var array = stack.splice(parser.p); + A._Parser_toTypes(parser.u, parser.e, array); + parser.p = stack.pop(); + return array; + }, + _Parser_toType(universe, environment, item) { + if (typeof item == "string") + return A._Universe__lookupInterfaceRti(universe, item, universe.sEA); + else if (typeof item == "number") { + environment.toString; + return A._Parser_indexToType(universe, environment, item); + } else + return item; + }, + _Parser_toTypes(universe, environment, items) { + var i, + $length = items.length; + for (i = 0; i < $length; ++i) + items[i] = A._Parser_toType(universe, environment, items[i]); + }, + _Parser_toTypesNamed(universe, environment, items) { + var i, + $length = items.length; + for (i = 2; i < $length; i += 3) + items[i] = A._Parser_toType(universe, environment, items[i]); + }, + _Parser_indexToType(universe, environment, index) { + var typeArguments, len, + kind = environment._kind; + if (kind === 9) { + if (index === 0) + return environment._primary; + typeArguments = environment._rest; + len = typeArguments.length; + if (index <= len) + return typeArguments[index - 1]; + index -= len; + environment = environment._primary; + kind = environment._kind; + } else if (index === 0) + return environment; + if (kind !== 8) + throw A.wrapException(A.AssertionError$("Indexed base must be an interface type")); + typeArguments = environment._rest; + if (index <= typeArguments.length) + return typeArguments[index - 1]; + throw A.wrapException(A.AssertionError$("Bad index " + index + " for " + environment.toString$0(0))); + }, + isSubtype(universe, s, t) { + var result, + sCache = s._isSubtypeCache; + if (sCache == null) + sCache = s._isSubtypeCache = new Map(); + result = sCache.get(t); + if (result == null) { + result = A._isSubtype(universe, s, null, t, null); + sCache.set(t, result); + } + return result; + }, + _isSubtype(universe, s, sEnv, t, tEnv) { + var sKind, leftTypeVariable, tKind, t1, t2, sBounds, tBounds, sLength, i, sBound, tBound; + if (s === t) + return true; + if (A.isTopType(t)) + return true; + sKind = s._kind; + if (sKind === 4) + return true; + if (A.isTopType(s)) + return false; + if (s._kind === 1) + return true; + leftTypeVariable = sKind === 13; + if (leftTypeVariable) + if (A._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv)) + return true; + tKind = t._kind; + t1 = type$.Null; + if (s === t1 || s === type$.JSNull) { + if (tKind === 7) + return A._isSubtype(universe, s, sEnv, t._primary, tEnv); + return t === t1 || t === type$.JSNull || tKind === 6; + } + if (t === type$.Object) { + if (sKind === 7) + return A._isSubtype(universe, s._primary, sEnv, t, tEnv); + return sKind !== 6; + } + if (sKind === 7) { + if (!A._isSubtype(universe, s._primary, sEnv, t, tEnv)) + return false; + return A._isSubtype(universe, A.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv); + } + if (sKind === 6) + return A._isSubtype(universe, t1, sEnv, t, tEnv) && A._isSubtype(universe, s._primary, sEnv, t, tEnv); + if (tKind === 7) { + if (A._isSubtype(universe, s, sEnv, t._primary, tEnv)) + return true; + return A._isSubtype(universe, s, sEnv, A.Rti__getFutureFromFutureOr(universe, t), tEnv); + } + if (tKind === 6) + return A._isSubtype(universe, s, sEnv, t1, tEnv) || A._isSubtype(universe, s, sEnv, t._primary, tEnv); + if (leftTypeVariable) + return false; + t1 = sKind !== 11; + if ((!t1 || sKind === 12) && t === type$.Function) + return true; + t2 = sKind === 10; + if (t2 && t === type$.Record) + return true; + if (tKind === 12) { + if (s === type$.JavaScriptFunction) + return true; + if (sKind !== 12) + return false; + sBounds = s._rest; + tBounds = t._rest; + sLength = sBounds.length; + if (sLength !== tBounds.length) + return false; + sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv); + tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv); + for (i = 0; i < sLength; ++i) { + sBound = sBounds[i]; + tBound = tBounds[i]; + if (!A._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !A._isSubtype(universe, tBound, tEnv, sBound, sEnv)) + return false; + } + return A._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv); + } + if (tKind === 11) { + if (s === type$.JavaScriptFunction) + return true; + if (t1) + return false; + return A._isFunctionSubtype(universe, s, sEnv, t, tEnv); + } + if (sKind === 8) { + if (tKind !== 8) + return false; + return A._isInterfaceSubtype(universe, s, sEnv, t, tEnv); + } + if (t2 && tKind === 10) + return A._isRecordSubtype(universe, s, sEnv, t, tEnv); + return false; + }, + _isFunctionSubtype(universe, s, sEnv, t, tEnv) { + var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired; + if (!A._isSubtype(universe, s._primary, sEnv, t._primary, tEnv)) + return false; + sParameters = s._rest; + tParameters = t._rest; + sRequiredPositional = sParameters._requiredPositional; + tRequiredPositional = tParameters._requiredPositional; + sRequiredPositionalLength = sRequiredPositional.length; + tRequiredPositionalLength = tRequiredPositional.length; + if (sRequiredPositionalLength > tRequiredPositionalLength) + return false; + requiredPositionalDelta = tRequiredPositionalLength - sRequiredPositionalLength; + sOptionalPositional = sParameters._optionalPositional; + tOptionalPositional = tParameters._optionalPositional; + sOptionalPositionalLength = sOptionalPositional.length; + tOptionalPositionalLength = tOptionalPositional.length; + if (sRequiredPositionalLength + sOptionalPositionalLength < tRequiredPositionalLength + tOptionalPositionalLength) + return false; + for (i = 0; i < sRequiredPositionalLength; ++i) { + t1 = sRequiredPositional[i]; + if (!A._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv)) + return false; + } + for (i = 0; i < requiredPositionalDelta; ++i) { + t1 = sOptionalPositional[i]; + if (!A._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv)) + return false; + } + for (i = 0; i < tOptionalPositionalLength; ++i) { + t1 = sOptionalPositional[requiredPositionalDelta + i]; + if (!A._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv)) + return false; + } + sNamed = sParameters._named; + tNamed = tParameters._named; + sNamedLength = sNamed.length; + tNamedLength = tNamed.length; + for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) { + tName = tNamed[tIndex]; + for (;;) { + if (sIndex >= sNamedLength) + return false; + sName = sNamed[sIndex]; + sIndex += 3; + if (tName < sName) + return false; + sIsRequired = sNamed[sIndex - 2]; + if (sName < tName) { + if (sIsRequired) + return false; + continue; + } + t1 = tNamed[tIndex + 1]; + if (sIsRequired && !t1) + return false; + t1 = sNamed[sIndex - 1]; + if (!A._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv)) + return false; + break; + } + } + while (sIndex < sNamedLength) { + if (sNamed[sIndex + 1]) + return false; + sIndex += 3; + } + return true; + }, + _isInterfaceSubtype(universe, s, sEnv, t, tEnv) { + var rule, recipes, $length, supertypeArgs, i, + sName = s._primary, + tName = t._primary; + while (sName !== tName) { + rule = universe.tR[sName]; + if (rule == null) + return false; + if (typeof rule == "string") { + sName = rule; + continue; + } + recipes = rule[tName]; + if (recipes == null) + return false; + $length = recipes.length; + supertypeArgs = $length > 0 ? new Array($length) : init.typeUniverse.sEA; + for (i = 0; i < $length; ++i) + supertypeArgs[i] = A._Universe_evalInEnvironment(universe, s, recipes[i]); + return A._areArgumentsSubtypes(universe, supertypeArgs, null, sEnv, t._rest, tEnv); + } + return A._areArgumentsSubtypes(universe, s._rest, null, sEnv, t._rest, tEnv); + }, + _areArgumentsSubtypes(universe, sArgs, sVariances, sEnv, tArgs, tEnv) { + var i, + $length = sArgs.length; + for (i = 0; i < $length; ++i) + if (!A._isSubtype(universe, sArgs[i], sEnv, tArgs[i], tEnv)) + return false; + return true; + }, + _isRecordSubtype(universe, s, sEnv, t, tEnv) { + var i, + sFields = s._rest, + tFields = t._rest, + sCount = sFields.length; + if (sCount !== tFields.length) + return false; + if (s._primary !== t._primary) + return false; + for (i = 0; i < sCount; ++i) + if (!A._isSubtype(universe, sFields[i], sEnv, tFields[i], tEnv)) + return false; + return true; + }, + isNullable(t) { + var kind = t._kind, + t1 = true; + if (!(t === type$.Null || t === type$.JSNull)) + if (!A.isTopType(t)) + if (kind !== 6) + t1 = kind === 7 && A.isNullable(t._primary); + return t1; + }, + isTopType(t) { + var kind = t._kind; + return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object; + }, + _Utils_objectAssign(o, other) { + var i, key, + keys = Object.keys(other), + $length = keys.length; + for (i = 0; i < $length; ++i) { + key = keys[i]; + o[key] = other[key]; + } + }, + _Utils_newArrayOrEmpty($length) { + return $length > 0 ? new Array($length) : init.typeUniverse.sEA; + }, + Rti: function Rti(t0, t1) { + var _ = this; + _._as = t0; + _._is = t1; + _._cachedRuntimeType = _._specializedTestResource = _._isSubtypeCache = _._precomputed1 = null; + _._kind = 0; + _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null; + }, + _FunctionParameters: function _FunctionParameters() { + this._named = this._optionalPositional = this._requiredPositional = null; + }, + _Type: function _Type(t0) { + this._rti = t0; + }, + _Error: function _Error() { + }, + _TypeError: function _TypeError(t0) { + this.__rti$_message = t0; + }, + _AsyncRun__initializeScheduleImmediate() { + var t1, div, span; + if (self.scheduleImmediate != null) + return A.async__AsyncRun__scheduleImmediateJsOverride$closure(); + if (self.MutationObserver != null && self.document != null) { + t1 = {}; + div = self.document.createElement("div"); + span = self.document.createElement("span"); + t1.storedCallback = null; + new self.MutationObserver(A.convertDartClosureToJS(new A._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); + return new A._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); + } else if (self.setImmediate != null) + return A.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); + return A.async__AsyncRun__scheduleImmediateWithTimer$closure(); + }, + _AsyncRun__scheduleImmediateJsOverride(callback) { + self.scheduleImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateJsOverride_internalCallback(callback), 0)); + }, + _AsyncRun__scheduleImmediateWithSetImmediate(callback) { + self.setImmediate(A.convertDartClosureToJS(new A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(callback), 0)); + }, + _AsyncRun__scheduleImmediateWithTimer(callback) { + A.Timer__createTimer(B.Duration_0, callback); + }, + Timer__createTimer(duration, callback) { + var milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); + return A._TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); + }, + _TimerImpl$(milliseconds, callback) { + var t1 = new A._TimerImpl(true); + t1._TimerImpl$2(milliseconds, callback); + return t1; + }, + _TimerImpl$periodic(milliseconds, callback) { + var t1 = new A._TimerImpl(false); + t1._TimerImpl$periodic$2(milliseconds, callback); + return t1; + }, + _makeAsyncAwaitCompleter($T) { + return new A._AsyncAwaitCompleter(new A._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>")); + }, + _asyncStartSync(bodyFunction, completer) { + bodyFunction.call$2(0, null); + completer.isSync = true; + return completer._future; + }, + _asyncAwait(object, bodyFunction) { + A._awaitOnObject(object, bodyFunction); + }, + _asyncReturn(object, completer) { + completer.complete$1(object); + }, + _asyncRethrow(object, completer) { + completer.completeError$2(A.unwrapException(object), A.getTraceFromException(object)); + }, + _awaitOnObject(object, bodyFunction) { + var t1, future, + thenCallback = new A._awaitOnObject_closure(bodyFunction), + errorCallback = new A._awaitOnObject_closure0(bodyFunction); + if (object instanceof A._Future) + object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic); + else { + t1 = type$.dynamic; + if (object instanceof A._Future) + object.then$1$2$onError(0, thenCallback, errorCallback, t1); + else { + future = new A._Future($.Zone__current, type$._Future_dynamic); + future._state = 8; + future._resultOrListeners = object; + future._thenAwait$1$2(thenCallback, errorCallback, t1); + } + } + }, + _wrapJsFunctionForAsync($function) { + var $protected = function(fn, ERROR) { + return function(errorCode, result) { + while (true) { + try { + fn(errorCode, result); + break; + } catch (error) { + result = error; + errorCode = ERROR; + } + } + }; + }($function, 1); + return $.Zone__current.registerBinaryCallback$3$1(new A._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic); + }, + _SyncStarIterator__terminatedBody(_1, _2, _3) { + return 0; + }, + AsyncError_defaultStackTrace(error) { + var stackTrace; + if (type$.Error._is(error)) { + stackTrace = error.get$stackTrace(); + if (stackTrace != null) + return stackTrace; + } + return B._StringStackTrace_OdL; + }, + Future_Future$value(value, $T) { + var t1; + $T._as(value); + t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + t1._asyncComplete$1(value); + return t1; + }, + Future_wait(futures, eagerError, $T) { + var handleError, future, pos, e, s, t1, t2, exception, t3, t4, _box_0 = {}, cleanUp = null, + _future = new A._Future($.Zone__current, $T._eval$1("_Future>")); + _box_0.values = null; + _box_0.remaining = 0; + _box_0.stackTrace = _box_0.error = null; + handleError = new A.Future_wait_handleError(_box_0, cleanUp, eagerError, _future); + try { + for (t1 = J.get$iterator$ax(futures), t2 = type$.Null; t1.moveNext$0();) { + future = t1.get$current(t1); + pos = _box_0.remaining; + J.then$1$2$onError$x(future, new A.Future_wait_closure(_box_0, pos, _future, $T, cleanUp, eagerError), handleError, t2); + ++_box_0.remaining; + } + t1 = _box_0.remaining; + if (t1 === 0) { + t1 = _future; + t1._completeWithValue$1(A._setArrayType([], $T._eval$1("JSArray<0>"))); + return t1; + } + _box_0.values = A.List_List$filled(t1, null, false, $T._eval$1("0?")); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + if (_box_0.remaining === 0 || eagerError) { + t1 = _future; + t2 = e; + t3 = s; + t4 = A._interceptError(t2, t3); + if (t4 == null) + t2 = new A.AsyncError(t2, t3 == null ? A.AsyncError_defaultStackTrace(t2) : t3); + else + t2 = t4; + t1._asyncCompleteErrorObject$1(t2); + return t1; + } else { + _box_0.error = e; + _box_0.stackTrace = s; + } + } + return _future; + }, + _interceptError(error, stackTrace) { + var replacement, t1, t2, + zone = $.Zone__current; + if (zone === B.C__RootZone) + return null; + replacement = zone.errorCallback$2(error, stackTrace); + if (replacement == null) + return null; + t1 = replacement.error; + t2 = replacement.stackTrace; + if (type$.Error._is(t1)) + A.Primitives_trySetStackTrace(t1, t2); + return replacement; + }, + _interceptUserError(error, stackTrace) { + var replacement; + if ($.Zone__current !== B.C__RootZone) { + replacement = A._interceptError(error, stackTrace); + if (replacement != null) + return replacement; + } + if (stackTrace == null) + if (type$.Error._is(error)) { + stackTrace = error.get$stackTrace(); + if (stackTrace == null) { + A.Primitives_trySetStackTrace(error, B._StringStackTrace_OdL); + stackTrace = B._StringStackTrace_OdL; + } + } else + stackTrace = B._StringStackTrace_OdL; + else if (type$.Error._is(error)) + A.Primitives_trySetStackTrace(error, stackTrace); + return new A.AsyncError(error, stackTrace); + }, + _Future$zoneValue(value, _zone, $T) { + var t1 = new A._Future(_zone, $T._eval$1("_Future<0>")); + t1._state = 8; + t1._resultOrListeners = value; + return t1; + }, + _Future$value(value, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")); + t1._state = 8; + t1._resultOrListeners = value; + return t1; + }, + _Future__chainCoreFuture(source, target, sync) { + var t2, ignoreError, listeners, _box_0 = {}, + t1 = _box_0.source = source; + while (t2 = t1._state, (t2 & 4) !== 0) { + t1 = t1._resultOrListeners; + _box_0.source = t1; + } + if (t1 === target) { + t2 = A.StackTrace_current(); + target._asyncCompleteErrorObject$1(new A.AsyncError(new A.ArgumentError(true, t1, null, "Cannot complete a future with itself"), t2)); + return; + } + ignoreError = target._state & 1; + t2 = t1._state = t2 | ignoreError; + if ((t2 & 24) === 0) { + listeners = target._resultOrListeners; + target._state = target._state & 1 | 4; + target._resultOrListeners = t1; + t1._prependListeners$1(listeners); + return; + } + if (!sync) + if (target._resultOrListeners == null) + t1 = (t2 & 16) === 0 || ignoreError !== 0; + else + t1 = false; + else + t1 = true; + if (t1) { + listeners = target._removeListeners$0(); + target._cloneResult$1(_box_0.source); + A._Future__propagateToListeners(target, listeners); + return; + } + target._state ^= 2; + target._zone.scheduleMicrotask$1(new A._Future__chainCoreFuture_closure(_box_0, target)); + }, + _Future__propagateToListeners(source, listeners) { + var _box_0, t2, t3, hasError, nextListener, nextListener0, sourceResult, t4, zone, oldZone, result, current, _box_1 = {}, + t1 = _box_1.source = source; + for (;;) { + _box_0 = {}; + t2 = t1._state; + t3 = (t2 & 16) === 0; + hasError = !t3; + if (listeners == null) { + if (hasError && (t2 & 1) === 0) { + t2 = t1._resultOrListeners; + t1._zone.handleUncaughtError$2(t2.error, t2.stackTrace); + } + return; + } + _box_0.listener = listeners; + nextListener = listeners._nextListener; + for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) { + t1._nextListener = null; + A._Future__propagateToListeners(_box_1.source, t1); + _box_0.listener = nextListener; + nextListener0 = nextListener._nextListener; + } + t2 = _box_1.source; + sourceResult = t2._resultOrListeners; + _box_0.listenerHasError = hasError; + _box_0.listenerValueOrError = sourceResult; + if (t3) { + t4 = t1.state; + t4 = (t4 & 1) !== 0 || (t4 & 15) === 8; + } else + t4 = true; + if (t4) { + zone = t1.result._zone; + if (hasError) { + t1 = t2._zone; + t1 = !(t1 === zone || t1.get$errorZone() === zone.get$errorZone()); + } else + t1 = false; + if (t1) { + t1 = _box_1.source; + t2 = t1._resultOrListeners; + t1._zone.handleUncaughtError$2(t2.error, t2.stackTrace); + return; + } + oldZone = $.Zone__current; + if (oldZone !== zone) + $.Zone__current = zone; + else + oldZone = null; + t1 = _box_0.listener.state; + if ((t1 & 15) === 8) + new A._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0(); + else if (t3) { + if ((t1 & 1) !== 0) + new A._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0(); + } else if ((t1 & 2) !== 0) + new A._Future__propagateToListeners_handleError(_box_1, _box_0).call$0(); + if (oldZone != null) + $.Zone__current = oldZone; + t1 = _box_0.listenerValueOrError; + if (t1 instanceof A._Future) { + t2 = _box_0.listener.$ti; + t2 = t2._eval$1("Future<2>")._is(t1) || !t2._rest[1]._is(t1); + } else + t2 = false; + if (t2) { + result = _box_0.listener.result; + if ((t1._state & 24) !== 0) { + current = result._resultOrListeners; + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + result._state = t1._state & 30 | result._state & 1; + result._resultOrListeners = t1._resultOrListeners; + _box_1.source = t1; + continue; + } else + A._Future__chainCoreFuture(t1, result, true); + return; + } + } + result = _box_0.listener.result; + current = result._resultOrListeners; + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + t1 = _box_0.listenerHasError; + t2 = _box_0.listenerValueOrError; + if (!t1) { + result._state = 8; + result._resultOrListeners = t2; + } else { + result._state = result._state & 1 | 16; + result._resultOrListeners = t2; + } + _box_1.source = result; + t1 = result; + } + }, + _registerErrorHandler(errorHandler, zone) { + if (type$.dynamic_Function_Object_StackTrace._is(errorHandler)) + return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.dynamic_Function_Object._is(errorHandler)) + return zone.registerUnaryCallback$2$1(errorHandler, type$.dynamic, type$.Object); + throw A.wrapException(A.ArgumentError$value(errorHandler, "onError", string$.Error_)); + }, + _microtaskLoop() { + var entry, next; + for (entry = $._nextCallback; entry != null; entry = $._nextCallback) { + $._lastPriorityCallback = null; + next = entry.next; + $._nextCallback = next; + if (next == null) + $._lastCallback = null; + entry.callback.call$0(); + } + }, + _startMicrotaskLoop() { + $._isInCallbackLoop = true; + try { + A._microtaskLoop(); + } finally { + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + if ($._nextCallback != null) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); + } + }, + _scheduleAsyncCallback(callback) { + var newEntry = new A._AsyncCallbackEntry(callback), + lastCallback = $._lastCallback; + if (lastCallback == null) { + $._nextCallback = $._lastCallback = newEntry; + if (!$._isInCallbackLoop) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(A.async___startMicrotaskLoop$closure()); + } else + $._lastCallback = lastCallback.next = newEntry; + }, + _schedulePriorityAsyncCallback(callback) { + var entry, lastPriorityCallback, next, + t1 = $._nextCallback; + if (t1 == null) { + A._scheduleAsyncCallback(callback); + $._lastPriorityCallback = $._lastCallback; + return; + } + entry = new A._AsyncCallbackEntry(callback); + lastPriorityCallback = $._lastPriorityCallback; + if (lastPriorityCallback == null) { + entry.next = t1; + $._nextCallback = $._lastPriorityCallback = entry; + } else { + next = lastPriorityCallback.next; + entry.next = next; + $._lastPriorityCallback = lastPriorityCallback.next = entry; + if (next == null) + $._lastCallback = entry; + } + }, + scheduleMicrotask(callback) { + var t1, _null = null, + currentZone = $.Zone__current; + if (B.C__RootZone === currentZone) { + A._rootScheduleMicrotask(_null, _null, B.C__RootZone, callback); + return; + } + if (B.C__RootZone === currentZone.get$_scheduleMicrotask().zone) + t1 = B.C__RootZone.get$errorZone() === currentZone.get$errorZone(); + else + t1 = false; + if (t1) { + A._rootScheduleMicrotask(_null, _null, currentZone, currentZone.registerCallback$1$1(callback, type$.void)); + return; + } + t1 = $.Zone__current; + t1.scheduleMicrotask$1(t1.bindCallbackGuarded$1(callback)); + }, + Stream_Stream$fromFuture(future, $T) { + var _null = null, + t1 = $T._eval$1("_SyncStreamController<0>"), + controller = new A._SyncStreamController(_null, _null, _null, _null, t1); + future.then$1$2$onError(0, new A.Stream_Stream$fromFuture_closure(controller, $T), new A.Stream_Stream$fromFuture_closure0(controller), type$.Null); + return new A._ControllerStream(controller, t1._eval$1("_ControllerStream<1>")); + }, + StreamIterator_StreamIterator(stream) { + return new A._StreamIterator(A.checkNotNullable(stream, "stream", type$.Object)); + }, + StreamController_StreamController(onCancel, onListen, onPause, onResume, sync, $T) { + return sync ? new A._SyncStreamController(onListen, onPause, onResume, onCancel, $T._eval$1("_SyncStreamController<0>")) : new A._AsyncStreamController(onListen, onPause, onResume, onCancel, $T._eval$1("_AsyncStreamController<0>")); + }, + _runGuarded(notificationHandler) { + var e, s, exception; + if (notificationHandler == null) + return; + try { + notificationHandler.call$0(); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + $.Zone__current.handleUncaughtError$2(e, s); + } + }, + _ControllerSubscription$(_controller, onData, onError, onDone, cancelOnError, $T) { + var t1 = $.Zone__current, + t2 = cancelOnError ? 1 : 0, + t3 = onError != null ? 32 : 0, + t4 = A._BufferingStreamSubscription__registerDataHandler(t1, onData, $T), + t5 = A._BufferingStreamSubscription__registerErrorHandler(t1, onError), + t6 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; + return new A._ControllerSubscription(_controller, t4, t5, t1.registerCallback$1$1(t6, type$.void), t1, t2 | t3, $T._eval$1("_ControllerSubscription<0>")); + }, + _AddStreamState_makeErrorHandler(controller) { + return new A._AddStreamState_makeErrorHandler_closure(controller); + }, + _BufferingStreamSubscription__registerDataHandler(zone, handleData, $T) { + var t1 = handleData == null ? A.async___nullDataHandler$closure() : handleData; + return zone.registerUnaryCallback$2$1(t1, type$.void, $T); + }, + _BufferingStreamSubscription__registerErrorHandler(zone, handleError) { + if (handleError == null) + handleError = A.async___nullErrorHandler$closure(); + if (type$.void_Function_Object_StackTrace._is(handleError)) + return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace); + if (type$.void_Function_Object._is(handleError)) + return zone.registerUnaryCallback$2$1(handleError, type$.dynamic, type$.Object); + throw A.wrapException(A.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.", null)); + }, + _nullDataHandler(value) { + }, + _nullErrorHandler(error, stackTrace) { + $.Zone__current.handleUncaughtError$2(error, stackTrace); + }, + _nullDoneHandler() { + }, + Timer_Timer(duration, callback) { + var t1 = $.Zone__current; + if (t1 === B.C__RootZone) + return t1.createTimer$2(duration, callback); + return t1.createTimer$2(duration, t1.bindCallbackGuarded$1(callback)); + }, + runZoned(body, zoneValues, $R) { + return A._runZoned(body, zoneValues, null, $R); + }, + _runZoned(body, zoneValues, specification, $R) { + return $.Zone__current.fork$2$specification$zoneValues(specification, zoneValues).run$1$1(0, body, $R); + }, + _rootHandleUncaughtError($self, $parent, zone, error, stackTrace) { + A._rootHandleError(error, stackTrace); + }, + _rootHandleError(error, stackTrace) { + A._schedulePriorityAsyncCallback(new A._rootHandleError_closure(error, stackTrace)); + }, + _rootRun($self, $parent, zone, f) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$0(); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$0(); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunUnary($self, $parent, zone, f, arg) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$1(arg); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$1(arg); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunBinary($self, $parent, zone, f, arg1, arg2) { + var old, + t1 = $.Zone__current; + if (t1 === zone) + return f.call$2(arg1, arg2); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$2(arg1, arg2); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRegisterCallback($self, $parent, zone, f) { + return f; + }, + _rootRegisterUnaryCallback($self, $parent, zone, f) { + return f; + }, + _rootRegisterBinaryCallback($self, $parent, zone, f) { + return f; + }, + _rootErrorCallback($self, $parent, zone, error, stackTrace) { + return null; + }, + _rootScheduleMicrotask($self, $parent, zone, f) { + var t1, t2; + if (B.C__RootZone !== zone) { + t1 = B.C__RootZone.get$errorZone(); + t2 = zone.get$errorZone(); + f = t1 !== t2 ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void); + } + A._scheduleAsyncCallback(f); + }, + _rootCreateTimer($self, $parent, zone, duration, callback) { + return A.Timer__createTimer(duration, B.C__RootZone !== zone ? zone.bindCallback$1$1(callback, type$.void) : callback); + }, + _rootCreatePeriodicTimer($self, $parent, zone, duration, callback) { + var milliseconds; + if (B.C__RootZone !== zone) + callback = zone.bindUnaryCallback$2$1(callback, type$.void, type$.Timer); + milliseconds = B.JSInt_methods._tdivFast$1(duration._duration, 1000); + return A._TimerImpl$periodic(milliseconds < 0 ? 0 : milliseconds, callback); + }, + _rootPrint($self, $parent, zone, line) { + A.printString(line); + }, + _printToZone0(line) { + $.Zone__current.print$1(line); + }, + _rootFork($self, $parent, zone, specification, zoneValues) { + var valueMap, t1, handleUncaughtError; + $._printToZone = A.async___printToZone$closure(); + if (specification == null) + specification = B._ZoneSpecification_Ipa; + if (zoneValues == null) + valueMap = zone.get$_async$_map(); + else { + t1 = type$.nullable_Object; + valueMap = A.HashMap_HashMap$from(zoneValues, t1, t1); + } + t1 = new A._CustomZone(zone.get$_run(), zone.get$_runUnary(), zone.get$_runBinary(), zone.get$_registerCallback(), zone.get$_registerUnaryCallback(), zone.get$_registerBinaryCallback(), zone.get$_errorCallback(), zone.get$_scheduleMicrotask(), zone.get$_createTimer(), zone.get$_createPeriodicTimer(), zone.get$_print(), zone.get$_fork(), zone.get$_handleUncaughtError(), zone, valueMap); + handleUncaughtError = specification.handleUncaughtError; + if (handleUncaughtError != null) + t1._handleUncaughtError = new A._ZoneFunction(t1, handleUncaughtError); + return t1; + }, + _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) { + this._box_0 = t0; + }, + _AsyncRun__initializeScheduleImmediate_closure: function _AsyncRun__initializeScheduleImmediate_closure(t0, t1, t2) { + this._box_0 = t0; + this.div = t1; + this.span = t2; + }, + _AsyncRun__scheduleImmediateJsOverride_internalCallback: function _AsyncRun__scheduleImmediateJsOverride_internalCallback(t0) { + this.callback = t0; + }, + _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) { + this.callback = t0; + }, + _TimerImpl: function _TimerImpl(t0) { + this._once = t0; + this._handle = null; + this._tick = 0; + }, + _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) { + this.$this = t0; + this.callback = t1; + }, + _TimerImpl$periodic_closure: function _TimerImpl$periodic_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.milliseconds = t1; + _.start = t2; + _.callback = t3; + }, + _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) { + this._future = t0; + this.isSync = false; + this.$ti = t1; + }, + _awaitOnObject_closure: function _awaitOnObject_closure(t0) { + this.bodyFunction = t0; + }, + _awaitOnObject_closure0: function _awaitOnObject_closure0(t0) { + this.bodyFunction = t0; + }, + _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) { + this.$protected = t0; + }, + _SyncStarIterator: function _SyncStarIterator(t0) { + var _ = this; + _._body = t0; + _._suspendedBodies = _._nestedIterator = _._datum = _._async$_current = null; + }, + _SyncStarIterable: function _SyncStarIterable(t0, t1) { + this._outerHelper = t0; + this.$ti = t1; + }, + AsyncError: function AsyncError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + Future_wait_handleError: function Future_wait_handleError(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.cleanUp = t1; + _.eagerError = t2; + _._future = t3; + }, + Future_wait_closure: function Future_wait_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.pos = t1; + _._future = t2; + _.T = t3; + _.cleanUp = t4; + _.eagerError = t5; + }, + _Completer: function _Completer() { + }, + _AsyncCompleter: function _AsyncCompleter(t0, t1) { + this.future = t0; + this.$ti = t1; + }, + _SyncCompleter: function _SyncCompleter(t0, t1) { + this.future = t0; + this.$ti = t1; + }, + _FutureListener: function _FutureListener(t0, t1, t2, t3, t4) { + var _ = this; + _._nextListener = null; + _.result = t0; + _.state = t1; + _.callback = t2; + _.errorCallback = t3; + _.$ti = t4; + }, + _Future: function _Future(t0, t1) { + var _ = this; + _._state = 0; + _._zone = t0; + _._resultOrListeners = null; + _.$ti = t1; + }, + _Future__addListener_closure: function _Future__addListener_closure(t0, t1) { + this.$this = t0; + this.listener = t1; + }, + _Future__prependListeners_closure: function _Future__prependListeners_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _Future__chainCoreFuture_closure: function _Future__chainCoreFuture_closure(t0, t1) { + this._box_0 = t0; + this.target = t1; + }, + _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _Future__asyncCompleteErrorObject_closure: function _Future__asyncCompleteErrorObject_closure(t0, t1) { + this.$this = t0; + this.error = t1; + }, + _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2) { + this._box_0 = t0; + this._box_1 = t1; + this.hasError = t2; + }, + _Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0, t1) { + this.joinedResult = t0; + this.originalSource = t1; + }, + _Future__propagateToListeners_handleWhenCompleteCallback_closure0: function _Future__propagateToListeners_handleWhenCompleteCallback_closure0(t0) { + this.joinedResult = t0; + }, + _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1) { + this._box_0 = t0; + this.sourceResult = t1; + }, + _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1) { + this._box_1 = t0; + this._box_0 = t1; + }, + _AsyncCallbackEntry: function _AsyncCallbackEntry(t0) { + this.callback = t0; + this.next = null; + }, + Stream: function Stream() { + }, + Stream_Stream$fromFuture_closure: function Stream_Stream$fromFuture_closure(t0, t1) { + this.controller = t0; + this.T = t1; + }, + Stream_Stream$fromFuture_closure0: function Stream_Stream$fromFuture_closure0(t0) { + this.controller = t0; + }, + Stream_length_closure: function Stream_length_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + Stream_length_closure0: function Stream_length_closure0(t0, t1) { + this._box_0 = t0; + this.future = t1; + }, + _StreamController: function _StreamController() { + }, + _StreamController__subscribe_closure: function _StreamController__subscribe_closure(t0) { + this.$this = t0; + }, + _StreamController__recordCancel_complete: function _StreamController__recordCancel_complete(t0) { + this.$this = t0; + }, + _SyncStreamControllerDispatch: function _SyncStreamControllerDispatch() { + }, + _AsyncStreamControllerDispatch: function _AsyncStreamControllerDispatch() { + }, + _AsyncStreamController: function _AsyncStreamController(t0, t1, t2, t3, t4) { + var _ = this; + _._varData = null; + _._state = 0; + _._doneFuture = null; + _.onListen = t0; + _.onPause = t1; + _.onResume = t2; + _.onCancel = t3; + _.$ti = t4; + }, + _SyncStreamController: function _SyncStreamController(t0, t1, t2, t3, t4) { + var _ = this; + _._varData = null; + _._state = 0; + _._doneFuture = null; + _.onListen = t0; + _.onPause = t1; + _.onResume = t2; + _.onCancel = t3; + _.$ti = t4; + }, + _ControllerStream: function _ControllerStream(t0, t1) { + this._controller = t0; + this.$ti = t1; + }, + _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._controller = t0; + _._onData = t1; + _._onError = t2; + _._onDone = t3; + _._zone = t4; + _._state = t5; + _._pending = _._cancelFuture = null; + _.$ti = t6; + }, + _AddStreamState: function _AddStreamState() { + }, + _AddStreamState_makeErrorHandler_closure: function _AddStreamState_makeErrorHandler_closure(t0) { + this.controller = t0; + }, + _AddStreamState_cancel_closure: function _AddStreamState_cancel_closure(t0) { + this.$this = t0; + }, + _StreamControllerAddStreamState: function _StreamControllerAddStreamState(t0, t1, t2) { + this._varData = t0; + this.addStreamFuture = t1; + this.addSubscription = t2; + }, + _BufferingStreamSubscription: function _BufferingStreamSubscription() { + }, + _BufferingStreamSubscription__sendError_sendError: function _BufferingStreamSubscription__sendError_sendError(t0, t1, t2) { + this.$this = t0; + this.error = t1; + this.stackTrace = t2; + }, + _BufferingStreamSubscription__sendDone_sendDone: function _BufferingStreamSubscription__sendDone_sendDone(t0) { + this.$this = t0; + }, + _StreamImpl: function _StreamImpl() { + }, + _DelayedEvent: function _DelayedEvent() { + }, + _DelayedData: function _DelayedData(t0) { + this.value = t0; + this.next = null; + }, + _DelayedError: function _DelayedError(t0, t1) { + this.error = t0; + this.stackTrace = t1; + this.next = null; + }, + _DelayedDone: function _DelayedDone() { + }, + _PendingEvents: function _PendingEvents() { + this._state = 0; + this.lastPendingEvent = this.firstPendingEvent = null; + }, + _PendingEvents_schedule_closure: function _PendingEvents_schedule_closure(t0, t1) { + this.$this = t0; + this.dispatch = t1; + }, + _StreamIterator: function _StreamIterator(t0) { + this._subscription = null; + this._stateData = t0; + this._async$_hasValue = false; + }, + _ForwardingStream: function _ForwardingStream() { + }, + _ForwardingStreamSubscription: function _ForwardingStreamSubscription(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._stream = t0; + _._subscription = null; + _._onData = t1; + _._onError = t2; + _._onDone = t3; + _._zone = t4; + _._state = t5; + _._pending = _._cancelFuture = null; + _.$ti = t6; + }, + _MapStream: function _MapStream(t0, t1, t2) { + this._transform = t0; + this._async$_source = t1; + this.$ti = t2; + }, + _ZoneFunction: function _ZoneFunction(t0, t1) { + this.zone = t0; + this.$function = t1; + }, + _Zone: function _Zone() { + }, + _CustomZone: function _CustomZone(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) { + var _ = this; + _._run = t0; + _._runUnary = t1; + _._runBinary = t2; + _._registerCallback = t3; + _._registerUnaryCallback = t4; + _._registerBinaryCallback = t5; + _._errorCallback = t6; + _._scheduleMicrotask = t7; + _._createTimer = t8; + _._createPeriodicTimer = t9; + _._print = t10; + _._fork = t11; + _._handleUncaughtError = t12; + _._delegateCache = null; + _.parent = t13; + _._async$_map = t14; + }, + _CustomZone_bindCallback_closure: function _CustomZone_bindCallback_closure(t0, t1, t2) { + this.$this = t0; + this.registered = t1; + this.R = t2; + }, + _CustomZone_bindUnaryCallback_closure: function _CustomZone_bindUnaryCallback_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.registered = t1; + _.T = t2; + _.R = t3; + }, + _CustomZone_bindCallbackGuarded_closure: function _CustomZone_bindCallbackGuarded_closure(t0, t1) { + this.$this = t0; + this.registered = t1; + }, + _RootZone: function _RootZone() { + }, + _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) { + this.$this = t0; + this.f = t1; + this.R = t2; + }, + _RootZone_bindUnaryCallback_closure: function _RootZone_bindUnaryCallback_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.f = t1; + _.T = t2; + _.R = t3; + }, + _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) { + this.$this = t0; + this.f = t1; + }, + _ZoneDelegate: function _ZoneDelegate(t0) { + this._delegationTarget = t0; + }, + _rootHandleError_closure: function _rootHandleError_closure(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + _ZoneSpecification: function _ZoneSpecification(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) { + var _ = this; + _.handleUncaughtError = t0; + _.run = t1; + _.runUnary = t2; + _.runBinary = t3; + _.registerCallback = t4; + _.registerUnaryCallback = t5; + _.registerBinaryCallback = t6; + _.errorCallback = t7; + _.scheduleMicrotask = t8; + _.createTimer = t9; + _.createPeriodicTimer = t10; + _.print = t11; + _.fork = t12; + }, + HashMap_HashMap($K, $V) { + return new A._HashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("_HashMap<1,2>")); + }, + _HashMap__getTableEntry(table, key) { + var entry = table[key]; + return entry === table ? null : entry; + }, + _HashMap__setTableEntry(table, key, value) { + if (value == null) + table[key] = table; + else + table[key] = value; + }, + _HashMap__newHashTable() { + var table = Object.create(null); + A._HashMap__setTableEntry(table, "", table); + delete table[""]; + return table; + }, + LinkedHashMap_LinkedHashMap(equals, hashCode, isValidKey, $K, $V) { + if (isValidKey == null) + if (hashCode == null) { + if (equals == null) + return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); + hashCode = A.collection___defaultHashCode$closure(); + } else { + if (A.core__identityHashCode$closure() === hashCode && A.core__identical$closure() === equals) + return new A.JsIdentityLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsIdentityLinkedHashMap<1,2>")); + if (equals == null) + equals = A.collection___defaultEquals$closure(); + } + else { + if (hashCode == null) + hashCode = A.collection___defaultHashCode$closure(); + if (equals == null) + equals = A.collection___defaultEquals$closure(); + } + return A._LinkedCustomHashMap$(equals, hashCode, isValidKey, $K, $V); + }, + LinkedHashMap_LinkedHashMap$_literal(keyValuePairs, $K, $V) { + return A.fillLiteralMap(keyValuePairs, new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"))); + }, + LinkedHashMap_LinkedHashMap$_empty($K, $V) { + return new A.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>")); + }, + _LinkedCustomHashMap$(_equals, _hashCode, validKey, $K, $V) { + var t1 = validKey != null ? validKey : new A._LinkedCustomHashMap_closure($K); + return new A._LinkedCustomHashMap(_equals, _hashCode, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("_LinkedCustomHashMap<1,2>")); + }, + LinkedHashSet_LinkedHashSet($E) { + return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); + }, + LinkedHashSet_LinkedHashSet$_empty($E) { + return new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>")); + }, + LinkedHashSet_LinkedHashSet$_literal(values, $E) { + return A.fillLiteralSet(values, new A._LinkedHashSet($E._eval$1("_LinkedHashSet<0>"))); + }, + _LinkedHashSet__newHashTable() { + var table = Object.create(null); + table[""] = table; + delete table[""]; + return table; + }, + _LinkedHashSetIterator$(_set, _modifications, $E) { + var t1 = new A._LinkedHashSetIterator(_set, _modifications, $E._eval$1("_LinkedHashSetIterator<0>")); + t1._collection$_cell = _set._collection$_first; + return t1; + }, + UnmodifiableListView$(source, $E) { + return new A.UnmodifiableListView(source, $E._eval$1("UnmodifiableListView<0>")); + }, + _defaultEquals(a, b) { + return J.$eq$(a, b); + }, + _defaultHashCode(a) { + return J.get$hashCode$(a); + }, + HashMap_HashMap$from(other, $K, $V) { + var result = A.HashMap_HashMap($K, $V); + other.forEach$1(0, new A.HashMap_HashMap$from_closure(result, $K, $V)); + return result; + }, + IterableExtensions_get_firstOrNull(_this) { + var t2, + t1 = A._arrayInstanceType(_this), + iterator = new J.ArrayIterator(_this, _this.length, t1._eval$1("ArrayIterator<1>")); + if (iterator.moveNext$0()) { + t2 = iterator._current; + return t2 == null ? t1._precomputed1._as(t2) : t2; + } + return null; + }, + LinkedHashMap_LinkedHashMap$from(other, $K, $V) { + var result = A.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V); + other.forEach$1(0, new A.LinkedHashMap_LinkedHashMap$from_closure(result, $K, $V)); + return result; + }, + LinkedHashMap_LinkedHashMap$of(other, $K, $V) { + var t1 = A.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V); + t1.addAll$1(0, other); + return t1; + }, + LinkedHashSet_LinkedHashSet$from(elements, $E) { + var t1, _i, + result = A.LinkedHashSet_LinkedHashSet($E); + for (t1 = elements.length, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) + result.add$1(0, $E._as(elements[_i])); + return result; + }, + LinkedHashSet_LinkedHashSet$of(elements, $E) { + var t1 = A.LinkedHashSet_LinkedHashSet($E); + t1.addAll$1(0, elements); + return t1; + }, + ListBase__compareAny(a, b) { + var t1 = type$.Comparable_dynamic; + return J.compareTo$1$ns(t1._as(a), t1._as(b)); + }, + MapBase_mapToString(m) { + var result, t1; + if (A.isToStringVisiting(m)) + return "{...}"; + result = new A.StringBuffer(""); + try { + t1 = {}; + $._toStringVisiting.push(m); + result._contents += "{"; + t1.first = true; + m.forEach$1(0, new A.MapBase_mapToString_closure(t1, result)); + result._contents += "}"; + } finally { + $._toStringVisiting.pop(); + } + t1 = result._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + MapBase__fillMapWithIterables(map, keys, values) { + var keyIterator = keys.get$iterator(keys), + valueIterator = values.get$iterator(values), + hasNextKey = keyIterator.moveNext$0(), + hasNextValue = valueIterator.moveNext$0(); + for (;;) { + if (!(hasNextKey && hasNextValue)) + break; + map.$indexSet(0, keyIterator.get$current(keyIterator), valueIterator.get$current(valueIterator)); + hasNextKey = keyIterator.moveNext$0(); + hasNextValue = valueIterator.moveNext$0(); + } + if (hasNextKey || hasNextValue) + throw A.wrapException(A.ArgumentError$("Iterables do not have same length.", null)); + }, + ListQueue$($E) { + return new A.ListQueue(A.List_List$filled(A.ListQueue__calculateCapacity(null), null, false, $E._eval$1("0?")), $E._eval$1("ListQueue<0>")); + }, + ListQueue__calculateCapacity(initialCapacity) { + return 8; + }, + ListQueue__nextPowerOf2(number) { + var nextNumber; + number = (number << 1 >>> 0) - 1; + for (;; number = nextNumber) { + nextNumber = (number & number - 1) >>> 0; + if (nextNumber === 0) + return number; + } + }, + _ListQueueIterator$(queue, $E) { + return new A._ListQueueIterator(queue, queue._tail, queue._modificationCount, queue._head, $E._eval$1("_ListQueueIterator<0>")); + }, + _UnmodifiableSetMixin__throwUnmodifiable() { + throw A.wrapException(A.UnsupportedError$("Cannot change an unmodifiable set")); + }, + _HashMap: function _HashMap(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_keys = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _.$ti = t0; + }, + _HashMap_values_closure: function _HashMap_values_closure(t0) { + this.$this = t0; + }, + _HashMap_addAll_closure: function _HashMap_addAll_closure(t0) { + this.$this = t0; + }, + _IdentityHashMap: function _IdentityHashMap(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_keys = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _.$ti = t0; + }, + _HashMapKeyIterable: function _HashMapKeyIterable(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + _HashMapKeyIterator: function _HashMapKeyIterator(t0, t1, t2) { + var _ = this; + _._map = t0; + _._collection$_keys = t1; + _._offset = 0; + _._collection$_current = null; + _.$ti = t2; + }, + _LinkedCustomHashMap: function _LinkedCustomHashMap(t0, t1, t2, t3) { + var _ = this; + _._equals = t0; + _._hashCode = t1; + _._validKey = t2; + _.__js_helper$_length = 0; + _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null; + _._modifications = 0; + _.$ti = t3; + }, + _LinkedCustomHashMap_closure: function _LinkedCustomHashMap_closure(t0) { + this.K = t0; + }, + _LinkedHashSet: function _LinkedHashSet(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_last = _._collection$_first = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _._collection$_modifications = 0; + _.$ti = t0; + }, + _LinkedIdentityHashSet: function _LinkedIdentityHashSet(t0) { + var _ = this; + _._collection$_length = 0; + _._collection$_last = _._collection$_first = _._collection$_rest = _._collection$_nums = _._collection$_strings = null; + _._collection$_modifications = 0; + _.$ti = t0; + }, + _LinkedHashSetCell: function _LinkedHashSetCell(t0) { + this._element = t0; + this._collection$_previous = this._collection$_next = null; + }, + _LinkedHashSetIterator: function _LinkedHashSetIterator(t0, t1, t2) { + var _ = this; + _._set = t0; + _._collection$_modifications = t1; + _._collection$_current = _._collection$_cell = null; + _.$ti = t2; + }, + UnmodifiableListView: function UnmodifiableListView(t0, t1) { + this._collection$_source = t0; + this.$ti = t1; + }, + HashMap_HashMap$from_closure: function HashMap_HashMap$from_closure(t0, t1, t2) { + this.result = t0; + this.K = t1; + this.V = t2; + }, + LinkedHashMap_LinkedHashMap$from_closure: function LinkedHashMap_LinkedHashMap$from_closure(t0, t1, t2) { + this.result = t0; + this.K = t1; + this.V = t2; + }, + ListBase: function ListBase() { + }, + MapBase: function MapBase() { + }, + MapBase_addAll_closure: function MapBase_addAll_closure(t0) { + this.$this = t0; + }, + MapBase_entries_closure: function MapBase_entries_closure(t0) { + this.$this = t0; + }, + MapBase_mapToString_closure: function MapBase_mapToString_closure(t0, t1) { + this._box_0 = t0; + this.result = t1; + }, + UnmodifiableMapBase: function UnmodifiableMapBase() { + }, + _MapBaseValueIterable: function _MapBaseValueIterable(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + _MapBaseValueIterator: function _MapBaseValueIterator(t0, t1, t2) { + var _ = this; + _._collection$_keys = t0; + _._map = t1; + _._collection$_current = null; + _.$ti = t2; + }, + _UnmodifiableMapMixin: function _UnmodifiableMapMixin() { + }, + MapView: function MapView() { + }, + UnmodifiableMapView: function UnmodifiableMapView(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + ListQueue: function ListQueue(t0, t1) { + var _ = this; + _._table = t0; + _._modificationCount = _._tail = _._head = 0; + _.$ti = t1; + }, + _ListQueueIterator: function _ListQueueIterator(t0, t1, t2, t3, t4) { + var _ = this; + _._queue = t0; + _._collection$_end = t1; + _._modificationCount = t2; + _._collection$_position = t3; + _._collection$_current = null; + _.$ti = t4; + }, + SetBase: function SetBase() { + }, + _SetBase: function _SetBase() { + }, + _UnmodifiableSetMixin: function _UnmodifiableSetMixin() { + }, + UnmodifiableSetView: function UnmodifiableSetView(t0, t1) { + this._collection$_source = t0; + this.$ti = t1; + }, + _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() { + }, + _UnmodifiableSetView_SetBase__UnmodifiableSetMixin: function _UnmodifiableSetView_SetBase__UnmodifiableSetMixin() { + }, + _parseJson(source, reviver) { + var e, exception, t1, parsed = null; + try { + parsed = JSON.parse(source); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.FormatException$(String(e), null, null); + throw A.wrapException(t1); + } + t1 = A._convertJsonToDartLazy(parsed); + return t1; + }, + _convertJsonToDartLazy(object) { + var i; + if (object == null) + return null; + if (typeof object != "object") + return object; + if (!Array.isArray(object)) + return new A._JsonMap(object, Object.create(null)); + for (i = 0; i < object.length; ++i) + object[i] = A._convertJsonToDartLazy(object[i]); + return object; + }, + _Utf8Decoder__makeNativeUint8List(codeUnits, start, end) { + var bytes, t1, i, b, + $length = end - start; + if ($length <= 4096) + bytes = $.$get$_Utf8Decoder__reusableBuffer(); + else + bytes = new Uint8Array($length); + for (t1 = J.getInterceptor$asx(codeUnits), i = 0; i < $length; ++i) { + b = t1.$index(codeUnits, start + i); + if ((b & 255) !== b) + b = 255; + bytes[i] = b; + } + return bytes; + }, + _Utf8Decoder__convertInterceptedUint8List(allowMalformed, codeUnits, start, end) { + var decoder = allowMalformed ? $.$get$_Utf8Decoder__decoderNonfatal() : $.$get$_Utf8Decoder__decoder(); + if (decoder == null) + return null; + if (0 === start && end === codeUnits.length) + return A._Utf8Decoder__useTextDecoder(decoder, codeUnits); + return A._Utf8Decoder__useTextDecoder(decoder, codeUnits.subarray(start, end)); + }, + _Utf8Decoder__useTextDecoder(decoder, codeUnits) { + var t1, exception; + try { + t1 = decoder.decode(codeUnits); + return t1; + } catch (exception) { + } + return null; + }, + Base64Codec__checkPadding(source, sourceIndex, sourceEnd, firstPadding, paddingCount, $length) { + if (B.JSInt_methods.$mod($length, 4) !== 0) + throw A.wrapException(A.FormatException$("Invalid base64 padding, padded length must be multiple of four, is " + $length, source, sourceEnd)); + if (firstPadding + paddingCount !== $length) + throw A.wrapException(A.FormatException$("Invalid base64 padding, '=' not at the end", source, sourceIndex)); + if (paddingCount > 2) + throw A.wrapException(A.FormatException$("Invalid base64 padding, more than two '=' characters", source, sourceIndex)); + }, + _Base64Encoder_encodeChunk(alphabet, bytes, start, end, isLast, output, outputIndex, state) { + var t1, t2, i, byteOr, byte, outputIndex0, outputIndex1, + bits = state >>> 2, + expectedChars = 3 - (state & 3); + for (t1 = J.getInterceptor$asx(bytes), t2 = output.$flags | 0, i = start, byteOr = 0; i < end; ++i) { + byte = t1.$index(bytes, i); + byteOr = (byteOr | byte) >>> 0; + bits = (bits << 8 | byte) & 16777215; + --expectedChars; + if (expectedChars === 0) { + outputIndex0 = outputIndex + 1; + t2 & 2 && A.throwUnsupportedOperation(output); + output[outputIndex] = alphabet.charCodeAt(bits >>> 18 & 63); + outputIndex = outputIndex0 + 1; + output[outputIndex0] = alphabet.charCodeAt(bits >>> 12 & 63); + outputIndex0 = outputIndex + 1; + output[outputIndex] = alphabet.charCodeAt(bits >>> 6 & 63); + outputIndex = outputIndex0 + 1; + output[outputIndex0] = alphabet.charCodeAt(bits & 63); + bits = 0; + expectedChars = 3; + } + } + if (byteOr >= 0 && byteOr <= 255) { + if (isLast && expectedChars < 3) { + outputIndex0 = outputIndex + 1; + outputIndex1 = outputIndex0 + 1; + if (3 - expectedChars === 1) { + t2 & 2 && A.throwUnsupportedOperation(output); + output[outputIndex] = alphabet.charCodeAt(bits >>> 2 & 63); + output[outputIndex0] = alphabet.charCodeAt(bits << 4 & 63); + output[outputIndex1] = 61; + output[outputIndex1 + 1] = 61; + } else { + t2 & 2 && A.throwUnsupportedOperation(output); + output[outputIndex] = alphabet.charCodeAt(bits >>> 10 & 63); + output[outputIndex0] = alphabet.charCodeAt(bits >>> 4 & 63); + output[outputIndex1] = alphabet.charCodeAt(bits << 2 & 63); + output[outputIndex1 + 1] = 61; + } + return 0; + } + return (bits << 2 | 3 - expectedChars) >>> 0; + } + for (i = start; i < end;) { + byte = t1.$index(bytes, i); + if (byte < 0 || byte > 255) + break; + ++i; + } + throw A.wrapException(A.ArgumentError$value(bytes, "Not a byte value at index " + i + ": 0x" + B.JSInt_methods.toRadixString$1(t1.$index(bytes, i), 16), null)); + }, + JsonUnsupportedObjectError$(unsupportedObject, cause, partialResult) { + return new A.JsonUnsupportedObjectError(unsupportedObject, cause); + }, + _defaultToEncodable(object) { + return object.toJson$0(); + }, + _JsonStringStringifier$(_sink, _toEncodable) { + return new A._JsonStringStringifier(_sink, [], A.convert___defaultToEncodable$closure()); + }, + _JsonStringStringifier_stringify(object, toEncodable, indent) { + var t1, + output = new A.StringBuffer(""), + stringifier = A._JsonStringStringifier$(output, toEncodable); + stringifier.writeObject$1(object); + t1 = output._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Utf8Decoder_errorDescription(state) { + switch (state) { + case 65: + return "Missing extension byte"; + case 67: + return "Unexpected extension byte"; + case 69: + return "Invalid UTF-8 byte"; + case 71: + return "Overlong encoding"; + case 73: + return "Out of unicode range"; + case 75: + return "Encoded surrogate"; + case 77: + return "Unfinished UTF-8 octet sequence"; + default: + return ""; + } + }, + _JsonMap: function _JsonMap(t0, t1) { + this._original = t0; + this._processed = t1; + this._data = null; + }, + _JsonMap_values_closure: function _JsonMap_values_closure(t0) { + this.$this = t0; + }, + _JsonMap_addAll_closure: function _JsonMap_addAll_closure(t0) { + this.$this = t0; + }, + _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) { + this._convert$_parent = t0; + }, + _Utf8Decoder__decoder_closure: function _Utf8Decoder__decoder_closure() { + }, + _Utf8Decoder__decoderNonfatal_closure: function _Utf8Decoder__decoderNonfatal_closure() { + }, + AsciiCodec: function AsciiCodec() { + }, + _UnicodeSubsetEncoder: function _UnicodeSubsetEncoder() { + }, + AsciiEncoder: function AsciiEncoder(t0) { + this._subsetMask = t0; + }, + Base64Codec: function Base64Codec() { + }, + Base64Encoder: function Base64Encoder() { + }, + _Base64Encoder: function _Base64Encoder(t0) { + this._convert$_state = 0; + this._alphabet = t0; + }, + _Base64EncoderSink: function _Base64EncoderSink() { + }, + _Utf8Base64EncoderSink: function _Utf8Base64EncoderSink(t0, t1) { + this._sink = t0; + this._encoder = t1; + }, + ByteConversionSink: function ByteConversionSink() { + }, + Codec: function Codec() { + }, + Converter: function Converter() { + }, + Encoding: function Encoding() { + }, + JsonUnsupportedObjectError: function JsonUnsupportedObjectError(t0, t1) { + this.unsupportedObject = t0; + this.cause = t1; + }, + JsonCyclicError: function JsonCyclicError(t0, t1) { + this.unsupportedObject = t0; + this.cause = t1; + }, + JsonCodec: function JsonCodec() { + }, + JsonEncoder: function JsonEncoder(t0) { + this._toEncodable = t0; + }, + JsonDecoder: function JsonDecoder(t0) { + this._reviver = t0; + }, + _JsonStringifier: function _JsonStringifier() { + }, + _JsonStringifier_writeMap_closure: function _JsonStringifier_writeMap_closure(t0, t1) { + this._box_0 = t0; + this.keyValueList = t1; + }, + _JsonStringStringifier: function _JsonStringStringifier(t0, t1, t2) { + this._sink = t0; + this._seen = t1; + this._toEncodable = t2; + }, + StringConversionSink: function StringConversionSink() { + }, + _StringSinkConversionSink: function _StringSinkConversionSink(t0) { + this._stringSink = t0; + }, + _StringCallbackSink: function _StringCallbackSink(t0, t1) { + this._convert$_callback = t0; + this._stringSink = t1; + }, + _Utf8StringSinkAdapter: function _Utf8StringSinkAdapter(t0, t1, t2) { + this._decoder = t0; + this._sink = t1; + this._stringSink = t2; + }, + Utf8Codec: function Utf8Codec() { + }, + Utf8Encoder: function Utf8Encoder() { + }, + _Utf8Encoder: function _Utf8Encoder(t0) { + this._bufferIndex = 0; + this._buffer = t0; + }, + Utf8Decoder: function Utf8Decoder(t0) { + this._allowMalformed = t0; + }, + _Utf8Decoder: function _Utf8Decoder(t0) { + this.allowMalformed = t0; + this._convert$_state = 16; + this._charOrIndex = 0; + }, + identityHashCode(object) { + return A.objectHashCode(object); + }, + Function_apply($function, positionalArguments) { + return A.Primitives_applyFunction($function, positionalArguments, null); + }, + Expando$() { + return new A.Expando(new WeakMap()); + }, + Expando__checkType(object) { + if (A._isBool(object) || typeof object == "number" || typeof object == "string" || object instanceof A._Record) + A.Expando__badExpandoKey(object); + }, + Expando__badExpandoKey(object) { + throw A.wrapException(A.ArgumentError$value(object, "object", "Expandos are not allowed on strings, numbers, bools, records or null")); + }, + int_parse(source, radix) { + var value = A.Primitives_parseInt(source, radix); + if (value != null) + return value; + throw A.wrapException(A.FormatException$(source, null, null)); + }, + double_parse(source) { + var value = A.Primitives_parseDouble(source); + if (value != null) + return value; + throw A.wrapException(A.FormatException$("Invalid double", source, null)); + }, + Error__throw(error, stackTrace) { + error = A.initializeExceptionWrapper(error, new Error()); + error.stack = stackTrace.toString$0(0); + throw error; + }, + List_List$filled($length, fill, growable, $E) { + var i, + result = growable ? J.JSArray_JSArray$growable($length, $E) : J.JSArray_JSArray$fixed($length, $E); + if ($length !== 0 && fill != null) + for (i = 0; i < result.length; ++i) + result[i] = fill; + return result; + }, + List_List$from(elements, growable, $E) { + var t1, + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + list.push(t1.get$current(t1)); + if (growable) + return list; + list.$flags = 1; + return list; + }, + List_List$of(elements, growable, $E) { + var t1; + if (growable) + t1 = A.List_List$_of(elements, $E); + else { + t1 = A.List_List$_of(elements, $E); + t1.$flags = 1; + t1 = t1; + } + return t1; + }, + List_List$_of(elements, $E) { + var list, t1; + if (Array.isArray(elements)) + return A._setArrayType(elements.slice(0), $E._eval$1("JSArray<0>")); + list = A._setArrayType([], $E._eval$1("JSArray<0>")); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + list.push(t1.get$current(t1)); + return list; + }, + List_List$unmodifiable(elements, $E) { + var result = A.List_List$from(elements, false, $E); + result.$flags = 3; + return result; + }, + String_String$fromCharCodes(charCodes, start, end) { + var t1, t2, maxLength, array, len; + A.RangeError_checkNotNegative(start, "start"); + t1 = end == null; + t2 = !t1; + if (t2) { + maxLength = end - start; + if (maxLength < 0) + throw A.wrapException(A.RangeError$range(end, start, null, "end", null)); + if (maxLength === 0) + return ""; + } + if (Array.isArray(charCodes)) { + array = charCodes; + len = array.length; + if (t1) + end = len; + return A.Primitives_stringFromCharCodes(start > 0 || end < len ? array.slice(start, end) : array); + } + if (type$.NativeUint8List._is(charCodes)) + return A.String__stringFromUint8List(charCodes, start, end); + if (t2) + charCodes = J.take$1$ax(charCodes, end); + if (start > 0) + charCodes = J.skip$1$ax(charCodes, start); + t1 = A.List_List$_of(charCodes, type$.int); + return A.Primitives_stringFromCharCodes(t1); + }, + String_String$fromCharCode(charCode) { + return A.Primitives_stringFromCharCode(charCode); + }, + String__stringFromUint8List(charCodes, start, endOrNull) { + var len = charCodes.length; + if (start >= len) + return ""; + return A.Primitives_stringFromNativeUint8List(charCodes, start, endOrNull == null || endOrNull > len ? len : endOrNull); + }, + RegExp_RegExp(source, multiLine) { + return new A.JSSyntaxRegExp(source, A.JSSyntaxRegExp_makeNative(source, multiLine, true, false, false, "")); + }, + identical(a, b) { + return a == null ? b == null : a === b; + }, + StringBuffer__writeAll(string, objects, separator) { + var iterator = J.get$iterator$ax(objects); + if (!iterator.moveNext$0()) + return string; + if (separator.length === 0) { + do + string += A.S(iterator.get$current(iterator)); + while (iterator.moveNext$0()); + } else { + string += A.S(iterator.get$current(iterator)); + while (iterator.moveNext$0()) + string = string + separator + A.S(iterator.get$current(iterator)); + } + return string; + }, + NoSuchMethodError_NoSuchMethodError$withInvocation(receiver, invocation) { + return new A.NoSuchMethodError(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments()); + }, + Uri_base() { + var cachedUri, uri, + current = A.Primitives_currentUri(); + if (current == null) + throw A.wrapException(A.UnsupportedError$("'Uri.base' is not supported")); + cachedUri = $.Uri__cachedBaseUri; + if (cachedUri != null && current === $.Uri__cachedBaseString) + return cachedUri; + uri = A.Uri_parse(current); + $.Uri__cachedBaseUri = uri; + $.Uri__cachedBaseString = current; + return uri; + }, + _Uri__uriEncode(canonicalMask, text, encoding, spaceToPlus) { + var t1, bytes, i, t2, byte, + _s16_ = "0123456789ABCDEF"; + if (encoding === B.C_Utf8Codec) { + t1 = $.$get$_Uri__needsNoEncoding(); + t1 = t1._nativeRegExp.test(text); + } else + t1 = false; + if (t1) + return text; + bytes = B.C_Utf8Encoder.convert$1(text); + for (t1 = bytes.length, i = 0, t2 = ""; i < t1; ++i) { + byte = bytes[i]; + if (byte < 128 && (string$.x00_____.charCodeAt(byte) & canonicalMask) !== 0) + t2 += A.Primitives_stringFromCharCode(byte); + else + t2 = spaceToPlus && byte === 32 ? t2 + "+" : t2 + "%" + _s16_[byte >>> 4 & 15] + _s16_[byte & 15]; + } + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + StackTrace_current() { + return A.getTraceFromException(new Error()); + }, + DateTime$fromMillisecondsSinceEpoch(millisecondsSinceEpoch) { + if (millisecondsSinceEpoch < -864e13 || millisecondsSinceEpoch > 864e13) + A.throwExpression(A.RangeError$range(millisecondsSinceEpoch, -864e13, 864e13, "millisecondsSinceEpoch", null)); + A.checkNotNullable(false, "isUtc", type$.bool); + return new A.DateTime(millisecondsSinceEpoch, 0, false); + }, + DateTime__validate(millisecondsSinceEpoch, microsecond, isUtc) { + var _s11_ = "microsecond"; + if (microsecond > 999) + throw A.wrapException(A.RangeError$range(microsecond, 0, 999, _s11_, null)); + if (millisecondsSinceEpoch < -864e13 || millisecondsSinceEpoch > 864e13) + throw A.wrapException(A.RangeError$range(millisecondsSinceEpoch, -864e13, 864e13, "millisecondsSinceEpoch", null)); + if (millisecondsSinceEpoch === 864e13 && microsecond !== 0) + throw A.wrapException(A.ArgumentError$value(microsecond, _s11_, "Time including microseconds is outside valid range")); + A.checkNotNullable(false, "isUtc", type$.bool); + return millisecondsSinceEpoch; + }, + DateTime__fourDigits(n) { + var absN = Math.abs(n), + sign = n < 0 ? "-" : ""; + if (absN >= 1000) + return "" + n; + if (absN >= 100) + return sign + "0" + absN; + if (absN >= 10) + return sign + "00" + absN; + return sign + "000" + absN; + }, + DateTime__threeDigits(n) { + if (n >= 100) + return "" + n; + if (n >= 10) + return "0" + n; + return "00" + n; + }, + DateTime__twoDigits(n) { + if (n >= 10) + return "" + n; + return "0" + n; + }, + Duration$(microseconds, milliseconds) { + return new A.Duration(microseconds + 1000 * milliseconds); + }, + EnumByName_byName(_this, $name) { + var _i, value; + for (_i = 0; _i < 4; ++_i) { + value = _this[_i]; + if (value._name === $name) + return value; + } + throw A.wrapException(A.ArgumentError$value($name, "name", "No enum value with that name")); + }, + Error_safeToString(object) { + if (typeof object == "number" || A._isBool(object) || object == null) + return J.toString$0$(object); + if (typeof object == "string") + return JSON.stringify(object); + return A.Primitives_safeToString(object); + }, + Error_throwWithStackTrace(error, stackTrace) { + A.checkNotNullable(error, "error", type$.Object); + A.checkNotNullable(stackTrace, "stackTrace", type$.StackTrace); + A.Error__throw(error, stackTrace); + }, + AssertionError$(message) { + return new A.AssertionError(message); + }, + ArgumentError$(message, $name) { + return new A.ArgumentError(false, null, $name, message); + }, + ArgumentError$value(value, $name, message) { + return new A.ArgumentError(true, value, $name, message); + }, + ArgumentError_checkNotNull(argument, $name) { + return argument; + }, + RangeError$(message) { + var _null = null; + return new A.RangeError(_null, _null, false, _null, _null, message); + }, + RangeError$value(value, $name, message) { + return new A.RangeError(null, null, true, value, $name, message == null ? "Value not in range" : message); + }, + RangeError$range(invalidValue, minValue, maxValue, $name, message) { + return new A.RangeError(minValue, maxValue, true, invalidValue, $name, message == null ? "Invalid value" : message); + }, + RangeError_checkValueInInterval(value, minValue, maxValue, $name) { + if (value < minValue || value > maxValue) + throw A.wrapException(A.RangeError$range(value, minValue, maxValue, $name, null)); + return value; + }, + RangeError_checkValidRange(start, end, $length) { + if (0 > start || start > $length) + throw A.wrapException(A.RangeError$range(start, 0, $length, "start", null)); + if (end != null) { + if (start > end || end > $length) + throw A.wrapException(A.RangeError$range(end, start, $length, "end", null)); + return end; + } + return $length; + }, + RangeError_checkNotNegative(value, $name) { + if (value < 0) + throw A.wrapException(A.RangeError$range(value, 0, null, $name, null)); + return value; + }, + IndexError$withLength(invalidValue, $length, indexable, message, $name) { + return new A.IndexError($length, true, invalidValue, $name, "Index out of range"); + }, + IndexError_check(index, $length, indexable, message, $name) { + if (0 > index || index >= $length) + throw A.wrapException(A.IndexError$withLength(index, $length, indexable, message, $name == null ? "index" : $name)); + return index; + }, + UnsupportedError$(message) { + return new A.UnsupportedError(message); + }, + UnimplementedError$(message) { + return new A.UnimplementedError(message); + }, + StateError$(message) { + return new A.StateError(message); + }, + ConcurrentModificationError$(modifiedObject) { + return new A.ConcurrentModificationError(modifiedObject); + }, + FormatException$(message, source, offset) { + return new A.FormatException(message, source, offset); + }, + Iterable_Iterable$generate(count, generator, $E) { + if (count <= 0) + return new A.EmptyIterable($E._eval$1("EmptyIterable<0>")); + return new A._GeneratorIterable(count, generator, $E._eval$1("_GeneratorIterable<0>")); + }, + Iterable_iterableToShortString(iterable, leftDelimiter, rightDelimiter) { + var parts, t1; + if (A.isToStringVisiting(iterable)) { + if (leftDelimiter === "(" && rightDelimiter === ")") + return "(...)"; + return leftDelimiter + "..." + rightDelimiter; + } + parts = A._setArrayType([], type$.JSArray_String); + $._toStringVisiting.push(iterable); + try { + A._iterablePartsToStrings(iterable, parts); + } finally { + $._toStringVisiting.pop(); + } + t1 = A.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + Iterable_iterableToFullString(iterable, leftDelimiter, rightDelimiter) { + var buffer, t1; + if (A.isToStringVisiting(iterable)) + return leftDelimiter + "..." + rightDelimiter; + buffer = new A.StringBuffer(leftDelimiter); + $._toStringVisiting.push(iterable); + try { + t1 = buffer; + t1._contents = A.StringBuffer__writeAll(t1._contents, iterable, ", "); + } finally { + $._toStringVisiting.pop(); + } + buffer._contents += rightDelimiter; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _iterablePartsToStrings(iterable, parts) { + var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, + it = iterable.get$iterator(iterable), + $length = 0, count = 0; + for (;;) { + if (!($length < 80 || count < 3)) + break; + if (!it.moveNext$0()) + return; + next = A.S(it.get$current(it)); + parts.push(next); + $length += next.length + 2; + ++count; + } + if (!it.moveNext$0()) { + if (count <= 5) + return; + ultimateString = parts.pop(); + penultimateString = parts.pop(); + } else { + penultimate = it.get$current(it); + ++count; + if (!it.moveNext$0()) { + if (count <= 4) { + parts.push(A.S(penultimate)); + return; + } + ultimateString = A.S(penultimate); + penultimateString = parts.pop(); + $length += ultimateString.length + 2; + } else { + ultimate = it.get$current(it); + ++count; + for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { + ultimate0 = it.get$current(it); + ++count; + if (count > 100) { + for (;;) { + if (!($length > 75 && count > 3)) + break; + $length -= parts.pop().length + 2; + --count; + } + parts.push("..."); + return; + } + } + penultimateString = A.S(penultimate); + ultimateString = A.S(ultimate); + $length += ultimateString.length + penultimateString.length + 4; + } + } + if (count > parts.length + 2) { + $length += 5; + elision = "..."; + } else + elision = null; + for (;;) { + if (!($length > 80 && parts.length > 3)) + break; + $length -= parts.pop().length + 2; + if (elision == null) { + $length += 5; + elision = "..."; + } + } + if (elision != null) + parts.push(elision); + parts.push(penultimateString); + parts.push(ultimateString); + }, + Map_castFrom(source, $K, $V, $K2, $V2) { + return new A.CastMap(source, $K._eval$1("@<0>")._bind$1($V)._bind$1($K2)._bind$1($V2)._eval$1("CastMap<1,2,3,4>")); + }, + Object_hash(object1, object2, object3, object4) { + var t1; + if (B.C_SentinelValue === object3) { + t1 = J.get$hashCode$(object1); + object2 = J.get$hashCode$(object2); + return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2)); + } + if (B.C_SentinelValue === object4) { + t1 = J.get$hashCode$(object1); + object2 = J.get$hashCode$(object2); + object3 = J.get$hashCode$(object3); + return A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2), object3)); + } + t1 = J.get$hashCode$(object1); + object2 = J.get$hashCode$(object2); + object3 = J.get$hashCode$(object3); + object4 = J.get$hashCode$(object4); + object4 = A.SystemHash_finish(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine(A.SystemHash_combine($.$get$_hashSeed(), t1), object2), object3), object4)); + return object4; + }, + Object_hashAll(objects) { + var t1, _i, + hash = $.$get$_hashSeed(); + for (t1 = objects.length, _i = 0; _i < objects.length; objects.length === t1 || (0, A.throwConcurrentModificationError)(objects), ++_i) + hash = A.SystemHash_combine(hash, J.get$hashCode$(objects[_i])); + return A.SystemHash_finish(hash); + }, + print(object) { + var line = A.S(object), + toZone = $._printToZone; + if (toZone == null) + A.printString(line); + else + toZone.call$1(line); + }, + Set_Set$unmodifiable(elements, $E) { + return new A.UnmodifiableSetView(A.LinkedHashSet_LinkedHashSet$of(elements, $E), $E._eval$1("UnmodifiableSetView<0>")); + }, + Set_castFrom(source, newSet, $S, $T) { + return new A.CastSet(source, newSet, $S._eval$1("@<0>")._bind$1($T)._eval$1("CastSet<1,2>")); + }, + _combineSurrogatePair(start, end) { + return 65536 + ((start & 1023) << 10) + (end & 1023); + }, + Uri_Uri$dataFromString($content, encoding, mimeType) { + var encodingName, t1, + buffer = new A.StringBuffer(""), + indices = A._setArrayType([-1], type$.JSArray_int); + if (encoding == null) + encodingName = null; + else + encodingName = "utf-8"; + if (encoding == null) + encoding = B.C_AsciiCodec; + A.UriData__writeUri(mimeType, encodingName, null, buffer, indices); + indices.push(buffer._contents.length); + buffer._contents += ","; + A.UriData__uriEncodeBytes(256, encoding.encode$1($content), buffer); + t1 = buffer._contents; + return new A.UriData(t1.charCodeAt(0) == 0 ? t1 : t1, indices, null).get$uri(); + }, + Uri_parse(uri) { + var delta, indices, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, isSimple, scheme, t1, t2, schemeAuth, queryStart0, pathStart0, port, userInfoStart, userInfo, host, portNumber, path, query, _null = null, + end = uri.length; + if (end >= 5) { + delta = ((uri.charCodeAt(4) ^ 58) * 3 | uri.charCodeAt(0) ^ 100 | uri.charCodeAt(1) ^ 97 | uri.charCodeAt(2) ^ 116 | uri.charCodeAt(3) ^ 97) >>> 0; + if (delta === 0) + return A.UriData__parse(end < end ? B.JSString_methods.substring$2(uri, 0, end) : uri, 5, _null).get$uri(); + else if (delta === 32) + return A.UriData__parse(B.JSString_methods.substring$2(uri, 5, end), 0, _null).get$uri(); + } + indices = A.List_List$filled(8, 0, false, type$.int); + indices[0] = 0; + indices[1] = -1; + indices[2] = -1; + indices[7] = -1; + indices[3] = 0; + indices[4] = 0; + indices[5] = end; + indices[6] = end; + if (A._scan(uri, 0, end, 0, indices) >= 14) + indices[7] = end; + schemeEnd = indices[1]; + if (schemeEnd >= 0) + if (A._scan(uri, 0, schemeEnd, 20, indices) === 20) + indices[7] = schemeEnd; + hostStart = indices[2] + 1; + portStart = indices[3]; + pathStart = indices[4]; + queryStart = indices[5]; + fragmentStart = indices[6]; + if (fragmentStart < queryStart) + queryStart = fragmentStart; + if (pathStart < hostStart) + pathStart = queryStart; + else if (pathStart <= schemeEnd) + pathStart = schemeEnd + 1; + if (portStart < hostStart) + portStart = pathStart; + isSimple = indices[7] < 0; + scheme = _null; + if (isSimple) { + isSimple = false; + if (!(hostStart > schemeEnd + 3)) { + t1 = portStart > 0; + if (!(t1 && portStart + 1 === pathStart)) { + if (!B.JSString_methods.startsWith$2(uri, "\\", pathStart)) + if (hostStart > 0) + t2 = B.JSString_methods.startsWith$2(uri, "\\", hostStart - 1) || B.JSString_methods.startsWith$2(uri, "\\", hostStart - 2); + else + t2 = false; + else + t2 = true; + if (!t2) { + if (!(queryStart < end && queryStart === pathStart + 2 && B.JSString_methods.startsWith$2(uri, "..", pathStart))) + t2 = queryStart > pathStart + 2 && B.JSString_methods.startsWith$2(uri, "/..", queryStart - 3); + else + t2 = true; + if (!t2) + if (schemeEnd === 4) { + if (B.JSString_methods.startsWith$2(uri, "file", 0)) { + if (hostStart <= 0) { + if (!B.JSString_methods.startsWith$2(uri, "/", pathStart)) { + schemeAuth = "file:///"; + delta = 3; + } else { + schemeAuth = "file://"; + delta = 2; + } + uri = schemeAuth + B.JSString_methods.substring$2(uri, pathStart, end); + queryStart += delta; + fragmentStart += delta; + end = uri.length; + hostStart = 7; + portStart = 7; + pathStart = 7; + } else if (pathStart === queryStart) { + ++fragmentStart; + queryStart0 = queryStart + 1; + uri = B.JSString_methods.replaceRange$3(uri, pathStart, queryStart, "/"); + ++end; + queryStart = queryStart0; + } + scheme = "file"; + } else if (B.JSString_methods.startsWith$2(uri, "http", 0)) { + if (t1 && portStart + 3 === pathStart && B.JSString_methods.startsWith$2(uri, "80", portStart + 1)) { + fragmentStart -= 3; + pathStart0 = pathStart - 3; + queryStart -= 3; + uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); + end -= 3; + pathStart = pathStart0; + } + scheme = "http"; + } + } else if (schemeEnd === 5 && B.JSString_methods.startsWith$2(uri, "https", 0)) { + if (t1 && portStart + 4 === pathStart && B.JSString_methods.startsWith$2(uri, "443", portStart + 1)) { + fragmentStart -= 4; + pathStart0 = pathStart - 4; + queryStart -= 4; + uri = B.JSString_methods.replaceRange$3(uri, portStart, pathStart, ""); + end -= 3; + pathStart = pathStart0; + } + scheme = "https"; + } + isSimple = !t2; + } + } + } + } + if (isSimple) + return new A._SimpleUri(end < uri.length ? B.JSString_methods.substring$2(uri, 0, end) : uri, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme); + if (scheme == null) + if (schemeEnd > 0) + scheme = A._Uri__makeScheme(uri, 0, schemeEnd); + else { + if (schemeEnd === 0) + A._Uri__fail(uri, 0, "Invalid empty scheme"); + scheme = ""; + } + port = _null; + if (hostStart > 0) { + userInfoStart = schemeEnd + 3; + userInfo = userInfoStart < hostStart ? A._Uri__makeUserInfo(uri, userInfoStart, hostStart - 1) : ""; + host = A._Uri__makeHost(uri, hostStart, portStart, false); + t1 = portStart + 1; + if (t1 < pathStart) { + portNumber = A.Primitives_parseInt(B.JSString_methods.substring$2(uri, t1, pathStart), _null); + port = A._Uri__makePort(portNumber == null ? A.throwExpression(A.FormatException$("Invalid port", uri, t1)) : portNumber, scheme); + } + } else { + host = _null; + userInfo = ""; + } + path = A._Uri__makePath(uri, pathStart, queryStart, _null, scheme, host != null); + query = queryStart < fragmentStart ? A._Uri__makeQuery(uri, queryStart + 1, fragmentStart, _null) : _null; + return A._Uri$_internal(scheme, userInfo, host, port, path, query, fragmentStart < end ? A._Uri__makeFragment(uri, fragmentStart + 1, end) : _null); + }, + Uri_decodeComponent(encodedComponent) { + return A._Uri__uriDecode(encodedComponent, 0, encodedComponent.length, B.C_Utf8Codec, false); + }, + Uri__ipv4FormatError(msg, source, position) { + throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, source, position)); + }, + Uri__parseIPv4Address(host, start, end, target, targetOffset) { + var t1, octetStart, cursor, octetIndex, octetValue, char, digit, octetIndex0, + _s17_ = "invalid character"; + for (t1 = target.$flags | 0, octetStart = start, cursor = octetStart, octetIndex = 0, octetValue = 0;;) { + char = cursor >= end ? 0 : host.charCodeAt(cursor); + digit = char ^ 48; + if (digit <= 9) { + if (octetValue !== 0 || cursor === octetStart) { + octetValue = octetValue * 10 + digit; + if (octetValue <= 255) { + ++cursor; + continue; + } + A.Uri__ipv4FormatError("each part must be in the range 0..255", host, octetStart); + } + A.Uri__ipv4FormatError("parts must not have leading zeros", host, octetStart); + } + if (cursor === octetStart) { + if (cursor === end) + break; + A.Uri__ipv4FormatError(_s17_, host, cursor); + } + octetIndex0 = octetIndex + 1; + t1 & 2 && A.throwUnsupportedOperation(target); + target[targetOffset + octetIndex] = octetValue; + if (char === 46) { + if (octetIndex0 < 4) { + ++cursor; + octetIndex = octetIndex0; + octetStart = cursor; + octetValue = 0; + continue; + } + break; + } + if (cursor === end) { + if (octetIndex0 === 4) + return; + break; + } + A.Uri__ipv4FormatError(_s17_, host, cursor); + octetIndex = octetIndex0; + } + A.Uri__ipv4FormatError("IPv4 address should contain exactly 4 parts", host, cursor); + }, + Uri__validateIPvAddress(host, start, end) { + var error; + if (start === end) + throw A.wrapException(A.FormatException$("Empty IP address", host, start)); + if (host.charCodeAt(start) === 118) { + error = A.Uri__validateIPvFutureAddress(host, start, end); + if (error != null) + throw A.wrapException(error); + return false; + } + A.Uri_parseIPv6Address(host, start, end); + return true; + }, + Uri__validateIPvFutureAddress(host, start, end) { + var cursor, cursor0, char, ucChar, + _s38_ = "Missing hex-digit in IPvFuture address"; + ++start; + for (cursor = start;; cursor = cursor0) { + if (cursor < end) { + cursor0 = cursor + 1; + char = host.charCodeAt(cursor); + if ((char ^ 48) <= 9) + continue; + ucChar = char | 32; + if (ucChar >= 97 && ucChar <= 102) + continue; + if (char === 46) { + if (cursor0 - 1 === start) + return new A.FormatException(_s38_, host, cursor0); + cursor = cursor0; + break; + } + return new A.FormatException("Unexpected character", host, cursor0 - 1); + } + if (cursor - 1 === start) + return new A.FormatException(_s38_, host, cursor); + return new A.FormatException("Missing '.' in IPvFuture address", host, cursor); + } + if (cursor === end) + return new A.FormatException("Missing address in IPvFuture address, host, cursor", null, null); + for (;;) { + if ((string$.x00_____.charCodeAt(host.charCodeAt(cursor)) & 16) !== 0) { + ++cursor; + if (cursor < end) + continue; + return null; + } + return new A.FormatException("Invalid IPvFuture address character", host, cursor); + } + }, + Uri_parseIPv6Address(host, start, end) { + var result, wildcardAt, partCount, cursor, partStart, hexValue, decValue, char, _0_0, decValue0, hexDigit, _1_0, t1, partCount0, partAfterWildcard, partsAfterWildcard, positionAfterWildcard, newPositionAfterWildcard, + _s39_ = "an address must contain at most 8 parts", + error = new A.Uri_parseIPv6Address_error(host); + if (end - start < 2) + error.call$2("address is too short", null); + result = new Uint8Array(16); + wildcardAt = -1; + partCount = 0; + if (host.charCodeAt(start) === 58) + if (host.charCodeAt(start + 1) === 58) { + cursor = start + 2; + partStart = cursor; + wildcardAt = 0; + partCount = 1; + } else { + error.call$2("invalid start colon", start); + cursor = start; + partStart = cursor; + } + else { + cursor = start; + partStart = cursor; + } + for (hexValue = 0, decValue = true;;) { + char = cursor >= end ? 0 : host.charCodeAt(cursor); + $label0$0: { + _0_0 = char ^ 48; + decValue0 = false; + if (_0_0 <= 9) + hexDigit = _0_0; + else { + _1_0 = char | 32; + if (_1_0 >= 97 && _1_0 <= 102) + hexDigit = _1_0 - 87; + else + break $label0$0; + decValue = decValue0; + } + if (cursor < partStart + 4) { + hexValue = hexValue * 16 + hexDigit; + ++cursor; + continue; + } + error.call$2("an IPv6 part can contain a maximum of 4 hex digits", partStart); + } + if (cursor > partStart) { + if (char === 46) { + if (decValue) { + if (partCount <= 6) { + A.Uri__parseIPv4Address(host, partStart, end, result, partCount * 2); + partCount += 2; + cursor = end; + break; + } + error.call$2(_s39_, partStart); + } + break; + } + t1 = partCount * 2; + result[t1] = B.JSInt_methods._shrOtherPositive$1(hexValue, 8); + result[t1 + 1] = hexValue & 255; + ++partCount; + if (char === 58) { + if (partCount < 8) { + ++cursor; + partStart = cursor; + hexValue = 0; + decValue = true; + continue; + } + error.call$2(_s39_, cursor); + } + break; + } + if (char === 58) { + if (wildcardAt < 0) { + partCount0 = partCount + 1; + ++cursor; + wildcardAt = partCount; + partCount = partCount0; + partStart = cursor; + continue; + } + error.call$2("only one wildcard `::` is allowed", cursor); + } + if (wildcardAt !== partCount - 1) + error.call$2("missing part", cursor); + break; + } + if (cursor < end) + error.call$2("invalid character", cursor); + if (partCount < 8) { + if (wildcardAt < 0) + error.call$2("an address without a wildcard must contain exactly 8 parts", end); + partAfterWildcard = wildcardAt + 1; + partsAfterWildcard = partCount - partAfterWildcard; + if (partsAfterWildcard > 0) { + positionAfterWildcard = partAfterWildcard * 2; + newPositionAfterWildcard = 16 - partsAfterWildcard * 2; + B.NativeUint8List_methods.setRange$4(result, newPositionAfterWildcard, 16, result, positionAfterWildcard); + B.NativeUint8List_methods.fillRange$3(result, positionAfterWildcard, newPositionAfterWildcard, 0); + } + } + return result; + }, + _Uri$_internal(scheme, _userInfo, _host, _port, path, _query, _fragment) { + return new A._Uri(scheme, _userInfo, _host, _port, path, _query, _fragment); + }, + _Uri__Uri(host, path, pathSegments, scheme) { + var userInfo, query, fragment, port, isFile, t1, hasAuthority, t2, _null = null; + scheme = scheme == null ? "" : A._Uri__makeScheme(scheme, 0, scheme.length); + userInfo = A._Uri__makeUserInfo(_null, 0, 0); + host = A._Uri__makeHost(host, 0, host == null ? 0 : host.length, false); + query = A._Uri__makeQuery(_null, 0, 0, _null); + fragment = A._Uri__makeFragment(_null, 0, 0); + port = A._Uri__makePort(_null, scheme); + isFile = scheme === "file"; + if (host == null) + t1 = userInfo.length !== 0 || port != null || isFile; + else + t1 = false; + if (t1) + host = ""; + t1 = host == null; + hasAuthority = !t1; + path = A._Uri__makePath(path, 0, path == null ? 0 : path.length, pathSegments, scheme, hasAuthority); + t2 = scheme.length === 0; + if (t2 && t1 && !B.JSString_methods.startsWith$1(path, "/")) + path = A._Uri__normalizeRelativePath(path, !t2 || hasAuthority); + else + path = A._Uri__removeDotSegments(path); + return A._Uri$_internal(scheme, userInfo, t1 && B.JSString_methods.startsWith$1(path, "//") ? "" : host, port, path, query, fragment); + }, + _Uri__defaultPort(scheme) { + if (scheme === "http") + return 80; + if (scheme === "https") + return 443; + return 0; + }, + _Uri__fail(uri, index, message) { + throw A.wrapException(A.FormatException$(message, uri, index)); + }, + _Uri__Uri$file(path, windows) { + return windows ? A._Uri__makeWindowsFileUrl(path, false) : A._Uri__makeFileUri(path, false); + }, + _Uri__checkNonWindowsPathReservedCharacters(segments, argumentError) { + var t1, _i, segment; + for (t1 = segments.length, _i = 0; _i < t1; ++_i) { + segment = segments[_i]; + if (A.stringContainsUnchecked(segment, "/", 0)) { + t1 = A.UnsupportedError$("Illegal path character " + segment); + throw A.wrapException(t1); + } + } + }, + _Uri__checkWindowsPathReservedCharacters(segments, argumentError, firstSegment) { + var t1, t2, t3, t4; + for (t1 = A.SubListIterable$(segments, firstSegment, null, A._arrayInstanceType(segments)._precomputed1), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + t4 = A.RegExp_RegExp('["*/:<>?\\\\|]', false); + if (A.stringContainsUnchecked(t3, t4, 0)) + if (argumentError) + throw A.wrapException(A.ArgumentError$("Illegal character in path", null)); + else + throw A.wrapException(A.UnsupportedError$("Illegal character in path: " + t3)); + } + }, + _Uri__checkWindowsDriveLetter(charCode, argumentError) { + var t1, + _s21_ = "Illegal drive letter "; + if (!(65 <= charCode && charCode <= 90)) + t1 = 97 <= charCode && charCode <= 122; + else + t1 = true; + if (t1) + return; + if (argumentError) + throw A.wrapException(A.ArgumentError$(_s21_ + A.String_String$fromCharCode(charCode), null)); + else + throw A.wrapException(A.UnsupportedError$(_s21_ + A.String_String$fromCharCode(charCode))); + }, + _Uri__makeFileUri(path, slashTerminated) { + var _null = null, + segments = A._setArrayType(path.split("/"), type$.JSArray_String); + if (B.JSString_methods.startsWith$1(path, "/")) + return A._Uri__Uri(_null, _null, segments, "file"); + else + return A._Uri__Uri(_null, _null, segments, _null); + }, + _Uri__makeWindowsFileUrl(path, slashTerminated) { + var t1, pathSegments, pathStart, hostPart, _s1_ = "\\", _null = null, _s4_ = "file"; + if (B.JSString_methods.startsWith$1(path, "\\\\?\\")) + if (B.JSString_methods.startsWith$2(path, "UNC\\", 4)) + path = B.JSString_methods.replaceRange$3(path, 0, 7, _s1_); + else { + path = B.JSString_methods.substring$1(path, 4); + if (path.length < 3 || path.charCodeAt(1) !== 58 || path.charCodeAt(2) !== 92) + throw A.wrapException(A.ArgumentError$value(path, "path", "Windows paths with \\\\?\\ prefix must be absolute")); + } + else + path = A.stringReplaceAllUnchecked(path, "/", _s1_); + t1 = path.length; + if (t1 > 1 && path.charCodeAt(1) === 58) { + A._Uri__checkWindowsDriveLetter(path.charCodeAt(0), true); + if (t1 === 2 || path.charCodeAt(2) !== 92) + throw A.wrapException(A.ArgumentError$value(path, "path", "Windows paths with drive letter must be absolute")); + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 1); + return A._Uri__Uri(_null, _null, pathSegments, _s4_); + } + if (B.JSString_methods.startsWith$1(path, _s1_)) + if (B.JSString_methods.startsWith$2(path, _s1_, 1)) { + pathStart = B.JSString_methods.indexOf$2(path, _s1_, 2); + t1 = pathStart < 0; + hostPart = t1 ? B.JSString_methods.substring$1(path, 2) : B.JSString_methods.substring$2(path, 2, pathStart); + pathSegments = A._setArrayType((t1 ? "" : B.JSString_methods.substring$1(path, pathStart + 1)).split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(hostPart, _null, pathSegments, _s4_); + } else { + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(_null, _null, pathSegments, _s4_); + } + else { + pathSegments = A._setArrayType(path.split(_s1_), type$.JSArray_String); + A._Uri__checkWindowsPathReservedCharacters(pathSegments, true, 0); + return A._Uri__Uri(_null, _null, pathSegments, _null); + } + }, + _Uri__makePort(port, scheme) { + if (port != null && port === A._Uri__defaultPort(scheme)) + return null; + return port; + }, + _Uri__makeHost(host, start, end, strictIPv6) { + var index, t1, zoneID, index0, zoneIDstart, isIPv6, hostChars, i; + if (host == null) + return null; + if (start === end) + return ""; + if (host.charCodeAt(start) === 91) { + index = end - 1; + if (host.charCodeAt(index) !== 93) + A._Uri__fail(host, start, "Missing end `]` to match `[` in host"); + t1 = start + 1; + zoneID = ""; + if (host.charCodeAt(t1) !== 118) { + index0 = A._Uri__checkZoneID(host, t1, index); + if (index0 < index) { + zoneIDstart = index0 + 1; + zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index0 + 3 : zoneIDstart, index, "%25"); + } + index = index0; + } + isIPv6 = A.Uri__validateIPvAddress(host, t1, index); + hostChars = B.JSString_methods.substring$2(host, t1, index); + return "[" + (isIPv6 ? hostChars.toLowerCase() : hostChars) + zoneID + "]"; + } + for (i = start; i < end; ++i) + if (host.charCodeAt(i) === 58) { + index = B.JSString_methods.indexOf$2(host, "%", start); + index = index >= start && index < end ? index : end; + if (index < end) { + zoneIDstart = index + 1; + zoneID = A._Uri__normalizeZoneID(host, B.JSString_methods.startsWith$2(host, "25", zoneIDstart) ? index + 3 : zoneIDstart, end, "%25"); + } else + zoneID = ""; + A.Uri_parseIPv6Address(host, start, index); + return "[" + B.JSString_methods.substring$2(host, start, index) + zoneID + "]"; + } + return A._Uri__normalizeRegName(host, start, end); + }, + _Uri__checkZoneID(host, start, end) { + var index = B.JSString_methods.indexOf$2(host, "%", start); + return index >= start && index < end ? index : end; + }, + _Uri__normalizeZoneID(host, start, end, prefix) { + var index, sectionStart, isNormalized, char, replacement, t1, t2, sourceLength, tail, slice, + buffer = prefix !== "" ? new A.StringBuffer(prefix) : null; + for (index = start, sectionStart = index, isNormalized = true; index < end;) { + char = host.charCodeAt(index); + if (char === 37) { + replacement = A._Uri__normalizeEscape(host, index, true); + t1 = replacement == null; + if (t1 && isNormalized) { + index += 3; + continue; + } + if (buffer == null) + buffer = new A.StringBuffer(""); + t2 = buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + if (t1) + replacement = B.JSString_methods.substring$2(host, index, index + 3); + else if (replacement === "%") + A._Uri__fail(host, index, "ZoneID should not contain % anymore"); + buffer._contents = t2 + replacement; + index += 3; + sectionStart = index; + isNormalized = true; + } else if (char < 127 && (string$.x00_____.charCodeAt(char) & 1) !== 0) { + if (isNormalized && 65 <= char && 90 >= char) { + if (buffer == null) + buffer = new A.StringBuffer(""); + if (sectionStart < index) { + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + sectionStart = index; + } + isNormalized = false; + } + ++index; + } else { + sourceLength = 1; + if ((char & 64512) === 55296 && index + 1 < end) { + tail = host.charCodeAt(index + 1); + if ((tail & 64512) === 56320) { + char = 65536 + ((char & 1023) << 10) + (tail & 1023); + sourceLength = 2; + } + } + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += slice; + t2 = A._Uri__escapeChar(char); + t1._contents += t2; + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return B.JSString_methods.substring$2(host, start, end); + if (sectionStart < end) { + slice = B.JSString_methods.substring$2(host, sectionStart, end); + buffer._contents += slice; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__normalizeRegName(host, start, end) { + var index, sectionStart, buffer, isNormalized, char, replacement, t1, slice, t2, sourceLength, tail, + _s128_ = string$.x00_____; + for (index = start, sectionStart = index, buffer = null, isNormalized = true; index < end;) { + char = host.charCodeAt(index); + if (char === 37) { + replacement = A._Uri__normalizeEscape(host, index, true); + t1 = replacement == null; + if (t1 && isNormalized) { + index += 3; + continue; + } + if (buffer == null) + buffer = new A.StringBuffer(""); + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (!isNormalized) + slice = slice.toLowerCase(); + t2 = buffer._contents += slice; + sourceLength = 3; + if (t1) + replacement = B.JSString_methods.substring$2(host, index, index + 3); + else if (replacement === "%") { + replacement = "%25"; + sourceLength = 1; + } + buffer._contents = t2 + replacement; + index += sourceLength; + sectionStart = index; + isNormalized = true; + } else if (char < 127 && (_s128_.charCodeAt(char) & 32) !== 0) { + if (isNormalized && 65 <= char && 90 >= char) { + if (buffer == null) + buffer = new A.StringBuffer(""); + if (sectionStart < index) { + buffer._contents += B.JSString_methods.substring$2(host, sectionStart, index); + sectionStart = index; + } + isNormalized = false; + } + ++index; + } else if (char <= 93 && (_s128_.charCodeAt(char) & 1024) !== 0) + A._Uri__fail(host, index, "Invalid character"); + else { + sourceLength = 1; + if ((char & 64512) === 55296 && index + 1 < end) { + tail = host.charCodeAt(index + 1); + if ((tail & 64512) === 56320) { + char = 65536 + ((char & 1023) << 10) + (tail & 1023); + sourceLength = 2; + } + } + slice = B.JSString_methods.substring$2(host, sectionStart, index); + if (!isNormalized) + slice = slice.toLowerCase(); + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += slice; + t2 = A._Uri__escapeChar(char); + t1._contents += t2; + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return B.JSString_methods.substring$2(host, start, end); + if (sectionStart < end) { + slice = B.JSString_methods.substring$2(host, sectionStart, end); + if (!isNormalized) + slice = slice.toLowerCase(); + buffer._contents += slice; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__makeScheme(scheme, start, end) { + var i, containsUpperCase, codeUnit; + if (start === end) + return ""; + if (!A._Uri__isAlphabeticCharacter(scheme.charCodeAt(start))) + A._Uri__fail(scheme, start, "Scheme not starting with alphabetic character"); + for (i = start, containsUpperCase = false; i < end; ++i) { + codeUnit = scheme.charCodeAt(i); + if (!(codeUnit < 128 && (string$.x00_____.charCodeAt(codeUnit) & 8) !== 0)) + A._Uri__fail(scheme, i, "Illegal scheme character"); + if (65 <= codeUnit && codeUnit <= 90) + containsUpperCase = true; + } + scheme = B.JSString_methods.substring$2(scheme, start, end); + return A._Uri__canonicalizeScheme(containsUpperCase ? scheme.toLowerCase() : scheme); + }, + _Uri__canonicalizeScheme(scheme) { + if (scheme === "http") + return "http"; + if (scheme === "file") + return "file"; + if (scheme === "https") + return "https"; + if (scheme === "package") + return "package"; + return scheme; + }, + _Uri__makeUserInfo(userInfo, start, end) { + if (userInfo == null) + return ""; + return A._Uri__normalizeOrSubstring(userInfo, start, end, 16, false, false); + }, + _Uri__makePath(path, start, end, pathSegments, scheme, hasAuthority) { + var result, + isFile = scheme === "file", + ensureLeadingSlash = isFile || hasAuthority; + if (path == null) { + if (pathSegments == null) + return isFile ? "/" : ""; + result = new A.MappedListIterable(pathSegments, new A._Uri__makePath_closure(), A._arrayInstanceType(pathSegments)._eval$1("MappedListIterable<1,String>")).join$1(0, "/"); + } else if (pathSegments != null) + throw A.wrapException(A.ArgumentError$("Both path and pathSegments specified", null)); + else + result = A._Uri__normalizeOrSubstring(path, start, end, 128, true, true); + if (result.length === 0) { + if (isFile) + return "/"; + } else if (ensureLeadingSlash && !B.JSString_methods.startsWith$1(result, "/")) + result = "/" + result; + return A._Uri__normalizePath(result, scheme, hasAuthority); + }, + _Uri__normalizePath(path, scheme, hasAuthority) { + var t1 = scheme.length === 0; + if (t1 && !hasAuthority && !B.JSString_methods.startsWith$1(path, "/") && !B.JSString_methods.startsWith$1(path, "\\")) + return A._Uri__normalizeRelativePath(path, !t1 || hasAuthority); + return A._Uri__removeDotSegments(path); + }, + _Uri__makeQuery(query, start, end, queryParameters) { + if (query != null) + return A._Uri__normalizeOrSubstring(query, start, end, 256, true, false); + return null; + }, + _Uri__makeFragment(fragment, start, end) { + if (fragment == null) + return null; + return A._Uri__normalizeOrSubstring(fragment, start, end, 256, true, false); + }, + _Uri__normalizeEscape(source, index, lowerCase) { + var firstDigit, secondDigit, firstDigitValue, secondDigitValue, value, + t1 = index + 2; + if (t1 >= source.length) + return "%"; + firstDigit = source.charCodeAt(index + 1); + secondDigit = source.charCodeAt(t1); + firstDigitValue = A.hexDigitValue(firstDigit); + secondDigitValue = A.hexDigitValue(secondDigit); + if (firstDigitValue < 0 || secondDigitValue < 0) + return "%"; + value = firstDigitValue * 16 + secondDigitValue; + if (value < 127 && (string$.x00_____.charCodeAt(value) & 1) !== 0) + return A.Primitives_stringFromCharCode(lowerCase && 65 <= value && 90 >= value ? (value | 32) >>> 0 : value); + if (firstDigit >= 97 || secondDigit >= 97) + return B.JSString_methods.substring$2(source, index, index + 3).toUpperCase(); + return null; + }, + _Uri__escapeChar(char) { + var codeUnits, flag, encodedBytes, index, byte, + _s16_ = "0123456789ABCDEF"; + if (char <= 127) { + codeUnits = new Uint8Array(3); + codeUnits[0] = 37; + codeUnits[1] = _s16_.charCodeAt(char >>> 4); + codeUnits[2] = _s16_.charCodeAt(char & 15); + } else { + if (char > 2047) + if (char > 65535) { + flag = 240; + encodedBytes = 4; + } else { + flag = 224; + encodedBytes = 3; + } + else { + flag = 192; + encodedBytes = 2; + } + codeUnits = new Uint8Array(3 * encodedBytes); + for (index = 0; --encodedBytes, encodedBytes >= 0; flag = 128) { + byte = B.JSInt_methods._shrReceiverPositive$1(char, 6 * encodedBytes) & 63 | flag; + codeUnits[index] = 37; + codeUnits[index + 1] = _s16_.charCodeAt(byte >>> 4); + codeUnits[index + 2] = _s16_.charCodeAt(byte & 15); + index += 3; + } + } + return A.String_String$fromCharCodes(codeUnits, 0, null); + }, + _Uri__normalizeOrSubstring(component, start, end, charMask, escapeDelimiters, replaceBackslash) { + var t1 = A._Uri__normalize(component, start, end, charMask, escapeDelimiters, replaceBackslash); + return t1 == null ? B.JSString_methods.substring$2(component, start, end) : t1; + }, + _Uri__normalize(component, start, end, charMask, escapeDelimiters, replaceBackslash) { + var t1, index, sectionStart, buffer, char, sourceLength, replacement, t2, tail, _null = null, + _s128_ = string$.x00_____; + for (t1 = !escapeDelimiters, index = start, sectionStart = index, buffer = _null; index < end;) { + char = component.charCodeAt(index); + if (char < 127 && (_s128_.charCodeAt(char) & charMask) !== 0) + ++index; + else { + sourceLength = 1; + if (char === 37) { + replacement = A._Uri__normalizeEscape(component, index, false); + if (replacement == null) { + index += 3; + continue; + } + if ("%" === replacement) + replacement = "%25"; + else + sourceLength = 3; + } else if (char === 92 && replaceBackslash) + replacement = "/"; + else if (t1 && char <= 93 && (_s128_.charCodeAt(char) & 1024) !== 0) { + A._Uri__fail(component, index, "Invalid character"); + sourceLength = _null; + replacement = sourceLength; + } else { + if ((char & 64512) === 55296) { + t2 = index + 1; + if (t2 < end) { + tail = component.charCodeAt(t2); + if ((tail & 64512) === 56320) { + char = 65536 + ((char & 1023) << 10) + (tail & 1023); + sourceLength = 2; + } + } + } + replacement = A._Uri__escapeChar(char); + } + if (buffer == null) { + buffer = new A.StringBuffer(""); + t2 = buffer; + } else + t2 = buffer; + t2._contents = (t2._contents += B.JSString_methods.substring$2(component, sectionStart, index)) + replacement; + index += sourceLength; + sectionStart = index; + } + } + if (buffer == null) + return _null; + if (sectionStart < end) { + t1 = B.JSString_methods.substring$2(component, sectionStart, end); + buffer._contents += t1; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__mayContainDotSegments(path) { + if (B.JSString_methods.startsWith$1(path, ".")) + return true; + return B.JSString_methods.indexOf$1(path, "/.") !== -1; + }, + _Uri__removeDotSegments(path) { + var output, t1, t2, appendSlash, _i, segment; + if (!A._Uri__mayContainDotSegments(path)) + return path; + output = A._setArrayType([], type$.JSArray_String); + for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { + segment = t1[_i]; + if (segment === "..") { + if (output.length !== 0) { + output.pop(); + if (output.length === 0) + output.push(""); + } + appendSlash = true; + } else { + appendSlash = "." === segment; + if (!appendSlash) + output.push(segment); + } + } + if (appendSlash) + output.push(""); + return B.JSArray_methods.join$1(output, "/"); + }, + _Uri__normalizeRelativePath(path, allowScheme) { + var output, t1, t2, appendSlash, _i, segment; + if (!A._Uri__mayContainDotSegments(path)) + return !allowScheme ? A._Uri__escapeScheme(path) : path; + output = A._setArrayType([], type$.JSArray_String); + for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { + segment = t1[_i]; + if (".." === segment) { + if (output.length !== 0 && B.JSArray_methods.get$last(output) !== "..") + output.pop(); + else + output.push(".."); + appendSlash = true; + } else { + appendSlash = "." === segment; + if (!appendSlash) + output.push(segment.length === 0 && output.length === 0 ? "./" : segment); + } + } + if (output.length === 0) + return "./"; + if (appendSlash) + output.push(""); + if (!allowScheme) + output[0] = A._Uri__escapeScheme(output[0]); + return B.JSArray_methods.join$1(output, "/"); + }, + _Uri__escapeScheme(path) { + var i, char, + t1 = path.length; + if (t1 >= 2 && A._Uri__isAlphabeticCharacter(path.charCodeAt(0))) + for (i = 1; i < t1; ++i) { + char = path.charCodeAt(i); + if (char === 58) + return B.JSString_methods.substring$2(path, 0, i) + "%3A" + B.JSString_methods.substring$1(path, i + 1); + if (char > 127 || (string$.x00_____.charCodeAt(char) & 8) === 0) + break; + } + return path; + }, + _Uri__packageNameEnd(uri, path) { + if (uri.isScheme$1("package") && uri._host == null) + return A._skipPackageNameChars(path, 0, path.length); + return -1; + }, + _Uri__toWindowsFilePath(uri) { + var t2, hasDriveLetter, host, + segments = uri.get$pathSegments(), + t1 = segments.length; + if (t1 > 0) { + t2 = segments[0]; + hasDriveLetter = t2.length === 2 && t2.charCodeAt(1) === 58; + } else + hasDriveLetter = false; + if (hasDriveLetter) { + A._Uri__checkWindowsDriveLetter(segments[0].charCodeAt(0), false); + A._Uri__checkWindowsPathReservedCharacters(segments, false, 1); + } else + A._Uri__checkWindowsPathReservedCharacters(segments, false, 0); + t2 = uri.get$hasAbsolutePath() && !hasDriveLetter ? "\\" : ""; + if (uri.get$hasAuthority()) { + host = uri.get$host(); + if (host.length !== 0) + t2 = t2 + "\\" + host + "\\"; + } + t2 = A.StringBuffer__writeAll(t2, segments, "\\"); + t1 = hasDriveLetter && t1 === 1 ? t2 + "\\" : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _Uri__hexCharPairToByte(s, pos) { + var byte, i, charCode; + for (byte = 0, i = 0; i < 2; ++i) { + charCode = s.charCodeAt(pos + i); + if (48 <= charCode && charCode <= 57) + byte = byte * 16 + charCode - 48; + else { + charCode |= 32; + if (97 <= charCode && charCode <= 102) + byte = byte * 16 + charCode - 87; + else + throw A.wrapException(A.ArgumentError$("Invalid URL encoding", null)); + } + } + return byte; + }, + _Uri__uriDecode(text, start, end, encoding, plusToSpace) { + var simple, codeUnit, t1, bytes, + i = start; + for (;;) { + if (!(i < end)) { + simple = true; + break; + } + codeUnit = text.charCodeAt(i); + if (codeUnit <= 127) + t1 = codeUnit === 37; + else + t1 = true; + if (t1) { + simple = false; + break; + } + ++i; + } + if (simple) + if (B.C_Utf8Codec === encoding) + return B.JSString_methods.substring$2(text, start, end); + else + bytes = new A.CodeUnits(B.JSString_methods.substring$2(text, start, end)); + else { + bytes = A._setArrayType([], type$.JSArray_int); + for (t1 = text.length, i = start; i < end; ++i) { + codeUnit = text.charCodeAt(i); + if (codeUnit > 127) + throw A.wrapException(A.ArgumentError$("Illegal percent encoding in URI", null)); + if (codeUnit === 37) { + if (i + 3 > t1) + throw A.wrapException(A.ArgumentError$("Truncated URI", null)); + bytes.push(A._Uri__hexCharPairToByte(text, i + 1)); + i += 2; + } else + bytes.push(codeUnit); + } + } + return B.Utf8Decoder_false.convert$1(bytes); + }, + _Uri__isAlphabeticCharacter(codeUnit) { + var lowerCase = codeUnit | 32; + return 97 <= lowerCase && lowerCase <= 122; + }, + UriData__writeUri(mimeType, charsetName, parameters, buffer, indices) { + var t1, slashIndex; + if (mimeType != null) + t1 = 10 === mimeType.length && A._caseInsensitiveCompareStart("text/plain", mimeType, 0) >= 0; + else + t1 = true; + if (t1) + mimeType = ""; + if (mimeType.length === 0 || mimeType === "application/octet-stream") + t1 = buffer._contents += mimeType; + else { + slashIndex = A.UriData__validateMimeType(mimeType); + if (slashIndex < 0) + throw A.wrapException(A.ArgumentError$value(mimeType, "mimeType", "Invalid MIME type")); + t1 = A._Uri__uriEncode(512, B.JSString_methods.substring$2(mimeType, 0, slashIndex), B.C_Utf8Codec, false); + buffer._contents = (buffer._contents += t1) + "/"; + t1 = A._Uri__uriEncode(512, B.JSString_methods.substring$1(mimeType, slashIndex + 1), B.C_Utf8Codec, false); + t1 = buffer._contents += t1; + } + if (charsetName != null) { + indices.push(t1.length); + indices.push(buffer._contents.length + 8); + buffer._contents += ";charset="; + t1 = A._Uri__uriEncode(512, charsetName, B.C_Utf8Codec, false); + buffer._contents += t1; + } + }, + UriData__validateMimeType(mimeType) { + var t1, slashIndex, i; + for (t1 = mimeType.length, slashIndex = -1, i = 0; i < t1; ++i) { + if (mimeType.charCodeAt(i) !== 47) + continue; + if (slashIndex < 0) { + slashIndex = i; + continue; + } + return -1; + } + return slashIndex; + }, + UriData__parse(text, start, sourceUri) { + var t1, i, slashIndex, char, equalsIndex, lastSeparator, t2, data, + _s17_ = "Invalid MIME type", + indices = A._setArrayType([start - 1], type$.JSArray_int); + for (t1 = text.length, i = start, slashIndex = -1, char = null; i < t1; ++i) { + char = text.charCodeAt(i); + if (char === 44 || char === 59) + break; + if (char === 47) { + if (slashIndex < 0) { + slashIndex = i; + continue; + } + throw A.wrapException(A.FormatException$(_s17_, text, i)); + } + } + if (slashIndex < 0 && i > start) + throw A.wrapException(A.FormatException$(_s17_, text, i)); + while (char !== 44) { + indices.push(i); + ++i; + for (equalsIndex = -1; i < t1; ++i) { + char = text.charCodeAt(i); + if (char === 61) { + if (equalsIndex < 0) + equalsIndex = i; + } else if (char === 59 || char === 44) + break; + } + if (equalsIndex >= 0) + indices.push(equalsIndex); + else { + lastSeparator = B.JSArray_methods.get$last(indices); + if (char !== 44 || i !== lastSeparator + 7 || !B.JSString_methods.startsWith$2(text, "base64", lastSeparator + 1)) + throw A.wrapException(A.FormatException$("Expecting '='", text, i)); + break; + } + } + indices.push(i); + t2 = i + 1; + if ((indices.length & 1) === 1) + text = B.C_Base64Codec.normalize$3(text, t2, t1); + else { + data = A._Uri__normalize(text, t2, t1, 256, true, false); + if (data != null) + text = B.JSString_methods.replaceRange$3(text, t2, t1, data); + } + return new A.UriData(text, indices, sourceUri); + }, + UriData__uriEncodeBytes(canonicalMask, bytes, buffer) { + var t1, byteOr, i, byte, t2, + _s16_ = "0123456789ABCDEF"; + for (t1 = bytes.length, byteOr = 0, i = 0; i < t1; ++i) { + byte = bytes[i]; + byteOr |= byte; + if (byte < 128 && (string$.x00_____.charCodeAt(byte) & canonicalMask) !== 0) { + t2 = A.Primitives_stringFromCharCode(byte); + buffer._contents += t2; + } else { + t2 = A.Primitives_stringFromCharCode(37); + buffer._contents += t2; + t2 = A.Primitives_stringFromCharCode(_s16_.charCodeAt(byte >>> 4)); + buffer._contents += t2; + t2 = A.Primitives_stringFromCharCode(_s16_.charCodeAt(byte & 15)); + buffer._contents += t2; + } + } + if ((byteOr & 4294967040) !== 0) + for (i = 0; i < t1; ++i) { + byte = bytes[i]; + if (byte > 255) + throw A.wrapException(A.ArgumentError$value(byte, "non-byte value", null)); + } + }, + _scan(uri, start, end, state, indices) { + var i, char, transition; + for (i = start; i < end; ++i) { + char = uri.charCodeAt(i) ^ 96; + if (char > 95) + char = 31; + transition = '\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xe1\xe1\xe1\x01\xe1\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xe1\xe3\xe1\xe1\x01\xe1\x01\xe1\xcd\x01\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x0e\x03\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"\x01\xe1\x01\xe1\xac\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xe1\xe1\xe1\x01\xe1\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xe1\xea\xe1\xe1\x01\xe1\x01\xe1\xcd\x01\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\n\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"\x01\xe1\x01\xe1\xac\xeb\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\xeb\xeb\xeb\x8b\xeb\xeb\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\xeb\x83\xeb\xeb\x8b\xeb\x8b\xeb\xcd\x8b\xeb\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x92\x83\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\x8b\xeb\x8b\xeb\x8b\xeb\xac\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xeb\xeb\v\xeb\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xebD\xeb\xeb\v\xeb\v\xeb\xcd\v\xeb\v\v\v\v\v\v\v\v\x12D\v\v\v\v\v\v\v\v\v\v\xeb\v\xeb\v\xeb\xac\xe5\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\xe5\xe5\xe5\x05\xe5D\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe8\x8a\xe5\xe5\x05\xe5\x05\xe5\xcd\x05\xe5\x05\x05\x05\x05\x05\x05\x05\x05\x05\x8a\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05f\x05\xe5\x05\xe5\xac\xe5\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\xe5\xe5\xe5\x05\xe5D\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\xe5\x8a\xe5\xe5\x05\xe5\x05\xe5\xcd\x05\xe5\x05\x05\x05\x05\x05\x05\x05\x05\x05\x8a\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05f\x05\xe5\x05\xe5\xac\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7D\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\x8a\xe7\xe7\xe7\xe7\xe7\xe7\xcd\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\x8a\xe7\x07\x07\x07\x07\x07\x07\x07\x07\x07\xe7\xe7\xe7\xe7\xe7\xac\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7D\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\x8a\xe7\xe7\xe7\xe7\xe7\xe7\xcd\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\xe7\x8a\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\xe7\xe7\xe7\xe7\xe7\xac\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x05\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xeb\xeb\v\xeb\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xea\xeb\xeb\v\xeb\v\xeb\xcd\v\xeb\v\v\v\v\v\v\v\v\x10\xea\v\v\v\v\v\v\v\v\v\v\xeb\v\xeb\v\xeb\xac\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xeb\xeb\v\xeb\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xea\xeb\xeb\v\xeb\v\xeb\xcd\v\xeb\v\v\v\v\v\v\v\v\x12\n\v\v\v\v\v\v\v\v\v\v\xeb\v\xeb\v\xeb\xac\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xeb\xeb\v\xeb\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xea\xeb\xeb\v\xeb\v\xeb\xcd\v\xeb\v\v\v\v\v\v\v\v\v\n\v\v\v\v\v\v\v\v\v\v\xeb\v\xeb\v\xeb\xac\xec\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\xec\xec\xec\f\xec\xec\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\xec\xec\xec\xec\f\xec\f\xec\xcd\f\xec\f\f\f\f\f\f\f\f\f\xec\f\f\f\f\f\f\f\f\f\f\xec\f\xec\f\xec\f\xed\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\xed\xed\xed\r\xed\xed\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\xed\xed\xed\xed\r\xed\r\xed\xed\r\xed\r\r\r\r\r\r\r\r\r\xed\r\r\r\r\r\r\r\r\r\r\xed\r\xed\r\xed\r\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xe1\xe1\xe1\x01\xe1\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xe1\xea\xe1\xe1\x01\xe1\x01\xe1\xcd\x01\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x0f\xea\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"\x01\xe1\x01\xe1\xac\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xe1\xe1\xe1\x01\xe1\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xe1\xe9\xe1\xe1\x01\xe1\x01\xe1\xcd\x01\xe1\x01\x01\x01\x01\x01\x01\x01\x01\x01\t\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"\x01\xe1\x01\xe1\xac\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xeb\xeb\v\xeb\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xea\xeb\xeb\v\xeb\v\xeb\xcd\v\xeb\v\v\v\v\v\v\v\v\x11\xea\v\v\v\v\v\v\v\v\v\v\xeb\v\xeb\v\xeb\xac\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xeb\xeb\v\xeb\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xe9\xeb\xeb\v\xeb\v\xeb\xcd\v\xeb\v\v\v\v\v\v\v\v\v\t\v\v\v\v\v\v\v\v\v\v\xeb\v\xeb\v\xeb\xac\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xeb\xeb\v\xeb\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xea\xeb\xeb\v\xeb\v\xeb\xcd\v\xeb\v\v\v\v\v\v\v\v\x13\xea\v\v\v\v\v\v\v\v\v\v\xeb\v\xeb\v\xeb\xac\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xeb\xeb\v\xeb\xeb\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\xeb\xea\xeb\xeb\v\xeb\v\xeb\xcd\v\xeb\v\v\v\v\v\v\v\v\v\xea\v\v\v\v\v\v\v\v\v\v\xeb\v\xeb\v\xeb\xac\xf5\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\xf5\x15\xf5\x15\x15\xf5\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\xf5\xf5\xf5\xf5\xf5\xf5'.charCodeAt(state * 96 + char); + state = transition & 31; + indices[transition >>> 5] = i; + } + return state; + }, + _SimpleUri__packageNameEnd(uri) { + if (uri._schemeEnd === 7 && B.JSString_methods.startsWith$1(uri._uri, "package") && uri._hostStart <= 0) + return A._skipPackageNameChars(uri._uri, uri._pathStart, uri._queryStart); + return -1; + }, + _skipPackageNameChars(source, start, end) { + var i, dots, char; + for (i = start, dots = 0; i < end; ++i) { + char = source.charCodeAt(i); + if (char === 47) + return dots !== 0 ? i : -1; + if (char === 37 || char === 58) + return -1; + dots |= char ^ 46; + } + return -1; + }, + _caseInsensitiveCompareStart(prefix, string, start) { + var t1, result, i, stringChar, delta, lowerChar; + for (t1 = prefix.length, result = 0, i = 0; i < t1; ++i) { + stringChar = string.charCodeAt(start + i); + delta = prefix.charCodeAt(i) ^ stringChar; + if (delta !== 0) { + if (delta === 32) { + lowerChar = stringChar | delta; + if (97 <= lowerChar && lowerChar <= 122) { + result = 32; + continue; + } + } + return -1; + } + } + return result; + }, + NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) { + this._box_0 = t0; + this.sb = t1; + }, + DateTime: function DateTime(t0, t1, t2) { + this._value = t0; + this._microsecond = t1; + this.isUtc = t2; + }, + Duration: function Duration(t0) { + this._duration = t0; + }, + _Enum: function _Enum() { + }, + Error: function Error() { + }, + AssertionError: function AssertionError(t0) { + this.message = t0; + }, + TypeError: function TypeError() { + }, + ArgumentError: function ArgumentError(t0, t1, t2, t3) { + var _ = this; + _._hasValue = t0; + _.invalidValue = t1; + _.name = t2; + _.message = t3; + }, + RangeError: function RangeError(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.start = t0; + _.end = t1; + _._hasValue = t2; + _.invalidValue = t3; + _.name = t4; + _.message = t5; + }, + IndexError: function IndexError(t0, t1, t2, t3, t4) { + var _ = this; + _.length = t0; + _._hasValue = t1; + _.invalidValue = t2; + _.name = t3; + _.message = t4; + }, + NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) { + var _ = this; + _._core$_receiver = t0; + _._memberName = t1; + _._core$_arguments = t2; + _._namedArguments = t3; + }, + UnsupportedError: function UnsupportedError(t0) { + this.message = t0; + }, + UnimplementedError: function UnimplementedError(t0) { + this.message = t0; + }, + StateError: function StateError(t0) { + this.message = t0; + }, + ConcurrentModificationError: function ConcurrentModificationError(t0) { + this.modifiedObject = t0; + }, + OutOfMemoryError: function OutOfMemoryError() { + }, + StackOverflowError: function StackOverflowError() { + }, + _Exception: function _Exception(t0) { + this.message = t0; + }, + FormatException: function FormatException(t0, t1, t2) { + this.message = t0; + this.source = t1; + this.offset = t2; + }, + Iterable: function Iterable() { + }, + _GeneratorIterable: function _GeneratorIterable(t0, t1, t2) { + this.length = t0; + this._generator = t1; + this.$ti = t2; + }, + MapEntry: function MapEntry(t0, t1, t2) { + this.key = t0; + this.value = t1; + this.$ti = t2; + }, + Null: function Null() { + }, + Object: function Object() { + }, + _StringStackTrace: function _StringStackTrace(t0) { + this._stackTrace = t0; + }, + Runes: function Runes(t0) { + this.string = t0; + }, + RuneIterator: function RuneIterator(t0) { + var _ = this; + _.string = t0; + _._nextPosition = _._position = 0; + _._currentCodePoint = -1; + }, + StringBuffer: function StringBuffer(t0) { + this._contents = t0; + }, + Uri_parseIPv6Address_error: function Uri_parseIPv6Address_error(t0) { + this.host = t0; + }, + _Uri: function _Uri(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.scheme = t0; + _._userInfo = t1; + _._host = t2; + _._port = t3; + _.path = t4; + _._query = t5; + _._fragment = t6; + _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; + }, + _Uri__makePath_closure: function _Uri__makePath_closure() { + }, + UriData: function UriData(t0, t1, t2) { + this._text = t0; + this._separatorIndices = t1; + this._uriCache = t2; + }, + _SimpleUri: function _SimpleUri(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _._uri = t0; + _._schemeEnd = t1; + _._hostStart = t2; + _._portStart = t3; + _._pathStart = t4; + _._queryStart = t5; + _._fragmentStart = t6; + _._schemeCache = t7; + _._hashCodeCache = null; + }, + _DataUri: function _DataUri(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.scheme = t0; + _._userInfo = t1; + _._host = t2; + _._port = t3; + _.path = t4; + _._query = t5; + _._fragment = t6; + _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; + }, + Expando: function Expando(t0) { + this._jsWeakMap = t0; + }, + NullRejectionException: function NullRejectionException(t0) { + this.isUndefined = t0; + }, + _convertDartFunctionFast(f) { + var ret, + existing = f.$dart_jsFunction; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFast, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f.$dart_jsFunction = ret; + return ret; + }, + _convertDartFunctionFastCaptureThis(f) { + var ret, + existing = f._$dart_jsFunctionCaptureThis; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, this, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFastCaptureThis, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f._$dart_jsFunctionCaptureThis = ret; + return ret; + }, + _callDartFunctionFast(callback, $arguments) { + return A.Function_apply(callback, $arguments); + }, + _callDartFunctionFastCaptureThis(callback, $self, $arguments) { + var t1 = [$self]; + B.JSArray_methods.addAll$1(t1, $arguments); + return A.Function_apply(callback, t1); + }, + allowInterop(f) { + if (typeof f == "function") + return f; + else + return A._convertDartFunctionFast(f); + }, + allowInteropCaptureThis(f) { + if (typeof f == "function") + throw A.wrapException(A.ArgumentError$("Function is already a JS function so cannot capture this.", null)); + else + return A._convertDartFunctionFastCaptureThis(f); + }, + _callDartFunctionFast2(callback, arg1, arg2, $length) { + if ($length >= 2) + return callback.call$2(arg1, arg2); + if ($length === 1) + return callback.call$1(arg1); + return callback.call$0(); + }, + _noJsifyRequired(o) { + return o == null || A._isBool(o) || typeof o == "number" || typeof o == "string" || type$.Int8List._is(o) || type$.Uint8List._is(o) || type$.Uint8ClampedList._is(o) || type$.Int16List._is(o) || type$.Uint16List._is(o) || type$.Int32List._is(o) || type$.Uint32List._is(o) || type$.Float32List._is(o) || type$.Float64List._is(o) || type$.ByteBuffer._is(o) || type$.ByteData._is(o); + }, + jsify(object) { + if (A._noJsifyRequired(object)) + return object; + return new A.jsify__convert(new A._IdentityHashMap(type$._IdentityHashMap_of_nullable_Object_and_nullable_Object)).call$1(object); + }, + _callMethodUnchecked0(o, method) { + return o[method](); + }, + callConstructor(constr, $arguments) { + var args, factoryFunction; + if ($arguments instanceof Array) + switch ($arguments.length) { + case 0: + return new constr(); + case 1: + return new constr($arguments[0]); + case 2: + return new constr($arguments[0], $arguments[1]); + case 3: + return new constr($arguments[0], $arguments[1], $arguments[2]); + case 4: + return new constr($arguments[0], $arguments[1], $arguments[2], $arguments[3]); + } + args = [null]; + B.JSArray_methods.addAll$1(args, $arguments); + factoryFunction = constr.bind.apply(constr, args); + String(factoryFunction); + return new factoryFunction(); + }, + promiseToFuture(jsPromise, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), + completer = new A._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>")); + jsPromise.then(A.convertDartClosureToJS(new A.promiseToFuture_closure(completer), 1), A.convertDartClosureToJS(new A.promiseToFuture_closure0(completer), 1)); + return t1; + }, + jsify__convert: function jsify__convert(t0) { + this._convertedObjects = t0; + }, + promiseToFuture_closure: function promiseToFuture_closure(t0) { + this.completer = t0; + }, + promiseToFuture_closure0: function promiseToFuture_closure0(t0) { + this.completer = t0; + }, + max(a, b) { + return Math.max(a, b); + }, + pow(x, exponent) { + return Math.pow(x, exponent); + }, + Random_Random() { + return B.C__JSRandom; + }, + _JSRandom: function _JSRandom() { + }, + ArgParser: function ArgParser(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._arg_parser$_options = t0; + _._aliases = t1; + _.options = t2; + _.commands = t3; + _._optionsAndSeparators = t4; + _.allowTrailingOptions = t5; + _.usageLineLength = t6; + }, + ArgParser__addOption_closure: function ArgParser__addOption_closure(t0) { + this.$this = t0; + }, + ArgParserException$(message, commands, argumentName, source, offset) { + return new A.ArgParserException(commands == null ? B.List_empty : A.List_List$unmodifiable(commands, type$.String), argumentName, message, source, offset); + }, + ArgParserException: function ArgParserException(t0, t1, t2, t3, t4) { + var _ = this; + _.commands = t0; + _.argumentName = t1; + _.message = t2; + _.source = t3; + _.offset = t4; + }, + ArgResults: function ArgResults(t0, t1, t2, t3) { + var _ = this; + _._parser = t0; + _._parsed = t1; + _.name = t2; + _.rest = t3; + }, + Option: function Option(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) { + var _ = this; + _.name = t0; + _.abbr = t1; + _.help = t2; + _.valueHelp = t3; + _.allowed = t4; + _.allowedHelp = t5; + _.defaultsTo = t6; + _.negatable = t7; + _.hideNegatedUsage = t8; + _.callback = t9; + _.type = t10; + _.splitCommas = t11; + _.mandatory = t12; + _.hide = t13; + }, + OptionType: function OptionType(t0) { + this.name = t0; + }, + Parser$(_commandName, _grammar, _args, _parent, rest) { + var t1 = A._setArrayType([], type$.JSArray_String); + if (rest != null) + B.JSArray_methods.addAll$1(t1, rest); + return new A.Parser0(_commandName, _parent, _grammar, _args, t1, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic)); + }, + _isLetterOrDigit(codeUnit) { + var t1 = true; + if (!(codeUnit >= 65 && codeUnit <= 90)) + if (!(codeUnit >= 97 && codeUnit <= 122)) + t1 = codeUnit >= 48 && codeUnit <= 57; + return t1; + }, + Parser0: function Parser0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._commandName = t0; + _._parser$_parent = t1; + _._grammar = t2; + _._args = t3; + _._parser$_rest = t4; + _._results = t5; + }, + Parser_parse_closure: function Parser_parse_closure(t0) { + this.$this = t0; + }, + Parser__setOption_closure: function Parser__setOption_closure() { + }, + _Usage: function _Usage(t0, t1, t2) { + var _ = this; + _._usage$_optionsAndSeparators = t0; + _._usage$_buffer = t1; + _._currentColumn = 0; + _.___Usage__columnWidths_FI = $; + _._newlinesNeeded = 0; + _.lineLength = t2; + }, + _Usage__writeOption_closure: function _Usage__writeOption_closure() { + }, + _Usage__buildAllowedList_closure: function _Usage__buildAllowedList_closure(t0) { + this.option = t0; + }, + FutureGroup: function FutureGroup(t0, t1, t2) { + var _ = this; + _._future_group$_pending = 0; + _._future_group$_closed = false; + _._future_group$_completer = t0; + _._future_group$_values = t1; + _.$ti = t2; + }, + FutureGroup_add_closure: function FutureGroup_add_closure(t0, t1) { + this.$this = t0; + this.index = t1; + }, + FutureGroup_add_closure0: function FutureGroup_add_closure0(t0) { + this.$this = t0; + }, + ErrorResult: function ErrorResult(t0, t1) { + this.error = t0; + this.stackTrace = t1; + }, + ValueResult: function ValueResult(t0, t1) { + this.value = t0; + this.$ti = t1; + }, + StreamCompleter: function StreamCompleter(t0, t1) { + this._stream_completer$_stream = t0; + this.$ti = t1; + }, + _CompleterStream: function _CompleterStream(t0) { + this._sourceStream = this._stream_completer$_controller = null; + this.$ti = t0; + }, + StreamGroup: function StreamGroup(t0, t1, t2) { + var _ = this; + _.__StreamGroup__controller_A = $; + _._closed = false; + _._stream_group$_state = t0; + _._subscriptions = t1; + _.$ti = t2; + }, + StreamGroup_add_closure: function StreamGroup_add_closure() { + }, + StreamGroup_add_closure0: function StreamGroup_add_closure0(t0, t1) { + this.$this = t0; + this.stream = t1; + }, + StreamGroup__onListen_closure: function StreamGroup__onListen_closure() { + }, + StreamGroup__onCancel_closure: function StreamGroup__onCancel_closure(t0) { + this.$this = t0; + }, + StreamGroup__listenToStream_closure: function StreamGroup__listenToStream_closure(t0, t1) { + this.$this = t0; + this.stream = t1; + }, + _StreamGroupState: function _StreamGroupState(t0) { + this.name = t0; + }, + StreamQueue: function StreamQueue(t0, t1, t2, t3) { + var _ = this; + _._stream_queue$_source = t0; + _._stream_queue$_subscription = null; + _._isDone = false; + _._eventsReceived = 0; + _._eventQueue = t1; + _._requestQueue = t2; + _.$ti = t3; + }, + StreamQueue__ensureListening_closure: function StreamQueue__ensureListening_closure(t0) { + this.$this = t0; + }, + StreamQueue__ensureListening_closure1: function StreamQueue__ensureListening_closure1(t0) { + this.$this = t0; + }, + StreamQueue__ensureListening_closure0: function StreamQueue__ensureListening_closure0(t0) { + this.$this = t0; + }, + _NextRequest: function _NextRequest(t0, t1) { + this._completer = t0; + this.$ti = t1; + }, + isNodeJs() { + var t1 = self.process; + if (t1 == null) + t1 = null; + else { + t1 = J.get$release$x(t1); + t1 = t1 == null ? null : J.get$name$x(t1); + } + return J.$eq$(t1, "node"); + }, + isBrowser() { + return !A.isNodeJs() && self.document != null && typeof self.document.querySelector == "function"; + }, + wrapJSExceptions(callback) { + var error, error0, error1, error2, t1, exception; + if (!$.$get$_isStrictMode()) + return callback.call$0(); + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (typeof t1 == "string") { + error = t1; + throw A.wrapException(error); + } else if (A._isBool(t1)) { + error0 = t1; + throw A.wrapException(error0); + } else if (typeof t1 == "number") { + error1 = t1; + throw A.wrapException(error1); + } else { + error2 = t1; + if (typeof error2 == "symbol" || typeof error2 == "bigint" || error2 == null) + throw A.wrapException(A._callMethodUnchecked0(error2, "toString")); + throw exception; + } + } + }, + _isStrictMode_closure: function _isStrictMode_closure() { + }, + Repl: function Repl(t0, t1, t2, t3) { + var _ = this; + _.prompt = t0; + _.continuation = t1; + _.validator = t2; + _.__Repl__adapter_A = $; + _.history = t3; + }, + alwaysValid_closure: function alwaysValid_closure() { + }, + ReplAdapter: function ReplAdapter(t0) { + this.repl = t0; + this.rl = null; + }, + ReplAdapter_runAsync_closure: function ReplAdapter_runAsync_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.rl = t2; + _.runController = t3; + }, + ReplAdapter_runAsync__closure: function ReplAdapter_runAsync__closure(t0) { + this.lineController = t0; + }, + Stdin: function Stdin() { + }, + Stdout: function Stdout() { + }, + ReadlineModule: function ReadlineModule() { + }, + ReadlineOptions: function ReadlineOptions() { + }, + ReadlineInterface: function ReadlineInterface() { + }, + EmptyUnmodifiableSet: function EmptyUnmodifiableSet(t0) { + this.$ti = t0; + }, + _EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin: function _EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin() { + }, + DefaultEquality: function DefaultEquality() { + }, + IterableEquality: function IterableEquality() { + }, + ListEquality: function ListEquality() { + }, + _MapEntry: function _MapEntry(t0, t1, t2) { + this.equality = t0; + this.key = t1; + this.value = t2; + }, + MapEquality: function MapEquality(t0) { + this.$ti = t0; + }, + QueueList$(initialCapacity, $E) { + return new A.QueueList(A.List_List$filled(A.QueueList__computeInitialCapacity(initialCapacity), null, false, $E._eval$1("0?")), 0, 0, $E._eval$1("QueueList<0>")); + }, + QueueList_QueueList$from(source, $E) { + var $length, queue, t1; + if (type$.List_dynamic._is(source)) { + $length = J.get$length$asx(source); + queue = A.QueueList$($length + 1, $E); + J.setRange$4$ax(queue._queue_list$_table, 0, $length, source, 0); + queue._queue_list$_tail = $length; + return queue; + } else { + t1 = A.QueueList$(null, $E); + t1.addAll$1(0, source); + return t1; + } + }, + QueueList__computeInitialCapacity(initialCapacity) { + if (initialCapacity == null || initialCapacity < 8) + return 8; + ++initialCapacity; + if ((initialCapacity & initialCapacity - 1) >>> 0 === 0) + return initialCapacity; + return A.QueueList__nextPowerOf2(initialCapacity); + }, + QueueList__nextPowerOf2(number) { + var nextNumber; + number = (number << 1 >>> 0) - 1; + for (;; number = nextNumber) { + nextNumber = (number & number - 1) >>> 0; + if (nextNumber === 0) + return number; + } + }, + QueueList: function QueueList(t0, t1, t2, t3) { + var _ = this; + _._queue_list$_table = t0; + _._queue_list$_head = t1; + _._queue_list$_tail = t2; + _.$ti = t3; + }, + _CastQueueList: function _CastQueueList(t0, t1, t2, t3, t4) { + var _ = this; + _._queue_list$_delegate = t0; + _._queue_list$_table = t1; + _._queue_list$_head = t2; + _._queue_list$_tail = t3; + _.$ti = t4; + }, + _QueueList_Object_ListMixin: function _QueueList_Object_ListMixin() { + }, + UnionSet: function UnionSet(t0, t1) { + this._sets = t0; + this.$ti = t1; + }, + UnionSet__iterable_closure: function UnionSet__iterable_closure(t0) { + this.$this = t0; + }, + UnionSet_contains_closure: function UnionSet_contains_closure(t0, t1) { + this.$this = t0; + this.element = t1; + }, + _UnionSet_SetBase_UnmodifiableSetMixin: function _UnionSet_SetBase_UnmodifiableSetMixin() { + }, + UnmodifiableSetMixin__throw() { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable Set")); + }, + UnmodifiableSetView0: function UnmodifiableSetView0(t0, t1) { + this._base = t0; + this.$ti = t1; + }, + UnmodifiableSetMixin: function UnmodifiableSetMixin() { + }, + _UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin: function _UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin() { + }, + _DelegatingIterableBase: function _DelegatingIterableBase() { + }, + DelegatingSet: function DelegatingSet(t0, t1) { + this._base = t0; + this.$ti = t1; + }, + MapKeySet: function MapKeySet(t0, t1) { + this._baseMap = t0; + this.$ti = t1; + }, + MapKeySet_difference_closure: function MapKeySet_difference_closure(t0, t1) { + this.$this = t0; + this.other = t1; + }, + _MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin: function _MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin() { + }, + BufferModule: function BufferModule() { + }, + BufferConstants: function BufferConstants() { + }, + Buffer: function Buffer() { + }, + ConsoleModule: function ConsoleModule() { + }, + Console: function Console() { + }, + EventEmitter: function EventEmitter() { + }, + fs() { + var t1 = $._fs; + return t1 == null ? $._fs = self.fs : t1; + }, + FS: function FS() { + }, + FSConstants: function FSConstants() { + }, + Realpath: function Realpath() { + }, + RealpathSync: function RealpathSync() { + }, + FSWatcher: function FSWatcher() { + }, + ReadStream: function ReadStream() { + }, + ReadStreamOptions: function ReadStreamOptions() { + }, + WriteStream: function WriteStream() { + }, + WriteStreamOptions: function WriteStreamOptions() { + }, + FileOptions: function FileOptions() { + }, + StatOptions: function StatOptions() { + }, + MkdirOptions: function MkdirOptions() { + }, + RmdirOptions: function RmdirOptions() { + }, + WatchOptions: function WatchOptions() { + }, + WatchFileOptions: function WatchFileOptions() { + }, + Stats: function Stats() { + }, + Promise: function Promise() { + }, + Date: function Date() { + }, + JsError: function JsError() { + }, + Atomics: function Atomics() { + }, + Modules: function Modules() { + }, + Module: function Module() { + }, + Net: function Net() { + }, + Socket: function Socket() { + }, + NetAddress: function NetAddress() { + }, + NetServer: function NetServer() { + }, + NodeJsError: function NodeJsError() { + }, + JsAssertionError: function JsAssertionError() { + }, + JsRangeError: function JsRangeError() { + }, + JsReferenceError: function JsReferenceError() { + }, + JsSyntaxError: function JsSyntaxError() { + }, + JsTypeError: function JsTypeError() { + }, + JsSystemError: function JsSystemError() { + }, + Process: function Process() { + }, + CPUUsage: function CPUUsage() { + }, + Release: function Release() { + }, + StreamModule: function StreamModule() { + }, + Readable: function Readable() { + }, + Writable: function Writable() { + }, + Duplex: function Duplex() { + }, + Transform: function Transform() { + }, + WritableOptions: function WritableOptions() { + }, + ReadableOptions: function ReadableOptions() { + }, + Immediate: function Immediate() { + }, + Timeout: function Timeout() { + }, + TTY: function TTY() { + }, + TTYReadStream: function TTYReadStream() { + }, + TTYWriteStream: function TTYWriteStream() { + }, + jsify0(dartObject) { + if (A._isBasicType(dartObject)) + return dartObject; + return A.jsify(dartObject); + }, + _isBasicType(value) { + return false; + }, + promiseToFuture0(promise, $T) { + var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), + completer = new A._SyncCompleter(t1, $T._eval$1("_SyncCompleter<0>")); + J.then$2$x(promise, A.allowInterop(new A.promiseToFuture_closure1(completer)), A.allowInterop(new A.promiseToFuture_closure2(completer))); + return t1; + }, + futureToPromise(future, $T) { + return new self.Promise(A.allowInterop(new A.futureToPromise_closure(future, $T))); + }, + Util: function Util() { + }, + promiseToFuture_closure1: function promiseToFuture_closure1(t0) { + this.completer = t0; + }, + promiseToFuture_closure2: function promiseToFuture_closure2(t0) { + this.completer = t0; + }, + futureToPromise_closure: function futureToPromise_closure(t0, t1) { + this.future = t0; + this.T = t1; + }, + futureToPromise__closure: function futureToPromise__closure(t0, t1) { + this.resolve = t0; + this.T = t1; + }, + Context_Context(style) { + return new A.Context(style, "."); + }, + _parseUri(uri) { + if (typeof uri == "string") + return A.Uri_parse(uri); + if (type$.Uri._is(uri)) + return uri; + throw A.wrapException(A.ArgumentError$value(uri, "uri", "Value must be a String or a Uri")); + }, + _validateArgList(method, args) { + var numArgs, i, numArgs0, message, t1, t2, t3, t4; + for (numArgs = args.length, i = 1; i < numArgs; ++i) { + if (args[i] == null || args[i - 1] != null) + continue; + for (; numArgs >= 1; numArgs = numArgs0) { + numArgs0 = numArgs - 1; + if (args[numArgs0] != null) + break; + } + message = new A.StringBuffer(""); + t1 = method + "("; + message._contents = t1; + t2 = A._arrayInstanceType(args); + t3 = t2._eval$1("SubListIterable<1>"); + t4 = new A.SubListIterable(args, 0, numArgs, t3); + t4.SubListIterable$3(args, 0, numArgs, t2._precomputed1); + t3 = t1 + new A.MappedListIterable(t4, new A._validateArgList_closure(), t3._eval$1("MappedListIterable")).join$1(0, ", "); + message._contents = t3; + message._contents = t3 + ("): part " + (i - 1) + " was null, but part " + i + " was not."); + throw A.wrapException(A.ArgumentError$(message.toString$0(0), null)); + } + }, + Context: function Context(t0, t1) { + this.style = t0; + this._context$_current = t1; + }, + Context_joinAll_closure: function Context_joinAll_closure() { + }, + Context_split_closure: function Context_split_closure() { + }, + _validateArgList_closure: function _validateArgList_closure() { + }, + _PathDirection: function _PathDirection(t0) { + this.name = t0; + }, + _PathRelation: function _PathRelation(t0) { + this.name = t0; + }, + InternalStyle: function InternalStyle() { + }, + ParsedPath_ParsedPath$parse(path, style) { + var t1, parts, separators, start, i, + root = style.getRoot$1(path), + isRootRelative = style.isRootRelative$1(path); + if (root != null) + path = B.JSString_methods.substring$1(path, root.length); + t1 = type$.JSArray_String; + parts = A._setArrayType([], t1); + separators = A._setArrayType([], t1); + t1 = path.length; + if (t1 !== 0 && style.isSeparator$1(path.charCodeAt(0))) { + separators.push(path[0]); + start = 1; + } else { + separators.push(""); + start = 0; + } + for (i = start; i < t1; ++i) + if (style.isSeparator$1(path.charCodeAt(i))) { + parts.push(B.JSString_methods.substring$2(path, start, i)); + separators.push(path[i]); + start = i + 1; + } + if (start < t1) { + parts.push(B.JSString_methods.substring$1(path, start)); + separators.push(""); + } + return new A.ParsedPath(style, root, isRootRelative, parts, separators); + }, + ParsedPath: function ParsedPath(t0, t1, t2, t3, t4) { + var _ = this; + _.style = t0; + _.root = t1; + _.isRootRelative = t2; + _.parts = t3; + _.separators = t4; + }, + ParsedPath__splitExtension_closure: function ParsedPath__splitExtension_closure() { + }, + ParsedPath__splitExtension_closure0: function ParsedPath__splitExtension_closure0() { + }, + PathException$(message) { + return new A.PathException(message); + }, + PathException: function PathException(t0) { + this.message = t0; + }, + PathMap__create(context, $V) { + var t1 = {}; + t1.context = context; + t1.context = $.$get$context(); + return A.LinkedHashMap_LinkedHashMap(new A.PathMap__create_closure(t1), new A.PathMap__create_closure0(t1), new A.PathMap__create_closure1(), type$.nullable_String, $V); + }, + PathMap: function PathMap(t0, t1) { + this._map = t0; + this.$ti = t1; + }, + PathMap__create_closure: function PathMap__create_closure(t0) { + this._box_0 = t0; + }, + PathMap__create_closure0: function PathMap__create_closure0(t0) { + this._box_0 = t0; + }, + PathMap__create_closure1: function PathMap__create_closure1() { + }, + Style__getPlatformStyle() { + if (A.Uri_base().get$scheme() !== "file") + return $.$get$Style_url(); + var t1 = A.Uri_base(); + if (!B.JSString_methods.endsWith$1(t1.get$path(t1), "/")) + return $.$get$Style_url(); + if (A._Uri__Uri(null, "a/b", null, null).toFilePath$0() === "a\\b") + return $.$get$Style_windows(); + return $.$get$Style_posix(); + }, + Style: function Style() { + }, + PosixStyle: function PosixStyle(t0, t1, t2) { + this.separatorPattern = t0; + this.needsSeparatorPattern = t1; + this.rootPattern = t2; + }, + UrlStyle: function UrlStyle(t0, t1, t2, t3) { + var _ = this; + _.separatorPattern = t0; + _.needsSeparatorPattern = t1; + _.rootPattern = t2; + _.relativeRootPattern = t3; + }, + WindowsStyle: function WindowsStyle(t0, t1, t2, t3) { + var _ = this; + _.separatorPattern = t0; + _.needsSeparatorPattern = t1; + _.rootPattern = t2; + _.relativeRootPattern = t3; + }, + WindowsStyle_absolutePathToUri_closure: function WindowsStyle_absolutePathToUri_closure() { + }, + Version$_(major, minor, patch, preRelease, build, _text) { + var t1 = preRelease == null || preRelease.length === 0 ? A._setArrayType([], type$.JSArray_Object) : A.Version__splitParts(preRelease), + t2 = build == null || build.length === 0 ? A._setArrayType([], type$.JSArray_Object) : A.Version__splitParts(build); + if (major < 0) + A.throwExpression(A.ArgumentError$("Major version must be non-negative.", null)); + if (minor < 0) + A.throwExpression(A.ArgumentError$("Minor version must be non-negative.", null)); + if (patch < 0) + A.throwExpression(A.ArgumentError$("Patch version must be non-negative.", null)); + return new A.Version(major, minor, patch, t1, t2, _text); + }, + Version_Version(major, minor, patch, pre) { + var text = "" + major + "." + minor + "." + patch; + if (pre != null) + text += "-" + pre; + return A.Version$_(major, minor, patch, pre, null, text); + }, + Version___parse_tearOff(text) { + return A.Version_Version$parse(text); + }, + Version_Version$parse(text) { + var major, minor, patch, preRelease, build, t1, exception, _null = null, + _s17_ = 'Could not parse "', + match = $.$get$completeVersion().firstMatch$1(text); + if (match == null) + throw A.wrapException(A.FormatException$(_s17_ + text + '".', _null, _null)); + try { + t1 = match._match[1]; + t1.toString; + major = A.int_parse(t1, _null); + t1 = match._match[2]; + t1.toString; + minor = A.int_parse(t1, _null); + t1 = match._match[3]; + t1.toString; + patch = A.int_parse(t1, _null); + preRelease = match._match[5]; + build = match._match[8]; + t1 = A.Version$_(major, minor, patch, preRelease, build, text); + return t1; + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) + throw A.wrapException(A.FormatException$(_s17_ + text + '".', _null, _null)); + else + throw exception; + } + }, + Version__splitParts(text) { + var t1 = type$.MappedListIterable_String_Object; + t1 = A.List_List$_of(new A.MappedListIterable(A._setArrayType(text.split("."), type$.JSArray_String), new A.Version__splitParts_closure(), t1), t1._eval$1("ListIterable.E")); + return t1; + }, + Version: function Version(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.major = t0; + _.minor = t1; + _.patch = t2; + _.preRelease = t3; + _.build = t4; + _._version$_text = t5; + }, + Version__splitParts_closure: function Version__splitParts_closure() { + }, + VersionRange_VersionRange(includeMax, max) { + return new A.VersionRange(null, max, false, true); + }, + VersionRange: function VersionRange(t0, t1, t2, t3) { + var _ = this; + _.min = t0; + _.max = t1; + _.includeMin = t2; + _.includeMax = t3; + }, + CssMediaQuery$type(type, conditions, modifier) { + return new A.CssMediaQuery(modifier, type, true, conditions == null ? B.List_empty : A.List_List$unmodifiable(conditions, type$.String)); + }, + CssMediaQuery$condition(conditions, conjunction) { + var t1 = A.List_List$unmodifiable(conditions, type$.String); + if (t1.length > 1 && conjunction == null) + A.throwExpression(A.ArgumentError$(string$.If_con, null)); + return new A.CssMediaQuery(null, null, conjunction !== false, t1); + }, + CssMediaQuery: function CssMediaQuery(t0, t1, t2, t3) { + var _ = this; + _.modifier = t0; + _.type = t1; + _.conjunction = t2; + _.conditions = t3; + }, + _SingletonCssMediaQueryMergeResult: function _SingletonCssMediaQueryMergeResult(t0, t1) { + this.index = t0; + this._name = t1; + }, + MediaQuerySuccessfulMergeResult: function MediaQuerySuccessfulMergeResult(t0) { + this.query = t0; + }, + ModifiableCssAtRule$($name, span, childless, value) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssAtRule($name, value, childless, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssAtRule: function ModifiableCssAtRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.value = t1; + _.isChildless = t2; + _.span = t3; + _.children = t4; + _._children = t5; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssComment: function ModifiableCssComment(t0, t1) { + var _ = this; + _.text = t0; + _.span = t1; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssDeclaration$($name, value, span, parsedAsSassScript, valueSpanForMap) { + var t2, + t1 = valueSpanForMap == null ? value.span : valueSpanForMap; + if (!parsedAsSassScript) { + t2 = value.value; + if (!(t2 instanceof A.SassString)) + A.throwExpression(A.ArgumentError$(string$.If_par + value.toString$0(0) + "` of type " + A.getRuntimeTypeOfDartObject(t2).toString$0(0) + ").", null)); + } + return new A.ModifiableCssDeclaration($name, value, parsedAsSassScript, t1, span); + }, + ModifiableCssDeclaration: function ModifiableCssDeclaration(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.parsedAsSassScript = t2; + _.valueSpanForMap = t3; + _.span = t4; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssImport: function ModifiableCssImport(t0, t1, t2) { + var _ = this; + _.url = t0; + _.modifiers = t1; + _.span = t2; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssKeyframeBlock$(selector, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssKeyframeBlock(selector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssKeyframeBlock: function ModifiableCssKeyframeBlock(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssMediaRule$(queries, span) { + var t1 = A.List_List$unmodifiable(queries, type$.CssMediaQuery), + t2 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + if (J.get$isEmpty$asx(queries)) + A.throwExpression(A.ArgumentError$value(queries, "queries", "may not be empty.")); + return new A.ModifiableCssMediaRule(t1, span, new A.UnmodifiableListView(t2, type$.UnmodifiableListView_ModifiableCssNode), t2); + }, + ModifiableCssMediaRule: function ModifiableCssMediaRule(t0, t1, t2, t3) { + var _ = this; + _.queries = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssNode: function ModifiableCssNode() { + }, + ModifiableCssNode_hasFollowingSibling_closure: function ModifiableCssNode_hasFollowingSibling_closure() { + }, + ModifiableCssParentNode: function ModifiableCssParentNode() { + }, + ModifiableCssStyleRule$(_selector, span, fromPlainCss, originalSelector) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssStyleRule(_selector, originalSelector, span, fromPlainCss, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssStyleRule: function ModifiableCssStyleRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._style_rule$_selector = t0; + _.originalSelector = t1; + _.span = t2; + _.fromPlainCss = t3; + _.children = t4; + _._children = t5; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssStylesheet$(span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssStylesheet(span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssStylesheet: function ModifiableCssStylesheet(t0, t1, t2) { + var _ = this; + _.span = t0; + _.children = t1; + _._children = t2; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + ModifiableCssSupportsRule$(condition, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode); + return new A.ModifiableCssSupportsRule(condition, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode), t1); + }, + ModifiableCssSupportsRule: function ModifiableCssSupportsRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _._children = t3; + _._indexInParent = _._parent = null; + _.isGroupEnd = false; + }, + CssNode: function CssNode() { + }, + CssParentNode: function CssParentNode() { + }, + _IsInvisibleVisitor: function _IsInvisibleVisitor(t0, t1) { + this.includeBogus = t0; + this.includeComments = t1; + }, + __IsInvisibleVisitor_Object_EveryCssVisitor: function __IsInvisibleVisitor_Object_EveryCssVisitor() { + }, + CssStylesheet: function CssStylesheet(t0, t1) { + this.children = t0; + this.span = t1; + }, + CssValue: function CssValue(t0, t1, t2) { + this.value = t0; + this.span = t1; + this.$ti = t2; + }, + _FakeAstNode: function _FakeAstNode(t0) { + this._callback = t0; + }, + ArgumentList$(positional, named, namedSpans, span, keywordRest, rest) { + var t1 = type$.Expression, + t2 = type$.String; + return new A.ArgumentList(A.List_List$unmodifiable(positional, t1), A.ConstantMap_ConstantMap$from(named, t2, t1), A.ConstantMap_ConstantMap$from(namedSpans, t2, type$.FileSpan), rest, keywordRest, span); + }, + ArgumentList$empty(span) { + return new A.ArgumentList(B.List_empty9, B.Map_empty4, B.Map_empty5, null, null, span); + }, + ArgumentList: function ArgumentList(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.positional = t0; + _.named = t1; + _.namedSpans = t2; + _.rest = t3; + _.keywordRest = t4; + _.span = t5; + }, + AtRootQuery: function AtRootQuery(t0, t1, t2, t3) { + var _ = this; + _.include = t0; + _.names = t1; + _._all = t2; + _._at_root_query$_rule = t3; + }, + BooleanOperator: function BooleanOperator(t0, t1) { + this.index = t0; + this._name = t1; + }, + ConfiguredVariable: function ConfiguredVariable(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.expression = t1; + _.isGuarded = t2; + _.span = t3; + }, + Expression: function Expression() { + }, + BinaryOperationExpression: function BinaryOperationExpression(t0, t1, t2, t3) { + var _ = this; + _.operator = t0; + _.left = t1; + _.right = t2; + _.allowsSlash = t3; + }, + BinaryOperator: function BinaryOperator(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _.isAssociative = t3; + _.index = t4; + _._name = t5; + }, + BooleanExpression: function BooleanExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + ColorExpression: function ColorExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + FunctionExpression: function FunctionExpression(t0, t1, t2, t3, t4) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.originalName = t2; + _.$arguments = t3; + _.span = t4; + }, + IfConditionOperation$(expressions, op) { + var t1 = A.List_List$unmodifiable(expressions, type$.IfConditionExpression); + if (t1.length < 2) + A.throwExpression(A.ArgumentError$value(t1, "expressions", "must have length >= 2")); + return new A.IfConditionOperation(t1, op); + }, + IfExpression: function IfExpression(t0, t1) { + this.branches = t0; + this.span = t1; + }, + IfConditionExpression: function IfConditionExpression() { + }, + IfConditionParenthesized: function IfConditionParenthesized(t0, t1) { + this.expression = t0; + this.span = t1; + }, + IfConditionNegation: function IfConditionNegation(t0, t1) { + this.expression = t0; + this.span = t1; + }, + IfConditionOperation: function IfConditionOperation(t0, t1) { + this.expressions = t0; + this.op = t1; + }, + IfConditionOperation_toInterpolation_closure: function IfConditionOperation_toInterpolation_closure(t0) { + this.$this = t0; + }, + IfConditionFunction: function IfConditionFunction(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + IfConditionSass: function IfConditionSass(t0, t1) { + this.expression = t0; + this.span = t1; + }, + IfConditionRaw: function IfConditionRaw(t0) { + this.text = t0; + }, + InterpolatedFunctionExpression: function InterpolatedFunctionExpression(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + LegacyIfExpression: function LegacyIfExpression(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + ListExpression: function ListExpression(t0, t1, t2, t3) { + var _ = this; + _.contents = t0; + _.separator = t1; + _.hasBrackets = t2; + _.span = t3; + }, + ListExpression_toString_closure: function ListExpression_toString_closure(t0) { + this.$this = t0; + }, + MapExpression: function MapExpression(t0, t1) { + this.pairs = t0; + this.span = t1; + }, + NullExpression: function NullExpression(t0) { + this.span = t0; + }, + NumberExpression: function NumberExpression(t0, t1, t2) { + this.value = t0; + this.unit = t1; + this.span = t2; + }, + ParenthesizedExpression: function ParenthesizedExpression(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SelectorExpression: function SelectorExpression(t0) { + this.span = t0; + }, + StringExpression_quoteText(text) { + var quote = A.StringExpression__bestQuote(A._setArrayType([text], type$.JSArray_String)), + buffer = new A.StringBuffer(""), + t1 = A.Primitives_stringFromCharCode(quote); + buffer._contents = t1; + A.StringExpression__quoteInnerText(text, quote, buffer, true); + t1 = buffer._contents += t1; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + StringExpression__quoteInnerText(text, quote, buffer, $static) { + var t1, t2, i, _1_0, _0_0, t3, t4, t5, t0; + for (t1 = text.length, t2 = t1 - 1, i = 0; i < t1; ++i) { + _1_0 = text.charCodeAt(i); + if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(97); + if (i !== t2) { + _0_0 = text.charCodeAt(i + 1); + t3 = true; + if (!(_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12)) + if (!(_0_0 >= 48 && _0_0 <= 57)) + if (!(_0_0 >= 97 && _0_0 <= 102)) + t3 = _0_0 >= 65 && _0_0 <= 70; + if (t3) + buffer.writeCharCode$1(32); + } + continue; + } + t3 = 92 === _1_0; + if (t3) + t4 = _1_0; + else + t4 = null; + if (!t3) { + t3 = false; + t5 = _1_0 === quote; + if (t5) + t4 = _1_0; + if (!t5) + if (35 === _1_0) + if ($static) + if (i < t2) { + t3 = text.charCodeAt(i + 1) === 123; + if (t3) + t4 = _1_0; + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t3 = t4; + t4 = true; + } + } else { + t3 = t4; + t4 = true; + } + if (t4) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(t3); + continue; + } + buffer.writeCharCode$1(_1_0); + } + }, + StringExpression__bestQuote(strings) { + var t1, t2, t3, containsDoubleQuote, t4, t5; + for (t1 = J.get$iterator$ax(strings), t2 = type$.CodeUnits, t3 = t2._eval$1("ListIterator"), t2 = t2._eval$1("ListBase.E"), containsDoubleQuote = false; t1.moveNext$0();) + for (t4 = new A.CodeUnits(t1.get$current(t1)), t4 = new A.ListIterator(t4, t4.get$length(0), t3); t4.moveNext$0();) { + t5 = t4.__internal$_current; + if (t5 == null) + t5 = t2._as(t5); + if (t5 === 39) + return 34; + if (t5 === 34) + containsDoubleQuote = true; + } + return containsDoubleQuote ? 39 : 34; + }, + StringExpression: function StringExpression(t0, t1) { + this.text = t0; + this.hasQuotes = t1; + }, + SupportsExpression: function SupportsExpression(t0) { + this.condition = t0; + }, + UnaryOperationExpression: function UnaryOperationExpression(t0, t1, t2) { + this.operator = t0; + this.operand = t1; + this.span = t2; + }, + UnaryOperator: function UnaryOperator(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.operator = t1; + _.index = t2; + _._name = t3; + }, + ValueExpression: function ValueExpression(t0, t1) { + this.value = t0; + this.span = t1; + }, + VariableExpression: function VariableExpression(t0, t1, t2) { + this.namespace = t0; + this.name = t1; + this.span = t2; + }, + DynamicImport: function DynamicImport(t0, t1) { + this.urlString = t0; + this.span = t1; + }, + StaticImport: function StaticImport(t0, t1, t2) { + this.url = t0; + this.modifiers = t1; + this.span = t2; + }, + Interpolation$(contents, spans, span) { + var t1 = new A.Interpolation(A.List_List$unmodifiable(contents, type$.Object), A.List_List$unmodifiable(spans, type$.nullable_FileSpan), span); + t1.Interpolation$3(contents, spans, span); + return t1; + }, + Interpolation: function Interpolation(t0, t1, t2) { + this.contents = t0; + this.spans = t1; + this.span = t2; + }, + Interpolation_toString_closure: function Interpolation_toString_closure() { + }, + Parameter: function Parameter(t0, t1, t2) { + this.name = t0; + this.defaultValue = t1; + this.span = t2; + }, + ParameterList_ParameterList$parse(contents, url) { + return A.ScssParser$(contents, false, url).parseParameterList$0(); + }, + ParameterList: function ParameterList(t0, t1, t2) { + this.parameters = t0; + this.restParameter = t1; + this.span = t2; + }, + ParameterList_verify_closure: function ParameterList_verify_closure() { + }, + ParameterList_verify_closure0: function ParameterList_verify_closure0() { + }, + Statement: function Statement() { + }, + AtRootRule$(children, span, query) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.AtRootRule(query, span, t1, t2); + }, + AtRootRule: function AtRootRule(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + AtRule$($name, span, children, value) { + var t1 = children == null ? null : A.List_List$unmodifiable(children, type$.Statement), + t2 = t1 == null ? null : B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.AtRule($name, value, span, t1, t2 === true); + }, + AtRule: function AtRule(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + CallableDeclaration: function CallableDeclaration() { + }, + ContentBlock$(parameters, children, span) { + var _s8_ = "@content", + t1 = A.stringReplaceAllUnchecked(_s8_, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.ContentBlock(t1, _s8_, parameters, span, t2, t3); + }, + ContentBlock: function ContentBlock(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.originalName = t1; + _.parameters = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + ContentRule: function ContentRule(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + DebugRule: function DebugRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + Declaration$($name, value, span) { + return new A.Declaration($name, value, span, true, null, false); + }, + Declaration$notSassScript($name, value, span) { + return new A.Declaration($name, value, span, false, null, false); + }, + Declaration$nested($name, children, span, value) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.Declaration($name, value, span, true, t1, t2); + }, + Declaration: function Declaration(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.parsedAsSassScript = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + EachRule$(variables, list, children, span) { + var t1 = A.List_List$unmodifiable(variables, type$.String), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.EachRule(t1, list, span, t2, t3); + }, + EachRule: function EachRule(t0, t1, t2, t3, t4) { + var _ = this; + _.variables = t0; + _.list = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + EachRule_toString_closure: function EachRule_toString_closure() { + }, + ErrorRule: function ErrorRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + ExtendRule: function ExtendRule(t0, t1, t2) { + this.selector = t0; + this.isOptional = t1; + this.span = t2; + }, + ForRule$(variable, from, to, children, span, exclusive) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.ForRule(variable, from, to, exclusive, span, t1, t2); + }, + ForRule: function ForRule(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.variable = t0; + _.from = t1; + _.to = t2; + _.isExclusive = t3; + _.span = t4; + _.children = t5; + _.hasDeclarations = t6; + }, + ForwardRule: function ForwardRule(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.url = t0; + _.shownMixinsAndFunctions = t1; + _.shownVariables = t2; + _.hiddenMixinsAndFunctions = t3; + _.hiddenVariables = t4; + _.prefix = t5; + _.configuration = t6; + _.span = t7; + }, + FunctionRule$($name, parameters, children, span, comment) { + var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.FunctionRule(t1, $name, parameters, span, t2, t3); + }, + FunctionRule: function FunctionRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.originalName = t1; + _.parameters = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + IfClause$(expression, children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement); + return new A.IfClause(expression, t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure())); + }, + ElseClause$(children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement); + return new A.ElseClause(t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure())); + }, + IfRule: function IfRule(t0, t1, t2) { + this.clauses = t0; + this.lastClause = t1; + this.span = t2; + }, + IfRule_toString_closure: function IfRule_toString_closure() { + }, + IfRuleClause: function IfRuleClause() { + }, + IfRuleClause$__closure: function IfRuleClause$__closure() { + }, + IfRuleClause$___closure: function IfRuleClause$___closure() { + }, + IfClause: function IfClause(t0, t1, t2) { + this.expression = t0; + this.children = t1; + this.hasDeclarations = t2; + }, + ElseClause: function ElseClause(t0, t1) { + this.children = t0; + this.hasDeclarations = t1; + }, + ImportRule: function ImportRule(t0, t1) { + this.imports = t0; + this.span = t1; + }, + IncludeRule: function IncludeRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.originalName = t2; + _.$arguments = t3; + _.content = t4; + _.span = t5; + }, + LoudComment: function LoudComment(t0) { + this.text = t0; + }, + MediaRule$(query, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.MediaRule(query, span, t1, t2); + }, + MediaRule: function MediaRule(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + MixinRule$($name, parameters, children, span, comment) { + var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure()); + return new A.MixinRule(t1, $name, parameters, span, t2, t3); + }, + MixinRule: function MixinRule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.__MixinRule_hasContent_FI = $; + _.name = t0; + _.originalName = t1; + _.parameters = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + _HasContentVisitor: function _HasContentVisitor() { + }, + __HasContentVisitor_Object_StatementSearchVisitor: function __HasContentVisitor_Object_StatementSearchVisitor() { + }, + ParentStatement: function ParentStatement() { + }, + ParentStatement_closure: function ParentStatement_closure() { + }, + ParentStatement__closure: function ParentStatement__closure() { + }, + ReturnRule: function ReturnRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SilentComment: function SilentComment(t0, t1) { + this.text = t0; + this.span = t1; + }, + StyleRule$(selector, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.StyleRule(selector, null, span, t1, t2); + }, + StyleRule: function StyleRule(t0, t1, t2, t3, t4) { + var _ = this; + _.selector = t0; + _.parsedSelector = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + Stylesheet$(children, span) { + var t1 = A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), + t2 = A._setArrayType([], type$.JSArray_UseRule), + t3 = A._setArrayType([], type$.JSArray_ForwardRule), + t4 = A.List_List$unmodifiable(children, type$.Statement), + t5 = B.JSArray_methods.any$1(t4, new A.ParentStatement_closure()); + t2 = new A.Stylesheet(span, false, t2, t3, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), B.Map_empty5, t4, t5); + t2.Stylesheet$internal$5$globalVariables$plainCss(children, span, t1, null, false); + return t2; + }, + Stylesheet$internal(children, span, parseTimeWarnings, globalVariables, plainCss) { + var t1 = A._setArrayType([], type$.JSArray_UseRule), + t2 = A._setArrayType([], type$.JSArray_ForwardRule), + t3 = globalVariables == null ? B.Map_empty5 : A.ConstantMap_ConstantMap$from(globalVariables, type$.String, type$.FileSpan), + t4 = A.List_List$unmodifiable(children, type$.Statement), + t5 = B.JSArray_methods.any$1(t4, new A.ParentStatement_closure()); + t1 = new A.Stylesheet(span, plainCss, t1, t2, new A.UnmodifiableListView(parseTimeWarnings, type$.UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), t3, t4, t5); + t1.Stylesheet$internal$5$globalVariables$plainCss(children, span, parseTimeWarnings, globalVariables, plainCss); + return t1; + }, + Stylesheet_Stylesheet$parse(contents, syntax, parseSelectors, url) { + var error, stackTrace, url0, t1, exception, t2; + try { + switch (syntax.index) { + case 1: + t1 = new A.SassParser(false, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), A.SpanScanner$(contents, url), null).parse$0(0); + return t1; + case 0: + t1 = A.ScssParser$(contents, false, url).parse$0(0); + return t1; + case 2: + t1 = new A.CssParser(false, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), A.SpanScanner$(contents, url), null).parse$0(0); + return t1; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$x(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); + url0 = t1.get$sourceUrl(t1); + if (url0 == null || url0.toString$0(0) === "stdin") + throw exception; + t1 = type$.Uri; + throw A.wrapException(A.throwWithTrace(error.withLoadedUrls$1(A.Set_Set$unmodifiable(A.LinkedHashSet_LinkedHashSet$_literal([url0], t1), t1)), error, stackTrace)); + } else + throw exception; + } + }, + Stylesheet: function Stylesheet(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.span = t0; + _.plainCss = t1; + _._uses = t2; + _._forwards = t3; + _.parseTimeWarnings = t4; + _.globalVariables = t5; + _.children = t6; + _.hasDeclarations = t7; + }, + SupportsRule$(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.SupportsRule(condition, span, t1, t2); + }, + SupportsRule: function SupportsRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + UseRule: function UseRule(t0, t1, t2, t3) { + var _ = this; + _.url = t0; + _.namespace = t1; + _.configuration = t2; + _.span = t3; + }, + VariableDeclaration$($name, expression, span, comment, global, guarded, namespace) { + if (namespace != null && global) + A.throwExpression(A.ArgumentError$(string$.Other_, null)); + return new A.VariableDeclaration(namespace, $name, expression, guarded, global, span); + }, + VariableDeclaration: function VariableDeclaration(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.expression = t2; + _.isGuarded = t3; + _.isGlobal = t4; + _.span = t5; + }, + WarnRule: function WarnRule(t0, t1) { + this.expression = t0; + this.span = t1; + }, + WhileRule$(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure()); + return new A.WhileRule(condition, span, t1, t2); + }, + WhileRule: function WhileRule(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + SupportsAnything: function SupportsAnything(t0, t1) { + this.contents = t0; + this.span = t1; + }, + SupportsDeclaration: function SupportsDeclaration(t0, t1, t2) { + this.name = t0; + this.value = t1; + this.span = t2; + }, + SupportsFunction: function SupportsFunction(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + SupportsInterpolation: function SupportsInterpolation(t0, t1) { + this.expression = t0; + this.span = t1; + }, + SupportsNegation: function SupportsNegation(t0, t1) { + this.condition = t0; + this.span = t1; + }, + SupportsOperation: function SupportsOperation(t0, t1, t2, t3) { + var _ = this; + _.left = t0; + _.right = t1; + _.operator = t2; + _.span = t3; + }, + Selector: function Selector() { + }, + _IsInvisibleVisitor0: function _IsInvisibleVisitor0(t0) { + this.includeBogus = t0; + }, + _IsBogusVisitor: function _IsBogusVisitor(t0) { + this.includeLeadingCombinator = t0; + }, + _IsBogusVisitor_visitComplexSelector_closure: function _IsBogusVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + _IsUselessVisitor: function _IsUselessVisitor() { + }, + _IsUselessVisitor_visitComplexSelector_closure: function _IsUselessVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + _ContainsParentSelectorVisitor: function _ContainsParentSelectorVisitor() { + }, + __ContainsParentSelectorVisitor_Object_AnySelectorVisitor: function __ContainsParentSelectorVisitor_Object_AnySelectorVisitor() { + }, + __IsBogusVisitor_Object_AnySelectorVisitor: function __IsBogusVisitor_Object_AnySelectorVisitor() { + }, + __IsInvisibleVisitor_Object_AnySelectorVisitor: function __IsInvisibleVisitor_Object_AnySelectorVisitor() { + }, + __IsUselessVisitor_Object_AnySelectorVisitor: function __IsUselessVisitor_Object_AnySelectorVisitor() { + }, + AttributeSelector: function AttributeSelector(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.op = t1; + _.value = t2; + _.modifier = t3; + _.span = t4; + }, + AttributeOperator: function AttributeOperator(t0, t1, t2) { + this._attribute$_text = t0; + this.index = t1; + this._name = t2; + }, + ClassSelector: function ClassSelector(t0, t1) { + this.name = t0; + this.span = t1; + }, + Combinator: function Combinator(t0, t1, t2) { + this._combinator$_text = t0; + this.index = t1; + this._name = t2; + }, + ComplexSelector$(leadingCombinators, components, span, lineBreak) { + var t1 = A.List_List$unmodifiable(leadingCombinators, type$.CssValue_Combinator), + t2 = A.List_List$unmodifiable(components, type$.ComplexSelectorComponent); + if (t1.length === 0 && t2.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, null)); + return new A.ComplexSelector(t1, t2, lineBreak, span); + }, + ComplexSelector: function ComplexSelector(t0, t1, t2, t3) { + var _ = this; + _.leadingCombinators = t0; + _.components = t1; + _.lineBreak = t2; + _.__ComplexSelector_specificity_FI = $; + _.span = t3; + }, + ComplexSelector_specificity_closure: function ComplexSelector_specificity_closure() { + }, + ComplexSelectorComponent: function ComplexSelectorComponent(t0, t1, t2) { + this.selector = t0; + this.combinators = t1; + this.span = t2; + }, + ComplexSelectorComponent_toString_closure: function ComplexSelectorComponent_toString_closure() { + }, + CompoundSelector$(components, span) { + var t1 = A.List_List$unmodifiable(components, type$.SimpleSelector); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.CompoundSelector(t1, span); + }, + CompoundSelector: function CompoundSelector(t0, t1) { + var _ = this; + _.components = t0; + _.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = _.__CompoundSelector_specificity_FI = $; + _.span = t1; + }, + CompoundSelector_specificity_closure: function CompoundSelector_specificity_closure() { + }, + CompoundSelector_hasComplicatedSuperselectorSemantics_closure: function CompoundSelector_hasComplicatedSuperselectorSemantics_closure() { + }, + IDSelector: function IDSelector(t0, t1) { + this.name = t0; + this.span = t1; + }, + IDSelector_unify_closure: function IDSelector_unify_closure(t0) { + this.$this = t0; + }, + SelectorList$(components, span) { + var t1 = A.List_List$unmodifiable(components, type$.ComplexSelector); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.SelectorList(t1, span); + }, + SelectorList_SelectorList$parse(contents, allowParent, interpolationMap, logger, plainCss) { + return A.SelectorParser$(contents, allowParent, interpolationMap, logger, plainCss, null).parse$0(0); + }, + SelectorList: function SelectorList(t0, t1) { + this.components = t0; + this.span = t1; + }, + SelectorList_asSassList_closure: function SelectorList_asSassList_closure() { + }, + SelectorList_nestWithin_closure: function SelectorList_nestWithin_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.preserveParentSelectors = t1; + _.implicitParent = t2; + _.parent = t3; + }, + SelectorList_nestWithin__closure: function SelectorList_nestWithin__closure(t0) { + this.complex = t0; + }, + SelectorList_nestWithin__closure0: function SelectorList_nestWithin__closure0(t0) { + this.complex = t0; + }, + SelectorList__nestWithinCompound_closure: function SelectorList__nestWithinCompound_closure() { + }, + SelectorList__nestWithinCompound_closure0: function SelectorList__nestWithinCompound_closure0(t0) { + this.parent = t0; + }, + SelectorList__nestWithinCompound_closure1: function SelectorList__nestWithinCompound_closure1(t0, t1, t2) { + this.parentSelector = t0; + this.resolvedSimples = t1; + this.component = t2; + }, + SelectorList_withAdditionalCombinators_closure: function SelectorList_withAdditionalCombinators_closure(t0) { + this.combinators = t0; + }, + _ParentSelectorVisitor: function _ParentSelectorVisitor() { + }, + __ParentSelectorVisitor_Object_SelectorSearchVisitor: function __ParentSelectorVisitor_Object_SelectorSearchVisitor() { + }, + ParentSelector: function ParentSelector(t0, t1) { + this.suffix = t0; + this.span = t1; + }, + PlaceholderSelector: function PlaceholderSelector(t0, t1) { + this.name = t0; + this.span = t1; + }, + PseudoSelector$($name, span, argument, element, selector) { + var t1 = !element, + t2 = t1 && !A.PseudoSelector__isFakePseudoElement($name); + return new A.PseudoSelector($name, A.unvendor($name), t2, t1, argument, selector, span); + }, + PseudoSelector__isFakePseudoElement($name) { + switch ($name.charCodeAt(0)) { + case 97: + case 65: + return A.equalsIgnoreCase($name, "after"); + case 98: + case 66: + return A.equalsIgnoreCase($name, "before"); + case 102: + case 70: + return A.equalsIgnoreCase($name, "first-line") || A.equalsIgnoreCase($name, "first-letter"); + default: + return false; + } + }, + PseudoSelector: function PseudoSelector(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.name = t0; + _.normalizedName = t1; + _.isClass = t2; + _.isSyntacticClass = t3; + _.argument = t4; + _.selector = t5; + _.__PseudoSelector_specificity_FI = $; + _.span = t6; + }, + PseudoSelector_specificity_closure: function PseudoSelector_specificity_closure(t0) { + this.$this = t0; + }, + PseudoSelector_specificity__closure: function PseudoSelector_specificity__closure() { + }, + PseudoSelector_specificity__closure0: function PseudoSelector_specificity__closure0() { + }, + PseudoSelector_unify_closure: function PseudoSelector_unify_closure() { + }, + QualifiedName: function QualifiedName(t0, t1) { + this.name = t0; + this.namespace = t1; + }, + SimpleSelector: function SimpleSelector() { + }, + SimpleSelector_isSuperselector_closure: function SimpleSelector_isSuperselector_closure(t0) { + this.$this = t0; + }, + SimpleSelector_isSuperselector__closure: function SimpleSelector_isSuperselector__closure(t0) { + this.$this = t0; + }, + TypeSelector: function TypeSelector(t0, t1) { + this.name = t0; + this.span = t1; + }, + UniversalSelector: function UniversalSelector(t0, t1) { + this.namespace = t0; + this.span = t1; + }, + compileAsync(path, charset, fatalDeprecations, futureDeprecations, importCache, logger, quietDeps, silenceDeprecations, sourceMap, style, syntax, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, t3, t4, t0, stylesheet, result, t1, t2; + var $async$compileAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Deprecation; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + t1 = syntax === A.Syntax_forPath(path); + $async$goto = t1 ? 3 : 5; + break; + case 3: + // then + t1 = $.$get$FilesystemImporter_cwd(); + t2 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t2 == null ? null : J.get$platform$x(t2), "win32")) { + t2 = A.isNodeJs() ? self.process : null; + t2 = J.$eq$(t2 == null ? null : J.get$platform$x(t2), "darwin"); + } else + t2 = true; + if (t2) { + t2 = A.absolute(path, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + t3 = $.$get$context(); + t2 = A._realCasePath(t3.normalize$1(t2)); + } else { + t2 = $.$get$context(); + t3 = t2.canonicalize$1(0, path); + t0 = t3; + t3 = t2; + t2 = t0; + } + $async$goto = 6; + return A._asyncAwait(importCache.importCanonical$3$originalUrl(t1, t3.toUri$1(t2), t3.toUri$1(path)), $async$compileAsync); + case 6: + // returning from await. + t3 = $async$result; + t3.toString; + stylesheet = t3; + // goto join + $async$goto = 4; + break; + case 5: + // else + t1 = A.readFile(path); + stylesheet = A.Stylesheet_Stylesheet$parse(t1, syntax, false, $.$get$context().toUri$1(path)); + case 4: + // join + $async$goto = 7; + return A._asyncAwait(A._compileStylesheet0(stylesheet, logger, importCache, null, $.$get$FilesystemImporter_cwd(), null, style, true, null, null, quietDeps, sourceMap, charset), $async$compileAsync); + case 7: + // returning from await. + result = $async$result; + logger.summarize$1$js(false); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileAsync, $async$completer); + }, + compileStringAsync(source, charset, fatalDeprecations, futureDeprecations, importCache, importer, logger, quietDeps, silenceDeprecations, sourceMap, style, syntax, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, t3, t4, stylesheet, _0_0, result, t1, t2; + var $async$compileStringAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Deprecation; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + stylesheet = A.Stylesheet_Stylesheet$parse(source, syntax, false, null); + t1 = stylesheet.span; + _0_0 = t1.get$sourceUrl(t1); + if (type$.Uri._is(_0_0)) + t2 = "" === _0_0.get$scheme(); + else + t2 = false; + if (t2) + A.WarnForDeprecation_warnForDeprecation(logger, B.Deprecation_r8S, "Passing a relative `url` argument (" + A.S(t1.get$sourceUrl(t1)) + string$.x29x20to_cm, null, null); + $async$goto = 3; + return A._asyncAwait(A._compileStylesheet0(stylesheet, logger, importCache, null, importer, null, style, true, null, null, quietDeps, sourceMap, charset), $async$compileStringAsync); + case 3: + // returning from await. + result = $async$result; + logger.summarize$1$js(false); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileStringAsync, $async$completer); + }, + _compileStylesheet0(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult), + $async$returnValue, serializeResult, resultSourceMap, $async$temp1; + var $async$_compileStylesheet0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A._EvaluateVisitor$0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), $async$_compileStylesheet0); + case 3: + // returning from await. + serializeResult = $async$temp1.serialize($async$result._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, true); + resultSourceMap = serializeResult._1; + if (resultSourceMap != null) + A.mapInPlace(resultSourceMap.urls, new A._compileStylesheet_closure0(stylesheet, importCache)); + $async$returnValue = new A.CompileResult(serializeResult); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_compileStylesheet0, $async$completer); + }, + _compileStylesheet_closure0: function _compileStylesheet_closure0(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + AsyncEnvironment$() { + var t1 = type$.String, + t2 = type$.Module_AsyncCallable, + t3 = type$.AstNode, + t4 = type$.int, + t5 = type$.AsyncCallable, + t6 = type$.JSArray_Map_String_AsyncCallable; + return new A.AsyncEnvironment(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_AsyncCallable), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value)], type$.JSArray_Map_String_Value), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null, A.LinkedHashSet_LinkedHashSet$_empty(t1)); + }, + AsyncEnvironment$_(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content, _configurableVariables) { + var t1 = type$.String, + t2 = type$.int; + return new A.AsyncEnvironment(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content, _configurableVariables); + }, + _EnvironmentModule__EnvironmentModule0(environment, css, preModuleComments, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6, module, result, t7; + if (forwarded == null) + forwarded = B.Set_empty3; + t1 = type$.dynamic; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = type$.Module_AsyncCallable, t3 = type$.List_CssComment, t4 = A.MapExtensions_get_pairs(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment; t4.moveNext$0();) { + t6 = t4.get$current(t4); + module = t6._0; + result = A.List_List$from(t6._1, false, t5); + result.$flags = 3; + t1.$indexSet(0, module, result); + } + t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); + t2 = A._EnvironmentModule__makeModulesByVariable0(forwarded); + t3 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure5(), type$.Map_String_Value), type$.Value); + t4 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure6(), type$.Map_String_AstNode), type$.AstNode); + t5 = type$.Map_String_AsyncCallable; + t6 = type$.AsyncCallable; + t7 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure7(), t5), t6); + t6 = A._EnvironmentModule__memberMap0(B.JSArray_methods.get$first(environment._async_environment$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure8(), t5), t6); + t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._async_environment$_allModules, new A._EnvironmentModule__EnvironmentModule_closure9()); + return A._EnvironmentModule$_0(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._async_environment$_allModules, new A._EnvironmentModule__EnvironmentModule_closure10())); + }, + _EnvironmentModule__makeModulesByVariable0(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty8; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_AsyncCallable); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule0) { + for (t3 = t2._async_environment$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll(modulesByVariable, t5.get$keys(t5), t4); + } + t3 = B.JSArray_methods.get$first(t2._async_environment$_environment._async_environment$_variables); + A.setAll(modulesByVariable, t3.get$keys(t3), t2); + } else { + t3 = t2.get$variables(); + A.setAll(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap0(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView(localMap, $V._eval$1("PublicMemberMapView<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$(t1, type$.String, $V); + }, + _EnvironmentModule$_0(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule0(_environment._async_environment$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + AsyncEnvironment: function AsyncEnvironment(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._async_environment$_modules = t0; + _._async_environment$_namespaceNodes = t1; + _._async_environment$_globalModules = t2; + _._async_environment$_importedModules = t3; + _._async_environment$_forwardedModules = t4; + _._async_environment$_nestedForwardedModules = t5; + _._async_environment$_allModules = t6; + _._async_environment$_variables = t7; + _._async_environment$_variableNodes = t8; + _._async_environment$_variableIndices = t9; + _._async_environment$_functions = t10; + _._async_environment$_functionIndices = t11; + _._async_environment$_mixins = t12; + _._async_environment$_mixinIndices = t13; + _._async_environment$_content = t14; + _._async_environment$_configurableVariables = t15; + _._async_environment$_inMixin = false; + _._async_environment$_inSemiGlobalScope = true; + _._async_environment$_lastVariableIndex = _._async_environment$_lastVariableName = null; + }, + AsyncEnvironment__getVariableFromGlobalModule_closure: function AsyncEnvironment__getVariableFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure: function AsyncEnvironment_setVariable_closure(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment_setVariable_closure0: function AsyncEnvironment_setVariable_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure1: function AsyncEnvironment_setVariable_closure1(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment__getFunctionFromGlobalModule_closure: function AsyncEnvironment__getFunctionFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment__getMixinFromGlobalModule_closure: function AsyncEnvironment__getMixinFromGlobalModule_closure(t0) { + this.name = t0; + }, + AsyncEnvironment_toModule_closure: function AsyncEnvironment_toModule_closure() { + }, + AsyncEnvironment_toDummyModule_closure: function AsyncEnvironment_toDummyModule_closure() { + }, + _EnvironmentModule0: function _EnvironmentModule0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.preModuleComments = t7; + _.transitivelyContainsCss = t8; + _.transitivelyContainsExtensions = t9; + _._async_environment$_environment = t10; + _._async_environment$_modulesByVariable = t11; + }, + _EnvironmentModule__EnvironmentModule_closure5: function _EnvironmentModule__EnvironmentModule_closure5() { + }, + _EnvironmentModule__EnvironmentModule_closure6: function _EnvironmentModule__EnvironmentModule_closure6() { + }, + _EnvironmentModule__EnvironmentModule_closure7: function _EnvironmentModule__EnvironmentModule_closure7() { + }, + _EnvironmentModule__EnvironmentModule_closure8: function _EnvironmentModule__EnvironmentModule_closure8() { + }, + _EnvironmentModule__EnvironmentModule_closure9: function _EnvironmentModule__EnvironmentModule_closure9() { + }, + _EnvironmentModule__EnvironmentModule_closure10: function _EnvironmentModule__EnvironmentModule_closure10() { + }, + _EnvironmentModule_couldHaveBeenConfigured_closure0: function _EnvironmentModule_couldHaveBeenConfigured_closure0(t0) { + this.variables = t0; + }, + AsyncImportCache__toImporters(importers, loadPaths, packageConfig) { + var t1, t2, t3, t4, _i, path, _null = null, + sassPath = A.getEnvironmentVariable("SASS_PATH"); + if (A.isBrowser()) { + t1 = A._setArrayType([], type$.JSArray_AsyncImporter_2); + B.JSArray_methods.addAll$1(t1, importers); + return t1; + } + t1 = A._setArrayType([], type$.JSArray_AsyncImporter_2); + B.JSArray_methods.addAll$1(t1, importers); + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + if (sassPath != null) { + t2 = A.isNodeJs() ? self.process : _null; + t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); + t4 = t3.length; + _i = 0; + for (; _i < t4; ++_i) { + path = t3[_i]; + t1.push(new A.FilesystemImporter($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + } + return t1; + }, + AsyncImportCache: function AsyncImportCache(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._async_import_cache$_importers = t0; + _._async_import_cache$_canonicalizeCache = t1; + _._async_import_cache$_perImporterCanonicalizeCache = t2; + _._async_import_cache$_nonCanonicalRelativeUrls = t3; + _._async_import_cache$_importCache = t4; + _._async_import_cache$_resultsCache = t5; + _._async_import_cache$_loadTimes = t6; + }, + AsyncImportCache_canonicalize_closure: function AsyncImportCache_canonicalize_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.baseImporter = t1; + _.resolvedUrl = t2; + _.baseUrl = t3; + _.forImport = t4; + _.key = t5; + _.url = t6; + }, + AsyncImportCache__canonicalize_closure: function AsyncImportCache__canonicalize_closure(t0, t1) { + this.importer = t0; + this.url = t1; + }, + AsyncImportCache_importCanonical_closure: function AsyncImportCache_importCanonical_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + }, + AsyncImportCache_humanize_closure: function AsyncImportCache_humanize_closure(t0) { + this.canonicalUrl = t0; + }, + AsyncImportCache_humanize_closure0: function AsyncImportCache_humanize_closure0() { + }, + AsyncImportCache_humanize_closure1: function AsyncImportCache_humanize_closure1() { + }, + AsyncImportCache_humanize_closure2: function AsyncImportCache_humanize_closure2(t0) { + this.canonicalUrl = t0; + }, + AsyncBuiltInCallable$mixin($name, parameters, callback, acceptsContent, url) { + return new A.AsyncBuiltInCallable($name, A.ScssParser$("@mixin " + $name + "(" + parameters + ") {", false, url).parseParameterList$0(), new A.AsyncBuiltInCallable$mixin_closure(callback), false); + }, + AsyncBuiltInCallable: function AsyncBuiltInCallable(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _._parameters = t1; + _._async_built_in$_callback = t2; + _.acceptsContent = t3; + }, + AsyncBuiltInCallable$mixin_closure: function AsyncBuiltInCallable$mixin_closure(t0) { + this.callback = t0; + }, + AsyncBuiltInCallable_withDeprecationWarning_closure: function AsyncBuiltInCallable_withDeprecationWarning_closure(t0, t1, t2) { + this.$this = t0; + this.module = t1; + this.newName = t2; + }, + BuiltInCallable$function($name, parameters, callback, url) { + return new A.BuiltInCallable($name, A._setArrayType([new A._Record_2(A.ScssParser$("@function " + $name + "(" + parameters + ") {", false, url).parseParameterList$0(), callback)], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value), false); + }, + BuiltInCallable$mixin($name, parameters, callback, acceptsContent, url) { + return new A.BuiltInCallable($name, A._setArrayType([new A._Record_2(A.ScssParser$("@mixin " + $name + "(" + parameters + ") {", false, url).parseParameterList$0(), new A.BuiltInCallable$mixin_closure(callback))], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value), acceptsContent); + }, + BuiltInCallable$overloadedFunction($name, overloads) { + var t2, t3, t4, t5, t6, t7, args, callback, + t1 = A._setArrayType([], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value); + for (t2 = type$.String, t3 = A.MapExtensions_get_pairs(overloads, t2, type$.Value_Function_List_Value), t3 = t3.get$iterator(t3), t4 = "@function " + $name + "(", t5 = type$.FileSpan, t6 = type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span; t3.moveNext$0();) { + t7 = t3.get$current(t3); + args = t7._0; + callback = t7._1; + t1.push(new A._Record_2(new A.ScssParser(false, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5), A._setArrayType([], t6), A.SpanScanner$(t4 + args + ") {", null), null).parseParameterList$0(), callback)); + } + return new A.BuiltInCallable($name, t1, false); + }, + BuiltInCallable: function BuiltInCallable(t0, t1, t2) { + this.name = t0; + this._overloads = t1; + this.acceptsContent = t2; + }, + BuiltInCallable$mixin_closure: function BuiltInCallable$mixin_closure(t0) { + this.callback = t0; + }, + BuiltInCallable_withDeprecationWarning_closure: function BuiltInCallable_withDeprecationWarning_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.module = t2; + _.newName = t3; + }, + PlainCssCallable: function PlainCssCallable(t0) { + this.name = t0; + }, + UserDefinedCallable: function UserDefinedCallable(t0, t1, t2, t3) { + var _ = this; + _.declaration = t0; + _.environment = t1; + _.inDependency = t2; + _.$ti = t3; + }, + _compileStylesheet(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var serializeResult = A.serialize(A._EvaluateVisitor$(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet)._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, true), + resultSourceMap = serializeResult._1; + if (resultSourceMap != null) + A.mapInPlace(resultSourceMap.urls, new A._compileStylesheet_closure(stylesheet, importCache)); + return new A.CompileResult(serializeResult); + }, + _compileStylesheet_closure: function _compileStylesheet_closure(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + CompileResult: function CompileResult(t0) { + this._serialize = t0; + }, + Configuration: function Configuration(t0, t1) { + this._configuration$_values = t0; + this.__originalConfiguration = t1; + }, + ExplicitConfiguration: function ExplicitConfiguration(t0, t1, t2) { + this.nodeWithSpan = t0; + this._configuration$_values = t1; + this.__originalConfiguration = t2; + }, + ConfiguredValue: function ConfiguredValue(t0, t1, t2) { + this.value = t0; + this.configurationSpan = t1; + this.assignmentNode = t2; + }, + Deprecation_fromId(id) { + return A.IterableExtension_firstWhereOrNull(B.List_bLL, new A.Deprecation_fromId_closure(id)); + }, + Deprecation_forVersion(version) { + var t2, _i, deprecation, $self, t3, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); + for (t2 = A.VersionRange_VersionRange(true, version).get$allows(), _i = 0; _i < 31; ++_i) { + deprecation = B.List_bLL[_i]; + $self = deprecation._deprecatedIn; + t3 = $self == null ? null : A.Version___parse_tearOff($self); + t3 = t3 == null ? null : t2.call$1(t3); + if (t3 == null ? false : t3) { + $self = deprecation._obsoleteIn; + if ($self == null) + t3 = null; + else + t3 = A.Version___parse_tearOff($self); + t3 = t3 == null; + } else + t3 = false; + if (t3) + t1.add$1(0, deprecation); + } + return t1; + }, + Deprecation: function Deprecation(t0, t1, t2, t3, t4) { + var _ = this; + _.id = t0; + _._deprecatedIn = t1; + _._obsoleteIn = t2; + _.index = t3; + _._name = t4; + }, + Deprecation_fromId_closure: function Deprecation_fromId_closure(t0) { + this.id = t0; + }, + Environment$() { + var t1 = type$.String, + t2 = type$.Module_Callable, + t3 = type$.AstNode, + t4 = type$.int, + t5 = type$.Callable, + t6 = type$.JSArray_Map_String_Callable; + return new A.Environment(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_Callable), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value)], type$.JSArray_Map_String_Value), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null, A.LinkedHashSet_LinkedHashSet$_empty(t1)); + }, + Environment$_(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content, _configurableVariables) { + var t1 = type$.String, + t2 = type$.int; + return new A.Environment(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content, _configurableVariables); + }, + _EnvironmentModule__EnvironmentModule(environment, css, preModuleComments, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6, module, result, t7; + if (forwarded == null) + forwarded = B.Set_empty0; + t1 = type$.dynamic; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = type$.Module_Callable, t3 = type$.List_CssComment, t4 = A.MapExtensions_get_pairs(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment; t4.moveNext$0();) { + t6 = t4.get$current(t4); + module = t6._0; + result = A.List_List$from(t6._1, false, t5); + result.$flags = 3; + t1.$indexSet(0, module, result); + } + t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); + t2 = A._EnvironmentModule__makeModulesByVariable(forwarded); + t3 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure(), type$.Map_String_Value), type$.Value); + t4 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure0(), type$.Map_String_AstNode), type$.AstNode); + t5 = type$.Map_String_Callable; + t6 = type$.Callable; + t7 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure1(), t5), t6); + t6 = A._EnvironmentModule__memberMap(B.JSArray_methods.get$first(environment._mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure2(), t5), t6); + t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._allModules, new A._EnvironmentModule__EnvironmentModule_closure3()); + return A._EnvironmentModule$_(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._allModules, new A._EnvironmentModule__EnvironmentModule_closure4())); + }, + _EnvironmentModule__makeModulesByVariable(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty0; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_Callable); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule) { + for (t3 = t2._modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll(modulesByVariable, t5.get$keys(t5), t4); + } + t3 = B.JSArray_methods.get$first(t2._environment$_environment._variables); + A.setAll(modulesByVariable, t3.get$keys(t3), t2); + } else { + t3 = t2.get$variables(); + A.setAll(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView(localMap, $V._eval$1("PublicMemberMapView<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$(t1, type$.String, $V); + }, + _EnvironmentModule$_(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule(_environment._allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + Environment: function Environment(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._environment$_modules = t0; + _._namespaceNodes = t1; + _._globalModules = t2; + _._importedModules = t3; + _._forwardedModules = t4; + _._nestedForwardedModules = t5; + _._allModules = t6; + _._variables = t7; + _._variableNodes = t8; + _._variableIndices = t9; + _._functions = t10; + _._functionIndices = t11; + _._mixins = t12; + _._mixinIndices = t13; + _._content = t14; + _._configurableVariables = t15; + _._inMixin = false; + _._inSemiGlobalScope = true; + _._lastVariableIndex = _._lastVariableName = null; + }, + Environment__getVariableFromGlobalModule_closure: function Environment__getVariableFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment_setVariable_closure: function Environment_setVariable_closure(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment_setVariable_closure0: function Environment_setVariable_closure0(t0) { + this.name = t0; + }, + Environment_setVariable_closure1: function Environment_setVariable_closure1(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment__getFunctionFromGlobalModule_closure: function Environment__getFunctionFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment__getMixinFromGlobalModule_closure: function Environment__getMixinFromGlobalModule_closure(t0) { + this.name = t0; + }, + Environment_toModule_closure: function Environment_toModule_closure() { + }, + Environment_toDummyModule_closure: function Environment_toDummyModule_closure() { + }, + _EnvironmentModule: function _EnvironmentModule(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.preModuleComments = t7; + _.transitivelyContainsCss = t8; + _.transitivelyContainsExtensions = t9; + _._environment$_environment = t10; + _._modulesByVariable = t11; + }, + _EnvironmentModule__EnvironmentModule_closure: function _EnvironmentModule__EnvironmentModule_closure() { + }, + _EnvironmentModule__EnvironmentModule_closure0: function _EnvironmentModule__EnvironmentModule_closure0() { + }, + _EnvironmentModule__EnvironmentModule_closure1: function _EnvironmentModule__EnvironmentModule_closure1() { + }, + _EnvironmentModule__EnvironmentModule_closure2: function _EnvironmentModule__EnvironmentModule_closure2() { + }, + _EnvironmentModule__EnvironmentModule_closure3: function _EnvironmentModule__EnvironmentModule_closure3() { + }, + _EnvironmentModule__EnvironmentModule_closure4: function _EnvironmentModule__EnvironmentModule_closure4() { + }, + _EnvironmentModule_couldHaveBeenConfigured_closure: function _EnvironmentModule_couldHaveBeenConfigured_closure(t0) { + this.variables = t0; + }, + EvaluationContext_currentOrNull() { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); + $label0$0: { + if (_0_0 instanceof A.EvaluationContext) { + t1 = _0_0; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + warn(message) { + var t1, _null = null, + _0_0 = A.EvaluationContext_currentOrNull(); + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.warn$2(0, message, _null); + break $label0$0; + } + B.C_DefaultLogger.internalWarn$4$deprecation$span$trace(message, _null, _null, _null); + t1 = _null; + break $label0$0; + } + return t1; + }, + warnForDeprecation(message, deprecation) { + var t1, + _0_0 = A.EvaluationContext_currentOrNull(); + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.warn$2(0, message, deprecation); + break $label0$0; + } + t1 = A.WarnForDeprecation_warnForDeprecation(B.C_DefaultLogger, deprecation, message, null, null); + break $label0$0; + } + return t1; + }, + EvaluationContext: function EvaluationContext() { + }, + _EvaluationContextLogger: function _EvaluationContextLogger(t0) { + this._evaluation_context$_context = t0; + }, + SassException$(message, span, loadedUrls) { + return new A.SassException(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassException$(message, span, primaryLabel, secondarySpans, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassException(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassRuntimeException$(message, span, trace, loadedUrls) { + return new A.SassRuntimeException(trace, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassRuntimeException$(message, span, primaryLabel, secondarySpans, trace, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassRuntimeException(trace, primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassFormatException$(message, span, loadedUrls) { + return new A.SassFormatException(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassFormatException$(message, span, primaryLabel, secondarySpans, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassFormatException(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassScriptException$(message, argumentName) { + return new A.SassScriptException(argumentName == null ? message : "$" + argumentName + ": " + message); + }, + MultiSpanSassScriptException$(message, primaryLabel, secondarySpans) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassScriptException(primaryLabel, t1, message); + }, + SassException: function SassException(t0, t1, t2) { + this.loadedUrls = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassException: function MultiSpanSassException(t0, t1, t2, t3, t4) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _.loadedUrls = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassRuntimeException: function SassRuntimeException(t0, t1, t2, t3) { + var _ = this; + _.trace = t0; + _.loadedUrls = t1; + _._span_exception$_message = t2; + _._span = t3; + }, + MultiSpanSassRuntimeException: function MultiSpanSassRuntimeException(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.trace = t0; + _.primaryLabel = t1; + _.secondarySpans = t2; + _.loadedUrls = t3; + _._span_exception$_message = t4; + _._span = t5; + }, + SassFormatException: function SassFormatException(t0, t1, t2) { + this.loadedUrls = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassFormatException: function MultiSpanSassFormatException(t0, t1, t2, t3, t4) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _.loadedUrls = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassScriptException: function SassScriptException(t0) { + this.message = t0; + }, + MultiSpanSassScriptException: function MultiSpanSassScriptException(t0, t1, t2) { + this.primaryLabel = t0; + this.secondarySpans = t1; + this.message = t2; + }, + compileStylesheet(options, graph, source, destination, ifModified) { + return A.compileStylesheet$body(options, graph, source, destination, ifModified); + }, + compileStylesheet$body(options, graph, source, destination, ifModified) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_int_and_String_and_nullable_String), + $async$returnValue, $async$handler = 2, $async$errorStack = [], error, stackTrace, message, error0, stackTrace0, path, message0, exception, t1, $async$exception; + var $async$compileStylesheet = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(A._compileStylesheetWithoutErrorHandling(options, graph, source, destination, ifModified), $async$compileStylesheet); + case 7: + // returning from await. + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + if (destination != null && !options.get$emitErrorCss()) + A._tryDelete(destination); + message = J.toString$1$color$(error, options.get$color()); + if (A._asBool(options._options.$index(0, "trace"))) { + t1 = A.getTrace(error); + if (t1 == null) + t1 = stackTrace; + } else + t1 = null; + $async$returnValue = A._getErrorWithStackTrace(65, message, t1); + // goto return + $async$goto = 1; + break; + } else if (t1 instanceof A.FileSystemException) { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + path = error0.path; + message0 = path == null ? error0.message : "Error reading " + $.$get$context().relative$2$from(path, null) + ": " + error0.message + "."; + if (A._asBool(options._options.$index(0, "trace"))) { + t1 = A.getTrace(error0); + if (t1 == null) + t1 = stackTrace0; + } else + t1 = null; + $async$returnValue = A._getErrorWithStackTrace(66, message0, t1); + // goto return + $async$goto = 1; + break; + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$compileStylesheet, $async$completer); + }, + _compileStylesheetWithoutErrorHandling(options, graph, source, destination, ifModified) { + return A._compileStylesheetWithoutErrorHandling$body(options, graph, source, destination, ifModified); + }, + _compileStylesheetWithoutErrorHandling$body(options, graph, source, destination, ifModified) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$errorStack = [], syntax, result, importCache, error, t1, exception, t2, t3, t4, t5, t6, t7, t8, t9, t10, result0, t11, t12, t13, t14, logger, stylesheet, _0_0, t0, css, buffer, sourceName, destinationName, nowStr, timestamp, importer, $async$exception; + var $async$_compileStylesheetWithoutErrorHandling = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + importer = $.$get$FilesystemImporter_cwd(); + if (ifModified) + try { + t1 = false; + if (source != null) + if (destination != null) { + t1 = A.absolute(source, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + t1 = !graph.modifiedSince$3($.$get$context().toUri$1(t1), A.modificationTime(destination), importer); + } + if (t1) { + // goto return + $async$goto = 1; + break; + } + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + syntax = null; + if (A._asBoolQ(options._ifParsed$1("indented")) === true) + syntax = B.Syntax_Sass_1_sass; + else if (source != null) + syntax = A.Syntax_forPath(source); + else + syntax = B.Syntax_SCSS_0_scss; + result = null; + $async$handler = 4; + t1 = options._options; + $async$goto = A._asBool(t1.$index(0, "async")) ? 7 : 9; + break; + case 7: + // then + t2 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl; + t3 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport; + t4 = type$.Uri; + importCache = new A.AsyncImportCache(A.AsyncImportCache__toImporters(options.get$pkgImporters(), type$.List_String._as(t1.$index(0, "load-path")), null), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.nullable_Stylesheet), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.ImporterResult), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.DateTime)); + $async$goto = source == null ? 10 : 12; + break; + case 10: + // then + $async$goto = 13; + return A._asyncAwait(A.readStdin(), $async$_compileStylesheetWithoutErrorHandling); + case 13: + // returning from await. + t2 = $async$result; + t3 = syntax; + t4 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t5 = $.$get$FilesystemImporter_cwd(); + t6 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t7 = A._asBool(t1.$index(0, "quiet-deps")); + t8 = A._asBool(t1.$index(0, "verbose")); + t9 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + t10 = options.get$silenceDeprecations(0); + $async$goto = 14; + return A._asyncAwait(A.compileStringAsync(t2, t1, options.get$fatalDeprecations(0), options.get$futureDeprecations(0), importCache, t5, t4, t7, t10, t9, t6, t3, t8), $async$_compileStylesheetWithoutErrorHandling); + case 14: + // returning from await. + result0 = $async$result; + // goto join + $async$goto = 11; + break; + case 12: + // else + t2 = syntax; + t3 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t4 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t5 = A._asBool(t1.$index(0, "quiet-deps")); + t6 = A._asBool(t1.$index(0, "verbose")); + t7 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + t8 = options.get$silenceDeprecations(0); + $async$goto = 15; + return A._asyncAwait(A.compileAsync(source, t1, options.get$fatalDeprecations(0), options.get$futureDeprecations(0), importCache, t3, t5, t8, t7, t4, t2, t6), $async$_compileStylesheetWithoutErrorHandling); + case 15: + // returning from await. + result0 = $async$result; + case 11: + // join + result = result0; + // goto join + $async$goto = 8; + break; + case 9: + // else + graph.reloadAllModified$0(); + $async$goto = source == null ? 16 : 18; + break; + case 16: + // then + $async$goto = 19; + return A._asyncAwait(A.readStdin(), $async$_compileStylesheetWithoutErrorHandling); + case 19: + // returning from await. + t2 = $async$result; + t3 = syntax; + t4 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + t5 = $.$get$FilesystemImporter_cwd(); + t6 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t7 = A._asBool(t1.$index(0, "quiet-deps")); + t8 = A._asBool(t1.$index(0, "verbose")); + t9 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + t10 = options.get$silenceDeprecations(0); + t11 = options.get$fatalDeprecations(0); + t12 = options.get$futureDeprecations(0); + t13 = type$.Deprecation; + t14 = A.LinkedHashSet_LinkedHashSet$_empty(t13); + t14.addAll$1(0, t10); + t10 = A.LinkedHashSet_LinkedHashSet$_empty(t13); + t10.addAll$1(0, t11); + t11 = A.LinkedHashSet_LinkedHashSet$_empty(t13); + t11.addAll$1(0, t12); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t13, type$.int), t4, t14, t10, t11, !t8); + logger.validate$0(); + stylesheet = A.Stylesheet_Stylesheet$parse(t2, t3 == null ? B.Syntax_SCSS_0_scss : t3, false, null); + t2 = stylesheet.span; + _0_0 = t2.get$sourceUrl(t2); + if (type$.Uri._is(_0_0)) + t3 = "" === _0_0.get$scheme(); + else + t3 = false; + if (t3) + A.WarnForDeprecation_warnForDeprecation(logger, B.Deprecation_r8S, "Passing a relative `url` argument (" + A.S(t2.get$sourceUrl(t2)) + string$.x29x20to_cm, null, null); + result0 = A._compileStylesheet(stylesheet, logger, graph.importCache, null, t5, null, t6, true, null, null, t7, t9, t1); + logger.summarize$1$js(false); + // goto join + $async$goto = 17; + break; + case 18: + // else + t2 = syntax; + t3 = A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color()); + importCache = graph.importCache; + t4 = J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0; + t5 = A._asBool(t1.$index(0, "quiet-deps")); + t6 = A._asBool(t1.$index(0, "verbose")); + t7 = options.get$emitSourceMap(); + t1 = A._asBool(t1.$index(0, "charset")); + t8 = options.get$silenceDeprecations(0); + t9 = options.get$fatalDeprecations(0); + t10 = options.get$futureDeprecations(0); + t11 = type$.Deprecation; + t12 = A.LinkedHashSet_LinkedHashSet$_empty(t11); + t12.addAll$1(0, t8); + t8 = A.LinkedHashSet_LinkedHashSet$_empty(t11); + t8.addAll$1(0, t9); + t9 = A.LinkedHashSet_LinkedHashSet$_empty(t11); + t9.addAll$1(0, t10); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(t11, type$.int), t3, t12, t8, t9, !t6); + logger.validate$0(); + t3 = t2 == null || t2 === A.Syntax_forPath(source); + if (t3) { + t2 = $.$get$FilesystemImporter_cwd(); + t3 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t3 == null ? null : J.get$platform$x(t3), "win32")) { + t3 = A.isNodeJs() ? self.process : null; + t3 = J.$eq$(t3 == null ? null : J.get$platform$x(t3), "darwin"); + } else + t3 = true; + if (t3) { + t3 = A.absolute(source, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + t6 = $.$get$context(); + t3 = A._realCasePath(t6.normalize$1(t3)); + } else { + t3 = $.$get$context(); + t6 = t3.canonicalize$1(0, source); + t0 = t6; + t6 = t3; + t3 = t0; + } + t6 = importCache.importCanonical$3$originalUrl(t2, t6.toUri$1(t3), t6.toUri$1(source)); + t6.toString; + stylesheet = t6; + } else { + t3 = A.readFile(source); + if (t2 == null) + t2 = A.Syntax_forPath(source); + stylesheet = A.Stylesheet_Stylesheet$parse(t3, t2, false, $.$get$context().toUri$1(source)); + } + result0 = A._compileStylesheet(stylesheet, logger, importCache, null, $.$get$FilesystemImporter_cwd(), null, t4, true, null, null, t5, t7, t1); + logger.summarize$1$js(false); + case 17: + // join + result = result0; + case 8: + // join + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + if (options.get$emitErrorCss()) + if (destination == null) + A.print(error.toCssString$0()); + else { + A.ensureDir($.$get$context().dirname$1(destination)); + A.writeFile(destination, error.toCssString$0() + "\n"); + } + throw $async$exception; + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + css = result._serialize._0 + A._writeSourceMap(options, result._serialize._1, destination); + if (destination == null) { + if (css.length !== 0) + A.print(css); + } else { + A.ensureDir($.$get$context().dirname$1(destination)); + A.writeFile(destination, css + "\n"); + } + t1 = options._options; + if (!A._asBool(t1.$index(0, "quiet"))) + t1 = !A._asBool(t1.$index(0, "update")) && !A._asBool(t1.$index(0, "watch")); + else + t1 = true; + if (t1) { + // goto return + $async$goto = 1; + break; + } + buffer = new A.StringBuffer(""); + if (source == null) + sourceName = "stdin"; + else { + t1 = $.$get$context(); + sourceName = t1.prettyUri$1(t1.toUri$1(source)); + } + destination.toString; + t1 = $.$get$context(); + destinationName = t1.prettyUri$1(t1.toUri$1(destination)); + nowStr = new A.DateTime(Date.now(), 0, false).toString$0(0); + timestamp = B.JSString_methods.substring$2(nowStr, 0, nowStr.length - 7); + t1 = options.get$color() ? buffer._contents = "\x1b[90m" : ""; + t1 = buffer._contents = t1 + ("[" + timestamp + "] "); + if (options.get$color()) + t1 = buffer._contents = t1 + "\x1b[32m"; + t1 = buffer._contents = t1 + ("Compiled " + sourceName + " to " + destinationName + "."); + if (options.get$color()) + t1 = buffer._contents = t1 + "\x1b[0m"; + t2 = A.isNodeJs() ? self.process : null; + if (t2 != null) { + t1 = J.get$stdout$x(t2); + J.write$1$x(t1, buffer.toString$0(0) + "\n"); + } else { + t2 = self.console; + J.log$1$x(t2, t1.charCodeAt(0) == 0 ? t1 : t1); + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_compileStylesheetWithoutErrorHandling, $async$completer); + }, + _writeSourceMap(options, sourceMap, destination) { + var t1, sourceMapText, url, sourceMapPath, t2, escapedUrl; + if (sourceMap == null) + return ""; + if (destination != null) { + t1 = $.$get$context(); + sourceMap.targetUrl = t1.toUri$1(A.ParsedPath_ParsedPath$parse(destination, t1.style).get$basename()).toString$0(0); + } + A.mapInPlace(sourceMap.urls, new A._writeSourceMap_closure(options, destination)); + t1 = options._options; + sourceMapText = B.C_JsonCodec.encode$2$toEncodable(sourceMap.toJson$1$includeSourceContents(A._asBool(t1.$index(0, "embed-sources"))), null); + if (A._asBool(t1.$index(0, "embed-source-map"))) + url = A.Uri_Uri$dataFromString(sourceMapText, B.C_Utf8Codec, "application/json"); + else { + destination.toString; + sourceMapPath = destination + ".map"; + t2 = $.$get$context(); + A.ensureDir(t2.dirname$1(sourceMapPath)); + A.writeFile(sourceMapPath, sourceMapText); + url = t2.toUri$1(t2.relative$2$from(sourceMapPath, t2.dirname$1(destination))); + } + t2 = url.toString$0(0); + escapedUrl = A.stringReplaceAllUnchecked(t2, "*/", "%2A/"); + t1 = (J.$eq$(t1.$index(0, "style"), "compressed") ? B.OutputStyle_1 : B.OutputStyle_0) === B.OutputStyle_1 ? "" : "\n\n"; + return t1 + ("/*# sourceMappingURL=" + escapedUrl + " */"); + }, + _tryDelete(path) { + var exception; + try { + A.deleteFile(path); + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + }, + _getErrorWithStackTrace(exitCode, error, stackTrace) { + return new A._Record_3(exitCode, error, stackTrace != null ? B.JSString_methods.trimRight$0(A.Trace_Trace$from(stackTrace).get$terse().toString$0(0)) : null); + }, + _writeSourceMap_closure: function _writeSourceMap_closure(t0, t1) { + this.options = t0; + this.destination = t1; + }, + ExecutableOptions__separator(text) { + var t1 = $.$get$ExecutableOptions__separatorBar(), + t2 = B.JSString_methods.$mul(t1, 3), + t3 = A.hasTerminal() ? "\x1b[1m" : "", + t4 = A.hasTerminal() ? "\x1b[0m" : ""; + return t2 + " " + t3 + text + t4 + " " + B.JSString_methods.$mul(t1, 35 - text.length); + }, + ExecutableOptions__fail(message) { + return A.throwExpression(A.UsageException$(message)); + }, + ExecutableOptions_ExecutableOptions$parse(args) { + var options, error, t1, t2, exception; + try { + t1 = $.$get$ExecutableOptions__parser(); + t2 = A.ListQueue$(type$.String); + t2.addAll$1(0, args); + t2 = A.Parser$(null, t1, t2, null, null).parse$0(0); + if (t2.wasParsed$1("poll") && !A._asBool(t2.$index(0, "watch"))) + A.ExecutableOptions__fail("--poll may not be passed without --watch."); + options = new A.ExecutableOptions(t2); + if (A._asBool(options._options.$index(0, "help"))) + A.ExecutableOptions__fail("Compile Sass to CSS."); + return options; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + error = t1; + A.ExecutableOptions__fail(J.get$message$x(error)); + } else + throw exception; + } + }, + UsageException$(message) { + return new A.UsageException(message); + }, + ExecutableOptions: function ExecutableOptions(t0) { + var _ = this; + _._options = t0; + _.__ExecutableOptions_interactive_FI = $; + _._sourcesToDestinations = null; + _.__ExecutableOptions__sourceDirectoriesToDestinations_F = $; + _._fatalDeprecations = null; + }, + ExecutableOptions__parser_closure: function ExecutableOptions__parser_closure() { + }, + ExecutableOptions_interactive_closure: function ExecutableOptions_interactive_closure(t0) { + this.$this = t0; + }, + ExecutableOptions_emitErrorCss_closure: function ExecutableOptions_emitErrorCss_closure() { + }, + ExecutableOptions_fatalDeprecations_closure: function ExecutableOptions_fatalDeprecations_closure(t0) { + this.$this = t0; + }, + UsageException: function UsageException(t0) { + this.message = t0; + }, + repl(options) { + return A.repl$body(options); + }, + repl$body(options) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$handler = 1, $async$errorStack = [], $async$next = [], repl, trackingLogger, warn, evaluator, line, node, warnings, _1_0, node0, warnings0, _2_0, node1, warnings1, _3_0, error, stackTrace, logger, t4, t5, t6, t7, t8, t9, line0, toZone, exception, t1, t2, t3, repl0; + var $async$repl = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], type$.JSArray_String); + t2 = B.JSString_methods.$mul(" ", 3); + t3 = $.$get$alwaysValid(); + repl0 = new A.Repl(">> ", t2, t3, t1); + repl0.__Repl__adapter_A = new A.ReplAdapter(repl0); + repl = repl0; + t1 = options._options; + trackingLogger = new A.TrackingLogger(A._asBool(t1.$index(0, "quiet")) ? $.$get$Logger_quiet() : new A.StderrLogger(options.get$color())); + logger = new A.DeprecationProcessingLogger(A.LinkedHashMap_LinkedHashMap$_empty(type$.Deprecation, type$.int), trackingLogger, options.get$silenceDeprecations(0), options.get$fatalDeprecations(0), options.get$futureDeprecations(0), !A._asBool(t1.$index(0, "verbose"))); + logger.validate$0(); + warn = new A.repl_warn(logger); + t2 = $.$get$FilesystemImporter_cwd(); + evaluator = new A.Evaluator(A._EvaluateVisitor$(null, A.ImportCache$(options.get$pkgImporters(), type$.List_String._as(t1.$index(0, "load-path"))), logger, null, false, false), t2); + t2 = repl.__Repl__adapter_A; + t2 === $ && A.throwUnnamedLateFieldNI(); + t2 = new A._StreamIterator(A.checkNotNullable(t2.runAsync$0(), "stream", type$.Object)); + $async$handler = 2; + t1 = type$.String, t3 = type$.FileSpan, t4 = type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span, t5 = type$.Expression; + case 5: + // for condition + $async$goto = 7; + return A._asyncAwait(t2.moveNext$0(), $async$repl); + case 7: + // returning from await. + if (!$async$result) { + // goto after for + $async$goto = 6; + break; + } + line = t2.get$current(0); + if (J.trim$0$s(line).length === 0) { + // goto for condition + $async$goto = 5; + break; + } + try { + if (J.startsWith$1$s(line, "@")) { + node = null; + warnings = null; + _1_0 = new A.ScssParser(false, A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A._setArrayType([], t4), A.SpanScanner$(line, null), null).parseUseRule$0(); + node = _1_0._0; + warnings = _1_0._1; + J.forEach$1$ax(warnings, warn); + t6 = evaluator; + t7 = node; + t6._visitor.runStatement$2(t6._importer, t7); + // goto for condition + $async$goto = 5; + break; + } + if (new A.Parser(A.SpanScanner$(line, null), null)._isVariableDeclarationLike$0()) { + node0 = null; + warnings0 = null; + _2_0 = new A.ScssParser(false, A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A._setArrayType([], t4), A.SpanScanner$(line, null), null).parseVariableDeclaration$0(); + node0 = _2_0._0; + warnings0 = _2_0._1; + J.forEach$1$ax(warnings0, warn); + t6 = evaluator; + t7 = node0; + t6._visitor.runStatement$2(t6._importer, t7); + t7 = evaluator; + t6 = node0.name; + t8 = node0.span; + t9 = node0.namespace; + line0 = t7._visitor.runExpression$2(t7._importer, new A.VariableExpression(t9, t6, t8)).toString$0(0); + toZone = $._printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } else { + node1 = null; + warnings1 = null; + t6 = A._setArrayType([], t4); + t7 = new A.ScssParser(false, A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), t6, A.SpanScanner$(line, null), null); + _3_0 = new A._Record_2(t7._parseSingleProduction$1$1(t7.get$_expression(), t5), t6); + node1 = _3_0._0; + warnings1 = _3_0._1; + J.forEach$1$ax(warnings1, warn); + t6 = evaluator; + t7 = node1; + line0 = t6._visitor.runExpression$2(t6._importer, t7).toString$0(0); + toZone = $._printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } + } catch (exception) { + t6 = A.unwrapException(exception); + if (t6 instanceof A.SassException) { + error = t6; + stackTrace = A.getTraceFromException(exception); + t6 = error; + t7 = typeof t6 != "string"; + if (!t7 || typeof t6 == "number" || A._isBool(t6)) + t6 = null; + else { + t8 = $.$get$_traces(); + if (A._isBool(t6) || typeof t6 == "number" || !t7 || t6 instanceof A._Record) + A.Expando__badExpandoKey(t6); + t6 = t8._jsWeakMap.get(t6); + } + if (t6 == null) + t6 = stackTrace; + A._logError(error, t6, line, repl, options, trackingLogger); + } else + throw exception; + } + // goto for condition + $async$goto = 5; + break; + case 6: + // after for + $async$next.push(4); + // goto finally + $async$goto = 3; + break; + case 2: + // uncaught + $async$next = [1]; + case 3: + // finally + $async$handler = 1; + $async$goto = 8; + return A._asyncAwait(t2.cancel$0(), $async$repl); + case 8: + // returning from await. + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 4: + // after finally + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$repl, $async$completer); + }, + _logError(error, stackTrace, line, repl, options, logger) { + var t2, spacesBeforeError, t3, + t1 = A.SourceSpanException.prototype.get$span.call(error, 0); + if (t1.get$sourceUrl(t1) == null) + if (!A._asBool(options._options.$index(0, "quiet"))) + t1 = logger._emittedDebug || logger._emittedWarning; + else + t1 = false; + else + t1 = true; + if (t1) { + A.print(error.toString$1$color(0, options.get$color())); + return; + } + t1 = options.get$color() ? "\x1b[31m" : ""; + t2 = A.SourceSpanException.prototype.get$span.call(error, 0); + t2 = t2.get$start(t2); + spacesBeforeError = repl.prompt.length + t2.file.getColumn$1(t2.offset); + if (options.get$color()) { + t2 = A.SourceSpanException.prototype.get$span.call(error, 0); + t2 = t2.get$start(t2); + t2 = t2.file.getColumn$1(t2.offset) < line.length; + } else + t2 = false; + if (t2) + t1 = t1 + ("\x1b[1F\x1b[" + spacesBeforeError + "C") + (A.SourceSpanException.prototype.get$span.call(error, 0).get$text() + "\n"); + t2 = B.JSString_methods.$mul(" ", spacesBeforeError); + t3 = A.SourceSpanException.prototype.get$span.call(error, 0); + t3 = t1 + t2 + (B.JSString_methods.$mul("^", Math.max(1, t3.get$length(t3))) + "\n"); + t1 = options.get$color() ? t3 + "\x1b[0m" : t3; + t1 += "Error: " + error._span_exception$_message + "\n"; + if (A._asBool(options._options.$index(0, "trace"))) + t1 += A.Trace_Trace$from(stackTrace).get$terse().toString$0(0); + A.print(B.JSString_methods.trimRight$0(t1.charCodeAt(0) == 0 ? t1 : t1)); + }, + repl_warn: function repl_warn(t0) { + this.logger = t0; + }, + watch(options, graph) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, t1, t2, t3, t4, t5, t6, dirWatcher, sourcesToDestinations, t7, t8, t0; + var $async$watch = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + options._ensureSources$0(); + t1 = options.__ExecutableOptions__sourceDirectoriesToDestinations_F; + t1 === $ && A.throwUnnamedLateFieldNI(); + t2 = type$.String; + t1 = t1.cast$2$0(0, t2, t2); + t1 = A.List_List$_of(t1.get$keys(t1), t2); + for (options._ensureSources$0(), t3 = options._sourcesToDestinations.cast$2$0(0, t2, t2), t3 = t3.get$keys(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t1.push($.$get$context().dirname$1(t4)); + } + t3 = options._options; + B.JSArray_methods.addAll$1(t1, type$.List_String._as(t3.$index(0, "load-path"))); + t4 = A._asBool(t3.$index(0, "poll")); + t5 = type$.Stream_WatchEvent; + t6 = A.PathMap__create(null, t5); + t5 = new A.StreamGroup(B._StreamGroupState_dormant, A.LinkedHashMap_LinkedHashMap$_empty(t5, type$.nullable_StreamSubscription_WatchEvent), type$.StreamGroup_WatchEvent); + t5.__StreamGroup__controller_A = A.StreamController_StreamController(t5.get$_onCancel(), t5.get$_onListen(), t5.get$_onPause(), t5.get$_onResume(), true, type$.WatchEvent); + dirWatcher = new A.MultiDirWatcher(new A.PathMap(t6, type$.PathMap_Stream_WatchEvent), t5, t4); + $async$goto = 3; + return A._asyncAwait(A.Future_wait(new A.MappedListIterable(t1, new A.watch_closure(dirWatcher), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Future<~>>")), false, type$.void), $async$watch); + case 3: + // returning from await. + options._ensureSources$0(); + sourcesToDestinations = options._sourcesToDestinations.cast$2$0(0, t2, t2); + for (t1 = sourcesToDestinations.get$keys(sourcesToDestinations), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t4 = t1.get$current(t1); + t6 = $.$get$FilesystemImporter_cwd(); + t7 = self.process; + if (t7 == null) + t7 = null; + else { + t7 = J.get$release$x(t7); + t7 = t7 == null ? null : J.get$name$x(t7); + } + t7 = J.$eq$(t7, "node") ? self.process : null; + if (!J.$eq$(t7 == null ? null : J.get$platform$x(t7), "win32")) { + t7 = self.process; + if (t7 == null) + t7 = null; + else { + t7 = J.get$release$x(t7); + t7 = t7 == null ? null : J.get$name$x(t7); + } + t7 = J.$eq$(t7, "node") ? self.process : null; + t7 = J.$eq$(t7 == null ? null : J.get$platform$x(t7), "darwin"); + } else + t7 = true; + if (t7) { + t7 = $.$get$context(); + t8 = A._realCasePath(t7.normalize$1(t7.absolute$15(t4, null, null, null, null, null, null, null, null, null, null, null, null, null, null))); + t0 = t8; + t8 = t7; + t7 = t0; + } else { + t7 = $.$get$context(); + t8 = t7.canonicalize$1(0, t4); + t0 = t8; + t8 = t7; + t7 = t0; + } + graph.addCanonical$4$recanonicalize(t6, t8.toUri$1(t7), t8.toUri$1(t4), false); + } + $async$goto = 4; + return A._asyncAwait(A.compileStylesheets(options, graph, sourcesToDestinations, true), $async$watch); + case 4: + // returning from await. + if (!$async$result && A._asBool(t3.$index(0, "stop-on-error"))) { + t1 = t5.__StreamGroup__controller_A; + new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$1(0, null).cancel$0(); + // goto return + $async$goto = 1; + break; + } + A.print("Sass is watching for changes. Press Ctrl-C to stop.\n"); + $async$goto = 5; + return A._asyncAwait(new A._Watcher(options, graph, A.LinkedHashMap_LinkedHashMap$_empty(t2, t2)).watch$1(0, dirWatcher), $async$watch); + case 5: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$watch, $async$completer); + }, + watch_closure: function watch_closure(t0) { + this.dirWatcher = t0; + }, + _Watcher: function _Watcher(t0, t1, t2) { + this._watch$_options = t0; + this._graph = t1; + this._toRecompile = t2; + }, + _Watcher__debounceEvents_closure: function _Watcher__debounceEvents_closure() { + }, + EmptyExtensionStore: function EmptyExtensionStore() { + }, + Extension: function Extension(t0, t1, t2, t3, t4) { + var _ = this; + _.extender = t0; + _.target = t1; + _.mediaContext = t2; + _.isOptional = t3; + _.span = t4; + }, + Extender: function Extender(t0, t1) { + this.selector = t0; + this.isOriginal = t1; + this._extension = null; + }, + ExtensionStore__extendOrReplace(selector, source, targets, mode, span) { + var t1, t2, t3, t4, t5, t6, t7, t8, _i, complex, compound, t9, t10, t11, _i0, simple, t12, _i1, t13, t14, + extender = A.ExtensionStore$_mode(mode); + if (!selector.accept$1(B._IsInvisibleVisitor_true)) + extender._originals.addAll$1(0, selector.components); + for (t1 = targets.components, t2 = t1.length, t3 = source.components, t4 = t3.length, t5 = type$.ComplexSelector, t6 = type$.Extension, t7 = type$.SimpleSelector, t8 = type$.Map_ComplexSelector_Extension, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassScriptException$("Can't extend complex selector " + complex.toString$0(0) + ".", null)); + t9 = A.LinkedHashMap_LinkedHashMap$_empty(t7, t8); + for (t10 = compound.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) { + simple = t10[_i0]; + t12 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t6); + for (_i1 = 0; _i1 < t4; ++_i1) { + complex = t3[_i1]; + complex.get$specificity(); + t13 = new A.Extender(complex, false); + t14 = new A.Extension(t13, simple, null, true, span); + t13._extension = t14; + t12.$indexSet(0, complex, t14); + } + t9.$indexSet(0, simple, t12); + } + selector = extender._extendList$2(selector, t9); + } + return selector; + }, + ExtensionStore$() { + var t1 = type$.SimpleSelector; + return new A.ExtensionStore(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList, type$.List_CssMediaQuery), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector), B.ExtendMode_normal_0_normal); + }, + ExtensionStore$_mode(_mode) { + var t1 = type$.SimpleSelector; + return new A.ExtensionStore(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList, type$.List_CssMediaQuery), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector), _mode); + }, + ExtensionStore: function ExtensionStore(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._selectors = t0; + _._extensions = t1; + _._extensionsByExtender = t2; + _._mediaContexts = t3; + _._sourceSpecificity = t4; + _._originals = t5; + _._mode = t6; + }, + ExtensionStore_extensionsWhereTarget_closure: function ExtensionStore_extensionsWhereTarget_closure() { + }, + ExtensionStore__registerSelector_closure: function ExtensionStore__registerSelector_closure() { + }, + ExtensionStore_addExtension_closure: function ExtensionStore_addExtension_closure() { + }, + ExtensionStore_addExtension_closure0: function ExtensionStore_addExtension_closure0() { + }, + ExtensionStore_addExtension_closure1: function ExtensionStore_addExtension_closure1(t0) { + this.complex = t0; + }, + ExtensionStore__extendExistingExtensions_closure: function ExtensionStore__extendExistingExtensions_closure() { + }, + ExtensionStore__extendExistingExtensions_closure0: function ExtensionStore__extendExistingExtensions_closure0() { + }, + ExtensionStore_addExtensions_closure: function ExtensionStore_addExtensions_closure() { + }, + ExtensionStore__extendComplex_closure: function ExtensionStore__extendComplex_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendComplex__closure: function ExtensionStore__extendComplex__closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendCompound_closure: function ExtensionStore__extendCompound_closure() { + }, + ExtensionStore__extendCompound_closure0: function ExtensionStore__extendCompound_closure0() { + }, + ExtensionStore__extendCompound_closure1: function ExtensionStore__extendCompound_closure1(t0) { + this.original = t0; + }, + ExtensionStore__extendSimple_withoutPseudo: function ExtensionStore__extendSimple_withoutPseudo(t0, t1, t2) { + this.$this = t0; + this.extensions = t1; + this.targetsUsed = t2; + }, + ExtensionStore__extendSimple_closure: function ExtensionStore__extendSimple_closure(t0, t1) { + this.$this = t0; + this.withoutPseudo = t1; + }, + ExtensionStore__extendSimple_closure0: function ExtensionStore__extendSimple_closure0() { + }, + ExtensionStore__extendPseudo_closure: function ExtensionStore__extendPseudo_closure() { + }, + ExtensionStore__extendPseudo_closure0: function ExtensionStore__extendPseudo_closure0() { + }, + ExtensionStore__extendPseudo_closure1: function ExtensionStore__extendPseudo_closure1() { + }, + ExtensionStore__extendPseudo_closure2: function ExtensionStore__extendPseudo_closure2(t0) { + this.pseudo = t0; + }, + ExtensionStore__extendPseudo_closure3: function ExtensionStore__extendPseudo_closure3(t0, t1) { + this.pseudo = t0; + this.selector = t1; + }, + ExtensionStore__trim_closure: function ExtensionStore__trim_closure(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore__trim_closure0: function ExtensionStore__trim_closure0(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore_clone_closure: function ExtensionStore_clone_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.newSelectors = t1; + _.newBoxes = t2; + _.oldToNewSelectors = t3; + _.newMediaContexts = t4; + }, + ExtensionStore_clone__closure: function ExtensionStore_clone__closure(t0) { + this.selector = t0; + }, + unifyComplex(complexes, span) { + var t2, trailingCombinator, leadingCombinator, unifiedBase, t3, t4, _0_6_isSet, _0_6, t5, newLeadingCombinator, base, _1_1, newTrailingCombinator, unifiedBase0, t6, t7, t8, _null = null, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) + return complexes; + for (t2 = t1.get$iterator(complexes), trailingCombinator = _null, leadingCombinator = trailingCombinator, unifiedBase = leadingCombinator; t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.accept$1(B.C__IsUselessVisitor)) + return _null; + t4 = t3.components; + _0_6_isSet = t4.length === 1; + if (_0_6_isSet) { + _0_6 = t3.leadingCombinators; + t5 = _0_6.length === 1; + } else { + _0_6 = _null; + t5 = false; + } + if (t5) { + newLeadingCombinator = (_0_6_isSet ? _0_6 : t3.leadingCombinators)[0]; + if (leadingCombinator == null) + leadingCombinator = newLeadingCombinator; + else if (!(leadingCombinator.$ti._is(newLeadingCombinator) && J.$eq$(newLeadingCombinator.value, leadingCombinator.value))) + return _null; + } + base = B.JSArray_methods.get$last(t4); + _1_1 = base.combinators; + if (_1_1.length === 1) { + newTrailingCombinator = _1_1[0]; + if (trailingCombinator != null) + t3 = !(trailingCombinator.$ti._is(newTrailingCombinator) && J.$eq$(newTrailingCombinator.value, trailingCombinator.value)); + else + t3 = false; + if (t3) + return _null; + trailingCombinator = newTrailingCombinator; + } + unifiedBase0 = base.selector; + if (unifiedBase == null) + unifiedBase = unifiedBase0; + else { + unifiedBase = A.unifyCompound(unifiedBase, unifiedBase0); + if (unifiedBase == null) + return _null; + } + } + t2 = type$.JSArray_ComplexSelector; + t3 = A._setArrayType([], t2); + for (t4 = t1.get$iterator(complexes); t4.moveNext$0();) { + t5 = t4.get$current(t4); + t6 = t5.components; + t7 = t6.length; + if (t7 > 1) { + t8 = t5.leadingCombinators; + t3.push(A.ComplexSelector$(t8, B.JSArray_methods.take$1(t6, t7 - 1), t5.span, t5.lineBreak)); + } + } + t4 = leadingCombinator == null ? B.List_empty0 : A._setArrayType([leadingCombinator], type$.JSArray_CssValue_Combinator); + unifiedBase.toString; + t5 = trailingCombinator == null ? B.List_empty0 : A._setArrayType([trailingCombinator], type$.JSArray_CssValue_Combinator); + base = A.ComplexSelector$(t4, A._setArrayType([new A.ComplexSelectorComponent(unifiedBase, A.List_List$unmodifiable(t5, type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent), span, t1.any$1(complexes, new A.unifyComplex_closure())); + if (t3.length === 0) + t1 = A._setArrayType([base], t2); + else { + t1 = A.List_List$_of(A.IterableExtension_get_exceptLast(t3), type$.ComplexSelector); + t1.push(B.JSArray_methods.get$last(t3).concatenate$2(base, span)); + } + return A.weave(t1, span, false); + }, + unifyCompound(compound1, compound2) { + var t1, t2, pseudoElementFound, _i, simple, unified, + result = compound1.components, + pseudoResult = A._setArrayType([], type$.JSArray_SimpleSelector); + for (t1 = compound2.components, t2 = t1.length, pseudoElementFound = false, _i = 0; _i < t2; ++_i) { + simple = t1[_i]; + if (pseudoElementFound && simple instanceof A.PseudoSelector) { + unified = simple.unify$1(pseudoResult); + if (unified == null) + return null; + pseudoResult = unified; + } else { + pseudoElementFound = B.JSBool_methods.$or(pseudoElementFound, simple instanceof A.PseudoSelector && !simple.isClass); + unified = simple.unify$1(result); + if (unified == null) + return null; + result = unified; + } + } + t1 = A.List_List$_of(result, type$.SimpleSelector); + B.JSArray_methods.addAll$1(t1, pseudoResult); + return A.CompoundSelector$(t1, compound1.span); + }, + unifyUniversalAndElement(selector1, selector2) { + var namespace, $name, t1, + _0_0 = A._namespaceAndName(selector1, "selector1"), + namespace1 = _0_0._0, + name1 = _0_0._1, + _1_0 = A._namespaceAndName(selector2, "selector2"), + namespace2 = _1_0._0, + name2 = _1_0._1; + if (namespace1 == namespace2 || namespace2 === "*") + namespace = namespace1; + else { + if (namespace1 !== "*") + return null; + namespace = namespace2; + } + if (name1 == name2 || name2 == null) + $name = name1; + else { + if (!(name1 == null || name1 === "*")) + return null; + $name = name2; + } + t1 = selector1.span; + return $name == null ? new A.UniversalSelector(namespace, t1) : new A.TypeSelector(new A.QualifiedName($name, namespace), t1); + }, + _namespaceAndName(selector, $name) { + var t1, _0_4; + $label0$0: { + if (selector instanceof A.UniversalSelector) { + t1 = new A._Record_2(selector.namespace, null); + break $label0$0; + } + if (selector instanceof A.TypeSelector) { + _0_4 = selector.name; + t1 = new A._Record_2(_0_4.namespace, _0_4.name); + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$value(selector, $name, string$.must_b)); + } + return t1; + }, + weave(complexes, span, forceLineBreak) { + var complex, t2, prefixes, t3, t4, t5, t6, i, t7, t8, _i, t9, t10, _i0, parentPrefix, t11, t12, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) { + complex = t1.$index(complexes, 0); + if (!forceLineBreak || complex.lineBreak) + return complexes; + return A._setArrayType([A.ComplexSelector$(complex.leadingCombinators, complex.components, complex.span, true)], type$.JSArray_ComplexSelector); + } + t2 = type$.JSArray_ComplexSelector; + prefixes = A._setArrayType([t1.get$first(complexes)], t2); + for (t1 = t1.skip$1(complexes, 1), t3 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t3._eval$1("ListIterator")), t4 = type$.ComplexSelectorComponent, t3 = t3._eval$1("ListIterable.E"); t1.moveNext$0();) { + t5 = t1.__internal$_current; + if (t5 == null) + t5 = t3._as(t5); + t6 = t5.components; + if (t6.length === 1) { + for (i = 0; i < prefixes.length; ++i) + prefixes[i] = prefixes[i].concatenate$3$forceLineBreak(t5, span, forceLineBreak); + continue; + } + t7 = A._setArrayType([], t2); + for (t8 = prefixes.length, _i = 0; _i < prefixes.length; prefixes.length === t8 || (0, A.throwConcurrentModificationError)(prefixes), ++_i) { + t9 = A._weaveParents(prefixes[_i], t5, span); + if (t9 == null) + t9 = B.List_empty1; + t10 = t9.length; + _i0 = 0; + for (; _i0 < t9.length; t9.length === t10 || (0, A.throwConcurrentModificationError)(t9), ++_i0) { + parentPrefix = t9[_i0]; + t11 = B.JSArray_methods.get$last(t6); + t12 = A.List_List$_of(parentPrefix.components, t4); + t12.push(t11); + t11 = parentPrefix.lineBreak || forceLineBreak; + t7.push(A.ComplexSelector$(parentPrefix.leadingCombinators, t12, span, t11)); + } + } + prefixes = t7; + } + return prefixes; + }, + _weaveParents(prefix, base, span) { + var t1, queue1, queue2, trailingCombinators, _0_1, _0_3, _0_3_isSet, rootish2, t2, rootish1, _0_30, rootish, t3, t0, rootish_case_1, groups1, groups2, lcs, choices, t4, _i, group, t5, t6, t7, _i0, chunk, t8, t9, _null = null, + leadingCombinators = A._mergeLeadingCombinators(prefix.leadingCombinators, base.leadingCombinators); + if (leadingCombinators == null) + return _null; + t1 = type$.ComplexSelectorComponent; + queue1 = A.QueueList_QueueList$from(prefix.components, t1); + queue2 = A.QueueList_QueueList$from(A.IterableExtension_get_exceptLast(base.components), t1); + trailingCombinators = A._mergeTrailingCombinators(queue1, queue2, span, _null); + if (trailingCombinators == null) + return _null; + $label0$0: { + _0_1 = A._firstIfRootish(queue1); + _0_3 = A._firstIfRootish(queue2); + _0_3_isSet = _0_1 != null; + rootish2 = _null; + t2 = false; + if (_0_3_isSet) { + t2 = _0_3 != null; + if (t2) + rootish2 = _0_3; + rootish1 = _0_1; + _0_30 = _0_3; + } else { + rootish1 = _null; + _0_30 = rootish1; + } + if (t2) { + rootish = A.unifyCompound(rootish1.selector, rootish2.selector); + if (rootish == null) + return _null; + t1 = rootish1.combinators; + t2 = rootish1.span; + t3 = type$.CssValue_Combinator; + queue1.addFirst$1(new A.ComplexSelectorComponent(rootish, A.List_List$unmodifiable(t1, t3), t2)); + queue2.addFirst$1(new A.ComplexSelectorComponent(rootish, A.List_List$unmodifiable(rootish2.combinators, t3), t2)); + break $label0$0; + } + t2 = _null; + t3 = false; + if (_0_1 != null) { + if (_0_3_isSet) + t2 = _0_30; + else { + t2 = _0_3; + _0_30 = t2; + _0_3_isSet = true; + } + t2 = t2 == null; + t3 = t2 ? _0_1 : _null; + t0 = t3; + t3 = t2; + t2 = t0; + } + if (!t3) + if (_0_1 == null) { + if (_0_3_isSet) + t3 = _0_30; + else { + t3 = _0_3; + _0_30 = t3; + _0_3_isSet = true; + } + t3 = t3 != null; + if (t3) { + rootish_case_1 = _0_3_isSet ? _0_30 : _0_3; + if (rootish_case_1 == null) + rootish_case_1 = t1._as(rootish_case_1); + t1 = rootish_case_1; + } else + t1 = t2; + t2 = t3; + } else { + t1 = t2; + t2 = false; + } + else { + t1 = t2; + t2 = true; + } + if (t2) { + queue1.addFirst$1(t1); + queue2.addFirst$1(t1); + } + } + groups1 = A._groupSelectors(queue1); + groups2 = A._groupSelectors(queue2); + t1 = type$.List_ComplexSelectorComponent; + lcs = A.longestCommonSubsequence(groups2, groups1, new A._weaveParents_closure(span), t1); + choices = A._setArrayType([], type$.JSArray_List_Iterable_ComplexSelectorComponent); + for (t2 = lcs.length, t3 = type$.JSArray_Iterable_ComplexSelectorComponent, t4 = type$.JSArray_ComplexSelectorComponent, _i = 0; _i < lcs.length; lcs.length === t2 || (0, A.throwConcurrentModificationError)(lcs), ++_i) { + group = lcs[_i]; + t5 = A._setArrayType([], t3); + for (t6 = A._chunks(groups1, groups2, new A._weaveParents_closure0(group), t1), t7 = t6.length, _i0 = 0; _i0 < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i0) { + chunk = t6[_i0]; + t8 = A._setArrayType([], t4); + for (t9 = B.JSArray_methods.get$iterator(chunk); t9.moveNext$0();) + B.JSArray_methods.addAll$1(t8, t9.get$current(0)); + t5.push(t8); + } + choices.push(t5); + choices.push(A._setArrayType([group], t3)); + groups1.removeFirst$0(); + groups2.removeFirst$0(); + } + t2 = A._setArrayType([], t3); + for (t1 = A._chunks(groups1, groups2, new A._weaveParents_closure1(), t1), t3 = t1.length, _i = 0; _i < t1.length; t1.length === t3 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + chunk = t1[_i]; + t5 = A._setArrayType([], t4); + for (t6 = B.JSArray_methods.get$iterator(chunk); t6.moveNext$0();) + B.JSArray_methods.addAll$1(t5, t6.get$current(0)); + t2.push(t5); + } + choices.push(t2); + B.JSArray_methods.addAll$1(choices, trailingCombinators); + t1 = A._setArrayType([], type$.JSArray_ComplexSelector); + for (t2 = J.get$iterator$ax(A.paths(new A.WhereIterable(choices, new A._weaveParents_closure2(), type$.WhereIterable_List_Iterable_ComplexSelectorComponent), type$.Iterable_ComplexSelectorComponent)), t3 = !prefix.lineBreak, t5 = base.lineBreak; t2.moveNext$0();) { + t6 = t2.get$current(t2); + t7 = A._setArrayType([], t4); + for (t6 = J.get$iterator$ax(t6); t6.moveNext$0();) + B.JSArray_methods.addAll$1(t7, t6.get$current(t6)); + t1.push(A.ComplexSelector$(leadingCombinators, t7, span, !t3 || t5)); + } + return t1; + }, + _firstIfRootish(queue) { + var first, t1, t2, _i, simple, t3; + if (queue.get$length(0) >= 1) { + first = queue.$index(0, 0); + for (t1 = first.selector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + simple = t1[_i]; + t3 = false; + if (simple instanceof A.PseudoSelector) + if (simple.isClass) + t3 = $._rootishPseudoClasses.contains$1(0, simple.normalizedName); + if (t3) { + queue.removeFirst$0(); + return first; + } + } + } + return null; + }, + _mergeLeadingCombinators(combinators1, combinators2) { + var t1, _0_7, t2, _0_11_isSet, _0_11, combinators, _null = null; + $label0$0: { + t1 = _null; + _0_7 = _null; + _0_7 = combinators1.length; + t2 = _0_7; + t2 = t2 > 1; + _0_11_isSet = !t2; + _0_11 = _null; + if (_0_11_isSet) { + _0_11 = combinators2.length; + t2 = _0_11; + t2 = t2 > 1; + } else + t2 = true; + if (t2) + break $label0$0; + t2 = _0_7 <= 0; + if (t2) + combinators = combinators2; + else + combinators = t1; + t1 = t2; + if (!t1) { + t1 = false; + if (_0_11_isSet) + t1 = _0_11; + else { + _0_11 = combinators2.length; + t1 = _0_11; + } + t1 = t1 <= 0; + combinators = combinators1; + } else + t1 = true; + if (t1) { + t1 = combinators; + break $label0$0; + } + t1 = B.C_ListEquality.equals$2(0, combinators1, combinators2) ? combinators1 : _null; + break $label0$0; + } + return t1; + }, + _mergeTrailingCombinators(components1, components2, span, result) { + var _0_1, t1, _1_1, t2, t3, _4_1, _4_3, _4_5, _4_4, _4_5_isSet, _4_4_isSet, component1, component2, t4, t5, choices, _2_0, _4_9, _4_6, _4_6_isSet, _4_7, _4_7_isSet, followingComponents, nextComponents, _4_9_isSet, _4_10_isSet, _4_10, next, following, _3_0, _4_4_isSet0, siblingComponents_case_0, siblingComponents_case_1, t6, combinator2, unified, t7, combinatorComponents_case_0, descendantComponents_case_0, t0, combinator_case_1, descendantComponents_case_1, combinatorComponents_case_1, _null = null; + if (result == null) + result = A.QueueList$(_null, type$.List_List_ComplexSelectorComponent); + $label0$0: { + _0_1 = components1.get$length(0); + if (_0_1 >= 1) { + t1 = components1.$index(0, _0_1 - 1).combinators; + break $label0$0; + } + t1 = B.List_empty0; + break $label0$0; + } + $label1$1: { + _1_1 = components2.get$length(0); + if (_1_1 >= 1) { + t2 = components2.$index(0, _1_1 - 1).combinators; + break $label1$1; + } + t2 = B.List_empty0; + break $label1$1; + } + t3 = t1.length; + if (t3 === 0 && t2.length === 0) + return result; + if (t3 > 1 || t2.length > 1) + return _null; + $label2$2: { + t3 = A.IterableExtension_get_firstOrNull(t1); + t3 = t3 == null ? _null : t3.value; + t2 = A.IterableExtension_get_firstOrNull(t2); + t2 = [t3, t2 == null ? _null : t2.value, components1, components2]; + _4_1 = t2[0]; + _4_3 = B.Combinator_98W === _4_1; + t3 = _4_3; + _4_5 = _null; + _4_4 = _null; + if (t3) { + _4_4 = t2[1]; + _4_5 = B.Combinator_98W === _4_4; + t3 = _4_5; + _4_5_isSet = true; + _4_4_isSet = true; + } else { + _4_5_isSet = false; + _4_4_isSet = false; + t3 = false; + } + if (t3) { + component1 = components1.removeLast$0(0); + component2 = components2.removeLast$0(0); + t2 = component1.selector; + t3 = component2.selector; + if (A.compoundIsSuperselector(t2, t3, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + else { + t4 = type$.JSArray_ComplexSelectorComponent; + t5 = type$.JSArray_List_ComplexSelectorComponent; + if (A.compoundIsSuperselector(t3, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component1], t4)], t5)); + else { + choices = A._setArrayType([A._setArrayType([component1, component2], t4), A._setArrayType([component2, component1], t4)], t5); + _2_0 = A.unifyCompound(t2, t3); + if (_2_0 != null) + choices.push(A._setArrayType([new A.ComplexSelectorComponent(_2_0, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator), type$.CssValue_Combinator), span)], t4)); + result.addFirst$1(choices); + } + } + break $label2$2; + } + _4_9 = _null; + _4_6 = _null; + _4_6_isSet = false; + _4_7 = _null; + _4_7_isSet = false; + followingComponents = _null; + nextComponents = _null; + t3 = false; + if (_4_3) { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + _4_9 = B.Combinator_sHB === t4; + t4 = _4_9; + if (t4) { + _4_6 = t2[2]; + _4_7 = t2[3]; + nextComponents = _4_7; + followingComponents = _4_6; + _4_6_isSet = true; + _4_7_isSet = true; + t3 = true; + } + _4_9_isSet = true; + } else + _4_9_isSet = false; + _4_10_isSet = !t3; + _4_10 = _null; + t3 = true; + if (_4_10_isSet) { + _4_10 = B.Combinator_sHB === _4_1; + t4 = _4_10; + if (t4) { + if (_4_5_isSet) + t4 = _4_5; + else { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + _4_5 = B.Combinator_98W === t4; + t4 = _4_5; + _4_5_isSet = true; + } + if (t4) { + if (_4_6_isSet) + nextComponents = _4_6; + else { + _4_6 = t2[2]; + nextComponents = _4_6; + _4_6_isSet = true; + } + if (_4_7_isSet) + followingComponents = _4_7; + else { + _4_7 = t2[3]; + followingComponents = _4_7; + _4_7_isSet = true; + } + } else + t3 = false; + } else + t3 = false; + } + if (t3) { + next = nextComponents.removeLast$0(0); + following = followingComponents.removeLast$0(0); + t1 = following.selector; + t2 = next.selector; + t3 = type$.JSArray_ComplexSelectorComponent; + t4 = type$.JSArray_List_ComplexSelectorComponent; + if (A.compoundIsSuperselector(t1, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([next], t3)], t4)); + else { + t4 = A._setArrayType([A._setArrayType([following, next], t3)], t4); + _3_0 = A.unifyCompound(t1, t2); + if (_3_0 != null) + t4.push(A._setArrayType([new A.ComplexSelectorComponent(_3_0, A.List_List$unmodifiable(next.combinators, type$.CssValue_Combinator), span)], t3)); + result.addFirst$1(t4); + } + break $label2$2; + } + t3 = _null; + t4 = false; + if (B.Combinator_iUF === _4_1) { + _4_4_isSet0 = true; + if (_4_9_isSet) + t5 = _4_9; + else { + if (_4_4_isSet) + t5 = _4_4; + else { + _4_4 = t2[1]; + t5 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + _4_9 = B.Combinator_sHB === t5; + t5 = _4_9; + } + if (!t5) + if (_4_5_isSet) + t5 = _4_5; + else { + if (_4_4_isSet) + t5 = _4_4; + else { + _4_4 = t2[1]; + t5 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + _4_5 = B.Combinator_98W === t5; + t5 = _4_5; + } + else + t5 = true; + if (t5) { + if (_4_7_isSet) + siblingComponents_case_0 = _4_7; + else { + _4_7 = t2[3]; + siblingComponents_case_0 = _4_7; + _4_7_isSet = true; + } + t3 = siblingComponents_case_0; + t4 = true; + } + } + if (!t4) { + if (_4_10_isSet) + t4 = _4_10; + else { + _4_10 = B.Combinator_sHB === _4_1; + t4 = _4_10; + } + if (!t4) + t4 = _4_3; + else + t4 = true; + if (t4) { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + t4 = B.Combinator_iUF === t4; + if (t4) { + if (_4_6_isSet) + siblingComponents_case_1 = _4_6; + else { + _4_6 = t2[2]; + siblingComponents_case_1 = _4_6; + _4_6_isSet = true; + } + t3 = siblingComponents_case_1; + } + } else + t4 = false; + } else + t4 = true; + if (t4) { + result.addFirst$1(A._setArrayType([A._setArrayType([t3.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + break $label2$2; + } + t3 = _4_1 == null; + t4 = !t3; + t5 = false; + if (t4) { + _4_4_isSet0 = true; + if (_4_4_isSet) + t6 = _4_4; + else { + _4_4 = t2[1]; + t6 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + if (t6 != null) { + if (_4_4_isSet) + combinator2 = _4_4; + else { + _4_4 = t2[1]; + combinator2 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + t5 = _4_1 === (combinator2 == null ? type$.Combinator._as(combinator2) : combinator2); + } + } + if (t5) { + unified = A.unifyCompound(components1.removeLast$0(0).selector, components2.removeLast$0(0).selector); + if (unified == null) + return _null; + result.addFirst$1(A._setArrayType([A._setArrayType([new A.ComplexSelectorComponent(unified, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator), type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + break $label2$2; + } + t1 = _null; + t5 = _null; + t6 = _null; + t7 = false; + if (t4) { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + t4 = t4 == null; + if (t4) { + if (_4_6_isSet) + combinatorComponents_case_0 = _4_6; + else { + _4_6 = t2[2]; + combinatorComponents_case_0 = _4_6; + _4_6_isSet = true; + } + if (_4_7_isSet) + descendantComponents_case_0 = _4_7; + else { + _4_7 = t2[3]; + descendantComponents_case_0 = _4_7; + _4_7_isSet = true; + } + t1 = descendantComponents_case_0; + t6 = t1; + t1 = _4_1; + t5 = combinatorComponents_case_0; + } + t0 = t6; + t6 = t4; + t4 = t5; + t5 = t0; + } else { + t4 = t5; + t5 = t6; + t6 = t7; + } + if (!t6) + if (t3) { + if (_4_4_isSet) + t3 = _4_4; + else { + _4_4 = t2[1]; + t3 = _4_4; + _4_4_isSet = true; + } + t3 = t3 != null; + if (t3) { + combinator_case_1 = _4_4_isSet ? _4_4 : t2[1]; + if (combinator_case_1 == null) + combinator_case_1 = type$.Combinator._as(combinator_case_1); + descendantComponents_case_1 = _4_6_isSet ? _4_6 : t2[2]; + combinatorComponents_case_1 = _4_7_isSet ? _4_7 : t2[3]; + t1 = combinatorComponents_case_1; + t2 = descendantComponents_case_1; + t4 = t2; + t2 = t1; + t1 = combinator_case_1; + } else { + t2 = t4; + t4 = t5; + } + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t3 = t5; + t2 = t4; + t4 = false; + } + else { + t3 = t5; + t2 = t4; + t4 = true; + } + if (t4) { + if (t1 === B.Combinator_iUF) { + t1 = A.IterableExtension_get_lastOrNull(t3); + t1 = t1 == null ? _null : A.compoundIsSuperselector(t1.selector, t2.get$last(t2).selector, _null); + t1 = t1 === true; + } else + t1 = false; + if (t1) + t3.removeLast$0(0); + result.addFirst$1(A._setArrayType([A._setArrayType([t2.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent)], type$.JSArray_List_ComplexSelectorComponent)); + break $label2$2; + } + return _null; + } + return A._mergeTrailingCombinators(components1, components2, span, result); + }, + _mustUnify(complex1, complex2) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector); + for (t2 = J.get$iterator$ax(complex1); t2.moveNext$0();) + for (t3 = B.JSArray_methods.get$iterator(t2.get$current(t2).selector.components), t4 = new A.WhereIterator(t3, A.functions___isUnique$closure()); t4.moveNext$0();) + t1.add$1(0, t3.get$current(0)); + if (t1._collection$_length === 0) + return false; + return J.any$1$ax(complex2, new A._mustUnify_closure(t1)); + }, + _isUnique(simple) { + var t1; + if (!(simple instanceof A.IDSelector)) + t1 = simple instanceof A.PseudoSelector && !simple.isClass; + else + t1 = true; + return t1; + }, + _chunks(queue1, queue2, done, $T) { + var chunk2, _0_4, _0_7, _0_5, _0_7_isSet, _0_5_isSet, chunk, t2, _null = null, + t1 = $T._eval$1("JSArray<0>"), + chunk1 = A._setArrayType([], t1); + while (!done.call$1(queue1)) + chunk1.push(queue1.removeFirst$0()); + chunk2 = A._setArrayType([], t1); + while (!done.call$1(queue2)) + chunk2.push(queue2.removeFirst$0()); + $label0$0: { + _0_4 = chunk1.length <= 0; + t1 = _0_4; + _0_7 = _null; + if (t1) { + _0_7 = chunk2.length <= 0; + t1 = _0_7; + _0_5 = chunk2; + _0_7_isSet = true; + _0_5_isSet = true; + } else { + _0_5 = _null; + _0_7_isSet = false; + _0_5_isSet = false; + t1 = false; + } + if (t1) { + t1 = A._setArrayType([], $T._eval$1("JSArray>")); + break $label0$0; + } + if (_0_4) { + if (_0_5_isSet) + chunk = _0_5; + else { + chunk = chunk2; + _0_5 = chunk; + _0_5_isSet = true; + } + t1 = true; + } else { + chunk = _null; + t1 = false; + } + if (!t1) { + if (_0_7_isSet) + t1 = _0_7; + else { + _0_7 = (_0_5_isSet ? _0_5 : chunk2).length <= 0; + t1 = _0_7; + } + chunk = chunk1; + } else + t1 = true; + if (t1) { + t1 = A._setArrayType([chunk], $T._eval$1("JSArray>")); + break $label0$0; + } + t1 = A.List_List$_of(chunk1, $T); + B.JSArray_methods.addAll$1(t1, chunk2); + t2 = A.List_List$_of(chunk2, $T); + B.JSArray_methods.addAll$1(t2, chunk1); + t1 = A._setArrayType([t1, t2], $T._eval$1("JSArray>")); + break $label0$0; + } + return t1; + }, + paths(choices, $T) { + return J.fold$2$ax(choices, A._setArrayType([A._setArrayType([], $T._eval$1("JSArray<0>"))], $T._eval$1("JSArray>")), new A.paths_closure($T)); + }, + _groupSelectors(complex) { + var t2, t3, t4, + groups = A.QueueList$(null, type$.List_ComplexSelectorComponent), + t1 = type$.JSArray_ComplexSelectorComponent, + group = A._setArrayType([], t1); + for (t2 = complex.$ti, t3 = new A.ListIterator(complex, complex.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t3.moveNext$0();) { + t4 = t3.__internal$_current; + if (t4 == null) + t4 = t2._as(t4); + group.push(t4); + if (t4.combinators.length === 0) { + groups._queue_list$_add$1(group); + group = A._setArrayType([], t1); + } + } + if (group.length !== 0) + groups._queue_list$_add$1(group); + return groups; + }, + listIsSuperselector(list1, list2) { + return B.JSArray_methods.every$1(list2, new A.listIsSuperselector_closure(list1)); + }, + _complexIsParentSuperselector(complex1, complex2) { + var t1, base, t2; + if (J.get$length$asx(complex1) > J.get$length$asx(complex2)) + return false; + t1 = $.$get$bogusSpan(); + base = new A.ComplexSelectorComponent(A.CompoundSelector$(A._setArrayType([new A.PlaceholderSelector("", t1)], type$.JSArray_SimpleSelector), t1), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t1); + t1 = type$.ComplexSelectorComponent; + t2 = A.List_List$_of(complex1, t1); + t2.push(base); + t1 = A.List_List$_of(complex2, t1); + t1.push(base); + return A.complexIsSuperselector(t2, t1); + }, + complexIsSuperselector(complex1, complex2) { + var t1, t2, previousCombinator, i1, i2, remaining1, remaining2, component1, t3, t4, endOfSubselector, component2, t5, combinator1, _null = null; + if (B.JSArray_methods.get$last(complex1).combinators.length !== 0) + return false; + if (B.JSArray_methods.get$last(complex2).combinators.length !== 0) + return false; + for (t1 = A._arrayInstanceType(complex2), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), previousCombinator = _null, i1 = 0, i2 = 0;; previousCombinator = combinator1) { + remaining1 = complex1.length - i1; + remaining2 = complex2.length - i2; + if (remaining1 === 0 || remaining2 === 0) + return false; + if (remaining1 > remaining2) + return false; + component1 = complex1[i1]; + t3 = component1.combinators; + if (t3.length > 1) + return false; + if (remaining1 === 1) + if (B.JSArray_methods.any$1(complex2, new A.complexIsSuperselector_closure())) + return false; + else { + t1 = component1.selector; + t2 = B.JSArray_methods.get$last(complex2); + t3 = t1.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, complex2.length - 1) : _null; + return A.compoundIsSuperselector(t1, t2.selector, t3); + } + for (t4 = component1.selector, endOfSubselector = i2;;) { + component2 = complex2[endOfSubselector]; + if (component2.combinators.length > 1) + return false; + t5 = t4.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, endOfSubselector) : _null; + if (A.compoundIsSuperselector(t4, component2.selector, t5)) + break; + ++endOfSubselector; + if (endOfSubselector === complex2.length - 1) + return false; + } + t4 = new A.SubListIterable(complex2, 0, endOfSubselector, t1); + t4.SubListIterable$3(complex2, 0, endOfSubselector, t2); + if (!A._compatibleWithPreviousCombinator(previousCombinator, t4.skip$1(0, i2))) + return false; + component2 = complex2[endOfSubselector]; + combinator1 = A.IterableExtension_get_firstOrNull(t3); + if (!A._isSupercombinator(combinator1, A.IterableExtension_get_firstOrNull(component2.combinators))) + return false; + ++i1; + i2 = endOfSubselector + 1; + if (complex1.length - i1 === 1) { + t3 = combinator1 == null; + if ((t3 ? _null : combinator1.value) === B.Combinator_98W) { + t3 = complex2.length - 1; + t4 = new A.SubListIterable(complex2, 0, t3, t1); + t4.SubListIterable$3(complex2, 0, t3, t2); + if (!t4.skip$1(0, i2).every$1(0, new A.complexIsSuperselector_closure0(combinator1))) + return false; + } else if (!t3) + if (complex2.length - i2 > 1) + return false; + } + } + }, + _compatibleWithPreviousCombinator(previous, parents) { + if (parents.get$isEmpty(parents)) + return true; + if (previous == null) + return true; + if (previous.value !== B.Combinator_98W) + return false; + return parents.every$1(0, new A._compatibleWithPreviousCombinator_closure()); + }, + _isSupercombinator(combinator1, combinator2) { + var t2, t3, + t1 = true; + if (!J.$eq$(combinator1, combinator2)) { + t2 = combinator1 == null; + if (t2) + t3 = (combinator2 == null ? null : combinator2.value) === B.Combinator_iUF; + else + t3 = false; + if (!t3) + if ((t2 ? null : combinator1.value) === B.Combinator_98W) + t1 = (combinator2 == null ? null : combinator2.value) === B.Combinator_sHB; + else + t1 = false; + } + return t1; + }, + compoundIsSuperselector(compound1, compound2, parents) { + var t1, _0_1, _0_5, _0_5_isSet, _0_50, index1, pseudo2, index2, t2, pseudo1, t3, t4, t5, _i, simple1, _null = null; + if (!compound1.get$hasComplicatedSuperselectorSemantics() && !compound2.get$hasComplicatedSuperselectorSemantics()) { + t1 = compound1.components; + if (t1.length > compound2.components.length) + return false; + return B.JSArray_methods.every$1(t1, new A.compoundIsSuperselector_closure(compound2)); + } + _0_1 = A._findPseudoElementIndexed(compound1); + _0_5 = A._findPseudoElementIndexed(compound2); + t1 = type$.Record_2_nullable_Object_and_nullable_Object; + _0_5_isSet = t1._is(_0_1); + _0_50 = _null; + index1 = _null; + pseudo2 = _null; + index2 = _null; + t2 = false; + if (_0_5_isSet) { + pseudo1 = _0_1._0; + index1 = _0_1._1; + t1 = t1._is(_0_5); + if (t1) { + pseudo2 = _0_5._0; + index2 = _0_5._1; + } + _0_50 = _0_5; + } else { + t1 = t2; + pseudo1 = _null; + } + if (t1) { + if (pseudo1.isSuperselector$1(pseudo2)) { + t1 = compound1.components; + t2 = type$.int; + t3 = A._arrayInstanceType(t1)._precomputed1; + t4 = compound2.components; + t5 = A._arrayInstanceType(t4)._precomputed1; + t1 = A._compoundComponentsIsSuperselector(A.SubListIterable$(t1, 0, A.checkNotNullable(index1, "count", t2), t3), A.SubListIterable$(t4, 0, A.checkNotNullable(index2, "count", t2), t5), parents) && A._compoundComponentsIsSuperselector(A.SubListIterable$(t1, index1 + 1, _null, t3), A.SubListIterable$(t4, index2 + 1, _null, t5), parents); + } else + t1 = false; + return t1; + } + if (_0_1 == null) + t1 = (_0_5_isSet ? _0_50 : _0_5) != null; + else + t1 = true; + if (t1) + return false; + for (t1 = compound1.components, t2 = t1.length, t3 = compound2.components, _i = 0; _i < t2; ++_i) { + simple1 = t1[_i]; + if (simple1 instanceof A.PseudoSelector) + t4 = simple1.selector != null; + else + t4 = false; + if (t4) { + if (!A._selectorPseudoIsSuperselector(simple1, compound2, parents)) + return false; + } else if (!B.JSArray_methods.any$1(t3, simple1.get$isSuperselector())) + return false; + } + return true; + }, + _findPseudoElementIndexed(compound) { + var t1, t2, i, simple; + for (t1 = compound.components, t2 = t1.length, i = 0; i < t2; ++i) { + simple = t1[i]; + if (simple instanceof A.PseudoSelector && !simple.isClass) + return new A._Record_2(simple, i); + } + return null; + }, + _compoundComponentsIsSuperselector(compound1, compound2, parents) { + var t1; + if (compound1.get$length(0) === 0) + return true; + if (compound2.get$length(0) === 0) + compound2 = A._setArrayType([new A.UniversalSelector("*", $.$get$bogusSpan())], type$.JSArray_SimpleSelector); + t1 = $.$get$bogusSpan(); + return A.compoundIsSuperselector(A.CompoundSelector$(compound1, t1), A.CompoundSelector$(compound2, t1), parents); + }, + _selectorPseudoIsSuperselector(pseudo1, compound2, parents) { + var selector1 = pseudo1.selector; + if (selector1 == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo1.toString$0(0) + " must have a selector argument.", null)); + switch (pseudo1.normalizedName) { + case "is": + case "matches": + case "any": + case "where": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure(selector1)) || B.JSArray_methods.any$1(selector1.components, new A._selectorPseudoIsSuperselector_closure0(parents, compound2)); + case "has": + case "host": + case "host-context": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure1(selector1)); + case "slotted": + return A._selectorPseudoArgs(compound2, pseudo1.name, false).any$1(0, new A._selectorPseudoIsSuperselector_closure2(selector1)); + case "not": + return B.JSArray_methods.every$1(selector1.components, new A._selectorPseudoIsSuperselector_closure3(compound2, pseudo1)); + case "current": + return A._selectorPseudoArgs(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure4(selector1)); + case "nth-child": + case "nth-last-child": + return B.JSArray_methods.any$1(compound2.components, new A._selectorPseudoIsSuperselector_closure5(pseudo1, selector1)); + default: + throw A.wrapException("unreachable"); + } + }, + _selectorPseudoArgs(compound, $name, isClass) { + var t1 = type$.WhereTypeIterable_PseudoSelector; + return new A.NonNullsIterable(new A.MappedIterable(new A.WhereIterable(new A.WhereTypeIterable(compound.components, t1), new A._selectorPseudoArgs_closure(isClass, $name), t1._eval$1("WhereIterable")), new A._selectorPseudoArgs_closure0(), t1._eval$1("MappedIterable")), type$.NonNullsIterable_SelectorList); + }, + unifyComplex_closure: function unifyComplex_closure() { + }, + _weaveParents_closure: function _weaveParents_closure(t0) { + this.span = t0; + }, + _weaveParents_closure0: function _weaveParents_closure0(t0) { + this.group = t0; + }, + _weaveParents_closure1: function _weaveParents_closure1() { + }, + _weaveParents_closure2: function _weaveParents_closure2() { + }, + _mustUnify_closure: function _mustUnify_closure(t0) { + this.uniqueSelectors = t0; + }, + _mustUnify__closure: function _mustUnify__closure(t0) { + this.uniqueSelectors = t0; + }, + paths_closure: function paths_closure(t0) { + this.T = t0; + }, + paths__closure: function paths__closure(t0, t1) { + this.paths = t0; + this.T = t1; + }, + paths___closure: function paths___closure(t0, t1) { + this.option = t0; + this.T = t1; + }, + listIsSuperselector_closure: function listIsSuperselector_closure(t0) { + this.list1 = t0; + }, + listIsSuperselector__closure: function listIsSuperselector__closure(t0) { + this.complex1 = t0; + }, + complexIsSuperselector_closure: function complexIsSuperselector_closure() { + }, + complexIsSuperselector_closure0: function complexIsSuperselector_closure0(t0) { + this.combinator1 = t0; + }, + _compatibleWithPreviousCombinator_closure: function _compatibleWithPreviousCombinator_closure() { + }, + compoundIsSuperselector_closure: function compoundIsSuperselector_closure(t0) { + this.compound2 = t0; + }, + _selectorPseudoIsSuperselector_closure: function _selectorPseudoIsSuperselector_closure(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure0: function _selectorPseudoIsSuperselector_closure0(t0, t1) { + this.parents = t0; + this.compound2 = t1; + }, + _selectorPseudoIsSuperselector_closure1: function _selectorPseudoIsSuperselector_closure1(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure2: function _selectorPseudoIsSuperselector_closure2(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure3: function _selectorPseudoIsSuperselector_closure3(t0, t1) { + this.compound2 = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector__closure: function _selectorPseudoIsSuperselector__closure(t0, t1) { + this.complex = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector___closure: function _selectorPseudoIsSuperselector___closure(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector___closure0: function _selectorPseudoIsSuperselector___closure0(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector_closure4: function _selectorPseudoIsSuperselector_closure4(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure5: function _selectorPseudoIsSuperselector_closure5(t0, t1) { + this.pseudo1 = t0; + this.selector1 = t1; + }, + _selectorPseudoArgs_closure: function _selectorPseudoArgs_closure(t0, t1) { + this.isClass = t0; + this.name = t1; + }, + _selectorPseudoArgs_closure0: function _selectorPseudoArgs_closure0() { + }, + MergedExtension_merge(left, right) { + var t2, t3, t4, + t1 = left.extender.selector; + if (!t1.$eq(0, right.extender.selector) || !left.target.$eq(0, right.target)) + throw A.wrapException(A.ArgumentError$(left.toString$0(0) + " and " + right.toString$0(0) + " aren't the same extension.", null)); + t2 = left.mediaContext; + t3 = t2 == null; + if (!t3) { + t4 = right.mediaContext; + t4 = t4 != null && !B.C_ListEquality.equals$2(0, t2, t4); + } else + t4 = false; + if (t4) + throw A.wrapException(A.SassException$("From " + left.span.message$1(0, "") + string$.x0aYou_m, right.span, null)); + if (right.isOptional && right.mediaContext == null) + return left; + if (left.isOptional && t3) + return right; + if (t3) + t2 = right.mediaContext; + t1.get$specificity(); + t1 = new A.Extender(t1, false); + return t1._extension = new A.MergedExtension(left, right, t1, left.target, t2, true, left.span); + }, + MergedExtension: function MergedExtension(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.left = t0; + _.right = t1; + _.extender = t2; + _.target = t3; + _.mediaContext = t4; + _.isOptional = t5; + _.span = t6; + }, + ExtendMode: function ExtendMode(t0, t1, t2) { + this.name = t0; + this.index = t1; + this._name = t2; + }, + globalFunctions_closure: function globalFunctions_closure() { + }, + _invert($arguments, global) { + var t2, color, rgb, channel2, space, weight, inSpace, t3, _1_9, channel0, channel1, t4, _s6_ = "weight", _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + weightNumber = t1.$index($arguments, 1).assertNumber$1(_s6_); + if (!(t1.$index($arguments, 0) instanceof A.SassNumber)) + t2 = global && t1.$index($arguments, 0).get$isSpecialNumber(); + else + t2 = true; + if (t2) { + if (weightNumber._number$_value !== 100 || !weightNumber.hasUnit$1("%")) + throw A.wrapException(string$.Only_oa); + return A._functionString("invert", t1.take$1($arguments, 1)); + } + color = t1.$index($arguments, 0).assertColor$1("color"); + if (t1.$index($arguments, 2).$eq(0, B.C__SassNull)) { + t1 = color._space; + if (!t1.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.To_usei + color.toString$0(0) + ", you must provide a $space.", "color")); + A._checkPercent(weightNumber, _s6_); + rgb = color.toSpace$1(B.RgbColorSpace_i0P); + channel2 = B.LinearChannel_vJ3; + return A._mixLegacy(A.SassColor_SassColor$rgbInternal(A._invertChannel(rgb, B.LinearChannel_qXC, rgb.channel0OrNull), A._invertChannel(rgb, B.LinearChannel_Z5r, rgb.channel1OrNull), A._invertChannel(rgb, channel2, rgb.channel2OrNull), color.alphaOrNull, null), color, weightNumber).toSpace$1(t1); + } + t1 = t1.$index($arguments, 2).assertString$1(_s5_); + t1.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName(t1._string$_text, _s5_); + weight = weightNumber.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100; + if (A.fuzzyEquals(weight, 0)) + return color; + inSpace = color.toSpace$1(space); + $label0$0: { + if (B.HwbColorSpace_guQ === space) { + t1 = A._invertChannel(inSpace, space._channels[0], inSpace.channel0OrNull); + t2 = inSpace.alphaOrNull; + if (t2 == null) + t2 = 0; + t2 = A.SassColor_SassColor$hwb(t1, inSpace.channel2OrNull, inSpace.channel1OrNull, t2); + t1 = t2; + break $label0$0; + } + if (B.HslColorSpace_JQ2 === space || B.LchColorSpace_Bpv === space || B.OklchColorSpace_9Gj === space) { + t1 = space._channels; + t2 = A._invertChannel(inSpace, t1[0], inSpace.channel0OrNull); + t1 = A._invertChannel(inSpace, t1[2], inSpace.channel2OrNull); + t3 = inSpace.alphaOrNull; + if (t3 == null) + t3 = 0; + t3 = A.SassColor_SassColor$forSpaceInternal(space, t2, inSpace.channel1OrNull, t1, t3); + t1 = t3; + break $label0$0; + } + _1_9 = space._channels; + channel0 = _1_9[0]; + channel1 = _1_9[1]; + channel2 = _1_9[2]; + t1 = A._invertChannel(inSpace, channel0, inSpace.channel0OrNull); + t2 = A._invertChannel(inSpace, channel1, inSpace.channel1OrNull); + t3 = A._invertChannel(inSpace, channel2, inSpace.channel2OrNull); + t4 = inSpace.alphaOrNull; + t1 = A.SassColor_SassColor$forSpaceInternal(space, t1, t2, t3, t4 == null ? 0 : t4); + break $label0$0; + } + return A.fuzzyEquals(weight, 1) ? t1.toSpace$2$legacyMissing(color._space, false) : color.interpolate$4$legacyMissing$weight(t1, A.InterpolationMethod$(space, null), false, 1 - weight); + }, + _invertChannel(color, channel, value) { + var _0_2_isSet, _0_2, t1; + if (value == null) + A._missingChannelError(color, channel.name); + $label0$0: { + _0_2_isSet = channel instanceof A.LinearChannel; + _0_2 = null; + if (_0_2_isSet) { + _0_2 = channel.min; + t1 = _0_2; + t1 = t1 < 0; + } else + t1 = false; + if (t1) { + t1 = -value; + break $label0$0; + } + if (_0_2_isSet) + t1 = 0 === _0_2; + else + t1 = false; + if (t1) { + t1 = channel.max - value; + break $label0$0; + } + if (channel.isPolarAngle) { + t1 = B.JSNumber_methods.$mod(value + 180, 360); + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Unknown channel " + channel.toString$0(0) + ".")); + } + return t1; + }, + _grayscale(colorArg) { + var hsl, t2, oklch, + color = colorArg.assertColor$1("color"), + t1 = color._space; + if (t1.get$isLegacyInternal()) { + hsl = color.toSpace$1(B.HslColorSpace_JQ2); + t2 = hsl.alphaOrNull; + if (t2 == null) + t2 = 0; + return A.SassColor_SassColor$hsl(hsl.channel0OrNull, 0, hsl.channel2OrNull, t2).toSpace$2$legacyMissing(t1, false); + } else { + oklch = color.toSpace$1(B.OklchColorSpace_9Gj); + t2 = oklch.alphaOrNull; + if (t2 == null) + t2 = 0; + return A.SassColor_SassColor$forSpaceInternal(B.OklchColorSpace_9Gj, oklch.channel0OrNull, 0, oklch.channel2OrNull, t2).toSpace$1(t1); + } + }, + _updateComponents($arguments, adjust, change, scale) { + var t2, t3, keywords, originalColor, spaceKeyword, alphaArg, color, channelArgs, channelInfo, t4, value, channelIndex, result, i, alphaNumber, _null = null, _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + argumentList = type$.SassArgumentList._as(t1.$index($arguments, 1)); + if (argumentList._list$_contents.length !== 0) + throw A.wrapException(A.SassScriptException$(string$.Only_op, _null)); + argumentList._wereKeywordsAccessed = true; + t2 = type$.String; + t3 = type$.Value; + keywords = A.LinkedHashMap_LinkedHashMap$of(argumentList._keywords, t2, t3); + originalColor = t1.$index($arguments, 0).assertColor$1("color"); + t1 = keywords.remove$1(0, _s5_); + spaceKeyword = t1 == null ? _null : t1.assertString$1(_s5_); + if (spaceKeyword == null) + spaceKeyword = _null; + else + spaceKeyword.assertUnquoted$1(_s5_); + alphaArg = keywords.remove$1(0, "alpha"); + t1 = spaceKeyword == null; + if (t1 && originalColor._space.get$isLegacyInternal() && keywords.__js_helper$_length !== 0) { + t1 = A.NullableExtension_andThen(A._sniffLegacyColorSpace(keywords), new A._updateComponents_closure(originalColor)); + color = t1 == null ? originalColor : t1; + } else + color = A._colorInSpace(originalColor, t1 ? B.C__SassNull : spaceKeyword, true); + channelArgs = A.List_List$filled(color.get$channels().length, _null, false, type$.nullable_Value); + t1 = color._space; + channelInfo = t1._channels; + for (t2 = A.MapExtensions_get_pairs(keywords, t2, t3), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = {}; + t4 = t2.get$current(t2); + t3.name = null; + t3.name = t4._0; + value = t4._1; + channelIndex = B.JSArray_methods.indexWhere$1(channelInfo, new A._updateComponents_closure0(t3)); + if (channelIndex === -1) + throw A.wrapException(A.SassScriptException$("Color space " + t1.toString$0(0) + " doesn't have a channel with this name.", t3.name)); + channelArgs[channelIndex] = value; + } + if (change) + result = A._changeColor(color, channelArgs, alphaArg); + else { + t2 = A._setArrayType([], type$.JSArray_nullable_SassNumber); + for (i = 0; i < 3; ++i) { + t3 = channelArgs[i]; + t2.push(t3 == null ? _null : t3.assertNumber$1(channelInfo[i].name)); + } + alphaNumber = alphaArg == null ? _null : alphaArg.assertNumber$1("alpha"); + result = scale ? A.SassColor_SassColor$forSpaceInternal(t1, A._scaleChannel(color, channelInfo[0], color.channel0OrNull, t2[0]), A._scaleChannel(color, channelInfo[1], color.channel1OrNull, t2[1]), A._scaleChannel(color, channelInfo[2], color.channel2OrNull, t2[2]), A._scaleChannel(color, B.LinearChannel_XL8, color.alphaOrNull, alphaNumber)) : A._adjustColor(color, t2, alphaNumber); + } + return result.toSpace$2$legacyMissing(originalColor._space, false); + }, + _changeColor(color, channelArgs, alphaArg) { + var t4, _s5_ = "alpha", + t1 = A._channelForChange(channelArgs[0], color, 0), + t2 = A._channelForChange(channelArgs[1], color, 1), + t3 = A._channelForChange(channelArgs[2], color, 2); + $label0$0: { + if (alphaArg == null) { + t4 = color.alphaOrNull; + if (t4 == null) + t4 = 0; + break $label0$0; + } + t4 = A._isNone(alphaArg); + if (t4) { + t4 = null; + break $label0$0; + } + t4 = alphaArg instanceof A.SassNumber; + if (t4 && !alphaArg.get$hasUnits()) { + t4 = alphaArg.valueInRange$3(0, 1, _s5_); + break $label0$0; + } + if (t4 && alphaArg.hasUnit$1("%")) { + t4 = alphaArg.valueInRangeWithUnit$4(0, 100, _s5_, "%") / 100; + break $label0$0; + } + if (t4) { + t4 = new A._changeColor_closure(alphaArg).call$0(); + break $label0$0; + } + t4 = A.throwExpression(A.SassScriptException$(alphaArg.toString$0(0) + ' is not a number or unquoted "none".', _s5_)); + } + return A._colorFromChannels(color._space, t1, t2, t3, t4, false, false); + }, + _channelForChange(channelArg, color, channel) { + var _0_0, t1, t2; + if (channelArg == null) { + _0_0 = color.get$channelsOrNull()[channel]; + $label0$0: { + if (_0_0 != null) { + t1 = color._space; + t2 = A.SassNumber_SassNumber(_0_0, (t1 === B.HslColorSpace_JQ2 || t1 === B.HwbColorSpace_guQ) && channel > 0 ? "%" : null); + t1 = t2; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + } + if (A._isNone(channelArg)) + return null; + if (channelArg instanceof A.SassNumber) + return channelArg; + throw A.wrapException(A.SassScriptException$(channelArg.toString$0(0) + ' is not a number or unquoted "none".', color._space._channels[channel].name)); + }, + _scaleChannel(color, channel, oldValue, factorArg) { + var t1, factor; + if (factorArg == null) + return oldValue; + if (!(channel instanceof A.LinearChannel)) + throw A.wrapException(A.SassScriptException$("Channel isn't scalable.", channel.name)); + if (oldValue == null) + A._missingChannelError(color, channel.name); + t1 = channel.name; + factorArg.assertUnit$2("%", t1); + factor = factorArg.valueInRangeWithUnit$4(-100, 100, t1, "%") / 100; + $label0$0: { + if (0 === factor) { + t1 = oldValue; + break $label0$0; + } + if (factor > 0) { + t1 = channel.max; + t1 = oldValue >= t1 ? oldValue : oldValue + (t1 - oldValue) * factor; + break $label0$0; + } + t1 = channel.min; + t1 = oldValue <= t1 ? oldValue : oldValue + (oldValue - t1) * factor; + break $label0$0; + } + return t1; + }, + _adjustColor(color, channelArgs, alphaArg) { + var t1 = color._space, + t2 = t1._channels; + return A.SassColor_SassColor$forSpaceInternal(t1, A._adjustChannel(color, t2[0], color.channel0OrNull, channelArgs[0]), A._adjustChannel(color, t2[1], color.channel1OrNull, channelArgs[1]), A._adjustChannel(color, t2[2], color.channel2OrNull, channelArgs[2]), A.NullableExtension_andThen(A._adjustChannel(color, B.LinearChannel_XL8, color.alphaOrNull, alphaArg), new A._adjustColor_closure())); + }, + _adjustChannel(color, channel, oldValue, adjustmentArg) { + var _0_1, _0_3, t1, _0_6_isSet, _0_6, _0_6_isSet0, t2, _0_11, result, min, max, _null = null; + if (adjustmentArg == null) + return oldValue; + if (oldValue == null) + A._missingChannelError(color, channel.name); + $label0$0: { + _0_1 = color._space; + _0_3 = B.HslColorSpace_JQ2 === _0_1; + t1 = _0_3; + if (!t1) + _0_6_isSet = B.HwbColorSpace_guQ === _0_1; + else + _0_6_isSet = true; + if (_0_6_isSet) { + t1 = channel.isPolarAngle; + _0_6 = channel; + } else { + _0_6 = _null; + t1 = false; + } + if (t1) { + adjustmentArg = A.SassNumber_SassNumber(A._angleValue(adjustmentArg, "hue"), _null); + break $label0$0; + } + t1 = false; + if (_0_3) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_6; + else { + t2 = channel; + _0_6_isSet = _0_6_isSet0; + _0_6 = t2; + } + if (t2 instanceof A.LinearChannel) { + if (_0_6_isSet) + t1 = _0_6; + else { + t1 = channel; + _0_6_isSet = _0_6_isSet0; + _0_6 = t1; + } + _0_11 = type$.LinearChannel._as(t1).name; + t1 = _0_11; + if ("saturation" !== t1) + t1 = "lightness" === _0_11; + else + t1 = true; + } + } + if (t1) { + A._checkPercent(adjustmentArg, channel.name); + adjustmentArg = A.SassNumber_SassNumber(adjustmentArg._number$_value, "%"); + break $label0$0; + } + if (B.LinearChannel_XL8 === (_0_6_isSet ? _0_6 : channel) && adjustmentArg.get$hasUnits()) { + A.warnForDeprecation("$alpha: Passing a number with unit " + adjustmentArg.get$unitString() + string$.x20is_de + adjustmentArg.unitSuggestion$1("alpha") + string$.x0a_Morex3af, B.Deprecation_7TE); + adjustmentArg = A.SassNumber_SassNumber(adjustmentArg._number$_value, _null); + } + } + t1 = A._channelFromValue(channel, adjustmentArg, false); + t1.toString; + result = oldValue + t1; + $label1$1: { + t1 = channel instanceof A.LinearChannel; + min = _null; + t2 = false; + if (t1) + if (channel.lowerClamped) { + min = channel.min; + t2 = result < min; + } + if (t2) { + t1 = oldValue < min ? Math.max(oldValue, result) : min; + break $label1$1; + } + max = _null; + t2 = false; + if (t1) + if (channel.upperClamped) { + max = channel.max; + t1 = result > max; + } else + t1 = t2; + else + t1 = t2; + if (t1) { + t1 = oldValue > max ? Math.min(oldValue, result) : max; + break $label1$1; + } + t1 = result; + break $label1$1; + } + return t1; + }, + _sniffLegacyColorSpace(keywords) { + var t1, t2; + for (t1 = new A.LinkedHashMapKeyIterator(keywords, keywords._modifications, keywords._first); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + if ("red" === t2 || "green" === t2 || "blue" === t2) + return B.RgbColorSpace_i0P; + if ("saturation" === t2 || "lightness" === t2) + return B.HslColorSpace_JQ2; + if ("whiteness" === t2 || "blackness" === t2) + return B.HwbColorSpace_guQ; + } + return keywords.containsKey$1("hue") ? B.HslColorSpace_JQ2 : null; + }, + _functionString($name, $arguments) { + return new A.SassString($name + "(" + J.map$1$1$ax($arguments, new A._functionString_closure(), type$.String).join$1(0, ", ") + ")", false); + }, + _removedColorFunction($name, argument, negative) { + return A.BuiltInCallable$function($name, "$color, $amount", new A._removedColorFunction_closure($name, argument, negative), "sass:color"); + }, + _rgb($name, $arguments) { + var t3, t4, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + t2 = true; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } + if (t2) + return A._functionString($name, $arguments); + t2 = t1.$index($arguments, 0).assertNumber$1("red"); + t3 = t1.$index($arguments, 1).assertNumber$1("green"); + t1 = t1.$index($arguments, 2).assertNumber$1("blue"); + t4 = A.NullableExtension_andThen(alpha, new A._rgb_closure()); + return A._colorFromChannels(B.RgbColorSpace_i0P, t2, t3, t1, t4 == null ? 1 : t4, true, true); + }, + _rgbTwoArg($name, $arguments) { + var t2, color, + t1 = J.getInterceptor$asx($arguments), + first = t1.$index($arguments, 0), + second = t1.$index($arguments, 1); + if (!first.get$isSpecialVariable()) + t2 = !(first instanceof A.SassColor) && second.get$isSpecialVariable(); + else + t2 = true; + if (t2) + return A._functionString($name, $arguments); + color = first.assertColor$1("color"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$("Expected " + color.toString$0(0) + string$.x20to_be_ + color.toString$0(0) + ", $alpha: " + second.toString$0(0) + ")", $name)); + color.assertLegacy$1("color"); + color = color.toSpace$1(B.RgbColorSpace_i0P); + if (second.get$isSpecialNumber()) + return A._functionString($name, A._setArrayType([A.SassNumber_SassNumber(color.channel$1(0, "red"), null), A.SassNumber_SassNumber(color.channel$1(0, "green"), null), A.SassNumber_SassNumber(color.channel$1(0, "blue"), null), t1.$index($arguments, 1)], type$.JSArray_Value)); + t1 = A._percentageOrUnitless(t1.$index($arguments, 1).assertNumber$1("alpha"), 1, "alpha"); + return color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + }, + _hsl($name, $arguments) { + var t3, t4, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + t2 = true; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } + if (t2) + return A._functionString($name, $arguments); + t2 = t1.$index($arguments, 0).assertNumber$1("hue"); + t3 = t1.$index($arguments, 1).assertNumber$1("saturation"); + t1 = t1.$index($arguments, 2).assertNumber$1("lightness"); + t4 = A.NullableExtension_andThen(alpha, new A._hsl_closure()); + return A._colorFromChannels(B.HslColorSpace_JQ2, t2, t3, t1, t4 == null ? 1 : t4, true, false); + }, + _angleValue(angleValue, $name) { + var angle = angleValue.assertNumber$1($name); + if (angle.compatibleWithUnit$1("deg")) + return angle.coerceValueToUnit$1("deg"); + A.warnForDeprecation("$" + $name + ": Passing a unit other than deg (" + angle.toString$0(0) + string$.x29x20is_d_ + angle.unitSuggestion$1($name) + string$.x0a_See_, B.Deprecation_7TE); + return angle._number$_value; + }, + _checkPercent(number, $name) { + if (number.hasUnit$1("%")) + return; + A.warnForDeprecation("$" + $name + ": Passing a number without unit % (" + number.toString$0(0) + string$.x29x20is_d_ + number.unitSuggestion$2($name, "%") + string$.x0a_Morex3af, B.Deprecation_7TE); + }, + _percentageOrUnitless(number, max, $name) { + var value; + if (!number.get$hasUnits()) + value = number._number$_value; + else if (number.hasUnit$1("%")) + value = max * number._number$_value / 100; + else + throw A.wrapException(A.SassScriptException$("Expected " + number.toString$0(0) + ' to have unit "%" or no units.', $name)); + return value; + }, + _mixLegacy(color1, color2, weight) { + var t2, alphaDistance, weight1, weight2, t3, t4, t5, t6, t7, t8, + rgb1 = color1.toSpace$1(B.RgbColorSpace_i0P), + rgb2 = color2.toSpace$1(B.RgbColorSpace_i0P), + weightScale = weight.valueInRange$3(0, 100, "weight") / 100, + normalizedWeight = weightScale * 2 - 1, + t1 = color1.alphaOrNull; + if (t1 == null) + t1 = 0; + t2 = color2.alphaOrNull; + alphaDistance = t1 - (t2 == null ? 0 : t2); + t1 = normalizedWeight * alphaDistance; + weight1 = ((t1 === -1 ? normalizedWeight : (normalizedWeight + alphaDistance) / (1 + t1)) + 1) / 2; + weight2 = 1 - weight1; + t1 = rgb1.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = rgb2.channel0OrNull; + if (t2 == null) + t2 = 0; + t3 = rgb1.channel1OrNull; + if (t3 == null) + t3 = 0; + t4 = rgb2.channel1OrNull; + if (t4 == null) + t4 = 0; + t5 = rgb1.channel2OrNull; + if (t5 == null) + t5 = 0; + t6 = rgb2.channel2OrNull; + if (t6 == null) + t6 = 0; + t7 = rgb1.alphaOrNull; + if (t7 == null) + t7 = 0; + t8 = rgb2.alphaOrNull; + if (t8 == null) + t8 = 0; + return A.SassColor_SassColor$rgbInternal(t1 * weight1 + t2 * weight2, t3 * weight1 + t4 * weight2, t5 * weight1 + t6 * weight2, t7 * weightScale + t8 * (1 - weightScale), null); + }, + _opacify($name, $arguments) { + var result, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$($name + string$.x28__is_oa, null)); + t1 = color.alphaOrNull; + if (t1 == null) + t1 = 0; + t1 += amount.valueInRangeWithUnit$4(0, 1, "amount", ""); + result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + A.warnForDeprecation($name + "() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_zUK); + return result; + }, + _transparentize($name, $arguments) { + var result, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$($name + string$.x28__is_oa, null)); + t1 = color.alphaOrNull; + if (t1 == null) + t1 = 0; + t1 -= amount.valueInRangeWithUnit$4(0, 1, "amount", ""); + result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + A.warnForDeprecation($name + "() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_zUK); + return result; + }, + _colorInSpace(colorUntyped, spaceUntyped, legacyMissing) { + var t1, _s5_ = "space", + color = colorUntyped.assertColor$1("color"); + if (spaceUntyped.$eq(0, B.C__SassNull)) + return color; + t1 = spaceUntyped.assertString$1(_s5_); + t1.assertUnquoted$1(_s5_); + return color.toSpace$2$legacyMissing(A.ColorSpace_fromName(t1._string$_text, _s5_), legacyMissing); + }, + _parseChannels(functionName, input, $name, space) { + var parsedSlash, components, alphaValue, _2_0, _2_1, _2_5, t1, t2, _2_6, _2_6_isSet, channels, first, rest, componentList, spaceName, i, channel, channelName, t3, t4, _null = null; + if (input.get$isSpecialVariable()) + return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + parsedSlash = A._parseSlashChannels(input, $name); + if (parsedSlash == null) + return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + components = parsedSlash._0; + alphaValue = parsedSlash._1; + $label0$0: { + _2_0 = components.assertCommonListStyle$2$allowSlash($name, false); + _2_1 = _2_0.length; + if (_2_1 <= 0) + throw A.wrapException(A.SassScriptException$("Color component list may not be empty.", $name)); + _2_5 = _2_1 >= 1; + t1 = _2_5; + t2 = false; + if (t1) { + _2_6 = _2_0[0]; + if (_2_6 instanceof A.SassString) { + type$.SassString._as(_2_6); + t1 = !_2_6._hasQuotes && _2_6._string$_text.toLowerCase() === "from"; + } else + t1 = t2; + _2_6_isSet = true; + } else { + t1 = t2; + _2_6 = _null; + _2_6_isSet = false; + } + if (t1) + return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + t1 = components.get$isSpecialVariable(); + if (t1) { + channels = A._setArrayType([components], type$.JSArray_Value); + break $label0$0; + } + channels = _null; + if (_2_5) { + first = _2_6_isSet ? _2_6 : _2_0[0]; + rest = B.JSArray_methods.sublist$1(_2_0, 1); + componentList = _2_0; + t1 = true; + } else { + componentList = channels; + rest = componentList; + first = _null; + t1 = false; + } + if (t1) { + if (space == null) { + spaceName = first.assertString$1($name); + spaceName.assertUnquoted$1($name); + space = spaceName.get$isSpecialVariable() ? _null : A.ColorSpace_fromName(spaceName._string$_text, $name); + if (B.RgbColorSpace_i0P === space || B.HslColorSpace_JQ2 === space || B.HwbColorSpace_guQ === space || B.LabColorSpace_2nT === space || B.LchColorSpace_Bpv === space || B.OklabColorSpace_540 === space || B.OklchColorSpace_9Gj === space) + throw A.wrapException(A.SassScriptException$(string$.The_co + A.S(space) + ". Use the " + A.S(space) + "() function instead.", $name)); + channels = rest; + } else + channels = componentList; + for (i = 0; i < channels.length; ++i) { + channel = channels[i]; + t1 = false; + if (!channel.get$isSpecialNumber()) + if (!(channel instanceof A.SassNumber)) + t1 = !(channel instanceof A.SassString && !channel._hasQuotes && channel._string$_text.toLowerCase() === "none"); + if (t1) { + t1 = _null; + if (space == null) + channelName = t1; + else { + t2 = space._channels; + t2 = i < 3 ? t2[i] : _null; + if (!(t2 == null)) + t1 = new A._parseChannels_closure().call$1(t2.name); + channelName = t1; + } + if (channelName == null) + channelName = "channel " + (i + 1); + throw A.wrapException(A.SassScriptException$("Expected " + channelName + " to be a number, was " + channel.toString$0(0) + ".", $name)); + } + } + break $label0$0; + } + throw A.wrapException("unreachable"); + } + t1 = alphaValue == null; + t2 = t1 ? _null : alphaValue.get$isSpecialNumber(); + if (t2 === true) { + if (channels.length === 3 && B.Set_9FDyj.contains$1(0, space)) { + t1 = A.List_List$_of(channels, type$.Value); + alphaValue.toString; + t1.push(alphaValue); + t1 = A._functionString(functionName, t1); + } else + t1 = A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + return t1; + } + $label1$1: { + if (t1) { + t2 = 1; + break $label1$1; + } + if (alphaValue instanceof A.SassString && !alphaValue._hasQuotes && "none" === alphaValue._string$_text) { + t2 = _null; + break $label1$1; + } + t2 = A._percentageOrUnitless(alphaValue.assertNumber$1($name), 1, "alpha"); + t2 = isNaN(t2) ? 0 : B.JSNumber_methods.clamp$2(t2, 0, 1); + break $label1$1; + } + if (space == null) + return A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + if (B.JSArray_methods.any$1(channels, new A._parseChannels_closure0())) { + if (channels.length === 3 && B.Set_9FDyj.contains$1(0, space)) { + t2 = A.List_List$_of(channels, type$.Value); + if (!t1) + t2.push(alphaValue); + t1 = A._functionString(functionName, t2); + } else + t1 = A._functionString(functionName, A._setArrayType([input], type$.JSArray_Value)); + return t1; + } + if (channels.length !== 3) + throw A.wrapException(A.SassScriptException$("The " + space.toString$0(0) + " color space has 3 channels but " + input.toString$0(0) + " has " + channels.length + ".", $name)); + t1 = channels[0]; + t1 = t1 instanceof A.SassNumber ? t1 : _null; + t3 = channels[1]; + t3 = t3 instanceof A.SassNumber ? t3 : _null; + t4 = channels[2]; + t4 = t4 instanceof A.SassNumber ? t4 : _null; + return A._colorFromChannels(space, t1, t3, t4, t2, true, space === B.RgbColorSpace_i0P); + }, + _parseSlashChannels(input, $name) { + var _1_1, alphaValue, t1, components, _1_7, _1_8, _1_9, initial, t2, _1_8_isSet, _1_9_isSet, _0_0, _0_1, channel3, alpha, _1_16, _1_16_isSet, _1_9_isSet0, t3, _null = null, + _1_0 = input.assertCommonListStyle$2$allowSlash($name, true); + $label0$0: { + _1_1 = _1_0.length; + alphaValue = _null; + t1 = false; + if (_1_1 === 2) { + components = _1_0[0]; + alphaValue = _1_0[1]; + t1 = input.get$separator(input) === B.ListSeparator_Lul; + } else + components = _null; + if (t1) { + t1 = new A._Record_2(components, alphaValue); + break $label0$0; + } + t1 = input.get$separator(input); + if (t1 === B.ListSeparator_Lul) { + t1 = _1_0.length; + A.throwExpression(A.SassScriptException$(string$.Only_2 + t1 + " " + A.pluralize("was", t1, "were") + " passed.", $name)); + } + _1_7 = _1_1 >= 1; + t1 = _1_7; + _1_8 = _null; + _1_9 = _null; + initial = _null; + t2 = false; + if (t1) { + _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); + initial = _1_8; + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + if (t1 instanceof A.SassString) { + type$.SassString._as(_1_9); + t1 = !_1_9._hasQuotes; + } else + t1 = t2; + _1_8_isSet = true; + _1_9_isSet = true; + } else { + t1 = t2; + _1_8_isSet = false; + _1_9_isSet = false; + } + if (t1) { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + } + _0_0 = type$.SassString._as(t1)._string$_text.split("/"); + $label1$1: { + _0_1 = _0_0.length; + if (_0_1 === 1) { + t1 = new A._Record_2(input, _null); + break $label1$1; + } + if (_0_1 === 2) { + channel3 = _0_0[0]; + alpha = _0_0[1]; + t1 = A.List_List$_of(initial, type$.Value); + t1.push(A._parseNumberOrString(channel3)); + t1 = new A._Record_2(A.SassList$(t1, B.ListSeparator_SrV, false), A._parseNumberOrString(alpha)); + break $label1$1; + } + t1 = _null; + break $label1$1; + } + break $label0$0; + } + _1_16 = _null; + _1_16_isSet = false; + t1 = false; + if (_1_7) { + _1_9_isSet0 = true; + if (_1_8_isSet) + initial = _1_8; + else { + _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); + initial = _1_8; + } + if (_1_9_isSet) + t2 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + _1_9_isSet = _1_9_isSet0; + } + _1_16_isSet = t2 instanceof A.SassNumber; + if (_1_16_isSet) { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + _1_9_isSet = _1_9_isSet0; + } + _1_16 = type$.SassNumber._as(t1).asSlash; + t1 = _1_16; + t1 = type$.Record_2_nullable_Object_and_nullable_Object._is(t1); + } + } else + initial = _null; + if (t1) { + if (_1_16_isSet) + t1 = _1_16; + else { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + _1_9_isSet = true; + } + _1_16 = type$.SassNumber._as(t1).asSlash; + t1 = _1_16; + _1_16_isSet = true; + } + if (t1 == null) + t1 = type$.Record_2_nullable_Object_and_nullable_Object._as(t1); + if (_1_16_isSet) + t2 = _1_16; + else { + if (_1_9_isSet) + t2 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + } + _1_16 = type$.SassNumber._as(t2).asSlash; + t2 = _1_16; + } + if (t2 == null) + t2 = type$.Record_2_nullable_Object_and_nullable_Object._as(t2); + t3 = A.List_List$_of(initial, type$.Value); + t3.push(t1._0); + t1 = new A._Record_2(A.SassList$(t3, B.ListSeparator_SrV, false), t2._1); + break $label0$0; + } + t1 = new A._Record_2(input, _null); + break $label0$0; + } + return t1; + }, + _parseNumberOrString(text) { + var t1, expression, exception; + try { + t1 = A.ScssParser$(text, false, null); + expression = t1._parseSingleProduction$1$1(t1.get$_number(), type$.NumberExpression); + t1 = A.SassNumber_SassNumber(expression.value, expression.unit); + return t1; + } catch (exception) { + if (type$.SassFormatException._is(A.unwrapException(exception))) + return new A.SassString(text, false); + else + throw exception; + } + }, + _colorFromChannels(space, channel0, channel1, channel2, alpha, clamp, fromRgbFunction) { + var t1, t2, whiteness, blackness, t3; + switch (space) { + case B.HslColorSpace_JQ2: + if (channel1 != null) + A._checkPercent(channel1, "saturation"); + if (channel2 != null) + A._checkPercent(channel2, "lightness"); + t1 = space._channels; + return A.SassColor_SassColor$hsl(A.NullableExtension_andThen(channel0, new A._colorFromChannels_closure()), A._channelFromValue(t1[1], A._forcePercent(channel1), clamp), A._channelFromValue(t1[2], A._forcePercent(channel2), clamp), alpha); + case B.HwbColorSpace_guQ: + t1 = channel1 == null; + if (!t1) + channel1.assertUnit$2("%", "whiteness"); + t2 = channel2 == null; + if (!t2) + channel2.assertUnit$2("%", "blackness"); + whiteness = t1 ? null : channel1._number$_value; + blackness = t2 ? null : channel2._number$_value; + if (whiteness != null && blackness != null && whiteness + blackness > 100) { + t1 = whiteness + blackness; + whiteness = whiteness / t1 * 100; + blackness = blackness / t1 * 100; + } + return A.SassColor_SassColor$hwb(A.NullableExtension_andThen(channel0, new A._colorFromChannels_closure0()), whiteness, blackness, alpha); + case B.RgbColorSpace_i0P: + t1 = space._channels; + t2 = A._channelFromValue(t1[0], channel0, clamp); + t3 = A._channelFromValue(t1[1], channel1, clamp); + t1 = A._channelFromValue(t1[2], channel2, clamp); + return A.SassColor_SassColor$rgbInternal(t2, t3, t1, alpha, fromRgbFunction ? B.C__ColorFormatEnum : null); + default: + t1 = space._channels; + return A.SassColor_SassColor$forSpaceInternal(space, A._channelFromValue(t1[0], channel0, clamp), A._channelFromValue(t1[1], channel1, clamp), A._channelFromValue(t1[2], channel2, clamp), alpha); + } + }, + _forcePercent(number) { + var t1, _0_3; + $label0$0: { + if (number == null) { + t1 = null; + break $label0$0; + } + _0_3 = number.get$numeratorUnits(number); + if (_0_3.length === 1) + t1 = "%" === _0_3[0] && number.get$denominatorUnits(number).length <= 0; + else + t1 = false; + if (t1) { + t1 = number; + break $label0$0; + } + t1 = A.SassNumber_SassNumber(number._number$_value, "%"); + break $label0$0; + } + return t1; + }, + _channelFromValue(channel, value, clamp) { + return A.NullableExtension_andThen(value, new A._channelFromValue_closure(channel, clamp)); + }, + _isNone(value) { + return value instanceof A.SassString && !value._hasQuotes && value._string$_text.toLowerCase() === "none"; + }, + _channelFunction($name, space, getter, global, unit) { + return A.BuiltInCallable$function($name, "$color", new A._channelFunction_closure(getter, unit, global, $name, space), "sass:color"); + }, + _suggestScaleAndAdjust(original, adjustment, channelName) { + var t2, oldValue, newValue, factor, t3, suggestion, + channel = channelName === "alpha" ? B.LinearChannel_XL8 : type$.LinearChannel._as(B.JSArray_methods.firstWhere$1(B.List_oAL, new A._suggestScaleAndAdjust_closure(channelName))), + t1 = channel === B.LinearChannel_XL8; + if (t1) { + t2 = original.alphaOrNull; + oldValue = t2 == null ? 0 : t2; + } else + oldValue = original.toSpace$1(B.HslColorSpace_JQ2).channel$1(0, channelName); + newValue = oldValue + adjustment; + if (adjustment !== 0) { + factor = A._Cell$(); + t2 = channel.max; + if (newValue > t2) + factor.__late_helper$_value = 1; + else { + t3 = channel.min; + if (newValue < t3) + factor.__late_helper$_value = -1; + else if (adjustment > 0) + factor.__late_helper$_value = adjustment / (t2 - oldValue); + else + factor.__late_helper$_value = (newValue - oldValue) / (oldValue - t3); + } + suggestion = "Suggestion" + ("s:\n\ncolor.scale($color, $" + channelName + ": " + A.serializeValue(A.SassNumber_SassNumber(factor._readLocal$0() * 100, "%"), false, true) + ")\n"); + } else + suggestion = "Suggestion:\n\n"; + return suggestion + ("color.adjust($color, $" + channelName + ": " + A.serializeValue(A.SassNumber_SassNumber(adjustment, t1 ? null : "%"), false, true) + ")"); + }, + _missingChannelError(color, channel) { + return A.throwExpression(A.SassScriptException$(string$.Becaus + color.toCssString$0() + ").", channel)); + }, + _channelName(value) { + var t1 = value.assertString$1("channel"); + t1.assertQuoted$1("channel"); + return t1._string$_text; + }, + _function5($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:color"); + }, + global_closure0: function global_closure0() { + }, + global_closure1: function global_closure1() { + }, + global_closure2: function global_closure2() { + }, + global_closure3: function global_closure3() { + }, + global_closure4: function global_closure4() { + }, + global_closure5: function global_closure5() { + }, + global_closure6: function global_closure6() { + }, + global_closure7: function global_closure7() { + }, + global_closure8: function global_closure8() { + }, + global_closure9: function global_closure9() { + }, + global_closure10: function global_closure10() { + }, + global_closure11: function global_closure11() { + }, + global_closure12: function global_closure12() { + }, + global_closure13: function global_closure13() { + }, + global_closure14: function global_closure14() { + }, + global_closure15: function global_closure15() { + }, + global_closure16: function global_closure16() { + }, + global_closure17: function global_closure17() { + }, + global_closure18: function global_closure18() { + }, + global_closure19: function global_closure19() { + }, + global_closure20: function global_closure20() { + }, + global_closure21: function global_closure21() { + }, + global_closure22: function global_closure22() { + }, + global_closure23: function global_closure23() { + }, + global_closure24: function global_closure24() { + }, + global_closure25: function global_closure25() { + }, + global_closure26: function global_closure26() { + }, + global_closure27: function global_closure27() { + }, + global_closure28: function global_closure28() { + }, + global_closure29: function global_closure29() { + }, + global_closure30: function global_closure30() { + }, + global_closure31: function global_closure31() { + }, + global_closure32: function global_closure32() { + }, + global_closure33: function global_closure33() { + }, + global_closure34: function global_closure34() { + }, + global_closure35: function global_closure35() { + }, + global__closure: function global__closure() { + }, + global_closure36: function global_closure36() { + }, + global_closure37: function global_closure37() { + }, + global_closure38: function global_closure38() { + }, + global_closure39: function global_closure39() { + }, + global_closure40: function global_closure40() { + }, + global_closure41: function global_closure41() { + }, + global_closure42: function global_closure42() { + }, + module_closure1: function module_closure1() { + }, + module_closure2: function module_closure2() { + }, + module_closure3: function module_closure3() { + }, + module_closure4: function module_closure4() { + }, + module_closure5: function module_closure5() { + }, + module_closure6: function module_closure6() { + }, + module_closure7: function module_closure7() { + }, + module_closure8: function module_closure8() { + }, + module_closure9: function module_closure9() { + }, + module_closure10: function module_closure10() { + }, + module_closure11: function module_closure11() { + }, + module_closure12: function module_closure12() { + }, + module_closure13: function module_closure13() { + }, + module_closure14: function module_closure14() { + }, + module__closure2: function module__closure2() { + }, + module_closure15: function module_closure15() { + }, + module_closure16: function module_closure16() { + }, + module_closure17: function module_closure17() { + }, + module_closure18: function module_closure18() { + }, + module_closure19: function module_closure19() { + }, + module_closure20: function module_closure20() { + }, + module_closure21: function module_closure21() { + }, + module_closure22: function module_closure22() { + }, + module__closure1: function module__closure1(t0) { + this.channelName = t0; + }, + module_closure23: function module_closure23() { + }, + module_closure_toXyzNoMissing: function module_closure_toXyzNoMissing() { + }, + module_closure24: function module_closure24() { + }, + _mix_closure: function _mix_closure() { + }, + _complement_closure: function _complement_closure() { + }, + _adjust_closure: function _adjust_closure() { + }, + _scale_closure: function _scale_closure() { + }, + _change_closure: function _change_closure() { + }, + _ieHexStr_closure: function _ieHexStr_closure() { + }, + _ieHexStr_closure_hexString: function _ieHexStr_closure_hexString() { + }, + _updateComponents_closure: function _updateComponents_closure(t0) { + this.originalColor = t0; + }, + _updateComponents_closure0: function _updateComponents_closure0(t0) { + this._box_0 = t0; + }, + _changeColor_closure: function _changeColor_closure(t0) { + this.alphaArg = t0; + }, + _adjustColor_closure: function _adjustColor_closure() { + }, + _functionString_closure: function _functionString_closure() { + }, + _removedColorFunction_closure: function _removedColorFunction_closure(t0, t1, t2) { + this.name = t0; + this.argument = t1; + this.negative = t2; + }, + _rgb_closure: function _rgb_closure() { + }, + _hsl_closure: function _hsl_closure() { + }, + _parseChannels_closure: function _parseChannels_closure() { + }, + _parseChannels_closure0: function _parseChannels_closure0() { + }, + _colorFromChannels_closure: function _colorFromChannels_closure() { + }, + _colorFromChannels_closure0: function _colorFromChannels_closure0() { + }, + _channelFromValue_closure: function _channelFromValue_closure(t0, t1) { + this.channel = t0; + this.clamp = t1; + }, + _channelFunction_closure: function _channelFunction_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.getter = t0; + _.unit = t1; + _.global = t2; + _.name = t3; + _.space = t4; + }, + _suggestScaleAndAdjust_closure: function _suggestScaleAndAdjust_closure(t0) { + this.channelName = t0; + }, + _function4($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:list"); + }, + _length_closure0: function _length_closure0() { + }, + _nth_closure: function _nth_closure() { + }, + _setNth_closure: function _setNth_closure() { + }, + _join_closure: function _join_closure() { + }, + _append_closure0: function _append_closure0() { + }, + _zip_closure: function _zip_closure() { + }, + _zip__closure: function _zip__closure() { + }, + _zip__closure0: function _zip__closure0(t0) { + this._box_0 = t0; + }, + _zip__closure1: function _zip__closure1(t0) { + this._box_0 = t0; + }, + _index_closure0: function _index_closure0() { + }, + _separator_closure: function _separator_closure() { + }, + _isBracketed_closure: function _isBracketed_closure() { + }, + _slash_closure: function _slash_closure() { + }, + _modify(map, keys, modify, addNesting) { + var keyIterator = J.get$iterator$ax(keys); + return keyIterator.moveNext$0() ? new A._modify_modifyNestedMap(keyIterator, modify, addNesting).call$1(map) : modify.call$1(map); + }, + _deepMergeImpl(map1, map2) { + var t2, t3, result, t4, key, value, _1_1, _1_3, _1_3_isSet, resultMap, _1_30, valueMap, merged, + t1 = map1._map$_contents; + if (t1.get$isEmpty(t1)) + return map2; + t2 = map2._map$_contents; + if (t2.get$isEmpty(t2)) + return map1; + t3 = type$.Value; + result = A.LinkedHashMap_LinkedHashMap$of(t1, t3, t3); + for (t1 = A.MapExtensions_get_pairs(t2, t3, t3), t1 = t1.get$iterator(t1), t2 = type$.SassMap; t1.moveNext$0();) { + t4 = t1.get$current(t1); + key = t4._0; + value = t4._1; + t4 = result.$index(0, key); + _1_1 = t4 == null ? null : t4.tryMap$0(); + _1_3 = value.tryMap$0(); + _1_3_isSet = _1_1 != null; + t4 = false; + if (_1_3_isSet) { + t4 = _1_3 != null; + resultMap = _1_1; + _1_30 = _1_3; + } else { + _1_30 = null; + resultMap = null; + } + if (t4) { + valueMap = _1_3_isSet ? _1_30 : _1_3; + merged = A._deepMergeImpl(resultMap, valueMap == null ? t2._as(valueMap) : valueMap); + if (merged === resultMap) + continue; + result.$indexSet(0, key, merged); + } else + result.$indexSet(0, key, value); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(result, t3, t3)); + }, + _function3($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:map"); + }, + _get_closure: function _get_closure() { + }, + _set_closure: function _set_closure() { + }, + _set__closure0: function _set__closure0(t0) { + this.$arguments = t0; + }, + _set_closure0: function _set_closure0() { + }, + _set__closure: function _set__closure(t0) { + this._box_0 = t0; + }, + _merge_closure: function _merge_closure() { + }, + _merge_closure0: function _merge_closure0() { + }, + _merge__closure: function _merge__closure(t0) { + this.map2 = t0; + }, + _deepMerge_closure: function _deepMerge_closure() { + }, + _deepRemove_closure: function _deepRemove_closure() { + }, + _deepRemove__closure: function _deepRemove__closure(t0) { + this.keys = t0; + }, + _remove_closure: function _remove_closure() { + }, + _remove_closure0: function _remove_closure0() { + }, + _keys_closure: function _keys_closure() { + }, + _values_closure: function _values_closure() { + }, + _hasKey_closure: function _hasKey_closure() { + }, + _modify_modifyNestedMap: function _modify_modifyNestedMap(t0, t1, t2) { + this.keyIterator = t0; + this.modify = t1; + this.addNesting = t2; + }, + _singleArgumentMathFunc($name, mathFunc) { + return A.BuiltInCallable$function($name, "$number", new A._singleArgumentMathFunc_closure(mathFunc), "sass:math"); + }, + _numberFunction($name, transform) { + return A.BuiltInCallable$function($name, "$number", new A._numberFunction_closure(transform), "sass:math"); + }, + _function2($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:math"); + }, + global_closure: function global_closure() { + }, + module_closure0: function module_closure0() { + }, + _ceil_closure: function _ceil_closure() { + }, + _clamp_closure: function _clamp_closure() { + }, + _floor_closure: function _floor_closure() { + }, + _max_closure: function _max_closure() { + }, + _min_closure: function _min_closure() { + }, + _round_closure: function _round_closure() { + }, + _hypot_closure: function _hypot_closure() { + }, + _hypot__closure: function _hypot__closure() { + }, + _log_closure: function _log_closure() { + }, + _pow_closure: function _pow_closure() { + }, + _atan2_closure: function _atan2_closure() { + }, + _compatible_closure: function _compatible_closure() { + }, + _isUnitless_closure: function _isUnitless_closure() { + }, + _unit_closure: function _unit_closure() { + }, + _percentage_closure: function _percentage_closure() { + }, + _randomFunction_closure: function _randomFunction_closure() { + }, + _div_closure: function _div_closure() { + }, + _singleArgumentMathFunc_closure: function _singleArgumentMathFunc_closure(t0) { + this.mathFunc = t0; + }, + _numberFunction_closure: function _numberFunction_closure(t0) { + this.transform = t0; + }, + _function($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:meta"); + }, + _shared_closure: function _shared_closure() { + }, + _shared_closure0: function _shared_closure0() { + }, + _shared_closure1: function _shared_closure1() { + }, + _shared_closure2: function _shared_closure2() { + }, + moduleFunctions_closure: function moduleFunctions_closure() { + }, + moduleFunctions_closure0: function moduleFunctions_closure0() { + }, + moduleFunctions__closure: function moduleFunctions__closure() { + }, + moduleFunctions_closure1: function moduleFunctions_closure1() { + }, + _prependParent(compound) { + var _0_3, _0_4, t2, t3, rest, + t1 = A.EvaluationContext_currentOrNull(), + span = (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan(), + _0_0 = compound.components; + $label0$0: { + _0_3 = _0_0.length >= 1; + if (_0_3) { + _0_4 = _0_0[0]; + t1 = _0_4 instanceof A.UniversalSelector; + } else { + _0_4 = null; + t1 = false; + } + t2 = null; + if (t1) { + t1 = t2; + break $label0$0; + } + t1 = false; + if (_0_3) { + t3 = _0_4; + if (t3 instanceof A.TypeSelector) { + t1 = _0_4; + t1 = type$.TypeSelector._as(t1).name.namespace != null; + } + } + if (t1) { + t1 = t2; + break $label0$0; + } + if (_0_3) { + t1 = _0_4; + t1 = t1 instanceof A.TypeSelector; + } else + t1 = false; + if (t1) { + t1 = _0_3 ? _0_4 : _0_0[0]; + type$.TypeSelector._as(t1); + rest = B.JSArray_methods.sublist$1(_0_0, 1); + t1 = A._setArrayType([new A.ParentSelector(t1.name.name, span)], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, rest); + t1 = A.CompoundSelector$(t1, span); + break $label0$0; + } + t1 = A._setArrayType([new A.ParentSelector(null, span)], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, _0_0); + t1 = A.CompoundSelector$(t1, span); + break $label0$0; + } + return t1; + }, + _function1($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:selector"); + }, + _nest_closure: function _nest_closure() { + }, + _nest__closure: function _nest__closure() { + }, + _nest__closure0: function _nest__closure0() { + }, + _append_closure: function _append_closure() { + }, + _append__closure: function _append__closure() { + }, + _append__closure0: function _append__closure0(t0) { + this.span = t0; + }, + _append___closure: function _append___closure(t0, t1) { + this.parent = t0; + this.span = t1; + }, + _extend_closure: function _extend_closure() { + }, + _replace_closure: function _replace_closure() { + }, + _unify_closure: function _unify_closure() { + }, + _isSuperselector_closure: function _isSuperselector_closure() { + }, + _simpleSelectors_closure: function _simpleSelectors_closure() { + }, + _simpleSelectors__closure: function _simpleSelectors__closure() { + }, + _parse_closure: function _parse_closure() { + }, + _codepointForIndex(index, lengthInCodepoints, allowNegative) { + var result; + if (index === 0) + return 0; + if (index > 0) + return Math.min(index - 1, lengthInCodepoints); + result = lengthInCodepoints + index; + if (result < 0 && !allowNegative) + return 0; + return result; + }, + _function0($name, $arguments, callback) { + return A.BuiltInCallable$function($name, $arguments, callback, "sass:string"); + }, + module_closure: function module_closure() { + }, + module__closure: function module__closure(t0) { + this.string = t0; + }, + module__closure0: function module__closure0(t0) { + this.string = t0; + }, + _unquote_closure: function _unquote_closure() { + }, + _quote_closure: function _quote_closure() { + }, + _length_closure: function _length_closure() { + }, + _insert_closure: function _insert_closure() { + }, + _index_closure: function _index_closure() { + }, + _slice_closure: function _slice_closure() { + }, + _toUpperCase_closure: function _toUpperCase_closure() { + }, + _toLowerCase_closure: function _toLowerCase_closure() { + }, + _uniqueId_closure: function _uniqueId_closure() { + }, + ImportCache$(importers, loadPaths) { + var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl, + t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport, + t3 = type$.Uri; + return new A.ImportCache(A.ImportCache__toImporters(importers, loadPaths, null), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.DateTime)); + }, + ImportCache__toImporters(importers, loadPaths, packageConfig) { + var t1, t2, t3, t4, _i, path, _null = null, + sassPath = A.getEnvironmentVariable("SASS_PATH"); + if (A.isBrowser()) { + t1 = A._setArrayType([], type$.JSArray_Importer); + B.JSArray_methods.addAll$1(t1, importers); + return t1; + } + t1 = A._setArrayType([], type$.JSArray_Importer); + B.JSArray_methods.addAll$1(t1, importers); + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + if (sassPath != null) { + t2 = A.isNodeJs() ? self.process : _null; + t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); + t4 = t3.length; + _i = 0; + for (; _i < t4; ++_i) { + path = t3[_i]; + t1.push(new A.FilesystemImporter($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + } + return t1; + }, + ImportCache: function ImportCache(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._importers = t0; + _._canonicalizeCache = t1; + _._perImporterCanonicalizeCache = t2; + _._nonCanonicalRelativeUrls = t3; + _._importCache = t4; + _._resultsCache = t5; + _._loadTimes = t6; + }, + ImportCache_canonicalize_closure: function ImportCache_canonicalize_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.baseImporter = t1; + _.resolvedUrl = t2; + _.baseUrl = t3; + _.forImport = t4; + _.key = t5; + _.url = t6; + }, + ImportCache__canonicalize_closure: function ImportCache__canonicalize_closure(t0, t1) { + this.importer = t0; + this.url = t1; + }, + ImportCache_importCanonical_closure: function ImportCache_importCanonical_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + }, + ImportCache_humanize_closure: function ImportCache_humanize_closure(t0) { + this.canonicalUrl = t0; + }, + ImportCache_humanize_closure0: function ImportCache_humanize_closure0() { + }, + ImportCache_humanize_closure1: function ImportCache_humanize_closure1() { + }, + ImportCache_humanize_closure2: function ImportCache_humanize_closure2(t0) { + this.canonicalUrl = t0; + }, + Importer: function Importer() { + }, + AsyncImporter: function AsyncImporter() { + }, + CanonicalizeContext: function CanonicalizeContext(t0, t1) { + this._fromImport = t0; + this._containingUrl = t1; + this._wasContainingUrlAccessed = false; + }, + FilesystemImporter: function FilesystemImporter(t0, t1) { + this._loadPath = t0; + this._loadPathDeprecated = t1; + }, + FilesystemImporter_canonicalize_closure: function FilesystemImporter_canonicalize_closure() { + }, + NoOpImporter: function NoOpImporter() { + }, + NodePackageImporter: function NodePackageImporter() { + this.__NodePackageImporter__entryPointDirectory_F = $; + }, + NodePackageImporter__nodePackageExportsResolve_closure: function NodePackageImporter__nodePackageExportsResolve_closure() { + }, + NodePackageImporter__nodePackageExportsResolve_closure0: function NodePackageImporter__nodePackageExportsResolve_closure0() { + }, + NodePackageImporter__nodePackageExportsResolve_closure1: function NodePackageImporter__nodePackageExportsResolve_closure1() { + }, + NodePackageImporter__nodePackageExportsResolve_closure2: function NodePackageImporter__nodePackageExportsResolve_closure2(t0, t1, t2) { + this.$this = t0; + this.exports = t1; + this.packageRoot = t2; + }, + NodePackageImporter__nodePackageExportsResolve__closure: function NodePackageImporter__nodePackageExportsResolve__closure(t0, t1, t2) { + this.$this = t0; + this.variant = t1; + this.packageRoot = t2; + }, + NodePackageImporter__nodePackageExportsResolve__closure0: function NodePackageImporter__nodePackageExportsResolve__closure0() { + }, + NodePackageImporter__getMainExport_closure: function NodePackageImporter__getMainExport_closure() { + }, + ImporterResult: function ImporterResult(t0, t1, t2) { + this.contents = t0; + this._sourceMapUrl = t1; + this.syntax = t2; + }, + fromImport() { + var t1 = type$.nullable_CanonicalizeContext._as($.Zone__current.$index(0, B.Symbol__canonicalizeContext)); + t1 = t1 == null ? null : t1._fromImport; + return t1 === true; + }, + canonicalizeContext() { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); + $label0$0: { + if (_0_0 == null) + A.throwExpression(A.StateError$(string$.canoni)); + if (_0_0 instanceof A.CanonicalizeContext) { + t1 = _0_0; + break $label0$0; + } + t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); + } + return t1; + }, + resolveImportPath(path) { + var t1, + extension = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + if (extension === ".sass" || extension === ".scss" || extension === ".css") { + t1 = A.fromImport() ? new A.resolveImportPath_closure(path, extension).call$0() : null; + return t1 == null ? A._exactlyOne(A._tryPath(path)) : t1; + } + t1 = A.fromImport() ? new A.resolveImportPath_closure0(path).call$0() : null; + if (t1 == null) + t1 = A._exactlyOne(A._tryPathWithExtensions(path)); + return t1 == null ? A._tryPathAsDirectory(path) : t1; + }, + _tryPathWithExtensions(path) { + var result = A._tryPath(path + ".sass"); + B.JSArray_methods.addAll$1(result, A._tryPath(path + ".scss")); + return result.length !== 0 ? result : A._tryPath(path + ".css"); + }, + _tryPath(path) { + var t1 = $.$get$context(), + partial = A.join(t1.dirname$1(path), "_" + A.ParsedPath_ParsedPath$parse(path, t1.style).get$basename(), null); + t1 = A._setArrayType([], type$.JSArray_String); + if (A.fileExists(partial)) + t1.push(partial); + if (A.fileExists(path)) + t1.push(path); + return t1; + }, + _tryPathAsDirectory(path) { + var t1; + if (!A.dirExists(path)) + return null; + t1 = A.fromImport() ? new A._tryPathAsDirectory_closure(path).call$0() : null; + return t1 == null ? A._exactlyOne(A._tryPathWithExtensions(A.join(path, "index", null))) : t1; + }, + _exactlyOne(paths) { + var _0_1, t1, path; + $label0$0: { + _0_1 = paths.length; + if (_0_1 <= 0) { + t1 = null; + break $label0$0; + } + if (_0_1 === 1) { + path = paths[0]; + t1 = path; + break $label0$0; + } + t1 = A.throwExpression(string$.It_s_n + B.JSArray_methods.map$1$1(paths, new A._exactlyOne_closure(), type$.String).join$1(0, "\n")); + } + return t1; + }, + resolveImportPath_closure: function resolveImportPath_closure(t0, t1) { + this.path = t0; + this.extension = t1; + }, + resolveImportPath_closure0: function resolveImportPath_closure0(t0) { + this.path = t0; + }, + _tryPathAsDirectory_closure: function _tryPathAsDirectory_closure(t0) { + this.path = t0; + }, + _exactlyOne_closure: function _exactlyOne_closure() { + }, + InterpolationBuffer: function InterpolationBuffer(t0, t1, t2) { + this._interpolation_buffer$_text = t0; + this._interpolation_buffer$_contents = t1; + this._spans = t2; + }, + InterpolationMap$(_interpolation, targetOffsets) { + var t1 = A.List_List$unmodifiable(targetOffsets, type$.int), + t2 = _interpolation.contents.length, + expectedLocations = Math.max(0, t2 - 1); + if (t1.length !== expectedLocations) + A.throwExpression(A.ArgumentError$("InterpolationMap must have " + A.S(expectedLocations) + " targetOffsets if the interpolation has " + t2 + " components.", null)); + return new A.InterpolationMap(_interpolation, t1); + }, + InterpolationMap: function InterpolationMap(t0, t1) { + this._interpolation = t0; + this._targetOffsets = t1; + }, + InterpolationMap_mapException_closure: function InterpolationMap_mapException_closure() { + }, + _realCasePath(path) { + var prefix, _null = null, + t1 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : _null; + t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (!t1) + return path; + t1 = A.isNodeJs() ? self.process : _null; + if (J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + prefix = B.JSString_methods.substring$2(path, 0, $.$get$context().style.rootLength$1(path)); + t1 = prefix.length; + if (t1 !== 0 && A.CharacterExtension_get_isAlphabetic(prefix.charCodeAt(0))) + path = prefix.toUpperCase() + B.JSString_methods.substring$1(path, t1); + } + return new A._realCasePath_helper().call$1(path); + }, + _realCasePath_helper: function _realCasePath_helper() { + }, + _realCasePath_helper_closure: function _realCasePath_helper_closure(t0, t1, t2, t3) { + var _ = this; + _.path = t0; + _.realPath = t1; + _.helper = t2; + _.dirname = t3; + }, + _realCasePath_helper__closure: function _realCasePath_helper__closure(t0) { + this.basename = t0; + }, + printError(message) { + var t2, + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) { + t1 = J.get$stderr$x(t1); + J.write$1$x(t1, A.S(message == null ? "" : message) + "\n"); + } else { + t1 = self.console; + t2 = message == null ? null : J.toString$0$(message); + J.error$1$x(t1, t2 == null ? "" : t2); + } + }, + readFile(path) { + var contents, sourceFile, t1, i; + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("readFile() is only supported on Node.js")); + contents = A._asString(A._readFile(path, "utf8")); + if (!B.JSString_methods.contains$1(contents, "\ufffd")) + return contents; + sourceFile = A.SourceFile$fromString(contents, $.$get$context().toUri$1(path)); + for (t1 = contents.length, i = 0; i < t1; ++i) { + if (contents.charCodeAt(i) !== 65533) + continue; + throw A.wrapException(A.SassException$("Invalid UTF-8.", A.FileLocation$_(sourceFile, i).pointSpan$0(), null)); + } + return contents; + }, + _readFile(path, encoding) { + return A._systemErrorToFileSystemException(new A._readFile_closure(path, encoding)); + }, + writeFile(path, contents) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("writeFile() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.writeFile_closure(path, contents)); + }, + deleteFile(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("deleteFile() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.deleteFile_closure(path)); + }, + readStdin() { + return A.readStdin$body(); + }, + readStdin$body() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, t3, completer, sink, t1, t2; + var $async$readStdin = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = A.isNodeJs() ? self.process : null; + if (t2 == null) + throw A.wrapException(A.UnsupportedError$("readStdin() is only supported on Node.js")); + t3 = new A._Future($.Zone__current, type$._Future_String); + completer = new A._AsyncCompleter(t3, type$._AsyncCompleter_String); + t1.contents = null; + sink = new A._StringCallbackSink(new A.readStdin_closure(t1, completer), new A.StringBuffer("")).asUtf8Sink$1(false); + t1 = J.getInterceptor$x(t2); + J.on$2$x(t1.get$stdin(t2), "data", A.allowInterop(new A.readStdin_closure0(sink))); + J.on$2$x(t1.get$stdin(t2), "end", A.allowInterop(new A.readStdin_closure1(sink))); + J.on$2$x(t1.get$stdin(t2), "error", A.allowInterop(new A.readStdin_closure2(completer))); + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$readStdin, $async$completer); + }, + fileExists(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$(string$.fileEx)); + return A._systemErrorToFileSystemException(new A.fileExists_closure(path)); + }, + dirExists(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("dirExists() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.dirExists_closure(path)); + }, + linkExists(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$(string$.linkEx)); + return A._systemErrorToFileSystemException(new A.linkExists_closure(path)); + }, + ensureDir(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("ensureDir() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.ensureDir_closure(path)); + }, + listDir(path, recursive) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("listDir() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.listDir_closure(recursive, path)); + }, + realpath(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("listDir() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.realpath_closure(path)); + }, + modificationTime(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("modificationTime() is only supported on Node.js")); + return A._systemErrorToFileSystemException(new A.modificationTime_closure(path)); + }, + getEnvironmentVariable($name) { + var t1 = A.isNodeJs() ? self.process : null, + env = t1 == null ? null : J.get$env$x(t1); + if (env == null) + t1 = null; + else + t1 = A._asStringQ(env[$name]); + return t1; + }, + _systemErrorToFileSystemException(callback) { + var error, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + if (!type$.JsSystemError._is(error)) + throw exception; + t1 = error; + t2 = J.getInterceptor$x(t1); + throw A.wrapException(new A.FileSystemException(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); + } + }, + hasTerminal() { + var t1 = A.isNodeJs() ? self.process : null; + return J.$eq$(t1 == null ? null : J.get$isTTY$x(J.get$stdout$x(t1)), true); + }, + isWindows() { + var t1 = A.isNodeJs() ? self.process : null; + return J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32"); + }, + watchDir(path, poll) { + return A.watchDir$body(path, poll); + }, + watchDir$body(path, poll) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Stream_WatchEvent), + $async$returnValue, _0_0, t2, parcel, controller, watcher, t3, t1, $async$temp1, $async$temp2, $async$temp3; + var $async$watchDir = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("watchDir() is only supported on Node.js")); + t1.controller = null; + _0_0 = init.G.parcel_watcher; + if (_0_0 != null) { + t2 = !poll; + parcel = _0_0; + } else { + parcel = null; + t2 = false; + } + $async$goto = t2 ? 3 : 5; + break; + case 3: + // then + $async$temp1 = t1; + $async$temp2 = A; + $async$temp3 = A; + $async$goto = 6; + return A._asyncAwait(A.ParcelWatcher_subscribe(parcel, path, new A.watchDir_closure0(t1)), $async$watchDir); + case 6: + // returning from await. + controller = $async$temp1.controller = $async$temp2.StreamController_StreamController(new $async$temp3.watchDir_closure($async$result), null, null, null, false, type$.WatchEvent); + $async$returnValue = new A._ControllerStream(controller, A._instanceType(controller)._eval$1("_ControllerStream<1>")); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + watcher = J.watch$2$x(self.chokidar, path, {usePolling: poll}); + t2 = J.getInterceptor$x(watcher); + t2.on$2(watcher, "add", A.allowInterop(new A.watchDir_closure1(t1))); + t2.on$2(watcher, "change", A.allowInterop(new A.watchDir_closure2(t1))); + t2.on$2(watcher, "unlink", A.allowInterop(new A.watchDir_closure3(t1))); + t2.on$2(watcher, "error", A.allowInterop(new A.watchDir_closure4(t1))); + t3 = new A._Future($.Zone__current, type$._Future_Stream_WatchEvent); + t2.on$2(watcher, "ready", A.allowInterop(new A.watchDir_closure5(t1, watcher, new A._AsyncCompleter(t3, type$._AsyncCompleter_Stream_WatchEvent)))); + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$watchDir, $async$completer); + }, + FileSystemException: function FileSystemException(t0, t1) { + this.message = t0; + this.path = t1; + }, + _readFile_closure: function _readFile_closure(t0, t1) { + this.path = t0; + this.encoding = t1; + }, + writeFile_closure: function writeFile_closure(t0, t1) { + this.path = t0; + this.contents = t1; + }, + deleteFile_closure: function deleteFile_closure(t0) { + this.path = t0; + }, + readStdin_closure: function readStdin_closure(t0, t1) { + this._box_0 = t0; + this.completer = t1; + }, + readStdin_closure0: function readStdin_closure0(t0) { + this.sink = t0; + }, + readStdin_closure1: function readStdin_closure1(t0) { + this.sink = t0; + }, + readStdin_closure2: function readStdin_closure2(t0) { + this.completer = t0; + }, + fileExists_closure: function fileExists_closure(t0) { + this.path = t0; + }, + dirExists_closure: function dirExists_closure(t0) { + this.path = t0; + }, + linkExists_closure: function linkExists_closure(t0) { + this.path = t0; + }, + ensureDir_closure: function ensureDir_closure(t0) { + this.path = t0; + }, + listDir_closure: function listDir_closure(t0, t1) { + this.recursive = t0; + this.path = t1; + }, + listDir__closure: function listDir__closure(t0) { + this.path = t0; + }, + listDir__closure0: function listDir__closure0() { + }, + listDir_closure_list: function listDir_closure_list() { + }, + listDir__list_closure: function listDir__list_closure(t0, t1) { + this.parent = t0; + this.list = t1; + }, + realpath_closure: function realpath_closure(t0) { + this.path = t0; + }, + modificationTime_closure: function modificationTime_closure(t0) { + this.path = t0; + }, + watchDir_closure0: function watchDir_closure0(t0) { + this._box_0 = t0; + }, + watchDir_closure: function watchDir_closure(t0) { + this.subscription = t0; + }, + watchDir_closure1: function watchDir_closure1(t0) { + this._box_0 = t0; + }, + watchDir_closure2: function watchDir_closure2(t0) { + this._box_0 = t0; + }, + watchDir_closure3: function watchDir_closure3(t0) { + this._box_0 = t0; + }, + watchDir_closure4: function watchDir_closure4(t0) { + this._box_0 = t0; + }, + watchDir_closure5: function watchDir_closure5(t0, t1, t2) { + this._box_0 = t0; + this.watcher = t1; + this.completer = t2; + }, + watchDir__closure: function watchDir__closure(t0) { + this.watcher = t0; + }, + JSArray0: function JSArray0() { + }, + Chokidar: function Chokidar() { + }, + ChokidarOptions: function ChokidarOptions() { + }, + ChokidarWatcher: function ChokidarWatcher() { + }, + JSFunction: function JSFunction() { + }, + ImmutableList: function ImmutableList() { + }, + ImmutableMap: function ImmutableMap() { + }, + NodeImporterResult: function NodeImporterResult() { + }, + RenderContext: function RenderContext() { + }, + RenderContextOptions: function RenderContextOptions() { + }, + RenderContextResult: function RenderContextResult() { + }, + RenderContextResultStats: function RenderContextResultStats() { + }, + JSModule: function JSModule() { + }, + JSModuleRequire: function JSModuleRequire() { + }, + ParcelWatcher_subscribe(_this, path, callback) { + var result, + t1 = new A.ParcelWatcher_subscribe_closure(callback); + if (typeof t1 == "function") + A.throwExpression(A.ArgumentError$("Attempting to rewrap a JS function.", null)); + result = function(_call, f) { + return function(arg1, arg2) { + return _call(f, arg1, arg2, arguments.length); + }; + }(A._callDartFunctionFast2, t1); + result[$.$get$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME()] = t1; + return A.promiseToFuture(_this.subscribe(path, result), type$.JSObject); + }, + ParcelWatcher_subscribe_closure: function ParcelWatcher_subscribe_closure(t0) { + this.callback = t0; + }, + JSClass: function JSClass() { + }, + JSUrl: function JSUrl() { + }, + jsThrow0(error) { + return type$.Never._as($.$get$_jsThrow0().call$1(error)); + }, + _PropertyDescriptor: function _PropertyDescriptor() { + }, + _RequireMain: function _RequireMain() { + }, + WarnForDeprecation_warnForDeprecation(_this, deprecation, message, span, trace) { + _this.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + }, + LoggerWithDeprecationType: function LoggerWithDeprecationType() { + }, + _QuietLogger: function _QuietLogger() { + }, + DefaultLogger: function DefaultLogger() { + }, + DeprecationProcessingLogger: function DeprecationProcessingLogger(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._warningCounts = t0; + _._inner = t1; + _.silenceDeprecations = t2; + _.fatalDeprecations = t3; + _.futureDeprecations = t4; + _.limitRepetition = t5; + }, + DeprecationProcessingLogger_summarize_closure: function DeprecationProcessingLogger_summarize_closure() { + }, + DeprecationProcessingLogger_summarize_closure0: function DeprecationProcessingLogger_summarize_closure0() { + }, + StderrLogger: function StderrLogger(t0) { + this.color = t0; + }, + TrackingLogger: function TrackingLogger(t0) { + this._tracking$_logger = t0; + this._emittedDebug = this._emittedWarning = false; + }, + BuiltInModule$($name, functions, mixins, variables, $T) { + var t1 = A._Uri__Uri(null, $name, null, "sass"), + t2 = A.BuiltInModule__callableMap(functions, $T), + t3 = A.BuiltInModule__callableMap(mixins, $T), + t4 = variables == null ? B.Map_empty6 : new A.UnmodifiableMapView(variables, type$.UnmodifiableMapView_String_Value); + return new A.BuiltInModule(t1, t2, t3, t4, $T._eval$1("BuiltInModule<0>")); + }, + BuiltInModule__callableMap(callables, $T) { + var t2, _i, callable, + t1 = type$.String; + if (callables == null) + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + else { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + for (t2 = callables.length, _i = 0; _i < callables.length; callables.length === t2 || (0, A.throwConcurrentModificationError)(callables), ++_i) { + callable = callables[_i]; + t1.$indexSet(0, callable.get$name(callable), callable); + } + t1 = new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + } + return new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + }, + BuiltInModule: function BuiltInModule(t0, t1, t2, t3, t4) { + var _ = this; + _.url = t0; + _.functions = t1; + _.mixins = t2; + _.variables = t3; + _.$ti = t4; + }, + ForwardedModuleView_ifNecessary(inner, rule, $T) { + var t2, + t1 = false; + if (rule.prefix == null) + if (rule.shownMixinsAndFunctions == null) + if (rule.shownVariables == null) { + t2 = rule.hiddenMixinsAndFunctions; + t2 = t2 == null ? null : t2._base.get$isEmpty(0); + if (t2 === true) { + t1 = rule.hiddenVariables; + t1 = t1 == null ? null : t1._base.get$isEmpty(0); + t1 = t1 === true; + } + } + if (t1) + return inner; + else + return A.ForwardedModuleView$(inner, rule, $T); + }, + ForwardedModuleView$(_inner, _rule, $T) { + var t1 = _rule.prefix, + t2 = _rule.shownVariables, + t3 = _rule.hiddenVariables, + t4 = _rule.shownMixinsAndFunctions, + t5 = _rule.hiddenMixinsAndFunctions; + return new A.ForwardedModuleView(_inner, _rule, A.ForwardedModuleView__forwardedMap(_inner.get$variables(), t1, t2, t3, type$.Value), A.ForwardedModuleView__forwardedMap(_inner.get$variableNodes(), t1, t2, t3, type$.AstNode), A.ForwardedModuleView__forwardedMap(_inner.get$functions(_inner), t1, t4, t5, $T), A.ForwardedModuleView__forwardedMap(_inner.get$mixins(), t1, t4, t5, $T), $T._eval$1("ForwardedModuleView<0>")); + }, + ForwardedModuleView__forwardedMap(map, prefix, safelist, blocklist, $V) { + var t1 = prefix == null, + t2 = false; + if (t1) + if (safelist == null) + t2 = blocklist == null || blocklist._base.get$isEmpty(0); + if (t2) + return map; + if (!t1) + map = new A.PrefixedMapView(map, prefix, $V._eval$1("PrefixedMapView<0>")); + if (safelist != null) + map = new A.LimitedMapView(map, safelist._base.intersection$1(new A.MapKeySet(map, type$.MapKeySet_nullable_Object)), type$.$env_1_1_String._bind$1($V)._eval$1("LimitedMapView<1,2>")); + else if (blocklist != null && blocklist._base.get$isNotEmpty(0)) + map = A.LimitedMapView$blocklist(map, blocklist, type$.String, $V); + return map; + }, + ForwardedModuleView: function ForwardedModuleView(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._forwarded_view$_inner = t0; + _._rule = t1; + _.variables = t2; + _.variableNodes = t3; + _.functions = t4; + _.mixins = t5; + _.$ti = t6; + }, + ShadowedModuleView_ifNecessary(inner, functions, mixins, variables, $T) { + return A.ShadowedModuleView__needsBlocklist(inner.get$variables(), variables) || A.ShadowedModuleView__needsBlocklist(inner.get$functions(inner), functions) || A.ShadowedModuleView__needsBlocklist(inner.get$mixins(), mixins) ? new A.ShadowedModuleView(inner, A.ShadowedModuleView__shadowedMap(inner.get$variables(), variables, type$.Value), A.ShadowedModuleView__shadowedMap(inner.get$variableNodes(), variables, type$.AstNode), A.ShadowedModuleView__shadowedMap(inner.get$functions(inner), functions, $T), A.ShadowedModuleView__shadowedMap(inner.get$mixins(), mixins, $T), $T._eval$1("ShadowedModuleView<0>")) : null; + }, + ShadowedModuleView__shadowedMap(map, blocklist, $V) { + var t1 = A.ShadowedModuleView__needsBlocklist(map, blocklist); + return !t1 ? map : A.LimitedMapView$blocklist(map, blocklist, type$.String, $V); + }, + ShadowedModuleView__needsBlocklist(map, blocklist) { + return map.get$isNotEmpty(map) && blocklist.any$1(0, map.get$containsKey()); + }, + ShadowedModuleView: function ShadowedModuleView(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._shadowed_view$_inner = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.$ti = t5; + }, + AtRootQueryParser: function AtRootQueryParser(t0, t1) { + this.scanner = t0; + this._interpolationMap = t1; + }, + AtRootQueryParser_parse_closure: function AtRootQueryParser_parse_closure(t0) { + this.$this = t0; + }, + _disallowedFunctionNames_closure: function _disallowedFunctionNames_closure() { + }, + CssParser: function CssParser(t0, t1, t2, t3, t4) { + var _ = this; + _._stylesheet$_parseSelectors = t0; + _._isUseAllowed = true; + _._inExpression = _._inParentheses = _._inStyleRule = _._inPlainCssFunction = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t1; + _.warnings = t2; + _.lastSilentComment = null; + _.scanner = t3; + _._interpolationMap = t4; + }, + KeyframeSelectorParser: function KeyframeSelectorParser(t0, t1) { + this.scanner = t0; + this._interpolationMap = t1; + }, + KeyframeSelectorParser_parse_closure: function KeyframeSelectorParser_parse_closure(t0) { + this.$this = t0; + }, + MediaQueryParser: function MediaQueryParser(t0, t1) { + this.scanner = t0; + this._interpolationMap = t1; + }, + MediaQueryParser_parse_closure: function MediaQueryParser_parse_closure(t0) { + this.$this = t0; + }, + Parser_isIdentifier(text) { + var exception; + try { + new A.Parser(A.SpanScanner$(text, null), null)._parseIdentifier$0(); + return true; + } catch (exception) { + if (type$.SassFormatException._is(A.unwrapException(exception))) + return false; + else + throw exception; + } + }, + Parser: function Parser(t0, t1) { + this.scanner = t0; + this._interpolationMap = t1; + }, + Parser__parseIdentifier_closure: function Parser__parseIdentifier_closure(t0) { + this.$this = t0; + }, + Parser_escape_closure: function Parser_escape_closure() { + }, + Parser_scanIdentChar_matches: function Parser_scanIdentChar_matches(t0, t1) { + this.caseSensitive = t0; + this.char = t1; + }, + Parser_spanFrom_closure: function Parser_spanFrom_closure(t0, t1) { + this.$this = t0; + this.span = t1; + }, + Parser_spanFromPosition_closure: function Parser_spanFromPosition_closure(t0, t1) { + this.$this = t0; + this.span = t1; + }, + SassParser: function SassParser(t0, t1, t2, t3, t4) { + var _ = this; + _._currentIndentation = 0; + _._spaces = _._nextIndentationEnd = _._nextIndentation = null; + _._stylesheet$_parseSelectors = t0; + _._isUseAllowed = true; + _._inExpression = _._inParentheses = _._inStyleRule = _._inPlainCssFunction = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t1; + _.warnings = t2; + _.lastSilentComment = null; + _.scanner = t3; + _._interpolationMap = t4; + }, + SassParser_styleRuleSelector_closure: function SassParser_styleRuleSelector_closure() { + }, + SassParser_children_closure: function SassParser_children_closure(t0, t1, t2) { + this.$this = t0; + this.child = t1; + this.children = t2; + }, + SassParser__peekIndentation_closure: function SassParser__peekIndentation_closure() { + }, + SassParser__peekIndentation_closure0: function SassParser__peekIndentation_closure0() { + }, + SassParser__tryTrailingSemicolon_closure: function SassParser__tryTrailingSemicolon_closure() { + }, + ScssParser$(contents, parseSelectors, url) { + return new A.ScssParser(false, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span), A.SpanScanner$(contents, url), null); + }, + ScssParser: function ScssParser(t0, t1, t2, t3, t4) { + var _ = this; + _._stylesheet$_parseSelectors = t0; + _._isUseAllowed = true; + _._inExpression = _._inParentheses = _._inStyleRule = _._inPlainCssFunction = _._stylesheet$_inUnknownAtRule = _._inControlDirective = _._inContentBlock = _._stylesheet$_inMixin = false; + _._globalVariables = t1; + _.warnings = t2; + _.lastSilentComment = null; + _.scanner = t3; + _._interpolationMap = t4; + }, + SelectorParser$(contents, allowParent, interpolationMap, logger, plainCss, url) { + return new A.SelectorParser(allowParent, plainCss, logger, A.SpanScanner$(contents, url), interpolationMap); + }, + SelectorParser: function SelectorParser(t0, t1, t2, t3, t4) { + var _ = this; + _._allowParent = t0; + _._plainCss = t1; + _._selector$_logger = t2; + _.scanner = t3; + _._interpolationMap = t4; + }, + SelectorParser_parse_closure: function SelectorParser_parse_closure(t0) { + this.$this = t0; + }, + SelectorParser_parseCompoundSelector_closure: function SelectorParser_parseCompoundSelector_closure(t0) { + this.$this = t0; + }, + StylesheetParser: function StylesheetParser() { + }, + StylesheetParser_parse_closure: function StylesheetParser_parse_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure: function StylesheetParser_parse__closure(t0) { + this.$this = t0; + }, + StylesheetParser_parseParameterList_closure: function StylesheetParser_parseParameterList_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parseVariableDeclaration_closure: function StylesheetParser_parseVariableDeclaration_closure(t0) { + this.$this = t0; + }, + StylesheetParser_parseUseRule_closure: function StylesheetParser_parseUseRule_closure(t0) { + this.$this = t0; + }, + StylesheetParser__parseSingleProduction_closure: function StylesheetParser__parseSingleProduction_closure(t0, t1, t2) { + this.$this = t0; + this.production = t1; + this.T = t2; + }, + StylesheetParser__statement_closure: function StylesheetParser__statement_closure(t0) { + this.$this = t0; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure: function StylesheetParser_variableDeclarationWithoutNamespace_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure0: function StylesheetParser_variableDeclarationWithoutNamespace_closure0(t0) { + this.declaration = t0; + }, + StylesheetParser__declarationOrBuffer_closure: function StylesheetParser__declarationOrBuffer_closure(t0) { + this.$this = t0; + }, + StylesheetParser__declarationOrBuffer_closure0: function StylesheetParser__declarationOrBuffer_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__declarationOrBuffer_closure1: function StylesheetParser__declarationOrBuffer_closure1() { + }, + StylesheetParser__declarationOrBuffer_closure2: function StylesheetParser__declarationOrBuffer_closure2(t0) { + this.$this = t0; + }, + StylesheetParser__styleRule_closure: function StylesheetParser__styleRule_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.start = t2; + }, + StylesheetParser__withStyleRuleChildren_closure: function StylesheetParser__withStyleRuleChildren_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.nodeWithSpan = t1; + _.wasInStyleRule = t2; + _.create = t3; + _.T = t4; + }, + StylesheetParser__propertyOrVariableDeclaration_closure: function StylesheetParser__propertyOrVariableDeclaration_closure(t0) { + this.$this = t0; + }, + StylesheetParser__tryDeclarationChildren_closure: function StylesheetParser__tryDeclarationChildren_closure(t0, t1) { + this.name = t0; + this.value = t1; + }, + StylesheetParser__atRootRule_closure: function StylesheetParser__atRootRule_closure(t0) { + this.query = t0; + }, + StylesheetParser__atRootRule_closure0: function StylesheetParser__atRootRule_closure0() { + }, + StylesheetParser__eachRule_closure: function StylesheetParser__eachRule_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.wasInControlDirective = t1; + _.variables = t2; + _.list = t3; + }, + StylesheetParser__functionRule_closure: function StylesheetParser__functionRule_closure(t0, t1, t2) { + this.name = t0; + this.parameters = t1; + this.precedingComment = t2; + }, + StylesheetParser__forRule_closure: function StylesheetParser__forRule_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__forRule_closure0: function StylesheetParser__forRule_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInControlDirective = t2; + _.variable = t3; + _.from = t4; + _.to = t5; + }, + StylesheetParser__memberList_closure: function StylesheetParser__memberList_closure(t0, t1, t2) { + this.$this = t0; + this.variables = t1; + this.identifiers = t2; + }, + StylesheetParser__includeRule_closure: function StylesheetParser__includeRule_closure(t0) { + this.contentParameters_ = t0; + }, + StylesheetParser_mediaRule_closure: function StylesheetParser_mediaRule_closure(t0) { + this.query = t0; + }, + StylesheetParser__mixinRule_closure: function StylesheetParser__mixinRule_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.name = t1; + _.parameters = t2; + _.precedingComment = t3; + }, + StylesheetParser_mozDocumentRule_closure: function StylesheetParser_mozDocumentRule_closure(t0) { + this.$this = t0; + }, + StylesheetParser_mozDocumentRule_closure0: function StylesheetParser_mozDocumentRule_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.name = t2; + _.value = t3; + }, + StylesheetParser_supportsRule_closure: function StylesheetParser_supportsRule_closure(t0) { + this.condition = t0; + }, + StylesheetParser__whileRule_closure: function StylesheetParser__whileRule_closure(t0, t1, t2) { + this.$this = t0; + this.wasInControlDirective = t1; + this.condition = t2; + }, + StylesheetParser_unknownAtRule_closure: function StylesheetParser_unknownAtRule_closure(t0, t1) { + this._box_0 = t0; + this.name = t1; + }, + StylesheetParser__expression_resetState: function StylesheetParser__expression_resetState(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.start = t2; + }, + StylesheetParser__expression_resolveOneOperation: function StylesheetParser__expression_resolveOneOperation(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__expression_resolveOperations: function StylesheetParser__expression_resolveOperations(t0, t1) { + this._box_0 = t0; + this.resolveOneOperation = t1; + }, + StylesheetParser__expression_addSingleExpression: function StylesheetParser__expression_addSingleExpression(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.resetState = t2; + _.resolveOperations = t3; + }, + StylesheetParser__expression_addOperator: function StylesheetParser__expression_addOperator(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.resolveOneOperation = t2; + _.addSingleExpression = t3; + }, + StylesheetParser__expression_resolveSpaceExpressions: function StylesheetParser__expression_resolveSpaceExpressions(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOperations = t2; + }, + StylesheetParser_expressionUntilComma_closure: function StylesheetParser_expressionUntilComma_closure(t0) { + this.$this = t0; + }, + StylesheetParser__isHexColor_closure: function StylesheetParser__isHexColor_closure() { + }, + StylesheetParser__unicodeRange_closure: function StylesheetParser__unicodeRange_closure() { + }, + StylesheetParser__unicodeRange_closure0: function StylesheetParser__unicodeRange_closure0() { + }, + StylesheetParser_interpolatedStringToken_closure: function StylesheetParser_interpolatedStringToken_closure(t0) { + this.$this = t0; + }, + StylesheetParser_namespacedExpression_closure: function StylesheetParser_namespacedExpression_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_trySpecialFunction_closure: function StylesheetParser_trySpecialFunction_closure() { + }, + StylesheetParser__interpolatedDeclarationValue_closure: function StylesheetParser__interpolatedDeclarationValue_closure(t0) { + this.$this = t0; + }, + StylesheetParser__expressionUntilComparison_closure: function StylesheetParser__expressionUntilComparison_closure(t0) { + this.$this = t0; + }, + StylesheetParser__publicIdentifier_closure: function StylesheetParser__publicIdentifier_closure(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetNode$_(_stylesheet, importer, canonicalUrl, allUpstream) { + var t1 = new A.StylesheetNode(_stylesheet, importer, canonicalUrl, allUpstream._1, allUpstream._0, A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode)); + t1.StylesheetNode$_$4(_stylesheet, importer, canonicalUrl, allUpstream); + return t1; + }, + StylesheetGraph: function StylesheetGraph(t0, t1, t2) { + this._nodes = t0; + this.importCache = t1; + this._transitiveModificationTimes = t2; + }, + StylesheetGraph_modifiedSince_transitiveModificationTime: function StylesheetGraph_modifiedSince_transitiveModificationTime(t0, t1) { + this.$this = t0; + this.seenNodes = t1; + }, + StylesheetGraph_modifiedSince_transitiveModificationTime_closure: function StylesheetGraph_modifiedSince_transitiveModificationTime_closure(t0, t1, t2) { + this.node = t0; + this.seenNodes = t1; + this.transitiveModificationTime = t2; + }, + StylesheetGraph__add_closure: function StylesheetGraph__add_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.url = t1; + _.baseImporter = t2; + _.baseUrl = t3; + }, + StylesheetGraph_addCanonical_closure: function StylesheetGraph_addCanonical_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + }, + StylesheetGraph_reload_closure: function StylesheetGraph_reload_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.canonicalUrl = t2; + }, + StylesheetGraph__nodeFor_closure: function StylesheetGraph__nodeFor_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.url = t1; + _.baseImporter = t2; + _.baseUrl = t3; + _.forImport = t4; + }, + StylesheetGraph__nodeFor_closure0: function StylesheetGraph__nodeFor_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetNode: function StylesheetNode(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._stylesheet = t0; + _.importer = t1; + _.canonicalUrl = t2; + _._upstream = t3; + _._upstreamImports = t4; + _._downstream = t5; + }, + Syntax_forPath(path) { + var t1, + _0_0 = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + $label0$0: { + if (".sass" === _0_0) { + t1 = B.Syntax_Sass_1_sass; + break $label0$0; + } + if (".css" === _0_0) { + t1 = B.Syntax_CSS_2_css; + break $label0$0; + } + t1 = B.Syntax_SCSS_0_scss; + break $label0$0; + } + return t1; + }, + Syntax: function Syntax(t0, t1, t2) { + this._syntax$_name = t0; + this.index = t1; + this._name = t2; + }, + Box: function Box(t0, t1) { + this._box$_inner = t0; + this.$ti = t1; + }, + ModifiableBox: function ModifiableBox(t0, t1) { + this.value = t0; + this.$ti = t1; + }, + LazyFileSpan: function LazyFileSpan(t0) { + this._builder = t0; + this._lazy_file_span$_span = null; + }, + LimitedMapView$blocklist(_map, blocklist, $K, $V) { + var t2, key, + t1 = A.LinkedHashSet_LinkedHashSet$_empty($K); + for (t2 = _map.get$keys(_map), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + key = t2.get$current(t2); + if (!blocklist.contains$1(0, key)) + t1.add$1(0, key); + } + return new A.LimitedMapView(_map, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("LimitedMapView<1,2>")); + }, + LimitedMapView: function LimitedMapView(t0, t1, t2) { + this._limited_map_view$_map = t0; + this._limited_map_view$_keys = t1; + this.$ti = t2; + }, + MapExtensions_get_pairs(_this, $K, $V) { + var t1 = _this.get$entries(_this); + return t1.map$1$1(t1, new A.MapExtensions_get_pairs_closure($K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("+(1,2)")); + }, + MapExtensions_get_pairs_closure: function MapExtensions_get_pairs_closure(t0, t1) { + this.K = t0; + this.V = t1; + }, + MergedMapView$(maps, $K, $V) { + var t1 = $K._eval$1("@<0>")._bind$1($V); + t1 = new A.MergedMapView(A.LinkedHashMap_LinkedHashMap$_empty($K, t1._eval$1("Map<1,2>")), t1._eval$1("MergedMapView<1,2>")); + t1.MergedMapView$1(maps, $K, $V); + return t1; + }, + MergedMapView: function MergedMapView(t0, t1) { + this._mapsByKey = t0; + this.$ti = t1; + }, + MultiDirWatcher: function MultiDirWatcher(t0, t1, t2) { + this._watchers = t0; + this._group = t1; + this._poll = t2; + }, + MultiSpan: function MultiSpan(t0, t1, t2) { + this._multi_span$_primary = t0; + this.primaryLabel = t1; + this.secondarySpans = t2; + }, + NoSourceMapBuffer: function NoSourceMapBuffer(t0) { + this._no_source_map_buffer$_buffer = t0; + }, + PrefixedMapView: function PrefixedMapView(t0, t1, t2) { + this._prefixed_map_view$_map = t0; + this._prefix = t1; + this.$ti = t2; + }, + _PrefixedKeys: function _PrefixedKeys(t0) { + this._view = t0; + }, + _PrefixedKeys_iterator_closure: function _PrefixedKeys_iterator_closure(t0) { + this.$this = t0; + }, + PublicMemberMapView: function PublicMemberMapView(t0, t1) { + this._public_member_map_view$_inner = t0; + this.$ti = t1; + }, + SourceMapBuffer: function SourceMapBuffer(t0, t1) { + var _ = this; + _._source_map_buffer$_buffer = t0; + _._entries = t1; + _._column = _._line = 0; + _._inSpan = false; + }, + SourceMapBuffer_buildSourceMap_closure: function SourceMapBuffer_buildSourceMap_closure(t0, t1) { + this._box_0 = t0; + this.prefixLength = t1; + }, + UnprefixedMapView: function UnprefixedMapView(t0, t1, t2) { + this._unprefixed_map_view$_map = t0; + this._unprefixed_map_view$_prefix = t1; + this.$ti = t2; + }, + _UnprefixedKeys: function _UnprefixedKeys(t0) { + this._unprefixed_map_view$_view = t0; + }, + _UnprefixedKeys_iterator_closure: function _UnprefixedKeys_iterator_closure(t0) { + this.$this = t0; + }, + _UnprefixedKeys_iterator_closure0: function _UnprefixedKeys_iterator_closure0(t0) { + this.$this = t0; + }, + toSentence(iter, conjunction) { + if (iter.get$length(iter) === 1) + return J.toString$0$(iter.get$first(iter)); + return A.IterableExtension_get_exceptLast(iter).join$1(0, ", ") + (" " + conjunction + " " + A.S(iter.get$last(iter))); + }, + indent(string, indentation) { + return new A.MappedListIterable(A._setArrayType(string.split("\n"), type$.JSArray_String), new A.indent_closure(indentation), type$.MappedListIterable_String_String).join$1(0, "\n"); + }, + pluralize($name, number, plural) { + if (number === 1) + return $name; + if (plural != null) + return plural; + return $name + "s"; + }, + trimAscii(string, excludeEscape) { + var t1, + start = A._firstNonWhitespace(string); + if (start == null) + t1 = ""; + else { + t1 = A._lastNonWhitespace(string, true); + t1.toString; + t1 = B.JSString_methods.substring$2(string, start, t1 + 1); + } + return t1; + }, + trimAsciiRight(string, excludeEscape) { + var end = A._lastNonWhitespace(string, excludeEscape); + return end == null ? "" : B.JSString_methods.substring$2(string, 0, end + 1); + }, + _firstNonWhitespace(string) { + var t1, i, t2; + for (t1 = string.length, i = 0; i < t1; ++i) { + t2 = string.charCodeAt(i); + if (!(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12)) + return i; + } + return null; + }, + _lastNonWhitespace(string, excludeEscape) { + var i, i0, codeUnit; + for (i = string.length - 1, i0 = i; i0 >= 0; --i0) { + codeUnit = string.charCodeAt(i0); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) + if (excludeEscape && i0 !== 0 && i0 !== i && codeUnit === 92) + return i0 + 1; + else + return i0; + } + return null; + }, + isPublic(member) { + var start = member.charCodeAt(0); + return start !== 45 && start !== 95; + }, + flattenVertically(iterable, $T) { + var result, + t1 = iterable.$ti._eval$1("@")._bind$1($T._eval$1("QueueList<0>"))._eval$1("MappedListIterable<1,2>"), + queues = A.List_List$_of(new A.MappedListIterable(iterable, new A.flattenVertically_closure($T), t1), t1._eval$1("ListIterable.E")); + if (queues.length === 1) + return B.JSArray_methods.get$first(queues); + result = A._setArrayType([], $T._eval$1("JSArray<0>")); + while (queues.length !== 0) { + queues.$flags & 1 && A.throwUnsupportedOperation(queues, 16); + B.JSArray_methods._removeWhere$2(queues, new A.flattenVertically_closure0(result, $T), true); + } + return result; + }, + codepointIndexToCodeUnitIndex(string, codepointIndex) { + var codeUnitIndex, i, codeUnitIndex0; + for (codeUnitIndex = 0, i = 0; i < codepointIndex; ++i) { + codeUnitIndex0 = codeUnitIndex + 1; + codeUnitIndex = string.charCodeAt(codeUnitIndex) >>> 10 === 54 ? codeUnitIndex0 + 1 : codeUnitIndex0; + } + return codeUnitIndex; + }, + codeUnitIndexToCodepointIndex(string, codeUnitIndex) { + var codepointIndex, i; + for (codepointIndex = 0, i = 0; i < codeUnitIndex; i = (string.charCodeAt(i) >>> 10 === 54 ? i + 1 : i) + 1) + ++codepointIndex; + return codepointIndex; + }, + frameForSpan(span, member, url) { + var t2, t3, + t1 = url == null ? span.get$sourceUrl(span) : url; + if (t1 == null) + t1 = $.$get$_noSourceUrl(); + t2 = span.get$start(span); + t2 = t2.file.getLine$1(t2.offset); + t3 = span.get$start(span); + return new A.Frame(t1, t2 + 1, t3.file.getColumn$1(t3.offset) + 1, member); + }, + declarationName(span) { + var text = span.get$text(); + return A.trimAsciiRight(B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")), false); + }, + unvendor($name) { + var i, + t1 = $name.length; + if (t1 < 2) + return $name; + if ($name.charCodeAt(0) !== 45) + return $name; + if ($name.charCodeAt(1) === 45) + return $name; + for (i = 2; i < t1; ++i) + if ($name.charCodeAt(i) === 45) + return B.JSString_methods.substring$1($name, i + 1); + return $name; + }, + equalsIgnoreCase(string1, string2) { + var t1, i; + if (string1 === string2) + return true; + if (string1 == null) + return false; + t1 = string1.length; + if (t1 !== string2.length) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase(string1.charCodeAt(i), string2.charCodeAt(i))) + return false; + return true; + }, + startsWithIgnoreCase(string, prefix) { + var i, + t1 = prefix.length; + if (string.length < t1) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase(string.charCodeAt(i), prefix.charCodeAt(i))) + return false; + return true; + }, + mapInPlace(list, $function) { + var i; + for (i = 0; i < list.length; ++i) + list[i] = $function.call$1(list[i]); + }, + longestCommonSubsequence(list1, list2, select, $T) { + var t1, _i, selections, i, i0, j, selection, j0, + _length = list1.get$length(0) + 1, + lengths = J.JSArray_JSArray$allocateFixed(_length, type$.List_int); + for (t1 = type$.int, _i = 0; _i < _length; ++_i) + lengths[_i] = A.List_List$filled(((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0) + 1, 0, false, t1); + _length = list1.get$length(0); + selections = J.JSArray_JSArray$allocateFixed(_length, $T._eval$1("List<0?>")); + for (t1 = $T._eval$1("0?"), _i = 0; _i < _length; ++_i) + selections[_i] = A.List_List$filled((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0, null, false, t1); + for (i = 0; i < (list1._queue_list$_tail - list1._queue_list$_head & J.get$length$asx(list1._queue_list$_table) - 1) >>> 0; i = i0) + for (i0 = i + 1, j = 0; j < (list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0; j = j0) { + selection = select.call$2(list1.$index(0, i), list2.$index(0, j)); + selections[i][j] = selection; + t1 = lengths[i0]; + j0 = j + 1; + t1[j0] = selection == null ? Math.max(t1[j], lengths[i][j0]) : lengths[i][j] + 1; + } + return new A.longestCommonSubsequence_backtrack(selections, lengths, $T).call$2(list1.get$length(0) - 1, list2.get$length(0) - 1); + }, + removeFirstWhere(list, test, orElse) { + var i; + for (i = 0; i < list.length; ++i) { + if (!test.call$1(list[i])) + continue; + B.JSArray_methods.removeAt$1(list, i); + return; + } + orElse.call$0(); + }, + mapAddAll2(destination, source, $K1, $K2, $V) { + source.forEach$1(0, new A.mapAddAll2_closure(destination, $K1, $K2, $V)); + }, + setAll(map, keys, value) { + var t1; + for (t1 = keys.get$iterator(keys); t1.moveNext$0();) + map.$indexSet(0, t1.get$current(t1), value); + }, + rotateSlice(list, start, end) { + var i, next, + element = list.$index(0, end - 1); + for (i = start; i < end; ++i, element = next) { + next = list.$index(0, i); + list.$indexSet(0, i, element); + } + }, + mapAsync(iterable, callback, $E, $F) { + return A.mapAsync$body(iterable, callback, $E, $F, $F._eval$1("Iterable<0>")); + }, + mapAsync$body(iterable, callback, $E, $F, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t2, _i, t1, $async$temp1; + var $async$mapAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], $F._eval$1("JSArray<0>")); + t2 = iterable.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(callback.call$1(iterable[_i]), $async$mapAsync); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$mapAsync, $async$completer); + }, + putIfAbsentAsync(map, key, ifAbsent, $K, $V) { + return A.putIfAbsentAsync$body(map, key, ifAbsent, $K, $V, $V); + }, + putIfAbsentAsync$body(map, key, ifAbsent, $K, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t1, value; + var $async$putIfAbsentAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (map.containsKey$1(key)) { + t1 = map.$index(0, key); + $async$returnValue = t1 == null ? $V._as(t1) : t1; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait(ifAbsent.call$0(), $async$putIfAbsentAsync); + case 3: + // returning from await. + value = $async$result; + map.$indexSet(0, key, value); + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$putIfAbsentAsync, $async$completer); + }, + copyMapOfMap(map, $K1, $K2, $V) { + var t3, key, child, + t1 = $K2._eval$1("@<0>")._bind$1($V)._eval$1("Map<1,2>"), + t2 = A.LinkedHashMap_LinkedHashMap$_empty($K1, t1); + for (t1 = A.MapExtensions_get_pairs(map, $K1, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + key = t3._0; + child = t3._1; + t3 = A.LinkedHashMap_LinkedHashMap(null, null, null, $K2, $V); + t3.addAll$1(0, child); + t2.$indexSet(0, key, t3); + } + return t2; + }, + copyMapOfList(map, $K, $E) { + var t3, + t1 = $E._eval$1("List<0>"), + t2 = A.LinkedHashMap_LinkedHashMap$_empty($K, t1); + for (t1 = A.MapExtensions_get_pairs(map, $K, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + t2.$indexSet(0, t3._0, J.toList$0$ax(t3._1)); + } + return t2; + }, + consumeEscapedCharacter(scanner) { + var _1_0, value, i, next, t1; + scanner.expectChar$1(92); + _1_0 = scanner.peekChar$0(); + if (_1_0 == null) + return 65533; + if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) + scanner.error$1(0, "Expected escape sequence."); + if (A.CharacterExtension_get_isHex(_1_0)) { + for (value = 0, i = 0; i < 6; ++i) { + next = scanner.peekChar$0(); + if (next != null) { + t1 = true; + if (!(next >= 48 && next <= 57)) + if (!(next >= 97 && next <= 102)) + t1 = next >= 65 && next <= 70; + t1 = !t1; + } else + t1 = true; + if (t1) + break; + value = (value << 4 >>> 0) + A.asHex(scanner.readChar$0()); + } + t1 = scanner.peekChar$0(); + if (t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12) + scanner.readChar$0(); + $label0$1: { + if (0 !== value) + t1 = value >= 55296 && value <= 57343 || value >= 1114111; + else + t1 = true; + if (t1) { + t1 = 65533; + break $label0$1; + } + t1 = value; + break $label0$1; + } + return t1; + } + return scanner.readChar$0(); + }, + throwWithTrace(error, originalError, trace) { + var t1 = A.getTrace(originalError); + A.attachTrace(error, t1 == null ? trace : t1); + throw A.wrapException(error); + }, + attachTrace(error, trace) { + var t1; + if (trace.toString$0(0).length === 0) + return; + t1 = $.$get$_traces(); + A.Expando__checkType(error); + if (t1._jsWeakMap.get(error) == null) + t1.$indexSet(0, error, trace); + }, + getTrace(error) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + t1 = null; + else { + t1 = $.$get$_traces(); + A.Expando__checkType(error); + t1 = t1._jsWeakMap.get(error); + } + return t1; + }, + indent_closure: function indent_closure(t0) { + this.indentation = t0; + }, + flattenVertically_closure: function flattenVertically_closure(t0) { + this.T = t0; + }, + flattenVertically_closure0: function flattenVertically_closure0(t0, t1) { + this.result = t0; + this.T = t1; + }, + longestCommonSubsequence_backtrack: function longestCommonSubsequence_backtrack(t0, t1, t2) { + this.selections = t0; + this.lengths = t1; + this.T = t2; + }, + mapAddAll2_closure: function mapAddAll2_closure(t0, t1, t2, t3) { + var _ = this; + _.destination = t0; + _.K1 = t1; + _.K2 = t2; + _.V = t3; + }, + SassApiValue_assertSelector(_this, allowParent, $name) { + var error, stackTrace, t1, exception, + string = _this._selectorString$1($name); + try { + t1 = A.EvaluationContext_currentOrNull(); + if (t1 == null) + t1 = A.throwExpression(A.StateError$(string$.No_Sass)); + t1 = A.SelectorList_SelectorList$parse(string, allowParent, null, new A._EvaluationContextLogger(t1), false); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace(new A.SassScriptException($name == null ? t1 : "$" + $name + ": " + t1), error, stackTrace); + } else + throw exception; + } + }, + SassApiValue_assertCompoundSelector(_this, $name) { + var error, stackTrace, t1, exception, + allowParent = false, + string = _this._selectorString$1($name); + try { + t1 = A.EvaluationContext_currentOrNull(); + if (t1 == null) + t1 = A.throwExpression(A.StateError$(string$.No_Sass)); + t1 = A.SelectorParser$(string, allowParent, null, new A._EvaluationContextLogger(t1), false, null).parseCompoundSelector$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace(new A.SassScriptException("$" + $name + ": " + t1), error, stackTrace); + } else + throw exception; + } + }, + Value: function Value() { + }, + SassArgumentList$(contents, keywords, separator) { + var t1 = type$.Value; + t1 = new A.SassArgumentList(A.ConstantMap_ConstantMap$from(keywords, type$.String, t1), A.List_List$unmodifiable(contents, t1), separator, false); + t1.SassList$3$brackets(contents, separator, false); + return t1; + }, + SassArgumentList: function SassArgumentList(t0, t1, t2, t3) { + var _ = this; + _._keywords = t0; + _._wereKeywordsAccessed = false; + _._list$_contents = t1; + _._separator = t2; + _._hasBrackets = t3; + }, + SassBoolean: function SassBoolean(t0) { + this.value = t0; + }, + SassCalculation_calc(argument) { + var t1, + _0_0 = A.SassCalculation__simplify(argument); + $label0$0: { + if (_0_0 instanceof A.SassNumber) { + t1 = _0_0; + break $label0$0; + } + if (_0_0 instanceof A.SassCalculation) { + t1 = _0_0; + break $label0$0; + } + t1 = new A.SassCalculation("calc", A.List_List$unmodifiable([_0_0], type$.Object)); + break $label0$0; + } + return t1; + }, + SassCalculation_min($arguments) { + var minimum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("min() must have at least one argument.", null)); + for (minimum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber) + t2 = minimum != null && !minimum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + minimum = null; + break; + } else if (minimum == null || minimum.greaterThan$1(arg).value) + minimum = arg; + } + if (minimum != null) + return minimum; + A.SassCalculation__verifyCompatibleNumbers(args); + return new A.SassCalculation("min", args); + }, + SassCalculation_max($arguments) { + var maximum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("max() must have at least one argument.", null)); + for (maximum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber) + t2 = maximum != null && !maximum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + maximum = null; + break; + } else if (maximum == null || maximum.lessThan$1(arg).value) + maximum = arg; + } + if (maximum != null) + return maximum; + A.SassCalculation__verifyCompatibleNumbers(args); + return new A.SassCalculation("max", args); + }, + SassCalculation_hypot($arguments) { + var first, subtotal, i, number, value, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("hypot() must have at least one argument.", null)); + A.SassCalculation__verifyCompatibleNumbers(args); + first = B.JSArray_methods.get$first(args); + if (!(first instanceof A.SassNumber) || first.hasUnit$1("%")) + return new A.SassCalculation("hypot", args); + for (subtotal = 0, i = 0; i < t1;) { + number = args[i]; + if (!(number instanceof A.SassNumber) || !number.hasCompatibleUnits$1(first)) + return new A.SassCalculation("hypot", args); + ++i; + value = number.convertValueToMatch$3(first, "numbers[" + i + "]", "numbers[1]"); + subtotal += value * value; + } + t1 = Math.sqrt(subtotal); + t2 = first.get$numeratorUnits(first); + return A.SassNumber_SassNumber$withUnits(t1, first.get$denominatorUnits(first), t2); + }, + SassCalculation_abs(argument) { + argument = A.SassCalculation__simplify(argument); + if (!(argument instanceof A.SassNumber)) + return new A.SassCalculation("abs", A._setArrayType([argument], type$.JSArray_Object)); + if (argument.hasUnit$1("%")) + A.warnForDeprecation(string$.Passinp + argument.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + argument.toString$0(0) + string$.x7dx29_Mor, B.Deprecation_Usi); + return A.SassNumber_SassNumber(Math.abs(argument._number$_value), null).coerceToMatch$1(argument); + }, + SassCalculation_exp(argument) { + argument = A.SassCalculation__simplify(argument); + if (!(argument instanceof A.SassNumber)) + return new A.SassCalculation("exp", A._setArrayType([argument], type$.JSArray_Object)); + argument.assertNoUnits$0(); + return A.pow0(A.SassNumber_SassNumber(2.718281828459045, null), argument); + }, + SassCalculation_sign(argument) { + var t1, _0_2, t2, arg; + argument = A.SassCalculation__simplify(argument); + $label0$0: { + t1 = argument instanceof A.SassNumber; + if (t1) { + _0_2 = argument._number$_value; + if (!isNaN(_0_2)) + t2 = 0 === _0_2; + else + t2 = true; + } else + t2 = false; + if (t2) { + t1 = argument; + break $label0$0; + } + if (t1) { + t1 = !argument.hasUnit$1("%"); + arg = argument; + } else { + arg = null; + t1 = false; + } + if (t1) { + t1 = A.SassNumber_SassNumber(J.get$sign$in(arg._number$_value), null).coerceToMatch$1(argument); + break $label0$0; + } + t1 = new A.SassCalculation("sign", A._setArrayType([argument], type$.JSArray_Object)); + break $label0$0; + } + return t1; + }, + SassCalculation_clamp(min, value, max) { + var t1, args; + if (value == null && max != null) + throw A.wrapException(A.ArgumentError$("If value is null, max must also be null.", null)); + min = A.SassCalculation__simplify(min); + value = A.NullableExtension_andThen(value, A.calculation_SassCalculation__simplify$closure()); + max = A.NullableExtension_andThen(max, A.calculation_SassCalculation__simplify$closure()); + if (min instanceof A.SassNumber && value instanceof A.SassNumber && max instanceof A.SassNumber && min.hasCompatibleUnits$1(value) && min.hasCompatibleUnits$1(max)) { + if (value.lessThanOrEquals$1(min).value) + return min; + if (value.greaterThanOrEquals$1(max).value) + return max; + return value; + } + t1 = [min]; + if (value != null) + t1.push(value); + if (max != null) + t1.push(max); + args = A.List_List$unmodifiable(t1, type$.Object); + A.SassCalculation__verifyCompatibleNumbers(args); + A.SassCalculation__verifyLength(args, 3); + return new A.SassCalculation("clamp", args); + }, + SassCalculation_pow(base, exponent) { + var t1 = A._setArrayType([base], type$.JSArray_Object); + if (exponent != null) + t1.push(exponent); + A.SassCalculation__verifyLength(t1, 2); + base = A.SassCalculation__simplify(base); + exponent = A.NullableExtension_andThen(exponent, A.calculation_SassCalculation__simplify$closure()); + if (!(base instanceof A.SassNumber) || !(exponent instanceof A.SassNumber)) + return new A.SassCalculation("pow", t1); + base.assertNoUnits$0(); + exponent.assertNoUnits$0(); + return A.pow0(base, exponent); + }, + SassCalculation_log(number, base) { + var t1, t2; + number = A.SassCalculation__simplify(number); + base = A.NullableExtension_andThen(base, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([number], type$.JSArray_Object); + t2 = base != null; + if (t2) + t1.push(base); + if (number instanceof A.SassNumber) + t2 = t2 && !(base instanceof A.SassNumber); + else + t2 = true; + if (t2) + return new A.SassCalculation("log", t1); + number.assertNoUnits$0(); + if (base instanceof A.SassNumber) { + base.assertNoUnits$0(); + return A.log(number, base); + } + return A.log(number, null); + }, + SassCalculation_atan2(y, x) { + var t1; + y = A.SassCalculation__simplify(y); + x = A.NullableExtension_andThen(x, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([y], type$.JSArray_Object); + if (x != null) + t1.push(x); + A.SassCalculation__verifyLength(t1, 2); + A.SassCalculation__verifyCompatibleNumbers(t1); + if (!(y instanceof A.SassNumber) || !(x instanceof A.SassNumber) || y.hasUnit$1("%") || x.hasUnit$1("%") || !y.hasCompatibleUnits$1(x)) + return new A.SassCalculation("atan2", t1); + return A.SassNumber_SassNumber$withUnits(Math.atan2(y._number$_value, x.convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + SassCalculation_rem(dividend, modulus) { + var t1, result; + dividend = A.SassCalculation__simplify(dividend); + modulus = A.NullableExtension_andThen(modulus, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([dividend], type$.JSArray_Object); + if (modulus != null) + t1.push(modulus); + A.SassCalculation__verifyLength(t1, 2); + A.SassCalculation__verifyCompatibleNumbers(t1); + if (!(dividend instanceof A.SassNumber) || !(modulus instanceof A.SassNumber) || !dividend.hasCompatibleUnits$1(modulus)) + return new A.SassCalculation("rem", t1); + result = dividend.modulo$1(modulus); + t1 = modulus._number$_value; + if (A.DoubleWithSignedZero_get_signIncludingZero(t1) !== A.DoubleWithSignedZero_get_signIncludingZero(dividend._number$_value)) { + if (t1 == 1 / 0 || t1 == -1 / 0) + return dividend; + if (result._number$_value === 0) + return result.unaryMinus$0(); + return result.minus$1(modulus); + } + return result; + }, + SassCalculation_mod(dividend, modulus) { + var t1; + dividend = A.SassCalculation__simplify(dividend); + modulus = A.NullableExtension_andThen(modulus, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([dividend], type$.JSArray_Object); + if (modulus != null) + t1.push(modulus); + A.SassCalculation__verifyLength(t1, 2); + A.SassCalculation__verifyCompatibleNumbers(t1); + if (!(dividend instanceof A.SassNumber) || !(modulus instanceof A.SassNumber) || !dividend.hasCompatibleUnits$1(modulus)) + return new A.SassCalculation("mod", t1); + return dividend.modulo$1(modulus); + }, + SassCalculation_roundInternal(strategyOrNumber, numberOrStep, step, inLegacySassFunction, span, warn) { + var _0_8_isSet, t2, _0_6_isSet, _0_6_isSet0, _0_14_isSet, _0_14, _0_12, _0_16, _0_18, _0_18_isSet, _0_20, _0_20_isSet, strategy, _0_9_isSet0, _0_16_isSet, t3, t4, _0_12_isSet, _0_12_isSet0, rest, _null = null, _s5_ = "round", + _0_1 = A.SassCalculation__simplify(strategyOrNumber), + _0_6 = A.NullableExtension_andThen(numberOrStep, A.calculation_SassCalculation__simplify$closure()), + _0_9 = A.NullableExtension_andThen(step, A.calculation_SassCalculation__simplify$closure()), + _0_8 = _null, + _0_60 = _null, + _0_10 = _null, + _0_10_isSet = false, + _0_90 = _null, + _0_9_isSet = false, + number = _null, + t1 = false; + if (_0_1 instanceof A.SassNumber) { + _0_8_isSet = !_0_1.get$hasUnits(); + if (_0_8_isSet) { + _0_8 = _0_6 == null; + t2 = _0_8; + if (t2) { + _0_10 = _0_9 == null; + t1 = _0_10; + _0_90 = _0_9; + _0_10_isSet = true; + _0_9_isSet = true; + } + _0_60 = _0_6; + number = _0_1; + } + _0_6_isSet = _0_8_isSet; + } else { + _0_8_isSet = false; + _0_6_isSet = false; + } + if (t1) + return A.SassNumber_SassNumber(B.JSNumber_methods.round$0(number._number$_value), _null); + t1 = false; + if (_0_1 instanceof A.SassNumber) { + if (_0_8_isSet) + t2 = _0_8; + else { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_60 = t2; + _0_6_isSet = true; + } + _0_8 = t2 == null; + t2 = _0_8; + _0_8_isSet = true; + } + if (t2) { + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + t1 = t1 && inLegacySassFunction != null; + } + number = _0_1; + } else + number = _null; + if (t1) { + warn.call$2(string$.In_fut, B.Deprecation_WW3); + t1 = B.JSNumber_methods.round$0(number._number$_value); + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(t1, number.get$denominatorUnits(number), t2); + } + step = _null; + t1 = false; + if (_0_1 instanceof A.SassNumber) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassNumber) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + type$.SassNumber._as(t2); + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + t1 = t1 && !_0_1.hasCompatibleUnits$1(t2); + step = t2; + } + number = _0_1; + } else + number = _null; + if (t1) { + t1 = type$.JSArray_Object; + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], t1)); + return new A.SassCalculation(_s5_, A._setArrayType([number, step], t1)); + } + step = _null; + t1 = false; + if (_0_1 instanceof A.SassNumber) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassNumber) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + type$.SassNumber._as(t2); + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + step = t2; + } + number = _0_1; + } else + number = _null; + if (t1) { + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], type$.JSArray_Object)); + return A.SassCalculation__roundWithStep("nearest", number, step); + } + _0_14_isSet = _0_1 instanceof A.SassString; + _0_14 = _null; + _0_12 = _null; + _0_16 = _null; + _0_18 = _null; + _0_18_isSet = false; + _0_20 = _null; + _0_20_isSet = false; + strategy = _null; + number = _null; + step = _null; + t1 = false; + if (_0_14_isSet) { + _0_6_isSet0 = true; + _0_9_isSet0 = true; + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_16_isSet = !t2; + t2 = true; + if (_0_16_isSet) { + _0_16 = "up" === _0_12; + t3 = _0_16; + _0_18_isSet = !t3; + if (_0_18_isSet) { + _0_18 = "down" === _0_12; + t3 = _0_18; + _0_20_isSet = !t3; + if (_0_20_isSet) { + _0_20 = "to-zero" === _0_12; + t2 = _0_20; + } + } + } + if (t2) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassNumber) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + t3 = type$.SassNumber; + t3._as(t2); + if (_0_9_isSet) + t4 = _0_90; + else { + t4 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t4; + } + if (t4 instanceof A.SassNumber) { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t1; + } + t3._as(t1); + t3 = !t2.hasCompatibleUnits$1(t1); + step = t1; + t1 = t3; + } + number = t2; + } + strategy = _0_1; + } + } else + _0_16_isSet = false; + if (t1) { + t1 = type$.JSArray_Object; + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], t1)); + return new A.SassCalculation(_s5_, A._setArrayType([strategy, number, step], t1)); + } + strategy = _null; + number = _null; + step = _null; + t1 = false; + if (_0_1 instanceof A.SassString) { + _0_6_isSet0 = true; + _0_9_isSet0 = true; + _0_12_isSet = true; + if (_0_14_isSet) { + t2 = _0_14; + _0_12_isSet0 = _0_14_isSet; + } else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_12_isSet0 = _0_12_isSet; + _0_14_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet0) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet0 = _0_12_isSet; + } + _0_16 = "up" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet0) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet0 = _0_12_isSet; + } + _0_18 = "down" === t2; + t2 = _0_18; + _0_18_isSet = true; + } + if (!t2) + if (_0_20_isSet) { + t2 = _0_20; + _0_12_isSet = _0_12_isSet0; + } else { + if (_0_12_isSet0) { + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + } + _0_20 = "to-zero" === t2; + t2 = _0_20; + _0_20_isSet = true; + } + else { + t2 = t3; + _0_12_isSet = _0_12_isSet0; + } + } else { + t2 = t3; + _0_12_isSet = _0_12_isSet0; + } + } else { + t2 = t3; + _0_12_isSet = _0_12_isSet0; + } + if (t2) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassNumber) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + t3 = type$.SassNumber; + t3._as(t2); + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t1; + } + t1 = t1 instanceof A.SassNumber; + if (t1) { + if (_0_9_isSet) + t4 = _0_90; + else { + t4 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t4; + } + t3._as(t4); + step = t4; + } + number = t2; + } + strategy = _0_1; + } + } else + _0_12_isSet = _0_14_isSet; + if (t1) { + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([number, step], type$.JSArray_Object)); + return A.SassCalculation__roundWithStep(strategy._string$_text, number, step); + } + strategy = _null; + rest = _null; + t1 = false; + if (_0_1 instanceof A.SassString) { + _0_6_isSet0 = true; + _0_12_isSet0 = true; + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_16 = "up" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_18 = "down" === t2; + t2 = _0_18; + _0_18_isSet = true; + } + if (!t2) + if (_0_20_isSet) + t2 = _0_20; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_20 = "to-zero" === t2; + t2 = _0_20; + _0_20_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassString) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + type$.SassString._as(t2); + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + rest = t2; + } + strategy = _0_1; + } + } + if (t1) + return new A.SassCalculation(_s5_, A._setArrayType([strategy, rest], type$.JSArray_Object)); + t1 = false; + if (_0_1 instanceof A.SassString) { + _0_12_isSet0 = true; + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_16 = "up" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_18 = "down" === t2; + t2 = _0_18; + _0_18_isSet = true; + } + if (!t2) + if (_0_20_isSet) + t2 = _0_20; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_20 = "to-zero" === t2; + t2 = _0_20; + _0_20_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_60 = t2; + _0_6_isSet = true; + } + if (t2 != null) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + } + } + if (t1) + throw A.wrapException(A.SassScriptException$(string$.If_str, _null)); + t1 = false; + if (_0_1 instanceof A.SassString) { + _0_12_isSet0 = true; + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_16 = "up" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_18 = "down" === t2; + t2 = _0_18; + _0_18_isSet = true; + } + if (!t2) + if (_0_20_isSet) + t2 = _0_20; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_20 = "to-zero" === t2; + t2 = _0_20; + _0_20_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_8_isSet) + t2 = _0_8; + else { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_60 = t2; + _0_6_isSet = true; + } + _0_8 = t2 == null; + t2 = _0_8; + _0_8_isSet = true; + } + if (t2) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + } + } + if (t1) + throw A.wrapException(A.SassScriptException$(string$.Number, _null)); + t1 = false; + if (_0_8_isSet) + t2 = _0_8; + else { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_60 = t2; + _0_6_isSet = true; + } + _0_8 = t2 == null; + t2 = _0_8; + } + if (t2) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + if (t1) + return new A.SassCalculation(_s5_, A._setArrayType([_0_1], type$.JSArray_Object)); + step = _null; + t1 = false; + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 != null) { + if (_0_6_isSet) + step = _0_60; + else { + step = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = step; + } + if (step == null) + step = A._asObject(step); + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + } + } + if (t1) + return new A.SassCalculation(_s5_, A._setArrayType([_0_1, step], type$.JSArray_Object)); + if (_0_1 instanceof A.SassString) { + t1 = true; + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = true; + } + _0_14 = "nearest" === t2; + t2 = _0_14; + } + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = true; + } + _0_16 = "up" === t2; + t2 = _0_16; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string$_text; + t2 = _0_12; + _0_12_isSet = true; + } + _0_18 = "down" === t2; + t2 = _0_18; + } + if (!t2) + if (_0_20_isSet) + t1 = _0_20; + else { + if (_0_12_isSet) + t1 = _0_12; + else { + _0_12 = _0_1._string$_text; + t1 = _0_12; + } + _0_20 = "to-zero" === t1; + t1 = _0_20; + } + } + } + } else + t1 = false; + if (!t1) + if (_0_1 instanceof A.SassString) + t1 = _0_1.get$isSpecialVariable(); + else + t1 = false; + else + t1 = true; + number = _null; + step = _null; + t2 = false; + if (t1) { + _0_6_isSet0 = true; + _0_9_isSet0 = true; + type$.SassString._as(_0_1); + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if (t1 != null) { + if (_0_6_isSet) + number = _0_60; + else { + number = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = number; + } + if (number == null) + number = A._asObject(number); + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t1; + } + t1 = t1 != null; + if (t1) { + if (_0_9_isSet) + step = _0_90; + else { + step = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = step; + } + if (step == null) + step = A._asObject(step); + } + } else + t1 = t2; + strategy = _0_1; + } else { + t1 = t2; + strategy = _null; + } + if (t1) + return new A.SassCalculation(_s5_, A._setArrayType([strategy, number, step], type$.JSArray_Object)); + t1 = false; + if ((_0_6_isSet ? _0_60 : _0_6) != null) + t1 = (_0_9_isSet ? _0_90 : _0_9) != null; + if (t1) + throw A.wrapException(A.SassScriptException$(A.S(strategyOrNumber) + string$.x20must_b, _null)); + t1 = A.SassScriptException$("Invalid parameters.", _null); + throw A.wrapException(t1); + }, + SassCalculation_calcSize(basis, value) { + var t1 = type$.JSArray_Object, + t2 = A._setArrayType([basis], t1); + if (value != null) + t2.push(value); + A.SassCalculation__verifyLength(t2, 2); + basis = A.SassCalculation__simplify(basis); + value = A.NullableExtension_andThen(value, A.calculation_SassCalculation__simplify$closure()); + t1 = A._setArrayType([basis], t1); + if (value != null) + t1.push(value); + return new A.SassCalculation("calc-size", t1); + }, + SassCalculation_operateInternal(operator, left, right, inLegacySassFunction, simplify, warn) { + var compatible, t1; + if (!simplify) + return new A.CalculationOperation(operator, left, right); + left = A.SassCalculation__simplify(left); + right = A.SassCalculation__simplify(right); + if (B.CalculationOperator_dpX === operator || B.CalculationOperator_KrC === operator) { + if (left instanceof A.SassNumber && right instanceof A.SassNumber) { + compatible = left.hasCompatibleUnits$1(right); + if (!compatible && inLegacySassFunction != null && left.isComparableTo$1(right)) { + warn.call$2("In future versions of Sass, " + inLegacySassFunction + "() will be interpreted as the CSS " + inLegacySassFunction + string$.x28__cal + inLegacySassFunction + string$.x28__ins, B.Deprecation_WW3); + compatible = true; + } + if (compatible) + return operator === B.CalculationOperator_dpX ? left.plus$1(right) : left.minus$1(right); + } + A.SassCalculation__verifyCompatibleNumbers(A._setArrayType([left, right], type$.JSArray_Object)); + if (right instanceof A.SassNumber) { + t1 = right._number$_value; + t1 = t1 < 0 && !A.fuzzyEquals(t1, 0); + } else + t1 = false; + if (t1) { + right = right.times$1(A.SassNumber_SassNumber(-1, null)); + operator = operator === B.CalculationOperator_dpX ? B.CalculationOperator_KrC : B.CalculationOperator_dpX; + } + return new A.CalculationOperation(operator, left, right); + } else if (left instanceof A.SassNumber && right instanceof A.SassNumber) + return operator === B.CalculationOperator_LPB ? left.times$1(right) : left.dividedBy$1(right); + else + return new A.CalculationOperation(operator, left, right); + }, + SassCalculation__roundWithStep(strategy, number, step) { + var _0_2, t1, _0_6, _0_8_isSet, _0_8, _0_9, _0_9_isSet, _0_11, _0_13, stepWithNumberUnit, t2, _null = null; + if (!A.LinkedHashSet_LinkedHashSet$_literal(["nearest", "up", "down", "to-zero"], type$.String).contains$1(0, strategy)) + throw A.wrapException(A.ArgumentError$(strategy + string$.x20must_b, _null)); + _0_2 = number._number$_value; + if (_0_2 == 1 / 0 || _0_2 == -1 / 0) { + t1 = step._number$_value; + t1 = t1 == 1 / 0 || t1 == -1 / 0; + } else + t1 = false; + if (!t1) { + t1 = step._number$_value; + t1 = t1 === 0 || isNaN(_0_2) || isNaN(t1); + } else + t1 = true; + if (t1) { + t1 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(0 / 0, number.get$denominatorUnits(number), t1); + } + if (_0_2 == 1 / 0 || _0_2 == -1 / 0) + return number; + t1 = step._number$_value; + if (t1 == 1 / 0 || t1 == -1 / 0) { + $label0$0: { + if (0 === _0_2) { + t1 = number; + break $label0$0; + } + _0_6 = "nearest" === strategy; + t1 = _0_6; + _0_8_isSet = !t1; + _0_8 = _null; + if (_0_8_isSet) { + _0_8 = "to-zero" === strategy; + t1 = _0_8; + } else + t1 = true; + _0_9 = _null; + if (t1) { + _0_9 = _0_2 > 0; + t1 = _0_9; + _0_9_isSet = true; + } else { + _0_9_isSet = false; + t1 = false; + } + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (!_0_6) + if (_0_8_isSet) + t1 = _0_8; + else { + _0_8 = "to-zero" === strategy; + t1 = _0_8; + } + else + t1 = true; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(-0.0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + _0_11 = "up" === strategy; + t1 = _0_11; + if (t1) + if (_0_9_isSet) + t1 = _0_9; + else { + _0_9 = _0_2 > 0; + t1 = _0_9; + } + else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(1 / 0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (_0_11) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(-0.0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + _0_13 = "down" === strategy; + t1 = _0_13; + if (t1) + t1 = _0_2 < 0; + else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(-1 / 0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (_0_13) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Invalid argument: " + strategy + ".")); + } + return t1; + } + stepWithNumberUnit = step.convertValueToMatch$1(number); + $label1$1: { + if ("nearest" === strategy) { + t1 = B.JSNumber_methods.round$0(_0_2 / stepWithNumberUnit); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("up" === strategy) { + t2 = _0_2 / stepWithNumberUnit; + t1 = t1 < 0 ? B.JSNumber_methods.floor$0(t2) : B.JSNumber_methods.ceil$0(t2); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("down" === strategy) { + t2 = _0_2 / stepWithNumberUnit; + t1 = t1 < 0 ? B.JSNumber_methods.ceil$0(t2) : B.JSNumber_methods.floor$0(t2); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("to-zero" === strategy) { + t1 = _0_2 / stepWithNumberUnit; + if (_0_2 < 0) { + t1 = B.JSNumber_methods.ceil$0(t1); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + } else { + t1 = B.JSNumber_methods.floor$0(t1); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + } + break $label1$1; + } + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits(0 / 0, number.get$denominatorUnits(number), t1); + break $label1$1; + } + return t1; + }, + SassCalculation__simplify(arg) { + var t1, t2, _0_11_isSet, _0_15, _0_12, _0_16_isSet, text, _0_11, t3, _0_16, _0_12_isSet, _0_15_isSet, value, _null = null, + _s32_ = " can't be used in a calculation."; + $label0$0: { + if (arg instanceof A.SassNumber || arg instanceof A.CalculationOperation) { + t1 = arg; + break $label0$0; + } + t1 = arg instanceof A.SassString; + t2 = _null; + if (t1 && !arg._hasQuotes) { + t1 = arg; + break $label0$0; + } + if (t1) + A.throwExpression(A.SassScriptException$("Quoted string " + arg.toString$0(0) + _s32_, _null)); + _0_11_isSet = arg instanceof A.SassCalculation; + _0_15 = _null; + _0_12 = _null; + _0_16_isSet = false; + text = _null; + t1 = false; + if (_0_11_isSet) { + _0_11 = "calc" === arg.name; + if (_0_11) { + _0_12 = arg.$arguments; + _0_15 = _0_12.length === 1; + t3 = _0_15; + if (t3) { + _0_16 = _0_12[0]; + t2 = _0_16; + if (t2 instanceof A.SassString) { + type$.SassString._as(_0_16); + if (!_0_16._hasQuotes) { + text = _0_16._string$_text; + t1 = A.SassCalculation__needsParentheses(text); + } + } + _0_16_isSet = true; + } else + _0_16 = t2; + } else + _0_16 = t2; + _0_12_isSet = _0_11; + _0_15_isSet = _0_12_isSet; + } else { + _0_16 = t2; + _0_11 = _null; + _0_15_isSet = false; + _0_12_isSet = false; + } + if (t1) { + t1 = new A.SassString("(" + A.S(text) + ")", false); + break $label0$0; + } + t1 = false; + if (_0_11_isSet) + if (_0_11) + if (_0_15_isSet) + t1 = _0_15; + else { + if (_0_12_isSet) + t1 = _0_12; + else { + _0_12 = arg.$arguments; + t1 = _0_12; + _0_12_isSet = true; + } + _0_15 = t1.length === 1; + t1 = _0_15; + } + if (t1) { + if (_0_16_isSet) + value = _0_16; + else { + _0_16 = (_0_12_isSet ? _0_12 : arg.$arguments)[0]; + value = _0_16; + } + t1 = value; + break $label0$0; + } + if (_0_11_isSet) { + t1 = arg; + break $label0$0; + } + if (arg instanceof A.Value) + A.throwExpression(A.SassScriptException$("Value " + arg.toString$0(0) + _s32_, _null)); + t1 = A.throwExpression(A.ArgumentError$("Unexpected calculation argument " + A.S(arg) + ".", _null)); + } + return t1; + }, + SassCalculation__needsParentheses(text) { + var t1, couldBeVar, second, third, fourth, i, t2, + first = text.charCodeAt(0); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47 || first === 42) + return true; + t1 = text.length; + couldBeVar = t1 >= 4 && A.characterEqualsIgnoreCase(first, 118); + if (t1 < 2) + return false; + second = text.charCodeAt(1); + if (second === 32 || second === 9 || second === 10 || second === 13 || second === 12 || second === 47 || second === 42) + return true; + couldBeVar = couldBeVar && A.characterEqualsIgnoreCase(second, 97); + if (t1 < 3) + return false; + third = text.charCodeAt(2); + if (third === 32 || third === 9 || third === 10 || third === 13 || third === 12 || third === 47 || third === 42) + return true; + couldBeVar = couldBeVar && A.characterEqualsIgnoreCase(third, 114); + if (t1 < 4) + return false; + fourth = text.charCodeAt(3); + if (couldBeVar && fourth === 40) + return true; + if (fourth === 32 || fourth === 9 || fourth === 10 || fourth === 13 || fourth === 12 || fourth === 47 || fourth === 42) + return true; + for (i = 4; i < t1; ++i) { + t2 = text.charCodeAt(i); + if (t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || t2 === 47 || t2 === 42) + return true; + } + return false; + }, + SassCalculation__verifyCompatibleNumbers(args) { + var t1, _i, t2, arg, i, number1, j, number2; + for (t1 = args.length, _i = 0; t2 = args.length, _i < t2; args.length === t1 || (0, A.throwConcurrentModificationError)(args), ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber && arg.get$hasComplexUnits()) + throw A.wrapException(A.SassScriptException$("Number " + arg.toString$0(0) + " isn't compatible with CSS calculations.", null)); + } + for (t1 = t2, i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.SassScriptException$(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", null)); + } + } + }, + SassCalculation__verifyLength(args, expectedLength) { + var t1; + if (args.length === expectedLength) + return; + if (B.JSArray_methods.any$1(args, new A.SassCalculation__verifyLength_closure())) + return; + t1 = args.length; + throw A.wrapException(A.SassScriptException$("" + expectedLength + " arguments required, but only " + t1 + " " + A.pluralize("was", t1, "were") + " passed.", null)); + }, + SassCalculation__singleArgument($name, argument, mathFunc, forbidUnits) { + argument = A.SassCalculation__simplify(argument); + if (!(argument instanceof A.SassNumber)) + return new A.SassCalculation($name, A._setArrayType([argument], type$.JSArray_Object)); + if (forbidUnits) + argument.assertNoUnits$0(); + return mathFunc.call$1(argument); + }, + SassCalculation: function SassCalculation(t0, t1) { + this.name = t0; + this.$arguments = t1; + }, + SassCalculation__verifyLength_closure: function SassCalculation__verifyLength_closure() { + }, + CalculationOperation: function CalculationOperation(t0, t1, t2) { + this._operator = t0; + this._left = t1; + this._right = t2; + }, + CalculationOperator: function CalculationOperator(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _.index = t3; + _._name = t4; + }, + SassColor_SassColor$rgb(red, green, blue, alpha) { + return A.SassColor_SassColor$rgbInternal(red, green, blue, alpha, null); + }, + SassColor_SassColor$rgbInternal(red, green, blue, alpha, format) { + var _null = null, + t1 = red == null ? _null : red, + t2 = green == null ? _null : green, + t3 = blue == null ? _null : blue; + return A.SassColor$_forSpace(B.RgbColorSpace_i0P, t1, t2, t3, alpha == null ? _null : alpha, format); + }, + SassColor_SassColor$hsl(hue, saturation, lightness, alpha) { + var _null = null, + t1 = hue == null ? _null : hue, + t2 = saturation == null ? _null : saturation, + t3 = lightness == null ? _null : lightness; + return A.SassColor_SassColor$forSpaceInternal(B.HslColorSpace_JQ2, t1, t2, t3, alpha == null ? _null : alpha); + }, + SassColor_SassColor$hwb(hue, whiteness, blackness, alpha) { + var _null = null, + t1 = hue == null ? _null : hue, + t2 = whiteness == null ? _null : whiteness, + t3 = blackness == null ? _null : blackness; + return A.SassColor_SassColor$forSpaceInternal(B.HwbColorSpace_guQ, t1, t2, t3, alpha == null ? _null : alpha); + }, + SassColor_SassColor$forSpaceInternal(space, channel0, channel1, channel2, alpha) { + var t1, t2, _null = null; + $label0$0: { + if (B.HslColorSpace_JQ2 === space) { + t1 = channel1 == null; + t2 = A.SassColor__normalizeHue(channel0, !t1 && channel1 < 0 && !A.fuzzyEquals(channel1, 0)); + t2 = A.SassColor$_forSpace(space, t2, t1 ? _null : Math.abs(channel1), channel2, alpha, _null); + t1 = t2; + break $label0$0; + } + if (B.HwbColorSpace_guQ === space) { + t1 = A.SassColor$_forSpace(space, A.SassColor__normalizeHue(channel0, false), channel1, channel2, alpha, _null); + break $label0$0; + } + if (B.LchColorSpace_Bpv === space || B.OklchColorSpace_9Gj === space) { + t1 = channel1 == null; + t2 = t1 ? _null : Math.abs(channel1); + t2 = A.SassColor$_forSpace(space, channel0, t2, A.SassColor__normalizeHue(channel2, !t1 && channel1 < 0 && !A.fuzzyEquals(channel1, 0)), alpha, _null); + t1 = t2; + break $label0$0; + } + t1 = A.SassColor$_forSpace(space, channel0, channel1, channel2, alpha, _null); + break $label0$0; + } + return t1; + }, + SassColor$_forSpace(_space, channel0OrNull, channel1OrNull, channel2OrNull, alpha, format) { + return new A.SassColor(_space, channel0OrNull, channel1OrNull, channel2OrNull, format, A.NullableExtension_andThen(alpha, new A.SassColor$_forSpace_closure())); + }, + SassColor__normalizeHue(hue, invert) { + var t1, t2; + if (hue == null) + return hue; + t1 = B.JSNumber_methods.$mod(hue, 360); + t2 = invert ? 180 : 0; + return B.JSNumber_methods.$mod(t1 + 360 + t2, 360); + }, + SassColor: function SassColor(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._space = t0; + _.channel0OrNull = t1; + _.channel1OrNull = t2; + _.channel2OrNull = t3; + _.format = t4; + _.alphaOrNull = t5; + }, + SassColor$_forSpace_closure: function SassColor$_forSpace_closure() { + }, + _ColorFormatEnum: function _ColorFormatEnum() { + }, + SpanColorFormat: function SpanColorFormat(t0) { + this._color$_span = t0; + }, + ColorChannel: function ColorChannel(t0, t1, t2) { + this.name = t0; + this.isPolarAngle = t1; + this.associatedUnit = t2; + }, + LinearChannel: function LinearChannel(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.min = t0; + _.max = t1; + _.requiresPercent = t2; + _.lowerClamped = t3; + _.upperClamped = t4; + _.name = t5; + _.isPolarAngle = t6; + _.associatedUnit = t7; + }, + GamutMapMethod_GamutMapMethod$fromName($name) { + var t1; + $label0$0: { + if ("clip" === $name) { + t1 = B.ClipGamutMap_clip; + break $label0$0; + } + if ("local-minde" === $name) { + t1 = B.LocalMindeGamutMap_A2x; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$('Unknown gamut map method "' + $name + '".', null)); + } + return t1; + }, + GamutMapMethod: function GamutMapMethod() { + }, + ClipGamutMap: function ClipGamutMap(t0) { + this.name = t0; + }, + LocalMindeGamutMap: function LocalMindeGamutMap(t0) { + this.name = t0; + }, + InterpolationMethod$(space, hue) { + var t1; + if (space.get$isPolarInternal()) + t1 = hue == null ? B.HueInterpolationMethod_0 : hue; + else + t1 = null; + if (!space.get$isPolarInternal() && hue != null) + A.throwExpression(A.ArgumentError$(string$.Hue_in + space.toString$0(0) + ".", null)); + return new A.InterpolationMethod(space, t1); + }, + InterpolationMethod_InterpolationMethod$fromValue(value, $name) { + var t1, space, hueMethod, + list = value.assertCommonListStyle$2$allowSlash($name, false); + if (list.length === 0) + throw A.wrapException(A.SassScriptException$(string$.Expecta, $name)); + t1 = B.JSArray_methods.get$first(list).assertString$1($name); + t1.assertUnquoted$1($name); + space = A.ColorSpace_fromName(t1._string$_text, $name); + if (list.length === 1) + return A.InterpolationMethod$(space, null); + hueMethod = A.HueInterpolationMethod_HueInterpolationMethod$_fromValue(list[1], $name); + if (list.length === 2) + throw A.wrapException(A.SassScriptException$('Expected unquoted string "hue" after ' + value.toString$0(0) + ".", $name)); + else { + t1 = list[2].assertString$1($name); + t1.assertUnquoted$1($name); + if (t1._string$_text.toLowerCase() !== "hue") + throw A.wrapException(A.SassScriptException$(string$.Expectu + value.toString$0(0) + ", was " + list[2].toString$0(0) + ".", $name)); + else if (list.length > 3) + throw A.wrapException(A.SassScriptException$('Expected nothing after "hue" in ' + value.toString$0(0) + ".", $name)); + else if (!space.get$isPolarInternal()) + throw A.wrapException(A.SassScriptException$('Hue interpolation method "' + hueMethod.toString$0(0) + string$.x20hue__ + space.toString$0(0) + ".", $name)); + } + return A.InterpolationMethod$(space, hueMethod); + }, + HueInterpolationMethod_HueInterpolationMethod$_fromValue(value, $name) { + var _0_0, + t1 = value.assertString$1($name); + t1.assertUnquoted$0(); + _0_0 = t1._string$_text.toLowerCase(); + $label0$0: { + if ("shorter" === _0_0) { + t1 = B.HueInterpolationMethod_0; + break $label0$0; + } + if ("longer" === _0_0) { + t1 = B.HueInterpolationMethod_1; + break $label0$0; + } + if ("increasing" === _0_0) { + t1 = B.HueInterpolationMethod_2; + break $label0$0; + } + if ("decreasing" === _0_0) { + t1 = B.HueInterpolationMethod_3; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$("Unknown hue interpolation method " + value.toString$0(0) + ".", $name)); + } + return t1; + }, + InterpolationMethod: function InterpolationMethod(t0, t1) { + this.space = t0; + this.hue = t1; + }, + HueInterpolationMethod: function HueInterpolationMethod(t0, t1) { + this.index = t0; + this._name = t1; + }, + ColorSpace_fromName($name, argumentName) { + var t1, + _0_0 = $name.toLowerCase(); + $label0$0: { + if ("rgb" === _0_0) { + t1 = B.RgbColorSpace_i0P; + break $label0$0; + } + if ("hwb" === _0_0) { + t1 = B.HwbColorSpace_guQ; + break $label0$0; + } + if ("hsl" === _0_0) { + t1 = B.HslColorSpace_JQ2; + break $label0$0; + } + if ("srgb" === _0_0) { + t1 = B.SrgbColorSpace_thf; + break $label0$0; + } + if ("srgb-linear" === _0_0) { + t1 = B.SrgbLinearColorSpace_kUj; + break $label0$0; + } + if ("display-p3" === _0_0) { + t1 = B.DisplayP3ColorSpace_MmT; + break $label0$0; + } + if ("display-p3-linear" === _0_0) { + t1 = B.DisplayP3LinearColorSpace_PrP; + break $label0$0; + } + if ("a98-rgb" === _0_0) { + t1 = B.A98RgbColorSpace_lf2; + break $label0$0; + } + if ("prophoto-rgb" === _0_0) { + t1 = B.ProphotoRgbColorSpace_BDz; + break $label0$0; + } + if ("rec2020" === _0_0) { + t1 = B.Rec2020ColorSpace_6oo; + break $label0$0; + } + if ("xyz" === _0_0 || "xyz-d65" === _0_0) { + t1 = B.XyzD65ColorSpace_WiJ; + break $label0$0; + } + if ("xyz-d50" === _0_0) { + t1 = B.XyzD50ColorSpace_2OB; + break $label0$0; + } + if ("lab" === _0_0) { + t1 = B.LabColorSpace_2nT; + break $label0$0; + } + if ("lch" === _0_0) { + t1 = B.LchColorSpace_Bpv; + break $label0$0; + } + if ("oklab" === _0_0) { + t1 = B.OklabColorSpace_540; + break $label0$0; + } + if ("oklch" === _0_0) { + t1 = B.OklchColorSpace_9Gj; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$('Unknown color space "' + $name + '".', argumentName)); + } + return t1; + }, + ColorSpace: function ColorSpace() { + }, + A98RgbColorSpace: function A98RgbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + DisplayP3ColorSpace: function DisplayP3ColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + DisplayP3LinearColorSpace: function DisplayP3LinearColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + HslColorSpace: function HslColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + HwbColorSpace: function HwbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + HwbColorSpace_convert_toRgb: function HwbColorSpace_convert_toRgb(t0, t1) { + this._box_0 = t0; + this.factor = t1; + }, + LabColorSpace: function LabColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + LchColorSpace: function LchColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + LmsColorSpace: function LmsColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + OklabColorSpace: function OklabColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + OklchColorSpace: function OklchColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + ProphotoRgbColorSpace: function ProphotoRgbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + Rec2020ColorSpace: function Rec2020ColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + RgbColorSpace: function RgbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + SrgbColorSpace: function SrgbColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + SrgbLinearColorSpace: function SrgbLinearColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + XyzD50ColorSpace: function XyzD50ColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + XyzD65ColorSpace: function XyzD65ColorSpace(t0, t1) { + this.name = t0; + this._channels = t1; + }, + SassFunction: function SassFunction(t0, t1) { + this.callable = t0; + this._function$_compileContext = t1; + }, + SassList$(contents, _separator, brackets) { + var t1 = new A.SassList(A.List_List$unmodifiable(contents, type$.Value), _separator, brackets); + t1.SassList$3$brackets(contents, _separator, brackets); + return t1; + }, + SassList: function SassList(t0, t1, t2) { + this._list$_contents = t0; + this._separator = t1; + this._hasBrackets = t2; + }, + SassList_isBlank_closure: function SassList_isBlank_closure() { + }, + ListSeparator: function ListSeparator(t0, t1, t2, t3) { + var _ = this; + _._list$_name = t0; + _.separator = t1; + _.index = t2; + _._name = t3; + }, + SassMap: function SassMap(t0) { + this._map$_contents = t0; + }, + SassMixin: function SassMixin(t0, t1) { + this.callable = t0; + this._mixin$_compileContext = t1; + }, + _SassNull: function _SassNull() { + }, + conversionFactor(unit1, unit2) { + var _0_0; + if (unit1 === unit2) + return 1; + _0_0 = B.Map_NtHoP.$index(0, unit1); + if (_0_0 != null) + return _0_0.$index(0, unit2); + return null; + }, + SassNumber_SassNumber(value, unit) { + return unit == null ? new A.UnitlessSassNumber(value, null) : new A.SingleUnitSassNumber(unit, value, null); + }, + SassNumber_SassNumber$withUnits(value, denominatorUnits, numeratorUnits) { + var t1, _0_8, _0_10, _0_10_isSet, _0_7, _0_8_isSet, _0_7_isSet, unit, _0_7_isSet0, t2, numerators, denominators, unsimplifiedDenominators, valueDouble, _i, denominator, simplifiedAway, i, factor, _1_2, _1_7_isSet, _1_7, _null = null, + _0_6 = _null, + _0_4 = _null; + _0_4 = numeratorUnits.length; + t1 = _0_4; + _0_6 = t1 <= 0; + t1 = _0_6; + _0_8 = _null; + _0_10 = _null; + if (t1) { + _0_8 = denominatorUnits == null; + t1 = _0_8; + _0_10_isSet = !t1; + if (_0_10_isSet) { + _0_10 = (denominatorUnits == null ? type$.List_String._as(denominatorUnits) : denominatorUnits).length <= 0; + t1 = _0_10; + } else + t1 = true; + _0_7 = denominatorUnits; + _0_8_isSet = true; + _0_7_isSet = true; + } else { + _0_7 = _null; + _0_8_isSet = false; + _0_7_isSet = false; + _0_10_isSet = false; + t1 = false; + } + if (t1) + return new A.UnitlessSassNumber(value, _null); + unit = _null; + t1 = false; + _0_7_isSet0 = true; + t2 = _0_4; + if (t2 === 1) { + unit = numeratorUnits[0]; + if (_0_8_isSet) + t1 = _0_8; + else { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t1; + } + _0_8 = t1 == null; + t1 = _0_8; + _0_8_isSet = true; + } + if (!t1) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t1; + } + _0_10 = (t1 == null ? type$.List_String._as(t1) : t1).length <= 0; + t1 = _0_10; + _0_10_isSet = true; + } + else + t1 = true; + } + if (t1) + return new A.SingleUnitSassNumber(unit, value, _null); + t1 = false; + _0_7_isSet0 = true; + if (_0_8_isSet) + t1 = _0_8; + else { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t1; + } + _0_8 = t1 == null; + t1 = _0_8; + } + if (!t1) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t1; + } + _0_10 = (t1 == null ? type$.List_String._as(t1) : t1).length <= 0; + t1 = _0_10; + } + else + t1 = true; + numerators = numeratorUnits; + if (t1) + return new A.ComplexSassNumber(A.List_List$unmodifiable(numerators, type$.String), B.List_empty, value, _null); + t1 = _0_6; + denominators = _null; + if (t1) { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7 = t1; + _0_7_isSet = true; + } + t1 = t1 != null; + if (t1) { + denominators = _0_7_isSet ? _0_7 : denominatorUnits; + if (denominators == null) + denominators = type$.List_String._as(denominators); + } + } else + t1 = false; + if (t1) + return new A.ComplexSassNumber(B.List_empty, A.List_List$unmodifiable(denominators, type$.String), value, _null); + numerators = A._setArrayType(numeratorUnits.slice(0), A._arrayInstanceType(numeratorUnits)); + unsimplifiedDenominators = A._setArrayType(denominatorUnits.slice(0), A.instanceType(denominatorUnits)); + denominators = A._setArrayType([], type$.JSArray_String); + for (t1 = unsimplifiedDenominators.length, valueDouble = value, _i = 0; _i < unsimplifiedDenominators.length; unsimplifiedDenominators.length === t1 || (0, A.throwConcurrentModificationError)(unsimplifiedDenominators), ++_i) { + denominator = unsimplifiedDenominators[_i]; + i = 0; + for (;;) { + if (!(i < numerators.length)) { + simplifiedAway = false; + break; + } + c$0: { + factor = A.conversionFactor(denominator, numerators[i]); + if (factor == null) + break c$0; + valueDouble *= factor; + B.JSArray_methods.removeAt$1(numerators, i); + simplifiedAway = true; + break; + } + ++i; + } + if (!simplifiedAway) + denominators.push(denominator); + } + $label0$1: { + _1_2 = numerators.length; + t1 = _1_2; + _1_7_isSet = t1 <= 0; + if (_1_7_isSet) { + _1_7 = denominators.length <= 0; + t1 = _1_7; + } else { + _1_7 = _null; + t1 = false; + } + if (t1) { + t1 = new A.UnitlessSassNumber(valueDouble, _null); + break $label0$1; + } + t1 = false; + if (_1_2 === 1) { + unit = numerators[0]; + t1 = _1_7_isSet ? _1_7 : denominators.length <= 0; + } else + unit = _null; + if (t1) { + t1 = new A.SingleUnitSassNumber(unit, valueDouble, _null); + break $label0$1; + } + t1 = type$.String; + t1 = new A.ComplexSassNumber(A.List_List$unmodifiable(numerators, t1), A.List_List$unmodifiable(denominators, t1), valueDouble, _null); + break $label0$1; + } + return t1; + }, + SassNumber: function SassNumber() { + }, + SassNumber__coerceOrConvertValue_compatibilityException: function SassNumber__coerceOrConvertValue_compatibilityException(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.other = t1; + _.otherName = t2; + _.otherHasUnits = t3; + _.name = t4; + _.newNumerators = t5; + _.newDenominators = t6; + }, + SassNumber__coerceOrConvertValue_closure: function SassNumber__coerceOrConvertValue_closure(t0, t1) { + this._box_0 = t0; + this.newNumerator = t1; + }, + SassNumber__coerceOrConvertValue_closure0: function SassNumber__coerceOrConvertValue_closure0(t0) { + this.compatibilityException = t0; + }, + SassNumber__coerceOrConvertValue_closure1: function SassNumber__coerceOrConvertValue_closure1(t0, t1) { + this._box_0 = t0; + this.newDenominator = t1; + }, + SassNumber__coerceOrConvertValue_closure2: function SassNumber__coerceOrConvertValue_closure2(t0) { + this.compatibilityException = t0; + }, + SassNumber_plus_closure: function SassNumber_plus_closure() { + }, + SassNumber_minus_closure: function SassNumber_minus_closure() { + }, + SassNumber_multiplyUnits_closure: function SassNumber_multiplyUnits_closure(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure0: function SassNumber_multiplyUnits_closure0(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure1: function SassNumber_multiplyUnits_closure1(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure2: function SassNumber_multiplyUnits_closure2(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber__areAnyConvertible_closure: function SassNumber__areAnyConvertible_closure(t0) { + this.units2 = t0; + }, + SassNumber__canonicalizeUnitList_closure: function SassNumber__canonicalizeUnitList_closure() { + }, + SassNumber__canonicalMultiplier_closure: function SassNumber__canonicalMultiplier_closure(t0) { + this.$this = t0; + }, + SassNumber_unitSuggestion_closure: function SassNumber_unitSuggestion_closure() { + }, + SassNumber_unitSuggestion_closure0: function SassNumber_unitSuggestion_closure0() { + }, + ComplexSassNumber: function ComplexSassNumber(t0, t1, t2, t3) { + var _ = this; + _._numeratorUnits = t0; + _._denominatorUnits = t1; + _._number$_value = t2; + _.hashCache = null; + _.asSlash = t3; + }, + SingleUnitSassNumber: function SingleUnitSassNumber(t0, t1, t2) { + var _ = this; + _._unit = t0; + _._number$_value = t1; + _.hashCache = null; + _.asSlash = t2; + }, + SingleUnitSassNumber__coerceToUnit_closure: function SingleUnitSassNumber__coerceToUnit_closure(t0, t1) { + this.$this = t0; + this.unit = t1; + }, + SingleUnitSassNumber__coerceValueToUnit_closure: function SingleUnitSassNumber__coerceValueToUnit_closure(t0) { + this.$this = t0; + }, + SingleUnitSassNumber_multiplyUnits_closure: function SingleUnitSassNumber_multiplyUnits_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SingleUnitSassNumber_multiplyUnits_closure0: function SingleUnitSassNumber_multiplyUnits_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + UnitlessSassNumber: function UnitlessSassNumber(t0, t1) { + this._number$_value = t0; + this.hashCache = null; + this.asSlash = t1; + }, + SassString$(_text, quotes) { + return new A.SassString(_text, quotes); + }, + SassString: function SassString(t0, t1) { + var _ = this; + _._string$_text = t0; + _._hasQuotes = t1; + _.__SassString__sassLength_FI = $; + _._hashCache = null; + }, + AnySelectorVisitor: function AnySelectorVisitor() { + }, + AnySelectorVisitor_visitComplexSelector_closure: function AnySelectorVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + AnySelectorVisitor_visitCompoundSelector_closure: function AnySelectorVisitor_visitCompoundSelector_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor$0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t1 = type$.Uri, + t2 = type$.Module_AsyncCallable, + t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode); + t1 = new A._EvaluateVisitor0(importCache, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.AsyncCallable), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, new A.Object(), A.AsyncEnvironment$(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode), t3, B.Configuration_Map_empty_null); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + _EvaluateVisitor0: function _EvaluateVisitor0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) { + var _ = this; + _._async_evaluate$_importCache = t0; + _._async_evaluate$_nodeImporter = t1; + _._async_evaluate$_builtInFunctions = t2; + _._async_evaluate$_builtInModules = t3; + _._async_evaluate$_modules = t4; + _._async_evaluate$_moduleConfigurations = t5; + _._async_evaluate$_moduleNodes = t6; + _._async_evaluate$_logger = t7; + _._async_evaluate$_warningsEmitted = t8; + _._async_evaluate$_quietDeps = t9; + _._async_evaluate$_sourceMap = t10; + _._async_evaluate$_compileContext = t11; + _._async_evaluate$_environment = t12; + _._async_evaluate$_declarationName = _._async_evaluate$__parent = _._async_evaluate$_mediaQuerySources = _._async_evaluate$_mediaQueries = _._async_evaluate$_styleRuleIgnoringAtRoot = null; + _._async_evaluate$_member = "root stylesheet"; + _._async_evaluate$_importSpan = _._async_evaluate$_callableNode = null; + _._async_evaluate$_inSupportsDeclaration = _._async_evaluate$_inKeyframes = _._async_evaluate$_atRootExcludingStyleRule = _._async_evaluate$_inUnknownAtRule = _._async_evaluate$_inFunction = false; + _._async_evaluate$_loadedUrls = t13; + _._async_evaluate$_activeModules = t14; + _._async_evaluate$_stack = t15; + _._async_evaluate$_importer = null; + _._async_evaluate$_inDependency = false; + _._async_evaluate$__extensionStore = _._async_evaluate$_preModuleComments = _._async_evaluate$_outOfOrderImports = _._async_evaluate$__endOfImports = _._async_evaluate$__root = _._async_evaluate$__stylesheet = null; + _._async_evaluate$_configuration = t16; + }, + _EvaluateVisitor_closure12: function _EvaluateVisitor_closure12(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure13: function _EvaluateVisitor_closure13(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure14: function _EvaluateVisitor_closure14(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure15: function _EvaluateVisitor_closure15(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure16: function _EvaluateVisitor_closure16(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure17: function _EvaluateVisitor_closure17(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure18: function _EvaluateVisitor_closure18(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure19: function _EvaluateVisitor_closure19(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure20: function _EvaluateVisitor_closure20(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure6: function _EvaluateVisitor__closure6(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure21: function _EvaluateVisitor_closure21(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure5: function _EvaluateVisitor__closure5(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure22: function _EvaluateVisitor_closure22(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure23: function _EvaluateVisitor_closure23(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure3: function _EvaluateVisitor__closure3(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.values = t1; + _.span = t2; + _.callableNode = t3; + }, + _EvaluateVisitor__closure4: function _EvaluateVisitor__closure4(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure24: function _EvaluateVisitor_closure24(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure0: function _EvaluateVisitor_run_closure0(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_run__closure0: function _EvaluateVisitor_run__closure0(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.node = t2; + }, + _EvaluateVisitor__loadModule_closure1: function _EvaluateVisitor__loadModule_closure1(t0, t1) { + this._box_0 = t0; + this.callback = t1; + }, + _EvaluateVisitor__loadModule_closure2: function _EvaluateVisitor__loadModule_closure2(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure1: function _EvaluateVisitor__loadModule__closure1(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__loadModule__closure2: function _EvaluateVisitor__loadModule__closure2(t0, t1, t2) { + this._box_1 = t0; + this.callback = t1; + this.firstLoad = t2; + }, + _EvaluateVisitor__execute_closure0: function _EvaluateVisitor__execute_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + _.preModuleComments = t6; + }, + _EvaluateVisitor__combineCss_closure1: function _EvaluateVisitor__combineCss_closure1() { + }, + _EvaluateVisitor__combineCss_closure2: function _EvaluateVisitor__combineCss_closure2(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_visitModule0: function _EvaluateVisitor__combineCss_visitModule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.seen = t1; + _.clone = t2; + _.css = t3; + _.imports = t4; + _.sorted = t5; + }, + _EvaluateVisitor__extendModules_closure1: function _EvaluateVisitor__extendModules_closure1(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure2: function _EvaluateVisitor__extendModules_closure2() { + }, + _EvaluateVisitor_visitAtRootRule_closure1: function _EvaluateVisitor_visitAtRootRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure2: function _EvaluateVisitor_visitAtRootRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure5: function _EvaluateVisitor__scopeForAtRoot_closure5(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure6: function _EvaluateVisitor__scopeForAtRoot_closure6(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure7: function _EvaluateVisitor__scopeForAtRoot_closure7(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure0: function _EvaluateVisitor__scopeForAtRoot__closure0(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure8: function _EvaluateVisitor__scopeForAtRoot_closure8(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure9: function _EvaluateVisitor__scopeForAtRoot_closure9() { + }, + _EvaluateVisitor__scopeForAtRoot_closure10: function _EvaluateVisitor__scopeForAtRoot_closure10(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure0: function _EvaluateVisitor_visitContentRule_closure0(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure0: function _EvaluateVisitor_visitDeclaration_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitEachRule_closure2: function _EvaluateVisitor_visitEachRule_closure2(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure3: function _EvaluateVisitor_visitEachRule_closure3(t0, t1, t2) { + this._box_1 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure4: function _EvaluateVisitor_visitEachRule_closure4(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure0: function _EvaluateVisitor_visitEachRule__closure0(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure0: function _EvaluateVisitor_visitEachRule___closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure3: function _EvaluateVisitor_visitAtRule_closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure4: function _EvaluateVisitor_visitAtRule_closure4(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure5: function _EvaluateVisitor_visitAtRule_closure5(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.children = t2; + }, + _EvaluateVisitor_visitAtRule__closure0: function _EvaluateVisitor_visitAtRule__closure0(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure6: function _EvaluateVisitor_visitAtRule_closure6() { + }, + _EvaluateVisitor_visitForRule_closure4: function _EvaluateVisitor_visitForRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure5: function _EvaluateVisitor_visitForRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure6: function _EvaluateVisitor_visitForRule_closure6(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure7: function _EvaluateVisitor_visitForRule_closure7(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure8: function _EvaluateVisitor_visitForRule_closure8(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure0: function _EvaluateVisitor_visitForRule__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure1: function _EvaluateVisitor_visitForwardRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure2: function _EvaluateVisitor_visitForwardRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__registerCommentsForModule_closure0: function _EvaluateVisitor__registerCommentsForModule_closure0() { + }, + _EvaluateVisitor_visitIfRule_closure0: function _EvaluateVisitor_visitIfRule_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIfRule__closure0: function _EvaluateVisitor_visitIfRule__closure0(t0, t1) { + this.$this = t0; + this.clause = t1; + }, + _EvaluateVisitor_visitIfRule___closure0: function _EvaluateVisitor_visitIfRule___closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure0: function _EvaluateVisitor__visitDynamicImport_closure0(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure3: function _EvaluateVisitor__visitDynamicImport__closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure4: function _EvaluateVisitor__visitDynamicImport__closure4() { + }, + _EvaluateVisitor__visitDynamicImport__closure5: function _EvaluateVisitor__visitDynamicImport__closure5() { + }, + _EvaluateVisitor__visitDynamicImport__closure6: function _EvaluateVisitor__visitDynamicImport__closure6(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.loadsUserDefinedModules = t2; + _.environment = t3; + _.children = t4; + }, + _EvaluateVisitor__applyMixin_closure1: function _EvaluateVisitor__applyMixin_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure2: function _EvaluateVisitor__applyMixin__closure2(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin_closure2: function _EvaluateVisitor__applyMixin_closure2(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure1: function _EvaluateVisitor__applyMixin__closure1(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin___closure0: function _EvaluateVisitor__applyMixin___closure0(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin____closure0: function _EvaluateVisitor__applyMixin____closure0(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure2: function _EvaluateVisitor_visitIncludeRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure3: function _EvaluateVisitor_visitIncludeRule_closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure4: function _EvaluateVisitor_visitIncludeRule_closure4(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitMediaRule_closure3: function _EvaluateVisitor_visitMediaRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure4: function _EvaluateVisitor_visitMediaRule_closure4(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure5: function _EvaluateVisitor_visitMediaRule_closure5(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure0: function _EvaluateVisitor_visitMediaRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure0: function _EvaluateVisitor_visitMediaRule___closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure6: function _EvaluateVisitor_visitMediaRule_closure6(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitStyleRule_closure3: function _EvaluateVisitor_visitStyleRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure4: function _EvaluateVisitor_visitStyleRule_closure4() { + }, + _EvaluateVisitor_visitStyleRule_closure6: function _EvaluateVisitor_visitStyleRule_closure6(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure0: function _EvaluateVisitor_visitStyleRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure5: function _EvaluateVisitor_visitStyleRule_closure5() { + }, + _EvaluateVisitor__warnForBogusCombinators_closure0: function _EvaluateVisitor__warnForBogusCombinators_closure0() { + }, + _EvaluateVisitor_visitSupportsRule_closure2: function _EvaluateVisitor_visitSupportsRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure3: function _EvaluateVisitor_visitSupportsRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure0: function _EvaluateVisitor_visitSupportsRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure4: function _EvaluateVisitor_visitSupportsRule_closure4() { + }, + _EvaluateVisitor__visitSupportsCondition_closure0: function _EvaluateVisitor__visitSupportsCondition_closure0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure2: function _EvaluateVisitor_visitVariableDeclaration_closure2(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure3: function _EvaluateVisitor_visitVariableDeclaration_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure4: function _EvaluateVisitor_visitVariableDeclaration_closure4(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure0: function _EvaluateVisitor_visitUseRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure0: function _EvaluateVisitor_visitWarnRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure0: function _EvaluateVisitor_visitWhileRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure0: function _EvaluateVisitor_visitWhileRule__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure0: function _EvaluateVisitor_visitBinaryOperationExpression_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__slash_recommendation0: function _EvaluateVisitor__slash_recommendation0() { + }, + _EvaluateVisitor_visitVariableExpression_closure0: function _EvaluateVisitor_visitVariableExpression_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure0: function _EvaluateVisitor_visitUnaryOperationExpression_closure0(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor_visitIfExpression_closure0: function _EvaluateVisitor_visitIfExpression_closure0() { + }, + _EvaluateVisitor_visitIfConditionOperation_closure0: function _EvaluateVisitor_visitIfConditionOperation_closure0() { + }, + _EvaluateVisitor_visitListExpression_closure0: function _EvaluateVisitor_visitListExpression_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure2: function _EvaluateVisitor_visitFunctionExpression_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure3: function _EvaluateVisitor_visitFunctionExpression_closure3() { + }, + _EvaluateVisitor_visitFunctionExpression_closure4: function _EvaluateVisitor_visitFunctionExpression_closure4(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor__visitCalculation_closure0: function _EvaluateVisitor__visitCalculation_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__checkCalculationArguments_check0: function _EvaluateVisitor__checkCalculationArguments_check0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__visitCalculationExpression_closure0: function _EvaluateVisitor__visitCalculationExpression_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.inLegacySassFunction = t3; + }, + _EvaluateVisitor__visitCalculationExpression__closure0: function _EvaluateVisitor__visitCalculationExpression__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure0: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure0(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure0: function _EvaluateVisitor__runUserDefinedCallable_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure0: function _EvaluateVisitor__runUserDefinedCallable__closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure0: function _EvaluateVisitor__runUserDefinedCallable___closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure0: function _EvaluateVisitor__runUserDefinedCallable____closure0() { + }, + _EvaluateVisitor__runFunctionCallable_closure0: function _EvaluateVisitor__runFunctionCallable_closure0(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure2: function _EvaluateVisitor__runBuiltInCallable_closure2(t0, t1, t2) { + this._box_0 = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure3: function _EvaluateVisitor__runBuiltInCallable_closure3(t0, t1) { + this._box_0 = t0; + this.evaluated = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure4: function _EvaluateVisitor__runBuiltInCallable_closure4() { + }, + _EvaluateVisitor__evaluateArguments_closure3: function _EvaluateVisitor__evaluateArguments_closure3() { + }, + _EvaluateVisitor__evaluateArguments_closure4: function _EvaluateVisitor__evaluateArguments_closure4(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure5: function _EvaluateVisitor__evaluateArguments_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure6: function _EvaluateVisitor__evaluateArguments_closure6() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure3: function _EvaluateVisitor__evaluateMacroArguments_closure3(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure4: function _EvaluateVisitor__evaluateMacroArguments_closure4(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure5: function _EvaluateVisitor__evaluateMacroArguments_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure6: function _EvaluateVisitor__evaluateMacroArguments_closure6(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure0: function _EvaluateVisitor__addRestMap_closure0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure0: function _EvaluateVisitor__verifyArguments_closure0(t0, t1, t2) { + this.parameters = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitCssAtRule_closure2: function _EvaluateVisitor_visitCssAtRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure3: function _EvaluateVisitor_visitCssAtRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure4: function _EvaluateVisitor_visitCssAtRule_closure4() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure1: function _EvaluateVisitor_visitCssKeyframeBlock_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure2: function _EvaluateVisitor_visitCssKeyframeBlock_closure2() { + }, + _EvaluateVisitor_visitCssMediaRule_closure3: function _EvaluateVisitor_visitCssMediaRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure4: function _EvaluateVisitor_visitCssMediaRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure5: function _EvaluateVisitor_visitCssMediaRule_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure0: function _EvaluateVisitor_visitCssMediaRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure0: function _EvaluateVisitor_visitCssMediaRule___closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure6: function _EvaluateVisitor_visitCssMediaRule_closure6(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure2: function _EvaluateVisitor_visitCssStyleRule_closure2(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure0: function _EvaluateVisitor_visitCssStyleRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure1: function _EvaluateVisitor_visitCssStyleRule_closure1() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure2: function _EvaluateVisitor_visitCssSupportsRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure3: function _EvaluateVisitor_visitCssSupportsRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure0: function _EvaluateVisitor_visitCssSupportsRule__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure4: function _EvaluateVisitor_visitCssSupportsRule_closure4() { + }, + _EvaluateVisitor__performInterpolationHelper_closure0: function _EvaluateVisitor__performInterpolationHelper_closure0(t0) { + this.interpolation = t0; + }, + _EvaluateVisitor__serialize_closure0: function _EvaluateVisitor__serialize_closure0(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure0: function _EvaluateVisitor__expressionNode_closure0(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation0: function _EvaluateVisitor__withoutSlash_recommendation0() { + }, + _EvaluateVisitor__stackFrame_closure0: function _EvaluateVisitor__stackFrame_closure0(t0) { + this.$this = t0; + }, + _ImportedCssVisitor0: function _ImportedCssVisitor0(t0) { + this._async_evaluate$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure0: function _ImportedCssVisitor_visitCssAtRule_closure0() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure0: function _ImportedCssVisitor_visitCssMediaRule_closure0(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure0: function _ImportedCssVisitor_visitCssStyleRule_closure0() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure0: function _ImportedCssVisitor_visitCssSupportsRule_closure0() { + }, + _EvaluationContext0: function _EvaluationContext0(t0, t1) { + this._async_evaluate$_visitor = t0; + this._async_evaluate$_defaultWarnNodeWithSpan = t1; + }, + cloneCssStylesheet(stylesheet, extensionStore) { + var _0_0 = extensionStore.clone$0(); + return new A._Record_2(new A._CloneCssVisitor(_0_0._1)._visitChildren$2(A.ModifiableCssStylesheet$(stylesheet.get$span(stylesheet)), stylesheet), _0_0._0); + }, + _CloneCssVisitor: function _CloneCssVisitor(t0) { + this._oldToNewSelectors = t0; + }, + _EvaluateVisitor$(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t1 = type$.Uri, + t2 = type$.Module_Callable, + t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode); + t1 = new A._EvaluateVisitor(importCache, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Callable), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, new A.Object(), A.Environment$(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode), t3, B.Configuration_Map_empty_null); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + Evaluator: function Evaluator(t0, t1) { + this._visitor = t0; + this._importer = t1; + }, + _EvaluateVisitor: function _EvaluateVisitor(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) { + var _ = this; + _._evaluate$_importCache = t0; + _._evaluate$_nodeImporter = t1; + _._builtInFunctions = t2; + _._builtInModules = t3; + _._modules = t4; + _._moduleConfigurations = t5; + _._moduleNodes = t6; + _._logger = t7; + _._warningsEmitted = t8; + _._quietDeps = t9; + _._sourceMap = t10; + _._compileContext = t11; + _._environment = t12; + _._declarationName = _.__parent = _._mediaQuerySources = _._mediaQueries = _._styleRuleIgnoringAtRoot = null; + _._member = "root stylesheet"; + _._importSpan = _._callableNode = null; + _._inSupportsDeclaration = _._inKeyframes = _._atRootExcludingStyleRule = _._inUnknownAtRule = _._inFunction = false; + _._loadedUrls = t13; + _._activeModules = t14; + _._stack = t15; + _._importer = null; + _._inDependency = false; + _.__extensionStore = _._preModuleComments = _._outOfOrderImports = _.__endOfImports = _.__root = _.__stylesheet = null; + _._configuration = t16; + }, + _EvaluateVisitor_closure: function _EvaluateVisitor_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure0: function _EvaluateVisitor_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure1: function _EvaluateVisitor_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure2: function _EvaluateVisitor_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure3: function _EvaluateVisitor_closure3(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure4: function _EvaluateVisitor_closure4(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure5: function _EvaluateVisitor_closure5(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure6: function _EvaluateVisitor_closure6(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure7: function _EvaluateVisitor_closure7(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure2: function _EvaluateVisitor__closure2(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure8: function _EvaluateVisitor_closure8(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure1: function _EvaluateVisitor__closure1(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure9: function _EvaluateVisitor_closure9(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure10: function _EvaluateVisitor_closure10(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure: function _EvaluateVisitor__closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.values = t1; + _.span = t2; + _.callableNode = t3; + }, + _EvaluateVisitor__closure0: function _EvaluateVisitor__closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure11: function _EvaluateVisitor_closure11(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure: function _EvaluateVisitor_run_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_run__closure: function _EvaluateVisitor_run__closure(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.node = t2; + }, + _EvaluateVisitor_runExpression_closure: function _EvaluateVisitor_runExpression_closure(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.expression = t2; + }, + _EvaluateVisitor_runExpression__closure: function _EvaluateVisitor_runExpression__closure(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor_runExpression___closure: function _EvaluateVisitor_runExpression___closure(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor_runStatement_closure: function _EvaluateVisitor_runStatement_closure(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.statement = t2; + }, + _EvaluateVisitor_runStatement__closure: function _EvaluateVisitor_runStatement__closure(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_runStatement___closure: function _EvaluateVisitor_runStatement___closure(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor__loadModule_closure: function _EvaluateVisitor__loadModule_closure(t0, t1) { + this._box_0 = t0; + this.callback = t1; + }, + _EvaluateVisitor__loadModule_closure0: function _EvaluateVisitor__loadModule_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure: function _EvaluateVisitor__loadModule__closure(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__loadModule__closure0: function _EvaluateVisitor__loadModule__closure0(t0, t1, t2) { + this._box_1 = t0; + this.callback = t1; + this.firstLoad = t2; + }, + _EvaluateVisitor__execute_closure: function _EvaluateVisitor__execute_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + _.preModuleComments = t6; + }, + _EvaluateVisitor__combineCss_closure: function _EvaluateVisitor__combineCss_closure() { + }, + _EvaluateVisitor__combineCss_closure0: function _EvaluateVisitor__combineCss_closure0(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_visitModule: function _EvaluateVisitor__combineCss_visitModule(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.seen = t1; + _.clone = t2; + _.css = t3; + _.imports = t4; + _.sorted = t5; + }, + _EvaluateVisitor__extendModules_closure: function _EvaluateVisitor__extendModules_closure(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure0: function _EvaluateVisitor__extendModules_closure0() { + }, + _EvaluateVisitor_visitAtRootRule_closure: function _EvaluateVisitor_visitAtRootRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure0: function _EvaluateVisitor_visitAtRootRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure: function _EvaluateVisitor__scopeForAtRoot_closure(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure0: function _EvaluateVisitor__scopeForAtRoot_closure0(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure1: function _EvaluateVisitor__scopeForAtRoot_closure1(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure: function _EvaluateVisitor__scopeForAtRoot__closure(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure2: function _EvaluateVisitor__scopeForAtRoot_closure2(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure3: function _EvaluateVisitor__scopeForAtRoot_closure3() { + }, + _EvaluateVisitor__scopeForAtRoot_closure4: function _EvaluateVisitor__scopeForAtRoot_closure4(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure: function _EvaluateVisitor_visitContentRule_closure(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure: function _EvaluateVisitor_visitDeclaration_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitEachRule_closure: function _EvaluateVisitor_visitEachRule_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure0: function _EvaluateVisitor_visitEachRule_closure0(t0, t1, t2) { + this._box_1 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure1: function _EvaluateVisitor_visitEachRule_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure: function _EvaluateVisitor_visitEachRule__closure(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure: function _EvaluateVisitor_visitEachRule___closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure: function _EvaluateVisitor_visitAtRule_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure0: function _EvaluateVisitor_visitAtRule_closure0(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure1: function _EvaluateVisitor_visitAtRule_closure1(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.children = t2; + }, + _EvaluateVisitor_visitAtRule__closure: function _EvaluateVisitor_visitAtRule__closure(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure2: function _EvaluateVisitor_visitAtRule_closure2() { + }, + _EvaluateVisitor_visitForRule_closure: function _EvaluateVisitor_visitForRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure0: function _EvaluateVisitor_visitForRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure1: function _EvaluateVisitor_visitForRule_closure1(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure2: function _EvaluateVisitor_visitForRule_closure2(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure3: function _EvaluateVisitor_visitForRule_closure3(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure: function _EvaluateVisitor_visitForRule__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure: function _EvaluateVisitor_visitForwardRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure0: function _EvaluateVisitor_visitForwardRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__registerCommentsForModule_closure: function _EvaluateVisitor__registerCommentsForModule_closure() { + }, + _EvaluateVisitor_visitIfRule_closure: function _EvaluateVisitor_visitIfRule_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIfRule__closure: function _EvaluateVisitor_visitIfRule__closure(t0, t1) { + this.$this = t0; + this.clause = t1; + }, + _EvaluateVisitor_visitIfRule___closure: function _EvaluateVisitor_visitIfRule___closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure: function _EvaluateVisitor__visitDynamicImport_closure(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure: function _EvaluateVisitor__visitDynamicImport__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure0: function _EvaluateVisitor__visitDynamicImport__closure0() { + }, + _EvaluateVisitor__visitDynamicImport__closure1: function _EvaluateVisitor__visitDynamicImport__closure1() { + }, + _EvaluateVisitor__visitDynamicImport__closure2: function _EvaluateVisitor__visitDynamicImport__closure2(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.loadsUserDefinedModules = t2; + _.environment = t3; + _.children = t4; + }, + _EvaluateVisitor__applyMixin_closure: function _EvaluateVisitor__applyMixin_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure0: function _EvaluateVisitor__applyMixin__closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin_closure0: function _EvaluateVisitor__applyMixin_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure: function _EvaluateVisitor__applyMixin__closure(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin___closure: function _EvaluateVisitor__applyMixin___closure(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin____closure: function _EvaluateVisitor__applyMixin____closure(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure: function _EvaluateVisitor_visitIncludeRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure0: function _EvaluateVisitor_visitIncludeRule_closure0(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure1: function _EvaluateVisitor_visitIncludeRule_closure1(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitMediaRule_closure: function _EvaluateVisitor_visitMediaRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure0: function _EvaluateVisitor_visitMediaRule_closure0(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure1: function _EvaluateVisitor_visitMediaRule_closure1(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure: function _EvaluateVisitor_visitMediaRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure: function _EvaluateVisitor_visitMediaRule___closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure2: function _EvaluateVisitor_visitMediaRule_closure2(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitStyleRule_closure: function _EvaluateVisitor_visitStyleRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure0: function _EvaluateVisitor_visitStyleRule_closure0() { + }, + _EvaluateVisitor_visitStyleRule_closure2: function _EvaluateVisitor_visitStyleRule_closure2(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure: function _EvaluateVisitor_visitStyleRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure1: function _EvaluateVisitor_visitStyleRule_closure1() { + }, + _EvaluateVisitor__warnForBogusCombinators_closure: function _EvaluateVisitor__warnForBogusCombinators_closure() { + }, + _EvaluateVisitor_visitSupportsRule_closure: function _EvaluateVisitor_visitSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure0: function _EvaluateVisitor_visitSupportsRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure: function _EvaluateVisitor_visitSupportsRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure1: function _EvaluateVisitor_visitSupportsRule_closure1() { + }, + _EvaluateVisitor__visitSupportsCondition_closure: function _EvaluateVisitor__visitSupportsCondition_closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure: function _EvaluateVisitor_visitVariableDeclaration_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure0: function _EvaluateVisitor_visitVariableDeclaration_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure1: function _EvaluateVisitor_visitVariableDeclaration_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure: function _EvaluateVisitor_visitUseRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure: function _EvaluateVisitor_visitWarnRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure: function _EvaluateVisitor_visitWhileRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure: function _EvaluateVisitor_visitWhileRule__closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure: function _EvaluateVisitor_visitBinaryOperationExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__slash_recommendation: function _EvaluateVisitor__slash_recommendation() { + }, + _EvaluateVisitor_visitVariableExpression_closure: function _EvaluateVisitor_visitVariableExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure: function _EvaluateVisitor_visitUnaryOperationExpression_closure(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor_visitIfExpression_closure: function _EvaluateVisitor_visitIfExpression_closure() { + }, + _EvaluateVisitor_visitIfConditionOperation_closure: function _EvaluateVisitor_visitIfConditionOperation_closure() { + }, + _EvaluateVisitor_visitListExpression_closure: function _EvaluateVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure: function _EvaluateVisitor_visitFunctionExpression_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure0: function _EvaluateVisitor_visitFunctionExpression_closure0() { + }, + _EvaluateVisitor_visitFunctionExpression_closure1: function _EvaluateVisitor_visitFunctionExpression_closure1(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor__visitCalculation_closure: function _EvaluateVisitor__visitCalculation_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__checkCalculationArguments_check: function _EvaluateVisitor__checkCalculationArguments_check(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__visitCalculationExpression_closure: function _EvaluateVisitor__visitCalculationExpression_closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.inLegacySassFunction = t3; + }, + _EvaluateVisitor__visitCalculationExpression__closure: function _EvaluateVisitor__visitCalculationExpression__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure: function _EvaluateVisitor__runUserDefinedCallable_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure: function _EvaluateVisitor__runUserDefinedCallable__closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure: function _EvaluateVisitor__runUserDefinedCallable___closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure: function _EvaluateVisitor__runUserDefinedCallable____closure() { + }, + _EvaluateVisitor__runFunctionCallable_closure: function _EvaluateVisitor__runFunctionCallable_closure(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure: function _EvaluateVisitor__runBuiltInCallable_closure(t0, t1, t2) { + this._box_0 = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure0: function _EvaluateVisitor__runBuiltInCallable_closure0(t0, t1) { + this._box_0 = t0; + this.evaluated = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure1: function _EvaluateVisitor__runBuiltInCallable_closure1() { + }, + _EvaluateVisitor__evaluateArguments_closure: function _EvaluateVisitor__evaluateArguments_closure() { + }, + _EvaluateVisitor__evaluateArguments_closure0: function _EvaluateVisitor__evaluateArguments_closure0(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure1: function _EvaluateVisitor__evaluateArguments_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure2: function _EvaluateVisitor__evaluateArguments_closure2() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure: function _EvaluateVisitor__evaluateMacroArguments_closure(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure0: function _EvaluateVisitor__evaluateMacroArguments_closure0(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure1: function _EvaluateVisitor__evaluateMacroArguments_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure2: function _EvaluateVisitor__evaluateMacroArguments_closure2(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure: function _EvaluateVisitor__addRestMap_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure: function _EvaluateVisitor__verifyArguments_closure(t0, t1, t2) { + this.parameters = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitCssAtRule_closure: function _EvaluateVisitor_visitCssAtRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure0: function _EvaluateVisitor_visitCssAtRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure1: function _EvaluateVisitor_visitCssAtRule_closure1() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure: function _EvaluateVisitor_visitCssKeyframeBlock_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure0: function _EvaluateVisitor_visitCssKeyframeBlock_closure0() { + }, + _EvaluateVisitor_visitCssMediaRule_closure: function _EvaluateVisitor_visitCssMediaRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure0: function _EvaluateVisitor_visitCssMediaRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure1: function _EvaluateVisitor_visitCssMediaRule_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure: function _EvaluateVisitor_visitCssMediaRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure: function _EvaluateVisitor_visitCssMediaRule___closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure2: function _EvaluateVisitor_visitCssMediaRule_closure2(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure0: function _EvaluateVisitor_visitCssStyleRule_closure0(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure: function _EvaluateVisitor_visitCssStyleRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure: function _EvaluateVisitor_visitCssStyleRule_closure() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure: function _EvaluateVisitor_visitCssSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure0: function _EvaluateVisitor_visitCssSupportsRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure: function _EvaluateVisitor_visitCssSupportsRule__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure1: function _EvaluateVisitor_visitCssSupportsRule_closure1() { + }, + _EvaluateVisitor__performInterpolationHelper_closure: function _EvaluateVisitor__performInterpolationHelper_closure(t0) { + this.interpolation = t0; + }, + _EvaluateVisitor__serialize_closure: function _EvaluateVisitor__serialize_closure(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure: function _EvaluateVisitor__expressionNode_closure(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation: function _EvaluateVisitor__withoutSlash_recommendation() { + }, + _EvaluateVisitor__stackFrame_closure: function _EvaluateVisitor__stackFrame_closure(t0) { + this.$this = t0; + }, + _ImportedCssVisitor: function _ImportedCssVisitor(t0) { + this._visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure: function _ImportedCssVisitor_visitCssAtRule_closure() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure: function _ImportedCssVisitor_visitCssMediaRule_closure(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure: function _ImportedCssVisitor_visitCssStyleRule_closure() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure: function _ImportedCssVisitor_visitCssSupportsRule_closure() { + }, + _EvaluationContext: function _EvaluationContext(t0, t1) { + this._visitor = t0; + this._defaultWarnNodeWithSpan = t1; + }, + EveryCssVisitor: function EveryCssVisitor() { + }, + EveryCssVisitor_visitCssAtRule_closure: function EveryCssVisitor_visitCssAtRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssKeyframeBlock_closure: function EveryCssVisitor_visitCssKeyframeBlock_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssMediaRule_closure: function EveryCssVisitor_visitCssMediaRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStyleRule_closure: function EveryCssVisitor_visitCssStyleRule_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStylesheet_closure: function EveryCssVisitor_visitCssStylesheet_closure(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssSupportsRule_closure: function EveryCssVisitor_visitCssSupportsRule_closure(t0) { + this.$this = t0; + }, + expressionToCalc(expression) { + var t1 = A.ArgumentList$(A._setArrayType([B.C__MakeExpressionCalculationSafe.visitBinaryOperationExpression$1(0, expression)], type$.JSArray_Expression), B.Map_empty4, B.Map_empty5, expression.get$span(0), null, null), + t2 = expression.get$span(0); + return new A.FunctionExpression(null, A.stringReplaceAllUnchecked("calc", "_", "-"), "calc", t1, t2); + }, + _MakeExpressionCalculationSafe: function _MakeExpressionCalculationSafe() { + }, + __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor: function __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor() { + }, + _FindDependenciesVisitor: function _FindDependenciesVisitor(t0, t1, t2, t3, t4) { + var _ = this; + _._find_dependencies$_uses = t0; + _._find_dependencies$_forwards = t1; + _._metaLoadCss = t2; + _._imports = t3; + _._metaNamespaces = t4; + }, + __FindDependenciesVisitor_Object_RecursiveStatementVisitor: function __FindDependenciesVisitor_Object_RecursiveStatementVisitor() { + }, + IsCalculationSafeVisitor: function IsCalculationSafeVisitor() { + }, + IsCalculationSafeVisitor_visitListExpression_closure: function IsCalculationSafeVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + IsPlainCssVisitor: function IsPlainCssVisitor(t0) { + this._allowInterpolation = t0; + }, + IsPlainCssVisitor_visitIfExpression_closure: function IsPlainCssVisitor_visitIfExpression_closure(t0) { + this.$this = t0; + }, + IsPlainCssVisitor_visitListExpression_closure: function IsPlainCssVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + IsPlainCssVisitor_visitIfConditionOperation_closure: function IsPlainCssVisitor_visitIfConditionOperation_closure(t0) { + this.$this = t0; + }, + IsPlainCssVisitor__visitArgumentList_closure: function IsPlainCssVisitor__visitArgumentList_closure(t0) { + this.$this = t0; + }, + RecursiveStatementVisitor: function RecursiveStatementVisitor() { + }, + ReplaceExpressionVisitor: function ReplaceExpressionVisitor() { + }, + ReplaceExpressionVisitor_visitListExpression_closure: function ReplaceExpressionVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitIfConditionOperation_closure: function ReplaceExpressionVisitor_visitIfConditionOperation_closure(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitArgumentList_closure: function ReplaceExpressionVisitor_visitArgumentList_closure(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitInterpolation_closure: function ReplaceExpressionVisitor_visitInterpolation_closure(t0) { + this.$this = t0; + }, + SelectorSearchVisitor: function SelectorSearchVisitor() { + }, + SelectorSearchVisitor_visitComplexSelector_closure: function SelectorSearchVisitor_visitComplexSelector_closure(t0) { + this.$this = t0; + }, + SelectorSearchVisitor_visitCompoundSelector_closure: function SelectorSearchVisitor_visitCompoundSelector_closure(t0) { + this.$this = t0; + }, + serialize(node, charset, indentWidth, inspect, lineFeed, logger, sourceMap, style, useSpaces) { + var t1, css, t2, prefix, + visitor = A._SerializeVisitor$(2, inspect, lineFeed, logger, true, sourceMap, style, true); + node.accept$1(visitor); + t1 = visitor._serialize$_buffer; + css = t1.toString$0(0); + if (charset) { + t2 = new A.CodeUnits(css); + t2 = t2.any$1(t2, new A.serialize_closure()); + } else + t2 = false; + if (t2) + prefix = style === B.OutputStyle_1 ? "\ufeff" : '@charset "UTF-8";\n'; + else + prefix = ""; + t1 = sourceMap ? t1.buildSourceMap$1$prefix(prefix) : null; + return new A._Record_2_sourceMap(prefix + css, t1); + }, + serializeValue(value, inspect, quote) { + var _null = null, + visitor = A._SerializeVisitor$(_null, inspect, _null, _null, quote, false, _null, true); + value.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + }, + serializeSelector(selector, inspect) { + var _null = null, + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + selector.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + }, + _SerializeVisitor$(indentWidth, inspect, lineFeed, logger, quote, sourceMap, style, useSpaces) { + var t1 = sourceMap ? new A.SourceMapBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Entry)) : new A.NoSourceMapBuffer(new A.StringBuffer("")), + t2 = style == null ? B.OutputStyle_0 : style, + t3 = indentWidth == null ? 2 : indentWidth; + A.RangeError_checkValueInInterval(t3, 0, 10, "indentWidth"); + return new A._SerializeVisitor(t1, t2, inspect, quote, 32, t3, B.LineFeed_2_lf); + }, + serialize_closure: function serialize_closure() { + }, + _SerializeVisitor: function _SerializeVisitor(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._serialize$_buffer = t0; + _._indentation = 0; + _._style = t1; + _._inspect = t2; + _._quote = t3; + _._indentCharacter = t4; + _._indentWidth = t5; + _._serialize$_lineFeed = t6; + }, + _SerializeVisitor_visitCssComment_closure: function _SerializeVisitor_visitCssComment_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssAtRule_closure: function _SerializeVisitor_visitCssAtRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssMediaRule_closure: function _SerializeVisitor_visitCssMediaRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport_closure: function _SerializeVisitor_visitCssImport_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport__closure: function _SerializeVisitor_visitCssImport__closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssKeyframeBlock_closure: function _SerializeVisitor_visitCssKeyframeBlock_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssStyleRule_closure: function _SerializeVisitor_visitCssStyleRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssSupportsRule_closure: function _SerializeVisitor_visitCssSupportsRule_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure: function _SerializeVisitor_visitCssDeclaration_closure(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure0: function _SerializeVisitor_visitCssDeclaration_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitList_closure: function _SerializeVisitor_visitList_closure() { + }, + _SerializeVisitor_visitList_closure0: function _SerializeVisitor_visitList_closure0(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor_visitList_closure1: function _SerializeVisitor_visitList_closure1(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitMap_closure: function _SerializeVisitor_visitMap_closure(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitSelectorList_closure: function _SerializeVisitor_visitSelectorList_closure() { + }, + _SerializeVisitor__write_closure: function _SerializeVisitor__write_closure(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor__visitChildren_closure: function _SerializeVisitor__visitChildren_closure(t0, t1) { + this.$this = t0; + this.child = t1; + }, + _SerializeVisitor__visitChildren_closure0: function _SerializeVisitor__visitChildren_closure0(t0, t1) { + this.$this = t0; + this.child = t1; + }, + OutputStyle: function OutputStyle(t0, t1) { + this.index = t0; + this._name = t1; + }, + LineFeed: function LineFeed(t0, t1) { + this.index = t0; + this._name = t1; + }, + StatementSearchVisitor: function StatementSearchVisitor() { + }, + StatementSearchVisitor_visitIfRule_closure: function StatementSearchVisitor_visitIfRule_closure(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure0: function StatementSearchVisitor_visitIfRule__closure0(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule_closure0: function StatementSearchVisitor_visitIfRule_closure0(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure: function StatementSearchVisitor_visitIfRule__closure(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitChildren_closure: function StatementSearchVisitor_visitChildren_closure(t0) { + this.$this = t0; + }, + Entry: function Entry(t0, t1, t2) { + this.source = t0; + this.target = t1; + this.identifierName = t2; + }, + SingleMapping_SingleMapping$fromEntries(entries) { + var lines, t1, t2, urls, names, files, targetEntries, t3, lineNum, _i, sourceEntry, t4, t5, sourceUrl, t6, urlId, + sourceEntries = J.toList$0$ax(entries); + B.JSArray_methods.sort$0(sourceEntries); + lines = A._setArrayType([], type$.JSArray_TargetLineEntry); + t1 = type$.String; + t2 = type$.int; + urls = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + names = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + files = A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.SourceFile); + targetEntries = A._Cell$(); + for (t2 = sourceEntries.length, t3 = type$.JSArray_TargetEntry, lineNum = null, _i = 0; _i < sourceEntries.length; sourceEntries.length === t2 || (0, A.throwConcurrentModificationError)(sourceEntries), ++_i) { + sourceEntry = sourceEntries[_i]; + if (lineNum == null || sourceEntry.target.line > lineNum) { + lineNum = sourceEntry.target.line; + t4 = A._setArrayType([], t3); + targetEntries.__late_helper$_value = t4; + lines.push(new A.TargetLineEntry(lineNum, t4)); + } + t4 = sourceEntry.source; + t5 = t4.file; + sourceUrl = t5.url; + t6 = sourceUrl == null ? "" : sourceUrl.toString$0(0); + urlId = urls.putIfAbsent$2(t6, new A.SingleMapping_SingleMapping$fromEntries_closure(urls)); + files.putIfAbsent$2(urlId, new A.SingleMapping_SingleMapping$fromEntries_closure0(sourceEntry)); + t6 = targetEntries.__late_helper$_value; + if (t6 === targetEntries) + A.throwExpression(A.LateError$localNI("")); + t4 = t4.offset; + J.add$1$ax(t6, new A.TargetEntry(sourceEntry.target.column, urlId, t5.getLine$1(t4), t5.getColumn$1(t4), null)); + } + t2 = urls.$ti; + t3 = t2._eval$1("LinkedHashMapValuesIterable<2>"); + t3 = A.MappedIterable_MappedIterable(new A.LinkedHashMapValuesIterable(urls, t3), new A.SingleMapping_SingleMapping$fromEntries_closure1(files), t3._eval$1("Iterable.E"), type$.nullable_SourceFile); + t3 = A.List_List$_of(t3, A._instanceType(t3)._eval$1("Iterable.E")); + t2 = t2._eval$1("LinkedHashMapKeysIterable<1>"); + t2 = A.List_List$_of(new A.LinkedHashMapKeysIterable(urls, t2), t2._eval$1("Iterable.E")); + t4 = names.$ti._eval$1("LinkedHashMapKeysIterable<1>"); + t4 = A.List_List$_of(new A.LinkedHashMapKeysIterable(names, t4), t4._eval$1("Iterable.E")); + return new A.SingleMapping(t2, t4, t3, lines, null, A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.dynamic)); + }, + Mapping: function Mapping() { + }, + SingleMapping: function SingleMapping(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.urls = t0; + _.names = t1; + _.files = t2; + _.lines = t3; + _.targetUrl = t4; + _.sourceRoot = null; + _.extensions = t5; + }, + SingleMapping_SingleMapping$fromEntries_closure: function SingleMapping_SingleMapping$fromEntries_closure(t0) { + this.urls = t0; + }, + SingleMapping_SingleMapping$fromEntries_closure0: function SingleMapping_SingleMapping$fromEntries_closure0(t0) { + this.sourceEntry = t0; + }, + SingleMapping_SingleMapping$fromEntries_closure1: function SingleMapping_SingleMapping$fromEntries_closure1(t0) { + this.files = t0; + }, + SingleMapping_toJson_closure: function SingleMapping_toJson_closure() { + }, + SingleMapping_toJson_closure0: function SingleMapping_toJson_closure0(t0) { + this.result = t0; + }, + TargetLineEntry: function TargetLineEntry(t0, t1) { + this.line = t0; + this.entries = t1; + }, + TargetEntry: function TargetEntry(t0, t1, t2, t3, t4) { + var _ = this; + _.column = t0; + _.sourceUrlId = t1; + _.sourceLine = t2; + _.sourceColumn = t3; + _.sourceNameId = t4; + }, + SourceFile$fromString(text, url) { + var t1 = new A.CodeUnits(text), + t2 = A._setArrayType([0], type$.JSArray_int), + t3 = typeof url == "string" ? A.Uri_parse(url) : type$.nullable_Uri._as(url), + t4 = t1.get$length(0); + t2 = new A.SourceFile(t3, t2, new Uint32Array(t4)); + t2.SourceFile$_fromList$2$url(t1, url); + return t2; + }, + SourceFile$decoded(decodedChars, url) { + var t1 = A._setArrayType(decodedChars.slice(0), A._arrayInstanceType(decodedChars)), + t2 = A._setArrayType([0], type$.JSArray_int), + t3 = typeof url == "string" ? A.Uri_parse(url) : type$.nullable_Uri._as(url), + t4 = t1.length; + t2 = new A.SourceFile(t3, t2, new Uint32Array(t4)); + t2.SourceFile$_fromList$2$url(t1, url); + return t2; + }, + FileLocation$_(file, offset) { + if (offset < 0) + A.throwExpression(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > file._decodedChars.length) + A.throwExpression(A.RangeError$("Offset " + offset + string$.x20must_n + file.get$length(0) + ".")); + return new A.FileLocation(file, offset); + }, + _FileSpan$(file, _start, _end) { + if (_end < _start) + A.throwExpression(A.ArgumentError$("End " + _end + " must come after start " + _start + ".", null)); + else if (_end > file._decodedChars.length) + A.throwExpression(A.RangeError$("End " + _end + string$.x20must_n + file.get$length(0) + ".")); + else if (_start < 0) + A.throwExpression(A.RangeError$("Start may not be negative, was " + _start + ".")); + return new A._FileSpan(file, _start, _end); + }, + FileSpanExtension_subspan(_this, start, end) { + var t1, startOffset, t2; + A.RangeError_checkValidRange(start, end, _this.get$length(_this)); + if (start === 0) + t1 = end == null || end === _this.get$length(_this); + else + t1 = false; + if (t1) + return _this; + startOffset = _this.get$start(_this).offset; + t1 = _this.get$file(_this); + t2 = end == null ? _this.get$end(_this).offset : startOffset + end; + return t1.span$2(0, startOffset + start, t2); + }, + SourceFile: function SourceFile(t0, t1, t2) { + var _ = this; + _.url = t0; + _._lineStarts = t1; + _._decodedChars = t2; + _._cachedLine = null; + }, + FileLocation: function FileLocation(t0, t1) { + this.file = t0; + this.offset = t1; + }, + _FileSpan: function _FileSpan(t0, t1, t2) { + this.file = t0; + this._file$_start = t1; + this._end = t2; + }, + Highlighter$(span, color) { + var t1 = A.Highlighter__collateLines(A._setArrayType([A._Highlight$(span, null, true)], type$.JSArray__Highlight)), + t2 = new A.Highlighter_closure(color).call$0(), + t3 = B.JSInt_methods.toString$0(B.JSArray_methods.get$last(t1).number + 1), + t4 = A.Highlighter__contiguous(t1) ? 0 : 3, + t5 = A._arrayInstanceType(t1); + return new A.Highlighter(t1, t2, null, 1 + Math.max(t3.length, t4), new A.MappedListIterable(t1, new A.Highlighter$__closure(), t5._eval$1("MappedListIterable<1,int>")).reduce$1(0, B.CONSTANT), !A.isAllTheSame(new A.MappedListIterable(t1, new A.Highlighter$__closure0(), t5._eval$1("MappedListIterable<1,Object?>"))), new A.StringBuffer("")); + }, + Highlighter$multiple(primarySpan, primaryLabel, secondarySpans, color, primaryColor, secondaryColor) { + var t2, t3, t4, t5, t6, + t1 = A._setArrayType([A._Highlight$(primarySpan, primaryLabel, true)], type$.JSArray__Highlight); + for (t2 = secondarySpans.get$entries(secondarySpans), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(A._Highlight$(t3.key, t3.value, false)); + } + t1 = A.Highlighter__collateLines(t1); + if (color) + t2 = primaryColor == null ? "\x1b[31m" : primaryColor; + else + t2 = null; + if (color) + t3 = "\x1b[34m"; + else + t3 = null; + t4 = B.JSInt_methods.toString$0(B.JSArray_methods.get$last(t1).number + 1); + t5 = A.Highlighter__contiguous(t1) ? 0 : 3; + t6 = A._arrayInstanceType(t1); + return new A.Highlighter(t1, t2, t3, 1 + Math.max(t4.length, t5), new A.MappedListIterable(t1, new A.Highlighter$__closure(), t6._eval$1("MappedListIterable<1,int>")).reduce$1(0, B.CONSTANT), !A.isAllTheSame(new A.MappedListIterable(t1, new A.Highlighter$__closure0(), t6._eval$1("MappedListIterable<1,Object?>"))), new A.StringBuffer("")); + }, + Highlighter__contiguous(lines) { + var i, thisLine, nextLine; + for (i = 0; i < lines.length - 1;) { + thisLine = lines[i]; + ++i; + nextLine = lines[i]; + if (thisLine.number + 1 !== nextLine.number && J.$eq$(thisLine.url, nextLine.url)) + return false; + } + return true; + }, + Highlighter__collateLines(highlights) { + var t1, t2, + highlightsByUrl = A.groupBy(highlights, new A.Highlighter__collateLines_closure(), type$._Highlight, type$.Object); + for (t1 = new A.LinkedHashMapValueIterator(highlightsByUrl, highlightsByUrl._modifications, highlightsByUrl._first); t1.moveNext$0();) + J.sort$1$ax(t1.__js_helper$_current, new A.Highlighter__collateLines_closure0()); + t1 = A._instanceType(highlightsByUrl)._eval$1("LinkedHashMapEntriesIterable<1,2>"); + t2 = t1._eval$1("ExpandIterable"); + t1 = A.List_List$_of(new A.ExpandIterable(new A.LinkedHashMapEntriesIterable(highlightsByUrl, t1), new A.Highlighter__collateLines_closure1(), t2), t2._eval$1("Iterable.E")); + return t1; + }, + _Highlight$(span, label, primary) { + var t2, + t1 = new A._Highlight_closure(span).call$0(); + if (label == null) + t2 = null; + else + t2 = A.stringReplaceAllUnchecked(label, "\r\n", "\n"); + return new A._Highlight(t1, primary, t2); + }, + _Highlight__normalizeNewlines(span) { + var endOffset, t1, i, t2, t3, t4, + text = span.get$text(); + if (!B.JSString_methods.contains$1(text, "\r\n")) + return span; + endOffset = span.get$end(span).get$offset(); + for (t1 = text.length - 1, i = 0; i < t1; ++i) + if (text.charCodeAt(i) === 13 && text.charCodeAt(i + 1) === 10) + --endOffset; + t1 = span.get$start(span); + t2 = span.get$sourceUrl(span); + t3 = span.get$end(span).get$line(); + t2 = A.SourceLocation$(endOffset, span.get$end(span).get$column(), t3, t2); + t3 = A.stringReplaceAllUnchecked(text, "\r\n", "\n"); + t4 = span.get$context(span); + return A.SourceSpanWithContext$(t1, t2, t3, A.stringReplaceAllUnchecked(t4, "\r\n", "\n")); + }, + _Highlight__normalizeTrailingNewline(span) { + var context, text, start, end, t1, t2, t3; + if (!B.JSString_methods.endsWith$1(span.get$context(span), "\n")) + return span; + if (B.JSString_methods.endsWith$1(span.get$text(), "\n\n")) + return span; + context = B.JSString_methods.substring$2(span.get$context(span), 0, span.get$context(span).length - 1); + text = span.get$text(); + start = span.get$start(span); + end = span.get$end(span); + if (B.JSString_methods.endsWith$1(span.get$text(), "\n")) { + t1 = A.findLineStart(span.get$context(span), span.get$text(), span.get$start(span).get$column()); + t1.toString; + t1 = t1 + span.get$start(span).get$column() + span.get$length(span) === span.get$context(span).length; + } else + t1 = false; + if (t1) { + text = B.JSString_methods.substring$2(span.get$text(), 0, span.get$text().length - 1); + if (text.length === 0) + end = start; + else { + t1 = span.get$end(span).get$offset(); + t2 = span.get$sourceUrl(span); + t3 = span.get$end(span).get$line(); + end = A.SourceLocation$(t1 - 1, A._Highlight__lastLineLength(context), t3 - 1, t2); + start = span.get$start(span).get$offset() === span.get$end(span).get$offset() ? end : span.get$start(span); + } + } + return A.SourceSpanWithContext$(start, end, text, context); + }, + _Highlight__normalizeEndOfLine(span) { + var text, t1, t2, t3, t4; + if (span.get$end(span).get$column() !== 0) + return span; + if (span.get$end(span).get$line() === span.get$start(span).get$line()) + return span; + text = B.JSString_methods.substring$2(span.get$text(), 0, span.get$text().length - 1); + t1 = span.get$start(span); + t2 = span.get$end(span).get$offset(); + t3 = span.get$sourceUrl(span); + t4 = span.get$end(span).get$line(); + t3 = A.SourceLocation$(t2 - 1, text.length - B.JSString_methods.lastIndexOf$1(text, "\n") - 1, t4 - 1, t3); + return A.SourceSpanWithContext$(t1, t3, text, B.JSString_methods.endsWith$1(span.get$context(span), "\n") ? B.JSString_methods.substring$2(span.get$context(span), 0, span.get$context(span).length - 1) : span.get$context(span)); + }, + _Highlight__lastLineLength(text) { + var t1 = text.length; + if (t1 === 0) + return 0; + else if (text.charCodeAt(t1 - 1) === 10) + return t1 === 1 ? 0 : t1 - B.JSString_methods.lastIndexOf$2(text, "\n", t1 - 2) - 1; + else + return t1 - B.JSString_methods.lastIndexOf$1(text, "\n") - 1; + }, + Highlighter: function Highlighter(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._lines = t0; + _._primaryColor = t1; + _._secondaryColor = t2; + _._paddingBeforeSidebar = t3; + _._maxMultilineSpans = t4; + _._multipleFiles = t5; + _._highlighter$_buffer = t6; + }, + Highlighter_closure: function Highlighter_closure(t0) { + this.color = t0; + }, + Highlighter$__closure: function Highlighter$__closure() { + }, + Highlighter$___closure: function Highlighter$___closure() { + }, + Highlighter$__closure0: function Highlighter$__closure0() { + }, + Highlighter__collateLines_closure: function Highlighter__collateLines_closure() { + }, + Highlighter__collateLines_closure0: function Highlighter__collateLines_closure0() { + }, + Highlighter__collateLines_closure1: function Highlighter__collateLines_closure1() { + }, + Highlighter__collateLines__closure: function Highlighter__collateLines__closure(t0) { + this.line = t0; + }, + Highlighter_highlight_closure: function Highlighter_highlight_closure() { + }, + Highlighter__writeFileStart_closure: function Highlighter__writeFileStart_closure(t0) { + this.$this = t0; + }, + Highlighter__writeMultilineHighlights_closure: function Highlighter__writeMultilineHighlights_closure(t0, t1, t2) { + this.$this = t0; + this.startLine = t1; + this.line = t2; + }, + Highlighter__writeMultilineHighlights_closure0: function Highlighter__writeMultilineHighlights_closure0(t0, t1) { + this.$this = t0; + this.highlight = t1; + }, + Highlighter__writeMultilineHighlights_closure1: function Highlighter__writeMultilineHighlights_closure1(t0) { + this.$this = t0; + }, + Highlighter__writeMultilineHighlights_closure2: function Highlighter__writeMultilineHighlights_closure2(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.current = t2; + _.startLine = t3; + _.line = t4; + _.highlight = t5; + _.endLine = t6; + }, + Highlighter__writeMultilineHighlights__closure: function Highlighter__writeMultilineHighlights__closure(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + Highlighter__writeMultilineHighlights__closure0: function Highlighter__writeMultilineHighlights__closure0(t0, t1) { + this.$this = t0; + this.vertical = t1; + }, + Highlighter__writeHighlightedText_closure: function Highlighter__writeHighlightedText_closure(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.text = t1; + _.startColumn = t2; + _.endColumn = t3; + }, + Highlighter__writeIndicator_closure: function Highlighter__writeIndicator_closure(t0, t1, t2) { + this.$this = t0; + this.line = t1; + this.highlight = t2; + }, + Highlighter__writeIndicator_closure0: function Highlighter__writeIndicator_closure0(t0, t1, t2) { + this.$this = t0; + this.line = t1; + this.highlight = t2; + }, + Highlighter__writeIndicator_closure1: function Highlighter__writeIndicator_closure1(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.coversWholeLine = t1; + _.line = t2; + _.highlight = t3; + }, + Highlighter__writeLabel_closure: function Highlighter__writeLabel_closure(t0, t1) { + this.$this = t0; + this.lines = t1; + }, + Highlighter__writeLabel_closure0: function Highlighter__writeLabel_closure0(t0, t1) { + this.$this = t0; + this.text = t1; + }, + Highlighter__writeSidebar_closure: function Highlighter__writeSidebar_closure(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.end = t2; + }, + _Highlight: function _Highlight(t0, t1, t2) { + this.span = t0; + this.isPrimary = t1; + this.label = t2; + }, + _Highlight_closure: function _Highlight_closure(t0) { + this.span = t0; + }, + _Line: function _Line(t0, t1, t2, t3) { + var _ = this; + _.text = t0; + _.number = t1; + _.url = t2; + _.highlights = t3; + }, + SourceLocation$(offset, column, line, sourceUrl) { + if (offset < 0) + A.throwExpression(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (line < 0) + A.throwExpression(A.RangeError$("Line may not be negative, was " + line + ".")); + else if (column < 0) + A.throwExpression(A.RangeError$("Column may not be negative, was " + column + ".")); + return new A.SourceLocation(sourceUrl, offset, line, column); + }, + SourceLocation: function SourceLocation(t0, t1, t2, t3) { + var _ = this; + _.sourceUrl = t0; + _.offset = t1; + _.line = t2; + _.column = t3; + }, + SourceLocationMixin: function SourceLocationMixin() { + }, + SourceSpanExtension_messageMultiple(_this, message, label, secondarySpans, color, primaryColor, secondaryColor) { + var t2, t3, + t1 = _this.get$start(_this); + t1 = t1.file.getLine$1(t1.offset); + t2 = _this.get$start(_this); + t2 = "line " + (t1 + 1) + ", column " + (t2.file.getColumn$1(t2.offset) + 1); + if (_this.get$sourceUrl(_this) != null) { + t1 = _this.get$sourceUrl(_this); + t3 = $.$get$context(); + t1.toString; + t1 = t2 + (" of " + t3.prettyUri$1(t1)); + } else + t1 = t2; + t1 = t1 + (": " + message + "\n") + A.Highlighter$multiple(_this, label, secondarySpans, color, primaryColor, secondaryColor).highlight$0(); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + SourceSpanBase: function SourceSpanBase() { + }, + MultiSourceSpanFormatException$(message, span, primaryLabel, secondarySpans, source) { + return new A.MultiSourceSpanFormatException(source, primaryLabel, A.ConstantMap_ConstantMap$from(secondarySpans, type$.SourceSpan, type$.String), message, span); + }, + SourceSpanException: function SourceSpanException() { + }, + SourceSpanFormatException: function SourceSpanFormatException(t0, t1, t2) { + this.source = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSourceSpanException: function MultiSourceSpanException() { + }, + MultiSourceSpanFormatException: function MultiSourceSpanFormatException(t0, t1, t2, t3, t4) { + var _ = this; + _.source = t0; + _.primaryLabel = t1; + _.secondarySpans = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SourceSpanMixin: function SourceSpanMixin() { + }, + SourceSpanWithContext$(start, end, text, _context) { + var t1 = new A.SourceSpanWithContext(_context, start, end, text); + t1.SourceSpanBase$3(start, end, text); + if (!B.JSString_methods.contains$1(_context, text)) + A.throwExpression(A.ArgumentError$('The context line "' + _context + '" must contain "' + text + '".', null)); + if (A.findLineStart(_context, text, start.get$column()) == null) + A.throwExpression(A.ArgumentError$('The span text "' + text + '" must start at column ' + (start.get$column() + 1) + ' in a line within "' + _context + '".', null)); + return t1; + }, + SourceSpanWithContext: function SourceSpanWithContext(t0, t1, t2, t3) { + var _ = this; + _._context = t0; + _.start = t1; + _.end = t2; + _.text = t3; + }, + Chain_Chain$parse(chain) { + var t1, t2, + _s51_ = string$.x3d_____; + if (chain.length === 0) + return new A.Chain(A.List_List$unmodifiable(A._setArrayType([], type$.JSArray_Trace), type$.Trace)); + t1 = $.$get$vmChainGap(); + if (B.JSString_methods.contains$1(chain, t1)) { + t1 = B.JSString_methods.split$1(chain, t1); + t2 = A._arrayInstanceType(t1); + return new A.Chain(A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(t1, new A.Chain_Chain$parse_closure(), t2._eval$1("WhereIterable<1>")), A.trace_Trace___parseVM_tearOff$closure(), t2._eval$1("MappedIterable<1,Trace>")), type$.Trace)); + } + if (!B.JSString_methods.contains$1(chain, _s51_)) + return new A.Chain(A.List_List$unmodifiable(A._setArrayType([A.Trace_Trace$parse(chain)], type$.JSArray_Trace), type$.Trace)); + return new A.Chain(A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(chain.split(_s51_), type$.JSArray_String), A.trace_Trace___parseFriendly_tearOff$closure(), type$.MappedListIterable_String_Trace), type$.Trace)); + }, + Chain: function Chain(t0) { + this.traces = t0; + }, + Chain_Chain$parse_closure: function Chain_Chain$parse_closure() { + }, + Chain_toTrace_closure: function Chain_toTrace_closure() { + }, + Chain_toString_closure0: function Chain_toString_closure0() { + }, + Chain_toString__closure0: function Chain_toString__closure0() { + }, + Chain_toString_closure: function Chain_toString_closure(t0) { + this.longest = t0; + }, + Chain_toString__closure: function Chain_toString__closure(t0) { + this.longest = t0; + }, + Frame___parseVM_tearOff(frame) { + return A.Frame_Frame$parseVM(frame); + }, + Frame_Frame$parseVM(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseVM_closure(frame)); + }, + Frame___parseV8_tearOff(frame) { + return A.Frame_Frame$parseV8(frame); + }, + Frame_Frame$parseV8(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseV8_closure(frame)); + }, + Frame_Frame$_parseFirefoxEval(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$_parseFirefoxEval_closure(frame)); + }, + Frame___parseFirefox_tearOff(frame) { + return A.Frame_Frame$parseFirefox(frame); + }, + Frame_Frame$parseFirefox(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFirefox_closure(frame)); + }, + Frame___parseFriendly_tearOff(frame) { + return A.Frame_Frame$parseFriendly(frame); + }, + Frame_Frame$parseFriendly(frame) { + return A.Frame__catchFormatException(frame, new A.Frame_Frame$parseFriendly_closure(frame)); + }, + Frame__uriOrPathToUri(uriOrPath) { + if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__uriRegExp())) + return A.Uri_parse(uriOrPath); + else if (B.JSString_methods.contains$1(uriOrPath, $.$get$Frame__windowsRegExp())) + return A._Uri__Uri$file(uriOrPath, true); + else if (B.JSString_methods.startsWith$1(uriOrPath, "/")) + return A._Uri__Uri$file(uriOrPath, false); + if (B.JSString_methods.contains$1(uriOrPath, "\\")) + return $.$get$windows().toUri$1(uriOrPath); + return A.Uri_parse(uriOrPath); + }, + Frame__catchFormatException(text, body) { + var t1, exception; + try { + t1 = body.call$0(); + return t1; + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) + return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), text); + else + throw exception; + } + }, + Frame: function Frame(t0, t1, t2, t3) { + var _ = this; + _.uri = t0; + _.line = t1; + _.column = t2; + _.member = t3; + }, + Frame_Frame$parseVM_closure: function Frame_Frame$parseVM_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseV8_closure: function Frame_Frame$parseV8_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseV8_closure_parseJsLocation: function Frame_Frame$parseV8_closure_parseJsLocation(t0) { + this.frame = t0; + }, + Frame_Frame$_parseFirefoxEval_closure: function Frame_Frame$_parseFirefoxEval_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseFirefox_closure: function Frame_Frame$parseFirefox_closure(t0) { + this.frame = t0; + }, + Frame_Frame$parseFriendly_closure: function Frame_Frame$parseFriendly_closure(t0) { + this.frame = t0; + }, + LazyTrace: function LazyTrace(t0) { + this._thunk = t0; + this.__LazyTrace__trace_FI = $; + }, + LazyTrace_terse_closure: function LazyTrace_terse_closure(t0) { + this.$this = t0; + }, + Trace_Trace$from(trace) { + if (type$.Trace._is(trace)) + return trace; + if (trace instanceof A.Chain) + return trace.toTrace$0(); + return new A.LazyTrace(new A.Trace_Trace$from_closure(trace)); + }, + Trace_Trace$parse(trace) { + var error, t1, exception; + try { + if (trace.length === 0) { + t1 = A.Trace$(A._setArrayType([], type$.JSArray_Frame), null); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_v8Trace())) { + t1 = A.Trace$parseV8(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, "\tat ")) { + t1 = A.Trace$parseJSCore(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_firefoxSafariTrace()) || B.JSString_methods.contains$1(trace, $.$get$_firefoxEvalTrace())) { + t1 = A.Trace$parseFirefox(trace); + return t1; + } + if (B.JSString_methods.contains$1(trace, string$.x3d_____)) { + t1 = A.Chain_Chain$parse(trace).toTrace$0(); + return t1; + } + if (B.JSString_methods.contains$1(trace, $.$get$_friendlyTrace())) { + t1 = A.Trace$parseFriendly(trace); + return t1; + } + t1 = A.Trace$parseVM(trace); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + error = t1; + throw A.wrapException(A.FormatException$(J.get$message$x(error) + "\nStack trace:\n" + trace, null, null)); + } else + throw exception; + } + }, + Trace___parseVM_tearOff(trace) { + return A.Trace$parseVM(trace); + }, + Trace$parseVM(trace) { + var t1 = A.List_List$unmodifiable(A.Trace__parseVM(trace), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace__parseVM(trace) { + var $frames, + t1 = B.JSString_methods.trim$0(trace), + t2 = $.$get$vmChainGap(), + t3 = type$.WhereIterable_String, + lines = new A.WhereIterable(A._setArrayType(A.stringReplaceAllUnchecked(t1, t2, "").split("\n"), type$.JSArray_String), new A.Trace__parseVM_closure(), t3); + if (!lines.get$iterator(0).moveNext$0()) + return A._setArrayType([], type$.JSArray_Frame); + t1 = A.TakeIterable_TakeIterable(lines, lines.get$length(0) - 1, t3._eval$1("Iterable.E")); + t1 = A.MappedIterable_MappedIterable(t1, A.frame_Frame___parseVM_tearOff$closure(), A._instanceType(t1)._eval$1("Iterable.E"), type$.Frame); + $frames = A.List_List$_of(t1, A._instanceType(t1)._eval$1("Iterable.E")); + if (!B.JSString_methods.endsWith$1(lines.get$last(0), ".da")) + $frames.push(A.Frame_Frame$parseVM(lines.get$last(0))); + return $frames; + }, + Trace$parseV8(trace) { + var t1 = A.SubListIterable$(A._setArrayType(trace.split("\n"), type$.JSArray_String), 1, null, type$.String).super$Iterable$skipWhile(0, new A.Trace$parseV8_closure()), + t2 = type$.Frame; + t2 = A.List_List$unmodifiable(A.MappedIterable_MappedIterable(t1, A.frame_Frame___parseV8_tearOff$closure(), t1.$ti._eval$1("Iterable.E"), t2), t2); + return new A.Trace(t2, new A._StringStackTrace(trace)); + }, + Trace$parseJSCore(trace) { + var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(trace.split("\n"), type$.JSArray_String), new A.Trace$parseJSCore_closure(), type$.WhereIterable_String), A.frame_Frame___parseV8_tearOff$closure(), type$.MappedIterable_String_Frame), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace$parseFirefox(trace) { + var t1 = A.List_List$unmodifiable(new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), new A.Trace$parseFirefox_closure(), type$.WhereIterable_String), A.frame_Frame___parseFirefox_tearOff$closure(), type$.MappedIterable_String_Frame), type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace___parseFriendly_tearOff(trace) { + return A.Trace$parseFriendly(trace); + }, + Trace$parseFriendly(trace) { + var t1 = trace.length === 0 ? A._setArrayType([], type$.JSArray_Frame) : new A.MappedIterable(new A.WhereIterable(A._setArrayType(B.JSString_methods.trim$0(trace).split("\n"), type$.JSArray_String), new A.Trace$parseFriendly_closure(), type$.WhereIterable_String), A.frame_Frame___parseFriendly_tearOff$closure(), type$.MappedIterable_String_Frame); + t1 = A.List_List$unmodifiable(t1, type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(trace)); + }, + Trace$($frames, original) { + var t1 = A.List_List$unmodifiable($frames, type$.Frame); + return new A.Trace(t1, new A._StringStackTrace(original == null ? "" : original)); + }, + Trace: function Trace(t0, t1) { + this.frames = t0; + this.original = t1; + }, + Trace_Trace$from_closure: function Trace_Trace$from_closure(t0) { + this.trace = t0; + }, + Trace__parseVM_closure: function Trace__parseVM_closure() { + }, + Trace$parseV8_closure: function Trace$parseV8_closure() { + }, + Trace$parseJSCore_closure: function Trace$parseJSCore_closure() { + }, + Trace$parseFirefox_closure: function Trace$parseFirefox_closure() { + }, + Trace$parseFriendly_closure: function Trace$parseFriendly_closure() { + }, + Trace_terse_closure: function Trace_terse_closure() { + }, + Trace_foldFrames_closure: function Trace_foldFrames_closure(t0) { + this.oldPredicate = t0; + }, + Trace_foldFrames_closure0: function Trace_foldFrames_closure0(t0) { + this._box_0 = t0; + }, + Trace_toString_closure0: function Trace_toString_closure0() { + }, + Trace_toString_closure: function Trace_toString_closure(t0) { + this.longest = t0; + }, + UnparsedFrame: function UnparsedFrame(t0, t1) { + this.uri = t0; + this.member = t1; + }, + TransformByHandlers_transformByHandlers(_this, onData, onDone, $S, $T) { + var _null = null, t1 = {}, + controller = A.StreamController_StreamController(_null, _null, _null, _null, true, $T); + t1.subscription = null; + controller.onListen = new A.TransformByHandlers_transformByHandlers_closure(t1, _this, onData, controller, A.instantiate1(A.from_handlers__TransformByHandlers__defaultHandleError$closure(), $T), onDone, $S); + return controller.get$stream(); + }, + TransformByHandlers__defaultHandleError(error, stackTrace, sink) { + sink.addError$2(error, stackTrace); + }, + TransformByHandlers_transformByHandlers_closure: function TransformByHandlers_transformByHandlers_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_1 = t0; + _._this = t1; + _.onData = t2; + _.controller = t3; + _.handleError = t4; + _.handleDone = t5; + _.S = t6; + }, + TransformByHandlers_transformByHandlers__closure: function TransformByHandlers_transformByHandlers__closure(t0, t1, t2) { + this.onData = t0; + this.controller = t1; + this.S = t2; + }, + TransformByHandlers_transformByHandlers__closure1: function TransformByHandlers_transformByHandlers__closure1(t0, t1) { + this.handleError = t0; + this.controller = t1; + }, + TransformByHandlers_transformByHandlers__closure0: function TransformByHandlers_transformByHandlers__closure0(t0, t1, t2) { + this._box_0 = t0; + this.handleDone = t1; + this.controller = t2; + }, + TransformByHandlers_transformByHandlers__closure2: function TransformByHandlers_transformByHandlers__closure2(t0, t1) { + this._box_1 = t0; + this._box_0 = t1; + }, + RateLimit__debounceAggregate(_this, duration, collect, leading, trailing, $T, $S) { + var t1 = {}; + t1.soFar = t1.timer = null; + t1.emittedLatestAsLeading = t1.shouldClose = t1.hasPending = false; + return A.TransformByHandlers_transformByHandlers(_this, new A.RateLimit__debounceAggregate_closure(t1, $S, collect, false, duration, true, $T), new A.RateLimit__debounceAggregate_closure0(t1, true, $S), $T, $S); + }, + _collect($event, soFar, $T) { + var t1 = soFar == null ? A._setArrayType([], $T._eval$1("JSArray<0>")) : soFar; + J.add$1$ax(t1, $event); + return t1; + }, + RateLimit__debounceAggregate_closure: function RateLimit__debounceAggregate_closure(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._box_0 = t0; + _.S = t1; + _.collect = t2; + _.leading = t3; + _.duration = t4; + _.trailing = t5; + _.T = t6; + }, + RateLimit__debounceAggregate_closure_emit: function RateLimit__debounceAggregate_closure_emit(t0, t1, t2) { + this._box_0 = t0; + this.sink = t1; + this.S = t2; + }, + RateLimit__debounceAggregate__closure: function RateLimit__debounceAggregate__closure(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.trailing = t1; + _.emit = t2; + _.sink = t3; + }, + RateLimit__debounceAggregate_closure0: function RateLimit__debounceAggregate_closure0(t0, t1, t2) { + this._box_0 = t0; + this.trailing = t1; + this.S = t2; + }, + StringScannerException$(message, span, source) { + return new A.StringScannerException(source, message, span); + }, + StringScannerException: function StringScannerException(t0, t1, t2) { + this.source = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + LineScanner$(string) { + return new A.LineScanner(null, string); + }, + LineScanner: function LineScanner(t0, t1) { + var _ = this; + _._line_scanner$_column = _._line_scanner$_line = 0; + _.sourceUrl = t0; + _.string = t1; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + SpanScanner$(string, sourceUrl) { + var t2, + t1 = A.SourceFile$fromString(string, sourceUrl); + if (sourceUrl == null) + t2 = null; + else + t2 = typeof sourceUrl == "string" ? A.Uri_parse(sourceUrl) : type$.Uri._as(sourceUrl); + return new A.SpanScanner(t1, t2, string); + }, + SpanScanner: function SpanScanner(t0, t1, t2) { + var _ = this; + _._sourceFile = t0; + _.sourceUrl = t1; + _.string = t2; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + _SpanScannerState: function _SpanScannerState(t0, t1) { + this._scanner = t0; + this.position = t1; + }, + StringScanner$(string, position, sourceUrl) { + var t1; + if (sourceUrl == null) + t1 = null; + else + t1 = typeof sourceUrl == "string" ? A.Uri_parse(sourceUrl) : type$.Uri._as(sourceUrl); + return new A.StringScanner(t1, string); + }, + StringScanner: function StringScanner(t0, t1) { + var _ = this; + _.sourceUrl = t0; + _.string = t1; + _._string_scanner$_position = 0; + _._lastMatchPosition = _._lastMatch = null; + }, + AsciiGlyphSet: function AsciiGlyphSet() { + }, + UnicodeGlyphSet: function UnicodeGlyphSet() { + }, + WatchEvent: function WatchEvent(t0, t1) { + this.type = t0; + this.path = t1; + }, + ChangeType: function ChangeType(t0) { + this._watch_event$_name = t0; + }, + A98RgbColorSpace0: function A98RgbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + AnySelectorVisitor0: function AnySelectorVisitor0() { + }, + AnySelectorVisitor_visitComplexSelector_closure0: function AnySelectorVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + AnySelectorVisitor_visitCompoundSelector_closure0: function AnySelectorVisitor_visitCompoundSelector_closure0(t0) { + this.$this = t0; + }, + SupportsAnything0: function SupportsAnything0(t0, t1) { + this.contents = t0; + this.span = t1; + }, + ArgumentList$0(positional, named, namedSpans, span, keywordRest, rest) { + var t1 = type$.Expression_2, + t2 = type$.String; + return new A.ArgumentList0(A.List_List$unmodifiable(positional, t1), A.ConstantMap_ConstantMap$from(named, t2, t1), A.ConstantMap_ConstantMap$from(namedSpans, t2, type$.FileSpan), rest, keywordRest, span); + }, + ArgumentList$empty0(span) { + return new A.ArgumentList0(B.List_empty24, B.Map_empty14, B.Map_empty5, null, null, span); + }, + ArgumentList0: function ArgumentList0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.positional = t0; + _.named = t1; + _.namedSpans = t2; + _.rest = t3; + _.keywordRest = t4; + _.span = t5; + }, + argumentListClass_closure: function argumentListClass_closure() { + }, + argumentListClass__closure: function argumentListClass__closure() { + }, + argumentListClass__closure0: function argumentListClass__closure0() { + }, + SassArgumentList$0(contents, keywords, separator) { + var t1 = type$.Value_2; + t1 = new A.SassArgumentList0(A.ConstantMap_ConstantMap$from(keywords, type$.String, t1), A.List_List$unmodifiable(contents, t1), separator, false); + t1.SassList$3$brackets0(contents, separator, false); + return t1; + }, + SassArgumentList0: function SassArgumentList0(t0, t1, t2, t3) { + var _ = this; + _._argument_list$_keywords = t0; + _._argument_list$_wereKeywordsAccessed = false; + _._list1$_contents = t1; + _._list1$_separator = t2; + _._list1$_hasBrackets = t3; + }, + JSArray1: function JSArray1() { + }, + AsyncImporter0: function AsyncImporter0() { + }, + JSToDartAsyncImporter: function JSToDartAsyncImporter(t0, t1, t2) { + this._async0$_canonicalize = t0; + this._load = t1; + this._nonCanonicalSchemes = t2; + }, + JSToDartAsyncImporter_canonicalize_closure: function JSToDartAsyncImporter_canonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + JSToDartAsyncImporter_load_closure: function JSToDartAsyncImporter_load_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + AsyncBuiltInCallable$mixin0($name, parameters, callback, acceptsContent, url) { + return new A.AsyncBuiltInCallable0($name, A.ScssParser$0("@mixin " + $name + "(" + parameters + ") {", false, url).parseParameterList$0(), new A.AsyncBuiltInCallable$mixin_closure0(callback), false); + }, + AsyncBuiltInCallable0: function AsyncBuiltInCallable0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _._async_built_in0$_parameters = t1; + _._async_built_in0$_callback = t2; + _.acceptsContent = t3; + }, + AsyncBuiltInCallable$mixin_closure0: function AsyncBuiltInCallable$mixin_closure0(t0) { + this.callback = t0; + }, + AsyncBuiltInCallable_withDeprecationWarning_closure0: function AsyncBuiltInCallable_withDeprecationWarning_closure0(t0, t1, t2) { + this.$this = t0; + this.module = t1; + this.newName = t2; + }, + compileAsync0(path, charset, fatalDeprecations, functions, futureDeprecations, importCache, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, useSpaces, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, t3, t4, t0, stylesheet, result, t1, t2; + var $async$compileAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Deprecation_3; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + t1 = nodeImporter == null; + if (t1) + t2 = syntax == null || syntax === A.Syntax_forPath0(path); + else + t2 = false; + $async$goto = t2 ? 3 : 5; + break; + case 3: + // then + if (importCache == null) + importCache = A.AsyncImportCache$none(); + t2 = $.$get$FilesystemImporter_cwd0(); + t3 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t3 == null ? null : J.get$platform$x(t3), "win32")) { + t3 = A.isNodeJs() ? self.process : null; + t3 = J.$eq$(t3 == null ? null : J.get$platform$x(t3), "darwin"); + } else + t3 = true; + if (t3) { + t3 = A.absolute(path, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + t4 = $.$get$context(); + t3 = A._realCasePath0(t4.normalize$1(t3)); + } else { + t3 = $.$get$context(); + t4 = t3.canonicalize$1(0, path); + t0 = t4; + t4 = t3; + t3 = t0; + } + $async$goto = 6; + return A._asyncAwait(importCache.importCanonical$3$originalUrl(t2, t4.toUri$1(t3), t4.toUri$1(path)), $async$compileAsync0); + case 6: + // returning from await. + t4 = $async$result; + t4.toString; + stylesheet = t4; + // goto join + $async$goto = 4; + break; + case 5: + // else + t2 = A.readFile0(path); + t3 = syntax == null ? A.Syntax_forPath0(path) : syntax; + stylesheet = A.Stylesheet_Stylesheet$parse0(t2, t3, false, $.$get$context().toUri$1(path)); + case 4: + // join + $async$goto = 7; + return A._asyncAwait(A._compileStylesheet2(stylesheet, logger, importCache, nodeImporter, $.$get$FilesystemImporter_cwd0(), functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset), $async$compileAsync0); + case 7: + // returning from await. + result = $async$result; + logger.summarize$1$js(!t1); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileAsync0, $async$completer); + }, + compileStringAsync0(source, charset, fatalDeprecations, functions, futureDeprecations, importCache, importer, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, url, useSpaces, verbose) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, t3, t4, stylesheet, _0_0, result, t1, t2; + var $async$compileStringAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Deprecation_3; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + stylesheet = A.Stylesheet_Stylesheet$parse0(source, syntax == null ? B.Syntax_SCSS_0_scss0 : syntax, false, url); + t1 = stylesheet.span; + _0_0 = t1.get$sourceUrl(t1); + if (type$.Uri._is(_0_0) && "" === _0_0.get$scheme() && nodeImporter == null) + A.WarnForDeprecation_warnForDeprecation0(logger, B.Deprecation_y9Y, "Passing a relative `url` argument (" + A.S(t1.get$sourceUrl(t1)) + string$.x29x20to_cm, null, null); + if (importer == null) + t1 = A.isBrowser() ? new A.NoOpImporter0() : $.$get$FilesystemImporter_cwd0(); + else + t1 = importer; + $async$goto = 3; + return A._asyncAwait(A._compileStylesheet2(stylesheet, logger, importCache, nodeImporter, t1, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset), $async$compileStringAsync0); + case 3: + // returning from await. + result = $async$result; + logger.summarize$1$js(nodeImporter != null); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileStringAsync0, $async$completer); + }, + _compileStylesheet2(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CompileResult_2), + $async$returnValue, evaluateResult, serializeResult, resultSourceMap; + var $async$_compileStylesheet2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (nodeImporter != null) + A.WarnForDeprecation_warnForDeprecation0(logger, B.Deprecation_PGp, string$.The_le, null, null); + $async$goto = 3; + return A._asyncAwait(A._EvaluateVisitor$2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet), $async$_compileStylesheet2); + case 3: + // returning from await. + evaluateResult = $async$result; + serializeResult = A.serialize0(evaluateResult._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, useSpaces); + resultSourceMap = serializeResult._1; + if (resultSourceMap != null && importCache != null) + A.mapInPlace0(resultSourceMap.urls, new A._compileStylesheet_closure2(stylesheet, importCache)); + $async$returnValue = new A.CompileResult0(evaluateResult, serializeResult); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_compileStylesheet2, $async$completer); + }, + _compileStylesheet_closure2: function _compileStylesheet_closure2(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + AsyncEnvironment$0() { + var t1 = type$.String, + t2 = type$.Module_AsyncCallable_2, + t3 = type$.AstNode_2, + t4 = type$.int, + t5 = type$.AsyncCallable_2, + t6 = type$.JSArray_Map_String_AsyncCallable_2; + return new A.AsyncEnvironment0(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_AsyncCallable_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2)], type$.JSArray_Map_String_Value_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null, A.LinkedHashSet_LinkedHashSet$_empty(t1)); + }, + AsyncEnvironment$_0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content, _configurableVariables) { + var t1 = type$.String, + t2 = type$.int; + return new A.AsyncEnvironment0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content, _configurableVariables); + }, + _EnvironmentModule__EnvironmentModule2(environment, css, preModuleComments, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6, module, result, t7; + if (forwarded == null) + forwarded = B.Set_empty7; + t1 = type$.dynamic; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = type$.Module_AsyncCallable_2, t3 = type$.List_CssComment_2, t4 = A.MapExtensions_get_pairs0(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment_2; t4.moveNext$0();) { + t6 = t4.get$current(t4); + module = t6._0; + result = A.List_List$from(t6._1, false, t5); + result.$flags = 3; + t1.$indexSet(0, module, result); + } + t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); + t2 = A._EnvironmentModule__makeModulesByVariable2(forwarded); + t3 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure17(), type$.Map_String_Value_2), type$.Value_2); + t4 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure18(), type$.Map_String_AstNode_2), type$.AstNode_2); + t5 = type$.Map_String_AsyncCallable_2; + t6 = type$.AsyncCallable_2; + t7 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure19(), t5), t6); + t6 = A._EnvironmentModule__memberMap2(B.JSArray_methods.get$first(environment._async_environment0$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure20(), t5), t6); + t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._async_environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure21()); + return A._EnvironmentModule$_2(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._async_environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure22())); + }, + _EnvironmentModule__makeModulesByVariable2(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty17; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_AsyncCallable_2); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule2) { + for (t3 = t2._async_environment0$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll0(modulesByVariable, t5.get$keys(t5), t4); + } + t3 = B.JSArray_methods.get$first(t2._async_environment0$_environment._async_environment0$_variables); + A.setAll0(modulesByVariable, t3.get$keys(t3), t2); + } else { + t3 = t2.get$variables(); + A.setAll0(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap2(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView0(localMap, $V._eval$1("PublicMemberMapView0<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$0(t1, type$.String, $V); + }, + _EnvironmentModule$_2(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule2(_environment._async_environment0$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + AsyncEnvironment0: function AsyncEnvironment0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._async_environment0$_modules = t0; + _._async_environment0$_namespaceNodes = t1; + _._async_environment0$_globalModules = t2; + _._async_environment0$_importedModules = t3; + _._async_environment0$_forwardedModules = t4; + _._async_environment0$_nestedForwardedModules = t5; + _._async_environment0$_allModules = t6; + _._async_environment0$_variables = t7; + _._async_environment0$_variableNodes = t8; + _._async_environment0$_variableIndices = t9; + _._async_environment0$_functions = t10; + _._async_environment0$_functionIndices = t11; + _._async_environment0$_mixins = t12; + _._async_environment0$_mixinIndices = t13; + _._async_environment0$_content = t14; + _._async_environment0$_configurableVariables = t15; + _._async_environment0$_inMixin = false; + _._async_environment0$_inSemiGlobalScope = true; + _._async_environment0$_lastVariableIndex = _._async_environment0$_lastVariableName = null; + }, + AsyncEnvironment__getVariableFromGlobalModule_closure0: function AsyncEnvironment__getVariableFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure2: function AsyncEnvironment_setVariable_closure2(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment_setVariable_closure3: function AsyncEnvironment_setVariable_closure3(t0) { + this.name = t0; + }, + AsyncEnvironment_setVariable_closure4: function AsyncEnvironment_setVariable_closure4(t0, t1) { + this.$this = t0; + this.name = t1; + }, + AsyncEnvironment__getFunctionFromGlobalModule_closure0: function AsyncEnvironment__getFunctionFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment__getMixinFromGlobalModule_closure0: function AsyncEnvironment__getMixinFromGlobalModule_closure0(t0) { + this.name = t0; + }, + AsyncEnvironment_toModule_closure0: function AsyncEnvironment_toModule_closure0() { + }, + AsyncEnvironment_toDummyModule_closure0: function AsyncEnvironment_toDummyModule_closure0() { + }, + _EnvironmentModule2: function _EnvironmentModule2(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.preModuleComments = t7; + _.transitivelyContainsCss = t8; + _.transitivelyContainsExtensions = t9; + _._async_environment0$_environment = t10; + _._async_environment0$_modulesByVariable = t11; + }, + _EnvironmentModule__EnvironmentModule_closure17: function _EnvironmentModule__EnvironmentModule_closure17() { + }, + _EnvironmentModule__EnvironmentModule_closure18: function _EnvironmentModule__EnvironmentModule_closure18() { + }, + _EnvironmentModule__EnvironmentModule_closure19: function _EnvironmentModule__EnvironmentModule_closure19() { + }, + _EnvironmentModule__EnvironmentModule_closure20: function _EnvironmentModule__EnvironmentModule_closure20() { + }, + _EnvironmentModule__EnvironmentModule_closure21: function _EnvironmentModule__EnvironmentModule_closure21() { + }, + _EnvironmentModule__EnvironmentModule_closure22: function _EnvironmentModule__EnvironmentModule_closure22() { + }, + _EnvironmentModule_couldHaveBeenConfigured_closure2: function _EnvironmentModule_couldHaveBeenConfigured_closure2(t0) { + this.variables = t0; + }, + _EvaluateVisitor$2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t4, + t1 = type$.Uri, + t2 = type$.Module_AsyncCallable_2, + t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode_2); + if (importCache == null) + t4 = nodeImporter == null ? A.AsyncImportCache$none() : null; + else + t4 = importCache; + t1 = new A._EvaluateVisitor2(t4, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.AsyncCallable_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, new A.Object(), A.AsyncEnvironment$0(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode_2), t3, B.Configuration_Map_empty_null0); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + _EvaluateVisitor2: function _EvaluateVisitor2(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) { + var _ = this; + _._async_evaluate0$_importCache = t0; + _._async_evaluate0$_nodeImporter = t1; + _._async_evaluate0$_builtInFunctions = t2; + _._async_evaluate0$_builtInModules = t3; + _._async_evaluate0$_modules = t4; + _._async_evaluate0$_moduleConfigurations = t5; + _._async_evaluate0$_moduleNodes = t6; + _._async_evaluate0$_logger = t7; + _._async_evaluate0$_warningsEmitted = t8; + _._async_evaluate0$_quietDeps = t9; + _._async_evaluate0$_sourceMap = t10; + _._async_evaluate0$_compileContext = t11; + _._async_evaluate0$_environment = t12; + _._async_evaluate0$_declarationName = _._async_evaluate0$__parent = _._async_evaluate0$_mediaQuerySources = _._async_evaluate0$_mediaQueries = _._async_evaluate0$_styleRuleIgnoringAtRoot = null; + _._async_evaluate0$_member = "root stylesheet"; + _._async_evaluate0$_importSpan = _._async_evaluate0$_callableNode = null; + _._async_evaluate0$_inSupportsDeclaration = _._async_evaluate0$_inKeyframes = _._async_evaluate0$_atRootExcludingStyleRule = _._async_evaluate0$_inUnknownAtRule = _._async_evaluate0$_inFunction = false; + _._async_evaluate0$_loadedUrls = t13; + _._async_evaluate0$_activeModules = t14; + _._async_evaluate0$_stack = t15; + _._async_evaluate0$_importer = null; + _._async_evaluate0$_inDependency = false; + _._async_evaluate0$__extensionStore = _._async_evaluate0$_preModuleComments = _._async_evaluate0$_outOfOrderImports = _._async_evaluate0$__endOfImports = _._async_evaluate0$__root = _._async_evaluate0$__stylesheet = null; + _._async_evaluate0$_configuration = t16; + }, + _EvaluateVisitor_closure38: function _EvaluateVisitor_closure38(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure39: function _EvaluateVisitor_closure39(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure40: function _EvaluateVisitor_closure40(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure41: function _EvaluateVisitor_closure41(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure42: function _EvaluateVisitor_closure42(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure43: function _EvaluateVisitor_closure43(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure44: function _EvaluateVisitor_closure44(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure45: function _EvaluateVisitor_closure45(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure46: function _EvaluateVisitor_closure46(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure14: function _EvaluateVisitor__closure14(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure47: function _EvaluateVisitor_closure47(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure13: function _EvaluateVisitor__closure13(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure48: function _EvaluateVisitor_closure48(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure49: function _EvaluateVisitor_closure49(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure11: function _EvaluateVisitor__closure11(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.values = t1; + _.span = t2; + _.callableNode = t3; + }, + _EvaluateVisitor__closure12: function _EvaluateVisitor__closure12(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure50: function _EvaluateVisitor_closure50(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure2: function _EvaluateVisitor_run_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_run__closure2: function _EvaluateVisitor_run__closure2(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.node = t2; + }, + _EvaluateVisitor__loadModule_closure5: function _EvaluateVisitor__loadModule_closure5(t0, t1) { + this._box_0 = t0; + this.callback = t1; + }, + _EvaluateVisitor__loadModule_closure6: function _EvaluateVisitor__loadModule_closure6(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure5: function _EvaluateVisitor__loadModule__closure5(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__loadModule__closure6: function _EvaluateVisitor__loadModule__closure6(t0, t1, t2) { + this._box_1 = t0; + this.callback = t1; + this.firstLoad = t2; + }, + _EvaluateVisitor__execute_closure2: function _EvaluateVisitor__execute_closure2(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + _.preModuleComments = t6; + }, + _EvaluateVisitor__combineCss_closure5: function _EvaluateVisitor__combineCss_closure5() { + }, + _EvaluateVisitor__combineCss_closure6: function _EvaluateVisitor__combineCss_closure6(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_visitModule2: function _EvaluateVisitor__combineCss_visitModule2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.seen = t1; + _.clone = t2; + _.css = t3; + _.imports = t4; + _.sorted = t5; + }, + _EvaluateVisitor__extendModules_closure5: function _EvaluateVisitor__extendModules_closure5(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure6: function _EvaluateVisitor__extendModules_closure6() { + }, + _EvaluateVisitor_visitAtRootRule_closure5: function _EvaluateVisitor_visitAtRootRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure6: function _EvaluateVisitor_visitAtRootRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure17: function _EvaluateVisitor__scopeForAtRoot_closure17(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure18: function _EvaluateVisitor__scopeForAtRoot_closure18(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure19: function _EvaluateVisitor__scopeForAtRoot_closure19(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure2: function _EvaluateVisitor__scopeForAtRoot__closure2(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure20: function _EvaluateVisitor__scopeForAtRoot_closure20(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure21: function _EvaluateVisitor__scopeForAtRoot_closure21() { + }, + _EvaluateVisitor__scopeForAtRoot_closure22: function _EvaluateVisitor__scopeForAtRoot_closure22(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure2: function _EvaluateVisitor_visitContentRule_closure2(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure2: function _EvaluateVisitor_visitDeclaration_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitEachRule_closure8: function _EvaluateVisitor_visitEachRule_closure8(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure9: function _EvaluateVisitor_visitEachRule_closure9(t0, t1, t2) { + this._box_1 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure10: function _EvaluateVisitor_visitEachRule_closure10(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure2: function _EvaluateVisitor_visitEachRule__closure2(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure2: function _EvaluateVisitor_visitEachRule___closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure11: function _EvaluateVisitor_visitAtRule_closure11(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure12: function _EvaluateVisitor_visitAtRule_closure12(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure13: function _EvaluateVisitor_visitAtRule_closure13(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.children = t2; + }, + _EvaluateVisitor_visitAtRule__closure2: function _EvaluateVisitor_visitAtRule__closure2(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure14: function _EvaluateVisitor_visitAtRule_closure14() { + }, + _EvaluateVisitor_visitForRule_closure14: function _EvaluateVisitor_visitForRule_closure14(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure15: function _EvaluateVisitor_visitForRule_closure15(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure16: function _EvaluateVisitor_visitForRule_closure16(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure17: function _EvaluateVisitor_visitForRule_closure17(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure18: function _EvaluateVisitor_visitForRule_closure18(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure2: function _EvaluateVisitor_visitForRule__closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure5: function _EvaluateVisitor_visitForwardRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure6: function _EvaluateVisitor_visitForwardRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__registerCommentsForModule_closure2: function _EvaluateVisitor__registerCommentsForModule_closure2() { + }, + _EvaluateVisitor_visitIfRule_closure2: function _EvaluateVisitor_visitIfRule_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIfRule__closure2: function _EvaluateVisitor_visitIfRule__closure2(t0, t1) { + this.$this = t0; + this.clause = t1; + }, + _EvaluateVisitor_visitIfRule___closure2: function _EvaluateVisitor_visitIfRule___closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure2: function _EvaluateVisitor__visitDynamicImport_closure2(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure11: function _EvaluateVisitor__visitDynamicImport__closure11(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure12: function _EvaluateVisitor__visitDynamicImport__closure12() { + }, + _EvaluateVisitor__visitDynamicImport__closure13: function _EvaluateVisitor__visitDynamicImport__closure13() { + }, + _EvaluateVisitor__visitDynamicImport__closure14: function _EvaluateVisitor__visitDynamicImport__closure14(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.loadsUserDefinedModules = t2; + _.environment = t3; + _.children = t4; + }, + _EvaluateVisitor__applyMixin_closure5: function _EvaluateVisitor__applyMixin_closure5(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure6: function _EvaluateVisitor__applyMixin__closure6(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin_closure6: function _EvaluateVisitor__applyMixin_closure6(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure5: function _EvaluateVisitor__applyMixin__closure5(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin___closure2: function _EvaluateVisitor__applyMixin___closure2(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin____closure2: function _EvaluateVisitor__applyMixin____closure2(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure8: function _EvaluateVisitor_visitIncludeRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure9: function _EvaluateVisitor_visitIncludeRule_closure9(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure10: function _EvaluateVisitor_visitIncludeRule_closure10(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitMediaRule_closure11: function _EvaluateVisitor_visitMediaRule_closure11(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure12: function _EvaluateVisitor_visitMediaRule_closure12(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure13: function _EvaluateVisitor_visitMediaRule_closure13(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure2: function _EvaluateVisitor_visitMediaRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure2: function _EvaluateVisitor_visitMediaRule___closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure14: function _EvaluateVisitor_visitMediaRule_closure14(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitStyleRule_closure11: function _EvaluateVisitor_visitStyleRule_closure11(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure12: function _EvaluateVisitor_visitStyleRule_closure12() { + }, + _EvaluateVisitor_visitStyleRule_closure14: function _EvaluateVisitor_visitStyleRule_closure14(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure2: function _EvaluateVisitor_visitStyleRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure13: function _EvaluateVisitor_visitStyleRule_closure13() { + }, + _EvaluateVisitor__warnForBogusCombinators_closure2: function _EvaluateVisitor__warnForBogusCombinators_closure2() { + }, + _EvaluateVisitor_visitSupportsRule_closure8: function _EvaluateVisitor_visitSupportsRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure9: function _EvaluateVisitor_visitSupportsRule_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure2: function _EvaluateVisitor_visitSupportsRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure10: function _EvaluateVisitor_visitSupportsRule_closure10() { + }, + _EvaluateVisitor__visitSupportsCondition_closure2: function _EvaluateVisitor__visitSupportsCondition_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure8: function _EvaluateVisitor_visitVariableDeclaration_closure8(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure9: function _EvaluateVisitor_visitVariableDeclaration_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure10: function _EvaluateVisitor_visitVariableDeclaration_closure10(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure2: function _EvaluateVisitor_visitUseRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure2: function _EvaluateVisitor_visitWarnRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure2: function _EvaluateVisitor_visitWhileRule_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure2: function _EvaluateVisitor_visitWhileRule__closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure2: function _EvaluateVisitor_visitBinaryOperationExpression_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__slash_recommendation2: function _EvaluateVisitor__slash_recommendation2() { + }, + _EvaluateVisitor_visitVariableExpression_closure2: function _EvaluateVisitor_visitVariableExpression_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure2: function _EvaluateVisitor_visitUnaryOperationExpression_closure2(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor_visitIfExpression_closure2: function _EvaluateVisitor_visitIfExpression_closure2() { + }, + _EvaluateVisitor_visitIfConditionOperation_closure2: function _EvaluateVisitor_visitIfConditionOperation_closure2() { + }, + _EvaluateVisitor_visitListExpression_closure2: function _EvaluateVisitor_visitListExpression_closure2(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure8: function _EvaluateVisitor_visitFunctionExpression_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure9: function _EvaluateVisitor_visitFunctionExpression_closure9() { + }, + _EvaluateVisitor_visitFunctionExpression_closure10: function _EvaluateVisitor_visitFunctionExpression_closure10(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor__visitCalculation_closure2: function _EvaluateVisitor__visitCalculation_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__checkCalculationArguments_check2: function _EvaluateVisitor__checkCalculationArguments_check2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__visitCalculationExpression_closure2: function _EvaluateVisitor__visitCalculationExpression_closure2(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.inLegacySassFunction = t3; + }, + _EvaluateVisitor__visitCalculationExpression__closure2: function _EvaluateVisitor__visitCalculationExpression__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure2: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure2(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure2: function _EvaluateVisitor__runUserDefinedCallable_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure2: function _EvaluateVisitor__runUserDefinedCallable__closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure2: function _EvaluateVisitor__runUserDefinedCallable___closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure2: function _EvaluateVisitor__runUserDefinedCallable____closure2() { + }, + _EvaluateVisitor__runFunctionCallable_closure2: function _EvaluateVisitor__runFunctionCallable_closure2(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure8: function _EvaluateVisitor__runBuiltInCallable_closure8(t0, t1, t2) { + this._box_0 = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure9: function _EvaluateVisitor__runBuiltInCallable_closure9(t0, t1) { + this._box_0 = t0; + this.evaluated = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure10: function _EvaluateVisitor__runBuiltInCallable_closure10() { + }, + _EvaluateVisitor__evaluateArguments_closure11: function _EvaluateVisitor__evaluateArguments_closure11() { + }, + _EvaluateVisitor__evaluateArguments_closure12: function _EvaluateVisitor__evaluateArguments_closure12(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure13: function _EvaluateVisitor__evaluateArguments_closure13(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure14: function _EvaluateVisitor__evaluateArguments_closure14() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure11: function _EvaluateVisitor__evaluateMacroArguments_closure11(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure12: function _EvaluateVisitor__evaluateMacroArguments_closure12(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure13: function _EvaluateVisitor__evaluateMacroArguments_closure13(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure14: function _EvaluateVisitor__evaluateMacroArguments_closure14(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure2: function _EvaluateVisitor__addRestMap_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure2: function _EvaluateVisitor__verifyArguments_closure2(t0, t1, t2) { + this.parameters = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitCssAtRule_closure8: function _EvaluateVisitor_visitCssAtRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure9: function _EvaluateVisitor_visitCssAtRule_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure10: function _EvaluateVisitor_visitCssAtRule_closure10() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure5: function _EvaluateVisitor_visitCssKeyframeBlock_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure6: function _EvaluateVisitor_visitCssKeyframeBlock_closure6() { + }, + _EvaluateVisitor_visitCssMediaRule_closure11: function _EvaluateVisitor_visitCssMediaRule_closure11(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure12: function _EvaluateVisitor_visitCssMediaRule_closure12(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure13: function _EvaluateVisitor_visitCssMediaRule_closure13(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure2: function _EvaluateVisitor_visitCssMediaRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure2: function _EvaluateVisitor_visitCssMediaRule___closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure14: function _EvaluateVisitor_visitCssMediaRule_closure14(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure6: function _EvaluateVisitor_visitCssStyleRule_closure6(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure2: function _EvaluateVisitor_visitCssStyleRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure5: function _EvaluateVisitor_visitCssStyleRule_closure5() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure8: function _EvaluateVisitor_visitCssSupportsRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure9: function _EvaluateVisitor_visitCssSupportsRule_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure2: function _EvaluateVisitor_visitCssSupportsRule__closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure10: function _EvaluateVisitor_visitCssSupportsRule_closure10() { + }, + _EvaluateVisitor__performInterpolationHelper_closure2: function _EvaluateVisitor__performInterpolationHelper_closure2(t0) { + this.interpolation = t0; + }, + _EvaluateVisitor__serialize_closure2: function _EvaluateVisitor__serialize_closure2(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure2: function _EvaluateVisitor__expressionNode_closure2(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation2: function _EvaluateVisitor__withoutSlash_recommendation2() { + }, + _EvaluateVisitor__stackFrame_closure2: function _EvaluateVisitor__stackFrame_closure2(t0) { + this.$this = t0; + }, + _ImportedCssVisitor2: function _ImportedCssVisitor2(t0) { + this._async_evaluate0$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure2: function _ImportedCssVisitor_visitCssAtRule_closure2() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure2: function _ImportedCssVisitor_visitCssMediaRule_closure2(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure2: function _ImportedCssVisitor_visitCssStyleRule_closure2() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure2: function _ImportedCssVisitor_visitCssSupportsRule_closure2() { + }, + _EvaluationContext2: function _EvaluationContext2(t0, t1) { + this._async_evaluate0$_visitor = t0; + this._async_evaluate0$_defaultWarnNodeWithSpan = t1; + }, + JSToDartAsyncFileImporter: function JSToDartAsyncFileImporter(t0) { + this._findFileUrl = t0; + }, + JSToDartAsyncFileImporter_canonicalize_closure: function JSToDartAsyncFileImporter_canonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + AsyncImportCache$(importers, loadPaths, packageConfig) { + var t1 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, + t2 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, + t3 = type$.Uri; + return new A.AsyncImportCache0(A.AsyncImportCache__toImporters0(importers, loadPaths, packageConfig), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.DateTime)); + }, + AsyncImportCache$none() { + var t1 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, + t2 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, + t3 = type$.Uri; + return new A.AsyncImportCache0(B.List_empty31, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.DateTime)); + }, + AsyncImportCache__toImporters0(importers, loadPaths, packageConfig) { + var t1, t2, t3, t4, _i, path, _null = null, + sassPath = A.getEnvironmentVariable0("SASS_PATH"); + if (A.isBrowser()) { + t1 = A._setArrayType([], type$.JSArray_AsyncImporter); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + return t1; + } + t1 = A._setArrayType([], type$.JSArray_AsyncImporter); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + if (loadPaths != null) + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + if (sassPath != null) { + t2 = A.isNodeJs() ? self.process : _null; + t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); + t4 = t3.length; + _i = 0; + for (; _i < t4; ++_i) { + path = t3[_i]; + t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + } + return t1; + }, + AsyncImportCache0: function AsyncImportCache0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._async_import_cache0$_importers = t0; + _._async_import_cache0$_canonicalizeCache = t1; + _._async_import_cache0$_perImporterCanonicalizeCache = t2; + _._async_import_cache0$_nonCanonicalRelativeUrls = t3; + _._async_import_cache0$_importCache = t4; + _._async_import_cache0$_resultsCache = t5; + _._async_import_cache0$_loadTimes = t6; + }, + AsyncImportCache_canonicalize_closure0: function AsyncImportCache_canonicalize_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.baseImporter = t1; + _.resolvedUrl = t2; + _.baseUrl = t3; + _.forImport = t4; + _.key = t5; + _.url = t6; + }, + AsyncImportCache__canonicalize_closure0: function AsyncImportCache__canonicalize_closure0(t0, t1) { + this.importer = t0; + this.url = t1; + }, + AsyncImportCache_importCanonical_closure0: function AsyncImportCache_importCanonical_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + }, + AsyncImportCache_humanize_closure3: function AsyncImportCache_humanize_closure3(t0) { + this.canonicalUrl = t0; + }, + AsyncImportCache_humanize_closure4: function AsyncImportCache_humanize_closure4() { + }, + AsyncImportCache_humanize_closure5: function AsyncImportCache_humanize_closure5() { + }, + AsyncImportCache_humanize_closure6: function AsyncImportCache_humanize_closure6(t0) { + this.canonicalUrl = t0; + }, + AtRootQueryParser0: function AtRootQueryParser0(t0, t1) { + this.scanner = t0; + this._parser1$_interpolationMap = t1; + }, + AtRootQueryParser_parse_closure0: function AtRootQueryParser_parse_closure0(t0) { + this.$this = t0; + }, + AtRootQuery0: function AtRootQuery0(t0, t1, t2, t3) { + var _ = this; + _.include = t0; + _.names = t1; + _._at_root_query0$_all = t2; + _._at_root_query0$_rule = t3; + }, + AtRootRule$0(children, span, query) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.AtRootRule0(query, span, t1, t2); + }, + AtRootRule0: function AtRootRule0(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + ModifiableCssAtRule$0($name, span, childless, value) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssAtRule0($name, value, childless, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssAtRule0: function ModifiableCssAtRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.value = t1; + _.isChildless = t2; + _.span = t3; + _.children = t4; + _._node$_children = t5; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + AtRule$0($name, span, children, value) { + var t1 = children == null ? null : A.List_List$unmodifiable(children, type$.Statement_2), + t2 = t1 == null ? null : B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.AtRule0($name, value, span, t1, t2 === true); + }, + AtRule0: function AtRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + InterpolatedAttributeSelector: function InterpolatedAttributeSelector(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.op = t1; + _.value = t2; + _.modifier = t3; + _.span = t4; + }, + AttributeSelector0: function AttributeSelector0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.op = t1; + _.value = t2; + _.modifier = t3; + _.span = t4; + }, + AttributeOperator0: function AttributeOperator0(t0, t1, t2) { + this._attribute0$_text = t0; + this.index = t1; + this._name = t2; + }, + BinaryOperationExpression0: function BinaryOperationExpression0(t0, t1, t2, t3) { + var _ = this; + _.operator = t0; + _.left = t1; + _.right = t2; + _.allowsSlash = t3; + }, + BinaryOperator0: function BinaryOperator0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _.isAssociative = t3; + _.index = t4; + _._name = t5; + }, + BooleanExpression0: function BooleanExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + booleanClass_closure: function booleanClass_closure() { + }, + booleanClass__closure: function booleanClass__closure() { + }, + legacyBooleanClass_closure: function legacyBooleanClass_closure() { + }, + legacyBooleanClass__closure: function legacyBooleanClass__closure() { + }, + legacyBooleanClass__closure0: function legacyBooleanClass__closure0() { + }, + SassBoolean0: function SassBoolean0(t0) { + this.value = t0; + }, + BooleanOperator0: function BooleanOperator0(t0, t1) { + this.index = t0; + this._name = t1; + }, + Box0: function Box0(t0, t1) { + this._box0$_inner = t0; + this.$ti = t1; + }, + ModifiableBox0: function ModifiableBox0(t0, t1) { + this.value = t0; + this.$ti = t1; + }, + BuiltInCallable$function0($name, parameters, callback, url) { + return new A.BuiltInCallable0($name, A._setArrayType([new A._Record_2(A.ScssParser$0("@function " + $name + "(" + parameters + ") {", false, url).parseParameterList$0(), callback)], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value_2), false); + }, + BuiltInCallable$mixin0($name, parameters, callback, acceptsContent, url) { + return new A.BuiltInCallable0($name, A._setArrayType([new A._Record_2(A.ScssParser$0("@mixin " + $name + "(" + parameters + ") {", false, url).parseParameterList$0(), new A.BuiltInCallable$mixin_closure0(callback))], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value_2), acceptsContent); + }, + BuiltInCallable$overloadedFunction0($name, overloads) { + var t2, t3, t4, t5, t6, t7, args, callback, + t1 = A._setArrayType([], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value_2); + for (t2 = type$.String, t3 = A.MapExtensions_get_pairs0(overloads, t2, type$.Value_Function_List_Value_2), t3 = t3.get$iterator(t3), t4 = "@function " + $name + "(", t5 = type$.FileSpan, t6 = type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2; t3.moveNext$0();) { + t7 = t3.get$current(t3); + args = t7._0; + callback = t7._1; + t1.push(new A._Record_2(new A.ScssParser0(false, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5), A._setArrayType([], t6), A.SpanScanner$(t4 + args + ") {", null), null).parseParameterList$0(), callback)); + } + return new A.BuiltInCallable0($name, t1, false); + }, + BuiltInCallable0: function BuiltInCallable0(t0, t1, t2) { + this.name = t0; + this._built_in$_overloads = t1; + this.acceptsContent = t2; + }, + BuiltInCallable$mixin_closure0: function BuiltInCallable$mixin_closure0(t0) { + this.callback = t0; + }, + BuiltInCallable_withDeprecationWarning_closure0: function BuiltInCallable_withDeprecationWarning_closure0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.module = t2; + _.newName = t3; + }, + BuiltInModule$0($name, functions, mixins, variables, $T) { + var t1 = A._Uri__Uri(null, $name, null, "sass"), + t2 = A.BuiltInModule__callableMap0(functions, $T), + t3 = A.BuiltInModule__callableMap0(mixins, $T), + t4 = variables == null ? B.Map_empty15 : new A.UnmodifiableMapView(variables, type$.UnmodifiableMapView_String_Value_2); + return new A.BuiltInModule0(t1, t2, t3, t4, $T._eval$1("BuiltInModule0<0>")); + }, + BuiltInModule__callableMap0(callables, $T) { + var t2, _i, callable, + t1 = type$.String; + if (callables == null) + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + else { + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, $T); + for (t2 = callables.length, _i = 0; _i < callables.length; callables.length === t2 || (0, A.throwConcurrentModificationError)(callables), ++_i) { + callable = callables[_i]; + t1.$indexSet(0, callable.get$name(callable), callable); + } + t1 = new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + } + return new A.UnmodifiableMapView(t1, type$.$env_1_1_String._bind$1($T)._eval$1("UnmodifiableMapView<1,2>")); + }, + BuiltInModule0: function BuiltInModule0(t0, t1, t2, t3, t4) { + var _ = this; + _.url = t0; + _.functions = t1; + _.mixins = t2; + _.variables = t3; + _.$ti = t4; + }, + _assertCalculationValue(arg) { + var t1; + $label0$0: { + if (!(arg instanceof A.SassNumber0)) + t1 = arg instanceof A.SassString0 && !arg._string0$_hasQuotes || arg instanceof A.SassCalculation0 || arg instanceof A.CalculationOperation0 || arg instanceof A.CalculationInterpolation; + else + t1 = true; + if (t1) { + t1 = null; + break $label0$0; + } + t1 = A.jsThrow0(new self.Error("Argument `" + A.S(arg) + "` must be one of SassNumber, unquoted SassString, SassCalculation, CalculationOperation, CalculationInterpolation")); + } + return t1; + }, + _isValidClampArg(arg) { + var t1; + $label0$0: { + if (!(arg instanceof A.CalculationInterpolation)) + t1 = arg instanceof A.SassString0 && !arg._string0$_hasQuotes; + else + t1 = true; + break $label0$0; + } + return t1; + }, + calculationClass_closure: function calculationClass_closure() { + }, + calculationClass__closure: function calculationClass__closure() { + }, + calculationClass__closure0: function calculationClass__closure0() { + }, + calculationClass__closure1: function calculationClass__closure1() { + }, + calculationClass__closure2: function calculationClass__closure2() { + }, + calculationClass__closure3: function calculationClass__closure3() { + }, + calculationClass__closure4: function calculationClass__closure4() { + }, + calculationClass__closure5: function calculationClass__closure5() { + }, + calculationOperationClass_closure: function calculationOperationClass_closure() { + }, + calculationOperationClass__closure: function calculationOperationClass__closure() { + }, + calculationOperationClass___closure: function calculationOperationClass___closure(t0) { + this.strOperator = t0; + }, + calculationOperationClass__closure0: function calculationOperationClass__closure0() { + }, + calculationOperationClass__closure1: function calculationOperationClass__closure1() { + }, + calculationOperationClass__closure2: function calculationOperationClass__closure2() { + }, + calculationOperationClass__closure3: function calculationOperationClass__closure3() { + }, + calculationOperationClass__closure4: function calculationOperationClass__closure4() { + }, + calculationInterpolationClass_closure: function calculationInterpolationClass_closure() { + }, + calculationInterpolationClass__closure: function calculationInterpolationClass__closure() { + }, + calculationInterpolationClass__closure0: function calculationInterpolationClass__closure0() { + }, + calculationInterpolationClass__closure1: function calculationInterpolationClass__closure1() { + }, + calculationInterpolationClass__closure2: function calculationInterpolationClass__closure2() { + }, + SassCalculation_calc0(argument) { + var t1, + _0_0 = A.SassCalculation__simplify0(argument); + $label0$0: { + if (_0_0 instanceof A.SassNumber0) { + t1 = _0_0; + break $label0$0; + } + if (_0_0 instanceof A.SassCalculation0) { + t1 = _0_0; + break $label0$0; + } + t1 = new A.SassCalculation0("calc", A.List_List$unmodifiable([_0_0], type$.Object)); + break $label0$0; + } + return t1; + }, + SassCalculation_min0($arguments) { + var minimum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("min() must have at least one argument.", null)); + for (minimum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber0) + t2 = minimum != null && !minimum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + minimum = null; + break; + } else if (minimum == null || minimum.greaterThan$1(arg).value) + minimum = arg; + } + if (minimum != null) + return minimum; + A.SassCalculation__verifyCompatibleNumbers0(args); + return new A.SassCalculation0("min", args); + }, + SassCalculation_max0($arguments) { + var maximum, _i, arg, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("max() must have at least one argument.", null)); + for (maximum = null, _i = 0; _i < t1; ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber0) + t2 = maximum != null && !maximum.isComparableTo$1(arg); + else + t2 = true; + if (t2) { + maximum = null; + break; + } else if (maximum == null || maximum.lessThan$1(arg).value) + maximum = arg; + } + if (maximum != null) + return maximum; + A.SassCalculation__verifyCompatibleNumbers0(args); + return new A.SassCalculation0("max", args); + }, + SassCalculation_hypot0($arguments) { + var first, subtotal, i, number, value, t2, + args = A.List_List$unmodifiable(new A.MappedListIterable($arguments, A.calculation0_SassCalculation__simplify$closure(), A._arrayInstanceType($arguments)._eval$1("MappedListIterable<1,@>")), type$.Object), + t1 = args.length; + if (t1 === 0) + throw A.wrapException(A.ArgumentError$("hypot() must have at least one argument.", null)); + A.SassCalculation__verifyCompatibleNumbers0(args); + first = B.JSArray_methods.get$first(args); + if (!(first instanceof A.SassNumber0) || first.hasUnit$1("%")) + return new A.SassCalculation0("hypot", args); + for (subtotal = 0, i = 0; i < t1;) { + number = args[i]; + if (!(number instanceof A.SassNumber0) || !number.hasCompatibleUnits$1(first)) + return new A.SassCalculation0("hypot", args); + ++i; + value = number.convertValueToMatch$3(first, "numbers[" + i + "]", "numbers[1]"); + subtotal += value * value; + } + t1 = Math.sqrt(subtotal); + t2 = first.get$numeratorUnits(first); + return A.SassNumber_SassNumber$withUnits0(t1, first.get$denominatorUnits(first), t2); + }, + SassCalculation_abs0(argument) { + argument = A.SassCalculation__simplify0(argument); + if (!(argument instanceof A.SassNumber0)) + return new A.SassCalculation0("abs", A._setArrayType([argument], type$.JSArray_Object)); + if (argument.hasUnit$1("%")) + A.warnForDeprecation0(string$.Passinp + argument.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + argument.toString$0(0) + string$.x7dx29_Mor, B.Deprecation_w3M); + return A.SassNumber_SassNumber0(Math.abs(argument._number1$_value), null).coerceToMatch$1(argument); + }, + SassCalculation_exp0(argument) { + argument = A.SassCalculation__simplify0(argument); + if (!(argument instanceof A.SassNumber0)) + return new A.SassCalculation0("exp", A._setArrayType([argument], type$.JSArray_Object)); + argument.assertNoUnits$0(); + return A.pow1(A.SassNumber_SassNumber0(2.718281828459045, null), argument); + }, + SassCalculation_sign0(argument) { + var t1, _0_2, t2, arg; + argument = A.SassCalculation__simplify0(argument); + $label0$0: { + t1 = argument instanceof A.SassNumber0; + if (t1) { + _0_2 = argument._number1$_value; + if (!isNaN(_0_2)) + t2 = 0 === _0_2; + else + t2 = true; + } else + t2 = false; + if (t2) { + t1 = argument; + break $label0$0; + } + if (t1) { + t1 = !argument.hasUnit$1("%"); + arg = argument; + } else { + arg = null; + t1 = false; + } + if (t1) { + t1 = A.SassNumber_SassNumber0(J.get$sign$in(arg._number1$_value), null).coerceToMatch$1(argument); + break $label0$0; + } + t1 = new A.SassCalculation0("sign", A._setArrayType([argument], type$.JSArray_Object)); + break $label0$0; + } + return t1; + }, + SassCalculation_clamp0(min, value, max) { + var t1, args; + if (value == null && max != null) + throw A.wrapException(A.ArgumentError$("If value is null, max must also be null.", null)); + min = A.SassCalculation__simplify0(min); + value = A.NullableExtension_andThen0(value, A.calculation0_SassCalculation__simplify$closure()); + max = A.NullableExtension_andThen0(max, A.calculation0_SassCalculation__simplify$closure()); + if (min instanceof A.SassNumber0 && value instanceof A.SassNumber0 && max instanceof A.SassNumber0 && min.hasCompatibleUnits$1(value) && min.hasCompatibleUnits$1(max)) { + if (value.lessThanOrEquals$1(min).value) + return min; + if (value.greaterThanOrEquals$1(max).value) + return max; + return value; + } + t1 = [min]; + if (value != null) + t1.push(value); + if (max != null) + t1.push(max); + args = A.List_List$unmodifiable(t1, type$.Object); + A.SassCalculation__verifyCompatibleNumbers0(args); + A.SassCalculation__verifyLength0(args, 3); + return new A.SassCalculation0("clamp", args); + }, + SassCalculation_pow0(base, exponent) { + var t1 = A._setArrayType([base], type$.JSArray_Object); + if (exponent != null) + t1.push(exponent); + A.SassCalculation__verifyLength0(t1, 2); + base = A.SassCalculation__simplify0(base); + exponent = A.NullableExtension_andThen0(exponent, A.calculation0_SassCalculation__simplify$closure()); + if (!(base instanceof A.SassNumber0) || !(exponent instanceof A.SassNumber0)) + return new A.SassCalculation0("pow", t1); + base.assertNoUnits$0(); + exponent.assertNoUnits$0(); + return A.pow1(base, exponent); + }, + SassCalculation_log0(number, base) { + var t1, t2; + number = A.SassCalculation__simplify0(number); + base = A.NullableExtension_andThen0(base, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([number], type$.JSArray_Object); + t2 = base != null; + if (t2) + t1.push(base); + if (number instanceof A.SassNumber0) + t2 = t2 && !(base instanceof A.SassNumber0); + else + t2 = true; + if (t2) + return new A.SassCalculation0("log", t1); + number.assertNoUnits$0(); + if (base instanceof A.SassNumber0) { + base.assertNoUnits$0(); + return A.log0(number, base); + } + return A.log0(number, null); + }, + SassCalculation_atan20(y, x) { + var t1; + y = A.SassCalculation__simplify0(y); + x = A.NullableExtension_andThen0(x, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([y], type$.JSArray_Object); + if (x != null) + t1.push(x); + A.SassCalculation__verifyLength0(t1, 2); + A.SassCalculation__verifyCompatibleNumbers0(t1); + if (!(y instanceof A.SassNumber0) || !(x instanceof A.SassNumber0) || y.hasUnit$1("%") || x.hasUnit$1("%") || !y.hasCompatibleUnits$1(x)) + return new A.SassCalculation0("atan2", t1); + return A.SassNumber_SassNumber$withUnits0(Math.atan2(y._number1$_value, x.convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + SassCalculation_rem0(dividend, modulus) { + var t1, result; + dividend = A.SassCalculation__simplify0(dividend); + modulus = A.NullableExtension_andThen0(modulus, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([dividend], type$.JSArray_Object); + if (modulus != null) + t1.push(modulus); + A.SassCalculation__verifyLength0(t1, 2); + A.SassCalculation__verifyCompatibleNumbers0(t1); + if (!(dividend instanceof A.SassNumber0) || !(modulus instanceof A.SassNumber0) || !dividend.hasCompatibleUnits$1(modulus)) + return new A.SassCalculation0("rem", t1); + result = dividend.modulo$1(modulus); + t1 = modulus._number1$_value; + if (A.DoubleWithSignedZero_get_signIncludingZero0(t1) !== A.DoubleWithSignedZero_get_signIncludingZero0(dividend._number1$_value)) { + if (t1 == 1 / 0 || t1 == -1 / 0) + return dividend; + if (result._number1$_value === 0) + return result.unaryMinus$0(); + return result.minus$1(modulus); + } + return result; + }, + SassCalculation_mod0(dividend, modulus) { + var t1; + dividend = A.SassCalculation__simplify0(dividend); + modulus = A.NullableExtension_andThen0(modulus, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([dividend], type$.JSArray_Object); + if (modulus != null) + t1.push(modulus); + A.SassCalculation__verifyLength0(t1, 2); + A.SassCalculation__verifyCompatibleNumbers0(t1); + if (!(dividend instanceof A.SassNumber0) || !(modulus instanceof A.SassNumber0) || !dividend.hasCompatibleUnits$1(modulus)) + return new A.SassCalculation0("mod", t1); + return dividend.modulo$1(modulus); + }, + SassCalculation_roundInternal0(strategyOrNumber, numberOrStep, step, inLegacySassFunction, span, warn) { + var _0_8_isSet, t2, _0_6_isSet, _0_6_isSet0, _0_14_isSet, _0_14, _0_12, _0_16, _0_18, _0_18_isSet, _0_20, _0_20_isSet, strategy, _0_9_isSet0, _0_16_isSet, t3, t4, _0_12_isSet, _0_12_isSet0, rest, _null = null, _s5_ = "round", + _0_1 = A.SassCalculation__simplify0(strategyOrNumber), + _0_6 = A.NullableExtension_andThen0(numberOrStep, A.calculation0_SassCalculation__simplify$closure()), + _0_9 = A.NullableExtension_andThen0(step, A.calculation0_SassCalculation__simplify$closure()), + _0_8 = _null, + _0_60 = _null, + _0_10 = _null, + _0_10_isSet = false, + _0_90 = _null, + _0_9_isSet = false, + number = _null, + t1 = false; + if (_0_1 instanceof A.SassNumber0) { + _0_8_isSet = !_0_1.get$hasUnits(); + if (_0_8_isSet) { + _0_8 = _0_6 == null; + t2 = _0_8; + if (t2) { + _0_10 = _0_9 == null; + t1 = _0_10; + _0_90 = _0_9; + _0_10_isSet = true; + _0_9_isSet = true; + } + _0_60 = _0_6; + number = _0_1; + } + _0_6_isSet = _0_8_isSet; + } else { + _0_8_isSet = false; + _0_6_isSet = false; + } + if (t1) + return A.SassNumber_SassNumber0(B.JSNumber_methods.round$0(number._number1$_value), _null); + t1 = false; + if (_0_1 instanceof A.SassNumber0) { + if (_0_8_isSet) + t2 = _0_8; + else { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_60 = t2; + _0_6_isSet = true; + } + _0_8 = t2 == null; + t2 = _0_8; + _0_8_isSet = true; + } + if (t2) { + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + t1 = t1 && inLegacySassFunction != null; + } + number = _0_1; + } else + number = _null; + if (t1) { + warn.call$2(string$.In_fut, B.Deprecation_SGB); + t1 = B.JSNumber_methods.round$0(number._number1$_value); + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(t1, number.get$denominatorUnits(number), t2); + } + step = _null; + t1 = false; + if (_0_1 instanceof A.SassNumber0) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassNumber0) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + type$.SassNumber_2._as(t2); + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + t1 = t1 && !_0_1.hasCompatibleUnits$1(t2); + step = t2; + } + number = _0_1; + } else + number = _null; + if (t1) { + t1 = type$.JSArray_Object; + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], t1)); + return new A.SassCalculation0(_s5_, A._setArrayType([number, step], t1)); + } + step = _null; + t1 = false; + if (_0_1 instanceof A.SassNumber0) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassNumber0) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + type$.SassNumber_2._as(t2); + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + step = t2; + } + number = _0_1; + } else + number = _null; + if (t1) { + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], type$.JSArray_Object)); + return A.SassCalculation__roundWithStep0("nearest", number, step); + } + _0_14_isSet = _0_1 instanceof A.SassString0; + _0_14 = _null; + _0_12 = _null; + _0_16 = _null; + _0_18 = _null; + _0_18_isSet = false; + _0_20 = _null; + _0_20_isSet = false; + strategy = _null; + number = _null; + step = _null; + t1 = false; + if (_0_14_isSet) { + _0_6_isSet0 = true; + _0_9_isSet0 = true; + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_16_isSet = !t2; + t2 = true; + if (_0_16_isSet) { + _0_16 = "up" === _0_12; + t3 = _0_16; + _0_18_isSet = !t3; + if (_0_18_isSet) { + _0_18 = "down" === _0_12; + t3 = _0_18; + _0_20_isSet = !t3; + if (_0_20_isSet) { + _0_20 = "to-zero" === _0_12; + t2 = _0_20; + } + } + } + if (t2) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassNumber0) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + t3 = type$.SassNumber_2; + t3._as(t2); + if (_0_9_isSet) + t4 = _0_90; + else { + t4 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t4; + } + if (t4 instanceof A.SassNumber0) { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t1; + } + t3._as(t1); + t3 = !t2.hasCompatibleUnits$1(t1); + step = t1; + t1 = t3; + } + number = t2; + } + strategy = _0_1; + } + } else + _0_16_isSet = false; + if (t1) { + t1 = type$.JSArray_Object; + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], t1)); + return new A.SassCalculation0(_s5_, A._setArrayType([strategy, number, step], t1)); + } + strategy = _null; + number = _null; + step = _null; + t1 = false; + if (_0_1 instanceof A.SassString0) { + _0_6_isSet0 = true; + _0_9_isSet0 = true; + _0_12_isSet = true; + if (_0_14_isSet) { + t2 = _0_14; + _0_12_isSet0 = _0_14_isSet; + } else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_12_isSet0 = _0_12_isSet; + _0_14_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet0) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet0 = _0_12_isSet; + } + _0_16 = "up" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet0) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet0 = _0_12_isSet; + } + _0_18 = "down" === t2; + t2 = _0_18; + _0_18_isSet = true; + } + if (!t2) + if (_0_20_isSet) { + t2 = _0_20; + _0_12_isSet = _0_12_isSet0; + } else { + if (_0_12_isSet0) { + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + } + _0_20 = "to-zero" === t2; + t2 = _0_20; + _0_20_isSet = true; + } + else { + t2 = t3; + _0_12_isSet = _0_12_isSet0; + } + } else { + t2 = t3; + _0_12_isSet = _0_12_isSet0; + } + } else { + t2 = t3; + _0_12_isSet = _0_12_isSet0; + } + if (t2) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassNumber0) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + t3 = type$.SassNumber_2; + t3._as(t2); + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t1; + } + t1 = t1 instanceof A.SassNumber0; + if (t1) { + if (_0_9_isSet) + t4 = _0_90; + else { + t4 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t4; + } + t3._as(t4); + step = t4; + } + number = t2; + } + strategy = _0_1; + } + } else + _0_12_isSet = _0_14_isSet; + if (t1) { + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([number, step], type$.JSArray_Object)); + return A.SassCalculation__roundWithStep0(strategy._string0$_text, number, step); + } + strategy = _null; + rest = _null; + t1 = false; + if (_0_1 instanceof A.SassString0) { + _0_6_isSet0 = true; + _0_12_isSet0 = true; + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_16 = "up" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_18 = "down" === t2; + t2 = _0_18; + _0_18_isSet = true; + } + if (!t2) + if (_0_20_isSet) + t2 = _0_20; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_20 = "to-zero" === t2; + t2 = _0_20; + _0_20_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 instanceof A.SassString0) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + type$.SassString_2._as(t2); + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + rest = t2; + } + strategy = _0_1; + } + } + if (t1) + return new A.SassCalculation0(_s5_, A._setArrayType([strategy, rest], type$.JSArray_Object)); + t1 = false; + if (_0_1 instanceof A.SassString0) { + _0_12_isSet0 = true; + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_16 = "up" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_18 = "down" === t2; + t2 = _0_18; + _0_18_isSet = true; + } + if (!t2) + if (_0_20_isSet) + t2 = _0_20; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_20 = "to-zero" === t2; + t2 = _0_20; + _0_20_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_60 = t2; + _0_6_isSet = true; + } + if (t2 != null) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + } + } + if (t1) + throw A.wrapException(A.SassScriptException$0(string$.If_str, _null)); + t1 = false; + if (_0_1 instanceof A.SassString0) { + _0_12_isSet0 = true; + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_14 = "nearest" === t2; + t2 = _0_14; + _0_14_isSet = true; + } + t3 = true; + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_16 = "up" === t2; + t2 = _0_16; + _0_16_isSet = true; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_18 = "down" === t2; + t2 = _0_18; + _0_18_isSet = true; + } + if (!t2) + if (_0_20_isSet) + t2 = _0_20; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = _0_12_isSet0; + } + _0_20 = "to-zero" === t2; + t2 = _0_20; + _0_20_isSet = true; + } + else + t2 = t3; + } else + t2 = t3; + } else + t2 = t3; + if (t2) { + if (_0_8_isSet) + t2 = _0_8; + else { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_60 = t2; + _0_6_isSet = true; + } + _0_8 = t2 == null; + t2 = _0_8; + _0_8_isSet = true; + } + if (t2) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + } + } + if (t1) + throw A.wrapException(A.SassScriptException$0(string$.Number, _null)); + t1 = false; + if (_0_8_isSet) + t2 = _0_8; + else { + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_60 = t2; + _0_6_isSet = true; + } + _0_8 = t2 == null; + t2 = _0_8; + } + if (t2) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + _0_10_isSet = true; + } + if (t1) + return new A.SassCalculation0(_s5_, A._setArrayType([_0_1], type$.JSArray_Object)); + step = _null; + t1 = false; + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_60; + else { + t2 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t2; + } + if (t2 != null) { + if (_0_6_isSet) + step = _0_60; + else { + step = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = step; + } + if (step == null) + step = A._asObject(step); + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_90 = t1; + _0_9_isSet = true; + } + _0_10 = t1 == null; + t1 = _0_10; + } + } + if (t1) + return new A.SassCalculation0(_s5_, A._setArrayType([_0_1, step], type$.JSArray_Object)); + if (_0_1 instanceof A.SassString0) { + t1 = true; + if (_0_14_isSet) + t2 = _0_14; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = true; + } + _0_14 = "nearest" === t2; + t2 = _0_14; + } + if (!t2) { + if (_0_16_isSet) + t2 = _0_16; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = true; + } + _0_16 = "up" === t2; + t2 = _0_16; + } + if (!t2) { + if (_0_18_isSet) + t2 = _0_18; + else { + if (_0_12_isSet) + t2 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t2 = _0_12; + _0_12_isSet = true; + } + _0_18 = "down" === t2; + t2 = _0_18; + } + if (!t2) + if (_0_20_isSet) + t1 = _0_20; + else { + if (_0_12_isSet) + t1 = _0_12; + else { + _0_12 = _0_1._string0$_text; + t1 = _0_12; + } + _0_20 = "to-zero" === t1; + t1 = _0_20; + } + } + } + } else + t1 = false; + if (!t1) + if (_0_1 instanceof A.SassString0) + t1 = _0_1.get$isSpecialVariable(); + else + t1 = false; + else + t1 = true; + number = _null; + step = _null; + t2 = false; + if (t1) { + _0_6_isSet0 = true; + _0_9_isSet0 = true; + type$.SassString_2._as(_0_1); + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if (t1 != null) { + if (_0_6_isSet) + number = _0_60; + else { + number = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = number; + } + if (number == null) + number = A._asObject(number); + if (_0_9_isSet) + t1 = _0_90; + else { + t1 = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = t1; + } + t1 = t1 != null; + if (t1) { + if (_0_9_isSet) + step = _0_90; + else { + step = _0_9; + _0_9_isSet = _0_9_isSet0; + _0_90 = step; + } + if (step == null) + step = A._asObject(step); + } + } else + t1 = t2; + strategy = _0_1; + } else { + t1 = t2; + strategy = _null; + } + if (t1) + return new A.SassCalculation0(_s5_, A._setArrayType([strategy, number, step], type$.JSArray_Object)); + t1 = false; + if ((_0_6_isSet ? _0_60 : _0_6) != null) + t1 = (_0_9_isSet ? _0_90 : _0_9) != null; + if (t1) + throw A.wrapException(A.SassScriptException$0(A.S(strategyOrNumber) + string$.x20must_b, _null)); + t1 = A.SassScriptException$0("Invalid parameters.", _null); + throw A.wrapException(t1); + }, + SassCalculation_calcSize0(basis, value) { + var t1 = type$.JSArray_Object, + t2 = A._setArrayType([basis], t1); + if (value != null) + t2.push(value); + A.SassCalculation__verifyLength0(t2, 2); + basis = A.SassCalculation__simplify0(basis); + value = A.NullableExtension_andThen0(value, A.calculation0_SassCalculation__simplify$closure()); + t1 = A._setArrayType([basis], t1); + if (value != null) + t1.push(value); + return new A.SassCalculation0("calc-size", t1); + }, + SassCalculation_operateInternal0(operator, left, right, inLegacySassFunction, simplify, warn) { + var compatible, t1; + if (!simplify) + return new A.CalculationOperation0(operator, left, right); + left = A.SassCalculation__simplify0(left); + right = A.SassCalculation__simplify0(right); + if (B.CalculationOperator_dpX0 === operator || B.CalculationOperator_KrC0 === operator) { + if (left instanceof A.SassNumber0 && right instanceof A.SassNumber0) { + compatible = left.hasCompatibleUnits$1(right); + if (!compatible && inLegacySassFunction != null && left.isComparableTo$1(right)) { + warn.call$2("In future versions of Sass, " + inLegacySassFunction + "() will be interpreted as the CSS " + inLegacySassFunction + string$.x28__cal + inLegacySassFunction + string$.x28__ins, B.Deprecation_SGB); + compatible = true; + } + if (compatible) + return operator === B.CalculationOperator_dpX0 ? left.plus$1(right) : left.minus$1(right); + } + A.SassCalculation__verifyCompatibleNumbers0(A._setArrayType([left, right], type$.JSArray_Object)); + if (right instanceof A.SassNumber0) { + t1 = right._number1$_value; + t1 = t1 < 0 && !A.fuzzyEquals0(t1, 0); + } else + t1 = false; + if (t1) { + right = right.times$1(A.SassNumber_SassNumber0(-1, null)); + operator = operator === B.CalculationOperator_dpX0 ? B.CalculationOperator_KrC0 : B.CalculationOperator_dpX0; + } + return new A.CalculationOperation0(operator, left, right); + } else if (left instanceof A.SassNumber0 && right instanceof A.SassNumber0) + return operator === B.CalculationOperator_LPB0 ? left.times$1(right) : left.dividedBy$1(right); + else + return new A.CalculationOperation0(operator, left, right); + }, + SassCalculation__roundWithStep0(strategy, number, step) { + var _0_2, t1, _0_6, _0_8_isSet, _0_8, _0_9, _0_9_isSet, _0_11, _0_13, stepWithNumberUnit, t2, _null = null; + if (!A.LinkedHashSet_LinkedHashSet$_literal(["nearest", "up", "down", "to-zero"], type$.String).contains$1(0, strategy)) + throw A.wrapException(A.ArgumentError$(strategy + string$.x20must_b, _null)); + _0_2 = number._number1$_value; + if (_0_2 == 1 / 0 || _0_2 == -1 / 0) { + t1 = step._number1$_value; + t1 = t1 == 1 / 0 || t1 == -1 / 0; + } else + t1 = false; + if (!t1) { + t1 = step._number1$_value; + t1 = t1 === 0 || isNaN(_0_2) || isNaN(t1); + } else + t1 = true; + if (t1) { + t1 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(0 / 0, number.get$denominatorUnits(number), t1); + } + if (_0_2 == 1 / 0 || _0_2 == -1 / 0) + return number; + t1 = step._number1$_value; + if (t1 == 1 / 0 || t1 == -1 / 0) { + $label0$0: { + if (0 === _0_2) { + t1 = number; + break $label0$0; + } + _0_6 = "nearest" === strategy; + t1 = _0_6; + _0_8_isSet = !t1; + _0_8 = _null; + if (_0_8_isSet) { + _0_8 = "to-zero" === strategy; + t1 = _0_8; + } else + t1 = true; + _0_9 = _null; + if (t1) { + _0_9 = _0_2 > 0; + t1 = _0_9; + _0_9_isSet = true; + } else { + _0_9_isSet = false; + t1 = false; + } + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (!_0_6) + if (_0_8_isSet) + t1 = _0_8; + else { + _0_8 = "to-zero" === strategy; + t1 = _0_8; + } + else + t1 = true; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(-0.0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + _0_11 = "up" === strategy; + t1 = _0_11; + if (t1) + if (_0_9_isSet) + t1 = _0_9; + else { + _0_9 = _0_2 > 0; + t1 = _0_9; + } + else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(1 / 0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (_0_11) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(-0.0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + _0_13 = "down" === strategy; + t1 = _0_13; + if (t1) + t1 = _0_2 < 0; + else + t1 = false; + if (t1) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(-1 / 0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + if (_0_13) { + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(0, number.get$denominatorUnits(number), t1); + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Invalid argument: " + strategy + ".")); + } + return t1; + } + stepWithNumberUnit = step.convertValueToMatch$1(number); + $label1$1: { + if ("nearest" === strategy) { + t1 = B.JSNumber_methods.round$0(_0_2 / stepWithNumberUnit); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("up" === strategy) { + t2 = _0_2 / stepWithNumberUnit; + t1 = t1 < 0 ? B.JSNumber_methods.floor$0(t2) : B.JSNumber_methods.ceil$0(t2); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("down" === strategy) { + t2 = _0_2 / stepWithNumberUnit; + t1 = t1 < 0 ? B.JSNumber_methods.ceil$0(t2) : B.JSNumber_methods.floor$0(t2); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + break $label1$1; + } + if ("to-zero" === strategy) { + t1 = _0_2 / stepWithNumberUnit; + if (_0_2 < 0) { + t1 = B.JSNumber_methods.ceil$0(t1); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + } else { + t1 = B.JSNumber_methods.floor$0(t1); + t2 = number.get$numeratorUnits(number); + t2 = A.SassNumber_SassNumber$withUnits0(t1 * stepWithNumberUnit, number.get$denominatorUnits(number), t2); + t1 = t2; + } + break $label1$1; + } + t1 = number.get$numeratorUnits(number); + t1 = A.SassNumber_SassNumber$withUnits0(0 / 0, number.get$denominatorUnits(number), t1); + break $label1$1; + } + return t1; + }, + SassCalculation__simplify0(arg) { + var t1, t2, _0_11_isSet, _0_15, _0_12, _0_16_isSet, text, _0_11, t3, _0_16, _0_12_isSet, _0_15_isSet, value, _null = null, + _s32_ = " can't be used in a calculation."; + $label0$0: { + if (arg instanceof A.SassNumber0 || arg instanceof A.CalculationOperation0) { + t1 = arg; + break $label0$0; + } + if (arg instanceof A.CalculationInterpolation) { + t1 = new A.SassString0("(" + arg._calculation0$_value + ")", false); + break $label0$0; + } + t1 = arg instanceof A.SassString0; + t2 = _null; + if (t1 && !arg._string0$_hasQuotes) { + t1 = arg; + break $label0$0; + } + if (t1) + A.throwExpression(A.SassScriptException$0("Quoted string " + arg.toString$0(0) + _s32_, _null)); + _0_11_isSet = arg instanceof A.SassCalculation0; + _0_15 = _null; + _0_12 = _null; + _0_16_isSet = false; + text = _null; + t1 = false; + if (_0_11_isSet) { + _0_11 = "calc" === arg.name; + if (_0_11) { + _0_12 = arg.$arguments; + _0_15 = _0_12.length === 1; + t3 = _0_15; + if (t3) { + _0_16 = _0_12[0]; + t2 = _0_16; + if (t2 instanceof A.SassString0) { + type$.SassString_2._as(_0_16); + if (!_0_16._string0$_hasQuotes) { + text = _0_16._string0$_text; + t1 = A.SassCalculation__needsParentheses0(text); + } + } + _0_16_isSet = true; + } else + _0_16 = t2; + } else + _0_16 = t2; + _0_12_isSet = _0_11; + _0_15_isSet = _0_12_isSet; + } else { + _0_16 = t2; + _0_11 = _null; + _0_15_isSet = false; + _0_12_isSet = false; + } + if (t1) { + t1 = new A.SassString0("(" + A.S(text) + ")", false); + break $label0$0; + } + t1 = false; + if (_0_11_isSet) + if (_0_11) + if (_0_15_isSet) + t1 = _0_15; + else { + if (_0_12_isSet) + t1 = _0_12; + else { + _0_12 = arg.$arguments; + t1 = _0_12; + _0_12_isSet = true; + } + _0_15 = t1.length === 1; + t1 = _0_15; + } + if (t1) { + if (_0_16_isSet) + value = _0_16; + else { + _0_16 = (_0_12_isSet ? _0_12 : arg.$arguments)[0]; + value = _0_16; + } + t1 = value; + break $label0$0; + } + if (_0_11_isSet) { + t1 = arg; + break $label0$0; + } + if (arg instanceof A.Value0) + A.throwExpression(A.SassScriptException$0("Value " + arg.toString$0(0) + _s32_, _null)); + t1 = A.throwExpression(A.ArgumentError$("Unexpected calculation argument " + A.S(arg) + ".", _null)); + } + return t1; + }, + SassCalculation__needsParentheses0(text) { + var t1, couldBeVar, second, third, fourth, i, t2, + first = text.charCodeAt(0); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47 || first === 42) + return true; + t1 = text.length; + couldBeVar = t1 >= 4 && A.characterEqualsIgnoreCase0(first, 118); + if (t1 < 2) + return false; + second = text.charCodeAt(1); + if (second === 32 || second === 9 || second === 10 || second === 13 || second === 12 || second === 47 || second === 42) + return true; + couldBeVar = couldBeVar && A.characterEqualsIgnoreCase0(second, 97); + if (t1 < 3) + return false; + third = text.charCodeAt(2); + if (third === 32 || third === 9 || third === 10 || third === 13 || third === 12 || third === 47 || third === 42) + return true; + couldBeVar = couldBeVar && A.characterEqualsIgnoreCase0(third, 114); + if (t1 < 4) + return false; + fourth = text.charCodeAt(3); + if (couldBeVar && fourth === 40) + return true; + if (fourth === 32 || fourth === 9 || fourth === 10 || fourth === 13 || fourth === 12 || fourth === 47 || fourth === 42) + return true; + for (i = 4; i < t1; ++i) { + t2 = text.charCodeAt(i); + if (t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || t2 === 47 || t2 === 42) + return true; + } + return false; + }, + SassCalculation__verifyCompatibleNumbers0(args) { + var t1, _i, t2, arg, i, number1, j, number2; + for (t1 = args.length, _i = 0; t2 = args.length, _i < t2; args.length === t1 || (0, A.throwConcurrentModificationError)(args), ++_i) { + arg = args[_i]; + if (arg instanceof A.SassNumber0 && arg.get$hasComplexUnits()) + throw A.wrapException(A.SassScriptException$0("Number " + arg.toString$0(0) + " isn't compatible with CSS calculations.", null)); + } + for (t1 = t2, i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + throw A.wrapException(A.SassScriptException$0(number1.toString$0(0) + " and " + number2.toString$0(0) + " are incompatible.", null)); + } + } + }, + SassCalculation__verifyLength0(args, expectedLength) { + var t1; + if (args.length === expectedLength) + return; + if (B.JSArray_methods.any$1(args, new A.SassCalculation__verifyLength_closure0())) + return; + t1 = args.length; + throw A.wrapException(A.SassScriptException$0("" + expectedLength + " arguments required, but only " + t1 + " " + A.pluralize0("was", t1, "were") + " passed.", null)); + }, + SassCalculation__singleArgument0($name, argument, mathFunc, forbidUnits) { + argument = A.SassCalculation__simplify0(argument); + if (!(argument instanceof A.SassNumber0)) + return new A.SassCalculation0($name, A._setArrayType([argument], type$.JSArray_Object)); + if (forbidUnits) + argument.assertNoUnits$0(); + return mathFunc.call$1(argument); + }, + SassCalculation0: function SassCalculation0(t0, t1) { + this.name = t0; + this.$arguments = t1; + }, + SassCalculation__verifyLength_closure0: function SassCalculation__verifyLength_closure0() { + }, + CalculationOperation0: function CalculationOperation0(t0, t1, t2) { + this._calculation0$_operator = t0; + this._calculation0$_left = t1; + this._calculation0$_right = t2; + }, + CalculationOperator0: function CalculationOperator0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.operator = t1; + _.precedence = t2; + _.index = t3; + _._name = t4; + }, + CalculationInterpolation: function CalculationInterpolation(t0) { + this._calculation0$_value = t0; + }, + CallableDeclaration0: function CallableDeclaration0() { + }, + updateCanonicalizeContextPrototype() { + var t1 = type$.JSClass._as(new A.CanonicalizeContext0(false, null).constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["fromImport", new A.updateCanonicalizeContextPrototype_closure(), "containingUrl", new A.updateCanonicalizeContextPrototype_closure0()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(t1)); + return null; + }, + updateCanonicalizeContextPrototype_closure: function updateCanonicalizeContextPrototype_closure() { + }, + updateCanonicalizeContextPrototype_closure0: function updateCanonicalizeContextPrototype_closure0() { + }, + CanonicalizeContext0: function CanonicalizeContext0(t0, t1) { + this._canonicalize_context$_fromImport = t0; + this._canonicalize_context$_containingUrl = t1; + this._canonicalize_context$_wasContainingUrlAccessed = false; + }, + ColorChannel0: function ColorChannel0(t0, t1, t2) { + this.name = t0; + this.isPolarAngle = t1; + this.associatedUnit = t2; + }, + LinearChannel0: function LinearChannel0(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.min = t0; + _.max = t1; + _.requiresPercent = t2; + _.lowerClamped = t3; + _.upperClamped = t4; + _.name = t5; + _.isPolarAngle = t6; + _.associatedUnit = t7; + }, + Chokidar0: function Chokidar0() { + }, + ChokidarOptions0: function ChokidarOptions0() { + }, + ChokidarWatcher0: function ChokidarWatcher0() { + }, + InterpolatedClassSelector: function InterpolatedClassSelector(t0) { + this.name = t0; + }, + ClassSelector0: function ClassSelector0(t0, t1) { + this.name = t0; + this.span = t1; + }, + ClipGamutMap0: function ClipGamutMap0(t0) { + this.name = t0; + }, + cloneCssStylesheet0(stylesheet, extensionStore) { + var _0_0 = extensionStore.clone$0(); + return new A._Record_2(new A._CloneCssVisitor0(_0_0._1)._clone_css$_visitChildren$2(A.ModifiableCssStylesheet$0(stylesheet.get$span(stylesheet)), stylesheet), _0_0._0); + }, + _CloneCssVisitor0: function _CloneCssVisitor0(t0) { + this._clone_css$_oldToNewSelectors = t0; + }, + ColorExpression0: function ColorExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + _invert0($arguments, global) { + var t2, color, rgb, channel2, space, weight, inSpace, t3, _1_9, channel0, channel1, t4, _s6_ = "weight", _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + weightNumber = t1.$index($arguments, 1).assertNumber$1(_s6_); + if (!(t1.$index($arguments, 0) instanceof A.SassNumber0)) + t2 = global && t1.$index($arguments, 0).get$isSpecialNumber(); + else + t2 = true; + if (t2) { + if (weightNumber._number1$_value !== 100 || !weightNumber.hasUnit$1("%")) + throw A.wrapException(string$.Only_oa); + return A._functionString0("invert", t1.take$1($arguments, 1)); + } + color = t1.$index($arguments, 0).assertColor$1("color"); + if (t1.$index($arguments, 2).$eq(0, B.C__SassNull0)) { + t1 = color._color0$_space; + if (!t1.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.To_usei + color.toString$0(0) + ", you must provide a $space.", "color")); + A._checkPercent0(weightNumber, _s6_); + rgb = color.toSpace$1(B.RgbColorSpace_i0P0); + channel2 = B.LinearChannel_vJ30; + return A._mixLegacy0(A.SassColor_SassColor$rgbInternal0(A._invertChannel0(rgb, B.LinearChannel_qXC0, rgb.channel0OrNull), A._invertChannel0(rgb, B.LinearChannel_Z5r0, rgb.channel1OrNull), A._invertChannel0(rgb, channel2, rgb.channel2OrNull), color.alphaOrNull, null), color, weightNumber).toSpace$1(t1); + } + t1 = t1.$index($arguments, 2).assertString$1(_s5_); + t1.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName0(t1._string0$_text, _s5_); + weight = weightNumber.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100; + if (A.fuzzyEquals0(weight, 0)) + return color; + inSpace = color.toSpace$1(space); + $label0$0: { + if (B.HwbColorSpace_guQ0 === space) { + t1 = A._invertChannel0(inSpace, space._space$_channels[0], inSpace.channel0OrNull); + t2 = inSpace.alphaOrNull; + if (t2 == null) + t2 = 0; + t2 = A.SassColor_SassColor$hwb0(t1, inSpace.channel2OrNull, inSpace.channel1OrNull, t2); + t1 = t2; + break $label0$0; + } + if (B.HslColorSpace_JQ20 === space || B.LchColorSpace_Bpv0 === space || B.OklchColorSpace_9Gj0 === space) { + t1 = space._space$_channels; + t2 = A._invertChannel0(inSpace, t1[0], inSpace.channel0OrNull); + t1 = A._invertChannel0(inSpace, t1[2], inSpace.channel2OrNull); + t3 = inSpace.alphaOrNull; + if (t3 == null) + t3 = 0; + t3 = A.SassColor_SassColor$forSpaceInternal0(space, t2, inSpace.channel1OrNull, t1, t3); + t1 = t3; + break $label0$0; + } + _1_9 = space._space$_channels; + channel0 = _1_9[0]; + channel1 = _1_9[1]; + channel2 = _1_9[2]; + t1 = A._invertChannel0(inSpace, channel0, inSpace.channel0OrNull); + t2 = A._invertChannel0(inSpace, channel1, inSpace.channel1OrNull); + t3 = A._invertChannel0(inSpace, channel2, inSpace.channel2OrNull); + t4 = inSpace.alphaOrNull; + t1 = A.SassColor_SassColor$forSpaceInternal0(space, t1, t2, t3, t4 == null ? 0 : t4); + break $label0$0; + } + return A.fuzzyEquals0(weight, 1) ? t1.toSpace$2$legacyMissing(color._color0$_space, false) : color.interpolate$4$legacyMissing$weight(t1, A.InterpolationMethod$0(space, null), false, 1 - weight); + }, + _invertChannel0(color, channel, value) { + var _0_2_isSet, _0_2, t1; + if (value == null) + A._missingChannelError0(color, channel.name); + $label0$0: { + _0_2_isSet = channel instanceof A.LinearChannel0; + _0_2 = null; + if (_0_2_isSet) { + _0_2 = channel.min; + t1 = _0_2; + t1 = t1 < 0; + } else + t1 = false; + if (t1) { + t1 = -value; + break $label0$0; + } + if (_0_2_isSet) + t1 = 0 === _0_2; + else + t1 = false; + if (t1) { + t1 = channel.max - value; + break $label0$0; + } + if (channel.isPolarAngle) { + t1 = B.JSNumber_methods.$mod(value + 180, 360); + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Unknown channel " + channel.toString$0(0) + ".")); + } + return t1; + }, + _grayscale0(colorArg) { + var hsl, t2, oklch, + color = colorArg.assertColor$1("color"), + t1 = color._color0$_space; + if (t1.get$isLegacyInternal()) { + hsl = color.toSpace$1(B.HslColorSpace_JQ20); + t2 = hsl.alphaOrNull; + if (t2 == null) + t2 = 0; + return A.SassColor_SassColor$hsl0(hsl.channel0OrNull, 0, hsl.channel2OrNull, t2).toSpace$2$legacyMissing(t1, false); + } else { + oklch = color.toSpace$1(B.OklchColorSpace_9Gj0); + t2 = oklch.alphaOrNull; + if (t2 == null) + t2 = 0; + return A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_9Gj0, oklch.channel0OrNull, 0, oklch.channel2OrNull, t2).toSpace$1(t1); + } + }, + _updateComponents0($arguments, adjust, change, scale) { + var t2, t3, keywords, originalColor, spaceKeyword, alphaArg, color, channelArgs, channelInfo, t4, value, channelIndex, result, i, alphaNumber, _null = null, _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + argumentList = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + if (argumentList._list1$_contents.length !== 0) + throw A.wrapException(A.SassScriptException$0(string$.Only_op, _null)); + argumentList._argument_list$_wereKeywordsAccessed = true; + t2 = type$.String; + t3 = type$.Value_2; + keywords = A.LinkedHashMap_LinkedHashMap$of(argumentList._argument_list$_keywords, t2, t3); + originalColor = t1.$index($arguments, 0).assertColor$1("color"); + t1 = keywords.remove$1(0, _s5_); + spaceKeyword = t1 == null ? _null : t1.assertString$1(_s5_); + if (spaceKeyword == null) + spaceKeyword = _null; + else + spaceKeyword.assertUnquoted$1(_s5_); + alphaArg = keywords.remove$1(0, "alpha"); + t1 = spaceKeyword == null; + if (t1 && originalColor._color0$_space.get$isLegacyInternal() && keywords.__js_helper$_length !== 0) { + t1 = A.NullableExtension_andThen0(A._sniffLegacyColorSpace0(keywords), new A._updateComponents_closure1(originalColor)); + color = t1 == null ? originalColor : t1; + } else + color = A._colorInSpace0(originalColor, t1 ? B.C__SassNull0 : spaceKeyword, true); + channelArgs = A.List_List$filled(color.get$channels().length, _null, false, type$.nullable_Value_2); + t1 = color._color0$_space; + channelInfo = t1._space$_channels; + for (t2 = A.MapExtensions_get_pairs0(keywords, t2, t3), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = {}; + t4 = t2.get$current(t2); + t3.name = null; + t3.name = t4._0; + value = t4._1; + channelIndex = B.JSArray_methods.indexWhere$1(channelInfo, new A._updateComponents_closure2(t3)); + if (channelIndex === -1) + throw A.wrapException(A.SassScriptException$0("Color space " + t1.toString$0(0) + " doesn't have a channel with this name.", t3.name)); + channelArgs[channelIndex] = value; + } + if (change) + result = A._changeColor0(color, channelArgs, alphaArg); + else { + t2 = A._setArrayType([], type$.JSArray_nullable_SassNumber_2); + for (i = 0; i < 3; ++i) { + t3 = channelArgs[i]; + t2.push(t3 == null ? _null : t3.assertNumber$1(channelInfo[i].name)); + } + alphaNumber = alphaArg == null ? _null : alphaArg.assertNumber$1("alpha"); + result = scale ? A.SassColor_SassColor$forSpaceInternal0(t1, A._scaleChannel0(color, channelInfo[0], color.channel0OrNull, t2[0]), A._scaleChannel0(color, channelInfo[1], color.channel1OrNull, t2[1]), A._scaleChannel0(color, channelInfo[2], color.channel2OrNull, t2[2]), A._scaleChannel0(color, B.LinearChannel_XL80, color.alphaOrNull, alphaNumber)) : A._adjustColor0(color, t2, alphaNumber); + } + return result.toSpace$2$legacyMissing(originalColor._color0$_space, false); + }, + _changeColor0(color, channelArgs, alphaArg) { + var t4, _s5_ = "alpha", + t1 = A._channelForChange0(channelArgs[0], color, 0), + t2 = A._channelForChange0(channelArgs[1], color, 1), + t3 = A._channelForChange0(channelArgs[2], color, 2); + $label0$0: { + if (alphaArg == null) { + t4 = color.alphaOrNull; + if (t4 == null) + t4 = 0; + break $label0$0; + } + t4 = A._isNone0(alphaArg); + if (t4) { + t4 = null; + break $label0$0; + } + t4 = alphaArg instanceof A.SassNumber0; + if (t4 && !alphaArg.get$hasUnits()) { + t4 = alphaArg.valueInRange$3(0, 1, _s5_); + break $label0$0; + } + if (t4 && alphaArg.hasUnit$1("%")) { + t4 = alphaArg.valueInRangeWithUnit$4(0, 100, _s5_, "%") / 100; + break $label0$0; + } + if (t4) { + t4 = new A._changeColor_closure0(alphaArg).call$0(); + break $label0$0; + } + t4 = A.throwExpression(A.SassScriptException$0(alphaArg.toString$0(0) + ' is not a number or unquoted "none".', _s5_)); + } + return A._colorFromChannels0(color._color0$_space, t1, t2, t3, t4, false, false); + }, + _channelForChange0(channelArg, color, channel) { + var _0_0, t1, t2; + if (channelArg == null) { + _0_0 = color.get$channelsOrNull()[channel]; + $label0$0: { + if (_0_0 != null) { + t1 = color._color0$_space; + t2 = A.SassNumber_SassNumber0(_0_0, (t1 === B.HslColorSpace_JQ20 || t1 === B.HwbColorSpace_guQ0) && channel > 0 ? "%" : null); + t1 = t2; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + } + if (A._isNone0(channelArg)) + return null; + if (channelArg instanceof A.SassNumber0) + return channelArg; + throw A.wrapException(A.SassScriptException$0(channelArg.toString$0(0) + ' is not a number or unquoted "none".', color._color0$_space._space$_channels[channel].name)); + }, + _scaleChannel0(color, channel, oldValue, factorArg) { + var t1, factor; + if (factorArg == null) + return oldValue; + if (!(channel instanceof A.LinearChannel0)) + throw A.wrapException(A.SassScriptException$0("Channel isn't scalable.", channel.name)); + if (oldValue == null) + A._missingChannelError0(color, channel.name); + t1 = channel.name; + factorArg.assertUnit$2("%", t1); + factor = factorArg.valueInRangeWithUnit$4(-100, 100, t1, "%") / 100; + $label0$0: { + if (0 === factor) { + t1 = oldValue; + break $label0$0; + } + if (factor > 0) { + t1 = channel.max; + t1 = oldValue >= t1 ? oldValue : oldValue + (t1 - oldValue) * factor; + break $label0$0; + } + t1 = channel.min; + t1 = oldValue <= t1 ? oldValue : oldValue + (oldValue - t1) * factor; + break $label0$0; + } + return t1; + }, + _adjustColor0(color, channelArgs, alphaArg) { + var t1 = color._color0$_space, + t2 = t1._space$_channels; + return A.SassColor_SassColor$forSpaceInternal0(t1, A._adjustChannel0(color, t2[0], color.channel0OrNull, channelArgs[0]), A._adjustChannel0(color, t2[1], color.channel1OrNull, channelArgs[1]), A._adjustChannel0(color, t2[2], color.channel2OrNull, channelArgs[2]), A.NullableExtension_andThen0(A._adjustChannel0(color, B.LinearChannel_XL80, color.alphaOrNull, alphaArg), new A._adjustColor_closure0())); + }, + _adjustChannel0(color, channel, oldValue, adjustmentArg) { + var _0_1, _0_3, t1, _0_6_isSet, _0_6, _0_6_isSet0, t2, _0_11, result, min, max, _null = null; + if (adjustmentArg == null) + return oldValue; + if (oldValue == null) + A._missingChannelError0(color, channel.name); + $label0$0: { + _0_1 = color._color0$_space; + _0_3 = B.HslColorSpace_JQ20 === _0_1; + t1 = _0_3; + if (!t1) + _0_6_isSet = B.HwbColorSpace_guQ0 === _0_1; + else + _0_6_isSet = true; + if (_0_6_isSet) { + t1 = channel.isPolarAngle; + _0_6 = channel; + } else { + _0_6 = _null; + t1 = false; + } + if (t1) { + adjustmentArg = A.SassNumber_SassNumber0(A._angleValue0(adjustmentArg, "hue"), _null); + break $label0$0; + } + t1 = false; + if (_0_3) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t2 = _0_6; + else { + t2 = channel; + _0_6_isSet = _0_6_isSet0; + _0_6 = t2; + } + if (t2 instanceof A.LinearChannel0) { + if (_0_6_isSet) + t1 = _0_6; + else { + t1 = channel; + _0_6_isSet = _0_6_isSet0; + _0_6 = t1; + } + _0_11 = type$.LinearChannel_2._as(t1).name; + t1 = _0_11; + if ("saturation" !== t1) + t1 = "lightness" === _0_11; + else + t1 = true; + } + } + if (t1) { + A._checkPercent0(adjustmentArg, channel.name); + adjustmentArg = A.SassNumber_SassNumber0(adjustmentArg._number1$_value, "%"); + break $label0$0; + } + if (B.LinearChannel_XL80 === (_0_6_isSet ? _0_6 : channel) && adjustmentArg.get$hasUnits()) { + A.warnForDeprecation0("$alpha: Passing a number with unit " + adjustmentArg.get$unitString() + string$.x20is_de + adjustmentArg.unitSuggestion$1("alpha") + string$.x0a_Morex3af, B.Deprecation_PHd); + adjustmentArg = A.SassNumber_SassNumber0(adjustmentArg._number1$_value, _null); + } + } + t1 = A._channelFromValue0(channel, adjustmentArg, false); + t1.toString; + result = oldValue + t1; + $label1$1: { + t1 = channel instanceof A.LinearChannel0; + min = _null; + t2 = false; + if (t1) + if (channel.lowerClamped) { + min = channel.min; + t2 = result < min; + } + if (t2) { + t1 = oldValue < min ? Math.max(oldValue, result) : min; + break $label1$1; + } + max = _null; + t2 = false; + if (t1) + if (channel.upperClamped) { + max = channel.max; + t1 = result > max; + } else + t1 = t2; + else + t1 = t2; + if (t1) { + t1 = oldValue > max ? Math.min(oldValue, result) : max; + break $label1$1; + } + t1 = result; + break $label1$1; + } + return t1; + }, + _sniffLegacyColorSpace0(keywords) { + var t1, t2; + for (t1 = new A.LinkedHashMapKeyIterator(keywords, keywords._modifications, keywords._first); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + if ("red" === t2 || "green" === t2 || "blue" === t2) + return B.RgbColorSpace_i0P0; + if ("saturation" === t2 || "lightness" === t2) + return B.HslColorSpace_JQ20; + if ("whiteness" === t2 || "blackness" === t2) + return B.HwbColorSpace_guQ0; + } + return keywords.containsKey$1("hue") ? B.HslColorSpace_JQ20 : null; + }, + _functionString0($name, $arguments) { + return new A.SassString0($name + "(" + J.map$1$1$ax($arguments, new A._functionString_closure0(), type$.String).join$1(0, ", ") + ")", false); + }, + _removedColorFunction0($name, argument, negative) { + return A.BuiltInCallable$function0($name, "$color, $amount", new A._removedColorFunction_closure0($name, argument, negative), "sass:color"); + }, + _rgb0($name, $arguments) { + var t3, t4, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + t2 = true; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } + if (t2) + return A._functionString0($name, $arguments); + t2 = t1.$index($arguments, 0).assertNumber$1("red"); + t3 = t1.$index($arguments, 1).assertNumber$1("green"); + t1 = t1.$index($arguments, 2).assertNumber$1("blue"); + t4 = A.NullableExtension_andThen0(alpha, new A._rgb_closure0()); + return A._colorFromChannels0(B.RgbColorSpace_i0P0, t2, t3, t1, t4 == null ? 1 : t4, true, true); + }, + _rgbTwoArg0($name, $arguments) { + var t2, color, + t1 = J.getInterceptor$asx($arguments), + first = t1.$index($arguments, 0), + second = t1.$index($arguments, 1); + if (!first.get$isSpecialVariable()) + t2 = !(first instanceof A.SassColor0) && second.get$isSpecialVariable(); + else + t2 = true; + if (t2) + return A._functionString0($name, $arguments); + color = first.assertColor$1("color"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0("Expected " + color.toString$0(0) + string$.x20to_be_ + color.toString$0(0) + ", $alpha: " + second.toString$0(0) + ")", $name)); + color.assertLegacy$1("color"); + color = color.toSpace$1(B.RgbColorSpace_i0P0); + if (second.get$isSpecialNumber()) + return A._functionString0($name, A._setArrayType([A.SassNumber_SassNumber0(color.channel$1(0, "red"), null), A.SassNumber_SassNumber0(color.channel$1(0, "green"), null), A.SassNumber_SassNumber0(color.channel$1(0, "blue"), null), t1.$index($arguments, 1)], type$.JSArray_Value_2)); + t1 = A._percentageOrUnitless0(t1.$index($arguments, 1).assertNumber$1("alpha"), 1, "alpha"); + return color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + }, + _hsl0($name, $arguments) { + var t3, t4, + t1 = J.getInterceptor$asx($arguments), + alpha = t1.get$length($arguments) > 3 ? t1.$index($arguments, 3) : null, + t2 = true; + if (!t1.$index($arguments, 0).get$isSpecialNumber()) + if (!t1.$index($arguments, 1).get$isSpecialNumber()) + if (!t1.$index($arguments, 2).get$isSpecialNumber()) { + t2 = alpha == null ? null : alpha.get$isSpecialNumber(); + t2 = t2 === true; + } + if (t2) + return A._functionString0($name, $arguments); + t2 = t1.$index($arguments, 0).assertNumber$1("hue"); + t3 = t1.$index($arguments, 1).assertNumber$1("saturation"); + t1 = t1.$index($arguments, 2).assertNumber$1("lightness"); + t4 = A.NullableExtension_andThen0(alpha, new A._hsl_closure0()); + return A._colorFromChannels0(B.HslColorSpace_JQ20, t2, t3, t1, t4 == null ? 1 : t4, true, false); + }, + _angleValue0(angleValue, $name) { + var angle = angleValue.assertNumber$1($name); + if (angle.compatibleWithUnit$1("deg")) + return angle.coerceValueToUnit$1("deg"); + A.warnForDeprecation0("$" + $name + ": Passing a unit other than deg (" + angle.toString$0(0) + string$.x29x20is_d_ + angle.unitSuggestion$1($name) + string$.x0a_See_, B.Deprecation_PHd); + return angle._number1$_value; + }, + _checkPercent0(number, $name) { + if (number.hasUnit$1("%")) + return; + A.warnForDeprecation0("$" + $name + ": Passing a number without unit % (" + number.toString$0(0) + string$.x29x20is_d_ + number.unitSuggestion$2($name, "%") + string$.x0a_Morex3af, B.Deprecation_PHd); + }, + _percentageOrUnitless0(number, max, $name) { + var value; + if (!number.get$hasUnits()) + value = number._number1$_value; + else if (number.hasUnit$1("%")) + value = max * number._number1$_value / 100; + else + throw A.wrapException(A.SassScriptException$0("Expected " + number.toString$0(0) + ' to have unit "%" or no units.', $name)); + return value; + }, + _mixLegacy0(color1, color2, weight) { + var t2, alphaDistance, weight1, weight2, t3, t4, t5, t6, t7, t8, + rgb1 = color1.toSpace$1(B.RgbColorSpace_i0P0), + rgb2 = color2.toSpace$1(B.RgbColorSpace_i0P0), + weightScale = weight.valueInRange$3(0, 100, "weight") / 100, + normalizedWeight = weightScale * 2 - 1, + t1 = color1.alphaOrNull; + if (t1 == null) + t1 = 0; + t2 = color2.alphaOrNull; + alphaDistance = t1 - (t2 == null ? 0 : t2); + t1 = normalizedWeight * alphaDistance; + weight1 = ((t1 === -1 ? normalizedWeight : (normalizedWeight + alphaDistance) / (1 + t1)) + 1) / 2; + weight2 = 1 - weight1; + t1 = rgb1.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = rgb2.channel0OrNull; + if (t2 == null) + t2 = 0; + t3 = rgb1.channel1OrNull; + if (t3 == null) + t3 = 0; + t4 = rgb2.channel1OrNull; + if (t4 == null) + t4 = 0; + t5 = rgb1.channel2OrNull; + if (t5 == null) + t5 = 0; + t6 = rgb2.channel2OrNull; + if (t6 == null) + t6 = 0; + t7 = rgb1.alphaOrNull; + if (t7 == null) + t7 = 0; + t8 = rgb2.alphaOrNull; + if (t8 == null) + t8 = 0; + return A.SassColor_SassColor$rgbInternal0(t1 * weight1 + t2 * weight2, t3 * weight1 + t4 * weight2, t5 * weight1 + t6 * weight2, t7 * weightScale + t8 * (1 - weightScale), null); + }, + _opacify0($name, $arguments) { + var result, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0($name + string$.x28__is_oa, null)); + t1 = color.alphaOrNull; + if (t1 == null) + t1 = 0; + t1 += amount.valueInRangeWithUnit$4(0, 1, "amount", ""); + result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + A.warnForDeprecation0($name + "() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_hJG); + return result; + }, + _transparentize0($name, $arguments) { + var result, + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0($name + string$.x28__is_oa, null)); + t1 = color.alphaOrNull; + if (t1 == null) + t1 = 0; + t1 -= amount.valueInRangeWithUnit$4(0, 1, "amount", ""); + result = color.changeAlpha$1(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1)); + A.warnForDeprecation0($name + "() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, "alpha") + string$.x0a_Morex3ac, B.Deprecation_hJG); + return result; + }, + _colorInSpace0(colorUntyped, spaceUntyped, legacyMissing) { + var t1, _s5_ = "space", + color = colorUntyped.assertColor$1("color"); + if (spaceUntyped.$eq(0, B.C__SassNull0)) + return color; + t1 = spaceUntyped.assertString$1(_s5_); + t1.assertUnquoted$1(_s5_); + return color.toSpace$2$legacyMissing(A.ColorSpace_fromName0(t1._string0$_text, _s5_), legacyMissing); + }, + _parseChannels0(functionName, input, $name, space) { + var parsedSlash, components, alphaValue, _2_0, _2_1, _2_5, t1, t2, _2_6, _2_6_isSet, channels, first, rest, componentList, spaceName, i, channel, channelName, t3, t4, _null = null; + if (input.get$isSpecialVariable()) + return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + parsedSlash = A._parseSlashChannels0(input, $name); + if (parsedSlash == null) + return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + components = parsedSlash._0; + alphaValue = parsedSlash._1; + $label0$0: { + _2_0 = components.assertCommonListStyle$2$allowSlash($name, false); + _2_1 = _2_0.length; + if (_2_1 <= 0) + throw A.wrapException(A.SassScriptException$0("Color component list may not be empty.", $name)); + _2_5 = _2_1 >= 1; + t1 = _2_5; + t2 = false; + if (t1) { + _2_6 = _2_0[0]; + if (_2_6 instanceof A.SassString0) { + type$.SassString_2._as(_2_6); + t1 = !_2_6._string0$_hasQuotes && _2_6._string0$_text.toLowerCase() === "from"; + } else + t1 = t2; + _2_6_isSet = true; + } else { + t1 = t2; + _2_6 = _null; + _2_6_isSet = false; + } + if (t1) + return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + t1 = components.get$isSpecialVariable(); + if (t1) { + channels = A._setArrayType([components], type$.JSArray_Value_2); + break $label0$0; + } + channels = _null; + if (_2_5) { + first = _2_6_isSet ? _2_6 : _2_0[0]; + rest = B.JSArray_methods.sublist$1(_2_0, 1); + componentList = _2_0; + t1 = true; + } else { + componentList = channels; + rest = componentList; + first = _null; + t1 = false; + } + if (t1) { + if (space == null) { + spaceName = first.assertString$1($name); + spaceName.assertUnquoted$1($name); + space = spaceName.get$isSpecialVariable() ? _null : A.ColorSpace_fromName0(spaceName._string0$_text, $name); + if (B.RgbColorSpace_i0P0 === space || B.HslColorSpace_JQ20 === space || B.HwbColorSpace_guQ0 === space || B.LabColorSpace_2nT0 === space || B.LchColorSpace_Bpv0 === space || B.OklabColorSpace_5400 === space || B.OklchColorSpace_9Gj0 === space) + throw A.wrapException(A.SassScriptException$0(string$.The_co + A.S(space) + ". Use the " + A.S(space) + "() function instead.", $name)); + channels = rest; + } else + channels = componentList; + for (i = 0; i < channels.length; ++i) { + channel = channels[i]; + t1 = false; + if (!channel.get$isSpecialNumber()) + if (!(channel instanceof A.SassNumber0)) + t1 = !(channel instanceof A.SassString0 && !channel._string0$_hasQuotes && channel._string0$_text.toLowerCase() === "none"); + if (t1) { + t1 = _null; + if (space == null) + channelName = t1; + else { + t2 = space._space$_channels; + t2 = i < 3 ? t2[i] : _null; + if (!(t2 == null)) + t1 = new A._parseChannels_closure1().call$1(t2.name); + channelName = t1; + } + if (channelName == null) + channelName = "channel " + (i + 1); + throw A.wrapException(A.SassScriptException$0("Expected " + channelName + " to be a number, was " + channel.toString$0(0) + ".", $name)); + } + } + break $label0$0; + } + throw A.wrapException("unreachable"); + } + t1 = alphaValue == null; + t2 = t1 ? _null : alphaValue.get$isSpecialNumber(); + if (t2 === true) { + if (channels.length === 3 && B.Set_9FDyj0.contains$1(0, space)) { + t1 = A.List_List$_of(channels, type$.Value_2); + alphaValue.toString; + t1.push(alphaValue); + t1 = A._functionString0(functionName, t1); + } else + t1 = A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + return t1; + } + $label1$1: { + if (t1) { + t2 = 1; + break $label1$1; + } + if (alphaValue instanceof A.SassString0 && !alphaValue._string0$_hasQuotes && "none" === alphaValue._string0$_text) { + t2 = _null; + break $label1$1; + } + t2 = A._percentageOrUnitless0(alphaValue.assertNumber$1($name), 1, "alpha"); + t2 = isNaN(t2) ? 0 : B.JSNumber_methods.clamp$2(t2, 0, 1); + break $label1$1; + } + if (space == null) + return A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + if (B.JSArray_methods.any$1(channels, new A._parseChannels_closure2())) { + if (channels.length === 3 && B.Set_9FDyj0.contains$1(0, space)) { + t2 = A.List_List$_of(channels, type$.Value_2); + if (!t1) + t2.push(alphaValue); + t1 = A._functionString0(functionName, t2); + } else + t1 = A._functionString0(functionName, A._setArrayType([input], type$.JSArray_Value_2)); + return t1; + } + if (channels.length !== 3) + throw A.wrapException(A.SassScriptException$0("The " + space.toString$0(0) + " color space has 3 channels but " + input.toString$0(0) + " has " + channels.length + ".", $name)); + t1 = channels[0]; + t1 = t1 instanceof A.SassNumber0 ? t1 : _null; + t3 = channels[1]; + t3 = t3 instanceof A.SassNumber0 ? t3 : _null; + t4 = channels[2]; + t4 = t4 instanceof A.SassNumber0 ? t4 : _null; + return A._colorFromChannels0(space, t1, t3, t4, t2, true, space === B.RgbColorSpace_i0P0); + }, + _parseSlashChannels0(input, $name) { + var _1_1, alphaValue, t1, components, _1_7, _1_8, _1_9, initial, t2, _1_8_isSet, _1_9_isSet, _0_0, _0_1, channel3, alpha, _1_16, _1_16_isSet, _1_9_isSet0, t3, _null = null, + _1_0 = input.assertCommonListStyle$2$allowSlash($name, true); + $label0$0: { + _1_1 = _1_0.length; + alphaValue = _null; + t1 = false; + if (_1_1 === 2) { + components = _1_0[0]; + alphaValue = _1_0[1]; + t1 = input.get$separator(input) === B.ListSeparator_Lul0; + } else + components = _null; + if (t1) { + t1 = new A._Record_2(components, alphaValue); + break $label0$0; + } + t1 = input.get$separator(input); + if (t1 === B.ListSeparator_Lul0) { + t1 = _1_0.length; + A.throwExpression(A.SassScriptException$0(string$.Only_2 + t1 + " " + A.pluralize0("was", t1, "were") + " passed.", $name)); + } + _1_7 = _1_1 >= 1; + t1 = _1_7; + _1_8 = _null; + _1_9 = _null; + initial = _null; + t2 = false; + if (t1) { + _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); + initial = _1_8; + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + if (t1 instanceof A.SassString0) { + type$.SassString_2._as(_1_9); + t1 = !_1_9._string0$_hasQuotes; + } else + t1 = t2; + _1_8_isSet = true; + _1_9_isSet = true; + } else { + t1 = t2; + _1_8_isSet = false; + _1_9_isSet = false; + } + if (t1) { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + } + _0_0 = type$.SassString_2._as(t1)._string0$_text.split("/"); + $label1$1: { + _0_1 = _0_0.length; + if (_0_1 === 1) { + t1 = new A._Record_2(input, _null); + break $label1$1; + } + if (_0_1 === 2) { + channel3 = _0_0[0]; + alpha = _0_0[1]; + t1 = A.List_List$_of(initial, type$.Value_2); + t1.push(A._parseNumberOrString0(channel3)); + t1 = new A._Record_2(A.SassList$0(t1, B.ListSeparator_SrV0, false), A._parseNumberOrString0(alpha)); + break $label1$1; + } + t1 = _null; + break $label1$1; + } + break $label0$0; + } + _1_16 = _null; + _1_16_isSet = false; + t1 = false; + if (_1_7) { + _1_9_isSet0 = true; + if (_1_8_isSet) + initial = _1_8; + else { + _1_8 = B.JSArray_methods.sublist$2(_1_0, 0, _1_1 - 1); + initial = _1_8; + } + if (_1_9_isSet) + t2 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + _1_9_isSet = _1_9_isSet0; + } + _1_16_isSet = t2 instanceof A.SassNumber0; + if (_1_16_isSet) { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + _1_9_isSet = _1_9_isSet0; + } + _1_16 = type$.SassNumber_2._as(t1).asSlash; + t1 = _1_16; + t1 = type$.Record_2_nullable_Object_and_nullable_Object._is(t1); + } + } else + initial = _null; + if (t1) { + if (_1_16_isSet) + t1 = _1_16; + else { + if (_1_9_isSet) + t1 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t1 = _1_9; + _1_9_isSet = true; + } + _1_16 = type$.SassNumber_2._as(t1).asSlash; + t1 = _1_16; + _1_16_isSet = true; + } + if (t1 == null) + t1 = type$.Record_2_nullable_Object_and_nullable_Object._as(t1); + if (_1_16_isSet) + t2 = _1_16; + else { + if (_1_9_isSet) + t2 = _1_9; + else { + _1_9 = _1_0[_1_1 - 1]; + t2 = _1_9; + } + _1_16 = type$.SassNumber_2._as(t2).asSlash; + t2 = _1_16; + } + if (t2 == null) + t2 = type$.Record_2_nullable_Object_and_nullable_Object._as(t2); + t3 = A.List_List$_of(initial, type$.Value_2); + t3.push(t1._0); + t1 = new A._Record_2(A.SassList$0(t3, B.ListSeparator_SrV0, false), t2._1); + break $label0$0; + } + t1 = new A._Record_2(input, _null); + break $label0$0; + } + return t1; + }, + _parseNumberOrString0(text) { + var t1, expression, exception; + try { + t1 = A.ScssParser$0(text, false, null); + expression = t1._stylesheet0$_parseSingleProduction$1$1(t1.get$_stylesheet0$_number(), type$.NumberExpression_2); + t1 = A.SassNumber_SassNumber0(expression.value, expression.unit); + return t1; + } catch (exception) { + if (type$.SassFormatException_2._is(A.unwrapException(exception))) + return new A.SassString0(text, false); + else + throw exception; + } + }, + _colorFromChannels0(space, channel0, channel1, channel2, alpha, clamp, fromRgbFunction) { + var t1, t2, whiteness, blackness, t3; + switch (space) { + case B.HslColorSpace_JQ20: + if (channel1 != null) + A._checkPercent0(channel1, "saturation"); + if (channel2 != null) + A._checkPercent0(channel2, "lightness"); + t1 = space._space$_channels; + return A.SassColor_SassColor$hsl0(A.NullableExtension_andThen0(channel0, new A._colorFromChannels_closure1()), A._channelFromValue0(t1[1], A._forcePercent0(channel1), clamp), A._channelFromValue0(t1[2], A._forcePercent0(channel2), clamp), alpha); + case B.HwbColorSpace_guQ0: + t1 = channel1 == null; + if (!t1) + channel1.assertUnit$2("%", "whiteness"); + t2 = channel2 == null; + if (!t2) + channel2.assertUnit$2("%", "blackness"); + whiteness = t1 ? null : channel1._number1$_value; + blackness = t2 ? null : channel2._number1$_value; + if (whiteness != null && blackness != null && whiteness + blackness > 100) { + t1 = whiteness + blackness; + whiteness = whiteness / t1 * 100; + blackness = blackness / t1 * 100; + } + return A.SassColor_SassColor$hwb0(A.NullableExtension_andThen0(channel0, new A._colorFromChannels_closure2()), whiteness, blackness, alpha); + case B.RgbColorSpace_i0P0: + t1 = space._space$_channels; + t2 = A._channelFromValue0(t1[0], channel0, clamp); + t3 = A._channelFromValue0(t1[1], channel1, clamp); + t1 = A._channelFromValue0(t1[2], channel2, clamp); + return A.SassColor_SassColor$rgbInternal0(t2, t3, t1, alpha, fromRgbFunction ? B.C__ColorFormatEnum0 : null); + default: + t1 = space._space$_channels; + return A.SassColor_SassColor$forSpaceInternal0(space, A._channelFromValue0(t1[0], channel0, clamp), A._channelFromValue0(t1[1], channel1, clamp), A._channelFromValue0(t1[2], channel2, clamp), alpha); + } + }, + _forcePercent0(number) { + var t1, _0_3; + $label0$0: { + if (number == null) { + t1 = null; + break $label0$0; + } + _0_3 = number.get$numeratorUnits(number); + if (_0_3.length === 1) + t1 = "%" === _0_3[0] && number.get$denominatorUnits(number).length <= 0; + else + t1 = false; + if (t1) { + t1 = number; + break $label0$0; + } + t1 = A.SassNumber_SassNumber0(number._number1$_value, "%"); + break $label0$0; + } + return t1; + }, + _channelFromValue0(channel, value, clamp) { + return A.NullableExtension_andThen0(value, new A._channelFromValue_closure0(channel, clamp)); + }, + _isNone0(value) { + return value instanceof A.SassString0 && !value._string0$_hasQuotes && value._string0$_text.toLowerCase() === "none"; + }, + _channelFunction0($name, space, getter, global, unit) { + return A.BuiltInCallable$function0($name, "$color", new A._channelFunction_closure0(getter, unit, global, $name, space), "sass:color"); + }, + _suggestScaleAndAdjust0(original, adjustment, channelName) { + var t2, oldValue, newValue, factor, t3, suggestion, + channel = channelName === "alpha" ? B.LinearChannel_XL80 : type$.LinearChannel_2._as(B.JSArray_methods.firstWhere$1(B.List_oAL0, new A._suggestScaleAndAdjust_closure0(channelName))), + t1 = channel === B.LinearChannel_XL80; + if (t1) { + t2 = original.alphaOrNull; + oldValue = t2 == null ? 0 : t2; + } else + oldValue = original.toSpace$1(B.HslColorSpace_JQ20).channel$1(0, channelName); + newValue = oldValue + adjustment; + if (adjustment !== 0) { + factor = A._Cell$(); + t2 = channel.max; + if (newValue > t2) + factor.__late_helper$_value = 1; + else { + t3 = channel.min; + if (newValue < t3) + factor.__late_helper$_value = -1; + else if (adjustment > 0) + factor.__late_helper$_value = adjustment / (t2 - oldValue); + else + factor.__late_helper$_value = (newValue - oldValue) / (oldValue - t3); + } + suggestion = "Suggestion" + ("s:\n\ncolor.scale($color, $" + channelName + ": " + A.serializeValue0(A.SassNumber_SassNumber0(factor._readLocal$0() * 100, "%"), false, true) + ")\n"); + } else + suggestion = "Suggestion:\n\n"; + return suggestion + ("color.adjust($color, $" + channelName + ": " + A.serializeValue0(A.SassNumber_SassNumber0(adjustment, t1 ? null : "%"), false, true) + ")"); + }, + _missingChannelError0(color, channel) { + return A.throwExpression(A.SassScriptException$0(string$.Becaus + color.toCssString$0() + ").", channel)); + }, + _channelName0(value) { + var t1 = value.assertString$1("channel"); + t1.assertQuoted$1("channel"); + return t1._string0$_text; + }, + _function12($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:color"); + }, + global_closure44: function global_closure44() { + }, + global_closure45: function global_closure45() { + }, + global_closure46: function global_closure46() { + }, + global_closure47: function global_closure47() { + }, + global_closure48: function global_closure48() { + }, + global_closure49: function global_closure49() { + }, + global_closure50: function global_closure50() { + }, + global_closure51: function global_closure51() { + }, + global_closure52: function global_closure52() { + }, + global_closure53: function global_closure53() { + }, + global_closure54: function global_closure54() { + }, + global_closure55: function global_closure55() { + }, + global_closure56: function global_closure56() { + }, + global_closure57: function global_closure57() { + }, + global_closure58: function global_closure58() { + }, + global_closure59: function global_closure59() { + }, + global_closure60: function global_closure60() { + }, + global_closure61: function global_closure61() { + }, + global_closure62: function global_closure62() { + }, + global_closure63: function global_closure63() { + }, + global_closure64: function global_closure64() { + }, + global_closure65: function global_closure65() { + }, + global_closure66: function global_closure66() { + }, + global_closure67: function global_closure67() { + }, + global_closure68: function global_closure68() { + }, + global_closure69: function global_closure69() { + }, + global_closure70: function global_closure70() { + }, + global_closure71: function global_closure71() { + }, + global_closure72: function global_closure72() { + }, + global_closure73: function global_closure73() { + }, + global_closure74: function global_closure74() { + }, + global_closure75: function global_closure75() { + }, + global_closure76: function global_closure76() { + }, + global_closure77: function global_closure77() { + }, + global_closure78: function global_closure78() { + }, + global_closure79: function global_closure79() { + }, + global__closure0: function global__closure0() { + }, + global_closure80: function global_closure80() { + }, + global_closure81: function global_closure81() { + }, + global_closure82: function global_closure82() { + }, + global_closure83: function global_closure83() { + }, + global_closure84: function global_closure84() { + }, + global_closure85: function global_closure85() { + }, + global_closure86: function global_closure86() { + }, + module_closure27: function module_closure27() { + }, + module_closure28: function module_closure28() { + }, + module_closure29: function module_closure29() { + }, + module_closure30: function module_closure30() { + }, + module_closure31: function module_closure31() { + }, + module_closure32: function module_closure32() { + }, + module_closure33: function module_closure33() { + }, + module_closure34: function module_closure34() { + }, + module_closure35: function module_closure35() { + }, + module_closure36: function module_closure36() { + }, + module_closure37: function module_closure37() { + }, + module_closure38: function module_closure38() { + }, + module_closure39: function module_closure39() { + }, + module_closure40: function module_closure40() { + }, + module__closure6: function module__closure6() { + }, + module_closure41: function module_closure41() { + }, + module_closure42: function module_closure42() { + }, + module_closure43: function module_closure43() { + }, + module_closure44: function module_closure44() { + }, + module_closure45: function module_closure45() { + }, + module_closure46: function module_closure46() { + }, + module_closure47: function module_closure47() { + }, + module_closure48: function module_closure48() { + }, + module__closure5: function module__closure5(t0) { + this.channelName = t0; + }, + module_closure49: function module_closure49() { + }, + module_closure_toXyzNoMissing0: function module_closure_toXyzNoMissing0() { + }, + module_closure50: function module_closure50() { + }, + _mix_closure0: function _mix_closure0() { + }, + _complement_closure0: function _complement_closure0() { + }, + _adjust_closure0: function _adjust_closure0() { + }, + _scale_closure0: function _scale_closure0() { + }, + _change_closure0: function _change_closure0() { + }, + _ieHexStr_closure0: function _ieHexStr_closure0() { + }, + _ieHexStr_closure_hexString0: function _ieHexStr_closure_hexString0() { + }, + _updateComponents_closure1: function _updateComponents_closure1(t0) { + this.originalColor = t0; + }, + _updateComponents_closure2: function _updateComponents_closure2(t0) { + this._box_0 = t0; + }, + _changeColor_closure0: function _changeColor_closure0(t0) { + this.alphaArg = t0; + }, + _adjustColor_closure0: function _adjustColor_closure0() { + }, + _functionString_closure0: function _functionString_closure0() { + }, + _removedColorFunction_closure0: function _removedColorFunction_closure0(t0, t1, t2) { + this.name = t0; + this.argument = t1; + this.negative = t2; + }, + _rgb_closure0: function _rgb_closure0() { + }, + _hsl_closure0: function _hsl_closure0() { + }, + _parseChannels_closure1: function _parseChannels_closure1() { + }, + _parseChannels_closure2: function _parseChannels_closure2() { + }, + _colorFromChannels_closure1: function _colorFromChannels_closure1() { + }, + _colorFromChannels_closure2: function _colorFromChannels_closure2() { + }, + _channelFromValue_closure0: function _channelFromValue_closure0(t0, t1) { + this.channel = t0; + this.clamp = t1; + }, + _channelFunction_closure0: function _channelFunction_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.getter = t0; + _.unit = t1; + _.global = t2; + _.name = t3; + _.space = t4; + }, + _suggestScaleAndAdjust_closure0: function _suggestScaleAndAdjust_closure0(t0) { + this.channelName = t0; + }, + _constructionSpace(options) { + var t1 = J.getInterceptor$x(options); + if (t1.get$space(options) != null) { + t1 = t1.get$space(options); + t1.toString; + return A.ColorSpace_fromName0(t1, null); + } + if (t1.get$red(options) != null) + return B.RgbColorSpace_i0P0; + if (t1.get$saturation(options) != null) + return B.HslColorSpace_JQ20; + if (t1.get$whiteness(options) != null) + return B.HwbColorSpace_guQ0; + throw A.wrapException("No color space found"); + }, + _toSpace($self, space) { + return $self.toSpace$1(A.ColorSpace_fromName0(space == null ? $self._color0$_space.name : space, null)); + }, + _checkNullAlphaDeprecation(options) { + var t1 = J.getInterceptor$x(options), + t2 = t1.get$alpha(options); + if (!A._asBool($.$get$_isUndefined().call$1(t2)) && t1.get$alpha(options) == null && t1.get$space(options) == null) + A.warnForDeprecationFromApi(string$.Passin_, B.Deprecation_ox0); + }, + colorClass_closure: function colorClass_closure() { + }, + colorClass__closure: function colorClass__closure() { + }, + colorClass__closure0: function colorClass__closure0() { + }, + colorClass__closure1: function colorClass__closure1() { + }, + colorClass__closure2: function colorClass__closure2() { + }, + colorClass__closure3: function colorClass__closure3() { + }, + colorClass__closure4: function colorClass__closure4() { + }, + colorClass__closure5: function colorClass__closure5() { + }, + colorClass__closure6: function colorClass__closure6() { + }, + colorClass__closure7: function colorClass__closure7() { + }, + colorClass__closure8: function colorClass__closure8() { + }, + colorClass___closure: function colorClass___closure(t0) { + this.key = t0; + }, + colorClass__closure_changedValue: function colorClass__closure_changedValue(t0, t1) { + this.color = t0; + this.options = t1; + }, + colorClass__closure9: function colorClass__closure9() { + }, + colorClass__closure10: function colorClass__closure10() { + }, + colorClass__closure11: function colorClass__closure11() { + }, + colorClass__closure12: function colorClass__closure12() { + }, + colorClass__closure13: function colorClass__closure13() { + }, + colorClass__closure14: function colorClass__closure14() { + }, + colorClass__closure15: function colorClass__closure15() { + }, + colorClass__closure16: function colorClass__closure16() { + }, + colorClass__closure17: function colorClass__closure17() { + }, + colorClass__closure18: function colorClass__closure18() { + }, + colorClass__closure19: function colorClass__closure19() { + }, + colorClass__closure20: function colorClass__closure20() { + }, + colorClass__closure21: function colorClass__closure21() { + }, + colorClass__closure22: function colorClass__closure22() { + }, + _Channels: function _Channels() { + }, + _ConstructionOptions: function _ConstructionOptions() { + }, + _ChannelOptions: function _ChannelOptions() { + }, + _ToGamutOptions: function _ToGamutOptions() { + }, + _InterpolationOptions: function _InterpolationOptions() { + }, + _NodeSassColor: function _NodeSassColor() { + }, + legacyColorClass_closure: function legacyColorClass_closure() { + }, + legacyColorClass__closure: function legacyColorClass__closure() { + }, + legacyColorClass_closure0: function legacyColorClass_closure0() { + }, + legacyColorClass_closure1: function legacyColorClass_closure1() { + }, + legacyColorClass_closure2: function legacyColorClass_closure2() { + }, + legacyColorClass_closure3: function legacyColorClass_closure3() { + }, + legacyColorClass_closure4: function legacyColorClass_closure4() { + }, + legacyColorClass_closure5: function legacyColorClass_closure5() { + }, + legacyColorClass_closure6: function legacyColorClass_closure6() { + }, + legacyColorClass_closure7: function legacyColorClass_closure7() { + }, + SassColor_SassColor$rgb0(red, green, blue, alpha) { + return A.SassColor_SassColor$rgbInternal0(red, green, blue, alpha, null); + }, + SassColor_SassColor$rgbInternal0(red, green, blue, alpha, format) { + var _null = null, + t1 = red == null ? _null : red, + t2 = green == null ? _null : green, + t3 = blue == null ? _null : blue; + return A.SassColor$_forSpace0(B.RgbColorSpace_i0P0, t1, t2, t3, alpha == null ? _null : alpha, format); + }, + SassColor_SassColor$hsl0(hue, saturation, lightness, alpha) { + var _null = null, + t1 = hue == null ? _null : hue, + t2 = saturation == null ? _null : saturation, + t3 = lightness == null ? _null : lightness; + return A.SassColor_SassColor$forSpaceInternal0(B.HslColorSpace_JQ20, t1, t2, t3, alpha == null ? _null : alpha); + }, + SassColor_SassColor$hwb0(hue, whiteness, blackness, alpha) { + var _null = null, + t1 = hue == null ? _null : hue, + t2 = whiteness == null ? _null : whiteness, + t3 = blackness == null ? _null : blackness; + return A.SassColor_SassColor$forSpaceInternal0(B.HwbColorSpace_guQ0, t1, t2, t3, alpha == null ? _null : alpha); + }, + SassColor_SassColor$forSpaceInternal0(space, channel0, channel1, channel2, alpha) { + var t1, t2, _null = null; + $label0$0: { + if (B.HslColorSpace_JQ20 === space) { + t1 = channel1 == null; + t2 = A.SassColor__normalizeHue0(channel0, !t1 && channel1 < 0 && !A.fuzzyEquals0(channel1, 0)); + t2 = A.SassColor$_forSpace0(space, t2, t1 ? _null : Math.abs(channel1), channel2, alpha, _null); + t1 = t2; + break $label0$0; + } + if (B.HwbColorSpace_guQ0 === space) { + t1 = A.SassColor$_forSpace0(space, A.SassColor__normalizeHue0(channel0, false), channel1, channel2, alpha, _null); + break $label0$0; + } + if (B.LchColorSpace_Bpv0 === space || B.OklchColorSpace_9Gj0 === space) { + t1 = channel1 == null; + t2 = t1 ? _null : Math.abs(channel1); + t2 = A.SassColor$_forSpace0(space, channel0, t2, A.SassColor__normalizeHue0(channel2, !t1 && channel1 < 0 && !A.fuzzyEquals0(channel1, 0)), alpha, _null); + t1 = t2; + break $label0$0; + } + t1 = A.SassColor$_forSpace0(space, channel0, channel1, channel2, alpha, _null); + break $label0$0; + } + return t1; + }, + SassColor$_forSpace0(_space, channel0OrNull, channel1OrNull, channel2OrNull, alpha, format) { + return new A.SassColor0(_space, channel0OrNull, channel1OrNull, channel2OrNull, format, A.NullableExtension_andThen0(alpha, new A.SassColor$_forSpace_closure0())); + }, + SassColor__normalizeHue0(hue, invert) { + var t1, t2; + if (hue == null) + return hue; + t1 = B.JSNumber_methods.$mod(hue, 360); + t2 = invert ? 180 : 0; + return B.JSNumber_methods.$mod(t1 + 360 + t2, 360); + }, + SassColor0: function SassColor0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._color0$_space = t0; + _.channel0OrNull = t1; + _.channel1OrNull = t2; + _.channel2OrNull = t3; + _.format = t4; + _.alphaOrNull = t5; + }, + SassColor$_forSpace_closure0: function SassColor$_forSpace_closure0() { + }, + _ColorFormatEnum0: function _ColorFormatEnum0() { + }, + SpanColorFormat0: function SpanColorFormat0(t0) { + this._color0$_span = t0; + }, + Combinator0: function Combinator0(t0, t1, t2) { + this._combinator0$_text = t0; + this.index = t1; + this._name = t2; + }, + ModifiableCssComment0: function ModifiableCssComment0(t0, t1) { + var _ = this; + _.text = t0; + _.span = t1; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + compile0(path, options) { + var color, ascii, logger, result, error, stackTrace, t1, color0, ascii0, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, exception, _null = null; + if (!A.isNodeJs()) + A.jsThrow(new self.Error("The compile() method is only available in Node.js.")); + t1 = options == null; + color0 = t1 ? _null : J.get$alertColor$x(options); + if (color0 == null) + color0 = A.hasTerminal0() || A.isBrowser(); + color = color0; + ascii0 = t1 ? _null : J.get$alertAscii$x(options); + ascii = ascii0 == null ? $._glyphs === B.C_AsciiGlyphSet : ascii0; + t2 = t1 ? _null : J.get$logger$x(options); + t3 = ascii; + if (t3 == null) + t3 = $._glyphs === B.C_AsciiGlyphSet; + logger = new A.JSToDartLogger(t2, new A.StderrLogger0(color), t3); + try { + t2 = t1 ? _null : J.get$loadPaths$x(options); + t3 = t1 ? _null : J.get$quietDeps$x(options); + if (t3 == null) + t3 = false; + t4 = A._parseOutputStyle0(t1 ? _null : J.get$style$x(options)); + t5 = t1 ? _null : J.get$verbose$x(options); + if (t5 == null) + t5 = false; + t6 = t1 ? _null : J.get$charset$x(options); + if (t6 == null) + t6 = true; + t7 = t1 ? _null : J.get$sourceMap$x(options); + if (t7 == null) + t7 = false; + if (t1) + t8 = _null; + else { + t8 = J.get$importers$x(options); + t8 = t8 == null ? _null : J.map$1$1$ax(t8, A.compile___parseImporter$closure(), type$.Importer); + } + t9 = A._parseFunctions0(t1 ? _null : J.get$functions$x(options), false); + t10 = t1 ? _null : J.get$fatalDeprecations$x(options); + t10 = A.parseDeprecations(logger, t10, true); + t11 = t1 ? _null : J.get$silenceDeprecations$x(options); + t11 = A.parseDeprecations(logger, t11, false); + t12 = t1 ? _null : J.get$futureDeprecations$x(options); + result = A.compile(path, t6, t10, new A.CastList(t9, A._arrayInstanceType(t9)._eval$1("CastList<1,Callable>")), A.parseDeprecations(logger, t12, false), A.ImportCache$0(t8, t2, _null), _null, _null, logger, _null, t3, t11, t7, t4, _null, true, t5); + t1 = t1 ? _null : J.get$sourceMapIncludeSources$x(options); + if (t1 == null) + t1 = false; + t1 = A._convertResult(result, t1); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwNodeException(error, ascii, color, stackTrace); + } else + throw exception; + } + }, + compileString0(text, options) { + var color, ascii, logger, result, error, stackTrace, ascii0, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, exception, _null = null, + t1 = options == null, + color0 = t1 ? _null : J.get$alertColor$x(options); + if (color0 == null) + color0 = A.hasTerminal0() || A.isBrowser(); + color = color0; + ascii0 = t1 ? _null : J.get$alertAscii$x(options); + ascii = ascii0 == null ? $._glyphs === B.C_AsciiGlyphSet : ascii0; + t2 = t1 ? _null : J.get$logger$x(options); + t3 = ascii; + if (t3 == null) + t3 = $._glyphs === B.C_AsciiGlyphSet; + logger = new A.JSToDartLogger(t2, new A.StderrLogger0(color), t3); + try { + t2 = A.parseSyntax(t1 ? _null : J.get$syntax$x(options)); + t3 = t1 ? _null : A.NullableExtension_andThen0(J.get$url$x(options), A.utils3__jsToDartUrl$closure()); + t4 = t1 ? _null : J.get$loadPaths$x(options); + t5 = t1 ? _null : J.get$quietDeps$x(options); + if (t5 == null) + t5 = false; + t6 = A._parseOutputStyle0(t1 ? _null : J.get$style$x(options)); + t7 = t1 ? _null : J.get$verbose$x(options); + if (t7 == null) + t7 = false; + t8 = t1 ? _null : J.get$charset$x(options); + if (t8 == null) + t8 = true; + t9 = t1 ? _null : J.get$sourceMap$x(options); + if (t9 == null) + t9 = false; + if (t1) + t10 = _null; + else { + t10 = J.get$importers$x(options); + t10 = t10 == null ? _null : J.map$1$1$ax(t10, A.compile___parseImporter$closure(), type$.Importer); + } + t11 = t1 ? _null : A.NullableExtension_andThen0(J.get$importer$x(options), A.compile___parseImporter$closure()); + if (t11 == null) + t11 = (t1 ? _null : J.get$url$x(options)) == null ? new A.NoOpImporter0() : _null; + t12 = A._parseFunctions0(t1 ? _null : J.get$functions$x(options), false); + t13 = t1 ? _null : J.get$fatalDeprecations$x(options); + t13 = A.parseDeprecations(logger, t13, true); + t14 = t1 ? _null : J.get$silenceDeprecations$x(options); + t14 = A.parseDeprecations(logger, t14, false); + t15 = t1 ? _null : J.get$futureDeprecations$x(options); + result = A.compileString(text, t8, t13, new A.CastList(t12, A._arrayInstanceType(t12)._eval$1("CastList<1,Callable>")), A.parseDeprecations(logger, t15, false), A.ImportCache$0(t10, t4, _null), t11, _null, _null, logger, _null, t5, t14, t9, t6, t2, t3, true, t7); + t1 = t1 ? _null : J.get$sourceMapIncludeSources$x(options); + if (t1 == null) + t1 = false; + t1 = A._convertResult(result, t1); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwNodeException(error, ascii, color, stackTrace); + } else + throw exception; + } + }, + compileAsync1(path, options) { + var t1, color, ascii; + if (!A.isNodeJs()) + A.jsThrow(new self.Error("The compileAsync() method is only available in Node.js.")); + t1 = options == null; + color = t1 ? null : J.get$alertColor$x(options); + if (color == null) + color = A.hasTerminal0() || A.isBrowser(); + ascii = t1 ? null : J.get$alertAscii$x(options); + if (ascii == null) + ascii = $._glyphs === B.C_AsciiGlyphSet; + t1 = t1 ? null : J.get$logger$x(options); + return A._wrapAsyncSassExceptions(A.futureToPromise0(new A.compileAsync_closure(path, color, options, new A.JSToDartLogger(t1, new A.StderrLogger0(color), ascii)).call$0()), ascii, color); + }, + compileStringAsync1(text, options) { + var ascii, + t1 = options == null, + color = t1 ? null : J.get$alertColor$x(options); + if (color == null) + color = A.hasTerminal0() || A.isBrowser(); + ascii = t1 ? null : J.get$alertAscii$x(options); + if (ascii == null) + ascii = $._glyphs === B.C_AsciiGlyphSet; + t1 = t1 ? null : J.get$logger$x(options); + return A._wrapAsyncSassExceptions(A.futureToPromise0(new A.compileStringAsync_closure(text, options, color, new A.JSToDartLogger(t1, new A.StderrLogger0(color), ascii)).call$0()), ascii, color); + }, + _convertResult(result, includeSourceContents) { + var loadedUrls, + t1 = result._compile_result$_serialize, + t2 = t1._1, + sourceMap = t2 == null ? null : t2.toJson$1$includeSourceContents(includeSourceContents); + if (type$.Map_dynamic_dynamic._is(sourceMap) && !sourceMap.containsKey$1("sources")) + sourceMap.$indexSet(0, "sources", A._setArrayType([], type$.JSArray_String)); + loadedUrls = A.toJSArray(result._evaluate._0.map$1$1(0, A.utils3__dartToJSUrl$closure(), type$.nullable_Object)); + t1 = t1._0; + return sourceMap == null ? {css: t1, loadedUrls: loadedUrls} : {css: t1, sourceMap: A.jsify0(sourceMap), loadedUrls: loadedUrls}; + }, + _wrapAsyncSassExceptions(promise, ascii, color) { + return J.then$2$x(promise, null, A.allowInterop(new A._wrapAsyncSassExceptions_closure(color, ascii))); + }, + _parseOutputStyle0(style) { + var t1; + $label0$0: { + if (style == null || "expanded" === style) { + t1 = B.OutputStyle_00; + break $label0$0; + } + if ("compressed" === style) { + t1 = B.OutputStyle_10; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('Unknown output style "' + style + '".')); + } + return t1; + }, + _parseAsyncImporter(importer) { + var t1, canonicalize, load, _0_0; + if (importer instanceof A.NodePackageImporter0) + return importer; + if (importer == null) + A.jsThrow(new self.Error("Importers may not be null.")); + type$.JSImporter._as(importer); + t1 = J.getInterceptor$x(importer); + canonicalize = t1.get$canonicalize(importer); + load = t1.get$load(importer); + _0_0 = t1.get$findFileUrl(importer); + if (_0_0 != null) + if (canonicalize != null || load != null) + A.jsThrow(new self.Error(string$.An_impa)); + else + return new A.JSToDartAsyncFileImporter(_0_0); + else if (canonicalize == null || load == null) + A.jsThrow(new self.Error(string$.An_impu)); + else { + t1 = A._normalizeNonCanonicalSchemes(t1.get$nonCanonicalScheme(importer)); + t1 = t1 == null ? B.Set_empty1 : A.Set_Set$unmodifiable(t1, type$.String); + t1.forEach$1(0, A.utils4__validateUrlScheme$closure()); + return new A.JSToDartAsyncImporter(canonicalize, load, t1); + } + }, + _parseImporter0(importer) { + var t1, canonicalize, load, _0_0; + if (importer instanceof A.NodePackageImporter0) + return importer; + if (importer == null) + A.jsThrow(new self.Error("Importers may not be null.")); + type$.JSImporter._as(importer); + t1 = J.getInterceptor$x(importer); + canonicalize = t1.get$canonicalize(importer); + load = t1.get$load(importer); + _0_0 = t1.get$findFileUrl(importer); + if (_0_0 != null) + if (canonicalize != null || load != null) + A.jsThrow(new self.Error(string$.An_impa)); + else + return new A.JSToDartFileImporter(_0_0); + else if (canonicalize == null || load == null) + A.jsThrow(new self.Error(string$.An_impu)); + else { + t1 = A._normalizeNonCanonicalSchemes(t1.get$nonCanonicalScheme(importer)); + t1 = t1 == null ? B.Set_empty1 : A.Set_Set$unmodifiable(t1, type$.String); + t1.forEach$1(0, A.utils4__validateUrlScheme$closure()); + return new A.JSToDartImporter(canonicalize, load, t1); + } + }, + _normalizeNonCanonicalSchemes(schemes) { + var t1; + $label0$0: { + if (typeof schemes == "string") { + t1 = A._setArrayType([schemes], type$.JSArray_String); + break $label0$0; + } + if (type$.List_dynamic._is(schemes)) { + t1 = J.cast$1$0$ax(schemes, type$.String); + break $label0$0; + } + if (schemes == null) { + t1 = null; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('nonCanonicalScheme must be a string or list of strings, was "' + A.S(schemes) + '"')); + } + return t1; + }, + _simplifyValue(value) { + var _0_1, t1, t2, _0_4, _0_3, _0_7, _0_5, _0_40, _0_8, _0_8_isSet, _0_7_isSet, _0_5_isSet, _0_4_isSet, first, _0_10, min, _null = null; + $label1$1: { + if (value instanceof A.SassCalculation0) { + _0_1 = value.name; + t1 = value.$arguments; + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>"); + _0_4 = A.List_List$_of(new A.MappedListIterable(t1, A.compile___simplifyCalcArg$closure(), t2), t2._eval$1("ListIterable.E")); + $label0$0: { + _0_3 = "calc" === _0_1; + t1 = _0_3; + _0_7 = _null; + _0_5 = _null; + _0_40 = _null; + _0_8 = _null; + _0_8_isSet = false; + t2 = false; + if (t1) { + _0_5 = _0_4.length; + t1 = _0_5; + _0_7 = t1 === 1; + t1 = _0_7; + _0_40 = _0_4; + if (t1) { + _0_8 = _0_40[0]; + t1 = _0_8; + t1 = t1 instanceof A.Value0; + _0_8_isSet = true; + } else + t1 = t2; + _0_7_isSet = true; + _0_5_isSet = true; + _0_4_isSet = true; + } else { + t1 = t2; + _0_7_isSet = false; + _0_5_isSet = false; + _0_4_isSet = false; + } + if (t1) { + if (_0_8_isSet) + t1 = _0_8; + else { + _0_8 = (_0_4_isSet ? _0_40 : _0_4)[0]; + t1 = _0_8; + } + type$.Value_2._as(t1); + break $label0$0; + } + if (_0_3) + if (_0_7_isSet) + t1 = _0_7; + else { + if (_0_5_isSet) + t1 = _0_5; + else { + if (_0_4_isSet) + t1 = _0_40; + else { + t1 = _0_4; + _0_40 = t1; + _0_4_isSet = true; + } + _0_5 = t1.length; + t1 = _0_5; + _0_5_isSet = true; + } + _0_7 = t1 === 1; + t1 = _0_7; + } + else + t1 = false; + if (t1) { + if (_0_8_isSet) + first = _0_8; + else { + _0_8 = (_0_4_isSet ? _0_40 : _0_4)[0]; + first = _0_8; + } + t1 = A.SassCalculation_calc0(first); + break $label0$0; + } + if (_0_3) + A.throwExpression(A.ArgumentError$("calc() requires exactly one argument.", _null)); + _0_10 = "clamp" === _0_1; + t1 = _0_10; + if (t1) { + if (_0_5_isSet) + t1 = _0_5; + else { + if (_0_4_isSet) + t1 = _0_40; + else { + t1 = _0_4; + _0_40 = t1; + _0_4_isSet = true; + } + _0_5 = t1.length; + t1 = _0_5; + } + t1 = t1 === 3; + } else + t1 = false; + if (t1) { + if (_0_8_isSet) + min = _0_8; + else { + if (_0_4_isSet) + t1 = _0_40; + else { + t1 = _0_4; + _0_40 = t1; + _0_4_isSet = true; + } + _0_8 = t1[0]; + min = _0_8; + } + if (_0_4_isSet) + t1 = _0_40; + else { + t1 = _0_4; + _0_40 = t1; + _0_4_isSet = true; + } + value = t1[1]; + t1 = A.SassCalculation_clamp0(min, value, (_0_4_isSet ? _0_40 : _0_4)[2]); + break $label0$0; + } + if (_0_10) + A.throwExpression(A.ArgumentError$("clamp() requires exactly 3 arguments.", _null)); + if ("min" === _0_1) { + t1 = A.SassCalculation_min0(_0_4_isSet ? _0_40 : _0_4); + break $label0$0; + } + if ("max" === _0_1) { + t1 = A.SassCalculation_max0(_0_4_isSet ? _0_40 : _0_4); + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$('"' + _0_1 + '" is not a recognized calculation type.', _null)); + } + break $label1$1; + } + t1 = value; + break $label1$1; + } + return t1; + }, + _simplifyCalcArg(value) { + var t1; + $label0$0: { + if (value instanceof A.SassCalculation0) { + t1 = A._simplifyValue(value); + break $label0$0; + } + if (value instanceof A.CalculationOperation0) { + t1 = A.SassCalculation_operateInternal0(value._calculation0$_operator, A._simplifyCalcArg(value._calculation0$_left), A._simplifyCalcArg(value._calculation0$_right), null, true, null); + break $label0$0; + } + t1 = value; + break $label0$0; + } + return t1; + }, + _parseFunctions0(functions, asynch) { + var result; + if (functions == null) + return B.List_empty29; + result = A._setArrayType([], type$.JSArray_AsyncCallable_2); + A.jsForEach(functions, new A._parseFunctions_closure0(asynch, result)); + return result; + }, + compileAsync_closure: function compileAsync_closure(t0, t1, t2, t3) { + var _ = this; + _.path = t0; + _.color = t1; + _.options = t2; + _.logger = t3; + }, + compileAsync__closure: function compileAsync__closure() { + }, + compileStringAsync_closure: function compileStringAsync_closure(t0, t1, t2, t3) { + var _ = this; + _.text = t0; + _.options = t1; + _.color = t2; + _.logger = t3; + }, + compileStringAsync__closure: function compileStringAsync__closure() { + }, + compileStringAsync__closure0: function compileStringAsync__closure0() { + }, + _wrapAsyncSassExceptions_closure: function _wrapAsyncSassExceptions_closure(t0, t1) { + this.color = t0; + this.ascii = t1; + }, + _parseFunctions_closure0: function _parseFunctions_closure0(t0, t1) { + this.asynch = t0; + this.result = t1; + }, + _parseFunctions__closure2: function _parseFunctions__closure2(t0, t1) { + this.callback = t0; + this.callable = t1; + }, + _parseFunctions___closure6: function _parseFunctions___closure6(t0, t1) { + this.callback = t0; + this.$arguments = t1; + }, + _parseFunctions__closure3: function _parseFunctions__closure3(t0, t1) { + this.callback = t0; + this.callable = t1; + }, + _parseFunctions___closure5: function _parseFunctions___closure5(t0, t1) { + this.callback = t0; + this.$arguments = t1; + }, + nodePackageImporterClass_closure: function nodePackageImporterClass_closure() { + }, + nodePackageImporterClass__closure: function nodePackageImporterClass__closure() { + }, + compile(path, charset, fatalDeprecations, functions, futureDeprecations, importCache, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, useSpaces, verbose) { + var t3, t4, t0, stylesheet, result, _null = null, + t1 = type$.Deprecation_3, + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + t1 = nodeImporter == null; + if (t1) + t2 = syntax == null || syntax === A.Syntax_forPath0(path); + else + t2 = false; + if (t2) { + if (importCache == null) + importCache = A.ImportCache$none(); + t2 = $.$get$FilesystemImporter_cwd0(); + t3 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t3 == null ? _null : J.get$platform$x(t3), "win32")) { + t3 = A.isNodeJs() ? self.process : _null; + t3 = J.$eq$(t3 == null ? _null : J.get$platform$x(t3), "darwin"); + } else + t3 = true; + if (t3) { + t3 = A.absolute(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + t4 = $.$get$context(); + t3 = A._realCasePath0(t4.normalize$1(t3)); + } else { + t3 = $.$get$context(); + t4 = t3.canonicalize$1(0, path); + t0 = t4; + t4 = t3; + t3 = t0; + } + t4 = importCache.importCanonical$3$originalUrl(t2, t4.toUri$1(t3), t4.toUri$1(path)); + t4.toString; + stylesheet = t4; + } else { + t2 = A.readFile0(path); + t3 = syntax == null ? A.Syntax_forPath0(path) : syntax; + stylesheet = A.Stylesheet_Stylesheet$parse0(t2, t3, false, $.$get$context().toUri$1(path)); + } + result = A._compileStylesheet1(stylesheet, logger, importCache, nodeImporter, $.$get$FilesystemImporter_cwd0(), functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset); + logger.summarize$1$js(!t1); + return result; + }, + compileString(source, charset, fatalDeprecations, functions, futureDeprecations, importCache, importer, indentWidth, lineFeed, logger, nodeImporter, quietDeps, silenceDeprecations, sourceMap, style, syntax, url, useSpaces, verbose) { + var t3, t4, stylesheet, _0_0, result, + t1 = type$.Deprecation_3, + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (silenceDeprecations != null) + t2.addAll$1(0, silenceDeprecations); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (fatalDeprecations != null) + t3.addAll$1(0, fatalDeprecations); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + if (futureDeprecations != null) + t4.addAll$1(0, futureDeprecations); + logger = new A.DeprecationProcessingLogger0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.int), logger, t2, t3, t4, !verbose); + logger.validate$0(); + stylesheet = A.Stylesheet_Stylesheet$parse0(source, syntax == null ? B.Syntax_SCSS_0_scss0 : syntax, false, url); + t1 = stylesheet.span; + _0_0 = t1.get$sourceUrl(t1); + if (type$.Uri._is(_0_0) && "" === _0_0.get$scheme() && nodeImporter == null) + A.WarnForDeprecation_warnForDeprecation0(logger, B.Deprecation_y9Y, "Passing a relative `url` argument (" + A.S(t1.get$sourceUrl(t1)) + string$.x29x20to_cm, null, null); + if (importer == null) + t1 = A.isBrowser() ? new A.NoOpImporter0() : $.$get$FilesystemImporter_cwd0(); + else + t1 = importer; + result = A._compileStylesheet1(stylesheet, logger, importCache, nodeImporter, t1, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset); + logger.summarize$1$js(nodeImporter != null); + return result; + }, + _compileStylesheet1(stylesheet, logger, importCache, nodeImporter, importer, functions, style, useSpaces, indentWidth, lineFeed, quietDeps, sourceMap, charset) { + var evaluateResult, serializeResult, resultSourceMap; + if (nodeImporter != null) + A.WarnForDeprecation_warnForDeprecation0(logger, B.Deprecation_PGp, string$.The_le, null, null); + evaluateResult = A._EvaluateVisitor$1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap).run$2(0, importer, stylesheet); + serializeResult = A.serialize0(evaluateResult._1, charset, indentWidth, false, lineFeed, logger, sourceMap, style, useSpaces); + resultSourceMap = serializeResult._1; + if (resultSourceMap != null && importCache != null) + A.mapInPlace0(resultSourceMap.urls, new A._compileStylesheet_closure1(stylesheet, importCache)); + return new A.CompileResult0(evaluateResult, serializeResult); + }, + _compileStylesheet_closure1: function _compileStylesheet_closure1(t0, t1) { + this.stylesheet = t0; + this.importCache = t1; + }, + CompileOptions: function CompileOptions() { + }, + CompileStringOptions: function CompileStringOptions() { + }, + NodeCompileResult: function NodeCompileResult() { + }, + CompileResult0: function CompileResult0(t0, t1) { + this._evaluate = t0; + this._compile_result$_serialize = t1; + }, + initCompiler() { + return new A.Compiler(); + }, + initAsyncCompiler() { + return A.futureToPromise0(new A.initAsyncCompiler_closure().call$0()); + }, + Compiler: function Compiler() { + this._disposed = false; + }, + AsyncCompiler: function AsyncCompiler(t0) { + this.compilations = t0; + this._disposed = false; + }, + AsyncCompiler_addCompilation_closure: function AsyncCompiler_addCompilation_closure() { + }, + compilerClass_closure: function compilerClass_closure() { + }, + compilerClass__closure: function compilerClass__closure() { + }, + compilerClass__closure0: function compilerClass__closure0() { + }, + compilerClass__closure1: function compilerClass__closure1() { + }, + compilerClass__closure2: function compilerClass__closure2() { + }, + asyncCompilerClass_closure: function asyncCompilerClass_closure() { + }, + asyncCompilerClass__closure: function asyncCompilerClass__closure() { + }, + asyncCompilerClass__closure0: function asyncCompilerClass__closure0() { + }, + asyncCompilerClass__closure1: function asyncCompilerClass__closure1() { + }, + asyncCompilerClass__closure2: function asyncCompilerClass__closure2() { + }, + asyncCompilerClass___closure: function asyncCompilerClass___closure(t0) { + this.self = t0; + }, + initAsyncCompiler_closure: function initAsyncCompiler_closure() { + }, + InterpolatedComplexSelector$(components, span, leadingCombinator) { + var t1 = A.List_List$unmodifiable(components, type$.InterpolatedComplexSelectorComponent); + if (leadingCombinator == null && t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty if leadingCombinator is null.", null)); + return new A.InterpolatedComplexSelector(leadingCombinator, t1, span); + }, + InterpolatedComplexSelector: function InterpolatedComplexSelector(t0, t1, t2) { + this.leadingCombinator = t0; + this.components = t1; + this.span = t2; + }, + ComplexSassNumber0: function ComplexSassNumber0(t0, t1, t2, t3) { + var _ = this; + _._complex0$_numeratorUnits = t0; + _._complex0$_denominatorUnits = t1; + _._number1$_value = t2; + _.hashCache = null; + _.asSlash = t3; + }, + ComplexSelector$0(leadingCombinators, components, span, lineBreak) { + var t1 = A.List_List$unmodifiable(leadingCombinators, type$.CssValue_Combinator_2), + t2 = A.List_List$unmodifiable(components, type$.ComplexSelectorComponent_2); + if (t1.length === 0 && t2.length === 0) + A.throwExpression(A.ArgumentError$(string$.leadin, null)); + return new A.ComplexSelector0(t1, t2, lineBreak, span); + }, + ComplexSelector0: function ComplexSelector0(t0, t1, t2, t3) { + var _ = this; + _.leadingCombinators = t0; + _.components = t1; + _.lineBreak = t2; + _._complex$__ComplexSelector_specificity_FI = $; + _.span = t3; + }, + ComplexSelector_specificity_closure0: function ComplexSelector_specificity_closure0() { + }, + InterpolatedComplexSelectorComponent: function InterpolatedComplexSelectorComponent(t0, t1, t2) { + this.selector = t0; + this.combinator = t1; + this.span = t2; + }, + ComplexSelectorComponent0: function ComplexSelectorComponent0(t0, t1, t2) { + this.selector = t0; + this.combinators = t1; + this.span = t2; + }, + ComplexSelectorComponent_toString_closure0: function ComplexSelectorComponent_toString_closure0() { + }, + InterpolatedCompoundSelector$(components) { + var t1 = A.List_List$unmodifiable(components, type$.InterpolatedSimpleSelector); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.InterpolatedCompoundSelector(t1); + }, + InterpolatedCompoundSelector: function InterpolatedCompoundSelector(t0) { + this.components = t0; + }, + CompoundSelector$0(components, span) { + var t1 = A.List_List$unmodifiable(components, type$.SimpleSelector_2); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.CompoundSelector0(t1, span); + }, + CompoundSelector0: function CompoundSelector0(t0, t1) { + var _ = this; + _.components = t0; + _._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = _._compound$__CompoundSelector_specificity_FI = $; + _.span = t1; + }, + CompoundSelector_specificity_closure0: function CompoundSelector_specificity_closure0() { + }, + CompoundSelector_hasComplicatedSuperselectorSemantics_closure0: function CompoundSelector_hasComplicatedSuperselectorSemantics_closure0() { + }, + Configuration0: function Configuration0(t0, t1) { + this._configuration0$_values = t0; + this._configuration0$__originalConfiguration = t1; + }, + ExplicitConfiguration0: function ExplicitConfiguration0(t0, t1, t2) { + this.nodeWithSpan = t0; + this._configuration0$_values = t1; + this._configuration0$__originalConfiguration = t2; + }, + ConfiguredValue0: function ConfiguredValue0(t0, t1, t2) { + this.value = t0; + this.configurationSpan = t1; + this.assignmentNode = t2; + }, + ConfiguredVariable0: function ConfiguredVariable0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.expression = t1; + _.isGuarded = t2; + _.span = t3; + }, + ContentBlock$0(parameters, children, span) { + var _s8_ = "@content", + t1 = A.stringReplaceAllUnchecked(_s8_, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.ContentBlock0(t1, _s8_, parameters, span, t2, t3); + }, + ContentBlock0: function ContentBlock0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.originalName = t1; + _.parameters = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + ContentRule0: function ContentRule0(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + _disallowedFunctionNames_closure0: function _disallowedFunctionNames_closure0() { + }, + CssParser0: function CssParser0(t0, t1, t2, t3, t4) { + var _ = this; + _._parseSelectors = t0; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inPlainCssFunction = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t1; + _.warnings = t2; + _.lastSilentComment = null; + _.scanner = t3; + _._parser1$_interpolationMap = t4; + }, + DebugRule0: function DebugRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + ModifiableCssDeclaration$0($name, value, span, parsedAsSassScript, valueSpanForMap) { + var t2, + t1 = valueSpanForMap == null ? value.span : valueSpanForMap; + if (!parsedAsSassScript) { + t2 = value.value; + if (!(t2 instanceof A.SassString0)) + A.throwExpression(A.ArgumentError$(string$.If_par + value.toString$0(0) + "` of type " + A.getRuntimeTypeOfDartObject(t2).toString$0(0) + ").", null)); + } + return new A.ModifiableCssDeclaration0($name, value, parsedAsSassScript, t1, span); + }, + ModifiableCssDeclaration0: function ModifiableCssDeclaration0(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.value = t1; + _.parsedAsSassScript = t2; + _.valueSpanForMap = t3; + _.span = t4; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + Declaration$0($name, value, span) { + return new A.Declaration0($name, value, span, true, null, false); + }, + Declaration$notSassScript0($name, value, span) { + return new A.Declaration0($name, value, span, false, null, false); + }, + Declaration$nested0($name, children, span, value) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.Declaration0($name, value, span, true, t1, t2); + }, + Declaration0: function Declaration0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.value = t1; + _.span = t2; + _.parsedAsSassScript = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + SupportsDeclaration0: function SupportsDeclaration0(t0, t1, t2) { + this.name = t0; + this.value = t1; + this.span = t2; + }, + DefaultLogger0: function DefaultLogger0() { + }, + Deprecation_fromId0(id) { + return A.IterableExtension_firstWhereOrNull(B.List_JA2, new A.Deprecation_fromId_closure0(id)); + }, + Deprecation_forVersion0(version) { + var t2, _i, deprecation, $self, t3, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation_3); + for (t2 = A.VersionRange_VersionRange(true, version).get$allows(), _i = 0; _i < 31; ++_i) { + deprecation = B.List_JA2[_i]; + $self = deprecation._deprecation$_deprecatedIn; + t3 = $self == null ? null : A.Version___parse_tearOff($self); + t3 = t3 == null ? null : t2.call$1(t3); + if (t3 == null ? false : t3) { + $self = deprecation._deprecation$_obsoleteIn; + if ($self == null) + t3 = null; + else + t3 = A.Version___parse_tearOff($self); + t3 = t3 == null; + } else + t3 = false; + if (t3) + t1.add$1(0, deprecation); + } + return t1; + }, + Deprecation0: function Deprecation0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.id = t0; + _._deprecation$_deprecatedIn = t1; + _.description = t2; + _._deprecation$_obsoleteIn = t3; + _.index = t4; + _._name = t5; + }, + Deprecation_fromId_closure0: function Deprecation_fromId_closure0(t0) { + this.id = t0; + }, + DeprecationProcessingLogger0: function DeprecationProcessingLogger0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._deprecation_processing$_warningCounts = t0; + _._deprecation_processing$_inner = t1; + _.silenceDeprecations = t2; + _.fatalDeprecations = t3; + _.futureDeprecations = t4; + _.limitRepetition = t5; + }, + DeprecationProcessingLogger_summarize_closure1: function DeprecationProcessingLogger_summarize_closure1() { + }, + DeprecationProcessingLogger_summarize_closure2: function DeprecationProcessingLogger_summarize_closure2() { + }, + parseDeprecations(logger, deprecations, supportVersions) { + if (deprecations == null) + return null; + return new A.parseDeprecations_closure(deprecations, logger, supportVersions).call$0(); + }, + Deprecation1: function Deprecation1() { + }, + deprecations_closure: function deprecations_closure(t0) { + this.deprecation = t0; + }, + parseDeprecations_closure: function parseDeprecations_closure(t0, t1, t2) { + this.deprecations = t0; + this.logger = t1; + this.supportVersions = t2; + }, + versionClass_closure: function versionClass_closure() { + }, + versionClass__closure: function versionClass__closure() { + }, + versionClass__closure0: function versionClass__closure0() { + }, + DisplayP3ColorSpace0: function DisplayP3ColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + DisplayP3LinearColorSpace0: function DisplayP3LinearColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + DynamicImport0: function DynamicImport0(t0, t1) { + this.urlString = t0; + this.span = t1; + }, + EachRule$0(variables, list, children, span) { + var t1 = A.List_List$unmodifiable(variables, type$.String), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.EachRule0(t1, list, span, t2, t3); + }, + EachRule0: function EachRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.variables = t0; + _.list = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + EachRule_toString_closure0: function EachRule_toString_closure0() { + }, + EmptyExtensionStore0: function EmptyExtensionStore0() { + }, + Environment$0() { + var t1 = type$.String, + t2 = type$.Module_Callable_2, + t3 = type$.AstNode_2, + t4 = type$.int, + t5 = type$.Callable_2, + t6 = type$.JSArray_Map_String_Callable_2; + return new A.Environment0(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), null, null, A._setArrayType([], type$.JSArray_Module_Callable_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2)], type$.JSArray_Map_String_Value_2), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t3)], type$.JSArray_Map_String_AstNode_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), A._setArrayType([A.LinkedHashMap_LinkedHashMap$_empty(t1, t5)], t6), A.LinkedHashMap_LinkedHashMap$_empty(t1, t4), null, A.LinkedHashSet_LinkedHashSet$_empty(t1)); + }, + Environment$_0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, _functions, _mixins, _content, _configurableVariables) { + var t1 = type$.String, + t2 = type$.int; + return new A.Environment0(_modules, _namespaceNodes, _globalModules, _importedModules, _forwardedModules, _nestedForwardedModules, _allModules, _variables, _variableNodes, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _functions, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _mixins, A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), _content, _configurableVariables); + }, + _EnvironmentModule__EnvironmentModule1(environment, css, preModuleComments, extensionStore, forwarded) { + var t1, t2, t3, t4, t5, t6, module, result, t7; + if (forwarded == null) + forwarded = B.Set_empty5; + t1 = type$.dynamic; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = type$.Module_Callable_2, t3 = type$.List_CssComment_2, t4 = A.MapExtensions_get_pairs0(preModuleComments, t2, t3), t4 = t4.get$iterator(t4), t5 = type$.CssComment_2; t4.moveNext$0();) { + t6 = t4.get$current(t4); + module = t6._0; + result = A.List_List$from(t6._1, false, t5); + result.$flags = 3; + t1.$indexSet(0, module, result); + } + t1 = A.ConstantMap_ConstantMap$from(t1, t2, t3); + t2 = A._EnvironmentModule__makeModulesByVariable1(forwarded); + t3 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_variables), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure11(), type$.Map_String_Value_2), type$.Value_2); + t4 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_variableNodes), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure12(), type$.Map_String_AstNode_2), type$.AstNode_2); + t5 = type$.Map_String_Callable_2; + t6 = type$.Callable_2; + t7 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_functions), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure13(), t5), t6); + t6 = A._EnvironmentModule__memberMap1(B.JSArray_methods.get$first(environment._environment0$_mixins), forwarded.map$1$1(0, new A._EnvironmentModule__EnvironmentModule_closure14(), t5), t6); + t5 = J.get$isNotEmpty$asx(css.get$children(css)) || preModuleComments.get$isNotEmpty(preModuleComments) || B.JSArray_methods.any$1(environment._environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure15()); + return A._EnvironmentModule$_1(environment, css, t1, extensionStore, t2, t3, t4, t7, t6, t5, !extensionStore.get$isEmpty(extensionStore) || B.JSArray_methods.any$1(environment._environment0$_allModules, new A._EnvironmentModule__EnvironmentModule_closure16())); + }, + _EnvironmentModule__makeModulesByVariable1(forwarded) { + var modulesByVariable, t1, t2, t3, t4, t5; + if (forwarded.get$isEmpty(forwarded)) + return B.Map_empty11; + modulesByVariable = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Module_Callable_2); + for (t1 = forwarded.get$iterator(forwarded); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2 instanceof A._EnvironmentModule1) { + for (t3 = t2._environment0$_modulesByVariable, t3 = t3.get$values(t3), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.get$variables(); + A.setAll0(modulesByVariable, t5.get$keys(t5), t4); + } + t3 = B.JSArray_methods.get$first(t2._environment0$_environment._environment0$_variables); + A.setAll0(modulesByVariable, t3.get$keys(t3), t2); + } else { + t3 = t2.get$variables(); + A.setAll0(modulesByVariable, t3.get$keys(t3), t2); + } + } + return modulesByVariable; + }, + _EnvironmentModule__memberMap1(localMap, otherMaps, $V) { + var t1, t2, t3; + localMap = new A.PublicMemberMapView0(localMap, $V._eval$1("PublicMemberMapView0<0>")); + if (otherMaps.get$isEmpty(otherMaps)) + return localMap; + t1 = A._setArrayType([], $V._eval$1("JSArray>")); + for (t2 = otherMaps.get$iterator(otherMaps); t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.get$isNotEmpty(t3)) + t1.push(t3); + } + t1.push(localMap); + if (t1.length === 1) + return localMap; + return A.MergedMapView$0(t1, type$.String, $V); + }, + _EnvironmentModule$_1(_environment, css, preModuleComments, extensionStore, _modulesByVariable, variables, variableNodes, functions, mixins, transitivelyContainsCss, transitivelyContainsExtensions) { + return new A._EnvironmentModule1(_environment._environment0$_allModules, variables, variableNodes, functions, mixins, extensionStore, css, preModuleComments, transitivelyContainsCss, transitivelyContainsExtensions, _environment, _modulesByVariable); + }, + Environment0: function Environment0(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) { + var _ = this; + _._environment0$_modules = t0; + _._environment0$_namespaceNodes = t1; + _._environment0$_globalModules = t2; + _._environment0$_importedModules = t3; + _._environment0$_forwardedModules = t4; + _._environment0$_nestedForwardedModules = t5; + _._environment0$_allModules = t6; + _._environment0$_variables = t7; + _._environment0$_variableNodes = t8; + _._environment0$_variableIndices = t9; + _._environment0$_functions = t10; + _._environment0$_functionIndices = t11; + _._environment0$_mixins = t12; + _._environment0$_mixinIndices = t13; + _._environment0$_content = t14; + _._environment0$_configurableVariables = t15; + _._environment0$_inMixin = false; + _._environment0$_inSemiGlobalScope = true; + _._environment0$_lastVariableIndex = _._environment0$_lastVariableName = null; + }, + Environment__getVariableFromGlobalModule_closure0: function Environment__getVariableFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment_setVariable_closure2: function Environment_setVariable_closure2(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment_setVariable_closure3: function Environment_setVariable_closure3(t0) { + this.name = t0; + }, + Environment_setVariable_closure4: function Environment_setVariable_closure4(t0, t1) { + this.$this = t0; + this.name = t1; + }, + Environment__getFunctionFromGlobalModule_closure0: function Environment__getFunctionFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment__getMixinFromGlobalModule_closure0: function Environment__getMixinFromGlobalModule_closure0(t0) { + this.name = t0; + }, + Environment_toModule_closure0: function Environment_toModule_closure0() { + }, + Environment_toDummyModule_closure0: function Environment_toDummyModule_closure0() { + }, + _EnvironmentModule1: function _EnvironmentModule1(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) { + var _ = this; + _.upstream = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.extensionStore = t5; + _.css = t6; + _.preModuleComments = t7; + _.transitivelyContainsCss = t8; + _.transitivelyContainsExtensions = t9; + _._environment0$_environment = t10; + _._environment0$_modulesByVariable = t11; + }, + _EnvironmentModule__EnvironmentModule_closure11: function _EnvironmentModule__EnvironmentModule_closure11() { + }, + _EnvironmentModule__EnvironmentModule_closure12: function _EnvironmentModule__EnvironmentModule_closure12() { + }, + _EnvironmentModule__EnvironmentModule_closure13: function _EnvironmentModule__EnvironmentModule_closure13() { + }, + _EnvironmentModule__EnvironmentModule_closure14: function _EnvironmentModule__EnvironmentModule_closure14() { + }, + _EnvironmentModule__EnvironmentModule_closure15: function _EnvironmentModule__EnvironmentModule_closure15() { + }, + _EnvironmentModule__EnvironmentModule_closure16: function _EnvironmentModule__EnvironmentModule_closure16() { + }, + _EnvironmentModule_couldHaveBeenConfigured_closure1: function _EnvironmentModule_couldHaveBeenConfigured_closure1(t0) { + this.variables = t0; + }, + ErrorRule0: function ErrorRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + _EvaluateVisitor$1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t4, + t1 = type$.Uri, + t2 = type$.Module_Callable_2, + t3 = A._setArrayType([], type$.JSArray_Record_2_String_and_AstNode_2); + if (importCache == null) + t4 = nodeImporter == null ? A.ImportCache$none() : null; + else + t4 = importCache; + t1 = new A._EvaluateVisitor1(t4, nodeImporter, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Callable_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Configuration_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2), logger, A.LinkedHashSet_LinkedHashSet$_empty(type$.Record_2_String_and_SourceSpan), quietDeps, sourceMap, new A.Object(), A.Environment$0(), A.LinkedHashSet_LinkedHashSet$_empty(t1), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.nullable_AstNode_2), t3, B.Configuration_Map_empty_null0); + t1._EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap); + return t1; + }, + _EvaluateVisitor1: function _EvaluateVisitor1(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) { + var _ = this; + _._evaluate0$_importCache = t0; + _._nodeImporter = t1; + _._evaluate0$_builtInFunctions = t2; + _._evaluate0$_builtInModules = t3; + _._evaluate0$_modules = t4; + _._evaluate0$_moduleConfigurations = t5; + _._evaluate0$_moduleNodes = t6; + _._evaluate0$_logger = t7; + _._evaluate0$_warningsEmitted = t8; + _._evaluate0$_quietDeps = t9; + _._evaluate0$_sourceMap = t10; + _._evaluate0$_compileContext = t11; + _._evaluate0$_environment = t12; + _._evaluate0$_declarationName = _._evaluate0$__parent = _._evaluate0$_mediaQuerySources = _._evaluate0$_mediaQueries = _._evaluate0$_styleRuleIgnoringAtRoot = null; + _._evaluate0$_member = "root stylesheet"; + _._evaluate0$_importSpan = _._evaluate0$_callableNode = null; + _._evaluate0$_inSupportsDeclaration = _._evaluate0$_inKeyframes = _._evaluate0$_atRootExcludingStyleRule = _._evaluate0$_inUnknownAtRule = _._evaluate0$_inFunction = false; + _._evaluate0$_loadedUrls = t13; + _._evaluate0$_activeModules = t14; + _._evaluate0$_stack = t15; + _._evaluate0$_importer = null; + _._evaluate0$_inDependency = false; + _._evaluate0$__extensionStore = _._evaluate0$_preModuleComments = _._evaluate0$_outOfOrderImports = _._evaluate0$__endOfImports = _._evaluate0$__root = _._evaluate0$__stylesheet = null; + _._evaluate0$_configuration = t16; + }, + _EvaluateVisitor_closure25: function _EvaluateVisitor_closure25(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure26: function _EvaluateVisitor_closure26(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure27: function _EvaluateVisitor_closure27(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure28: function _EvaluateVisitor_closure28(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure29: function _EvaluateVisitor_closure29(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure30: function _EvaluateVisitor_closure30(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure31: function _EvaluateVisitor_closure31(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure32: function _EvaluateVisitor_closure32(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure33: function _EvaluateVisitor_closure33(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure10: function _EvaluateVisitor__closure10(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure34: function _EvaluateVisitor_closure34(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure9: function _EvaluateVisitor__closure9(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.module = t2; + }, + _EvaluateVisitor_closure35: function _EvaluateVisitor_closure35(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure36: function _EvaluateVisitor_closure36(t0) { + this.$this = t0; + }, + _EvaluateVisitor__closure7: function _EvaluateVisitor__closure7(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.values = t1; + _.span = t2; + _.callableNode = t3; + }, + _EvaluateVisitor__closure8: function _EvaluateVisitor__closure8(t0) { + this.$this = t0; + }, + _EvaluateVisitor_closure37: function _EvaluateVisitor_closure37(t0) { + this.$this = t0; + }, + _EvaluateVisitor_run_closure1: function _EvaluateVisitor_run_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.importer = t2; + }, + _EvaluateVisitor_run__closure1: function _EvaluateVisitor_run__closure1(t0, t1, t2) { + this.$this = t0; + this.importer = t1; + this.node = t2; + }, + _EvaluateVisitor__loadModule_closure3: function _EvaluateVisitor__loadModule_closure3(t0, t1) { + this._box_0 = t0; + this.callback = t1; + }, + _EvaluateVisitor__loadModule_closure4: function _EvaluateVisitor__loadModule_closure4(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.url = t1; + _.nodeWithSpan = t2; + _.baseUrl = t3; + _.namesInErrors = t4; + _.configuration = t5; + _.callback = t6; + }, + _EvaluateVisitor__loadModule__closure3: function _EvaluateVisitor__loadModule__closure3(t0, t1) { + this.$this = t0; + this.message = t1; + }, + _EvaluateVisitor__loadModule__closure4: function _EvaluateVisitor__loadModule__closure4(t0, t1, t2) { + this._box_1 = t0; + this.callback = t1; + this.firstLoad = t2; + }, + _EvaluateVisitor__execute_closure1: function _EvaluateVisitor__execute_closure1(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.stylesheet = t2; + _.extensionStore = t3; + _.configuration = t4; + _.css = t5; + _.preModuleComments = t6; + }, + _EvaluateVisitor__combineCss_closure3: function _EvaluateVisitor__combineCss_closure3() { + }, + _EvaluateVisitor__combineCss_closure4: function _EvaluateVisitor__combineCss_closure4(t0) { + this.selectors = t0; + }, + _EvaluateVisitor__combineCss_visitModule1: function _EvaluateVisitor__combineCss_visitModule1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.seen = t1; + _.clone = t2; + _.css = t3; + _.imports = t4; + _.sorted = t5; + }, + _EvaluateVisitor__extendModules_closure3: function _EvaluateVisitor__extendModules_closure3(t0) { + this.originalSelectors = t0; + }, + _EvaluateVisitor__extendModules_closure4: function _EvaluateVisitor__extendModules_closure4() { + }, + _EvaluateVisitor_visitAtRootRule_closure3: function _EvaluateVisitor_visitAtRootRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitAtRootRule_closure4: function _EvaluateVisitor_visitAtRootRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure11: function _EvaluateVisitor__scopeForAtRoot_closure11(t0, t1, t2) { + this.$this = t0; + this.newParent = t1; + this.node = t2; + }, + _EvaluateVisitor__scopeForAtRoot_closure12: function _EvaluateVisitor__scopeForAtRoot_closure12(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure13: function _EvaluateVisitor__scopeForAtRoot_closure13(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot__closure1: function _EvaluateVisitor__scopeForAtRoot__closure1(t0, t1) { + this.innerScope = t0; + this.callback = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure14: function _EvaluateVisitor__scopeForAtRoot_closure14(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor__scopeForAtRoot_closure15: function _EvaluateVisitor__scopeForAtRoot_closure15() { + }, + _EvaluateVisitor__scopeForAtRoot_closure16: function _EvaluateVisitor__scopeForAtRoot_closure16(t0, t1) { + this.$this = t0; + this.innerScope = t1; + }, + _EvaluateVisitor_visitContentRule_closure1: function _EvaluateVisitor_visitContentRule_closure1(t0, t1) { + this.$this = t0; + this.content = t1; + }, + _EvaluateVisitor_visitDeclaration_closure1: function _EvaluateVisitor_visitDeclaration_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitEachRule_closure5: function _EvaluateVisitor_visitEachRule_closure5(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure6: function _EvaluateVisitor_visitEachRule_closure6(t0, t1, t2) { + this._box_1 = t0; + this.$this = t1; + this.nodeWithSpan = t2; + }, + _EvaluateVisitor_visitEachRule_closure7: function _EvaluateVisitor_visitEachRule_closure7(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.list = t1; + _.setVariables = t2; + _.node = t3; + }, + _EvaluateVisitor_visitEachRule__closure1: function _EvaluateVisitor_visitEachRule__closure1(t0, t1, t2) { + this.$this = t0; + this.setVariables = t1; + this.node = t2; + }, + _EvaluateVisitor_visitEachRule___closure1: function _EvaluateVisitor_visitEachRule___closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure7: function _EvaluateVisitor_visitAtRule_closure7(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitAtRule_closure8: function _EvaluateVisitor_visitAtRule_closure8(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure9: function _EvaluateVisitor_visitAtRule_closure9(t0, t1, t2) { + this.$this = t0; + this.name = t1; + this.children = t2; + }, + _EvaluateVisitor_visitAtRule__closure1: function _EvaluateVisitor_visitAtRule__closure1(t0, t1) { + this.$this = t0; + this.children = t1; + }, + _EvaluateVisitor_visitAtRule_closure10: function _EvaluateVisitor_visitAtRule_closure10() { + }, + _EvaluateVisitor_visitForRule_closure9: function _EvaluateVisitor_visitForRule_closure9(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure10: function _EvaluateVisitor_visitForRule_closure10(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForRule_closure11: function _EvaluateVisitor_visitForRule_closure11(t0) { + this.fromNumber = t0; + }, + _EvaluateVisitor_visitForRule_closure12: function _EvaluateVisitor_visitForRule_closure12(t0, t1) { + this.toNumber = t0; + this.fromNumber = t1; + }, + _EvaluateVisitor_visitForRule_closure13: function _EvaluateVisitor_visitForRule_closure13(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.from = t3; + _.direction = t4; + _.fromNumber = t5; + }, + _EvaluateVisitor_visitForRule__closure1: function _EvaluateVisitor_visitForRule__closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitForwardRule_closure3: function _EvaluateVisitor_visitForwardRule_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitForwardRule_closure4: function _EvaluateVisitor_visitForwardRule_closure4(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__registerCommentsForModule_closure1: function _EvaluateVisitor__registerCommentsForModule_closure1() { + }, + _EvaluateVisitor_visitIfRule_closure1: function _EvaluateVisitor_visitIfRule_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIfRule__closure1: function _EvaluateVisitor_visitIfRule__closure1(t0, t1) { + this.$this = t0; + this.clause = t1; + }, + _EvaluateVisitor_visitIfRule___closure1: function _EvaluateVisitor_visitIfRule___closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport_closure1: function _EvaluateVisitor__visitDynamicImport_closure1(t0, t1) { + this.$this = t0; + this.$import = t1; + }, + _EvaluateVisitor__visitDynamicImport__closure7: function _EvaluateVisitor__visitDynamicImport__closure7(t0) { + this.$this = t0; + }, + _EvaluateVisitor__visitDynamicImport__closure8: function _EvaluateVisitor__visitDynamicImport__closure8() { + }, + _EvaluateVisitor__visitDynamicImport__closure9: function _EvaluateVisitor__visitDynamicImport__closure9() { + }, + _EvaluateVisitor__visitDynamicImport__closure10: function _EvaluateVisitor__visitDynamicImport__closure10(t0, t1, t2, t3, t4) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.loadsUserDefinedModules = t2; + _.environment = t3; + _.children = t4; + }, + _EvaluateVisitor__applyMixin_closure3: function _EvaluateVisitor__applyMixin_closure3(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure4: function _EvaluateVisitor__applyMixin__closure4(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.$arguments = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin_closure4: function _EvaluateVisitor__applyMixin_closure4(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.contentCallable = t1; + _.mixin = t2; + _.nodeWithSpanWithoutContent = t3; + }, + _EvaluateVisitor__applyMixin__closure3: function _EvaluateVisitor__applyMixin__closure3(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin___closure1: function _EvaluateVisitor__applyMixin___closure1(t0, t1, t2) { + this.$this = t0; + this.mixin = t1; + this.nodeWithSpanWithoutContent = t2; + }, + _EvaluateVisitor__applyMixin____closure1: function _EvaluateVisitor__applyMixin____closure1(t0, t1) { + this.$this = t0; + this.statement = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure5: function _EvaluateVisitor_visitIncludeRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitIncludeRule_closure6: function _EvaluateVisitor_visitIncludeRule_closure6(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitIncludeRule_closure7: function _EvaluateVisitor_visitIncludeRule_closure7(t0) { + this.node = t0; + }, + _EvaluateVisitor_visitMediaRule_closure7: function _EvaluateVisitor_visitMediaRule_closure7(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure8: function _EvaluateVisitor_visitMediaRule_closure8(t0, t1) { + this.$this = t0; + this.queries = t1; + }, + _EvaluateVisitor_visitMediaRule_closure9: function _EvaluateVisitor_visitMediaRule_closure9(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.queries = t2; + _.mergedSources = t3; + _.node = t4; + }, + _EvaluateVisitor_visitMediaRule__closure1: function _EvaluateVisitor_visitMediaRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule___closure1: function _EvaluateVisitor_visitMediaRule___closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitMediaRule_closure10: function _EvaluateVisitor_visitMediaRule_closure10(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitStyleRule_closure7: function _EvaluateVisitor_visitStyleRule_closure7(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure8: function _EvaluateVisitor_visitStyleRule_closure8() { + }, + _EvaluateVisitor_visitStyleRule_closure10: function _EvaluateVisitor_visitStyleRule_closure10(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitStyleRule__closure1: function _EvaluateVisitor_visitStyleRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitStyleRule_closure9: function _EvaluateVisitor_visitStyleRule_closure9() { + }, + _EvaluateVisitor__warnForBogusCombinators_closure1: function _EvaluateVisitor__warnForBogusCombinators_closure1() { + }, + _EvaluateVisitor_visitSupportsRule_closure5: function _EvaluateVisitor_visitSupportsRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure6: function _EvaluateVisitor_visitSupportsRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule__closure1: function _EvaluateVisitor_visitSupportsRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitSupportsRule_closure7: function _EvaluateVisitor_visitSupportsRule_closure7() { + }, + _EvaluateVisitor__visitSupportsCondition_closure1: function _EvaluateVisitor__visitSupportsCondition_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure5: function _EvaluateVisitor_visitVariableDeclaration_closure5(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor_visitVariableDeclaration_closure6: function _EvaluateVisitor_visitVariableDeclaration_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitVariableDeclaration_closure7: function _EvaluateVisitor_visitVariableDeclaration_closure7(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.value = t2; + }, + _EvaluateVisitor_visitUseRule_closure1: function _EvaluateVisitor_visitUseRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWarnRule_closure1: function _EvaluateVisitor_visitWarnRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule_closure1: function _EvaluateVisitor_visitWhileRule_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitWhileRule__closure1: function _EvaluateVisitor_visitWhileRule__closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitBinaryOperationExpression_closure1: function _EvaluateVisitor_visitBinaryOperationExpression_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__slash_recommendation1: function _EvaluateVisitor__slash_recommendation1() { + }, + _EvaluateVisitor_visitVariableExpression_closure1: function _EvaluateVisitor_visitVariableExpression_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitUnaryOperationExpression_closure1: function _EvaluateVisitor_visitUnaryOperationExpression_closure1(t0, t1) { + this.node = t0; + this.operand = t1; + }, + _EvaluateVisitor_visitIfExpression_closure1: function _EvaluateVisitor_visitIfExpression_closure1() { + }, + _EvaluateVisitor_visitIfConditionOperation_closure1: function _EvaluateVisitor_visitIfConditionOperation_closure1() { + }, + _EvaluateVisitor_visitListExpression_closure1: function _EvaluateVisitor_visitListExpression_closure1(t0) { + this.$this = t0; + }, + _EvaluateVisitor_visitFunctionExpression_closure5: function _EvaluateVisitor_visitFunctionExpression_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitFunctionExpression_closure6: function _EvaluateVisitor_visitFunctionExpression_closure6() { + }, + _EvaluateVisitor_visitFunctionExpression_closure7: function _EvaluateVisitor_visitFunctionExpression_closure7(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.node = t2; + }, + _EvaluateVisitor__visitCalculation_closure1: function _EvaluateVisitor__visitCalculation_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__checkCalculationArguments_check1: function _EvaluateVisitor__checkCalculationArguments_check1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor__visitCalculationExpression_closure1: function _EvaluateVisitor__visitCalculationExpression_closure1(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.node = t2; + _.inLegacySassFunction = t3; + }, + _EvaluateVisitor__visitCalculationExpression__closure1: function _EvaluateVisitor__visitCalculationExpression__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitInterpolatedFunctionExpression_closure1: function _EvaluateVisitor_visitInterpolatedFunctionExpression_closure1(t0, t1, t2) { + this.$this = t0; + this.node = t1; + this.$function = t2; + }, + _EvaluateVisitor__runUserDefinedCallable_closure1: function _EvaluateVisitor__runUserDefinedCallable_closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.callable = t1; + _.evaluated = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable__closure1: function _EvaluateVisitor__runUserDefinedCallable__closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable___closure1: function _EvaluateVisitor__runUserDefinedCallable___closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.evaluated = t1; + _.callable = t2; + _.nodeWithSpan = t3; + _.run = t4; + _.V = t5; + }, + _EvaluateVisitor__runUserDefinedCallable____closure1: function _EvaluateVisitor__runUserDefinedCallable____closure1() { + }, + _EvaluateVisitor__runFunctionCallable_closure1: function _EvaluateVisitor__runFunctionCallable_closure1(t0, t1) { + this.$this = t0; + this.callable = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure5: function _EvaluateVisitor__runBuiltInCallable_closure5(t0, t1, t2) { + this._box_0 = t0; + this.evaluated = t1; + this.namedSet = t2; + }, + _EvaluateVisitor__runBuiltInCallable_closure6: function _EvaluateVisitor__runBuiltInCallable_closure6(t0, t1) { + this._box_0 = t0; + this.evaluated = t1; + }, + _EvaluateVisitor__runBuiltInCallable_closure7: function _EvaluateVisitor__runBuiltInCallable_closure7() { + }, + _EvaluateVisitor__evaluateArguments_closure7: function _EvaluateVisitor__evaluateArguments_closure7() { + }, + _EvaluateVisitor__evaluateArguments_closure8: function _EvaluateVisitor__evaluateArguments_closure8(t0, t1) { + this.$this = t0; + this.restNodeForSpan = t1; + }, + _EvaluateVisitor__evaluateArguments_closure9: function _EvaluateVisitor__evaluateArguments_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.namedNodes = t3; + }, + _EvaluateVisitor__evaluateArguments_closure10: function _EvaluateVisitor__evaluateArguments_closure10() { + }, + _EvaluateVisitor__evaluateMacroArguments_closure7: function _EvaluateVisitor__evaluateMacroArguments_closure7(t0) { + this.restArgs = t0; + }, + _EvaluateVisitor__evaluateMacroArguments_closure8: function _EvaluateVisitor__evaluateMacroArguments_closure8(t0, t1, t2) { + this.$this = t0; + this.restNodeForSpan = t1; + this.restArgs = t2; + }, + _EvaluateVisitor__evaluateMacroArguments_closure9: function _EvaluateVisitor__evaluateMacroArguments_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.named = t1; + _.restNodeForSpan = t2; + _.restArgs = t3; + }, + _EvaluateVisitor__evaluateMacroArguments_closure10: function _EvaluateVisitor__evaluateMacroArguments_closure10(t0, t1, t2) { + this.$this = t0; + this.keywordRestNodeForSpan = t1; + this.keywordRestArgs = t2; + }, + _EvaluateVisitor__addRestMap_closure1: function _EvaluateVisitor__addRestMap_closure1(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.values = t1; + _.convert = t2; + _.expressionNode = t3; + _.map = t4; + _.nodeWithSpan = t5; + }, + _EvaluateVisitor__verifyArguments_closure1: function _EvaluateVisitor__verifyArguments_closure1(t0, t1, t2) { + this.parameters = t0; + this.positional = t1; + this.named = t2; + }, + _EvaluateVisitor_visitCssAtRule_closure5: function _EvaluateVisitor_visitCssAtRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure6: function _EvaluateVisitor_visitCssAtRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssAtRule_closure7: function _EvaluateVisitor_visitCssAtRule_closure7() { + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure3: function _EvaluateVisitor_visitCssKeyframeBlock_closure3(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssKeyframeBlock_closure4: function _EvaluateVisitor_visitCssKeyframeBlock_closure4() { + }, + _EvaluateVisitor_visitCssMediaRule_closure7: function _EvaluateVisitor_visitCssMediaRule_closure7(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure8: function _EvaluateVisitor_visitCssMediaRule_closure8(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure9: function _EvaluateVisitor_visitCssMediaRule_closure9(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.mergedQueries = t1; + _.node = t2; + _.mergedSources = t3; + }, + _EvaluateVisitor_visitCssMediaRule__closure1: function _EvaluateVisitor_visitCssMediaRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule___closure1: function _EvaluateVisitor_visitCssMediaRule___closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssMediaRule_closure10: function _EvaluateVisitor_visitCssMediaRule_closure10(t0) { + this.mergedSources = t0; + }, + _EvaluateVisitor_visitCssStyleRule_closure4: function _EvaluateVisitor_visitCssStyleRule_closure4(t0, t1, t2) { + this.$this = t0; + this.rule = t1; + this.node = t2; + }, + _EvaluateVisitor_visitCssStyleRule__closure1: function _EvaluateVisitor_visitCssStyleRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssStyleRule_closure3: function _EvaluateVisitor_visitCssStyleRule_closure3() { + }, + _EvaluateVisitor_visitCssSupportsRule_closure5: function _EvaluateVisitor_visitCssSupportsRule_closure5(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure6: function _EvaluateVisitor_visitCssSupportsRule_closure6(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule__closure1: function _EvaluateVisitor_visitCssSupportsRule__closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _EvaluateVisitor_visitCssSupportsRule_closure7: function _EvaluateVisitor_visitCssSupportsRule_closure7() { + }, + _EvaluateVisitor__performInterpolationHelper_closure1: function _EvaluateVisitor__performInterpolationHelper_closure1(t0) { + this.interpolation = t0; + }, + _EvaluateVisitor__serialize_closure1: function _EvaluateVisitor__serialize_closure1(t0, t1) { + this.value = t0; + this.quote = t1; + }, + _EvaluateVisitor__expressionNode_closure1: function _EvaluateVisitor__expressionNode_closure1(t0, t1) { + this.$this = t0; + this.expression = t1; + }, + _EvaluateVisitor__withoutSlash_recommendation1: function _EvaluateVisitor__withoutSlash_recommendation1() { + }, + _EvaluateVisitor__stackFrame_closure1: function _EvaluateVisitor__stackFrame_closure1(t0) { + this.$this = t0; + }, + _ImportedCssVisitor1: function _ImportedCssVisitor1(t0) { + this._evaluate0$_visitor = t0; + }, + _ImportedCssVisitor_visitCssAtRule_closure1: function _ImportedCssVisitor_visitCssAtRule_closure1() { + }, + _ImportedCssVisitor_visitCssMediaRule_closure1: function _ImportedCssVisitor_visitCssMediaRule_closure1(t0) { + this.hasBeenMerged = t0; + }, + _ImportedCssVisitor_visitCssStyleRule_closure1: function _ImportedCssVisitor_visitCssStyleRule_closure1() { + }, + _ImportedCssVisitor_visitCssSupportsRule_closure1: function _ImportedCssVisitor_visitCssSupportsRule_closure1() { + }, + _EvaluationContext1: function _EvaluationContext1(t0, t1) { + this._evaluate0$_visitor = t0; + this._evaluate0$_defaultWarnNodeWithSpan = t1; + }, + EvaluationContext_currentOrNull0() { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); + $label0$0: { + if (_0_0 instanceof A.EvaluationContext0) { + t1 = _0_0; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + EvaluationContext__currentOrNull() { + var _0_0 = $.Zone__current.$index(0, B.Symbol__evaluationContext); + if (_0_0 instanceof A.EvaluationContext0) + return _0_0; + else + return null; + }, + warn0(message) { + var t1, _null = null, + _0_0 = A.EvaluationContext_currentOrNull0(); + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.warn$2(0, message, _null); + break $label0$0; + } + B.C_DefaultLogger0.internalWarn$4$deprecation$span$trace(message, _null, _null, _null); + t1 = _null; + break $label0$0; + } + return t1; + }, + warnForDeprecation0(message, deprecation) { + var t1, + _0_0 = A.EvaluationContext_currentOrNull0(); + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.warn$2(0, message, deprecation); + break $label0$0; + } + t1 = A.WarnForDeprecation_warnForDeprecation0(B.C_DefaultLogger0, deprecation, message, null, null); + break $label0$0; + } + return t1; + }, + warnForDeprecationFromApi(message, deprecation) { + var _0_0 = A.EvaluationContext__currentOrNull(); + if (_0_0 != null) + _0_0.warn$2(0, message, deprecation); + else + A.WarnForDeprecation_warnForDeprecation0(B.C_DefaultLogger0, deprecation, message, null, null); + }, + EvaluationContext0: function EvaluationContext0() { + }, + _EvaluationContextLogger0: function _EvaluationContextLogger0(t0) { + this._evaluation_context0$_context = t0; + }, + EveryCssVisitor0: function EveryCssVisitor0() { + }, + EveryCssVisitor_visitCssAtRule_closure0: function EveryCssVisitor_visitCssAtRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssKeyframeBlock_closure0: function EveryCssVisitor_visitCssKeyframeBlock_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssMediaRule_closure0: function EveryCssVisitor_visitCssMediaRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStyleRule_closure0: function EveryCssVisitor_visitCssStyleRule_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssStylesheet_closure0: function EveryCssVisitor_visitCssStylesheet_closure0(t0) { + this.$this = t0; + }, + EveryCssVisitor_visitCssSupportsRule_closure0: function EveryCssVisitor_visitCssSupportsRule_closure0(t0) { + this.$this = t0; + }, + throwNodeException(exception, ascii, color, trace) { + var wasAscii, jsException, t1, trace0; + trace = trace; + wasAscii = $._glyphs === B.C_AsciiGlyphSet; + $._glyphs = ascii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + try { + t1 = A.callConstructor($.$get$exceptionClass(), [exception, B.JSString_methods.replaceFirst$2(exception.toString$1$color(0, color), "Error: ", "")]); + jsException = type$._NodeException._as(t1); + trace0 = A.getTrace0(exception); + trace = trace0 == null ? trace : trace0; + if (trace != null) + A.attachJsStack(jsException, trace); + A.jsThrow(jsException); + } finally { + $._glyphs = wasAscii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + } + }, + _NodeException: function _NodeException() { + }, + exceptionClass_closure: function exceptionClass_closure() { + }, + exceptionClass__closure: function exceptionClass__closure() { + }, + exceptionClass__closure0: function exceptionClass__closure0() { + }, + exceptionClass__closure1: function exceptionClass__closure1() { + }, + SassException$0(message, span, loadedUrls) { + return new A.SassException0(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassException$0(message, span, primaryLabel, secondarySpans, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassException0(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassRuntimeException$0(message, span, trace, loadedUrls) { + return new A.SassRuntimeException0(trace, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassRuntimeException$0(message, span, primaryLabel, secondarySpans, trace, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassRuntimeException0(trace, primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassFormatException$0(message, span, loadedUrls) { + return new A.SassFormatException0(loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + MultiSpanSassFormatException$0(message, span, primaryLabel, secondarySpans, loadedUrls) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassFormatException0(primaryLabel, t1, loadedUrls == null ? B.Set_empty : A.Set_Set$unmodifiable(loadedUrls, type$.Uri), message, span); + }, + SassScriptException$0(message, argumentName) { + return new A.SassScriptException0(argumentName == null ? message : "$" + argumentName + ": " + message); + }, + MultiSpanSassScriptException$0(message, primaryLabel, secondarySpans) { + var t1 = A.ConstantMap_ConstantMap$from(secondarySpans, type$.FileSpan, type$.String); + return new A.MultiSpanSassScriptException0(primaryLabel, t1, message); + }, + SassException0: function SassException0(t0, t1, t2) { + this.loadedUrls = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassException0: function MultiSpanSassException0(t0, t1, t2, t3, t4) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _.loadedUrls = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassRuntimeException0: function SassRuntimeException0(t0, t1, t2, t3) { + var _ = this; + _.trace = t0; + _.loadedUrls = t1; + _._span_exception$_message = t2; + _._span = t3; + }, + MultiSpanSassRuntimeException0: function MultiSpanSassRuntimeException0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.trace = t0; + _.primaryLabel = t1; + _.secondarySpans = t2; + _.loadedUrls = t3; + _._span_exception$_message = t4; + _._span = t5; + }, + SassFormatException0: function SassFormatException0(t0, t1, t2) { + this.loadedUrls = t0; + this._span_exception$_message = t1; + this._span = t2; + }, + MultiSpanSassFormatException0: function MultiSpanSassFormatException0(t0, t1, t2, t3, t4) { + var _ = this; + _.primaryLabel = t0; + _.secondarySpans = t1; + _.loadedUrls = t2; + _._span_exception$_message = t3; + _._span = t4; + }, + SassScriptException0: function SassScriptException0(t0) { + this.message = t0; + }, + MultiSpanSassScriptException0: function MultiSpanSassScriptException0(t0, t1, t2) { + this.primaryLabel = t0; + this.secondarySpans = t1; + this.message = t2; + }, + Exports: function Exports() { + }, + LoggerNamespace: function LoggerNamespace() { + }, + Expression0: function Expression0() { + }, + JSExpressionVisitor: function JSExpressionVisitor(t0) { + this._expression$_inner = t0; + }, + JSExpressionVisitorObject: function JSExpressionVisitorObject() { + }, + expressionToCalc0(expression) { + var t1 = A.ArgumentList$0(A._setArrayType([B.C__MakeExpressionCalculationSafe0.visitBinaryOperationExpression$1(0, expression)], type$.JSArray_Expression_2), B.Map_empty14, B.Map_empty5, expression.get$span(0), null, null), + t2 = expression.get$span(0); + return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked("calc", "_", "-"), "calc", t1, t2); + }, + _MakeExpressionCalculationSafe0: function _MakeExpressionCalculationSafe0() { + }, + __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0: function __MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0() { + }, + ExtendRule0: function ExtendRule0(t0, t1, t2) { + this.selector = t0; + this.isOptional = t1; + this.span = t2; + }, + Extension0: function Extension0(t0, t1, t2, t3, t4) { + var _ = this; + _.extender = t0; + _.target = t1; + _.mediaContext = t2; + _.isOptional = t3; + _.span = t4; + }, + Extender0: function Extender0(t0, t1) { + this.selector = t0; + this.isOriginal = t1; + this._extension$_extension = null; + }, + ExtensionStore__extendOrReplace0(selector, source, targets, mode, span) { + var t1, t2, t3, t4, t5, t6, t7, t8, _i, complex, compound, t9, t10, t11, _i0, simple, t12, _i1, t13, t14, + extender = A.ExtensionStore$_mode0(mode); + if (!selector.accept$1(B._IsInvisibleVisitor_true0)) + extender._extension_store$_originals.addAll$1(0, selector.components); + for (t1 = targets.components, t2 = t1.length, t3 = source.components, t4 = t3.length, t5 = type$.ComplexSelector_2, t6 = type$.Extension_2, t7 = type$.SimpleSelector_2, t8 = type$.Map_ComplexSelector_Extension_2, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassScriptException$0("Can't extend complex selector " + complex.toString$0(0) + ".", null)); + t9 = A.LinkedHashMap_LinkedHashMap$_empty(t7, t8); + for (t10 = compound.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) { + simple = t10[_i0]; + t12 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t6); + for (_i1 = 0; _i1 < t4; ++_i1) { + complex = t3[_i1]; + complex.get$specificity(); + t13 = new A.Extender0(complex, false); + t14 = new A.Extension0(t13, simple, null, true, span); + t13._extension$_extension = t14; + t12.$indexSet(0, complex, t14); + } + t9.$indexSet(0, simple, t12); + } + selector = extender._extension_store$_extendList$2(selector, t9); + } + return selector; + }, + ExtensionStore$0() { + var t1 = type$.SimpleSelector_2; + return new A.ExtensionStore0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList_2, type$.List_CssMediaQuery_2), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2), B.ExtendMode_normal_0_normal0); + }, + ExtensionStore$_mode0(_mode) { + var t1 = type$.SimpleSelector_2; + return new A.ExtensionStore0(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Map_ComplexSelector_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.List_Extension_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.ModifiableBox_SelectorList_2, type$.List_CssMediaQuery_2), new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2), new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2), _mode); + }, + ExtensionStore0: function ExtensionStore0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._extension_store$_selectors = t0; + _._extension_store$_extensions = t1; + _._extension_store$_extensionsByExtender = t2; + _._extension_store$_mediaContexts = t3; + _._extension_store$_sourceSpecificity = t4; + _._extension_store$_originals = t5; + _._extension_store$_mode = t6; + }, + ExtensionStore_extensionsWhereTarget_closure0: function ExtensionStore_extensionsWhereTarget_closure0() { + }, + ExtensionStore__registerSelector_closure0: function ExtensionStore__registerSelector_closure0() { + }, + ExtensionStore_addExtension_closure2: function ExtensionStore_addExtension_closure2() { + }, + ExtensionStore_addExtension_closure3: function ExtensionStore_addExtension_closure3() { + }, + ExtensionStore_addExtension_closure4: function ExtensionStore_addExtension_closure4(t0) { + this.complex = t0; + }, + ExtensionStore__extendExistingExtensions_closure1: function ExtensionStore__extendExistingExtensions_closure1() { + }, + ExtensionStore__extendExistingExtensions_closure2: function ExtensionStore__extendExistingExtensions_closure2() { + }, + ExtensionStore_addExtensions_closure0: function ExtensionStore_addExtensions_closure0() { + }, + ExtensionStore__extendComplex_closure0: function ExtensionStore__extendComplex_closure0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendComplex__closure0: function ExtensionStore__extendComplex__closure0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.complex = t2; + }, + ExtensionStore__extendCompound_closure2: function ExtensionStore__extendCompound_closure2() { + }, + ExtensionStore__extendCompound_closure3: function ExtensionStore__extendCompound_closure3() { + }, + ExtensionStore__extendCompound_closure4: function ExtensionStore__extendCompound_closure4(t0) { + this.original = t0; + }, + ExtensionStore__extendSimple_withoutPseudo0: function ExtensionStore__extendSimple_withoutPseudo0(t0, t1, t2) { + this.$this = t0; + this.extensions = t1; + this.targetsUsed = t2; + }, + ExtensionStore__extendSimple_closure1: function ExtensionStore__extendSimple_closure1(t0, t1) { + this.$this = t0; + this.withoutPseudo = t1; + }, + ExtensionStore__extendSimple_closure2: function ExtensionStore__extendSimple_closure2() { + }, + ExtensionStore__extendPseudo_closure4: function ExtensionStore__extendPseudo_closure4() { + }, + ExtensionStore__extendPseudo_closure5: function ExtensionStore__extendPseudo_closure5() { + }, + ExtensionStore__extendPseudo_closure6: function ExtensionStore__extendPseudo_closure6() { + }, + ExtensionStore__extendPseudo_closure7: function ExtensionStore__extendPseudo_closure7(t0) { + this.pseudo = t0; + }, + ExtensionStore__extendPseudo_closure8: function ExtensionStore__extendPseudo_closure8(t0, t1) { + this.pseudo = t0; + this.selector = t1; + }, + ExtensionStore__trim_closure1: function ExtensionStore__trim_closure1(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore__trim_closure2: function ExtensionStore__trim_closure2(t0, t1) { + this._box_0 = t0; + this.complex1 = t1; + }, + ExtensionStore_clone_closure0: function ExtensionStore_clone_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.newSelectors = t1; + _.newBoxes = t2; + _.oldToNewSelectors = t3; + _.newMediaContexts = t4; + }, + ExtensionStore_clone__closure0: function ExtensionStore_clone__closure0(t0) { + this.selector = t0; + }, + FiberClass: function FiberClass() { + }, + Fiber: function Fiber() { + }, + JSToDartFileImporter: function JSToDartFileImporter(t0) { + this._file0$_findFileUrl = t0; + }, + JSToDartFileImporter_canonicalize_closure: function JSToDartFileImporter_canonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + FilesystemImporter0: function FilesystemImporter0(t0, t1) { + this._filesystem$_loadPath = t0; + this._filesystem$_loadPathDeprecated = t1; + }, + FilesystemImporter_canonicalize_closure0: function FilesystemImporter_canonicalize_closure0() { + }, + ForRule$0(variable, from, to, children, span, exclusive) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.ForRule0(variable, from, to, exclusive, span, t1, t2); + }, + ForRule0: function ForRule0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.variable = t0; + _.from = t1; + _.to = t2; + _.isExclusive = t3; + _.span = t4; + _.children = t5; + _.hasDeclarations = t6; + }, + ForwardRule0: function ForwardRule0(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.url = t0; + _.shownMixinsAndFunctions = t1; + _.shownVariables = t2; + _.hiddenMixinsAndFunctions = t3; + _.hiddenVariables = t4; + _.prefix = t5; + _.configuration = t6; + _.span = t7; + }, + ForwardedModuleView_ifNecessary0(inner, rule, $T) { + var t2, + t1 = false; + if (rule.prefix == null) + if (rule.shownMixinsAndFunctions == null) + if (rule.shownVariables == null) { + t2 = rule.hiddenMixinsAndFunctions; + t2 = t2 == null ? null : t2._base.get$isEmpty(0); + if (t2 === true) { + t1 = rule.hiddenVariables; + t1 = t1 == null ? null : t1._base.get$isEmpty(0); + t1 = t1 === true; + } + } + if (t1) + return inner; + else + return A.ForwardedModuleView$0(inner, rule, $T); + }, + ForwardedModuleView$0(_inner, _rule, $T) { + var t1 = _rule.prefix, + t2 = _rule.shownVariables, + t3 = _rule.hiddenVariables, + t4 = _rule.shownMixinsAndFunctions, + t5 = _rule.hiddenMixinsAndFunctions; + return new A.ForwardedModuleView0(_inner, _rule, A.ForwardedModuleView__forwardedMap0(_inner.get$variables(), t1, t2, t3, type$.Value_2), A.ForwardedModuleView__forwardedMap0(_inner.get$variableNodes(), t1, t2, t3, type$.AstNode_2), A.ForwardedModuleView__forwardedMap0(_inner.get$functions(_inner), t1, t4, t5, $T), A.ForwardedModuleView__forwardedMap0(_inner.get$mixins(), t1, t4, t5, $T), $T._eval$1("ForwardedModuleView0<0>")); + }, + ForwardedModuleView__forwardedMap0(map, prefix, safelist, blocklist, $V) { + var t1 = prefix == null, + t2 = false; + if (t1) + if (safelist == null) + t2 = blocklist == null || blocklist._base.get$isEmpty(0); + if (t2) + return map; + if (!t1) + map = new A.PrefixedMapView0(map, prefix, $V._eval$1("PrefixedMapView0<0>")); + if (safelist != null) + map = new A.LimitedMapView0(map, safelist._base.intersection$1(new A.MapKeySet(map, type$.MapKeySet_nullable_Object)), type$.$env_1_1_String._bind$1($V)._eval$1("LimitedMapView0<1,2>")); + else if (blocklist != null && blocklist._base.get$isNotEmpty(0)) + map = A.LimitedMapView$blocklist0(map, blocklist, type$.String, $V); + return map; + }, + ForwardedModuleView0: function ForwardedModuleView0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._forwarded_view0$_inner = t0; + _._forwarded_view0$_rule = t1; + _.variables = t2; + _.variableNodes = t3; + _.functions = t4; + _.mixins = t5; + _.$ti = t6; + }, + FunctionExpression0: function FunctionExpression0(t0, t1, t2, t3, t4) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.originalName = t2; + _.$arguments = t3; + _.span = t4; + }, + JSFunction0: function JSFunction0() { + }, + SupportsFunction0: function SupportsFunction0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + functionClass_closure: function functionClass_closure() { + }, + functionClass__closure: function functionClass__closure() { + }, + functionClass__closure0: function functionClass__closure0() { + }, + SassFunction0: function SassFunction0(t0, t1) { + this.callable = t0; + this._function0$_compileContext = t1; + }, + FunctionRule$0($name, parameters, children, span, comment) { + var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.FunctionRule0(t1, $name, parameters, span, t2, t3); + }, + FunctionRule0: function FunctionRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.name = t0; + _.originalName = t1; + _.parameters = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + unifyComplex0(complexes, span) { + var t2, trailingCombinator, leadingCombinator, unifiedBase, t3, t4, _0_6_isSet, _0_6, t5, newLeadingCombinator, base, _1_1, newTrailingCombinator, unifiedBase0, t6, t7, t8, _null = null, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) + return complexes; + for (t2 = t1.get$iterator(complexes), trailingCombinator = _null, leadingCombinator = trailingCombinator, unifiedBase = leadingCombinator; t2.moveNext$0();) { + t3 = t2.get$current(t2); + if (t3.accept$1(B.C__IsUselessVisitor0)) + return _null; + t4 = t3.components; + _0_6_isSet = t4.length === 1; + if (_0_6_isSet) { + _0_6 = t3.leadingCombinators; + t5 = _0_6.length === 1; + } else { + _0_6 = _null; + t5 = false; + } + if (t5) { + newLeadingCombinator = (_0_6_isSet ? _0_6 : t3.leadingCombinators)[0]; + if (leadingCombinator == null) + leadingCombinator = newLeadingCombinator; + else if (!(leadingCombinator.$ti._is(newLeadingCombinator) && J.$eq$(newLeadingCombinator.value, leadingCombinator.value))) + return _null; + } + base = B.JSArray_methods.get$last(t4); + _1_1 = base.combinators; + if (_1_1.length === 1) { + newTrailingCombinator = _1_1[0]; + if (trailingCombinator != null) + t3 = !(trailingCombinator.$ti._is(newTrailingCombinator) && J.$eq$(newTrailingCombinator.value, trailingCombinator.value)); + else + t3 = false; + if (t3) + return _null; + trailingCombinator = newTrailingCombinator; + } + unifiedBase0 = base.selector; + if (unifiedBase == null) + unifiedBase = unifiedBase0; + else { + unifiedBase = A.unifyCompound0(unifiedBase, unifiedBase0); + if (unifiedBase == null) + return _null; + } + } + t2 = type$.JSArray_ComplexSelector_2; + t3 = A._setArrayType([], t2); + for (t4 = t1.get$iterator(complexes); t4.moveNext$0();) { + t5 = t4.get$current(t4); + t6 = t5.components; + t7 = t6.length; + if (t7 > 1) { + t8 = t5.leadingCombinators; + t3.push(A.ComplexSelector$0(t8, B.JSArray_methods.take$1(t6, t7 - 1), t5.span, t5.lineBreak)); + } + } + t4 = leadingCombinator == null ? B.List_empty17 : A._setArrayType([leadingCombinator], type$.JSArray_CssValue_Combinator_2); + unifiedBase.toString; + t5 = trailingCombinator == null ? B.List_empty17 : A._setArrayType([trailingCombinator], type$.JSArray_CssValue_Combinator_2); + base = A.ComplexSelector$0(t4, A._setArrayType([new A.ComplexSelectorComponent0(unifiedBase, A.List_List$unmodifiable(t5, type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2), span, t1.any$1(complexes, new A.unifyComplex_closure0())); + if (t3.length === 0) + t1 = A._setArrayType([base], t2); + else { + t1 = A.List_List$_of(A.IterableExtension_get_exceptLast0(t3), type$.ComplexSelector_2); + t1.push(B.JSArray_methods.get$last(t3).concatenate$2(base, span)); + } + return A.weave0(t1, span, false); + }, + unifyCompound0(compound1, compound2) { + var t1, t2, pseudoElementFound, _i, simple, unified, + result = compound1.components, + pseudoResult = A._setArrayType([], type$.JSArray_SimpleSelector_2); + for (t1 = compound2.components, t2 = t1.length, pseudoElementFound = false, _i = 0; _i < t2; ++_i) { + simple = t1[_i]; + if (pseudoElementFound && simple instanceof A.PseudoSelector0) { + unified = simple.unify$1(pseudoResult); + if (unified == null) + return null; + pseudoResult = unified; + } else { + pseudoElementFound = B.JSBool_methods.$or(pseudoElementFound, simple instanceof A.PseudoSelector0 && !simple.isClass); + unified = simple.unify$1(result); + if (unified == null) + return null; + result = unified; + } + } + t1 = A.List_List$_of(result, type$.SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, pseudoResult); + return A.CompoundSelector$0(t1, compound1.span); + }, + unifyUniversalAndElement0(selector1, selector2) { + var namespace, $name, t1, + _0_0 = A._namespaceAndName0(selector1, "selector1"), + namespace1 = _0_0._0, + name1 = _0_0._1, + _1_0 = A._namespaceAndName0(selector2, "selector2"), + namespace2 = _1_0._0, + name2 = _1_0._1; + if (namespace1 == namespace2 || namespace2 === "*") + namespace = namespace1; + else { + if (namespace1 !== "*") + return null; + namespace = namespace2; + } + if (name1 == name2 || name2 == null) + $name = name1; + else { + if (!(name1 == null || name1 === "*")) + return null; + $name = name2; + } + t1 = selector1.span; + return $name == null ? new A.UniversalSelector0(namespace, t1) : new A.TypeSelector0(new A.QualifiedName0($name, namespace), t1); + }, + _namespaceAndName0(selector, $name) { + var t1, _0_4; + $label0$0: { + if (selector instanceof A.UniversalSelector0) { + t1 = new A._Record_2(selector.namespace, null); + break $label0$0; + } + if (selector instanceof A.TypeSelector0) { + _0_4 = selector.name; + t1 = new A._Record_2(_0_4.namespace, _0_4.name); + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$value(selector, $name, string$.must_b)); + } + return t1; + }, + weave0(complexes, span, forceLineBreak) { + var complex, t2, prefixes, t3, t4, t5, t6, i, t7, t8, _i, t9, t10, _i0, parentPrefix, t11, t12, + t1 = J.getInterceptor$asx(complexes); + if (t1.get$length(complexes) === 1) { + complex = t1.$index(complexes, 0); + if (!forceLineBreak || complex.lineBreak) + return complexes; + return A._setArrayType([A.ComplexSelector$0(complex.leadingCombinators, complex.components, complex.span, true)], type$.JSArray_ComplexSelector_2); + } + t2 = type$.JSArray_ComplexSelector_2; + prefixes = A._setArrayType([t1.get$first(complexes)], t2); + for (t1 = t1.skip$1(complexes, 1), t3 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t3._eval$1("ListIterator")), t4 = type$.ComplexSelectorComponent_2, t3 = t3._eval$1("ListIterable.E"); t1.moveNext$0();) { + t5 = t1.__internal$_current; + if (t5 == null) + t5 = t3._as(t5); + t6 = t5.components; + if (t6.length === 1) { + for (i = 0; i < prefixes.length; ++i) + prefixes[i] = prefixes[i].concatenate$3$forceLineBreak(t5, span, forceLineBreak); + continue; + } + t7 = A._setArrayType([], t2); + for (t8 = prefixes.length, _i = 0; _i < prefixes.length; prefixes.length === t8 || (0, A.throwConcurrentModificationError)(prefixes), ++_i) { + t9 = A._weaveParents0(prefixes[_i], t5, span); + if (t9 == null) + t9 = B.List_empty18; + t10 = t9.length; + _i0 = 0; + for (; _i0 < t9.length; t9.length === t10 || (0, A.throwConcurrentModificationError)(t9), ++_i0) { + parentPrefix = t9[_i0]; + t11 = B.JSArray_methods.get$last(t6); + t12 = A.List_List$_of(parentPrefix.components, t4); + t12.push(t11); + t11 = parentPrefix.lineBreak || forceLineBreak; + t7.push(A.ComplexSelector$0(parentPrefix.leadingCombinators, t12, span, t11)); + } + } + prefixes = t7; + } + return prefixes; + }, + _weaveParents0(prefix, base, span) { + var t1, queue1, queue2, trailingCombinators, _0_1, _0_3, _0_3_isSet, rootish2, t2, rootish1, _0_30, rootish, t3, t0, rootish_case_1, groups1, groups2, lcs, choices, t4, _i, group, t5, t6, t7, _i0, chunk, t8, t9, _null = null, + leadingCombinators = A._mergeLeadingCombinators0(prefix.leadingCombinators, base.leadingCombinators); + if (leadingCombinators == null) + return _null; + t1 = type$.ComplexSelectorComponent_2; + queue1 = A.QueueList_QueueList$from(prefix.components, t1); + queue2 = A.QueueList_QueueList$from(A.IterableExtension_get_exceptLast0(base.components), t1); + trailingCombinators = A._mergeTrailingCombinators0(queue1, queue2, span, _null); + if (trailingCombinators == null) + return _null; + $label0$0: { + _0_1 = A._firstIfRootish0(queue1); + _0_3 = A._firstIfRootish0(queue2); + _0_3_isSet = _0_1 != null; + rootish2 = _null; + t2 = false; + if (_0_3_isSet) { + t2 = _0_3 != null; + if (t2) + rootish2 = _0_3; + rootish1 = _0_1; + _0_30 = _0_3; + } else { + rootish1 = _null; + _0_30 = rootish1; + } + if (t2) { + rootish = A.unifyCompound0(rootish1.selector, rootish2.selector); + if (rootish == null) + return _null; + t1 = rootish1.combinators; + t2 = rootish1.span; + t3 = type$.CssValue_Combinator_2; + queue1.addFirst$1(new A.ComplexSelectorComponent0(rootish, A.List_List$unmodifiable(t1, t3), t2)); + queue2.addFirst$1(new A.ComplexSelectorComponent0(rootish, A.List_List$unmodifiable(rootish2.combinators, t3), t2)); + break $label0$0; + } + t2 = _null; + t3 = false; + if (_0_1 != null) { + if (_0_3_isSet) + t2 = _0_30; + else { + t2 = _0_3; + _0_30 = t2; + _0_3_isSet = true; + } + t2 = t2 == null; + t3 = t2 ? _0_1 : _null; + t0 = t3; + t3 = t2; + t2 = t0; + } + if (!t3) + if (_0_1 == null) { + if (_0_3_isSet) + t3 = _0_30; + else { + t3 = _0_3; + _0_30 = t3; + _0_3_isSet = true; + } + t3 = t3 != null; + if (t3) { + rootish_case_1 = _0_3_isSet ? _0_30 : _0_3; + if (rootish_case_1 == null) + rootish_case_1 = t1._as(rootish_case_1); + t1 = rootish_case_1; + } else + t1 = t2; + t2 = t3; + } else { + t1 = t2; + t2 = false; + } + else { + t1 = t2; + t2 = true; + } + if (t2) { + queue1.addFirst$1(t1); + queue2.addFirst$1(t1); + } + } + groups1 = A._groupSelectors0(queue1); + groups2 = A._groupSelectors0(queue2); + t1 = type$.List_ComplexSelectorComponent_2; + lcs = A.longestCommonSubsequence0(groups2, groups1, new A._weaveParents_closure3(span), t1); + choices = A._setArrayType([], type$.JSArray_List_Iterable_ComplexSelectorComponent_2); + for (t2 = lcs.length, t3 = type$.JSArray_Iterable_ComplexSelectorComponent_2, t4 = type$.JSArray_ComplexSelectorComponent_2, _i = 0; _i < lcs.length; lcs.length === t2 || (0, A.throwConcurrentModificationError)(lcs), ++_i) { + group = lcs[_i]; + t5 = A._setArrayType([], t3); + for (t6 = A._chunks0(groups1, groups2, new A._weaveParents_closure4(group), t1), t7 = t6.length, _i0 = 0; _i0 < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i0) { + chunk = t6[_i0]; + t8 = A._setArrayType([], t4); + for (t9 = B.JSArray_methods.get$iterator(chunk); t9.moveNext$0();) + B.JSArray_methods.addAll$1(t8, t9.get$current(0)); + t5.push(t8); + } + choices.push(t5); + choices.push(A._setArrayType([group], t3)); + groups1.removeFirst$0(); + groups2.removeFirst$0(); + } + t2 = A._setArrayType([], t3); + for (t1 = A._chunks0(groups1, groups2, new A._weaveParents_closure5(), t1), t3 = t1.length, _i = 0; _i < t1.length; t1.length === t3 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + chunk = t1[_i]; + t5 = A._setArrayType([], t4); + for (t6 = B.JSArray_methods.get$iterator(chunk); t6.moveNext$0();) + B.JSArray_methods.addAll$1(t5, t6.get$current(0)); + t2.push(t5); + } + choices.push(t2); + B.JSArray_methods.addAll$1(choices, trailingCombinators); + t1 = A._setArrayType([], type$.JSArray_ComplexSelector_2); + for (t2 = J.get$iterator$ax(A.paths0(new A.WhereIterable(choices, new A._weaveParents_closure6(), type$.WhereIterable_List_Iterable_ComplexSelectorComponent_2), type$.Iterable_ComplexSelectorComponent_2)), t3 = !prefix.lineBreak, t5 = base.lineBreak; t2.moveNext$0();) { + t6 = t2.get$current(t2); + t7 = A._setArrayType([], t4); + for (t6 = J.get$iterator$ax(t6); t6.moveNext$0();) + B.JSArray_methods.addAll$1(t7, t6.get$current(t6)); + t1.push(A.ComplexSelector$0(leadingCombinators, t7, span, !t3 || t5)); + } + return t1; + }, + _firstIfRootish0(queue) { + var first, t1, t2, _i, simple, t3; + if (queue.get$length(0) >= 1) { + first = queue.$index(0, 0); + for (t1 = first.selector.components, t2 = t1.length, _i = 0; _i < t2; ++_i) { + simple = t1[_i]; + t3 = false; + if (simple instanceof A.PseudoSelector0) + if (simple.isClass) + t3 = $._rootishPseudoClasses0.contains$1(0, simple.normalizedName); + if (t3) { + queue.removeFirst$0(); + return first; + } + } + } + return null; + }, + _mergeLeadingCombinators0(combinators1, combinators2) { + var t1, _0_7, t2, _0_11_isSet, _0_11, combinators, _null = null; + $label0$0: { + t1 = _null; + _0_7 = _null; + _0_7 = combinators1.length; + t2 = _0_7; + t2 = t2 > 1; + _0_11_isSet = !t2; + _0_11 = _null; + if (_0_11_isSet) { + _0_11 = combinators2.length; + t2 = _0_11; + t2 = t2 > 1; + } else + t2 = true; + if (t2) + break $label0$0; + t2 = _0_7 <= 0; + if (t2) + combinators = combinators2; + else + combinators = t1; + t1 = t2; + if (!t1) { + t1 = false; + if (_0_11_isSet) + t1 = _0_11; + else { + _0_11 = combinators2.length; + t1 = _0_11; + } + t1 = t1 <= 0; + combinators = combinators1; + } else + t1 = true; + if (t1) { + t1 = combinators; + break $label0$0; + } + t1 = B.C_ListEquality.equals$2(0, combinators1, combinators2) ? combinators1 : _null; + break $label0$0; + } + return t1; + }, + _mergeTrailingCombinators0(components1, components2, span, result) { + var _0_1, t1, _1_1, t2, t3, _4_1, _4_3, _4_5, _4_4, _4_5_isSet, _4_4_isSet, component1, component2, t4, t5, choices, _2_0, _4_9, _4_6, _4_6_isSet, _4_7, _4_7_isSet, followingComponents, nextComponents, _4_9_isSet, _4_10_isSet, _4_10, next, following, _3_0, _4_4_isSet0, siblingComponents_case_0, siblingComponents_case_1, t6, combinator2, unified, t7, combinatorComponents_case_0, descendantComponents_case_0, t0, combinator_case_1, descendantComponents_case_1, combinatorComponents_case_1, _null = null; + if (result == null) + result = A.QueueList$(_null, type$.List_List_ComplexSelectorComponent_2); + $label0$0: { + _0_1 = components1.get$length(0); + if (_0_1 >= 1) { + t1 = components1.$index(0, _0_1 - 1).combinators; + break $label0$0; + } + t1 = B.List_empty17; + break $label0$0; + } + $label1$1: { + _1_1 = components2.get$length(0); + if (_1_1 >= 1) { + t2 = components2.$index(0, _1_1 - 1).combinators; + break $label1$1; + } + t2 = B.List_empty17; + break $label1$1; + } + t3 = t1.length; + if (t3 === 0 && t2.length === 0) + return result; + if (t3 > 1 || t2.length > 1) + return _null; + $label2$2: { + t3 = A.IterableExtension_get_firstOrNull(t1); + t3 = t3 == null ? _null : t3.value; + t2 = A.IterableExtension_get_firstOrNull(t2); + t2 = [t3, t2 == null ? _null : t2.value, components1, components2]; + _4_1 = t2[0]; + _4_3 = B.Combinator_98W0 === _4_1; + t3 = _4_3; + _4_5 = _null; + _4_4 = _null; + if (t3) { + _4_4 = t2[1]; + _4_5 = B.Combinator_98W0 === _4_4; + t3 = _4_5; + _4_5_isSet = true; + _4_4_isSet = true; + } else { + _4_5_isSet = false; + _4_4_isSet = false; + t3 = false; + } + if (t3) { + component1 = components1.removeLast$0(0); + component2 = components2.removeLast$0(0); + t2 = component1.selector; + t3 = component2.selector; + if (A.compoundIsSuperselector0(t2, t3, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component2], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + else { + t4 = type$.JSArray_ComplexSelectorComponent_2; + t5 = type$.JSArray_List_ComplexSelectorComponent_2; + if (A.compoundIsSuperselector0(t3, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([component1], t4)], t5)); + else { + choices = A._setArrayType([A._setArrayType([component1, component2], t4), A._setArrayType([component2, component1], t4)], t5); + _2_0 = A.unifyCompound0(t2, t3); + if (_2_0 != null) + choices.push(A._setArrayType([new A.ComplexSelectorComponent0(_2_0, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator_2), type$.CssValue_Combinator_2), span)], t4)); + result.addFirst$1(choices); + } + } + break $label2$2; + } + _4_9 = _null; + _4_6 = _null; + _4_6_isSet = false; + _4_7 = _null; + _4_7_isSet = false; + followingComponents = _null; + nextComponents = _null; + t3 = false; + if (_4_3) { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + _4_9 = B.Combinator_sHB0 === t4; + t4 = _4_9; + if (t4) { + _4_6 = t2[2]; + _4_7 = t2[3]; + nextComponents = _4_7; + followingComponents = _4_6; + _4_6_isSet = true; + _4_7_isSet = true; + t3 = true; + } + _4_9_isSet = true; + } else + _4_9_isSet = false; + _4_10_isSet = !t3; + _4_10 = _null; + t3 = true; + if (_4_10_isSet) { + _4_10 = B.Combinator_sHB0 === _4_1; + t4 = _4_10; + if (t4) { + if (_4_5_isSet) + t4 = _4_5; + else { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + _4_5 = B.Combinator_98W0 === t4; + t4 = _4_5; + _4_5_isSet = true; + } + if (t4) { + if (_4_6_isSet) + nextComponents = _4_6; + else { + _4_6 = t2[2]; + nextComponents = _4_6; + _4_6_isSet = true; + } + if (_4_7_isSet) + followingComponents = _4_7; + else { + _4_7 = t2[3]; + followingComponents = _4_7; + _4_7_isSet = true; + } + } else + t3 = false; + } else + t3 = false; + } + if (t3) { + next = nextComponents.removeLast$0(0); + following = followingComponents.removeLast$0(0); + t1 = following.selector; + t2 = next.selector; + t3 = type$.JSArray_ComplexSelectorComponent_2; + t4 = type$.JSArray_List_ComplexSelectorComponent_2; + if (A.compoundIsSuperselector0(t1, t2, _null)) + result.addFirst$1(A._setArrayType([A._setArrayType([next], t3)], t4)); + else { + t4 = A._setArrayType([A._setArrayType([following, next], t3)], t4); + _3_0 = A.unifyCompound0(t1, t2); + if (_3_0 != null) + t4.push(A._setArrayType([new A.ComplexSelectorComponent0(_3_0, A.List_List$unmodifiable(next.combinators, type$.CssValue_Combinator_2), span)], t3)); + result.addFirst$1(t4); + } + break $label2$2; + } + t3 = _null; + t4 = false; + if (B.Combinator_iUF0 === _4_1) { + _4_4_isSet0 = true; + if (_4_9_isSet) + t5 = _4_9; + else { + if (_4_4_isSet) + t5 = _4_4; + else { + _4_4 = t2[1]; + t5 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + _4_9 = B.Combinator_sHB0 === t5; + t5 = _4_9; + } + if (!t5) + if (_4_5_isSet) + t5 = _4_5; + else { + if (_4_4_isSet) + t5 = _4_4; + else { + _4_4 = t2[1]; + t5 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + _4_5 = B.Combinator_98W0 === t5; + t5 = _4_5; + } + else + t5 = true; + if (t5) { + if (_4_7_isSet) + siblingComponents_case_0 = _4_7; + else { + _4_7 = t2[3]; + siblingComponents_case_0 = _4_7; + _4_7_isSet = true; + } + t3 = siblingComponents_case_0; + t4 = true; + } + } + if (!t4) { + if (_4_10_isSet) + t4 = _4_10; + else { + _4_10 = B.Combinator_sHB0 === _4_1; + t4 = _4_10; + } + if (!t4) + t4 = _4_3; + else + t4 = true; + if (t4) { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + t4 = B.Combinator_iUF0 === t4; + if (t4) { + if (_4_6_isSet) + siblingComponents_case_1 = _4_6; + else { + _4_6 = t2[2]; + siblingComponents_case_1 = _4_6; + _4_6_isSet = true; + } + t3 = siblingComponents_case_1; + } + } else + t4 = false; + } else + t4 = true; + if (t4) { + result.addFirst$1(A._setArrayType([A._setArrayType([t3.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + break $label2$2; + } + t3 = _4_1 == null; + t4 = !t3; + t5 = false; + if (t4) { + _4_4_isSet0 = true; + if (_4_4_isSet) + t6 = _4_4; + else { + _4_4 = t2[1]; + t6 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + if (t6 != null) { + if (_4_4_isSet) + combinator2 = _4_4; + else { + _4_4 = t2[1]; + combinator2 = _4_4; + _4_4_isSet = _4_4_isSet0; + } + t5 = _4_1 === (combinator2 == null ? type$.Combinator_2._as(combinator2) : combinator2); + } + } + if (t5) { + unified = A.unifyCompound0(components1.removeLast$0(0).selector, components2.removeLast$0(0).selector); + if (unified == null) + return _null; + result.addFirst$1(A._setArrayType([A._setArrayType([new A.ComplexSelectorComponent0(unified, A.List_List$unmodifiable(A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_CssValue_Combinator_2), type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + break $label2$2; + } + t1 = _null; + t5 = _null; + t6 = _null; + t7 = false; + if (t4) { + if (_4_4_isSet) + t4 = _4_4; + else { + _4_4 = t2[1]; + t4 = _4_4; + _4_4_isSet = true; + } + t4 = t4 == null; + if (t4) { + if (_4_6_isSet) + combinatorComponents_case_0 = _4_6; + else { + _4_6 = t2[2]; + combinatorComponents_case_0 = _4_6; + _4_6_isSet = true; + } + if (_4_7_isSet) + descendantComponents_case_0 = _4_7; + else { + _4_7 = t2[3]; + descendantComponents_case_0 = _4_7; + _4_7_isSet = true; + } + t1 = descendantComponents_case_0; + t6 = t1; + t1 = _4_1; + t5 = combinatorComponents_case_0; + } + t0 = t6; + t6 = t4; + t4 = t5; + t5 = t0; + } else { + t4 = t5; + t5 = t6; + t6 = t7; + } + if (!t6) + if (t3) { + if (_4_4_isSet) + t3 = _4_4; + else { + _4_4 = t2[1]; + t3 = _4_4; + _4_4_isSet = true; + } + t3 = t3 != null; + if (t3) { + combinator_case_1 = _4_4_isSet ? _4_4 : t2[1]; + if (combinator_case_1 == null) + combinator_case_1 = type$.Combinator_2._as(combinator_case_1); + descendantComponents_case_1 = _4_6_isSet ? _4_6 : t2[2]; + combinatorComponents_case_1 = _4_7_isSet ? _4_7 : t2[3]; + t1 = combinatorComponents_case_1; + t2 = descendantComponents_case_1; + t4 = t2; + t2 = t1; + t1 = combinator_case_1; + } else { + t2 = t4; + t4 = t5; + } + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t3 = t5; + t2 = t4; + t4 = false; + } + else { + t3 = t5; + t2 = t4; + t4 = true; + } + if (t4) { + if (t1 === B.Combinator_iUF0) { + t1 = A.IterableExtension_get_lastOrNull(t3); + t1 = t1 == null ? _null : A.compoundIsSuperselector0(t1.selector, t2.get$last(t2).selector, _null); + t1 = t1 === true; + } else + t1 = false; + if (t1) + t3.removeLast$0(0); + result.addFirst$1(A._setArrayType([A._setArrayType([t2.removeLast$0(0)], type$.JSArray_ComplexSelectorComponent_2)], type$.JSArray_List_ComplexSelectorComponent_2)); + break $label2$2; + } + return _null; + } + return A._mergeTrailingCombinators0(components1, components2, span, result); + }, + _mustUnify0(complex1, complex2) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector_2); + for (t2 = J.get$iterator$ax(complex1); t2.moveNext$0();) + for (t3 = B.JSArray_methods.get$iterator(t2.get$current(t2).selector.components), t4 = new A.WhereIterator(t3, A.functions0___isUnique$closure()); t4.moveNext$0();) + t1.add$1(0, t3.get$current(0)); + if (t1._collection$_length === 0) + return false; + return J.any$1$ax(complex2, new A._mustUnify_closure0(t1)); + }, + _isUnique0(simple) { + var t1; + if (!(simple instanceof A.IDSelector0)) + t1 = simple instanceof A.PseudoSelector0 && !simple.isClass; + else + t1 = true; + return t1; + }, + _chunks0(queue1, queue2, done, $T) { + var chunk2, _0_4, _0_7, _0_5, _0_7_isSet, _0_5_isSet, chunk, t2, _null = null, + t1 = $T._eval$1("JSArray<0>"), + chunk1 = A._setArrayType([], t1); + while (!done.call$1(queue1)) + chunk1.push(queue1.removeFirst$0()); + chunk2 = A._setArrayType([], t1); + while (!done.call$1(queue2)) + chunk2.push(queue2.removeFirst$0()); + $label0$0: { + _0_4 = chunk1.length <= 0; + t1 = _0_4; + _0_7 = _null; + if (t1) { + _0_7 = chunk2.length <= 0; + t1 = _0_7; + _0_5 = chunk2; + _0_7_isSet = true; + _0_5_isSet = true; + } else { + _0_5 = _null; + _0_7_isSet = false; + _0_5_isSet = false; + t1 = false; + } + if (t1) { + t1 = A._setArrayType([], $T._eval$1("JSArray>")); + break $label0$0; + } + if (_0_4) { + if (_0_5_isSet) + chunk = _0_5; + else { + chunk = chunk2; + _0_5 = chunk; + _0_5_isSet = true; + } + t1 = true; + } else { + chunk = _null; + t1 = false; + } + if (!t1) { + if (_0_7_isSet) + t1 = _0_7; + else { + _0_7 = (_0_5_isSet ? _0_5 : chunk2).length <= 0; + t1 = _0_7; + } + chunk = chunk1; + } else + t1 = true; + if (t1) { + t1 = A._setArrayType([chunk], $T._eval$1("JSArray>")); + break $label0$0; + } + t1 = A.List_List$_of(chunk1, $T); + B.JSArray_methods.addAll$1(t1, chunk2); + t2 = A.List_List$_of(chunk2, $T); + B.JSArray_methods.addAll$1(t2, chunk1); + t1 = A._setArrayType([t1, t2], $T._eval$1("JSArray>")); + break $label0$0; + } + return t1; + }, + paths0(choices, $T) { + return J.fold$2$ax(choices, A._setArrayType([A._setArrayType([], $T._eval$1("JSArray<0>"))], $T._eval$1("JSArray>")), new A.paths_closure0($T)); + }, + _groupSelectors0(complex) { + var t2, t3, t4, + groups = A.QueueList$(null, type$.List_ComplexSelectorComponent_2), + t1 = type$.JSArray_ComplexSelectorComponent_2, + group = A._setArrayType([], t1); + for (t2 = complex.$ti, t3 = new A.ListIterator(complex, complex.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t3.moveNext$0();) { + t4 = t3.__internal$_current; + if (t4 == null) + t4 = t2._as(t4); + group.push(t4); + if (t4.combinators.length === 0) { + groups._queue_list$_add$1(group); + group = A._setArrayType([], t1); + } + } + if (group.length !== 0) + groups._queue_list$_add$1(group); + return groups; + }, + listIsSuperselector0(list1, list2) { + return B.JSArray_methods.every$1(list2, new A.listIsSuperselector_closure0(list1)); + }, + _complexIsParentSuperselector0(complex1, complex2) { + var t1, base, t2; + if (J.get$length$asx(complex1) > J.get$length$asx(complex2)) + return false; + t1 = $.$get$bogusSpan0(); + base = new A.ComplexSelectorComponent0(A.CompoundSelector$0(A._setArrayType([new A.PlaceholderSelector0("", t1)], type$.JSArray_SimpleSelector_2), t1), A.List_List$unmodifiable(B.List_empty17, type$.CssValue_Combinator_2), t1); + t1 = type$.ComplexSelectorComponent_2; + t2 = A.List_List$_of(complex1, t1); + t2.push(base); + t1 = A.List_List$_of(complex2, t1); + t1.push(base); + return A.complexIsSuperselector0(t2, t1); + }, + complexIsSuperselector0(complex1, complex2) { + var t1, t2, previousCombinator, i1, i2, remaining1, remaining2, component1, t3, t4, endOfSubselector, component2, t5, combinator1, _null = null; + if (B.JSArray_methods.get$last(complex1).combinators.length !== 0) + return false; + if (B.JSArray_methods.get$last(complex2).combinators.length !== 0) + return false; + for (t1 = A._arrayInstanceType(complex2), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), previousCombinator = _null, i1 = 0, i2 = 0;; previousCombinator = combinator1) { + remaining1 = complex1.length - i1; + remaining2 = complex2.length - i2; + if (remaining1 === 0 || remaining2 === 0) + return false; + if (remaining1 > remaining2) + return false; + component1 = complex1[i1]; + t3 = component1.combinators; + if (t3.length > 1) + return false; + if (remaining1 === 1) + if (B.JSArray_methods.any$1(complex2, new A.complexIsSuperselector_closure1())) + return false; + else { + t1 = component1.selector; + t2 = B.JSArray_methods.get$last(complex2); + t3 = t1.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, complex2.length - 1) : _null; + return A.compoundIsSuperselector0(t1, t2.selector, t3); + } + for (t4 = component1.selector, endOfSubselector = i2;;) { + component2 = complex2[endOfSubselector]; + if (component2.combinators.length > 1) + return false; + t5 = t4.get$hasComplicatedSuperselectorSemantics() ? B.JSArray_methods.sublist$2(complex2, i2, endOfSubselector) : _null; + if (A.compoundIsSuperselector0(t4, component2.selector, t5)) + break; + ++endOfSubselector; + if (endOfSubselector === complex2.length - 1) + return false; + } + t4 = new A.SubListIterable(complex2, 0, endOfSubselector, t1); + t4.SubListIterable$3(complex2, 0, endOfSubselector, t2); + if (!A._compatibleWithPreviousCombinator0(previousCombinator, t4.skip$1(0, i2))) + return false; + component2 = complex2[endOfSubselector]; + combinator1 = A.IterableExtension_get_firstOrNull(t3); + if (!A._isSupercombinator0(combinator1, A.IterableExtension_get_firstOrNull(component2.combinators))) + return false; + ++i1; + i2 = endOfSubselector + 1; + if (complex1.length - i1 === 1) { + t3 = combinator1 == null; + if ((t3 ? _null : combinator1.value) === B.Combinator_98W0) { + t3 = complex2.length - 1; + t4 = new A.SubListIterable(complex2, 0, t3, t1); + t4.SubListIterable$3(complex2, 0, t3, t2); + if (!t4.skip$1(0, i2).every$1(0, new A.complexIsSuperselector_closure2(combinator1))) + return false; + } else if (!t3) + if (complex2.length - i2 > 1) + return false; + } + } + }, + _compatibleWithPreviousCombinator0(previous, parents) { + if (parents.get$isEmpty(parents)) + return true; + if (previous == null) + return true; + if (previous.value !== B.Combinator_98W0) + return false; + return parents.every$1(0, new A._compatibleWithPreviousCombinator_closure0()); + }, + _isSupercombinator0(combinator1, combinator2) { + var t2, t3, + t1 = true; + if (!J.$eq$(combinator1, combinator2)) { + t2 = combinator1 == null; + if (t2) + t3 = (combinator2 == null ? null : combinator2.value) === B.Combinator_iUF0; + else + t3 = false; + if (!t3) + if ((t2 ? null : combinator1.value) === B.Combinator_98W0) + t1 = (combinator2 == null ? null : combinator2.value) === B.Combinator_sHB0; + else + t1 = false; + } + return t1; + }, + compoundIsSuperselector0(compound1, compound2, parents) { + var t1, _0_1, _0_5, _0_5_isSet, _0_50, index1, pseudo2, index2, t2, pseudo1, t3, t4, t5, _i, simple1, _null = null; + if (!compound1.get$hasComplicatedSuperselectorSemantics() && !compound2.get$hasComplicatedSuperselectorSemantics()) { + t1 = compound1.components; + if (t1.length > compound2.components.length) + return false; + return B.JSArray_methods.every$1(t1, new A.compoundIsSuperselector_closure0(compound2)); + } + _0_1 = A._findPseudoElementIndexed0(compound1); + _0_5 = A._findPseudoElementIndexed0(compound2); + t1 = type$.Record_2_nullable_Object_and_nullable_Object; + _0_5_isSet = t1._is(_0_1); + _0_50 = _null; + index1 = _null; + pseudo2 = _null; + index2 = _null; + t2 = false; + if (_0_5_isSet) { + pseudo1 = _0_1._0; + index1 = _0_1._1; + t1 = t1._is(_0_5); + if (t1) { + pseudo2 = _0_5._0; + index2 = _0_5._1; + } + _0_50 = _0_5; + } else { + t1 = t2; + pseudo1 = _null; + } + if (t1) { + if (pseudo1.isSuperselector$1(pseudo2)) { + t1 = compound1.components; + t2 = type$.int; + t3 = A._arrayInstanceType(t1)._precomputed1; + t4 = compound2.components; + t5 = A._arrayInstanceType(t4)._precomputed1; + t1 = A._compoundComponentsIsSuperselector0(A.SubListIterable$(t1, 0, A.checkNotNullable(index1, "count", t2), t3), A.SubListIterable$(t4, 0, A.checkNotNullable(index2, "count", t2), t5), parents) && A._compoundComponentsIsSuperselector0(A.SubListIterable$(t1, index1 + 1, _null, t3), A.SubListIterable$(t4, index2 + 1, _null, t5), parents); + } else + t1 = false; + return t1; + } + if (_0_1 == null) + t1 = (_0_5_isSet ? _0_50 : _0_5) != null; + else + t1 = true; + if (t1) + return false; + for (t1 = compound1.components, t2 = t1.length, t3 = compound2.components, _i = 0; _i < t2; ++_i) { + simple1 = t1[_i]; + if (simple1 instanceof A.PseudoSelector0) + t4 = simple1.selector != null; + else + t4 = false; + if (t4) { + if (!A._selectorPseudoIsSuperselector0(simple1, compound2, parents)) + return false; + } else if (!B.JSArray_methods.any$1(t3, simple1.get$isSuperselector())) + return false; + } + return true; + }, + _findPseudoElementIndexed0(compound) { + var t1, t2, i, simple; + for (t1 = compound.components, t2 = t1.length, i = 0; i < t2; ++i) { + simple = t1[i]; + if (simple instanceof A.PseudoSelector0 && !simple.isClass) + return new A._Record_2(simple, i); + } + return null; + }, + _compoundComponentsIsSuperselector0(compound1, compound2, parents) { + var t1; + if (compound1.get$length(0) === 0) + return true; + if (compound2.get$length(0) === 0) + compound2 = A._setArrayType([new A.UniversalSelector0("*", $.$get$bogusSpan0())], type$.JSArray_SimpleSelector_2); + t1 = $.$get$bogusSpan0(); + return A.compoundIsSuperselector0(A.CompoundSelector$0(compound1, t1), A.CompoundSelector$0(compound2, t1), parents); + }, + _selectorPseudoIsSuperselector0(pseudo1, compound2, parents) { + var selector1 = pseudo1.selector; + if (selector1 == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo1.toString$0(0) + " must have a selector argument.", null)); + switch (pseudo1.normalizedName) { + case "is": + case "matches": + case "any": + case "where": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure6(selector1)) || B.JSArray_methods.any$1(selector1.components, new A._selectorPseudoIsSuperselector_closure7(parents, compound2)); + case "has": + case "host": + case "host-context": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure8(selector1)); + case "slotted": + return A._selectorPseudoArgs0(compound2, pseudo1.name, false).any$1(0, new A._selectorPseudoIsSuperselector_closure9(selector1)); + case "not": + return B.JSArray_methods.every$1(selector1.components, new A._selectorPseudoIsSuperselector_closure10(compound2, pseudo1)); + case "current": + return A._selectorPseudoArgs0(compound2, pseudo1.name, true).any$1(0, new A._selectorPseudoIsSuperselector_closure11(selector1)); + case "nth-child": + case "nth-last-child": + return B.JSArray_methods.any$1(compound2.components, new A._selectorPseudoIsSuperselector_closure12(pseudo1, selector1)); + default: + throw A.wrapException("unreachable"); + } + }, + _selectorPseudoArgs0(compound, $name, isClass) { + var t1 = type$.WhereTypeIterable_PseudoSelector_2; + return new A.NonNullsIterable(new A.MappedIterable(new A.WhereIterable(new A.WhereTypeIterable(compound.components, t1), new A._selectorPseudoArgs_closure1(isClass, $name), t1._eval$1("WhereIterable")), new A._selectorPseudoArgs_closure2(), t1._eval$1("MappedIterable")), type$.NonNullsIterable_SelectorList_2); + }, + unifyComplex_closure0: function unifyComplex_closure0() { + }, + _weaveParents_closure3: function _weaveParents_closure3(t0) { + this.span = t0; + }, + _weaveParents_closure4: function _weaveParents_closure4(t0) { + this.group = t0; + }, + _weaveParents_closure5: function _weaveParents_closure5() { + }, + _weaveParents_closure6: function _weaveParents_closure6() { + }, + _mustUnify_closure0: function _mustUnify_closure0(t0) { + this.uniqueSelectors = t0; + }, + _mustUnify__closure0: function _mustUnify__closure0(t0) { + this.uniqueSelectors = t0; + }, + paths_closure0: function paths_closure0(t0) { + this.T = t0; + }, + paths__closure0: function paths__closure0(t0, t1) { + this.paths = t0; + this.T = t1; + }, + paths___closure0: function paths___closure0(t0, t1) { + this.option = t0; + this.T = t1; + }, + listIsSuperselector_closure0: function listIsSuperselector_closure0(t0) { + this.list1 = t0; + }, + listIsSuperselector__closure0: function listIsSuperselector__closure0(t0) { + this.complex1 = t0; + }, + complexIsSuperselector_closure1: function complexIsSuperselector_closure1() { + }, + complexIsSuperselector_closure2: function complexIsSuperselector_closure2(t0) { + this.combinator1 = t0; + }, + _compatibleWithPreviousCombinator_closure0: function _compatibleWithPreviousCombinator_closure0() { + }, + compoundIsSuperselector_closure0: function compoundIsSuperselector_closure0(t0) { + this.compound2 = t0; + }, + _selectorPseudoIsSuperselector_closure6: function _selectorPseudoIsSuperselector_closure6(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure7: function _selectorPseudoIsSuperselector_closure7(t0, t1) { + this.parents = t0; + this.compound2 = t1; + }, + _selectorPseudoIsSuperselector_closure8: function _selectorPseudoIsSuperselector_closure8(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure9: function _selectorPseudoIsSuperselector_closure9(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure10: function _selectorPseudoIsSuperselector_closure10(t0, t1) { + this.compound2 = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector__closure0: function _selectorPseudoIsSuperselector__closure0(t0, t1) { + this.complex = t0; + this.pseudo1 = t1; + }, + _selectorPseudoIsSuperselector___closure1: function _selectorPseudoIsSuperselector___closure1(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector___closure2: function _selectorPseudoIsSuperselector___closure2(t0) { + this.simple2 = t0; + }, + _selectorPseudoIsSuperselector_closure11: function _selectorPseudoIsSuperselector_closure11(t0) { + this.selector1 = t0; + }, + _selectorPseudoIsSuperselector_closure12: function _selectorPseudoIsSuperselector_closure12(t0, t1) { + this.pseudo1 = t0; + this.selector1 = t1; + }, + _selectorPseudoArgs_closure1: function _selectorPseudoArgs_closure1(t0, t1) { + this.isClass = t0; + this.name = t1; + }, + _selectorPseudoArgs_closure2: function _selectorPseudoArgs_closure2() { + }, + globalFunctions_closure0: function globalFunctions_closure0() { + }, + GamutMapMethod_GamutMapMethod$fromName0($name) { + var t1; + $label0$0: { + if ("clip" === $name) { + t1 = B.ClipGamutMap_clip0; + break $label0$0; + } + if ("local-minde" === $name) { + t1 = B.LocalMindeGamutMap_A2x0; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$0('Unknown gamut map method "' + $name + '".', null)); + } + return t1; + }, + GamutMapMethod0: function GamutMapMethod0() { + }, + HslColorSpace0: function HslColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + HwbColorSpace0: function HwbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + HwbColorSpace_convert_toRgb0: function HwbColorSpace_convert_toRgb0(t0, t1) { + this._box_0 = t0; + this.factor = t1; + }, + InterpolatedIDSelector: function InterpolatedIDSelector(t0) { + this.name = t0; + }, + IDSelector0: function IDSelector0(t0, t1) { + this.name = t0; + this.span = t1; + }, + IDSelector_unify_closure0: function IDSelector_unify_closure0(t0) { + this.$this = t0; + }, + IfConditionOperation$0(expressions, op) { + var t1 = A.List_List$unmodifiable(expressions, type$.IfConditionExpression_2); + if (t1.length < 2) + A.throwExpression(A.ArgumentError$value(t1, "expressions", "must have length >= 2")); + return new A.IfConditionOperation0(t1, op); + }, + IfExpression0: function IfExpression0(t0, t1) { + this.branches = t0; + this.span = t1; + }, + IfConditionExpression0: function IfConditionExpression0() { + }, + IfConditionParenthesized0: function IfConditionParenthesized0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + IfConditionNegation0: function IfConditionNegation0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + IfConditionOperation0: function IfConditionOperation0(t0, t1) { + this.expressions = t0; + this.op = t1; + }, + IfConditionOperation_toInterpolation_closure0: function IfConditionOperation_toInterpolation_closure0(t0) { + this.$this = t0; + }, + IfConditionFunction0: function IfConditionFunction0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + IfConditionSass0: function IfConditionSass0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + IfConditionRaw0: function IfConditionRaw0(t0) { + this.text = t0; + }, + JSIfConditionExpressionVisitor: function JSIfConditionExpressionVisitor(t0) { + this._if_condition_expression$_inner = t0; + }, + JSIfConditionExpressionVisitorObject: function JSIfConditionExpressionVisitorObject() { + }, + IfClause$0(expression, children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2); + return new A.IfClause0(expression, t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure0())); + }, + ElseClause$0(children) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2); + return new A.ElseClause0(t1, B.JSArray_methods.any$1(t1, new A.IfRuleClause$__closure0())); + }, + IfRule0: function IfRule0(t0, t1, t2) { + this.clauses = t0; + this.lastClause = t1; + this.span = t2; + }, + IfRule_toString_closure0: function IfRule_toString_closure0() { + }, + IfRuleClause0: function IfRuleClause0() { + }, + IfRuleClause$__closure0: function IfRuleClause$__closure0() { + }, + IfRuleClause$___closure0: function IfRuleClause$___closure0() { + }, + IfClause0: function IfClause0(t0, t1, t2) { + this.expression = t0; + this.children = t1; + this.hasDeclarations = t2; + }, + ElseClause0: function ElseClause0(t0, t1) { + this.children = t0; + this.hasDeclarations = t1; + }, + jsToDartList(list) { + return self.immutable.isOrderedMap(list) ? J.toArray$0$x(type$.ImmutableList._as(list)) : type$.List_dynamic._as(list); + }, + dartMapToImmutableMap(dartMap) { + var t1, t2, + immutableMap = J.asMutable$0$x(new self.immutable.OrderedMap()); + for (t1 = A.MapExtensions_get_pairs0(dartMap, type$.Object, type$.nullable_Object), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + immutableMap = J.$set$2$x(immutableMap, t2._0, t2._1); + } + return J.asImmutable$0$x(immutableMap); + }, + immutableMapToDartMap(immutableMap) { + var dartMap = A.LinkedHashMap_LinkedHashMap$_empty(type$.Object, type$.nullable_Object); + J.forEach$1$ax(immutableMap, A.allowInterop(new A.immutableMapToDartMap_closure(dartMap))); + return dartMap; + }, + ImmutableList0: function ImmutableList0() { + }, + ImmutableMap0: function ImmutableMap0() { + }, + immutableMapToDartMap_closure: function immutableMapToDartMap_closure(t0) { + this.dartMap = t0; + }, + NodeImporter__addSassPath(includePaths) { + return new A._SyncStarIterable(A.NodeImporter__addSassPath$body(includePaths), type$._SyncStarIterable_String); + }, + NodeImporter__addSassPath$body($async$includePaths) { + return function() { + var includePaths = $async$includePaths; + var $async$goto = 0, $async$handler = 2, $async$errorStack = [], sassPath, t1; + return function $async$NodeImporter__addSassPath($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return $async$iterator._yieldStar$1(includePaths); + case 3: + // after yield + sassPath = A.getEnvironmentVariable0("SASS_PATH"); + if (sassPath == null) { + // goto return + $async$goto = 1; + break; + } + t1 = A.isNodeJs() ? self.process : null; + $async$goto = 4; + return $async$iterator._yieldStar$1(A._setArrayType(sassPath.split(J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32") ? ";" : ":"), type$.JSArray_String)); + case 4: + // after yield + case 1: + // return + return 0; + case 2: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + }, + NodeImporter: function NodeImporter(t0, t1, t2) { + this._implementation$_options = t0; + this._includePaths = t1; + this._implementation$_importers = t2; + }, + NodeImporter_load_closure: function NodeImporter_load_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.forImport = t2; + _.url = t3; + _.previousString = t4; + }, + NodeImporter__tryPath_closure: function NodeImporter__tryPath_closure(t0) { + this.path = t0; + }, + NodeImporter__tryPath_closure0: function NodeImporter__tryPath_closure0() { + }, + NodeImporter__callImporterAsync_closure: function NodeImporter__callImporterAsync_closure(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.forImport = t2; + _.url = t3; + _.previousString = t4; + _.completer = t5; + }, + ModifiableCssImport0: function ModifiableCssImport0(t0, t1, t2) { + var _ = this; + _.url = t0; + _.modifiers = t1; + _.span = t2; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + ImportCache$0(importers, loadPaths, packageConfig) { + var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, + t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2, + t3 = type$.Uri; + return new A.ImportCache0(A.ImportCache__toImporters0(importers, loadPaths, packageConfig), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.DateTime)); + }, + ImportCache$none() { + var t1 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, + t2 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2, + t3 = type$.Uri; + return new A.ImportCache0(B.List_empty28, A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t1), A.LinkedHashMap_LinkedHashMap$_empty(t2, t3), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.ImporterResult_2), A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.DateTime)); + }, + ImportCache__toImporters0(importers, loadPaths, packageConfig) { + var t1, t2, t3, t4, _i, path, _null = null, + sassPath = A.getEnvironmentVariable0("SASS_PATH"); + if (A.isBrowser()) { + t1 = A._setArrayType([], type$.JSArray_Importer_2); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + return t1; + } + t1 = A._setArrayType([], type$.JSArray_Importer_2); + if (importers != null) + B.JSArray_methods.addAll$1(t1, importers); + if (loadPaths != null) + for (t2 = J.get$iterator$ax(loadPaths); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + if (sassPath != null) { + t2 = A.isNodeJs() ? self.process : _null; + t3 = sassPath.split(J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32") ? ";" : ":"); + t4 = t3.length; + _i = 0; + for (; _i < t4; ++_i) { + path = t3[_i]; + t1.push(new A.FilesystemImporter0($.$get$context().absolute$15(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), false)); + } + } + return t1; + }, + ImportCache0: function ImportCache0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._import_cache$_importers = t0; + _._import_cache$_canonicalizeCache = t1; + _._import_cache$_perImporterCanonicalizeCache = t2; + _._import_cache$_nonCanonicalRelativeUrls = t3; + _._import_cache$_importCache = t4; + _._import_cache$_resultsCache = t5; + _._import_cache$_loadTimes = t6; + }, + ImportCache_canonicalize_closure0: function ImportCache_canonicalize_closure0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.baseImporter = t1; + _.resolvedUrl = t2; + _.baseUrl = t3; + _.forImport = t4; + _.key = t5; + _.url = t6; + }, + ImportCache__canonicalize_closure0: function ImportCache__canonicalize_closure0(t0, t1) { + this.importer = t0; + this.url = t1; + }, + ImportCache_importCanonical_closure0: function ImportCache_importCanonical_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.importer = t1; + _.canonicalUrl = t2; + _.originalUrl = t3; + }, + ImportCache_humanize_closure3: function ImportCache_humanize_closure3(t0) { + this.canonicalUrl = t0; + }, + ImportCache_humanize_closure4: function ImportCache_humanize_closure4() { + }, + ImportCache_humanize_closure5: function ImportCache_humanize_closure5() { + }, + ImportCache_humanize_closure6: function ImportCache_humanize_closure6(t0) { + this.canonicalUrl = t0; + }, + ImportRule0: function ImportRule0(t0, t1) { + this.imports = t0; + this.span = t1; + }, + JSImporter: function JSImporter() { + }, + JSImporterResult: function JSImporterResult() { + }, + Importer0: function Importer0() { + }, + NodeImporterResult0: function NodeImporterResult0() { + }, + IncludeRule0: function IncludeRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.originalName = t2; + _.$arguments = t3; + _.content = t4; + _.span = t5; + }, + InterpolatedFunctionExpression0: function InterpolatedFunctionExpression0(t0, t1, t2) { + this.name = t0; + this.$arguments = t1; + this.span = t2; + }, + InterpolatedSelector: function InterpolatedSelector() { + }, + Interpolation$0(contents, spans, span) { + var t1 = new A.Interpolation0(A.List_List$unmodifiable(contents, type$.Object), A.List_List$unmodifiable(spans, type$.nullable_FileSpan), span); + t1.Interpolation$30(contents, spans, span); + return t1; + }, + Interpolation0: function Interpolation0(t0, t1, t2) { + this.contents = t0; + this.spans = t1; + this.span = t2; + }, + Interpolation_toString_closure0: function Interpolation_toString_closure0() { + }, + SupportsInterpolation0: function SupportsInterpolation0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + InterpolationBuffer0: function InterpolationBuffer0(t0, t1, t2) { + this._interpolation_buffer0$_text = t0; + this._interpolation_buffer0$_contents = t1; + this._interpolation_buffer0$_spans = t2; + }, + InterpolationMap$0(_interpolation, targetOffsets) { + var t1 = A.List_List$unmodifiable(targetOffsets, type$.int), + t2 = _interpolation.contents.length, + expectedLocations = Math.max(0, t2 - 1); + if (t1.length !== expectedLocations) + A.throwExpression(A.ArgumentError$("InterpolationMap must have " + A.S(expectedLocations) + " targetOffsets if the interpolation has " + t2 + " components.", null)); + return new A.InterpolationMap0(_interpolation, t1); + }, + InterpolationMap0: function InterpolationMap0(t0, t1) { + this._interpolation_map$_interpolation = t0; + this._interpolation_map$_targetOffsets = t1; + }, + InterpolationMap_mapException_closure0: function InterpolationMap_mapException_closure0() { + }, + InterpolationMethod$0(space, hue) { + var t1; + if (space.get$isPolarInternal()) + t1 = hue == null ? B.HueInterpolationMethod_00 : hue; + else + t1 = null; + if (!space.get$isPolarInternal() && hue != null) + A.throwExpression(A.ArgumentError$(string$.Hue_in + space.toString$0(0) + ".", null)); + return new A.InterpolationMethod0(space, t1); + }, + InterpolationMethod_InterpolationMethod$fromValue0(value, $name) { + var t1, space, hueMethod, + list = value.assertCommonListStyle$2$allowSlash($name, false); + if (list.length === 0) + throw A.wrapException(A.SassScriptException$0(string$.Expecta, $name)); + t1 = B.JSArray_methods.get$first(list).assertString$1($name); + t1.assertUnquoted$1($name); + space = A.ColorSpace_fromName0(t1._string0$_text, $name); + if (list.length === 1) + return A.InterpolationMethod$0(space, null); + hueMethod = A.HueInterpolationMethod_HueInterpolationMethod$_fromValue0(list[1], $name); + if (list.length === 2) + throw A.wrapException(A.SassScriptException$0('Expected unquoted string "hue" after ' + value.toString$0(0) + ".", $name)); + else { + t1 = list[2].assertString$1($name); + t1.assertUnquoted$1($name); + if (t1._string0$_text.toLowerCase() !== "hue") + throw A.wrapException(A.SassScriptException$0(string$.Expectu + value.toString$0(0) + ", was " + list[2].toString$0(0) + ".", $name)); + else if (list.length > 3) + throw A.wrapException(A.SassScriptException$0('Expected nothing after "hue" in ' + value.toString$0(0) + ".", $name)); + else if (!space.get$isPolarInternal()) + throw A.wrapException(A.SassScriptException$0('Hue interpolation method "' + hueMethod.toString$0(0) + string$.x20hue__ + space.toString$0(0) + ".", $name)); + } + return A.InterpolationMethod$0(space, hueMethod); + }, + HueInterpolationMethod_HueInterpolationMethod$_fromValue0(value, $name) { + var _0_0, + t1 = value.assertString$1($name); + t1.assertUnquoted$0(); + _0_0 = t1._string0$_text.toLowerCase(); + $label0$0: { + if ("shorter" === _0_0) { + t1 = B.HueInterpolationMethod_00; + break $label0$0; + } + if ("longer" === _0_0) { + t1 = B.HueInterpolationMethod_10; + break $label0$0; + } + if ("increasing" === _0_0) { + t1 = B.HueInterpolationMethod_20; + break $label0$0; + } + if ("decreasing" === _0_0) { + t1 = B.HueInterpolationMethod_30; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$0("Unknown hue interpolation method " + value.toString$0(0) + ".", $name)); + } + return t1; + }, + InterpolationMethod0: function InterpolationMethod0(t0, t1) { + this.space = t0; + this.hue = t1; + }, + HueInterpolationMethod0: function HueInterpolationMethod0(t0, t1) { + this.index = t0; + this._name = t1; + }, + _realCasePath0(path) { + var prefix, _null = null, + t1 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : _null; + t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (!t1) + return path; + t1 = A.isNodeJs() ? self.process : _null; + if (J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + prefix = B.JSString_methods.substring$2(path, 0, $.$get$context().style.rootLength$1(path)); + t1 = prefix.length; + if (t1 !== 0 && A.CharacterExtension_get_isAlphabetic0(prefix.charCodeAt(0))) + path = prefix.toUpperCase() + B.JSString_methods.substring$1(path, t1); + } + return new A._realCasePath_helper0().call$1(path); + }, + _realCasePath_helper0: function _realCasePath_helper0() { + }, + _realCasePath_helper_closure0: function _realCasePath_helper_closure0(t0, t1, t2, t3) { + var _ = this; + _.path = t0; + _.realPath = t1; + _.helper = t2; + _.dirname = t3; + }, + _realCasePath_helper__closure0: function _realCasePath_helper__closure0(t0) { + this.basename = t0; + }, + IsCalculationSafeVisitor0: function IsCalculationSafeVisitor0() { + }, + IsCalculationSafeVisitor_visitListExpression_closure0: function IsCalculationSafeVisitor_visitListExpression_closure0(t0) { + this.$this = t0; + }, + IsPlainCssVisitor0: function IsPlainCssVisitor0(t0) { + this._is_plain_css$_allowInterpolation = t0; + }, + IsPlainCssVisitor_visitIfExpression_closure0: function IsPlainCssVisitor_visitIfExpression_closure0(t0) { + this.$this = t0; + }, + IsPlainCssVisitor_visitListExpression_closure0: function IsPlainCssVisitor_visitListExpression_closure0(t0) { + this.$this = t0; + }, + IsPlainCssVisitor_visitIfConditionOperation_closure0: function IsPlainCssVisitor_visitIfConditionOperation_closure0(t0) { + this.$this = t0; + }, + IsPlainCssVisitor__visitArgumentList_closure0: function IsPlainCssVisitor__visitArgumentList_closure0(t0) { + this.$this = t0; + }, + printError0(message) { + var t2, + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) { + t1 = J.get$stderr$x(t1); + J.write$1$x(t1, A.S(message) + "\n"); + } else { + t1 = self.console; + t2 = J.toString$0$(message); + J.error$1$x(t1, t2); + } + }, + readFile0(path) { + var contents, sourceFile, t1, i; + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("readFile() is only supported on Node.js")); + contents = A._asString(A._readFile0(path, "utf8")); + if (!B.JSString_methods.contains$1(contents, "\ufffd")) + return contents; + sourceFile = A.SourceFile$fromString(contents, $.$get$context().toUri$1(path)); + for (t1 = contents.length, i = 0; i < t1; ++i) { + if (contents.charCodeAt(i) !== 65533) + continue; + throw A.wrapException(A.SassException$0("Invalid UTF-8.", A.FileLocation$_(sourceFile, i).pointSpan$0(), null)); + } + return contents; + }, + _readFile0(path, encoding) { + return A._systemErrorToFileSystemException0(new A._readFile_closure0(path, encoding)); + }, + fileExists0(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$(string$.fileEx)); + return A._systemErrorToFileSystemException0(new A.fileExists_closure0(path)); + }, + dirExists0(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("dirExists() is only supported on Node.js")); + return A._systemErrorToFileSystemException0(new A.dirExists_closure0(path)); + }, + linkExists0(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$(string$.linkEx)); + return A._systemErrorToFileSystemException0(new A.linkExists_closure0(path)); + }, + listDir0(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("listDir() is only supported on Node.js")); + return A._systemErrorToFileSystemException0(new A.listDir_closure0(false, path)); + }, + realpath0(path) { + if (!A.isNodeJs()) + throw A.wrapException(A.UnsupportedError$("listDir() is only supported on Node.js")); + return A._systemErrorToFileSystemException0(new A.realpath_closure0(path)); + }, + getEnvironmentVariable0($name) { + var t1 = A.isNodeJs() ? self.process : null, + env = t1 == null ? null : J.get$env$x(t1); + if (env == null) + t1 = null; + else + t1 = A._asStringQ(env[$name]); + return t1; + }, + _systemErrorToFileSystemException0(callback) { + var error, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + if (!type$.JsSystemError._is(error)) + throw exception; + t1 = error; + t2 = J.getInterceptor$x(t1); + throw A.wrapException(new A.FileSystemException0(J.substring$2$s(t2.get$message(t1), (A.S(t2.get$code(t1)) + ": ").length, J.get$length$asx(t2.get$message(t1)) - (", " + A.S(t2.get$syscall(t1)) + " '" + A.S(t2.get$path(t1)) + "'").length), J.get$path$x(error))); + } + }, + hasTerminal0() { + var t1 = A.isNodeJs() ? self.process : null; + return J.$eq$(t1 == null ? null : J.get$isTTY$x(J.get$stdout$x(t1)), true); + }, + FileSystemException0: function FileSystemException0(t0, t1) { + this.message = t0; + this.path = t1; + }, + _readFile_closure0: function _readFile_closure0(t0, t1) { + this.path = t0; + this.encoding = t1; + }, + fileExists_closure0: function fileExists_closure0(t0) { + this.path = t0; + }, + dirExists_closure0: function dirExists_closure0(t0) { + this.path = t0; + }, + linkExists_closure0: function linkExists_closure0(t0) { + this.path = t0; + }, + listDir_closure0: function listDir_closure0(t0, t1) { + this.recursive = t0; + this.path = t1; + }, + listDir__closure1: function listDir__closure1(t0) { + this.path = t0; + }, + listDir__closure2: function listDir__closure2() { + }, + listDir_closure_list0: function listDir_closure_list0() { + }, + listDir__list_closure0: function listDir__list_closure0(t0, t1) { + this.parent = t0; + this.list = t1; + }, + realpath_closure0: function realpath_closure0(t0) { + this.path = t0; + }, + main() { + J.set$compile$x(self.exports, A.allowInteropNamed("sass.compile", A.compile__compile$closure())); + J.set$compileString$x(self.exports, A.allowInteropNamed("sass.compileString", A.compile__compileString$closure())); + J.set$compileAsync$x(self.exports, A.allowInteropNamed("sass.compileAsync", A.compile__compileAsync$closure())); + J.set$compileStringAsync$x(self.exports, A.allowInteropNamed("sass.compileStringAsync", A.compile__compileStringAsync$closure())); + J.set$initCompiler$x(self.exports, A.allowInteropNamed("sass.initCompiler", A.compiler__initCompiler$closure())); + J.set$initAsyncCompiler$x(self.exports, A.allowInteropNamed("sass.initAsyncCompiler", A.compiler__initAsyncCompiler$closure())); + J.set$Compiler$x(self.exports, $.$get$compilerClass()); + J.set$AsyncCompiler$x(self.exports, $.$get$asyncCompilerClass()); + J.set$Value$x(self.exports, $.$get$valueClass()); + J.set$SassBoolean$x(self.exports, $.$get$booleanClass()); + J.set$SassArgumentList$x(self.exports, $.$get$argumentListClass()); + J.set$SassCalculation$x(self.exports, $.$get$calculationClass()); + J.set$CalculationOperation$x(self.exports, $.$get$calculationOperationClass()); + J.set$CalculationInterpolation$x(self.exports, $.$get$calculationInterpolationClass()); + J.set$SassColor$x(self.exports, $.$get$colorClass()); + J.set$SassFunction$x(self.exports, $.$get$functionClass()); + J.set$SassMixin$x(self.exports, $.$get$mixinClass()); + J.set$SassList$x(self.exports, $.$get$listClass()); + J.set$SassMap$x(self.exports, $.$get$mapClass()); + J.set$SassNumber$x(self.exports, $.$get$numberClass()); + J.set$SassString$x(self.exports, $.$get$stringClass()); + J.set$sassNull$x(self.exports, B.C__SassNull0); + J.set$sassTrue$x(self.exports, B.SassBoolean_true0); + J.set$sassFalse$x(self.exports, B.SassBoolean_false0); + J.set$Exception$x(self.exports, $.$get$exceptionClass()); + J.set$Logger$x(self.exports, {silent: {warn: A.allowInteropNamed("sass.Logger.silent.warn", new A.main_closure()), debug: A.allowInteropNamed("sass.Logger.silent.debug", new A.main_closure0())}}); + J.set$NodePackageImporter$x(self.exports, $.$get$nodePackageImporterClass()); + J.set$deprecations$x(self.exports, A.jsify($.$get$deprecations())); + J.set$Version$x(self.exports, $.$get$versionClass()); + J.set$loadParserExports_$x(self.exports, A.allowInterop(A.parser0__loadParserExports$closure())); + J.set$info$x(self.exports, "dart-sass\t1.100.0\t(Sass Compiler)\t[Dart]\ndart2js\t3.12.0\t(Dart Compiler)\t[Dart]"); + A.updateCanonicalizeContextPrototype(); + A.updateSourceSpanPrototype(); + J.set$render$x(self.exports, A.allowInteropNamed("sass.render", A.legacy__render$closure())); + J.set$renderSync$x(self.exports, A.allowInteropNamed("sass.renderSync", A.legacy__renderSync$closure())); + J.set$types$x(self.exports, {Boolean: $.$get$legacyBooleanClass(), Color: $.$get$legacyColorClass(), List: $.$get$legacyListClass(), Map: $.$get$legacyMapClass(), Null: $.$get$legacyNullClass(), Number: $.$get$legacyNumberClass(), String: $.$get$legacyStringClass(), Error: self.Error}); + J.set$NULL$x(self.exports, B.C__SassNull0); + J.set$TRUE$x(self.exports, B.SassBoolean_true0); + J.set$FALSE$x(self.exports, B.SassBoolean_false0); + }, + main_closure: function main_closure() { + }, + main_closure0: function main_closure0() { + }, + JSToDartLogger: function JSToDartLogger(t0, t1, t2) { + this._node = t0; + this._fallback = t1; + this._ascii = t2; + }, + JSToDartLogger_internalWarn_closure: function JSToDartLogger_internalWarn_closure(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.message = t1; + _.span = t2; + _.trace = t3; + _.deprecation = t4; + }, + JSToDartLogger_debug_closure: function JSToDartLogger_debug_closure(t0, t1, t2) { + this.$this = t0; + this.message = t1; + this.span = t2; + }, + ModifiableCssKeyframeBlock$0(selector, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssKeyframeBlock0(selector, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssKeyframeBlock0: function ModifiableCssKeyframeBlock0(t0, t1, t2, t3) { + var _ = this; + _.selector = t0; + _.span = t1; + _.children = t2; + _._node$_children = t3; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + KeyframeSelectorParser0: function KeyframeSelectorParser0(t0, t1) { + this.scanner = t0; + this._parser1$_interpolationMap = t1; + }, + KeyframeSelectorParser_parse_closure0: function KeyframeSelectorParser_parse_closure0(t0) { + this.$this = t0; + }, + LabColorSpace0: function LabColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + LazyFileSpan0: function LazyFileSpan0(t0) { + this._lazy_file_span0$_builder = t0; + this._lazy_file_span0$_span = null; + }, + LchColorSpace0: function LchColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + render(options, callback) { + var _0_0; + if (!A.isNodeJs()) + A.jsThrow(new self.Error("The render() method is only available in Node.js.")); + _0_0 = J.get$fiber$x(options); + if (_0_0 != null) + J.run$0$x(_0_0.call$1(A.allowInterop(new A.render_closure(callback, options)))); + else + A._renderAsync(options).then$1$2$onError(0, new A.render_closure0(callback), new A.render_closure1(callback), type$.Null); + }, + _renderAsync(options) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.RenderResult), + $async$returnValue, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, result, start, t1, file, t2, t3, logger, _0_0; + var $async$_renderAsync = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + start = new A.DateTime(Date.now(), 0, false); + t1 = J.getInterceptor$x(options); + file = A.NullableExtension_andThen0(t1.get$file(options), A.path__absolute$closure()); + t2 = t1.get$logger(options); + t3 = $._glyphs; + logger = new A.JSToDartLogger(t2, B.C_DefaultLogger0, t3 === B.C_AsciiGlyphSet); + _0_0 = t1.get$data(options); + $async$goto = _0_0 != null ? 3 : 5; + break; + case 3: + // then + t2 = A._parseImporter(options, start); + t3 = A._parsePackageImportersAsync(options, start); + t4 = A._parseFunctions(options, start, true); + t5 = t1.get$indentedSyntax(options); + t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_1_sass0 : null; + t6 = A._parseOutputStyle(t1.get$outputStyle(options)); + t7 = J.$eq$(t1.get$indentType(options), "tab"); + t8 = A._parseIndentWidth(t1.get$indentWidth(options)); + t9 = A._parseLineFeed(t1.get$linefeed(options)); + t10 = file == null ? "stdin" : $.$get$context().toUri$1(file).toString$0(0); + t11 = t1.get$quietDeps(options); + if (t11 == null) + t11 = false; + t12 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); + t13 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); + t14 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); + t15 = t1.get$verbose(options); + if (t15 == null) + t15 = false; + t1 = t1.get$charset(options); + if (t1 == null) + t1 = true; + $async$goto = 6; + return A._asyncAwait(A.compileStringAsync0(_0_0, t1, t12, t4, t13, t3, null, t8, t9, logger, t2, t11, t14, A._enableSourceMaps(options), t6, t5, t10, !t7, t15), $async$_renderAsync); + case 6: + // returning from await. + result = $async$result; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = file != null ? 7 : 9; + break; + case 7: + // then + t2 = A._parseImporter(options, start); + t3 = A._parsePackageImportersAsync(options, start); + t4 = A._parseFunctions(options, start, true); + t5 = t1.get$indentedSyntax(options); + t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_1_sass0 : null; + t6 = A._parseOutputStyle(t1.get$outputStyle(options)); + t7 = J.$eq$(t1.get$indentType(options), "tab"); + t8 = A._parseIndentWidth(t1.get$indentWidth(options)); + t9 = A._parseLineFeed(t1.get$linefeed(options)); + t10 = t1.get$quietDeps(options); + if (t10 == null) + t10 = false; + t11 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); + t12 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); + t13 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); + t14 = t1.get$verbose(options); + if (t14 == null) + t14 = false; + t1 = t1.get$charset(options); + if (t1 == null) + t1 = true; + $async$goto = 10; + return A._asyncAwait(A.compileAsync0(file, t1, t11, t4, t12, t3, t8, t9, logger, t2, t10, t13, A._enableSourceMaps(options), t6, t5, !t7, t14), $async$_renderAsync); + case 10: + // returning from await. + result = $async$result; + // goto join + $async$goto = 8; + break; + case 9: + // else + throw A.wrapException(A.ArgumentError$(string$.Either, null)); + case 8: + // join + case 4: + // join + $async$returnValue = A._newRenderResult(options, result, start); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_renderAsync, $async$completer); + }, + renderSync(options) { + var start, result, file, logger, _0_0, data, error, stackTrace, error0, stackTrace0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, exception, _null = null; + if (!A.isNodeJs()) + A.jsThrow(new self.Error("The renderSync() method is only available in Node.js.")); + try { + start = new A.DateTime(Date.now(), 0, false); + result = null; + t1 = J.getInterceptor$x(options); + file = A.NullableExtension_andThen0(t1.get$file(options), A.path__absolute$closure()); + t2 = t1.get$logger(options); + t3 = $._glyphs; + logger = new A.JSToDartLogger(t2, B.C_DefaultLogger0, t3 === B.C_AsciiGlyphSet); + _0_0 = t1.get$data(options); + data = null; + if (_0_0 != null) { + data = _0_0; + t2 = data; + t3 = A._parseImporter(options, start); + t4 = A._parsePackageImporters(options, start); + t5 = A._parseFunctions(options, start, false); + t6 = t1.get$indentedSyntax(options); + t6 = !J.$eq$(t6, false) && t6 != null ? B.Syntax_Sass_1_sass0 : _null; + t7 = A._parseOutputStyle(t1.get$outputStyle(options)); + t8 = J.$eq$(t1.get$indentType(options), "tab"); + t9 = A._parseIndentWidth(t1.get$indentWidth(options)); + t10 = A._parseLineFeed(t1.get$linefeed(options)); + t11 = file == null ? "stdin" : $.$get$context().toUri$1(file).toString$0(0); + t12 = t1.get$quietDeps(options); + if (t12 == null) + t12 = false; + t13 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); + t14 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); + t15 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); + t16 = t1.get$verbose(options); + if (t16 == null) + t16 = false; + t1 = t1.get$charset(options); + if (t1 == null) + t1 = true; + result = A.compileString(t2, t1, t13, new A.CastList(t5, A._arrayInstanceType(t5)._eval$1("CastList<1,Callable>")), t14, t4, _null, t9, t10, logger, t3, t12, t15, A._enableSourceMaps(options), t7, t6, t11, !t8, t16); + } else if (file != null) { + t2 = A._parseImporter(options, start); + t3 = A._parsePackageImporters(options, start); + t4 = A._parseFunctions(options, start, false); + t5 = t1.get$indentedSyntax(options); + t5 = !J.$eq$(t5, false) && t5 != null ? B.Syntax_Sass_1_sass0 : _null; + t6 = A._parseOutputStyle(t1.get$outputStyle(options)); + t7 = J.$eq$(t1.get$indentType(options), "tab"); + t8 = A._parseIndentWidth(t1.get$indentWidth(options)); + t9 = A._parseLineFeed(t1.get$linefeed(options)); + t10 = t1.get$quietDeps(options); + if (t10 == null) + t10 = false; + t11 = A.parseDeprecations(logger, t1.get$fatalDeprecations(options), true); + t12 = A.parseDeprecations(logger, t1.get$futureDeprecations(options), false); + t13 = A.parseDeprecations(logger, t1.get$silenceDeprecations(options), false); + t14 = t1.get$verbose(options); + if (t14 == null) + t14 = false; + t1 = t1.get$charset(options); + if (t1 == null) + t1 = true; + result = A.compile(file, t1, t11, new A.CastList(t4, A._arrayInstanceType(t4)._eval$1("CastList<1,Callable>")), t12, t3, t8, t9, logger, t2, t10, t13, A._enableSourceMaps(options), t6, t5, !t7, t14); + } else { + t1 = A.ArgumentError$(string$.Either, _null); + throw A.wrapException(t1); + } + t1 = A._newRenderResult(options, result, start); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.jsThrow(A._wrapException(error, stackTrace)); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = J.toString$0$(error0); + t2 = A.getTrace0(error0); + A.jsThrow(A._newRenderError(t1, t2 == null ? stackTrace0 : t2, _null, _null, _null, 3)); + } + } + }, + _wrapException(exception, stackTrace) { + var t2, t3, t4, t5, + t1 = A.SourceSpanException.prototype.get$span.call(exception, 0), + _0_0 = t1.get$sourceUrl(t1); + $label0$0: { + if (_0_0 == null) { + t1 = "stdin"; + break $label0$0; + } + if ("file" === _0_0.get$scheme()) { + t1 = $.$get$context().style.pathFromUri$1(A._parseUri(_0_0)); + break $label0$0; + } + t1 = _0_0.toString$0(0); + break $label0$0; + } + t2 = B.JSString_methods.replaceFirst$2(exception.toString$0(0), "Error: ", ""); + t3 = A.getTrace0(exception); + if (t3 == null) + t3 = stackTrace; + t4 = A.SourceSpanException.prototype.get$span.call(exception, 0); + t4 = t4.get$start(t4); + t4 = t4.file.getLine$1(t4.offset); + t5 = A.SourceSpanException.prototype.get$span.call(exception, 0); + t5 = t5.get$start(t5); + return A._newRenderError(t2, t3, t5.file.getColumn$1(t5.offset) + 1, t1, t4 + 1, 1); + }, + _parseFunctions(options, start, asynch) { + var result, + functions = J.get$functions$x(options); + if (functions == null) + return B.List_empty29; + result = A._setArrayType([], type$.JSArray_AsyncCallable_2); + A.jsForEach(functions, new A._parseFunctions_closure(options, start, result, asynch)); + return result; + }, + _parseImporter(options, start) { + var t2, t3, contextOptions, _1_0, t4, importers, + t1 = J.getInterceptor$x(options), + _0_0 = t1.get$importer(options); + $label0$0: { + if (_0_0 == null) { + t2 = A._setArrayType([], type$.JSArray_JSFunction); + break $label0$0; + } + if (type$.List_dynamic._is(_0_0)) { + t2 = J.cast$1$0$ax(_0_0, type$.JSFunction); + break $label0$0; + } + t2 = A._setArrayType([type$.JSFunction._as(_0_0)], type$.JSArray_JSFunction); + break $label0$0; + } + t3 = J.getInterceptor$asx(t2); + contextOptions = t3.get$isNotEmpty(t2) ? A._contextOptions(options, start) : new A.Object(); + _1_0 = t1.get$fiber(options); + t4 = {}; + t4.fiber = null; + if (_1_0 != null) { + t4.fiber = _1_0; + t2 = t3.map$1$1(t2, new A._parseImporter_closure(t4), type$.JSFunction); + importers = A.List_List$_of(t2, t2.$ti._eval$1("ListIterable.E")); + } else + importers = t2; + t1 = t1.get$includePaths(options); + if (t1 == null) + t1 = []; + t2 = type$.String; + return new A.NodeImporter(contextOptions, A.List_List$unmodifiable(A.NodeImporter__addSassPath(A.List_List$from(t1, true, t2)), t2), A.List_List$unmodifiable(J.cast$1$0$ax(importers, type$.dynamic), type$.JSFunction)); + }, + _parsePackageImportersAsync(options, start) { + var t2, t3, t4, + t1 = J.getInterceptor$x(options); + if (t1.get$pkgImporter(options) instanceof A.NodePackageImporter0) { + t1 = t1.get$pkgImporter(options); + t1.toString; + t2 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2; + t3 = type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2; + t4 = type$.Uri; + return new A.AsyncImportCache0(A.List_List$unmodifiable(A._setArrayType([t1], type$.JSArray_AsyncImporter), type$.AsyncImporter), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.ImporterResult_2), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.DateTime)); + } + return null; + }, + _parsePackageImporters(options, start) { + var t2, t3, t4, + t1 = J.getInterceptor$x(options); + if (t1.get$pkgImporter(options) instanceof A.NodePackageImporter0) { + t1 = t1.get$pkgImporter(options); + t1.toString; + t2 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2; + t3 = type$.Record_3_Importer_and_Uri_and_bool_forImport_2; + t4 = type$.Uri; + return new A.ImportCache0(A.List_List$unmodifiable(A._setArrayType([t1], type$.JSArray_Importer_2), type$.Importer), A.LinkedHashMap_LinkedHashMap$_empty(type$.Record_2_Uri_and_bool_forImport, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t2), A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.nullable_Stylesheet_2), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.ImporterResult_2), A.LinkedHashMap_LinkedHashMap$_empty(t4, type$.DateTime)); + } + return null; + }, + _contextOptions(options, start) { + var includePaths, t3, t4, t5, t6, t7, + t1 = J.getInterceptor$x(options), + t2 = t1.get$includePaths(options); + if (t2 == null) + t2 = []; + includePaths = A.List_List$from(t2, true, type$.String); + t2 = t1.get$file(options); + t3 = t1.get$data(options); + t4 = A._setArrayType([A.current()], type$.JSArray_String); + B.JSArray_methods.addAll$1(t4, includePaths); + t5 = A.isNodeJs() ? self.process : null; + t4 = B.JSArray_methods.join$1(t4, J.$eq$(t5 == null ? null : J.get$platform$x(t5), "win32") ? ";" : ":"); + t5 = J.$eq$(t1.get$indentType(options), "tab") ? 1 : 0; + t6 = A._parseIndentWidth(t1.get$indentWidth(options)); + if (t6 == null) + t6 = 2; + t7 = A._parseLineFeed(t1.get$linefeed(options)); + t1 = t1.get$file(options); + if (t1 == null) + t1 = "data"; + return {file: t2, data: t3, includePaths: t4, precision: 10, style: 1, indentType: t5, indentWidth: t6, linefeed: t7.text, result: {stats: {start: start._value, entry: t1}}}; + }, + _parseOutputStyle(style) { + var t1; + $label0$0: { + if (style == null || "expanded" === style) { + t1 = B.OutputStyle_00; + break $label0$0; + } + if ("compressed" === style) { + t1 = B.OutputStyle_10; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('Unknown output style "' + style + '".')); + } + return t1; + }, + _parseIndentWidth(width) { + var t1; + $label0$0: { + if (width == null) { + t1 = null; + break $label0$0; + } + if (A._isInt(width)) { + t1 = width; + break $label0$0; + } + t1 = A.int_parse(J.toString$0$(width), null); + break $label0$0; + } + return t1; + }, + _parseLineFeed(str) { + var t1; + $label0$0: { + if ("cr" === str) { + t1 = B.LineFeed_3HY; + break $label0$0; + } + if ("crlf" === str) { + t1 = B.LineFeed_aqi; + break $label0$0; + } + if ("lfcr" === str) { + t1 = B.LineFeed_Kui; + break $label0$0; + } + t1 = B.LineFeed_oJz; + break $label0$0; + } + return t1; + }, + _newRenderResult(options, result, start) { + var t3, sourceMapOption, sourceMapPath, t4, sourceMapDir, outFile, t5, _0_0, t6, sourceMapDirUrl, i, source, t7, buffer, indices, url, t8, _null = null, + t1 = Date.now(), + t2 = result._compile_result$_serialize, + css = t2._0, + sourceMapBytes = self.undefined; + if (A._enableSourceMaps(options)) { + t3 = J.getInterceptor$x(options); + sourceMapOption = t3.get$sourceMap(options); + if (typeof sourceMapOption == "string") + sourceMapPath = sourceMapOption; + else { + t4 = t3.get$outFile(options); + t4.toString; + sourceMapPath = J.$add$ansx(t4, ".map"); + } + t4 = $.$get$context(); + sourceMapDir = t4.dirname$1(sourceMapPath); + t2 = t2._1; + t2.toString; + t2.sourceRoot = t3.get$sourceMapRoot(options); + outFile = t3.get$outFile(options); + t5 = outFile == null; + if (t5) { + _0_0 = t3.get$file(options); + $label0$0: { + if (_0_0 != null) { + t6 = t4.toUri$1(t4.withoutExtension$1(_0_0) + ".css").toString$0(0); + break $label0$0; + } + t6 = t2.targetUrl = "stdin.css"; + break $label0$0; + } + t2.targetUrl = t6; + } else + t2.targetUrl = t4.toUri$1(t4.relative$2$from(outFile, sourceMapDir)).toString$0(0); + sourceMapDirUrl = t4.toUri$1(sourceMapDir).toString$0(0); + for (t4 = t2.urls, i = 0; i < t4.length; ++i) { + source = t4[i]; + if (source === "stdin") + continue; + t6 = $.$get$url(); + t7 = t6.style; + if (t7.rootLength$1(source) <= 0 || t7.isRootRelative$1(source)) + continue; + t4[i] = t6.relative$2$from(source, sourceMapDirUrl); + } + t4 = t3.get$sourceMapContents(options); + sourceMapBytes = self.Buffer.from(B.C_JsonCodec.encode$2$toEncodable(t2.toJson$1$includeSourceContents(!J.$eq$(t4, false) && t4 != null), _null), "utf8"); + t2 = t3.get$omitSourceMapUrl(options); + if (!(!J.$eq$(t2, false) && t2 != null)) { + t2 = t3.get$sourceMapEmbed(options); + if (!J.$eq$(t2, false) && t2 != null) { + buffer = new A.StringBuffer(""); + indices = A._setArrayType([-1], type$.JSArray_int); + A.UriData__writeUri("application/json", _null, _null, buffer, indices); + indices.push(buffer._contents.length); + indices.push((buffer._contents += ";base64,").length - 1); + t2 = B.C_Base64Encoder.startChunkedConversion$1(new A._StringSinkConversionSink(buffer)); + t3 = sourceMapBytes.length; + A.RangeError_checkValidRange(0, t3, t3); + t2._convert$_add$4(sourceMapBytes, 0, t3, true); + t2 = buffer._contents; + url = new A.UriData(t2.charCodeAt(0) == 0 ? t2 : t2, indices, _null).get$uri(); + } else { + if (t5) + t2 = sourceMapPath; + else { + t2 = $.$get$context(); + t2 = t2.relative$2$from(sourceMapPath, t2.dirname$1(outFile)); + } + url = $.$get$context().toUri$1(t2); + } + t2 = url.toString$0(0); + css += "\n\n/*# sourceMappingURL=" + A.stringReplaceAllUnchecked(t2, "*/", "%2A/") + " */"; + } + } + t2 = self.Buffer.from(css, "utf8"); + t3 = J.get$file$x(options); + if (t3 == null) + t3 = "data"; + t4 = start._value; + t5 = B.JSInt_methods._tdivFast$1(A.Duration$(0 - start._microsecond, t1 - t4)._duration, 1000); + t6 = A._setArrayType([], type$.JSArray_String); + for (t7 = result._evaluate._0, t7 = t7.get$iterator(t7); t7.moveNext$0();) { + t8 = t7.get$current(t7); + t6.push(t8.get$scheme() === "file" ? $.$get$context().style.pathFromUri$1(A._parseUri(t8)) : t8.toString$0(0)); + } + return {css: t2, map: sourceMapBytes, stats: {entry: t3, start: t4, end: t1, duration: t5, includedFiles: t6}}; + }, + _enableSourceMaps(options) { + var t2, + t1 = J.getInterceptor$x(options); + if (typeof t1.get$sourceMap(options) != "string") { + t2 = t1.get$sourceMap(options); + t1 = !J.$eq$(t2, false) && t2 != null && t1.get$outFile(options) != null; + } else + t1 = true; + return t1; + }, + _newRenderError(message, stackTrace, column, file, line, $status) { + var error = new self.Error(message); + error.formatted = "Error: " + message; + if (line != null) + error.line = line; + if (column != null) + error.column = column; + if (file != null) + error.file = file; + error.status = $status; + A.attachJsStack(error, stackTrace); + return error; + }, + render_closure: function render_closure(t0, t1) { + this.callback = t0; + this.options = t1; + }, + render_closure0: function render_closure0(t0) { + this.callback = t0; + }, + render_closure1: function render_closure1(t0) { + this.callback = t0; + }, + _parseFunctions_closure: function _parseFunctions_closure(t0, t1, t2, t3) { + var _ = this; + _.options = t0; + _.start = t1; + _.result = t2; + _.asynch = t3; + }, + _parseFunctions__closure: function _parseFunctions__closure(t0, t1, t2) { + this._box_0 = t0; + this.callback = t1; + this.context = t2; + }, + _parseFunctions___closure2: function _parseFunctions___closure2(t0) { + this.currentFiber = t0; + }, + _parseFunctions____closure: function _parseFunctions____closure(t0, t1) { + this.currentFiber = t0; + this.result = t1; + }, + _parseFunctions___closure3: function _parseFunctions___closure3(t0, t1, t2) { + this.callback = t0; + this.context = t1; + this.jsArguments = t2; + }, + _parseFunctions___closure4: function _parseFunctions___closure4(t0) { + this._box_0 = t0; + }, + _parseFunctions__closure0: function _parseFunctions__closure0(t0, t1) { + this.callback = t0; + this.context = t1; + }, + _parseFunctions___closure1: function _parseFunctions___closure1(t0, t1, t2) { + this.callback = t0; + this.context = t1; + this.$arguments = t2; + }, + _parseFunctions__closure1: function _parseFunctions__closure1(t0, t1) { + this.callback = t0; + this.context = t1; + }, + _parseFunctions___closure: function _parseFunctions___closure(t0) { + this.completer = t0; + }, + _parseFunctions___closure0: function _parseFunctions___closure0(t0, t1, t2) { + this.callback = t0; + this.context = t1; + this.jsArguments = t2; + }, + _parseImporter_closure: function _parseImporter_closure(t0) { + this._box_0 = t0; + }, + _parseImporter__closure: function _parseImporter__closure(t0, t1) { + this._box_0 = t0; + this.importer = t1; + }, + _parseImporter___closure: function _parseImporter___closure(t0) { + this.currentFiber = t0; + }, + _parseImporter____closure: function _parseImporter____closure(t0, t1) { + this.currentFiber = t0; + this.result = t1; + }, + _parseImporter___closure0: function _parseImporter___closure0(t0) { + this._box_0 = t0; + }, + LegacyIfExpression0: function LegacyIfExpression0(t0, t1) { + this.$arguments = t0; + this.span = t1; + }, + LimitedMapView$blocklist0(_map, blocklist, $K, $V) { + var t2, key, + t1 = A.LinkedHashSet_LinkedHashSet$_empty($K); + for (t2 = _map.get$keys(_map), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + key = t2.get$current(t2); + if (!blocklist.contains$1(0, key)) + t1.add$1(0, key); + } + return new A.LimitedMapView0(_map, t1, $K._eval$1("@<0>")._bind$1($V)._eval$1("LimitedMapView0<1,2>")); + }, + LimitedMapView0: function LimitedMapView0(t0, t1, t2) { + this._limited_map_view0$_map = t0; + this._limited_map_view0$_keys = t1; + this.$ti = t2; + }, + ListExpression0: function ListExpression0(t0, t1, t2, t3) { + var _ = this; + _.contents = t0; + _.separator = t1; + _.hasBrackets = t2; + _.span = t3; + }, + ListExpression_toString_closure0: function ListExpression_toString_closure0(t0) { + this.$this = t0; + }, + _function11($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:list"); + }, + _length_closure2: function _length_closure2() { + }, + _nth_closure0: function _nth_closure0() { + }, + _setNth_closure0: function _setNth_closure0() { + }, + _join_closure0: function _join_closure0() { + }, + _append_closure2: function _append_closure2() { + }, + _zip_closure0: function _zip_closure0() { + }, + _zip__closure2: function _zip__closure2() { + }, + _zip__closure3: function _zip__closure3(t0) { + this._box_0 = t0; + }, + _zip__closure4: function _zip__closure4(t0) { + this._box_0 = t0; + }, + _index_closure2: function _index_closure2() { + }, + _separator_closure0: function _separator_closure0() { + }, + _isBracketed_closure0: function _isBracketed_closure0() { + }, + _slash_closure0: function _slash_closure0() { + }, + InterpolatedSelectorList$(components) { + var t1 = A.List_List$unmodifiable(components, type$.InterpolatedComplexSelector); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.InterpolatedSelectorList(t1); + }, + InterpolatedSelectorList: function InterpolatedSelectorList(t0) { + this.components = t0; + }, + SelectorList$0(components, span) { + var t1 = A.List_List$unmodifiable(components, type$.ComplexSelector_2); + if (t1.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", null)); + return new A.SelectorList0(t1, span); + }, + SelectorList_SelectorList$parse0(contents, allowParent, interpolationMap, logger, plainCss) { + return A.SelectorParser$0(contents, allowParent, interpolationMap, logger, plainCss, null).parse$0(0); + }, + SelectorList0: function SelectorList0(t0, t1) { + this.components = t0; + this.span = t1; + }, + SelectorList_asSassList_closure0: function SelectorList_asSassList_closure0() { + }, + SelectorList_nestWithin_closure0: function SelectorList_nestWithin_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.preserveParentSelectors = t1; + _.implicitParent = t2; + _.parent = t3; + }, + SelectorList_nestWithin__closure1: function SelectorList_nestWithin__closure1(t0) { + this.complex = t0; + }, + SelectorList_nestWithin__closure2: function SelectorList_nestWithin__closure2(t0) { + this.complex = t0; + }, + SelectorList__nestWithinCompound_closure2: function SelectorList__nestWithinCompound_closure2() { + }, + SelectorList__nestWithinCompound_closure3: function SelectorList__nestWithinCompound_closure3(t0) { + this.parent = t0; + }, + SelectorList__nestWithinCompound_closure4: function SelectorList__nestWithinCompound_closure4(t0, t1, t2) { + this.parentSelector = t0; + this.resolvedSimples = t1; + this.component = t2; + }, + SelectorList_withAdditionalCombinators_closure0: function SelectorList_withAdditionalCombinators_closure0(t0) { + this.combinators = t0; + }, + _ParentSelectorVisitor0: function _ParentSelectorVisitor0() { + }, + __ParentSelectorVisitor_Object_SelectorSearchVisitor0: function __ParentSelectorVisitor_Object_SelectorSearchVisitor0() { + }, + listClass_closure: function listClass_closure() { + }, + listClass__closure: function listClass__closure() { + }, + listClass__closure0: function listClass__closure0() { + }, + _ConstructorOptions: function _ConstructorOptions() { + }, + _NodeSassList: function _NodeSassList() { + }, + legacyListClass_closure: function legacyListClass_closure() { + }, + legacyListClass__closure: function legacyListClass__closure() { + }, + legacyListClass_closure0: function legacyListClass_closure0() { + }, + legacyListClass_closure1: function legacyListClass_closure1() { + }, + legacyListClass_closure2: function legacyListClass_closure2() { + }, + legacyListClass_closure3: function legacyListClass_closure3() { + }, + legacyListClass_closure4: function legacyListClass_closure4() { + }, + SassList$0(contents, _separator, brackets) { + var t1 = new A.SassList0(A.List_List$unmodifiable(contents, type$.Value_2), _separator, brackets); + t1.SassList$3$brackets0(contents, _separator, brackets); + return t1; + }, + SassList0: function SassList0(t0, t1, t2) { + this._list1$_contents = t0; + this._list1$_separator = t1; + this._list1$_hasBrackets = t2; + }, + SassList_isBlank_closure0: function SassList_isBlank_closure0() { + }, + ListSeparator0: function ListSeparator0(t0, t1, t2, t3) { + var _ = this; + _._list1$_name = t0; + _.separator = t1; + _.index = t2; + _._name = t3; + }, + LmsColorSpace0: function LmsColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + LocalMindeGamutMap0: function LocalMindeGamutMap0(t0) { + this.name = t0; + }, + JSLogger: function JSLogger() { + }, + WarnOptions: function WarnOptions() { + }, + DebugOptions: function DebugOptions() { + }, + WarnForDeprecation_warnForDeprecation0(_this, deprecation, message, span, trace) { + _this.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + }, + LoggerWithDeprecationType0: function LoggerWithDeprecationType0() { + }, + LoudComment0: function LoudComment0(t0) { + this.text = t0; + }, + MapExpression0: function MapExpression0(t0, t1) { + this.pairs = t0; + this.span = t1; + }, + _modify0(map, keys, modify, addNesting) { + var keyIterator = J.get$iterator$ax(keys); + return keyIterator.moveNext$0() ? new A._modify_modifyNestedMap0(keyIterator, modify, addNesting).call$1(map) : modify.call$1(map); + }, + _deepMergeImpl0(map1, map2) { + var t2, t3, result, t4, key, value, _1_1, _1_3, _1_3_isSet, resultMap, _1_30, valueMap, merged, + t1 = map1._map0$_contents; + if (t1.get$isEmpty(t1)) + return map2; + t2 = map2._map0$_contents; + if (t2.get$isEmpty(t2)) + return map1; + t3 = type$.Value_2; + result = A.LinkedHashMap_LinkedHashMap$of(t1, t3, t3); + for (t1 = A.MapExtensions_get_pairs0(t2, t3, t3), t1 = t1.get$iterator(t1), t2 = type$.SassMap_2; t1.moveNext$0();) { + t4 = t1.get$current(t1); + key = t4._0; + value = t4._1; + t4 = result.$index(0, key); + _1_1 = t4 == null ? null : t4.tryMap$0(); + _1_3 = value.tryMap$0(); + _1_3_isSet = _1_1 != null; + t4 = false; + if (_1_3_isSet) { + t4 = _1_3 != null; + resultMap = _1_1; + _1_30 = _1_3; + } else { + _1_30 = null; + resultMap = null; + } + if (t4) { + valueMap = _1_3_isSet ? _1_30 : _1_3; + merged = A._deepMergeImpl0(resultMap, valueMap == null ? t2._as(valueMap) : valueMap); + if (merged === resultMap) + continue; + result.$indexSet(0, key, merged); + } else + result.$indexSet(0, key, value); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(result, t3, t3)); + }, + _function10($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:map"); + }, + _get_closure0: function _get_closure0() { + }, + _set_closure1: function _set_closure1() { + }, + _set__closure2: function _set__closure2(t0) { + this.$arguments = t0; + }, + _set_closure2: function _set_closure2() { + }, + _set__closure1: function _set__closure1(t0) { + this._box_0 = t0; + }, + _merge_closure1: function _merge_closure1() { + }, + _merge_closure2: function _merge_closure2() { + }, + _merge__closure0: function _merge__closure0(t0) { + this.map2 = t0; + }, + _deepMerge_closure0: function _deepMerge_closure0() { + }, + _deepRemove_closure0: function _deepRemove_closure0() { + }, + _deepRemove__closure0: function _deepRemove__closure0(t0) { + this.keys = t0; + }, + _remove_closure1: function _remove_closure1() { + }, + _remove_closure2: function _remove_closure2() { + }, + _keys_closure0: function _keys_closure0() { + }, + _values_closure0: function _values_closure0() { + }, + _hasKey_closure0: function _hasKey_closure0() { + }, + _modify_modifyNestedMap0: function _modify_modifyNestedMap0(t0, t1, t2) { + this.keyIterator = t0; + this.modify = t1; + this.addNesting = t2; + }, + MapExtensions_get_pairs0(_this, $K, $V) { + var t1 = _this.get$entries(_this); + return t1.map$1$1(t1, new A.MapExtensions_get_pairs_closure0($K, $V), $K._eval$1("@<0>")._bind$1($V)._eval$1("+(1,2)")); + }, + MapExtensions_get_pairs_closure0: function MapExtensions_get_pairs_closure0(t0, t1) { + this.K = t0; + this.V = t1; + }, + mapClass_closure: function mapClass_closure() { + }, + mapClass__closure: function mapClass__closure() { + }, + mapClass__closure0: function mapClass__closure0() { + }, + mapClass__closure1: function mapClass__closure1() { + }, + _NodeSassMap: function _NodeSassMap() { + }, + legacyMapClass_closure: function legacyMapClass_closure() { + }, + legacyMapClass__closure: function legacyMapClass__closure() { + }, + legacyMapClass__closure0: function legacyMapClass__closure0() { + }, + legacyMapClass_closure0: function legacyMapClass_closure0() { + }, + legacyMapClass_closure1: function legacyMapClass_closure1() { + }, + legacyMapClass_closure2: function legacyMapClass_closure2() { + }, + legacyMapClass_closure3: function legacyMapClass_closure3() { + }, + legacyMapClass_closure4: function legacyMapClass_closure4() { + }, + SassMap0: function SassMap0(t0) { + this._map0$_contents = t0; + }, + _singleArgumentMathFunc0($name, mathFunc) { + return A.BuiltInCallable$function0($name, "$number", new A._singleArgumentMathFunc_closure0(mathFunc), "sass:math"); + }, + _numberFunction0($name, transform) { + return A.BuiltInCallable$function0($name, "$number", new A._numberFunction_closure0(transform), "sass:math"); + }, + _function9($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:math"); + }, + global_closure43: function global_closure43() { + }, + module_closure26: function module_closure26() { + }, + _ceil_closure0: function _ceil_closure0() { + }, + _clamp_closure0: function _clamp_closure0() { + }, + _floor_closure0: function _floor_closure0() { + }, + _max_closure0: function _max_closure0() { + }, + _min_closure0: function _min_closure0() { + }, + _round_closure0: function _round_closure0() { + }, + _hypot_closure0: function _hypot_closure0() { + }, + _hypot__closure0: function _hypot__closure0() { + }, + _log_closure0: function _log_closure0() { + }, + _pow_closure0: function _pow_closure0() { + }, + _atan2_closure0: function _atan2_closure0() { + }, + _compatible_closure0: function _compatible_closure0() { + }, + _isUnitless_closure0: function _isUnitless_closure0() { + }, + _unit_closure0: function _unit_closure0() { + }, + _percentage_closure0: function _percentage_closure0() { + }, + _randomFunction_closure0: function _randomFunction_closure0() { + }, + _div_closure0: function _div_closure0() { + }, + _singleArgumentMathFunc_closure0: function _singleArgumentMathFunc_closure0(t0) { + this.mathFunc = t0; + }, + _numberFunction_closure0: function _numberFunction_closure0(t0) { + this.transform = t0; + }, + CssMediaQuery$type0(type, conditions, modifier) { + return new A.CssMediaQuery0(modifier, type, true, conditions == null ? B.List_empty : A.List_List$unmodifiable(conditions, type$.String)); + }, + CssMediaQuery$condition0(conditions, conjunction) { + var t1 = A.List_List$unmodifiable(conditions, type$.String); + if (t1.length > 1 && conjunction == null) + A.throwExpression(A.ArgumentError$(string$.If_con, null)); + return new A.CssMediaQuery0(null, null, conjunction !== false, t1); + }, + CssMediaQuery0: function CssMediaQuery0(t0, t1, t2, t3) { + var _ = this; + _.modifier = t0; + _.type = t1; + _.conjunction = t2; + _.conditions = t3; + }, + _SingletonCssMediaQueryMergeResult0: function _SingletonCssMediaQueryMergeResult0(t0, t1) { + this.index = t0; + this._name = t1; + }, + MediaQuerySuccessfulMergeResult0: function MediaQuerySuccessfulMergeResult0(t0) { + this.query = t0; + }, + MediaQueryParser0: function MediaQueryParser0(t0, t1) { + this.scanner = t0; + this._parser1$_interpolationMap = t1; + }, + MediaQueryParser_parse_closure0: function MediaQueryParser_parse_closure0(t0) { + this.$this = t0; + }, + ModifiableCssMediaRule$0(queries, span) { + var t1 = A.List_List$unmodifiable(queries, type$.CssMediaQuery_2), + t2 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + if (J.get$isEmpty$asx(queries)) + A.throwExpression(A.ArgumentError$value(queries, "queries", "may not be empty.")); + return new A.ModifiableCssMediaRule0(t1, span, new A.UnmodifiableListView(t2, type$.UnmodifiableListView_ModifiableCssNode_2), t2); + }, + ModifiableCssMediaRule0: function ModifiableCssMediaRule0(t0, t1, t2, t3) { + var _ = this; + _.queries = t0; + _.span = t1; + _.children = t2; + _._node$_children = t3; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + MediaRule$0(query, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.MediaRule0(query, span, t1, t2); + }, + MediaRule0: function MediaRule0(t0, t1, t2, t3) { + var _ = this; + _.query = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + MergedExtension_merge0(left, right) { + var t2, t3, t4, + t1 = left.extender.selector; + if (!t1.$eq(0, right.extender.selector) || !left.target.$eq(0, right.target)) + throw A.wrapException(A.ArgumentError$(left.toString$0(0) + " and " + right.toString$0(0) + " aren't the same extension.", null)); + t2 = left.mediaContext; + t3 = t2 == null; + if (!t3) { + t4 = right.mediaContext; + t4 = t4 != null && !B.C_ListEquality.equals$2(0, t2, t4); + } else + t4 = false; + if (t4) + throw A.wrapException(A.SassException$0("From " + left.span.message$1(0, "") + string$.x0aYou_m, right.span, null)); + if (right.isOptional && right.mediaContext == null) + return left; + if (left.isOptional && t3) + return right; + if (t3) + t2 = right.mediaContext; + t1.get$specificity(); + t1 = new A.Extender0(t1, false); + return t1._extension$_extension = new A.MergedExtension0(left, right, t1, left.target, t2, true, left.span); + }, + MergedExtension0: function MergedExtension0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.left = t0; + _.right = t1; + _.extender = t2; + _.target = t3; + _.mediaContext = t4; + _.isOptional = t5; + _.span = t6; + }, + MergedMapView$0(maps, $K, $V) { + var t1 = $K._eval$1("@<0>")._bind$1($V); + t1 = new A.MergedMapView0(A.LinkedHashMap_LinkedHashMap$_empty($K, t1._eval$1("Map<1,2>")), t1._eval$1("MergedMapView0<1,2>")); + t1.MergedMapView$10(maps, $K, $V); + return t1; + }, + MergedMapView0: function MergedMapView0(t0, t1) { + this._merged_map_view$_mapsByKey = t0; + this.$ti = t1; + }, + _function6($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:meta"); + }, + _shared_closure3: function _shared_closure3() { + }, + _shared_closure4: function _shared_closure4() { + }, + _shared_closure5: function _shared_closure5() { + }, + _shared_closure6: function _shared_closure6() { + }, + moduleFunctions_closure2: function moduleFunctions_closure2() { + }, + moduleFunctions_closure3: function moduleFunctions_closure3() { + }, + moduleFunctions__closure0: function moduleFunctions__closure0() { + }, + moduleFunctions_closure4: function moduleFunctions_closure4() { + }, + mixinClass_closure: function mixinClass_closure() { + }, + mixinClass__closure: function mixinClass__closure() { + }, + mixinClass__closure0: function mixinClass__closure0() { + }, + SassMixin0: function SassMixin0(t0, t1) { + this.callable = t0; + this._mixin0$_compileContext = t1; + }, + MixinRule$0($name, parameters, children, span, comment) { + var t1 = A.stringReplaceAllUnchecked($name, "_", "-"), + t2 = A.List_List$unmodifiable(children, type$.Statement_2), + t3 = B.JSArray_methods.any$1(t2, new A.ParentStatement_closure0()); + return new A.MixinRule0(t1, $name, parameters, span, t2, t3); + }, + MixinRule0: function MixinRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._mixin_rule$__MixinRule_hasContent_FI = $; + _.name = t0; + _.originalName = t1; + _.parameters = t2; + _.span = t3; + _.children = t4; + _.hasDeclarations = t5; + }, + _HasContentVisitor0: function _HasContentVisitor0() { + }, + __HasContentVisitor_Object_StatementSearchVisitor0: function __HasContentVisitor_Object_StatementSearchVisitor0() { + }, + ExtendMode0: function ExtendMode0(t0, t1, t2) { + this.name = t0; + this.index = t1; + this._name = t2; + }, + JSModule0: function JSModule0() { + }, + JSModuleRequire0: function JSModuleRequire0() { + }, + MultiSpan0: function MultiSpan0(t0, t1, t2) { + this._multi_span0$_primary = t0; + this.primaryLabel = t1; + this.secondarySpans = t2; + }, + SupportsNegation0: function SupportsNegation0(t0, t1) { + this.condition = t0; + this.span = t1; + }, + NoOpImporter0: function NoOpImporter0() { + }, + NoSourceMapBuffer0: function NoSourceMapBuffer0(t0) { + this._no_source_map_buffer0$_buffer = t0; + }, + _FakeAstNode0: function _FakeAstNode0(t0) { + this._node0$_callback = t0; + }, + CssNode0: function CssNode0() { + }, + CssParentNode0: function CssParentNode0() { + }, + _IsInvisibleVisitor1: function _IsInvisibleVisitor1(t0, t1) { + this.includeBogus = t0; + this.includeComments = t1; + }, + __IsInvisibleVisitor_Object_EveryCssVisitor0: function __IsInvisibleVisitor_Object_EveryCssVisitor0() { + }, + ModifiableCssNode0: function ModifiableCssNode0() { + }, + ModifiableCssNode_hasFollowingSibling_closure0: function ModifiableCssNode_hasFollowingSibling_closure0() { + }, + ModifiableCssParentNode0: function ModifiableCssParentNode0() { + }, + NodePackageImporter0: function NodePackageImporter0() { + this._node_package$__NodePackageImporter__entryPointDirectory_F = $; + }, + NodePackageImporter__nodePackageExportsResolve_closure3: function NodePackageImporter__nodePackageExportsResolve_closure3() { + }, + NodePackageImporter__nodePackageExportsResolve_closure4: function NodePackageImporter__nodePackageExportsResolve_closure4() { + }, + NodePackageImporter__nodePackageExportsResolve_closure5: function NodePackageImporter__nodePackageExportsResolve_closure5() { + }, + NodePackageImporter__nodePackageExportsResolve_closure6: function NodePackageImporter__nodePackageExportsResolve_closure6(t0, t1, t2) { + this.$this = t0; + this.exports = t1; + this.packageRoot = t2; + }, + NodePackageImporter__nodePackageExportsResolve__closure1: function NodePackageImporter__nodePackageExportsResolve__closure1(t0, t1, t2) { + this.$this = t0; + this.variant = t1; + this.packageRoot = t2; + }, + NodePackageImporter__nodePackageExportsResolve__closure2: function NodePackageImporter__nodePackageExportsResolve__closure2() { + }, + NodePackageImporter__getMainExport_closure0: function NodePackageImporter__getMainExport_closure0() { + }, + NullExpression$(span) { + return new A.NullExpression0(span); + }, + NullExpression0: function NullExpression0(t0) { + this.span = t0; + }, + legacyNullClass_closure: function legacyNullClass_closure() { + }, + legacyNullClass__closure: function legacyNullClass__closure() { + }, + _SassNull0: function _SassNull0() { + }, + NumberExpression0: function NumberExpression0(t0, t1, t2) { + this.value = t0; + this.unit = t1; + this.span = t2; + }, + numberClass_closure: function numberClass_closure() { + }, + numberClass__closure: function numberClass__closure() { + }, + numberClass__closure0: function numberClass__closure0() { + }, + numberClass__closure1: function numberClass__closure1() { + }, + numberClass__closure2: function numberClass__closure2() { + }, + numberClass__closure3: function numberClass__closure3() { + }, + numberClass__closure4: function numberClass__closure4() { + }, + numberClass__closure5: function numberClass__closure5() { + }, + numberClass__closure6: function numberClass__closure6() { + }, + numberClass__closure7: function numberClass__closure7() { + }, + numberClass__closure8: function numberClass__closure8() { + }, + numberClass__closure9: function numberClass__closure9() { + }, + numberClass__closure10: function numberClass__closure10() { + }, + numberClass__closure11: function numberClass__closure11() { + }, + numberClass__closure12: function numberClass__closure12() { + }, + numberClass__closure13: function numberClass__closure13() { + }, + numberClass__closure14: function numberClass__closure14() { + }, + numberClass__closure15: function numberClass__closure15() { + }, + numberClass__closure16: function numberClass__closure16() { + }, + numberClass__closure17: function numberClass__closure17() { + }, + numberClass__closure18: function numberClass__closure18() { + }, + numberClass__closure19: function numberClass__closure19() { + }, + _ConstructorOptions0: function _ConstructorOptions0() { + }, + _parseNumber(value, unit) { + var invalidUnit, operands, t1, numerator, denominator, numeratorUnits, denominatorUnits; + if (unit == null || unit.length === 0) + return A.SassNumber_SassNumber0(value, null); + if (!B.JSString_methods.contains$1(unit, "*") && !B.JSString_methods.contains$1(unit, "/")) + return A.SassNumber_SassNumber0(value, unit); + invalidUnit = new A.ArgumentError(true, unit, "unit", "is invalid."); + operands = unit.split("/"); + t1 = operands.length; + if (t1 > 2) + throw A.wrapException(invalidUnit); + numerator = operands[0]; + denominator = t1 === 1 ? null : operands[1]; + t1 = type$.JSArray_String; + numeratorUnits = numerator.length === 0 ? A._setArrayType([], t1) : A._setArrayType(numerator.split("*"), t1); + if (B.JSArray_methods.any$1(numeratorUnits, new A._parseNumber_closure())) + throw A.wrapException(invalidUnit); + denominatorUnits = denominator == null ? A._setArrayType([], t1) : A._setArrayType(denominator.split("*"), t1); + if (B.JSArray_methods.any$1(denominatorUnits, new A._parseNumber_closure0())) + throw A.wrapException(invalidUnit); + return A.SassNumber_SassNumber$withUnits0(value, denominatorUnits, numeratorUnits); + }, + _NodeSassNumber: function _NodeSassNumber() { + }, + legacyNumberClass_closure: function legacyNumberClass_closure() { + }, + legacyNumberClass_closure0: function legacyNumberClass_closure0() { + }, + legacyNumberClass_closure1: function legacyNumberClass_closure1() { + }, + legacyNumberClass_closure2: function legacyNumberClass_closure2() { + }, + legacyNumberClass_closure3: function legacyNumberClass_closure3() { + }, + _parseNumber_closure: function _parseNumber_closure() { + }, + _parseNumber_closure0: function _parseNumber_closure0() { + }, + conversionFactor0(unit1, unit2) { + var _0_0; + if (unit1 === unit2) + return 1; + _0_0 = B.Map_NtHoP.$index(0, unit1); + if (_0_0 != null) + return _0_0.$index(0, unit2); + return null; + }, + SassNumber_SassNumber0(value, unit) { + return unit == null ? new A.UnitlessSassNumber0(value, null) : new A.SingleUnitSassNumber0(unit, value, null); + }, + SassNumber_SassNumber$withUnits0(value, denominatorUnits, numeratorUnits) { + var _0_8, _0_10, _0_10_isSet, _0_7, _0_8_isSet, _0_7_isSet, unit, _0_7_isSet0, t2, _0_4_isSet, numerators, denominators, unsimplifiedDenominators, valueDouble, _i, denominator, simplifiedAway, i, factor, _1_2, _1_7_isSet, _1_7, _null = null, + _0_3 = numeratorUnits == null, + t1 = _0_3, + _0_6_isSet = !t1, + _0_6 = _null, + _0_4 = _null; + if (_0_6_isSet) { + _0_4 = J.get$length$asx(numeratorUnits == null ? type$.List_String._as(numeratorUnits) : numeratorUnits); + t1 = _0_4; + _0_6 = t1 <= 0; + t1 = _0_6; + } else + t1 = true; + _0_8 = _null; + _0_10 = _null; + if (t1) { + _0_8 = denominatorUnits == null; + t1 = _0_8; + _0_10_isSet = !t1; + if (_0_10_isSet) { + _0_10 = J.get$length$asx(denominatorUnits == null ? type$.List_String._as(denominatorUnits) : denominatorUnits) <= 0; + t1 = _0_10; + } else + t1 = true; + _0_7 = denominatorUnits; + _0_8_isSet = true; + _0_7_isSet = true; + } else { + _0_7 = _null; + _0_8_isSet = false; + _0_7_isSet = false; + _0_10_isSet = false; + t1 = false; + } + if (t1) + return new A.UnitlessSassNumber0(value, _null); + unit = _null; + t1 = false; + if (type$.List_dynamic._is(numeratorUnits)) { + _0_7_isSet0 = true; + if (_0_6_isSet) { + t2 = _0_4; + _0_4_isSet = _0_6_isSet; + } else { + _0_4 = J.get$length$asx(numeratorUnits); + t2 = _0_4; + _0_4_isSet = true; + } + if (t2 === 1) { + unit = J.$index$asx(numeratorUnits, 0); + if (_0_8_isSet) + t1 = _0_8; + else { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t1; + } + _0_8 = t1 == null; + t1 = _0_8; + _0_8_isSet = true; + } + if (!t1) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t1; + } + _0_10 = J.get$length$asx(t1 == null ? type$.List_String._as(t1) : t1) <= 0; + t1 = _0_10; + _0_10_isSet = true; + } + else + t1 = true; + } + } else + _0_4_isSet = _0_6_isSet; + if (t1) + return new A.SingleUnitSassNumber0(unit, value, _null); + t1 = false; + if (numeratorUnits != null) { + _0_7_isSet0 = true; + if (_0_8_isSet) + t1 = _0_8; + else { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t1; + } + _0_8 = t1 == null; + t1 = _0_8; + } + if (!t1) + if (_0_10_isSet) + t1 = _0_10; + else { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7_isSet = _0_7_isSet0; + _0_7 = t1; + } + _0_10 = J.get$length$asx(t1 == null ? type$.List_String._as(t1) : t1) <= 0; + t1 = _0_10; + } + else + t1 = true; + numerators = numeratorUnits; + } else + numerators = _null; + if (t1) + return new A.ComplexSassNumber0(A.List_List$unmodifiable(numerators, type$.String), B.List_empty, value, _null); + if (!_0_3) + if (_0_6_isSet) + t1 = _0_6; + else { + if (_0_4_isSet) + t1 = _0_4; + else { + _0_4 = J.get$length$asx(numeratorUnits == null ? type$.List_String._as(numeratorUnits) : numeratorUnits); + t1 = _0_4; + } + _0_6 = t1 <= 0; + t1 = _0_6; + } + else + t1 = true; + denominators = _null; + if (t1) { + if (_0_7_isSet) + t1 = _0_7; + else { + t1 = denominatorUnits; + _0_7 = t1; + _0_7_isSet = true; + } + t1 = t1 != null; + if (t1) { + denominators = _0_7_isSet ? _0_7 : denominatorUnits; + if (denominators == null) + denominators = type$.List_String._as(denominators); + } + } else + t1 = false; + if (t1) + return new A.ComplexSassNumber0(B.List_empty, A.List_List$unmodifiable(denominators, type$.String), value, _null); + numeratorUnits.toString; + numerators = J.toList$0$ax(numeratorUnits); + denominatorUnits.toString; + unsimplifiedDenominators = J.toList$0$ax(denominatorUnits); + denominators = A._setArrayType([], type$.JSArray_String); + for (t1 = unsimplifiedDenominators.length, valueDouble = value, _i = 0; _i < unsimplifiedDenominators.length; unsimplifiedDenominators.length === t1 || (0, A.throwConcurrentModificationError)(unsimplifiedDenominators), ++_i) { + denominator = unsimplifiedDenominators[_i]; + i = 0; + for (;;) { + if (!(i < numerators.length)) { + simplifiedAway = false; + break; + } + c$0: { + factor = A.conversionFactor0(denominator, numerators[i]); + if (factor == null) + break c$0; + valueDouble *= factor; + B.JSArray_methods.removeAt$1(numerators, i); + simplifiedAway = true; + break; + } + ++i; + } + if (!simplifiedAway) + denominators.push(denominator); + } + $label0$1: { + _1_2 = numerators.length; + t1 = _1_2; + _1_7_isSet = t1 <= 0; + if (_1_7_isSet) { + _1_7 = denominators.length <= 0; + t1 = _1_7; + } else { + _1_7 = _null; + t1 = false; + } + if (t1) { + t1 = new A.UnitlessSassNumber0(valueDouble, _null); + break $label0$1; + } + t1 = false; + if (_1_2 === 1) { + unit = numerators[0]; + t1 = _1_7_isSet ? _1_7 : denominators.length <= 0; + } else + unit = _null; + if (t1) { + t1 = new A.SingleUnitSassNumber0(unit, valueDouble, _null); + break $label0$1; + } + t1 = type$.String; + t1 = new A.ComplexSassNumber0(A.List_List$unmodifiable(numerators, t1), A.List_List$unmodifiable(denominators, t1), valueDouble, _null); + break $label0$1; + } + return t1; + }, + SassNumber0: function SassNumber0() { + }, + SassNumber__coerceOrConvertValue_compatibilityException0: function SassNumber__coerceOrConvertValue_compatibilityException0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.$this = t0; + _.other = t1; + _.otherName = t2; + _.otherHasUnits = t3; + _.name = t4; + _.newNumerators = t5; + _.newDenominators = t6; + }, + SassNumber__coerceOrConvertValue_closure3: function SassNumber__coerceOrConvertValue_closure3(t0, t1) { + this._box_0 = t0; + this.newNumerator = t1; + }, + SassNumber__coerceOrConvertValue_closure4: function SassNumber__coerceOrConvertValue_closure4(t0) { + this.compatibilityException = t0; + }, + SassNumber__coerceOrConvertValue_closure5: function SassNumber__coerceOrConvertValue_closure5(t0, t1) { + this._box_0 = t0; + this.newDenominator = t1; + }, + SassNumber__coerceOrConvertValue_closure6: function SassNumber__coerceOrConvertValue_closure6(t0) { + this.compatibilityException = t0; + }, + SassNumber_plus_closure0: function SassNumber_plus_closure0() { + }, + SassNumber_minus_closure0: function SassNumber_minus_closure0() { + }, + SassNumber_multiplyUnits_closure3: function SassNumber_multiplyUnits_closure3(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure4: function SassNumber_multiplyUnits_closure4(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure5: function SassNumber_multiplyUnits_closure5(t0, t1) { + this._box_0 = t0; + this.numerator = t1; + }, + SassNumber_multiplyUnits_closure6: function SassNumber_multiplyUnits_closure6(t0, t1) { + this.newNumerators = t0; + this.numerator = t1; + }, + SassNumber__areAnyConvertible_closure0: function SassNumber__areAnyConvertible_closure0(t0) { + this.units2 = t0; + }, + SassNumber__canonicalizeUnitList_closure0: function SassNumber__canonicalizeUnitList_closure0() { + }, + SassNumber__canonicalMultiplier_closure0: function SassNumber__canonicalMultiplier_closure0(t0) { + this.$this = t0; + }, + SassNumber_unitSuggestion_closure1: function SassNumber_unitSuggestion_closure1() { + }, + SassNumber_unitSuggestion_closure2: function SassNumber_unitSuggestion_closure2() { + }, + OklabColorSpace0: function OklabColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + OklchColorSpace0: function OklchColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + SupportsOperation0: function SupportsOperation0(t0, t1, t2, t3) { + var _ = this; + _.left = t0; + _.right = t1; + _.operator = t2; + _.span = t3; + }, + Parameter0: function Parameter0(t0, t1, t2) { + this.name = t0; + this.defaultValue = t1; + this.span = t2; + }, + ParameterList_ParameterList$parse0(contents, url) { + return A.ScssParser$0(contents, false, url).parseParameterList$0(); + }, + ParameterList0: function ParameterList0(t0, t1, t2) { + this.parameters = t0; + this.restParameter = t1; + this.span = t2; + }, + ParameterList_verify_closure1: function ParameterList_verify_closure1() { + }, + ParameterList_verify_closure2: function ParameterList_verify_closure2() { + }, + InterpolatedParentSelector: function InterpolatedParentSelector(t0, t1) { + this.suffix = t0; + this.span = t1; + }, + ParentSelector0: function ParentSelector0(t0, t1) { + this.suffix = t0; + this.span = t1; + }, + ParentStatement0: function ParentStatement0() { + }, + ParentStatement_closure0: function ParentStatement_closure0() { + }, + ParentStatement__closure0: function ParentStatement__closure0() { + }, + ParenthesizedExpression0: function ParenthesizedExpression0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + loadParserExports() { + A._updateLazyFileSpanPrototype(); + A._updateAstPrototypes(); + return {parse: A.allowInterop(A.parser0___parse$closure()), parseIdentifier: A.allowInterop(A.parser0___parseIdentifier$closure()), toCssIdentifier: A.allowInterop(A.parser0___toCssIdentifier$closure()), createExpressionVisitor: A.allowInterop(new A.loadParserExports_closure()), createIfConditionExpressionVisitor: A.allowInterop(new A.loadParserExports_closure0()), createStatementVisitor: A.allowInterop(new A.loadParserExports_closure1()), createSimpleSelectorVisitor: A.allowInterop(new A.loadParserExports_closure2()), createSourceFile: A.allowInterop(new A.loadParserExports_closure3()), setToJS: A.allowInterop(new A.loadParserExports_closure4()), mapToRecord: A.allowInterop(A.utils3__mapToObject$closure())}; + }, + _updateLazyFileSpanPrototype() { + var t1 = type$.JSClass._as(new A.LazyFileSpan0(new A._updateLazyFileSpanPrototype_closure()).constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["file", new A._updateLazyFileSpanPrototype_closure0(), "length", new A._updateLazyFileSpanPrototype_closure1(), "sourceUrl", new A._updateLazyFileSpanPrototype_closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(t1)); + }, + _updateAstPrototypes() { + var t3, string, $arguments, klass, compound, ifConditionSass, _i, t4, _null = null, _s6_ = "accept", + _s9_ = "arguments", + file = A.SourceFile$fromString("", _null), + t1 = type$.JSClass, + t2 = t1._as(file.constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["getText", new A._updateAstPrototypes_closure(), "span", new A._updateAstPrototypes_closure0()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineMethod(t2)); + A.defineGetter(J.get$$prototype$x(t1._as(file.constructor)), "codeUnits", new A._updateAstPrototypes_closure1(), _null); + t2 = $.$get$_interpolation(); + A.defineGetter(J.get$$prototype$x(t1._as(t2.constructor)), "asPlain", new A._updateAstPrototypes_closure2(), _null); + t3 = $.$get$bogusSpan0(); + J.get$$prototype$x(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(new A.ExtendRule0(t2, false, t3).constructor))).constructor)).accept = A.allowInteropCaptureThisNamed(_s6_, new A._updateAstPrototypes_closure3()); + string = new A.StringExpression0(t2, false); + J.get$$prototype$x(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(string.constructor))).constructor)).accept = A.allowInteropCaptureThisNamed(_s6_, new A._updateAstPrototypes_closure4()); + J.get$$prototype$x(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(new A.InterpolatedParentSelector(_null, t3).constructor))).constructor)).accept = A.allowInteropCaptureThisNamed(_s6_, new A._updateAstPrototypes_closure5()); + J.get$$prototype$x(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(new A.IfConditionSass0(string, t3).constructor))).constructor)).accept = A.allowInteropCaptureThisNamed(_s6_, new A._updateAstPrototypes_closure6()); + $arguments = A.ArgumentList$0(B.List_empty24, B.Map_empty14, B.Map_empty5, t3, _null, _null); + A.defineGetter(J.get$$prototype$x(t1._as(new A.IncludeRule0(_null, A.stringReplaceAllUnchecked("a", "_", "-"), "a", $arguments, _null, t3).constructor)), _s9_, new A._updateAstPrototypes_closure7(), _null); + A.defineGetter(J.get$$prototype$x(t1._as(new A.ContentRule0($arguments, t3).constructor)), _s9_, new A._updateAstPrototypes_closure8(), _null); + A.defineGetter(J.get$$prototype$x(t1._as(new A.FunctionExpression0(_null, A.stringReplaceAllUnchecked("a", "_", "-"), "a", $arguments, t3).constructor)), _s9_, new A._updateAstPrototypes_closure9(), _null); + A.defineGetter(J.get$$prototype$x(t1._as(new A.LegacyIfExpression0($arguments, t3).constructor)), _s9_, new A._updateAstPrototypes_closure10(), _null); + A.defineGetter(J.get$$prototype$x(t1._as(new A.InterpolatedFunctionExpression0(t2, $arguments, t3).constructor)), _s9_, new A._updateAstPrototypes_closure11(), _null); + A.defineGetter(J.get$$prototype$x(t1._as(new A.IfConditionFunction0(t2, t2, t3).constructor)), _s9_, new A._updateAstPrototypes_closure12(), _null); + A._addSupportsConditionToInterpolation(); + klass = new A.InterpolatedClassSelector(t2); + compound = A.InterpolatedCompoundSelector$(A._setArrayType([klass], type$.JSArray_InterpolatedSimpleSelector)); + ifConditionSass = new A.IfConditionSass0(string, t3); + for (t2 = [string, new A.BinaryOperationExpression0(B.BinaryOperator_jCK0, string, string, false), new A.SupportsExpression0(new A.SupportsAnything0(t2, t3)), new A.LoudComment0(t2), klass, new A.InterpolatedIDSelector(t2), new A.InterpolatedPlaceholderSelector(t2), new A.InterpolatedTypeSelector(new A.InterpolatedQualifiedName(t2, t3, _null)), compound, A.InterpolatedSelectorList$(A._setArrayType([A.InterpolatedComplexSelector$(A._setArrayType([new A.InterpolatedComplexSelectorComponent(compound, _null, t3)], type$.JSArray_InterpolatedComplexSelectorComponent), t3, _null)], type$.JSArray_InterpolatedComplexSelector)), A.IfConditionOperation$0(A._setArrayType([ifConditionSass, ifConditionSass], type$.JSArray_IfConditionExpression_2), B.BooleanOperator_00), new A.IfConditionRaw0(t2)], _i = 0; _i < 12; ++_i) { + t3 = J.get$$prototype$x(t1._as(t2[_i].constructor)); + t4 = {get: A.allowInteropCaptureThis(new A._updateAstPrototypes_closure13()), enumerable: false}; + self.Object.defineProperty(t3, "span", t4); + } + }, + _addSupportsConditionToInterpolation() { + var t3, _i, $function, t4, + t1 = $.$get$_interpolation(), + t2 = $.$get$bogusSpan0(), + anything = new A.SupportsAnything0(t1, t2); + for (t3 = $.$get$_expression(), t2 = [anything, new A.SupportsDeclaration0(t3, t3, t2), new A.SupportsFunction0(t1, t1, t2), new A.SupportsInterpolation0(t3, t2), new A.SupportsNegation0(anything, t2), new A.SupportsOperation0(anything, anything, B.BooleanOperator_00, t2)], t3 = type$.JSClass, _i = 0; _i < 6; ++_i) { + t1 = J.get$$prototype$x(t3._as(t2[_i].constructor)); + $function = A.allowInteropCaptureThis(new A._addSupportsConditionToInterpolation_closure()); + t4 = {value: "toInterpolation", enumerable: false}; + self.Object.defineProperty($function, "name", t4); + A._hideDartProperties($function); + t1.toInterpolation = $function; + } + }, + _parse(css, syntax, path) { + var t1; + $label0$0: { + if ("scss" === syntax) { + t1 = B.Syntax_SCSS_0_scss0; + break $label0$0; + } + if ("sass" === syntax) { + t1 = B.Syntax_Sass_1_sass0; + break $label0$0; + } + if ("css" === syntax) { + t1 = B.Syntax_CSS_2_css0; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$('Unknown syntax "' + syntax + '"')); + } + return A.Stylesheet_Stylesheet$parse0(css, t1, true, A.NullableExtension_andThen0(path, A.path__toUri$closure())); + }, + _parseIdentifier(identifier) { + var t1, exception; + try { + t1 = new A.Parser1(A.SpanScanner$(identifier, null), null)._parser1$_parseIdentifier$0(); + return t1; + } catch (exception) { + if (type$.SassFormatException_2._is(A.unwrapException(exception))) + return null; + else + throw exception; + } + }, + _toCssIdentifier(text) { + return A.StringExtension_toCssIdentifier(text); + }, + ParserExports: function ParserExports() { + }, + loadParserExports_closure: function loadParserExports_closure() { + }, + loadParserExports_closure0: function loadParserExports_closure0() { + }, + loadParserExports_closure1: function loadParserExports_closure1() { + }, + loadParserExports_closure2: function loadParserExports_closure2() { + }, + loadParserExports_closure3: function loadParserExports_closure3() { + }, + loadParserExports_closure4: function loadParserExports_closure4() { + }, + _updateLazyFileSpanPrototype_closure: function _updateLazyFileSpanPrototype_closure() { + }, + _updateLazyFileSpanPrototype_closure0: function _updateLazyFileSpanPrototype_closure0() { + }, + _updateLazyFileSpanPrototype_closure1: function _updateLazyFileSpanPrototype_closure1() { + }, + _updateLazyFileSpanPrototype_closure2: function _updateLazyFileSpanPrototype_closure2() { + }, + _updateAstPrototypes_closure: function _updateAstPrototypes_closure() { + }, + _updateAstPrototypes_closure0: function _updateAstPrototypes_closure0() { + }, + _updateAstPrototypes_closure1: function _updateAstPrototypes_closure1() { + }, + _updateAstPrototypes_closure2: function _updateAstPrototypes_closure2() { + }, + _updateAstPrototypes_closure3: function _updateAstPrototypes_closure3() { + }, + _updateAstPrototypes_closure4: function _updateAstPrototypes_closure4() { + }, + _updateAstPrototypes_closure5: function _updateAstPrototypes_closure5() { + }, + _updateAstPrototypes_closure6: function _updateAstPrototypes_closure6() { + }, + _updateAstPrototypes_closure7: function _updateAstPrototypes_closure7() { + }, + _updateAstPrototypes_closure8: function _updateAstPrototypes_closure8() { + }, + _updateAstPrototypes_closure9: function _updateAstPrototypes_closure9() { + }, + _updateAstPrototypes_closure10: function _updateAstPrototypes_closure10() { + }, + _updateAstPrototypes_closure11: function _updateAstPrototypes_closure11() { + }, + _updateAstPrototypes_closure12: function _updateAstPrototypes_closure12() { + }, + _updateAstPrototypes_closure13: function _updateAstPrototypes_closure13() { + }, + _addSupportsConditionToInterpolation_closure: function _addSupportsConditionToInterpolation_closure() { + }, + Parser_isIdentifier0(text) { + var exception; + try { + new A.Parser1(A.SpanScanner$(text, null), null)._parser1$_parseIdentifier$0(); + return true; + } catch (exception) { + if (type$.SassFormatException_2._is(A.unwrapException(exception))) + return false; + else + throw exception; + } + }, + Parser1: function Parser1(t0, t1) { + this.scanner = t0; + this._parser1$_interpolationMap = t1; + }, + Parser__parseIdentifier_closure0: function Parser__parseIdentifier_closure0(t0) { + this.$this = t0; + }, + Parser_escape_closure0: function Parser_escape_closure0() { + }, + Parser_scanIdentChar_matches0: function Parser_scanIdentChar_matches0(t0, t1) { + this.caseSensitive = t0; + this.char = t1; + }, + Parser_spanFrom_closure0: function Parser_spanFrom_closure0(t0, t1) { + this.$this = t0; + this.span = t1; + }, + Parser_spanFromPosition_closure0: function Parser_spanFromPosition_closure0(t0, t1) { + this.$this = t0; + this.span = t1; + }, + InterpolatedPlaceholderSelector: function InterpolatedPlaceholderSelector(t0) { + this.name = t0; + }, + PlaceholderSelector0: function PlaceholderSelector0(t0, t1) { + this.name = t0; + this.span = t1; + }, + PlainCssCallable0: function PlainCssCallable0(t0) { + this.name = t0; + }, + PrefixedMapView0: function PrefixedMapView0(t0, t1, t2) { + this._prefixed_map_view0$_map = t0; + this._prefixed_map_view0$_prefix = t1; + this.$ti = t2; + }, + _PrefixedKeys0: function _PrefixedKeys0(t0) { + this._prefixed_map_view0$_view = t0; + }, + _PrefixedKeys_iterator_closure0: function _PrefixedKeys_iterator_closure0(t0) { + this.$this = t0; + }, + ProphotoRgbColorSpace0: function ProphotoRgbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + InterpolatedPseudoSelector: function InterpolatedPseudoSelector(t0, t1, t2, t3, t4) { + var _ = this; + _.name = t0; + _.isSyntacticClass = t1; + _.argument = t2; + _.selector = t3; + _.span = t4; + }, + PseudoSelector$0($name, span, argument, element, selector) { + var t1 = !element, + t2 = t1 && !A.PseudoSelector__isFakePseudoElement0($name); + return new A.PseudoSelector0($name, A.unvendor0($name), t2, t1, argument, selector, span); + }, + PseudoSelector__isFakePseudoElement0($name) { + switch ($name.charCodeAt(0)) { + case 97: + case 65: + return A.equalsIgnoreCase0($name, "after"); + case 98: + case 66: + return A.equalsIgnoreCase0($name, "before"); + case 102: + case 70: + return A.equalsIgnoreCase0($name, "first-line") || A.equalsIgnoreCase0($name, "first-letter"); + default: + return false; + } + }, + PseudoSelector0: function PseudoSelector0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _.name = t0; + _.normalizedName = t1; + _.isClass = t2; + _.isSyntacticClass = t3; + _.argument = t4; + _.selector = t5; + _._pseudo$__PseudoSelector_specificity_FI = $; + _.span = t6; + }, + PseudoSelector_specificity_closure0: function PseudoSelector_specificity_closure0(t0) { + this.$this = t0; + }, + PseudoSelector_specificity__closure1: function PseudoSelector_specificity__closure1() { + }, + PseudoSelector_specificity__closure2: function PseudoSelector_specificity__closure2() { + }, + PseudoSelector_unify_closure0: function PseudoSelector_unify_closure0() { + }, + PublicMemberMapView0: function PublicMemberMapView0(t0, t1) { + this._public_member_map_view0$_inner = t0; + this.$ti = t1; + }, + InterpolatedQualifiedName: function InterpolatedQualifiedName(t0, t1, t2) { + this.name = t0; + this.span = t1; + this.namespace = t2; + }, + QualifiedName0: function QualifiedName0(t0, t1) { + this.name = t0; + this.namespace = t1; + }, + Rec2020ColorSpace0: function Rec2020ColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + createJSClass($name, $constructor) { + return type$.JSClass._as(A.allowInteropCaptureThisNamed($name, $constructor)); + }, + JSClassExtension_injectSuperclass(_this, superclass) { + var t1 = J.getInterceptor$x(superclass), + t2 = J.getInterceptor$x(_this); + self.Object.setPrototypeOf(t1.get$$prototype(superclass), J.get$$prototype$x(type$.JSClass._as(self.Object.getPrototypeOf(t2.get$$prototype(_this)).constructor))); + self.Object.setPrototypeOf(t2.get$$prototype(_this), self.Object.create(t1.get$$prototype(superclass))); + }, + JSClassExtension_setCustomInspect(_this, inspect) { + if (self.util == null) + return; + J.get$$prototype$x(_this)[self.util.inspect.custom] = A.allowInteropCaptureThis(new A.JSClassExtension_setCustomInspect_closure(inspect)); + }, + JSClassExtension_get_defineStaticMethod(_this) { + return new A.JSClassExtension_get_defineStaticMethod_closure(_this); + }, + JSClassExtension_get_defineMethod(_this) { + return new A.JSClassExtension_get_defineMethod_closure(_this); + }, + JSClassExtension_defineMethods(_this, methods) { + methods.forEach$1(0, A.JSClassExtension_get_defineMethod(_this)); + }, + JSClassExtension_get_defineGetter(_this) { + return new A.JSClassExtension_get_defineGetter_closure(_this); + }, + JSClass0: function JSClass0() { + }, + JSClassExtension_setCustomInspect_closure: function JSClassExtension_setCustomInspect_closure(t0) { + this.inspect = t0; + }, + JSClassExtension_get_defineStaticMethod_closure: function JSClassExtension_get_defineStaticMethod_closure(t0) { + this._this = t0; + }, + JSClassExtension_get_defineMethod_closure: function JSClassExtension_get_defineMethod_closure(t0) { + this._this = t0; + }, + JSClassExtension_get_defineGetter_closure: function JSClassExtension_get_defineGetter_closure(t0) { + this._this = t0; + }, + RenderContext0: function RenderContext0() { + }, + RenderContextOptions0: function RenderContextOptions0() { + }, + RenderContextResult0: function RenderContextResult0() { + }, + RenderContextResultStats0: function RenderContextResultStats0() { + }, + RenderOptions: function RenderOptions() { + }, + RenderResult: function RenderResult() { + }, + RenderResultStats: function RenderResultStats() { + }, + ReplaceExpressionVisitor0: function ReplaceExpressionVisitor0() { + }, + ReplaceExpressionVisitor_visitListExpression_closure0: function ReplaceExpressionVisitor_visitListExpression_closure0(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitIfConditionOperation_closure0: function ReplaceExpressionVisitor_visitIfConditionOperation_closure0(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitArgumentList_closure0: function ReplaceExpressionVisitor_visitArgumentList_closure0(t0) { + this.$this = t0; + }, + ReplaceExpressionVisitor_visitInterpolation_closure0: function ReplaceExpressionVisitor_visitInterpolation_closure0(t0) { + this.$this = t0; + }, + ImporterResult$(contents, sourceMapUrl, syntax) { + if ((sourceMapUrl == null ? null : sourceMapUrl.get$scheme()) === "") + A.throwExpression(A.ArgumentError$value(sourceMapUrl, "sourceMapUrl", "must be absolute")); + return new A.ImporterResult0(contents, sourceMapUrl, syntax); + }, + ImporterResult0: function ImporterResult0(t0, t1, t2) { + this.contents = t0; + this._result$_sourceMapUrl = t1; + this.syntax = t2; + }, + ReturnRule0: function ReturnRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + RgbColorSpace0: function RgbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + SassParser0: function SassParser0(t0, t1, t2, t3, t4) { + var _ = this; + _._sass0$_currentIndentation = 0; + _._sass0$_spaces = _._sass0$_nextIndentationEnd = _._sass0$_nextIndentation = null; + _._parseSelectors = t0; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inPlainCssFunction = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t1; + _.warnings = t2; + _.lastSilentComment = null; + _.scanner = t3; + _._parser1$_interpolationMap = t4; + }, + SassParser_styleRuleSelector_closure0: function SassParser_styleRuleSelector_closure0() { + }, + SassParser_children_closure0: function SassParser_children_closure0(t0, t1, t2) { + this.$this = t0; + this.child = t1; + this.children = t2; + }, + SassParser__peekIndentation_closure1: function SassParser__peekIndentation_closure1() { + }, + SassParser__peekIndentation_closure2: function SassParser__peekIndentation_closure2() { + }, + SassParser__tryTrailingSemicolon_closure0: function SassParser__tryTrailingSemicolon_closure0() { + }, + _translateReturnValue(val) { + if (val instanceof A._Future) + return A.futureToPromise(val, type$.dynamic); + else + return val; + }, + main2() { + new Uint8Array(0); + A.main(); + J.set$cli_pkg_main_0_$x(self.exports, A._wrapMain(A.sass__main$closure())); + }, + _wrapMain(main) { + if (type$.dynamic_Function._is(main)) + return A.allowInterop(new A._wrapMain_closure(main)); + else + return A.allowInterop(new A._wrapMain_closure0(main)); + }, + _Exports: function _Exports() { + }, + _wrapMain_closure: function _wrapMain_closure(t0) { + this.main = t0; + }, + _wrapMain_closure0: function _wrapMain_closure0(t0) { + this.main = t0; + }, + ScssParser$0(contents, parseSelectors, url) { + return new A.ScssParser0(parseSelectors, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2), A.SpanScanner$(contents, url), null); + }, + ScssParser0: function ScssParser0(t0, t1, t2, t3, t4) { + var _ = this; + _._parseSelectors = t0; + _._stylesheet0$_isUseAllowed = true; + _._stylesheet0$_inExpression = _._stylesheet0$_inParentheses = _._stylesheet0$_inStyleRule = _._stylesheet0$_inPlainCssFunction = _._stylesheet0$_inUnknownAtRule = _._stylesheet0$_inControlDirective = _._stylesheet0$_inContentBlock = _._stylesheet0$_inMixin = false; + _._stylesheet0$_globalVariables = t1; + _.warnings = t2; + _.lastSilentComment = null; + _.scanner = t3; + _._parser1$_interpolationMap = t4; + }, + Selector0: function Selector0() { + }, + _IsInvisibleVisitor2: function _IsInvisibleVisitor2(t0) { + this.includeBogus = t0; + }, + _IsBogusVisitor0: function _IsBogusVisitor0(t0) { + this.includeLeadingCombinator = t0; + }, + _IsBogusVisitor_visitComplexSelector_closure0: function _IsBogusVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + _IsUselessVisitor0: function _IsUselessVisitor0() { + }, + _IsUselessVisitor_visitComplexSelector_closure0: function _IsUselessVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + _ContainsParentSelectorVisitor0: function _ContainsParentSelectorVisitor0() { + }, + __ContainsParentSelectorVisitor_Object_AnySelectorVisitor0: function __ContainsParentSelectorVisitor_Object_AnySelectorVisitor0() { + }, + __IsBogusVisitor_Object_AnySelectorVisitor0: function __IsBogusVisitor_Object_AnySelectorVisitor0() { + }, + __IsInvisibleVisitor_Object_AnySelectorVisitor0: function __IsInvisibleVisitor_Object_AnySelectorVisitor0() { + }, + __IsUselessVisitor_Object_AnySelectorVisitor0: function __IsUselessVisitor_Object_AnySelectorVisitor0() { + }, + SelectorExpression0: function SelectorExpression0(t0) { + this.span = t0; + }, + _prependParent0(compound) { + var _0_3, _0_4, t2, t3, rest, + t1 = A.EvaluationContext_currentOrNull0(), + span = (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan(), + _0_0 = compound.components; + $label0$0: { + _0_3 = _0_0.length >= 1; + if (_0_3) { + _0_4 = _0_0[0]; + t1 = _0_4 instanceof A.UniversalSelector0; + } else { + _0_4 = null; + t1 = false; + } + t2 = null; + if (t1) { + t1 = t2; + break $label0$0; + } + t1 = false; + if (_0_3) { + t3 = _0_4; + if (t3 instanceof A.TypeSelector0) { + t1 = _0_4; + t1 = type$.TypeSelector_2._as(t1).name.namespace != null; + } + } + if (t1) { + t1 = t2; + break $label0$0; + } + if (_0_3) { + t1 = _0_4; + t1 = t1 instanceof A.TypeSelector0; + } else + t1 = false; + if (t1) { + t1 = _0_3 ? _0_4 : _0_0[0]; + type$.TypeSelector_2._as(t1); + rest = B.JSArray_methods.sublist$1(_0_0, 1); + t1 = A._setArrayType([new A.ParentSelector0(t1.name.name, span)], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, rest); + t1 = A.CompoundSelector$0(t1, span); + break $label0$0; + } + t1 = A._setArrayType([new A.ParentSelector0(null, span)], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, _0_0); + t1 = A.CompoundSelector$0(t1, span); + break $label0$0; + } + return t1; + }, + _function8($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:selector"); + }, + _nest_closure0: function _nest_closure0() { + }, + _nest__closure1: function _nest__closure1() { + }, + _nest__closure2: function _nest__closure2() { + }, + _append_closure1: function _append_closure1() { + }, + _append__closure1: function _append__closure1() { + }, + _append__closure2: function _append__closure2(t0) { + this.span = t0; + }, + _append___closure0: function _append___closure0(t0, t1) { + this.parent = t0; + this.span = t1; + }, + _extend_closure0: function _extend_closure0() { + }, + _replace_closure0: function _replace_closure0() { + }, + _unify_closure0: function _unify_closure0() { + }, + _isSuperselector_closure0: function _isSuperselector_closure0() { + }, + _simpleSelectors_closure0: function _simpleSelectors_closure0() { + }, + _simpleSelectors__closure0: function _simpleSelectors__closure0() { + }, + _parse_closure0: function _parse_closure0() { + }, + SelectorParser$0(contents, allowParent, interpolationMap, logger, plainCss, url) { + return new A.SelectorParser0(allowParent, plainCss, logger, A.SpanScanner$(contents, url), interpolationMap); + }, + SelectorParser0: function SelectorParser0(t0, t1, t2, t3, t4) { + var _ = this; + _._selector0$_allowParent = t0; + _._selector0$_plainCss = t1; + _._selector0$_logger = t2; + _.scanner = t3; + _._parser1$_interpolationMap = t4; + }, + SelectorParser_parse_closure0: function SelectorParser_parse_closure0(t0) { + this.$this = t0; + }, + SelectorParser_parseCompoundSelector_closure0: function SelectorParser_parseCompoundSelector_closure0(t0) { + this.$this = t0; + }, + SelectorSearchVisitor0: function SelectorSearchVisitor0() { + }, + SelectorSearchVisitor_visitComplexSelector_closure0: function SelectorSearchVisitor_visitComplexSelector_closure0(t0) { + this.$this = t0; + }, + SelectorSearchVisitor_visitCompoundSelector_closure0: function SelectorSearchVisitor_visitCompoundSelector_closure0(t0) { + this.$this = t0; + }, + serialize0(node, charset, indentWidth, inspect, lineFeed, logger, sourceMap, style, useSpaces) { + var t1, css, t2, prefix, + visitor = A._SerializeVisitor$0(indentWidth == null ? 2 : indentWidth, inspect, lineFeed, logger, true, sourceMap, style, useSpaces); + node.accept$1(visitor); + t1 = visitor._serialize0$_buffer; + css = t1.toString$0(0); + if (charset) { + t2 = new A.CodeUnits(css); + t2 = t2.any$1(t2, new A.serialize_closure0()); + } else + t2 = false; + if (t2) + prefix = style === B.OutputStyle_10 ? "\ufeff" : '@charset "UTF-8";\n'; + else + prefix = ""; + t1 = sourceMap ? t1.buildSourceMap$1$prefix(prefix) : null; + return new A._Record_2_sourceMap(prefix + css, t1); + }, + serializeValue0(value, inspect, quote) { + var _null = null, + visitor = A._SerializeVisitor$0(_null, inspect, _null, _null, quote, false, _null, true); + value.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + }, + serializeSelector0(selector, inspect) { + var _null = null, + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + selector.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + }, + _SerializeVisitor$0(indentWidth, inspect, lineFeed, logger, quote, sourceMap, style, useSpaces) { + var t1 = sourceMap ? new A.SourceMapBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Entry)) : new A.NoSourceMapBuffer0(new A.StringBuffer("")), + t2 = style == null ? B.OutputStyle_00 : style, + t3 = useSpaces ? 32 : 9, + t4 = indentWidth == null ? 2 : indentWidth, + t5 = lineFeed == null ? B.LineFeed_oJz : lineFeed; + A.RangeError_checkValueInInterval(t4, 0, 10, "indentWidth"); + return new A._SerializeVisitor0(t1, t2, inspect, quote, t3, t4, t5); + }, + serialize_closure0: function serialize_closure0() { + }, + _SerializeVisitor0: function _SerializeVisitor0(t0, t1, t2, t3, t4, t5, t6) { + var _ = this; + _._serialize0$_buffer = t0; + _._serialize0$_indentation = 0; + _._serialize0$_style = t1; + _._serialize0$_inspect = t2; + _._serialize0$_quote = t3; + _._serialize0$_indentCharacter = t4; + _._serialize0$_indentWidth = t5; + _._lineFeed = t6; + }, + _SerializeVisitor_visitCssComment_closure0: function _SerializeVisitor_visitCssComment_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssAtRule_closure0: function _SerializeVisitor_visitCssAtRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssMediaRule_closure0: function _SerializeVisitor_visitCssMediaRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport_closure0: function _SerializeVisitor_visitCssImport_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssImport__closure0: function _SerializeVisitor_visitCssImport__closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssKeyframeBlock_closure0: function _SerializeVisitor_visitCssKeyframeBlock_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssStyleRule_closure0: function _SerializeVisitor_visitCssStyleRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssSupportsRule_closure0: function _SerializeVisitor_visitCssSupportsRule_closure0(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure1: function _SerializeVisitor_visitCssDeclaration_closure1(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitCssDeclaration_closure2: function _SerializeVisitor_visitCssDeclaration_closure2(t0, t1) { + this.$this = t0; + this.node = t1; + }, + _SerializeVisitor_visitList_closure2: function _SerializeVisitor_visitList_closure2() { + }, + _SerializeVisitor_visitList_closure3: function _SerializeVisitor_visitList_closure3(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor_visitList_closure4: function _SerializeVisitor_visitList_closure4(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitMap_closure0: function _SerializeVisitor_visitMap_closure0(t0) { + this.$this = t0; + }, + _SerializeVisitor_visitSelectorList_closure0: function _SerializeVisitor_visitSelectorList_closure0() { + }, + _SerializeVisitor__write_closure0: function _SerializeVisitor__write_closure0(t0, t1) { + this.$this = t0; + this.value = t1; + }, + _SerializeVisitor__visitChildren_closure1: function _SerializeVisitor__visitChildren_closure1(t0, t1) { + this.$this = t0; + this.child = t1; + }, + _SerializeVisitor__visitChildren_closure2: function _SerializeVisitor__visitChildren_closure2(t0, t1) { + this.$this = t0; + this.child = t1; + }, + OutputStyle0: function OutputStyle0(t0, t1) { + this.index = t0; + this._name = t1; + }, + LineFeed0: function LineFeed0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.text = t1; + _.index = t2; + _._name = t3; + }, + JSSet: function JSSet() { + }, + ShadowedModuleView_ifNecessary0(inner, functions, mixins, variables, $T) { + return A.ShadowedModuleView__needsBlocklist0(inner.get$variables(), variables) || A.ShadowedModuleView__needsBlocklist0(inner.get$functions(inner), functions) || A.ShadowedModuleView__needsBlocklist0(inner.get$mixins(), mixins) ? new A.ShadowedModuleView0(inner, A.ShadowedModuleView__shadowedMap0(inner.get$variables(), variables, type$.Value_2), A.ShadowedModuleView__shadowedMap0(inner.get$variableNodes(), variables, type$.AstNode_2), A.ShadowedModuleView__shadowedMap0(inner.get$functions(inner), functions, $T), A.ShadowedModuleView__shadowedMap0(inner.get$mixins(), mixins, $T), $T._eval$1("ShadowedModuleView0<0>")) : null; + }, + ShadowedModuleView__shadowedMap0(map, blocklist, $V) { + var t1 = A.ShadowedModuleView__needsBlocklist0(map, blocklist); + return !t1 ? map : A.LimitedMapView$blocklist0(map, blocklist, type$.String, $V); + }, + ShadowedModuleView__needsBlocklist0(map, blocklist) { + return map.get$isNotEmpty(map) && blocklist.any$1(0, map.get$containsKey()); + }, + ShadowedModuleView0: function ShadowedModuleView0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._shadowed_view0$_inner = t0; + _.variables = t1; + _.variableNodes = t2; + _.functions = t3; + _.mixins = t4; + _.$ti = t5; + }, + SilentComment0: function SilentComment0(t0, t1) { + this.text = t0; + this.span = t1; + }, + InterpolatedSimpleSelector: function InterpolatedSimpleSelector() { + }, + SimpleSelector0: function SimpleSelector0() { + }, + SimpleSelector_isSuperselector_closure0: function SimpleSelector_isSuperselector_closure0(t0) { + this.$this = t0; + }, + SimpleSelector_isSuperselector__closure0: function SimpleSelector_isSuperselector__closure0(t0) { + this.$this = t0; + }, + JSSimpleSelectorVisitor: function JSSimpleSelectorVisitor(t0) { + this._simple_selector$_inner = t0; + }, + JSSimpleSelectorVisitorObject: function JSSimpleSelectorVisitorObject() { + }, + SingleUnitSassNumber0: function SingleUnitSassNumber0(t0, t1, t2) { + var _ = this; + _._single_unit$_unit = t0; + _._number1$_value = t1; + _.hashCache = null; + _.asSlash = t2; + }, + SingleUnitSassNumber__coerceToUnit_closure0: function SingleUnitSassNumber__coerceToUnit_closure0(t0, t1) { + this.$this = t0; + this.unit = t1; + }, + SingleUnitSassNumber__coerceValueToUnit_closure0: function SingleUnitSassNumber__coerceValueToUnit_closure0(t0) { + this.$this = t0; + }, + SingleUnitSassNumber_multiplyUnits_closure1: function SingleUnitSassNumber_multiplyUnits_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SingleUnitSassNumber_multiplyUnits_closure2: function SingleUnitSassNumber_multiplyUnits_closure2(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + SourceInterpolationVisitor: function SourceInterpolationVisitor(t0) { + this.buffer = t0; + }, + SourceInterpolationVisitor__visitArguments_closure: function SourceInterpolationVisitor__visitArguments_closure(t0) { + this.$this = t0; + }, + SourceInterpolationVisitor_visitIfConditionOperation_closure: function SourceInterpolationVisitor_visitIfConditionOperation_closure(t0) { + this.$this = t0; + }, + SourceInterpolationVisitor_visitListExpression_closure: function SourceInterpolationVisitor_visitListExpression_closure(t0) { + this.$this = t0; + }, + SourceMapBuffer0: function SourceMapBuffer0(t0, t1) { + var _ = this; + _._source_map_buffer0$_buffer = t0; + _._source_map_buffer0$_entries = t1; + _._source_map_buffer0$_column = _._source_map_buffer0$_line = 0; + _._source_map_buffer0$_inSpan = false; + }, + SourceMapBuffer_buildSourceMap_closure0: function SourceMapBuffer_buildSourceMap_closure0(t0, t1) { + this._box_0 = t0; + this.prefixLength = t1; + }, + updateSourceSpanPrototype() { + var t3, t4, _i, t5, + span = A.SourceFile$fromString("", null).span$1(0, 0), + t1 = type$.SourceSpan, + t2 = type$.String; + for (t1 = [span, new A.MultiSpan0(span, "", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_empty(t1, t2), t1, t2)), new A.LazyFileSpan0(new A.updateSourceSpanPrototype_closure(span))], t3 = type$.JSClass, t4 = type$.Function, _i = 0; _i < 3; ++_i) { + t5 = t3._as(t1[_i].constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["start", new A.updateSourceSpanPrototype_closure0(), "end", new A.updateSourceSpanPrototype_closure1(), "url", new A.updateSourceSpanPrototype_closure2(), "text", new A.updateSourceSpanPrototype_closure3(), "context", new A.updateSourceSpanPrototype_closure4()], t2, t4).forEach$1(0, A.JSClassExtension_get_defineGetter(t5)); + } + t1 = t3._as(A.FileLocation$_(span.file, span._file$_start).constructor); + A.LinkedHashMap_LinkedHashMap$_literal(["line", new A.updateSourceSpanPrototype_closure5(), "column", new A.updateSourceSpanPrototype_closure6()], t2, t4).forEach$1(0, A.JSClassExtension_get_defineGetter(t1)); + }, + updateSourceSpanPrototype_closure: function updateSourceSpanPrototype_closure(t0) { + this.span = t0; + }, + updateSourceSpanPrototype_closure0: function updateSourceSpanPrototype_closure0() { + }, + updateSourceSpanPrototype_closure1: function updateSourceSpanPrototype_closure1() { + }, + updateSourceSpanPrototype_closure2: function updateSourceSpanPrototype_closure2() { + }, + updateSourceSpanPrototype__closure: function updateSourceSpanPrototype__closure() { + }, + updateSourceSpanPrototype_closure3: function updateSourceSpanPrototype_closure3() { + }, + updateSourceSpanPrototype_closure4: function updateSourceSpanPrototype_closure4() { + }, + updateSourceSpanPrototype_closure5: function updateSourceSpanPrototype_closure5() { + }, + updateSourceSpanPrototype_closure6: function updateSourceSpanPrototype_closure6() { + }, + ColorSpace_fromName0($name, argumentName) { + var t1, + _0_0 = $name.toLowerCase(); + $label0$0: { + if ("rgb" === _0_0) { + t1 = B.RgbColorSpace_i0P0; + break $label0$0; + } + if ("hwb" === _0_0) { + t1 = B.HwbColorSpace_guQ0; + break $label0$0; + } + if ("hsl" === _0_0) { + t1 = B.HslColorSpace_JQ20; + break $label0$0; + } + if ("srgb" === _0_0) { + t1 = B.SrgbColorSpace_thf0; + break $label0$0; + } + if ("srgb-linear" === _0_0) { + t1 = B.SrgbLinearColorSpace_kUj0; + break $label0$0; + } + if ("display-p3" === _0_0) { + t1 = B.DisplayP3ColorSpace_MmT0; + break $label0$0; + } + if ("display-p3-linear" === _0_0) { + t1 = B.DisplayP3LinearColorSpace_PrP0; + break $label0$0; + } + if ("a98-rgb" === _0_0) { + t1 = B.A98RgbColorSpace_lf20; + break $label0$0; + } + if ("prophoto-rgb" === _0_0) { + t1 = B.ProphotoRgbColorSpace_BDz0; + break $label0$0; + } + if ("rec2020" === _0_0) { + t1 = B.Rec2020ColorSpace_6oo0; + break $label0$0; + } + if ("xyz" === _0_0 || "xyz-d65" === _0_0) { + t1 = B.XyzD65ColorSpace_WiJ0; + break $label0$0; + } + if ("xyz-d50" === _0_0) { + t1 = B.XyzD50ColorSpace_2OB0; + break $label0$0; + } + if ("lab" === _0_0) { + t1 = B.LabColorSpace_2nT0; + break $label0$0; + } + if ("lch" === _0_0) { + t1 = B.LchColorSpace_Bpv0; + break $label0$0; + } + if ("oklab" === _0_0) { + t1 = B.OklabColorSpace_5400; + break $label0$0; + } + if ("oklch" === _0_0) { + t1 = B.OklchColorSpace_9Gj0; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$0('Unknown color space "' + $name + '".', argumentName)); + } + return t1; + }, + ColorSpace0: function ColorSpace0() { + }, + SrgbColorSpace0: function SrgbColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + SrgbLinearColorSpace0: function SrgbLinearColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + Statement0: function Statement0() { + }, + JSStatementVisitor: function JSStatementVisitor(t0) { + this._statement$_inner = t0; + }, + JSStatementVisitorObject: function JSStatementVisitorObject() { + }, + StatementSearchVisitor0: function StatementSearchVisitor0() { + }, + StatementSearchVisitor_visitIfRule_closure1: function StatementSearchVisitor_visitIfRule_closure1(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure2: function StatementSearchVisitor_visitIfRule__closure2(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule_closure2: function StatementSearchVisitor_visitIfRule_closure2(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitIfRule__closure1: function StatementSearchVisitor_visitIfRule__closure1(t0) { + this.$this = t0; + }, + StatementSearchVisitor_visitChildren_closure0: function StatementSearchVisitor_visitChildren_closure0(t0) { + this.$this = t0; + }, + StaticImport0: function StaticImport0(t0, t1, t2) { + this.url = t0; + this.modifiers = t1; + this.span = t2; + }, + StderrLogger0: function StderrLogger0(t0) { + this.color = t0; + }, + StringExpression_quoteText0(text) { + var quote = A.StringExpression__bestQuote0(A._setArrayType([text], type$.JSArray_String)), + buffer = new A.StringBuffer(""), + t1 = A.Primitives_stringFromCharCode(quote); + buffer._contents = t1; + A.StringExpression__quoteInnerText0(text, quote, buffer, true); + t1 = buffer._contents += t1; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + StringExpression__quoteInnerText0(text, quote, buffer, $static) { + var t1, t2, i, _1_0, _0_0, t3, t4, t5, t0; + for (t1 = text.length, t2 = t1 - 1, i = 0; i < t1; ++i) { + _1_0 = text.charCodeAt(i); + if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(97); + if (i !== t2) { + _0_0 = text.charCodeAt(i + 1); + t3 = true; + if (!(_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12)) + if (!(_0_0 >= 48 && _0_0 <= 57)) + if (!(_0_0 >= 97 && _0_0 <= 102)) + t3 = _0_0 >= 65 && _0_0 <= 70; + if (t3) + buffer.writeCharCode$1(32); + } + continue; + } + t3 = 92 === _1_0; + if (t3) + t4 = _1_0; + else + t4 = null; + if (!t3) { + t3 = false; + t5 = _1_0 === quote; + if (t5) + t4 = _1_0; + if (!t5) + if (35 === _1_0) + if ($static) + if (i < t2) { + t3 = text.charCodeAt(i + 1) === 123; + if (t3) + t4 = _1_0; + t0 = t4; + t4 = t3; + t3 = t0; + } else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t0 = t4; + t4 = t3; + t3 = t0; + } + else { + t3 = t4; + t4 = true; + } + } else { + t3 = t4; + t4 = true; + } + if (t4) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(t3); + continue; + } + buffer.writeCharCode$1(_1_0); + } + }, + StringExpression__bestQuote0(strings) { + var t1, t2, t3, containsDoubleQuote, t4, t5; + for (t1 = J.get$iterator$ax(strings), t2 = type$.CodeUnits, t3 = t2._eval$1("ListIterator"), t2 = t2._eval$1("ListBase.E"), containsDoubleQuote = false; t1.moveNext$0();) + for (t4 = new A.CodeUnits(t1.get$current(t1)), t4 = new A.ListIterator(t4, t4.get$length(0), t3); t4.moveNext$0();) { + t5 = t4.__internal$_current; + if (t5 == null) + t5 = t2._as(t5); + if (t5 === 39) + return 34; + if (t5 === 34) + containsDoubleQuote = true; + } + return containsDoubleQuote ? 39 : 34; + }, + StringExpression0: function StringExpression0(t0, t1) { + this.text = t0; + this.hasQuotes = t1; + }, + _codepointForIndex0(index, lengthInCodepoints, allowNegative) { + var result; + if (index === 0) + return 0; + if (index > 0) + return Math.min(index - 1, lengthInCodepoints); + result = lengthInCodepoints + index; + if (result < 0 && !allowNegative) + return 0; + return result; + }, + _function7($name, $arguments, callback) { + return A.BuiltInCallable$function0($name, $arguments, callback, "sass:string"); + }, + module_closure25: function module_closure25() { + }, + module__closure3: function module__closure3(t0) { + this.string = t0; + }, + module__closure4: function module__closure4(t0) { + this.string = t0; + }, + _unquote_closure0: function _unquote_closure0() { + }, + _quote_closure0: function _quote_closure0() { + }, + _length_closure1: function _length_closure1() { + }, + _insert_closure0: function _insert_closure0() { + }, + _index_closure1: function _index_closure1() { + }, + _slice_closure0: function _slice_closure0() { + }, + _toUpperCase_closure0: function _toUpperCase_closure0() { + }, + _toLowerCase_closure0: function _toLowerCase_closure0() { + }, + _uniqueId_closure0: function _uniqueId_closure0() { + }, + StringExtension_toCssIdentifier(_this) { + var t1, doubleDash, _2_0, character, _3_0, + _s52_ = "The U+0000 can't be represented as a CSS identifier.", + _s65_ = "An individual surrogate can't be represented as a CSS identifier.", + buffer = new A.StringBuffer(""), + scanner = A.SpanScanner$(_this, null), + writeEscape = new A.StringExtension_toCssIdentifier_writeEscape(buffer, scanner), + consumeSurrogatePair = new A.StringExtension_toCssIdentifier_consumeSurrogatePair(scanner, writeEscape, buffer); + if (scanner.scanChar$1(45)) { + if (scanner._string_scanner$_position === scanner.string.length) + return "\\2d"; + t1 = A.Primitives_stringFromCharCode(45); + buffer._contents += t1; + doubleDash = scanner.scanChar$1(45); + if (doubleDash) + buffer._contents += t1; + } else + doubleDash = false; + if (!doubleDash) + $label0$0: { + _2_0 = scanner.peekChar$0(); + if (_2_0 == null) + scanner.error$1(0, "The empty string can't be represented as a CSS identifier."); + if (0 === _2_0) + scanner.error$1(0, _s52_); + t1 = _2_0 >>> 10 === 54; + character = _2_0; + if (t1) { + consumeSurrogatePair.call$1(character); + break $label0$0; + } + if (_2_0 >>> 10 === 55) + scanner.error$2$length(0, _s65_, 1); + if (_2_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_2_0) || _2_0 >= 128) + t1 = !(_2_0 >= 57344 && _2_0 <= 63743); + else + t1 = false; + if (t1) { + t1 = A.Primitives_stringFromCharCode(scanner.readChar$0()); + buffer._contents += t1; + break $label0$0; + } + writeEscape.call$1(scanner.readChar$0()); + } + for (;;) { + _3_0 = scanner.peekChar$0(); + if (_3_0 == null) + break; + if (0 === _3_0) + scanner.error$1(0, _s52_); + t1 = _3_0 >>> 10 === 54; + if (t1) { + consumeSurrogatePair.call$1(_3_0); + continue; + } + if (_3_0 >>> 10 === 55) + scanner.error$2$length(0, _s65_, 1); + if (_3_0 !== 95) { + if (!(_3_0 >= 97 && _3_0 <= 122)) + t1 = _3_0 >= 65 && _3_0 <= 90; + else + t1 = true; + t1 = t1 || _3_0 >= 128; + } else + t1 = true; + if (!t1) + t1 = _3_0 >= 48 && _3_0 <= 57 || _3_0 === 45; + else + t1 = true; + if (t1) + t1 = !(_3_0 >= 57344 && _3_0 <= 63743); + else + t1 = false; + if (t1) { + t1 = A.Primitives_stringFromCharCode(scanner.readChar$0()); + buffer._contents += t1; + continue; + } + writeEscape.call$1(scanner.readChar$0()); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + StringExtension_toCssIdentifier_writeEscape: function StringExtension_toCssIdentifier_writeEscape(t0, t1) { + this.buffer = t0; + this.scanner = t1; + }, + StringExtension_toCssIdentifier_consumeSurrogatePair: function StringExtension_toCssIdentifier_consumeSurrogatePair(t0, t1, t2) { + this.scanner = t0; + this.writeEscape = t1; + this.buffer = t2; + }, + stringClass_closure: function stringClass_closure() { + }, + stringClass__closure: function stringClass__closure() { + }, + stringClass__closure0: function stringClass__closure0() { + }, + stringClass__closure1: function stringClass__closure1() { + }, + stringClass__closure2: function stringClass__closure2() { + }, + stringClass__closure3: function stringClass__closure3() { + }, + _ConstructorOptions1: function _ConstructorOptions1() { + }, + _NodeSassString: function _NodeSassString() { + }, + legacyStringClass_closure: function legacyStringClass_closure() { + }, + legacyStringClass_closure0: function legacyStringClass_closure0() { + }, + legacyStringClass_closure1: function legacyStringClass_closure1() { + }, + SassString$0(_text, quotes) { + return new A.SassString0(_text, quotes); + }, + SassString0: function SassString0(t0, t1) { + var _ = this; + _._string0$_text = t0; + _._string0$_hasQuotes = t1; + _._string0$__SassString__sassLength_FI = $; + _._string0$_hashCache = null; + }, + ModifiableCssStyleRule$0(_selector, span, fromPlainCss, originalSelector) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssStyleRule0(_selector, originalSelector, span, fromPlainCss, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssStyleRule0: function ModifiableCssStyleRule0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._style_rule0$_selector = t0; + _.originalSelector = t1; + _.span = t2; + _.fromPlainCss = t3; + _.children = t4; + _._node$_children = t5; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + StyleRule$0(selector, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.StyleRule0(selector, null, span, t1, t2); + }, + StyleRule$withParsedSelector(parsedSelector, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.StyleRule0(null, parsedSelector, span, t1, t2); + }, + StyleRule0: function StyleRule0(t0, t1, t2, t3, t4) { + var _ = this; + _.selector = t0; + _.parsedSelector = t1; + _.span = t2; + _.children = t3; + _.hasDeclarations = t4; + }, + CssStylesheet0: function CssStylesheet0(t0, t1) { + this.children = t0; + this.span = t1; + }, + ModifiableCssStylesheet$0(span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssStylesheet0(span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssStylesheet0: function ModifiableCssStylesheet0(t0, t1, t2) { + var _ = this; + _.span = t0; + _.children = t1; + _._node$_children = t2; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + StylesheetParser0: function StylesheetParser0() { + }, + StylesheetParser_parse_closure0: function StylesheetParser_parse_closure0(t0) { + this.$this = t0; + }, + StylesheetParser_parse__closure0: function StylesheetParser_parse__closure0(t0) { + this.$this = t0; + }, + StylesheetParser_parseParameterList_closure0: function StylesheetParser_parseParameterList_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__parseSingleProduction_closure0: function StylesheetParser__parseSingleProduction_closure0(t0, t1, t2) { + this.$this = t0; + this.production = t1; + this.T = t2; + }, + StylesheetParser_parseSignature_closure: function StylesheetParser_parseSignature_closure(t0, t1) { + this.$this = t0; + this.requireParens = t1; + }, + StylesheetParser__statement_closure0: function StylesheetParser__statement_closure0(t0) { + this.$this = t0; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure1: function StylesheetParser_variableDeclarationWithoutNamespace_closure1(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_variableDeclarationWithoutNamespace_closure2: function StylesheetParser_variableDeclarationWithoutNamespace_closure2(t0) { + this.declaration = t0; + }, + StylesheetParser__declarationOrBuffer_closure3: function StylesheetParser__declarationOrBuffer_closure3(t0) { + this.$this = t0; + }, + StylesheetParser__declarationOrBuffer_closure4: function StylesheetParser__declarationOrBuffer_closure4(t0) { + this.$this = t0; + }, + StylesheetParser__declarationOrBuffer_closure5: function StylesheetParser__declarationOrBuffer_closure5() { + }, + StylesheetParser__declarationOrBuffer_closure6: function StylesheetParser__declarationOrBuffer_closure6(t0) { + this.$this = t0; + }, + StylesheetParser__styleRule_closure0: function StylesheetParser__styleRule_closure0(t0, t1, t2) { + this.$this = t0; + this.selector = t1; + this.start = t2; + }, + StylesheetParser__styleRule_closure1: function StylesheetParser__styleRule_closure1(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.start = t2; + }, + StylesheetParser__withStyleRuleChildren_closure0: function StylesheetParser__withStyleRuleChildren_closure0(t0, t1, t2, t3, t4) { + var _ = this; + _.$this = t0; + _.nodeWithSpan = t1; + _.wasInStyleRule = t2; + _.create = t3; + _.T = t4; + }, + StylesheetParser__propertyOrVariableDeclaration_closure0: function StylesheetParser__propertyOrVariableDeclaration_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__tryDeclarationChildren_closure0: function StylesheetParser__tryDeclarationChildren_closure0(t0, t1) { + this.name = t0; + this.value = t1; + }, + StylesheetParser__atRootRule_closure1: function StylesheetParser__atRootRule_closure1(t0) { + this.query = t0; + }, + StylesheetParser__atRootRule_closure2: function StylesheetParser__atRootRule_closure2() { + }, + StylesheetParser__eachRule_closure0: function StylesheetParser__eachRule_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.wasInControlDirective = t1; + _.variables = t2; + _.list = t3; + }, + StylesheetParser__functionRule_closure0: function StylesheetParser__functionRule_closure0(t0, t1, t2) { + this.name = t0; + this.parameters = t1; + this.precedingComment = t2; + }, + StylesheetParser__forRule_closure1: function StylesheetParser__forRule_closure1(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__forRule_closure2: function StylesheetParser__forRule_closure2(t0, t1, t2, t3, t4, t5) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.wasInControlDirective = t2; + _.variable = t3; + _.from = t4; + _.to = t5; + }, + StylesheetParser__memberList_closure0: function StylesheetParser__memberList_closure0(t0, t1, t2) { + this.$this = t0; + this.variables = t1; + this.identifiers = t2; + }, + StylesheetParser__includeRule_closure0: function StylesheetParser__includeRule_closure0(t0) { + this.contentParameters_ = t0; + }, + StylesheetParser_mediaRule_closure0: function StylesheetParser_mediaRule_closure0(t0) { + this.query = t0; + }, + StylesheetParser__mixinRule_closure0: function StylesheetParser__mixinRule_closure0(t0, t1, t2, t3) { + var _ = this; + _.$this = t0; + _.name = t1; + _.parameters = t2; + _.precedingComment = t3; + }, + StylesheetParser_mozDocumentRule_closure1: function StylesheetParser_mozDocumentRule_closure1(t0) { + this.$this = t0; + }, + StylesheetParser_mozDocumentRule_closure2: function StylesheetParser_mozDocumentRule_closure2(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.name = t2; + _.value = t3; + }, + StylesheetParser_supportsRule_closure0: function StylesheetParser_supportsRule_closure0(t0) { + this.condition = t0; + }, + StylesheetParser__whileRule_closure0: function StylesheetParser__whileRule_closure0(t0, t1, t2) { + this.$this = t0; + this.wasInControlDirective = t1; + this.condition = t2; + }, + StylesheetParser_unknownAtRule_closure0: function StylesheetParser_unknownAtRule_closure0(t0, t1) { + this._box_0 = t0; + this.name = t1; + }, + StylesheetParser__expression_resetState0: function StylesheetParser__expression_resetState0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.start = t2; + }, + StylesheetParser__expression_resolveOneOperation0: function StylesheetParser__expression_resolveOneOperation0(t0, t1) { + this._box_0 = t0; + this.$this = t1; + }, + StylesheetParser__expression_resolveOperations0: function StylesheetParser__expression_resolveOperations0(t0, t1) { + this._box_0 = t0; + this.resolveOneOperation = t1; + }, + StylesheetParser__expression_addSingleExpression0: function StylesheetParser__expression_addSingleExpression0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.resetState = t2; + _.resolveOperations = t3; + }, + StylesheetParser__expression_addOperator0: function StylesheetParser__expression_addOperator0(t0, t1, t2, t3) { + var _ = this; + _._box_0 = t0; + _.$this = t1; + _.resolveOneOperation = t2; + _.addSingleExpression = t3; + }, + StylesheetParser__expression_resolveSpaceExpressions0: function StylesheetParser__expression_resolveSpaceExpressions0(t0, t1, t2) { + this._box_0 = t0; + this.$this = t1; + this.resolveOperations = t2; + }, + StylesheetParser_expressionUntilComma_closure0: function StylesheetParser_expressionUntilComma_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__isHexColor_closure0: function StylesheetParser__isHexColor_closure0() { + }, + StylesheetParser__unicodeRange_closure1: function StylesheetParser__unicodeRange_closure1() { + }, + StylesheetParser__unicodeRange_closure2: function StylesheetParser__unicodeRange_closure2() { + }, + StylesheetParser_interpolatedStringToken_closure0: function StylesheetParser_interpolatedStringToken_closure0(t0) { + this.$this = t0; + }, + StylesheetParser_namespacedExpression_closure0: function StylesheetParser_namespacedExpression_closure0(t0, t1) { + this.$this = t0; + this.start = t1; + }, + StylesheetParser_trySpecialFunction_closure0: function StylesheetParser_trySpecialFunction_closure0() { + }, + StylesheetParser__interpolatedDeclarationValue_closure0: function StylesheetParser__interpolatedDeclarationValue_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__expressionUntilComparison_closure0: function StylesheetParser__expressionUntilComparison_closure0(t0) { + this.$this = t0; + }, + StylesheetParser__publicIdentifier_closure0: function StylesheetParser__publicIdentifier_closure0(t0, t1) { + this.$this = t0; + this.start = t1; + }, + Stylesheet$internal0(children, span, parseTimeWarnings, globalVariables, plainCss) { + var t1 = A._setArrayType([], type$.JSArray_UseRule_2), + t2 = A._setArrayType([], type$.JSArray_ForwardRule_2), + t3 = A.ConstantMap_ConstantMap$from(globalVariables, type$.String, type$.FileSpan), + t4 = A.List_List$unmodifiable(children, type$.Statement_2), + t5 = B.JSArray_methods.any$1(t4, new A.ParentStatement_closure0()); + t1 = new A.Stylesheet0(span, plainCss, t1, t2, new A.UnmodifiableListView(parseTimeWarnings, type$.UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2), t3, t4, t5); + t1.Stylesheet$internal$5$globalVariables$plainCss0(children, span, parseTimeWarnings, globalVariables, plainCss); + return t1; + }, + Stylesheet_Stylesheet$parse0(contents, syntax, parseSelectors, url) { + var error, stackTrace, url0, t1, exception, t2; + try { + switch (syntax.index) { + case 1: + t1 = new A.SassParser0(parseSelectors, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2), A.SpanScanner$(contents, url), null).parse$0(0); + return t1; + case 0: + t1 = A.ScssParser$0(contents, parseSelectors, url).parse$0(0); + return t1; + case 2: + t1 = new A.CssParser0(parseSelectors, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.FileSpan), A._setArrayType([], type$.JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2), A.SpanScanner$(contents, url), null).parse$0(0); + return t1; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$x(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1); + url0 = t1.get$sourceUrl(t1); + if (url0 == null || url0.toString$0(0) === "stdin") + throw exception; + t1 = type$.Uri; + throw A.wrapException(A.throwWithTrace0(error.withLoadedUrls$1(A.Set_Set$unmodifiable(A.LinkedHashSet_LinkedHashSet$_literal([url0], t1), t1)), error, stackTrace)); + } else + throw exception; + } + }, + Stylesheet0: function Stylesheet0(t0, t1, t2, t3, t4, t5, t6, t7) { + var _ = this; + _.span = t0; + _.plainCss = t1; + _._stylesheet1$_uses = t2; + _._stylesheet1$_forwards = t3; + _.parseTimeWarnings = t4; + _.globalVariables = t5; + _.children = t6; + _.hasDeclarations = t7; + }, + SupportsExpression0: function SupportsExpression0(t0) { + this.condition = t0; + }, + ModifiableCssSupportsRule$0(condition, span) { + var t1 = A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + return new A.ModifiableCssSupportsRule0(condition, span, new A.UnmodifiableListView(t1, type$.UnmodifiableListView_ModifiableCssNode_2), t1); + }, + ModifiableCssSupportsRule0: function ModifiableCssSupportsRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _._node$_children = t3; + _._node$_indexInParent = _._node$_parent = null; + _.isGroupEnd = false; + }, + SupportsRule$0(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.SupportsRule0(condition, span, t1, t2); + }, + SupportsRule0: function SupportsRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + JSToDartImporter: function JSToDartImporter(t0, t1, t2) { + this._sync$_canonicalize = t0; + this._sync$_load = t1; + this._sync$_nonCanonicalSchemes = t2; + }, + JSToDartImporter_canonicalize_closure: function JSToDartImporter_canonicalize_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + JSToDartImporter_load_closure: function JSToDartImporter_load_closure(t0, t1) { + this.$this = t0; + this.url = t1; + }, + Syntax_forPath0(path) { + var t1, + _0_0 = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + $label0$0: { + if (".sass" === _0_0) { + t1 = B.Syntax_Sass_1_sass0; + break $label0$0; + } + if (".css" === _0_0) { + t1 = B.Syntax_CSS_2_css0; + break $label0$0; + } + t1 = B.Syntax_SCSS_0_scss0; + break $label0$0; + } + return t1; + }, + Syntax0: function Syntax0(t0, t1, t2) { + this._syntax0$_name = t0; + this.index = t1; + this._name = t2; + }, + InterpolatedTypeSelector: function InterpolatedTypeSelector(t0) { + this.name = t0; + }, + TypeSelector0: function TypeSelector0(t0, t1) { + this.name = t0; + this.span = t1; + }, + Types: function Types() { + }, + UnaryOperationExpression0: function UnaryOperationExpression0(t0, t1, t2) { + this.operator = t0; + this.operand = t1; + this.span = t2; + }, + UnaryOperator0: function UnaryOperator0(t0, t1, t2, t3) { + var _ = this; + _.name = t0; + _.operator = t1; + _.index = t2; + _._name = t3; + }, + UnitlessSassNumber0: function UnitlessSassNumber0(t0, t1) { + this._number1$_value = t0; + this.hashCache = null; + this.asSlash = t1; + }, + InterpolatedUniversalSelector: function InterpolatedUniversalSelector(t0, t1) { + this.namespace = t0; + this.span = t1; + }, + UniversalSelector0: function UniversalSelector0(t0, t1) { + this.namespace = t0; + this.span = t1; + }, + UnprefixedMapView0: function UnprefixedMapView0(t0, t1, t2) { + this._unprefixed_map_view0$_map = t0; + this._unprefixed_map_view0$_prefix = t1; + this.$ti = t2; + }, + _UnprefixedKeys0: function _UnprefixedKeys0(t0) { + this._unprefixed_map_view0$_view = t0; + }, + _UnprefixedKeys_iterator_closure1: function _UnprefixedKeys_iterator_closure1(t0) { + this.$this = t0; + }, + _UnprefixedKeys_iterator_closure2: function _UnprefixedKeys_iterator_closure2(t0) { + this.$this = t0; + }, + JSUrl0: function JSUrl0() { + }, + UseRule0: function UseRule0(t0, t1, t2, t3) { + var _ = this; + _.url = t0; + _.namespace = t1; + _.configuration = t2; + _.span = t3; + }, + UserDefinedCallable0: function UserDefinedCallable0(t0, t1, t2, t3) { + var _ = this; + _.declaration = t0; + _.environment = t1; + _.inDependency = t2; + _.$ti = t3; + }, + fromImport0() { + var t1 = type$.nullable_CanonicalizeContext_2._as($.Zone__current.$index(0, B.Symbol__canonicalizeContext)); + t1 = t1 == null ? null : t1._canonicalize_context$_fromImport; + return t1 === true; + }, + canonicalizeContext0() { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); + $label0$0: { + if (_0_0 == null) + A.throwExpression(A.StateError$(string$.canoni)); + if (_0_0 instanceof A.CanonicalizeContext0) { + t1 = _0_0; + break $label0$0; + } + t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); + } + return t1; + }, + inImportRule(callback, $T) { + var t1, + _0_0 = $.Zone__current.$index(0, B.Symbol__canonicalizeContext); + $label0$0: { + if (_0_0 == null) { + t1 = type$.nullable_Object; + t1 = A.runZoned(callback, A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, new A.CanonicalizeContext0(true, null)], t1, t1), $T); + break $label0$0; + } + if (_0_0 instanceof A.CanonicalizeContext0) { + t1 = _0_0.withFromImport$2(true, callback); + break $label0$0; + } + t1 = A.throwExpression(A.StateError$(string$.Unexpe + A.S(_0_0) + ".")); + } + return t1; + }, + resolveImportPath0(path) { + var t1, + extension = A.ParsedPath_ParsedPath$parse(path, $.$get$context().style)._splitExtension$1(1)[1]; + if (extension === ".sass" || extension === ".scss" || extension === ".css") { + t1 = A.fromImport0() ? new A.resolveImportPath_closure1(path, extension).call$0() : null; + return t1 == null ? A._exactlyOne0(A._tryPath0(path)) : t1; + } + t1 = A.fromImport0() ? new A.resolveImportPath_closure2(path).call$0() : null; + if (t1 == null) + t1 = A._exactlyOne0(A._tryPathWithExtensions0(path)); + return t1 == null ? A._tryPathAsDirectory0(path) : t1; + }, + _tryPathWithExtensions0(path) { + var result = A._tryPath0(path + ".sass"); + B.JSArray_methods.addAll$1(result, A._tryPath0(path + ".scss")); + return result.length !== 0 ? result : A._tryPath0(path + ".css"); + }, + _tryPath0(path) { + var t1 = $.$get$context(), + partial = A.join(t1.dirname$1(path), "_" + A.ParsedPath_ParsedPath$parse(path, t1.style).get$basename(), null); + t1 = A._setArrayType([], type$.JSArray_String); + if (A.fileExists0(partial)) + t1.push(partial); + if (A.fileExists0(path)) + t1.push(path); + return t1; + }, + _tryPathAsDirectory0(path) { + var t1; + if (!A.dirExists0(path)) + return null; + t1 = A.fromImport0() ? new A._tryPathAsDirectory_closure0(path).call$0() : null; + return t1 == null ? A._exactlyOne0(A._tryPathWithExtensions0(A.join(path, "index", null))) : t1; + }, + _exactlyOne0(paths) { + var _0_1, t1, path; + $label0$0: { + _0_1 = paths.length; + if (_0_1 <= 0) { + t1 = null; + break $label0$0; + } + if (_0_1 === 1) { + path = paths[0]; + t1 = path; + break $label0$0; + } + t1 = A.throwExpression(string$.It_s_n + B.JSArray_methods.map$1$1(paths, new A._exactlyOne_closure0(), type$.String).join$1(0, "\n")); + } + return t1; + }, + resolveImportPath_closure1: function resolveImportPath_closure1(t0, t1) { + this.path = t0; + this.extension = t1; + }, + resolveImportPath_closure2: function resolveImportPath_closure2(t0) { + this.path = t0; + }, + _tryPathAsDirectory_closure0: function _tryPathAsDirectory_closure0(t0) { + this.path = t0; + }, + _exactlyOne_closure0: function _exactlyOne_closure0() { + }, + jsThrow(error) { + return type$.Never._as($.$get$_jsThrow().call$1(error)); + }, + attachJsStack(error, trace) { + var traceString = trace.toString$0(0), + firstRealLine = B.JSString_methods.indexOf$1(traceString, "\n at"); + if (firstRealLine !== -1) + traceString = B.JSString_methods.substring$1(traceString, firstRealLine + 1); + error.stack = "Error: " + A.S(J.get$message$x(error)) + "\n" + traceString; + }, + jsForEach(object, callback) { + var t1, t2; + for (t1 = J.get$iterator$ax(self.Object.keys(object)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + callback.call$2(t2, object[t2]); + } + }, + jsType(value) { + var typeOf = A._asString(new self.Function("value", "return typeof value").call$1(value)); + return typeOf !== "object" ? typeOf : A._asString(new self.Function("value", ' if (value && value.constructor && value.constructor.name) {\n return value.constructor.name;\n }\n return "object";\n ').call$1(value)); + }, + defineGetter(object, $name, get, value) { + self.Object.defineProperty(object, $name, get == null ? {value: value, enumerable: false} : {get: A.allowInteropCaptureThis(get), enumerable: false}); + }, + allowInteropNamed($name, $function) { + $function = A.allowInterop($function); + A.defineGetter($function, "name", null, $name); + A._hideDartProperties($function); + return $function; + }, + allowInteropCaptureThisNamed($name, $function) { + $function = A.allowInteropCaptureThis($function); + A.defineGetter($function, "name", null, $name); + A._hideDartProperties($function); + return $function; + }, + _hideDartProperties(object) { + var t1, t2, t3, t4; + for (t1 = J.cast$1$0$ax(self.Object.getOwnPropertyNames(object), type$.String), t2 = A._instanceType(t1), t1 = new A.ListIterator(t1, t1.get$length(t1), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (B.JSString_methods.startsWith$1(t3, "_")) { + t4 = {value: object[t3], enumerable: false}; + self.Object.defineProperty(object, t3, t4); + } + } + }, + futureToPromise0(future) { + return new self.Promise(A.allowInterop(new A.futureToPromise_closure0(future))); + }, + jsToDartUrl(url) { + return A.Uri_parse(J.toString$0$(url)); + }, + dartToJSUrl(url) { + return new self.URL(url.toString$0(0)); + }, + toJSArray(iterable) { + var t1, t2, + array = new self.Array(); + for (t1 = J.get$iterator$ax(iterable), t2 = J.getInterceptor$x(array); t1.moveNext$0();) + t2.push$1(array, t1.get$current(t1)); + return array; + }, + objectToMap(object) { + var map = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.nullable_Object); + A.jsForEach(object, new A.objectToMap_closure(map)); + return map; + }, + mapToObject(map) { + var t1, t2, + result = new self.Object(); + for (t1 = A.MapExtensions_get_pairs0(map, type$.String, type$.nullable_Object), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + result[t2._0] = t2._1; + } + return result; + }, + jsToDartSeparator(separator) { + var t1; + $label0$0: { + if (" " === separator) { + t1 = B.ListSeparator_SrV0; + break $label0$0; + } + if ("," === separator) { + t1 = B.ListSeparator_z0K0; + break $label0$0; + } + if ("/" === separator) { + t1 = B.ListSeparator_Lul0; + break $label0$0; + } + if (separator == null) { + t1 = B.ListSeparator_undecided_null_3_undecided0; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('Unknown separator "' + separator + '".')); + } + return t1; + }, + parseSyntax(syntax) { + var t1; + $label0$0: { + if (syntax == null || "scss" === syntax) { + t1 = B.Syntax_SCSS_0_scss0; + break $label0$0; + } + if ("indented" === syntax) { + t1 = B.Syntax_Sass_1_sass0; + break $label0$0; + } + if ("css" === syntax) { + t1 = B.Syntax_CSS_2_css0; + break $label0$0; + } + t1 = A.jsThrow(new self.Error('Unknown syntax "' + syntax + '".')); + } + return t1; + }, + entrypointFilename() { + var _1_0, _1_5_isSet, _1_5, t2, path, + t1 = self.require.main, + _0_0 = t1 == null ? null : J.get$filename$x(t1); + if (_0_0 != null) + return _0_0; + else { + _1_0 = J.get$argv$x(self.process); + t1 = J.getInterceptor$asx(_1_0); + _1_5_isSet = t1.get$length(_1_0) >= 2; + if (_1_5_isSet) { + _1_5 = t1.$index(_1_0, 1); + t2 = typeof _1_5 == "string"; + } else { + _1_5 = null; + t2 = false; + } + if (t2) { + path = A._asString(_1_5_isSet ? _1_5 : t1.$index(_1_0, 1)); + return J.resolve$1$x(J.createRequire$1$x(self.nodeModule, path), path); + } else + return null; + } + }, + _PropertyDescriptor0: function _PropertyDescriptor0() { + }, + futureToPromise_closure0: function futureToPromise_closure0(t0) { + this.future = t0; + }, + futureToPromise__closure0: function futureToPromise__closure0(t0) { + this.resolve = t0; + }, + futureToPromise__closure1: function futureToPromise__closure1(t0) { + this.reject = t0; + }, + objectToMap_closure: function objectToMap_closure(t0) { + this.map = t0; + }, + _RequireMain0: function _RequireMain0() { + }, + toSentence0(iter, conjunction) { + if (iter.get$length(iter) === 1) + return J.toString$0$(iter.get$first(iter)); + return A.IterableExtension_get_exceptLast0(iter).join$1(0, ", ") + (" " + conjunction + " " + A.S(iter.get$last(iter))); + }, + indent0(string, indentation) { + return new A.MappedListIterable(A._setArrayType(string.split("\n"), type$.JSArray_String), new A.indent_closure0(indentation), type$.MappedListIterable_String_String).join$1(0, "\n"); + }, + pluralize0($name, number, plural) { + if (number === 1) + return $name; + if (plural != null) + return plural; + return $name + "s"; + }, + trimAscii0(string, excludeEscape) { + var t1, + start = A._firstNonWhitespace0(string); + if (start == null) + t1 = ""; + else { + t1 = A._lastNonWhitespace0(string, true); + t1.toString; + t1 = B.JSString_methods.substring$2(string, start, t1 + 1); + } + return t1; + }, + trimAsciiRight0(string, excludeEscape) { + var end = A._lastNonWhitespace0(string, excludeEscape); + return end == null ? "" : B.JSString_methods.substring$2(string, 0, end + 1); + }, + _firstNonWhitespace0(string) { + var t1, i, t2; + for (t1 = string.length, i = 0; i < t1; ++i) { + t2 = string.charCodeAt(i); + if (!(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12)) + return i; + } + return null; + }, + _lastNonWhitespace0(string, excludeEscape) { + var i, i0, codeUnit; + for (i = string.length - 1, i0 = i; i0 >= 0; --i0) { + codeUnit = string.charCodeAt(i0); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) + if (excludeEscape && i0 !== 0 && i0 !== i && codeUnit === 92) + return i0 + 1; + else + return i0; + } + return null; + }, + isPublic0(member) { + var start = member.charCodeAt(0); + return start !== 45 && start !== 95; + }, + flattenVertically0(iterable, $T) { + var result, + t1 = iterable.$ti._eval$1("@")._bind$1($T._eval$1("QueueList<0>"))._eval$1("MappedListIterable<1,2>"), + queues = A.List_List$_of(new A.MappedListIterable(iterable, new A.flattenVertically_closure1($T), t1), t1._eval$1("ListIterable.E")); + if (queues.length === 1) + return B.JSArray_methods.get$first(queues); + result = A._setArrayType([], $T._eval$1("JSArray<0>")); + while (queues.length !== 0) { + queues.$flags & 1 && A.throwUnsupportedOperation(queues, 16); + B.JSArray_methods._removeWhere$2(queues, new A.flattenVertically_closure2(result, $T), true); + } + return result; + }, + codepointIndexToCodeUnitIndex0(string, codepointIndex) { + var codeUnitIndex, i, codeUnitIndex0; + for (codeUnitIndex = 0, i = 0; i < codepointIndex; ++i) { + codeUnitIndex0 = codeUnitIndex + 1; + codeUnitIndex = string.charCodeAt(codeUnitIndex) >>> 10 === 54 ? codeUnitIndex0 + 1 : codeUnitIndex0; + } + return codeUnitIndex; + }, + codeUnitIndexToCodepointIndex0(string, codeUnitIndex) { + var codepointIndex, i; + for (codepointIndex = 0, i = 0; i < codeUnitIndex; i = (string.charCodeAt(i) >>> 10 === 54 ? i + 1 : i) + 1) + ++codepointIndex; + return codepointIndex; + }, + frameForSpan0(span, member, url) { + var t2, t3, + t1 = url == null ? span.get$sourceUrl(span) : url; + if (t1 == null) + t1 = $.$get$_noSourceUrl0(); + t2 = span.get$start(span); + t2 = t2.file.getLine$1(t2.offset); + t3 = span.get$start(span); + return new A.Frame(t1, t2 + 1, t3.file.getColumn$1(t3.offset) + 1, member); + }, + declarationName0(span) { + var text = span.get$text(); + return A.trimAsciiRight0(B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")), false); + }, + unvendor0($name) { + var i, + t1 = $name.length; + if (t1 < 2) + return $name; + if ($name.charCodeAt(0) !== 45) + return $name; + if ($name.charCodeAt(1) === 45) + return $name; + for (i = 2; i < t1; ++i) + if ($name.charCodeAt(i) === 45) + return B.JSString_methods.substring$1($name, i + 1); + return $name; + }, + equalsIgnoreCase0(string1, string2) { + var t1, i; + if (string1 === string2) + return true; + if (string1 == null) + return false; + t1 = string1.length; + if (t1 !== string2.length) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase0(string1.charCodeAt(i), string2.charCodeAt(i))) + return false; + return true; + }, + startsWithIgnoreCase0(string, prefix) { + var i, + t1 = prefix.length; + if (string.length < t1) + return false; + for (i = 0; i < t1; ++i) + if (!A.characterEqualsIgnoreCase0(string.charCodeAt(i), prefix.charCodeAt(i))) + return false; + return true; + }, + mapInPlace0(list, $function) { + var i; + for (i = 0; i < list.length; ++i) + list[i] = $function.call$1(list[i]); + }, + longestCommonSubsequence0(list1, list2, select, $T) { + var t1, _i, selections, i, i0, j, selection, j0, + _length = list1.get$length(0) + 1, + lengths = J.JSArray_JSArray$allocateFixed(_length, type$.List_int); + for (t1 = type$.int, _i = 0; _i < _length; ++_i) + lengths[_i] = A.List_List$filled(((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0) + 1, 0, false, t1); + _length = list1.get$length(0); + selections = J.JSArray_JSArray$allocateFixed(_length, $T._eval$1("List<0?>")); + for (t1 = $T._eval$1("0?"), _i = 0; _i < _length; ++_i) + selections[_i] = A.List_List$filled((list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0, null, false, t1); + for (i = 0; i < (list1._queue_list$_tail - list1._queue_list$_head & J.get$length$asx(list1._queue_list$_table) - 1) >>> 0; i = i0) + for (i0 = i + 1, j = 0; j < (list2._queue_list$_tail - list2._queue_list$_head & J.get$length$asx(list2._queue_list$_table) - 1) >>> 0; j = j0) { + selection = select.call$2(list1.$index(0, i), list2.$index(0, j)); + selections[i][j] = selection; + t1 = lengths[i0]; + j0 = j + 1; + t1[j0] = selection == null ? Math.max(t1[j], lengths[i][j0]) : lengths[i][j] + 1; + } + return new A.longestCommonSubsequence_backtrack0(selections, lengths, $T).call$2(list1.get$length(0) - 1, list2.get$length(0) - 1); + }, + removeFirstWhere0(list, test, orElse) { + var i; + for (i = 0; i < list.length; ++i) { + if (!test.call$1(list[i])) + continue; + B.JSArray_methods.removeAt$1(list, i); + return; + } + orElse.call$0(); + }, + mapAddAll20(destination, source, $K1, $K2, $V) { + source.forEach$1(0, new A.mapAddAll2_closure0(destination, $K1, $K2, $V)); + }, + setAll0(map, keys, value) { + var t1; + for (t1 = keys.get$iterator(keys); t1.moveNext$0();) + map.$indexSet(0, t1.get$current(t1), value); + }, + rotateSlice0(list, start, end) { + var i, next, + element = list.$index(0, end - 1); + for (i = start; i < end; ++i, element = next) { + next = list.$index(0, i); + list.$indexSet(0, i, element); + } + }, + mapAsync0(iterable, callback, $E, $F) { + return A.mapAsync$body0(iterable, callback, $E, $F, $F._eval$1("Iterable<0>")); + }, + mapAsync$body0(iterable, callback, $E, $F, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t2, _i, t1, $async$temp1; + var $async$mapAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = A._setArrayType([], $F._eval$1("JSArray<0>")); + t2 = iterable.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(callback.call$1(iterable[_i]), $async$mapAsync0); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$mapAsync0, $async$completer); + }, + putIfAbsentAsync0(map, key, ifAbsent, $K, $V) { + return A.putIfAbsentAsync$body0(map, key, ifAbsent, $K, $V, $V); + }, + putIfAbsentAsync$body0(map, key, ifAbsent, $K, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, t1, value; + var $async$putIfAbsentAsync0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (map.containsKey$1(key)) { + t1 = map.$index(0, key); + $async$returnValue = t1 == null ? $V._as(t1) : t1; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait(ifAbsent.call$0(), $async$putIfAbsentAsync0); + case 3: + // returning from await. + value = $async$result; + map.$indexSet(0, key, value); + $async$returnValue = value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$putIfAbsentAsync0, $async$completer); + }, + copyMapOfMap0(map, $K1, $K2, $V) { + var t3, key, child, + t1 = $K2._eval$1("@<0>")._bind$1($V)._eval$1("Map<1,2>"), + t2 = A.LinkedHashMap_LinkedHashMap$_empty($K1, t1); + for (t1 = A.MapExtensions_get_pairs0(map, $K1, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + key = t3._0; + child = t3._1; + t3 = A.LinkedHashMap_LinkedHashMap(null, null, null, $K2, $V); + t3.addAll$1(0, child); + t2.$indexSet(0, key, t3); + } + return t2; + }, + copyMapOfList0(map, $K, $E) { + var t3, + t1 = $E._eval$1("List<0>"), + t2 = A.LinkedHashMap_LinkedHashMap$_empty($K, t1); + for (t1 = A.MapExtensions_get_pairs0(map, $K, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + t2.$indexSet(0, t3._0, J.toList$0$ax(t3._1)); + } + return t2; + }, + consumeEscapedCharacter0(scanner) { + var _1_0, value, i, next, t1; + scanner.expectChar$1(92); + _1_0 = scanner.peekChar$0(); + if (_1_0 == null) + return 65533; + if (_1_0 === 10 || _1_0 === 13 || _1_0 === 12) + scanner.error$1(0, "Expected escape sequence."); + if (A.CharacterExtension_get_isHex0(_1_0)) { + for (value = 0, i = 0; i < 6; ++i) { + next = scanner.peekChar$0(); + if (next != null) { + t1 = true; + if (!(next >= 48 && next <= 57)) + if (!(next >= 97 && next <= 102)) + t1 = next >= 65 && next <= 70; + t1 = !t1; + } else + t1 = true; + if (t1) + break; + value = (value << 4 >>> 0) + A.asHex0(scanner.readChar$0()); + } + t1 = scanner.peekChar$0(); + if (t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12) + scanner.readChar$0(); + $label0$1: { + if (0 !== value) + t1 = value >= 55296 && value <= 57343 || value >= 1114111; + else + t1 = true; + if (t1) { + t1 = 65533; + break $label0$1; + } + t1 = value; + break $label0$1; + } + return t1; + } + return scanner.readChar$0(); + }, + throwWithTrace0(error, originalError, trace) { + var t1 = A.getTrace0(originalError); + A.attachTrace0(error, t1 == null ? trace : t1); + throw A.wrapException(error); + }, + attachTrace0(error, trace) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + return; + if (trace.toString$0(0).length === 0) + return; + t1 = $.$get$_traces0(); + A.Expando__checkType(error); + if (t1._jsWeakMap.get(error) == null) + t1.$indexSet(0, error, trace); + }, + getTrace0(error) { + var t1; + if (typeof error == "string" || typeof error == "number" || A._isBool(error)) + t1 = null; + else { + t1 = $.$get$_traces0(); + A.Expando__checkType(error); + t1 = t1._jsWeakMap.get(error); + } + return t1; + }, + parseSignature(signature, requireParens) { + var error, stackTrace, t1, exception, t2; + try { + t1 = A.ScssParser$0(signature, false, null).parseSignature$1$requireParens(requireParens); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error._span_exception$_message; + t2 = J.get$span$x(error); + A.throwWithTrace0(new A.SassFormatException0(B.Set_empty, 'Invalid signature "' + signature + '": ' + t1, t2), error, stackTrace); + } else + throw exception; + } + }, + indent_closure0: function indent_closure0(t0) { + this.indentation = t0; + }, + flattenVertically_closure1: function flattenVertically_closure1(t0) { + this.T = t0; + }, + flattenVertically_closure2: function flattenVertically_closure2(t0, t1) { + this.result = t0; + this.T = t1; + }, + longestCommonSubsequence_backtrack0: function longestCommonSubsequence_backtrack0(t0, t1, t2) { + this.selections = t0; + this.lengths = t1; + this.T = t2; + }, + mapAddAll2_closure0: function mapAddAll2_closure0(t0, t1, t2, t3) { + var _ = this; + _.destination = t0; + _.K1 = t1; + _.K2 = t2; + _.V = t3; + }, + CssValue0: function CssValue0(t0, t1, t2) { + this.value = t0; + this.span = t1; + this.$ti = t2; + }, + ValueExpression0: function ValueExpression0(t0, t1) { + this.value = t0; + this.span = t1; + }, + valueClass_closure: function valueClass_closure() { + }, + valueClass__closure: function valueClass__closure() { + }, + valueClass__closure0: function valueClass__closure0() { + }, + valueClass__closure1: function valueClass__closure1() { + }, + valueClass__closure2: function valueClass__closure2() { + }, + valueClass__closure3: function valueClass__closure3() { + }, + valueClass__closure4: function valueClass__closure4() { + }, + valueClass__closure5: function valueClass__closure5() { + }, + valueClass__closure6: function valueClass__closure6() { + }, + valueClass__closure7: function valueClass__closure7() { + }, + valueClass__closure8: function valueClass__closure8() { + }, + valueClass__closure9: function valueClass__closure9() { + }, + valueClass__closure10: function valueClass__closure10() { + }, + valueClass__closure11: function valueClass__closure11() { + }, + valueClass__closure12: function valueClass__closure12() { + }, + valueClass__closure13: function valueClass__closure13() { + }, + valueClass__closure14: function valueClass__closure14() { + }, + valueClass__closure15: function valueClass__closure15() { + }, + valueClass__closure16: function valueClass__closure16() { + }, + valueClass__closure17: function valueClass__closure17() { + }, + valueClass__closure18: function valueClass__closure18() { + }, + SassApiValue_assertSelector0(_this, allowParent, $name) { + var error, stackTrace, t1, exception, + string = _this._value$_selectorString$1($name); + try { + t1 = A.EvaluationContext_currentOrNull0(); + if (t1 == null) + t1 = A.throwExpression(A.StateError$(string$.No_Sass)); + t1 = A.SelectorList_SelectorList$parse0(string, allowParent, null, new A._EvaluationContextLogger0(t1), false); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace0(new A.SassScriptException0($name == null ? t1 : "$" + $name + ": " + t1), error, stackTrace); + } else + throw exception; + } + }, + SassApiValue_assertCompoundSelector0(_this, $name) { + var error, stackTrace, t1, exception, + allowParent = false, + string = _this._value$_selectorString$1($name); + try { + t1 = A.EvaluationContext_currentOrNull0(); + if (t1 == null) + t1 = A.throwExpression(A.StateError$(string$.No_Sass)); + t1 = A.SelectorParser$0(string, allowParent, null, new A._EvaluationContextLogger0(t1), false, null).parseCompoundSelector$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassFormatException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = B.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""); + A.throwWithTrace0(new A.SassScriptException0("$" + $name + ": " + t1), error, stackTrace); + } else + throw exception; + } + }, + Value0: function Value0() { + }, + VariableExpression0: function VariableExpression0(t0, t1, t2) { + this.namespace = t0; + this.name = t1; + this.span = t2; + }, + VariableDeclaration$0($name, expression, span, comment, global, guarded, namespace) { + if (namespace != null && global) + A.throwExpression(A.ArgumentError$(string$.Other_, null)); + return new A.VariableDeclaration0(namespace, $name, expression, guarded, global, span); + }, + VariableDeclaration0: function VariableDeclaration0(t0, t1, t2, t3, t4, t5) { + var _ = this; + _.namespace = t0; + _.name = t1; + _.expression = t2; + _.isGuarded = t3; + _.isGlobal = t4; + _.span = t5; + }, + WarnRule0: function WarnRule0(t0, t1) { + this.expression = t0; + this.span = t1; + }, + WhileRule$0(condition, children, span) { + var t1 = A.List_List$unmodifiable(children, type$.Statement_2), + t2 = B.JSArray_methods.any$1(t1, new A.ParentStatement_closure0()); + return new A.WhileRule0(condition, span, t1, t2); + }, + WhileRule0: function WhileRule0(t0, t1, t2, t3) { + var _ = this; + _.condition = t0; + _.span = t1; + _.children = t2; + _.hasDeclarations = t3; + }, + XyzD50ColorSpace0: function XyzD50ColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + XyzD65ColorSpace0: function XyzD65ColorSpace0(t0, t1) { + this.name = t0; + this._space$_channels = t1; + }, + AsyncCallable_AsyncCallable$fromSignature(signature, callback, requireParens) { + var _0_0 = A.parseSignature(signature, requireParens); + return new A.AsyncBuiltInCallable0(_0_0._0, _0_0._1, callback, false); + }, + Callable_Callable$fromSignature(signature, callback, requireParens) { + var _0_0 = A.parseSignature(signature, requireParens); + return new A.BuiltInCallable0(_0_0._0, A._setArrayType([new A._Record_2(_0_0._1, callback)], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value_2), false); + }, + printString(string) { + if (typeof dartPrint == "function") { + dartPrint(string); + return; + } + if (typeof console == "object" && typeof console.log != "undefined") { + console.log(string); + return; + } + if (typeof print == "function") { + print(string); + return; + } + throw "Unable to print message: " + String(string); + }, + mergeMaps(map1, map2, $K, $V) { + var result = A.LinkedHashMap_LinkedHashMap$of(map1, $K, $V); + result.addAll$1(0, map2); + return result; + }, + groupBy(values, key, $S, $T) { + var t1, t2, _i, element, t3, t4, + map = A.LinkedHashMap_LinkedHashMap$_empty($T, $S._eval$1("List<0>")); + for (t1 = values.length, t2 = $S._eval$1("JSArray<0>"), _i = 0; _i < values.length; values.length === t1 || (0, A.throwConcurrentModificationError)(values), ++_i) { + element = values[_i]; + t3 = key.call$1(element); + t4 = map.$index(0, t3); + if (t4 == null) { + t4 = A._setArrayType([], t2); + map.$indexSet(0, t3, t4); + t3 = t4; + } else + t3 = t4; + J.add$1$ax(t3, element); + } + return map; + }, + minBy(values, orderBy) { + var t1, t2, minValue, minOrderBy, element, elementOrderBy; + for (t1 = values.$ti, t2 = new A.MappedIterator(J.get$iterator$ax(values.__internal$_iterable), values._f, t1._eval$1("MappedIterator<1,2>")), t1 = t1._rest[1], minValue = null, minOrderBy = null; t2.moveNext$0();) { + element = t2.__internal$_current; + if (element == null) + element = t1._as(element); + elementOrderBy = orderBy.call$1(element); + if (minOrderBy == null || A.defaultCompare(elementOrderBy, minOrderBy) < 0) { + minOrderBy = elementOrderBy; + minValue = element; + } + } + return minValue; + }, + IterableExtension_firstWhereOrNull(_this, test) { + var t1, element; + for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { + element = t1.get$current(t1); + if (test.call$1(element)) + return element; + } + return null; + }, + IterableExtension_get_firstOrNull(_this) { + var iterator = J.get$iterator$ax(_this); + if (iterator.moveNext$0()) + return iterator.get$current(iterator); + return null; + }, + IterableExtension_get_lastOrNull(_this) { + if (_this.get$length(0) === 0) + return null; + return _this.get$last(_this); + }, + IterableExtension_get_singleOrNull(_this) { + var result, + iterator = J.get$iterator$ax(_this); + if (iterator.moveNext$0()) { + result = iterator.get$current(iterator); + if (!iterator.moveNext$0()) + return result; + } + return null; + }, + IterableIntegerExtension_get_maxOrNull(_this) { + var value, newValue, + t1 = _this.$ti, + iterator = new A.ListIterator(_this, _this.get$length(0), t1._eval$1("ListIterator")); + if (iterator.moveNext$0()) { + value = iterator.__internal$_current; + if (value == null) + value = t1._eval$1("ListIterable.E")._as(value); + for (t1 = t1._eval$1("ListIterable.E"); iterator.moveNext$0();) { + newValue = iterator.__internal$_current; + if (newValue == null) + newValue = t1._as(newValue); + if (newValue > value) + value = newValue; + } + return value; + } + return null; + }, + IterableIntegerExtension_get_max(_this) { + var t1 = A.IterableIntegerExtension_get_maxOrNull(_this); + return t1 == null ? A.throwExpression(A.StateError$("No element")) : t1; + }, + IterableIntegerExtension_get_sum(_this) { + var t1, t2, result, t3; + for (t1 = _this.$ti, t2 = new A.MappedIterator(J.get$iterator$ax(_this.__internal$_iterable), _this._f, t1._eval$1("MappedIterator<1,2>")), t1 = t1._rest[1], result = 0; t2.moveNext$0();) { + t3 = t2.__internal$_current; + result += t3 == null ? t1._as(t3) : t3; + } + return result; + }, + ListExtensions_mapIndexed(_this, convert, $E, $R) { + return new A._SyncStarIterable(A.ListExtensions_mapIndexed$body(_this, convert, $E, $R), $R._eval$1("_SyncStarIterable<0>")); + }, + ListExtensions_mapIndexed$body($async$_this, $async$convert, $async$$E, $async$$R) { + return function() { + var _this = $async$_this, + convert = $async$convert, + $E = $async$$E, + $R = $async$$R; + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], t1, index; + return function $async$ListExtensions_mapIndexed($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = _this.length, index = 0; + case 2: + // for condition + if (!(index < t1)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return $async$iterator._async$_current = convert.call$2(index, _this[index]), 1; + case 5: + // after yield + case 3: + // for update + ++index; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + }, + ListExtensions_elementAtOrNull(_this, index) { + var t1 = J.getInterceptor$asx(_this); + return index < t1.get$length(_this) ? t1.$index(_this, index) : null; + }, + defaultCompare(value1, value2) { + return J.compareTo$1$ns(type$.Comparable_nullable_Object._as(value1), value2); + }, + current() { + var exception, t1, path, lastIndex, uri = null; + try { + uri = A.Uri_base(); + } catch (exception) { + if (type$.Exception._is(A.unwrapException(exception))) { + t1 = $._current; + if (t1 != null) + return t1; + throw exception; + } else + throw exception; + } + if (J.$eq$(uri, $._currentUriBase)) { + t1 = $._current; + t1.toString; + return t1; + } + $._currentUriBase = uri; + if ($.$get$Style_platform() === $.$get$Style_url()) + t1 = $._current = J.resolve$1$x(uri, ".").toString$0(0); + else { + path = uri.toFilePath$0(); + lastIndex = path.length - 1; + t1 = $._current = lastIndex === 0 ? path : B.JSString_methods.substring$2(path, 0, lastIndex); + } + return t1; + }, + absolute(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) { + return $.$get$context().absolute$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15); + }, + join(part1, part2, part3) { + var _null = null; + return $.$get$context().join$16(0, part1, part2, part3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, + toUri(path) { + return $.$get$context().toUri$1(path); + }, + prettyUri(uri) { + var t1 = $.$get$context(); + uri.toString; + return t1.prettyUri$1(uri); + }, + isAlphabetic(char) { + var t1; + if (!(char >= 65 && char <= 90)) + t1 = char >= 97 && char <= 122; + else + t1 = true; + return t1; + }, + driveLetterEnd(path, index) { + var t2, t3, _null = null, + t1 = path.length, + index0 = index + 2; + if (t1 < index0) + return _null; + if (!A.isAlphabetic(path.charCodeAt(index))) + return _null; + t2 = index + 1; + if (path.charCodeAt(t2) !== 58) { + t3 = index + 4; + if (t1 < t3) + return _null; + if (B.JSString_methods.substring$2(path, t2, t3).toLowerCase() !== "%3a") + return _null; + index = index0; + } + t2 = index + 2; + if (t1 === t2) + return t2; + if (path.charCodeAt(t2) !== 47) + return _null; + return index + 3; + }, + main0(args) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + t1; + var $async$main0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + A.printError("sass --embedded is unavailable in pure JS mode."); + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) + J.set$exitCode$x(t1, 1); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$main0, $async$completer); + }, + compileStylesheets(options, graph, sourcesToDestinations, ifModified) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.bool), + $async$returnValue, _1_4, t2, t3, _i, t4, printedError, errorWithStackTrace, code, error, stackTrace, buffer, t1, $async$temp1; + var $async$compileStylesheets = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.nullable_String; + t1 = A.List_List$_of(A.MapExtensions_get_pairs(sourcesToDestinations, t1, t1), type$.Record_2_nullable_String_and_nullable_String); + $async$goto = t1.length === 1 ? 4 : 5; + break; + case 4: + // then + _1_4 = t1[0]; + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait(A.compileStylesheet(options, graph, _1_4._0, _1_4._1, ifModified), $async$compileStylesheets); + case 6: + // returning from await. + t1 = $async$temp1._setArrayType([$async$result], type$.JSArray_nullable_Record_3_int_and_String_and_nullable_String); + // goto break $label0$0 + $async$goto = 3; + break; + case 5: + // join + t2 = A._setArrayType([], type$.JSArray_Future_nullable_Record_3_int_and_String_and_nullable_String); + for (t3 = t1.length, _i = 0; _i < t1.length; t1.length === t3 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + t4 = t1[_i]; + t2.push(A.compileStylesheet(options, graph, t4._0, t4._1, ifModified)); + } + $async$goto = 7; + return A._asyncAwait(A.Future_wait(t2, A._asBool(options._options.$index(0, "stop-on-error")), type$.nullable_Record_3_int_and_String_and_nullable_String), $async$compileStylesheets); + case 7: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 3: + // break $label0$0 + for (t1 = J.get$iterator$ax(t1), printedError = false; t1.moveNext$0();) { + errorWithStackTrace = t1.get$current(t1); + if (errorWithStackTrace == null) + continue; + code = errorWithStackTrace._0; + error = errorWithStackTrace._1; + stackTrace = errorWithStackTrace._2; + t2 = self.process; + if (t2 == null) + t2 = null; + else { + t2 = J.get$release$x(t2); + t2 = t2 == null ? null : J.get$name$x(t2); + } + t2 = J.$eq$(t2, "node") ? self.process : null; + t2 = t2 == null ? null : J.get$exitCode$x(t2); + if (t2 == null) + t2 = 0; + t2 = Math.max(t2, code); + t3 = self.process; + if (t3 == null) + t3 = null; + else { + t3 = J.get$release$x(t3); + t3 = t3 == null ? null : J.get$name$x(t3); + } + t3 = J.$eq$(t3, "node") ? self.process : null; + if (t3 != null) + J.set$exitCode$x(t3, t2); + buffer = new A.StringBuffer(""); + t2 = (printedError ? buffer._contents = "\n" : "") + error; + buffer._contents = t2; + if (stackTrace != null) { + t2 += "\n"; + buffer._contents = t2; + t2 += "\n"; + buffer._contents = t2; + buffer._contents = t2 + stackTrace; + } + A.printError(buffer); + printedError = true; + } + $async$returnValue = !printedError; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$compileStylesheets, $async$completer); + }, + CharacterExtension_get_isAlphabetic(_this) { + var t1; + if (!(_this >= 97 && _this <= 122)) + t1 = _this >= 65 && _this <= 90; + else + t1 = true; + return t1; + }, + CharacterExtension_get_isHex(_this) { + var t1 = true; + if (!(_this >= 48 && _this <= 57)) + if (!(_this >= 97 && _this <= 102)) + t1 = _this >= 65 && _this <= 70; + return t1; + }, + asHex(character) { + var t1; + $label0$0: { + if (character <= 57) { + t1 = character - 48; + break $label0$0; + } + if (character <= 70) { + t1 = 10 + character - 65; + break $label0$0; + } + t1 = 10 + character - 97; + break $label0$0; + } + return t1; + }, + hexCharFor(number) { + return number < 10 ? 48 + number : 87 + number; + }, + opposite(character) { + var t1; + $label0$0: { + if (40 === character) { + t1 = 41; + break $label0$0; + } + if (123 === character) { + t1 = 125; + break $label0$0; + } + if (91 === character) { + t1 = 93; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$('"' + A.String_String$fromCharCode(character) + "\" isn't a brace-like character.", null)); + } + return t1; + }, + characterEqualsIgnoreCase(character1, character2) { + var upperCase1; + if (character1 === character2) + return true; + if ((character1 ^ character2) >>> 0 !== 32) + return false; + upperCase1 = (character1 & 4294967263) >>> 0; + return upperCase1 >= 65 && upperCase1 <= 90; + }, + IterableExtension_search(_this, callback) { + var t1, _0_0; + for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { + _0_0 = callback.call$1(t1.get$current(t1)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + IterableExtension_get_exceptLast(_this) { + var t1 = J.getInterceptor$asx(_this), + size = t1.get$length(_this) - 1; + if (size < 0) + throw A.wrapException(A.StateError$("Iterable may not be empty")); + return t1.take$1(_this, size); + }, + NullableExtension_andThen(_this, fn) { + return _this == null ? null : fn.call$1(_this); + }, + SetExtension_removeNull(_this, $T) { + _this.remove$1(0, null); + return A.Set_castFrom(_this, _this.get$_newSimilarSet(), A._instanceType(_this)._precomputed1, $T); + }, + fuzzyEquals(number1, number2) { + var t1; + if (number1 === number2) + return true; + if (Math.abs(number1 - number2) <= $.$get$_epsilon()) { + t1 = $.$get$_inverseEpsilon(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyEqualsNullable(number1, number2) { + var t1; + if (number1 == number2) + return true; + if (number1 == null || number2 == null) + return false; + if (Math.abs(number1 - number2) <= $.$get$_epsilon()) { + t1 = $.$get$_inverseEpsilon(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyHashCode(number) { + if (!isFinite(number)) + return B.JSNumber_methods.get$hashCode(number); + return B.JSInt_methods.get$hashCode(B.JSNumber_methods.round$0(number * $.$get$_inverseEpsilon())); + }, + fuzzyLessThan(number1, number2) { + return number1 < number2 && !A.fuzzyEquals(number1, number2); + }, + fuzzyLessThanOrEquals(number1, number2) { + return number1 < number2 || A.fuzzyEquals(number1, number2); + }, + fuzzyGreaterThan(number1, number2) { + return number1 > number2 && !A.fuzzyEquals(number1, number2); + }, + fuzzyGreaterThanOrEquals(number1, number2) { + return number1 > number2 || A.fuzzyEquals(number1, number2); + }, + fuzzyIsInt(number) { + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return false; + return A.fuzzyEquals(number, B.JSNumber_methods.round$0(number)); + }, + fuzzyAsInt(number) { + var rounded; + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return null; + rounded = B.JSNumber_methods.round$0(number); + return A.fuzzyEquals(number, rounded) ? rounded : null; + }, + fuzzyRound(number) { + var t1; + if (number > 0) { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 && !A.fuzzyEquals(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } else { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 || A.fuzzyEquals(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } + }, + fuzzyCheckRange(number, min, max) { + if (A.fuzzyEquals(number, min)) + return min; + if (A.fuzzyEquals(number, max)) + return max; + if (number > min && number < max) + return number; + return null; + }, + fuzzyAssertRange(number, min, max, $name) { + var result = A.fuzzyCheckRange(number, min, max); + if (result != null) + return result; + throw A.wrapException(A.RangeError$range(number, min, max, $name, "must be between " + min + " and " + max)); + }, + moduloLikeSass(num1, num2) { + var result; + if (num1 == 1 / 0 || num1 == -1 / 0) + return 0 / 0; + if (num2 == 1 / 0 || num2 == -1 / 0) + return A.DoubleWithSignedZero_get_signIncludingZero(num1) === J.get$sign$in(num2) ? num1 : 0 / 0; + if (num2 > 0) + return B.JSNumber_methods.$mod(num1, num2); + if (num2 === 0) + return 0 / 0; + result = B.JSNumber_methods.$mod(num1, num2); + return result === 0 ? 0 : result + num2; + }, + sqrt(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber(Math.sqrt(number._number$_value), null); + }, + sin(number) { + return A.SassNumber_SassNumber(Math.sin(number.coerceValueToUnit$2("rad", "number")), null); + }, + cos(number) { + return A.SassNumber_SassNumber(Math.cos(number.coerceValueToUnit$2("rad", "number")), null); + }, + tan(number) { + return A.SassNumber_SassNumber(Math.tan(number.coerceValueToUnit$2("rad", "number")), null); + }, + atan(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits(Math.atan(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + asin(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits(Math.asin(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + acos(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits(Math.acos(number._number$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + log(number, base) { + if (base != null) + return A.SassNumber_SassNumber(Math.log(number._number$_value) / Math.log(base._number$_value), null); + return A.SassNumber_SassNumber(Math.log(number._number$_value), null); + }, + pow0(base, exponent) { + base.assertNoUnits$1("base"); + exponent.assertNoUnits$1("exponent"); + return A.SassNumber_SassNumber(Math.pow(base._number$_value, exponent._number$_value), null); + }, + DoubleWithSignedZero_get_signIncludingZero(_this) { + if (_this === -0.0) + return -1; + if (_this === 0) + return 1; + return J.get$sign$in(_this); + }, + SpanExtensions_trimLeft(_this) { + var t1, start = 0; + for (;;) { + t1 = _this.get$text().charCodeAt(start); + if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) + break; + ++start; + } + return A.FileSpanExtension_subspan(_this, start, null); + }, + SpanExtensions_trimRight(_this) { + var t1, + end = _this.get$text().length - 1; + for (;;) { + t1 = _this.get$text().charCodeAt(end); + if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) + break; + --end; + } + return A.FileSpanExtension_subspan(_this, 0, end + 1); + }, + SpanExtensions_initialIdentifier(_this) { + var i, + scanner = A.StringScanner$(_this.get$text(), null, null); + for (i = 0; false; ++i) + scanner.readChar$0(); + A._scanIdentifier(scanner); + return A.FileSpanExtension_subspan(_this, 0, scanner._string_scanner$_position); + }, + _scanIdentifier(scanner) { + var t1, _0_0, t2; + for (t1 = scanner.string.length; scanner._string_scanner$_position !== t1;) { + _0_0 = scanner.peekChar$0(); + if (92 === _0_0) { + A.consumeEscapedCharacter(scanner); + continue; + } + if (A._isInt(_0_0)) { + if (_0_0 !== 95) { + if (!(_0_0 >= 97 && _0_0 <= 122)) + t2 = _0_0 >= 65 && _0_0 <= 90; + else + t2 = true; + t2 = t2 || _0_0 >= 128; + } else + t2 = true; + if (!t2) + t2 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; + else + t2 = true; + } else + t2 = false; + if (t2) { + scanner.readChar$0(); + continue; + } + break; + } + }, + hueToRgb(m1, m2, hue) { + var t1; + if (hue < 0) + ++hue; + if (hue > 1) + --hue; + $label0$0: { + if (hue < 0.16666666666666666) { + t1 = m1 + (m2 - m1) * hue * 6; + break $label0$0; + } + if (hue < 0.5) { + t1 = m2; + break $label0$0; + } + if (hue < 0.6666666666666666) { + t1 = m1 + (m2 - m1) * (0.6666666666666666 - hue) * 6; + break $label0$0; + } + t1 = m1; + break $label0$0; + } + return t1; + }, + srgbAndDisplayP3ToLinear(channel) { + var abs = Math.abs(channel); + return abs <= 0.04045 ? channel / 12.92 : J.get$sign$in(channel) * Math.pow((abs + 0.055) / 1.055, 2.4); + }, + srgbAndDisplayP3FromLinear(channel) { + var abs = Math.abs(channel); + return abs <= 0.0031308 ? channel * 12.92 : J.get$sign$in(channel) * (1.055 * Math.pow(abs, 0.4166666666666667) - 0.055); + }, + labToLch(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var t3, t4, chroma, hue, + t1 = a == null, + t2 = t1 ? 0 : a; + t2 = Math.pow(t2, 2); + t3 = b == null; + t4 = t3 ? 0 : b; + chroma = Math.sqrt(t2 + Math.pow(t4, 2)); + if (missingHue || A.fuzzyEquals(chroma, 0)) + hue = null; + else { + t2 = t3 ? 0 : b; + t1 = t1 ? 0 : a; + hue = Math.atan2(t2, t1) * 180 / 3.141592653589793; + } + t1 = missingChroma ? null : chroma; + return A.SassColor_SassColor$forSpaceInternal(dest, lightness, t1, hue == null || hue >= 0 ? hue : hue + 360, alpha); + }, + encodeVlq(value) { + var res, signBit, digit, t1; + if (value < $.$get$minInt32() || value > $.$get$maxInt32()) + throw A.wrapException(A.ArgumentError$("expected 32 bit int, got: " + value, null)); + res = A._setArrayType([], type$.JSArray_String); + if (value < 0) { + value = -value; + signBit = 1; + } else + signBit = 0; + value = value << 1 | signBit; + do { + digit = value & 31; + value = value >>> 5; + t1 = value > 0; + res.push(string$.ABCDEF[t1 ? digit | 32 : digit]); + } while (t1); + return res; + }, + isAllTheSame(iter) { + var firstValue, t1, t2, value; + if (iter.get$length(0) === 0) + return true; + firstValue = iter.get$first(0); + for (t1 = A.SubListIterable$(iter, 1, null, iter.$ti._eval$1("ListIterable.E")), t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + value = t1.__internal$_current; + if (!J.$eq$(value == null ? t2._as(value) : value, firstValue)) + return false; + } + return true; + }, + replaceFirstNull(list, element) { + var index = B.JSArray_methods.indexOf$1(list, null); + if (index < 0) + throw A.wrapException(A.ArgumentError$(A.S(list) + " contains no null elements.", null)); + list[index] = element; + }, + replaceWithNull(list, element) { + var index = B.JSArray_methods.indexOf$1(list, element); + if (index < 0) + throw A.wrapException(A.ArgumentError$(A.S(list) + " contains no elements matching " + element.toString$0(0) + ".", null)); + list[index] = null; + }, + countCodeUnits(string, codeUnit) { + var t1, t2, count, t3; + for (t1 = new A.CodeUnits(string), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"), count = 0; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if ((t3 == null ? t2._as(t3) : t3) === codeUnit) + ++count; + } + return count; + }, + findLineStart(context, text, column) { + var beginningOfLine, index, lineStart; + if (text.length === 0) + for (beginningOfLine = 0;;) { + index = B.JSString_methods.indexOf$2(context, "\n", beginningOfLine); + if (index === -1) + return context.length - beginningOfLine >= column ? beginningOfLine : null; + if (index - beginningOfLine >= column) + return beginningOfLine; + beginningOfLine = index + 1; + } + index = B.JSString_methods.indexOf$1(context, text); + while (index !== -1) { + lineStart = index === 0 ? 0 : B.JSString_methods.lastIndexOf$2(context, "\n", index - 1) + 1; + if (column === index - lineStart) + return lineStart; + index = B.JSString_methods.indexOf$2(context, text, index + 1); + } + return null; + }, + validateErrorArgs(string, match, position, $length) { + var t2, + t1 = position != null; + if (t1) + if (position < 0) + throw A.wrapException(A.RangeError$("position must be greater than or equal to 0.")); + else if (position > string.length) + throw A.wrapException(A.RangeError$("position must be less than or equal to the string length.")); + t2 = $length != null; + if (t2 && $length < 0) + throw A.wrapException(A.RangeError$("length must be greater than or equal to 0.")); + if (t1 && t2 && position + $length > string.length) + throw A.wrapException(A.RangeError$("position plus length must not go beyond the end of the string.")); + }, + CharacterExtension_get_isAlphabetic0(_this) { + var t1; + if (!(_this >= 97 && _this <= 122)) + t1 = _this >= 65 && _this <= 90; + else + t1 = true; + return t1; + }, + CharacterExtension_get_isHex0(_this) { + var t1 = true; + if (!(_this >= 48 && _this <= 57)) + if (!(_this >= 97 && _this <= 102)) + t1 = _this >= 65 && _this <= 70; + return t1; + }, + combineSurrogates(highSurrogate, lowSurrogate) { + return 65536 + ((highSurrogate & 1023) << 10) + (lowSurrogate & 1023); + }, + asHex0(character) { + var t1; + $label0$0: { + if (character <= 57) { + t1 = character - 48; + break $label0$0; + } + if (character <= 70) { + t1 = 10 + character - 65; + break $label0$0; + } + t1 = 10 + character - 97; + break $label0$0; + } + return t1; + }, + hexCharFor0(number) { + return number < 10 ? 48 + number : 87 + number; + }, + opposite0(character) { + var t1; + $label0$0: { + if (40 === character) { + t1 = 41; + break $label0$0; + } + if (123 === character) { + t1 = 125; + break $label0$0; + } + if (91 === character) { + t1 = 93; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$('"' + A.String_String$fromCharCode(character) + "\" isn't a brace-like character.", null)); + } + return t1; + }, + characterEqualsIgnoreCase0(character1, character2) { + var upperCase1; + if (character1 === character2) + return true; + if ((character1 ^ character2) >>> 0 !== 32) + return false; + upperCase1 = (character1 & 4294967263) >>> 0; + return upperCase1 >= 65 && upperCase1 <= 90; + }, + IterableExtension_search0(_this, callback) { + var t1, _0_0; + for (t1 = J.get$iterator$ax(_this); t1.moveNext$0();) { + _0_0 = callback.call$1(t1.get$current(t1)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + IterableExtension_get_exceptLast0(_this) { + var t1 = J.getInterceptor$asx(_this), + size = t1.get$length(_this) - 1; + if (size < 0) + throw A.wrapException(A.StateError$("Iterable may not be empty")); + return t1.take$1(_this, size); + }, + NullableExtension_andThen0(_this, fn) { + return _this == null ? null : fn.call$1(_this); + }, + fuzzyEquals0(number1, number2) { + var t1; + if (number1 === number2) + return true; + if (Math.abs(number1 - number2) <= $.$get$_epsilon0()) { + t1 = $.$get$_inverseEpsilon0(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyEqualsNullable0(number1, number2) { + var t1; + if (number1 == number2) + return true; + if (number1 == null || number2 == null) + return false; + if (Math.abs(number1 - number2) <= $.$get$_epsilon0()) { + t1 = $.$get$_inverseEpsilon0(); + t1 = B.JSNumber_methods.round$0(number1 * t1) === B.JSNumber_methods.round$0(number2 * t1); + } else + t1 = false; + return t1; + }, + fuzzyHashCode0(number) { + if (!isFinite(number)) + return B.JSNumber_methods.get$hashCode(number); + return B.JSInt_methods.get$hashCode(B.JSNumber_methods.round$0(number * $.$get$_inverseEpsilon0())); + }, + fuzzyLessThan0(number1, number2) { + return number1 < number2 && !A.fuzzyEquals0(number1, number2); + }, + fuzzyLessThanOrEquals0(number1, number2) { + return number1 < number2 || A.fuzzyEquals0(number1, number2); + }, + fuzzyGreaterThan0(number1, number2) { + return number1 > number2 && !A.fuzzyEquals0(number1, number2); + }, + fuzzyGreaterThanOrEquals0(number1, number2) { + return number1 > number2 || A.fuzzyEquals0(number1, number2); + }, + fuzzyIsInt0(number) { + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return false; + return A.fuzzyEquals0(number, B.JSNumber_methods.round$0(number)); + }, + fuzzyAsInt0(number) { + var rounded; + if (number == 1 / 0 || number == -1 / 0 || isNaN(number)) + return null; + rounded = B.JSNumber_methods.round$0(number); + return A.fuzzyEquals0(number, rounded) ? rounded : null; + }, + fuzzyRound0(number) { + var t1; + if (number > 0) { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 && !A.fuzzyEquals0(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } else { + t1 = B.JSNumber_methods.$mod(number, 1); + return t1 < 0.5 || A.fuzzyEquals0(t1, 0.5) ? B.JSNumber_methods.floor$0(number) : B.JSNumber_methods.ceil$0(number); + } + }, + fuzzyCheckRange0(number, min, max) { + if (A.fuzzyEquals0(number, min)) + return min; + if (A.fuzzyEquals0(number, max)) + return max; + if (number > min && number < max) + return number; + return null; + }, + fuzzyAssertRange0(number, min, max, $name) { + var result = A.fuzzyCheckRange0(number, min, max); + if (result != null) + return result; + throw A.wrapException(A.RangeError$range(number, min, max, $name, "must be between " + min + " and " + max)); + }, + moduloLikeSass0(num1, num2) { + var result; + if (num1 == 1 / 0 || num1 == -1 / 0) + return 0 / 0; + if (num2 == 1 / 0 || num2 == -1 / 0) + return A.DoubleWithSignedZero_get_signIncludingZero0(num1) === J.get$sign$in(num2) ? num1 : 0 / 0; + if (num2 > 0) + return B.JSNumber_methods.$mod(num1, num2); + if (num2 === 0) + return 0 / 0; + result = B.JSNumber_methods.$mod(num1, num2); + return result === 0 ? 0 : result + num2; + }, + sqrt0(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber0(Math.sqrt(number._number1$_value), null); + }, + sin0(number) { + return A.SassNumber_SassNumber0(Math.sin(number.coerceValueToUnit$2("rad", "number")), null); + }, + cos0(number) { + return A.SassNumber_SassNumber0(Math.cos(number.coerceValueToUnit$2("rad", "number")), null); + }, + tan0(number) { + return A.SassNumber_SassNumber0(Math.tan(number.coerceValueToUnit$2("rad", "number")), null); + }, + atan0(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits0(Math.atan(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + asin0(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits0(Math.asin(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + acos0(number) { + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber$withUnits0(Math.acos(number._number1$_value) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + log0(number, base) { + if (base != null) + return A.SassNumber_SassNumber0(Math.log(number._number1$_value) / Math.log(base._number1$_value), null); + return A.SassNumber_SassNumber0(Math.log(number._number1$_value), null); + }, + pow1(base, exponent) { + base.assertNoUnits$1("base"); + exponent.assertNoUnits$1("exponent"); + return A.SassNumber_SassNumber0(Math.pow(base._number1$_value, exponent._number1$_value), null); + }, + DoubleWithSignedZero_get_signIncludingZero0(_this) { + if (_this === -0.0) + return -1; + if (_this === 0) + return 1; + return J.get$sign$in(_this); + }, + main1(args) { + return A.main$body(args); + }, + main$body(args) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$errorStack = [], options, t1, graph, error, error0, stackTrace, buffer, t2, exception, $async$exception, $async$temp1; + var $async$main1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (args.length >= 1 && "--embedded" === args[0]) { + A.main0(B.JSArray_methods.sublist$1(args, 1)); + // goto return + $async$goto = 1; + break; + } + options = null; + $async$handler = 4; + options = A.ExecutableOptions_ExecutableOptions$parse(args); + t2 = options._options; + $._glyphs = !(t2.wasParsed$1("unicode") ? A._asBool(t2.$index(0, "unicode")) : $._glyphs !== B.C_AsciiGlyphSet) ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + $async$goto = A._asBool(options._options.$index(0, "version")) ? 7 : 8; + break; + case 7: + // then + $async$temp1 = A; + $async$goto = 9; + return A._asyncAwait(A._loadVersion(), $async$main1); + case 9: + // returning from await. + $async$temp1.print($async$result); + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) + J.set$exitCode$x(t1, 0); + // goto return + $async$goto = 1; + break; + case 8: + // join + $async$goto = options.get$interactive() ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(A.repl(options), $async$main1); + case 12: + // returning from await. + // goto return + $async$goto = 1; + break; + case 11: + // join + options.get$silenceDeprecations(0); + options.get$futureDeprecations(0); + options.get$fatalDeprecations(0); + t2 = A.List_List$_of(options.get$pkgImporters(), type$.Importer_2); + t1 = t2; + J.add$1$ax(t1, $.$get$FilesystemImporter_noLoadPath()); + t2 = type$.Uri; + graph = new A.StylesheetGraph(A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.StylesheetNode), A.ImportCache$(t1, type$.List_String._as(options._options.$index(0, "load-path"))), A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.DateTime)); + $async$goto = A._asBool(options._options.$index(0, "watch")) ? 13 : 14; + break; + case 13: + // then + $async$goto = 15; + return A._asyncAwait(A.watch(options, graph), $async$main1); + case 15: + // returning from await. + // goto return + $async$goto = 1; + break; + case 14: + // join + t1 = options; + t2 = options; + t2._ensureSources$0(); + t2 = t2._sourcesToDestinations; + t2.toString; + $async$goto = 16; + return A._asyncAwait(A.compileStylesheets(t1, graph, t2, A._asBool(options._options.$index(0, "update"))), $async$main1); + case 16: + // returning from await. + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.UsageException) { + error = t1; + A.print(error.message + "\n"); + A.print("Usage: sass [output.css]\n sass : : \n"); + t1 = $.$get$ExecutableOptions__parser(); + A.print(new A._Usage(t1._optionsAndSeparators, new A.StringBuffer(""), t1.usageLineLength).generate$0()); + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) + J.set$exitCode$x(t1, 64); + } else { + error0 = t1; + stackTrace = A.getTraceFromException($async$exception); + buffer = new A.StringBuffer(""); + t1 = options; + t1 = t1 == null ? null : t1.get$color(); + if (t1 === true) + buffer._contents += "\x1b[31m\x1b[1m"; + buffer._contents += "Unexpected exception:"; + t1 = options; + t1 = t1 == null ? null : t1.get$color(); + if (t1 === true) + buffer._contents += "\x1b[0m"; + buffer._contents += "\n"; + t1 = buffer; + t2 = A.S(error0) + "\n"; + t1._contents += t2; + buffer._contents += "\n"; + buffer._contents += "\n"; + t2 = buffer; + t1 = A.getTrace(error0); + t1 = B.JSString_methods.trimRight$0(A.Trace_Trace$from(t1 == null ? stackTrace : t1).get$terse().toString$0(0)); + t2._contents += t1; + A.printError(buffer); + t1 = A.isNodeJs() ? self.process : null; + if (t1 != null) + J.set$exitCode$x(t1, 255); + } + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$main1, $async$completer); + }, + _loadVersion() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue; + var $async$_loadVersion = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = "1.100.0 compiled with dart2js 3.12.0"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_loadVersion, $async$completer); + }, + SpanExtensions_trimLeft0(_this) { + var t1, start = 0; + for (;;) { + t1 = _this.get$text().charCodeAt(start); + if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) + break; + ++start; + } + return A.FileSpanExtension_subspan(_this, start, null); + }, + SpanExtensions_trimRight0(_this) { + var t1, + end = _this.get$text().length - 1; + for (;;) { + t1 = _this.get$text().charCodeAt(end); + if (!(t1 === 32 || t1 === 9 || t1 === 10 || t1 === 13 || t1 === 12)) + break; + --end; + } + return A.FileSpanExtension_subspan(_this, 0, end + 1); + }, + SpanExtensions_initialIdentifier0(_this) { + var i, + scanner = A.StringScanner$(_this.get$text(), null, null); + for (i = 0; false; ++i) + scanner.readChar$0(); + A._scanIdentifier0(scanner); + return A.FileSpanExtension_subspan(_this, 0, scanner._string_scanner$_position); + }, + SpanExtensions_between(_this, other) { + if (!J.$eq$(_this.get$sourceUrl(_this), other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$(_this.toString$0(0) + " and " + other.toString$0(0) + " are in different files.", null)); + else if (_this.get$end(_this).offset > other.get$start(other).offset) + throw A.wrapException(A.ArgumentError$(_this.toString$0(0) + " isn't before " + other.toString$0(0) + ".", null)); + return _this.get$file(_this).span$2(0, _this.get$end(_this).offset, other.get$start(other).offset); + }, + SpanExtensions_before(_this, inner) { + if (!J.$eq$(_this.get$sourceUrl(_this), inner.get$sourceUrl(inner))) + throw A.wrapException(A.ArgumentError$(_this.toString$0(0) + " and " + inner.toString$0(0) + " are in different files.", null)); + else if (inner.get$start(inner).offset < _this.get$start(_this).offset || inner.get$end(inner).offset > _this.get$end(_this).offset) + throw A.wrapException(A.ArgumentError$(inner.toString$0(0) + " isn't inside " + _this.toString$0(0) + ".", null)); + return _this.get$file(_this).span$2(0, _this.get$start(_this).offset, inner.get$start(inner).offset); + }, + SpanExtensions_after(_this, inner) { + if (!J.$eq$(_this.get$sourceUrl(_this), inner.get$sourceUrl(inner))) + throw A.wrapException(A.ArgumentError$(_this.toString$0(0) + " and " + inner.toString$0(0) + " are in different files.", null)); + else if (inner.get$start(inner).offset < _this.get$start(_this).offset || inner.get$end(inner).offset > _this.get$end(_this).offset) + throw A.wrapException(A.ArgumentError$(inner.toString$0(0) + " isn't inside " + _this.toString$0(0) + ".", null)); + return _this.get$file(_this).span$2(0, inner.get$end(inner).offset, _this.get$end(_this).offset); + }, + _scanIdentifier0(scanner) { + var t1, _0_0, t2; + for (t1 = scanner.string.length; scanner._string_scanner$_position !== t1;) { + _0_0 = scanner.peekChar$0(); + if (92 === _0_0) { + A.consumeEscapedCharacter0(scanner); + continue; + } + if (A._isInt(_0_0)) { + if (_0_0 !== 95) { + if (!(_0_0 >= 97 && _0_0 <= 122)) + t2 = _0_0 >= 65 && _0_0 <= 90; + else + t2 = true; + t2 = t2 || _0_0 >= 128; + } else + t2 = true; + if (!t2) + t2 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; + else + t2 = true; + } else + t2 = false; + if (t2) { + scanner.readChar$0(); + continue; + } + break; + } + }, + validateUrlScheme(scheme) { + var t1 = $.$get$_urlSchemeRegExp(); + if (!t1._nativeRegExp.test(scheme)) + A.jsThrow(new self.Error('"' + scheme + '" isn\'t a valid URL scheme (for example "file").')); + }, + hueToRgb0(m1, m2, hue) { + var t1; + if (hue < 0) + ++hue; + if (hue > 1) + --hue; + $label0$0: { + if (hue < 0.16666666666666666) { + t1 = m1 + (m2 - m1) * hue * 6; + break $label0$0; + } + if (hue < 0.5) { + t1 = m2; + break $label0$0; + } + if (hue < 0.6666666666666666) { + t1 = m1 + (m2 - m1) * (0.6666666666666666 - hue) * 6; + break $label0$0; + } + t1 = m1; + break $label0$0; + } + return t1; + }, + srgbAndDisplayP3ToLinear0(channel) { + var abs = Math.abs(channel); + return abs <= 0.04045 ? channel / 12.92 : J.get$sign$in(channel) * Math.pow((abs + 0.055) / 1.055, 2.4); + }, + srgbAndDisplayP3FromLinear0(channel) { + var abs = Math.abs(channel); + return abs <= 0.0031308 ? channel * 12.92 : J.get$sign$in(channel) * (1.055 * Math.pow(abs, 0.4166666666666667) - 0.055); + }, + labToLch0(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var t3, t4, chroma, hue, + t1 = a == null, + t2 = t1 ? 0 : a; + t2 = Math.pow(t2, 2); + t3 = b == null; + t4 = t3 ? 0 : b; + chroma = Math.sqrt(t2 + Math.pow(t4, 2)); + if (missingHue || A.fuzzyEquals0(chroma, 0)) + hue = null; + else { + t2 = t3 ? 0 : b; + t1 = t1 ? 0 : a; + hue = Math.atan2(t2, t1) * 180 / 3.141592653589793; + } + t1 = missingChroma ? null : chroma; + return A.SassColor_SassColor$forSpaceInternal0(dest, lightness, t1, hue == null || hue >= 0 ? hue : hue + 360, alpha); + }, + unwrapValue(object) { + var value; + if (object != null) { + if (object instanceof A.Value0) + return object; + value = object.dartValue; + if (value != null && value instanceof A.Value0) + return value; + if (object instanceof self.Error) + throw A.wrapException(object); + } + throw A.wrapException(A.S(object) + " must be a Sass value type."); + }, + wrapValue(value) { + var t1; + $label0$0: { + if (value instanceof A.SassColor0) { + t1 = A.callConstructor($.$get$legacyColorClass(), [null, null, null, null, value]); + break $label0$0; + } + if (value instanceof A.SassList0) { + t1 = A.callConstructor($.$get$legacyListClass(), [null, null, value]); + break $label0$0; + } + if (value instanceof A.SassMap0) { + t1 = A.callConstructor($.$get$legacyMapClass(), [null, value]); + break $label0$0; + } + if (value instanceof A.SassNumber0) { + t1 = A.callConstructor($.$get$legacyNumberClass(), [null, null, value]); + break $label0$0; + } + if (value instanceof A.SassString0) { + t1 = A.callConstructor($.$get$legacyStringClass(), [null, value]); + break $label0$0; + } + t1 = value; + break $label0$0; + } + return t1; + } + }, + B = {}; + var holders = [A, J, B]; + var $ = {}; + A.JS_CONST.prototype = {}; + J.Interceptor.prototype = { + $eq(receiver, other) { + return receiver === other; + }, + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); + }, + toString$0(receiver) { + return "Instance of '" + A.Primitives_objectTypeName(receiver) + "'"; + }, + noSuchMethod$1(receiver, invocation) { + throw A.wrapException(A.NoSuchMethodError_NoSuchMethodError$withInvocation(receiver, invocation)); + }, + get$runtimeType(receiver) { + return A.createRuntimeType(A._instanceTypeFromConstructor(this)); + } + }; + J.JSBool.prototype = { + toString$0(receiver) { + return String(receiver); + }, + $or(receiver, other) { + return other || receiver; + }, + get$hashCode(receiver) { + return receiver ? 519018 : 218159; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.bool); + }, + $isTrustedGetRuntimeType: 1, + $isbool: 1 + }; + J.JSNull.prototype = { + $eq(receiver, other) { + return null == other; + }, + toString$0(receiver) { + return "null"; + }, + get$hashCode(receiver) { + return 0; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.Null); + }, + $isTrustedGetRuntimeType: 1, + $isNull: 1 + }; + J.JavaScriptObject.prototype = {$isJSObject: 1}; + J.LegacyJavaScriptObject.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + }, + $isPromise: 1, + $isJsSystemError: 1, + $isImmutableList: 1, + $is_ConstructionOptions: 1, + $is_ChannelOptions: 1, + $is_ToGamutOptions: 1, + $is_InterpolationOptions: 1, + $is_NodeSassColor: 1, + $isCompileOptions: 1, + $isCompileStringOptions: 1, + $isNodeCompileResult: 1, + $isDeprecation1: 1, + $is_NodeException: 1, + $isJSExpressionVisitorObject: 1, + $isFiber: 1, + $isJSFunction0: 1, + $isJSIfConditionExpressionVisitorObject: 1, + $isImmutableList0: 1, + $isImmutableMap0: 1, + $isJSImporter: 1, + $isJSImporterResult: 1, + $isNodeImporterResult0: 1, + $is_ConstructorOptions: 1, + $is_NodeSassList: 1, + $isWarnOptions: 1, + $isDebugOptions: 1, + $is_NodeSassMap: 1, + $is_ConstructorOptions0: 1, + $is_NodeSassNumber: 1, + $isParserExports: 1, + $isJSClass0: 1, + $isRenderContextOptions0: 1, + $isRenderOptions: 1, + $isRenderResult: 1, + $isJSSet: 1, + $isJSSimpleSelectorVisitorObject: 1, + $isJSStatementVisitorObject: 1, + $is_ConstructorOptions1: 1, + $is_NodeSassString: 1, + $isJSUrl0: 1, + get$isTTY(obj) { + return obj.isTTY; + }, + get$write(obj) { + return obj.write; + }, + write$1(receiver, p0) { + return receiver.write(p0); + }, + createInterface$1(receiver, p0) { + return receiver.createInterface(p0); + }, + on$2(receiver, p0, p1) { + return receiver.on(p0, p1); + }, + get$close(obj) { + return obj.close; + }, + close$0(receiver) { + return receiver.close(); + }, + setPrompt$1(receiver, p0) { + return receiver.setPrompt(p0); + }, + get$length(obj) { + return obj.length; + }, + toString$0(receiver) { + return receiver.toString(); + }, + get$debug(obj) { + return obj.debug; + }, + debug$2(receiver, p0, p1) { + return receiver.debug(p0, p1); + }, + get$error(obj) { + return obj.error; + }, + error$1(receiver, p0) { + return receiver.error(p0); + }, + error$2(receiver, p0, p1) { + return receiver.error(p0, p1); + }, + log$1(receiver, p0) { + return receiver.log(p0); + }, + get$warn(obj) { + return obj.warn; + }, + warn$1(receiver, p0) { + return receiver.warn(p0); + }, + warn$2(receiver, p0, p1) { + return receiver.warn(p0, p1); + }, + existsSync$1(receiver, p0) { + return receiver.existsSync(p0); + }, + lstatSync$1(receiver, p0) { + return receiver.lstatSync(p0); + }, + mkdirSync$1(receiver, p0) { + return receiver.mkdirSync(p0); + }, + readdirSync$1(receiver, p0) { + return receiver.readdirSync(p0); + }, + readFileSync$2(receiver, p0, p1) { + return receiver.readFileSync(p0, p1); + }, + get$realpathSync(obj) { + return obj.realpathSync; + }, + statSync$1(receiver, p0) { + return receiver.statSync(p0); + }, + unlinkSync$1(receiver, p0) { + return receiver.unlinkSync(p0); + }, + watch$2(receiver, p0, p1) { + return receiver.watch(p0, p1); + }, + writeFileSync$2(receiver, p0, p1) { + return receiver.writeFileSync(p0, p1); + }, + call$1(receiver, p0) { + return receiver.call(p0); + }, + call$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + call$3$1(receiver, p0) { + return receiver.call(p0); + }, + call$2$1(receiver, p0) { + return receiver.call(p0); + }, + call$1$1(receiver, p0) { + return receiver.call(p0); + }, + call$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + call$3$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + call$2$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + call$1$2(receiver, p0, p1) { + return receiver.call(p0, p1); + }, + call$2$3(receiver, p0, p1, p2) { + return receiver.call(p0, p1, p2); + }, + native$1(receiver, p0) { + return receiver.native(p0); + }, + get$path(obj) { + return obj.path; + }, + isDirectory$0(receiver) { + return receiver.isDirectory(); + }, + isFile$0(receiver) { + return receiver.isFile(); + }, + isSymbolicLink$0(receiver) { + return receiver.isSymbolicLink(); + }, + get$mtime(obj) { + return obj.mtime; + }, + then$2(receiver, p0, p1) { + return receiver.then(p0, p1); + }, + then$1$1(receiver, p0) { + return receiver.then(p0); + }, + getTime$0(receiver) { + return receiver.getTime(); + }, + get$message(obj) { + return obj.message; + }, + message$1(receiver, p0) { + return receiver.message(p0); + }, + get$filename(obj) { + return obj.filename; + }, + get$id(obj) { + return obj.id; + }, + get$code(obj) { + return obj.code; + }, + get$syscall(obj) { + return obj.syscall; + }, + get$argv(obj) { + return obj.argv; + }, + get$env(obj) { + return obj.env; + }, + get$exitCode(obj) { + return obj.exitCode; + }, + set$exitCode(obj, v) { + return obj.exitCode = v; + }, + get$platform(obj) { + return obj.platform; + }, + get$release(obj) { + return obj.release; + }, + get$stderr(obj) { + return obj.stderr; + }, + get$stdin(obj) { + return obj.stdin; + }, + get$stdout(obj) { + return obj.stdout; + }, + get$name(obj) { + return obj.name; + }, + push$1(receiver, p0) { + return receiver.push(p0); + }, + call$0(receiver) { + return receiver.call(); + }, + call$2$0(receiver) { + return receiver.call(); + }, + call$1$0(receiver) { + return receiver.call(); + }, + apply$2(receiver, p0, p1) { + return receiver.apply(p0, p1); + }, + toArray$0(receiver) { + return receiver.toArray(); + }, + asMutable$0(receiver) { + return receiver.asMutable(); + }, + asImmutable$0(receiver) { + return receiver.asImmutable(); + }, + $set$2(receiver, p0, p1) { + return receiver.set(p0, p1); + }, + forEach$1(receiver, p0) { + return receiver.forEach(p0); + }, + get$file(obj) { + return obj.file; + }, + get$contents(obj) { + return obj.contents; + }, + get$options(obj) { + return obj.options; + }, + get$data(obj) { + return obj.data; + }, + get$includePaths(obj) { + return obj.includePaths; + }, + get$style(obj) { + return obj.style; + }, + get$indentType(obj) { + return obj.indentType; + }, + get$indentWidth(obj) { + return obj.indentWidth; + }, + get$linefeed(obj) { + return obj.linefeed; + }, + set$context(obj, v) { + return obj.context = v; + }, + createRequire$1(receiver, p0) { + return receiver.createRequire(p0); + }, + resolve$1(receiver, p0) { + return receiver.resolve(p0); + }, + get$$prototype(obj) { + return obj.prototype; + }, + get$red(obj) { + return obj.red; + }, + get$green(obj) { + return obj.green; + }, + get$blue(obj) { + return obj.blue; + }, + get$hue(obj) { + return obj.hue; + }, + get$saturation(obj) { + return obj.saturation; + }, + get$lightness(obj) { + return obj.lightness; + }, + get$whiteness(obj) { + return obj.whiteness; + }, + get$blackness(obj) { + return obj.blackness; + }, + get$alpha(obj) { + return obj.alpha; + }, + get$a(obj) { + return obj.a; + }, + get$b(obj) { + return obj.b; + }, + get$x(obj) { + return obj.x; + }, + get$y(obj) { + return obj.y; + }, + get$z(obj) { + return obj.z; + }, + get$chroma(obj) { + return obj.chroma; + }, + get$space(obj) { + return obj.space; + }, + get$method(obj) { + return obj.method; + }, + get$weight(obj) { + return obj.weight; + }, + get$dartValue(obj) { + return obj.dartValue; + }, + set$dartValue(obj, v) { + return obj.dartValue = v; + }, + get$alertAscii(obj) { + return obj.alertAscii; + }, + get$alertColor(obj) { + return obj.alertColor; + }, + get$loadPaths(obj) { + return obj.loadPaths; + }, + get$quietDeps(obj) { + return obj.quietDeps; + }, + get$verbose(obj) { + return obj.verbose; + }, + get$charset(obj) { + return obj.charset; + }, + get$sourceMap(obj) { + return obj.sourceMap; + }, + get$sourceMapIncludeSources(obj) { + return obj.sourceMapIncludeSources; + }, + get$logger(obj) { + return obj.logger; + }, + get$importers(obj) { + return obj.importers; + }, + get$functions(obj) { + return obj.functions; + }, + get$fatalDeprecations(obj) { + return obj.fatalDeprecations; + }, + get$silenceDeprecations(obj) { + return obj.silenceDeprecations; + }, + get$futureDeprecations(obj) { + return obj.futureDeprecations; + }, + get$syntax(obj) { + return obj.syntax; + }, + get$url(obj) { + return obj.url; + }, + get$importer(obj) { + return obj.importer; + }, + get$_dartException(obj) { + return obj._dartException; + }, + set$renderSync(obj, v) { + return obj.renderSync = v; + }, + set$compileString(obj, v) { + return obj.compileString = v; + }, + set$compileStringAsync(obj, v) { + return obj.compileStringAsync = v; + }, + set$compile(obj, v) { + return obj.compile = v; + }, + set$compileAsync(obj, v) { + return obj.compileAsync = v; + }, + set$initCompiler(obj, v) { + return obj.initCompiler = v; + }, + set$initAsyncCompiler(obj, v) { + return obj.initAsyncCompiler = v; + }, + set$Compiler(obj, v) { + return obj.Compiler = v; + }, + set$AsyncCompiler(obj, v) { + return obj.AsyncCompiler = v; + }, + set$info(obj, v) { + return obj.info = v; + }, + set$Exception(obj, v) { + return obj.Exception = v; + }, + set$Logger(obj, v) { + return obj.Logger = v; + }, + set$NodePackageImporter(obj, v) { + return obj.NodePackageImporter = v; + }, + set$deprecations(obj, v) { + return obj.deprecations = v; + }, + set$Version(obj, v) { + return obj.Version = v; + }, + set$Value(obj, v) { + return obj.Value = v; + }, + set$SassArgumentList(obj, v) { + return obj.SassArgumentList = v; + }, + set$SassCalculation(obj, v) { + return obj.SassCalculation = v; + }, + set$CalculationOperation(obj, v) { + return obj.CalculationOperation = v; + }, + set$CalculationInterpolation(obj, v) { + return obj.CalculationInterpolation = v; + }, + set$SassBoolean(obj, v) { + return obj.SassBoolean = v; + }, + set$SassColor(obj, v) { + return obj.SassColor = v; + }, + set$SassFunction(obj, v) { + return obj.SassFunction = v; + }, + set$SassMixin(obj, v) { + return obj.SassMixin = v; + }, + set$SassList(obj, v) { + return obj.SassList = v; + }, + set$SassMap(obj, v) { + return obj.SassMap = v; + }, + set$SassNumber(obj, v) { + return obj.SassNumber = v; + }, + set$SassString(obj, v) { + return obj.SassString = v; + }, + set$sassNull(obj, v) { + return obj.sassNull = v; + }, + set$sassTrue(obj, v) { + return obj.sassTrue = v; + }, + set$sassFalse(obj, v) { + return obj.sassFalse = v; + }, + set$render(obj, v) { + return obj.render = v; + }, + set$types(obj, v) { + return obj.types = v; + }, + set$NULL(obj, v) { + return obj.NULL = v; + }, + set$TRUE(obj, v) { + return obj.TRUE = v; + }, + set$FALSE(obj, v) { + return obj.FALSE = v; + }, + set$loadParserExports_(obj, v) { + return obj.loadParserExports_ = v; + }, + visitBinaryOperationExpression$1(receiver, p0) { + return receiver.visitBinaryOperationExpression(p0); + }, + visitBooleanExpression$1(receiver, p0) { + return receiver.visitBooleanExpression(p0); + }, + visitColorExpression$1(receiver, p0) { + return receiver.visitColorExpression(p0); + }, + visitInterpolatedFunctionExpression$1(receiver, p0) { + return receiver.visitInterpolatedFunctionExpression(p0); + }, + visitFunctionExpression$1(receiver, p0) { + return receiver.visitFunctionExpression(p0); + }, + visitIfExpression$1(receiver, p0) { + return receiver.visitIfExpression(p0); + }, + visitLegacyIfExpression$1(receiver, p0) { + return receiver.visitLegacyIfExpression(p0); + }, + visitListExpression$1(receiver, p0) { + return receiver.visitListExpression(p0); + }, + visitMapExpression$1(receiver, p0) { + return receiver.visitMapExpression(p0); + }, + visitNullExpression$1(receiver, p0) { + return receiver.visitNullExpression(p0); + }, + visitNumberExpression$1(receiver, p0) { + return receiver.visitNumberExpression(p0); + }, + visitParenthesizedExpression$1(receiver, p0) { + return receiver.visitParenthesizedExpression(p0); + }, + visitSelectorExpression$1(receiver, p0) { + return receiver.visitSelectorExpression(p0); + }, + visitStringExpression$1(receiver, p0) { + return receiver.visitStringExpression(p0); + }, + visitSupportsExpression$1(receiver, p0) { + return receiver.visitSupportsExpression(p0); + }, + visitUnaryOperationExpression$1(receiver, p0) { + return receiver.visitUnaryOperationExpression(p0); + }, + visitValueExpression$1(receiver, p0) { + return receiver.visitValueExpression(p0); + }, + visitVariableExpression$1(receiver, p0) { + return receiver.visitVariableExpression(p0); + }, + get$current(obj) { + return obj.current; + }, + yield$0(receiver) { + return receiver.yield(); + }, + run$1$1(receiver, p0) { + return receiver.run(p0); + }, + run$1(receiver, p0) { + return receiver.run(p0); + }, + run$0(receiver) { + return receiver.run(); + }, + visitIfConditionParenthesized$1(receiver, p0) { + return receiver.visitIfConditionParenthesized(p0); + }, + visitIfConditionNegation$1(receiver, p0) { + return receiver.visitIfConditionNegation(p0); + }, + visitIfConditionOperation$1(receiver, p0) { + return receiver.visitIfConditionOperation(p0); + }, + visitIfConditionFunction$1(receiver, p0) { + return receiver.visitIfConditionFunction(p0); + }, + visitIfConditionSass$1(receiver, p0) { + return receiver.visitIfConditionSass(p0); + }, + visitIfConditionRaw$1(receiver, p0) { + return receiver.visitIfConditionRaw(p0); + }, + get$canonicalize(obj) { + return obj.canonicalize; + }, + canonicalize$1(receiver, p0) { + return receiver.canonicalize(p0); + }, + get$load(obj) { + return obj.load; + }, + load$1(receiver, p0) { + return receiver.load(p0); + }, + get$findFileUrl(obj) { + return obj.findFileUrl; + }, + get$nonCanonicalScheme(obj) { + return obj.nonCanonicalScheme; + }, + get$sourceMapUrl(obj) { + return obj.sourceMapUrl; + }, + get$separator(obj) { + return obj.separator; + }, + get$brackets(obj) { + return obj.brackets; + }, + get$span(obj) { + return obj.span; + }, + span$1(receiver, p0) { + return receiver.span(p0); + }, + get$numeratorUnits(obj) { + return obj.numeratorUnits; + }, + get$denominatorUnits(obj) { + return obj.denominatorUnits; + }, + get$pkgImporter(obj) { + return obj.pkgImporter; + }, + get$indentedSyntax(obj) { + return obj.indentedSyntax; + }, + get$omitSourceMapUrl(obj) { + return obj.omitSourceMapUrl; + }, + get$outFile(obj) { + return obj.outFile; + }, + get$outputStyle(obj) { + return obj.outputStyle; + }, + get$fiber(obj) { + return obj.fiber; + }, + get$sourceMapContents(obj) { + return obj.sourceMapContents; + }, + get$sourceMapEmbed(obj) { + return obj.sourceMapEmbed; + }, + get$sourceMapRoot(obj) { + return obj.sourceMapRoot; + }, + set$cli_pkg_main_0_(obj, v) { + return obj.cli_pkg_main_0_ = v; + }, + visitAttributeSelector$1(receiver, p0) { + return receiver.visitAttributeSelector(p0); + }, + visitClassSelector$1(receiver, p0) { + return receiver.visitClassSelector(p0); + }, + visitIDSelector$1(receiver, p0) { + return receiver.visitIDSelector(p0); + }, + visitParentSelector$1(receiver, p0) { + return receiver.visitParentSelector(p0); + }, + visitPlaceholderSelector$1(receiver, p0) { + return receiver.visitPlaceholderSelector(p0); + }, + visitPseudoSelector$1(receiver, p0) { + return receiver.visitPseudoSelector(p0); + }, + visitTypeSelector$1(receiver, p0) { + return receiver.visitTypeSelector(p0); + }, + visitUniversalSelector$1(receiver, p0) { + return receiver.visitUniversalSelector(p0); + }, + visitAtRootRule$1(receiver, p0) { + return receiver.visitAtRootRule(p0); + }, + visitAtRule$1(receiver, p0) { + return receiver.visitAtRule(p0); + }, + get$visitContentBlock(obj) { + return obj.visitContentBlock; + }, + visitContentBlock$1(receiver, p0) { + return receiver.visitContentBlock(p0); + }, + visitContentRule$1(receiver, p0) { + return receiver.visitContentRule(p0); + }, + visitDebugRule$1(receiver, p0) { + return receiver.visitDebugRule(p0); + }, + visitDeclaration$1(receiver, p0) { + return receiver.visitDeclaration(p0); + }, + visitEachRule$1(receiver, p0) { + return receiver.visitEachRule(p0); + }, + visitErrorRule$1(receiver, p0) { + return receiver.visitErrorRule(p0); + }, + visitExtendRule$1(receiver, p0) { + return receiver.visitExtendRule(p0); + }, + visitForRule$1(receiver, p0) { + return receiver.visitForRule(p0); + }, + visitForwardRule$1(receiver, p0) { + return receiver.visitForwardRule(p0); + }, + visitFunctionRule$1(receiver, p0) { + return receiver.visitFunctionRule(p0); + }, + visitIfRule$1(receiver, p0) { + return receiver.visitIfRule(p0); + }, + visitImportRule$1(receiver, p0) { + return receiver.visitImportRule(p0); + }, + visitIncludeRule$1(receiver, p0) { + return receiver.visitIncludeRule(p0); + }, + visitLoudComment$1(receiver, p0) { + return receiver.visitLoudComment(p0); + }, + visitMediaRule$1(receiver, p0) { + return receiver.visitMediaRule(p0); + }, + visitMixinRule$1(receiver, p0) { + return receiver.visitMixinRule(p0); + }, + visitReturnRule$1(receiver, p0) { + return receiver.visitReturnRule(p0); + }, + visitSilentComment$1(receiver, p0) { + return receiver.visitSilentComment(p0); + }, + visitStyleRule$1(receiver, p0) { + return receiver.visitStyleRule(p0); + }, + visitStylesheet$1(receiver, p0) { + return receiver.visitStylesheet(p0); + }, + visitSupportsRule$1(receiver, p0) { + return receiver.visitSupportsRule(p0); + }, + visitUseRule$1(receiver, p0) { + return receiver.visitUseRule(p0); + }, + visitVariableDeclaration$1(receiver, p0) { + return receiver.visitVariableDeclaration(p0); + }, + visitWarnRule$1(receiver, p0) { + return receiver.visitWarnRule(p0); + }, + visitWhileRule$1(receiver, p0) { + return receiver.visitWhileRule(p0); + }, + get$quotes(obj) { + return obj.quotes; + } + }; + J.PlainJavaScriptObject.prototype = {}; + J.UnknownJavaScriptObject.prototype = {}; + J.JavaScriptFunction.prototype = { + toString$0(receiver) { + var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; + if (dartClosure == null) + dartClosure = receiver[$.$get$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME()]; + if (dartClosure == null) + return this.super$LegacyJavaScriptObject$toString(receiver); + return "JavaScript function for " + A.S(J.toString$0$(dartClosure)); + }, + $isFunction: 1 + }; + J.JavaScriptBigInt.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + } + }; + J.JavaScriptSymbol.prototype = { + get$hashCode(receiver) { + return 0; + }, + toString$0(receiver) { + return String(receiver); + } + }; + J.JSArray.prototype = { + cast$1$0(receiver, $R) { + return new A.CastList(receiver, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($R)._eval$1("CastList<1,2>")); + }, + add$1(receiver, value) { + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, 29); + receiver.push(value); + }, + removeAt$1(receiver, index) { + var t1; + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, "removeAt", 1); + t1 = receiver.length; + if (index >= t1) + throw A.wrapException(A.RangeError$value(index, null, null)); + return receiver.splice(index, 1)[0]; + }, + insert$2(receiver, index, value) { + var t1; + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, "insert", 2); + t1 = receiver.length; + if (index > t1) + throw A.wrapException(A.RangeError$value(index, null, null)); + receiver.splice(index, 0, value); + }, + insertAll$2(receiver, index, iterable) { + var insertionLength, end; + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, "insertAll", 2); + A.RangeError_checkValueInInterval(index, 0, receiver.length, "index"); + if (!type$.EfficientLengthIterable_dynamic._is(iterable)) + iterable = J.toList$0$ax(iterable); + insertionLength = J.get$length$asx(iterable); + receiver.length = receiver.length + insertionLength; + end = index + insertionLength; + this.setRange$4(receiver, end, receiver.length, receiver, index); + this.setRange$3(receiver, index, end, iterable); + }, + removeLast$0(receiver) { + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, "removeLast", 1); + if (receiver.length === 0) + throw A.wrapException(A.diagnoseIndexError(receiver, -1)); + return receiver.pop(); + }, + _removeWhere$2(receiver, test, removeMatching) { + var i, element, t1, retained = [], + end = receiver.length; + for (i = 0; i < end; ++i) { + element = receiver[i]; + if (!test.call$1(element)) + retained.push(element); + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + t1 = retained.length; + if (t1 === end) + return; + this.set$length(receiver, t1); + for (i = 0; i < retained.length; ++i) + receiver[i] = retained[i]; + }, + where$1(receiver, f) { + return new A.WhereIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("WhereIterable<1>")); + }, + expand$1$1(receiver, f, $T) { + return new A.ExpandIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + addAll$1(receiver, collection) { + var t1; + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, "addAll", 2); + if (Array.isArray(collection)) { + this._addAllFromArray$1(receiver, collection); + return; + } + for (t1 = J.get$iterator$ax(collection); t1.moveNext$0();) + receiver.push(t1.get$current(t1)); + }, + _addAllFromArray$1(receiver, array) { + var i, + len = array.length; + if (len === 0) + return; + if (receiver === array) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + for (i = 0; i < len; ++i) + receiver.push(array[i]); + }, + clear$0(receiver) { + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, "clear", "clear"); + receiver.length = 0; + }, + forEach$1(receiver, f) { + var i, + end = receiver.length; + for (i = 0; i < end; ++i) { + f.call$1(receiver[i]); + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + }, + map$1$1(receiver, f, $T) { + return new A.MappedListIterable(receiver, f, A._arrayInstanceType(receiver)._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + join$1(receiver, separator) { + var i, + list = A.List_List$filled(receiver.length, "", false, type$.String); + for (i = 0; i < receiver.length; ++i) + list[i] = A.S(receiver[i]); + return list.join(separator); + }, + join$0(receiver) { + return this.join$1(receiver, ""); + }, + take$1(receiver, n) { + return A.SubListIterable$(receiver, 0, A.checkNotNullable(n, "count", type$.int), A._arrayInstanceType(receiver)._precomputed1); + }, + skip$1(receiver, n) { + return A.SubListIterable$(receiver, n, null, A._arrayInstanceType(receiver)._precomputed1); + }, + fold$1$2(receiver, initialValue, combine) { + var value, i, + $length = receiver.length; + for (value = initialValue, i = 0; i < $length; ++i) { + value = combine.call$2(value, receiver[i]); + if (receiver.length !== $length) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return value; + }, + fold$2(receiver, initialValue, combine) { + return this.fold$1$2(receiver, initialValue, combine, type$.dynamic); + }, + firstWhere$1(receiver, test) { + var i, element, + end = receiver.length; + for (i = 0; i < end; ++i) { + element = receiver[i]; + if (test.call$1(element)) + return element; + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + throw A.wrapException(A.IterableElementError_noElement()); + }, + elementAt$1(receiver, index) { + return receiver[index]; + }, + sublist$2(receiver, start, end) { + var end0 = receiver.length; + if (start > end0) + throw A.wrapException(A.RangeError$range(start, 0, end0, "start", null)); + if (end == null) + end = end0; + else if (end < start || end > end0) + throw A.wrapException(A.RangeError$range(end, start, end0, "end", null)); + if (start === end) + return A._setArrayType([], A._arrayInstanceType(receiver)); + return A._setArrayType(receiver.slice(start, end), A._arrayInstanceType(receiver)); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + getRange$2(receiver, start, end) { + A.RangeError_checkValidRange(start, end, receiver.length); + return A.SubListIterable$(receiver, start, end, A._arrayInstanceType(receiver)._precomputed1); + }, + get$first(receiver) { + if (receiver.length > 0) + return receiver[0]; + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$last(receiver) { + var t1 = receiver.length; + if (t1 > 0) + return receiver[t1 - 1]; + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$single(receiver) { + var t1 = receiver.length; + if (t1 === 1) + return receiver[0]; + if (t1 === 0) + throw A.wrapException(A.IterableElementError_noElement()); + throw A.wrapException(A.IterableElementError_tooMany()); + }, + removeRange$2(receiver, start, end) { + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, 18); + A.RangeError_checkValidRange(start, end, receiver.length); + receiver.splice(start, end - start); + }, + setRange$4(receiver, start, end, iterable, skipCount) { + var $length, otherList, otherStart, t1, i; + receiver.$flags & 2 && A.throwUnsupportedOperation(receiver, 5); + A.RangeError_checkValidRange(start, end, receiver.length); + $length = end - start; + if ($length === 0) + return; + A.RangeError_checkNotNegative(skipCount, "skipCount"); + if (type$.List_dynamic._is(iterable)) { + otherList = iterable; + otherStart = skipCount; + } else { + otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false); + otherStart = 0; + } + t1 = J.getInterceptor$asx(otherList); + if (otherStart + $length > t1.get$length(otherList)) + throw A.wrapException(A.IterableElementError_tooFew()); + if (otherStart < start) + for (i = $length - 1; i >= 0; --i) + receiver[start + i] = t1.$index(otherList, otherStart + i); + else + for (i = 0; i < $length; ++i) + receiver[start + i] = t1.$index(otherList, otherStart + i); + }, + setRange$3(receiver, start, end, iterable) { + return this.setRange$4(receiver, start, end, iterable, 0); + }, + fillRange$3(receiver, start, end, fillValue) { + var i; + receiver.$flags & 2 && A.throwUnsupportedOperation(receiver, "fillRange"); + A.RangeError_checkValidRange(start, end, receiver.length); + A._arrayInstanceType(receiver)._precomputed1._as(fillValue); + for (i = start; i < end; ++i) + receiver[i] = fillValue; + }, + any$1(receiver, test) { + var i, + end = receiver.length; + for (i = 0; i < end; ++i) { + if (test.call$1(receiver[i])) + return true; + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + every$1(receiver, test) { + var i, + end = receiver.length; + for (i = 0; i < end; ++i) { + if (!test.call$1(receiver[i])) + return false; + if (receiver.length !== end) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return true; + }, + get$reversed(receiver) { + return new A.ReversedListIterable(receiver, A._arrayInstanceType(receiver)._eval$1("ReversedListIterable<1>")); + }, + sort$1(receiver, compare) { + var len, a, b, undefineds, i; + receiver.$flags & 2 && A.throwUnsupportedOperation(receiver, "sort"); + len = receiver.length; + if (len < 2) + return; + if (compare == null) + compare = J._interceptors_JSArray__compareAny$closure(); + if (len === 2) { + a = receiver[0]; + b = receiver[1]; + if (compare.call$2(a, b) > 0) { + receiver[0] = b; + receiver[1] = a; + } + return; + } + undefineds = 0; + if (A._arrayInstanceType(receiver)._precomputed1._is(null)) + for (i = 0; i < receiver.length; ++i) + if (receiver[i] === void 0) { + receiver[i] = null; + ++undefineds; + } + receiver.sort(A.convertDartClosureToJS(compare, 2)); + if (undefineds > 0) + this._replaceSomeNullsWithUndefined$1(receiver, undefineds); + }, + sort$0(receiver) { + return this.sort$1(receiver, null); + }, + _replaceSomeNullsWithUndefined$1(receiver, count) { + var i0, + i = receiver.length; + for (; i0 = i - 1, i > 0; i = i0) + if (receiver[i0] === null) { + receiver[i0] = void 0; + --count; + if (count === 0) + break; + } + }, + indexOf$1(receiver, element) { + var i, + $length = receiver.length; + if (0 >= $length) + return -1; + for (i = 0; i < $length; ++i) + if (J.$eq$(receiver[i], element)) + return i; + return -1; + }, + contains$1(receiver, other) { + var i; + for (i = 0; i < receiver.length; ++i) + if (J.$eq$(receiver[i], other)) + return true; + return false; + }, + get$isEmpty(receiver) { + return receiver.length === 0; + }, + get$isNotEmpty(receiver) { + return receiver.length !== 0; + }, + toString$0(receiver) { + return A.Iterable_iterableToFullString(receiver, "[", "]"); + }, + toList$1$growable(receiver, growable) { + var t1 = A._setArrayType(receiver.slice(0), A._arrayInstanceType(receiver)); + return t1; + }, + toList$0(receiver) { + return this.toList$1$growable(receiver, true); + }, + toSet$0(receiver) { + return A.LinkedHashSet_LinkedHashSet$from(receiver, A._arrayInstanceType(receiver)._precomputed1); + }, + get$iterator(receiver) { + return new J.ArrayIterator(receiver, receiver.length, A._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>")); + }, + get$hashCode(receiver) { + return A.Primitives_objectHashCode(receiver); + }, + get$length(receiver) { + return receiver.length; + }, + set$length(receiver, newLength) { + receiver.$flags & 1 && A.throwUnsupportedOperation(receiver, "set length", "change the length of"); + if (newLength < 0) + throw A.wrapException(A.RangeError$range(newLength, 0, null, "newLength", null)); + if (newLength > receiver.length) + A._arrayInstanceType(receiver)._precomputed1._as(null); + receiver.length = newLength; + }, + $index(receiver, index) { + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $indexSet(receiver, index, value) { + receiver.$flags & 2 && A.throwUnsupportedOperation(receiver); + if (!(index >= 0 && index < receiver.length)) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + receiver[index] = value; + }, + $add(receiver, other) { + var t1 = A.List_List$_of(receiver, A._arrayInstanceType(receiver)._precomputed1); + this.addAll$1(t1, other); + return t1; + }, + indexWhere$1(receiver, test) { + var i; + if (0 >= receiver.length) + return -1; + for (i = 0; i < receiver.length; ++i) + if (test.call$1(receiver[i])) + return i; + return -1; + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + J.JSArraySafeToStringHook.prototype = { + tryFormat$1(array) { + var flags, info, base; + if (!Array.isArray(array)) + return null; + flags = array.$flags | 0; + if ((flags & 4) !== 0) + info = "const, "; + else if ((flags & 2) !== 0) + info = "unmodifiable, "; + else + info = (flags & 1) !== 0 ? "fixed, " : ""; + base = "Instance of '" + A.Primitives_objectTypeName(array) + "'"; + if (info === "") + return base; + return base + " (" + info + "length: " + array.length + ")"; + } + }; + J.JSUnmodifiableArray.prototype = {}; + J.ArrayIterator.prototype = { + get$current(_) { + var t1 = this._current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t2, _this = this, + t1 = _this._iterable, + $length = t1.length; + if (_this._length !== $length) + throw A.wrapException(A.throwConcurrentModificationError(t1)); + t2 = _this._index; + if (t2 >= $length) { + _this._current = null; + return false; + } + _this._current = t1[t2]; + _this._index = t2 + 1; + return true; + } + }; + J.JSNumber.prototype = { + compareTo$1(receiver, b) { + var bIsNegative; + if (receiver < b) + return -1; + else if (receiver > b) + return 1; + else if (receiver === b) { + if (receiver === 0) { + bIsNegative = this.get$isNegative(b); + if (this.get$isNegative(receiver) === bIsNegative) + return 0; + if (this.get$isNegative(receiver)) + return -1; + return 1; + } + return 0; + } else if (isNaN(receiver)) { + if (isNaN(b)) + return 0; + return 1; + } else + return -1; + }, + get$isNegative(receiver) { + return receiver === 0 ? 1 / receiver < 0 : receiver < 0; + }, + get$sign(receiver) { + var t1; + if (receiver > 0) + t1 = 1; + else + t1 = receiver < 0 ? -1 : receiver; + return t1; + }, + ceil$0(receiver) { + var truncated, d; + if (receiver >= 0) { + if (receiver <= 2147483647) { + truncated = receiver | 0; + return receiver === truncated ? truncated : truncated + 1; + } + } else if (receiver >= -2147483648) + return receiver | 0; + d = Math.ceil(receiver); + if (isFinite(d)) + return d; + throw A.wrapException(A.UnsupportedError$("" + receiver + ".ceil()")); + }, + floor$0(receiver) { + var truncated, d; + if (receiver >= 0) { + if (receiver <= 2147483647) + return receiver | 0; + } else if (receiver >= -2147483648) { + truncated = receiver | 0; + return receiver === truncated ? truncated : truncated - 1; + } + d = Math.floor(receiver); + if (isFinite(d)) + return d; + throw A.wrapException(A.UnsupportedError$("" + receiver + ".floor()")); + }, + round$0(receiver) { + if (receiver > 0) { + if (receiver !== 1 / 0) + return Math.round(receiver); + } else if (receiver > -1 / 0) + return 0 - Math.round(0 - receiver); + throw A.wrapException(A.UnsupportedError$("" + receiver + ".round()")); + }, + clamp$2(receiver, lowerLimit, upperLimit) { + if (this.compareTo$1(lowerLimit, upperLimit) > 0) + throw A.wrapException(A.argumentErrorValue(lowerLimit)); + if (this.compareTo$1(receiver, lowerLimit) < 0) + return lowerLimit; + if (this.compareTo$1(receiver, upperLimit) > 0) + return upperLimit; + return receiver; + }, + toRadixString$1(receiver, radix) { + var result, match, exponent, t1; + if (radix < 2 || radix > 36) + throw A.wrapException(A.RangeError$range(radix, 2, 36, "radix", null)); + result = receiver.toString(radix); + if (result.charCodeAt(result.length - 1) !== 41) + return result; + match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); + if (match == null) + A.throwExpression(A.UnsupportedError$("Unexpected toString result: " + result)); + result = match[1]; + exponent = +match[3]; + t1 = match[2]; + if (t1 != null) { + result += t1; + exponent -= t1.length; + } + return result + B.JSString_methods.$mul("0", exponent); + }, + toString$0(receiver) { + if (receiver === 0 && 1 / receiver < 0) + return "-0.0"; + else + return "" + receiver; + }, + get$hashCode(receiver) { + var absolute, floorLog2, factor, scaled, + intValue = receiver | 0; + if (receiver === intValue) + return intValue & 536870911; + absolute = Math.abs(receiver); + floorLog2 = Math.log(absolute) / 0.6931471805599453 | 0; + factor = Math.pow(2, floorLog2); + scaled = absolute < 1 ? absolute / factor : factor / absolute; + return ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259 & 536870911; + }, + $mod(receiver, other) { + var result = receiver % other; + if (result === 0) + return 0; + if (result > 0) + return result; + if (other < 0) + return result - other; + else + return result + other; + }, + $tdiv(receiver, other) { + if ((receiver | 0) === receiver) + if (other >= 1 || other < -1) + return receiver / other | 0; + return this._tdivSlow$1(receiver, other); + }, + _tdivFast$1(receiver, other) { + return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); + }, + _tdivSlow$1(receiver, other) { + var quotient = receiver / other; + if (quotient >= -2147483648 && quotient <= 2147483647) + return quotient | 0; + if (quotient > 0) { + if (quotient !== 1 / 0) + return Math.floor(quotient); + } else if (quotient > -1 / 0) + return Math.ceil(quotient); + throw A.wrapException(A.UnsupportedError$("Result of truncating division is " + A.S(quotient) + ": " + A.S(receiver) + " ~/ " + other)); + }, + _shrOtherPositive$1(receiver, other) { + var t1; + if (receiver > 0) + t1 = this._shrBothPositive$1(receiver, other); + else { + t1 = other > 31 ? 31 : other; + t1 = receiver >> t1 >>> 0; + } + return t1; + }, + _shrReceiverPositive$1(receiver, other) { + if (0 > other) + throw A.wrapException(A.argumentErrorValue(other)); + return this._shrBothPositive$1(receiver, other); + }, + _shrBothPositive$1(receiver, other) { + return other > 31 ? 0 : receiver >>> other; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.num); + }, + $isComparable: 1, + $isdouble: 1, + $isnum: 1 + }; + J.JSInt.prototype = { + get$sign(receiver) { + var t1; + if (receiver > 0) + t1 = 1; + else + t1 = receiver < 0 ? -1 : receiver; + return t1; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.int); + }, + $isTrustedGetRuntimeType: 1, + $isint: 1 + }; + J.JSNumNotInt.prototype = { + get$runtimeType(receiver) { + return A.createRuntimeType(type$.double); + }, + $isTrustedGetRuntimeType: 1 + }; + J.JSString.prototype = { + codeUnitAt$1(receiver, index) { + if (index < 0) + throw A.wrapException(A.diagnoseIndexError(receiver, index)); + if (index >= receiver.length) + A.throwExpression(A.diagnoseIndexError(receiver, index)); + return receiver.charCodeAt(index); + }, + allMatches$2(receiver, string, start) { + var t1 = string.length; + if (start > t1) + throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); + return new A._StringAllMatchesIterable(string, receiver, start); + }, + allMatches$1(receiver, string) { + return this.allMatches$2(receiver, string, 0); + }, + matchAsPrefix$2(receiver, string, start) { + var t1, i, _null = null; + if (start < 0 || start > string.length) + throw A.wrapException(A.RangeError$range(start, 0, string.length, _null, _null)); + t1 = receiver.length; + if (start + t1 > string.length) + return _null; + for (i = 0; i < t1; ++i) + if (string.charCodeAt(start + i) !== receiver.charCodeAt(i)) + return _null; + return new A.StringMatch(start, receiver); + }, + $add(receiver, other) { + return receiver + other; + }, + endsWith$1(receiver, other) { + var otherLength = other.length, + t1 = receiver.length; + if (otherLength > t1) + return false; + return other === this.substring$1(receiver, t1 - otherLength); + }, + replaceFirst$2(receiver, from, to) { + A.RangeError_checkValueInInterval(0, 0, receiver.length, "startIndex"); + return A.stringReplaceFirstUnchecked(receiver, from, to, 0); + }, + split$1(receiver, pattern) { + var t1; + if (typeof pattern == "string") + return A._setArrayType(receiver.split(pattern), type$.JSArray_String); + else { + if (pattern instanceof A.JSSyntaxRegExp) { + t1 = pattern._hasCapturesCache; + t1 = !(t1 == null ? pattern._hasCapturesCache = pattern._computeHasCaptures$0() : t1); + } else + t1 = false; + if (t1) + return A._setArrayType(receiver.split(pattern._nativeRegExp), type$.JSArray_String); + else + return this._defaultSplit$1(receiver, pattern); + } + }, + replaceRange$3(receiver, start, end, replacement) { + var e = A.RangeError_checkValidRange(start, end, receiver.length); + return A.stringReplaceRangeUnchecked(receiver, start, e, replacement); + }, + _defaultSplit$1(receiver, pattern) { + var t1, start, $length, match, matchStart, matchEnd, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), start = 0, $length = 1; t1.moveNext$0();) { + match = t1.get$current(t1); + matchStart = match.get$start(match); + matchEnd = match.get$end(match); + $length = matchEnd - matchStart; + if ($length === 0 && start === matchStart) + continue; + result.push(this.substring$2(receiver, start, matchStart)); + start = matchEnd; + } + if (start < receiver.length || $length > 0) + result.push(this.substring$1(receiver, start)); + return result; + }, + startsWith$2(receiver, pattern, index) { + var endIndex; + if (index < 0 || index > receiver.length) + throw A.wrapException(A.RangeError$range(index, 0, receiver.length, null, null)); + if (typeof pattern == "string") { + endIndex = index + pattern.length; + if (endIndex > receiver.length) + return false; + return pattern === receiver.substring(index, endIndex); + } + return J.matchAsPrefix$2$s(pattern, receiver, index) != null; + }, + startsWith$1(receiver, pattern) { + return this.startsWith$2(receiver, pattern, 0); + }, + substring$2(receiver, start, end) { + return receiver.substring(start, A.RangeError_checkValidRange(start, end, receiver.length)); + }, + substring$1(receiver, start) { + return this.substring$2(receiver, start, null); + }, + trim$0(receiver) { + var startIndex, t1, endIndex0, + result = receiver.trim(), + endIndex = result.length; + if (endIndex === 0) + return result; + if (result.charCodeAt(0) === 133) { + startIndex = J.JSString__skipLeadingWhitespace(result, 1); + if (startIndex === endIndex) + return ""; + } else + startIndex = 0; + t1 = endIndex - 1; + endIndex0 = result.charCodeAt(t1) === 133 ? J.JSString__skipTrailingWhitespace(result, t1) : endIndex; + if (startIndex === 0 && endIndex0 === endIndex) + return result; + return result.substring(startIndex, endIndex0); + }, + trimLeft$0(receiver) { + var result = receiver.trimStart(); + if (result.length === 0) + return result; + if (result.charCodeAt(0) !== 133) + return result; + return result.substring(J.JSString__skipLeadingWhitespace(result, 1)); + }, + trimRight$0(receiver) { + var t1, + result = receiver.trimEnd(), + endIndex = result.length; + if (endIndex === 0) + return result; + t1 = endIndex - 1; + if (result.charCodeAt(t1) !== 133) + return result; + return result.substring(0, J.JSString__skipTrailingWhitespace(result, t1)); + }, + $mul(receiver, times) { + var s, result; + if (0 >= times) + return ""; + if (times === 1 || receiver.length === 0) + return receiver; + if (times !== times >>> 0) + throw A.wrapException(B.C_OutOfMemoryError); + for (s = receiver, result = "";;) { + if ((times & 1) === 1) + result = s + result; + times = times >>> 1; + if (times === 0) + break; + s += s; + } + return result; + }, + padLeft$2(receiver, width, padding) { + var delta = width - receiver.length; + if (delta <= 0) + return receiver; + return this.$mul(padding, delta) + receiver; + }, + padRight$1(receiver, width) { + var delta = width - receiver.length; + if (delta <= 0) + return receiver; + return receiver + this.$mul(" ", delta); + }, + indexOf$2(receiver, pattern, start) { + var t1; + if (start < 0 || start > receiver.length) + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); + t1 = receiver.indexOf(pattern, start); + return t1; + }, + indexOf$1(receiver, pattern) { + return this.indexOf$2(receiver, pattern, 0); + }, + lastIndexOf$2(receiver, pattern, start) { + var t1, t2, i; + if (start == null) + start = receiver.length; + else if (start < 0 || start > receiver.length) + throw A.wrapException(A.RangeError$range(start, 0, receiver.length, null, null)); + if (typeof pattern == "string") { + t1 = pattern.length; + t2 = receiver.length; + if (start + t1 > t2) + start = t2 - t1; + return receiver.lastIndexOf(pattern, start); + } + for (t1 = J.getInterceptor$s(pattern), i = start; i >= 0; --i) + if (t1.matchAsPrefix$2(pattern, receiver, i) != null) + return i; + return -1; + }, + lastIndexOf$1(receiver, pattern) { + return this.lastIndexOf$2(receiver, pattern, null); + }, + contains$2(receiver, other, startIndex) { + var t1 = receiver.length; + if (startIndex > t1) + throw A.wrapException(A.RangeError$range(startIndex, 0, t1, null, null)); + return A.stringContainsUnchecked(receiver, other, startIndex); + }, + contains$1(receiver, other) { + return this.contains$2(receiver, other, 0); + }, + compareTo$1(receiver, other) { + var t1; + if (receiver === other) + t1 = 0; + else + t1 = receiver < other ? -1 : 1; + return t1; + }, + toString$0(receiver) { + return receiver; + }, + get$hashCode(receiver) { + var t1, hash, i; + for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { + hash = hash + receiver.charCodeAt(i) & 536870911; + hash = hash + ((hash & 524287) << 10) & 536870911; + hash ^= hash >> 6; + } + hash = hash + ((hash & 67108863) << 3) & 536870911; + hash ^= hash >> 11; + return hash + ((hash & 16383) << 15) & 536870911; + }, + get$runtimeType(receiver) { + return A.createRuntimeType(type$.String); + }, + get$length(receiver) { + return receiver.length; + }, + $isTrustedGetRuntimeType: 1, + $isComparable: 1, + $isString: 1 + }; + A._CastIterableBase.prototype = { + get$iterator(_) { + return new A.CastIterator(J.get$iterator$ax(this.get$_source()), A._instanceType(this)._eval$1("CastIterator<1,2>")); + }, + get$length(_) { + return J.get$length$asx(this.get$_source()); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.get$_source()); + }, + get$isNotEmpty(_) { + return J.get$isNotEmpty$asx(this.get$_source()); + }, + skip$1(_, count) { + var t1 = A._instanceType(this); + return A.CastIterable_CastIterable(J.skip$1$ax(this.get$_source(), count), t1._precomputed1, t1._rest[1]); + }, + take$1(_, count) { + var t1 = A._instanceType(this); + return A.CastIterable_CastIterable(J.take$1$ax(this.get$_source(), count), t1._precomputed1, t1._rest[1]); + }, + elementAt$1(_, index) { + return A._instanceType(this)._rest[1]._as(J.elementAt$1$ax(this.get$_source(), index)); + }, + get$first(_) { + return A._instanceType(this)._rest[1]._as(J.get$first$ax(this.get$_source())); + }, + get$last(_) { + return A._instanceType(this)._rest[1]._as(J.get$last$ax(this.get$_source())); + }, + get$single(_) { + return A._instanceType(this)._rest[1]._as(J.get$single$ax(this.get$_source())); + }, + contains$1(_, other) { + return J.contains$1$asx(this.get$_source(), other); + }, + toString$0(_) { + return J.toString$0$(this.get$_source()); + } + }; + A.CastIterator.prototype = { + moveNext$0() { + return this._source.moveNext$0(); + }, + get$current(_) { + var t1 = this._source; + return this.$ti._rest[1]._as(t1.get$current(t1)); + } + }; + A.CastIterable.prototype = { + get$_source() { + return this._source; + } + }; + A._EfficientLengthCastIterable.prototype = {$isEfficientLengthIterable: 1}; + A._CastListBase.prototype = { + $index(_, index) { + return this.$ti._rest[1]._as(J.$index$asx(this._source, index)); + }, + $indexSet(_, index, value) { + J.$indexSet$ax(this._source, index, this.$ti._precomputed1._as(value)); + }, + set$length(_, $length) { + J.set$length$asx(this._source, $length); + }, + add$1(_, value) { + J.add$1$ax(this._source, this.$ti._precomputed1._as(value)); + }, + addAll$1(_, values) { + var t1 = this.$ti; + J.addAll$1$ax(this._source, A.CastIterable_CastIterable(values, t1._rest[1], t1._precomputed1)); + }, + sort$1(_, compare) { + var t1 = compare == null ? null : new A._CastListBase_sort_closure(this, compare); + J.sort$1$ax(this._source, t1); + }, + getRange$2(_, start, end) { + var t1 = this.$ti; + return A.CastIterable_CastIterable(J.getRange$2$ax(this._source, start, end), t1._precomputed1, t1._rest[1]); + }, + setRange$4(_, start, end, iterable, skipCount) { + var t1 = this.$ti; + J.setRange$4$ax(this._source, start, end, A.CastIterable_CastIterable(iterable, t1._rest[1], t1._precomputed1), skipCount); + }, + removeRange$2(_, start, end) { + J.removeRange$2$ax(this._source, start, end); + }, + fillRange$3(_, start, end, fillValue) { + J.fillRange$3$ax(this._source, start, end, this.$ti._precomputed1._as(fillValue)); + }, + $isEfficientLengthIterable: 1, + $isList: 1 + }; + A._CastListBase_sort_closure.prototype = { + call$2(v1, v2) { + var t1 = this.$this.$ti._rest[1]; + return this.compare.call$2(t1._as(v1), t1._as(v2)); + }, + $signature() { + return this.$this.$ti._eval$1("int(1,1)"); + } + }; + A.CastList.prototype = { + cast$1$0(_, $R) { + return new A.CastList(this._source, this.$ti._eval$1("@<1>")._bind$1($R)._eval$1("CastList<1,2>")); + }, + get$_source() { + return this._source; + } + }; + A.CastSet.prototype = { + add$1(_, value) { + return this._source.add$1(0, this.$ti._precomputed1._as(value)); + }, + addAll$1(_, elements) { + var t1 = this.$ti; + this._source.addAll$1(0, A.CastIterable_CastIterable(elements, t1._rest[1], t1._precomputed1)); + }, + difference$1(other) { + var _this = this; + if (_this._emptySet != null) + return _this._conditionalAdd$2(other, false); + return new A.CastSet(_this._source.difference$1(other), null, _this.$ti); + }, + _conditionalAdd$2(other, otherContains) { + var t3, castElement, + emptySet = this._emptySet, + t1 = this.$ti, + t2 = t1._rest[1], + result = emptySet == null ? A.LinkedHashSet_LinkedHashSet(t2) : emptySet.call$1$0(t2); + for (t2 = this._source, t2 = t2.get$iterator(t2), t3 = other._source, t1 = t1._rest[1]; t2.moveNext$0();) { + castElement = t1._as(t2.get$current(t2)); + if (otherContains === t3.contains$1(0, castElement)) + result.add$1(0, castElement); + } + return result; + }, + toSet$0(_) { + var emptySet = this._emptySet, + t1 = this.$ti._rest[1], + result = emptySet == null ? A.LinkedHashSet_LinkedHashSet(t1) : emptySet.call$1$0(t1); + result.addAll$1(0, this); + return result; + }, + $isEfficientLengthIterable: 1, + $isSet: 1, + get$_source() { + return this._source; + } + }; + A.CastMap.prototype = { + cast$2$0(_, $RK, $RV) { + return new A.CastMap(this._source, this.$ti._eval$1("@<1,2>")._bind$1($RK)._bind$1($RV)._eval$1("CastMap<1,2,3,4>")); + }, + containsKey$1(key) { + return this._source.containsKey$1(key); + }, + $index(_, key) { + return this.$ti._eval$1("4?")._as(this._source.$index(0, key)); + }, + $indexSet(_, key, value) { + var t1 = this.$ti; + this._source.$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value)); + }, + addAll$1(_, other) { + this._source.addAll$1(0, new A.CastMap(other, this.$ti._eval$1("CastMap<3,4,1,2>"))); + }, + remove$1(_, key) { + return this.$ti._eval$1("4?")._as(this._source.remove$1(0, key)); + }, + forEach$1(_, f) { + this._source.forEach$1(0, new A.CastMap_forEach_closure(this, f)); + }, + get$keys(_) { + var t1 = this._source, + t2 = this.$ti; + return A.CastIterable_CastIterable(t1.get$keys(t1), t2._precomputed1, t2._rest[2]); + }, + get$values(_) { + var t1 = this._source, + t2 = this.$ti; + return A.CastIterable_CastIterable(t1.get$values(t1), t2._rest[1], t2._rest[3]); + }, + get$length(_) { + var t1 = this._source; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._source; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._source; + return t1.get$isNotEmpty(t1); + }, + get$entries(_) { + var t1 = this._source; + t1 = t1.get$entries(t1); + return t1.map$1$1(t1, new A.CastMap_entries_closure(this), this.$ti._eval$1("MapEntry<3,4>")); + } + }; + A.CastMap_forEach_closure.prototype = { + call$2(key, value) { + var t1 = this.$this.$ti; + this.f.call$2(t1._rest[2]._as(key), t1._rest[3]._as(value)); + }, + $signature() { + return this.$this.$ti._eval$1("~(1,2)"); + } + }; + A.CastMap_entries_closure.prototype = { + call$1(e) { + var t1 = this.$this.$ti; + return new A.MapEntry(t1._rest[2]._as(e.key), t1._rest[3]._as(e.value), t1._eval$1("MapEntry<3,4>")); + }, + $signature() { + return this.$this.$ti._eval$1("MapEntry<3,4>(MapEntry<1,2>)"); + } + }; + A.LateError.prototype = { + toString$0(_) { + return "LateInitializationError: " + this._message; + } + }; + A.CodeUnits.prototype = { + get$length(_) { + return this._string.length; + }, + $index(_, i) { + return this._string.charCodeAt(i); + } + }; + A.nullFuture_closure.prototype = { + call$0() { + return A.Future_Future$value(null, type$.void); + }, + $signature: 32 + }; + A.SentinelValue.prototype = {}; + A.EfficientLengthIterable.prototype = {}; + A.ListIterable.prototype = { + get$iterator(_) { + var _this = this; + return new A.ListIterator(_this, _this.get$length(_this), A._instanceType(_this)._eval$1("ListIterator")); + }, + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$first(_) { + if (this.get$length(this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.elementAt$1(0, 0); + }, + get$last(_) { + var _this = this; + if (_this.get$length(_this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return _this.elementAt$1(0, _this.get$length(_this) - 1); + }, + get$single(_) { + var _this = this; + if (_this.get$length(_this) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + if (_this.get$length(_this) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + return _this.elementAt$1(0, 0); + }, + contains$1(_, element) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (J.$eq$(_this.elementAt$1(0, i), element)) + return true; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return false; + }, + every$1(_, test) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (!test.call$1(_this.elementAt$1(0, i))) + return false; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return true; + }, + any$1(_, test) { + var i, _this = this, + $length = _this.get$length(_this); + for (i = 0; i < $length; ++i) { + if (test.call$1(_this.elementAt$1(0, i))) + return true; + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return false; + }, + join$1(_, separator) { + var first, t1, i, _this = this, + $length = _this.get$length(_this); + if (separator.length !== 0) { + if ($length === 0) + return ""; + first = A.S(_this.elementAt$1(0, 0)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + for (t1 = first, i = 1; i < $length; ++i) { + t1 = t1 + separator + A.S(_this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + for (i = 0, t1 = ""; i < $length; ++i) { + t1 += A.S(_this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }, + join$0(_) { + return this.join$1(0, ""); + }, + where$1(_, test) { + return this.super$Iterable$where(0, test); + }, + map$1$1(_, toElement, $T) { + return new A.MappedListIterable(this, toElement, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + reduce$1(_, combine) { + var value, i, _this = this, + $length = _this.get$length(_this); + if ($length === 0) + throw A.wrapException(A.IterableElementError_noElement()); + value = _this.elementAt$1(0, 0); + for (i = 1; i < $length; ++i) { + value = combine.call$2(value, _this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return value; + }, + fold$1$2(_, initialValue, combine) { + var value, i, _this = this, + $length = _this.get$length(_this); + for (value = initialValue, i = 0; i < $length; ++i) { + value = combine.call$2(value, _this.elementAt$1(0, i)); + if ($length !== _this.get$length(_this)) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return value; + }, + fold$2(_, initialValue, combine) { + return this.fold$1$2(0, initialValue, combine, type$.dynamic); + }, + skip$1(_, count) { + return A.SubListIterable$(this, count, null, A._instanceType(this)._eval$1("ListIterable.E")); + }, + take$1(_, count) { + return A.SubListIterable$(this, 0, A.checkNotNullable(count, "count", type$.int), A._instanceType(this)._eval$1("ListIterable.E")); + }, + toList$1$growable(_, growable) { + var t1 = A.List_List$_of(this, A._instanceType(this)._eval$1("ListIterable.E")); + return t1; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + toSet$0(_) { + var i, _this = this, + result = A.LinkedHashSet_LinkedHashSet(A._instanceType(_this)._eval$1("ListIterable.E")); + for (i = 0; i < _this.get$length(_this); ++i) + result.add$1(0, _this.elementAt$1(0, i)); + return result; + } + }; + A.SubListIterable.prototype = { + SubListIterable$3(_iterable, _start, _endOrLength, $E) { + var endOrLength, + t1 = this._start; + A.RangeError_checkNotNegative(t1, "start"); + endOrLength = this._endOrLength; + if (endOrLength != null) { + A.RangeError_checkNotNegative(endOrLength, "end"); + if (t1 > endOrLength) + throw A.wrapException(A.RangeError$range(t1, 0, endOrLength, "start", null)); + } + }, + get$_endIndex() { + var $length = J.get$length$asx(this.__internal$_iterable), + endOrLength = this._endOrLength; + if (endOrLength == null || endOrLength > $length) + return $length; + return endOrLength; + }, + get$_startIndex() { + var $length = J.get$length$asx(this.__internal$_iterable), + t1 = this._start; + if (t1 > $length) + return $length; + return t1; + }, + get$length(_) { + var endOrLength, + $length = J.get$length$asx(this.__internal$_iterable), + t1 = this._start; + if (t1 >= $length) + return 0; + endOrLength = this._endOrLength; + if (endOrLength == null || endOrLength >= $length) + return $length - t1; + return endOrLength - t1; + }, + elementAt$1(_, index) { + var _this = this, + realIndex = _this.get$_startIndex() + index; + if (index < 0 || realIndex >= _this.get$_endIndex()) + throw A.wrapException(A.IndexError$withLength(index, _this.get$length(0), _this, null, "index")); + return J.elementAt$1$ax(_this.__internal$_iterable, realIndex); + }, + skip$1(_, count) { + var newStart, endOrLength, _this = this; + A.RangeError_checkNotNegative(count, "count"); + newStart = _this._start + count; + endOrLength = _this._endOrLength; + if (endOrLength != null && newStart >= endOrLength) + return new A.EmptyIterable(_this.$ti._eval$1("EmptyIterable<1>")); + return A.SubListIterable$(_this.__internal$_iterable, newStart, endOrLength, _this.$ti._precomputed1); + }, + take$1(_, count) { + var endOrLength, t1, newEnd, _this = this; + A.RangeError_checkNotNegative(count, "count"); + endOrLength = _this._endOrLength; + t1 = _this._start; + newEnd = t1 + count; + if (endOrLength == null) + return A.SubListIterable$(_this.__internal$_iterable, t1, newEnd, _this.$ti._precomputed1); + else { + if (endOrLength < newEnd) + return _this; + return A.SubListIterable$(_this.__internal$_iterable, t1, newEnd, _this.$ti._precomputed1); + } + }, + toList$1$growable(_, growable) { + var $length, result, i, _this = this, + start = _this._start, + t1 = _this.__internal$_iterable, + t2 = J.getInterceptor$asx(t1), + end = t2.get$length(t1), + endOrLength = _this._endOrLength; + if (endOrLength != null && endOrLength < end) + end = endOrLength; + $length = end - start; + if ($length <= 0) { + t1 = _this.$ti._precomputed1; + return growable ? J.JSArray_JSArray$growable(0, t1) : J.JSArray_JSArray$fixed(0, t1); + } + result = A.List_List$filled($length, t2.elementAt$1(t1, start), growable, _this.$ti._precomputed1); + for (i = 1; i < $length; ++i) { + result[i] = t2.elementAt$1(t1, start + i); + if (t2.get$length(t1) < end) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + return result; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + } + }; + A.ListIterator.prototype = { + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t3, _this = this, + t1 = _this.__internal$_iterable, + t2 = J.getInterceptor$asx(t1), + $length = t2.get$length(t1); + if (_this.__internal$_length !== $length) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + t3 = _this.__internal$_index; + if (t3 >= $length) { + _this.__internal$_current = null; + return false; + } + _this.__internal$_current = t2.elementAt$1(t1, t3); + ++_this.__internal$_index; + return true; + } + }; + A.MappedIterable.prototype = { + get$iterator(_) { + return new A.MappedIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, A._instanceType(this)._eval$1("MappedIterator<1,2>")); + }, + get$length(_) { + return J.get$length$asx(this.__internal$_iterable); + }, + get$isEmpty(_) { + return J.get$isEmpty$asx(this.__internal$_iterable); + }, + get$first(_) { + return this._f.call$1(J.get$first$ax(this.__internal$_iterable)); + }, + get$last(_) { + return this._f.call$1(J.get$last$ax(this.__internal$_iterable)); + }, + get$single(_) { + return this._f.call$1(J.get$single$ax(this.__internal$_iterable)); + }, + elementAt$1(_, index) { + return this._f.call$1(J.elementAt$1$ax(this.__internal$_iterable, index)); + } + }; + A.EfficientLengthMappedIterable.prototype = {$isEfficientLengthIterable: 1}; + A.MappedIterator.prototype = { + moveNext$0() { + var _this = this, + t1 = _this._iterator; + if (t1.moveNext$0()) { + _this.__internal$_current = _this._f.call$1(t1.get$current(t1)); + return true; + } + _this.__internal$_current = null; + return false; + }, + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + } + }; + A.MappedListIterable.prototype = { + get$length(_) { + return J.get$length$asx(this._source); + }, + elementAt$1(_, index) { + return this._f.call$1(J.elementAt$1$ax(this._source, index)); + } + }; + A.WhereIterable.prototype = { + get$iterator(_) { + return new A.WhereIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); + }, + map$1$1(_, toElement, $T) { + return new A.MappedIterable(this, toElement, this.$ti._eval$1("@<1>")._bind$1($T)._eval$1("MappedIterable<1,2>")); + } + }; + A.WhereIterator.prototype = { + moveNext$0() { + var t1, t2; + for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();) + if (t2.call$1(t1.get$current(t1))) + return true; + return false; + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.ExpandIterable.prototype = { + get$iterator(_) { + return new A.ExpandIterator(J.get$iterator$ax(this.__internal$_iterable), this._f, B.C_EmptyIterator, this.$ti._eval$1("ExpandIterator<1,2>")); + } + }; + A.ExpandIterator.prototype = { + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + }, + moveNext$0() { + var t2, t3, _this = this, + t1 = _this._currentExpansion; + if (t1 == null) + return false; + for (t2 = _this._iterator, t3 = _this._f; !t1.moveNext$0();) { + _this.__internal$_current = null; + if (t2.moveNext$0()) { + _this._currentExpansion = null; + t1 = J.get$iterator$ax(t3.call$1(t2.get$current(t2))); + _this._currentExpansion = t1; + } else + return false; + } + t1 = _this._currentExpansion; + _this.__internal$_current = t1.get$current(t1); + return true; + } + }; + A.TakeIterable.prototype = { + get$iterator(_) { + var t1 = this.__internal$_iterable; + return new A.TakeIterator(t1.get$iterator(t1), this._takeCount, A._instanceType(this)._eval$1("TakeIterator<1>")); + } + }; + A.EfficientLengthTakeIterable.prototype = { + get$length(_) { + var t1 = this.__internal$_iterable, + iterableLength = t1.get$length(t1); + t1 = this._takeCount; + if (iterableLength > t1) + return t1; + return iterableLength; + }, + $isEfficientLengthIterable: 1 + }; + A.TakeIterator.prototype = { + moveNext$0() { + if (--this._remaining >= 0) + return this._iterator.moveNext$0(); + this._remaining = -1; + return false; + }, + get$current(_) { + var t1; + if (this._remaining < 0) { + this.$ti._precomputed1._as(null); + return null; + } + t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.SkipIterable.prototype = { + skip$1(_, count) { + A.ArgumentError_checkNotNull(count, "count"); + A.RangeError_checkNotNegative(count, "count"); + return new A.SkipIterable(this.__internal$_iterable, this._skipCount + count, A._instanceType(this)._eval$1("SkipIterable<1>")); + }, + get$iterator(_) { + var t1 = this.__internal$_iterable; + return new A.SkipIterator(t1.get$iterator(t1), this._skipCount); + } + }; + A.EfficientLengthSkipIterable.prototype = { + get$length(_) { + var t1 = this.__internal$_iterable, + $length = t1.get$length(t1) - this._skipCount; + if ($length >= 0) + return $length; + return 0; + }, + skip$1(_, count) { + A.ArgumentError_checkNotNull(count, "count"); + A.RangeError_checkNotNegative(count, "count"); + return new A.EfficientLengthSkipIterable(this.__internal$_iterable, this._skipCount + count, this.$ti); + }, + $isEfficientLengthIterable: 1 + }; + A.SkipIterator.prototype = { + moveNext$0() { + var t1, i; + for (t1 = this._iterator, i = 0; i < this._skipCount; ++i) + t1.moveNext$0(); + this._skipCount = 0; + return t1.moveNext$0(); + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.SkipWhileIterable.prototype = { + get$iterator(_) { + return new A.SkipWhileIterator(J.get$iterator$ax(this.__internal$_iterable), this._f); + } + }; + A.SkipWhileIterator.prototype = { + moveNext$0() { + var t1, t2, _this = this; + if (!_this._hasSkipped) { + _this._hasSkipped = true; + for (t1 = _this._iterator, t2 = _this._f; t1.moveNext$0();) + if (!t2.call$1(t1.get$current(t1))) + return true; + } + return _this._iterator.moveNext$0(); + }, + get$current(_) { + var t1 = this._iterator; + return t1.get$current(t1); + } + }; + A.EmptyIterable.prototype = { + get$iterator(_) { + return B.C_EmptyIterator; + }, + get$isEmpty(_) { + return true; + }, + get$length(_) { + return 0; + }, + get$first(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$last(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + get$single(_) { + throw A.wrapException(A.IterableElementError_noElement()); + }, + elementAt$1(_, index) { + throw A.wrapException(A.RangeError$range(index, 0, 0, "index", null)); + }, + contains$1(_, element) { + return false; + }, + every$1(_, test) { + return true; + }, + any$1(_, test) { + return false; + }, + join$1(_, separator) { + return ""; + }, + where$1(_, test) { + return this; + }, + map$1$1(_, toElement, $T) { + return new A.EmptyIterable($T._eval$1("EmptyIterable<0>")); + }, + skip$1(_, count) { + A.RangeError_checkNotNegative(count, "count"); + return this; + }, + take$1(_, count) { + A.RangeError_checkNotNegative(count, "count"); + return this; + }, + toList$1$growable(_, growable) { + var t1 = J.JSArray_JSArray$growable(0, this.$ti._precomputed1); + return t1; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet(this.$ti._precomputed1); + } + }; + A.EmptyIterator.prototype = { + moveNext$0() { + return false; + }, + get$current(_) { + throw A.wrapException(A.IterableElementError_noElement()); + } + }; + A.FollowedByIterable.prototype = { + get$iterator(_) { + return new A.FollowedByIterator(J.get$iterator$ax(this.__internal$_first), this._second); + }, + get$length(_) { + var t1 = this._second; + return J.get$length$asx(this.__internal$_first) + t1.get$length(t1); + }, + get$isEmpty(_) { + var t1; + if (J.get$isEmpty$asx(this.__internal$_first)) { + t1 = this._second; + t1 = t1.get$isEmpty(t1); + } else + t1 = false; + return t1; + }, + get$isNotEmpty(_) { + var t1; + if (!J.get$isNotEmpty$asx(this.__internal$_first)) { + t1 = this._second; + t1 = t1.get$isNotEmpty(t1); + } else + t1 = true; + return t1; + }, + contains$1(_, value) { + var t1; + if (!J.contains$1$asx(this.__internal$_first, value)) { + t1 = this._second; + t1 = t1.contains$1(t1, value); + } else + t1 = true; + return t1; + }, + get$first(_) { + var t1, + iterator = J.get$iterator$ax(this.__internal$_first); + if (iterator.moveNext$0()) + return iterator.get$current(iterator); + t1 = this._second; + return t1.get$first(t1); + }, + get$last(_) { + var last, + t1 = this._second, + iterator = t1.get$iterator(t1); + if (iterator.moveNext$0()) { + last = iterator.get$current(iterator); + while (iterator.moveNext$0()) + last = iterator.get$current(iterator); + return last; + } + return J.get$last$ax(this.__internal$_first); + } + }; + A.EfficientLengthFollowedByIterable.prototype = { + elementAt$1(_, index) { + var t1 = this.__internal$_first, + t2 = J.getInterceptor$asx(t1), + firstLength = t2.get$length(t1); + if (index < firstLength) + return t2.elementAt$1(t1, index); + t1 = this._second; + return t1.elementAt$1(t1, index - firstLength); + }, + get$first(_) { + var t1 = this.__internal$_first, + t2 = J.getInterceptor$asx(t1); + if (t2.get$isNotEmpty(t1)) + return t2.get$first(t1); + t1 = this._second; + return t1.get$first(t1); + }, + get$last(_) { + var t1 = this._second; + if (t1.get$isNotEmpty(t1)) + return t1.get$last(t1); + return J.get$last$ax(this.__internal$_first); + }, + $isEfficientLengthIterable: 1 + }; + A.FollowedByIterator.prototype = { + moveNext$0() { + var t1, _this = this; + if (_this._currentIterator.moveNext$0()) + return true; + t1 = _this._nextIterable; + if (t1 != null) { + t1 = t1.get$iterator(t1); + _this._currentIterator = t1; + _this._nextIterable = null; + return t1.moveNext$0(); + } + return false; + }, + get$current(_) { + var t1 = this._currentIterator; + return t1.get$current(t1); + } + }; + A.WhereTypeIterable.prototype = { + get$iterator(_) { + return new A.WhereTypeIterator(J.get$iterator$ax(this._source), this.$ti._eval$1("WhereTypeIterator<1>")); + } + }; + A.WhereTypeIterator.prototype = { + moveNext$0() { + var t1, t2; + for (t1 = this._source, t2 = this.$ti._precomputed1; t1.moveNext$0();) + if (t2._is(t1.get$current(t1))) + return true; + return false; + }, + get$current(_) { + var t1 = this._source; + return this.$ti._precomputed1._as(t1.get$current(t1)); + } + }; + A.NonNullsIterable.prototype = { + get$_firstNonNull() { + var t1, element; + for (t1 = J.get$iterator$ax(this._source); t1.moveNext$0();) { + element = t1.get$current(t1); + if (element != null) + return element; + } + return null; + }, + get$isEmpty(_) { + return this.get$_firstNonNull() == null; + }, + get$isNotEmpty(_) { + return this.get$_firstNonNull() != null; + }, + get$first(_) { + var t1 = this.get$_firstNonNull(); + return t1 == null ? A.throwExpression(A.IterableElementError_noElement()) : t1; + }, + get$iterator(_) { + return new A.NonNullsIterator(J.get$iterator$ax(this._source)); + } + }; + A.NonNullsIterator.prototype = { + moveNext$0() { + var t1, next; + this.__internal$_current = null; + for (t1 = this._source; t1.moveNext$0();) { + next = t1.get$current(t1); + if (next != null) { + this.__internal$_current = next; + return true; + } + } + return false; + }, + get$current(_) { + var t1 = this.__internal$_current; + return t1 == null ? A.throwExpression(A.IterableElementError_noElement()) : t1; + } + }; + A.FixedLengthListMixin.prototype = { + set$length(receiver, newLength) { + throw A.wrapException(A.UnsupportedError$("Cannot change the length of a fixed-length list")); + }, + add$1(receiver, value) { + throw A.wrapException(A.UnsupportedError$("Cannot add to a fixed-length list")); + }, + addAll$1(receiver, iterable) { + throw A.wrapException(A.UnsupportedError$("Cannot add to a fixed-length list")); + }, + removeRange$2(receiver, start, end) { + throw A.wrapException(A.UnsupportedError$("Cannot remove from a fixed-length list")); + } + }; + A.UnmodifiableListMixin.prototype = { + $indexSet(_, index, value) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + set$length(_, newLength) { + throw A.wrapException(A.UnsupportedError$("Cannot change the length of an unmodifiable list")); + }, + add$1(_, value) { + throw A.wrapException(A.UnsupportedError$("Cannot add to an unmodifiable list")); + }, + addAll$1(_, iterable) { + throw A.wrapException(A.UnsupportedError$("Cannot add to an unmodifiable list")); + }, + sort$1(_, compare) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + setRange$4(_, start, end, iterable, skipCount) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + }, + removeRange$2(_, start, end) { + throw A.wrapException(A.UnsupportedError$("Cannot remove from an unmodifiable list")); + }, + fillRange$3(_, start, end, fillValue) { + throw A.wrapException(A.UnsupportedError$("Cannot modify an unmodifiable list")); + } + }; + A.UnmodifiableListBase.prototype = {}; + A.ReversedListIterable.prototype = { + get$length(_) { + return J.get$length$asx(this._source); + }, + elementAt$1(_, index) { + var t1 = this._source, + t2 = J.getInterceptor$asx(t1); + return t2.elementAt$1(t1, t2.get$length(t1) - 1 - index); + } + }; + A.Symbol.prototype = { + get$hashCode(_) { + var hash = this._hashCode; + if (hash != null) + return hash; + hash = 664597 * B.JSString_methods.get$hashCode(this.__internal$_name) & 536870911; + this._hashCode = hash; + return hash; + }, + toString$0(_) { + return 'Symbol("' + this.__internal$_name + '")'; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Symbol && this.__internal$_name === other.__internal$_name; + }, + $isSymbol0: 1 + }; + A.__CastListBase__CastIterableBase_ListMixin.prototype = {}; + A._Record_1.prototype = {$recipe: "+(1)", $shape: 1}; + A._Record_2.prototype = {$recipe: "+(1,2)", $shape: 2}; + A._Record_2_forImport.prototype = {$recipe: "+forImport(1,2)", $shape: 3}; + A._Record_2_imports_modules.prototype = {$recipe: "+imports,modules(1,2)", $shape: 5}; + A._Record_2_loadedUrls_stylesheet.prototype = {$recipe: "+loadedUrls,stylesheet(1,2)", $shape: 6}; + A._Record_2_sourceMap.prototype = {$recipe: "+sourceMap(1,2)", $shape: 4}; + A._Record_3.prototype = {$recipe: "+(1,2,3)", $shape: 7}; + A._Record_3_deprecation_message_span.prototype = { + get$message(_) { + return this._1; + }, + $recipe: "+deprecation,message,span(1,2,3)", + $shape: 11 + }; + A._Record_3_forImport.prototype = {$recipe: "+forImport(1,2,3)", $shape: 8}; + A._Record_3_importer_isDependency.prototype = {$recipe: "+importer,isDependency(1,2,3)", $shape: 10}; + A._Record_3_originalUrl.prototype = {$recipe: "+originalUrl(1,2,3)", $shape: 9}; + A._Record_5_named_namedNodes_positional_positionalNodes_separator.prototype = {$recipe: "+named,namedNodes,positional,positionalNodes,separator(1,2,3,4,5)", $shape: 13}; + A.ConstantMapView.prototype = {}; + A.ConstantMap.prototype = { + cast$2$0(_, $RK, $RV) { + var t1 = A._instanceType(this); + return A.Map_castFrom(this, t1._precomputed1, t1._rest[1], $RK, $RV); + }, + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$isNotEmpty(_) { + return this.get$length(this) !== 0; + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + $indexSet(_, key, value) { + A.ConstantMap__throwUnmodifiable(); + }, + remove$1(_, key) { + A.ConstantMap__throwUnmodifiable(); + }, + addAll$1(_, other) { + A.ConstantMap__throwUnmodifiable(); + }, + get$entries(_) { + return new A._SyncStarIterable(this.entries$body$ConstantMap(0), A._instanceType(this)._eval$1("_SyncStarIterable>")); + }, + entries$body$ConstantMap($async$_) { + var $async$self = this; + return function() { + var _ = $async$_; + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], t1, t2, key; + return function $async$get$entries($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.get$keys($async$self), t1 = t1.get$iterator(t1), t2 = A._instanceType($async$self)._eval$1("MapEntry<1,2>"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + key = t1.get$current(t1); + $async$goto = 4; + return $async$iterator._async$_current = new A.MapEntry(key, $async$self.$index(0, key), t2), 1; + case 4: + // after yield + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + }, + $isMap: 1 + }; + A.ConstantStringMap.prototype = { + get$length(_) { + return this._values.length; + }, + get$_keys() { + var keys = this.$keys; + if (keys == null) { + keys = Object.keys(this._jsIndex); + this.$keys = keys; + } + return keys; + }, + containsKey$1(key) { + if (typeof key != "string") + return false; + if ("__proto__" === key) + return false; + return this._jsIndex.hasOwnProperty(key); + }, + $index(_, key) { + if (!this.containsKey$1(key)) + return null; + return this._values[this._jsIndex[key]]; + }, + forEach$1(_, f) { + var t1, i, + keys = this.get$_keys(), + values = this._values; + for (t1 = keys.length, i = 0; i < t1; ++i) + f.call$2(keys[i], values[i]); + }, + get$keys(_) { + return new A._KeysOrValues(this.get$_keys(), this.$ti._eval$1("_KeysOrValues<1>")); + }, + get$values(_) { + return new A._KeysOrValues(this._values, this.$ti._eval$1("_KeysOrValues<2>")); + } + }; + A._KeysOrValues.prototype = { + get$length(_) { + return this._elements.length; + }, + get$isEmpty(_) { + return 0 === this._elements.length; + }, + get$isNotEmpty(_) { + return 0 !== this._elements.length; + }, + get$iterator(_) { + var t1 = this._elements; + return new A._KeysOrValuesOrElementsIterator(t1, t1.length, this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); + } + }; + A._KeysOrValuesOrElementsIterator.prototype = { + get$current(_) { + var t1 = this.__js_helper$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + t1 = _this.__js_helper$_index; + if (t1 >= _this.__js_helper$_length) { + _this.__js_helper$_current = null; + return false; + } + _this.__js_helper$_current = _this._elements[t1]; + _this.__js_helper$_index = t1 + 1; + return true; + } + }; + A.ConstantSet.prototype = { + add$1(_, value) { + A.ConstantSet__throwUnmodifiable(); + }, + addAll$1(_, elements) { + A.ConstantSet__throwUnmodifiable(); + }, + remove$1(_, value) { + A.ConstantSet__throwUnmodifiable(); + } + }; + A.ConstantStringSet.prototype = { + get$length(_) { + return this.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this.__js_helper$_length !== 0; + }, + get$iterator(_) { + var t1, _this = this, + keys = _this.$keys; + if (keys == null) { + keys = Object.keys(_this._jsIndex); + _this.$keys = keys; + } + t1 = keys; + return new A._KeysOrValuesOrElementsIterator(t1, t1.length, _this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); + }, + contains$1(_, key) { + if (typeof key != "string") + return false; + if ("__proto__" === key) + return false; + return this._jsIndex.hasOwnProperty(key); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$of(this, this.$ti._precomputed1); + } + }; + A.GeneralConstantSet.prototype = { + get$length(_) { + return this._elements.length; + }, + get$isEmpty(_) { + return this._elements.length === 0; + }, + get$isNotEmpty(_) { + return this._elements.length !== 0; + }, + get$iterator(_) { + var t1 = this._elements; + return new A._KeysOrValuesOrElementsIterator(t1, t1.length, this.$ti._eval$1("_KeysOrValuesOrElementsIterator<1>")); + }, + _getMap$0() { + var t1, t2, _i, key, _this = this, + backingMap = _this.$map; + if (backingMap == null) { + backingMap = new A.JsConstantLinkedHashMap(_this.$ti._eval$1("JsConstantLinkedHashMap<1,1>")); + for (t1 = _this._elements, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + key = t1[_i]; + backingMap.$indexSet(0, key, key); + } + _this.$map = backingMap; + } + return backingMap; + }, + contains$1(_, key) { + return this._getMap$0().containsKey$1(key); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$of(this, this.$ti._precomputed1); + } + }; + A.Instantiation.prototype = { + Instantiation$1(_genericClosure) { + if (false) + A.instantiatedGenericFunctionType(0, 0); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Instantiation1 && this._genericClosure.$eq(0, other._genericClosure) && A.getRuntimeTypeOfClosure(this) === A.getRuntimeTypeOfClosure(other); + }, + get$hashCode(_) { + return A.Object_hash(this._genericClosure, A.getRuntimeTypeOfClosure(this), B.C_SentinelValue, B.C_SentinelValue); + }, + toString$0(_) { + var t1 = B.JSArray_methods.join$1([A.createRuntimeType(this.$ti._precomputed1)], ", "); + return this._genericClosure.toString$0(0) + " with " + ("<" + t1 + ">"); + } + }; + A.Instantiation1.prototype = { + call$0() { + return this._genericClosure.call$1$0(this.$ti._rest[0]); + }, + call$2(a0, a1) { + return this._genericClosure.call$1$2(a0, a1, this.$ti._rest[0]); + }, + call$3(a0, a1, a2) { + return this._genericClosure.call$1$3(a0, a1, a2, this.$ti._rest[0]); + }, + call$4(a0, a1, a2, a3) { + return this._genericClosure.call$1$4(a0, a1, a2, a3, this.$ti._rest[0]); + }, + $signature() { + return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.$ti); + } + }; + A.JSInvocationMirror.prototype = { + get$memberName() { + var t1 = this.__js_helper$_memberName; + if (t1 instanceof A.Symbol) + return t1; + return this.__js_helper$_memberName = new A.Symbol(t1); + }, + get$positionalArguments() { + var t1, t2, argumentCount, list, index, _this = this; + if (_this.__js_helper$_kind === 1) + return B.List_empty6; + t1 = _this._arguments; + t2 = J.getInterceptor$asx(t1); + argumentCount = t2.get$length(t1) - J.get$length$asx(_this._namedArgumentNames) - _this._typeArgumentCount; + if (argumentCount === 0) + return B.List_empty6; + list = []; + for (index = 0; index < argumentCount; ++index) + list.push(t2.$index(t1, index)); + list.$flags = 3; + return list; + }, + get$namedArguments() { + var t1, t2, namedArgumentCount, t3, t4, namedArgumentsStartIndex, map, i, _this = this; + if (_this.__js_helper$_kind !== 0) + return B.Map_empty2; + t1 = _this._namedArgumentNames; + t2 = J.getInterceptor$asx(t1); + namedArgumentCount = t2.get$length(t1); + t3 = _this._arguments; + t4 = J.getInterceptor$asx(t3); + namedArgumentsStartIndex = t4.get$length(t3) - namedArgumentCount - _this._typeArgumentCount; + if (namedArgumentCount === 0) + return B.Map_empty2; + map = new A.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic); + for (i = 0; i < namedArgumentCount; ++i) + map.$indexSet(0, new A.Symbol(t2.$index(t1, i)), t4.$index(t3, namedArgumentsStartIndex + i)); + return new A.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic); + } + }; + A.Primitives_functionNoSuchMethod_closure.prototype = { + call$2($name, argument) { + var t1 = this._box_0; + t1.names = t1.names + "$" + $name; + this.namedArgumentList.push($name); + this.$arguments.push(argument); + ++t1.argumentCount; + }, + $signature: 140 + }; + A.SafeToStringHook.prototype = {}; + A.TypeErrorDecoder.prototype = { + matchTypeError$1(message) { + var result, t1, _this = this, + match = new RegExp(_this._pattern).exec(message); + if (match == null) + return null; + result = Object.create(null); + t1 = _this._arguments; + if (t1 !== -1) + result.arguments = match[t1 + 1]; + t1 = _this._argumentsExpr; + if (t1 !== -1) + result.argumentsExpr = match[t1 + 1]; + t1 = _this._expr; + if (t1 !== -1) + result.expr = match[t1 + 1]; + t1 = _this._method; + if (t1 !== -1) + result.method = match[t1 + 1]; + t1 = _this._receiver; + if (t1 !== -1) + result.receiver = match[t1 + 1]; + return result; + } + }; + A.NullError.prototype = { + toString$0(_) { + return "Null check operator used on a null value"; + } + }; + A.JsNoSuchMethodError.prototype = { + toString$0(_) { + var t2, _this = this, + _s38_ = "NoSuchMethodError: method not found: '", + t1 = _this._method; + if (t1 == null) + return "NoSuchMethodError: " + _this.__js_helper$_message; + t2 = _this._receiver; + if (t2 == null) + return _s38_ + t1 + "' (" + _this.__js_helper$_message + ")"; + return _s38_ + t1 + "' on '" + t2 + "' (" + _this.__js_helper$_message + ")"; + } + }; + A.UnknownJsTypeError.prototype = { + toString$0(_) { + var t1 = this.__js_helper$_message; + return t1.length === 0 ? "Error" : "Error: " + t1; + } + }; + A.NullThrownFromJavaScriptException.prototype = { + toString$0(_) { + return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)"; + }, + $isException: 1 + }; + A.ExceptionAndStackTrace.prototype = {}; + A._StackTrace.prototype = { + toString$0(_) { + var trace, + t1 = this._trace; + if (t1 != null) + return t1; + t1 = this._exception; + trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; + return this._trace = trace == null ? "" : trace; + }, + $isStackTrace: 1 + }; + A.Closure.prototype = { + toString$0(_) { + var $constructor = this.constructor, + $name = $constructor == null ? null : $constructor.name; + return "Closure '" + A.unminifyOrTag($name == null ? "unknown" : $name) + "'"; + }, + $isFunction: 1, + get$$call() { + return this; + }, + "call*": "call$1", + $requiredArgCount: 1, + $defaultValues: null + }; + A.Closure0Args.prototype = {"call*": "call$0", $requiredArgCount: 0}; + A.Closure2Args.prototype = {"call*": "call$2", $requiredArgCount: 2}; + A.TearOffClosure.prototype = {}; + A.StaticClosure.prototype = { + toString$0(_) { + var $name = this.$static_name; + if ($name == null) + return "Closure of unknown static method"; + return "Closure '" + A.unminifyOrTag($name) + "'"; + } + }; + A.BoundClosure.prototype = { + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + if (!(other instanceof A.BoundClosure)) + return false; + return this.$_target === other.$_target && this._receiver === other._receiver; + }, + get$hashCode(_) { + return (A.objectHashCode(this._receiver) ^ A.Primitives_objectHashCode(this.$_target)) >>> 0; + }, + toString$0(_) { + return "Closure '" + this.$_name + "' of " + ("Instance of '" + A.Primitives_objectTypeName(this._receiver) + "'"); + } + }; + A.RuntimeError.prototype = { + toString$0(_) { + return "RuntimeError: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A._Required.prototype = {}; + A.JsLinkedHashMap.prototype = { + get$length(_) { + return this.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this.__js_helper$_length !== 0; + }, + get$keys(_) { + return new A.LinkedHashMapKeysIterable(this, A._instanceType(this)._eval$1("LinkedHashMapKeysIterable<1>")); + }, + get$values(_) { + return new A.LinkedHashMapValuesIterable(this, A._instanceType(this)._eval$1("LinkedHashMapValuesIterable<2>")); + }, + get$entries(_) { + return new A.LinkedHashMapEntriesIterable(this, A._instanceType(this)._eval$1("LinkedHashMapEntriesIterable<1,2>")); + }, + containsKey$1(key) { + var strings, nums; + if (typeof key == "string") { + strings = this._strings; + if (strings == null) + return false; + return strings[key] != null; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this._nums; + if (nums == null) + return false; + return nums[key] != null; + } else + return this.internalContainsKey$1(key); + }, + internalContainsKey$1(key) { + var rest = this.__js_helper$_rest; + if (rest == null) + return false; + return this.internalFindBucketIndex$2(rest[this.internalComputeHashCode$1(key)], key) >= 0; + }, + addAll$1(_, other) { + other.forEach$1(0, new A.JsLinkedHashMap_addAll_closure(this)); + }, + $index(_, key) { + var strings, cell, t1, nums, _null = null; + if (typeof key == "string") { + strings = this._strings; + if (strings == null) + return _null; + cell = strings[key]; + t1 = cell == null ? _null : cell.hashMapCellValue; + return t1; + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = this._nums; + if (nums == null) + return _null; + cell = nums[key]; + t1 = cell == null ? _null : cell.hashMapCellValue; + return t1; + } else + return this.internalGet$1(key); + }, + internalGet$1(key) { + var bucket, index, + rest = this.__js_helper$_rest; + if (rest == null) + return null; + bucket = rest[this.internalComputeHashCode$1(key)]; + index = this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return null; + return bucket[index].hashMapCellValue; + }, + $indexSet(_, key, value) { + var strings, nums, _this = this; + if (typeof key == "string") { + strings = _this._strings; + _this._addHashTableEntry$3(strings == null ? _this._strings = _this._newHashTable$0() : strings, key, value); + } else if (typeof key == "number" && (key & 0x3fffffff) === key) { + nums = _this._nums; + _this._addHashTableEntry$3(nums == null ? _this._nums = _this._newHashTable$0() : nums, key, value); + } else + _this.internalSet$2(key, value); + }, + internalSet$2(key, value) { + var hash, bucket, index, _this = this, + rest = _this.__js_helper$_rest; + if (rest == null) + rest = _this.__js_helper$_rest = _this._newHashTable$0(); + hash = _this.internalComputeHashCode$1(key); + bucket = rest[hash]; + if (bucket == null) + rest[hash] = [_this._newLinkedCell$2(key, value)]; + else { + index = _this.internalFindBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index].hashMapCellValue = value; + else + bucket.push(_this._newLinkedCell$2(key, value)); + } + }, + putIfAbsent$2(key, ifAbsent) { + var t1, value, _this = this; + if (_this.containsKey$1(key)) { + t1 = _this.$index(0, key); + return t1 == null ? A._instanceType(_this)._rest[1]._as(t1) : t1; + } + value = ifAbsent.call$0(); + _this.$indexSet(0, key, value); + return value; + }, + remove$1(_, key) { + var _this = this; + if (typeof key == "string") + return _this.__js_helper$_removeHashTableEntry$2(_this._strings, key); + else if (typeof key == "number" && (key & 0x3fffffff) === key) + return _this.__js_helper$_removeHashTableEntry$2(_this._nums, key); + else + return _this.internalRemove$1(key); + }, + internalRemove$1(key) { + var hash, bucket, index, cell, _this = this, + rest = _this.__js_helper$_rest; + if (rest == null) + return null; + hash = _this.internalComputeHashCode$1(key); + bucket = rest[hash]; + index = _this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return null; + cell = bucket.splice(index, 1)[0]; + _this.__js_helper$_unlinkCell$1(cell); + if (bucket.length === 0) + delete rest[hash]; + return cell.hashMapCellValue; + }, + clear$0(_) { + var _this = this; + if (_this.__js_helper$_length > 0) { + _this._strings = _this._nums = _this.__js_helper$_rest = _this._first = _this._last = null; + _this.__js_helper$_length = 0; + _this._modified$0(); + } + }, + forEach$1(_, action) { + var _this = this, + cell = _this._first, + modifications = _this._modifications; + while (cell != null) { + action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); + if (modifications !== _this._modifications) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + cell = cell._next; + } + }, + _addHashTableEntry$3(table, key, value) { + var cell = table[key]; + if (cell == null) + table[key] = this._newLinkedCell$2(key, value); + else + cell.hashMapCellValue = value; + }, + __js_helper$_removeHashTableEntry$2(table, key) { + var cell; + if (table == null) + return null; + cell = table[key]; + if (cell == null) + return null; + this.__js_helper$_unlinkCell$1(cell); + delete table[key]; + return cell.hashMapCellValue; + }, + _modified$0() { + this._modifications = this._modifications + 1 & 1073741823; + }, + _newLinkedCell$2(key, value) { + var t1, _this = this, + cell = new A.LinkedHashMapCell(key, value); + if (_this._first == null) + _this._first = _this._last = cell; + else { + t1 = _this._last; + t1.toString; + cell._previous = t1; + _this._last = t1._next = cell; + } + ++_this.__js_helper$_length; + _this._modified$0(); + return cell; + }, + __js_helper$_unlinkCell$1(cell) { + var _this = this, + previous = cell._previous, + next = cell._next; + if (previous == null) + _this._first = next; + else + previous._next = next; + if (next == null) + _this._last = previous; + else + next._previous = previous; + --_this.__js_helper$_length; + _this._modified$0(); + }, + internalComputeHashCode$1(key) { + return J.get$hashCode$(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i].hashMapCellKey, key)) + return i; + return -1; + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + _newHashTable$0() { + var table = Object.create(null); + table[""] = table; + delete table[""]; + return table; + } + }; + A.JsLinkedHashMap_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(1,2)"); + } + }; + A.LinkedHashMapCell.prototype = {}; + A.LinkedHashMapKeysIterable.prototype = { + get$length(_) { + return this.__js_helper$_map.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_map.__js_helper$_length === 0; + }, + get$iterator(_) { + var t1 = this.__js_helper$_map; + return new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first); + }, + contains$1(_, element) { + return this.__js_helper$_map.containsKey$1(element); + } + }; + A.LinkedHashMapKeyIterator.prototype = { + get$current(_) { + return this.__js_helper$_current; + }, + moveNext$0() { + var cell, _this = this, + t1 = _this.__js_helper$_map; + if (_this._modifications !== t1._modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + cell = _this._cell; + if (cell == null) { + _this.__js_helper$_current = null; + return false; + } else { + _this.__js_helper$_current = cell.hashMapCellKey; + _this._cell = cell._next; + return true; + } + } + }; + A.LinkedHashMapValuesIterable.prototype = { + get$length(_) { + return this.__js_helper$_map.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_map.__js_helper$_length === 0; + }, + get$iterator(_) { + var t1 = this.__js_helper$_map; + return new A.LinkedHashMapValueIterator(t1, t1._modifications, t1._first); + } + }; + A.LinkedHashMapValueIterator.prototype = { + get$current(_) { + return this.__js_helper$_current; + }, + moveNext$0() { + var cell, _this = this, + t1 = _this.__js_helper$_map; + if (_this._modifications !== t1._modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + cell = _this._cell; + if (cell == null) { + _this.__js_helper$_current = null; + return false; + } else { + _this.__js_helper$_current = cell.hashMapCellValue; + _this._cell = cell._next; + return true; + } + } + }; + A.LinkedHashMapEntriesIterable.prototype = { + get$length(_) { + return this.__js_helper$_map.__js_helper$_length; + }, + get$isEmpty(_) { + return this.__js_helper$_map.__js_helper$_length === 0; + }, + get$iterator(_) { + var t1 = this.__js_helper$_map; + return new A.LinkedHashMapEntryIterator(t1, t1._modifications, t1._first, this.$ti._eval$1("LinkedHashMapEntryIterator<1,2>")); + } + }; + A.LinkedHashMapEntryIterator.prototype = { + get$current(_) { + var t1 = this.__js_helper$_current; + t1.toString; + return t1; + }, + moveNext$0() { + var cell, _this = this, + t1 = _this.__js_helper$_map; + if (_this._modifications !== t1._modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + cell = _this._cell; + if (cell == null) { + _this.__js_helper$_current = null; + return false; + } else { + _this.__js_helper$_current = new A.MapEntry(cell.hashMapCellKey, cell.hashMapCellValue, _this.$ti._eval$1("MapEntry<1,2>")); + _this._cell = cell._next; + return true; + } + } + }; + A.JsIdentityLinkedHashMap.prototype = { + internalComputeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) { + t1 = bucket[i].hashMapCellKey; + if (t1 == null ? key == null : t1 === key) + return i; + } + return -1; + } + }; + A.JsConstantLinkedHashMap.prototype = { + internalComputeHashCode$1(key) { + return A.constantHashCode(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i].hashMapCellKey, key)) + return i; + return -1; + } + }; + A.initHooks_closure.prototype = { + call$1(o) { + return this.getTag(o); + }, + $signature: 108 + }; + A.initHooks_closure0.prototype = { + call$2(o, tag) { + return this.getUnknownTag(o, tag); + }, + $signature: 339 + }; + A.initHooks_closure1.prototype = { + call$1(tag) { + return this.prototypeForTag(tag); + }, + $signature: 186 + }; + A._Record.prototype = { + toString$0(_) { + return this._toString$1(false); + }, + _toString$1(safe) { + var t2, separator, i, key, value, + keys = this._fieldKeys$0(), + values = this._getFieldValues$0(), + t1 = (safe ? "Record " : "") + "("; + for (t2 = keys.length, separator = "", i = 0; i < t2; ++i, separator = ", ") { + t1 += separator; + key = keys[i]; + if (typeof key == "string") + t1 = t1 + key + ": "; + value = values[i]; + t1 = safe ? t1 + A.Primitives_safeToString(value) : t1 + A.S(value); + } + t1 += ")"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _fieldKeys$0() { + var t1, + shapeTag = this.$shape; + while ($._Record__computedFieldKeys.length <= shapeTag) + $._Record__computedFieldKeys.push(null); + t1 = $._Record__computedFieldKeys[shapeTag]; + if (t1 == null) { + t1 = this._computeFieldKeys$0(); + $._Record__computedFieldKeys[shapeTag] = t1; + } + return t1; + }, + _computeFieldKeys$0() { + var i, names, last, + recipe = this.$recipe, + position = recipe.indexOf("("), + joinedNames = recipe.substring(1, position), + fields = recipe.substring(position), + arity = fields === "()" ? 0 : fields.replace(/[^,]/g, "").length + 1, + t1 = type$.Object, + result = J.JSArray_JSArray$allocateGrowable(arity, t1); + for (i = 0; i < arity; ++i) + result[i] = i; + if (joinedNames !== "") { + names = joinedNames.split(","); + i = names.length; + for (last = arity; i > 0;) { + --last; + --i; + result[last] = names[i]; + } + } + return A.List_List$unmodifiable(result, t1); + } + }; + A._Record2.prototype = { + _getFieldValues$0() { + return [this._0, this._1]; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._Record2 && this.$shape === other.$shape && J.$eq$(this._0, other._0) && J.$eq$(this._1, other._1); + }, + get$hashCode(_) { + return A.Object_hash(this.$shape, this._0, this._1, B.C_SentinelValue); + } + }; + A._Record1.prototype = { + _getFieldValues$0() { + return [this._0]; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._Record1 && this.$shape === other.$shape && J.$eq$(this._0, other._0); + }, + get$hashCode(_) { + return A.Object_hash(this.$shape, this._0, B.C_SentinelValue, B.C_SentinelValue); + } + }; + A._Record3.prototype = { + _getFieldValues$0() { + return [this._0, this._1, this._2]; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A._Record3 && _this.$shape === other.$shape && J.$eq$(_this._0, other._0) && J.$eq$(_this._1, other._1) && J.$eq$(_this._2, other._2); + }, + get$hashCode(_) { + var _this = this; + return A.Object_hash(_this.$shape, _this._0, _this._1, _this._2); + } + }; + A._RecordN.prototype = { + _getFieldValues$0() { + return this._values; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._RecordN && this.$shape === other.$shape && A._RecordN__equalValues(this._values, other._values); + }, + get$hashCode(_) { + return A.Object_hash(this.$shape, A.Object_hashAll(this._values), B.C_SentinelValue, B.C_SentinelValue); + } + }; + A.JSSyntaxRegExp.prototype = { + toString$0(_) { + return "RegExp/" + this.pattern + "/" + this._nativeRegExp.flags; + }, + get$_nativeGlobalVersion() { + var _this = this, + t1 = _this._nativeGlobalRegExp; + if (t1 != null) + return t1; + t1 = _this._nativeRegExp; + return _this._nativeGlobalRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern, t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, "g"); + }, + get$_nativeAnchoredVersion() { + var _this = this, + t1 = _this._nativeAnchoredRegExp; + if (t1 != null) + return t1; + t1 = _this._nativeRegExp; + return _this._nativeAnchoredRegExp = A.JSSyntaxRegExp_makeNative(_this.pattern, t1.multiline, !t1.ignoreCase, t1.unicode, t1.dotAll, "y"); + }, + _computeHasCaptures$0() { + var t2, + t1 = this.pattern; + if (!B.JSString_methods.contains$1(t1, "(")) + return false; + t2 = this._nativeRegExp.unicode ? "u" : ""; + return new RegExp("(?:)|" + t1, t2).exec("").length > 1; + }, + firstMatch$1(string) { + var m = this._nativeRegExp.exec(string); + if (m == null) + return null; + return new A._MatchImplementation(m); + }, + allMatches$2(_, string, start) { + var t1 = string.length; + if (start > t1) + throw A.wrapException(A.RangeError$range(start, 0, t1, null, null)); + return new A._AllMatchesIterable(this, string, start); + }, + allMatches$1(_, string) { + return this.allMatches$2(0, string, 0); + }, + _execGlobal$2(string, start) { + var match, + regexp = this.get$_nativeGlobalVersion(); + regexp.lastIndex = start; + match = regexp.exec(string); + if (match == null) + return null; + return new A._MatchImplementation(match); + }, + _execAnchored$2(string, start) { + var match, + regexp = this.get$_nativeAnchoredVersion(); + regexp.lastIndex = start; + match = regexp.exec(string); + if (match == null) + return null; + return new A._MatchImplementation(match); + }, + matchAsPrefix$2(_, string, start) { + if (start < 0 || start > string.length) + throw A.wrapException(A.RangeError$range(start, 0, string.length, null, null)); + return this._execAnchored$2(string, start); + } + }; + A._MatchImplementation.prototype = { + get$start(_) { + return this._match.index; + }, + get$end(_) { + var t1 = this._match; + return t1.index + t1[0].length; + }, + namedGroup$1($name) { + var result, + groups = this._match.groups; + if (groups != null) { + result = groups[$name]; + if (result != null || $name in groups) + return result; + } + throw A.wrapException(A.ArgumentError$value($name, "name", "Not a capture group name")); + }, + $isMatch: 1, + $isRegExpMatch: 1 + }; + A._AllMatchesIterable.prototype = { + get$iterator(_) { + return new A._AllMatchesIterator(this._re, this.__js_helper$_string, this.__js_helper$_start); + } + }; + A._AllMatchesIterator.prototype = { + get$current(_) { + var t1 = this.__js_helper$_current; + return t1 == null ? type$.RegExpMatch._as(t1) : t1; + }, + moveNext$0() { + var t1, t2, t3, match, nextIndex, t4, _this = this, + string = _this.__js_helper$_string; + if (string == null) + return false; + t1 = _this._nextIndex; + t2 = string.length; + if (t1 <= t2) { + t3 = _this._regExp; + match = t3._execGlobal$2(string, t1); + if (match != null) { + _this.__js_helper$_current = match; + nextIndex = match.get$end(0); + if (match._match.index === nextIndex) { + t1 = false; + if (t3._nativeRegExp.unicode) { + t3 = _this._nextIndex; + t4 = t3 + 1; + if (t4 < t2) { + t2 = string.charCodeAt(t3); + if (t2 >= 55296 && t2 <= 56319) { + t1 = string.charCodeAt(t4); + t1 = t1 >= 56320 && t1 <= 57343; + } + } + } + nextIndex = (t1 ? nextIndex + 1 : nextIndex) + 1; + } + _this._nextIndex = nextIndex; + return true; + } + } + _this.__js_helper$_string = _this.__js_helper$_current = null; + return false; + } + }; + A.StringMatch.prototype = { + get$end(_) { + return this.start + this.pattern.length; + }, + $isMatch: 1, + get$start(receiver) { + return this.start; + } + }; + A._StringAllMatchesIterable.prototype = { + get$iterator(_) { + return new A._StringAllMatchesIterator(this._input, this._pattern, this.__js_helper$_index); + }, + get$first(_) { + var t1 = this._pattern, + index = this._input.indexOf(t1, this.__js_helper$_index); + if (index >= 0) + return new A.StringMatch(index, t1); + throw A.wrapException(A.IterableElementError_noElement()); + } + }; + A._StringAllMatchesIterator.prototype = { + moveNext$0() { + var index, end, _this = this, + t1 = _this.__js_helper$_index, + t2 = _this._pattern, + t3 = t2.length, + t4 = _this._input, + t5 = t4.length; + if (t1 + t3 > t5) { + _this.__js_helper$_current = null; + return false; + } + index = t4.indexOf(t2, t1); + if (index < 0) { + _this.__js_helper$_index = t5 + 1; + _this.__js_helper$_current = null; + return false; + } + end = index + t3; + _this.__js_helper$_current = new A.StringMatch(index, t2); + _this.__js_helper$_index = end === _this.__js_helper$_index ? end + 1 : end; + return true; + }, + get$current(_) { + var t1 = this.__js_helper$_current; + t1.toString; + return t1; + } + }; + A._Cell.prototype = { + readLocal$1$0() { + var t1 = this.__late_helper$_value; + if (t1 === this) + A.throwExpression(new A.LateError("Local '' has not been initialized.")); + return t1; + }, + readLocal$0() { + return this.readLocal$1$0(type$.dynamic); + }, + _readLocal$0() { + var t1 = this.__late_helper$_value; + if (t1 === this) + throw A.wrapException(new A.LateError("Local '' has not been initialized.")); + return t1; + } + }; + A.NativeByteBuffer.prototype = { + get$runtimeType(receiver) { + return B.Type_ByteBuffer_rqD; + }, + $isTrustedGetRuntimeType: 1, + $isByteBuffer: 1 + }; + A.NativeTypedData.prototype = { + _invalidPosition$3(receiver, position, $length, $name) { + var t1 = A.RangeError$range(position, 0, $length, $name, null); + throw A.wrapException(t1); + }, + _checkPosition$3(receiver, position, $length, $name) { + if (position >>> 0 !== position || position > $length) + this._invalidPosition$3(receiver, position, $length, $name); + } + }; + A.NativeByteData.prototype = { + get$runtimeType(receiver) { + return B.Type_ByteData_9dB; + }, + $isTrustedGetRuntimeType: 1, + $isByteData: 1 + }; + A.NativeTypedArray.prototype = { + get$length(receiver) { + return receiver.length; + }, + _setRangeFast$4(receiver, start, end, source, skipCount) { + var count, sourceLength, + targetLength = receiver.length; + this._checkPosition$3(receiver, start, targetLength, "start"); + this._checkPosition$3(receiver, end, targetLength, "end"); + if (start > end) + throw A.wrapException(A.RangeError$range(start, 0, end, null, null)); + count = end - start; + if (skipCount < 0) + throw A.wrapException(A.ArgumentError$(skipCount, null)); + sourceLength = source.length; + if (sourceLength - skipCount < count) + throw A.wrapException(A.StateError$("Not enough elements")); + if (skipCount !== 0 || sourceLength !== count) + source = source.subarray(skipCount, skipCount + count); + receiver.set(source, start); + }, + $isJavaScriptIndexingBehavior: 1 + }; + A.NativeTypedArrayOfDouble.prototype = { + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + $indexSet(receiver, index, value) { + receiver.$flags & 2 && A.throwUnsupportedOperation(receiver); + A._checkValidIndex(index, receiver, receiver.length); + receiver[index] = value; + }, + setRange$4(receiver, start, end, iterable, skipCount) { + receiver.$flags & 2 && A.throwUnsupportedOperation(receiver, 5); + if (type$.NativeTypedArrayOfDouble._is(iterable)) { + this._setRangeFast$4(receiver, start, end, iterable, skipCount); + return; + } + this.super$ListBase$setRange(receiver, start, end, iterable, skipCount); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + A.NativeTypedArrayOfInt.prototype = { + $indexSet(receiver, index, value) { + receiver.$flags & 2 && A.throwUnsupportedOperation(receiver); + A._checkValidIndex(index, receiver, receiver.length); + receiver[index] = value; + }, + setRange$4(receiver, start, end, iterable, skipCount) { + receiver.$flags & 2 && A.throwUnsupportedOperation(receiver, 5); + if (type$.NativeTypedArrayOfInt._is(iterable)) { + this._setRangeFast$4(receiver, start, end, iterable, skipCount); + return; + } + this.super$ListBase$setRange(receiver, start, end, iterable, skipCount); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + A.NativeFloat32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Float32List_9Kz; + }, + sublist$2(receiver, start, end) { + return new Float32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isFloat32List: 1 + }; + A.NativeFloat64List.prototype = { + get$runtimeType(receiver) { + return B.Type_Float64List_9Kz; + }, + sublist$2(receiver, start, end) { + return new Float64Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isFloat64List: 1 + }; + A.NativeInt16List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int16List_s5h; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Int16Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isInt16List: 1 + }; + A.NativeInt32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int32List_O8Z; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Int32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isInt32List: 1 + }; + A.NativeInt8List.prototype = { + get$runtimeType(receiver) { + return B.Type_Int8List_rFV; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Int8Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isInt8List: 1 + }; + A.NativeUint16List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint16List_kmP; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint16Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isUint16List: 1 + }; + A.NativeUint32List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint32List_kmP; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint32Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isUint32List: 1 + }; + A.NativeUint8ClampedList.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint8ClampedList_04U; + }, + get$length(receiver) { + return receiver.length; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint8ClampedArray(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isUint8ClampedList: 1 + }; + A.NativeUint8List.prototype = { + get$runtimeType(receiver) { + return B.Type_Uint8List_8Eb; + }, + get$length(receiver) { + return receiver.length; + }, + $index(receiver, index) { + A._checkValidIndex(index, receiver, receiver.length); + return receiver[index]; + }, + sublist$2(receiver, start, end) { + return new Uint8Array(receiver.subarray(start, A._checkValidRange(start, end, receiver.length))); + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + $isTrustedGetRuntimeType: 1, + $isNativeUint8List: 1, + $isUint8List: 1 + }; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {}; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {}; + A.Rti.prototype = { + _eval$1(recipe) { + return A._Universe_evalInEnvironment(init.typeUniverse, this, recipe); + }, + _bind$1(typeOrTuple) { + return A._Universe_bind(init.typeUniverse, this, typeOrTuple); + } + }; + A._FunctionParameters.prototype = {}; + A._Type.prototype = { + toString$0(_) { + return A._rtiToString(this._rti, null); + } + }; + A._Error.prototype = { + toString$0(_) { + return this.__rti$_message; + } + }; + A._TypeError.prototype = { + get$message(_) { + return this.__rti$_message; + }, + $isTypeError: 1 + }; + A._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = { + call$1(__wc0_formal) { + var t1 = this._box_0, + f = t1.storedCallback; + t1.storedCallback = null; + f.call$0(); + }, + $signature: 62 + }; + A._AsyncRun__initializeScheduleImmediate_closure.prototype = { + call$1(callback) { + var t1, t2; + this._box_0.storedCallback = callback; + t1 = this.div; + t2 = this.span; + t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); + }, + $signature: 35 + }; + A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { + call$0() { + this.callback.call$0(); + }, + $signature: 1 + }; + A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = { + call$0() { + this.callback.call$0(); + }, + $signature: 1 + }; + A._TimerImpl.prototype = { + _TimerImpl$2(milliseconds, callback) { + if (self.setTimeout != null) + this._handle = self.setTimeout(A.convertDartClosureToJS(new A._TimerImpl_internalCallback(this, callback), 0), milliseconds); + else + throw A.wrapException(A.UnsupportedError$("`setTimeout()` not found.")); + }, + _TimerImpl$periodic$2(milliseconds, callback) { + if (self.setTimeout != null) + this._handle = self.setInterval(A.convertDartClosureToJS(new A._TimerImpl$periodic_closure(this, milliseconds, Date.now(), callback), 0), milliseconds); + else + throw A.wrapException(A.UnsupportedError$("Periodic timer.")); + }, + cancel$0() { + if (self.setTimeout != null) { + var t1 = this._handle; + if (t1 == null) + return; + if (this._once) + self.clearTimeout(t1); + else + self.clearInterval(t1); + this._handle = null; + } else + throw A.wrapException(A.UnsupportedError$("Canceling a timer.")); + } + }; + A._TimerImpl_internalCallback.prototype = { + call$0() { + var t1 = this.$this; + t1._handle = null; + t1._tick = 1; + this.callback.call$0(); + }, + $signature: 0 + }; + A._TimerImpl$periodic_closure.prototype = { + call$0() { + var duration, _this = this, + t1 = _this.$this, + tick = t1._tick + 1, + t2 = _this.milliseconds; + if (t2 > 0) { + duration = Date.now() - _this.start; + if (duration > (tick + 1) * t2) + tick = B.JSInt_methods.$tdiv(duration, t2); + } + t1._tick = tick; + _this.callback.call$1(t1); + }, + $signature: 1 + }; + A._AsyncAwaitCompleter.prototype = { + complete$1(value) { + var t1, _this = this; + if (value == null) + value = _this.$ti._precomputed1._as(value); + if (!_this.isSync) + _this._future._asyncComplete$1(value); + else { + t1 = _this._future; + if (_this.$ti._eval$1("Future<1>")._is(value)) + t1._chainFuture$1(value); + else + t1._completeWithValue$1(value); + } + }, + completeError$2(e, st) { + var t1 = this._future; + if (this.isSync) + t1._completeErrorObject$1(new A.AsyncError(e, st)); + else + t1._asyncCompleteErrorObject$1(new A.AsyncError(e, st)); + } + }; + A._awaitOnObject_closure.prototype = { + call$1(result) { + return this.bodyFunction.call$2(0, result); + }, + $signature: 71 + }; + A._awaitOnObject_closure0.prototype = { + call$2(error, stackTrace) { + this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, stackTrace)); + }, + $signature: 394 + }; + A._wrapJsFunctionForAsync_closure.prototype = { + call$2(errorCode, result) { + this.$protected(errorCode, result); + }, + $signature: 357 + }; + A._SyncStarIterator.prototype = { + get$current(_) { + return this._async$_current; + }, + _resumeBody$2(errorCode, errorValue) { + var body, t1, exception; + errorCode = errorCode; + errorValue = errorValue; + body = this._body; + for (;;) + try { + t1 = body(this, errorCode, errorValue); + return t1; + } catch (exception) { + errorValue = exception; + errorCode = 1; + } + }, + moveNext$0() { + var nestedIterator, t1, exception, value, suspendedBodies, _this = this, errorValue = null, errorCode = 0; + for (;;) { + nestedIterator = _this._nestedIterator; + if (nestedIterator != null) + try { + if (nestedIterator.moveNext$0()) { + t1 = nestedIterator; + _this._async$_current = t1.get$current(t1); + return true; + } else + _this._nestedIterator = null; + } catch (exception) { + errorValue = exception; + errorCode = 1; + _this._nestedIterator = null; + } + value = _this._resumeBody$2(errorCode, errorValue); + if (1 === value) + return true; + if (0 === value) { + _this._async$_current = null; + suspendedBodies = _this._suspendedBodies; + if (suspendedBodies == null || suspendedBodies.length === 0) { + _this._body = A._SyncStarIterator__terminatedBody; + return false; + } + _this._body = suspendedBodies.pop(); + errorCode = 0; + errorValue = null; + continue; + } + if (2 === value) { + errorCode = 0; + errorValue = null; + continue; + } + if (3 === value) { + errorValue = _this._datum; + _this._datum = null; + suspendedBodies = _this._suspendedBodies; + if (suspendedBodies == null || suspendedBodies.length === 0) { + _this._async$_current = null; + _this._body = A._SyncStarIterator__terminatedBody; + throw errorValue; + return false; + } + _this._body = suspendedBodies.pop(); + errorCode = 1; + continue; + } + throw A.wrapException(A.StateError$("sync*")); + } + return false; + }, + _yieldStar$1(iterable) { + var t1, t2, _this = this; + if (iterable instanceof A._SyncStarIterable) { + t1 = iterable._outerHelper(); + t2 = _this._suspendedBodies; + if (t2 == null) + t2 = _this._suspendedBodies = []; + t2.push(_this._body); + _this._body = t1; + return 2; + } else { + _this._nestedIterator = J.get$iterator$ax(iterable); + return 2; + } + } + }; + A._SyncStarIterable.prototype = { + get$iterator(_) { + return new A._SyncStarIterator(this._outerHelper()); + } + }; + A.AsyncError.prototype = { + toString$0(_) { + return A.S(this.error); + }, + $isError: 1, + get$stackTrace() { + return this.stackTrace; + } + }; + A.Future_wait_handleError.prototype = { + call$2(theError, theStackTrace) { + var _this = this, + t1 = _this._box_0, + t2 = --t1.remaining; + if (t1.values != null) { + t1.values = null; + t1.error = theError; + t1.stackTrace = theStackTrace; + if (t2 === 0 || _this.eagerError) + _this._future._completeErrorObject$1(new A.AsyncError(theError, theStackTrace)); + } else if (t2 === 0 && !_this.eagerError) { + t2 = t1.error; + t2.toString; + t1 = t1.stackTrace; + t1.toString; + _this._future._completeErrorObject$1(new A.AsyncError(t2, t1)); + } + }, + $signature: 70 + }; + A.Future_wait_closure.prototype = { + call$1(value) { + var t1, value0, t3, t4, _i, t5, _this = this, + t2 = _this._box_0, + remainingResults = --t2.remaining, + valueList = t2.values; + if (valueList != null) { + J.$indexSet$ax(valueList, _this.pos, value); + if (J.$eq$(remainingResults, 0)) { + t2 = _this.T; + t1 = A._setArrayType([], t2._eval$1("JSArray<0>")); + for (t3 = valueList, t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + value0 = t3[_i]; + t5 = value0; + if (t5 == null) + t5 = t2._as(t5); + J.add$1$ax(t1, t5); + } + _this._future._completeWithValue$1(t1); + } + } else if (J.$eq$(remainingResults, 0) && !_this.eagerError) { + t1 = t2.error; + t1.toString; + t2 = t2.stackTrace; + t2.toString; + _this._future._completeErrorObject$1(new A.AsyncError(t1, t2)); + } + }, + $signature() { + return this.T._eval$1("Null(0)"); + } + }; + A._Completer.prototype = { + completeError$2(error, stackTrace) { + if ((this.future._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + this._completeErrorObject$1(A._interceptUserError(error, stackTrace)); + }, + completeError$1(error) { + return this.completeError$2(error, null); + } + }; + A._AsyncCompleter.prototype = { + complete$1(value) { + var t1 = this.future; + if ((t1._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + t1._asyncComplete$1(value); + }, + complete$0() { + return this.complete$1(null); + }, + _completeErrorObject$1(error) { + this.future._asyncCompleteErrorObject$1(error); + } + }; + A._SyncCompleter.prototype = { + complete$1(value) { + var t1 = this.future; + if ((t1._state & 30) !== 0) + throw A.wrapException(A.StateError$("Future already completed")); + t1._complete$1(value); + }, + _completeErrorObject$1(error) { + this.future._completeErrorObject$1(error); + } + }; + A._FutureListener.prototype = { + matchesErrorTest$1(asyncError) { + if ((this.state & 15) !== 6) + return true; + return this.result._zone.runUnary$2$2(this.callback, asyncError.error, type$.bool, type$.Object); + }, + handleError$1(asyncError) { + var exception, + errorCallback = this.errorCallback, + result = null, + t1 = type$.dynamic, + t2 = type$.Object, + t3 = asyncError.error, + t4 = this.result._zone; + if (type$.dynamic_Function_Object_StackTrace._is(errorCallback)) + result = t4.runBinary$3$3(errorCallback, t3, asyncError.stackTrace, t1, t2, type$.StackTrace); + else + result = t4.runUnary$2$2(errorCallback, t3, t1, t2); + try { + t1 = result; + return t1; + } catch (exception) { + if (type$.TypeError._is(A.unwrapException(exception))) { + if ((this.state & 1) !== 0) + throw A.wrapException(A.ArgumentError$("The error handler of Future.then must return a value of the returned future's type", "onError")); + throw A.wrapException(A.ArgumentError$("The error handler of Future.catchError must return a value of the future's type", "onError")); + } else + throw exception; + } + } + }; + A._Future.prototype = { + then$1$2$onError(_, f, onError, $R) { + var result, t1, + currentZone = $.Zone__current; + if (currentZone === B.C__RootZone) { + if (onError != null && !type$.dynamic_Function_Object_StackTrace._is(onError) && !type$.dynamic_Function_Object._is(onError)) + throw A.wrapException(A.ArgumentError$value(onError, "onError", string$.Error_)); + } else { + f = currentZone.registerUnaryCallback$2$1(f, $R._eval$1("0/"), this.$ti._precomputed1); + if (onError != null) + onError = A._registerErrorHandler(onError, currentZone); + } + result = new A._Future($.Zone__current, $R._eval$1("_Future<0>")); + t1 = onError == null ? 1 : 3; + this._addListener$1(new A._FutureListener(result, t1, f, onError, this.$ti._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>"))); + return result; + }, + then$1$1(_, f, $R) { + return this.then$1$2$onError(0, f, null, $R); + }, + _thenAwait$1$2(f, onError, $E) { + var result = new A._Future($.Zone__current, $E._eval$1("_Future<0>")); + this._addListener$1(new A._FutureListener(result, 19, f, onError, this.$ti._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>"))); + return result; + }, + catchError$1(onError) { + var t1 = this.$ti, + t2 = $.Zone__current, + result = new A._Future(t2, t1); + if (t2 !== B.C__RootZone) + onError = A._registerErrorHandler(onError, t2); + this._addListener$1(new A._FutureListener(result, 2, null, onError, t1._eval$1("_FutureListener<1,1>"))); + return result; + }, + whenComplete$1(action) { + var t1 = this.$ti, + t2 = $.Zone__current, + result = new A._Future(t2, t1); + if (t2 !== B.C__RootZone) + action = t2.registerCallback$1$1(action, type$.dynamic); + this._addListener$1(new A._FutureListener(result, 8, action, null, t1._eval$1("_FutureListener<1,1>"))); + return result; + }, + _setErrorObject$1(error) { + this._state = this._state & 1 | 16; + this._resultOrListeners = error; + }, + _cloneResult$1(source) { + this._state = source._state & 30 | this._state & 1; + this._resultOrListeners = source._resultOrListeners; + }, + _addListener$1(listener) { + var _this = this, + t1 = _this._state; + if (t1 <= 3) { + listener._nextListener = _this._resultOrListeners; + _this._resultOrListeners = listener; + } else { + if ((t1 & 4) !== 0) { + t1 = _this._resultOrListeners; + if ((t1._state & 24) === 0) { + t1._addListener$1(listener); + return; + } + _this._cloneResult$1(t1); + } + _this._zone.scheduleMicrotask$1(new A._Future__addListener_closure(_this, listener)); + } + }, + _prependListeners$1(listeners) { + var t1, existingListeners, next, cursor, next0, _this = this, _box_0 = {}; + _box_0.listeners = listeners; + if (listeners == null) + return; + t1 = _this._state; + if (t1 <= 3) { + existingListeners = _this._resultOrListeners; + _this._resultOrListeners = listeners; + if (existingListeners != null) { + next = listeners._nextListener; + for (cursor = listeners; next != null; cursor = next, next = next0) + next0 = next._nextListener; + cursor._nextListener = existingListeners; + } + } else { + if ((t1 & 4) !== 0) { + t1 = _this._resultOrListeners; + if ((t1._state & 24) === 0) { + t1._prependListeners$1(listeners); + return; + } + _this._cloneResult$1(t1); + } + _box_0.listeners = _this._reverseListeners$1(listeners); + _this._zone.scheduleMicrotask$1(new A._Future__prependListeners_closure(_box_0, _this)); + } + }, + _removeListeners$0() { + var current = this._resultOrListeners; + this._resultOrListeners = null; + return this._reverseListeners$1(current); + }, + _reverseListeners$1(listeners) { + var current, prev, next; + for (current = listeners, prev = null; current != null; prev = current, current = next) { + next = current._nextListener; + current._nextListener = prev; + } + return prev; + }, + _complete$1(value) { + var listeners, _this = this; + if (_this.$ti._eval$1("Future<1>")._is(value)) + A._Future__chainCoreFuture(value, _this, true); + else { + listeners = _this._removeListeners$0(); + _this._state = 8; + _this._resultOrListeners = value; + A._Future__propagateToListeners(_this, listeners); + } + }, + _completeWithValue$1(value) { + var _this = this, + listeners = _this._removeListeners$0(); + _this._state = 8; + _this._resultOrListeners = value; + A._Future__propagateToListeners(_this, listeners); + }, + _completeWithResultOf$1(source) { + var t1, t2, listeners, _this = this; + if ((source._state & 16) !== 0) { + t1 = _this._zone; + t2 = source._zone; + t1 = !(t1 === t2 || t1.get$errorZone() === t2.get$errorZone()); + } else + t1 = false; + if (t1) + return; + listeners = _this._removeListeners$0(); + _this._cloneResult$1(source); + A._Future__propagateToListeners(_this, listeners); + }, + _completeErrorObject$1(error) { + var listeners = this._removeListeners$0(); + this._setErrorObject$1(error); + A._Future__propagateToListeners(this, listeners); + }, + _completeError$2(error, stackTrace) { + this._completeErrorObject$1(new A.AsyncError(error, stackTrace)); + }, + _asyncComplete$1(value) { + if (this.$ti._eval$1("Future<1>")._is(value)) { + this._chainFuture$1(value); + return; + } + this._asyncCompleteWithValue$1(value); + }, + _asyncCompleteWithValue$1(value) { + this._state ^= 2; + this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteWithValue_closure(this, value)); + }, + _chainFuture$1(value) { + A._Future__chainCoreFuture(value, this, false); + return; + }, + _asyncCompleteErrorObject$1(error) { + this._state ^= 2; + this._zone.scheduleMicrotask$1(new A._Future__asyncCompleteErrorObject_closure(this, error)); + }, + $isFuture: 1 + }; + A._Future__addListener_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this.listener); + }, + $signature: 0 + }; + A._Future__prependListeners_closure.prototype = { + call$0() { + A._Future__propagateToListeners(this.$this, this._box_0.listeners); + }, + $signature: 0 + }; + A._Future__chainCoreFuture_closure.prototype = { + call$0() { + A._Future__chainCoreFuture(this._box_0.source, this.target, true); + }, + $signature: 0 + }; + A._Future__asyncCompleteWithValue_closure.prototype = { + call$0() { + this.$this._completeWithValue$1(this.value); + }, + $signature: 0 + }; + A._Future__asyncCompleteErrorObject_closure.prototype = { + call$0() { + this.$this._completeErrorObject$1(this.error); + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleWhenCompleteCallback.prototype = { + call$0() { + var e, s, t1, exception, t2, t3, originalSource, joinedResult, _this = this, completeResult = null; + try { + t1 = _this._box_0.listener; + completeResult = t1.result._zone.run$1$1(0, t1.callback, type$.dynamic); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + if (_this.hasError && _this._box_1.source._resultOrListeners.error === e) { + t1 = _this._box_0; + t1.listenerValueOrError = _this._box_1.source._resultOrListeners; + } else { + t1 = e; + t2 = s; + if (t2 == null) + t2 = A.AsyncError_defaultStackTrace(t1); + t3 = _this._box_0; + t3.listenerValueOrError = new A.AsyncError(t1, t2); + t1 = t3; + } + t1.listenerHasError = true; + return; + } + if (completeResult instanceof A._Future && (completeResult._state & 24) !== 0) { + if ((completeResult._state & 16) !== 0) { + t1 = _this._box_0; + t1.listenerValueOrError = completeResult._resultOrListeners; + t1.listenerHasError = true; + } + return; + } + if (completeResult instanceof A._Future) { + originalSource = _this._box_1.source; + joinedResult = new A._Future(originalSource._zone, originalSource.$ti); + completeResult.then$1$2$onError(0, new A._Future__propagateToListeners_handleWhenCompleteCallback_closure(joinedResult, originalSource), new A._Future__propagateToListeners_handleWhenCompleteCallback_closure0(joinedResult), type$.void); + t1 = _this._box_0; + t1.listenerValueOrError = joinedResult; + t1.listenerHasError = false; + } + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = { + call$1(__wc0_formal) { + this.joinedResult._completeWithResultOf$1(this.originalSource); + }, + $signature: 62 + }; + A._Future__propagateToListeners_handleWhenCompleteCallback_closure0.prototype = { + call$2(e, s) { + this.joinedResult._completeErrorObject$1(new A.AsyncError(e, s)); + }, + $signature: 51 + }; + A._Future__propagateToListeners_handleValueCallback.prototype = { + call$0() { + var e, s, t1, t2, t3, exception; + try { + t1 = this._box_0; + t2 = t1.listener; + t3 = t2.$ti; + t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t2.callback, this.sourceResult, t3._eval$1("2/"), t3._precomputed1); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = e; + t2 = s; + if (t2 == null) + t2 = A.AsyncError_defaultStackTrace(t1); + t3 = this._box_0; + t3.listenerValueOrError = new A.AsyncError(t1, t2); + t3.listenerHasError = true; + } + }, + $signature: 0 + }; + A._Future__propagateToListeners_handleError.prototype = { + call$0() { + var asyncError, e, s, t1, exception, t2, t3, _this = this; + try { + asyncError = _this._box_1.source._resultOrListeners; + t1 = _this._box_0; + if (t1.listener.matchesErrorTest$1(asyncError) && t1.listener.errorCallback != null) { + t1.listenerValueOrError = t1.listener.handleError$1(asyncError); + t1.listenerHasError = false; + } + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + t1 = _this._box_1.source._resultOrListeners; + if (t1.error === e) { + t2 = _this._box_0; + t2.listenerValueOrError = t1; + t1 = t2; + } else { + t1 = e; + t2 = s; + if (t2 == null) + t2 = A.AsyncError_defaultStackTrace(t1); + t3 = _this._box_0; + t3.listenerValueOrError = new A.AsyncError(t1, t2); + t1 = t3; + } + t1.listenerHasError = true; + } + }, + $signature: 0 + }; + A._AsyncCallbackEntry.prototype = {}; + A.Stream.prototype = { + get$isBroadcast() { + return false; + }, + get$length(_) { + var t1 = {}, + future = new A._Future($.Zone__current, type$._Future_int); + t1.count = 0; + this.listen$4$cancelOnError$onDone$onError(0, new A.Stream_length_closure(t1, this), true, new A.Stream_length_closure0(t1, future), future.get$_completeError()); + return future; + } + }; + A.Stream_Stream$fromFuture_closure.prototype = { + call$1(value) { + var t1 = this.controller; + t1._async$_add$1(value); + t1._closeUnchecked$0(); + }, + $signature() { + return this.T._eval$1("Null(0)"); + } + }; + A.Stream_Stream$fromFuture_closure0.prototype = { + call$2(error, stackTrace) { + var t1 = this.controller; + t1._addError$2(error, stackTrace); + t1._closeUnchecked$0(); + }, + $signature: 392 + }; + A.Stream_length_closure.prototype = { + call$1(__wc0_formal) { + ++this._box_0.count; + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(Stream.T)"); + } + }; + A.Stream_length_closure0.prototype = { + call$0() { + this.future._complete$1(this._box_0.count); + }, + $signature: 0 + }; + A._StreamController.prototype = { + get$stream() { + return new A._ControllerStream(this, A._instanceType(this)._eval$1("_ControllerStream<1>")); + }, + get$_pendingEvents() { + if ((this._state & 8) === 0) + return this._varData; + return this._varData._varData; + }, + _ensurePendingEvents$0() { + var events, state, _this = this; + if ((_this._state & 8) === 0) { + events = _this._varData; + return events == null ? _this._varData = new A._PendingEvents() : events; + } + state = _this._varData; + events = state._varData; + return events == null ? state._varData = new A._PendingEvents() : events; + }, + get$_subscription() { + var varData = this._varData; + return (this._state & 8) !== 0 ? varData._varData : varData; + }, + _badEventState$0() { + if ((this._state & 4) !== 0) + return new A.StateError("Cannot add event after closing"); + return new A.StateError("Cannot add event while adding a stream"); + }, + addStream$2$cancelOnError(source, cancelOnError) { + var t2, t3, t4, _this = this, + t1 = _this._state; + if (t1 >= 4) + throw A.wrapException(_this._badEventState$0()); + if ((t1 & 2) !== 0) { + t1 = new A._Future($.Zone__current, type$._Future_dynamic); + t1._asyncComplete$1(null); + return t1; + } + t1 = _this._varData; + t2 = cancelOnError === true; + t3 = new A._Future($.Zone__current, type$._Future_dynamic); + t4 = t2 ? A._AddStreamState_makeErrorHandler(_this) : _this.get$_addError(); + t4 = source.listen$4$cancelOnError$onDone$onError(0, _this.get$_async$_add(), t2, _this.get$_close(), t4); + t2 = _this._state; + if ((t2 & 1) !== 0 ? (_this.get$_subscription()._state & 4) !== 0 : (t2 & 2) === 0) + t4.pause$0(0); + _this._varData = new A._StreamControllerAddStreamState(t1, t3, t4); + _this._state |= 8; + return t3; + }, + _ensureDoneFuture$0() { + var t1 = this._doneFuture; + if (t1 == null) + t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new A._Future($.Zone__current, type$._Future_void); + return t1; + }, + add$1(_, value) { + if (this._state >= 4) + throw A.wrapException(this._badEventState$0()); + this._async$_add$1(value); + }, + addError$2(error, stackTrace) { + var _0_0; + if (this._state >= 4) + throw A.wrapException(this._badEventState$0()); + _0_0 = A._interceptUserError(error, stackTrace); + this._addError$2(_0_0.error, _0_0.stackTrace); + }, + addError$1(error) { + return this.addError$2(error, null); + }, + close$0(_) { + var _this = this, + t1 = _this._state; + if ((t1 & 4) !== 0) + return _this._ensureDoneFuture$0(); + if (t1 >= 4) + throw A.wrapException(_this._badEventState$0()); + _this._closeUnchecked$0(); + return _this._ensureDoneFuture$0(); + }, + _closeUnchecked$0() { + var t1 = this._state |= 4; + if ((t1 & 1) !== 0) + this._sendDone$0(); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, B.C__DelayedDone); + }, + _async$_add$1(value) { + var t1 = this._state; + if ((t1 & 1) !== 0) + this._sendData$1(value); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, new A._DelayedData(value)); + }, + _addError$2(error, stackTrace) { + var t1 = this._state; + if ((t1 & 1) !== 0) + this._sendError$2(error, stackTrace); + else if ((t1 & 3) === 0) + this._ensurePendingEvents$0().add$1(0, new A._DelayedError(error, stackTrace)); + }, + _close$0() { + var addState = this._varData; + this._varData = addState._varData; + this._state &= 4294967287; + addState.addStreamFuture._asyncComplete$1(null); + }, + _subscribe$4(onData, onError, onDone, cancelOnError) { + var subscription, pendingEvents, addState, _this = this; + if ((_this._state & 3) !== 0) + throw A.wrapException(A.StateError$("Stream has already been listened to.")); + subscription = A._ControllerSubscription$(_this, onData, onError, onDone, cancelOnError, A._instanceType(_this)._precomputed1); + pendingEvents = _this.get$_pendingEvents(); + if (((_this._state |= 1) & 8) !== 0) { + addState = _this._varData; + addState._varData = subscription; + addState.addSubscription.resume$0(0); + } else + _this._varData = subscription; + subscription._setPendingEvents$1(pendingEvents); + subscription._guardCallback$1(new A._StreamController__subscribe_closure(_this)); + return subscription; + }, + _recordCancel$1(subscription) { + var onCancel, cancelResult, e, s, exception, result0, t1, _this = this, result = null; + if ((_this._state & 8) !== 0) + result = _this._varData.cancel$0(); + _this._varData = null; + _this._state = _this._state & 4294967286 | 2; + onCancel = _this.onCancel; + if (onCancel != null) + if (result == null) + try { + cancelResult = onCancel.call$0(); + if (cancelResult instanceof A._Future) + result = cancelResult; + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + result0 = new A._Future($.Zone__current, type$._Future_void); + result0._asyncCompleteErrorObject$1(new A.AsyncError(e, s)); + result = result0; + } + else + result = result.whenComplete$1(onCancel); + t1 = new A._StreamController__recordCancel_complete(_this); + if (result != null) + result = result.whenComplete$1(t1); + else + t1.call$0(); + return result; + }, + _recordPause$1(subscription) { + if ((this._state & 8) !== 0) + this._varData.addSubscription.pause$0(0); + A._runGuarded(this.onPause); + }, + _recordResume$1(subscription) { + if ((this._state & 8) !== 0) + this._varData.addSubscription.resume$0(0); + A._runGuarded(this.onResume); + }, + $isEventSink: 1, + set$onPause(val) { + return this.onPause = val; + }, + set$onResume(val) { + return this.onResume = val; + }, + set$onCancel(val) { + return this.onCancel = val; + } + }; + A._StreamController__subscribe_closure.prototype = { + call$0() { + A._runGuarded(this.$this.onListen); + }, + $signature: 0 + }; + A._StreamController__recordCancel_complete.prototype = { + call$0() { + var doneFuture = this.$this._doneFuture; + if (doneFuture != null && (doneFuture._state & 30) === 0) + doneFuture._asyncComplete$1(null); + }, + $signature: 0 + }; + A._SyncStreamControllerDispatch.prototype = { + _sendData$1(data) { + this.get$_subscription()._async$_add$1(data); + }, + _sendError$2(error, stackTrace) { + this.get$_subscription()._addError$2(error, stackTrace); + }, + _sendDone$0() { + this.get$_subscription()._close$0(); + } + }; + A._AsyncStreamControllerDispatch.prototype = { + _sendData$1(data) { + this.get$_subscription()._addPending$1(new A._DelayedData(data)); + }, + _sendError$2(error, stackTrace) { + this.get$_subscription()._addPending$1(new A._DelayedError(error, stackTrace)); + }, + _sendDone$0() { + this.get$_subscription()._addPending$1(B.C__DelayedDone); + } + }; + A._AsyncStreamController.prototype = {}; + A._SyncStreamController.prototype = {}; + A._ControllerStream.prototype = { + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + return other instanceof A._ControllerStream && other._controller === this._controller; + } + }; + A._ControllerSubscription.prototype = { + _async$_onCancel$0() { + return this._controller._recordCancel$1(this); + }, + _async$_onPause$0() { + this._controller._recordPause$1(this); + }, + _async$_onResume$0() { + this._controller._recordResume$1(this); + } + }; + A._AddStreamState.prototype = { + cancel$0() { + var cancel = this.addSubscription.cancel$0(); + return cancel.whenComplete$1(new A._AddStreamState_cancel_closure(this)); + } + }; + A._AddStreamState_makeErrorHandler_closure.prototype = { + call$2(e, s) { + var t1 = this.controller; + t1._addError$2(e, s); + t1._close$0(); + }, + $signature: 51 + }; + A._AddStreamState_cancel_closure.prototype = { + call$0() { + this.$this.addStreamFuture._asyncComplete$1(null); + }, + $signature: 1 + }; + A._StreamControllerAddStreamState.prototype = {}; + A._BufferingStreamSubscription.prototype = { + _setPendingEvents$1(pendingEvents) { + var _this = this; + if (pendingEvents == null) + return; + _this._pending = pendingEvents; + if (pendingEvents.lastPendingEvent != null) { + _this._state = (_this._state | 128) >>> 0; + pendingEvents.schedule$1(_this); + } + }, + pause$1(_, resumeSignal) { + var t2, t3, _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + t2 = (t1 + 256 | 4) >>> 0; + _this._state = t2; + if (t1 < 256) { + t3 = _this._pending; + if (t3 != null) + if (t3._state === 1) + t3._state = 3; + } + if ((t1 & 4) === 0 && (t2 & 64) === 0) + _this._guardCallback$1(_this.get$_async$_onPause()); + }, + pause$0(_) { + return this.pause$1(0, null); + }, + resume$0(_) { + var _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + if (t1 >= 256) { + t1 = _this._state = t1 - 256; + if (t1 < 256) + if ((t1 & 128) !== 0 && _this._pending.lastPendingEvent != null) + _this._pending.schedule$1(_this); + else { + t1 = (t1 & 4294967291) >>> 0; + _this._state = t1; + if ((t1 & 64) === 0) + _this._guardCallback$1(_this.get$_async$_onResume()); + } + } + }, + cancel$0() { + var _this = this, + t1 = (_this._state & 4294967279) >>> 0; + _this._state = t1; + if ((t1 & 8) === 0) + _this._cancel$0(); + t1 = _this._cancelFuture; + return t1 == null ? $.$get$Future__nullFuture() : t1; + }, + _cancel$0() { + var t2, _this = this, + t1 = _this._state = (_this._state | 8) >>> 0; + if ((t1 & 128) !== 0) { + t2 = _this._pending; + if (t2._state === 1) + t2._state = 3; + } + if ((t1 & 64) === 0) + _this._pending = null; + _this._cancelFuture = _this._async$_onCancel$0(); + }, + _async$_add$1(data) { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 < 64) + this._sendData$1(data); + else + this._addPending$1(new A._DelayedData(data)); + }, + _addError$2(error, stackTrace) { + var t1; + if (type$.Error._is(error)) + A.Primitives_trySetStackTrace(error, stackTrace); + t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 < 64) + this._sendError$2(error, stackTrace); + else + this._addPending$1(new A._DelayedError(error, stackTrace)); + }, + _close$0() { + var _this = this, + t1 = _this._state; + if ((t1 & 8) !== 0) + return; + t1 = (t1 | 2) >>> 0; + _this._state = t1; + if (t1 < 64) + _this._sendDone$0(); + else + _this._addPending$1(B.C__DelayedDone); + }, + _async$_onPause$0() { + }, + _async$_onResume$0() { + }, + _async$_onCancel$0() { + return null; + }, + _addPending$1($event) { + var t1, _this = this, + pending = _this._pending; + if (pending == null) + pending = _this._pending = new A._PendingEvents(); + pending.add$1(0, $event); + t1 = _this._state; + if ((t1 & 128) === 0) { + t1 = (t1 | 128) >>> 0; + _this._state = t1; + if (t1 < 256) + pending.schedule$1(_this); + } + }, + _sendData$1(data) { + var _this = this, + t1 = _this._state; + _this._state = (t1 | 64) >>> 0; + _this._zone.runUnaryGuarded$1$2(_this._onData, data, A._instanceType(_this)._eval$1("_BufferingStreamSubscription.T")); + _this._state = (_this._state & 4294967231) >>> 0; + _this._checkState$1((t1 & 4) !== 0); + }, + _sendError$2(error, stackTrace) { + var cancelFuture, _this = this, + t1 = _this._state, + t2 = new A._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace); + if ((t1 & 1) !== 0) { + _this._state = (t1 | 16) >>> 0; + _this._cancel$0(); + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t2); + else + t2.call$0(); + } else { + t2.call$0(); + _this._checkState$1((t1 & 4) !== 0); + } + }, + _sendDone$0() { + var cancelFuture, _this = this, + t1 = new A._BufferingStreamSubscription__sendDone_sendDone(_this); + _this._cancel$0(); + _this._state = (_this._state | 16) >>> 0; + cancelFuture = _this._cancelFuture; + if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(t1); + else + t1.call$0(); + }, + _guardCallback$1(callback) { + var _this = this, + t1 = _this._state; + _this._state = (t1 | 64) >>> 0; + callback.call$0(); + _this._state = (_this._state & 4294967231) >>> 0; + _this._checkState$1((t1 & 4) !== 0); + }, + _checkState$1(wasInputPaused) { + var t2, isInputPaused, _this = this, + t1 = _this._state; + if ((t1 & 128) !== 0 && _this._pending.lastPendingEvent == null) { + t1 = _this._state = (t1 & 4294967167) >>> 0; + t2 = false; + if ((t1 & 4) !== 0) + if (t1 < 256) { + t2 = _this._pending; + t2 = t2 == null ? null : t2.lastPendingEvent == null; + t2 = t2 !== false; + } + if (t2) { + t1 = (t1 & 4294967291) >>> 0; + _this._state = t1; + } + } + for (;; wasInputPaused = isInputPaused) { + if ((t1 & 8) !== 0) { + _this._pending = null; + return; + } + isInputPaused = (t1 & 4) !== 0; + if (wasInputPaused === isInputPaused) + break; + _this._state = (t1 ^ 64) >>> 0; + if (isInputPaused) + _this._async$_onPause$0(); + else + _this._async$_onResume$0(); + t1 = (_this._state & 4294967231) >>> 0; + _this._state = t1; + } + if ((t1 & 128) !== 0 && t1 < 256) + _this._pending.schedule$1(_this); + }, + $isStreamSubscription: 1 + }; + A._BufferingStreamSubscription__sendError_sendError.prototype = { + call$0() { + var onError, t3, t4, + t1 = this.$this, + t2 = t1._state; + if ((t2 & 8) !== 0 && (t2 & 16) === 0) + return; + t1._state = (t2 | 64) >>> 0; + onError = t1._onError; + t2 = this.error; + t3 = type$.Object; + t4 = t1._zone; + if (type$.void_Function_Object_StackTrace._is(onError)) + t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace); + else + t4.runUnaryGuarded$1$2(onError, t2, t3); + t1._state = (t1._state & 4294967231) >>> 0; + }, + $signature: 0 + }; + A._BufferingStreamSubscription__sendDone_sendDone.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._state; + if ((t2 & 16) === 0) + return; + t1._state = (t2 | 74) >>> 0; + t1._zone.runGuarded$1(t1._onDone); + t1._state = (t1._state & 4294967231) >>> 0; + }, + $signature: 0 + }; + A._StreamImpl.prototype = { + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + return this._controller._subscribe$4(onData, onError, onDone, cancelOnError === true); + }, + listen$1(_, onData) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); + }, + listen$3$onDone$onError(_, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); + } + }; + A._DelayedEvent.prototype = { + get$next() { + return this.next; + }, + set$next(val) { + return this.next = val; + } + }; + A._DelayedData.prototype = { + perform$1(dispatch) { + dispatch._sendData$1(this.value); + } + }; + A._DelayedError.prototype = { + perform$1(dispatch) { + dispatch._sendError$2(this.error, this.stackTrace); + } + }; + A._DelayedDone.prototype = { + perform$1(dispatch) { + dispatch._sendDone$0(); + }, + get$next() { + return null; + }, + set$next(__wc0_formal) { + throw A.wrapException(A.StateError$("No events after a done.")); + } + }; + A._PendingEvents.prototype = { + schedule$1(dispatch) { + var _this = this, + t1 = _this._state; + if (t1 === 1) + return; + if (t1 >= 1) { + _this._state = 1; + return; + } + A.scheduleMicrotask(new A._PendingEvents_schedule_closure(_this, dispatch)); + _this._state = 1; + }, + add$1(_, $event) { + var _this = this, + lastEvent = _this.lastPendingEvent; + if (lastEvent == null) + _this.firstPendingEvent = _this.lastPendingEvent = $event; + else { + lastEvent.set$next($event); + _this.lastPendingEvent = $event; + } + } + }; + A._PendingEvents_schedule_closure.prototype = { + call$0() { + var $event, nextEvent, + t1 = this.$this, + oldState = t1._state; + t1._state = 0; + if (oldState === 3) + return; + $event = t1.firstPendingEvent; + nextEvent = $event.get$next(); + t1.firstPendingEvent = nextEvent; + if (nextEvent == null) + t1.lastPendingEvent = null; + $event.perform$1(this.dispatch); + }, + $signature: 0 + }; + A._StreamIterator.prototype = { + get$current(_) { + if (this._async$_hasValue) + return this._stateData; + return null; + }, + moveNext$0() { + var future, _this = this, + subscription = _this._subscription; + if (subscription != null) { + if (_this._async$_hasValue) { + future = new A._Future($.Zone__current, type$._Future_bool); + _this._stateData = future; + _this._async$_hasValue = false; + subscription.resume$0(0); + return future; + } + throw A.wrapException(A.StateError$("Already waiting for next.")); + } + return _this._initializeOrDone$0(); + }, + _initializeOrDone$0() { + var future, subscription, _this = this, + stateData = _this._stateData; + if (stateData != null) { + future = new A._Future($.Zone__current, type$._Future_bool); + _this._stateData = future; + subscription = stateData.listen$4$cancelOnError$onDone$onError(0, _this.get$_onData(), true, _this.get$_onDone(), _this.get$_onError()); + if (_this._stateData != null) + _this._subscription = subscription; + return future; + } + return $.$get$Future__falseFuture(); + }, + cancel$0() { + var _this = this, + subscription = _this._subscription, + stateData = _this._stateData; + _this._stateData = null; + if (subscription != null) { + _this._subscription = null; + if (!_this._async$_hasValue) + stateData._asyncComplete$1(false); + else + _this._async$_hasValue = false; + return subscription.cancel$0(); + } + return $.$get$Future__nullFuture(); + }, + _onData$1(data) { + var moveNextFuture, t1, _this = this; + if (_this._subscription == null) + return; + moveNextFuture = _this._stateData; + _this._stateData = data; + _this._async$_hasValue = true; + moveNextFuture._complete$1(true); + if (_this._async$_hasValue) { + t1 = _this._subscription; + if (t1 != null) + t1.pause$0(0); + } + }, + _onError$2(error, stackTrace) { + var _this = this, + subscription = _this._subscription, + moveNextFuture = _this._stateData; + _this._stateData = _this._subscription = null; + if (subscription != null) + moveNextFuture._completeErrorObject$1(new A.AsyncError(error, stackTrace)); + else + moveNextFuture._asyncCompleteErrorObject$1(new A.AsyncError(error, stackTrace)); + }, + _onDone$0() { + var _this = this, + subscription = _this._subscription, + moveNextFuture = _this._stateData; + _this._stateData = _this._subscription = null; + if (subscription != null) + moveNextFuture._completeWithValue$1(false); + else + moveNextFuture._asyncCompleteWithValue$1(false); + } + }; + A._ForwardingStream.prototype = { + get$isBroadcast() { + return this._async$_source.get$isBroadcast(); + }, + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + var t1 = this.$ti, + t2 = $.Zone__current, + t3 = cancelOnError === true ? 1 : 0, + t4 = onError != null ? 32 : 0, + t5 = A._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._rest[1]), + t6 = A._BufferingStreamSubscription__registerErrorHandler(t2, onError), + t7 = onDone == null ? A.async___nullDoneHandler$closure() : onDone; + t1 = new A._ForwardingStreamSubscription(this, t5, t6, t2.registerCallback$1$1(t7, type$.void), t2, t3 | t4, t1._eval$1("_ForwardingStreamSubscription<1,2>")); + t1._subscription = this._async$_source.listen$3$onDone$onError(0, t1.get$_handleData(), t1.get$_handleDone(), t1.get$_handleError()); + return t1; + }, + listen$1(_, onData) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); + }, + listen$3$onDone$onError(_, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); + } + }; + A._ForwardingStreamSubscription.prototype = { + _async$_add$1(data) { + if ((this._state & 2) !== 0) + return; + this.super$_BufferingStreamSubscription$_add(data); + }, + _addError$2(error, stackTrace) { + if ((this._state & 2) !== 0) + return; + this.super$_BufferingStreamSubscription$_addError(error, stackTrace); + }, + _async$_onPause$0() { + var t1 = this._subscription; + if (t1 != null) + t1.pause$0(0); + }, + _async$_onResume$0() { + var t1 = this._subscription; + if (t1 != null) + t1.resume$0(0); + }, + _async$_onCancel$0() { + var subscription = this._subscription; + if (subscription != null) { + this._subscription = null; + return subscription.cancel$0(); + } + return null; + }, + _handleData$1(data) { + this._stream._handleData$2(data, this); + }, + _handleError$2(error, stackTrace) { + this._addError$2(error, stackTrace); + }, + _handleDone$0() { + this._close$0(); + } + }; + A._MapStream.prototype = { + _handleData$2(inputEvent, sink) { + var e, s, exception, error, stackTrace, replacement, outputEvent = null; + try { + outputEvent = this._transform.call$1(inputEvent); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + error = e; + stackTrace = s; + replacement = A._interceptError(error, stackTrace); + if (replacement != null) { + error = replacement.error; + stackTrace = replacement.stackTrace; + } + sink._addError$2(error, stackTrace); + return; + } + sink._async$_add$1(outputEvent); + } + }; + A._ZoneFunction.prototype = {}; + A._Zone.prototype = { + _processUncaughtError$3(zone, error, stackTrace) { + var handler, parentDelegate, parentZone, currentZone, e, s, t1, exception, + implementation = this.get$_handleUncaughtError(), + implZone = implementation.zone; + if (implZone === B.C__RootZone) { + A._rootHandleError(error, stackTrace); + return; + } + handler = implementation.$function; + parentDelegate = implZone.get$_parentDelegate(); + t1 = J.get$parent$z(implZone); + t1.toString; + parentZone = t1; + currentZone = $.Zone__current; + try { + $.Zone__current = parentZone; + handler.call$5(implZone, parentDelegate, zone, error, stackTrace); + $.Zone__current = currentZone; + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + $.Zone__current = currentZone; + t1 = error === e ? stackTrace : s; + parentZone._processUncaughtError$3(implZone, e, t1); + } + }, + $isZone: 1 + }; + A._CustomZone.prototype = { + get$_delegate() { + var t1 = this._delegateCache; + return t1 == null ? this._delegateCache = new A._ZoneDelegate(this) : t1; + }, + get$_parentDelegate() { + return this.parent.get$_delegate(); + }, + get$errorZone() { + return this._handleUncaughtError.zone; + }, + runGuarded$1(f) { + var e, s, exception; + try { + this.run$1$1(0, f, type$.void); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + runUnaryGuarded$1$2(f, arg, $T) { + var e, s, exception; + try { + this.runUnary$2$2(f, arg, type$.void, $T); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + runBinaryGuarded$2$3(f, arg1, arg2, $T1, $T2) { + var e, s, exception; + try { + this.runBinary$3$3(f, arg1, arg2, type$.void, $T1, $T2); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + this._processUncaughtError$3(this, e, s); + } + }, + bindCallback$1$1(f, $R) { + return new A._CustomZone_bindCallback_closure(this, this.registerCallback$1$1(f, $R), $R); + }, + bindUnaryCallback$2$1(f, $R, $T) { + return new A._CustomZone_bindUnaryCallback_closure(this, this.registerUnaryCallback$2$1(f, $R, $T), $T, $R); + }, + bindCallbackGuarded$1(f) { + return new A._CustomZone_bindCallbackGuarded_closure(this, this.registerCallback$1$1(f, type$.void)); + }, + $index(_, key) { + var value, + t1 = this._async$_map, + result = t1.$index(0, key); + if (result != null || t1.containsKey$1(key)) + return result; + value = this.parent.$index(0, key); + if (value != null) + t1.$indexSet(0, key, value); + return value; + }, + handleUncaughtError$2(error, stackTrace) { + this._processUncaughtError$3(this, error, stackTrace); + }, + fork$2$specification$zoneValues(specification, zoneValues) { + var implementation = this._fork, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, specification, zoneValues); + }, + run$1$1(_, f) { + var implementation = this._run, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); + }, + runUnary$2$2(f, arg) { + var implementation = this._runUnary, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, f, arg); + }, + runBinary$3$3(f, arg1, arg2) { + var implementation = this._runBinary, + t1 = implementation.zone; + return implementation.$function.call$6(t1, t1.get$_parentDelegate(), this, f, arg1, arg2); + }, + registerCallback$1$1(callback) { + var implementation = this._registerCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + registerUnaryCallback$2$1(callback) { + var implementation = this._registerUnaryCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + registerBinaryCallback$3$1(callback) { + var implementation = this._registerBinaryCallback, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, callback); + }, + errorCallback$2(error, stackTrace) { + var implementation = this._errorCallback, + implementationZone = implementation.zone; + if (implementationZone === B.C__RootZone) + return null; + return implementation.$function.call$5(implementationZone, implementationZone.get$_parentDelegate(), this, error, stackTrace); + }, + scheduleMicrotask$1(f) { + var implementation = this._scheduleMicrotask, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, f); + }, + createTimer$2(duration, f) { + var implementation = this._createTimer, + t1 = implementation.zone; + return implementation.$function.call$5(t1, t1.get$_parentDelegate(), this, duration, f); + }, + print$1(line) { + var implementation = this._print, + t1 = implementation.zone; + return implementation.$function.call$4(t1, t1.get$_parentDelegate(), this, line); + }, + get$_run() { + return this._run; + }, + get$_runUnary() { + return this._runUnary; + }, + get$_runBinary() { + return this._runBinary; + }, + get$_registerCallback() { + return this._registerCallback; + }, + get$_registerUnaryCallback() { + return this._registerUnaryCallback; + }, + get$_registerBinaryCallback() { + return this._registerBinaryCallback; + }, + get$_errorCallback() { + return this._errorCallback; + }, + get$_scheduleMicrotask() { + return this._scheduleMicrotask; + }, + get$_createTimer() { + return this._createTimer; + }, + get$_createPeriodicTimer() { + return this._createPeriodicTimer; + }, + get$_print() { + return this._print; + }, + get$_fork() { + return this._fork; + }, + get$_handleUncaughtError() { + return this._handleUncaughtError; + }, + get$parent(receiver) { + return this.parent; + }, + get$_async$_map() { + return this._async$_map; + } + }; + A._CustomZone_bindCallback_closure.prototype = { + call$0() { + return this.$this.run$1$1(0, this.registered, this.R); + }, + $signature() { + return this.R._eval$1("0()"); + } + }; + A._CustomZone_bindUnaryCallback_closure.prototype = { + call$1(arg) { + var _this = this; + return _this.$this.runUnary$2$2(_this.registered, arg, _this.R, _this.T); + }, + $signature() { + return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); + } + }; + A._CustomZone_bindCallbackGuarded_closure.prototype = { + call$0() { + return this.$this.runGuarded$1(this.registered); + }, + $signature: 0 + }; + A._RootZone.prototype = { + get$_run() { + return B._ZoneFunction__RootZone__rootRun; + }, + get$_runUnary() { + return B._ZoneFunction__RootZone__rootRunUnary; + }, + get$_runBinary() { + return B._ZoneFunction__RootZone__rootRunBinary; + }, + get$_registerCallback() { + return B._ZoneFunction__RootZone__rootRegisterCallback; + }, + get$_registerUnaryCallback() { + return B._ZoneFunction_Xkh; + }, + get$_registerBinaryCallback() { + return B._ZoneFunction_e9o; + }, + get$_errorCallback() { + return B._ZoneFunction__RootZone__rootErrorCallback; + }, + get$_scheduleMicrotask() { + return B._ZoneFunction__RootZone__rootScheduleMicrotask; + }, + get$_createTimer() { + return B._ZoneFunction__RootZone__rootCreateTimer; + }, + get$_createPeriodicTimer() { + return B._ZoneFunction_PAY; + }, + get$_print() { + return B._ZoneFunction__RootZone__rootPrint; + }, + get$_fork() { + return B._ZoneFunction__RootZone__rootFork; + }, + get$_handleUncaughtError() { + return B._ZoneFunction_KjJ; + }, + get$parent(_) { + return null; + }, + get$_async$_map() { + return $.$get$_RootZone__rootMap(); + }, + get$_delegate() { + var t1 = $._RootZone__rootDelegate; + return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; + }, + get$_parentDelegate() { + var t1 = $._RootZone__rootDelegate; + return t1 == null ? $._RootZone__rootDelegate = new A._ZoneDelegate(this) : t1; + }, + get$errorZone() { + return this; + }, + runGuarded$1(f) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$0(); + return; + } + A._rootRun(null, null, this, f); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + runUnaryGuarded$1$2(f, arg) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$1(arg); + return; + } + A._rootRunUnary(null, null, this, f, arg); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + runBinaryGuarded$2$3(f, arg1, arg2) { + var e, s, exception; + try { + if (B.C__RootZone === $.Zone__current) { + f.call$2(arg1, arg2); + return; + } + A._rootRunBinary(null, null, this, f, arg1, arg2); + } catch (exception) { + e = A.unwrapException(exception); + s = A.getTraceFromException(exception); + A._rootHandleError(e, s); + } + }, + bindCallback$1$1(f, $R) { + return new A._RootZone_bindCallback_closure(this, f, $R); + }, + bindUnaryCallback$2$1(f, $R, $T) { + return new A._RootZone_bindUnaryCallback_closure(this, f, $T, $R); + }, + bindCallbackGuarded$1(f) { + return new A._RootZone_bindCallbackGuarded_closure(this, f); + }, + $index(_, key) { + return null; + }, + handleUncaughtError$2(error, stackTrace) { + A._rootHandleError(error, stackTrace); + }, + fork$2$specification$zoneValues(specification, zoneValues) { + return A._rootFork(null, null, this, specification, zoneValues); + }, + run$1$1(_, f) { + if ($.Zone__current === B.C__RootZone) + return f.call$0(); + return A._rootRun(null, null, this, f); + }, + runUnary$2$2(f, arg) { + if ($.Zone__current === B.C__RootZone) + return f.call$1(arg); + return A._rootRunUnary(null, null, this, f, arg); + }, + runBinary$3$3(f, arg1, arg2) { + if ($.Zone__current === B.C__RootZone) + return f.call$2(arg1, arg2); + return A._rootRunBinary(null, null, this, f, arg1, arg2); + }, + registerCallback$1$1(f) { + return f; + }, + registerUnaryCallback$2$1(f) { + return f; + }, + registerBinaryCallback$3$1(f) { + return f; + }, + errorCallback$2(error, stackTrace) { + return null; + }, + scheduleMicrotask$1(f) { + A._rootScheduleMicrotask(null, null, this, f); + }, + createTimer$2(duration, f) { + return A.Timer__createTimer(duration, f); + }, + print$1(line) { + A.printString(line); + } + }; + A._RootZone_bindCallback_closure.prototype = { + call$0() { + return this.$this.run$1$1(0, this.f, this.R); + }, + $signature() { + return this.R._eval$1("0()"); + } + }; + A._RootZone_bindUnaryCallback_closure.prototype = { + call$1(arg) { + var _this = this; + return _this.$this.runUnary$2$2(_this.f, arg, _this.R, _this.T); + }, + $signature() { + return this.R._eval$1("@<0>")._bind$1(this.T)._eval$1("1(2)"); + } + }; + A._RootZone_bindCallbackGuarded_closure.prototype = { + call$0() { + return this.$this.runGuarded$1(this.f); + }, + $signature: 0 + }; + A._ZoneDelegate.prototype = {$isZoneDelegate: 1}; + A._rootHandleError_closure.prototype = { + call$0() { + A.Error_throwWithStackTrace(this.error, this.stackTrace); + }, + $signature: 0 + }; + A._ZoneSpecification.prototype = {$isZoneSpecification: 1}; + A._HashMap.prototype = { + get$length(_) { + return this._collection$_length; + }, + get$isEmpty(_) { + return this._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._collection$_length !== 0; + }, + get$keys(_) { + return new A._HashMapKeyIterable(this, A._instanceType(this)._eval$1("_HashMapKeyIterable<1>")); + }, + get$values(_) { + var t1 = A._instanceType(this); + return A.MappedIterable_MappedIterable(new A._HashMapKeyIterable(this, t1._eval$1("_HashMapKeyIterable<1>")), new A._HashMap_values_closure(this), t1._precomputed1, t1._rest[1]); + }, + containsKey$1(key) { + var strings, nums; + if (typeof key == "string" && key !== "__proto__") { + strings = this._collection$_strings; + return strings == null ? false : strings[key] != null; + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._collection$_nums; + return nums == null ? false : nums[key] != null; + } else + return this._containsKey$1(key); + }, + _containsKey$1(key) { + var rest = this._collection$_rest; + if (rest == null) + return false; + return this._findBucketIndex$2(this._getBucket$2(rest, key), key) >= 0; + }, + addAll$1(_, other) { + other.forEach$1(0, new A._HashMap_addAll_closure(this)); + }, + $index(_, key) { + var strings, t1, nums; + if (typeof key == "string" && key !== "__proto__") { + strings = this._collection$_strings; + t1 = strings == null ? null : A._HashMap__getTableEntry(strings, key); + return t1; + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = this._collection$_nums; + t1 = nums == null ? null : A._HashMap__getTableEntry(nums, key); + return t1; + } else + return this._get$1(key); + }, + _get$1(key) { + var bucket, index, + rest = this._collection$_rest; + if (rest == null) + return null; + bucket = this._getBucket$2(rest, key); + index = this._findBucketIndex$2(bucket, key); + return index < 0 ? null : bucket[index + 1]; + }, + $indexSet(_, key, value) { + var strings, nums, _this = this; + if (typeof key == "string" && key !== "__proto__") { + strings = _this._collection$_strings; + _this._collection$_addHashTableEntry$3(strings == null ? _this._collection$_strings = A._HashMap__newHashTable() : strings, key, value); + } else if (typeof key == "number" && (key & 1073741823) === key) { + nums = _this._collection$_nums; + _this._collection$_addHashTableEntry$3(nums == null ? _this._collection$_nums = A._HashMap__newHashTable() : nums, key, value); + } else + _this._set$2(key, value); + }, + _set$2(key, value) { + var hash, bucket, index, _this = this, + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._HashMap__newHashTable(); + hash = _this._computeHashCode$1(key); + bucket = rest[hash]; + if (bucket == null) { + A._HashMap__setTableEntry(rest, hash, [key, value]); + ++_this._collection$_length; + _this._collection$_keys = null; + } else { + index = _this._findBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index + 1] = value; + else { + bucket.push(key, value); + ++_this._collection$_length; + _this._collection$_keys = null; + } + } + }, + remove$1(_, key) { + var _this = this; + if (typeof key == "string" && key !== "__proto__") + return _this._removeHashTableEntry$2(_this._collection$_strings, key); + else if (typeof key == "number" && (key & 1073741823) === key) + return _this._removeHashTableEntry$2(_this._collection$_nums, key); + else + return _this._remove$1(key); + }, + _remove$1(key) { + var hash, bucket, index, result, _this = this, + rest = _this._collection$_rest; + if (rest == null) + return null; + hash = _this._computeHashCode$1(key); + bucket = rest[hash]; + index = _this._findBucketIndex$2(bucket, key); + if (index < 0) + return null; + --_this._collection$_length; + _this._collection$_keys = null; + result = bucket.splice(index, 2)[1]; + if (0 === bucket.length) + delete rest[hash]; + return result; + }, + forEach$1(_, action) { + var $length, t1, i, key, t2, _this = this, + keys = _this._computeKeys$0(); + for ($length = keys.length, t1 = A._instanceType(_this)._rest[1], i = 0; i < $length; ++i) { + key = keys[i]; + t2 = _this.$index(0, key); + action.call$2(key, t2 == null ? t1._as(t2) : t2); + if (keys !== _this._collection$_keys) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + }, + _computeKeys$0() { + var strings, index, names, entries, i, nums, rest, bucket, $length, i0, _this = this, + result = _this._collection$_keys; + if (result != null) + return result; + result = A.List_List$filled(_this._collection$_length, null, false, type$.dynamic); + strings = _this._collection$_strings; + index = 0; + if (strings != null) { + names = Object.getOwnPropertyNames(strings); + entries = names.length; + for (i = 0; i < entries; ++i) { + result[index] = names[i]; + ++index; + } + } + nums = _this._collection$_nums; + if (nums != null) { + names = Object.getOwnPropertyNames(nums); + entries = names.length; + for (i = 0; i < entries; ++i) { + result[index] = +names[i]; + ++index; + } + } + rest = _this._collection$_rest; + if (rest != null) { + names = Object.getOwnPropertyNames(rest); + entries = names.length; + for (i = 0; i < entries; ++i) { + bucket = rest[names[i]]; + $length = bucket.length; + for (i0 = 0; i0 < $length; i0 += 2) { + result[index] = bucket[i0]; + ++index; + } + } + } + return _this._collection$_keys = result; + }, + _collection$_addHashTableEntry$3(table, key, value) { + if (table[key] == null) { + ++this._collection$_length; + this._collection$_keys = null; + } + A._HashMap__setTableEntry(table, key, value); + }, + _removeHashTableEntry$2(table, key) { + var value; + if (table != null && table[key] != null) { + value = A._HashMap__getTableEntry(table, key); + delete table[key]; + --this._collection$_length; + this._collection$_keys = null; + return value; + } else + return null; + }, + _computeHashCode$1(key) { + return J.get$hashCode$(key) & 1073741823; + }, + _getBucket$2(table, key) { + return table[this._computeHashCode$1(key)]; + }, + _findBucketIndex$2(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; i += 2) + if (J.$eq$(bucket[i], key)) + return i; + return -1; + } + }; + A._HashMap_values_closure.prototype = { + call$1(each) { + var t1 = this.$this, + t2 = t1.$index(0, each); + return t2 == null ? A._instanceType(t1)._rest[1]._as(t2) : t2; + }, + $signature() { + return A._instanceType(this.$this)._eval$1("2(1)"); + } + }; + A._HashMap_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(1,2)"); + } + }; + A._IdentityHashMap.prototype = { + _computeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + _findBucketIndex$2(bucket, key) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; i += 2) { + t1 = bucket[i]; + if (t1 == null ? key == null : t1 === key) + return i; + } + return -1; + } + }; + A._HashMapKeyIterable.prototype = { + get$length(_) { + return this._map._collection$_length; + }, + get$isEmpty(_) { + return this._map._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._map._collection$_length !== 0; + }, + get$iterator(_) { + var t1 = this._map; + return new A._HashMapKeyIterator(t1, t1._computeKeys$0(), this.$ti._eval$1("_HashMapKeyIterator<1>")); + }, + contains$1(_, element) { + return this._map.containsKey$1(element); + } + }; + A._HashMapKeyIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + keys = _this._collection$_keys, + offset = _this._offset, + t1 = _this._map; + if (keys !== t1._collection$_keys) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + else if (offset >= keys.length) { + _this._collection$_current = null; + return false; + } else { + _this._collection$_current = keys[offset]; + _this._offset = offset + 1; + return true; + } + } + }; + A._LinkedCustomHashMap.prototype = { + $index(_, key) { + if (!this._validKey.call$1(key)) + return null; + return this.super$JsLinkedHashMap$internalGet(key); + }, + $indexSet(_, key, value) { + this.super$JsLinkedHashMap$internalSet(key, value); + }, + containsKey$1(key) { + if (!this._validKey.call$1(key)) + return false; + return this.super$JsLinkedHashMap$internalContainsKey(key); + }, + remove$1(_, key) { + if (!this._validKey.call$1(key)) + return null; + return this.super$JsLinkedHashMap$internalRemove(key); + }, + internalComputeHashCode$1(key) { + return this._hashCode.call$1(key) & 1073741823; + }, + internalFindBucketIndex$2(bucket, key) { + var $length, t1, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (t1 = this._equals, i = 0; i < $length; ++i) + if (t1.call$2(bucket[i].hashMapCellKey, key)) + return i; + return -1; + } + }; + A._LinkedCustomHashMap_closure.prototype = { + call$1(v) { + return this.K._is(v); + }, + $signature: 9 + }; + A._LinkedHashSet.prototype = { + _newSet$0() { + return new A._LinkedHashSet(A._instanceType(this)._eval$1("_LinkedHashSet<1>")); + }, + _newSimilarSet$1$0($R) { + return new A._LinkedHashSet($R._eval$1("_LinkedHashSet<0>")); + }, + _newSimilarSet$0() { + return this._newSimilarSet$1$0(type$.dynamic); + }, + get$iterator(_) { + var _this = this, + t1 = new A._LinkedHashSetIterator(_this, _this._collection$_modifications, A._instanceType(_this)._eval$1("_LinkedHashSetIterator<1>")); + t1._collection$_cell = _this._collection$_first; + return t1; + }, + get$length(_) { + return this._collection$_length; + }, + get$isEmpty(_) { + return this._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._collection$_length !== 0; + }, + contains$1(_, object) { + var strings, nums; + if (typeof object == "string" && object !== "__proto__") { + strings = this._collection$_strings; + if (strings == null) + return false; + return strings[object] != null; + } else if (typeof object == "number" && (object & 1073741823) === object) { + nums = this._collection$_nums; + if (nums == null) + return false; + return nums[object] != null; + } else + return this._contains$1(object); + }, + _contains$1(object) { + var rest = this._collection$_rest; + if (rest == null) + return false; + return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], object) >= 0; + }, + get$first(_) { + var first = this._collection$_first; + if (first == null) + throw A.wrapException(A.StateError$("No elements")); + return first._element; + }, + get$last(_) { + var last = this._collection$_last; + if (last == null) + throw A.wrapException(A.StateError$("No elements")); + return last._element; + }, + add$1(_, element) { + var strings, nums, _this = this; + if (typeof element == "string" && element !== "__proto__") { + strings = _this._collection$_strings; + return _this._collection$_addHashTableEntry$2(strings == null ? _this._collection$_strings = A._LinkedHashSet__newHashTable() : strings, element); + } else if (typeof element == "number" && (element & 1073741823) === element) { + nums = _this._collection$_nums; + return _this._collection$_addHashTableEntry$2(nums == null ? _this._collection$_nums = A._LinkedHashSet__newHashTable() : nums, element); + } else + return _this._add$1(element); + }, + _add$1(element) { + var hash, bucket, _this = this, + rest = _this._collection$_rest; + if (rest == null) + rest = _this._collection$_rest = A._LinkedHashSet__newHashTable(); + hash = _this._computeHashCode$1(element); + bucket = rest[hash]; + if (bucket == null) + rest[hash] = [_this._collection$_newLinkedCell$1(element)]; + else { + if (_this._findBucketIndex$2(bucket, element) >= 0) + return false; + bucket.push(_this._collection$_newLinkedCell$1(element)); + } + return true; + }, + remove$1(_, object) { + var _this = this; + if (typeof object == "string" && object !== "__proto__") + return _this._removeHashTableEntry$2(_this._collection$_strings, object); + else if (typeof object == "number" && (object & 1073741823) === object) + return _this._removeHashTableEntry$2(_this._collection$_nums, object); + else + return _this._remove$1(object); + }, + _remove$1(object) { + var hash, bucket, index, cell, _this = this, + rest = _this._collection$_rest; + if (rest == null) + return false; + hash = _this._computeHashCode$1(object); + bucket = rest[hash]; + index = _this._findBucketIndex$2(bucket, object); + if (index < 0) + return false; + cell = bucket.splice(index, 1)[0]; + if (0 === bucket.length) + delete rest[hash]; + _this._unlinkCell$1(cell); + return true; + }, + _collection$_addHashTableEntry$2(table, element) { + if (table[element] != null) + return false; + table[element] = this._collection$_newLinkedCell$1(element); + return true; + }, + _removeHashTableEntry$2(table, element) { + var cell; + if (table == null) + return false; + cell = table[element]; + if (cell == null) + return false; + this._unlinkCell$1(cell); + delete table[element]; + return true; + }, + _collection$_modified$0() { + this._collection$_modifications = this._collection$_modifications + 1 & 1073741823; + }, + _collection$_newLinkedCell$1(element) { + var t1, _this = this, + cell = new A._LinkedHashSetCell(element); + if (_this._collection$_first == null) + _this._collection$_first = _this._collection$_last = cell; + else { + t1 = _this._collection$_last; + t1.toString; + cell._collection$_previous = t1; + _this._collection$_last = t1._collection$_next = cell; + } + ++_this._collection$_length; + _this._collection$_modified$0(); + return cell; + }, + _unlinkCell$1(cell) { + var _this = this, + previous = cell._collection$_previous, + next = cell._collection$_next; + if (previous == null) + _this._collection$_first = next; + else + previous._collection$_next = next; + if (next == null) + _this._collection$_last = previous; + else + next._collection$_previous = previous; + --_this._collection$_length; + _this._collection$_modified$0(); + }, + _computeHashCode$1(element) { + return J.get$hashCode$(element) & 1073741823; + }, + _findBucketIndex$2(bucket, element) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i]._element, element)) + return i; + return -1; + } + }; + A._LinkedIdentityHashSet.prototype = { + _newSet$0() { + return new A._LinkedIdentityHashSet(this.$ti); + }, + _newSimilarSet$1$0($R) { + return new A._LinkedIdentityHashSet($R._eval$1("_LinkedIdentityHashSet<0>")); + }, + _newSimilarSet$0() { + return this._newSimilarSet$1$0(type$.dynamic); + }, + _computeHashCode$1(key) { + return A.objectHashCode(key) & 1073741823; + }, + _findBucketIndex$2(bucket, element) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) { + t1 = bucket[i]._element; + if (t1 == null ? element == null : t1 === element) + return i; + } + return -1; + } + }; + A._LinkedHashSetCell.prototype = {}; + A._LinkedHashSetIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var _this = this, + cell = _this._collection$_cell, + t1 = _this._set; + if (_this._collection$_modifications !== t1._collection$_modifications) + throw A.wrapException(A.ConcurrentModificationError$(t1)); + else if (cell == null) { + _this._collection$_current = null; + return false; + } else { + _this._collection$_current = cell._element; + _this._collection$_cell = cell._collection$_next; + return true; + } + } + }; + A.UnmodifiableListView.prototype = { + cast$1$0(_, $R) { + return new A.UnmodifiableListView(J.cast$1$0$ax(this._collection$_source, $R), $R._eval$1("UnmodifiableListView<0>")); + }, + get$length(_) { + return J.get$length$asx(this._collection$_source); + }, + $index(_, index) { + return J.elementAt$1$ax(this._collection$_source, index); + } + }; + A.HashMap_HashMap$from_closure.prototype = { + call$2(k, v) { + this.result.$indexSet(0, this.K._as(k), this.V._as(v)); + }, + $signature: 159 + }; + A.LinkedHashMap_LinkedHashMap$from_closure.prototype = { + call$2(k, v) { + this.result.$indexSet(0, this.K._as(k), this.V._as(v)); + }, + $signature: 159 + }; + A.ListBase.prototype = { + get$iterator(receiver) { + return new A.ListIterator(receiver, this.get$length(receiver), A.instanceType(receiver)._eval$1("ListIterator")); + }, + elementAt$1(receiver, index) { + return this.$index(receiver, index); + }, + forEach$1(receiver, action) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + action.call$1(this.$index(receiver, i)); + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + }, + get$isEmpty(receiver) { + return this.get$length(receiver) === 0; + }, + get$isNotEmpty(receiver) { + return !this.get$isEmpty(receiver); + }, + get$first(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.$index(receiver, 0); + }, + get$last(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + return this.$index(receiver, this.get$length(receiver) - 1); + }, + get$single(receiver) { + if (this.get$length(receiver) === 0) + throw A.wrapException(A.IterableElementError_noElement()); + if (this.get$length(receiver) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + return this.$index(receiver, 0); + }, + contains$1(receiver, element) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (J.$eq$(this.$index(receiver, i), element)) + return true; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + every$1(receiver, test) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (!test.call$1(this.$index(receiver, i))) + return false; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return true; + }, + any$1(receiver, test) { + var i, + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + if (test.call$1(this.$index(receiver, i))) + return true; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + return false; + }, + lastWhere$2$orElse(receiver, test, orElse) { + var i, element, + $length = this.get$length(receiver); + for (i = $length - 1; i >= 0; --i) { + element = this.$index(receiver, i); + if (test.call$1(element)) + return element; + if ($length !== this.get$length(receiver)) + throw A.wrapException(A.ConcurrentModificationError$(receiver)); + } + if (orElse != null) + return orElse.call$0(); + throw A.wrapException(A.IterableElementError_noElement()); + }, + join$1(receiver, separator) { + var t1; + if (this.get$length(receiver) === 0) + return ""; + t1 = A.StringBuffer__writeAll("", receiver, separator); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + where$1(receiver, test) { + return new A.WhereIterable(receiver, test, A.instanceType(receiver)._eval$1("WhereIterable")); + }, + map$1$1(receiver, f, $T) { + return new A.MappedListIterable(receiver, f, A.instanceType(receiver)._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); + }, + expand$1$1(receiver, f, $T) { + return new A.ExpandIterable(receiver, f, A.instanceType(receiver)._eval$1("@")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + skip$1(receiver, count) { + return A.SubListIterable$(receiver, count, null, A.instanceType(receiver)._eval$1("ListBase.E")); + }, + take$1(receiver, count) { + return A.SubListIterable$(receiver, 0, A.checkNotNullable(count, "count", type$.int), A.instanceType(receiver)._eval$1("ListBase.E")); + }, + toList$1$growable(receiver, growable) { + var t1, first, result, i, _this = this; + if (_this.get$isEmpty(receiver)) { + t1 = J.JSArray_JSArray$growable(0, A.instanceType(receiver)._eval$1("ListBase.E")); + return t1; + } + first = _this.$index(receiver, 0); + result = A.List_List$filled(_this.get$length(receiver), first, true, A.instanceType(receiver)._eval$1("ListBase.E")); + for (i = 1; i < _this.get$length(receiver); ++i) + result[i] = _this.$index(receiver, i); + return result; + }, + toList$0(receiver) { + return this.toList$1$growable(receiver, true); + }, + toSet$0(receiver) { + var i, + result = A.LinkedHashSet_LinkedHashSet(A.instanceType(receiver)._eval$1("ListBase.E")); + for (i = 0; i < this.get$length(receiver); ++i) + result.add$1(0, this.$index(receiver, i)); + return result; + }, + add$1(receiver, element) { + var t1 = this.get$length(receiver); + this.set$length(receiver, t1 + 1); + this.$indexSet(receiver, t1, element); + }, + addAll$1(receiver, iterable) { + var t1, + i = this.get$length(receiver); + for (t1 = iterable.get$iterator(iterable); t1.moveNext$0();) { + this.add$1(receiver, t1.get$current(t1)); + ++i; + } + }, + _closeGap$2(receiver, start, end) { + var i, _this = this, + $length = _this.get$length(receiver), + size = end - start; + for (i = end; i < $length; ++i) + _this.$indexSet(receiver, i - size, _this.$index(receiver, i)); + _this.set$length(receiver, $length - size); + }, + cast$1$0(receiver, $R) { + return new A.CastList(receiver, A.instanceType(receiver)._eval$1("@")._bind$1($R)._eval$1("CastList<1,2>")); + }, + sort$1(receiver, compare) { + var t1 = compare == null ? A.collection_ListBase__compareAny$closure() : compare; + A.Sort__doSort(receiver, 0, this.get$length(receiver) - 1, t1); + }, + sublist$2(receiver, start, end) { + var t1, + listLength = this.get$length(receiver); + A.RangeError_checkValidRange(start, listLength, listLength); + t1 = A.List_List$_of(this.getRange$2(receiver, start, listLength), A.instanceType(receiver)._eval$1("ListBase.E")); + return t1; + }, + sublist$1(receiver, start) { + return this.sublist$2(receiver, start, null); + }, + getRange$2(receiver, start, end) { + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + return A.SubListIterable$(receiver, start, end, A.instanceType(receiver)._eval$1("ListBase.E")); + }, + removeRange$2(receiver, start, end) { + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + if (end > start) + this._closeGap$2(receiver, start, end); + }, + fillRange$3(receiver, start, end, fill) { + var i, + value = fill == null ? A.instanceType(receiver)._eval$1("ListBase.E")._as(fill) : fill; + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + for (i = start; i < end; ++i) + this.$indexSet(receiver, i, value); + }, + setRange$4(receiver, start, end, iterable, skipCount) { + var $length, otherStart, otherList, t1, i; + A.RangeError_checkValidRange(start, end, this.get$length(receiver)); + $length = end - start; + if ($length === 0) + return; + A.RangeError_checkNotNegative(skipCount, "skipCount"); + if (type$.List_dynamic._is(iterable)) { + otherStart = skipCount; + otherList = iterable; + } else { + otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false); + otherStart = 0; + } + t1 = J.getInterceptor$asx(otherList); + if (otherStart + $length > t1.get$length(otherList)) + throw A.wrapException(A.IterableElementError_tooFew()); + if (otherStart < start) + for (i = $length - 1; i >= 0; --i) + this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i)); + else + for (i = 0; i < $length; ++i) + this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i)); + }, + get$reversed(receiver) { + return new A.ReversedListIterable(receiver, A.instanceType(receiver)._eval$1("ReversedListIterable")); + }, + toString$0(receiver) { + return A.Iterable_iterableToFullString(receiver, "[", "]"); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isList: 1 + }; + A.MapBase.prototype = { + cast$2$0(_, $RK, $RV) { + var t1 = A._instanceType(this); + return A.Map_castFrom(this, t1._eval$1("MapBase.K"), t1._eval$1("MapBase.V"), $RK, $RV); + }, + forEach$1(_, action) { + var t1, t2, key, t3, _this = this; + for (t1 = _this.get$keys(_this), t1 = t1.get$iterator(t1), t2 = A._instanceType(_this)._eval$1("MapBase.V"); t1.moveNext$0();) { + key = t1.get$current(t1); + t3 = _this.$index(0, key); + action.call$2(key, t3 == null ? t2._as(t3) : t3); + } + }, + addAll$1(_, other) { + other.forEach$1(0, new A.MapBase_addAll_closure(this)); + }, + get$entries(_) { + var _this = this, + t1 = _this.get$keys(_this); + return t1.map$1$1(t1, new A.MapBase_entries_closure(_this), A._instanceType(_this)._eval$1("MapEntry")); + }, + containsKey$1(key) { + var t1 = this.get$keys(this); + return t1.contains$1(t1, key); + }, + get$length(_) { + var t1 = this.get$keys(this); + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this.get$keys(this); + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this.get$keys(this); + return t1.get$isNotEmpty(t1); + }, + get$values(_) { + return new A._MapBaseValueIterable(this, A._instanceType(this)._eval$1("_MapBaseValueIterable")); + }, + toString$0(_) { + return A.MapBase_mapToString(this); + }, + $isMap: 1 + }; + A.MapBase_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("~(MapBase.K,MapBase.V)"); + } + }; + A.MapBase_entries_closure.prototype = { + call$1(key) { + var t1 = this.$this, + t2 = t1.$index(0, key); + if (t2 == null) + t2 = A._instanceType(t1)._eval$1("MapBase.V")._as(t2); + return new A.MapEntry(key, t2, A._instanceType(t1)._eval$1("MapEntry")); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("MapEntry(MapBase.K)"); + } + }; + A.MapBase_mapToString_closure.prototype = { + call$2(k, v) { + var t2, + t1 = this._box_0; + if (!t1.first) + this.result._contents += ", "; + t1.first = false; + t1 = this.result; + t2 = A.S(k); + t1._contents = (t1._contents += t2) + ": "; + t2 = A.S(v); + t1._contents += t2; + }, + $signature: 162 + }; + A.UnmodifiableMapBase.prototype = {}; + A._MapBaseValueIterable.prototype = { + get$length(_) { + var t1 = this._map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._map; + return t1.get$isNotEmpty(t1); + }, + get$first(_) { + var t1 = this._map, + t2 = t1.get$keys(t1); + t2 = t1.$index(0, t2.get$first(t2)); + return t2 == null ? this.$ti._rest[1]._as(t2) : t2; + }, + get$single(_) { + var t1 = this._map, + t2 = t1.get$keys(t1); + t2 = t1.$index(0, t2.get$single(t2)); + return t2 == null ? this.$ti._rest[1]._as(t2) : t2; + }, + get$last(_) { + var t1 = this._map, + t2 = t1.get$keys(t1); + t2 = t1.$index(0, t2.get$last(t2)); + return t2 == null ? this.$ti._rest[1]._as(t2) : t2; + }, + get$iterator(_) { + var t1 = this._map, + t2 = t1.get$keys(t1); + return new A._MapBaseValueIterator(t2.get$iterator(t2), t1, this.$ti._eval$1("_MapBaseValueIterator<1,2>")); + } + }; + A._MapBaseValueIterator.prototype = { + moveNext$0() { + var _this = this, + t1 = _this._collection$_keys; + if (t1.moveNext$0()) { + _this._collection$_current = _this._map.$index(0, t1.get$current(t1)); + return true; + } + _this._collection$_current = null; + return false; + }, + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._rest[1]._as(t1) : t1; + } + }; + A._UnmodifiableMapMixin.prototype = { + $indexSet(_, key, value) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + }, + addAll$1(_, other) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$("Cannot modify unmodifiable map")); + } + }; + A.MapView.prototype = { + cast$2$0(_, $RK, $RV) { + return this._map.cast$2$0(0, $RK, $RV); + }, + $index(_, key) { + return this._map.$index(0, key); + }, + $indexSet(_, key, value) { + this._map.$indexSet(0, key, value); + }, + addAll$1(_, other) { + this._map.addAll$1(0, other); + }, + containsKey$1(key) { + return this._map.containsKey$1(key); + }, + forEach$1(_, action) { + this._map.forEach$1(0, action); + }, + get$isEmpty(_) { + var t1 = this._map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._map; + return t1.get$isNotEmpty(t1); + }, + get$length(_) { + var t1 = this._map; + return t1.get$length(t1); + }, + get$keys(_) { + var t1 = this._map; + return t1.get$keys(t1); + }, + remove$1(_, key) { + return this._map.remove$1(0, key); + }, + toString$0(_) { + return this._map.toString$0(0); + }, + get$values(_) { + var t1 = this._map; + return t1.get$values(t1); + }, + get$entries(_) { + var t1 = this._map; + return t1.get$entries(t1); + }, + $isMap: 1 + }; + A.UnmodifiableMapView.prototype = { + cast$2$0(_, $RK, $RV) { + return new A.UnmodifiableMapView(this._map.cast$2$0(0, $RK, $RV), $RK._eval$1("@<0>")._bind$1($RV)._eval$1("UnmodifiableMapView<1,2>")); + } + }; + A.ListQueue.prototype = { + get$iterator(_) { + var _this = this; + return new A._ListQueueIterator(_this, _this._tail, _this._modificationCount, _this._head, _this.$ti._eval$1("_ListQueueIterator<1>")); + }, + get$isEmpty(_) { + return this._head === this._tail; + }, + get$length(_) { + return (this._tail - this._head & this._table.length - 1) >>> 0; + }, + get$first(_) { + var _this = this, + t1 = _this._head; + if (t1 === _this._tail) + throw A.wrapException(A.IterableElementError_noElement()); + t1 = _this._table[t1]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + get$last(_) { + var _this = this, + t1 = _this._head, + t2 = _this._tail; + if (t1 === t2) + throw A.wrapException(A.IterableElementError_noElement()); + t1 = _this._table; + t1 = t1[(t2 - 1 & t1.length - 1) >>> 0]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + get$single(_) { + var t1, _this = this; + if (_this._head === _this._tail) + throw A.wrapException(A.IterableElementError_noElement()); + if (_this.get$length(0) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + t1 = _this._table[_this._head]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + elementAt$1(_, index) { + var t1, _this = this; + A.IndexError_check(index, _this.get$length(0), _this, null, null); + t1 = _this._table; + t1 = t1[(_this._head + index & t1.length - 1) >>> 0]; + return t1 == null ? _this.$ti._precomputed1._as(t1) : t1; + }, + toList$1$growable(_, growable) { + var t1, list, t2, t3, i, t4, _this = this, + mask = _this._table.length - 1, + $length = (_this._tail - _this._head & mask) >>> 0; + if ($length === 0) { + t1 = J.JSArray_JSArray$growable(0, _this.$ti._precomputed1); + return t1; + } + t1 = _this.$ti._precomputed1; + list = A.List_List$filled($length, _this.get$first(0), true, t1); + for (t2 = _this._table, t3 = _this._head, i = 0; i < $length; ++i) { + t4 = t2[(t3 + i & mask) >>> 0]; + list[i] = t4 == null ? t1._as(t4) : t4; + } + return list; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + addAll$1(_, elements) { + var newTable, endSpace, preSpace, _this = this, + addCount = elements.length, + $length = _this.get$length(0), + t1 = $length + addCount, + t2 = _this._table, + t3 = t2.length; + if (t1 >= t3) { + newTable = A.List_List$filled(A.ListQueue__nextPowerOf2(t1 + (t1 >>> 1)), null, false, _this.$ti._eval$1("1?")); + _this._tail = _this._collection$_writeToList$1(newTable); + _this._table = newTable; + _this._head = 0; + B.JSArray_methods.setRange$4(newTable, $length, t1, elements, 0); + _this._tail += addCount; + } else { + t1 = _this._tail; + endSpace = t3 - t1; + if (addCount < endSpace) { + B.JSArray_methods.setRange$4(t2, t1, t1 + addCount, elements, 0); + _this._tail += addCount; + } else { + preSpace = addCount - endSpace; + B.JSArray_methods.setRange$4(t2, t1, t1 + endSpace, elements, 0); + B.JSArray_methods.setRange$4(_this._table, 0, preSpace, elements, endSpace); + _this._tail = preSpace; + } + } + ++_this._modificationCount; + }, + clear$0(_) { + var t2, t3, _this = this, + i = _this._head, + t1 = _this._tail; + if (i !== t1) { + for (t2 = _this._table, t3 = t2.length - 1; i !== t1; i = (i + 1 & t3) >>> 0) + t2[i] = null; + _this._head = _this._tail = 0; + ++_this._modificationCount; + } + }, + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); + }, + addFirst$1(value) { + var _this = this, + t1 = _this._head, + t2 = _this._table; + t1 = _this._head = (t1 - 1 & t2.length - 1) >>> 0; + t2[t1] = value; + if (t1 === _this._tail) + _this._grow$0(); + ++_this._modificationCount; + }, + removeFirst$0() { + var t2, result, _this = this, + t1 = _this._head; + if (t1 === _this._tail) + throw A.wrapException(A.IterableElementError_noElement()); + ++_this._modificationCount; + t2 = _this._table; + result = t2[t1]; + if (result == null) + result = _this.$ti._precomputed1._as(result); + t2[t1] = null; + _this._head = (t1 + 1 & t2.length - 1) >>> 0; + return result; + }, + _add$1(element) { + var _this = this, + t1 = _this._table, + t2 = _this._tail; + t1[t2] = element; + t1 = (t2 + 1 & t1.length - 1) >>> 0; + _this._tail = t1; + if (_this._head === t1) + _this._grow$0(); + ++_this._modificationCount; + }, + _grow$0() { + var _this = this, + newTable = A.List_List$filled(_this._table.length * 2, null, false, _this.$ti._eval$1("1?")), + t1 = _this._table, + t2 = _this._head, + split = t1.length - t2; + B.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); + B.JSArray_methods.setRange$4(newTable, split, split + _this._head, _this._table, 0); + _this._head = 0; + _this._tail = _this._table.length; + _this._table = newTable; + }, + _collection$_writeToList$1(target) { + var $length, firstPartSize, _this = this, + t1 = _this._head, + t2 = _this._tail, + t3 = _this._table; + if (t1 <= t2) { + $length = t2 - t1; + B.JSArray_methods.setRange$4(target, 0, $length, t3, t1); + return $length; + } else { + firstPartSize = t3.length - t1; + B.JSArray_methods.setRange$4(target, 0, firstPartSize, t3, t1); + B.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + _this._tail, _this._table, 0); + return _this._tail + firstPartSize; + } + }, + $isQueue: 1 + }; + A._ListQueueIterator.prototype = { + get$current(_) { + var t1 = this._collection$_current; + return t1 == null ? this.$ti._precomputed1._as(t1) : t1; + }, + moveNext$0() { + var t2, _this = this, + t1 = _this._queue; + if (_this._modificationCount !== t1._modificationCount) + A.throwExpression(A.ConcurrentModificationError$(t1)); + t2 = _this._collection$_position; + if (t2 === _this._collection$_end) { + _this._collection$_current = null; + return false; + } + t1 = t1._table; + _this._collection$_current = t1[t2]; + _this._collection$_position = (t2 + 1 & t1.length - 1) >>> 0; + return true; + } + }; + A.SetBase.prototype = { + get$isEmpty(_) { + return this.get$length(this) === 0; + }, + get$isNotEmpty(_) { + return this.get$length(this) !== 0; + }, + addAll$1(_, elements) { + var t1; + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + this.add$1(0, t1.get$current(t1)); + }, + removeAll$1(elements) { + var t1; + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + this.remove$1(0, t1.get$current(t1)); + }, + difference$1(other) { + var t1, t2, element, + result = this.toSet$0(0); + for (t1 = this.get$iterator(this), t2 = other._source; t1.moveNext$0();) { + element = t1.get$current(t1); + if (t2.contains$1(0, element)) + result.remove$1(0, element); + } + return result; + }, + toList$1$growable(_, growable) { + var t1 = A.List_List$_of(this, A._instanceType(this)._precomputed1); + return t1; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + map$1$1(_, f, $T) { + return new A.EfficientLengthMappedIterable(this, f, A._instanceType(this)._eval$1("@<1>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); + }, + get$single(_) { + var it, _this = this; + if (_this.get$length(_this) > 1) + throw A.wrapException(A.IterableElementError_tooMany()); + it = _this.get$iterator(_this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); + }, + where$1(_, f) { + return new A.WhereIterable(this, f, A._instanceType(this)._eval$1("WhereIterable<1>")); + }, + forEach$1(_, f) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + f.call$1(t1.get$current(t1)); + }, + every$1(_, f) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (!f.call$1(t1.get$current(t1))) + return false; + return true; + }, + any$1(_, test) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (test.call$1(t1.get$current(t1))) + return true; + return false; + }, + take$1(_, n) { + return A.TakeIterable_TakeIterable(this, n, A._instanceType(this)._precomputed1); + }, + skip$1(_, n) { + return A.SkipIterable_SkipIterable(this, n, A._instanceType(this)._precomputed1); + }, + get$first(_) { + var it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + get$last(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + do + result = it.get$current(it); + while (it.moveNext$0()); + return result; + }, + elementAt$1(_, index) { + var iterator, skipCount; + A.RangeError_checkNotNegative(index, "index"); + iterator = this.get$iterator(this); + for (skipCount = index; iterator.moveNext$0();) { + if (skipCount === 0) + return iterator.get$current(iterator); + --skipCount; + } + throw A.wrapException(A.IndexError$withLength(index, index - skipCount, this, null, "index")); + }, + $isEfficientLengthIterable: 1, + $isIterable: 1, + $isSet: 1 + }; + A._SetBase.prototype = { + difference$1(other) { + var t1, t2, element, _this = this, + result = _this._newSet$0(); + for (t1 = A._LinkedHashSetIterator$(_this, _this._collection$_modifications, A._instanceType(_this)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + element = t1._collection$_current; + if (element == null) + element = t2._as(element); + if (!other.contains$1(0, element)) + result.add$1(0, element); + } + return result; + }, + intersection$1(other) { + var t1, t2, element, _this = this, + result = _this._newSet$0(); + for (t1 = A._LinkedHashSetIterator$(_this, _this._collection$_modifications, A._instanceType(_this)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + element = t1._collection$_current; + if (element == null) + element = t2._as(element); + if (other.contains$1(0, element)) + result.add$1(0, element); + } + return result; + }, + toSet$0(_) { + var t1 = this._newSet$0(); + t1.addAll$1(0, this); + return t1; + } + }; + A._UnmodifiableSetMixin.prototype = { + add$1(_, value) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + }, + addAll$1(_, elements) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + }, + remove$1(_, value) { + return A._UnmodifiableSetMixin__throwUnmodifiable(); + } + }; + A.UnmodifiableSetView.prototype = { + contains$1(_, element) { + return this._collection$_source.contains$1(0, element); + }, + get$length(_) { + return this._collection$_source._collection$_length; + }, + get$iterator(_) { + var t1 = this._collection$_source; + return A._LinkedHashSetIterator$(t1, t1._collection$_modifications, A._instanceType(t1)._precomputed1); + }, + toSet$0(_) { + return this._collection$_source.toSet$0(0); + } + }; + A._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {}; + A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin.prototype = {}; + A._JsonMap.prototype = { + $index(_, key) { + var result, + t1 = this._processed; + if (t1 == null) + return this._data.$index(0, key); + else if (typeof key != "string") + return null; + else { + result = t1[key]; + return typeof result == "undefined" ? this._process$1(key) : result; + } + }, + get$length(_) { + return this._processed == null ? this._data.__js_helper$_length : this._convert$_computeKeys$0().length; + }, + get$isEmpty(_) { + return this.get$length(0) === 0; + }, + get$isNotEmpty(_) { + return this.get$length(0) > 0; + }, + get$keys(_) { + var t1; + if (this._processed == null) { + t1 = this._data; + return new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")); + } + return new A._JsonMapKeyIterable(this); + }, + get$values(_) { + var t1, _this = this; + if (_this._processed == null) { + t1 = _this._data; + return new A.LinkedHashMapValuesIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapValuesIterable<2>")); + } + return A.MappedIterable_MappedIterable(_this._convert$_computeKeys$0(), new A._JsonMap_values_closure(_this), type$.String, type$.dynamic); + }, + $indexSet(_, key, value) { + var processed, original, _this = this; + if (_this._processed == null) + _this._data.$indexSet(0, key, value); + else if (_this.containsKey$1(key)) { + processed = _this._processed; + processed[key] = value; + original = _this._original; + if (original == null ? processed != null : original !== processed) + original[key] = null; + } else + _this._upgrade$0().$indexSet(0, key, value); + }, + addAll$1(_, other) { + other.forEach$1(0, new A._JsonMap_addAll_closure(this)); + }, + containsKey$1(key) { + if (this._processed == null) + return this._data.containsKey$1(key); + if (typeof key != "string") + return false; + return Object.prototype.hasOwnProperty.call(this._original, key); + }, + remove$1(_, key) { + if (this._processed != null && !this.containsKey$1(key)) + return null; + return this._upgrade$0().remove$1(0, key); + }, + forEach$1(_, f) { + var keys, i, key, value, _this = this; + if (_this._processed == null) + return _this._data.forEach$1(0, f); + keys = _this._convert$_computeKeys$0(); + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + value = _this._processed[key]; + if (typeof value == "undefined") { + value = A._convertJsonToDartLazy(_this._original[key]); + _this._processed[key] = value; + } + f.call$2(key, value); + if (keys !== _this._data) + throw A.wrapException(A.ConcurrentModificationError$(_this)); + } + }, + _convert$_computeKeys$0() { + var keys = this._data; + if (keys == null) + keys = this._data = A._setArrayType(Object.keys(this._original), type$.JSArray_String); + return keys; + }, + _upgrade$0() { + var result, keys, i, t1, key, _this = this; + if (_this._processed == null) + return _this._data; + result = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic); + keys = _this._convert$_computeKeys$0(); + for (i = 0; t1 = keys.length, i < t1; ++i) { + key = keys[i]; + result.$indexSet(0, key, _this.$index(0, key)); + } + if (t1 === 0) + keys.push(""); + else + B.JSArray_methods.clear$0(keys); + _this._original = _this._processed = null; + return _this._data = result; + }, + _process$1(key) { + var result; + if (!Object.prototype.hasOwnProperty.call(this._original, key)) + return null; + result = A._convertJsonToDartLazy(this._original[key]); + return this._processed[key] = result; + } + }; + A._JsonMap_values_closure.prototype = { + call$1(each) { + return this.$this.$index(0, each); + }, + $signature: 186 + }; + A._JsonMap_addAll_closure.prototype = { + call$2(key, value) { + this.$this.$indexSet(0, key, value); + }, + $signature: 140 + }; + A._JsonMapKeyIterable.prototype = { + get$length(_) { + return this._convert$_parent.get$length(0); + }, + elementAt$1(_, index) { + var t1 = this._convert$_parent; + return t1._processed == null ? t1.get$keys(0).elementAt$1(0, index) : t1._convert$_computeKeys$0()[index]; + }, + get$iterator(_) { + var t1 = this._convert$_parent; + if (t1._processed == null) { + t1 = t1.get$keys(0); + t1 = t1.get$iterator(t1); + } else { + t1 = t1._convert$_computeKeys$0(); + t1 = new J.ArrayIterator(t1, t1.length, A._arrayInstanceType(t1)._eval$1("ArrayIterator<1>")); + } + return t1; + }, + contains$1(_, key) { + return this._convert$_parent.containsKey$1(key); + } + }; + A._Utf8Decoder__decoder_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = new TextDecoder("utf-8", {fatal: true}); + return t1; + } catch (exception) { + } + return null; + }, + $signature: 64 + }; + A._Utf8Decoder__decoderNonfatal_closure.prototype = { + call$0() { + var t1, exception; + try { + t1 = new TextDecoder("utf-8", {fatal: false}); + return t1; + } catch (exception) { + } + return null; + }, + $signature: 64 + }; + A.AsciiCodec.prototype = { + encode$1(source) { + return B.AsciiEncoder_127.convert$1(source); + } + }; + A._UnicodeSubsetEncoder.prototype = { + convert$1(string) { + var t1, i, codeUnit, + end = A.RangeError_checkValidRange(0, null, string.length), + result = new Uint8Array(end); + for (t1 = ~this._subsetMask, i = 0; i < end; ++i) { + codeUnit = string.charCodeAt(i); + if ((codeUnit & t1) !== 0) + throw A.wrapException(A.ArgumentError$value(string, "string", "Contains invalid characters.")); + result[i] = codeUnit; + } + return result; + } + }; + A.AsciiEncoder.prototype = {}; + A.Base64Codec.prototype = { + normalize$3(source, start, end) { + var inverseAlphabet, i, sliceStart, buffer, firstPadding, firstPaddingSourceIndex, paddingCount, i0, char, i1, digit1, digit2, char0, value, t1, t2, endLength, $length, + _s31_ = "Invalid base64 encoding length "; + end = A.RangeError_checkValidRange(start, end, source.length); + inverseAlphabet = $.$get$_Base64Decoder__inverseAlphabet(); + for (i = start, sliceStart = i, buffer = null, firstPadding = -1, firstPaddingSourceIndex = -1, paddingCount = 0; i < end; i = i0) { + i0 = i + 1; + char = source.charCodeAt(i); + if (char === 37) { + i1 = i0 + 2; + if (i1 <= end) { + digit1 = A.hexDigitValue(source.charCodeAt(i0)); + digit2 = A.hexDigitValue(source.charCodeAt(i0 + 1)); + char0 = digit1 * 16 + digit2 - (digit2 & 256); + if (char0 === 37) + char0 = -1; + i0 = i1; + } else + char0 = -1; + } else + char0 = char; + if (0 <= char0 && char0 <= 127) { + value = inverseAlphabet[char0]; + if (value >= 0) { + char0 = string$.ABCDEF.charCodeAt(value); + if (char0 === char) + continue; + char = char0; + } else { + if (value === -1) { + if (firstPadding < 0) { + t1 = buffer == null ? null : buffer._contents.length; + if (t1 == null) + t1 = 0; + firstPadding = t1 + (i - sliceStart); + firstPaddingSourceIndex = i; + } + ++paddingCount; + if (char === 61) + continue; + } + char = char0; + } + if (value !== -2) { + if (buffer == null) { + buffer = new A.StringBuffer(""); + t1 = buffer; + } else + t1 = buffer; + t1._contents += B.JSString_methods.substring$2(source, sliceStart, i); + t2 = A.Primitives_stringFromCharCode(char); + t1._contents += t2; + sliceStart = i0; + continue; + } + } + throw A.wrapException(A.FormatException$("Invalid base64 data", source, i)); + } + if (buffer != null) { + t1 = B.JSString_methods.substring$2(source, sliceStart, end); + t1 = buffer._contents += t1; + t2 = t1.length; + if (firstPadding >= 0) + A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, t2); + else { + endLength = B.JSInt_methods.$mod(t2 - 1, 4) + 1; + if (endLength === 1) + throw A.wrapException(A.FormatException$(_s31_, source, end)); + while (endLength < 4) { + t1 += "="; + buffer._contents = t1; + ++endLength; + } + } + t1 = buffer._contents; + return B.JSString_methods.replaceRange$3(source, start, end, t1.charCodeAt(0) == 0 ? t1 : t1); + } + $length = end - start; + if (firstPadding >= 0) + A.Base64Codec__checkPadding(source, firstPaddingSourceIndex, end, firstPadding, paddingCount, $length); + else { + endLength = B.JSInt_methods.$mod($length, 4); + if (endLength === 1) + throw A.wrapException(A.FormatException$(_s31_, source, end)); + if (endLength > 1) + source = B.JSString_methods.replaceRange$3(source, end, end, endLength === 2 ? "==" : "="); + } + return source; + } + }; + A.Base64Encoder.prototype = { + startChunkedConversion$1(sink) { + return new A._Utf8Base64EncoderSink(new A._Utf8StringSinkAdapter(new A._Utf8Decoder(false), sink, sink._stringSink), new A._Base64Encoder(string$.ABCDEF)); + } + }; + A._Base64Encoder.prototype = { + createBuffer$1(bufferLength) { + return new Uint8Array(bufferLength); + }, + encode$4(bytes, start, end, isLast) { + var output, _this = this, + byteCount = (_this._convert$_state & 3) + (end - start), + fullChunks = B.JSInt_methods._tdivFast$1(byteCount, 3), + bufferLength = fullChunks * 4; + if (isLast && byteCount - fullChunks * 3 > 0) + bufferLength += 4; + output = _this.createBuffer$1(bufferLength); + _this._convert$_state = A._Base64Encoder_encodeChunk(_this._alphabet, bytes, start, end, isLast, output, 0, _this._convert$_state); + if (bufferLength > 0) + return output; + return null; + } + }; + A._Base64EncoderSink.prototype = {}; + A._Utf8Base64EncoderSink.prototype = { + _convert$_add$4(source, start, end, isLast) { + var buffer = this._encoder.encode$4(source, start, end, isLast); + if (buffer != null) + this._sink.addSlice$4(buffer, 0, buffer.length, isLast); + } + }; + A.ByteConversionSink.prototype = {}; + A.Codec.prototype = {}; + A.Converter.prototype = {}; + A.Encoding.prototype = {}; + A.JsonUnsupportedObjectError.prototype = { + toString$0(_) { + var safeString = A.Error_safeToString(this.unsupportedObject); + return (this.cause != null ? "Converting object to an encodable object failed:" : "Converting object did not return an encodable object:") + " " + safeString; + } + }; + A.JsonCyclicError.prototype = { + toString$0(_) { + return "Cyclic error in JSON stringify"; + } + }; + A.JsonCodec.prototype = { + decode$1(source) { + var t1 = A._parseJson(source, this.get$decoder()._reviver); + return t1; + }, + encode$2$toEncodable(value, toEncodable) { + var t1 = A._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null); + return t1; + }, + get$encoder() { + return B.JsonEncoder_null; + }, + get$decoder() { + return B.JsonDecoder_null; + } + }; + A.JsonEncoder.prototype = {}; + A.JsonDecoder.prototype = {}; + A._JsonStringifier.prototype = { + writeStringContent$1(s) { + var offset, i, charCode, t1, t2, _this = this, + $length = s.length; + for (offset = 0, i = 0; i < $length; ++i) { + charCode = s.charCodeAt(i); + if (charCode > 92) { + if (charCode >= 55296) { + t1 = charCode & 64512; + if (t1 === 55296) { + t2 = i + 1; + t2 = !(t2 < $length && (s.charCodeAt(t2) & 64512) === 56320); + } else + t2 = false; + if (!t2) + if (t1 === 56320) { + t1 = i - 1; + t1 = !(t1 >= 0 && (s.charCodeAt(t1) & 64512) === 55296); + } else + t1 = false; + else + t1 = true; + if (t1) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + _this.writeCharCode$1(117); + _this.writeCharCode$1(100); + t1 = charCode >>> 8 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + } + } + continue; + } + if (charCode < 32) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + switch (charCode) { + case 8: + _this.writeCharCode$1(98); + break; + case 9: + _this.writeCharCode$1(116); + break; + case 10: + _this.writeCharCode$1(110); + break; + case 12: + _this.writeCharCode$1(102); + break; + case 13: + _this.writeCharCode$1(114); + break; + default: + _this.writeCharCode$1(117); + _this.writeCharCode$1(48); + _this.writeCharCode$1(48); + t1 = charCode >>> 4 & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + t1 = charCode & 15; + _this.writeCharCode$1(t1 < 10 ? 48 + t1 : 87 + t1); + break; + } + } else if (charCode === 34 || charCode === 92) { + if (i > offset) + _this.writeStringSlice$3(s, offset, i); + offset = i + 1; + _this.writeCharCode$1(92); + _this.writeCharCode$1(charCode); + } + } + if (offset === 0) + _this.writeString$1(s); + else if (offset < $length) + _this.writeStringSlice$3(s, offset, $length); + }, + _checkCycle$1(object) { + var t1, t2, i, t3; + for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) { + t3 = t1[i]; + if (object == null ? t3 == null : object === t3) + throw A.wrapException(new A.JsonCyclicError(object, null)); + } + t1.push(object); + }, + writeObject$1(object) { + var customJson, e, t1, exception, _this = this; + if (_this.writeJsonValue$1(object)) + return; + _this._checkCycle$1(object); + try { + customJson = _this._toEncodable.call$1(object); + if (!_this.writeJsonValue$1(customJson)) { + t1 = A.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult()); + throw A.wrapException(t1); + } + _this._seen.pop(); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult()); + throw A.wrapException(t1); + } + }, + writeJsonValue$1(object) { + var success, _this = this; + if (typeof object == "number") { + if (!isFinite(object)) + return false; + _this.writeNumber$1(object); + return true; + } else if (object === true) { + _this.writeString$1("true"); + return true; + } else if (object === false) { + _this.writeString$1("false"); + return true; + } else if (object == null) { + _this.writeString$1("null"); + return true; + } else if (typeof object == "string") { + _this.writeString$1('"'); + _this.writeStringContent$1(object); + _this.writeString$1('"'); + return true; + } else if (type$.List_dynamic._is(object)) { + _this._checkCycle$1(object); + _this.writeList$1(object); + _this._seen.pop(); + return true; + } else if (type$.Map_dynamic_dynamic._is(object)) { + _this._checkCycle$1(object); + success = _this.writeMap$1(object); + _this._seen.pop(); + return success; + } else + return false; + }, + writeList$1(list) { + var t1, i, _this = this; + _this.writeString$1("["); + t1 = J.getInterceptor$asx(list); + if (t1.get$isNotEmpty(list)) { + _this.writeObject$1(t1.$index(list, 0)); + for (i = 1; i < t1.get$length(list); ++i) { + _this.writeString$1(","); + _this.writeObject$1(t1.$index(list, i)); + } + } + _this.writeString$1("]"); + }, + writeMap$1(map) { + var t1, keyValueList, i, separator, _this = this, _box_0 = {}; + if (map.get$isEmpty(map)) { + _this.writeString$1("{}"); + return true; + } + t1 = map.get$length(map) * 2; + keyValueList = A.List_List$filled(t1, null, false, type$.nullable_Object); + i = _box_0.i = 0; + _box_0.allStringKeys = true; + map.forEach$1(0, new A._JsonStringifier_writeMap_closure(_box_0, keyValueList)); + if (!_box_0.allStringKeys) + return false; + _this.writeString$1("{"); + for (separator = '"'; i < t1; i += 2, separator = ',"') { + _this.writeString$1(separator); + _this.writeStringContent$1(A._asString(keyValueList[i])); + _this.writeString$1('":'); + _this.writeObject$1(keyValueList[i + 1]); + } + _this.writeString$1("}"); + return true; + } + }; + A._JsonStringifier_writeMap_closure.prototype = { + call$2(key, value) { + var t1, t2, t3, i; + if (typeof key != "string") + this._box_0.allStringKeys = false; + t1 = this.keyValueList; + t2 = this._box_0; + t3 = t2.i; + i = t2.i = t3 + 1; + t1[t3] = key; + t2.i = i + 1; + t1[i] = value; + }, + $signature: 162 + }; + A._JsonStringStringifier.prototype = { + get$_partialResult() { + var t1 = this._sink._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + writeNumber$1(number) { + this._sink._contents += B.JSNumber_methods.toString$0(number); + }, + writeString$1(string) { + this._sink._contents += string; + }, + writeStringSlice$3(string, start, end) { + this._sink._contents += B.JSString_methods.substring$2(string, start, end); + }, + writeCharCode$1(charCode) { + var t1 = this._sink, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + } + }; + A.StringConversionSink.prototype = {}; + A._StringSinkConversionSink.prototype = { + close$0(_) { + } + }; + A._StringCallbackSink.prototype = { + close$0(_) { + var t1 = this._stringSink, + t2 = t1._contents; + t1._contents = ""; + this._convert$_callback.call$1(t2.charCodeAt(0) == 0 ? t2 : t2); + }, + asUtf8Sink$1(allowMalformed) { + return new A._Utf8StringSinkAdapter(new A._Utf8Decoder(allowMalformed), this, this._stringSink); + } + }; + A._Utf8StringSinkAdapter.prototype = { + close$0(_) { + this._decoder.flush$1(this._stringSink); + this._sink.close$0(0); + }, + add$1(_, chunk) { + this.addSlice$4(chunk, 0, J.get$length$asx(chunk), false); + }, + addSlice$4(codeUnits, startIndex, endIndex, isLast) { + var t1 = this._stringSink, + t2 = this._decoder._convertGeneral$4(codeUnits, startIndex, endIndex, false); + t1._contents += t2; + if (isLast) + this.close$0(0); + } + }; + A.Utf8Codec.prototype = { + encode$1(string) { + return B.C_Utf8Encoder.convert$1(string); + } + }; + A.Utf8Encoder.prototype = { + convert$1(string) { + var t1, encoder, + end = A.RangeError_checkValidRange(0, null, string.length); + if (end === 0) + return new Uint8Array(0); + t1 = new Uint8Array(end * 3); + encoder = new A._Utf8Encoder(t1); + if (encoder._fillBuffer$3(string, 0, end) !== end) + encoder._writeReplacementCharacter$0(); + return B.NativeUint8List_methods.sublist$2(t1, 0, encoder._bufferIndex); + } + }; + A._Utf8Encoder.prototype = { + _writeReplacementCharacter$0() { + var _this = this, + t1 = _this._buffer, + t2 = _this._bufferIndex, + t3 = _this._bufferIndex = t2 + 1; + t1.$flags & 2 && A.throwUnsupportedOperation(t1); + t1[t2] = 239; + t2 = _this._bufferIndex = t3 + 1; + t1[t3] = 191; + _this._bufferIndex = t2 + 1; + t1[t2] = 189; + }, + _writeSurrogate$2(leadingSurrogate, nextCodeUnit) { + var rune, t1, t2, t3, _this = this; + if ((nextCodeUnit & 64512) === 56320) { + rune = 65536 + ((leadingSurrogate & 1023) << 10) | nextCodeUnit & 1023; + t1 = _this._buffer; + t2 = _this._bufferIndex; + t3 = _this._bufferIndex = t2 + 1; + t1.$flags & 2 && A.throwUnsupportedOperation(t1); + t1[t2] = rune >>> 18 | 240; + t2 = _this._bufferIndex = t3 + 1; + t1[t3] = rune >>> 12 & 63 | 128; + t3 = _this._bufferIndex = t2 + 1; + t1[t2] = rune >>> 6 & 63 | 128; + _this._bufferIndex = t3 + 1; + t1[t3] = rune & 63 | 128; + return true; + } else { + _this._writeReplacementCharacter$0(); + return false; + } + }, + _fillBuffer$3(str, start, end) { + var t1, t2, t3, stringIndex, codeUnit, t4, stringIndex0, t5, _this = this; + if (start !== end && (str.charCodeAt(end - 1) & 64512) === 55296) + --end; + for (t1 = _this._buffer, t2 = t1.$flags | 0, t3 = t1.length, stringIndex = start; stringIndex < end; ++stringIndex) { + codeUnit = str.charCodeAt(stringIndex); + if (codeUnit <= 127) { + t4 = _this._bufferIndex; + if (t4 >= t3) + break; + _this._bufferIndex = t4 + 1; + t2 & 2 && A.throwUnsupportedOperation(t1); + t1[t4] = codeUnit; + } else { + t4 = codeUnit & 64512; + if (t4 === 55296) { + if (_this._bufferIndex + 4 > t3) + break; + stringIndex0 = stringIndex + 1; + if (_this._writeSurrogate$2(codeUnit, str.charCodeAt(stringIndex0))) + stringIndex = stringIndex0; + } else if (t4 === 56320) { + if (_this._bufferIndex + 3 > t3) + break; + _this._writeReplacementCharacter$0(); + } else if (codeUnit <= 2047) { + t4 = _this._bufferIndex; + t5 = t4 + 1; + if (t5 >= t3) + break; + _this._bufferIndex = t5; + t2 & 2 && A.throwUnsupportedOperation(t1); + t1[t4] = codeUnit >>> 6 | 192; + _this._bufferIndex = t5 + 1; + t1[t5] = codeUnit & 63 | 128; + } else { + t4 = _this._bufferIndex; + if (t4 + 2 >= t3) + break; + t5 = _this._bufferIndex = t4 + 1; + t2 & 2 && A.throwUnsupportedOperation(t1); + t1[t4] = codeUnit >>> 12 | 224; + t4 = _this._bufferIndex = t5 + 1; + t1[t5] = codeUnit >>> 6 & 63 | 128; + _this._bufferIndex = t4 + 1; + t1[t4] = codeUnit & 63 | 128; + } + } + } + return stringIndex; + } + }; + A.Utf8Decoder.prototype = { + convert$1(codeUnits) { + return new A._Utf8Decoder(this._allowMalformed)._convertGeneral$4(codeUnits, 0, null, true); + } + }; + A._Utf8Decoder.prototype = { + _convertGeneral$4(codeUnits, start, maybeEnd, single) { + var casted, bytes, errorOffset, t1, result, message, _this = this, + end = A.RangeError_checkValidRange(start, maybeEnd, J.get$length$asx(codeUnits)); + if (start === end) + return ""; + if (codeUnits instanceof Uint8Array) { + casted = codeUnits; + bytes = casted; + errorOffset = 0; + } else { + bytes = A._Utf8Decoder__makeNativeUint8List(codeUnits, start, end); + end -= start; + errorOffset = start; + start = 0; + } + if (single && end - start >= 15) { + t1 = _this.allowMalformed; + result = A._Utf8Decoder__convertInterceptedUint8List(t1, bytes, start, end); + if (result != null) { + if (!t1) + return result; + if (result.indexOf("\ufffd") < 0) + return result; + } + } + result = _this._decodeRecursive$4(bytes, start, end, single); + t1 = _this._convert$_state; + if ((t1 & 1) !== 0) { + message = A._Utf8Decoder_errorDescription(t1); + _this._convert$_state = 0; + throw A.wrapException(A.FormatException$(message, codeUnits, errorOffset + _this._charOrIndex)); + } + return result; + }, + _decodeRecursive$4(bytes, start, end, single) { + var mid, s1, _this = this; + if (end - start > 1000) { + mid = B.JSInt_methods._tdivFast$1(start + end, 2); + s1 = _this._decodeRecursive$4(bytes, start, mid, false); + if ((_this._convert$_state & 1) !== 0) + return s1; + return s1 + _this._decodeRecursive$4(bytes, mid, end, single); + } + return _this.decodeGeneral$4(bytes, start, end, single); + }, + flush$1(sink) { + var t1, + state = this._convert$_state; + this._convert$_state = 0; + if (state <= 32) + return; + if (this.allowMalformed) { + t1 = A.Primitives_stringFromCharCode(65533); + sink._contents += t1; + } else + throw A.wrapException(A.FormatException$(A._Utf8Decoder_errorDescription(77), null, null)); + }, + decodeGeneral$4(bytes, start, end, single) { + var t1, type, t2, i0, markEnd, i1, m, _this = this, _65533 = 65533, + state = _this._convert$_state, + char = _this._charOrIndex, + buffer = new A.StringBuffer(""), + i = start + 1, + byte = bytes[start]; + $label0$0: + for (t1 = _this.allowMalformed;;) { + for (;; i = i0) { + type = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHIHHHJEEBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKCCCCCCCCCCCCDCLONNNMEEEEEEEEEEE".charCodeAt(byte) & 31; + char = state <= 32 ? byte & 61694 >>> type : (byte & 63 | char << 6) >>> 0; + state = " \x000:XECCCCCN:lDb \x000:XECCCCCNvlDb \x000:XECCCCCN:lDb AAAAA\x00\x00\x00\x00\x00AAAAA00000AAAAA:::::AAAAAGG000AAAAA00KKKAAAAAG::::AAAAA:IIIIAAAAA000\x800AAAAA\x00\x00\x00\x00 AAAAA".charCodeAt(state + type); + if (state === 0) { + t2 = A.Primitives_stringFromCharCode(char); + buffer._contents += t2; + if (i === end) + break $label0$0; + break; + } else if ((state & 1) !== 0) { + if (t1) + switch (state) { + case 69: + case 67: + t2 = A.Primitives_stringFromCharCode(_65533); + buffer._contents += t2; + break; + case 65: + t2 = A.Primitives_stringFromCharCode(_65533); + buffer._contents += t2; + --i; + break; + default: + t2 = A.Primitives_stringFromCharCode(_65533); + buffer._contents = (buffer._contents += t2) + t2; + break; + } + else { + _this._convert$_state = state; + _this._charOrIndex = i - 1; + return ""; + } + state = 0; + } + if (i === end) + break $label0$0; + i0 = i + 1; + byte = bytes[i]; + } + i0 = i + 1; + byte = bytes[i]; + if (byte < 128) { + for (;;) { + if (!(i0 < end)) { + markEnd = end; + break; + } + i1 = i0 + 1; + byte = bytes[i0]; + if (byte >= 128) { + markEnd = i1 - 1; + i0 = i1; + break; + } + i0 = i1; + } + if (markEnd - i < 20) + for (m = i; m < markEnd; ++m) { + t2 = A.Primitives_stringFromCharCode(bytes[m]); + buffer._contents += t2; + } + else { + t2 = A.String_String$fromCharCodes(bytes, i, markEnd); + buffer._contents += t2; + } + if (markEnd === end) + break $label0$0; + i = i0; + } else + i = i0; + } + if (single && state > 32) + if (t1) { + t1 = A.Primitives_stringFromCharCode(_65533); + buffer._contents += t1; + } else { + _this._convert$_state = 77; + _this._charOrIndex = end; + return ""; + } + _this._convert$_state = state; + _this._charOrIndex = char; + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.NoSuchMethodError_toString_closure.prototype = { + call$2(key, value) { + var t1 = this.sb, + t2 = this._box_0, + t3 = (t1._contents += t2.comma) + key.__internal$_name; + t1._contents = t3; + t1._contents = t3 + ": "; + t3 = A.Error_safeToString(value); + t1._contents += t3; + t2.comma = ", "; + }, + $signature: 373 + }; + A.DateTime.prototype = { + $eq(_, other) { + var t1; + if (other == null) + return false; + t1 = false; + if (other instanceof A.DateTime) + if (this._value === other._value) + t1 = this._microsecond === other._microsecond; + return t1; + }, + get$hashCode(_) { + return A.Object_hash(this._value, this._microsecond, B.C_SentinelValue, B.C_SentinelValue); + }, + isAfter$1(other) { + var t1 = this._value, + t2 = other._value; + if (t1 <= t2) + t1 = t1 === t2 && this._microsecond > other._microsecond; + else + t1 = true; + return t1; + }, + compareTo$1(_, other) { + var r = B.JSInt_methods.compareTo$1(this._value, other._value); + if (r !== 0) + return r; + return B.JSInt_methods.compareTo$1(this._microsecond, other._microsecond); + }, + toString$0(_) { + var _this = this, + y = A.DateTime__fourDigits(A.Primitives_getYear(_this)), + m = A.DateTime__twoDigits(A.Primitives_getMonth(_this)), + d = A.DateTime__twoDigits(A.Primitives_getDay(_this)), + h = A.DateTime__twoDigits(A.Primitives_getHours(_this)), + min = A.DateTime__twoDigits(A.Primitives_getMinutes(_this)), + sec = A.DateTime__twoDigits(A.Primitives_getSeconds(_this)), + ms = A.DateTime__threeDigits(A.Primitives_getMilliseconds(_this)), + t1 = _this._microsecond, + us = t1 === 0 ? "" : A.DateTime__threeDigits(t1); + return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + us; + }, + $isComparable: 1 + }; + A.Duration.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.Duration && this._duration === other._duration; + }, + get$hashCode(_) { + return B.JSInt_methods.get$hashCode(this._duration); + }, + compareTo$1(_, other) { + return B.JSInt_methods.compareTo$1(this._duration, other._duration); + }, + toString$0(_) { + var sign, minutes, minutesPadding, seconds, secondsPadding, + microseconds = this._duration, + hours = B.JSInt_methods._tdivFast$1(microseconds, 3600000000), + microseconds0 = microseconds % 3600000000; + if (microseconds < 0) { + hours = 0 - hours; + microseconds = 0 - microseconds0; + sign = "-"; + } else { + microseconds = microseconds0; + sign = ""; + } + minutes = B.JSInt_methods._tdivFast$1(microseconds, 60000000); + microseconds %= 60000000; + minutesPadding = minutes < 10 ? "0" : ""; + seconds = B.JSInt_methods._tdivFast$1(microseconds, 1000000); + secondsPadding = seconds < 10 ? "0" : ""; + return sign + hours + ":" + minutesPadding + minutes + ":" + secondsPadding + seconds + "." + B.JSString_methods.padLeft$2(B.JSInt_methods.toString$0(microseconds % 1000000), 6, "0"); + }, + $isComparable: 1 + }; + A._Enum.prototype = { + toString$0(_) { + return this._enumToString$0(); + } + }; + A.Error.prototype = { + get$stackTrace() { + return A.Primitives_extractStackTrace(this); + } + }; + A.AssertionError.prototype = { + toString$0(_) { + var t1 = this.message; + if (t1 != null) + return "Assertion failed: " + A.Error_safeToString(t1); + return "Assertion failed"; + }, + get$message(receiver) { + return this.message; + } + }; + A.TypeError.prototype = {}; + A.ArgumentError.prototype = { + get$_errorName() { + return "Invalid argument" + (!this._hasValue ? "(s)" : ""); + }, + get$_errorExplanation() { + return ""; + }, + toString$0(_) { + var _this = this, + $name = _this.name, + nameString = $name == null ? "" : " (" + $name + ")", + message = _this.message, + messageString = message == null ? "" : ": " + A.S(message), + prefix = _this.get$_errorName() + nameString + messageString; + if (!_this._hasValue) + return prefix; + return prefix + _this.get$_errorExplanation() + ": " + A.Error_safeToString(_this.get$invalidValue()); + }, + get$invalidValue() { + return this.invalidValue; + }, + get$message(receiver) { + return this.message; + } + }; + A.RangeError.prototype = { + get$invalidValue() { + return this.invalidValue; + }, + get$_errorName() { + return "RangeError"; + }, + get$_errorExplanation() { + var explanation, + start = this.start, + end = this.end; + if (start == null) + explanation = end != null ? ": Not less than or equal to " + A.S(end) : ""; + else if (end == null) + explanation = ": Not greater than or equal to " + A.S(start); + else if (end > start) + explanation = ": Not in inclusive range " + A.S(start) + ".." + A.S(end); + else + explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + A.S(start); + return explanation; + } + }; + A.IndexError.prototype = { + get$invalidValue() { + return this.invalidValue; + }, + get$_errorName() { + return "RangeError"; + }, + get$_errorExplanation() { + if (this.invalidValue < 0) + return ": index must not be negative"; + var t1 = this.length; + if (t1 === 0) + return ": no indices are valid"; + return ": index should be less than " + t1; + }, + $isRangeError: 1, + get$length(receiver) { + return this.length; + } + }; + A.NoSuchMethodError.prototype = { + toString$0(_) { + var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {}, + sb = new A.StringBuffer(""); + _box_0.comma = ""; + $arguments = _this._core$_arguments; + for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") { + argument = $arguments[_i]; + sb._contents = t2 + t3; + t2 = A.Error_safeToString(argument); + t2 = sb._contents += t2; + _box_0.comma = ", "; + } + _this._namedArguments.forEach$1(0, new A.NoSuchMethodError_toString_closure(_box_0, sb)); + receiverText = A.Error_safeToString(_this._core$_receiver); + actualParameters = sb.toString$0(0); + return "NoSuchMethodError: method not found: '" + _this._memberName.__internal$_name + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]"; + } + }; + A.UnsupportedError.prototype = { + toString$0(_) { + return "Unsupported operation: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.UnimplementedError.prototype = { + toString$0(_) { + return "UnimplementedError: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.StateError.prototype = { + toString$0(_) { + return "Bad state: " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A.ConcurrentModificationError.prototype = { + toString$0(_) { + var t1 = this.modifiedObject; + if (t1 == null) + return "Concurrent modification during iteration."; + return "Concurrent modification during iteration: " + A.Error_safeToString(t1) + "."; + } + }; + A.OutOfMemoryError.prototype = { + toString$0(_) { + return "Out of Memory"; + }, + get$stackTrace() { + return null; + }, + $isError: 1 + }; + A.StackOverflowError.prototype = { + toString$0(_) { + return "Stack Overflow"; + }, + get$stackTrace() { + return null; + }, + $isError: 1 + }; + A._Exception.prototype = { + toString$0(_) { + return "Exception: " + this.message; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.FormatException.prototype = { + toString$0(_) { + var t1, lineNum, lineStart, previousCharWasCR, i, char, lineEnd, prefix, postfix, end, start, + message = this.message, + report = "" !== message ? "FormatException: " + message : "FormatException", + offset = this.offset, + source = this.source; + if (typeof source == "string") { + if (offset != null) + t1 = offset < 0 || offset > source.length; + else + t1 = false; + if (t1) + offset = null; + if (offset == null) { + if (source.length > 78) + source = B.JSString_methods.substring$2(source, 0, 75) + "..."; + return report + "\n" + source; + } + for (lineNum = 1, lineStart = 0, previousCharWasCR = false, i = 0; i < offset; ++i) { + char = source.charCodeAt(i); + if (char === 10) { + if (lineStart !== i || !previousCharWasCR) + ++lineNum; + lineStart = i + 1; + previousCharWasCR = false; + } else if (char === 13) { + ++lineNum; + lineStart = i + 1; + previousCharWasCR = true; + } + } + report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " + (offset - lineStart + 1) + ")\n") : report + (" (at character " + (offset + 1) + ")\n"); + lineEnd = source.length; + for (i = offset; i < lineEnd; ++i) { + char = source.charCodeAt(i); + if (char === 10 || char === 13) { + lineEnd = i; + break; + } + } + prefix = ""; + if (lineEnd - lineStart > 78) { + postfix = "..."; + if (offset - lineStart < 75) { + end = lineStart + 75; + start = lineStart; + } else { + if (lineEnd - offset < 75) { + start = lineEnd - 75; + end = lineEnd; + postfix = ""; + } else { + start = offset - 36; + end = offset + 36; + } + prefix = "..."; + } + } else { + end = lineEnd; + start = lineStart; + postfix = ""; + } + return report + prefix + B.JSString_methods.substring$2(source, start, end) + postfix + "\n" + B.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n"; + } else + return offset != null ? report + (" (at offset " + A.S(offset) + ")") : report; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.Iterable.prototype = { + cast$1$0(_, $R) { + return A.CastIterable_CastIterable(this, A._instanceType(this)._eval$1("Iterable.E"), $R); + }, + followedBy$1(_, other) { + var _this = this; + if (type$.EfficientLengthIterable_dynamic._is(_this)) + return A.FollowedByIterable_FollowedByIterable$firstEfficient(_this, other, A._instanceType(_this)._eval$1("Iterable.E")); + return new A.FollowedByIterable(_this, other, A._instanceType(_this)._eval$1("FollowedByIterable")); + }, + map$1$1(_, toElement, $T) { + return A.MappedIterable_MappedIterable(this, toElement, A._instanceType(this)._eval$1("Iterable.E"), $T); + }, + where$1(_, test) { + return new A.WhereIterable(this, test, A._instanceType(this)._eval$1("WhereIterable")); + }, + expand$1$1(_, toElements, $T) { + return new A.ExpandIterable(this, toElements, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("ExpandIterable<1,2>")); + }, + contains$1(_, element) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (J.$eq$(t1.get$current(t1), element)) + return true; + return false; + }, + forEach$1(_, action) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + action.call$1(t1.get$current(t1)); + }, + fold$1$2(_, initialValue, combine) { + var t1, value; + for (t1 = this.get$iterator(this), value = initialValue; t1.moveNext$0();) + value = combine.call$2(value, t1.get$current(t1)); + return value; + }, + fold$2(_, initialValue, combine) { + return this.fold$1$2(0, initialValue, combine, type$.dynamic); + }, + every$1(_, test) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (!test.call$1(t1.get$current(t1))) + return false; + return true; + }, + join$1(_, separator) { + var first, t1, + iterator = this.get$iterator(this); + if (!iterator.moveNext$0()) + return ""; + first = J.toString$0$(iterator.get$current(iterator)); + if (!iterator.moveNext$0()) + return first; + if (separator.length === 0) { + t1 = first; + do + t1 += A.S(J.toString$0$(iterator.get$current(iterator))); + while (iterator.moveNext$0()); + } else { + t1 = first; + do + t1 = t1 + separator + A.S(J.toString$0$(iterator.get$current(iterator))); + while (iterator.moveNext$0()); + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + any$1(_, test) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + if (test.call$1(t1.get$current(t1))) + return true; + return false; + }, + toList$1$growable(_, growable) { + var t1 = A._instanceType(this)._eval$1("Iterable.E"); + if (growable) + t1 = A.List_List$_of(this, t1); + else { + t1 = A.List_List$_of(this, t1); + t1.$flags = 1; + t1 = t1; + } + return t1; + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$of(this, A._instanceType(this)._eval$1("Iterable.E")); + }, + get$length(_) { + var count, + it = this.get$iterator(this); + for (count = 0; it.moveNext$0();) + ++count; + return count; + }, + get$isEmpty(_) { + return !this.get$iterator(this).moveNext$0(); + }, + get$isNotEmpty(_) { + return !this.get$isEmpty(this); + }, + take$1(_, count) { + return A.TakeIterable_TakeIterable(this, count, A._instanceType(this)._eval$1("Iterable.E")); + }, + skip$1(_, count) { + return A.SkipIterable_SkipIterable(this, count, A._instanceType(this)._eval$1("Iterable.E")); + }, + skipWhile$1(_, test) { + return new A.SkipWhileIterable(this, test, A._instanceType(this)._eval$1("SkipWhileIterable")); + }, + get$first(_) { + var it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + return it.get$current(it); + }, + get$last(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + do + result = it.get$current(it); + while (it.moveNext$0()); + return result; + }, + get$single(_) { + var result, + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw A.wrapException(A.IterableElementError_noElement()); + result = it.get$current(it); + if (it.moveNext$0()) + throw A.wrapException(A.IterableElementError_tooMany()); + return result; + }, + elementAt$1(_, index) { + var iterator, skipCount; + A.RangeError_checkNotNegative(index, "index"); + iterator = this.get$iterator(this); + for (skipCount = index; iterator.moveNext$0();) { + if (skipCount === 0) + return iterator.get$current(iterator); + --skipCount; + } + throw A.wrapException(A.IndexError$withLength(index, index - skipCount, this, null, "index")); + }, + toString$0(_) { + return A.Iterable_iterableToShortString(this, "(", ")"); + } + }; + A._GeneratorIterable.prototype = { + elementAt$1(_, index) { + A.IndexError_check(index, this.length, this, null, null); + return this._generator.call$1(index); + }, + get$length(receiver) { + return this.length; + } + }; + A.MapEntry.prototype = { + toString$0(_) { + return "MapEntry(" + A.S(this.key) + ": " + A.S(this.value) + ")"; + } + }; + A.Null.prototype = { + get$hashCode(_) { + return A.Object.prototype.get$hashCode.call(this, 0); + }, + toString$0(_) { + return "null"; + } + }; + A.Object.prototype = {$isObject: 1, + $eq(_, other) { + return this === other; + }, + get$hashCode(_) { + return A.Primitives_objectHashCode(this); + }, + toString$0(_) { + return "Instance of '" + A.Primitives_objectTypeName(this) + "'"; + }, + noSuchMethod$1(_, invocation) { + throw A.wrapException(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, invocation)); + }, + get$runtimeType(_) { + return A.getRuntimeTypeOfDartObject(this); + }, + toString() { + return this.toString$0(this); + } + }; + A._StringStackTrace.prototype = { + toString$0(_) { + return this._stackTrace; + }, + $isStackTrace: 1 + }; + A.Runes.prototype = { + get$iterator(_) { + return new A.RuneIterator(this.string); + }, + get$last(_) { + var code, previousCode, + t1 = this.string, + t2 = t1.length; + if (t2 === 0) + throw A.wrapException(A.StateError$("No elements.")); + code = t1.charCodeAt(t2 - 1); + if ((code & 64512) === 56320 && t2 > 1) { + previousCode = t1.charCodeAt(t2 - 2); + if ((previousCode & 64512) === 55296) + return A._combineSurrogatePair(previousCode, code); + } + return code; + } + }; + A.RuneIterator.prototype = { + get$current(_) { + return this._currentCodePoint; + }, + moveNext$0() { + var codeUnit, nextPosition, nextCodeUnit, _this = this, + t1 = _this._position = _this._nextPosition, + t2 = _this.string, + t3 = t2.length; + if (t1 === t3) { + _this._currentCodePoint = -1; + return false; + } + codeUnit = t2.charCodeAt(t1); + nextPosition = t1 + 1; + if ((codeUnit & 64512) === 55296 && nextPosition < t3) { + nextCodeUnit = t2.charCodeAt(nextPosition); + if ((nextCodeUnit & 64512) === 56320) { + _this._nextPosition = nextPosition + 1; + _this._currentCodePoint = A._combineSurrogatePair(codeUnit, nextCodeUnit); + return true; + } + } + _this._nextPosition = nextPosition; + _this._currentCodePoint = codeUnit; + return true; + } + }; + A.StringBuffer.prototype = { + get$length(_) { + return this._contents.length; + }, + write$1(_, obj) { + var t1 = A.S(obj); + this._contents += t1; + }, + writeCharCode$1(charCode) { + var t1 = A.Primitives_stringFromCharCode(charCode); + this._contents += t1; + }, + toString$0(_) { + var t1 = this._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.Uri_parseIPv6Address_error.prototype = { + call$2(msg, position) { + throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); + }, + $signature: 465 + }; + A._Uri.prototype = { + get$_text() { + var t1, t2, t3, t4, _this = this, + value = _this.___Uri__text_FI; + if (value === $) { + t1 = _this.scheme; + t2 = t1.length !== 0 ? t1 + ":" : ""; + t3 = _this._host; + t4 = t3 == null; + if (!t4 || t1 === "file") { + t1 = t2 + "//"; + t2 = _this._userInfo; + if (t2.length !== 0) + t1 = t1 + t2 + "@"; + if (!t4) + t1 += t3; + t2 = _this._port; + if (t2 != null) + t1 = t1 + ":" + A.S(t2); + } else + t1 = t2; + t1 += _this.path; + t2 = _this._query; + if (t2 != null) + t1 = t1 + "?" + t2; + t2 = _this._fragment; + if (t2 != null) + t1 = t1 + "#" + t2; + value = _this.___Uri__text_FI = t1.charCodeAt(0) == 0 ? t1 : t1; + } + return value; + }, + get$pathSegments() { + var pathToSplit, result, _this = this, + value = _this.___Uri_pathSegments_FI; + if (value === $) { + pathToSplit = _this.path; + if (pathToSplit.length !== 0 && pathToSplit.charCodeAt(0) === 47) + pathToSplit = B.JSString_methods.substring$1(pathToSplit, 1); + result = pathToSplit.length === 0 ? B.List_empty : A.List_List$unmodifiable(new A.MappedListIterable(A._setArrayType(pathToSplit.split("/"), type$.JSArray_String), A.core_Uri_decodeComponent$closure(), type$.MappedListIterable_String_dynamic), type$.String); + _this.___Uri_pathSegments_FI !== $ && A.throwUnnamedLateFieldADI(); + value = _this.___Uri_pathSegments_FI = result; + } + return value; + }, + get$hashCode(_) { + var result, _this = this, + value = _this.___Uri_hashCode_FI; + if (value === $) { + result = B.JSString_methods.get$hashCode(_this.get$_text()); + _this.___Uri_hashCode_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.___Uri_hashCode_FI = result; + value = result; + } + return value; + }, + get$userInfo() { + return this._userInfo; + }, + get$host() { + var host = this._host; + if (host == null) + return ""; + if (B.JSString_methods.startsWith$1(host, "[") && !B.JSString_methods.startsWith$2(host, "v", 1)) + return B.JSString_methods.substring$2(host, 1, host.length - 1); + return host; + }, + get$port(_) { + var t1 = this._port; + return t1 == null ? A._Uri__defaultPort(this.scheme) : t1; + }, + get$query() { + var t1 = this._query; + return t1 == null ? "" : t1; + }, + get$fragment() { + var t1 = this._fragment; + return t1 == null ? "" : t1; + }, + isScheme$1(scheme) { + var thisScheme = this.scheme; + if (scheme.length !== thisScheme.length) + return false; + return A._caseInsensitiveCompareStart(scheme, thisScheme, 0) >= 0; + }, + replace$1$scheme(scheme) { + var isFile, userInfo, port, host, currentPath, t1, path, _this = this; + scheme = A._Uri__makeScheme(scheme, 0, scheme.length); + isFile = scheme === "file"; + userInfo = _this._userInfo; + port = _this._port; + if (scheme !== _this.scheme) + port = A._Uri__makePort(port, scheme); + host = _this._host; + if (!(host != null)) + host = userInfo.length !== 0 || port != null || isFile ? "" : null; + currentPath = _this.path; + if (!isFile) + t1 = host != null && currentPath.length !== 0; + else + t1 = true; + if (t1 && !B.JSString_methods.startsWith$1(currentPath, "/")) + currentPath = "/" + currentPath; + path = currentPath; + return A._Uri$_internal(scheme, userInfo, host, port, path, _this._query, _this._fragment); + }, + _mergePaths$2(base, reference) { + var backCount, refStart, baseEnd, newEnd, delta, t1, t2; + for (backCount = 0, refStart = 0; B.JSString_methods.startsWith$2(reference, "../", refStart);) { + refStart += 3; + ++backCount; + } + baseEnd = B.JSString_methods.lastIndexOf$1(base, "/"); + for (;;) { + if (!(baseEnd > 0 && backCount > 0)) + break; + newEnd = B.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); + if (newEnd < 0) + break; + delta = baseEnd - newEnd; + t1 = delta !== 2; + t2 = false; + if (!t1 || delta === 3) + if (base.charCodeAt(newEnd + 1) === 46) + t1 = !t1 || base.charCodeAt(newEnd + 2) === 46; + else + t1 = t2; + else + t1 = t2; + if (t1) + break; + --backCount; + baseEnd = newEnd; + } + return B.JSString_methods.replaceRange$3(base, baseEnd + 1, null, B.JSString_methods.substring$1(reference, refStart - 3 * backCount)); + }, + resolve$1(_, reference) { + return this.resolveUri$1(A.Uri_parse(reference)); + }, + resolveUri$1(reference) { + var targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, split, packageNameEnd, packageName, mergedPath, t1, fragment, _this = this, _null = null; + if (reference.get$scheme().length !== 0) { + if (type$._PlatformUri._is(reference)) + return reference; + targetScheme = reference.get$scheme(); + if (reference.get$hasAuthority()) { + targetUserInfo = reference.get$userInfo(); + targetHost = reference.get$host(); + targetPort = reference.get$hasPort() ? reference.get$port(reference) : _null; + } else { + targetPort = _null; + targetHost = targetPort; + targetUserInfo = ""; + } + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + split = 0; + } else { + targetScheme = _this.scheme; + if (reference.get$hasAuthority()) { + if (type$._PlatformUri._is(reference)) + return reference.replace$1$scheme(targetScheme); + targetUserInfo = reference.get$userInfo(); + targetHost = reference.get$host(); + targetPort = A._Uri__makePort(reference.get$hasPort() ? reference.get$port(reference) : _null, targetScheme); + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + split = 1; + } else { + targetUserInfo = _this._userInfo; + targetHost = _this._host; + targetPort = _this._port; + targetPath = _this.path; + if (reference.get$hasEmptyPath()) + if (reference.get$hasQuery()) { + targetQuery = reference.get$query(); + split = 3; + } else { + targetQuery = _this._query; + split = 4; + } + else { + packageNameEnd = A._Uri__packageNameEnd(_this, targetPath); + if (packageNameEnd > 0) { + packageName = B.JSString_methods.substring$2(targetPath, 0, packageNameEnd); + targetPath = reference.get$hasAbsolutePath() ? packageName + A._Uri__removeDotSegments(reference.get$path(reference)) : packageName + A._Uri__removeDotSegments(_this._mergePaths$2(B.JSString_methods.substring$1(targetPath, packageName.length), reference.get$path(reference))); + } else if (reference.get$hasAbsolutePath()) + targetPath = A._Uri__removeDotSegments(reference.get$path(reference)); + else if (targetPath.length === 0) + if (targetHost == null) + targetPath = targetScheme.length === 0 ? reference.get$path(reference) : A._Uri__removeDotSegments(reference.get$path(reference)); + else + targetPath = A._Uri__removeDotSegments("/" + reference.get$path(reference)); + else { + mergedPath = _this._mergePaths$2(targetPath, reference.get$path(reference)); + t1 = targetScheme.length === 0; + if (!t1 || targetHost != null || B.JSString_methods.startsWith$1(targetPath, "/")) + targetPath = A._Uri__removeDotSegments(mergedPath); + else + targetPath = A._Uri__normalizeRelativePath(mergedPath, !t1 || targetHost != null); + } + targetQuery = reference.get$hasQuery() ? reference.get$query() : _null; + split = 2; + } + } + } + fragment = reference.get$hasFragment() ? reference.get$fragment() : _null; + if (!type$._PlatformUri._is(reference)) { + if (split === 0) + targetScheme = A._Uri__makeScheme(targetScheme, 0, targetScheme.length); + if (split <= 1) { + t1 = targetUserInfo.length; + if (t1 !== 0) + targetUserInfo = A._Uri__makeUserInfo(targetUserInfo, 0, t1); + if (targetPort != null) + targetPort = A._Uri__makePort(targetPort, targetScheme); + if (targetHost != null && targetHost.length !== 0) + targetHost = A._Uri__makeHost(targetHost, 0, targetHost.length, false); + } + t1 = split <= 3; + if (t1) + targetPath = A._Uri__makePath(targetPath, 0, targetPath.length, _null, targetScheme, targetHost != null); + if (t1 && targetQuery != null) + targetQuery = A._Uri__makeQuery(targetQuery, 0, targetQuery.length, _null); + if (fragment != null) + fragment = A._Uri__makeFragment(fragment, 0, fragment.length); + } + return A._Uri$_internal(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, fragment); + }, + get$hasAuthority() { + return this._host != null; + }, + get$hasPort() { + return this._port != null; + }, + get$hasQuery() { + return this._query != null; + }, + get$hasFragment() { + return this._fragment != null; + }, + get$hasEmptyPath() { + return this.path.length === 0; + }, + get$hasAbsolutePath() { + return B.JSString_methods.startsWith$1(this.path, "/"); + }, + toFilePath$0() { + var pathSegments, _this = this, + t1 = _this.scheme; + if (t1 !== "" && t1 !== "file") + throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + t1 + " URI")); + t1 = _this._query; + if ((t1 == null ? "" : t1) !== "") + throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); + t1 = _this._fragment; + if ((t1 == null ? "" : t1) !== "") + throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); + t1 = $.$get$_Uri__isWindowsCached(); + if (t1) + t1 = A._Uri__toWindowsFilePath(_this); + else { + if (_this._host != null && _this.get$host() !== "") + A.throwExpression(A.UnsupportedError$(string$.Cannotn)); + pathSegments = _this.get$pathSegments(); + A._Uri__checkNonWindowsPathReservedCharacters(pathSegments, false); + t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "/" : "", pathSegments, "/"); + t1 = t1.charCodeAt(0) == 0 ? t1 : t1; + } + return t1; + }, + toString$0(_) { + return this.get$_text(); + }, + $eq(_, other) { + var t1, t2, t3, _this = this; + if (other == null) + return false; + if (_this === other) + return true; + t1 = false; + if (type$.Uri._is(other)) + if (_this.scheme === other.get$scheme()) + if (_this._host != null === other.get$hasAuthority()) + if (_this._userInfo === other.get$userInfo()) + if (_this.get$host() === other.get$host()) + if (_this.get$port(0) === other.get$port(other)) + if (_this.path === other.get$path(other)) { + t2 = _this._query; + t3 = t2 == null; + if (!t3 === other.get$hasQuery()) { + if (t3) + t2 = ""; + if (t2 === other.get$query()) { + t2 = _this._fragment; + t3 = t2 == null; + if (!t3 === other.get$hasFragment()) { + t1 = t3 ? "" : t2; + t1 = t1 === other.get$fragment(); + } + } + } + } + return t1; + }, + $isUri: 1, + $is_PlatformUri: 1, + get$scheme() { + return this.scheme; + }, + get$path(receiver) { + return this.path; + } + }; + A._Uri__makePath_closure.prototype = { + call$1(s) { + return A._Uri__uriEncode(64, s, B.C_Utf8Codec, false); + }, + $signature: 6 + }; + A.UriData.prototype = { + get$uri() { + var t2, queryIndex, end, query, _this = this, _null = null, + t1 = _this._uriCache; + if (t1 == null) { + t1 = _this._text; + t2 = _this._separatorIndices[0] + 1; + queryIndex = B.JSString_methods.indexOf$2(t1, "?", t2); + end = t1.length; + if (queryIndex >= 0) { + query = A._Uri__normalizeOrSubstring(t1, queryIndex + 1, end, 256, false, false); + end = queryIndex; + } else + query = _null; + t1 = _this._uriCache = new A._DataUri("data", "", _null, _null, A._Uri__normalizeOrSubstring(t1, t2, end, 128, false, false), query, _null); + } + return t1; + }, + toString$0(_) { + var t1 = this._text; + return this._separatorIndices[0] === -1 ? "data:" + t1 : t1; + } + }; + A._SimpleUri.prototype = { + get$hasAuthority() { + return this._hostStart > 0; + }, + get$hasPort() { + return this._hostStart > 0 && this._portStart + 1 < this._pathStart; + }, + get$hasQuery() { + return this._queryStart < this._fragmentStart; + }, + get$hasFragment() { + return this._fragmentStart < this._uri.length; + }, + get$hasAbsolutePath() { + return B.JSString_methods.startsWith$2(this._uri, "/", this._pathStart); + }, + get$hasEmptyPath() { + return this._pathStart === this._queryStart; + }, + get$scheme() { + var t1 = this._schemeCache; + return t1 == null ? this._schemeCache = this._computeScheme$0() : t1; + }, + _computeScheme$0() { + var t2, _this = this, + t1 = _this._schemeEnd; + if (t1 <= 0) + return ""; + t2 = t1 === 4; + if (t2 && B.JSString_methods.startsWith$1(_this._uri, "http")) + return "http"; + if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) + return "https"; + if (t2 && B.JSString_methods.startsWith$1(_this._uri, "file")) + return "file"; + if (t1 === 7 && B.JSString_methods.startsWith$1(_this._uri, "package")) + return "package"; + return B.JSString_methods.substring$2(_this._uri, 0, t1); + }, + get$userInfo() { + var t1 = this._hostStart, + t2 = this._schemeEnd + 3; + return t1 > t2 ? B.JSString_methods.substring$2(this._uri, t2, t1 - 1) : ""; + }, + get$host() { + var t1 = this._hostStart; + return t1 > 0 ? B.JSString_methods.substring$2(this._uri, t1, this._portStart) : ""; + }, + get$port(_) { + var t1, _this = this; + if (_this.get$hasPort()) + return A.int_parse(B.JSString_methods.substring$2(_this._uri, _this._portStart + 1, _this._pathStart), null); + t1 = _this._schemeEnd; + if (t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "http")) + return 80; + if (t1 === 5 && B.JSString_methods.startsWith$1(_this._uri, "https")) + return 443; + return 0; + }, + get$path(_) { + return B.JSString_methods.substring$2(this._uri, this._pathStart, this._queryStart); + }, + get$query() { + var t1 = this._queryStart, + t2 = this._fragmentStart; + return t1 < t2 ? B.JSString_methods.substring$2(this._uri, t1 + 1, t2) : ""; + }, + get$fragment() { + var t1 = this._fragmentStart, + t2 = this._uri; + return t1 < t2.length ? B.JSString_methods.substring$1(t2, t1 + 1) : ""; + }, + get$pathSegments() { + var parts, i, + start = this._pathStart, + end = this._queryStart, + t1 = this._uri; + if (B.JSString_methods.startsWith$2(t1, "/", start)) + ++start; + if (start === end) + return B.List_empty; + parts = A._setArrayType([], type$.JSArray_String); + for (i = start; i < end; ++i) + if (t1.charCodeAt(i) === 47) { + parts.push(B.JSString_methods.substring$2(t1, start, i)); + start = i + 1; + } + parts.push(B.JSString_methods.substring$2(t1, start, end)); + return A.List_List$unmodifiable(parts, type$.String); + }, + _isPort$1(port) { + var portDigitStart = this._portStart + 1; + return portDigitStart + port.length === this._pathStart && B.JSString_methods.startsWith$2(this._uri, port, portDigitStart); + }, + removeFragment$0() { + var _this = this, + t1 = _this._fragmentStart, + t2 = _this._uri; + if (t1 >= t2.length) + return _this; + return new A._SimpleUri(B.JSString_methods.substring$2(t2, 0, t1), _this._schemeEnd, _this._hostStart, _this._portStart, _this._pathStart, _this._queryStart, t1, _this._schemeCache); + }, + replace$1$scheme(scheme) { + var schemeChanged, isFile, t1, userInfo, port, host, t2, path, t3, query, fragment, _this = this, _null = null; + scheme = A._Uri__makeScheme(scheme, 0, scheme.length); + schemeChanged = !(_this._schemeEnd === scheme.length && B.JSString_methods.startsWith$1(_this._uri, scheme)); + isFile = scheme === "file"; + t1 = _this._hostStart; + userInfo = t1 > 0 ? B.JSString_methods.substring$2(_this._uri, _this._schemeEnd + 3, t1) : ""; + port = _this.get$hasPort() ? _this.get$port(0) : _null; + if (schemeChanged) + port = A._Uri__makePort(port, scheme); + t1 = _this._hostStart; + if (t1 > 0) + host = B.JSString_methods.substring$2(_this._uri, t1, _this._portStart); + else + host = userInfo.length !== 0 || port != null || isFile ? "" : _null; + t1 = _this._uri; + t2 = _this._queryStart; + path = B.JSString_methods.substring$2(t1, _this._pathStart, t2); + if (!isFile) + t3 = host != null && path.length !== 0; + else + t3 = true; + if (t3 && !B.JSString_methods.startsWith$1(path, "/")) + path = "/" + path; + t3 = _this._fragmentStart; + query = t2 < t3 ? B.JSString_methods.substring$2(t1, t2 + 1, t3) : _null; + t2 = _this._fragmentStart; + fragment = t2 < t1.length ? B.JSString_methods.substring$1(t1, t2 + 1) : _null; + return A._Uri$_internal(scheme, userInfo, host, port, path, query, fragment); + }, + resolve$1(_, reference) { + return this.resolveUri$1(A.Uri_parse(reference)); + }, + resolveUri$1(reference) { + if (reference instanceof A._SimpleUri) + return this._simpleMerge$2(this, reference); + return this._toNonSimple$0().resolveUri$1(reference); + }, + _simpleMerge$2(base, ref) { + var t2, t3, t4, isSimple, delta, refStart, basePathStart, packageNameEnd, basePathStart0, baseStart, baseEnd, baseUri, baseStart0, backCount, refStart0, insert, + t1 = ref._schemeEnd; + if (t1 > 0) + return ref; + t2 = ref._hostStart; + if (t2 > 0) { + t3 = base._schemeEnd; + if (t3 <= 0) + return ref; + t4 = t3 === 4; + if (t4 && B.JSString_methods.startsWith$1(base._uri, "file")) + isSimple = ref._pathStart !== ref._queryStart; + else if (t4 && B.JSString_methods.startsWith$1(base._uri, "http")) + isSimple = !ref._isPort$1("80"); + else + isSimple = !(t3 === 5 && B.JSString_methods.startsWith$1(base._uri, "https")) || !ref._isPort$1("443"); + if (isSimple) { + delta = t3 + 1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, delta) + B.JSString_methods.substring$1(ref._uri, t1 + 1), t3, t2 + delta, ref._portStart + delta, ref._pathStart + delta, ref._queryStart + delta, ref._fragmentStart + delta, base._schemeCache); + } else + return this._toNonSimple$0().resolveUri$1(ref); + } + refStart = ref._pathStart; + t1 = ref._queryStart; + if (refStart === t1) { + t2 = ref._fragmentStart; + if (t1 < t2) { + t3 = base._queryStart; + delta = t3 - t1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(ref._uri, t1), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, t1 + delta, t2 + delta, base._schemeCache); + } + t1 = ref._uri; + if (t2 < t1.length) { + t3 = base._fragmentStart; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, t3) + B.JSString_methods.substring$1(t1, t2), base._schemeEnd, base._hostStart, base._portStart, base._pathStart, base._queryStart, t2 + (t3 - t2), base._schemeCache); + } + return base.removeFragment$0(); + } + t2 = ref._uri; + if (B.JSString_methods.startsWith$2(t2, "/", refStart)) { + basePathStart = base._pathStart; + packageNameEnd = A._SimpleUri__packageNameEnd(this); + basePathStart0 = packageNameEnd > 0 ? packageNameEnd : basePathStart; + delta = basePathStart0 - refStart; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, basePathStart0) + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, basePathStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + } + baseStart = base._pathStart; + baseEnd = base._queryStart; + if (baseStart === baseEnd && base._hostStart > 0) { + while (B.JSString_methods.startsWith$2(t2, "../", refStart)) + refStart += 3; + delta = baseStart - refStart + 1; + return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, baseStart) + "/" + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + } + baseUri = base._uri; + packageNameEnd = A._SimpleUri__packageNameEnd(this); + if (packageNameEnd >= 0) + baseStart0 = packageNameEnd; + else + for (baseStart0 = baseStart; B.JSString_methods.startsWith$2(baseUri, "../", baseStart0);) + baseStart0 += 3; + backCount = 0; + for (;;) { + refStart0 = refStart + 3; + if (!(refStart0 <= t1 && B.JSString_methods.startsWith$2(t2, "../", refStart))) + break; + ++backCount; + refStart = refStart0; + } + for (insert = ""; baseEnd > baseStart0;) { + --baseEnd; + if (baseUri.charCodeAt(baseEnd) === 47) { + if (backCount === 0) { + insert = "/"; + break; + } + --backCount; + insert = "/"; + } + } + if (baseEnd === baseStart0 && base._schemeEnd <= 0 && !B.JSString_methods.startsWith$2(baseUri, "/", baseStart)) { + refStart -= backCount * 3; + insert = ""; + } + delta = baseEnd - refStart + insert.length; + return new A._SimpleUri(B.JSString_methods.substring$2(baseUri, 0, baseEnd) + insert + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); + }, + toFilePath$0() { + var t2, t3, _this = this, + t1 = _this._schemeEnd; + if (t1 >= 0) { + t2 = !(t1 === 4 && B.JSString_methods.startsWith$1(_this._uri, "file")); + t1 = t2; + } else + t1 = false; + if (t1) + throw A.wrapException(A.UnsupportedError$("Cannot extract a file path from a " + _this.get$scheme() + " URI")); + t1 = _this._queryStart; + t2 = _this._uri; + if (t1 < t2.length) { + if (t1 < _this._fragmentStart) + throw A.wrapException(A.UnsupportedError$(string$.Cannotfq)); + throw A.wrapException(A.UnsupportedError$(string$.Cannotff)); + } + t3 = $.$get$_Uri__isWindowsCached(); + if (t3) + t1 = A._Uri__toWindowsFilePath(_this); + else { + if (_this._hostStart < _this._portStart) + A.throwExpression(A.UnsupportedError$(string$.Cannotn)); + t1 = B.JSString_methods.substring$2(t2, _this._pathStart, t1); + } + return t1; + }, + get$hashCode(_) { + var t1 = this._hashCodeCache; + return t1 == null ? this._hashCodeCache = B.JSString_methods.get$hashCode(this._uri) : t1; + }, + $eq(_, other) { + if (other == null) + return false; + if (this === other) + return true; + return type$.Uri._is(other) && this._uri === other.toString$0(0); + }, + _toNonSimple$0() { + var _this = this, _null = null, + t1 = _this.get$scheme(), + t2 = _this.get$userInfo(), + t3 = _this._hostStart > 0 ? _this.get$host() : _null, + t4 = _this.get$hasPort() ? _this.get$port(0) : _null, + t5 = _this._uri, + t6 = _this._queryStart, + t7 = B.JSString_methods.substring$2(t5, _this._pathStart, t6), + t8 = _this._fragmentStart; + t6 = t6 < t8 ? _this.get$query() : _null; + return A._Uri$_internal(t1, t2, t3, t4, t7, t6, t8 < t5.length ? _this.get$fragment() : _null); + }, + toString$0(_) { + return this._uri; + }, + $isUri: 1, + $is_PlatformUri: 1 + }; + A._DataUri.prototype = {}; + A.Expando.prototype = { + $indexSet(_, object, value) { + if (object instanceof A._Record) + A.Expando__badExpandoKey(object); + this._jsWeakMap.set(object, value); + }, + toString$0(_) { + return "Expando:null"; + } + }; + A.NullRejectionException.prototype = { + toString$0(_) { + return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; + }, + $isException: 1 + }; + A.jsify__convert.prototype = { + call$1(o) { + var t1, convertedMap, key, convertedList; + if (A._noJsifyRequired(o)) + return o; + t1 = this._convertedObjects; + if (t1.containsKey$1(o)) + return t1.$index(0, o); + if (type$.Map_dynamic_dynamic._is(o)) { + convertedMap = {}; + t1.$indexSet(0, o, convertedMap); + for (t1 = o.get$keys(o), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + key = t1.get$current(t1); + convertedMap[key] = this.call$1(o.$index(0, key)); + } + return convertedMap; + } else if (type$.Iterable_dynamic._is(o)) { + convertedList = []; + t1.$indexSet(0, o, convertedList); + B.JSArray_methods.addAll$1(convertedList, J.map$1$1$ax(o, this, type$.dynamic)); + return convertedList; + } else + return o; + }, + $signature: 542 + }; + A.promiseToFuture_closure.prototype = { + call$1(r) { + return this.completer.complete$1(r); + }, + $signature: 71 + }; + A.promiseToFuture_closure0.prototype = { + call$1(e) { + if (e == null) + return this.completer.completeError$1(new A.NullRejectionException(e === undefined)); + return this.completer.completeError$1(e); + }, + $signature: 71 + }; + A._JSRandom.prototype = { + nextInt$1(max) { + if (max <= 0 || max > 4294967296) + throw A.wrapException(A.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); + return Math.random() * max >>> 0; + }, + nextDouble$0() { + return Math.random(); + } + }; + A.ArgParser.prototype = { + addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, defaultsTo, help, hide, negatable) { + var _null = null; + this._addOption$13$aliases$hide$hideNegatedUsage$negatable($name, abbr, help, _null, _null, _null, defaultsTo, _null, B.OptionType_tI9, B.List_empty, hide, false, negatable); + }, + addFlag$2$hide($name, hide) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, null, hide, true); + }, + addFlag$2$help($name, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, help, false, true); + }, + addFlag$3$defaultsTo$help($name, defaultsTo, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, defaultsTo, help, false, true); + }, + addFlag$3$help$negatable($name, help, negatable) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, null, false, help, false, negatable); + }, + addFlag$3$abbr$help($name, abbr, help) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, false, help, false, true); + }, + addFlag$4$abbr$help$negatable($name, abbr, help, negatable) { + return this.addFlag$6$abbr$defaultsTo$help$hide$negatable($name, abbr, false, help, false, negatable); + }, + addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, abbr, allowed, defaultsTo, help, hide, valueHelp) { + this._addOption$12$aliases$hide$mandatory($name, abbr, help, valueHelp, allowed, null, defaultsTo, null, B.OptionType_zZK, B.List_empty, hide, false); + }, + addOption$2$hide($name, hide) { + var _null = null; + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, _null, _null, _null, _null, hide, _null); + }, + addOption$6$abbr$allowed$defaultsTo$help$valueHelp($name, abbr, allowed, defaultsTo, help, valueHelp) { + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, abbr, allowed, defaultsTo, help, false, valueHelp); + }, + addOption$4$allowed$defaultsTo$help($name, allowed, defaultsTo, help) { + return this.addOption$7$abbr$allowed$defaultsTo$help$hide$valueHelp($name, null, allowed, defaultsTo, help, false, null); + }, + addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, allowed, allowedHelp, help, splitCommas, valueHelp) { + var t1 = A._setArrayType([], type$.JSArray_String); + this._addOption$12$aliases$hide$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, t1, null, B.OptionType_1Ol, B.List_empty, false, splitCommas); + }, + addMultiOption$5$abbr$help$splitCommas$valueHelp($name, abbr, help, splitCommas, valueHelp) { + return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, null, null, help, splitCommas, valueHelp); + }, + addMultiOption$6$abbr$allowed$allowedHelp$help$valueHelp($name, abbr, allowed, allowedHelp, help, valueHelp) { + return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, abbr, allowed, allowedHelp, help, true, valueHelp); + }, + addMultiOption$2$help($name, help) { + var _null = null; + return this.addMultiOption$7$abbr$allowed$allowedHelp$help$splitCommas$valueHelp($name, _null, _null, _null, help, true, _null); + }, + _addOption$15$aliases$hide$hideNegatedUsage$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, hideNegatedUsage, mandatory, negatable, splitCommas) { + var existing, t2, t3, option, _i, _this = this, _null = null, + t1 = A._setArrayType([$name], type$.JSArray_String); + B.JSArray_methods.addAll$1(t1, aliases); + if (B.JSArray_methods.any$1(t1, new A.ArgParser__addOption_closure(_this))) + throw A.wrapException(A.ArgumentError$('Duplicate option or alias "' + $name + '".', _null)); + t1 = abbr != null; + if (t1) { + existing = _this.findByAbbreviation$1(abbr); + if (existing != null) + throw A.wrapException(A.ArgumentError$('Abbreviation "' + abbr + '" is already used by "' + existing.name + '".', _null)); + } + t2 = allowed == null ? _null : A.List_List$unmodifiable(allowed, type$.String); + if (allowedHelp == null) + t3 = _null; + else { + t3 = type$.String; + t3 = A.ConstantMap_ConstantMap$from(allowedHelp, t3, t3); + } + option = new A.Option($name, abbr, help, valueHelp, t2, t3, defaultsTo, negatable, false, callback, type, splitCommas == null ? type === B.OptionType_1Ol : splitCommas, false, hide); + if ($name.length === 0) + A.throwExpression(A.ArgumentError$("Name cannot be empty.", _null)); + else if (B.JSString_methods.startsWith$1($name, "-")) + A.throwExpression(A.ArgumentError$("Name " + $name + ' cannot start with "-".', _null)); + t2 = $.$get$Option__invalidChars()._nativeRegExp; + if (t2.test($name)) + A.throwExpression(A.ArgumentError$('Name "' + $name + '" contains invalid characters.', _null)); + if (t1) { + if (abbr.length !== 1) + A.throwExpression(A.ArgumentError$("Abbreviation must be null or have length 1.", _null)); + else if (abbr === "-") + A.throwExpression(A.ArgumentError$('Abbreviation cannot be "-".', _null)); + if (t2.test(abbr)) + A.throwExpression(A.ArgumentError$("Abbreviation is an invalid character.", _null)); + } + _this._arg_parser$_options.$indexSet(0, $name, option); + _this._optionsAndSeparators.push(option); + for (t1 = _this._aliases, _i = 0; false; ++_i) + t1.$indexSet(0, aliases[_i], $name); + }, + _addOption$12$aliases$hide$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, splitCommas) { + return this._addOption$15$aliases$hide$hideNegatedUsage$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, false, false, false, splitCommas); + }, + _addOption$12$aliases$hide$mandatory($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, mandatory) { + return this._addOption$15$aliases$hide$hideNegatedUsage$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, false, mandatory, false, null); + }, + _addOption$13$aliases$hide$hideNegatedUsage$negatable($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, hideNegatedUsage, negatable) { + return this._addOption$15$aliases$hide$hideNegatedUsage$mandatory$negatable$splitCommas($name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type, aliases, hide, hideNegatedUsage, false, negatable, null); + }, + findByAbbreviation$1(abbr) { + var t1, t2; + for (t1 = this.options._map, t1 = t1.get$values(t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + if (t2.abbr === abbr) + return t2; + } + return null; + }, + findByNameOrAlias$1($name) { + var t1 = this._aliases.$index(0, $name); + if (t1 == null) + t1 = $name; + return this.options._map.$index(0, t1); + } + }; + A.ArgParser__addOption_closure.prototype = { + call$1($name) { + return this.$this.findByNameOrAlias$1($name) != null; + }, + $signature: 4 + }; + A.ArgParserException.prototype = {}; + A.ArgResults.prototype = { + $index(_, $name) { + var t1 = this._parser.options._map; + if (!t1.containsKey$1($name)) + throw A.wrapException(A.ArgumentError$('Could not find an option named "--' + $name + '".', null)); + t1 = t1.$index(0, $name); + t1.toString; + return t1.valueOrDefault$1(this._parsed.$index(0, $name)); + }, + wasParsed$1($name) { + if (!this._parser.options._map.containsKey$1($name)) + throw A.wrapException(A.ArgumentError$('Could not find an option named "--' + $name + '".', null)); + return this._parsed.containsKey$1($name); + } + }; + A.Option.prototype = { + valueOrDefault$1(value) { + var t1; + if (value != null) + return value; + if (this.type === B.OptionType_1Ol) { + t1 = this.defaultsTo; + return t1 == null ? A._setArrayType([], type$.JSArray_String) : t1; + } + return this.defaultsTo; + } + }; + A.OptionType.prototype = {}; + A.Parser0.prototype = { + parse$0(_) { + var commandResults, commandName, commandParser, error, t1, t3, t4, t5, t6, t7, t8, command, exception, _this = this, + t2 = _this._args; + t2.toList$0(0); + commandResults = null; + for (t3 = _this._parser$_rest, t4 = _this._grammar, t5 = t4.commands, t6 = t2.$ti._precomputed1; !t2.get$isEmpty(0);) { + t7 = t2._head; + if (t7 === t2._tail) + A.throwExpression(A.IterableElementError_noElement()); + t7 = t2._table[t7]; + t8 = t7 == null; + if ((t8 ? t6._as(t7) : t7) === "--") { + t2.removeFirst$0(); + break; + } + if (t8) + t7 = t6._as(t7); + command = t5._map.$index(0, t7); + if (command != null) { + t5 = t3.length; + t7 = t2._head; + if (t7 === t2._tail) + A.throwExpression(A.IterableElementError_noElement()); + t7 = t2._table[t7]; + t6 = t7 == null ? t6._as(t7) : t7; + if (t5 !== 0) + A.throwExpression(A.ArgParserException$("Cannot specify arguments before a command.", null, t6, null, null)); + commandName = t2.removeFirst$0(); + t5 = type$.JSArray_String; + t6 = A._setArrayType([], t5); + B.JSArray_methods.addAll$1(t6, t3); + commandParser = new A.Parser0(commandName, _this, command, t2, t6, A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic)); + try { + commandResults = J.parse$0$z(commandParser); + } catch (exception) { + t2 = A.unwrapException(exception); + if (t2 instanceof A.ArgParserException) { + error = t2; + t2 = error.message; + t1 = A._setArrayType([commandName], t5); + J.addAll$1$ax(t1, error.commands); + throw A.wrapException(A.ArgParserException$(t2, t1, error.argumentName, error.source, error.offset)); + } else + throw exception; + } + B.JSArray_methods.clear$0(t3); + break; + } + if (_this._parseSoloOption$0()) + continue; + if (_this._parseAbbreviation$1(_this)) + continue; + if (_this._parseLongOption$0()) + continue; + t3.push(t2.removeFirst$0()); + } + t4.options._map.forEach$1(0, new A.Parser_parse_closure(_this)); + B.JSArray_methods.addAll$1(t3, t2); + t2.clear$0(0); + return new A.ArgResults(t4, _this._results, _this._commandName, new A.UnmodifiableListView(t3, type$.UnmodifiableListView_String)); + }, + _readNextArgAsValue$2(option, arg) { + var _this = this, + t1 = _this._args; + _this._validate$3(!t1.get$isEmpty(0), 'Missing argument for "' + arg + '".', arg); + _this._setOption$4(_this._results, option, t1.get$first(0), arg); + t1.removeFirst$0(); + }, + _parseSoloOption$0() { + var opt, + t1 = this._args; + if (t1.get$first(0).length !== 2) + return false; + if (!B.JSString_methods.startsWith$1(t1.get$first(0), "-")) + return false; + opt = t1.get$first(0)[1]; + if (!A._isLetterOrDigit(opt.charCodeAt(0))) + return false; + this._handleSoloOption$1(opt); + return true; + }, + _handleSoloOption$1(opt) { + var t1, _this = this, + option = _this._grammar.findByAbbreviation$1(opt); + if (option == null) { + t1 = _this._parser$_parent; + _this._validate$3(t1 != null, 'Could not find an option or flag "-' + opt + '".', "-" + opt); + t1._handleSoloOption$1(opt); + return true; + } + _this._args.removeFirst$0(); + if (option.type === B.OptionType_tI9) + _this._results.$indexSet(0, option.name, true); + else + _this._readNextArgAsValue$2(option, "-" + opt); + return true; + }, + _parseAbbreviation$1(innermostCommand) { + var t2, index, t3, t4, t5, lettersAndDigits, rest, + t1 = this._args; + if (t1.get$first(0).length < 2) + return false; + if (!B.JSString_methods.startsWith$1(t1.get$first(0), "-")) + return false; + t2 = t1.$ti._precomputed1; + index = 1; + for (;;) { + t3 = t1._head; + if (t3 === t1._tail) + A.throwExpression(A.IterableElementError_noElement()); + t3 = t1._table[t3]; + t4 = t3 == null; + if (index < (t4 ? t2._as(t3) : t3).length) { + t5 = true; + t3 = (t4 ? t2._as(t3) : t3).charCodeAt(index); + if (!(t3 >= 65 && t3 <= 90)) + if (!(t3 >= 97 && t3 <= 122)) + t3 = t3 >= 48 && t3 <= 57; + else + t3 = t5; + else + t3 = t5; + } else + t3 = false; + if (!t3) + break; + ++index; + } + if (index === 1) + return false; + lettersAndDigits = B.JSString_methods.substring$2(t1.get$first(0), 1, index); + rest = B.JSString_methods.substring$1(t1.get$first(0), index); + if (B.JSString_methods.contains$1(rest, "\n") || B.JSString_methods.contains$1(rest, "\r")) + return false; + this._handleAbbreviation$3(lettersAndDigits, rest, innermostCommand); + return true; + }, + _handleAbbreviation$3(lettersAndDigits, rest, innermostCommand) { + var t1, i, i0, _this = this, + c = B.JSString_methods.substring$2(lettersAndDigits, 0, 1), + first = _this._grammar.findByAbbreviation$1(c); + if (first == null) { + t1 = _this._parser$_parent; + _this._validate$3(t1 != null, string$.Could_ + c + '".', "-" + c); + t1._handleAbbreviation$3(lettersAndDigits, rest, innermostCommand); + return true; + } else { + t1 = "-" + c; + if (first.type !== B.OptionType_tI9) + _this._setOption$4(_this._results, first, B.JSString_methods.substring$1(lettersAndDigits, 1) + rest, t1); + else { + _this._validate$3(rest === "", 'Option "-' + c + '" is a flag and cannot handle value "' + B.JSString_methods.substring$1(lettersAndDigits, 1) + rest + '".', t1); + for (t1 = lettersAndDigits.length, i = 0; i < t1; i = i0) { + i0 = i + 1; + innermostCommand._parseShortFlag$1(B.JSString_methods.substring$2(lettersAndDigits, i, i0)); + } + } + } + _this._args.removeFirst$0(); + return true; + }, + _parseShortFlag$1(c) { + var t1, _this = this, + option = _this._grammar.findByAbbreviation$1(c); + if (option == null) { + t1 = _this._parser$_parent; + _this._validate$3(t1 != null, string$.Could_ + c + '".', "-" + c); + t1._parseShortFlag$1(c); + return; + } + _this._validate$3(option.type === B.OptionType_tI9, 'Option "-' + c + '" must be a flag to be in a collapsed "-".', "-" + c); + _this._results.$indexSet(0, option.name, true); + }, + _parseLongOption$0() { + var index, t2, $name, t3, i, t4, t5, value, + t1 = this._args; + if (!B.JSString_methods.startsWith$1(t1.get$first(0), "--")) + return false; + index = B.JSString_methods.indexOf$1(t1.get$first(0), "="); + t2 = index === -1; + $name = t2 ? B.JSString_methods.substring$1(t1.get$first(0), 2) : B.JSString_methods.substring$2(t1.get$first(0), 2, index); + for (t3 = $name.length, i = 0; i !== t3; ++i) { + t4 = $name.charCodeAt(i); + t5 = true; + if (!(t4 >= 65 && t4 <= 90)) + if (!(t4 >= 97 && t4 <= 122)) + t5 = t4 >= 48 && t4 <= 57; + if (!(t5 || t4 === 45 || t4 === 95)) + return false; + } + value = t2 ? null : B.JSString_methods.substring$1(t1.get$first(0), index + 1); + if (value != null) + t1 = B.JSString_methods.contains$1(value, "\n") || B.JSString_methods.contains$1(value, "\r"); + else + t1 = false; + if (t1) + return false; + this._handleLongOption$2($name, value); + return true; + }, + _handleLongOption$2($name, value) { + var _this = this, + _s34_ = 'Could not find an option named "--', + t1 = _this._grammar, + option = t1.findByNameOrAlias$1($name); + if (option != null) { + _this._args.removeFirst$0(); + if (option.type === B.OptionType_tI9) { + _this._validate$3(value == null, 'Flag option "--' + $name + '" should not be given a value.', "--" + $name); + _this._results.$indexSet(0, option.name, true); + } else { + t1 = "--" + $name; + if (value != null) + _this._setOption$4(_this._results, option, value, t1); + else + _this._readNextArgAsValue$2(option, t1); + } + } else if (B.JSString_methods.startsWith$1($name, "no-")) { + option = t1.findByNameOrAlias$1(B.JSString_methods.substring$1($name, 3)); + if (option == null) { + t1 = _this._parser$_parent; + _this._validate$3(t1 != null, _s34_ + $name + '".', "--" + $name); + t1._handleLongOption$2($name, value); + return true; + } + _this._args.removeFirst$0(); + t1 = "--" + $name; + _this._validate$3(option.type === B.OptionType_tI9, 'Cannot negate non-flag option "--' + $name + '".', t1); + _this._validate$3(option.negatable, 'Cannot negate option "--' + $name + '".', t1); + _this._results.$indexSet(0, option.name, false); + } else { + t1 = _this._parser$_parent; + _this._validate$3(t1 != null, _s34_ + $name + '".', "--" + $name); + t1._handleLongOption$2($name, value); + return true; + } + return true; + }, + _validate$3(condition, message, args) { + if (!condition) + throw A.wrapException(A.ArgParserException$(message, null, args, null, null)); + }, + _setOption$4(results, option, value, arg) { + var list, t1, t2, t3, _i, element; + if (option.type !== B.OptionType_1Ol) { + this._validateAllowed$3(option, value, arg); + results.$indexSet(0, option.name, value); + return; + } + list = type$.List_dynamic._as(results.putIfAbsent$2(option.name, new A.Parser__setOption_closure())); + if (option.splitCommas) + for (t1 = value.split(","), t2 = t1.length, t3 = J.getInterceptor$ax(list), _i = 0; _i < t2; ++_i) { + element = t1[_i]; + this._validateAllowed$3(option, element, arg); + t3.add$1(list, element); + } + else { + this._validateAllowed$3(option, value, arg); + J.add$1$ax(list, value); + } + }, + _validateAllowed$3(option, value, arg) { + var t1 = option.allowed; + if (t1 == null) + return; + this._validate$3(B.JSArray_methods.contains$1(t1, value), '"' + value + '" is not an allowed value for option "' + arg + '".', arg); + } + }; + A.Parser_parse_closure.prototype = { + call$2($name, option) { + var parsedOption = this.$this._results.$index(0, $name), + callback = option.callback; + if (callback == null) + return; + callback.call$1(option.valueOrDefault$1(parsedOption)); + }, + $signature: 311 + }; + A.Parser__setOption_closure.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_String); + }, + $signature: 139 + }; + A._Usage.prototype = { + get$_columnWidths() { + var result, _this = this, + value = _this.___Usage__columnWidths_FI; + if (value === $) { + result = _this._calculateColumnWidths$0(); + _this.___Usage__columnWidths_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.___Usage__columnWidths_FI = result; + value = result; + } + return value; + }, + generate$0() { + var t1, t2, t3, t4, _i, optionOrSeparator, t5, _this = this; + for (t1 = _this._usage$_optionsAndSeparators, t2 = t1.length, t3 = type$.Option, t4 = _this._usage$_buffer, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + optionOrSeparator = t1[_i]; + if (typeof optionOrSeparator == "string") { + t5 = t4._contents; + t4._contents = (t5.length !== 0 ? t4._contents = t5 + "\n\n" : t5) + optionOrSeparator; + _this._newlinesNeeded = 1; + continue; + } + t3._as(optionOrSeparator); + if (optionOrSeparator.hide) + continue; + _this._writeOption$1(optionOrSeparator); + } + t1 = t4._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _writeOption$1(option) { + var _0_0, _1_0, t2, t3, t4, $name, $content, _this = this, + t1 = option.abbr; + _this._write$2(0, t1 == null ? "" : "-" + t1 + ", "); + t1 = _this._longOption$1(option); + _this._write$2(1, t1); + _0_0 = option.help; + if (_0_0 != null) + _this._write$2(2, _0_0); + _1_0 = option.allowedHelp; + if (_1_0 != null) { + _this._newline$0(); + for (t1 = _1_0.get$entries(_1_0), t1 = t1.get$iterator(t1), t2 = option.defaultsTo, t3 = type$.List_dynamic._is(t2); t1.moveNext$0();) { + t4 = t1.get$current(t1); + $name = t4.key; + $content = t4.value; + t4 = (t3 ? B.JSArray_methods.contains$1(t2, $name) : t2 === $name) ? " (default)" : ""; + _this._write$2(1, " [" + $name + "]" + t4); + _this._write$2(2, $content); + } + _this._newline$0(); + } else if (option.allowed != null) + _this._write$2(2, _this._buildAllowedList$1(option)); + else { + t1 = option.type; + if (t1 === B.OptionType_tI9) { + if (option.defaultsTo === true) + _this._write$2(2, "(defaults to on)"); + } else if (t1 === B.OptionType_1Ol) { + t1 = option.defaultsTo; + if (t1 != null && type$.Iterable_dynamic._as(t1).length !== 0) { + type$.List_dynamic._as(t1); + _this._write$2(2, "(defaults to " + new A.MappedListIterable(t1, new A._Usage__writeOption_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + ")"); + } + } else { + t1 = option.defaultsTo; + if (t1 != null) + _this._write$2(2, '(defaults to "' + A.S(t1) + '")'); + } + } + }, + _longOption$1(option) { + var t1 = option.name, + result = option.negatable ? "--[no-]" + t1 : "--" + t1; + t1 = option.valueHelp; + return t1 != null ? result + ("=<" + t1 + ">") : result; + }, + _calculateColumnWidths$0() { + var t1, t2, t3, abbr, title, _i, option, t4, t5, t6, t7, t8; + for (t1 = this._usage$_optionsAndSeparators, t2 = t1.length, t3 = type$.List_dynamic, abbr = 0, title = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + option = t1[_i]; + if (!(option instanceof A.Option)) + continue; + if (option.hide) + continue; + t4 = option.abbr; + abbr = Math.max(abbr, (t4 == null ? "" : "-" + t4 + ", ").length); + t4 = this._longOption$1(option); + title = Math.max(title, t4.length); + t4 = option.allowedHelp; + if (t4 != null) + for (t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4), t5 = option.defaultsTo, t6 = t3._is(t5); t4.moveNext$0();) { + t7 = t4.get$current(t4); + t8 = (t6 ? B.JSArray_methods.contains$1(t5, t7) : t5 === t7) ? " (default)" : ""; + title = Math.max(title, (" [" + t7 + "]" + t8).length); + } + } + return A._setArrayType([abbr, title + 4], type$.JSArray_int); + }, + _newline$0() { + ++this._newlinesNeeded; + this._currentColumn = 0; + }, + _write$2(column, text) { + var t1, _i, + lines = A._setArrayType(text.split("\n"), type$.JSArray_String); + this.get$_columnWidths(); + for (;;) { + if (!(lines.length !== 0 && B.JSString_methods.trim$0(B.JSArray_methods.get$first(lines)) === "")) + break; + B.JSArray_methods.removeAt$1(lines, 0); + } + for (;;) { + if (!(lines.length !== 0 && B.JSString_methods.trim$0(B.JSArray_methods.get$last(lines)) === "")) + break; + lines.pop(); + } + for (t1 = lines.length, _i = 0; _i < lines.length; lines.length === t1 || (0, A.throwConcurrentModificationError)(lines), ++_i) + this._writeLine$2(column, lines[_i]); + }, + _writeLine$2(column, text) { + var t1, t2, t3, _this = this; + for (t1 = _this._usage$_buffer; t2 = _this._newlinesNeeded, t2 > 0;) { + t1._contents += "\n"; + _this._newlinesNeeded = t2 - 1; + } + while (t2 = _this._currentColumn, t2 !== column) { + if (t2 < 2) { + t2 = _this.get$_columnWidths(); + t3 = _this._currentColumn; + t2 = B.JSString_methods.$mul(" ", t2[t3]); + t1._contents += t2; + t2 = t3; + } else + t1._contents += "\n"; + _this._currentColumn = (t2 + 1) % 3; + } + t2 = _this.get$_columnWidths(); + t3 = t1._contents; + if (column < 2) + t1._contents = t3 + B.JSString_methods.padRight$1(text, t2[column]); + else + t1._contents = t3 + text; + _this._currentColumn = (_this._currentColumn + 1) % 3; + if (column === 2) + ++_this._newlinesNeeded; + }, + _buildAllowedList$1(option) { + var t2, first, _i, t3, allowed, + t1 = option.defaultsTo, + isDefault = type$.List_dynamic._is(t1) ? B.JSArray_methods.get$contains(t1) : new A._Usage__buildAllowedList_closure(option); + for (t1 = option.allowed, t2 = t1.length, first = true, _i = 0, t3 = "["; _i < t2; ++_i, first = false) { + allowed = t1[_i]; + t3 = (!first ? t3 + ", " : t3) + allowed; + if (isDefault.call$1(allowed)) + t3 += " (default)"; + } + t1 = t3 + "]"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._Usage__writeOption_closure.prototype = { + call$1(value) { + return '"' + A.S(value) + '"'; + }, + $signature: 134 + }; + A._Usage__buildAllowedList_closure.prototype = { + call$1(value) { + return value === this.option.defaultsTo; + }, + $signature: 4 + }; + A.FutureGroup.prototype = { + add$1(_, task) { + var t1, index, _this = this; + if (_this._future_group$_closed) + throw A.wrapException(A.StateError$("The FutureGroup is closed.")); + t1 = _this._future_group$_values; + index = t1.length; + t1.push(null); + ++_this._future_group$_pending; + task.then$1$1(0, new A.FutureGroup_add_closure(_this, index), type$.Null).catchError$1(new A.FutureGroup_add_closure0(_this)); + }, + close$0(_) { + var t1, t2, _this = this; + _this._future_group$_closed = true; + if (_this._future_group$_pending !== 0) + return; + t1 = _this._future_group$_completer; + if ((t1.future._state & 30) !== 0) + return; + t2 = _this.$ti._eval$1("WhereTypeIterable<1>"); + t2 = A.List_List$_of(new A.WhereTypeIterable(_this._future_group$_values, t2), t2._eval$1("Iterable.E")); + t1.complete$1(t2); + } + }; + A.FutureGroup_add_closure.prototype = { + call$1(value) { + var t3, t4, + t1 = this.$this, + t2 = t1._future_group$_completer; + if ((t2.future._state & 30) !== 0) + return null; + t3 = --t1._future_group$_pending; + t4 = t1._future_group$_values; + t4[this.index] = value; + if (t3 !== 0) + return null; + if (!t1._future_group$_closed) + return null; + t1 = t1.$ti._eval$1("WhereTypeIterable<1>"); + t1 = A.List_List$_of(new A.WhereTypeIterable(t4, t1), t1._eval$1("Iterable.E")); + t2.complete$1(t1); + }, + $signature() { + return this.$this.$ti._eval$1("Null(1)"); + } + }; + A.FutureGroup_add_closure0.prototype = { + call$2(error, stackTrace) { + var t1 = this.$this._future_group$_completer; + if ((t1.future._state & 30) !== 0) + return null; + t1.completeError$2(error, stackTrace); + }, + $signature: 51 + }; + A.ErrorResult.prototype = { + complete$1(completer) { + completer.completeError$2(this.error, this.stackTrace); + }, + get$hashCode(_) { + return (J.get$hashCode$(this.error) ^ A.Primitives_objectHashCode(this.stackTrace) ^ 492929599) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ErrorResult && J.$eq$(this.error, other.error) && this.stackTrace === other.stackTrace; + }, + $isResult: 1 + }; + A.ValueResult.prototype = { + complete$1(completer) { + completer.complete$1(this.value); + }, + get$hashCode(_) { + return (J.get$hashCode$(this.value) ^ 842997089) >>> 0; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ValueResult && J.$eq$(this.value, other.value); + }, + $isResult: 1 + }; + A.StreamCompleter.prototype = { + setSourceStream$1(sourceStream) { + var t1 = this._stream_completer$_stream; + if (t1._sourceStream != null) + throw A.wrapException(A.StateError$("Source stream already set")); + t1._sourceStream = sourceStream; + if (t1._stream_completer$_controller != null) + t1._linkStreamToController$0(); + }, + setError$2(error, stackTrace) { + var t1 = this.$ti, + t2 = A._interceptUserError(error, stackTrace), + t3 = new A._Future($.Zone__current, t1._eval$1("_Future<1>")); + t3._asyncCompleteErrorObject$1(t2); + this.setSourceStream$1(A.Stream_Stream$fromFuture(t3, t1._precomputed1)); + }, + setError$1(error) { + return this.setError$2(error, null); + } + }; + A._CompleterStream.prototype = { + listen$4$cancelOnError$onDone$onError(_, onData, cancelOnError, onDone, onError) { + var sourceStream, t1, _this = this, _null = null; + if (_this._stream_completer$_controller == null) { + sourceStream = _this._sourceStream; + if (sourceStream != null && !sourceStream.get$isBroadcast()) + return sourceStream.listen$4$cancelOnError$onDone$onError(0, onData, cancelOnError, onDone, onError); + if (_this._stream_completer$_controller == null) + _this._stream_completer$_controller = A.StreamController_StreamController(_null, _null, _null, _null, true, _this.$ti._precomputed1); + if (_this._sourceStream != null) + _this._linkStreamToController$0(); + } + t1 = _this._stream_completer$_controller; + t1.toString; + return new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$4$cancelOnError$onDone$onError(0, onData, cancelOnError, onDone, onError); + }, + listen$1(_, onData) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, null, null); + }, + listen$3$onDone$onError(_, onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(0, onData, null, onDone, onError); + }, + _linkStreamToController$0() { + var t2, + t1 = this._stream_completer$_controller; + t1.toString; + t2 = this._sourceStream; + t2.toString; + t1.addStream$2$cancelOnError(t2, false).whenComplete$1(t1.get$close(t1)); + } + }; + A.StreamGroup.prototype = { + add$1(_, stream) { + var t1, _this = this; + if (_this._closed) + throw A.wrapException(A.StateError$("Can't add a Stream to a closed StreamGroup.")); + t1 = _this._stream_group$_state; + if (t1 === B._StreamGroupState_dormant) + _this._subscriptions.putIfAbsent$2(stream, new A.StreamGroup_add_closure()); + else if (t1 === B._StreamGroupState_canceled) + return stream.listen$1(0, null).cancel$0(); + else + _this._subscriptions.putIfAbsent$2(stream, new A.StreamGroup_add_closure0(_this, stream)); + return null; + }, + remove$1(_, stream) { + var t1 = this._subscriptions, + subscription = t1.remove$1(0, stream), + future = subscription == null ? null : subscription.cancel$0(); + if (t1.__js_helper$_length === 0) + if (this._closed) { + t1 = this.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + A.scheduleMicrotask(t1.get$close(t1)); + } + return future; + }, + _onListen$0() { + var stream, t1, t2, t3, _i, entry, exception, _this = this; + _this._stream_group$_state = B._StreamGroupState_listening; + t1 = _this._subscriptions; + t2 = A.List_List$_of(new A.LinkedHashMapEntriesIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapEntriesIterable<1,2>")), _this.$ti._eval$1("MapEntry,StreamSubscription<1>?>")); + t3 = t2.length; + _i = 0; + for (; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + entry = t2[_i]; + if (entry.value != null) + continue; + stream = entry.key; + try { + t1.$indexSet(0, stream, _this._listenToStream$1(stream)); + } catch (exception) { + t1 = _this._onCancel$0(); + if (t1 != null) + t1.catchError$1(new A.StreamGroup__onListen_closure()); + throw exception; + } + } + }, + _onPause$0() { + this._stream_group$_state = B._StreamGroupState_paused; + for (var t1 = this._subscriptions, t1 = new A.LinkedHashMapValueIterator(t1, t1._modifications, t1._first); t1.moveNext$0();) + t1.__js_helper$_current.pause$0(0); + }, + _onResume$0() { + this._stream_group$_state = B._StreamGroupState_listening; + for (var t1 = this._subscriptions, t1 = new A.LinkedHashMapValueIterator(t1, t1._modifications, t1._first); t1.moveNext$0();) + t1.__js_helper$_current.resume$0(0); + }, + _onCancel$0() { + var t1, t2, t3, futures; + this._stream_group$_state = B._StreamGroupState_canceled; + t1 = this._subscriptions; + t2 = A._instanceType(t1)._eval$1("LinkedHashMapEntriesIterable<1,2>"); + t3 = type$.NonNullsIterable_Future_void; + futures = A.List_List$_of(new A.NonNullsIterable(A.MappedIterable_MappedIterable(new A.LinkedHashMapEntriesIterable(t1, t2), new A.StreamGroup__onCancel_closure(this), t2._eval$1("Iterable.E"), type$.nullable_Future_void), t3), t3._eval$1("Iterable.E")); + t1.clear$0(0); + return futures.length === 0 ? null : A.Future_wait(futures, false, type$.void); + }, + _listenToStream$1(stream) { + var subscription, + t1 = this.__StreamGroup__controller_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + subscription = stream.listen$3$onDone$onError(0, t1.get$add(t1), new A.StreamGroup__listenToStream_closure(this, stream), t1.get$addError()); + if (this._stream_group$_state === B._StreamGroupState_paused) + subscription.pause$0(0); + return subscription; + } + }; + A.StreamGroup_add_closure.prototype = { + call$0() { + return null; + }, + $signature: 1 + }; + A.StreamGroup_add_closure0.prototype = { + call$0() { + return this.$this._listenToStream$1(this.stream); + }, + $signature() { + return this.$this.$ti._eval$1("StreamSubscription<1>()"); + } + }; + A.StreamGroup__onListen_closure.prototype = { + call$1(_) { + }, + $signature: 62 + }; + A.StreamGroup__onCancel_closure.prototype = { + call$1(entry) { + var t1, exception, + subscription = entry.value; + try { + if (subscription != null) { + t1 = subscription.cancel$0(); + return t1; + } + t1 = entry.key.listen$1(0, null).cancel$0(); + return t1; + } catch (exception) { + return null; + } + }, + $signature() { + return this.$this.$ti._eval$1("Future<~>?(MapEntry,StreamSubscription<1>?>)"); + } + }; + A.StreamGroup__listenToStream_closure.prototype = { + call$0() { + return this.$this.remove$1(0, this.stream); + }, + $signature: 0 + }; + A._StreamGroupState.prototype = { + toString$0(_) { + return this.name; + } + }; + A.StreamQueue.prototype = { + _updateRequests$0() { + var t1, t2, t3, t4, _this = this; + for (t1 = _this._requestQueue, t2 = _this._eventQueue, t3 = t1.$ti._precomputed1; !t1.get$isEmpty(0);) { + t4 = t1._head; + if (t4 === t1._tail) + A.throwExpression(A.IterableElementError_noElement()); + t4 = t1._table[t4]; + if (t4 == null) + t4 = t3._as(t4); + if (t4.update$2(t2, _this._isDone)) + t1.removeFirst$0(); + else + return; + } + if (!_this._isDone) + _this._stream_queue$_subscription.pause$0(0); + }, + _ensureListening$0() { + var t1, _this = this; + if (_this._isDone) + return; + t1 = _this._stream_queue$_subscription; + if (t1 == null) + _this._stream_queue$_subscription = _this._stream_queue$_source.listen$3$onDone$onError(0, new A.StreamQueue__ensureListening_closure(_this), new A.StreamQueue__ensureListening_closure0(_this), new A.StreamQueue__ensureListening_closure1(_this)); + else + t1.resume$0(0); + }, + _addResult$1(result) { + ++this._eventsReceived; + this._eventQueue._queue_list$_add$1(result); + this._updateRequests$0(); + }, + _addRequest$1(request) { + var _this = this, + t1 = _this._requestQueue; + if (t1._head === t1._tail) { + if (request.update$2(_this._eventQueue, _this._isDone)) + return; + _this._ensureListening$0(); + } + t1._add$1(request); + } + }; + A.StreamQueue__ensureListening_closure.prototype = { + call$1(data) { + var t1 = this.$this; + t1._addResult$1(new A.ValueResult(data, t1.$ti._eval$1("ValueResult<1>"))); + }, + $signature() { + return this.$this.$ti._eval$1("~(1)"); + } + }; + A.StreamQueue__ensureListening_closure1.prototype = { + call$2(error, stackTrace) { + this.$this._addResult$1(new A.ErrorResult(error, stackTrace)); + }, + $signature: 51 + }; + A.StreamQueue__ensureListening_closure0.prototype = { + call$0() { + var t1 = this.$this; + t1._stream_queue$_subscription = null; + t1._isDone = true; + t1._updateRequests$0(); + }, + $signature: 0 + }; + A._NextRequest.prototype = { + update$2(events, isDone) { + if (!events.get$isEmpty(events)) { + events.removeFirst$0().complete$1(this._completer); + return true; + } + if (isDone) { + this._completer.completeError$2(new A.StateError("No elements"), A.StackTrace_current()); + return true; + } + return false; + }, + $is_EventRequest: 1 + }; + A._isStrictMode_closure.prototype = { + call$0() { + var exception; + try { + "".name = null; + return false; + } catch (exception) { + return true; + } + }, + $signature: 20 + }; + A.Repl.prototype = {}; + A.alwaysValid_closure.prototype = { + call$1(text) { + return true; + }, + $signature: 4 + }; + A.ReplAdapter.prototype = { + runAsync$0() { + var rl, runController, _this = this, t1 = {}, + t2 = J.get$isTTY$x(self.process.stdin), + output = (t2 == null ? false : t2) ? self.process.stdout : null; + t2 = _this.repl.prompt; + rl = J.createInterface$1$x($.$get$readline(), {input: self.process.stdin, output: output, prompt: t2}); + _this.rl = rl; + t1.statement = ""; + t1.prompt = t2; + runController = A._Cell$(); + runController.__late_helper$_value = A.StreamController_StreamController(_this.get$exit(_this), new A.ReplAdapter_runAsync_closure(t1, _this, rl, runController), null, null, false, type$.String); + return runController._readLocal$0().get$stream(); + }, + exit$0(_) { + var t1 = this.rl; + if (t1 != null) + J.close$0$x(t1); + this.rl = null; + } + }; + A.ReplAdapter_runAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$handler = 1, $async$errorStack = [], $async$self = this, lineController, lineQueue, line, error, stackTrace, t1, t2, t3, t4, $prompt, prompt0, t5, t6, t7, t8, line0, toZone, statement, exception, $async$exception; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 3; + lineController = A.StreamController_StreamController(null, null, null, null, false, type$.String); + t1 = lineController; + t2 = A.QueueList$(null, type$.Result_String); + t3 = A.ListQueue$(type$._EventRequest_dynamic); + lineQueue = new A.StreamQueue(new A._ControllerStream(t1, A._instanceType(t1)._eval$1("_ControllerStream<1>")), t2, t3, type$.StreamQueue_String); + t1 = $async$self.rl; + t2 = J.getInterceptor$x(t1); + t2.on$2(t1, "line", A.allowInterop(new A.ReplAdapter_runAsync__closure(lineController))); + t3 = $async$self._box_0, t4 = $async$self.$this.repl, $prompt = t4.continuation, prompt0 = t4.prompt, t5 = $async$self.runController; + case 6: + // for condition + // trivial condition + t6 = J.get$isTTY$x(self.process.stdin); + if (t6 == null ? false : t6) + J.write$1$x(self.process.stdout, t3.prompt); + t6 = lineQueue; + t6.toString; + t7 = t6.$ti; + t8 = new A._Future($.Zone__current, t7._eval$1("_Future<1>")); + t6._addRequest$1(new A._NextRequest(new A._AsyncCompleter(t8, t7._eval$1("_AsyncCompleter<1>")), t7._eval$1("_NextRequest<1>"))); + $async$goto = 8; + return A._asyncAwait(t8, $async$call$0); + case 8: + // returning from await. + line = $async$result; + t6 = J.get$isTTY$x(self.process.stdin); + if (!(t6 == null ? false : t6)) { + line0 = t3.prompt + A.S(line); + toZone = $._printToZone; + if (toZone == null) + A.printString(line0); + else + toZone.call$1(line0); + } + statement = B.JSString_methods.$add(t3.statement, line); + t3.statement = statement; + if (t4.validator.call$1(statement)) { + t6 = t5.__late_helper$_value; + if (t6 === t5) + A.throwExpression(A.LateError$localNI("")); + J.add$1$ax(t6, t3.statement); + t3.statement = ""; + t3.prompt = prompt0; + t2.setPrompt$1(t1, prompt0); + } else { + t3.statement += "\n"; + t3.prompt = $prompt; + t2.setPrompt$1(t1, $prompt); + } + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + $async$handler = 1; + // goto after finally + $async$goto = 5; + break; + case 3: + // catch + $async$handler = 2; + $async$exception = $async$errorStack.pop(); + error = A.unwrapException($async$exception); + stackTrace = A.getTraceFromException($async$exception); + t1 = $async$self.runController; + t1._readLocal$0().addError$2(error, stackTrace); + t2 = $async$self.$this.exit$0(0); + t2 = A._Future$value(t2, type$.void); + $async$goto = 9; + return A._asyncAwait(t2, $async$call$0); + case 9: + // returning from await. + J.close$0$x(t1._readLocal$0()); + // goto after finally + $async$goto = 5; + break; + case 2: + // uncaught + // goto rethrow + $async$goto = 1; + break; + case 5: + // after finally + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A.ReplAdapter_runAsync__closure.prototype = { + call$1(value) { + return this.lineController.add$1(0, A._asString(value)); + }, + $signature: 71 + }; + A.Stdin.prototype = {}; + A.Stdout.prototype = {}; + A.ReadlineModule.prototype = {}; + A.ReadlineOptions.prototype = {}; + A.ReadlineInterface.prototype = {}; + A.EmptyUnmodifiableSet.prototype = { + get$iterator(_) { + return B.C_EmptyIterator; + }, + get$length(_) { + return 0; + }, + contains$1(_, element) { + return false; + }, + toSet$0(_) { + return A.LinkedHashSet_LinkedHashSet$_empty(this.$ti._precomputed1); + }, + $isEfficientLengthIterable: 1, + $isSet: 1 + }; + A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin.prototype = {}; + A.DefaultEquality.prototype = {}; + A.IterableEquality.prototype = { + equals$2(_, elements1, elements2) { + var it1, it2, hasNext; + if (elements1 === elements2) + return true; + it1 = J.get$iterator$ax(elements1); + it2 = J.get$iterator$ax(elements2); + for (;;) { + hasNext = it1.moveNext$0(); + if (hasNext !== it2.moveNext$0()) + return false; + if (!hasNext) + return true; + if (!J.$eq$(it1.get$current(it1), it2.get$current(it2))) + return false; + } + }, + hash$1(elements) { + var t1, hash, _i; + for (t1 = elements.length, hash = 0, _i = 0; _i < elements.length; elements.length === t1 || (0, A.throwConcurrentModificationError)(elements), ++_i) { + hash = hash + J.get$hashCode$(elements[_i]) & 2147483647; + hash = hash + (hash << 10 >>> 0) & 2147483647; + hash ^= hash >>> 6; + } + hash = hash + (hash << 3 >>> 0) & 2147483647; + hash ^= hash >>> 11; + return hash + (hash << 15 >>> 0) & 2147483647; + } + }; + A.ListEquality.prototype = { + equals$2(_, list1, list2) { + var t1, $length, t2, i; + if (list1 == null ? list2 == null : list1 === list2) + return true; + if (list1 == null || list2 == null) + return false; + t1 = J.getInterceptor$asx(list1); + $length = t1.get$length(list1); + t2 = J.getInterceptor$asx(list2); + if ($length !== t2.get$length(list2)) + return false; + for (i = 0; i < $length; ++i) + if (!J.$eq$(t1.$index(list1, i), t2.$index(list2, i))) + return false; + return true; + }, + hash$1(list) { + var hash, i; + for (hash = 0, i = 0; i < list.length; ++i) { + hash = hash + J.get$hashCode$(list[i]) & 2147483647; + hash = hash + (hash << 10 >>> 0) & 2147483647; + hash ^= hash >>> 6; + } + hash = hash + (hash << 3 >>> 0) & 2147483647; + hash ^= hash >>> 11; + return hash + (hash << 15 >>> 0) & 2147483647; + } + }; + A._MapEntry.prototype = { + get$hashCode(_) { + return 3 * J.get$hashCode$(this.key) + 7 * J.get$hashCode$(this.value) & 2147483647; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A._MapEntry && J.$eq$(this.key, other.key) && J.$eq$(this.value, other.value); + } + }; + A.MapEquality.prototype = { + equals$2(_, map1, map2) { + var equalElementCounts, t1, key, entry, count; + if (map1 === map2) + return true; + if (map1.get$length(map1) !== map2.get$length(map2)) + return false; + equalElementCounts = A.HashMap_HashMap(type$._MapEntry, type$.int); + for (t1 = map1.get$keys(map1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + key = t1.get$current(t1); + entry = new A._MapEntry(this, key, map1.$index(0, key)); + count = equalElementCounts.$index(0, entry); + equalElementCounts.$indexSet(0, entry, (count == null ? 0 : count) + 1); + } + for (t1 = map2.get$keys(map2), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + key = t1.get$current(t1); + entry = new A._MapEntry(this, key, map2.$index(0, key)); + count = equalElementCounts.$index(0, entry); + if (count == null || count === 0) + return false; + equalElementCounts.$indexSet(0, entry, count - 1); + } + return true; + }, + hash$1(map) { + var t1, t2, hash, key, keyHash, t3; + for (t1 = map.get$keys(map), t1 = t1.get$iterator(t1), t2 = this.$ti._rest[1], hash = 0; t1.moveNext$0();) { + key = t1.get$current(t1); + keyHash = J.get$hashCode$(key); + t3 = map.$index(0, key); + hash = hash + 3 * keyHash + 7 * J.get$hashCode$(t3 == null ? t2._as(t3) : t3) & 2147483647; + } + hash = hash + (hash << 3 >>> 0) & 2147483647; + hash ^= hash >>> 11; + return hash + (hash << 15 >>> 0) & 2147483647; + } + }; + A.QueueList.prototype = { + add$1(_, element) { + this._queue_list$_add$1(element); + }, + addAll$1(_, iterable) { + var addCount, $length, t1, endSpace, t2, preSpace, _this = this; + if (type$.List_dynamic._is(iterable)) { + addCount = J.get$length$asx(iterable); + $length = _this.get$length(0); + t1 = $length + addCount; + if (t1 >= J.get$length$asx(_this._queue_list$_table)) { + _this._preGrow$1(t1); + J.setRange$4$ax(_this._queue_list$_table, $length, t1, iterable, 0); + _this.set$_queue_list$_tail(_this.get$_queue_list$_tail() + addCount); + } else { + endSpace = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_tail(); + t1 = _this._queue_list$_table; + t2 = J.getInterceptor$ax(t1); + if (addCount < endSpace) { + t2.setRange$4(t1, _this.get$_queue_list$_tail(), _this.get$_queue_list$_tail() + addCount, iterable, 0); + _this.set$_queue_list$_tail(_this.get$_queue_list$_tail() + addCount); + } else { + preSpace = addCount - endSpace; + t2.setRange$4(t1, _this.get$_queue_list$_tail(), _this.get$_queue_list$_tail() + endSpace, iterable, 0); + J.setRange$4$ax(_this._queue_list$_table, 0, preSpace, iterable, endSpace); + _this.set$_queue_list$_tail(preSpace); + } + } + } else + for (t1 = J.get$iterator$ax(iterable); t1.moveNext$0();) + _this._queue_list$_add$1(t1.get$current(t1)); + }, + cast$1$0(_, $T) { + return new A._CastQueueList(this, J.cast$1$0$ax(this._queue_list$_table, $T), -1, -1, A._instanceType(this)._eval$1("@")._bind$1($T)._eval$1("_CastQueueList<1,2>")); + }, + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); + }, + addFirst$1(element) { + var _this = this; + _this.set$_queue_list$_head((_this.get$_queue_list$_head() - 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_head(), element); + if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) + _this._queue_list$_grow$0(); + }, + removeFirst$0() { + var result, _this = this; + if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) + throw A.wrapException(A.StateError$("No element")); + result = J.$index$asx(_this._queue_list$_table, _this.get$_queue_list$_head()); + if (result == null) + result = A._instanceType(_this)._eval$1("QueueList.E")._as(result); + J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_head(), null); + _this.set$_queue_list$_head((_this.get$_queue_list$_head() + 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + return result; + }, + removeLast$0(_) { + var result, _this = this; + if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) + throw A.wrapException(A.StateError$("No element")); + _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() - 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + result = J.$index$asx(_this._queue_list$_table, _this.get$_queue_list$_tail()); + if (result == null) + result = A._instanceType(_this)._eval$1("QueueList.E")._as(result); + J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_tail(), null); + return result; + }, + get$length(_) { + return (this.get$_queue_list$_tail() - this.get$_queue_list$_head() & J.get$length$asx(this._queue_list$_table) - 1) >>> 0; + }, + set$length(_, value) { + var delta, newTail, t1, t2, _this = this; + if (value < 0) + throw A.wrapException(A.RangeError$("Length " + value + " may not be negative.")); + if (value > _this.get$length(0) && !A._instanceType(_this)._eval$1("QueueList.E")._is(null)) + throw A.wrapException(A.UnsupportedError$("The length can only be increased when the element type is nullable, but the current element type is `" + A.createRuntimeType(A._instanceType(_this)._eval$1("QueueList.E")).toString$0(0) + "`.")); + delta = value - _this.get$length(0); + if (delta >= 0) { + if (J.get$length$asx(_this._queue_list$_table) <= value) + _this._preGrow$1(value); + _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() + delta & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + return; + } + newTail = _this.get$_queue_list$_tail() + delta; + t1 = _this._queue_list$_table; + if (newTail >= 0) + J.fillRange$3$ax(t1, newTail, _this.get$_queue_list$_tail(), null); + else { + newTail += J.get$length$asx(t1); + J.fillRange$3$ax(_this._queue_list$_table, 0, _this.get$_queue_list$_tail(), null); + t1 = _this._queue_list$_table; + t2 = J.getInterceptor$asx(t1); + t2.fillRange$3(t1, newTail, t2.get$length(t1), null); + } + _this.set$_queue_list$_tail(newTail); + }, + $index(_, index) { + var t1, _this = this; + if (index < 0 || index >= _this.get$length(0)) + throw A.wrapException(A.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(0) + ").")); + t1 = J.$index$asx(_this._queue_list$_table, (_this.get$_queue_list$_head() + index & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + return t1 == null ? A._instanceType(_this)._eval$1("QueueList.E")._as(t1) : t1; + }, + $indexSet(_, index, value) { + var _this = this; + if (index < 0 || index >= _this.get$length(0)) + throw A.wrapException(A.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(0) + ").")); + J.$indexSet$ax(_this._queue_list$_table, (_this.get$_queue_list$_head() + index & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0, value); + }, + _queue_list$_add$1(element) { + var _this = this; + J.$indexSet$ax(_this._queue_list$_table, _this.get$_queue_list$_tail(), element); + _this.set$_queue_list$_tail((_this.get$_queue_list$_tail() + 1 & J.get$length$asx(_this._queue_list$_table) - 1) >>> 0); + if (_this.get$_queue_list$_head() === _this.get$_queue_list$_tail()) + _this._queue_list$_grow$0(); + }, + _queue_list$_grow$0() { + var _this = this, + newTable = A.List_List$filled(J.get$length$asx(_this._queue_list$_table) * 2, null, false, A._instanceType(_this)._eval$1("QueueList.E?")), + split = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_head(); + B.JSArray_methods.setRange$4(newTable, 0, split, _this._queue_list$_table, _this.get$_queue_list$_head()); + B.JSArray_methods.setRange$4(newTable, split, split + _this.get$_queue_list$_head(), _this._queue_list$_table, 0); + _this.set$_queue_list$_head(0); + _this.set$_queue_list$_tail(J.get$length$asx(_this._queue_list$_table)); + _this._queue_list$_table = newTable; + }, + _writeToList$1(target) { + var $length, firstPartSize, _this = this; + if (_this.get$_queue_list$_head() <= _this.get$_queue_list$_tail()) { + $length = _this.get$_queue_list$_tail() - _this.get$_queue_list$_head(); + B.JSArray_methods.setRange$4(target, 0, $length, _this._queue_list$_table, _this.get$_queue_list$_head()); + return $length; + } else { + firstPartSize = J.get$length$asx(_this._queue_list$_table) - _this.get$_queue_list$_head(); + B.JSArray_methods.setRange$4(target, 0, firstPartSize, _this._queue_list$_table, _this.get$_queue_list$_head()); + B.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + _this.get$_queue_list$_tail(), _this._queue_list$_table, 0); + return _this.get$_queue_list$_tail() + firstPartSize; + } + }, + _preGrow$1(newElementCount) { + var _this = this, + newTable = A.List_List$filled(A.QueueList__nextPowerOf2(newElementCount + B.JSInt_methods._shrOtherPositive$1(newElementCount, 1)), null, false, A._instanceType(_this)._eval$1("QueueList.E?")); + _this.set$_queue_list$_tail(_this._writeToList$1(newTable)); + _this._queue_list$_table = newTable; + _this.set$_queue_list$_head(0); + }, + $isEfficientLengthIterable: 1, + $isQueue: 1, + $isIterable: 1, + $isList: 1, + get$_queue_list$_head() { + return this._queue_list$_head; + }, + get$_queue_list$_tail() { + return this._queue_list$_tail; + }, + set$_queue_list$_head(val) { + return this._queue_list$_head = val; + }, + set$_queue_list$_tail(val) { + return this._queue_list$_tail = val; + } + }; + A._CastQueueList.prototype = { + get$_queue_list$_head() { + return this._queue_list$_delegate.get$_queue_list$_head(); + }, + set$_queue_list$_head(value) { + this._queue_list$_delegate.set$_queue_list$_head(value); + }, + get$_queue_list$_tail() { + return this._queue_list$_delegate.get$_queue_list$_tail(); + }, + set$_queue_list$_tail(value) { + this._queue_list$_delegate.set$_queue_list$_tail(value); + } + }; + A._QueueList_Object_ListMixin.prototype = {}; + A.UnionSet.prototype = { + get$length(_) { + var t1 = this.get$_union_set$_iterable().get$length(0); + return t1; + }, + get$iterator(_) { + var t1 = this.get$_union_set$_iterable(); + return t1.get$iterator(t1); + }, + get$_union_set$_iterable() { + var t1 = this._sets, + t2 = this.$ti._precomputed1, + t3 = A._instanceType(t1)._eval$1("@<1>")._bind$1(t2)._eval$1("ExpandIterable<1,2>"); + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + return new A.WhereIterable(new A.ExpandIterable(t1, new A.UnionSet__iterable_closure(this), t3), t2.get$add(t2), t3._eval$1("WhereIterable")); + }, + contains$1(_, element) { + return this._sets.any$1(0, new A.UnionSet_contains_closure(this, element)); + }, + toSet$0(_) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(this.$ti._precomputed1); + for (t2 = this._sets, t2 = A._LinkedHashSetIterator$(t2, t2._collection$_modifications, A._instanceType(t2)._precomputed1), t3 = t2.$ti._precomputed1; t2.moveNext$0();) { + t4 = t2._collection$_current; + t1.addAll$1(0, t4 == null ? t3._as(t4) : t4); + } + return t1; + } + }; + A.UnionSet__iterable_closure.prototype = { + call$1(set) { + return set; + }, + $signature() { + return this.$this.$ti._eval$1("Set<1>(Set<1>)"); + } + }; + A.UnionSet_contains_closure.prototype = { + call$1(set) { + return set.contains$1(0, this.element); + }, + $signature() { + return this.$this.$ti._eval$1("bool(Set<1>)"); + } + }; + A._UnionSet_SetBase_UnmodifiableSetMixin.prototype = {}; + A.UnmodifiableSetView0.prototype = {}; + A.UnmodifiableSetMixin.prototype = { + add$1(_, value) { + return A.UnmodifiableSetMixin__throw(); + }, + addAll$1(_, elements) { + return A.UnmodifiableSetMixin__throw(); + }, + remove$1(_, value) { + return A.UnmodifiableSetMixin__throw(); + } + }; + A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin.prototype = {}; + A._DelegatingIterableBase.prototype = { + any$1(_, test) { + var t1 = this.get$_base(); + return t1.any$1(t1, test); + }, + contains$1(_, element) { + var t1 = this.get$_base(); + return t1.contains$1(t1, element); + }, + elementAt$1(_, index) { + var t1 = this.get$_base(); + return t1.elementAt$1(t1, index); + }, + every$1(_, test) { + var t1 = this.get$_base(); + return t1.every$1(t1, test); + }, + get$first(_) { + var t1 = this.get$_base(); + return t1.get$first(t1); + }, + get$isEmpty(_) { + var t1 = this.get$_base(); + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this.get$_base(); + return t1.get$isNotEmpty(t1); + }, + get$iterator(_) { + var t1 = this.get$_base(); + return t1.get$iterator(t1); + }, + get$last(_) { + var t1 = this.get$_base(); + return t1.get$last(t1); + }, + get$length(_) { + var t1 = this.get$_base(); + return t1.get$length(t1); + }, + map$1$1(_, f, $T) { + var t1 = this.get$_base(); + return t1.map$1$1(t1, f, $T); + }, + get$single(_) { + var t1 = this.get$_base(); + return t1.get$single(t1); + }, + skip$1(_, n) { + var t1 = this.get$_base(); + return t1.skip$1(t1, n); + }, + take$1(_, n) { + var t1 = this.get$_base(); + return t1.take$1(t1, n); + }, + toList$1$growable(_, growable) { + var t1 = this.get$_base(); + return t1.toList$1$growable(t1, true); + }, + toList$0(_) { + return this.toList$1$growable(0, true); + }, + toSet$0(_) { + var t1 = this.get$_base(); + return t1.toSet$0(t1); + }, + where$1(_, test) { + var t1 = this.get$_base(); + return t1.where$1(t1, test); + }, + toString$0(_) { + var t1 = this.get$_base(); + return t1.toString$0(t1); + }, + $isIterable: 1 + }; + A.DelegatingSet.prototype = { + add$1(_, value) { + return this._base.add$1(0, value); + }, + addAll$1(_, elements) { + this._base.addAll$1(0, elements); + }, + toSet$0(_) { + return new A.DelegatingSet(this._base.toSet$0(0), A._instanceType(this)._eval$1("DelegatingSet<1>")); + }, + $isEfficientLengthIterable: 1, + $isSet: 1, + get$_base() { + return this._base; + } + }; + A.MapKeySet.prototype = { + get$_base() { + var t1 = this._baseMap; + return t1.get$keys(t1); + }, + contains$1(_, element) { + return this._baseMap.containsKey$1(element); + }, + get$isEmpty(_) { + var t1 = this._baseMap; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._baseMap; + return t1.get$isNotEmpty(t1); + }, + get$length(_) { + var t1 = this._baseMap; + return t1.get$length(t1); + }, + toString$0(_) { + return A.Iterable_iterableToFullString(this, "{", "}"); + }, + difference$1(other) { + var t1 = this.get$_base(); + return t1.where$1(t1, new A.MapKeySet_difference_closure(this, other)).toSet$0(0); + }, + intersection$1(other) { + var t1 = this.get$_base(); + return t1.where$1(t1, other.get$contains(other)).toSet$0(0); + }, + $isEfficientLengthIterable: 1, + $isSet: 1 + }; + A.MapKeySet_difference_closure.prototype = { + call$1(element) { + return !this.other.contains$1(0, element); + }, + $signature() { + return this.$this.$ti._eval$1("bool(1)"); + } + }; + A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin.prototype = {}; + A.BufferModule.prototype = {}; + A.BufferConstants.prototype = {}; + A.Buffer.prototype = {}; + A.ConsoleModule.prototype = {}; + A.Console.prototype = {}; + A.EventEmitter.prototype = {}; + A.FS.prototype = {}; + A.FSConstants.prototype = {}; + A.Realpath.prototype = {}; + A.RealpathSync.prototype = {}; + A.FSWatcher.prototype = {}; + A.ReadStream.prototype = {}; + A.ReadStreamOptions.prototype = {}; + A.WriteStream.prototype = {}; + A.WriteStreamOptions.prototype = {}; + A.FileOptions.prototype = {}; + A.StatOptions.prototype = {}; + A.MkdirOptions.prototype = {}; + A.RmdirOptions.prototype = {}; + A.WatchOptions.prototype = {}; + A.WatchFileOptions.prototype = {}; + A.Stats.prototype = {}; + A.Promise.prototype = {}; + A.Date.prototype = {}; + A.JsError.prototype = {}; + A.Atomics.prototype = {}; + A.Modules.prototype = {}; + A.Module.prototype = {}; + A.Net.prototype = {}; + A.Socket.prototype = {}; + A.NetAddress.prototype = {}; + A.NetServer.prototype = {}; + A.NodeJsError.prototype = {}; + A.JsAssertionError.prototype = {}; + A.JsRangeError.prototype = {}; + A.JsReferenceError.prototype = {}; + A.JsSyntaxError.prototype = {}; + A.JsTypeError.prototype = {}; + A.JsSystemError.prototype = {}; + A.Process.prototype = {}; + A.CPUUsage.prototype = {}; + A.Release.prototype = {}; + A.StreamModule.prototype = {}; + A.Readable.prototype = {}; + A.Writable.prototype = {}; + A.Duplex.prototype = {}; + A.Transform.prototype = {}; + A.WritableOptions.prototype = {}; + A.ReadableOptions.prototype = {}; + A.Immediate.prototype = {}; + A.Timeout.prototype = {}; + A.TTY.prototype = {}; + A.TTYReadStream.prototype = {}; + A.TTYWriteStream.prototype = {}; + A.Util.prototype = {}; + A.promiseToFuture_closure1.prototype = { + call$1(value) { + this.completer.complete$1(value); + }, + $signature: 62 + }; + A.promiseToFuture_closure2.prototype = { + call$1(error) { + this.completer.completeError$1(error); + }, + $signature: 62 + }; + A.futureToPromise_closure.prototype = { + call$2(resolve, reject) { + this.future.then$1$2$onError(0, new A.futureToPromise__closure(resolve, this.T), reject, type$.dynamic); + }, + $signature: 395 + }; + A.futureToPromise__closure.prototype = { + call$1(result) { + return this.resolve.call$1(result); + }, + $signature() { + return this.T._eval$1("@(0)"); + } + }; + A.Context.prototype = { + absolute$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) { + var t1; + A._validateArgList("absolute", A._setArrayType([part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15], type$.JSArray_nullable_String)); + if (part2 == null) { + t1 = this.style; + t1 = t1.rootLength$1(part1) > 0 && !t1.isRootRelative$1(part1); + } else + t1 = false; + if (t1) + return part1; + t1 = this._context$_current; + return this.join$16(0, t1 == null ? A.current() : t1, part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15); + }, + absolute$1(part1) { + var _null = null; + return this.absolute$15(part1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, + dirname$1(path) { + var t1, t2, + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + parsed.removeTrailingSeparators$0(); + t1 = parsed.parts; + t2 = t1.length; + if (t2 === 0) { + t1 = parsed.root; + return t1 == null ? "." : t1; + } + if (t2 === 1) { + t1 = parsed.root; + return t1 == null ? "." : t1; + } + B.JSArray_methods.removeLast$0(t1); + parsed.separators.pop(); + parsed.removeTrailingSeparators$0(); + return parsed.toString$0(0); + }, + join$16(_, part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15, part16) { + var parts = A._setArrayType([part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15, part16], type$.JSArray_nullable_String); + A._validateArgList("join", parts); + return this.joinAll$1(new A.WhereTypeIterable(parts, type$.WhereTypeIterable_String)); + }, + join$2(_, part1, part2) { + var _null = null; + return this.join$16(0, part1, part2, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, + joinAll$1(parts) { + var t1, t2, t3, needsSeparator, isAbsoluteAndNotRootRelative, t4, t5, parsed, path; + for (t1 = J.where$1$ax(parts, new A.Context_joinAll_closure()), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new A.WhereIterator(t2, t1._f), t3 = this.style, needsSeparator = false, isAbsoluteAndNotRootRelative = false, t4 = ""; t1.moveNext$0();) { + t5 = t2.get$current(t2); + if (t3.isRootRelative$1(t5) && isAbsoluteAndNotRootRelative) { + parsed = A.ParsedPath_ParsedPath$parse(t5, t3); + path = t4.charCodeAt(0) == 0 ? t4 : t4; + t4 = B.JSString_methods.substring$2(path, 0, t3.rootLength$2$withDrive(path, true)); + parsed.root = t4; + if (t3.needsSeparator$1(t4)) + parsed.separators[0] = t3.get$separator(t3); + t4 = parsed.toString$0(0); + } else if (t3.rootLength$1(t5) > 0) { + isAbsoluteAndNotRootRelative = !t3.isRootRelative$1(t5); + t4 = t5; + } else { + if (!(t5.length !== 0 && t3.containsSeparator$1(t5[0]))) + if (needsSeparator) + t4 += t3.get$separator(t3); + t4 += t5; + } + needsSeparator = t3.needsSeparator$1(t5); + } + return t4.charCodeAt(0) == 0 ? t4 : t4; + }, + split$1(_, path) { + var parsed = A.ParsedPath_ParsedPath$parse(path, this.style), + t1 = parsed.parts, + t2 = A._arrayInstanceType(t1)._eval$1("WhereIterable<1>"); + t1 = A.List_List$_of(new A.WhereIterable(t1, new A.Context_split_closure(), t2), t2._eval$1("Iterable.E")); + parsed.parts = t1; + t2 = parsed.root; + if (t2 != null) + B.JSArray_methods.insert$2(t1, 0, t2); + return parsed.parts; + }, + canonicalize$1(_, path) { + var t1, parsed; + path = this.absolute$1(path); + t1 = this.style; + if (t1 !== $.$get$Style_windows() && !this._needsNormalization$1(path)) + return path; + parsed = A.ParsedPath_ParsedPath$parse(path, t1); + parsed.normalize$1$canonicalize(true); + return parsed.toString$0(0); + }, + normalize$1(path) { + var parsed; + if (!this._needsNormalization$1(path)) + return path; + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + parsed.normalize$0(); + return parsed.toString$0(0); + }, + _needsNormalization$1(path) { + var i, start, previous, t2, previousPrevious, codeUnit, t3, + t1 = this.style, + root = t1.rootLength$1(path); + if (root !== 0) { + if (t1 === $.$get$Style_windows()) + for (i = 0; i < root; ++i) + if (path.charCodeAt(i) === 47) + return true; + start = root; + previous = 47; + } else { + start = 0; + previous = null; + } + for (t2 = path.length, i = start, previousPrevious = null; i < t2; ++i, previousPrevious = previous, previous = codeUnit) { + codeUnit = path.charCodeAt(i); + if (t1.isSeparator$1(codeUnit)) { + if (t1 === $.$get$Style_windows() && codeUnit === 47) + return true; + if (previous != null && t1.isSeparator$1(previous)) + return true; + if (previous === 46) + t3 = previousPrevious == null || previousPrevious === 46 || t1.isSeparator$1(previousPrevious); + else + t3 = false; + if (t3) + return true; + } + } + if (previous == null) + return true; + if (t1.isSeparator$1(previous)) + return true; + if (previous === 46) + t1 = previousPrevious == null || t1.isSeparator$1(previousPrevious) || previousPrevious === 46; + else + t1 = false; + if (t1) + return true; + return false; + }, + relative$2$from(path, from) { + var fromParsed, pathParsed, t2, t3, _this = this, + _s26_ = 'Unable to find a path to "', + t1 = from == null; + if (t1 && _this.style.rootLength$1(path) <= 0) + return _this.normalize$1(path); + if (t1) { + t1 = _this._context$_current; + from = t1 == null ? A.current() : t1; + } else + from = _this.absolute$1(from); + t1 = _this.style; + if (t1.rootLength$1(from) <= 0 && t1.rootLength$1(path) > 0) + return _this.normalize$1(path); + if (t1.rootLength$1(path) <= 0 || t1.isRootRelative$1(path)) + path = _this.absolute$1(path); + if (t1.rootLength$1(path) <= 0 && t1.rootLength$1(from) > 0) + throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); + fromParsed = A.ParsedPath_ParsedPath$parse(from, t1); + fromParsed.normalize$0(); + pathParsed = A.ParsedPath_ParsedPath$parse(path, t1); + pathParsed.normalize$0(); + t2 = fromParsed.parts; + if (t2.length !== 0 && t2[0] === ".") + return pathParsed.toString$0(0); + t2 = fromParsed.root; + t3 = pathParsed.root; + if (t2 != t3) + t2 = t2 == null || t3 == null || !t1.pathsEqual$2(t2, t3); + else + t2 = false; + if (t2) + return pathParsed.toString$0(0); + for (;;) { + t2 = fromParsed.parts; + if (t2.length !== 0) { + t3 = pathParsed.parts; + t2 = t3.length !== 0 && t1.pathsEqual$2(t2[0], t3[0]); + } else + t2 = false; + if (!t2) + break; + B.JSArray_methods.removeAt$1(fromParsed.parts, 0); + B.JSArray_methods.removeAt$1(fromParsed.separators, 1); + B.JSArray_methods.removeAt$1(pathParsed.parts, 0); + B.JSArray_methods.removeAt$1(pathParsed.separators, 1); + } + t2 = fromParsed.parts; + t3 = t2.length; + if (t3 !== 0 && t2[0] === "..") + throw A.wrapException(A.PathException$(_s26_ + path + '" from "' + from + '".')); + t2 = type$.String; + B.JSArray_methods.insertAll$2(pathParsed.parts, 0, A.List_List$filled(t3, "..", false, t2)); + t3 = pathParsed.separators; + t3[0] = ""; + B.JSArray_methods.insertAll$2(t3, 1, A.List_List$filled(fromParsed.parts.length, t1.get$separator(t1), false, t2)); + t1 = pathParsed.parts; + t2 = t1.length; + if (t2 === 0) + return "."; + if (t2 > 1 && B.JSArray_methods.get$last(t1) === ".") { + B.JSArray_methods.removeLast$0(pathParsed.parts); + t1 = pathParsed.separators; + t1.pop(); + t1.pop(); + t1.push(""); + } + pathParsed.root = ""; + pathParsed.removeTrailingSeparators$0(); + return pathParsed.toString$0(0); + }, + relative$1(path) { + return this.relative$2$from(path, null); + }, + _isWithinOrEquals$2($parent, child) { + var relative, t1, parentIsAbsolute, childIsAbsolute, childIsRootRelative, parentIsRootRelative, result, exception, _this = this; + $parent = $parent; + child = child; + t1 = _this.style; + parentIsAbsolute = t1.rootLength$1($parent) > 0; + childIsAbsolute = t1.rootLength$1(child) > 0; + if (parentIsAbsolute && !childIsAbsolute) { + child = _this.absolute$1(child); + if (t1.isRootRelative$1($parent)) + $parent = _this.absolute$1($parent); + } else if (childIsAbsolute && !parentIsAbsolute) { + $parent = _this.absolute$1($parent); + if (t1.isRootRelative$1(child)) + child = _this.absolute$1(child); + } else if (childIsAbsolute && parentIsAbsolute) { + childIsRootRelative = t1.isRootRelative$1(child); + parentIsRootRelative = t1.isRootRelative$1($parent); + if (childIsRootRelative && !parentIsRootRelative) + child = _this.absolute$1(child); + else if (parentIsRootRelative && !childIsRootRelative) + $parent = _this.absolute$1($parent); + } + result = _this._isWithinOrEqualsFast$2($parent, child); + if (result !== B._PathRelation_inconclusive) + return result; + relative = null; + try { + relative = _this.relative$2$from(child, $parent); + } catch (exception) { + if (A.unwrapException(exception) instanceof A.PathException) + return B._PathRelation_different; + else + throw exception; + } + if (t1.rootLength$1(relative) > 0) + return B._PathRelation_different; + if (J.$eq$(relative, ".")) + return B._PathRelation_equal; + if (J.$eq$(relative, "..")) + return B._PathRelation_different; + return J.get$length$asx(relative) >= 3 && J.startsWith$1$s(relative, "..") && t1.isSeparator$1(J.codeUnitAt$1$s(relative, 2)) ? B._PathRelation_different : B._PathRelation_within; + }, + _isWithinOrEqualsFast$2($parent, child) { + var t1, parentRootLength, childRootLength, i, t2, t3, childIndex, parentIndex, lastCodeUnit, lastParentSeparator, parentCodeUnit, childCodeUnit, parentIndex0, direction, _this = this; + if ($parent === ".") + $parent = ""; + t1 = _this.style; + parentRootLength = t1.rootLength$1($parent); + childRootLength = t1.rootLength$1(child); + if (parentRootLength !== childRootLength) + return B._PathRelation_different; + for (i = 0; i < parentRootLength; ++i) + if (!t1.codeUnitsEqual$2($parent.charCodeAt(i), child.charCodeAt(i))) + return B._PathRelation_different; + t2 = child.length; + t3 = $parent.length; + childIndex = childRootLength; + parentIndex = parentRootLength; + lastCodeUnit = 47; + lastParentSeparator = null; + for (;;) { + if (!(parentIndex < t3 && childIndex < t2)) + break; + c$0: { + parentCodeUnit = $parent.charCodeAt(parentIndex); + childCodeUnit = child.charCodeAt(childIndex); + if (t1.codeUnitsEqual$2(parentCodeUnit, childCodeUnit)) { + if (t1.isSeparator$1(parentCodeUnit)) + lastParentSeparator = parentIndex; + ++parentIndex; + ++childIndex; + lastCodeUnit = parentCodeUnit; + break c$0; + } + if (t1.isSeparator$1(parentCodeUnit) && t1.isSeparator$1(lastCodeUnit)) { + parentIndex0 = parentIndex + 1; + lastParentSeparator = parentIndex; + parentIndex = parentIndex0; + break c$0; + } else if (t1.isSeparator$1(childCodeUnit) && t1.isSeparator$1(lastCodeUnit)) { + ++childIndex; + break c$0; + } + if (parentCodeUnit === 46 && t1.isSeparator$1(lastCodeUnit)) { + ++parentIndex; + if (parentIndex === t3) + break; + parentCodeUnit = $parent.charCodeAt(parentIndex); + if (t1.isSeparator$1(parentCodeUnit)) { + parentIndex0 = parentIndex + 1; + lastParentSeparator = parentIndex; + parentIndex = parentIndex0; + break c$0; + } + if (parentCodeUnit === 46) { + ++parentIndex; + if (parentIndex === t3 || t1.isSeparator$1($parent.charCodeAt(parentIndex))) + return B._PathRelation_inconclusive; + } + } + if (childCodeUnit === 46 && t1.isSeparator$1(lastCodeUnit)) { + ++childIndex; + if (childIndex === t2) + break; + childCodeUnit = child.charCodeAt(childIndex); + if (t1.isSeparator$1(childCodeUnit)) { + ++childIndex; + break c$0; + } + if (childCodeUnit === 46) { + ++childIndex; + if (childIndex === t2 || t1.isSeparator$1(child.charCodeAt(childIndex))) + return B._PathRelation_inconclusive; + } + } + if (_this._pathDirection$2(child, childIndex) !== B._PathDirection_Wme) + return B._PathRelation_inconclusive; + if (_this._pathDirection$2($parent, parentIndex) !== B._PathDirection_Wme) + return B._PathRelation_inconclusive; + return B._PathRelation_different; + } + } + if (childIndex === t2) { + if (parentIndex === t3 || t1.isSeparator$1($parent.charCodeAt(parentIndex))) + lastParentSeparator = parentIndex; + else if (lastParentSeparator == null) + lastParentSeparator = Math.max(0, parentRootLength - 1); + direction = _this._pathDirection$2($parent, lastParentSeparator); + if (direction === B._PathDirection_dMN) + return B._PathRelation_equal; + return direction === B._PathDirection_vgO ? B._PathRelation_inconclusive : B._PathRelation_different; + } + direction = _this._pathDirection$2(child, childIndex); + if (direction === B._PathDirection_dMN) + return B._PathRelation_equal; + if (direction === B._PathDirection_vgO) + return B._PathRelation_inconclusive; + return t1.isSeparator$1(child.charCodeAt(childIndex)) || t1.isSeparator$1(lastCodeUnit) ? B._PathRelation_within : B._PathRelation_different; + }, + _pathDirection$2(path, index) { + var t1, t2, i, depth, reachedRoot, i0, t3; + for (t1 = path.length, t2 = this.style, i = index, depth = 0, reachedRoot = false; i < t1;) { + for (;;) { + if (!(i < t1 && t2.isSeparator$1(path.charCodeAt(i)))) + break; + ++i; + } + if (i === t1) + break; + i0 = i; + for (;;) { + if (!(i0 < t1 && !t2.isSeparator$1(path.charCodeAt(i0)))) + break; + ++i0; + } + t3 = i0 - i; + if (!(t3 === 1 && path.charCodeAt(i) === 46)) + if (t3 === 2 && path.charCodeAt(i) === 46 && path.charCodeAt(i + 1) === 46) { + --depth; + if (depth < 0) + break; + if (depth === 0) + reachedRoot = true; + } else + ++depth; + if (i0 === t1) + break; + i = i0 + 1; + } + if (depth < 0) + return B._PathDirection_vgO; + if (depth === 0) + return B._PathDirection_dMN; + if (reachedRoot) + return B._PathDirection_6kc; + return B._PathDirection_Wme; + }, + hash$1(path) { + var result, parsed, t1, _this = this; + path = _this.absolute$1(path); + result = _this._hashFast$1(path); + if (result != null) + return result; + parsed = A.ParsedPath_ParsedPath$parse(path, _this.style); + parsed.normalize$0(); + t1 = _this._hashFast$1(parsed.toString$0(0)); + t1.toString; + return t1; + }, + _hashFast$1(path) { + var t1, t2, hash, beginning, wasSeparator, i, codeUnit, t3, next; + for (t1 = path.length, t2 = this.style, hash = 4603, beginning = true, wasSeparator = true, i = 0; i < t1; ++i) { + codeUnit = t2.canonicalizeCodeUnit$1(path.charCodeAt(i)); + if (t2.isSeparator$1(codeUnit)) { + wasSeparator = true; + continue; + } + if (codeUnit === 46 && wasSeparator) { + t3 = i + 1; + if (t3 === t1) + break; + next = path.charCodeAt(t3); + if (t2.isSeparator$1(next)) + continue; + t3 = false; + if (!beginning) + if (next === 46) { + t3 = i + 2; + t3 = t3 === t1 || t2.isSeparator$1(path.charCodeAt(t3)); + } + if (t3) + return null; + } + hash = ((hash & 67108863) * 33 ^ codeUnit) >>> 0; + beginning = false; + wasSeparator = false; + } + return hash; + }, + withoutExtension$1(path) { + var t1, i, + parsed = A.ParsedPath_ParsedPath$parse(path, this.style); + for (t1 = parsed.parts, i = t1.length - 1; i >= 0; --i) + if (t1[i].length !== 0) { + t1[i] = parsed._splitExtension$0()[0]; + break; + } + return parsed.toString$0(0); + }, + toUri$1(path) { + var t2, + t1 = this.style; + if (t1.rootLength$1(path) <= 0) + return t1.relativePathToUri$1(path); + else { + t2 = this._context$_current; + return t1.absolutePathToUri$1(this.join$2(0, t2 == null ? A.current() : t2, path)); + } + }, + prettyUri$1(uri) { + var path, rel, _this = this, + typedUri = A._parseUri(uri); + if (typedUri.get$scheme() === "file" && _this.style === $.$get$Style_url()) + return typedUri.toString$0(0); + else if (typedUri.get$scheme() !== "file" && typedUri.get$scheme() !== "" && _this.style !== $.$get$Style_url()) + return typedUri.toString$0(0); + path = _this.normalize$1(_this.style.pathFromUri$1(A._parseUri(typedUri))); + rel = _this.relative$1(path); + return _this.split$1(0, rel).length > _this.split$1(0, path).length ? path : rel; + } + }; + A.Context_joinAll_closure.prototype = { + call$1(part) { + return part !== ""; + }, + $signature: 4 + }; + A.Context_split_closure.prototype = { + call$1(part) { + return part.length !== 0; + }, + $signature: 4 + }; + A._validateArgList_closure.prototype = { + call$1(arg) { + return arg == null ? "null" : '"' + arg + '"'; + }, + $signature: 396 + }; + A._PathDirection.prototype = { + toString$0(_) { + return this.name; + } + }; + A._PathRelation.prototype = { + toString$0(_) { + return this.name; + } + }; + A.InternalStyle.prototype = { + getRoot$1(path) { + var $length = this.rootLength$1(path); + if ($length > 0) + return B.JSString_methods.substring$2(path, 0, $length); + return this.isRootRelative$1(path) ? path[0] : null; + }, + relativePathToUri$1(path) { + var segments, _null = null, + t1 = path.length; + if (t1 === 0) + return A._Uri__Uri(_null, _null, _null, _null); + segments = A.Context_Context(this).split$1(0, path); + if (this.isSeparator$1(path.charCodeAt(t1 - 1))) + B.JSArray_methods.add$1(segments, ""); + return A._Uri__Uri(_null, _null, segments, _null); + }, + codeUnitsEqual$2(codeUnit1, codeUnit2) { + return codeUnit1 === codeUnit2; + }, + pathsEqual$2(path1, path2) { + return path1 === path2; + }, + canonicalizeCodeUnit$1(codeUnit) { + return codeUnit; + }, + canonicalizePart$1(part) { + return part; + } + }; + A.ParsedPath.prototype = { + get$basename() { + var _this = this, + t1 = type$.String, + copy = new A.ParsedPath(_this.style, _this.root, _this.isRootRelative, A.List_List$from(_this.parts, true, t1), A.List_List$from(_this.separators, true, t1)); + copy.removeTrailingSeparators$0(); + t1 = copy.parts; + if (t1.length === 0) { + t1 = _this.root; + return t1 == null ? "" : t1; + } + return B.JSArray_methods.get$last(t1); + }, + get$hasTrailingSeparator() { + var t1 = this.parts; + if (t1.length !== 0) + t1 = B.JSArray_methods.get$last(t1) === "" || B.JSArray_methods.get$last(this.separators) !== ""; + else + t1 = false; + return t1; + }, + removeTrailingSeparators$0() { + var t1, t2, _this = this; + for (;;) { + t1 = _this.parts; + if (!(t1.length !== 0 && B.JSArray_methods.get$last(t1) === "")) + break; + B.JSArray_methods.removeLast$0(_this.parts); + _this.separators.pop(); + } + t1 = _this.separators; + t2 = t1.length; + if (t2 !== 0) + t1[t2 - 1] = ""; + }, + normalize$1$canonicalize(canonicalize) { + var t1, t2, t3, leadingDoubles, _i, part, _this = this, + newParts = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.parts, t2 = t1.length, t3 = _this.style, leadingDoubles = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + part = t1[_i]; + if (!(part === "." || part === "")) + if (part === "..") + if (newParts.length !== 0) + newParts.pop(); + else + ++leadingDoubles; + else + newParts.push(canonicalize ? t3.canonicalizePart$1(part) : part); + } + if (_this.root == null) + B.JSArray_methods.insertAll$2(newParts, 0, A.List_List$filled(leadingDoubles, "..", false, type$.String)); + if (newParts.length === 0 && _this.root == null) + newParts.push("."); + _this.parts = newParts; + _this.separators = A.List_List$filled(newParts.length + 1, t3.get$separator(t3), true, type$.String); + t1 = _this.root; + if (t1 == null || newParts.length === 0 || !t3.needsSeparator$1(t1)) + _this.separators[0] = ""; + t1 = _this.root; + if (t1 != null && t3 === $.$get$Style_windows()) { + if (canonicalize) + t1 = _this.root = t1.toLowerCase(); + _this.root = A.stringReplaceAllUnchecked(t1, "/", "\\"); + } + _this.removeTrailingSeparators$0(); + }, + normalize$0() { + return this.normalize$1$canonicalize(false); + }, + toString$0(_) { + var t2, t3, t4, i, + t1 = this.root; + t1 = t1 != null ? t1 : ""; + for (t2 = this.parts, t3 = t2.length, t4 = this.separators, i = 0; i < t3; ++i) + t1 = t1 + t4[i] + t2[i]; + t1 += B.JSArray_methods.get$last(t4); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _kthLastIndexOf$3(path, character, k) { + var index, count, leftMostIndexedCharacter; + for (index = path.length - 1, count = 0, leftMostIndexedCharacter = 0; index >= 0; --index) + if (path[index] === character) { + ++count; + if (count === k) + return index; + leftMostIndexedCharacter = index; + } + return leftMostIndexedCharacter; + }, + _splitExtension$1(level) { + var t1, file, lastDot; + if (level <= 0) + throw A.wrapException(A.RangeError$value(level, "level", "level's value must be greater than 0")); + t1 = this.parts; + t1 = new A.CastList(t1, A._arrayInstanceType(t1)._eval$1("CastList<1,String?>")); + file = t1.lastWhere$2$orElse(t1, new A.ParsedPath__splitExtension_closure(), new A.ParsedPath__splitExtension_closure0()); + if (file == null) + return A._setArrayType(["", ""], type$.JSArray_String); + if (file === "..") + return A._setArrayType(["..", ""], type$.JSArray_String); + lastDot = this._kthLastIndexOf$3(file, ".", level); + if (lastDot <= 0) + return A._setArrayType([file, ""], type$.JSArray_String); + return A._setArrayType([B.JSString_methods.substring$2(file, 0, lastDot), B.JSString_methods.substring$1(file, lastDot)], type$.JSArray_String); + }, + _splitExtension$0() { + return this._splitExtension$1(1); + } + }; + A.ParsedPath__splitExtension_closure.prototype = { + call$1(p) { + return p !== ""; + }, + $signature: 227 + }; + A.ParsedPath__splitExtension_closure0.prototype = { + call$0() { + return null; + }, + $signature: 1 + }; + A.PathException.prototype = { + toString$0(_) { + return "PathException: " + this.message; + }, + $isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.PathMap.prototype = {}; + A.PathMap__create_closure.prototype = { + call$2(path1, path2) { + if (path1 == null) + return path2 == null; + if (path2 == null) + return false; + return this._box_0.context._isWithinOrEquals$2(path1, path2) === B._PathRelation_equal; + }, + $signature: 398 + }; + A.PathMap__create_closure0.prototype = { + call$1(path) { + return path == null ? 0 : this._box_0.context.hash$1(path); + }, + $signature: 404 + }; + A.PathMap__create_closure1.prototype = { + call$1(path) { + return typeof path == "string" || path == null; + }, + $signature: 456 + }; + A.Style.prototype = { + toString$0(_) { + return this.get$name(this); + } + }; + A.PosixStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47; + }, + needsSeparator$1(path) { + var t1 = path.length; + return t1 !== 0 && path.charCodeAt(t1 - 1) !== 47; + }, + rootLength$2$withDrive(path, withDrive) { + if (path.length !== 0 && path.charCodeAt(0) === 47) + return 1; + return 0; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return false; + }, + pathFromUri$1(uri) { + var t1; + if (uri.get$scheme() === "" || uri.get$scheme() === "file") { + t1 = uri.get$path(uri); + return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); + } + throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); + }, + absolutePathToUri$1(path) { + var parsed = A.ParsedPath_ParsedPath$parse(path, this), + t1 = parsed.parts; + if (t1.length === 0) + B.JSArray_methods.addAll$1(t1, A._setArrayType(["", ""], type$.JSArray_String)); + else if (parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + return A._Uri__Uri(null, null, parsed.parts, "file"); + }, + get$name() { + return "posix"; + }, + get$separator() { + return "/"; + } + }; + A.UrlStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47; + }, + needsSeparator$1(path) { + var t1 = path.length; + if (t1 === 0) + return false; + if (path.charCodeAt(t1 - 1) !== 47) + return true; + return B.JSString_methods.endsWith$1(path, "://") && this.rootLength$1(path) === t1; + }, + rootLength$2$withDrive(path, withDrive) { + var i, codeUnit, index, + t1 = path.length; + if (t1 === 0) + return 0; + if (path.charCodeAt(0) === 47) + return 1; + for (i = 0; i < t1; ++i) { + codeUnit = path.charCodeAt(i); + if (codeUnit === 47) + return 0; + if (codeUnit === 58) { + if (i === 0) + return 0; + index = B.JSString_methods.indexOf$2(path, "/", B.JSString_methods.startsWith$2(path, "//", i + 1) ? i + 3 : i); + if (index <= 0) + return t1; + if (!withDrive || t1 < index + 3) + return index; + if (!B.JSString_methods.startsWith$1(path, "file://")) + return index; + t1 = A.driveLetterEnd(path, index + 1); + return t1 == null ? index : t1; + } + } + return 0; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return path.length !== 0 && path.charCodeAt(0) === 47; + }, + pathFromUri$1(uri) { + return uri.toString$0(0); + }, + relativePathToUri$1(path) { + return A.Uri_parse(path); + }, + absolutePathToUri$1(path) { + return A.Uri_parse(path); + }, + get$name() { + return "url"; + }, + get$separator() { + return "/"; + } + }; + A.WindowsStyle.prototype = { + containsSeparator$1(path) { + return B.JSString_methods.contains$1(path, "/"); + }, + isSeparator$1(codeUnit) { + return codeUnit === 47 || codeUnit === 92; + }, + needsSeparator$1(path) { + var t1 = path.length; + if (t1 === 0) + return false; + t1 = path.charCodeAt(t1 - 1); + return !(t1 === 47 || t1 === 92); + }, + rootLength$2$withDrive(path, withDrive) { + var index, + t1 = path.length; + if (t1 === 0) + return 0; + if (path.charCodeAt(0) === 47) + return 1; + if (path.charCodeAt(0) === 92) { + if (t1 < 2 || path.charCodeAt(1) !== 92) + return 1; + index = B.JSString_methods.indexOf$2(path, "\\", 2); + if (index > 0) { + index = B.JSString_methods.indexOf$2(path, "\\", index + 1); + if (index > 0) + return index; + } + return t1; + } + if (t1 < 3) + return 0; + if (!A.isAlphabetic(path.charCodeAt(0))) + return 0; + if (path.charCodeAt(1) !== 58) + return 0; + t1 = path.charCodeAt(2); + if (!(t1 === 47 || t1 === 92)) + return 0; + return 3; + }, + rootLength$1(path) { + return this.rootLength$2$withDrive(path, false); + }, + isRootRelative$1(path) { + return this.rootLength$1(path) === 1; + }, + pathFromUri$1(uri) { + var path, t1; + if (uri.get$scheme() !== "" && uri.get$scheme() !== "file") + throw A.wrapException(A.ArgumentError$("Uri " + uri.toString$0(0) + " must have scheme 'file:'.", null)); + path = uri.get$path(uri); + if (uri.get$host() === "") { + if (path.length >= 3 && B.JSString_methods.startsWith$1(path, "/") && A.driveLetterEnd(path, 1) != null) + path = B.JSString_methods.replaceFirst$2(path, "/", ""); + } else + path = "\\\\" + uri.get$host() + path; + t1 = A.stringReplaceAllUnchecked(path, "/", "\\"); + return A._Uri__uriDecode(t1, 0, t1.length, B.C_Utf8Codec, false); + }, + absolutePathToUri$1(path) { + var rootParts, t2, + parsed = A.ParsedPath_ParsedPath$parse(path, this), + t1 = parsed.root; + t1.toString; + if (B.JSString_methods.startsWith$1(t1, "\\\\")) { + rootParts = new A.WhereIterable(A._setArrayType(t1.split("\\"), type$.JSArray_String), new A.WindowsStyle_absolutePathToUri_closure(), type$.WhereIterable_String); + B.JSArray_methods.insert$2(parsed.parts, 0, rootParts.get$last(0)); + if (parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + return A._Uri__Uri(rootParts.get$first(0), null, parsed.parts, "file"); + } else { + if (parsed.parts.length === 0 || parsed.get$hasTrailingSeparator()) + B.JSArray_methods.add$1(parsed.parts, ""); + t1 = parsed.parts; + t2 = parsed.root; + t2.toString; + t2 = A.stringReplaceAllUnchecked(t2, "/", ""); + B.JSArray_methods.insert$2(t1, 0, A.stringReplaceAllUnchecked(t2, "\\", "")); + return A._Uri__Uri(null, null, parsed.parts, "file"); + } + }, + codeUnitsEqual$2(codeUnit1, codeUnit2) { + var upperCase1; + if (codeUnit1 === codeUnit2) + return true; + if (codeUnit1 === 47) + return codeUnit2 === 92; + if (codeUnit1 === 92) + return codeUnit2 === 47; + if ((codeUnit1 ^ codeUnit2) !== 32) + return false; + upperCase1 = codeUnit1 | 32; + return upperCase1 >= 97 && upperCase1 <= 122; + }, + pathsEqual$2(path1, path2) { + var t1, i; + if (path1 === path2) + return true; + t1 = path1.length; + if (t1 !== path2.length) + return false; + for (i = 0; i < t1; ++i) + if (!this.codeUnitsEqual$2(path1.charCodeAt(i), path2.charCodeAt(i))) + return false; + return true; + }, + canonicalizeCodeUnit$1(codeUnit) { + if (codeUnit === 47) + return 92; + if (codeUnit < 65) + return codeUnit; + if (codeUnit > 90) + return codeUnit; + return codeUnit | 32; + }, + canonicalizePart$1(part) { + return part.toLowerCase(); + }, + get$name() { + return "windows"; + }, + get$separator() { + return "\\"; + } + }; + A.WindowsStyle_absolutePathToUri_closure.prototype = { + call$1(part) { + return part !== ""; + }, + $signature: 4 + }; + A.Version.prototype = { + get$min() { + return this; + }, + get$max() { + return this; + }, + get$includeMin() { + return true; + }, + get$includeMax() { + return true; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.Version && _this.major === other.major && _this.minor === other.minor && _this.patch === other.patch && B.C_IterableEquality.equals$2(0, _this.preRelease, other.preRelease) && B.C_IterableEquality.equals$2(0, _this.build, other.build); + }, + get$hashCode(_) { + var _this = this; + return (_this.major ^ _this.minor ^ _this.patch ^ B.C_IterableEquality.hash$1(_this.preRelease) ^ B.C_IterableEquality.hash$1(_this.build)) >>> 0; + }, + compareTo$1(_, other) { + var t1, t2, t3, comparison, _this = this; + if (other instanceof A.Version) { + t1 = _this.major; + t2 = other.major; + if (t1 !== t2) + return B.JSInt_methods.compareTo$1(t1, t2); + t1 = _this.minor; + t2 = other.minor; + if (t1 !== t2) + return B.JSInt_methods.compareTo$1(t1, t2); + t1 = _this.patch; + t2 = other.patch; + if (t1 !== t2) + return B.JSInt_methods.compareTo$1(t1, t2); + t1 = _this.preRelease; + t2 = t1.length === 0; + if (t2 && other.preRelease.length !== 0) + return 1; + t3 = other.preRelease; + if (t3.length === 0 && !t2) + return -1; + comparison = _this._compareLists$2(t1, t3); + if (comparison !== 0) + return comparison; + t1 = _this.build; + t2 = t1.length === 0; + if (t2 && other.build.length !== 0) + return -1; + t3 = other.build; + if (t3.length === 0 && !t2) + return 1; + return _this._compareLists$2(t1, t3); + } else + return -other.compareTo$1(0, _this); + }, + toString$0(_) { + return this._version$_text; + }, + _compareLists$2(a, b) { + var i, t1, t2, aPart, bPart; + for (i = 0; t1 = a.length, t2 = b.length, i < Math.max(t1, t2); ++i) { + aPart = i < t1 ? a[i] : null; + bPart = i < t2 ? b[i] : null; + if (J.$eq$(aPart, bPart)) + continue; + if (aPart == null) + return -1; + if (bPart == null) + return 1; + if (typeof aPart == "number") + if (typeof bPart == "number") + return B.JSNumber_methods.compareTo$1(aPart, bPart); + else + return -1; + else if (typeof bPart == "number") + return 1; + else { + A._asString(aPart); + A._asString(bPart); + if (aPart === bPart) + t1 = 0; + else + t1 = aPart < bPart ? -1 : 1; + return t1; + } + } + return 0; + }, + $isComparable: 1, + $isVersionRange: 1 + }; + A.Version__splitParts_closure.prototype = { + call$1(part) { + var t1 = A.Primitives_parseInt(part, null); + return t1 == null ? part : t1; + }, + $signature: 476 + }; + A.VersionRange.prototype = { + $eq(_, other) { + var t1; + if (other == null) + return false; + if (!type$.VersionRange._is(other)) + return false; + t1 = false; + if (this.min == other.get$min()) + if (J.$eq$(this.max, other.get$max())) { + t1 = !other.get$includeMin(); + if (t1) + other.get$includeMax(); + } + return t1; + }, + get$hashCode(_) { + var t1 = B.JSNull_methods.get$hashCode(this.min), + t2 = J.get$hashCode$(this.max); + return (t1 ^ t2 * 3 ^ 1090795 ^ 3633126) >>> 0; + }, + allows$1(other) { + var t1 = this.max; + if (t1 != null) + if (other.compareTo$1(0, t1) > 0) + return false; + return true; + }, + compareTo$1(_, other) { + if (other.get$min() == null) + return this._compareMax$1(other); + return -1; + }, + _compareMax$1(other) { + var t2, result, + t1 = this.max; + if (t1 == null) { + if (other.get$max() == null) + return 0; + return 1; + } else if (other.get$max() == null) + return -1; + t2 = other.get$max(); + t2.toString; + result = t1.compareTo$1(0, t2); + if (result !== 0) + return result; + other.get$includeMax(); + return 0; + }, + toString$0(_) { + var t2, + max = this.max, + t1 = max == null; + if (!t1) + t2 = "<=" + max.toString$0(0); + else + t2 = ""; + t1 = t1 ? t2 + "any" : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + $isComparable: 1, + get$min() { + return this.min; + }, + get$max() { + return this.max; + }, + get$includeMin() { + return this.includeMin; + }, + get$includeMax() { + return this.includeMax; + } + }; + A.CssMediaQuery.prototype = { + merge$1(other) { + var t1, ourModifier, t2, t3, ourType, t4, theirModifier, t5, t6, theirType, t7, t8, negativeConditions, conditions, type, modifier, fewerConditions, fewerConditions0, moreConditions, _this = this, _null = null, _s3_ = "all"; + if (!_this.conjunction || !other.conjunction) + return B._SingletonCssMediaQueryMergeResult_1; + t1 = _this.modifier; + ourModifier = t1 == null ? _null : t1.toLowerCase(); + t2 = _this.type; + t3 = t2 == null; + ourType = t3 ? _null : t2.toLowerCase(); + t4 = other.modifier; + theirModifier = t4 == null ? _null : t4.toLowerCase(); + t5 = other.type; + t6 = t5 == null; + theirType = t6 ? _null : t5.toLowerCase(); + t7 = ourType == null; + if (t7 && theirType == null) { + t1 = A.List_List$_of(_this.conditions, type$.String); + B.JSArray_methods.addAll$1(t1, other.conditions); + return new A.MediaQuerySuccessfulMergeResult(A.CssMediaQuery$condition(t1, true)); + } + t8 = ourModifier === "not"; + if (t8 !== (theirModifier === "not")) { + if (ourType == theirType) { + negativeConditions = t8 ? _this.conditions : other.conditions; + if (B.JSArray_methods.every$1(negativeConditions, B.JSArray_methods.get$contains(t8 ? other.conditions : _this.conditions))) + return B._SingletonCssMediaQueryMergeResult_0; + else + return B._SingletonCssMediaQueryMergeResult_1; + } else if (t3 || A.equalsIgnoreCase(t2, _s3_) || t6 || A.equalsIgnoreCase(t5, _s3_)) + return B._SingletonCssMediaQueryMergeResult_1; + if (t8) { + conditions = other.conditions; + type = theirType; + modifier = theirModifier; + } else { + conditions = _this.conditions; + type = ourType; + modifier = ourModifier; + } + } else if (t8) { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_1; + fewerConditions = _this.conditions; + fewerConditions0 = other.conditions; + t3 = fewerConditions.length > fewerConditions0.length; + moreConditions = t3 ? fewerConditions : fewerConditions0; + if (t3) + fewerConditions = fewerConditions0; + if (!B.JSArray_methods.every$1(fewerConditions, B.JSArray_methods.get$contains(moreConditions))) + return B._SingletonCssMediaQueryMergeResult_1; + conditions = moreConditions; + type = ourType; + modifier = ourModifier; + } else if (t3 || A.equalsIgnoreCase(t2, _s3_)) { + type = (t6 || A.equalsIgnoreCase(t5, _s3_)) && t7 ? _null : theirType; + t3 = A.List_List$_of(_this.conditions, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = theirModifier; + } else { + if (t6 || A.equalsIgnoreCase(t5, _s3_)) { + t3 = A.List_List$_of(_this.conditions, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = ourModifier; + } else { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_0; + else { + modifier = ourModifier == null ? theirModifier : ourModifier; + t3 = A.List_List$_of(_this.conditions, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + } + conditions = t3; + } + type = ourType; + } + t2 = type == ourType ? t2 : t5; + return new A.MediaQuerySuccessfulMergeResult(A.CssMediaQuery$type(t2, conditions, modifier == ourModifier ? t1 : t4)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CssMediaQuery && other.modifier == this.modifier && other.type == this.type && B.C_ListEquality.equals$2(0, other.conditions, this.conditions); + }, + get$hashCode(_) { + return J.get$hashCode$(this.modifier) ^ J.get$hashCode$(this.type) ^ B.C_ListEquality0.hash$1(this.conditions); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.modifier; + t1 = t1 != null ? t1 + " " : ""; + t2 = _this.type; + if (t2 != null) { + t1 += t2; + if (_this.conditions.length !== 0) + t1 += " and "; + } + t2 = _this.conjunction ? " and " : " or "; + t2 = t1 + B.JSArray_methods.join$1(_this.conditions, t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._SingletonCssMediaQueryMergeResult.prototype = { + _enumToString$0() { + return "_SingletonCssMediaQueryMergeResult." + this._name; + } + }; + A.MediaQuerySuccessfulMergeResult.prototype = { + toString$0(_) { + return this.query.toString$0(0); + } + }; + A.ModifiableCssAtRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssAtRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1, t2; + if (other instanceof A.ModifiableCssAtRule) { + t1 = this.name; + t2 = other.name; + t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value) && J.$eq$(this.value, other.value) && this.isChildless === other.isChildless; + } else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + var _this = this; + return A.ModifiableCssAtRule$(_this.name, _this.span, _this.isChildless, _this.value); + }, + addChild$1(child) { + this.super$ModifiableCssParentNode$addChild(child); + }, + get$isChildless() { + return this.isChildless; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssComment.prototype = { + accept$1$1(visitor) { + return visitor.visitCssComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $isCssComment: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssDeclaration.prototype = { + accept$1$1(visitor) { + return visitor.visitCssDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + ": " + this.value.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssImport.prototype = { + accept$1$1(visitor) { + return visitor.visitCssImport$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssKeyframeBlock.prototype = { + accept$1$1(visitor) { + return visitor.visitCssKeyframeBlock$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssKeyframeBlock && B.C_ListEquality.equals$2(0, this.selector.value, other.selector.value); + }, + copyWithoutChildren$0() { + return A.ModifiableCssKeyframeBlock$(this.selector, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssMediaRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssMediaRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssMediaRule && B.C_ListEquality.equals$2(0, this.queries, other.queries); + }, + copyWithoutChildren$0() { + return A.ModifiableCssMediaRule$(this.queries, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssNode.prototype = { + get$hasFollowingSibling() { + var t2, + t1 = this._parent; + if (t1 == null) + t1 = null; + else { + t1 = t1.children; + t2 = this._indexInParent; + t2.toString; + t1 = A.SubListIterable$(t1, t2 + 1, null, t1.$ti._eval$1("ListBase.E")).any$1(0, new A.ModifiableCssNode_hasFollowingSibling_closure()); + } + return t1 === true; + }, + get$isGroupEnd() { + return this.isGroupEnd; + } + }; + A.ModifiableCssNode_hasFollowingSibling_closure.prototype = { + call$1(sibling) { + return !sibling.accept$1(B._IsInvisibleVisitor_true_false); + }, + $signature: 599 + }; + A.ModifiableCssParentNode.prototype = { + get$isChildless() { + return false; + }, + addChild$1(child) { + var t1; + child._parent = this; + t1 = this._children; + child._indexInParent = t1.length; + t1.push(child); + }, + clearChildren$0() { + var t1, t2, _i, child; + for (t1 = this._children, t2 = t1.length, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + child._indexInParent = child._parent = null; + } + B.JSArray_methods.clear$0(t1); + }, + $isCssParentNode: 1, + get$children(receiver) { + return this.children; + } + }; + A.ModifiableCssStyleRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStyleRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1; + if (other instanceof A.ModifiableCssStyleRule) + t1 = B.C_ListEquality.equals$2(0, other._style_rule$_selector._box$_inner.value.components, this._style_rule$_selector._box$_inner.value.components); + else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + return A.ModifiableCssStyleRule$(this._style_rule$_selector, this.span, false, this.originalSelector); + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssStylesheet.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssStylesheet; + }, + copyWithoutChildren$0() { + return A.ModifiableCssStylesheet$(this.span); + }, + $isCssStylesheet: 1, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssSupportsRule.prototype = { + accept$1$1(visitor) { + return visitor.visitCssSupportsRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1, t2; + if (other instanceof A.ModifiableCssSupportsRule) { + t1 = this.condition; + t2 = other.condition; + t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value); + } else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + return A.ModifiableCssSupportsRule$(this.condition, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.CssNode.prototype = { + toString$0(_) { + var _null = null; + return A.serialize(this, true, _null, true, _null, _null, false, _null, true)._0; + }, + $isAstNode: 1 + }; + A.CssParentNode.prototype = {}; + A._IsInvisibleVisitor.prototype = { + visitCssAtRule$1(rule) { + return false; + }, + visitCssComment$1(comment) { + return this.includeComments && comment.text.charCodeAt(2) !== 33; + }, + visitCssStyleRule$1(rule) { + var t1 = rule._style_rule$_selector._box$_inner; + return (this.includeBogus ? t1.value.accept$1(B._IsInvisibleVisitor_true) : t1.value.accept$1(B._IsInvisibleVisitor_false)) || this.super$EveryCssVisitor$visitCssStyleRule(rule); + } + }; + A.__IsInvisibleVisitor_Object_EveryCssVisitor.prototype = {}; + A.CssStylesheet.prototype = { + get$isGroupEnd() { + return false; + }, + get$isChildless() { + return false; + }, + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$children(receiver) { + return this.children; + }, + get$span(receiver) { + return this.span; + } + }; + A.CssValue.prototype = { + $eq(_, other) { + if (other == null) + return false; + return this.$ti._is(other) && J.$eq$(other.value, this.value); + }, + get$hashCode(_) { + return J.get$hashCode$(this.value); + }, + toString$0(_) { + return J.toString$0$(this.value); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A._FakeAstNode.prototype = { + get$span(_) { + return this._callback.call$0(); + }, + $isAstNode: 1 + }; + A.ArgumentList.prototype = { + get$isEmpty(_) { + var t1; + if (this.positional.length === 0) { + t1 = this.named; + t1 = t1.get$isEmpty(t1) && this.rest == null; + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t2, t3, _i, _1_0, _2_0, _this = this, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = _this.positional, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push(_this._parenthesizeArgument$1(t2[_i])); + for (t2 = A.MapExtensions_get_pairs(_this.named, type$.String, type$.Expression), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push("$" + t3._0 + ": " + _this._parenthesizeArgument$1(t3._1)); + } + _1_0 = _this.rest; + if (_1_0 != null) + t1.push(_this._parenthesizeArgument$1(_1_0) + "..."); + _2_0 = _this.keywordRest; + if (_2_0 != null) + t1.push(_this._parenthesizeArgument$1(_2_0) + "..."); + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + _parenthesizeArgument$1(argument) { + var t1; + $label0$0: { + if (argument instanceof A.ListExpression && B.ListSeparator_z0K === argument.separator && !argument.hasBrackets && argument.contents.length >= 2) { + t1 = "(" + argument.toString$0(0) + ")"; + break $label0$0; + } + t1 = argument.toString$0(0); + break $label0$0; + } + return t1; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.AtRootQuery.prototype = { + excludes$1(node) { + var t1, _this = this; + if (_this._all) + return !_this.include; + $label0$0: { + if (node instanceof A.ModifiableCssStyleRule) { + t1 = _this._at_root_query$_rule !== _this.include; + break $label0$0; + } + if (node instanceof A.ModifiableCssMediaRule) { + t1 = _this.excludesName$1("media"); + break $label0$0; + } + if (node instanceof A.ModifiableCssSupportsRule) { + t1 = _this.excludesName$1("supports"); + break $label0$0; + } + if (node instanceof A.ModifiableCssAtRule) { + t1 = _this.excludesName$1(node.name.value.toLowerCase()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + excludesName$1($name) { + var t1 = this._all || this.names.contains$1(0, $name); + return t1 !== this.include; + } + }; + A.BooleanOperator.prototype = { + _enumToString$0() { + return "BooleanOperator." + this._name; + }, + toString$0(_) { + return this._name; + } + }; + A.ConfiguredVariable.prototype = { + toString$0(_) { + var t1 = this.expression.toString$0(0), + t2 = this.isGuarded ? " !default" : ""; + return "$" + this.name + ": " + t1 + t2; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Expression.prototype = {$isAstNode: 1}; + A.BinaryOperationExpression.prototype = { + get$span(_) { + var right, + left = this.left; + while (left instanceof A.BinaryOperationExpression) + left = left.left; + right = this.right; + while (right instanceof A.BinaryOperationExpression) + right = right.right; + return left.get$span(left).expand$1(0, right.get$span(right)); + }, + get$operatorSpan() { + var t3, t4, + t1 = this.left, + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = this.right; + t4 = t3.get$span(t3); + if (t2 === t4.get$file(t4)) { + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + t4 = t2.offset < t4.get$start(t4).offset; + t2 = t4; + } else + t2 = false; + if (t2) { + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + t3 = A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t2.span$2(0, t1.offset, t3.get$start(t3).offset))); + t1 = t3; + } else + t1 = this.get$span(0); + return t1; + }, + accept$1$1(visitor) { + return visitor.visitBinaryOperationExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1, t2, t3, right, operator, _this = this, + _0_0 = _this.left; + $label0$0: { + if (_0_0 instanceof A.BinaryOperationExpression) { + t1 = _0_0.operator.precedence < _this.operator.precedence; + break $label0$0; + } + if (_0_0 instanceof A.ListExpression && !_0_0.hasBrackets && _0_0.contents.length >= 2) { + t1 = true; + break $label0$0; + } + t1 = false; + break $label0$0; + } + t2 = t1 ? A.Primitives_stringFromCharCode(40) : ""; + t2 += _0_0.toString$0(0); + t1 = t1 ? t2 + A.Primitives_stringFromCharCode(41) : t2; + t2 = A.Primitives_stringFromCharCode(32); + t3 = _this.operator; + t2 = t1 + t2 + t3.operator + t2; + right = _this.right; + $label1$1: { + t1 = false; + if (right instanceof A.BinaryOperationExpression) { + operator = right.operator; + if (operator.precedence <= t3.precedence) + t1 = !(operator === t3 && operator.isAssociative); + break $label1$1; + } + if (right instanceof A.ListExpression && !right.hasBrackets && right.contents.length >= 2) { + t1 = true; + break $label1$1; + } + break $label1$1; + } + if (t1) + t2 += A.Primitives_stringFromCharCode(40); + t2 += right.toString$0(0); + t1 = t1 ? t2 + A.Primitives_stringFromCharCode(41) : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.BinaryOperator.prototype = { + _enumToString$0() { + return "BinaryOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.BooleanExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitBooleanExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return String(this.value); + }, + get$span(receiver) { + return this.span; + } + }; + A.ColorExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitColorExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue(this.value, true, true); + }, + get$span(receiver) { + return this.span; + } + }; + A.FunctionExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? t1 + "." : ""; + t1 += this.originalName + this.$arguments.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitIfExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1, t2, first, _i, t3, t4, condition; + for (t1 = this.branches, t2 = t1.length, first = true, _i = 0, t3 = "if("; _i < t2; ++_i) { + t4 = t1[_i]; + condition = t4._0; + if (first) + first = false; + else + t3 += "; "; + t3 = t3 + A.S(condition == null ? "else" : condition) + ": " + t4._1.toString$0(0); + } + t1 = t3 + A.Primitives_stringFromCharCode(41); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionExpression.prototype = { + get$isArbitrarySubstitution() { + return false; + }, + $isAstNode: 1 + }; + A.IfConditionParenthesized.prototype = { + toInterpolation$1(arbitrarySubstitution) { + var t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + t3 = A.Primitives_stringFromCharCode(40); + t1._contents += t3; + t2.addInterpolation$1(this.expression.toInterpolation$1(arbitrarySubstitution)); + t3 = A.Primitives_stringFromCharCode(41); + t1._contents += t3; + return t2.interpolation$1(this.span); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionParenthesized$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "(" + this.expression.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionNegation.prototype = { + toInterpolation$1(arbitrarySubstitution) { + var t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = "not "; + t2.addInterpolation$1(this.expression.toInterpolation$1(arbitrarySubstitution)); + return t2.interpolation$1(this.span); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionNegation$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "not " + this.expression.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionOperation.prototype = { + get$span(_) { + var t1 = this.expressions, + t2 = B.JSArray_methods.get$first(t1); + t2 = t2.get$span(t2); + t1 = B.JSArray_methods.get$last(t1); + return t2.expand$1(0, t1.get$span(t1)); + }, + toInterpolation$1(arbitrarySubstitution) { + var t2, t3, t4, first, _i, expression, + t1 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + for (t2 = this.expressions, t3 = t2.length, t4 = this.op, first = true, _i = 0; _i < t3; ++_i) { + expression = t2[_i]; + if (first) + first = false; + else + t1._contents += " " + t4.toString$0(0) + " "; + buffer.addInterpolation$1(expression.toInterpolation$1(arbitrarySubstitution)); + } + return buffer.interpolation$1(new A.LazyFileSpan(new A.IfConditionOperation_toInterpolation_closure(this))); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionOperation$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return B.JSArray_methods.join$1(this.expressions, " " + this.op.toString$0(0) + " "); + } + }; + A.IfConditionOperation_toInterpolation_closure.prototype = { + call$0() { + return this.$this.get$span(0); + }, + $signature: 16 + }; + A.IfConditionFunction.prototype = { + get$isArbitrarySubstitution() { + var t2, + t1 = this.name.get$asPlain(), + _0_0 = t1 == null ? null : t1.toLowerCase(); + $label0$0: { + t1 = true; + if ("if" === _0_0 || "var" === _0_0 || "attr" === _0_0) + break $label0$0; + if (_0_0 != null) + t2 = B.JSString_methods.startsWith$1(_0_0, "--"); + else + t2 = false; + if (t2) + break $label0$0; + t1 = false; + break $label0$0; + } + return t1; + }, + toInterpolation$1(_) { + var t3, + t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t2.addInterpolation$1(this.name); + t3 = A.Primitives_stringFromCharCode(40); + t1._contents += t3; + t2.addInterpolation$1(this.$arguments); + t3 = A.Primitives_stringFromCharCode(41); + t1._contents += t3; + return t2.interpolation$1(this.span); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionFunction$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionSass.prototype = { + toInterpolation$1(arbitrarySubstitution) { + return A.throwExpression(A.MultiSourceSpanFormatException$(string$.if___c, arbitrarySubstitution.get$span(arbitrarySubstitution), "arbitrary substitution", A.LinkedHashMap_LinkedHashMap$_literal([this.span, "sass() expression"], type$.SourceSpan, type$.String), null)); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionSass$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "sass(" + this.expression.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionRaw.prototype = { + get$span(_) { + return this.text.span; + }, + get$isArbitrarySubstitution() { + return true; + }, + toInterpolation$1(_) { + return this.text; + }, + accept$1$1(visitor) { + return visitor.visitIfConditionRaw$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text.toString$0(0); + } + }; + A.InterpolatedFunctionExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitInterpolatedFunctionExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + this.$arguments.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.LegacyIfExpression.prototype = { + get$modernSuggestion() { + var _0_1, ifTrue, ifFalse, t1, condition, _null = null, + _0_0 = this.$arguments; + $label0$0: { + _0_1 = _0_0.positional; + ifTrue = _null; + ifFalse = _null; + t1 = false; + if (_0_1.length === 3) { + condition = _0_1[0]; + ifTrue = _0_1[1]; + ifFalse = _0_1[2]; + t1 = _0_0.named; + t1 = t1.get$isEmpty(t1) && _0_0.rest == null; + } else + condition = _null; + if (t1) { + if (ifFalse instanceof A.NullExpression) + t1 = "if(sass(" + A.S(condition) + "): " + A.S(ifTrue) + ")"; + else + t1 = ifTrue instanceof A.NullExpression ? "if(not sass(" + A.S(condition) + "): " + A.S(ifFalse) + ")" : "if(sass(" + A.S(condition) + "): " + A.S(ifTrue) + "; else: " + A.S(ifFalse) + ")"; + break $label0$0; + } + t1 = _null; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitLegacyIfExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "if" + this.$arguments.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitListExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, t3, t4, t5, _this = this, + t1 = _this.hasBrackets; + if (t1) + t2 = A.Primitives_stringFromCharCode(91); + else { + t2 = _this.contents.length; + if (t2 !== 0) + t2 = t2 === 1 && _this.separator === B.ListSeparator_z0K; + else + t2 = true; + t2 = t2 ? A.Primitives_stringFromCharCode(40) : ""; + } + t3 = _this.contents; + t4 = _this.separator === B.ListSeparator_z0K; + t5 = t4 ? ", " : " "; + t5 = t2 + new A.MappedListIterable(t3, new A.ListExpression_toString_closure(_this), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,String>")).join$1(0, t5); + if (t1) + t1 = t5 + A.Primitives_stringFromCharCode(93); + else { + t1 = t3.length; + if (t1 === 0) + t1 = t5 + A.Primitives_stringFromCharCode(41); + else + t1 = t1 === 1 && t4 ? t5 + ",)" : t5; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _list0$_elementNeedsParens$1(expression) { + var childSeparator, t1, _0_13; + $label0$0: { + if (expression instanceof A.ListExpression && expression.contents.length >= 2 && !expression.hasBrackets) { + childSeparator = expression.separator; + t1 = this.separator === B.ListSeparator_z0K ? childSeparator === B.ListSeparator_z0K : childSeparator !== B.ListSeparator_undecided_null_3_undecided; + break $label0$0; + } + if (expression instanceof A.UnaryOperationExpression) { + _0_13 = expression.operator; + if (B.UnaryOperator_n2K !== _0_13) + t1 = B.UnaryOperator_hCO === _0_13; + else + t1 = true; + } else + t1 = false; + if (t1) { + t1 = this.separator === B.ListSeparator_SrV; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression_toString_closure.prototype = { + call$1(element) { + return this.$this._list0$_elementNeedsParens$1(element) ? "(" + element.toString$0(0) + ")" : element.toString$0(0); + }, + $signature: 133 + }; + A.MapExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitMapExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, t3, _i, t4, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + t1.push(t4._0.toString$0(0) + ": " + t4._1.toString$0(0)); + } + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.NullExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitNullExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "null"; + }, + get$span(receiver) { + return this.span; + } + }; + A.NumberExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitNumberExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue(A.SassNumber_SassNumber(this.value, this.unit), true, true); + }, + get$span(receiver) { + return this.span; + } + }; + A.ParenthesizedExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitParenthesizedExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "(" + this.expression.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SelectorExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitSelectorExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "&"; + }, + get$span(receiver) { + return this.span; + } + }; + A.StringExpression.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitStringExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + asInterpolation$1$static($static) { + var t1, t2, quote, t3, t4, t5, buffer, t6, t7, i, value, t8; + if (!this.hasQuotes) + return this.text; + t1 = this.text; + t2 = t1.contents; + quote = A.StringExpression__bestQuote(new A.WhereTypeIterable(t2, type$.WhereTypeIterable_String)); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer(t3, t4, t5); + t6 = A.Primitives_stringFromCharCode(quote); + t3._contents += t6; + for (t7 = t2.length, i = 0; i < t7; ++i) { + value = t2[i]; + if (value instanceof A.Expression) { + t8 = t1.spanForElement$1(i); + buffer._flushText$0(); + t4.push(value); + t5.push(t8); + continue; + } + if (typeof value == "string") + A.StringExpression__quoteInnerText(value, quote, buffer, $static); + } + t3._contents += t6; + return buffer.interpolation$1(t1.span); + }, + asInterpolation$0() { + return this.asInterpolation$1$static(false); + }, + toString$0(_) { + return this.asInterpolation$0().toString$0(0); + } + }; + A.SupportsExpression.prototype = { + get$span(_) { + var t1 = this.condition; + return t1.get$span(t1); + }, + accept$1$1(visitor) { + return visitor.visitSupportsExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.condition.toString$0(0); + } + }; + A.UnaryOperationExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitUnaryOperationExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var operand, + t1 = this.operator, + t2 = t1.operator; + t1 = t1 === B.UnaryOperator_not_not_3_not ? t2 + A.Primitives_stringFromCharCode(32) : t2; + operand = this.operand; + $label0$0: { + t2 = true; + if (!(operand instanceof A.BinaryOperationExpression)) + if (!(operand instanceof A.UnaryOperationExpression)) + t2 = operand instanceof A.ListExpression && !operand.hasBrackets && operand.contents.length >= 2; + break $label0$0; + } + if (t2) + t1 += "40"; + t1 += operand.toString$0(0); + if (t2) + t1 += "41"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.UnaryOperator.prototype = { + _enumToString$0() { + return "UnaryOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.ValueExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitValueExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.value.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.VariableExpression.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.span.get$text(); + }, + get$span(receiver) { + return this.span; + } + }; + A.DynamicImport.prototype = { + toString$0(_) { + return A.StringExpression_quoteText(this.urlString); + }, + $isAstNode: 1, + $isImport: 1, + get$span(receiver) { + return this.span; + } + }; + A.StaticImport.prototype = { + toString$0(_) { + var t1 = this.url.toString$0(0), + t2 = this.modifiers; + return t1 + (t2 == null ? "" : " " + t2.toString$0(0)); + }, + $isAstNode: 1, + $isImport: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation.prototype = { + get$asPlain() { + var _0_1, t1, _0_6_isSet, _0_6, first, + _0_0 = this.contents; + $label0$0: { + _0_1 = _0_0.length; + if (_0_1 <= 0) { + t1 = ""; + break $label0$0; + } + _0_6_isSet = _0_1 === 1; + if (_0_6_isSet) { + _0_6 = _0_0[0]; + t1 = typeof _0_6 == "string"; + } else { + _0_6 = null; + t1 = false; + } + if (t1) { + first = A._asString(_0_6_isSet ? _0_6 : _0_0[0]); + t1 = first; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + get$initialPlain() { + var _0_4_isSet, _0_4, t1, first, + _0_0 = this.contents; + $label0$0: { + _0_4_isSet = _0_0.length >= 1; + if (_0_4_isSet) { + _0_4 = _0_0[0]; + t1 = typeof _0_4 == "string"; + } else { + _0_4 = null; + t1 = false; + } + if (t1) { + first = A._asString(_0_4_isSet ? _0_4 : _0_0[0]); + t1 = first; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + return t1; + }, + spanForElement$1(index) { + var t1, t2, t3, t4, t5, _this = this; + $label0$0: { + if (typeof _this.contents[index] == "string") { + t1 = _this.span; + t2 = t1.get$file(t1); + if (index === 0) + t3 = t1.get$start(t1); + else { + t3 = _this.spans[index - 1]; + t3 = t3.get$end(t3); + } + t4 = index + 1; + t5 = _this.spans; + if (t4 === t5.length) + t1 = t1.get$end(t1); + else { + t1 = t5[t4]; + t1 = t1.get$start(t1); + } + t1 = t2.span$2(0, t3.offset, t1.offset); + break $label0$0; + } + t1 = _this.spans[index]; + t1.toString; + break $label0$0; + } + return t1; + }, + Interpolation$3(contents, spans, span) { + var t1, t2, t3, t4, i, t5, isString, _s5_ = "spans", + _s8_ = "contents"; + if (spans.length !== J.get$length$asx(contents)) + throw A.wrapException(A.ArgumentError$value(this.spans, _s5_, "Must be the same length as contents.")); + for (t1 = this.contents, t2 = t1.length, t3 = spans.length, t4 = this.spans, i = 0; i < t2; ++i) { + t5 = t1[i]; + isString = typeof t5 == "string"; + if (!isString && !(t5 instanceof A.Expression)) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May only contain Strings or Expressions.")); + else if (isString) { + if (i !== 0 && typeof t1[i - 1] == "string") + throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May not contain adjacent Strings.")); + else if (i < t3 && t4[i] != null) + throw A.wrapException(A.ArgumentError$value(t4, _s5_, string$.May_no + i + ").")); + } else if (i >= t3 || t4[i] == null) + throw A.wrapException(A.ArgumentError$value(t4, _s5_, string$.Must_n + i + ").")); + } + }, + toString$0(_) { + var t1 = this.contents; + return new A.MappedListIterable(t1, new A.Interpolation_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation_toString_closure.prototype = { + call$1(value) { + return typeof value == "string" ? value : "#{" + A.S(value) + "}"; + }, + $signature: 132 + }; + A.Parameter.prototype = { + toString$0(_) { + var t1 = this.defaultValue, + t2 = this.name; + return t1 == null ? t2 : t2 + ": " + t1.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ParameterList.prototype = { + get$spanWithName() { + var t2, t3, + t1 = this.span, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), + i = t1.get$start(t1).offset - 1; + for (;;) { + if (i > 0) { + t2 = text.charCodeAt(i); + t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; + } else + t2 = false; + if (!t2) + break; + --i; + } + t2 = text.charCodeAt(i); + if (!(t2 === 95 || A.CharacterExtension_get_isAlphabetic(t2) || t2 >= 128)) + t2 = t2 >= 48 && t2 <= 57 || t2 === 45; + else + t2 = true; + if (!t2) + return t1; + --i; + for (;;) { + if (i >= 0) { + t2 = text.charCodeAt(i); + if (t2 !== 95) { + if (!(t2 >= 97 && t2 <= 122)) + t3 = t2 >= 65 && t2 <= 90; + else + t3 = true; + t3 = t3 || t2 >= 128; + } else + t3 = true; + if (!t3) + t2 = t2 >= 48 && t2 <= 57 || t2 === 45; + else + t2 = true; + } else + t2 = false; + if (!t2) + break; + --i; + } + t2 = i + 1; + t3 = text.charCodeAt(t2); + if (!(t3 === 95 || A.CharacterExtension_get_isAlphabetic(t3) || t3 >= 128)) + return t1; + return A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t1.get$file(t1).span$2(0, t2, t1.get$end(t1).offset))); + }, + verify$2(positional, names) { + var t1, t2, t3, namedUsed, i, parameter, t4, unknownNames, _this = this, + _s10_ = "invocation"; + for (t1 = _this.parameters, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + parameter = t1[i]; + if (i < positional) { + t4 = parameter.name; + if (t3.containsKey$1(t4)) + throw A.wrapException(A.SassScriptException$("Argument " + _this._originalParameterName$1(t4) + string$.x20was_p, null)); + } else { + t4 = parameter.name; + if (t3.containsKey$1(t4)) + ++namedUsed; + else if (parameter.defaultValue == null) + throw A.wrapException(A.MultiSpanSassScriptException$("Missing argument " + _this._originalParameterName$1(t4) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + } + if (_this.restParameter != null) + return; + if (positional > t2) { + t1 = names.get$isEmpty(0) ? "" : "positional "; + throw A.wrapException(A.MultiSpanSassScriptException$("Only " + t2 + " " + t1 + A.pluralize("argument", t2, null) + " allowed, but " + positional + " " + A.pluralize("was", positional, "were") + " passed.", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + if (namedUsed < t3.get$length(t3)) { + t2 = type$.String; + unknownNames = A.LinkedHashSet_LinkedHashSet$of(names, t2); + unknownNames.removeAll$1(new A.MappedListIterable(t1, new A.ParameterList_verify_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object?>"))); + throw A.wrapException(A.MultiSpanSassScriptException$("No " + A.pluralize("parameter", unknownNames._collection$_length, null) + " named " + A.toSentence(unknownNames.map$1$1(0, new A.ParameterList_verify_closure0(), type$.Object), "or") + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, t2))); + } + }, + _originalParameterName$1($name) { + var text, t1, t2, _i, parameter, end; + if ($name === this.restParameter) { + text = this.span.get$text(); + return B.JSString_methods.substring$2(B.JSString_methods.substring$1(text, B.JSString_methods.lastIndexOf$1(text, "$")), 0, B.JSString_methods.indexOf$1(text, ".")); + } + for (t1 = this.parameters, t2 = t1.length, _i = 0; _i < t2; ++_i) { + parameter = t1[_i]; + if (parameter.name === $name) { + t1 = parameter.span; + if (parameter.defaultValue == null) + t1 = t1.get$text(); + else { + text = t1.get$text(); + t1 = B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")); + end = A._lastNonWhitespace(t1, false); + t1 = end == null ? "" : B.JSString_methods.substring$2(t1, 0, end + 1); + } + return t1; + } + } + throw A.wrapException(A.ArgumentError$(string$.This_d + $name + '".', null)); + }, + matches$2(positional, names) { + var t1, t2, t3, namedUsed, i, parameter; + for (t1 = this.parameters, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + parameter = t1[i]; + if (i < positional) { + if (t3.containsKey$1(parameter.name)) + return false; + } else if (t3.containsKey$1(parameter.name)) + ++namedUsed; + else if (parameter.defaultValue == null) + return false; + } + if (this.restParameter != null) + return true; + if (positional > t2) + return false; + if (namedUsed < t3.get$length(t3)) + return false; + return true; + }, + toString$0(_) { + var t2, t3, _i, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.parameters, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push("$" + t2[_i].toString$0(0)); + t2 = this.restParameter; + if (t2 != null) + t1.push("$" + t2 + "..."); + return B.JSArray_methods.join$1(t1, ", "); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ParameterList_verify_closure.prototype = { + call$1(parameter) { + return parameter.name; + }, + $signature: 326 + }; + A.ParameterList_verify_closure0.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A.Statement.prototype = {$isAstNode: 1}; + A.AtRootRule.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRootRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var buffer = new A.StringBuffer("@at-root "), + t1 = this.query; + if (t1 != null) + buffer._contents = "@at-root " + (t1.toString$0(0) + " "); + return buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.AtRule.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var children, + t1 = "@" + this.name.toString$0(0), + buffer = new A.StringBuffer(t1), + t2 = this.value; + if (t2 != null) + buffer._contents = t1 + (" " + t2.toString$0(0)); + children = this.children; + return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.CallableDeclaration.prototype = { + get$span(receiver) { + return this.span; + } + }; + A.ContentBlock.prototype = { + accept$1$1(visitor) { + return visitor.visitContentBlock$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.parameters; + t1 = t1.parameters.length === 0 && t1.restParameter == null ? "" : " using (" + t1.toString$0(0) + ")"; + return t1 + (" {" + B.JSArray_methods.join$1(this.children, " ") + "}"); + } + }; + A.ContentRule.prototype = { + accept$1$1(visitor) { + return visitor.visitContentRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.$arguments; + return t1.get$isEmpty(0) ? "@content;" : "@content(" + t1.toString$0(0) + ");"; + }, + get$span(receiver) { + return this.span; + } + }; + A.DebugRule.prototype = { + accept$1$1(visitor) { + return visitor.visitDebugRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@debug " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Declaration.prototype = { + accept$1$1(visitor) { + return visitor.visitDeclaration$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _0_0, _this = this, + buffer = new A.StringBuffer(""), + t1 = _this.name.toString$0(0); + buffer._contents = t1; + t1 = buffer._contents = t1 + A.Primitives_stringFromCharCode(58); + t2 = _this.value; + if (t2 != null) { + if (_this.parsedAsSassScript) + t1 = buffer._contents = t1 + A.Primitives_stringFromCharCode(32); + buffer._contents = t1 + t2.toString$0(0); + } + _0_0 = _this.children; + if (_0_0 != null) + return buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(_0_0, " ") + "}"; + else + return buffer.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule.prototype = { + accept$1$1(visitor) { + return visitor.visitEachRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.variables; + return "@each " + new A.MappedListIterable(t1, new A.EachRule_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + " in " + this.list.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule_toString_closure.prototype = { + call$1(variable) { + return "$" + variable; + }, + $signature: 6 + }; + A.ErrorRule.prototype = { + accept$1$1(visitor) { + return visitor.visitErrorRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@error " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ExtendRule.prototype = { + accept$1$1(visitor) { + return visitor.visitExtendRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.selector.toString$0(0), + t2 = this.isOptional ? " !optional" : ""; + return "@extend " + t1 + t2 + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ForRule.prototype = { + accept$1$1(visitor) { + return visitor.visitForRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + t1 = _this.from.toString$0(0), + t2 = _this.isExclusive ? "to" : "through"; + return "@for $" + _this.variable + " from " + t1 + " " + t2 + " " + _this.to.toString$0(0) + " {" + B.JSArray_methods.join$1(_this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ForwardRule.prototype = { + accept$1$1(visitor) { + return visitor.visitForwardRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, prefix, _this = this, + t1 = "@forward " + A.StringExpression_quoteText(_this.url.toString$0(0)), + shownMixinsAndFunctions = _this.shownMixinsAndFunctions, + hiddenMixinsAndFunctions = _this.hiddenMixinsAndFunctions; + if (shownMixinsAndFunctions != null) { + t2 = _this.shownVariables; + t2.toString; + t2 = t1 + " show " + _this._forward_rule$_memberList$2(shownMixinsAndFunctions, t2); + t1 = t2; + } else if (hiddenMixinsAndFunctions != null && hiddenMixinsAndFunctions._base.get$isNotEmpty(0)) { + t2 = _this.hiddenVariables; + t2.toString; + t2 = t1 + " hide " + _this._forward_rule$_memberList$2(hiddenMixinsAndFunctions, t2); + t1 = t2; + } + prefix = _this.prefix; + if (prefix != null) + t1 += " as " + prefix + "*"; + t2 = _this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _forward_rule$_memberList$2(mixinsAndFunctions, variables) { + var t2, + t1 = A.List_List$_of(mixinsAndFunctions, type$.String); + for (t2 = variables._base.get$iterator(0); t2.moveNext$0();) + t1.push("$" + t2.get$current(0)); + return B.JSArray_methods.join$1(t1, ", "); + }, + get$span(receiver) { + return this.span; + } + }; + A.FunctionRule.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@function " + this.name + "(" + this.parameters.toString$0(0) + ") {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.IfRule.prototype = { + accept$1$1(visitor) { + return visitor.visitIfRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var result = A.ListExtensions_mapIndexed(this.clauses, new A.IfRule_toString_closure(), type$.IfClause, type$.String).join$1(0, " "), + lastClause = this.lastClause; + return lastClause != null ? result + (" " + lastClause.toString$0(0)) : result; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfRule_toString_closure.prototype = { + call$2(index, clause) { + var t1 = index === 0 ? "if" : "else if"; + return "@" + t1 + " " + clause.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(clause.children, " ") + "}"; + }, + $signature: 397 + }; + A.IfRuleClause.prototype = {}; + A.IfRuleClause$__closure.prototype = { + call$1(child) { + var t1; + $label0$0: { + if (child instanceof A.VariableDeclaration || child instanceof A.FunctionRule || child instanceof A.MixinRule) { + t1 = true; + break $label0$0; + } + if (child instanceof A.ImportRule) { + t1 = B.JSArray_methods.any$1(child.imports, new A.IfRuleClause$___closure()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 148 + }; + A.IfRuleClause$___closure.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport; + }, + $signature: 150 + }; + A.IfClause.prototype = { + toString$0(_) { + return "@if " + this.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ElseClause.prototype = { + toString$0(_) { + return "@else {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ImportRule.prototype = { + accept$1$1(visitor) { + return visitor.visitImportRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@import " + B.JSArray_methods.join$1(this.imports, ", ") + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.IncludeRule.prototype = { + get$spanWithoutContent() { + var t2, + t1 = this.span; + if (!(this.content == null)) { + t2 = this.$arguments.span; + t2 = A.SpanExtensions_trimRight(A.SpanExtensions_trimLeft(t1.get$file(t1).span$2(0, t1.get$start(t1).offset, t2.get$end(t2).offset))); + t1 = t2; + } + return t1; + }, + get$nameSpan() { + var startSpan, scanner, _null = null, + t1 = this.span; + if (B.JSString_methods.startsWith$1(t1.get$text(), "+")) + startSpan = A.SpanExtensions_trimLeft(A.FileSpanExtension_subspan(t1, 1, _null)); + else { + scanner = A.StringScanner$(t1.get$text(), _null, _null); + scanner.expectChar$1(64); + A._scanIdentifier(scanner); + startSpan = A.SpanExtensions_trimLeft(A.FileSpanExtension_subspan(t1, scanner._string_scanner$_position, _null)); + } + if (this.namespace != null) { + scanner = A.StringScanner$(startSpan.get$text(), _null, _null); + A._scanIdentifier(scanner); + startSpan = A.FileSpanExtension_subspan(A.FileSpanExtension_subspan(startSpan, scanner._string_scanner$_position, _null), 1, _null); + } + return A.SpanExtensions_initialIdentifier(startSpan); + }, + accept$1$1(visitor) { + return visitor.visitIncludeRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.namespace; + t1 = t1 != null ? "@include " + (t1 + ".") : "@include "; + t1 += _this.name; + t2 = _this.$arguments; + if (!t2.get$isEmpty(0)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = _this.content; + t1 += t2 == null ? ";" : " " + t2.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.LoudComment.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitLoudComment$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text.toString$0(0); + } + }; + A.MediaRule.prototype = { + accept$1$1(visitor) { + return visitor.visitMediaRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@media " + this.query.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.MixinRule.prototype = { + get$hasContent() { + var result, _this = this, + value = _this.__MixinRule_hasContent_FI; + if (value === $) { + result = J.$eq$(B.C__HasContentVisitor.visitChildren$1(_this.children), true); + _this.__MixinRule_hasContent_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__MixinRule_hasContent_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitMixinRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = "@mixin " + this.name, + t2 = this.parameters; + if (!(t2.parameters.length === 0 && t2.restParameter == null)) + t1 += "(" + t2.toString$0(0) + ")"; + t1 += " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._HasContentVisitor.prototype = { + visitContentRule$1(_, _0) { + return true; + } + }; + A.__HasContentVisitor_Object_StatementSearchVisitor.prototype = {}; + A.ParentStatement.prototype = {}; + A.ParentStatement_closure.prototype = { + call$1(child) { + var t1; + $label0$0: { + if (child instanceof A.VariableDeclaration || child instanceof A.FunctionRule || child instanceof A.MixinRule) { + t1 = true; + break $label0$0; + } + if (child instanceof A.ImportRule) { + t1 = B.JSArray_methods.any$1(child.imports, new A.ParentStatement__closure()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 148 + }; + A.ParentStatement__closure.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport; + }, + $signature: 150 + }; + A.ReturnRule.prototype = { + accept$1$1(visitor) { + return visitor.visitReturnRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@return " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SilentComment.prototype = { + accept$1$1(visitor) { + return visitor.visitSilentComment$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text; + }, + get$span(receiver) { + return this.span; + } + }; + A.StyleRule.prototype = { + accept$1$1(visitor) { + return visitor.visitStyleRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.selector; + return A.S(t1 == null ? this.parsedSelector : t1) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Stylesheet.prototype = { + Stylesheet$internal$5$globalVariables$plainCss(children, span, parseTimeWarnings, globalVariables, plainCss) { + var t1, t2, t3, t4, _i, child; + for (t1 = this.children, t2 = t1.length, t3 = this._forwards, t4 = this._uses, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + if (child instanceof A.UseRule) { + t4.push(child); + continue; + } + if (child instanceof A.ForwardRule) { + t3.push(child); + continue; + } + if (child instanceof A.SilentComment || child instanceof A.LoudComment || child instanceof A.VariableDeclaration) + continue; + break; + } + }, + accept$1$1(visitor) { + return visitor.visitStylesheet$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return B.JSArray_methods.join$1(this.children, " "); + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsRule.prototype = { + accept$1$1(visitor) { + return visitor.visitSupportsRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@supports " + this.condition.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.UseRule.prototype = { + UseRule$4$configuration(url, namespace, span, configuration) { + var t1, t2, _i, variable; + for (t1 = this.configuration, t2 = t1.length, _i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (variable.isGuarded) + throw A.wrapException(A.ArgumentError$value(variable, "configured variable", "can't be guarded in a @use rule.")); + } + }, + accept$1$1(visitor) { + return visitor.visitUseRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.url, + t2 = "@use " + A.StringExpression_quoteText(t1.toString$0(0)), + basename = t1.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(t1.get$pathSegments()), + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = this.namespace; + if (t1 !== B.JSString_methods.substring$2(basename, 0, dot === -1 ? basename.length : dot)) + t1 = t2 + (" as " + (t1 == null ? "*" : t1)); + else + t1 = t2; + t2 = this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.VariableDeclaration.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableDeclaration$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? t1 + "." : ""; + t1 += "$" + this.name + ": " + this.expression.toString$0(0) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.WarnRule.prototype = { + accept$1$1(visitor) { + return visitor.visitWarnRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@warn " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.WhileRule.prototype = { + accept$1$1(visitor) { + return visitor.visitWhileRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@while " + this.condition.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsAnything.prototype = { + withSpan$1(span) { + return new A.SupportsAnything(this.contents, span); + }, + toString$0(_) { + return "(" + this.contents.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsDeclaration.prototype = { + get$isCustomProperty() { + var t1, + _0_0 = this.name; + $label0$0: { + if (_0_0 instanceof A.StringExpression && !_0_0.hasQuotes) { + t1 = B.JSString_methods.startsWith$1(_0_0.text.get$initialPlain(), "--"); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + withSpan$1(span) { + return new A.SupportsDeclaration(this.name, this.value, span); + }, + toString$0(_) { + return "(" + this.name.toString$0(0) + ": " + this.value.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsFunction.prototype = { + withSpan$1(span) { + return new A.SupportsFunction(this.name, this.$arguments, span); + }, + toString$0(_) { + return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsInterpolation.prototype = { + withSpan$1(span) { + return new A.SupportsInterpolation(this.expression, span); + }, + toString$0(_) { + return "#{" + this.expression.toString$0(0) + "}"; + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsNegation.prototype = { + withSpan$1(span) { + return new A.SupportsNegation(this.condition, span); + }, + toString$0(_) { + var t1 = this.condition; + if (t1 instanceof A.SupportsNegation || t1 instanceof A.SupportsOperation) + return "not (" + t1.toString$0(0) + ")"; + else + return "not " + t1.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.SupportsOperation.prototype = { + withSpan$1(span) { + return new A.SupportsOperation(this.left, this.right, this.operator, span); + }, + toString$0(_) { + var _this = this; + return _this._parenthesize$1(_this.left) + " " + _this.operator.toString$0(0) + " " + _this._parenthesize$1(_this.right); + }, + _parenthesize$1(condition) { + var t1; + if (!(condition instanceof A.SupportsNegation)) + t1 = condition instanceof A.SupportsOperation && condition.operator === this.operator; + else + t1 = true; + return t1 ? "(" + condition.toString$0(0) + ")" : condition.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Selector.prototype = { + assertNotBogus$1$name($name) { + if (!this.accept$1(B._IsBogusVisitor_true)) + return; + A.warnForDeprecation("$" + $name + ": " + (this.toString$0(0) + string$.x20is_nov), B.Deprecation_0rM); + }, + toString$0(_) { + var _null = null, + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + this.accept$1(visitor); + return visitor._serialize$_buffer.toString$0(0); + }, + $isAstNode: 1, + get$span(receiver) { + return this.span; + } + }; + A._IsInvisibleVisitor0.prototype = { + visitSelectorList$1(list) { + return B.JSArray_methods.every$1(list.components, this.get$visitComplexSelector()); + }, + visitComplexSelector$1(complex) { + var t1; + if (!this.super$AnySelectorVisitor$visitComplexSelector(complex)) + t1 = this.includeBogus && complex.accept$1(B._IsBogusVisitor_false); + else + t1 = true; + return t1; + }, + visitPlaceholderSelector$1(_, placeholder) { + return true; + }, + visitPseudoSelector$1(_, pseudo) { + var t1, + _0_0 = pseudo.selector; + if (_0_0 != null) { + if (pseudo.name === "not") + t1 = this.includeBogus && _0_0.accept$1(B._IsBogusVisitor_true); + else + t1 = this.visitSelectorList$1(_0_0); + return t1; + } else + return false; + } + }; + A._IsBogusVisitor.prototype = { + visitComplexSelector$1(complex) { + var t2, + t1 = complex.components; + if (t1.length === 0) + return complex.leadingCombinators.length !== 0; + else { + t2 = this.includeLeadingCombinator ? 0 : 1; + return complex.leadingCombinators.length > t2 || B.JSArray_methods.get$last(t1).combinators.length !== 0 || B.JSArray_methods.any$1(t1, new A._IsBogusVisitor_visitComplexSelector_closure(this)); + } + }, + visitPseudoSelector$1(_, pseudo) { + var selector = pseudo.selector; + if (selector == null) + return false; + return pseudo.name === "has" ? selector.accept$1(B._IsBogusVisitor_false) : selector.accept$1(B._IsBogusVisitor_true); + } + }; + A._IsBogusVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 54 + }; + A._IsUselessVisitor.prototype = { + visitComplexSelector$1(complex) { + return complex.leadingCombinators.length > 1 || B.JSArray_methods.any$1(complex.components, new A._IsUselessVisitor_visitComplexSelector_closure(this)); + }, + visitPseudoSelector$1(_, pseudo) { + return pseudo.accept$1(B._IsBogusVisitor_true); + } + }; + A._IsUselessVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 54 + }; + A._ContainsParentSelectorVisitor.prototype = { + visitParentSelector$1(_, _0) { + return true; + } + }; + A.__ContainsParentSelectorVisitor_Object_AnySelectorVisitor.prototype = {}; + A.__IsBogusVisitor_Object_AnySelectorVisitor.prototype = {}; + A.__IsInvisibleVisitor_Object_AnySelectorVisitor.prototype = {}; + A.__IsUselessVisitor_Object_AnySelectorVisitor.prototype = {}; + A.AttributeSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitAttributeSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.AttributeSelector && other.name.$eq(0, _this.name) && other.op == _this.op && other.value == _this.value && other.modifier == _this.modifier; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.name; + return (B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace) ^ J.get$hashCode$(_this.op) ^ J.get$hashCode$(_this.value) ^ J.get$hashCode$(_this.modifier)) >>> 0; + } + }; + A.AttributeOperator.prototype = { + _enumToString$0() { + return "AttributeOperator." + this._name; + }, + toString$0(_) { + return this._attribute$_text; + } + }; + A.ClassSelector.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ClassSelector && other.name === this.name; + }, + accept$1$1(visitor) { + return visitor.visitClassSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.ClassSelector(this.name + suffix, this.span); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.Combinator.prototype = { + _enumToString$0() { + return "Combinator." + this._name; + }, + toString$0(_) { + return this._combinator$_text; + } + }; + A.ComplexSelector.prototype = { + get$specificity() { + var result, _this = this, + value = _this.__ComplexSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.ComplexSelector_specificity_closure()); + _this.__ComplexSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__ComplexSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$singleCompound() { + var _0_0, t1, _0_4, selector; + if (this.leadingCombinators.length !== 0) + return null; + _0_0 = this.components; + $label0$0: { + t1 = false; + if (_0_0.length === 1) { + _0_4 = _0_0[0]; + selector = _0_4.selector; + t1 = _0_4.combinators.length <= 0; + } else + selector = null; + if (t1) { + t1 = selector; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitComplexSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + isSuperselector$1(other) { + return this.leadingCombinators.length === 0 && other.leadingCombinators.length === 0 && A.complexIsSuperselector(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var _0_0, _0_1, t1, initial, last, _this = this; + if (combinators.length === 0) + return _this; + _0_0 = _this.components; + $label0$0: { + _0_1 = _0_0.length; + if (_0_1 >= 1) { + t1 = _0_1 - 1; + initial = B.JSArray_methods.sublist$2(_0_0, 0, t1); + last = _0_0[t1]; + t1 = A.List_List$_of(initial, type$.ComplexSelectorComponent); + t1.push(last.withAdditionalCombinators$1(combinators)); + t1 = A.ComplexSelector$(_this.leadingCombinators, t1, _this.span, _this.lineBreak); + break $label0$0; + } + if (_0_1 <= 0) { + t1 = A.List_List$_of(_this.leadingCombinators, type$.CssValue_Combinator); + B.JSArray_methods.addAll$1(t1, combinators); + t1 = A.ComplexSelector$(t1, B.List_empty2, _this.span, _this.lineBreak); + break $label0$0; + } + t1 = null; + } + return t1; + }, + concatenate$3$forceLineBreak(child, span, forceLineBreak) { + var t2, _0_1, initial, last, _this = this, + t1 = child.leadingCombinators, + _0_0 = _this.components; + if (t1.length === 0) { + t1 = A.List_List$_of(_0_0, type$.ComplexSelectorComponent); + B.JSArray_methods.addAll$1(t1, child.components); + t2 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$(_this.leadingCombinators, t1, span, t2); + } else { + _0_1 = _0_0.length; + if (_0_1 >= 1) { + t2 = _0_1 - 1; + initial = B.JSArray_methods.sublist$2(_0_0, 0, t2); + last = _0_0[t2]; + t2 = A.List_List$_of(initial, type$.ComplexSelectorComponent); + t2.push(last.withAdditionalCombinators$1(t1)); + B.JSArray_methods.addAll$1(t2, child.components); + t1 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$(_this.leadingCombinators, t2, span, t1); + } else { + t2 = A.List_List$_of(_this.leadingCombinators, type$.CssValue_Combinator); + B.JSArray_methods.addAll$1(t2, t1); + t1 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$(t2, child.components, span, t1); + } + } + }, + concatenate$2(child, span) { + return this.concatenate$3$forceLineBreak(child, span, false); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.leadingCombinators) ^ B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ComplexSelector && B.C_ListEquality.equals$2(0, this.leadingCombinators, other.leadingCombinators) && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.ComplexSelector_specificity_closure.prototype = { + call$2(sum, component) { + return sum + component.selector.get$specificity(); + }, + $signature: 356 + }; + A.ComplexSelectorComponent.prototype = { + withAdditionalCombinators$1(combinators) { + var t1, t2, _this = this; + if (combinators.length === 0) + t1 = _this; + else { + t1 = type$.CssValue_Combinator; + t2 = A.List_List$_of(_this.combinators, t1); + B.JSArray_methods.addAll$1(t2, combinators); + t1 = new A.ComplexSelectorComponent(_this.selector, A.List_List$unmodifiable(t2, t1), _this.span); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.selector.components) ^ B.C_ListEquality0.hash$1(this.combinators); + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (other instanceof A.ComplexSelectorComponent) { + t1 = B.C_ListEquality.equals$2(0, this.selector.components, other.selector.components); + t1 = t1 && B.C_ListEquality.equals$2(0, this.combinators, other.combinators); + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t1 = this.combinators; + return A.serializeSelector(this.selector, true) + new A.MappedListIterable(t1, new A.ComplexSelectorComponent_toString_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ""); + } + }; + A.ComplexSelectorComponent_toString_closure.prototype = { + call$1(combinator) { + return " " + combinator.toString$0(0); + }, + $signature: 393 + }; + A.CompoundSelector.prototype = { + get$specificity() { + var result, _this = this, + value = _this.__CompoundSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.CompoundSelector_specificity_closure()); + _this.__CompoundSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__CompoundSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$hasComplicatedSuperselectorSemantics() { + var result, _this = this, + value = _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI; + if (value === $) { + result = B.JSArray_methods.any$1(_this.components, new A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure()); + _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitCompoundSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CompoundSelector && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.CompoundSelector_specificity_closure.prototype = { + call$2(sum, component) { + return sum + component.get$specificity(); + }, + $signature: 446 + }; + A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure.prototype = { + call$1(component) { + return component.get$hasComplicatedSuperselectorSemantics(); + }, + $signature: 14 + }; + A.IDSelector.prototype = { + get$specificity() { + return A._asInt(Math.pow(A.SimpleSelector.prototype.get$specificity.call(this), 2)); + }, + accept$1$1(visitor) { + return visitor.visitIDSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.IDSelector(this.name + suffix, this.span); + }, + unify$1(compound) { + if (B.JSArray_methods.any$1(compound, new A.IDSelector_unify_closure(this))) + return null; + return this.super$SimpleSelector$unify(compound); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.IDSelector && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.IDSelector_unify_closure.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.IDSelector) + t1 = this.$this.name !== simple.name; + else + t1 = false; + return t1; + }, + $signature: 14 + }; + A.SelectorList.prototype = { + get$asSassList() { + var t1 = this.components; + return A.SassList$(new A.MappedListIterable(t1, new A.SelectorList_asSassList_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_z0K, false); + }, + accept$1$1(visitor) { + return visitor.visitSelectorList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(other) { + var t3, t4, t5, t6, _i, complex1, t7, _i0, t8, + t1 = type$.JSArray_ComplexSelector, + t2 = A._setArrayType([], t1); + for (t3 = this.components, t4 = t3.length, t5 = other.components, t6 = t5.length, _i = 0; _i < t4; ++_i) { + complex1 = t3[_i]; + for (t7 = complex1.span, _i0 = 0; _i0 < t6; ++_i0) { + t8 = A.unifyComplex(A._setArrayType([complex1, t5[_i0]], t1), t7); + if (t8 != null) + B.JSArray_methods.addAll$1(t2, t8); + } + } + return t2.length === 0 ? null : A.SelectorList$(t2, this.span); + }, + nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, preserveParentSelectors) { + var _0_0, t1, _this = this; + if ($parent == null) { + if (preserveParentSelectors) + return _this; + _0_0 = B.C__ParentSelectorVisitor.visitSelectorList$1(_this); + if (_0_0 instanceof A.ParentSelector) + t1 = _0_0.suffix != null; + else + t1 = false; + if (t1) + throw A.wrapException(A.SassException$(string$.A_top_, _0_0.span, null)); + return _this; + } + t1 = _this.components; + return A.SelectorList$(A.flattenVertically(new A.MappedListIterable(t1, new A.SelectorList_nestWithin_closure(_this, preserveParentSelectors, implicitParent, $parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Iterable>")), type$.ComplexSelector), _this.span); + }, + nestWithin$1($parent) { + return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, true, false); + }, + nestWithin$2$implicitParent($parent, implicitParent) { + return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, false); + }, + _nestWithinCompound$2(component, $parent) { + var resolvedSimples, parentSelector, error, stackTrace, t2, resolvedSimples0, exception, + t1 = component.selector, + simples = t1.components, + containsSelectorPseudo = J.any$1$ax(simples, new A.SelectorList__nestWithinCompound_closure()); + if (!containsSelectorPseudo && !(J.get$first$ax(simples) instanceof A.ParentSelector)) + return null; + if (containsSelectorPseudo) { + t2 = simples; + resolvedSimples0 = new A.MappedListIterable(t2, new A.SelectorList__nestWithinCompound_closure0($parent), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,SimpleSelector>")); + } else + resolvedSimples0 = simples; + resolvedSimples = resolvedSimples0; + parentSelector = J.get$first$ax(simples); + try { + if (!(parentSelector instanceof A.ParentSelector)) { + t2 = component.span; + t2 = A._setArrayType([A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(resolvedSimples, t1.span), A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator), t2)], type$.JSArray_ComplexSelectorComponent), t2, false)], type$.JSArray_ComplexSelector); + return t2; + } else if (J.get$length$asx(simples) === 1 && parentSelector.suffix == null) { + t1 = $parent.withAdditionalCombinators$1(component.combinators); + return t1.components; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(error.withAdditionalSpan$2(parentSelector.span, "parent selector"), error, stackTrace); + } else + throw exception; + } + t1 = $parent.components; + return new A.MappedListIterable(t1, new A.SelectorList__nestWithinCompound_closure1(parentSelector, resolvedSimples, component), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")); + }, + isSuperselector$1(other) { + return A.listIsSuperselector(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var t1; + if (combinators.length === 0) + t1 = this; + else { + t1 = this.components; + t1 = A.SelectorList$(new A.MappedListIterable(t1, new A.SelectorList_withAdditionalCombinators_closure(combinators), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")), this.span); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SelectorList && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.SelectorList_asSassList_closure.prototype = { + call$1(complex) { + var t3, t4, _i, component, visitor, t5, t6, t7, _i0, _null = null, + t1 = type$.JSArray_Value, + t2 = A._setArrayType([], t1); + for (t3 = complex.leadingCombinators, t4 = t3.length, _i = 0; _i < t4; ++_i) + t2.push(new A.SassString(J.toString$0$(t3[_i].value), false)); + for (t3 = complex.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + component = t3[_i]; + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + component.selector.accept$1(visitor); + t5 = A._setArrayType([new A.SassString(visitor._serialize$_buffer.toString$0(0), false)], t1); + for (t6 = component.combinators, t7 = t6.length, _i0 = 0; _i0 < t7; ++_i0) + t5.push(new A.SassString(J.toString$0$(t6[_i0].value), false)); + B.JSArray_methods.addAll$1(t2, t5); + } + return A.SassList$(t2, B.ListSeparator_SrV, false); + }, + $signature: 329 + }; + A.SelectorList_nestWithin_closure.prototype = { + call$1(complex) { + var t1, newComplexes, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, _i, component, resolved, i, t12, t13, t14, _i0, newComplex, t15, t16, _this = this; + if (_this.preserveParentSelectors || complex.accept$1(B.C__ParentSelectorVisitor) == null) { + if (!_this.implicitParent) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + t1 = _this.parent.components; + return new A.MappedListIterable(t1, new A.SelectorList_nestWithin__closure(complex), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")); + } + t1 = type$.JSArray_ComplexSelector; + newComplexes = A._setArrayType([], t1); + for (t2 = complex.components, t3 = t2.length, t4 = _this.$this, t5 = _this.parent, t6 = type$.ComplexSelector, t7 = complex.leadingCombinators, t8 = t7.length === 0, t9 = complex.span, t10 = type$.ComplexSelectorComponent, t11 = type$.JSArray_ComplexSelectorComponent, _i = 0; _i < t3; ++_i) { + component = t2[_i]; + resolved = t4._nestWithinCompound$2(component, t5); + if (resolved == null) + if (newComplexes.length === 0) + newComplexes.push(A.ComplexSelector$(t7, A._setArrayType([component], t11), t9, false)); + else + for (i = 0; i < newComplexes.length; ++i) { + t12 = newComplexes[i]; + t13 = A.List_List$_of(t12.components, t10); + t13.push(component); + newComplexes[i] = A.ComplexSelector$(t12.leadingCombinators, t13, t9, t12.lineBreak); + } + else if (newComplexes.length === 0) + B.JSArray_methods.addAll$1(newComplexes, t8 ? resolved : J.map$1$1$ax(resolved, new A.SelectorList_nestWithin__closure0(complex), t6)); + else { + t12 = A._setArrayType([], t1); + for (t13 = newComplexes.length, t14 = J.getInterceptor$ax(resolved), _i0 = 0; _i0 < newComplexes.length; newComplexes.length === t13 || (0, A.throwConcurrentModificationError)(newComplexes), ++_i0) { + newComplex = newComplexes[_i0]; + for (t15 = t14.get$iterator(resolved), t16 = newComplex.span; t15.moveNext$0();) + t12.push(newComplex.concatenate$2(t15.get$current(t15), t16)); + } + newComplexes = t12; + } + } + return newComplexes; + }, + $signature: 346 + }; + A.SelectorList_nestWithin__closure.prototype = { + call$1(parentComplex) { + var t1 = this.complex; + return parentComplex.concatenate$2(t1, t1.span); + }, + $signature: 61 + }; + A.SelectorList_nestWithin__closure0.prototype = { + call$1(resolvedComplex) { + var t1 = resolvedComplex.leadingCombinators, + t2 = this.complex, + t3 = t2.leadingCombinators; + if (t1.length === 0) + t1 = t3; + else { + t3 = A.List_List$_of(t3, type$.CssValue_Combinator); + B.JSArray_methods.addAll$1(t3, t1); + t1 = t3; + } + return A.ComplexSelector$(t1, resolvedComplex.components, t2.span, resolvedComplex.lineBreak); + }, + $signature: 61 + }; + A.SelectorList__nestWithinCompound_closure.prototype = { + call$1(simple) { + var selector; + if (!(simple instanceof A.PseudoSelector)) + return false; + selector = simple.selector; + return selector != null && selector.accept$1(B.C__ParentSelectorVisitor) != null; + }, + $signature: 14 + }; + A.SelectorList__nestWithinCompound_closure0.prototype = { + call$1(simple) { + var selector, t1, _0_2; + $label0$0: { + selector = null; + t1 = false; + if (simple instanceof A.PseudoSelector) { + _0_2 = simple.selector; + if (_0_2 != null) { + selector = _0_2 == null ? type$.SelectorList._as(_0_2) : _0_2; + t1 = selector.accept$1(B.C__ParentSelectorVisitor) != null; + } + } + if (t1) { + t1 = simple.withSelector$1(selector.nestWithin$2$implicitParent(this.parent, false)); + break $label0$0; + } + t1 = simple; + break $label0$0; + } + return t1; + }, + $signature: 367 + }; + A.SelectorList__nestWithinCompound_closure1.prototype = { + call$1(complex) { + var lastComponent, suffix, lastSimples, t1, t2, last, t3, error, stackTrace, t4, t5, exception, _this = this; + try { + t4 = complex.components; + lastComponent = B.JSArray_methods.get$last(t4); + if (lastComponent.combinators.length !== 0) { + t1 = A.MultiSpanSassException$('Selector "' + complex.toString$0(0) + string$.x22x20can_, A.SpanExtensions_trimRight(lastComponent.span), "outer selector", A.LinkedHashMap_LinkedHashMap$_literal([_this.parentSelector.span, "parent selector"], type$.FileSpan, type$.String), null); + throw A.wrapException(t1); + } + suffix = _this.parentSelector.suffix; + lastSimples = lastComponent.selector.components; + t5 = type$.SimpleSelector; + if (suffix == null) { + t2 = A.List_List$_of(lastSimples, t5); + t1 = t2; + J.addAll$1$ax(t1, J.skip$1$ax(_this.resolvedSimples, 1)); + t1 = t1; + } else { + t1 = A.List_List$_of(A.IterableExtension_get_exceptLast(lastSimples), t5); + t2 = t1; + J.add$1$ax(t2, J.get$last$ax(lastSimples).addSuffix$1(suffix)); + J.addAll$1$ax(t2, J.skip$1$ax(_this.resolvedSimples, 1)); + t1 = t2; + } + t2 = _this.component; + last = A.CompoundSelector$(t1, t2.selector.span); + t1 = A.List_List$_of(A.IterableExtension_get_exceptLast(t4), type$.ComplexSelectorComponent); + t3 = t1; + t1 = t2.span; + J.add$1$ax(t3, new A.ComplexSelectorComponent(last, A.List_List$unmodifiable(t2.combinators, type$.CssValue_Combinator), t1)); + t1 = A.ComplexSelector$(complex.leadingCombinators, t3, t1, complex.lineBreak); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(error.withAdditionalSpan$2(_this.parentSelector.span, "parent selector"), error, stackTrace); + } else + throw exception; + } + }, + $signature: 61 + }; + A.SelectorList_withAdditionalCombinators_closure.prototype = { + call$1(complex) { + return complex.withAdditionalCombinators$1(this.combinators); + }, + $signature: 61 + }; + A._ParentSelectorVisitor.prototype = { + visitParentSelector$1(_, selector) { + return selector; + } + }; + A.__ParentSelectorVisitor_Object_SelectorSearchVisitor.prototype = {}; + A.ParentSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitParentSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + return A.throwExpression(A.UnsupportedError$("& doesn't support unification.")); + } + }; + A.PlaceholderSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitPlaceholderSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.PlaceholderSelector(this.name + suffix, this.span); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlaceholderSelector && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.PseudoSelector.prototype = { + get$isHostContext() { + return this.isClass && this.name === "host-context" && this.selector != null; + }, + get$hasComplicatedSuperselectorSemantics() { + return !this.isClass || this.selector != null; + }, + get$specificity() { + var result, _this = this, + value = _this.__PseudoSelector_specificity_FI; + if (value === $) { + result = new A.PseudoSelector_specificity_closure(_this).call$0(); + _this.__PseudoSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__PseudoSelector_specificity_FI = result; + value = result; + } + return value; + }, + withSelector$1(selector) { + var _this = this; + return A.PseudoSelector$(_this.name, _this.span, _this.argument, !_this.isClass, selector); + }, + addSuffix$1(suffix) { + var _this = this; + if (_this.argument != null || _this.selector != null) + _this.super$SimpleSelector$addSuffix(suffix); + return A.PseudoSelector$(_this.name + suffix, _this.span, null, !_this.isClass, null); + }, + unify$1(compound) { + var other, result, t2, addedThis, _i, simple, _this = this, + t1 = _this.name; + if (t1 === "host" || t1 === "host-context") { + if (!B.JSArray_methods.every$1(compound, new A.PseudoSelector_unify_closure())) + return null; + } else { + t1 = false; + if (compound.length === 1) { + other = compound[0]; + if (!(other instanceof A.UniversalSelector)) { + if (other instanceof A.PseudoSelector) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + } else + t1 = true; + } else + other = null; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector)); + } + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector); + for (t1 = compound.length, t2 = !_this.isClass, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (simple instanceof A.PseudoSelector && !simple.isClass) { + if (t2) + return null; + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var selector, t1, t2, _this = this; + if (_this.super$SimpleSelector$isSuperselector(other)) + return true; + selector = _this.selector; + if (selector == null) + return _this.$eq(0, other); + if (other instanceof A.PseudoSelector && !_this.isClass && !other.isClass && _this.normalizedName === "slotted" && other.name === _this.name) { + t1 = A.NullableExtension_andThen(other.selector, selector.get$isSuperselector()); + return t1 == null ? false : t1; + } + t1 = type$.JSArray_SimpleSelector; + t2 = _this.span; + return A.compoundIsSuperselector(A.CompoundSelector$(A._setArrayType([_this], t1), t2), A.CompoundSelector$(A._setArrayType([other], t1), t2), null); + }, + accept$1$1(visitor) { + return visitor.visitPseudoSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.PseudoSelector && other.name === _this.name && other.isClass === _this.isClass && other.argument == _this.argument && J.$eq$(other.selector, _this.selector); + }, + get$hashCode(_) { + var _this = this, + t1 = B.JSString_methods.get$hashCode(_this.name), + t2 = !_this.isClass ? 519018 : 218159; + return t1 ^ t2 ^ J.get$hashCode$(_this.argument) ^ J.get$hashCode$(_this.selector); + } + }; + A.PseudoSelector_specificity_closure.prototype = { + call$0() { + var selector, t2, + t1 = this.$this; + if (!t1.isClass) + return 1; + selector = t1.selector; + if (selector == null) + return A.SimpleSelector.prototype.get$specificity.call(t1); + switch (t1.normalizedName) { + case "where": + return 0; + case "is": + case "not": + case "has": + case "matches": + t1 = selector.components; + return A.IterableIntegerExtension_get_max(new A.MappedListIterable(t1, new A.PseudoSelector_specificity__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>"))); + case "nth-child": + case "nth-last-child": + t1 = A.SimpleSelector.prototype.get$specificity.call(t1); + t2 = selector.components; + return t1 + A.IterableIntegerExtension_get_max(new A.MappedListIterable(t2, new A.PseudoSelector_specificity__closure0(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,int>"))); + default: + return A.SimpleSelector.prototype.get$specificity.call(t1); + } + }, + $signature: 10 + }; + A.PseudoSelector_specificity__closure.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 171 + }; + A.PseudoSelector_specificity__closure0.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 171 + }; + A.PseudoSelector_unify_closure.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.PseudoSelector) + t1 = simple.isClass && simple.name === "host" || simple.selector != null; + else + t1 = false; + return t1; + }, + $signature: 14 + }; + A.QualifiedName.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.QualifiedName && other.name === this.name && other.namespace == this.namespace; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ J.get$hashCode$(this.namespace); + }, + toString$0(_) { + var t1 = this.namespace, + t2 = this.name; + return t1 == null ? t2 : t1 + "|" + t2; + } + }; + A.SimpleSelector.prototype = { + get$specificity() { + return 1000; + }, + get$hasComplicatedSuperselectorSemantics() { + return false; + }, + addSuffix$1(suffix) { + return A.throwExpression(A.MultiSpanSassException$('Selector "' + this.toString$0(0) + "\" can't have a suffix", this.span, "outer selector", A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String), null)); + }, + unify$1(compound) { + var other, result, addedThis, _i, simple, _this = this, + t1 = false; + if (compound.length === 1) { + other = compound[0]; + if (!(other instanceof A.UniversalSelector)) { + if (other instanceof A.PseudoSelector) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + } else + t1 = true; + } else + other = null; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector)); + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector); + for (t1 = compound.length, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (!addedThis && simple instanceof A.PseudoSelector) { + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var list; + if (this.$eq(0, other)) + return true; + if (other instanceof A.PseudoSelector && other.isClass) { + list = other.selector; + if (list != null && $._subselectorPseudos.contains$1(0, other.normalizedName)) + return B.JSArray_methods.every$1(list.components, new A.SimpleSelector_isSuperselector_closure(this)); + } + return false; + } + }; + A.SimpleSelector_isSuperselector_closure.prototype = { + call$1(complex) { + var t1 = complex.components; + return t1.length !== 0 && B.JSArray_methods.any$1(B.JSArray_methods.get$last(t1).selector.components, new A.SimpleSelector_isSuperselector__closure(this.$this)); + }, + $signature: 21 + }; + A.SimpleSelector_isSuperselector__closure.prototype = { + call$1(simple) { + return this.$this.isSuperselector$1(simple); + }, + $signature: 14 + }; + A.TypeSelector.prototype = { + get$specificity() { + return 1; + }, + accept$1$1(visitor) { + return visitor.visitTypeSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + var t1 = this.name; + return new A.TypeSelector(new A.QualifiedName(t1.name + suffix, t1.namespace), this.span); + }, + unify$1(compound) { + var unified, t1, + _0_0 = A.IterableExtensions_get_firstOrNull(compound); + if (_0_0 instanceof A.UniversalSelector || _0_0 instanceof A.TypeSelector) { + unified = A.unifyUniversalAndElement(this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); + return t1; + } else { + t1 = A._setArrayType([this], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, compound); + return t1; + } + }, + isSuperselector$1(other) { + var t1, t2, t3; + if (!this.super$SimpleSelector$isSuperselector(other)) { + t1 = false; + if (other instanceof A.TypeSelector) { + t2 = this.name; + t3 = other.name; + if (t2.name === t3.name) { + t1 = t2.namespace; + t1 = t1 === "*" || t1 == t3.namespace; + } + } + } else + t1 = true; + return t1; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.TypeSelector && other.name.$eq(0, this.name); + }, + get$hashCode(_) { + var t1 = this.name; + return B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace); + } + }; + A.UniversalSelector.prototype = { + get$specificity() { + return 0; + }, + accept$1$1(visitor) { + return visitor.visitUniversalSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + var _0_4, t1, rest, unified, t2, _this = this, _null = null, + _0_1 = compound.length, + _0_4_isSet = _0_1 >= 1; + if (_0_4_isSet) { + _0_4 = compound[0]; + if (!(_0_4 instanceof A.UniversalSelector)) + t1 = _0_4 instanceof A.TypeSelector; + else + t1 = true; + rest = t1 ? B.JSArray_methods.sublist$1(compound, 1) : _null; + } else { + rest = _null; + _0_4 = rest; + t1 = false; + } + if (t1) { + unified = A.unifyUniversalAndElement(_this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return _null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, rest); + return t1; + } + t1 = false; + if (_0_1 === 1) { + if (_0_4_isSet) + t2 = _0_4; + else { + _0_4 = compound[0]; + t2 = _0_4; + _0_4_isSet = true; + } + if (t2 instanceof A.PseudoSelector) { + t2 = _0_4_isSet ? _0_4 : compound[0]; + type$.PseudoSelector._as(t2); + t1 = t2.isClass && t2.name === "host" || t2.get$isHostContext(); + } + } + if (t1) + return _null; + if (_0_1 <= 0) + return A._setArrayType([_this], type$.JSArray_SimpleSelector); + t1 = _this.namespace; + if (t1 == null || t1 === "*") + t1 = compound; + else { + t1 = A._setArrayType([_this], type$.JSArray_SimpleSelector); + B.JSArray_methods.addAll$1(t1, compound); + } + return t1; + }, + isSuperselector$1(other) { + var t1 = this.namespace; + if (t1 === "*") + return true; + if (other instanceof A.TypeSelector) + return t1 == other.name.namespace; + if (other instanceof A.UniversalSelector) + return t1 == other.namespace; + return t1 == null || this.super$SimpleSelector$isSuperselector(other); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UniversalSelector && other.namespace == this.namespace; + }, + get$hashCode(_) { + return J.get$hashCode$(this.namespace); + } + }; + A._compileStylesheet_closure0.prototype = { + call$1(url) { + var t1; + if (url === "") { + t1 = this.stylesheet.span; + t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); + } else + t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + return t1; + }, + $signature: 6 + }; + A.AsyncEnvironment.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._async_environment$_forwardedModules, + t2 = _this._async_environment$_nestedForwardedModules, + t3 = _this._async_environment$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._async_environment$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._async_environment$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._async_environment$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.AsyncEnvironment$_(_this._async_environment$_modules, _this._async_environment$_namespaceNodes, _this._async_environment$_globalModules, _this._async_environment$_importedModules, t1, t2, _this._async_environment$_allModules, t3, t4, t5, t6, _this._async_environment$_content, B.Set_empty1); + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._async_environment$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._async_environment$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); + view = A.ForwardedModuleView_ifNecessary(module, rule, type$.AsyncCallable); + for (t1 = new A.LinkedHashMapKeyIterator(forwardedModules, forwardedModules._modifications, forwardedModules._first); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._async_environment$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._async_environment$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._async_environment$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._async_environment$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _async_environment$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, t3, t4, $name, small, large, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = type$.String, t2 = A.MapExtensions_get_pairs(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { + t4 = t2.get$current(t2); + $name = t4._0; + small = t4._1; + large = larger.$index(0, $name); + if (large == null) + continue; + if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) + continue; + if (t3) + $name = "$" + $name; + t2 = this._async_environment$_forwardedModules; + if (t2 == null) + span = null; + else { + t2 = t2.$index(0, oldModule); + span = t2 == null ? null : t2.get$span(t2); + } + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); + if (span != null) + t2.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, t13, _length, _list, _this = this, + forwarded = module._async_environment$_environment._async_environment$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._async_environment$_forwardedModules; + if (forwardedModules != null) { + t1 = type$.Module_AsyncCallable; + t2 = type$.AstNode; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._async_environment$_globalModules; t1.moveNext$0();) { + t4 = t1.get$current(t1); + module = t4._0; + node = t4._1; + if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) + t3.$indexSet(0, module, node); + } + forwarded = t3; + } else + forwardedModules = _this._async_environment$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.AstNode); + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t3 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t3.moveNext$0();) + for (t4 = t3.__js_helper$_current.get$variables(), t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4); t4.moveNext$0();) + t2.add$1(0, t4.get$current(t4)); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t4.moveNext$0();) { + t5 = t4.__js_helper$_current; + for (t5 = t5.get$functions(t5), t5 = t5.get$keys(t5), t5 = t5.get$iterator(t5); t5.moveNext$0();) + t3.add$1(0, t5.get$current(t5)); + } + t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t4.moveNext$0();) + for (t5 = t4.__js_helper$_current.get$mixins(), t5 = t5.get$keys(t5), t5 = t5.get$iterator(t5); t5.moveNext$0();) + t1.add$1(0, t5.get$current(t5)); + t4 = _this._async_environment$_variables; + t5 = t4.length; + if (t5 === 1) { + for (t5 = _this._async_environment$_importedModules, t6 = type$.Module_AsyncCallable, t7 = type$.AstNode, t8 = A.MapExtensions_get_pairs(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.AsyncCallable, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { + t11 = t8[_i]; + module = t11._0; + shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); + if (shadowed != null) { + t5.remove$1(0, module); + t12 = shadowed.variables; + t13 = false; + if (t12.get$isEmpty(t12)) { + t12 = shadowed.functions; + if (t12.get$isEmpty(t12)) { + t12 = shadowed.mixins; + if (t12.get$isEmpty(t12)) { + t12 = shadowed._shadowed_view$_inner; + t12 = t12.get$css(t12); + t12 = J.get$isEmpty$asx(t12.get$children(t12)); + } else + t12 = t13; + } else + t12 = t13; + } else + t12 = t13; + if (!t12) + t5.$indexSet(0, shadowed, t11._1); + } + } + for (t6 = A.MapExtensions_get_pairs(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { + t8 = t6[_i]; + module = t8._0; + shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t9 = shadowed.variables; + t11 = false; + if (t9.get$isEmpty(t9)) { + t9 = shadowed.functions; + if (t9.get$isEmpty(t9)) { + t9 = shadowed.mixins; + if (t9.get$isEmpty(t9)) { + t9 = shadowed._shadowed_view$_inner; + t9 = t9.get$css(t9); + t9 = J.get$isEmpty$asx(t9.get$children(t9)); + } else + t9 = t11; + } else + t9 = t11; + } else + t9 = t11; + if (!t9) + forwardedModules.$indexSet(0, shadowed, t8._1); + } + } + t5.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t6 = _this._async_environment$_nestedForwardedModules; + if (t6 == null) { + _length = t5 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_AsyncCallable); + for (t5 = type$.JSArray_Module_AsyncCallable, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t5); + _this._async_environment$_nestedForwardedModules = _list; + t5 = _list; + } else + t5 = t6; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeysIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeysIterable<1>"))); + } + for (t2 = A._LinkedHashSetIterator$(t2, t2._collection$_modifications, t2.$ti._precomputed1), t5 = _this._async_environment$_variableIndices, t6 = _this._async_environment$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { + t8 = t2._collection$_current; + if (t8 == null) + t8 = t7._as(t8); + t5.remove$1(0, t8); + B.JSArray_methods.get$last(t4).remove$1(0, t8); + B.JSArray_methods.get$last(t6).remove$1(0, t8); + } + for (t2 = A._LinkedHashSetIterator$(t3, t3._collection$_modifications, t3.$ti._precomputed1), t3 = _this._async_environment$_functionIndices, t4 = _this._async_environment$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { + t6 = t2._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + B.JSArray_methods.get$last(t4).remove$1(0, t6); + } + for (t1 = A._LinkedHashSetIterator$(t1, t1._collection$_modifications, t1.$ti._precomputed1), t2 = _this._async_environment$_mixinIndices, t3 = _this._async_environment$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + B.JSArray_methods.get$last(t3).remove$1(0, t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + t1 = _this._async_environment$_variables[t1].$index(0, $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = _0_0; + t1 = _this._async_environment$_variables[_0_0].$index(0, $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment$_variableIndex$1($name); + if (_1_0 != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = _this._async_environment$_variables[_1_0].$index(0, $name); + return t1 == null ? _this._async_environment$_getVariableFromGlobalModule$1($name) : t1; + } else + return _this._async_environment$_getVariableFromGlobalModule$1($name); + } + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _async_environment$_getVariableFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$3($name, "variable", new A.AsyncEnvironment__getVariableFromGlobalModule_closure($name)); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + t1 = _this._async_environment$_variableNodes[t1].$index(0, $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = _0_0; + t1 = _this._async_environment$_variableNodes[_0_0].$index(0, $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment$_variableIndex$1($name); + if (_1_0 != null) { + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = _this._async_environment$_variableNodes[_1_0].$index(0, $name); + return t1 == null ? _this._async_environment$_getVariableNodeFromGlobalModule$1($name) : t1; + } else + return _this._async_environment$_getVariableNodeFromGlobalModule$1($name); + } + }, + _async_environment$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, _0_0; + for (t1 = this._async_environment$_importedModules, t2 = this._async_environment$_globalModules, t2 = new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeysIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeysIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (_0_0 != null) + return _0_0; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._async_environment$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._async_environment$_variables).containsKey$1($name)) + return true; + return this._async_environment$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _async_environment$_variableIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._async_environment$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._async_environment$_variables.length === 1) { + _this._async_environment$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure(_this, $name)); + t1 = _this._async_environment$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._async_environment$_fromOneModule$3($name, "variable", new A.AsyncEnvironment_setVariable_closure0($name)); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + B.JSArray_methods.get$first(t1).$indexSet(0, $name, value); + B.JSArray_methods.get$first(_this._async_environment$_variableNodes).$indexSet(0, $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._async_environment$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._async_environment$_variableIndices.containsKey$1($name) && _this._async_environment$_variableIndex$1($name) == null) + for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._async_environment$_lastVariableName === $name) { + t1 = _this._async_environment$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._async_environment$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure1(_this, $name)); + if (!_this._async_environment$_inSemiGlobalScope && index === 0) { + index = _this._async_environment$_variables.length - 1; + _this._async_environment$_variableIndices.$indexSet(0, $name, index); + } + _this._async_environment$_lastVariableName = $name; + _this._async_environment$_lastVariableIndex = index; + _this._async_environment$_variables[index].$indexSet(0, $name, value); + _this._async_environment$_variableNodes[index].$indexSet(0, $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._async_environment$_variables, + t2 = t1.length; + _this._async_environment$_lastVariableName = $name; + index = _this._async_environment$_lastVariableIndex = t2 - 1; + _this._async_environment$_variableIndices.$indexSet(0, $name, index); + t1[index].$indexSet(0, $name, value); + _this._async_environment$_variableNodes[index].$indexSet(0, $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) { + t1 = _this._async_environment$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._async_environment$_functionIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = _this._async_environment$_functions[_0_0].$index(0, $name); + return t1 == null ? _this._async_environment$_getFunctionFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment$_functionIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = _this._async_environment$_functions[_1_0].$index(0, $name); + return t1 == null ? _this._async_environment$_getFunctionFromGlobalModule$1($name) : t1; + } else + return _this._async_environment$_getFunctionFromGlobalModule$1($name); + } + }, + getFunction$1($name) { + return this.getFunction$2$namespace($name, null); + }, + _async_environment$_getFunctionFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$3($name, "function", new A.AsyncEnvironment__getFunctionFromGlobalModule_closure($name)); + }, + _async_environment$_functionIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._async_environment$_mixinIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = _this._async_environment$_mixins[_0_0].$index(0, $name); + return t1 == null ? _this._async_environment$_getMixinFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment$_mixinIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = _this._async_environment$_mixins[_1_0].$index(0, $name); + return t1 == null ? _this._async_environment$_getMixinFromGlobalModule$1($name) : t1; + } else + return _this._async_environment$_getMixinFromGlobalModule$1($name); + } + }, + _async_environment$_getMixinFromGlobalModule$1($name) { + return this._async_environment$_fromOneModule$3($name, "mixin", new A.AsyncEnvironment__getMixinFromGlobalModule_closure($name)); + }, + _async_environment$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._async_environment$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + return this.withContent$body$AsyncEnvironment($content, callback); + }, + withContent$body$AsyncEnvironment($content, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldContent; + var $async$withContent$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldContent = $async$self._async_environment$_content; + $async$self._async_environment$_content = $content; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$withContent$2); + case 2: + // returning from await. + $async$self._async_environment$_content = oldContent; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$withContent$2, $async$completer); + }, + asMixin$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldInMixin; + var $async$asMixin$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldInMixin = $async$self._async_environment$_inMixin; + $async$self._async_environment$_inMixin = true; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$asMixin$1); + case 2: + // returning from await. + $async$self._async_environment$_inMixin = oldInMixin; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$asMixin$1, $async$completer); + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when, $T) { + return this.scope$body$AsyncEnvironment(callback, semiGlobal, when, $T, $T); + }, + scope$1$1(callback, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, true, $T); + }, + scope$1$2$when(callback, when, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, when, $T); + }, + scope$1$2$semiGlobal(callback, semiGlobal, $T) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); + }, + scope$body$AsyncEnvironment(callback, semiGlobal, when, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6; + var $async$scope$1$3$semiGlobal$when = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + semiGlobal = semiGlobal && $async$self._async_environment$_inSemiGlobalScope; + wasInSemiGlobalScope = $async$self._async_environment$_inSemiGlobalScope; + $async$self._async_environment$_inSemiGlobalScope = semiGlobal; + $async$goto = !when ? 3 : 4; + break; + case 3: + // then + $async$handler = 5; + $async$goto = 8; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 8: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 6; + break; + $async$next.push(7); + // goto finally + $async$goto = 6; + break; + case 5: + // uncaught + $async$next = [2]; + case 6: + // finally + $async$handler = 2; + $async$self._async_environment$_inSemiGlobalScope = wasInSemiGlobalScope; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 7: + // after finally + case 4: + // join + t1 = $async$self._async_environment$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value)); + t3 = $async$self._async_environment$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode)); + t4 = $async$self._async_environment$_functions; + t5 = type$.AsyncCallable; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = $async$self._async_environment$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = $async$self._async_environment$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_AsyncCallable)); + $async$handler = 9; + $async$goto = 12; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 12: + // returning from await. + t2 = $async$result; + $async$returnValue = t2; + $async$next = [1]; + // goto finally + $async$goto = 10; + break; + $async$next.push(11); + // goto finally + $async$goto = 10; + break; + case 9: + // uncaught + $async$next = [2]; + case 10: + // finally + $async$handler = 2; + $async$self._async_environment$_inSemiGlobalScope = wasInSemiGlobalScope; + $async$self._async_environment$_lastVariableIndex = $async$self._async_environment$_lastVariableName = null; + for (t1 = B.JSArray_methods.removeLast$0(t1), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = $async$self._async_environment$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = B.JSArray_methods.removeLast$0(t4), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = $async$self._async_environment$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = B.JSArray_methods.removeLast$0(t6), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = $async$self._async_environment$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = $async$self._async_environment$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 11: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$scope$1$3$semiGlobal$when, $async$completer); + }, + toImplicitConfiguration$0() { + var t2, t3, t4, t5, t6, i, modules, t7, t8, t9, t10, $name, value, values, nodes, _this = this, _null = null, + t1 = type$.String, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue); + for (t2 = _this._async_environment$_variables, t3 = type$.Value, t4 = _this._async_environment$_variableNodes, t5 = _this._async_environment$_importedModules, t6 = A._instanceType(t5)._eval$1("LinkedHashMapKeysIterable<1>"), i = 0; i < t2.length; ++i) { + if (i === 0) + modules = new A.LinkedHashMapKeysIterable(t5, t6); + else { + t7 = _this._async_environment$_nestedForwardedModules; + modules = t7 == null ? _null : t7[i - 1]; + } + t7 = J.get$iterator$ax(modules == null ? B.List_empty15 : modules); + while (t7.moveNext$0()) { + t8 = t7.get$current(t7); + for (t9 = A.MapExtensions_get_pairs(t8.get$variables(), t1, t3), t9 = t9.get$iterator(t9); t9.moveNext$0();) { + t10 = t9.get$current(t9); + $name = t10._0; + value = t10._1; + t10 = t8.get$variableNodes().$index(0, $name); + t10.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue(value, _null, t10)); + } + } + values = t2[i]; + nodes = t4[i]; + for (t7 = A.MapExtensions_get_pairs(values, t1, t3), t7 = t7.get$iterator(t7); t7.moveNext$0();) { + t8 = t7.get$current(t7); + $name = t8._0; + value = t8._1; + t8 = nodes.$index(0, $name); + t8.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue(value, _null, t8)); + } + } + return new A.Configuration(configuration, _null); + }, + toModule$3(css, preModuleComments, extensionStore) { + return A._EnvironmentModule__EnvironmentModule0(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen(this._async_environment$_forwardedModules, new A.AsyncEnvironment_toModule_closure())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule0(this, new A.CssStylesheet(new A.UnmodifiableListView(B.List_empty3, type$.UnmodifiableListView_CssNode), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty7, B.C_EmptyExtensionStore, A.NullableExtension_andThen(this._async_environment$_forwardedModules, new A.AsyncEnvironment_toDummyModule_closure())); + }, + _async_environment$_getModule$1(namespace) { + var _0_0 = this._async_environment$_modules.$index(0, namespace); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$('There is no module with the namespace "' + namespace + '".', null)); + }, + _async_environment$_fromOneModule$1$3($name, type, callback) { + var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, + _0_0 = this._async_environment$_nestedForwardedModules; + if (_0_0 != null) + for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (_1_0 != null) + return _1_0; + } + } + for (t1 = this._async_environment$_importedModules, t1 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first); t1.moveNext$0();) { + _2_0 = callback.call$1(t1.__js_helper$_current); + if (_2_0 != null) + return _2_0; + } + for (t1 = this._async_environment$_globalModules, t2 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first), t3 = type$.AsyncCallable, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t3 = A.MapExtensions_get_pairs(t1, type$.Module_AsyncCallable, type$.AstNode), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { + t1 = t3.get$current(t3); + module = t1._0; + node = t1._1; + if (callback.call$1(module) != null) + t2.$indexSet(0, node.get$span(node), t4); + } + throw A.wrapException(A.MultiSpanSassScriptException$("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + }, + _async_environment$_fromOneModule$3($name, type, callback) { + return this._async_environment$_fromOneModule$1$3($name, type, callback, type$.dynamic); + } + }; + A.AsyncEnvironment__getVariableFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 401 + }; + A.AsyncEnvironment_setVariable_closure.prototype = { + call$0() { + var t1 = this.$this; + t1._async_environment$_lastVariableName = this.name; + return t1._async_environment$_lastVariableIndex = 0; + }, + $signature: 10 + }; + A.AsyncEnvironment_setVariable_closure0.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 403 + }; + A.AsyncEnvironment_setVariable_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._async_environment$_variableIndex$1(this.name); + return t2 == null ? t1._async_environment$_variables.length - 1 : t2; + }, + $signature: 10 + }; + A.AsyncEnvironment__getFunctionFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 173 + }; + A.AsyncEnvironment__getMixinFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 173 + }; + A.AsyncEnvironment_toModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable); + }, + $signature: 174 + }; + A.AsyncEnvironment_toDummyModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable); + }, + $signature: 174 + }; + A._EnvironmentModule0.prototype = { + get$url(_) { + var t1 = this.css; + t1 = t1.get$span(t1); + return t1.get$sourceUrl(t1); + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + _0_0 = this._async_environment$_modulesByVariable.$index(0, $name); + if (_0_0 != null) { + _0_0.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._async_environment$_environment; + t2 = t1._async_environment$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + B.JSArray_methods.get$first(t2).$indexSet(0, $name, value); + B.JSArray_methods.get$first(t1._async_environment$_variableNodes).$indexSet(0, $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._async_environment$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + couldHaveBeenConfigured$1(variables) { + var t2, t3, _0_0, variable, module, + t1 = this._async_environment$_environment._async_environment$_configurableVariables; + if (!(variables.get$length(variables) < t1.get$length(t1) ? variables.any$1(0, t1.get$contains(t1)) : t1.any$1(0, variables.get$contains(variables)))) { + t1 = this._async_environment$_modulesByVariable; + t2 = type$.Module_AsyncCallable; + if (variables.get$length(variables) < t1.get$length(t1)) { + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + for (t3 = variables.get$iterator(variables); t3.moveNext$0();) { + _0_0 = t1.$index(0, t3.get$current(t3)); + if (_0_0 != null) + t2.add$1(0, _0_0); + } + t1 = t2; + } else { + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + for (t1 = A.MapExtensions_get_pairs(t1, type$.String, t2), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + variable = t2._0; + module = t2._1; + if (variables.contains$1(0, variable)) + t3.add$1(0, module); + } + t1 = t3; + } + t1 = t1.any$1(0, new A._EnvironmentModule_couldHaveBeenConfigured_closure0(variables)); + } else + t1 = true; + return t1; + }, + cloneCss$0() { + var _0_0, _this = this; + if (!_this.transitivelyContainsCss) + return _this; + _0_0 = A.cloneCssStylesheet(_this.css, _this.extensionStore); + return A._EnvironmentModule$_0(_this._async_environment$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._async_environment$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css, + t2 = t1.get$span(t1); + if (t2.get$sourceUrl(t2) == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = t1.get$sourceUrl(t1); + t2 = $.$get$context(); + t1.toString; + t1 = t2.prettyUri$1(t1); + } + return t1; + }, + $isModule0: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$preModuleComments() { + return this.preModuleComments; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure5.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 425 + }; + A._EnvironmentModule__EnvironmentModule_closure6.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 695 + }; + A._EnvironmentModule__EnvironmentModule_closure7.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 180 + }; + A._EnvironmentModule__EnvironmentModule_closure8.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 180 + }; + A._EnvironmentModule__EnvironmentModule_closure9.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 102 + }; + A._EnvironmentModule__EnvironmentModule_closure10.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 102 + }; + A._EnvironmentModule_couldHaveBeenConfigured_closure0.prototype = { + call$1(module) { + return module.couldHaveBeenConfigured$1(this.variables); + }, + $signature: 102 + }; + A.AsyncImportCache.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + return this.canonicalize$body$AsyncImportCache(0, url, baseImporter, baseUrl, forImport); + }, + canonicalize$body$AsyncImportCache(_, url, baseImporter, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), + $async$returnValue, $async$self = this, t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j; + var $async$canonicalize$4$baseImporter$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (A.isBrowser()) + t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter) && $async$self._async_import_cache$_importers.length === 0; + else + t1 = false; + if (t1) + throw A.wrapException(string$.Customi); + $async$goto = baseImporter != null && url.get$scheme() === "" ? 3 : 4; + break; + case 3: + // then + resolvedUrl = baseUrl == null ? null : baseUrl.resolveUri$1(url); + if (resolvedUrl == null) + resolvedUrl = url; + key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); + $async$goto = 5; + return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_perImporterCanonicalizeCache, key, new A.AsyncImportCache_canonicalize_closure($async$self, baseImporter, resolvedUrl, baseUrl, forImport, key, url), type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport, type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 5: + // returning from await. + relativeResult = $async$result; + if (relativeResult != null) { + $async$returnValue = relativeResult; + // goto return + $async$goto = 1; + break; + } + case 4: + // join + key = new A._Record_2_forImport(url, forImport); + t1 = $async$self._async_import_cache$_canonicalizeCache; + if (t1.containsKey$1(key)) { + $async$returnValue = t1.$index(0, key); + // goto return + $async$goto = 1; + break; + } + t2 = $async$self._async_import_cache$_importers, t3 = type$.Record_1_nullable_Object, t4 = $async$self._async_import_cache$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl, t6 = type$.Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl, cacheable = true, i = 0; + case 6: + // for condition + if (!(i < t2.length)) { + // goto after for + $async$goto = 8; + break; + } + importer = t2[i]; + perImporterKey = new A._Record_3_forImport(importer, url, forImport); + if (t4.containsKey$1(perImporterKey)) { + t7 = t4.$index(0, perImporterKey); + _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); + } else + _1_0 = null; + _1_2_isSet = t3._is(_1_0); + result = null; + if (_1_2_isSet) { + _1_2 = _1_0._0; + t7 = _1_2 != null; + if (t7) { + t6._as(_1_2); + result = _1_2; + } + } else { + _1_2 = null; + t7 = false; + } + if (t7) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (_1_2_isSet) + t7 = _1_2 == null; + else + t7 = false; + if (t7) { + // goto for update + $async$goto = 7; + break; + } + $async$goto = 10; + return A._asyncAwait($async$self._async_import_cache$_canonicalize$4(importer, url, baseUrl, forImport), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 10: + // returning from await. + _2_0 = $async$result; + _2_1 = _2_0._0; + _2_5_isSet = _2_1 != null; + _2_5 = null; + _2_3 = null; + t7 = false; + if (_2_5_isSet) { + result = _2_1 == null ? t6._as(_2_1) : _2_1; + _2_3 = _2_0._1; + t7 = _2_3; + _2_5 = t7; + t7 = t7 && cacheable; + } else + result = null; + if (t7) { + t1.$indexSet(0, key, result); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (_2_5_isSet) { + t7 = _2_5; + _2_3_isSet = _2_5_isSet; + } else { + _2_3 = _2_0._1; + t7 = _2_3; + _2_3_isSet = true; + } + t7 = t7 && !cacheable; + if (t7) { + t4.$indexSet(0, perImporterKey, _2_1); + if (_2_1 != null) { + $async$returnValue = _2_1; + // goto return + $async$goto = 1; + break; + } + // goto break $label0$1 + $async$goto = 9; + break; + } + t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); + if (t7) { + if (cacheable) { + for (j = 0; j < i; ++j) + t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), null); + cacheable = false; + } + if (_2_1 != null) { + $async$returnValue = _2_1; + // goto return + $async$goto = 1; + break; + } + } + case 9: + // break $label0$1 + case 7: + // for update + ++i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + if (cacheable) + t1.$indexSet(0, key, null); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$4$baseImporter$baseUrl$forImport, $async$completer); + }, + _async_import_cache$_canonicalize$4(importer, url, baseUrl, forImport) { + return this._canonicalize$body$AsyncImportCache(importer, url, baseUrl, forImport); + }, + _canonicalize$body$AsyncImportCache(importer, url, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool), + $async$returnValue, t1, passContainingUrl, canonicalizeContext, result, cacheable; + var $async$_async_import_cache$_canonicalize$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = baseUrl != null ? 3 : 5; + break; + case 3: + // then + $async$goto = url.get$scheme() !== "" ? 6 : 8; + break; + case 6: + // then + t1 = A._Future$value(importer.isNonCanonicalScheme$1(url.get$scheme()), type$.bool); + $async$goto = 9; + return A._asyncAwait(t1, $async$_async_import_cache$_canonicalize$4); + case 9: + // returning from await. + t1 = $async$result; + passContainingUrl = t1; + // goto join + $async$goto = 7; + break; + case 8: + // else + passContainingUrl = true; + case 7: + // join + // goto join + $async$goto = 4; + break; + case 5: + // else + passContainingUrl = false; + case 4: + // join + canonicalizeContext = new A.CanonicalizeContext(forImport, passContainingUrl ? baseUrl : null); + t1 = type$.nullable_Object; + t1 = A.runZoned(new A.AsyncImportCache__canonicalize_closure(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.FutureOr_nullable_Uri); + $async$goto = 10; + return A._asyncAwait(type$.Future_nullable_Uri._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Uri), $async$_async_import_cache$_canonicalize$4); + case 10: + // returning from await. + result = $async$result; + cacheable = !passContainingUrl || !canonicalizeContext._wasContainingUrlAccessed; + if (result == null) { + $async$returnValue = new A._Record_2(null, cacheable); + // goto return + $async$goto = 1; + break; + } + $async$goto = result.get$scheme() !== "" ? 11 : 13; + break; + case 11: + // then + t1 = A._Future$value(importer.isNonCanonicalScheme$1(result.get$scheme()), type$.bool); + $async$goto = 14; + return A._asyncAwait(t1, $async$_async_import_cache$_canonicalize$4); + case 14: + // returning from await. + t1 = $async$result; + // goto join + $async$goto = 12; + break; + case 13: + // else + t1 = false; + case 12: + // join + if (t1) + throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); + $async$returnValue = new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_import_cache$_canonicalize$4, $async$completer); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$body$AsyncImportCache(importer, canonicalUrl, originalUrl); + }, + importCanonical$body$AsyncImportCache(importer, canonicalUrl, originalUrl) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet), + $async$returnValue, $async$self = this; + var $async$importCanonical$3$originalUrl = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(A.putIfAbsentAsync($async$self._async_import_cache$_importCache, canonicalUrl, new A.AsyncImportCache_importCanonical_closure($async$self, importer, canonicalUrl, originalUrl), type$.Uri, type$.nullable_Stylesheet), $async$importCanonical$3$originalUrl); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$importCanonical$3$originalUrl, $async$completer); + }, + humanize$1(canonicalUrl) { + var t1 = this._async_import_cache$_canonicalizeCache, + t2 = type$.NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl; + t2 = A.NullableExtension_andThen(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(new A.LinkedHashMapValuesIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapValuesIterable<2>")), t2), new A.AsyncImportCache_humanize_closure(canonicalUrl), t2._eval$1("WhereIterable")), new A.AsyncImportCache_humanize_closure0(), t2._eval$1("MappedIterable")), new A.AsyncImportCache_humanize_closure1()), new A.AsyncImportCache_humanize_closure2(canonicalUrl)); + return t2 == null ? canonicalUrl : t2; + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._async_import_cache$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(0); + return t1 == null ? canonicalUrl : t1; + } + }; + A.AsyncImportCache_canonicalize_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl), + $async$returnValue, $async$self = this, t1, t2, _0_0, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.baseUrl; + $async$goto = 3; + return A._asyncAwait(t1._async_import_cache$_canonicalize$4($async$self.baseImporter, $async$self.resolvedUrl, t2, $async$self.forImport), $async$call$0); + case 3: + // returning from await. + _0_0 = $async$result; + result = _0_0._0; + _0_0._1; + if (t2 != null) + t1._async_import_cache$_nonCanonicalRelativeUrls.$indexSet(0, $async$self.key, $async$self.url); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 469 + }; + A.AsyncImportCache__canonicalize_closure.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 182 + }; + A.AsyncImportCache_importCanonical_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet), + $async$returnValue, $async$self = this, t1, t2, t3, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = Date.now(); + t2 = $async$self.canonicalUrl; + t3 = A._Future$value($async$self.importer.load$1(0, t2), type$.nullable_ImporterResult); + $async$goto = 3; + return A._asyncAwait(t3, $async$call$0); + case 3: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t3 = $async$self.$this; + t3._async_import_cache$_loadTimes.$indexSet(0, t2, new A.DateTime(t1, 0, false)); + t3._async_import_cache$_resultsCache.$indexSet(0, t2, result); + t3 = result.contents; + t1 = result.syntax; + t2 = $async$self.originalUrl.resolveUri$1(t2); + $async$returnValue = A.Stylesheet_Stylesheet$parse(t3, t1, false, t2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 494 + }; + A.AsyncImportCache_humanize_closure.prototype = { + call$1(result) { + return result._1.$eq(0, this.canonicalUrl); + }, + $signature: 516 + }; + A.AsyncImportCache_humanize_closure0.prototype = { + call$1(result) { + return result._2; + }, + $signature: 518 + }; + A.AsyncImportCache_humanize_closure1.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 107 + }; + A.AsyncImportCache_humanize_closure2.prototype = { + call$1(url) { + var t1 = $.$get$url(), + t2 = this.canonicalUrl; + return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); + }, + $signature: 49 + }; + A.AsyncBuiltInCallable.prototype = { + callbackFor$2(positional, names) { + return new A._Record_2(this._parameters, this._async_built_in$_callback); + }, + withDeprecationWarning$1(module) { + return new A.AsyncBuiltInCallable(this.name, this._parameters, new A.AsyncBuiltInCallable_withDeprecationWarning_closure(this, module, null), false); + }, + $isAsyncCallable: 1, + get$name(receiver) { + return this.name; + }, + get$acceptsContent() { + return this.acceptsContent; + } + }; + A.AsyncBuiltInCallable$mixin_closure.prototype = { + call$1($arguments) { + return this.$call$body$AsyncBuiltInCallable$mixin_closure($arguments); + }, + $call$body$AsyncBuiltInCallable$mixin_closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callback.call$1($arguments); + $async$goto = 3; + return A._asyncAwait(t1 instanceof A._Future ? t1 : A._Future$value(t1, type$.void), $async$call$1); + case 3: + // returning from await. + $async$returnValue = B.C__SassNull; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 190 + }; + A.AsyncBuiltInCallable_withDeprecationWarning_closure.prototype = { + call$1(args) { + var t1 = this.$this; + A.warnForDeprecation(string$.Global + this.module + "." + t1.name + string$.x20inste, B.Deprecation_WW3); + return t1._async_built_in$_callback.call$1(args); + }, + $signature: 587 + }; + A.BuiltInCallable.prototype = { + callbackFor$2(positional, names) { + var t1, t2, fuzzyMatch, minMismatchDistance, _i, overload, t3, mismatchDistance, t4; + for (t1 = this._overloads, t2 = t1.length, fuzzyMatch = null, minMismatchDistance = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + overload = t1[_i]; + t3 = overload._0; + if (t3.matches$2(positional, names)) + return overload; + mismatchDistance = t3.parameters.length - positional; + if (minMismatchDistance != null) { + t3 = Math.abs(mismatchDistance); + t4 = Math.abs(minMismatchDistance); + if (t3 > t4) + continue; + if (t3 === t4 && mismatchDistance < 0) + continue; + } + minMismatchDistance = mismatchDistance; + fuzzyMatch = overload; + } + if (fuzzyMatch != null) + return fuzzyMatch; + throw A.wrapException(A.StateError$("BuiltInCallable " + this.name + " may not have empty overloads.")); + }, + withName$1($name) { + return new A.BuiltInCallable($name, this._overloads, this.acceptsContent); + }, + withDeprecationWarning$2(module, newName) { + var t2, t3, _i, t4, t5, _this = this, + t1 = A._setArrayType([], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value); + for (t2 = _this._overloads, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = {}; + t5 = t2[_i]; + t4.$function = null; + t4.$function = t5._1; + t1.push(new A._Record_2(t5._0, new A.BuiltInCallable_withDeprecationWarning_closure(t4, _this, module, newName))); + } + return new A.BuiltInCallable(_this.name, t1, _this.acceptsContent); + }, + withDeprecationWarning$1(module) { + return this.withDeprecationWarning$2(module, null); + }, + $isCallable0: 1, + $isAsyncCallable: 1, + $isAsyncBuiltInCallable: 1, + get$name(receiver) { + return this.name; + }, + get$acceptsContent() { + return this.acceptsContent; + } + }; + A.BuiltInCallable$mixin_closure.prototype = { + call$1($arguments) { + this.callback.call$1($arguments); + return B.C__SassNull; + }, + $signature: 5 + }; + A.BuiltInCallable_withDeprecationWarning_closure.prototype = { + call$1(args) { + var _this = this, + t1 = _this.newName; + if (t1 == null) + t1 = _this.$this.name; + A.warnForDeprecation(string$.Global + _this.module + "." + t1 + string$.x20inste, B.Deprecation_WW3); + return _this._box_0.$function.call$1(args); + }, + $signature: 5 + }; + A.PlainCssCallable.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlainCssCallable && this.name === other.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + }, + $isCallable0: 1, + $isAsyncCallable: 1, + get$name(receiver) { + return this.name; + } + }; + A.UserDefinedCallable.prototype = { + get$name(_) { + return this.declaration.name; + }, + $isCallable0: 1, + $isAsyncCallable: 1 + }; + A._compileStylesheet_closure.prototype = { + call$1(url) { + var t1; + if (url === "") { + t1 = this.stylesheet.span; + t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); + } else + t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + return t1; + }, + $signature: 6 + }; + A.CompileResult.prototype = {}; + A.Configuration.prototype = { + throughForward$1($forward) { + var _0_0, _1_0, _2_0, t1, hiddenVariables, + newValues = this._configuration$_values; + if (newValues.get$isEmpty(newValues)) + return this; + _0_0 = $forward.prefix; + if (_0_0 != null) + newValues = new A.UnprefixedMapView(newValues, _0_0, type$.UnprefixedMapView_ConfiguredValue); + _1_0 = $forward.shownVariables; + if (_1_0 != null) + newValues = new A.LimitedMapView(newValues, _1_0._base.intersection$1(new A.MapKeySet(newValues, type$.MapKeySet_nullable_Object)), type$.LimitedMapView_String_ConfiguredValue); + else { + _2_0 = $forward.hiddenVariables; + if (_2_0 != null) { + t1 = _2_0._base.get$isNotEmpty(0); + hiddenVariables = _2_0; + } else { + hiddenVariables = null; + t1 = false; + } + if (t1) + newValues = A.LimitedMapView$blocklist(newValues, hiddenVariables, type$.String, type$.ConfiguredValue); + } + return this._withValues$1(newValues); + }, + _withValues$1(values) { + var t1 = this.__originalConfiguration; + return new A.Configuration(values, t1 == null ? this : t1); + }, + toString$0(_) { + var t2, t3, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(this._configuration$_values, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push("$" + t3._0 + ": " + t3._1.toString$0(0)); + } + return "(" + B.JSArray_methods.join$1(t1, ",") + ")"; + } + }; + A.ExplicitConfiguration.prototype = { + _withValues$1(values) { + var t1 = this.__originalConfiguration; + if (t1 == null) + t1 = this; + return new A.ExplicitConfiguration(this.nodeWithSpan, values, t1); + } + }; + A.ConfiguredValue.prototype = { + toString$0(_) { + return this.value.toString$0(0); + } + }; + A.Deprecation.prototype = { + _enumToString$0() { + return "Deprecation." + this._name; + }, + toString$0(_) { + return this.id; + } + }; + A.Deprecation_fromId_closure.prototype = { + call$1(deprecation) { + return deprecation.id === this.id; + }, + $signature: 668 + }; + A.Environment.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._forwardedModules, + t2 = _this._nestedForwardedModules, + t3 = _this._variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.Environment$_(_this._environment$_modules, _this._namespaceNodes, _this._globalModules, _this._importedModules, t1, t2, _this._allModules, t3, t4, t5, t6, _this._content, B.Set_empty1); + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); + view = A.ForwardedModuleView_ifNecessary(module, rule, type$.Callable); + for (t1 = new A.LinkedHashMapKeyIterator(forwardedModules, forwardedModules._modifications, forwardedModules._first); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, t3, t4, $name, small, large, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = type$.String, t2 = A.MapExtensions_get_pairs(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { + t4 = t2.get$current(t2); + $name = t4._0; + small = t4._1; + large = larger.$index(0, $name); + if (large == null) + continue; + if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) + continue; + if (t3) + $name = "$" + $name; + t2 = this._forwardedModules; + if (t2 == null) + span = null; + else { + t2 = t2.$index(0, oldModule); + span = t2 == null ? null : t2.get$span(t2); + } + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); + if (span != null) + t2.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, t13, _length, _list, _this = this, + forwarded = module._environment$_environment._forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._forwardedModules; + if (forwardedModules != null) { + t1 = type$.Module_Callable; + t2 = type$.AstNode; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._globalModules; t1.moveNext$0();) { + t4 = t1.get$current(t1); + module = t4._0; + node = t4._1; + if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) + t3.$indexSet(0, module, node); + } + forwarded = t3; + } else + forwardedModules = _this._forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.AstNode); + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t3 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t3.moveNext$0();) + for (t4 = t3.__js_helper$_current.get$variables(), t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4); t4.moveNext$0();) + t2.add$1(0, t4.get$current(t4)); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t4.moveNext$0();) { + t5 = t4.__js_helper$_current; + for (t5 = t5.get$functions(t5), t5 = t5.get$keys(t5), t5 = t5.get$iterator(t5); t5.moveNext$0();) + t3.add$1(0, t5.get$current(t5)); + } + t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t4.moveNext$0();) + for (t5 = t4.__js_helper$_current.get$mixins(), t5 = t5.get$keys(t5), t5 = t5.get$iterator(t5); t5.moveNext$0();) + t1.add$1(0, t5.get$current(t5)); + t4 = _this._variables; + t5 = t4.length; + if (t5 === 1) { + for (t5 = _this._importedModules, t6 = type$.Module_Callable, t7 = type$.AstNode, t8 = A.MapExtensions_get_pairs(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.Callable, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { + t11 = t8[_i]; + module = t11._0; + shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); + if (shadowed != null) { + t5.remove$1(0, module); + t12 = shadowed.variables; + t13 = false; + if (t12.get$isEmpty(t12)) { + t12 = shadowed.functions; + if (t12.get$isEmpty(t12)) { + t12 = shadowed.mixins; + if (t12.get$isEmpty(t12)) { + t12 = shadowed._shadowed_view$_inner; + t12 = t12.get$css(t12); + t12 = J.get$isEmpty$asx(t12.get$children(t12)); + } else + t12 = t13; + } else + t12 = t13; + } else + t12 = t13; + if (!t12) + t5.$indexSet(0, shadowed, t11._1); + } + } + for (t6 = A.MapExtensions_get_pairs(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { + t8 = t6[_i]; + module = t8._0; + shadowed = A.ShadowedModuleView_ifNecessary(module, t3, t1, t2, t10); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t9 = shadowed.variables; + t11 = false; + if (t9.get$isEmpty(t9)) { + t9 = shadowed.functions; + if (t9.get$isEmpty(t9)) { + t9 = shadowed.mixins; + if (t9.get$isEmpty(t9)) { + t9 = shadowed._shadowed_view$_inner; + t9 = t9.get$css(t9); + t9 = J.get$isEmpty$asx(t9.get$children(t9)); + } else + t9 = t11; + } else + t9 = t11; + } else + t9 = t11; + if (!t9) + forwardedModules.$indexSet(0, shadowed, t8._1); + } + } + t5.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t6 = _this._nestedForwardedModules; + if (t6 == null) { + _length = t5 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_Callable); + for (t5 = type$.JSArray_Module_Callable, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t5); + _this._nestedForwardedModules = _list; + t5 = _list; + } else + t5 = t6; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeysIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeysIterable<1>"))); + } + for (t2 = A._LinkedHashSetIterator$(t2, t2._collection$_modifications, t2.$ti._precomputed1), t5 = _this._variableIndices, t6 = _this._variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { + t8 = t2._collection$_current; + if (t8 == null) + t8 = t7._as(t8); + t5.remove$1(0, t8); + B.JSArray_methods.get$last(t4).remove$1(0, t8); + B.JSArray_methods.get$last(t6).remove$1(0, t8); + } + for (t2 = A._LinkedHashSetIterator$(t3, t3._collection$_modifications, t3.$ti._precomputed1), t3 = _this._functionIndices, t4 = _this._functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { + t6 = t2._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + B.JSArray_methods.get$last(t4).remove$1(0, t6); + } + for (t1 = A._LinkedHashSetIterator$(t1, t1._collection$_modifications, t1.$ti._precomputed1), t2 = _this._mixinIndices, t3 = _this._mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + B.JSArray_methods.get$last(t3).remove$1(0, t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$variables().$index(0, $name); + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + t1 = _this._variables[t1].$index(0, $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = _0_0; + t1 = _this._variables[_0_0].$index(0, $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._variableIndex$1($name); + if (_1_0 != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = _this._variables[_1_0].$index(0, $name); + return t1 == null ? _this._getVariableFromGlobalModule$1($name) : t1; + } else + return _this._getVariableFromGlobalModule$1($name); + } + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _getVariableFromGlobalModule$1($name) { + return this._fromOneModule$3($name, "variable", new A.Environment__getVariableFromGlobalModule_closure($name)); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + t1 = _this._variableNodes[t1].$index(0, $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = _0_0; + t1 = _this._variableNodes[_0_0].$index(0, $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._variableIndex$1($name); + if (_1_0 != null) { + _this._lastVariableName = $name; + _this._lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = _this._variableNodes[_1_0].$index(0, $name); + return t1 == null ? _this._getVariableNodeFromGlobalModule$1($name) : t1; + } else + return _this._getVariableNodeFromGlobalModule$1($name); + } + }, + _getVariableNodeFromGlobalModule$1($name) { + var t1, t2, _0_0; + for (t1 = this._importedModules, t2 = this._globalModules, t2 = new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeysIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeysIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (_0_0 != null) + return _0_0; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._variables).containsKey$1($name)) + return true; + return this._getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _variableIndex$1($name) { + var t1, i; + for (t1 = this._variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._variables.length === 1) { + _this._variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure(_this, $name)); + t1 = _this._variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._fromOneModule$3($name, "variable", new A.Environment_setVariable_closure0($name)); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + B.JSArray_methods.get$first(t1).$indexSet(0, $name, value); + B.JSArray_methods.get$first(_this._variableNodes).$indexSet(0, $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._nestedForwardedModules; + if (nestedForwardedModules != null && !_this._variableIndices.containsKey$1($name) && _this._variableIndex$1($name) == null) + for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._lastVariableName === $name) { + t1 = _this._lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure1(_this, $name)); + if (!_this._inSemiGlobalScope && index === 0) { + index = _this._variables.length - 1; + _this._variableIndices.$indexSet(0, $name, index); + } + _this._lastVariableName = $name; + _this._lastVariableIndex = index; + _this._variables[index].$indexSet(0, $name, value); + _this._variableNodes[index].$indexSet(0, $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._variables, + t2 = t1.length; + _this._lastVariableName = $name; + index = _this._lastVariableIndex = t2 - 1; + _this._variableIndices.$indexSet(0, $name, index); + t1[index].$indexSet(0, $name, value); + _this._variableNodes[index].$indexSet(0, $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) { + t1 = _this._getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._functionIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = _this._functions[_0_0].$index(0, $name); + return t1 == null ? _this._getFunctionFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._functionIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = _this._functions[_1_0].$index(0, $name); + return t1 == null ? _this._getFunctionFromGlobalModule$1($name) : t1; + } else + return _this._getFunctionFromGlobalModule$1($name); + } + }, + getFunction$1($name) { + return this.getFunction$2$namespace($name, null); + }, + _getFunctionFromGlobalModule$1($name) { + return this._fromOneModule$3($name, "function", new A.Environment__getFunctionFromGlobalModule_closure($name)); + }, + _functionIndex$1($name) { + var t1, i; + for (t1 = this._functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._mixinIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = _this._mixins[_0_0].$index(0, $name); + return t1 == null ? _this._getMixinFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._mixinIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = _this._mixins[_1_0].$index(0, $name); + return t1 == null ? _this._getMixinFromGlobalModule$1($name) : t1; + } else + return _this._getMixinFromGlobalModule$1($name); + } + }, + _getMixinFromGlobalModule$1($name) { + return this._fromOneModule$3($name, "mixin", new A.Environment__getMixinFromGlobalModule_closure($name)); + }, + _mixinIndex$1($name) { + var t1, i; + for (t1 = this._mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + var oldContent = this._content; + this._content = $content; + callback.call$0(); + this._content = oldContent; + }, + asMixin$1(callback) { + var oldInMixin = this._inMixin; + this._inMixin = true; + callback.call$0(); + this._inMixin = oldInMixin; + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when) { + var wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6, _this = this; + semiGlobal = semiGlobal && _this._inSemiGlobalScope; + wasInSemiGlobalScope = _this._inSemiGlobalScope; + _this._inSemiGlobalScope = semiGlobal; + if (!when) + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._inSemiGlobalScope = wasInSemiGlobalScope; + } + t1 = _this._variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value)); + t3 = _this._variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode)); + t4 = _this._functions; + t5 = type$.Callable; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = _this._mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = _this._nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_Callable)); + try { + t2 = callback.call$0(); + return t2; + } finally { + _this._inSemiGlobalScope = wasInSemiGlobalScope; + _this._lastVariableIndex = _this._lastVariableName = null; + for (t1 = B.JSArray_methods.removeLast$0(t1), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = _this._variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = B.JSArray_methods.removeLast$0(t4), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = _this._functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = B.JSArray_methods.removeLast$0(t6), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = _this._mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = _this._nestedForwardedModules; + if (t1 != null) + t1.pop(); + } + }, + scope$1$1(callback) { + return this.scope$1$3$semiGlobal$when(callback, false, true); + }, + scope$1$2$when(callback, when) { + return this.scope$1$3$semiGlobal$when(callback, false, when); + }, + scope$1$2$semiGlobal(callback, semiGlobal) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true); + }, + toImplicitConfiguration$0() { + var t2, t3, t4, t5, t6, i, modules, t7, t8, t9, t10, $name, value, values, nodes, _this = this, _null = null, + t1 = type$.String, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue); + for (t2 = _this._variables, t3 = type$.Value, t4 = _this._variableNodes, t5 = _this._importedModules, t6 = A._instanceType(t5)._eval$1("LinkedHashMapKeysIterable<1>"), i = 0; i < t2.length; ++i) { + if (i === 0) + modules = new A.LinkedHashMapKeysIterable(t5, t6); + else { + t7 = _this._nestedForwardedModules; + modules = t7 == null ? _null : t7[i - 1]; + } + t7 = J.get$iterator$ax(modules == null ? B.List_empty10 : modules); + while (t7.moveNext$0()) { + t8 = t7.get$current(t7); + for (t9 = A.MapExtensions_get_pairs(t8.get$variables(), t1, t3), t9 = t9.get$iterator(t9); t9.moveNext$0();) { + t10 = t9.get$current(t9); + $name = t10._0; + value = t10._1; + t10 = t8.get$variableNodes().$index(0, $name); + t10.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue(value, _null, t10)); + } + } + values = t2[i]; + nodes = t4[i]; + for (t7 = A.MapExtensions_get_pairs(values, t1, t3), t7 = t7.get$iterator(t7); t7.moveNext$0();) { + t8 = t7.get$current(t7); + $name = t8._0; + value = t8._1; + t8 = nodes.$index(0, $name); + t8.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue(value, _null, t8)); + } + } + return new A.Configuration(configuration, _null); + }, + toModule$3(css, preModuleComments, extensionStore) { + return A._EnvironmentModule__EnvironmentModule(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen(this._forwardedModules, new A.Environment_toModule_closure())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule(this, new A.CssStylesheet(new A.UnmodifiableListView(B.List_empty3, type$.UnmodifiableListView_CssNode), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty, B.C_EmptyExtensionStore, A.NullableExtension_andThen(this._forwardedModules, new A.Environment_toDummyModule_closure())); + }, + _getModule$1(namespace) { + var _0_0 = this._environment$_modules.$index(0, namespace); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$('There is no module with the namespace "' + namespace + '".', null)); + }, + _fromOneModule$1$3($name, type, callback) { + var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, + _0_0 = this._nestedForwardedModules; + if (_0_0 != null) + for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (_1_0 != null) + return _1_0; + } + } + for (t1 = this._importedModules, t1 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first); t1.moveNext$0();) { + _2_0 = callback.call$1(t1.__js_helper$_current); + if (_2_0 != null) + return _2_0; + } + for (t1 = this._globalModules, t2 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first), t3 = type$.Callable, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t3 = A.MapExtensions_get_pairs(t1, type$.Module_Callable, type$.AstNode), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { + t1 = t3.get$current(t3); + module = t1._0; + node = t1._1; + if (callback.call$1(module) != null) + t2.$indexSet(0, node.get$span(node), t4); + } + throw A.wrapException(A.MultiSpanSassScriptException$("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + }, + _fromOneModule$3($name, type, callback) { + return this._fromOneModule$1$3($name, type, callback, type$.dynamic); + } + }; + A.Environment__getVariableFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 280 + }; + A.Environment_setVariable_closure.prototype = { + call$0() { + var t1 = this.$this; + t1._lastVariableName = this.name; + return t1._lastVariableIndex = 0; + }, + $signature: 10 + }; + A.Environment_setVariable_closure0.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 289 + }; + A.Environment_setVariable_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._variableIndex$1(this.name); + return t2 == null ? t1._variables.length - 1 : t2; + }, + $signature: 10 + }; + A.Environment__getFunctionFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 198 + }; + A.Environment__getMixinFromGlobalModule_closure.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 198 + }; + A.Environment_toModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable); + }, + $signature: 201 + }; + A.Environment_toDummyModule_closure.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable); + }, + $signature: 201 + }; + A._EnvironmentModule.prototype = { + get$url(_) { + var t1 = this.css; + t1 = t1.get$span(t1); + return t1.get$sourceUrl(t1); + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + _0_0 = this._modulesByVariable.$index(0, $name); + if (_0_0 != null) { + _0_0.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._environment$_environment; + t2 = t1._variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + B.JSArray_methods.get$first(t2).$indexSet(0, $name, value); + B.JSArray_methods.get$first(t1._variableNodes).$indexSet(0, $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + couldHaveBeenConfigured$1(variables) { + var t2, t3, _0_0, variable, module, + t1 = this._environment$_environment._configurableVariables; + if (!(variables.get$length(variables) < t1.get$length(t1) ? variables.any$1(0, t1.get$contains(t1)) : t1.any$1(0, variables.get$contains(variables)))) { + t1 = this._modulesByVariable; + t2 = type$.Module_Callable; + if (variables.get$length(variables) < t1.get$length(t1)) { + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + for (t3 = variables.get$iterator(variables); t3.moveNext$0();) { + _0_0 = t1.$index(0, t3.get$current(t3)); + if (_0_0 != null) + t2.add$1(0, _0_0); + } + t1 = t2; + } else { + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + for (t1 = A.MapExtensions_get_pairs(t1, type$.String, t2), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + variable = t2._0; + module = t2._1; + if (variables.contains$1(0, variable)) + t3.add$1(0, module); + } + t1 = t3; + } + t1 = t1.any$1(0, new A._EnvironmentModule_couldHaveBeenConfigured_closure(variables)); + } else + t1 = true; + return t1; + }, + cloneCss$0() { + var _0_0, _this = this; + if (!_this.transitivelyContainsCss) + return _this; + _0_0 = A.cloneCssStylesheet(_this.css, _this.extensionStore); + return A._EnvironmentModule$_(_this._environment$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css, + t2 = t1.get$span(t1); + if (t2.get$sourceUrl(t2) == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = t1.get$sourceUrl(t1); + t2 = $.$get$context(); + t1.toString; + t1 = t2.prettyUri$1(t1); + } + return t1; + }, + $isModule0: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$preModuleComments() { + return this.preModuleComments; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 306 + }; + A._EnvironmentModule__EnvironmentModule_closure0.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 307 + }; + A._EnvironmentModule__EnvironmentModule_closure1.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 202 + }; + A._EnvironmentModule__EnvironmentModule_closure2.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 202 + }; + A._EnvironmentModule__EnvironmentModule_closure3.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 95 + }; + A._EnvironmentModule__EnvironmentModule_closure4.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 95 + }; + A._EnvironmentModule_couldHaveBeenConfigured_closure.prototype = { + call$1(module) { + return module.couldHaveBeenConfigured$1(this.variables); + }, + $signature: 95 + }; + A.EvaluationContext.prototype = {}; + A._EvaluationContextLogger.prototype = { + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + this._evaluation_context$_context.warn$2(0, message, deprecation); + } + }; + A.SassException.prototype = { + get$trace(_) { + return A.Trace$(A._setArrayType([A.frameForSpan(A.SourceSpanException.prototype.get$span.call(this, 0), "root stylesheet", null)], type$.JSArray_Frame), null); + }, + get$span(_) { + return A.SourceSpanException.prototype.get$span.call(this, 0); + }, + withAdditionalSpan$2(span, label) { + return A.MultiSpanSassException$(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); + }, + withTrace$1(trace) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(this.loadedUrls, type$.Uri); + return new A.SassRuntimeException(trace, t2, this._span_exception$_message, t1); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassException(t2, this._span_exception$_message, t1); + }, + toString$1$color(_, color) { + var t2, _i, frame, _this = this, + buffer = new A.StringBuffer(""), + t1 = "Error: " + _this._span_exception$_message + "\n"; + buffer._contents = t1; + buffer._contents = t1 + A.SourceSpanException.prototype.get$span.call(_this, 0).highlight$1$color(color); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (frame.length === 0) + continue; + buffer._contents = (buffer._contents += "\n") + (" " + frame); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0(_) { + return this.toString$1$color(0, null); + }, + toCssString$0() { + var commentMessage, stringMessage, rune, + t1 = $._glyphs, + t2 = $._glyphs = B.C_AsciiGlyphSet, + t3 = this.toString$1$color(0, false); + t3 = A.stringReplaceAllUnchecked(t3, "*/", "*\u2215"); + commentMessage = A.stringReplaceAllUnchecked(t3, "\r\n", "\n"); + $._glyphs = t1 === B.C_AsciiGlyphSet ? t2 : B.C_UnicodeGlyphSet; + stringMessage = new A.StringBuffer(""); + for (t1 = new A.RuneIterator(A.serializeValue(new A.SassString(this.toString$1$color(0, false), true), true, true)); t1.moveNext$0();) { + rune = t1._currentCodePoint; + if (rune > 127) { + t2 = A.Primitives_stringFromCharCode(92); + stringMessage._contents += t2; + t2 = B.JSInt_methods.toRadixString$1(rune, 16); + stringMessage._contents += t2; + t2 = A.Primitives_stringFromCharCode(32); + stringMessage._contents += t2; + } else { + t2 = A.Primitives_stringFromCharCode(rune); + stringMessage._contents += t2; + } + } + return "/* " + B.JSArray_methods.join$1(A._setArrayType(commentMessage.split("\n"), type$.JSArray_String), "\n * ") + ' */\n\nbody::before {\n font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",\n "Droid Sans Mono", monospace, monospace;\n white-space: pre;\n display: block;\n padding: 1em;\n margin-bottom: 1em;\n border-bottom: 2px solid black;\n content: ' + stringMessage.toString$0(0) + ";\n}"; + } + }; + A.MultiSpanSassException.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); + }, + withTrace$1(trace) { + var _this = this; + return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); + }, + toString$1$color(_, color) { + var t1, t2, _i, frame, _this = this, + useColor = color === true, + buffer = new A.StringBuffer("Error: " + _this._span_exception$_message + "\n"); + A.NullableExtension_andThen(A.Highlighter$multiple(A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, useColor, null, null).highlight$0(), buffer.get$write(buffer)); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (frame.length === 0) + continue; + buffer._contents = (buffer._contents += "\n") + (" " + frame); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0(_) { + return this.toString$1$color(0, null); + }, + get$primaryLabel() { + return this.primaryLabel; + }, + get$secondarySpans() { + return this.secondarySpans; + } + }; + A.SassRuntimeException.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this; + return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), _this.trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassRuntimeException(this.trace, t2, this._span_exception$_message, t1); + }, + get$trace(receiver) { + return this.trace; + } + }; + A.MultiSpanSassRuntimeException.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassRuntimeException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, _this.trace, loadedUrls); + }, + $isSassRuntimeException: 1, + get$trace(receiver) { + return this.trace; + } + }; + A.SassFormatException.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + withAdditionalSpan$2(span, label) { + return A.MultiSpanSassFormatException$(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassFormatException(t2, this._span_exception$_message, t1); + }, + $isFormatException: 1, + $isSourceSpanFormatException: 1 + }; + A.MultiSpanSassFormatException.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassFormatException$(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassFormatException$(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); + }, + $isFormatException: 1, + $isSassFormatException: 1, + $isSourceSpanFormatException: 1, + $isMultiSourceSpanFormatException: 1 + }; + A.SassScriptException.prototype = { + withSpan$1(span) { + return new A.SassException(B.Set_empty, this.message, span); + }, + toString$0(_) { + return this.message + string$.x0a_BUG_; + }, + get$message(receiver) { + return this.message; + } + }; + A.MultiSpanSassScriptException.prototype = { + withSpan$1(span) { + return A.MultiSpanSassException$(this.message, span, this.primaryLabel, this.secondarySpans, null); + } + }; + A._writeSourceMap_closure.prototype = { + call$1(url) { + return this.options.sourceMapUrl$2(0, A.Uri_parse(url), this.destination).toString$0(0); + }, + $signature: 6 + }; + A.ExecutableOptions.prototype = { + get$interactive() { + var result, _this = this, + value = _this.__ExecutableOptions_interactive_FI; + if (value === $) { + result = new A.ExecutableOptions_interactive_closure(_this).call$0(); + _this.__ExecutableOptions_interactive_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__ExecutableOptions_interactive_FI = result; + value = result; + } + return value; + }, + get$color() { + var t1 = this._options; + if (t1.wasParsed$1("color")) + t1 = A._asBool(t1.$index(0, "color")); + else + t1 = A.hasTerminal() || A.isBrowser(); + return t1; + }, + get$pkgImporters() { + var t2, t3, t4, _null = null, + t1 = A._setArrayType([], type$.JSArray_Importer); + for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "pkg-importer"))); t2.moveNext$0();) { + t2.get$current(t2); + t3 = new A.NodePackageImporter(); + t4 = self.process; + if (t4 == null) + t4 = _null; + else { + t4 = J.get$release$x(t4); + t4 = t4 == null ? _null : J.get$name$x(t4); + } + if (!J.$eq$(t4, "node") && self.document != null && typeof self.document.querySelector == "function") + A.throwExpression(string$.The_No); + t3.__NodePackageImporter__entryPointDirectory_F = $.$get$context().absolute$15(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + t1.push(t3); + } + return t1; + }, + get$emitErrorCss() { + var t1 = A._asBoolQ(this._options.$index(0, "error-css")); + if (t1 == null) { + this._ensureSources$0(); + t1 = this._sourcesToDestinations; + t1 = t1.get$values(t1); + t1 = t1.any$1(t1, new A.ExecutableOptions_emitErrorCss_closure()); + } + return t1; + }, + _ensureSources$0() { + var t1, stdin, t2, t3, $directories, t4, t5, t6, colonArgs, positionalArgs, t7, t8, t9, message, target, source, destination, seen, _0_0, _this = this, _null = null, + _s18_ = 'Duplicate source "'; + if (_this._sourcesToDestinations != null) + return; + t1 = _this._options; + stdin = A._asBool(t1.$index(0, "stdin")); + t2 = t1.rest; + if (t2.get$length(0) === 0 && !stdin) + A.ExecutableOptions__fail("Compile Sass to CSS."); + t3 = type$.String; + $directories = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (t4 = t2.$ti, t5 = t4._eval$1("ListIterator"), t6 = new A.ListIterator(t2, t2.get$length(0), t5), t4 = t4._eval$1("ListBase.E"), colonArgs = false, positionalArgs = false; t6.moveNext$0();) { + t7 = t6.__internal$_current; + if (t7 == null) + t7 = t4._as(t7); + t8 = t7.length; + if (t8 === 0) + A.ExecutableOptions__fail('Invalid argument "".'); + if (A.stringContainsUnchecked(t7, ":", 0)) { + if (t8 > 2) { + t9 = t7.charCodeAt(0); + if (!(t9 >= 97 && t9 <= 122)) + t9 = t9 >= 65 && t9 <= 90; + else + t9 = true; + t9 = t9 && t7.charCodeAt(1) === 58; + } else + t9 = false; + if (t9) { + if (2 > t8) + A.throwExpression(A.RangeError$range(2, 0, t8, _null, _null)); + t8 = A.stringContainsUnchecked(t7, ":", 2); + } else + t8 = true; + } else + t8 = false; + if (t8) + colonArgs = true; + else if (A.dirExists(t7)) + $directories.add$1(0, t7); + else + positionalArgs = true; + } + if (positionalArgs || t2.get$length(0) === 0) { + if (colonArgs) + A.ExecutableOptions__fail('Positional and ":" arguments may not both be used.'); + else if (stdin) { + if (J.get$length$asx(t2._collection$_source) > 1) + A.ExecutableOptions__fail("Only one argument is allowed with --stdin."); + else if (A._asBool(t1.$index(0, "update"))) + A.ExecutableOptions__fail("--update is not allowed with --stdin."); + else if (A._asBool(t1.$index(0, "watch"))) + A.ExecutableOptions__fail("--watch is not allowed with --stdin."); + t1 = t2.get$length(0) === 0 ? _null : t2.get$first(t2); + t2 = type$.dynamic; + t3 = type$.nullable_String; + _this._sourcesToDestinations = A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([null, t1], t2, t2), t3, t3); + } else { + t3 = t2._collection$_source; + t4 = J.getInterceptor$asx(t3); + if (t4.get$length(t3) > 2) + A.ExecutableOptions__fail("Only two positional args may be passed."); + else if ($directories._collection$_length !== 0) { + message = 'Directory "' + $directories.get$first(0) + '" may not be a positional arg.'; + target = t2.get$last(t2); + A.ExecutableOptions__fail($directories.get$first(0) === t2.get$first(t2) && !A.fileExists(target) ? message + ('\nTo compile all CSS in "' + $directories.get$first(0) + '" to "' + target + '", use `sass ' + $directories.get$first(0) + ":" + target + "`.") : message); + } else { + source = t2.get$first(t2) === "-" ? _null : t2.get$first(t2); + destination = t4.get$length(t3) === 1 ? _null : t2.get$last(t2); + if (destination == null) + if (A._asBool(t1.$index(0, "update"))) + A.ExecutableOptions__fail("--update is not allowed when printing to stdout."); + else if (A._asBool(t1.$index(0, "watch"))) + A.ExecutableOptions__fail("--watch is not allowed when printing to stdout."); + t1 = A.PathMap__create(_null, type$.nullable_String); + t1.$indexSet(0, source, destination); + _this._sourcesToDestinations = new A.UnmodifiableMapView(new A.PathMap(t1, type$.PathMap_nullable_String), type$.UnmodifiableMapView_of_nullable_String_and_nullable_String); + } + } + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F !== $ && A.throwUnnamedLateFieldAI(); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F = B.Map_empty9; + return; + } + if (stdin) + A.ExecutableOptions__fail('--stdin may not be used with ":" arguments.'); + seen = A.LinkedHashSet_LinkedHashSet$_empty(t3); + t1 = A.PathMap__create(_null, t3); + t6 = type$.PathMap_String; + t3 = A.PathMap__create(_null, t3); + for (t2 = new A.ListIterator(t2, t2.get$length(0), t5); t2.moveNext$0();) { + t5 = t2.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if ($directories.contains$1(0, t5)) { + if (!seen.add$1(0, t5)) + A.ExecutableOptions__fail(_s18_ + t5 + '".'); + t3.$indexSet(0, t5, t5); + t1.addAll$1(0, _this._listSourceDirectory$2(t5, t5)); + continue; + } + _0_0 = _this._splitSourceAndDestination$1(t5); + source = _0_0._0; + destination = _0_0._1; + if (!seen.add$1(0, source)) + A.ExecutableOptions__fail(_s18_ + source + '".'); + if (source === "-") + t1.$indexSet(0, _null, destination); + else if (A.dirExists(source)) { + t3.$indexSet(0, source, destination); + t1.addAll$1(0, _this._listSourceDirectory$2(source, destination)); + } else + t1.$indexSet(0, source, destination); + } + _this._sourcesToDestinations = new A.UnmodifiableMapView(new A.PathMap(t1, t6), type$.UnmodifiableMapView_of_nullable_String_and_nullable_String); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F !== $ && A.throwUnnamedLateFieldAI(); + _this.__ExecutableOptions__sourceDirectoriesToDestinations_F = new A.UnmodifiableMapView(new A.PathMap(t3, t6), type$.UnmodifiableMapView_of_nullable_String_and_String); + }, + _splitSourceAndDestination$1(argument) { + var t1, i, t2, t3, nextColon; + for (t1 = argument.length, i = 0; i < t1; ++i) { + t2 = false; + if (i === 1) { + t3 = i - 1; + if (t1 > t3 + 2) { + t2 = argument.charCodeAt(t3); + if (!(t2 >= 97 && t2 <= 122)) + t2 = t2 >= 65 && t2 <= 90; + else + t2 = true; + t2 = t2 && argument.charCodeAt(t3 + 1) === 58; + } + } + if (t2) + continue; + if (argument.charCodeAt(i) === 58) { + t2 = i + 1; + nextColon = B.JSString_methods.indexOf$2(argument, ":", t2); + t3 = false; + if (nextColon === i + 2) + if (t1 > t2 + 2) { + t1 = argument.charCodeAt(t2); + if (!(t1 >= 97 && t1 <= 122)) + t1 = t1 >= 65 && t1 <= 90; + else + t1 = true; + t1 = t1 && argument.charCodeAt(t2 + 1) === 58; + } else + t1 = t3; + else + t1 = t3; + if ((t1 ? B.JSString_methods.indexOf$2(argument, ":", nextColon + 1) : nextColon) !== -1) + A.ExecutableOptions__fail('"' + argument + '" may only contain one ":".'); + return new A._Record_2(B.JSString_methods.substring$2(argument, 0, i), B.JSString_methods.substring$1(argument, t2)); + } + } + throw A.wrapException(A.ArgumentError$('Expected "' + argument + '" to contain a colon.', null)); + }, + _listSourceDirectory$2(source, destination) { + var t2, t3, t4, t5, + t1 = type$.String; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t2 = J.get$iterator$ax(A.listDir(source, true)), t3 = source === destination; t2.moveNext$0();) { + t4 = t2.get$current(t2); + if (this._isEntrypoint$1(t4)) + t5 = !(t3 && A.ParsedPath_ParsedPath$parse(t4, $.$get$context().style)._splitExtension$1(1)[1] === ".css"); + else + t5 = false; + if (t5) { + t5 = $.$get$context(); + t1.$indexSet(0, t4, A.join(destination, t5.withoutExtension$1(t5.relative$2$from(t4, source)) + ".css", null)); + } + } + return t1; + }, + _isEntrypoint$1(path) { + var extension, + t1 = $.$get$context().style; + if (B.JSString_methods.startsWith$1(A.ParsedPath_ParsedPath$parse(path, t1).get$basename(), "_")) + return false; + extension = A.ParsedPath_ParsedPath$parse(path, t1)._splitExtension$1(1)[1]; + return extension === ".scss" || extension === ".sass" || extension === ".css"; + }, + get$_writeToStdout() { + var t1, _this = this; + _this._ensureSources$0(); + t1 = _this._sourcesToDestinations; + if (t1.get$length(t1) === 1) { + _this._ensureSources$0(); + t1 = _this._sourcesToDestinations; + t1 = t1.get$values(t1); + t1 = t1.get$single(t1) == null; + } else + t1 = false; + return t1; + }, + get$emitSourceMap() { + var _this = this, + _s10_ = "source-map", + _s15_ = "source-map-urls", + _s13_ = "embed-sources", + _s16_ = "embed-source-map", + t1 = _this._options; + if (!A._asBool(t1.$index(0, _s10_))) + if (t1.wasParsed$1(_s15_)) + A.ExecutableOptions__fail("--source-map-urls isn't allowed with --no-source-map."); + else if (t1.wasParsed$1(_s13_)) + A.ExecutableOptions__fail("--embed-sources isn't allowed with --no-source-map."); + else if (t1.wasParsed$1(_s16_)) + A.ExecutableOptions__fail("--embed-source-map isn't allowed with --no-source-map."); + if (!_this.get$_writeToStdout()) + return A._asBool(t1.$index(0, _s10_)); + if (J.$eq$(_this._ifParsed$1(_s15_), "relative")) + A.ExecutableOptions__fail("--source-map-urls=relative isn't allowed when printing to stdout."); + if (A._asBool(t1.$index(0, _s16_))) + return A._asBool(t1.$index(0, _s10_)); + else if (J.$eq$(_this._ifParsed$1(_s10_), true)) + A.ExecutableOptions__fail("When printing to stdout, --source-map requires --embed-source-map."); + else if (t1.wasParsed$1(_s15_)) + A.ExecutableOptions__fail("When printing to stdout, --source-map-urls requires --embed-source-map."); + else if (A._asBool(t1.$index(0, _s13_))) + A.ExecutableOptions__fail("When printing to stdout, --embed-sources requires --embed-source-map."); + else + return false; + }, + sourceMapUrl$2(_, url, destination) { + var t1, path, t2, _null = null; + if (url.get$scheme().length !== 0 && url.get$scheme() !== "file") + return url; + t1 = $.$get$context(); + path = t1.style.pathFromUri$1(A._parseUri(url)); + if (J.$eq$(this._options.$index(0, "source-map-urls"), "relative") && !this.get$_writeToStdout()) { + destination.toString; + t2 = t1.relative$2$from(path, t1.dirname$1(destination)); + } else + t2 = A.absolute(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + return t1.toUri$1(t2); + }, + get$silenceDeprecations(_) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); + for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "silence-deprecation"))); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4 = A.Deprecation_fromId(t3); + t1.add$1(0, t4 == null ? A.ExecutableOptions__fail('Invalid deprecation "' + t3 + '".') : t4); + } + return t1; + }, + get$fatalDeprecations(_) { + var t1 = this._fatalDeprecations; + return t1 == null ? this._fatalDeprecations = new A.ExecutableOptions_fatalDeprecations_closure(this).call$0() : t1; + }, + get$futureDeprecations(_) { + var t2, t3, t4, + t1 = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); + for (t2 = J.get$iterator$ax(type$.List_String._as(this._options.$index(0, "future-deprecation"))); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4 = A.Deprecation_fromId(t3); + t1.add$1(0, t4 == null ? A.ExecutableOptions__fail('Invalid deprecation "' + t3 + '".') : t4); + } + return t1; + }, + _ifParsed$1($name) { + var t1 = this._options; + return t1.wasParsed$1($name) ? t1.$index(0, $name) : null; + } + }; + A.ExecutableOptions__parser_closure.prototype = { + call$0() { + var t1 = type$.String, + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Option), + t3 = A._setArrayType([], type$.JSArray_Object), + parser = new A.ArgParser(t2, A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), new A.UnmodifiableMapView(t2, type$.UnmodifiableMapView_String_Option), new A.UnmodifiableMapView(A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ArgParser), type$.UnmodifiableMapView_String_ArgParser), t3, true, null); + parser.addOption$2$hide("precision", true); + parser.addFlag$2$hide("async", true); + t3.push(A.ExecutableOptions__separator("Input and Output")); + parser.addFlag$2$help("stdin", "Read the stylesheet from stdin."); + parser.addFlag$2$help("indented", "Use the indented syntax for input from stdin."); + parser.addMultiOption$5$abbr$help$splitCommas$valueHelp("load-path", "I", "A path to use when resolving imports.\nMay be passed multiple times.", false, "PATH"); + t2 = type$.JSArray_String; + parser.addMultiOption$6$abbr$allowed$allowedHelp$help$valueHelp("pkg-importer", "p", A._setArrayType(["node"], t2), A.LinkedHashMap_LinkedHashMap$_literal(["node", "Load files like Node.js package resolution."], t1, t1), "Built-in importer(s) to use for pkg: URLs.", "TYPE"); + parser.addOption$6$abbr$allowed$defaultsTo$help$valueHelp("style", "s", A._setArrayType(["expanded", "compressed"], t2), "expanded", "Output style.", "NAME"); + parser.addFlag$3$defaultsTo$help("charset", true, "Emit a @charset or BOM for CSS with non-ASCII characters."); + parser.addFlag$3$defaultsTo$help("error-css", null, "When an error occurs, emit a stylesheet describing it.\nDefaults to true when compiling to a file."); + parser.addFlag$3$help$negatable("update", "Only compile out-of-date stylesheets.", false); + t3.push(A.ExecutableOptions__separator("Source Maps")); + parser.addFlag$3$defaultsTo$help("source-map", true, "Whether to generate source maps."); + parser.addOption$4$allowed$defaultsTo$help("source-map-urls", A._setArrayType(["relative", "absolute"], t2), "relative", "How to link from source maps to source files."); + parser.addFlag$3$defaultsTo$help("embed-sources", false, "Embed source file contents in source maps."); + parser.addFlag$3$defaultsTo$help("embed-source-map", false, "Embed source map contents in CSS."); + t3.push(A.ExecutableOptions__separator("Warnings")); + parser.addFlag$3$abbr$help("quiet", "q", "Don't print warnings."); + parser.addFlag$2$help("quiet-deps", "Don't print compiler warnings from dependencies.\nStylesheets imported through load paths count as dependencies."); + parser.addFlag$2$help("verbose", "Print all deprecation warnings even when they're repetitive."); + parser.addMultiOption$2$help("fatal-deprecation", "Deprecations to treat as errors. You may also pass a Sass\nversion to include any behavior deprecated in or before it.\nSee https://sass-lang.com/documentation/breaking-changes for \na complete list."); + parser.addMultiOption$2$help("silence-deprecation", "Deprecations to ignore."); + parser.addMultiOption$2$help("future-deprecation", "Opt in to a deprecation early."); + t3.push(A.ExecutableOptions__separator("Other")); + parser.addFlag$4$abbr$help$negatable("watch", "w", "Watch stylesheets and recompile when they change.", false); + parser.addFlag$2$help("poll", "Manually check for changes rather than using a native watcher.\nOnly valid with --watch."); + parser.addFlag$2$help("stop-on-error", "Don't compile more files once an error is encountered."); + parser.addFlag$4$abbr$help$negatable("interactive", "i", "Run an interactive SassScript shell.", false); + parser.addFlag$3$abbr$help("color", "c", "Whether to use terminal colors for messages."); + parser.addFlag$2$help("unicode", "Whether to use Unicode characters for messages."); + parser.addFlag$2$help("trace", "Print full Dart stack traces for exceptions."); + parser.addFlag$4$abbr$help$negatable("help", "h", "Print this usage information.", false); + parser.addFlag$3$help$negatable("version", "Print the version of Dart Sass.", false); + return parser; + }, + $signature: 312 + }; + A.ExecutableOptions_interactive_closure.prototype = { + call$0() { + var _0_0, + t1 = this.$this._options; + if (!A._asBool(t1.$index(0, "interactive"))) + return false; + _0_0 = A.IterableExtension_firstWhereOrNull(A._setArrayType(["stdin", "indented", "style", "source-map", "source-map-urls", "embed-sources", "embed-source-map", "update", "watch"], type$.JSArray_String), t1.get$wasParsed()); + if (_0_0 != null) + throw A.wrapException(A.UsageException$("--" + _0_0 + " isn't allowed with --interactive.")); + return true; + }, + $signature: 20 + }; + A.ExecutableOptions_emitErrorCss_closure.prototype = { + call$1(destination) { + return destination != null; + }, + $signature: 227 + }; + A.ExecutableOptions_fatalDeprecations_closure.prototype = { + call$0() { + var id, argVersion, sassVersion, t1, t2, _0_0, exception, + deprecations = A.LinkedHashSet_LinkedHashSet$_empty(type$.Deprecation); + for (t1 = J.get$iterator$ax(type$.List_String._as(this.$this._options.$index(0, "fatal-deprecation"))), t2 = type$.FormatException; t1.moveNext$0();) { + id = t1.get$current(t1); + _0_0 = A.Deprecation_fromId(id); + if (_0_0 != null) { + J.add$1$ax(deprecations, _0_0); + continue; + } + try { + argVersion = A.Version_Version$parse(id); + sassVersion = A.Version_Version$parse("1.100.0"); + if (J.compareTo$1$ns(argVersion, sassVersion) > 0) + A.ExecutableOptions__fail("Invalid version " + A.S(argVersion) + ". --fatal-deprecation requires a version less than or equal to the current Dart Sass version."); + J.addAll$1$ax(deprecations, A.Deprecation_forVersion(argVersion)); + } catch (exception) { + if (t2._is(A.unwrapException(exception))) + A.ExecutableOptions__fail('Invalid deprecation "' + A.S(id) + '".'); + else + throw exception; + } + } + return deprecations; + }, + $signature: 321 + }; + A.UsageException.prototype = {$isException: 1, + get$message(receiver) { + return this.message; + } + }; + A.repl_warn.prototype = { + call$1(warning) { + var _0_1, _0_3, deprecation, t1, _0_2, span, _null = null; + $label0$0: { + _0_1 = warning._1; + _0_3 = _null; + deprecation = _null; + t1 = false; + _0_2 = warning._2; + _0_3 = warning._0; + t1 = _0_3 != null; + if (t1) + deprecation = _0_3 == null ? type$.Deprecation._as(_0_3) : _0_3; + span = _0_2; + if (t1) { + A.WarnForDeprecation_warnForDeprecation(this.logger, deprecation, _0_1, span, _null); + break $label0$0; + } + t1 = false; + t1 = _0_3 == null; + span = _0_2; + if (t1) + this.logger.internalWarn$4$deprecation$span$trace(_0_1, _null, span, _null); + } + }, + $signature: 324 + }; + A.watch_closure.prototype = { + call$1(dir) { + while (!A.dirExists(dir)) + dir = $.$get$context().dirname$1(dir); + return this.dirWatcher.watch$1(0, dir); + }, + $signature: 325 + }; + A._Watcher.prototype = { + _delete$1(path) { + var buffer, t1, exception; + try { + A.deleteFile(path); + buffer = new A.StringBuffer(""); + t1 = this._watch$_options; + if (t1.get$color()) + buffer._contents += "\x1b[33m"; + buffer._contents += "Deleted " + path + "."; + if (t1.get$color()) + buffer._contents += "\x1b[0m"; + A.print(buffer); + } catch (exception) { + if (!(A.unwrapException(exception) instanceof A.FileSystemException)) + throw exception; + } + }, + watch$1(_, watcher) { + return this.watch$body$_Watcher(0, watcher); + }, + watch$body$_Watcher(_, watcher) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, batch, $event, extension, t1, toRecompile, success, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, url, _0_0, t2; + var $async$watch$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t2 = watcher._group.__StreamGroup__controller_A; + t2 === $ && A.throwUnnamedLateFieldNI(); + t2 = new A._StreamIterator(A.checkNotNullable($async$self._debounceEvents$1(new A._ControllerStream(t2, A._instanceType(t2)._eval$1("_ControllerStream<1>"))), "stream", type$.Object)); + $async$handler = 3; + t3 = $async$self._toRecompile, t4 = type$.String, t5 = $async$self._watch$_options, t6 = $async$self._graph, t7 = t6._nodes, t8 = type$.JSArray_StylesheetNode, t9 = t5._options; + case 6: + // for condition + $async$goto = 8; + return A._asyncAwait(t2.moveNext$0(), $async$watch$1); + case 8: + // returning from await. + if (!$async$result) { + // goto after for + $async$goto = 7; + break; + } + batch = t2.get$current(0); + for (t10 = J.get$iterator$ax(batch); t10.moveNext$0();) { + $event = t10.get$current(t10); + t11 = $event.path; + t12 = $.$get$context(); + extension = A.ParsedPath_ParsedPath$parse(t11, t12.style)._splitExtension$1(1)[1]; + if (!J.$eq$(extension, ".sass") && !J.$eq$(extension, ".scss") && !J.$eq$(extension, ".css")) + continue; + switch ($event.type) { + case B.ChangeType_modify: + t11 = $event.path; + t13 = self.process; + if (t13 == null) + t13 = null; + else { + t13 = J.get$release$x(t13); + t13 = t13 == null ? null : J.get$name$x(t13); + } + t13 = J.$eq$(t13, "node") ? self.process : null; + if (!J.$eq$(t13 == null ? null : J.get$platform$x(t13), "win32")) { + t13 = self.process; + if (t13 == null) + t13 = null; + else { + t13 = J.get$release$x(t13); + t13 = t13 == null ? null : J.get$name$x(t13); + } + t13 = J.$eq$(t13, "node") ? self.process : null; + t13 = J.$eq$(t13 == null ? null : J.get$platform$x(t13), "darwin"); + } else + t13 = true; + url = t12.toUri$1(t13 ? A._realCasePath(t12.normalize$1(t12.absolute$15(t11, null, null, null, null, null, null, null, null, null, null, null, null, null, null))) : t12.canonicalize$1(0, t11)); + _0_0 = t7.$index(0, url); + if (_0_0 != null) { + t6.reload$1(url); + $async$self._recompileDownstream$1(A._setArrayType([_0_0], t8)); + } else + $async$self._handleAdd$1(t11); + break; + case B.ChangeType_add: + $async$self._handleAdd$1($event.path); + break; + case B.ChangeType_remove: + $async$self._handleRemove$1($event.path); + break; + } + } + t10 = A.LinkedHashMap_LinkedHashMap(null, null, null, t4, t4); + t10.addAll$1(0, t3); + t1 = t10; + toRecompile = t1; + t3.clear$0(0); + $async$goto = 9; + return A._asyncAwait(A.compileStylesheets(t5, t6, toRecompile, true), $async$watch$1); + case 9: + // returning from await. + success = $async$result; + if (!success && A._asBool(t9.$index(0, "stop-on-error"))) { + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + } + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [2]; + case 4: + // finally + $async$handler = 2; + $async$goto = 10; + return A._asyncAwait(t2.cancel$0(), $async$watch$1); + case 10: + // returning from await. + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$watch$1, $async$completer); + }, + _handleAdd$1(path) { + var t1, t2, t3, t0, _this = this, _null = null, + destination = _this._destinationFor$1(path); + if (destination != null) + _this._toRecompile.$indexSet(0, path, destination); + t1 = $.$get$FilesystemImporter_cwd(); + t2 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "win32")) { + t2 = A.isNodeJs() ? self.process : _null; + t2 = J.$eq$(t2 == null ? _null : J.get$platform$x(t2), "darwin"); + } else + t2 = true; + if (t2) { + t2 = A.absolute(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + t3 = $.$get$context(); + t2 = A._realCasePath(t3.normalize$1(t2)); + } else { + t2 = $.$get$context(); + t3 = t2.canonicalize$1(0, path); + t0 = t3; + t3 = t2; + t2 = t0; + } + _this._recompileDownstream$1(_this._graph.addCanonical$3(t1, t3.toUri$1(t2), t3.toUri$1(path))); + }, + _handleRemove$1(path) { + return this._handleRemove$body$_Watcher(path); + }, + _handleRemove$body$_Watcher(path) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t2, t0, url, _0_0, t1; + var $async$_handleRemove$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = A.isNodeJs() ? self.process : null; + if (!J.$eq$(t1 == null ? null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : null; + t1 = J.$eq$(t1 == null ? null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (t1) { + t1 = A.absolute(path, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + t2 = $.$get$context(); + t1 = A._realCasePath(t2.normalize$1(t1)); + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, path); + t0 = t2; + t2 = t1; + t1 = t0; + } + url = t2.toUri$1(t1); + t1 = $async$self._graph; + if (t1._nodes.containsKey$1(url)) { + _0_0 = $async$self._destinationFor$1(path); + if (_0_0 != null) { + $async$self._delete$1(_0_0); + $async$self._delete$1(_0_0 + ".map"); + } + } + $async$self._recompileDownstream$1(t1.remove$2(0, $.$get$FilesystemImporter_cwd(), url)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_handleRemove$1, $async$completer); + }, + _debounceEvents$1(events) { + var t1 = type$.WatchEvent; + t1 = A.RateLimit__debounceAggregate(events, A.Duration$(0, 25), A.instantiate1(A.rate_limit___collect$closure(), t1), false, true, t1, type$.List_WatchEvent); + return new A._MapStream(new A._Watcher__debounceEvents_closure(), t1, A._instanceType(t1)._eval$1("_MapStream>")); + }, + _recompileDownstream$1(nodes) { + var t1, t2, t3, t4, t5, t6, _i, + seen = A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode); + for (t1 = type$.UnmodifiableSetView_StylesheetNode, t2 = this._toRecompile, t3 = type$.JSArray_StylesheetNode; t4 = J.getInterceptor$asx(nodes), t4.get$isNotEmpty(nodes); nodes = t4) { + t5 = A._setArrayType([], t3); + for (t4 = t4.get$iterator(nodes); t4.moveNext$0();) { + t6 = t4.get$current(t4); + if (seen.add$1(0, t6)) + t5.push(t6); + } + t2.addAll$1(0, this._sourceEntrypointsToDestinations$1(t5)); + t4 = A._setArrayType([], t3); + for (t6 = t5.length, _i = 0; _i < t5.length; t5.length === t6 || (0, A.throwConcurrentModificationError)(t5), ++_i) + B.JSArray_methods.addAll$1(t4, new A.UnmodifiableSetView0(t5[_i]._downstream, t1)); + } + }, + _sourceEntrypointsToDestinations$1(nodes) { + var _i, url, source, _0_0, + t1 = type$.String, + entrypoints = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t1 = nodes.length, _i = 0; _i < nodes.length; nodes.length === t1 || (0, A.throwConcurrentModificationError)(nodes), ++_i) { + url = nodes[_i].canonicalUrl; + if (url.get$scheme() !== "file") + continue; + source = $.$get$context().style.pathFromUri$1(A._parseUri(url)); + _0_0 = this._destinationFor$1(source); + if (_0_0 != null) + entrypoints.$indexSet(0, source, _0_0); + } + return entrypoints; + }, + _destinationFor$1(source) { + var t2, _0_0, t3, sourceDir, destinationDir, destination, + t1 = this._watch$_options; + t1._ensureSources$0(); + t2 = type$.String; + _0_0 = t1._sourcesToDestinations.cast$2$0(0, t2, t2).$index(0, source); + if (_0_0 != null) + return _0_0; + t3 = $.$get$context(); + if (B.JSString_methods.startsWith$1(A.ParsedPath_ParsedPath$parse(source, t3.style).get$basename(), "_")) + return null; + t1._ensureSources$0(); + t1 = t1.__ExecutableOptions__sourceDirectoriesToDestinations_F; + t1 === $ && A.throwUnnamedLateFieldNI(); + t2 = A.MapExtensions_get_pairs(t1.cast$2$0(0, t2, t2), t2, t2); + t2 = t2.get$iterator(t2); + while (t2.moveNext$0()) { + t1 = t2.get$current(t2); + sourceDir = t1._0; + destinationDir = t1._1; + if (t3._isWithinOrEquals$2(sourceDir, source) !== B._PathRelation_within) + continue; + destination = A.join(destinationDir, t3.withoutExtension$1(t3.relative$2$from(source, sourceDir)) + ".css", null); + if (t3._isWithinOrEquals$2(destination, source) !== B._PathRelation_equal) + return destination; + } + return null; + } + }; + A._Watcher__debounceEvents_closure.prototype = { + call$1(buffer) { + var t3, t4, t5, oldType, _0_4, _1_1, + t1 = type$.ChangeType, + t2 = A.PathMap__create(null, t1); + for (t3 = J.get$iterator$ax(buffer); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t5 = t4.path; + oldType = t2.$index(0, t5); + _0_4 = t4.type; + $label0$0: { + if (oldType == null) { + t4 = _0_4; + break $label0$0; + } + if (B.ChangeType_remove === _0_4) { + t4 = B.ChangeType_remove; + break $label0$0; + } + if (B.ChangeType_add === oldType) { + t4 = B.ChangeType_add; + break $label0$0; + } + t4 = B.ChangeType_modify; + break $label0$0; + } + t2.$indexSet(0, t5, t4); + } + t3 = A._setArrayType([], type$.JSArray_WatchEvent); + for (t1 = A.MapExtensions_get_pairs(new A.PathMap(t2, type$.PathMap_ChangeType), type$.nullable_String, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + _1_1 = t2._0; + _1_1.toString; + t3.push(new A.WatchEvent(t2._1, _1_1)); + } + return t3; + }, + $signature: 276 + }; + A.EmptyExtensionStore.prototype = { + get$_extensions() { + return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__extensions, "get$_empty_extension_store$_extensions", 1, [], [], 0))); + }, + get$_sourceSpecificity() { + return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__sourceSpecificity, "get$_empty_extension_store$_sourceSpecificity", 1, [], [], 0))); + }, + get$isEmpty(_) { + return true; + }, + get$simpleSelectors() { + return B.C_EmptyUnmodifiableSet; + }, + extensionsWhereTarget$1(callback) { + return B.List_empty5; + }, + addSelector$2(selector, mediaContext) { + throw A.wrapException(A.UnsupportedError$(string$.addSel)); + }, + addExtension$4(extender, target, extend, mediaContext) { + throw A.wrapException(A.UnsupportedError$(string$.addExt_)); + }, + addExtensions$1(extenders) { + throw A.wrapException(A.UnsupportedError$(string$.addExts)); + }, + clone$0() { + return B.Record2_EmptyExtensionStore_Map_empty; + }, + $isExtensionStore: 1 + }; + A.Extension.prototype = { + toString$0(_) { + var t1 = this.extender.toString$0(0), + t2 = this.target.toString$0(0), + t3 = this.isOptional ? " !optional" : ""; + return t1 + " {@extend " + t2 + t3 + "}"; + } + }; + A.Extender.prototype = { + assertCompatibleMediaContext$1(mediaContext) { + var expectedMediaContext, + extension = this._extension; + if (extension == null) + return; + expectedMediaContext = extension.mediaContext; + if (expectedMediaContext == null) + return; + if (mediaContext != null && B.C_ListEquality.equals$2(0, expectedMediaContext, mediaContext)) + return; + throw A.wrapException(A.SassException$(string$.You_ma, extension.span, null)); + }, + toString$0(_) { + return A.serializeSelector(this.selector, true); + } + }; + A.ExtensionStore.prototype = { + get$isEmpty(_) { + return this._extensions.__js_helper$_length === 0; + }, + get$simpleSelectors() { + return new A.MapKeySet(this._selectors, type$.MapKeySet_SimpleSelector); + }, + extensionsWhereTarget$1(callback) { + return new A._SyncStarIterable(this.extensionsWhereTarget$body$ExtensionStore(callback), type$._SyncStarIterable_Extension); + }, + extensionsWhereTarget$body$ExtensionStore($async$callback) { + var $async$self = this; + return function() { + var callback = $async$callback; + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], t1, t2, simple, sources, t3; + return function $async$extensionsWhereTarget$1($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = A.MapExtensions_get_pairs($async$self._extensions, type$.SimpleSelector, type$.Map_ComplexSelector_Extension), t1 = t1.get$iterator(t1); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t2 = t1.get$current(t1); + simple = t2._0; + sources = t2._1; + if (!callback.call$1(simple)) { + // goto for condition + $async$goto = 2; + break; + } + t2 = sources.get$values(sources), t2 = t2.get$iterator(t2); + case 4: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 5; + break; + } + t3 = t2.get$current(t2); + $async$goto = t3 instanceof A.MergedExtension ? 6 : 8; + break; + case 6: + // then + t3 = t3.unmerge$0(); + $async$goto = 9; + return $async$iterator._yieldStar$1(new A.WhereIterable(t3, new A.ExtensionStore_extensionsWhereTarget_closure(), t3.$ti._eval$1("WhereIterable"))); + case 9: + // after yield + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = !t3.isOptional ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return $async$iterator._async$_current = t3, 1; + case 12: + // after yield + case 11: + // join + case 7: + // join + // goto for condition + $async$goto = 4; + break; + case 5: + // after for + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + }, + addSelector$2(selector, mediaContext) { + var originalSelector, error, stackTrace, t1, exception, t2, t3, t4, modifiableSelector, _this = this; + selector = selector; + originalSelector = selector; + if (!originalSelector.accept$1(B._IsInvisibleVisitor_true)) + _this._originals.addAll$1(0, originalSelector.components); + t1 = _this._extensions; + if (t1.__js_helper$_length !== 0) + try { + selector = _this._extendList$3(originalSelector, t1, mediaContext); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$x(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1).message$1(0, ""); + t2 = error._span_exception$_message; + t3 = error; + t4 = J.getInterceptor$x(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + A.throwWithTrace(new A.SassException(B.Set_empty, "From " + t1 + "\n" + t2, t3), error, stackTrace); + } else + throw exception; + } + modifiableSelector = new A.ModifiableBox(selector, type$.ModifiableBox_SelectorList); + if (mediaContext != null) + _this._mediaContexts.$indexSet(0, modifiableSelector, mediaContext); + _this._registerSelector$2(selector, modifiableSelector); + return new A.Box(modifiableSelector, type$.Box_SelectorList); + }, + _registerSelector$2(list, selector) { + var t1, t2, t3, t4, _i, t5, t6, _i0, t7, t8, _i1, simple, _0_2_isSet, _0_2, t9, selectorInPseudo; + for (t1 = list.components, t2 = t1.length, t3 = this._selectors, t4 = type$.SelectorList, _i = 0; _i < t2; ++_i) + for (t5 = t1[_i].components, t6 = t5.length, _i0 = 0; _i0 < t6; ++_i0) + for (t7 = t5[_i0].selector.components, t8 = t7.length, _i1 = 0; _i1 < t8; ++_i1) { + simple = t7[_i1]; + t3.putIfAbsent$2(simple, new A.ExtensionStore__registerSelector_closure()).add$1(0, selector); + _0_2_isSet = simple instanceof A.PseudoSelector; + _0_2 = null; + if (_0_2_isSet) { + _0_2 = simple.selector; + t9 = _0_2; + t9 = t9 != null; + } else + t9 = false; + if (t9) { + selectorInPseudo = _0_2_isSet ? _0_2 : simple.selector; + this._registerSelector$2(selectorInPseudo == null ? t4._as(selectorInPseudo) : selectorInPseudo, selector); + } + } + }, + addExtension$4(extender, target, extend, mediaContext) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, newExtensions, _i, complex, t11, extension, _0_0, t12, newExtensionsByTarget, additionalExtensions, _this = this, + selectors = _this._selectors.$index(0, target), + t1 = _this._extensionsByExtender, + existingExtensions = t1.$index(0, target), + sources = _this._extensions.putIfAbsent$2(target, new A.ExtensionStore_addExtension_closure()); + for (t2 = extender.components, t3 = t2.length, t4 = selectors == null, t5 = _this._sourceSpecificity, t6 = extend.span, t7 = extend.isOptional, t8 = existingExtensions != null, t9 = type$.ComplexSelector, t10 = type$.Extension, newExtensions = null, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (complex.accept$1(B.C__IsUselessVisitor)) + continue; + complex.get$specificity(); + t11 = new A.Extender(complex, false); + extension = t11._extension = new A.Extension(t11, target, mediaContext, t7, t6); + _0_0 = sources.$index(0, complex); + if (_0_0 != null) { + sources.$indexSet(0, complex, A.MergedExtension_merge(_0_0, extension)); + continue; + } + sources.$indexSet(0, complex, extension); + for (t11 = new A._SyncStarIterator(_this._simpleSelectors$1(complex)._outerHelper()); t11.moveNext$0();) { + t12 = t11._async$_current; + J.add$1$ax(t1.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure0()), extension); + t5.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure1(complex)); + } + if (!t4 || t8) { + if (newExtensions == null) + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t9, t10); + newExtensions.$indexSet(0, complex, extension); + } + } + if (newExtensions == null) + return; + t1 = type$.SimpleSelector; + newExtensionsByTarget = A.LinkedHashMap_LinkedHashMap$_literal([target, newExtensions], t1, type$.Map_ComplexSelector_Extension); + if (t8) { + additionalExtensions = _this._extendExistingExtensions$2(existingExtensions, newExtensionsByTarget); + if (additionalExtensions != null) + A.mapAddAll2(newExtensionsByTarget, additionalExtensions, t1, t9, t10); + } + if (!t4) + _this._extendExistingSelectors$2(selectors, newExtensionsByTarget); + }, + _simpleSelectors$1(complex) { + return new A._SyncStarIterable(this._simpleSelectors$body$ExtensionStore(complex), type$._SyncStarIterable_SimpleSelector); + }, + _simpleSelectors$body$ExtensionStore($async$complex) { + var $async$self = this; + return function() { + var complex = $async$complex; + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], t1, t2, t3, _i, t4, t5, _i0, simple, _0_2_isSet, _0_2, t6, selector, t7, _i1; + return function $async$_simpleSelectors$1($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = complex.components, t2 = t1.length, t3 = type$.SelectorList, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + t4 = t1[_i].selector.components, t5 = t4.length, _i0 = 0; + case 5: + // for condition + if (!(_i0 < t5)) { + // goto after for + $async$goto = 7; + break; + } + simple = t4[_i0]; + $async$goto = 8; + return $async$iterator._async$_current = simple, 1; + case 8: + // after yield + _0_2_isSet = simple instanceof A.PseudoSelector; + _0_2 = null; + if (_0_2_isSet) { + _0_2 = simple.selector; + t6 = _0_2; + t6 = t6 != null; + } else + t6 = false; + $async$goto = t6 ? 9 : 10; + break; + case 9: + // then + selector = _0_2_isSet ? _0_2 : simple.selector; + t6 = (selector == null ? t3._as(selector) : selector).components, t7 = t6.length, _i1 = 0; + case 11: + // for condition + if (!(_i1 < t7)) { + // goto after for + $async$goto = 13; + break; + } + $async$goto = 14; + return $async$iterator._yieldStar$1($async$self._simpleSelectors$1(t6[_i1])); + case 14: + // after yield + case 12: + // for update + ++_i1; + // goto for condition + $async$goto = 11; + break; + case 13: + // after for + case 10: + // join + case 6: + // for update + ++_i0; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + }, + _extendExistingExtensions$2(extensions, newExtensions) { + var extension, selectors, error, stackTrace, t1, t2, t3, t4, t5, t6, additionalExtensions, _i, t7, exception, t8, t9, selectors0, t10, t11, t12, t13, t14, withExtender, _0_0, _i0, _i1; + for (t1 = J.toList$0$ax(extensions), t2 = t1.length, t3 = this._extensionsByExtender, t4 = type$.SimpleSelector, t5 = type$.Map_ComplexSelector_Extension, t6 = this._extensions, additionalExtensions = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + extension = t1[_i]; + t7 = t6.$index(0, extension.target); + t7.toString; + selectors = null; + try { + selectors = this._extendComplex$3(extension.extender.selector, newExtensions, extension.mediaContext); + if (selectors == null) + continue; + } catch (exception) { + t8 = A.unwrapException(exception); + if (t8 instanceof A.SassException) { + error = t8; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(error.withAdditionalSpan$2(extension.extender.selector.span, "target selector"), error, stackTrace); + } else + throw exception; + } + t8 = J.get$first$ax(selectors); + t9 = extension.extender.selector; + if (B.C_ListEquality.equals$2(0, t8.leadingCombinators, t9.leadingCombinators) && B.C_ListEquality.equals$2(0, t8.components, t9.components)) { + t8 = selectors; + t9 = A._arrayInstanceType(t8); + selectors0 = new A.SubListIterable(t8, 1, null, t9._eval$1("SubListIterable<1>")); + selectors0.SubListIterable$3(t8, 1, null, t9._precomputed1); + selectors = selectors0; + } + for (t8 = J.get$iterator$ax(selectors); t8.moveNext$0();) { + t9 = t8.get$current(t8); + t10 = extension; + t11 = t10.target; + t12 = t10.span; + t13 = t10.mediaContext; + t10 = t10.isOptional; + t9.get$specificity(); + t14 = new A.Extender(t9, false); + withExtender = t14._extension = new A.Extension(t14, t11, t13, t10, t12); + _0_0 = t7.$index(0, t9); + if (_0_0 != null) + t7.$indexSet(0, t9, A.MergedExtension_merge(_0_0, withExtender)); + else { + t7.$indexSet(0, t9, withExtender); + for (t10 = t9.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) + for (t12 = t10[_i0].selector.components, t13 = t12.length, _i1 = 0; _i1 < t13; ++_i1) + J.add$1$ax(t3.putIfAbsent$2(t12[_i1], new A.ExtensionStore__extendExistingExtensions_closure()), withExtender); + if (newExtensions.containsKey$1(extension.target)) { + if (additionalExtensions == null) + additionalExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t4, t5); + additionalExtensions.putIfAbsent$2(extension.target, new A.ExtensionStore__extendExistingExtensions_closure0()).$indexSet(0, t9, withExtender); + } + } + } + } + return additionalExtensions; + }, + _extendExistingSelectors$2(selectors, newExtensions) { + var selector, error, stackTrace, t1, t2, oldValue, exception, t3, t4, t5, t6; + for (t1 = selectors.get$iterator(selectors), t2 = this._mediaContexts; t1.moveNext$0();) { + selector = t1.get$current(t1); + oldValue = selector.value; + try { + selector.value = this._extendList$3(selector.value, newExtensions, t2.$index(0, selector)); + } catch (exception) { + t3 = A.unwrapException(exception); + if (t3 instanceof A.SassException) { + error = t3; + stackTrace = A.getTraceFromException(exception); + t3 = selector.value.span.message$1(0, ""); + t4 = error._span_exception$_message; + t5 = error; + t6 = J.getInterceptor$x(t5); + t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); + A.throwWithTrace(new A.SassException(B.Set_empty, "From " + t3 + "\n" + t4, t5), error, stackTrace); + } else + throw exception; + } + if (oldValue === selector.value) + continue; + this._registerSelector$2(selector.value, selector); + } + }, + addExtensions$1(extensionStores) { + var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, newExtensions, selectorsToExtend, extensionsToExtend, t12, t13, target, newSources, first, extensionsForTarget, t14, selectorsForTarget, t15, _2_0, t16, extender, extension, _this = this, _null = null; + for (t1 = J.get$iterator$ax(extensionStores), t2 = type$.SimpleSelector, t3 = type$.Map_ComplexSelector_Extension, t4 = _this._extensions, t5 = type$.ComplexSelector, t6 = type$.Extension, t7 = _this._selectors, t8 = _this._extensionsByExtender, t9 = type$.JSArray_Extension, t10 = type$.ModifiableBox_SelectorList, t11 = _this._sourceSpecificity, newExtensions = _null, selectorsToExtend = newExtensions, extensionsToExtend = selectorsToExtend; t1.moveNext$0();) { + t12 = t1.get$current(t1); + if (t12.get$isEmpty(t12)) + continue; + t11.addAll$1(0, t12.get$_sourceSpecificity()); + for (t12 = A.MapExtensions_get_pairs(t12.get$_extensions(), t2, t3), t12 = t12.get$iterator(t12); t12.moveNext$0();) { + t13 = t12.get$current(t12); + target = t13._0; + newSources = t13._1; + if (target instanceof A.PlaceholderSelector) { + first = target.name.charCodeAt(0); + t13 = first === 45 || first === 95; + } else + t13 = false; + if (t13) + continue; + extensionsForTarget = t8.$index(0, target); + t13 = extensionsForTarget == null; + if (!t13) { + if (extensionsToExtend == null) { + extensionsToExtend = A._setArrayType([], t9); + t14 = extensionsToExtend; + } else + t14 = extensionsToExtend; + B.JSArray_methods.addAll$1(t14, extensionsForTarget); + } + selectorsForTarget = t7.$index(0, target); + t14 = selectorsForTarget != null; + if (t14) { + if (selectorsToExtend == null) { + selectorsToExtend = A.LinkedHashSet_LinkedHashSet$_empty(t10); + t15 = selectorsToExtend; + } else + t15 = selectorsToExtend; + t15.addAll$1(0, selectorsForTarget); + } + _2_0 = t4.$index(0, target); + if (_2_0 != null) + for (t15 = A.MapExtensions_get_pairs(newSources, t5, t6), t15 = t15.get$iterator(t15); t15.moveNext$0();) { + t16 = t15.get$current(t15); + extender = t16._0; + extension = t16._1; + if (_2_0.containsKey$1(extender)) { + t16 = _2_0.$index(0, extender); + extension = A.MergedExtension_merge(t16 == null ? t6._as(t16) : t16, extension); + _2_0.$indexSet(0, extender, extension); + } else + _2_0.$indexSet(0, extender, extension); + if (!t13 || t14) { + if (newExtensions == null) { + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + t16 = newExtensions; + } else + t16 = newExtensions; + t16.putIfAbsent$2(target, new A.ExtensionStore_addExtensions_closure()).$indexSet(0, extender, extension); + } + } + else { + t15 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); + t15.addAll$1(0, newSources); + t4.$indexSet(0, target, t15); + if (!t13 || t14) { + if (newExtensions == null) { + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + t13 = newExtensions; + } else + t13 = newExtensions; + t14 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); + t14.addAll$1(0, newSources); + t13.$indexSet(0, target, t14); + } + } + } + } + if (newExtensions != null) { + if (extensionsToExtend != null) + _this._extendExistingExtensions$2(extensionsToExtend, newExtensions); + if (selectorsToExtend != null) + _this._extendExistingSelectors$2(selectorsToExtend, newExtensions); + } + }, + _extendList$3(list, extensions, mediaQueryContext) { + var t1, t2, t3, extended, i, complex, result, t4; + for (t1 = list.components, t2 = t1.length, t3 = type$.JSArray_ComplexSelector, extended = null, i = 0; i < t2; ++i) { + complex = t1[i]; + result = this._extendComplex$3(complex, extensions, mediaQueryContext); + if (result == null) { + if (extended != null) + extended.push(complex); + } else { + if (extended == null) + if (i === 0) + extended = A._setArrayType([], t3); + else { + t4 = B.JSArray_methods.sublist$2(t1, 0, i); + extended = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + } + B.JSArray_methods.addAll$1(extended, result); + } + } + if (extended == null) + return list; + t1 = this._originals; + return A.SelectorList$(this._trim$2(extended, t1.get$contains(t1)), list.span); + }, + _extendList$2(list, extensions) { + return this._extendList$3(list, extensions, null); + }, + _extendComplex$3(complex, extensions, mediaQueryContext) { + var isOriginal, t3, t4, t5, t6, t7, t8, t9, t10, extendedNotExpanded, i, component, extended, t11, t12, t13, t14, _box_0 = {}, + t1 = complex.leadingCombinators, + t2 = t1.length; + if (t2 > 1) + return null; + isOriginal = this._originals.contains$1(0, complex); + for (t3 = complex.components, t4 = t3.length, t5 = type$.JSArray_List_ComplexSelector, t6 = complex.lineBreak, t7 = !t6, t8 = complex.span, t9 = type$.JSArray_ComplexSelector, t2 = t2 === 0, t10 = type$.JSArray_ComplexSelectorComponent, extendedNotExpanded = null, i = 0; i < t4; ++i) { + component = t3[i]; + extended = this._extendCompound$4$inOriginal(component, extensions, mediaQueryContext, isOriginal); + if (extended == null) { + if (extendedNotExpanded != null) + extendedNotExpanded.push(A._setArrayType([A.ComplexSelector$(B.List_empty0, A._setArrayType([component], t10), t8, t6)], t9)); + } else if (extendedNotExpanded != null) + extendedNotExpanded.push(extended); + else if (i !== 0) { + t11 = A._arrayInstanceType(t3); + t12 = new A.SubListIterable(t3, 0, i, t11._eval$1("SubListIterable<1>")); + t12.SubListIterable$3(t3, 0, i, t11._precomputed1); + extendedNotExpanded = A._setArrayType([A._setArrayType([A.ComplexSelector$(t1, t12, t8, t6)], t9), extended], t5); + } else if (t2) + extendedNotExpanded = A._setArrayType([extended], t5); + else { + t11 = A._setArrayType([], t9); + for (t12 = J.get$iterator$ax(extended); t12.moveNext$0();) { + t13 = t12.get$current(t12); + t14 = t13.leadingCombinators; + if (t14.length === 0 || B.C_ListEquality.equals$2(0, t1, t14)) { + t14 = t13.components; + t11.push(A.ComplexSelector$(t1, t14, t8, !t7 || t13.lineBreak)); + } + } + extendedNotExpanded = A._setArrayType([t11], t5); + } + } + if (extendedNotExpanded == null) + return null; + _box_0.first = true; + t1 = type$.ComplexSelector; + t1 = J.expand$1$1$ax(A.paths(extendedNotExpanded, t1), new A.ExtensionStore__extendComplex_closure(_box_0, this, complex), t1); + t1 = A.List_List$_of(t1, t1.$ti._eval$1("Iterable.E")); + return t1; + }, + _extendCompound$4$inOriginal(component, extensions, mediaQueryContext, inOriginal) { + var t3, t4, t5, t6, t7, t8, t9, t10, t11, options, i, simple, extended, t12, result, compound, complex, extenderPaths, withCombinators, isOriginal, _this = this, _null = null, + t1 = _this._mode, + targetsUsed = t1 === B.ExtendMode_normal_0_normal || extensions.__js_helper$_length < 2 ? _null : A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector), + t2 = component.selector, + simples = t2.components; + for (t3 = simples.length, t4 = type$.JSArray_List_Extender, t5 = type$.JSArray_Extender, t6 = type$.CssValue_Combinator, t7 = type$.JSArray_ComplexSelectorComponent, t8 = A._arrayInstanceType(simples), t9 = t8._precomputed1, t8 = t8._eval$1("SubListIterable<1>"), t10 = component.span, t11 = type$.SimpleSelector, options = _null, i = 0; i < t3; ++i) { + simple = simples[i]; + extended = _this._extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed); + if (extended == null) { + if (options != null) + options.push(A._setArrayType([_this._extenderForSimple$1(simple)], t5)); + } else { + if (options == null) { + options = A._setArrayType([], t4); + if (i !== 0) { + t12 = new A.SubListIterable(simples, 0, i, t8); + t12.SubListIterable$3(simples, 0, i, t9); + result = A.List_List$from(t12, false, t11); + result.$flags = 3; + t12 = result; + compound = new A.CompoundSelector(t12, t10); + if (t12.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", _null)); + result = A.List_List$from(B.List_empty0, false, t6); + result.$flags = 3; + t12 = A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(compound, result, t10)], t7), t10, false); + _this._sourceSpecificityFor$1(compound); + options.push(A._setArrayType([new A.Extender(t12, true)], t5)); + } + } + B.JSArray_methods.addAll$1(options, extended); + } + } + if (options == null) + return _null; + if (targetsUsed != null && targetsUsed._collection$_length !== extensions.__js_helper$_length) + return _null; + if (options.length === 1) { + for (t1 = J.get$iterator$ax(options[0]), t2 = component.combinators, t3 = type$.JSArray_ComplexSelector, result = _null; t1.moveNext$0();) { + t4 = t1.get$current(t1); + t4.assertCompatibleMediaContext$1(mediaQueryContext); + complex = t4.selector.withAdditionalCombinators$1(t2); + if (complex.accept$1(B.C__IsUselessVisitor)) + continue; + if (result == null) + result = A._setArrayType([], t3); + result.push(complex); + } + return result; + } + extenderPaths = A.paths(options, type$.Extender); + t3 = A._setArrayType([], type$.JSArray_ComplexSelector); + t1 = t1 === B.ExtendMode_replace_1_replace; + t4 = !t1; + if (t4) + t3.push(A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(J.expand$1$1$ax(J.get$first$ax(extenderPaths), new A.ExtensionStore__extendCompound_closure(), t11), t2.span), A.List_List$unmodifiable(component.combinators, t6), t10)], t7), t10, false)); + t2 = J.skip$1$ax(extenderPaths, t1 ? 0 : 1); + t5 = t2.$ti; + t2 = new A.ListIterator(t2, t2.get$length(0), t5._eval$1("ListIterator")); + t6 = component.combinators; + t5 = t5._eval$1("ListIterable.E"); + while (t2.moveNext$0()) { + t1 = t2.__internal$_current; + extended = _this._unifyExtenders$3(t1 == null ? t5._as(t1) : t1, mediaQueryContext, t10); + if (extended == null) + continue; + for (t1 = J.get$iterator$ax(extended); t1.moveNext$0();) { + withCombinators = t1.get$current(t1).withAdditionalCombinators$1(t6); + if (!withCombinators.accept$1(B.C__IsUselessVisitor)) + t3.push(withCombinators); + } + } + isOriginal = new A.ExtensionStore__extendCompound_closure0(); + return _this._trim$2(t3, inOriginal && t4 ? new A.ExtensionStore__extendCompound_closure1(B.JSArray_methods.get$first(t3)) : isOriginal); + }, + _unifyExtenders$3(extenders, mediaQueryContext, span) { + var t1, t2, t3, originals, originalsLineBreak, t4, complexes, _null = null, + toUnify = A.QueueList$(_null, type$.ComplexSelector); + for (t1 = J.getInterceptor$ax(extenders), t2 = t1.get$iterator(extenders), t3 = type$.JSArray_SimpleSelector, originals = _null, originalsLineBreak = false; t2.moveNext$0();) { + t4 = t2.get$current(t2); + if (t4.isOriginal) { + if (originals == null) + originals = A._setArrayType([], t3); + t4 = t4.selector; + B.JSArray_methods.addAll$1(originals, B.JSArray_methods.get$last(t4.components).selector.components); + originalsLineBreak = originalsLineBreak || t4.lineBreak; + } else { + t4 = t4.selector; + if (t4.accept$1(B.C__IsUselessVisitor)) + return _null; + else + toUnify._queue_list$_add$1(t4); + } + } + if (originals != null) + toUnify.addFirst$1(A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(originals, span), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), span)], type$.JSArray_ComplexSelectorComponent), span, originalsLineBreak)); + complexes = A.unifyComplex(toUnify, span); + if (complexes == null) + return _null; + for (t1 = t1.get$iterator(extenders); t1.moveNext$0();) + t1.get$current(t1).assertCompatibleMediaContext$1(mediaQueryContext); + return complexes; + }, + _extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed) { + var t2, _1_0, + t1 = new A.ExtensionStore__extendSimple_withoutPseudo(this, extensions, targetsUsed); + if (simple instanceof A.PseudoSelector) + t2 = simple.selector != null; + else + t2 = false; + if (t2) { + _1_0 = this._extendPseudo$3(simple, extensions, mediaQueryContext); + if (_1_0 != null) + return new A.MappedListIterable(_1_0, new A.ExtensionStore__extendSimple_closure(this, t1), A._arrayInstanceType(_1_0)._eval$1("MappedListIterable<1,List>")); + } + return A.NullableExtension_andThen(t1.call$1(simple), new A.ExtensionStore__extendSimple_closure0()); + }, + _extenderForSimple$1(simple) { + var t1 = simple.span; + t1 = A.ComplexSelector$(B.List_empty0, A._setArrayType([new A.ComplexSelectorComponent(A.CompoundSelector$(A._setArrayType([simple], type$.JSArray_SimpleSelector), t1), A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t1)], type$.JSArray_ComplexSelectorComponent), t1, false); + this._sourceSpecificity.$index(0, simple); + return new A.Extender(t1, true); + }, + _extendPseudo$3(pseudo, extensions, mediaQueryContext) { + var extended, complexes, t1, result, + selector = pseudo.selector; + if (selector == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo.toString$0(0) + " must have a selector argument.", null)); + extended = this._extendList$3(selector, extensions, mediaQueryContext); + if (extended === selector) + return null; + complexes = extended.components; + t1 = pseudo.normalizedName === "not"; + if (t1 && !B.JSArray_methods.any$1(selector.components, new A.ExtensionStore__extendPseudo_closure()) && B.JSArray_methods.any$1(complexes, new A.ExtensionStore__extendPseudo_closure0())) + complexes = new A.WhereIterable(complexes, new A.ExtensionStore__extendPseudo_closure1(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>")); + complexes = J.expand$1$1$ax(complexes, new A.ExtensionStore__extendPseudo_closure2(pseudo), type$.ComplexSelector); + if (t1 && selector.components.length === 1) { + t1 = A.MappedIterable_MappedIterable(complexes, new A.ExtensionStore__extendPseudo_closure3(pseudo, selector), complexes.$ti._eval$1("Iterable.E"), type$.PseudoSelector); + result = A.List_List$_of(t1, A._instanceType(t1)._eval$1("Iterable.E")); + return result.length === 0 ? null : result; + } else + return A._setArrayType([pseudo.withSelector$1(A.SelectorList$(complexes, selector.span))], type$.JSArray_PseudoSelector); + }, + _trim$2(selectors, isOriginal) { + var result, i, t1, t2, numOriginals, _box_0, complex1, j, t3, t4, _i, t5, maxSpecificity; + if (selectors.length > 100) + return selectors; + result = A.QueueList$(null, type$.ComplexSelector); + $label0$0: + for (i = selectors.length - 1, t1 = A._arrayInstanceType(selectors), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), numOriginals = 0; i >= 0; --i) { + _box_0 = {}; + complex1 = selectors[i]; + if (isOriginal.call$1(complex1)) { + for (j = 0; j < numOriginals; ++j) + if (result.$index(0, j).$eq(0, complex1)) { + A.rotateSlice(result, 0, j + 1); + continue $label0$0; + } + ++numOriginals; + result.addFirst$1(complex1); + continue $label0$0; + } + _box_0.maxSpecificity = 0; + for (t3 = complex1.components, t4 = t3.length, _i = 0, t5 = 0; _i < t4; ++_i, t5 = maxSpecificity) { + maxSpecificity = Math.max(t5, this._sourceSpecificityFor$1(t3[_i].selector)); + _box_0.maxSpecificity = maxSpecificity; + } + if (result.any$1(result, new A.ExtensionStore__trim_closure(_box_0, complex1))) + continue $label0$0; + t3 = new A.SubListIterable(selectors, 0, i, t1); + t3.SubListIterable$3(selectors, 0, i, t2); + if (t3.any$1(0, new A.ExtensionStore__trim_closure0(_box_0, complex1))) + continue $label0$0; + result.addFirst$1(complex1); + } + return result; + }, + _sourceSpecificityFor$1(compound) { + var t1, t2, t3, specificity, _i, t4; + for (t1 = compound.components, t2 = t1.length, t3 = this._sourceSpecificity, specificity = 0, _i = 0; _i < t2; ++_i) { + t4 = t3.$index(0, t1[_i]); + if (t4 == null) + t4 = 0; + specificity = Math.max(specificity, t4); + } + return specificity; + }, + clone$0() { + var t3, t4, _this = this, + t1 = type$.SimpleSelector, + newSelectors = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList), + t2 = type$.ModifiableBox_SelectorList, + newMediaContexts = A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.List_CssMediaQuery), + oldToNewSelectors = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList); + _this._selectors.forEach$1(0, new A.ExtensionStore_clone_closure(_this, newSelectors, A.LinkedHashMap_LinkedHashMap$_empty(t2, t2), oldToNewSelectors, newMediaContexts)); + t2 = type$.Extension; + t3 = A.copyMapOfMap(_this._extensions, t1, type$.ComplexSelector, t2); + t2 = A.copyMapOfList(_this._extensionsByExtender, t1, t2); + t1 = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int); + t1.addAll$1(0, _this._sourceSpecificity); + t4 = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector); + t4.addAll$1(0, _this._originals); + return new A._Record_2(new A.ExtensionStore(newSelectors, t3, t2, newMediaContexts, t1, t4, B.ExtendMode_normal_0_normal), oldToNewSelectors); + }, + get$_extensions() { + return this._extensions; + }, + get$_sourceSpecificity() { + return this._sourceSpecificity; + } + }; + A.ExtensionStore_extensionsWhereTarget_closure.prototype = { + call$1(extension) { + return !extension.isOptional; + }, + $signature: 334 + }; + A.ExtensionStore__registerSelector_closure.prototype = { + call$0() { + return A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableBox_SelectorList); + }, + $signature: 338 + }; + A.ExtensionStore_addExtension_closure.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 130 + }; + A.ExtensionStore_addExtension_closure0.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension); + }, + $signature: 213 + }; + A.ExtensionStore_addExtension_closure1.prototype = { + call$0() { + return this.complex.get$specificity(); + }, + $signature: 10 + }; + A.ExtensionStore__extendExistingExtensions_closure.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension); + }, + $signature: 213 + }; + A.ExtensionStore__extendExistingExtensions_closure0.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 130 + }; + A.ExtensionStore_addExtensions_closure.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector, type$.Extension); + }, + $signature: 130 + }; + A.ExtensionStore__extendComplex_closure.prototype = { + call$1(path) { + var t1 = this.complex; + return J.map$1$1$ax(A.weave(path, t1.span, t1.lineBreak), new A.ExtensionStore__extendComplex__closure(this._box_0, this.$this, t1), type$.ComplexSelector); + }, + $signature: 343 + }; + A.ExtensionStore__extendComplex__closure.prototype = { + call$1(outputComplex) { + var _this = this, + t1 = _this._box_0; + if (t1.first && _this.$this._originals.contains$1(0, _this.complex)) + _this.$this._originals.add$1(0, outputComplex); + t1.first = false; + return outputComplex; + }, + $signature: 61 + }; + A.ExtensionStore__extendCompound_closure.prototype = { + call$1(extender) { + return B.JSArray_methods.get$last(extender.selector.components).selector.components; + }, + $signature: 345 + }; + A.ExtensionStore__extendCompound_closure0.prototype = { + call$1(_) { + return false; + }, + $signature: 21 + }; + A.ExtensionStore__extendCompound_closure1.prototype = { + call$1(complex) { + return complex.$eq(0, this.original); + }, + $signature: 21 + }; + A.ExtensionStore__extendSimple_withoutPseudo.prototype = { + call$1(simple) { + var t1, t2, + extensionsForSimple = this.extensions.$index(0, simple); + if (extensionsForSimple == null) + return null; + t1 = this.targetsUsed; + if (t1 != null) + t1.add$1(0, simple); + t1 = A._setArrayType([], type$.JSArray_Extender); + t2 = this.$this; + if (t2._mode !== B.ExtendMode_replace_1_replace) + t1.push(t2._extenderForSimple$1(simple)); + for (t2 = extensionsForSimple.get$values(extensionsForSimple), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(t2).extender); + return t1; + }, + $signature: 351 + }; + A.ExtensionStore__extendSimple_closure.prototype = { + call$1(pseudo) { + var t1 = this.withoutPseudo.call$1(pseudo); + return t1 == null ? A._setArrayType([this.$this._extenderForSimple$1(pseudo)], type$.JSArray_Extender) : t1; + }, + $signature: 352 + }; + A.ExtensionStore__extendSimple_closure0.prototype = { + call$1(result) { + return A._setArrayType([result], type$.JSArray_List_Extender); + }, + $signature: 353 + }; + A.ExtensionStore__extendPseudo_closure.prototype = { + call$1(complex) { + return complex.components.length > 1; + }, + $signature: 21 + }; + A.ExtensionStore__extendPseudo_closure0.prototype = { + call$1(complex) { + return complex.components.length === 1; + }, + $signature: 21 + }; + A.ExtensionStore__extendPseudo_closure1.prototype = { + call$1(complex) { + return complex.components.length <= 1; + }, + $signature: 21 + }; + A.ExtensionStore__extendPseudo_closure2.prototype = { + call$1(complex) { + var innerPseudo, innerSelector, + t1 = complex.get$singleCompound(); + if (t1 == null) + innerPseudo = null; + else { + t1 = t1.components; + innerPseudo = t1.length === 1 ? B.JSArray_methods.get$first(t1) : null; + } + if (!(innerPseudo instanceof A.PseudoSelector)) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + innerSelector = innerPseudo.selector; + if (innerSelector == null) + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + t1 = this.pseudo; + switch (t1.normalizedName) { + case "not": + if (!B.Set_0egh6.contains$1(0, innerPseudo.normalizedName)) + return A._setArrayType([], type$.JSArray_ComplexSelector); + return innerSelector.components; + case "is": + case "matches": + case "where": + case "any": + case "current": + case "nth-child": + case "nth-last-child": + if (innerPseudo.name !== t1.name) + return A._setArrayType([], type$.JSArray_ComplexSelector); + if (innerPseudo.argument != t1.argument) + return A._setArrayType([], type$.JSArray_ComplexSelector); + return innerSelector.components; + case "has": + case "host": + case "host-context": + case "slotted": + return A._setArrayType([complex], type$.JSArray_ComplexSelector); + default: + return A._setArrayType([], type$.JSArray_ComplexSelector); + } + }, + $signature: 354 + }; + A.ExtensionStore__extendPseudo_closure3.prototype = { + call$1(complex) { + return this.pseudo.withSelector$1(A.SelectorList$(A._setArrayType([complex], type$.JSArray_ComplexSelector), this.selector.span)); + }, + $signature: 355 + }; + A.ExtensionStore__trim_closure.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 21 + }; + A.ExtensionStore__trim_closure0.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 21 + }; + A.ExtensionStore_clone_closure.prototype = { + call$2(simple, selectors) { + var t1, t2, t3, t4, t5, t6, newSelector, _0_0, _this = this, + newSelectorSet = A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableBox_SelectorList); + _this.newSelectors.$indexSet(0, simple, newSelectorSet); + for (t1 = selectors.get$iterator(selectors), t2 = _this.newBoxes, t3 = _this.oldToNewSelectors, t4 = _this.$this._mediaContexts, t5 = _this.newMediaContexts; t1.moveNext$0();) { + t6 = t1.get$current(t1); + newSelector = t2.putIfAbsent$2(t6, new A.ExtensionStore_clone__closure(t6)); + newSelectorSet.add$1(0, newSelector); + t3.$indexSet(0, t6.value, new A.Box(newSelector, newSelector.$ti._eval$1("Box<1>"))); + _0_0 = t4.$index(0, t6); + if (_0_0 != null) + t5.$indexSet(0, newSelector, _0_0); + } + }, + $signature: 359 + }; + A.ExtensionStore_clone__closure.prototype = { + call$0() { + return new A.ModifiableBox(this.selector.value, type$.ModifiableBox_SelectorList); + }, + $signature: 360 + }; + A.unifyComplex_closure.prototype = { + call$1(complex) { + return complex.lineBreak; + }, + $signature: 21 + }; + A._weaveParents_closure.prototype = { + call$2(group1, group2) { + var t1, unified; + if (B.C_ListEquality.equals$2(0, group1, group2)) + return group1; + if (A._complexIsParentSuperselector(group1, group2)) + return group2; + if (A._complexIsParentSuperselector(group2, group1)) + return group1; + if (!A._mustUnify(group1, group2)) + return null; + t1 = this.span; + unified = A.unifyComplex(A._setArrayType([A.ComplexSelector$(B.List_empty0, group1, t1, false), A.ComplexSelector$(B.List_empty0, group2, t1, false)], type$.JSArray_ComplexSelector), t1); + if (unified == null) + t1 = null; + else { + t1 = A.IterableExtension_get_singleOrNull(unified); + t1 = t1 == null ? null : t1.components; + } + return t1; + }, + $signature: 362 + }; + A._weaveParents_closure0.prototype = { + call$1(sequence) { + return A._complexIsParentSuperselector(sequence.get$first(sequence), this.group); + }, + $signature: 219 + }; + A._weaveParents_closure1.prototype = { + call$1(sequence) { + return sequence.get$length(0) === 0; + }, + $signature: 219 + }; + A._weaveParents_closure2.prototype = { + call$1(choice) { + return J.get$isNotEmpty$asx(choice); + }, + $signature: 364 + }; + A._mustUnify_closure.prototype = { + call$1(component) { + return B.JSArray_methods.any$1(component.selector.components, new A._mustUnify__closure(this.uniqueSelectors)); + }, + $signature: 54 + }; + A._mustUnify__closure.prototype = { + call$1(simple) { + var t1; + if (!(simple instanceof A.IDSelector)) + t1 = simple instanceof A.PseudoSelector && !simple.isClass; + else + t1 = true; + return t1 && this.uniqueSelectors.contains$1(0, simple); + }, + $signature: 14 + }; + A.paths_closure.prototype = { + call$2(paths, choice) { + var t1 = this.T; + t1 = J.expand$1$1$ax(choice, new A.paths__closure(paths, t1), t1._eval$1("List<0>")); + t1 = A.List_List$_of(t1, t1.$ti._eval$1("Iterable.E")); + return t1; + }, + $signature() { + return this.T._eval$1("List>(List>,List<0>)"); + } + }; + A.paths__closure.prototype = { + call$1(option) { + var t1 = this.T; + return J.map$1$1$ax(this.paths, new A.paths___closure(option, t1), t1._eval$1("List<0>")); + }, + $signature() { + return this.T._eval$1("Iterable>(0)"); + } + }; + A.paths___closure.prototype = { + call$1(path) { + var t1 = A.List_List$_of(path, this.T); + t1.push(this.option); + return t1; + }, + $signature() { + return this.T._eval$1("List<0>(List<0>)"); + } + }; + A.listIsSuperselector_closure.prototype = { + call$1(complex1) { + return B.JSArray_methods.any$1(this.list1, new A.listIsSuperselector__closure(complex1)); + }, + $signature: 21 + }; + A.listIsSuperselector__closure.prototype = { + call$1(complex2) { + return complex2.isSuperselector$1(this.complex1); + }, + $signature: 21 + }; + A.complexIsSuperselector_closure.prototype = { + call$1($parent) { + return $parent.combinators.length > 1; + }, + $signature: 54 + }; + A.complexIsSuperselector_closure0.prototype = { + call$1(component) { + return A._isSupercombinator(this.combinator1, A.IterableExtension_get_firstOrNull(component.combinators)); + }, + $signature: 54 + }; + A._compatibleWithPreviousCombinator_closure.prototype = { + call$1(component) { + var t1 = component.combinators, + t2 = A.IterableExtension_get_firstOrNull(t1); + if ((t2 == null ? null : t2.value) !== B.Combinator_98W) { + t1 = A.IterableExtension_get_firstOrNull(t1); + t1 = (t1 == null ? null : t1.value) === B.Combinator_sHB; + } else + t1 = true; + return t1; + }, + $signature: 54 + }; + A.compoundIsSuperselector_closure.prototype = { + call$1(simple1) { + return B.JSArray_methods.any$1(this.compound2.components, simple1.get$isSuperselector()); + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector_closure.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 77 + }; + A._selectorPseudoIsSuperselector_closure0.prototype = { + call$1(complex1) { + var t1, t2; + if (complex1.leadingCombinators.length === 0) { + t1 = A._setArrayType([], type$.JSArray_ComplexSelectorComponent); + t2 = this.parents; + if (t2 != null) + B.JSArray_methods.addAll$1(t1, t2); + t2 = this.compound2; + t1.push(new A.ComplexSelectorComponent(t2, A.List_List$unmodifiable(B.List_empty0, type$.CssValue_Combinator), t2.span)); + t1 = A.complexIsSuperselector(complex1.components, t1); + } else + t1 = false; + return t1; + }, + $signature: 21 + }; + A._selectorPseudoIsSuperselector_closure1.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 77 + }; + A._selectorPseudoIsSuperselector_closure2.prototype = { + call$1(selector2) { + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 77 + }; + A._selectorPseudoIsSuperselector_closure3.prototype = { + call$1(complex) { + if (complex.accept$1(B._IsBogusVisitor_true)) + return false; + return B.JSArray_methods.any$1(this.compound2.components, new A._selectorPseudoIsSuperselector__closure(complex, this.pseudo1)); + }, + $signature: 21 + }; + A._selectorPseudoIsSuperselector__closure.prototype = { + call$1(simple2) { + var t1, selector2, _0_4, _this = this; + $label0$1: { + if (simple2 instanceof A.TypeSelector) { + t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure(simple2)); + break $label0$1; + } + if (simple2 instanceof A.IDSelector) { + t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure0(simple2)); + break $label0$1; + } + selector2 = null; + t1 = false; + if (simple2 instanceof A.PseudoSelector) { + _0_4 = simple2.selector; + if (_0_4 != null) { + selector2 = _0_4 == null ? type$.SelectorList._as(_0_4) : _0_4; + t1 = simple2.name === _this.pseudo1.name; + } + } + if (t1) { + t1 = A.listIsSuperselector(selector2.components, A._setArrayType([_this.complex], type$.JSArray_ComplexSelector)); + break $label0$1; + } + t1 = false; + break $label0$1; + } + return t1; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector___closure.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.TypeSelector) { + t1 = this.simple2.name.$eq(0, simple1.name); + t1 = !t1; + } else + t1 = false; + return t1; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector___closure0.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.IDSelector) + t1 = this.simple2.name !== simple1.name; + else + t1 = false; + return t1; + }, + $signature: 14 + }; + A._selectorPseudoIsSuperselector_closure4.prototype = { + call$1(selector2) { + var t1 = B.C_ListEquality.equals$2(0, this.selector1.components, selector2.components); + return t1; + }, + $signature: 77 + }; + A._selectorPseudoIsSuperselector_closure5.prototype = { + call$1(pseudo2) { + var t1, selector2; + if (!(pseudo2 instanceof A.PseudoSelector)) + return false; + t1 = this.pseudo1; + if (pseudo2.name !== t1.name) + return false; + if (pseudo2.argument != t1.argument) + return false; + selector2 = pseudo2.selector; + if (selector2 == null) + return false; + return A.listIsSuperselector(this.selector1.components, selector2.components); + }, + $signature: 14 + }; + A._selectorPseudoArgs_closure.prototype = { + call$1(pseudo) { + return pseudo.isClass === this.isClass && pseudo.name === this.name; + }, + $signature: 375 + }; + A._selectorPseudoArgs_closure0.prototype = { + call$1(pseudo) { + return pseudo.selector; + }, + $signature: 376 + }; + A.MergedExtension.prototype = { + unmerge$0() { + return new A._SyncStarIterable(this.unmerge$body$MergedExtension(), type$._SyncStarIterable_Extension); + }, + unmerge$body$MergedExtension() { + var $async$self = this; + return function() { + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], right, left; + return function $async$unmerge$0($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + left = $async$self.left; + $async$goto = left instanceof A.MergedExtension ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return $async$iterator._yieldStar$1(left.unmerge$0()); + case 5: + // after yield + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 6; + return $async$iterator._async$_current = left, 1; + case 6: + // after yield + case 3: + // join + right = $async$self.right; + $async$goto = right instanceof A.MergedExtension ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return $async$iterator._yieldStar$1(right.unmerge$0()); + case 10: + // after yield + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = 11; + return $async$iterator._async$_current = right, 1; + case 11: + // after yield + case 8: + // join + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + } + }; + A.ExtendMode.prototype = { + _enumToString$0() { + return "ExtendMode." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.globalFunctions_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).get$isTruthy() ? t1.$index($arguments, 1) : t1.$index($arguments, 2); + }, + $signature: 5 + }; + A.global_closure0.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_i0P, "red")); + }, + $signature: 66 + }; + A.global_closure1.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_i0P, "green")); + }, + $signature: 66 + }; + A.global_closure2.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_i0P, "blue")); + }, + $signature: 66 + }; + A.global_closure3.prototype = { + call$1($arguments) { + return A._rgb("rgb", $arguments); + }, + $signature: 5 + }; + A.global_closure4.prototype = { + call$1($arguments) { + return A._rgb("rgb", $arguments); + }, + $signature: 5 + }; + A.global_closure5.prototype = { + call$1($arguments) { + return A._rgbTwoArg("rgb", $arguments); + }, + $signature: 5 + }; + A.global_closure6.prototype = { + call$1($arguments) { + return A._parseChannels("rgb", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_i0P); + }, + $signature: 5 + }; + A.global_closure7.prototype = { + call$1($arguments) { + return A._rgb("rgba", $arguments); + }, + $signature: 5 + }; + A.global_closure8.prototype = { + call$1($arguments) { + return A._rgb("rgba", $arguments); + }, + $signature: 5 + }; + A.global_closure9.prototype = { + call$1($arguments) { + return A._rgbTwoArg("rgba", $arguments); + }, + $signature: 5 + }; + A.global_closure10.prototype = { + call$1($arguments) { + return A._parseChannels("rgba", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_i0P); + }, + $signature: 5 + }; + A.global_closure11.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (!(t1.$index($arguments, 0) instanceof A.SassNumber) && !t1.$index($arguments, 0).get$isSpecialNumber()) + A.warnForDeprecation(string$.Globalci, B.Deprecation_WW3); + return A._invert($arguments, true); + }, + $signature: 5 + }; + A.global_closure12.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_JQ2, "hue"); + }, + $signature: 45 + }; + A.global_closure13.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_JQ2, "saturation"); + }, + $signature: 45 + }; + A.global_closure14.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_JQ2, "lightness"); + }, + $signature: 45 + }; + A.global_closure15.prototype = { + call$1($arguments) { + return A._hsl("hsl", $arguments); + }, + $signature: 5 + }; + A.global_closure16.prototype = { + call$1($arguments) { + return A._hsl("hsl", $arguments); + }, + $signature: 5 + }; + A.global_closure17.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isSpecialVariable() || t1.$index($arguments, 1).get$isSpecialVariable()) + return A._functionString("hsl", $arguments); + else + throw A.wrapException(A.SassScriptException$("Missing argument $lightness.", null)); + }, + $signature: 19 + }; + A.global_closure18.prototype = { + call$1($arguments) { + return A._parseChannels("hsl", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_JQ2); + }, + $signature: 5 + }; + A.global_closure19.prototype = { + call$1($arguments) { + return A._hsl("hsla", $arguments); + }, + $signature: 5 + }; + A.global_closure20.prototype = { + call$1($arguments) { + return A._hsl("hsla", $arguments); + }, + $signature: 5 + }; + A.global_closure21.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isSpecialVariable() || t1.$index($arguments, 1).get$isSpecialVariable()) + return A._functionString("hsla", $arguments); + else + throw A.wrapException(A.SassScriptException$("Missing argument $lightness.", null)); + }, + $signature: 19 + }; + A.global_closure22.prototype = { + call$1($arguments) { + return A._parseChannels("hsla", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_JQ2); + }, + $signature: 5 + }; + A.global_closure23.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString("grayscale", $arguments); + else { + A.warnForDeprecation(string$.Globalcg, B.Deprecation_WW3); + return A._grayscale(t1.$index($arguments, 0)); + } + }, + $signature: 5 + }; + A.global_closure24.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + degrees = A._angleValue(t1.$index($arguments, 1), "degrees"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.adjusto, null)); + A.warnForDeprecation(string$.adjustd + A.serializeValue(A.SassNumber_SassNumber(degrees, "deg"), false, true) + string$.x29x0a_Mor_, B.Deprecation_zUK); + return color.changeHsl$1$hue(color._legacyChannel$2(B.HslColorSpace_JQ2, "hue") + degrees); + }, + $signature: 23 + }; + A.global_closure25.prototype = { + call$1($arguments) { + var result, + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.lighte, null)); + t1 = color._legacyChannel$2(B.HslColorSpace_JQ2, _s9_) + amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation("lighten() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_zUK); + return result; + }, + $signature: 23 + }; + A.global_closure26.prototype = { + call$1($arguments) { + var result, + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.darken, null)); + t1 = color._legacyChannel$2(B.HslColorSpace_JQ2, _s9_) - amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation("darken() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_zUK); + return result; + }, + $signature: 23 + }; + A.global_closure27.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString("saturate", $arguments); + return new A.SassString("saturate(" + A.serializeValue(t1.$index($arguments, 0).assertNumber$1("amount"), false, true) + ")", false); + }, + $signature: 19 + }; + A.global_closure28.prototype = { + call$1($arguments) { + var t1, color, amount, result, + _s10_ = "saturation"; + A.warnForDeprecation(string$.Globalcad, B.Deprecation_WW3); + t1 = J.getInterceptor$asx($arguments); + color = t1.$index($arguments, 0).assertColor$1("color"); + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.satura, null)); + t1 = color._legacyChannel$2(B.HslColorSpace_JQ2, _s10_) + amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation("saturate() is deprecated. " + A._suggestScaleAndAdjust(color, amount._number$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_zUK); + return result; + }, + $signature: 23 + }; + A.global_closure29.prototype = { + call$1($arguments) { + var result, + _s10_ = "saturation", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.desatu, null)); + t1 = color._legacyChannel$2(B.HslColorSpace_JQ2, _s10_) - amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation("desaturate() is deprecated. " + A._suggestScaleAndAdjust(color, -amount._number$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_zUK); + return result; + }, + $signature: 23 + }; + A.global_closure30.prototype = { + call$1($arguments) { + return A._opacify("opacify", $arguments); + }, + $signature: 23 + }; + A.global_closure31.prototype = { + call$1($arguments) { + return A._opacify("fade-in", $arguments); + }, + $signature: 23 + }; + A.global_closure32.prototype = { + call$1($arguments) { + return A._transparentize("transparentize", $arguments); + }, + $signature: 23 + }; + A.global_closure33.prototype = { + call$1($arguments) { + return A._transparentize("fade-out", $arguments); + }, + $signature: 23 + }; + A.global_closure34.prototype = { + call$1($arguments) { + var _0_0 = J.$index$asx($arguments, 0), + t1 = false; + if (_0_0 instanceof A.SassString) + if (!_0_0._hasQuotes) + t1 = B.JSString_methods.contains$1(_0_0._string$_text, $.$get$_microsoftFilterStart()); + if (t1) + return A._functionString("alpha", $arguments); + if (_0_0 instanceof A.SassColor && !_0_0._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.alpha_, null)); + A.warnForDeprecation(string$.Globalcal, B.Deprecation_WW3); + t1 = _0_0.assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + }, + $signature: 5 + }; + A.global_closure35.prototype = { + call$1($arguments) { + var t1, + argList = J.$index$asx($arguments, 0).get$asList(); + if (argList.length !== 0 && B.JSArray_methods.every$1(argList, new A.global__closure())) + return A._functionString("alpha", $arguments); + t1 = argList.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$("Missing argument $color.", null)); + else + throw A.wrapException(A.SassScriptException$("Only 1 argument allowed, but " + t1 + " were passed.", null)); + }, + $signature: 19 + }; + A.global__closure.prototype = { + call$1(argument) { + return argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart()); + }, + $signature: 79 + }; + A.global_closure36.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString("opacity", $arguments); + A.warnForDeprecation(string$.Globalco, B.Deprecation_WW3); + t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + }, + $signature: 5 + }; + A.global_closure37.prototype = { + call$1($arguments) { + return A._parseChannels("color", J.$index$asx($arguments, 0), "description", null); + }, + $signature: 5 + }; + A.global_closure38.prototype = { + call$1($arguments) { + return A._parseChannels("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_guQ); + }, + $signature: 5 + }; + A.global_closure39.prototype = { + call$1($arguments) { + return A._parseChannels("lab", J.$index$asx($arguments, 0), "channels", B.LabColorSpace_2nT); + }, + $signature: 5 + }; + A.global_closure40.prototype = { + call$1($arguments) { + return A._parseChannels("lch", J.$index$asx($arguments, 0), "channels", B.LchColorSpace_Bpv); + }, + $signature: 5 + }; + A.global_closure41.prototype = { + call$1($arguments) { + return A._parseChannels("oklab", J.$index$asx($arguments, 0), "channels", B.OklabColorSpace_540); + }, + $signature: 5 + }; + A.global_closure42.prototype = { + call$1($arguments) { + return A._parseChannels("oklch", J.$index$asx($arguments, 0), "channels", B.OklchColorSpace_9Gj); + }, + $signature: 5 + }; + A.module_closure1.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_i0P, "red")); + }, + $signature: 66 + }; + A.module_closure2.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_i0P, "green")); + }, + $signature: 66 + }; + A.module_closure3.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._legacyChannel$2(B.RgbColorSpace_i0P, "blue")); + }, + $signature: 66 + }; + A.module_closure4.prototype = { + call$1($arguments) { + var result = A._invert($arguments, false); + if (result instanceof A.SassString) + A.warnForDeprecation("Passing a number (" + J.$index$asx($arguments, 0).toString$0(0) + string$.x29x20to_cli + result.toString$0(0), B.Deprecation_7Bn); + return result; + }, + $signature: 5 + }; + A.module_closure5.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_JQ2, "hue"); + }, + $signature: 45 + }; + A.module_closure6.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_JQ2, "saturation"); + }, + $signature: 45 + }; + A.module_closure7.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HslColorSpace_JQ2, "lightness"); + }, + $signature: 45 + }; + A.module_closure8.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber) { + result = A._functionString("grayscale", t1.take$1($arguments, 1)); + A.warnForDeprecation("Passing a number (" + t1.$index($arguments, 0).toString$0(0) + string$.x29x20to_clg + result.toString$0(0), B.Deprecation_7Bn); + return result; + } + return A._grayscale(t1.$index($arguments, 0)); + }, + $signature: 5 + }; + A.module_closure9.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = type$.JSArray_Value; + return A._parseChannels("hwb", A.SassList$(A._setArrayType([A.SassList$(A._setArrayType([t1.$index($arguments, 0), t1.$index($arguments, 1), t1.$index($arguments, 2)], t2), B.ListSeparator_SrV, false), t1.$index($arguments, 3)], t2), B.ListSeparator_Lul, false), null, B.HwbColorSpace_guQ); + }, + $signature: 5 + }; + A.module_closure10.prototype = { + call$1($arguments) { + return A._parseChannels("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_guQ); + }, + $signature: 5 + }; + A.module_closure11.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HwbColorSpace_guQ, "whiteness"); + }, + $signature: 45 + }; + A.module_closure12.prototype = { + call$1(color) { + return color._legacyChannel$2(B.HwbColorSpace_guQ, "blackness"); + }, + $signature: 45 + }; + A.module_closure13.prototype = { + call$1($arguments) { + var result, + _0_0 = J.$index$asx($arguments, 0), + t1 = false; + if (_0_0 instanceof A.SassString) + if (!_0_0._hasQuotes) + t1 = B.JSString_methods.contains$1(_0_0._string$_text, $.$get$_microsoftFilterStart()); + if (t1) { + result = A._functionString("alpha", $arguments); + A.warnForDeprecation(string$.Using_c + result.toString$0(0), B.Deprecation_7Bn); + return result; + } + if (_0_0 instanceof A.SassColor && !_0_0._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.color_a, null)); + t1 = _0_0.assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + }, + $signature: 5 + }; + A.module_closure14.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (B.JSArray_methods.every$1(t1.$index($arguments, 0).get$asList(), new A.module__closure2())) { + result = A._functionString("alpha", $arguments); + A.warnForDeprecation(string$.Using_c + result.toString$0(0), B.Deprecation_7Bn); + return result; + } + throw A.wrapException(A.SassScriptException$("Only 1 argument allowed, but " + t1.get$length($arguments) + " were passed.", null)); + }, + $signature: 19 + }; + A.module__closure2.prototype = { + call$1(argument) { + return argument instanceof A.SassString && !argument._hasQuotes && B.JSString_methods.contains$1(argument._string$_text, $.$get$_microsoftFilterStart()); + }, + $signature: 79 + }; + A.module_closure15.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber) { + result = A._functionString("opacity", $arguments); + A.warnForDeprecation("Passing a number (" + t1.$index($arguments, 0).toString$0(0) + string$.x20to_co + result.toString$0(0), B.Deprecation_7Bn); + return result; + } + t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + }, + $signature: 5 + }; + A.module_closure16.prototype = { + call$1($arguments) { + return new A.SassString(J.get$first$ax($arguments).assertColor$1("color")._space.name, false); + }, + $signature: 19 + }; + A.module_closure17.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 1), false); + }, + $signature: 23 + }; + A.module_closure18.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertColor$1("color")._space.get$isLegacyInternal() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A.module_closure19.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertColor$1("color").isChannelMissing$3$channelName$colorName(A._channelName(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A.module_closure20.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 1), true).get$isInGamut() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A.module_closure21.prototype = { + call$1($arguments) { + var space, method, _s5_ = "space", _s6_ = "method", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + t2 = t1.$index($arguments, 1); + if (t2.$eq(0, B.C__SassNull)) + space = color._space; + else { + t2 = t2.assertString$1(_s5_); + t2.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName(t2._string$_text, _s5_); + } + if (t1.$index($arguments, 2).$eq(0, B.C__SassNull)) + throw A.wrapException(A.SassScriptException$(string$.color_t, _s6_)); + t1 = t1.$index($arguments, 2).assertString$1(_s6_); + t1.assertUnquoted$1(_s6_); + method = A.GamutMapMethod_GamutMapMethod$fromName(t1._string$_text); + if (!space.get$isBoundedInternal()) + return color; + t1 = color.toSpace$1(space); + t1 = t1.get$isInGamut() ? t1 : method.map$1(0, t1); + return t1.toSpace$2$legacyMissing(color._space, false); + }, + $signature: 23 + }; + A.module_closure22.prototype = { + call$1($arguments) { + var channelIndex, channelInfo, channelValue, unit, + t1 = J.getInterceptor$asx($arguments), + color = A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 2), true), + channelName = A._channelName(t1.$index($arguments, 1)); + if (channelName === "alpha") { + t1 = color.alphaOrNull; + return A.SassNumber_SassNumber(t1 == null ? 0 : t1, null); + } + t1 = color._space._channels; + channelIndex = B.JSArray_methods.indexWhere$1(t1, new A.module__closure1(channelName)); + if (channelIndex === -1) + throw A.wrapException(A.SassScriptException$("Color " + color.toString$0(0) + " has no channel named " + channelName + ".", "channel")); + channelInfo = t1[channelIndex]; + channelValue = color.get$channels()[channelIndex]; + unit = channelInfo.associatedUnit; + return A.SassNumber_SassNumber(unit === "%" ? channelValue * 100 / type$.LinearChannel._as(channelInfo).max : channelValue, unit); + }, + $signature: 24 + }; + A.module__closure1.prototype = { + call$1(channel) { + return channel.name === this.channelName; + }, + $signature: 93 + }; + A.module_closure23.prototype = { + call$1($arguments) { + var t2, t3, + t1 = J.getInterceptor$asx($arguments), + color1 = t1.$index($arguments, 0).assertColor$1("color1"), + color2 = t1.$index($arguments, 1).assertColor$1("color2"); + t1 = new A.module_closure_toXyzNoMissing(); + if (color1._space === color2._space) { + t1 = color1.channel0OrNull; + t2 = false; + if (t1 == null) + t1 = 0; + t3 = color2.channel0OrNull; + if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { + t1 = color1.channel1OrNull; + if (t1 == null) + t1 = 0; + t3 = color2.channel1OrNull; + if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { + t1 = color1.channel2OrNull; + if (t1 == null) + t1 = 0; + t3 = color2.channel2OrNull; + if (A.fuzzyEquals(t1, t3 == null ? 0 : t3)) { + t1 = color1.alphaOrNull; + if (t1 == null) + t1 = 0; + t2 = color2.alphaOrNull; + t1 = A.fuzzyEquals(t1, t2 == null ? 0 : t2); + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = J.$eq$(t1.call$1(color1), t1.call$1(color2)); + return t1 ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A.module_closure_toXyzNoMissing.prototype = { + call$1(color) { + var _1_1, _1_3, t1, _1_7, channel0, _1_8, channel1, _1_9, channel2, _1_10, alpha, _null = null; + $label0$0: { + _1_1 = color._space; + _1_3 = B.XyzD65ColorSpace_WiJ === _1_1; + t1 = _1_3; + if (t1) + t1 = !(color.channel0OrNull == null || color.channel1OrNull == null || color.channel2OrNull == null || color.alphaOrNull == null); + else + t1 = false; + if (t1) { + t1 = color; + break $label0$0; + } + if (_1_3) { + _1_7 = color.channel0OrNull; + if (_1_7 == null) + _1_7 = 0; + channel0 = _1_7; + _1_8 = color.channel1OrNull; + if (_1_8 == null) + _1_8 = 0; + channel1 = _1_8; + _1_9 = color.channel2OrNull; + if (_1_9 == null) + _1_9 = 0; + channel2 = _1_9; + _1_10 = color.alphaOrNull; + if (_1_10 == null) + _1_10 = 0; + alpha = _1_10; + t1 = A.SassColor$_forSpace(B.XyzD65ColorSpace_WiJ, channel0, channel1, channel2, alpha, _null); + break $label0$0; + } + _1_7 = color.channel0OrNull; + if (_1_7 == null) + _1_7 = 0; + channel0 = _1_7; + _1_8 = color.channel1OrNull; + if (_1_8 == null) + _1_8 = 0; + channel1 = _1_8; + _1_9 = color.channel2OrNull; + if (_1_9 == null) + _1_9 = 0; + channel2 = _1_9; + _1_10 = color.alphaOrNull; + if (_1_10 == null) + _1_10 = 0; + alpha = _1_10; + t1 = _1_1.convert$5(B.XyzD65ColorSpace_WiJ, channel0, channel1, channel2, alpha); + break $label0$0; + } + return t1; + }, + $signature: 421 + }; + A.module_closure24.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace(t1.$index($arguments, 0), t1.$index($arguments, 2), true).isChannelPowerless$3$channelName$colorName(A._channelName(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._mix_closure.prototype = { + call$1($arguments) { + var _s6_ = "weight", + _s41_ = string$.To_usem, + _s29_ = ", you must provide a $method.", + t1 = J.getInterceptor$asx($arguments), + color1 = t1.$index($arguments, 0).assertColor$1("color1"), + color2 = t1.$index($arguments, 1).assertColor$1("color2"), + weight = t1.$index($arguments, 2).assertNumber$1(_s6_); + if (!t1.$index($arguments, 3).$eq(0, B.C__SassNull)) + return color1.interpolate$4$legacyMissing$weight(color2, A.InterpolationMethod_InterpolationMethod$fromValue(t1.$index($arguments, 3), "method"), false, weight.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100); + A._checkPercent(weight, _s6_); + if (!color1._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(_s41_ + color1.toString$0(0) + _s29_, "color1")); + else if (!color2._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(_s41_ + color2.toString$0(0) + _s29_, "color2")); + return A._mixLegacy(color1, color2, weight); + }, + $signature: 23 + }; + A._complement_closure.prototype = { + call$1($arguments) { + var space, t3, colorInSpace, t4, t5, t6, _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + t2 = color._space; + if (t2.get$isLegacyInternal() && t1.$index($arguments, 1).$eq(0, B.C__SassNull)) + space = B.HslColorSpace_JQ2; + else { + t3 = t1.$index($arguments, 1).assertString$1(_s5_); + t3.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName(t3._string$_text, _s5_); + } + if (!space.get$isPolarInternal()) + throw A.wrapException(A.SassScriptException$("Color space " + space.toString$0(0) + " doesn't have a hue channel.", _s5_)); + colorInSpace = color.toSpace$2$legacyMissing(space, !t1.$index($arguments, 1).$eq(0, B.C__SassNull)); + t1 = space._channels; + t3 = colorInSpace.channel0OrNull; + t4 = colorInSpace.channel1OrNull; + t5 = colorInSpace.channel2OrNull; + t6 = colorInSpace.alphaOrNull; + return (space.get$isLegacyInternal() ? A.SassColor_SassColor$forSpaceInternal(space, A._adjustChannel(colorInSpace, t1[0], t3, A.SassNumber_SassNumber(180, null)), t4, t5, t6) : A.SassColor_SassColor$forSpaceInternal(space, t3, t4, A._adjustChannel(colorInSpace, t1[2], t5, A.SassNumber_SassNumber(180, null)), t6)).toSpace$2$legacyMissing(t2, false); + }, + $signature: 23 + }; + A._adjust_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, true, false, false); + }, + $signature: 23 + }; + A._scale_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, false, false, true); + }, + $signature: 23 + }; + A._change_closure.prototype = { + call$1($arguments) { + return A._updateComponents($arguments, false, true, false); + }, + $signature: 23 + }; + A._ieHexStr_closure.prototype = { + call$1($arguments) { + var t1, t2, t3, t4, t5, + color = J.$index$asx($arguments, 0).assertColor$1("color").toSpace$1(B.RgbColorSpace_i0P); + color = color.get$isInGamut() ? color : B.LocalMindeGamutMap_A2x.map$1(0, color); + t1 = new A._ieHexStr_closure_hexString(); + t2 = color.alphaOrNull; + t2 = A.S(t1.call$1((t2 == null ? 0 : t2) * 255)); + t3 = color.channel0OrNull; + t3 = A.S(t1.call$1(t3 == null ? 0 : t3)); + t4 = color.channel1OrNull; + t4 = A.S(t1.call$1(t4 == null ? 0 : t4)); + t5 = color.channel2OrNull; + return new A.SassString("#" + t2 + t3 + t4 + A.S(t1.call$1(t5 == null ? 0 : t5)), false); + }, + $signature: 19 + }; + A._ieHexStr_closure_hexString.prototype = { + call$1(component) { + return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(A.fuzzyRound(component), 16), 2, "0").toUpperCase(); + }, + $signature: 275 + }; + A._updateComponents_closure.prototype = { + call$1(space) { + return this.originalColor.toSpace$2$legacyMissing(space, false); + }, + $signature: 428 + }; + A._updateComponents_closure0.prototype = { + call$1(info) { + return this._box_0.name === info.name; + }, + $signature: 93 + }; + A._changeColor_closure.prototype = { + call$0() { + var t1 = this.alphaArg; + A.warnForDeprecation("$alpha: Passing a unit other than % (" + t1.toString$0(0) + string$.x29x20is_d_ + t1.unitSuggestion$1("alpha") + string$.x0a_See_, B.Deprecation_7TE); + return t1.valueInRange$3(0, 1, "alpha"); + }, + $signature: 240 + }; + A._adjustColor_closure.prototype = { + call$1(alpha) { + return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); + }, + $signature: 12 + }; + A._functionString_closure.prototype = { + call$1(argument) { + return A.serializeValue(argument, false, true); + }, + $signature: 458 + }; + A._removedColorFunction_closure.prototype = { + call$1($arguments) { + var t1 = this.name, + t2 = J.getInterceptor$asx($arguments), + t3 = t2.$index($arguments, 0).toString$0(0), + t4 = this.negative ? "-" : ""; + throw A.wrapException(A.SassScriptException$("The function " + t1 + string$.x28__isn + t3 + ", $" + this.argument + ": " + t4 + t2.$index($arguments, 1).toString$0(0) + string$.x29x0a_Moro + t1, null)); + }, + $signature: 463 + }; + A._rgb_closure.prototype = { + call$1(alpha) { + var t1 = A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); + return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); + }, + $signature: 245 + }; + A._hsl_closure.prototype = { + call$1(alpha) { + var t1 = A._percentageOrUnitless(alpha.assertNumber$1("alpha"), 1, "alpha"); + return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); + }, + $signature: 245 + }; + A._parseChannels_closure.prototype = { + call$1($name) { + return $name + " channel"; + }, + $signature: 6 + }; + A._parseChannels_closure0.prototype = { + call$1(channel) { + return channel.get$isSpecialNumber(); + }, + $signature: 79 + }; + A._colorFromChannels_closure.prototype = { + call$1(channel0) { + return A._angleValue(channel0, "hue"); + }, + $signature: 129 + }; + A._colorFromChannels_closure0.prototype = { + call$1(channel0) { + return A._angleValue(channel0, "hue"); + }, + $signature: 129 + }; + A._channelFromValue_closure.prototype = { + call$1(value) { + var t1, _0_8, t2, _0_5, _0_8_isSet, upperClamped, t3, + _0_0 = this.channel; + $label0$0: { + t1 = _0_0 instanceof A.LinearChannel; + if (t1 && _0_0.requiresPercent && !value.hasUnit$1("%")) + A.throwExpression(A.SassScriptException$("Expected " + value.toString$0(0) + ' to have unit "%".', _0_0.name)); + _0_8 = null; + t2 = false; + if (t1) { + _0_5 = _0_0.lowerClamped; + _0_8_isSet = !_0_5; + if (_0_8_isSet) { + _0_8 = _0_0.upperClamped; + t2 = !_0_8; + } + } else { + _0_5 = null; + _0_8_isSet = false; + } + if (t2) { + t1 = A._percentageOrUnitless(value, _0_0.max, _0_0.name); + break $label0$0; + } + if (t1 && !this.clamp) { + t1 = A._percentageOrUnitless(value, _0_0.max, _0_0.name); + break $label0$0; + } + if (t1) { + upperClamped = _0_8_isSet ? _0_8 : _0_0.upperClamped; + t1 = _0_0.max; + t2 = A._percentageOrUnitless(value, t1, _0_0.name); + t3 = _0_5 ? _0_0.min : -1 / 0; + t1 = upperClamped ? t1 : 1 / 0; + t1 = isNaN(t2) ? t3 : B.JSNumber_methods.clamp$2(t2, t3, t1); + break $label0$0; + } + t1 = B.JSNumber_methods.$mod(value.coerceValueToUnit$2("deg", _0_0.name), 360); + break $label0$0; + } + return t1; + }, + $signature: 129 + }; + A._channelFunction_closure.prototype = { + call$1($arguments) { + var _this = this, + result = A.SassNumber_SassNumber(_this.getter.call$1(J.get$first$ax($arguments).assertColor$1("color")), _this.unit), + t1 = _this.global ? "" : "color.", + t2 = _this.name; + A.warnForDeprecation(t1 + t2 + string$.x28__is_d + t2 + '", $space: ' + _this.space.toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_zUK); + return result; + }, + $signature: 24 + }; + A._suggestScaleAndAdjust_closure.prototype = { + call$1(channel) { + return channel.name === this.channelName; + }, + $signature: 93 + }; + A._length_closure0.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(J.$index$asx($arguments, 0).get$asList().length, null); + }, + $signature: 24 + }; + A._nth_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1); + return list.get$asList()[list.sassIndexToListIndex$2(index, "n")]; + }, + $signature: 5 + }; + A._setNth_closure.prototype = { + call$1($arguments) { + var newList, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1), + value = t1.$index($arguments, 2); + t1 = list.get$asList(); + newList = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + newList[list.sassIndexToListIndex$2(index, "n")] = value; + return list.withListContents$1(newList); + }, + $signature: 28 + }; + A._join_closure.prototype = { + call$1($arguments) { + var _0_1, _0_4, _0_3, t2, _0_40, _0_4_isSet, separator, bracketed, _null = null, + t1 = J.getInterceptor$asx($arguments), + list1 = t1.$index($arguments, 0), + list2 = t1.$index($arguments, 1), + separatorParam = t1.$index($arguments, 2).assertString$1("separator"), + bracketedParam = t1.$index($arguments, 3), + _1_0 = separatorParam._string$_text; + $label1$1: { + if ("auto" === _1_0) { + _0_1 = list1.get$separator(list1); + _0_4 = list2.get$separator(list2); + $label0$0: { + t1 = _null; + _0_3 = B.ListSeparator_undecided_null_3_undecided === _0_1; + t2 = _0_3; + if (t2) { + t2 = B.ListSeparator_undecided_null_3_undecided === _0_4; + _0_40 = _0_4; + _0_4_isSet = true; + } else { + _0_40 = _null; + _0_4_isSet = false; + t2 = false; + } + if (t2) { + t1 = B.ListSeparator_SrV; + break $label0$0; + } + if (_0_3) { + separator = _0_4_isSet ? _0_40 : _0_4; + t2 = true; + } else { + separator = t1; + t2 = false; + } + if (!t2) + separator = _0_1; + t1 = separator; + break $label0$0; + } + break $label1$1; + } + if ("space" === _1_0) { + t1 = B.ListSeparator_SrV; + break $label1$1; + } + if ("comma" === _1_0) { + t1 = B.ListSeparator_z0K; + break $label1$1; + } + if ("slash" === _1_0) { + t1 = B.ListSeparator_Lul; + break $label1$1; + } + t1 = A.throwExpression(A.SassScriptException$(string$.x24separ, _null)); + } + bracketed = bracketedParam instanceof A.SassString && bracketedParam._string$_text === "auto" ? list1.get$hasBrackets() : bracketedParam.get$isTruthy(); + t2 = A.List_List$_of(list1.get$asList(), type$.Value); + B.JSArray_methods.addAll$1(t2, list2.get$asList()); + return A.SassList$(t2, t1, bracketed); + }, + $signature: 28 + }; + A._append_closure0.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + value = t1.$index($arguments, 1), + _0_0 = t1.$index($arguments, 2).assertString$1("separator")._string$_text; + $label0$0: { + if ("auto" === _0_0) { + t1 = list.get$separator(list) === B.ListSeparator_undecided_null_3_undecided ? B.ListSeparator_SrV : list.get$separator(list); + break $label0$0; + } + if ("space" === _0_0) { + t1 = B.ListSeparator_SrV; + break $label0$0; + } + if ("comma" === _0_0) { + t1 = B.ListSeparator_z0K; + break $label0$0; + } + if ("slash" === _0_0) { + t1 = B.ListSeparator_Lul; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$(string$.x24separ, null)); + } + t2 = A.List_List$_of(list.get$asList(), type$.Value); + t2.push(value); + return list.withListContents$2$separator(t2, t1); + }, + $signature: 28 + }; + A._zip_closure.prototype = { + call$1($arguments) { + var results, result, _box_0 = {}, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,List>"), + lists = A.List_List$_of(new A.MappedListIterable(t1, new A._zip__closure(), t2), t2._eval$1("ListIterable.E")); + if (lists.length === 0) + return B.SassList_oH0; + _box_0.i = 0; + results = A._setArrayType([], type$.JSArray_SassList); + for (t1 = A._arrayInstanceType(lists)._eval$1("MappedListIterable<1,Value>"), t2 = type$.Value; B.JSArray_methods.every$1(lists, new A._zip__closure0(_box_0));) { + result = A.List_List$from(new A.MappedListIterable(lists, new A._zip__closure1(_box_0), t1), false, t2); + result.$flags = 3; + results.push(new A.SassList(result, B.ListSeparator_SrV, false)); + ++_box_0.i; + } + return A.SassList$(results, B.ListSeparator_z0K, false); + }, + $signature: 28 + }; + A._zip__closure.prototype = { + call$1(list) { + return list.get$asList(); + }, + $signature: 509 + }; + A._zip__closure0.prototype = { + call$1(list) { + return this._box_0.i !== J.get$length$asx(list); + }, + $signature: 586 + }; + A._zip__closure1.prototype = { + call$1(list) { + return J.$index$asx(list, this._box_0.i); + }, + $signature: 5 + }; + A._index_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + index = B.JSArray_methods.indexOf$1(t1.$index($arguments, 0).get$asList(), t1.$index($arguments, 1)); + return index === -1 ? B.C__SassNull : A.SassNumber_SassNumber(index + 1, null); + }, + $signature: 5 + }; + A._separator_closure.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0), + _0_0 = t1.get$separator(t1); + $label0$0: { + if (B.ListSeparator_z0K === _0_0) { + t1 = new A.SassString("comma", false); + break $label0$0; + } + if (B.ListSeparator_Lul === _0_0) { + t1 = new A.SassString("slash", false); + break $label0$0; + } + t1 = new A.SassString("space", false); + break $label0$0; + } + return t1; + }, + $signature: 19 + }; + A._isBracketed_closure.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).get$hasBrackets() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._slash_closure.prototype = { + call$1($arguments) { + var list = J.$index$asx($arguments, 0).get$asList(); + if (list.length < 2) + throw A.wrapException(A.SassScriptException$("At least two elements are required.", null)); + return A.SassList$(list, B.ListSeparator_Lul, false); + }, + $signature: 28 + }; + A._get_closure.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap)) + return B.C__SassNull; + } + t1 = map._map$_contents.$index(0, B.JSArray_methods.get$last(t2)); + return t1 == null ? B.C__SassNull : t1; + }, + $signature: 5 + }; + A._set_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._modify(t1.$index($arguments, 0).assertMap$1("map"), A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value), new A._set__closure0($arguments), true); + }, + $signature: 5 + }; + A._set__closure0.prototype = { + call$1(_) { + return J.$index$asx(this.$arguments, 2); + }, + $signature: 43 + }; + A._set_closure0.prototype = { + call$1($arguments) { + var keys, t2, t3, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + _0_0 = t1.$index($arguments, 1).get$asList(), + _0_1 = _0_0.length; + if (_0_1 <= 0) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a key.", null)); + if (_0_1 === 1) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a value.", null)); + t1 = {}; + keys = t1.value = null; + t2 = _0_1 >= 1; + if (t2) { + t3 = _0_1 - 1; + keys = B.JSArray_methods.sublist$2(_0_0, 0, t3); + t1.value = _0_0[t3]; + } + if (t2) + return A._modify(map, keys, new A._set__closure(t1), true); + throw A.wrapException("[BUG] Unreachable code"); + }, + $signature: 5 + }; + A._set__closure.prototype = { + call$1(_) { + return this._box_0.value; + }, + $signature: 43 + }; + A._merge_closure.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + map2 = t1.$index($arguments, 1).assertMap$1("map2"); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(map1._map$_contents, t1, t1); + t2.addAll$1(0, map2._map$_contents); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._merge_closure0.prototype = { + call$1($arguments) { + var last, t2, keys, _null = null, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + _0_0 = t1.$index($arguments, 1).get$asList(), + _0_1 = _0_0.length; + if (_0_1 <= 0) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a key.", _null)); + if (_0_1 === 1) + throw A.wrapException(A.SassScriptException$("Expected $args to contain a map.", _null)); + t1 = _0_1 >= 1; + last = _null; + if (t1) { + t2 = _0_1 - 1; + keys = B.JSArray_methods.sublist$2(_0_0, 0, t2); + last = _0_0[t2]; + } else + keys = _null; + if (t1) + return A._modify(map1, keys, new A._merge__closure(last.assertMap$1("map2")), true); + throw A.wrapException("[BUG] Unreachable code"); + }, + $signature: 5 + }; + A._merge__closure.prototype = { + call$1(oldValue) { + var t1, t2, + nestedMap = oldValue.tryMap$0(); + if (nestedMap == null) + return this.map2; + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map$_contents, t1, t1); + t2.addAll$1(0, this.map2._map$_contents); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 654 + }; + A._deepMerge_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._deepMergeImpl(t1.$index($arguments, 0).assertMap$1("map1"), t1.$index($arguments, 1).assertMap$1("map2")); + }, + $signature: 38 + }; + A._deepRemove_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + return A._modify(map, A.IterableExtension_get_exceptLast(t2), new A._deepRemove__closure(t2), false); + }, + $signature: 5 + }; + A._deepRemove__closure.prototype = { + call$1(value) { + var t1, nestedMap, t2, + _0_0 = value.tryMap$0(); + if (_0_0 != null) { + t1 = _0_0._map$_contents.containsKey$1(B.JSArray_methods.get$last(this.keys)); + nestedMap = _0_0; + } else { + nestedMap = null; + t1 = false; + } + if (t1) { + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map$_contents, t1, t1); + t2.remove$1(0, B.JSArray_methods.get$last(this.keys)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } + return value; + }, + $signature: 43 + }; + A._remove_closure.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertMap$1("map"); + }, + $signature: 38 + }; + A._remove_closure0.prototype = { + call$1($arguments) { + var mutableMap, t3, _i, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + t1 = type$.Value; + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map$_contents, t1, t1); + for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) + mutableMap.remove$1(0, t2[_i]); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 38 + }; + A._keys_closure.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map$_contents; + return A.SassList$(t1.get$keys(t1), B.ListSeparator_z0K, false); + }, + $signature: 28 + }; + A._values_closure.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map$_contents; + return A.SassList$(t1.get$values(t1), B.ListSeparator_z0K, false); + }, + $signature: 28 + }; + A._hasKey_closure.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap)) + return B.SassBoolean_false; + } + return map._map$_contents.containsKey$1(B.JSArray_methods.get$last(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._modify_modifyNestedMap.prototype = { + call$1(map) { + var nestedMap, _this = this, + t1 = type$.Value, + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map$_contents, t1, t1), + t2 = _this.keyIterator, + key = t2.get$current(t2); + if (!t2.moveNext$0()) { + t2 = mutableMap.$index(0, key); + if (t2 == null) + t2 = B.C__SassNull; + mutableMap.$indexSet(0, key, _this.modify.call$1(t2)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + } + t2 = mutableMap.$index(0, key); + nestedMap = t2 == null ? null : t2.tryMap$0(); + t2 = nestedMap == null; + if (t2 && !_this.addNesting) + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + mutableMap.$indexSet(0, key, _this.call$1(t2 ? B.SassMap_Map_empty : nestedMap)); + return new A.SassMap(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 671 + }; + A.global_closure.prototype = { + call$1($arguments) { + var t1, + number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.hasUnit$1("%")) + A.warnForDeprecation(string$.Passinp + number.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + number.toString$0(0) + string$.x7dx29_Mor, B.Deprecation_Usi); + else + A.warnForDeprecation(string$.Globalm, B.Deprecation_WW3); + t1 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(Math.abs(number._number$_value), number.get$denominatorUnits(number), t1); + }, + $signature: 24 + }; + A.module_closure0.prototype = { + call$1(value) { + return Math.abs(value); + }, + $signature: 12 + }; + A._ceil_closure.prototype = { + call$1(value) { + return B.JSNumber_methods.ceil$0(value); + }, + $signature: 12 + }; + A._clamp_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + min = t1.$index($arguments, 0).assertNumber$1("min"), + number = t1.$index($arguments, 1).assertNumber$1("number"), + max = t1.$index($arguments, 2).assertNumber$1("max"); + number.convertValueToMatch$3(min, "number", "min"); + max.convertValueToMatch$3(min, "max", "min"); + if (min.greaterThanOrEquals$1(max).value) + return min; + if (min.greaterThanOrEquals$1(number).value) + return min; + if (number.greaterThanOrEquals$1(max).value) + return max; + return number; + }, + $signature: 24 + }; + A._floor_closure.prototype = { + call$1(value) { + return B.JSNumber_methods.floor$0(value); + }, + $signature: 12 + }; + A._max_closure.prototype = { + call$1($arguments) { + var t1, t2, max, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, max = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (max == null || max.lessThan$1(number).value) + max = number; + } + if (max != null) + return max; + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + }, + $signature: 24 + }; + A._min_closure.prototype = { + call$1($arguments) { + var t1, t2, min, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, min = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (min == null || min.greaterThan$1(number).value) + min = number; + } + if (min != null) + return min; + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + }, + $signature: 24 + }; + A._round_closure.prototype = { + call$1(number) { + return B.JSNumber_methods.round$0(number); + }, + $signature: 12 + }; + A._hypot_closure.prototype = { + call$1($arguments) { + var subtotal, i, i0, t3, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SassNumber>"), + numbers = A.List_List$_of(new A.MappedListIterable(t1, new A._hypot__closure(), t2), t2._eval$1("ListIterable.E")); + if (numbers.length === 0) + throw A.wrapException(A.SassScriptException$("At least one argument must be passed.", null)); + for (subtotal = 0, i = 0; i < numbers.length; i = i0) { + i0 = i + 1; + subtotal += Math.pow(numbers[i].convertValueToMatch$3(numbers[0], "numbers[" + i0 + "]", "numbers[1]"), 2); + } + t1 = Math.sqrt(subtotal); + t2 = numbers[0]; + t2 = t2.get$numeratorUnits(t2); + t3 = numbers[0]; + return A.SassNumber_SassNumber$withUnits(t1, t3.get$denominatorUnits(t3), t2); + }, + $signature: 24 + }; + A._hypot__closure.prototype = { + call$1(argument) { + return argument.assertNumber$0(); + }, + $signature: 692 + }; + A._log_closure.prototype = { + call$1($arguments) { + var base, + _s18_ = " to have no units.", + _null = null, + t1 = J.getInterceptor$asx($arguments), + number = t1.$index($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$number: Expected " + number.toString$0(0) + _s18_, _null)); + else if (t1.$index($arguments, 1).$eq(0, B.C__SassNull)) + return A.SassNumber_SassNumber(Math.log(number._number$_value), _null); + base = t1.$index($arguments, 1).assertNumber$1("base"); + if (base.get$hasUnits()) + throw A.wrapException(A.SassScriptException$("$base: Expected " + base.toString$0(0) + _s18_, _null)); + else + return A.SassNumber_SassNumber(Math.log(number._number$_value) / Math.log(base._number$_value), _null); + }, + $signature: 24 + }; + A._pow_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A.pow0(t1.$index($arguments, 0).assertNumber$1("base"), t1.$index($arguments, 1).assertNumber$1("exponent")); + }, + $signature: 24 + }; + A._atan2_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + y = t1.$index($arguments, 0).assertNumber$1("y"); + return A.SassNumber_SassNumber$withUnits(Math.atan2(y._number$_value, t1.$index($arguments, 1).assertNumber$1("x").convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 24 + }; + A._compatible_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertNumber$1("number1").isComparableTo$1(t1.$index($arguments, 1).assertNumber$1("number2")) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._isUnitless_closure.prototype = { + call$1($arguments) { + return !J.$index$asx($arguments, 0).assertNumber$1("number").get$hasUnits() ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._unit_closure.prototype = { + call$1($arguments) { + return new A.SassString(J.$index$asx($arguments, 0).assertNumber$1("number").get$unitString(), true); + }, + $signature: 19 + }; + A._percentage_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber(number._number$_value * 100, "%"); + }, + $signature: 24 + }; + A._randomFunction_closure.prototype = { + call$1($arguments) { + var limit, limitScalar, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).$eq(0, B.C__SassNull)) + return A.SassNumber_SassNumber($.$get$_random0().nextDouble$0(), null); + limit = t1.$index($arguments, 0).assertNumber$1("limit"); + if (limit.get$hasUnits()) + A.warnForDeprecation(string$.math_r + limit.toString$0(0) + string$.x29x20in_a + limit.get$unitString() + ")) * 1" + limit.get$unitString() + string$.x0a_To_p + limit.get$unitString() + string$.x29x29__Mo, B.Deprecation_7TE); + limitScalar = limit.assertInt$1("limit"); + if (limitScalar < 1) + throw A.wrapException(A.SassScriptException$("$limit: Must be greater than 0, was " + limit.toString$0(0) + ".", null)); + return A.SassNumber_SassNumber($.$get$_random0().nextInt$1(limitScalar) + 1, null); + }, + $signature: 24 + }; + A._div_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + number1 = t1.$index($arguments, 0), + number2 = t1.$index($arguments, 1); + if (!(number1 instanceof A.SassNumber) || !(number2 instanceof A.SassNumber)) + A.warn(string$.math_d); + return number1.dividedBy$1(number2); + }, + $signature: 5 + }; + A._singleArgumentMathFunc_closure.prototype = { + call$1($arguments) { + return this.mathFunc.call$1(J.$index$asx($arguments, 0).assertNumber$1("number")); + }, + $signature: 24 + }; + A._numberFunction_closure.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"), + t1 = this.transform.call$1(number._number$_value), + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits(t1, number.get$denominatorUnits(number), t2); + }, + $signature: 24 + }; + A._shared_closure.prototype = { + call$1($arguments) { + A.warnForDeprecation(string$.The_fe, B.Deprecation_PY0); + return $._features.contains$1(0, J.$index$asx($arguments, 0).assertString$1("feature")._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._shared_closure0.prototype = { + call$1($arguments) { + return new A.SassString(A.serializeValue(J.get$first$ax($arguments), true, true), false); + }, + $signature: 19 + }; + A._shared_closure1.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + _0_0 = t1.$index($arguments, 0); + $label0$0: { + if (_0_0 instanceof A.SassArgumentList) { + t1 = "arglist"; + break $label0$0; + } + if (_0_0 instanceof A.SassBoolean) { + t1 = "bool"; + break $label0$0; + } + if (_0_0 instanceof A.SassColor) { + t1 = "color"; + break $label0$0; + } + if (_0_0 instanceof A.SassList) { + t1 = "list"; + break $label0$0; + } + if (_0_0 instanceof A.SassMap) { + t1 = "map"; + break $label0$0; + } + if (B.C__SassNull === _0_0) { + t1 = "null"; + break $label0$0; + } + if (_0_0 instanceof A.SassNumber) { + t1 = "number"; + break $label0$0; + } + if (_0_0 instanceof A.SassFunction) { + t1 = "function"; + break $label0$0; + } + if (_0_0 instanceof A.SassMixin) { + t1 = "mixin"; + break $label0$0; + } + if (_0_0 instanceof A.SassCalculation) { + t1 = "calculation"; + break $label0$0; + } + if (_0_0 instanceof A.SassString) { + t1 = "string"; + break $label0$0; + } + t1 = A.throwExpression("[BUG] Unknown value type " + t1.$index($arguments, 0).toString$0(0)); + } + return new A.SassString(t1, false); + }, + $signature: 19 + }; + A._shared_closure2.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + _1_0 = t1.$index($arguments, 0); + if (_1_0 instanceof A.SassArgumentList) { + _1_0._wereKeywordsAccessed = true; + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(_1_0._keywords, type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, false), t4._1); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } else + throw A.wrapException("$args: " + t1.$index($arguments, 0).toString$0(0) + " is not an argument list."); + }, + $signature: 38 + }; + A.moduleFunctions_closure.prototype = { + call$1($arguments) { + return new A.SassString(J.$index$asx($arguments, 0).assertCalculation$1("calc").name, true); + }, + $signature: 19 + }; + A.moduleFunctions_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertCalculation$1("calc").$arguments; + return A.SassList$(new A.MappedListIterable(t1, new A.moduleFunctions__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_z0K, false); + }, + $signature: 28 + }; + A.moduleFunctions__closure.prototype = { + call$1(argument) { + return argument instanceof A.Value ? argument : new A.SassString(J.toString$0$(argument), false); + }, + $signature: 693 + }; + A.moduleFunctions_closure1.prototype = { + call$1($arguments) { + var _0_2_isSet, _0_2, acceptsContent, t1, _0_5_isSet, _0_5, hasContent, _null = null, + mixin = J.$index$asx($arguments, 0).assertMixin$1("mixin"), + _0_0 = mixin.callable; + $label0$0: { + _0_2_isSet = type$.AsyncBuiltInCallable._is(_0_0); + _0_2 = _null; + acceptsContent = _null; + if (_0_2_isSet) { + _0_2 = _0_0.get$acceptsContent(); + acceptsContent = _0_2; + } + if (!_0_2_isSet) { + _0_2_isSet = _0_0 instanceof A.BuiltInCallable; + if (_0_2_isSet) + acceptsContent = _0_0.acceptsContent; + t1 = _0_2_isSet; + } else + t1 = true; + if (t1) { + t1 = acceptsContent; + break $label0$0; + } + _0_5_isSet = _0_0 instanceof A.UserDefinedCallable; + _0_5 = _null; + if (_0_5_isSet) { + _0_5 = _0_0.declaration; + t1 = _0_5; + t1 = t1 instanceof A.MixinRule; + } else + t1 = false; + if (t1) { + t1 = _0_5_isSet ? _0_5 : _0_0.declaration; + hasContent = type$.MixinRule._as(t1).get$hasContent(); + t1 = hasContent; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + } + return t1 ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._nest_closure.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).get$asList(); + t1 = new A.MappedListIterable(t1, new A._nest__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SelectorList>")).fold$2(0, null, new A._nest__closure0()); + t1 = t1 == null ? null : t1.get$asSassList(); + return t1 == null ? A.throwExpression(A.SassScriptException$(string$.x24selec, null)) : t1; + }, + $signature: 28 + }; + A._nest__closure.prototype = { + call$1(selector) { + return A.SassApiValue_assertSelector(selector, true, null); + }, + $signature: 187 + }; + A._nest__closure0.prototype = { + call$2($parent, child) { + return child.nestWithin$1($parent); + }, + $signature: 327 + }; + A._append_closure.prototype = { + call$1($arguments) { + var t1, + selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$(string$.x24selec, null)); + t1 = A.EvaluationContext_currentOrNull(); + return new A.MappedListIterable(selectors, new A._append__closure(), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList>")).reduce$1(0, new A._append__closure0((t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan())).get$asSassList(); + }, + $signature: 28 + }; + A._append__closure.prototype = { + call$1(selector) { + return A.SassApiValue_assertSelector(selector, false, null); + }, + $signature: 187 + }; + A._append__closure0.prototype = { + call$2($parent, child) { + var t1 = child.components, + t2 = this.span; + return A.SelectorList$(new A.MappedListIterable(t1, new A._append___closure($parent, t2), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector>")), t2).nestWithin$1($parent); + }, + $signature: 462 + }; + A._append___closure.prototype = { + call$1(complex) { + var _0_0, t1, component, rest, newCompound, t2, _null = null; + if (complex.leadingCombinators.length !== 0) + throw A.wrapException(A.SassScriptException$("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); + _0_0 = complex.components; + t1 = _0_0.length >= 1; + if (t1) { + component = _0_0[0]; + rest = B.JSArray_methods.sublist$1(_0_0, 1); + } else { + rest = _null; + component = rest; + } + if (!t1) + throw A.wrapException(A.StateError$("Pattern matching error")); + newCompound = A._prependParent(component.selector); + if (newCompound == null) + throw A.wrapException(A.SassScriptException$("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); + t1 = this.span; + t2 = A._setArrayType([new A.ComplexSelectorComponent(newCompound, A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator), t1)], type$.JSArray_ComplexSelectorComponent); + B.JSArray_methods.addAll$1(t2, rest); + return A.ComplexSelector$(B.List_empty0, t2, t1, false); + }, + $signature: 61 + }; + A._extend_closure.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "extendee", + _s8_1 = "extender", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector(t1.$index($arguments, 2), false, _s8_1); + source.assertNotBogus$1$name(_s8_1); + t1 = A.EvaluationContext_currentOrNull(); + return A.ExtensionStore__extendOrReplace(selector, source, target, B.ExtendMode_allTargets_2_allTargets, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); + }, + $signature: 28 + }; + A._replace_closure.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "original", + _s11_ = "replacement", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector(t1.$index($arguments, 2), false, _s11_); + source.assertNotBogus$1$name(_s11_); + t1 = A.EvaluationContext_currentOrNull(); + return A.ExtensionStore__extendOrReplace(selector, source, target, B.ExtendMode_replace_1_replace, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); + }, + $signature: 28 + }; + A._unify_closure.prototype = { + call$1($arguments) { + var selector2, + _s9_ = "selector1", + _s9_0 = "selector2", + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, _s9_); + selector1.assertNotBogus$1$name(_s9_); + selector2 = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, _s9_0); + selector2.assertNotBogus$1$name(_s9_0); + t1 = selector1.unify$1(selector2); + t1 = t1 == null ? null : t1.get$asSassList(); + return t1 == null ? B.C__SassNull : t1; + }, + $signature: 5 + }; + A._isSuperselector_closure.prototype = { + call$1($arguments) { + var selector2, + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector(t1.$index($arguments, 0), false, "super"); + selector1.assertNotBogus$1$name("super"); + selector2 = A.SassApiValue_assertSelector(t1.$index($arguments, 1), false, "sub"); + selector2.assertNotBogus$1$name("sub"); + return A.listIsSuperselector(selector1.components, selector2.components) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._simpleSelectors_closure.prototype = { + call$1($arguments) { + var t1 = A.SassApiValue_assertCompoundSelector(J.$index$asx($arguments, 0), "selector").components; + return A.SassList$(new A.MappedListIterable(t1, new A._simpleSelectors__closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), B.ListSeparator_z0K, false); + }, + $signature: 28 + }; + A._simpleSelectors__closure.prototype = { + call$1(simple) { + return new A.SassString(A.serializeSelector(simple, true), false); + }, + $signature: 330 + }; + A._parse_closure.prototype = { + call$1($arguments) { + return A.SassApiValue_assertSelector(J.$index$asx($arguments, 0), false, "selector").get$asSassList(); + }, + $signature: 28 + }; + A.module_closure.prototype = { + call$1($arguments) { + var limit, t2, chunks, i, lastEnd, match, t3, + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + separator = t1.$index($arguments, 1).assertString$1("separator"); + t1 = t1.$index($arguments, 2).get$realNull(); + limit = t1 == null ? null : t1.assertNumber$1("limit").assertInt$1("limit"); + if (limit != null && limit < 1) + throw A.wrapException(A.SassScriptException$("$limit: Must be 1 or greater, was " + A.S(limit) + ".", null)); + t1 = string._string$_text; + if (t1.length === 0) + return B.SassList_oWx; + else { + t2 = separator._string$_text; + if (t2.length === 0) + return A.SassList$(A.MappedIterable_MappedIterable(new A.Runes(t1), new A.module__closure(string), type$.Runes._eval$1("Iterable.E"), type$.Value), B.ListSeparator_z0K, true); + } + chunks = A._setArrayType([], type$.JSArray_String); + for (t2 = B.JSString_methods.allMatches$1(t2, t1), t2 = new A._StringAllMatchesIterator(t2._input, t2._pattern, t2.__js_helper$_index), i = 0, lastEnd = 0; t2.moveNext$0();) { + match = t2.__js_helper$_current; + t3 = match.start; + chunks.push(B.JSString_methods.substring$2(t1, lastEnd, t3)); + lastEnd = t3 + match.pattern.length; + ++i; + if (i === limit) + break; + } + chunks.push(B.JSString_methods.substring$1(t1, lastEnd)); + return A.SassList$(new A.MappedListIterable(chunks, new A.module__closure0(string), type$.MappedListIterable_String_Value), B.ListSeparator_z0K, true); + }, + $signature: 28 + }; + A.module__closure.prototype = { + call$1(rune) { + return new A.SassString(A.Primitives_stringFromCharCode(rune), this.string._hasQuotes); + }, + $signature: 341 + }; + A.module__closure0.prototype = { + call$1(chunk) { + return new A.SassString(chunk, this.string._hasQuotes); + }, + $signature: 349 + }; + A._unquote_closure.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (!string._hasQuotes) + return string; + return new A.SassString(string._string$_text, false); + }, + $signature: 19 + }; + A._quote_closure.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (string._hasQuotes) + return string; + return new A.SassString(string._string$_text, true); + }, + $signature: 19 + }; + A._length_closure.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber(J.$index$asx($arguments, 0).assertString$1("string").get$_sassLength(), null); + }, + $signature: 24 + }; + A._insert_closure.prototype = { + call$1($arguments) { + var indexInt, codeUnitIndex, _s5_ = "index", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + insert = t1.$index($arguments, 1).assertString$1("insert"), + index = t1.$index($arguments, 2).assertNumber$1(_s5_); + index.assertNoUnits$1(_s5_); + indexInt = index.assertInt$1(_s5_); + if (indexInt < 0) + indexInt = Math.max(string.get$_sassLength() + indexInt + 2, 0); + t1 = string._string$_text; + codeUnitIndex = A.codepointIndexToCodeUnitIndex(t1, A._codepointForIndex(indexInt, string.get$_sassLength(), false)); + return new A.SassString(B.JSString_methods.replaceRange$3(t1, codeUnitIndex, codeUnitIndex, insert._string$_text), string._hasQuotes); + }, + $signature: 19 + }; + A._index_closure.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = t1.$index($arguments, 0).assertString$1("string")._string$_text, + codeUnitIndex = B.JSString_methods.indexOf$1(t2, t1.$index($arguments, 1).assertString$1("substring")._string$_text); + if (codeUnitIndex === -1) + return B.C__SassNull; + return A.SassNumber_SassNumber(A.codeUnitIndexToCodepointIndex(t2, codeUnitIndex) + 1, null); + }, + $signature: 5 + }; + A._slice_closure.prototype = { + call$1($arguments) { + var lengthInCodepoints, endInt, startCodepoint, endCodepoint, + _s8_ = "start-at", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + start = t1.$index($arguments, 1).assertNumber$1(_s8_), + end = t1.$index($arguments, 2).assertNumber$1("end-at"); + start.assertNoUnits$1(_s8_); + end.assertNoUnits$1("end-at"); + lengthInCodepoints = string.get$_sassLength(); + endInt = end.assertInt$0(); + if (endInt === 0) + return string._hasQuotes ? $.$get$_emptyQuoted() : $.$get$_emptyUnquoted(); + startCodepoint = A._codepointForIndex(start.assertInt$0(), lengthInCodepoints, false); + endCodepoint = A._codepointForIndex(endInt, lengthInCodepoints, true); + if (endCodepoint === lengthInCodepoints) + --endCodepoint; + if (endCodepoint < startCodepoint) + return string._hasQuotes ? $.$get$_emptyQuoted() : $.$get$_emptyUnquoted(); + t1 = string._string$_text; + return new A.SassString(B.JSString_methods.substring$2(t1, A.codepointIndexToCodeUnitIndex(t1, startCodepoint), A.codepointIndexToCodeUnitIndex(t1, endCodepoint + 1)), string._hasQuotes); + }, + $signature: 19 + }; + A._toUpperCase_closure.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = t1.charCodeAt(i); + t3 += A.Primitives_stringFromCharCode(t4 >= 97 && t4 <= 122 ? t4 & 4294967263 : t4); + } + return new A.SassString(t3.charCodeAt(0) == 0 ? t3 : t3, string._hasQuotes); + }, + $signature: 19 + }; + A._toLowerCase_closure.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = t1.charCodeAt(i); + t3 += A.Primitives_stringFromCharCode(t4 >= 65 && t4 <= 90 ? t4 | 32 : t4); + } + return new A.SassString(t3.charCodeAt(0) == 0 ? t3 : t3, string._hasQuotes); + }, + $signature: 19 + }; + A._uniqueId_closure.prototype = { + call$1($arguments) { + var t1 = $.$get$_previousUniqueId() + ($.$get$_random().nextInt$1(36) + 1); + $._previousUniqueId = t1; + if (t1 > Math.pow(36, 6)) + $._previousUniqueId = B.JSInt_methods.$mod($.$get$_previousUniqueId(), A._asInt(Math.pow(36, 6))); + return new A.SassString("u" + B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1($.$get$_previousUniqueId(), 36), 6, "0"), false); + }, + $signature: 19 + }; + A.ImportCache.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + var t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j, _this = this, _null = null; + if (A.isBrowser()) + t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter) && _this._importers.length === 0; + else + t1 = false; + if (t1) + throw A.wrapException(string$.Customi); + if (baseImporter != null && url.get$scheme() === "") { + resolvedUrl = baseUrl == null ? _null : baseUrl.resolveUri$1(url); + if (resolvedUrl == null) + resolvedUrl = url; + key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); + relativeResult = _this._perImporterCanonicalizeCache.putIfAbsent$2(key, new A.ImportCache_canonicalize_closure(_this, baseImporter, resolvedUrl, baseUrl, forImport, key, url)); + if (relativeResult != null) + return relativeResult; + } + key = new A._Record_2_forImport(url, forImport); + t1 = _this._canonicalizeCache; + if (t1.containsKey$1(key)) + return t1.$index(0, key); + for (t2 = _this._importers, t3 = type$.Record_1_nullable_Object, t4 = _this._perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl, t6 = type$.Record_3_Importer_and_Uri_and_Uri_originalUrl, cacheable = true, i = 0; i < t2.length; ++i) { + importer = t2[i]; + perImporterKey = new A._Record_3_forImport(importer, url, forImport); + if (t4.containsKey$1(perImporterKey)) { + t7 = t4.$index(0, perImporterKey); + _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); + } else + _1_0 = _null; + _1_2_isSet = t3._is(_1_0); + result = _null; + if (_1_2_isSet) { + _1_2 = _1_0._0; + t7 = _1_2 != null; + if (t7) { + t6._as(_1_2); + result = _1_2; + } + } else { + _1_2 = _null; + t7 = false; + } + if (t7) + return result; + if (_1_2_isSet) + t7 = _1_2 == null; + else + t7 = false; + if (t7) + continue; + $label0$1: { + _2_0 = _this._canonicalize$4(importer, url, baseUrl, forImport); + _2_1 = _2_0._0; + _2_5_isSet = _2_1 != null; + _2_5 = _null; + _2_3 = _null; + t7 = false; + if (_2_5_isSet) { + result = _2_1 == null ? t6._as(_2_1) : _2_1; + _2_3 = _2_0._1; + t7 = _2_3; + _2_5 = t7; + t7 = t7 && cacheable; + } else + result = _null; + if (t7) { + t1.$indexSet(0, key, result); + return result; + } + if (_2_5_isSet) { + t7 = _2_5; + _2_3_isSet = _2_5_isSet; + } else { + _2_3 = _2_0._1; + t7 = _2_3; + _2_3_isSet = true; + } + t7 = t7 && !cacheable; + if (t7) { + t4.$indexSet(0, perImporterKey, _2_1); + if (_2_1 != null) + return _2_1; + break $label0$1; + } + t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); + if (t7) { + if (cacheable) { + for (j = 0; j < i; ++j) + t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), _null); + cacheable = false; + } + if (_2_1 != null) + return _2_1; + } + } + } + if (cacheable) + t1.$indexSet(0, key, _null); + return _null; + }, + canonicalize$3$baseImporter$baseUrl(_, url, baseImporter, baseUrl) { + return this.canonicalize$4$baseImporter$baseUrl$forImport(0, url, baseImporter, baseUrl, false); + }, + _canonicalize$4(importer, url, baseUrl, forImport) { + var passContainingUrl, canonicalizeContext, t1, result, cacheable; + if (baseUrl != null) + passContainingUrl = url.get$scheme() === "" || importer.isNonCanonicalScheme$1(url.get$scheme()); + else + passContainingUrl = false; + canonicalizeContext = new A.CanonicalizeContext(forImport, passContainingUrl ? baseUrl : null); + t1 = type$.nullable_Object; + result = A.runZoned(new A.ImportCache__canonicalize_closure(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.nullable_Uri); + cacheable = !passContainingUrl || !canonicalizeContext._wasContainingUrlAccessed; + if (result == null) + return new A._Record_2(null, cacheable); + if (result.get$scheme() !== "" && importer.isNonCanonicalScheme$1(result.get$scheme())) + throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); + return new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this._importCache.putIfAbsent$2(canonicalUrl, new A.ImportCache_importCanonical_closure(this, importer, canonicalUrl, originalUrl)); + }, + importCanonical$2(importer, canonicalUrl) { + return this.importCanonical$3$originalUrl(importer, canonicalUrl, null); + }, + humanize$1(canonicalUrl) { + var t1 = this._canonicalizeCache, + t2 = type$.NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl; + t2 = A.NullableExtension_andThen(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(new A.LinkedHashMapValuesIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapValuesIterable<2>")), t2), new A.ImportCache_humanize_closure(canonicalUrl), t2._eval$1("WhereIterable")), new A.ImportCache_humanize_closure0(), t2._eval$1("MappedIterable")), new A.ImportCache_humanize_closure1()), new A.ImportCache_humanize_closure2(canonicalUrl)); + return t2 == null ? canonicalUrl : t2; + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(0); + return t1 == null ? canonicalUrl : t1; + }, + clearCanonicalize$1(canonicalUrl) { + var key, t5, t6, _i0, + t1 = this._canonicalizeCache, + t2 = A.List_List$_of(new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")), type$.Record_2_Uri_and_bool_forImport), + t3 = t2.length, + t4 = this._importers, + _i = 0; + for (; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + key = t2[_i]; + for (t5 = t4.length, t6 = key._0, _i0 = 0; _i0 < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i0) + if (t4[_i0].couldCanonicalize$2(t6, canonicalUrl)) { + t1.remove$1(0, key); + break; + } + } + t1 = this._perImporterCanonicalizeCache; + t2 = A.List_List$_of(new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")), type$.Record_3_Importer_and_Uri_and_bool_forImport); + t3 = t2.length; + _i = 0; + for (; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + key = t2[_i]; + if (key._0.couldCanonicalize$2(key._1, canonicalUrl)) + t1.remove$1(0, key); + } + }, + clearImport$1(canonicalUrl) { + this._resultsCache.remove$1(0, canonicalUrl); + this._importCache.remove$1(0, canonicalUrl); + } + }; + A.ImportCache_canonicalize_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.baseUrl, + _0_0 = t1._canonicalize$4(_this.baseImporter, _this.resolvedUrl, t2, _this.forImport); + if (t2 != null) + t1._nonCanonicalRelativeUrls.$indexSet(0, _this.key, _this.url); + return _0_0._0; + }, + $signature: 128 + }; + A.ImportCache__canonicalize_closure.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 144 + }; + A.ImportCache_importCanonical_closure.prototype = { + call$0() { + var t3, t4, _this = this, + t1 = Date.now(), + t2 = _this.canonicalUrl, + result = _this.importer.load$1(0, t2); + if (result == null) + return null; + t3 = _this.$this; + t3._loadTimes.$indexSet(0, t2, new A.DateTime(t1, 0, false)); + t3._resultsCache.$indexSet(0, t2, result); + t3 = result.contents; + t1 = result.syntax; + t4 = _this.originalUrl; + return A.Stylesheet_Stylesheet$parse(t3, t1, false, t4 == null ? t2 : t4.resolveUri$1(t2)); + }, + $signature: 86 + }; + A.ImportCache_humanize_closure.prototype = { + call$1(result) { + return result._1.$eq(0, this.canonicalUrl); + }, + $signature: 320 + }; + A.ImportCache_humanize_closure0.prototype = { + call$1(result) { + return result._2; + }, + $signature: 323 + }; + A.ImportCache_humanize_closure1.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 107 + }; + A.ImportCache_humanize_closure2.prototype = { + call$1(url) { + var t1 = $.$get$url(), + t2 = this.canonicalUrl; + return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); + }, + $signature: 49 + }; + A.Importer.prototype = { + modificationTime$1(url) { + return new A.DateTime(Date.now(), 0, false); + }, + couldCanonicalize$2(url, canonicalUrl) { + return true; + }, + isNonCanonicalScheme$1(scheme) { + return false; + } + }; + A.AsyncImporter.prototype = {}; + A.CanonicalizeContext.prototype = {}; + A.FilesystemImporter.prototype = { + canonicalize$1(_, url) { + var resolved, _0_0; + if (url.get$scheme() === "file") + resolved = A.resolveImportPath($.$get$context().style.pathFromUri$1(A._parseUri(url))); + else if (url.get$scheme() !== "") + return null; + else { + _0_0 = this._loadPath; + if (_0_0 != null) { + resolved = A.resolveImportPath(A.join(_0_0, $.$get$context().style.pathFromUri$1(A._parseUri(url)), null)); + if (resolved != null && this._loadPathDeprecated) + A.warnForDeprecation(string$.Using_t, B.Deprecation_uJ0); + } else + return null; + } + return A.NullableExtension_andThen(resolved, new A.FilesystemImporter_canonicalize_closure()); + }, + load$1(_, url) { + var path = $.$get$context().style.pathFromUri$1(A._parseUri(url)), + t1 = A.readFile(path), + t2 = A.Syntax_forPath(path), + t3 = url.get$scheme(); + if (t3 === "") + A.throwExpression(A.ArgumentError$value(url, "sourceMapUrl", "must be absolute")); + return new A.ImporterResult(t1, url, t2); + }, + modificationTime$1(url) { + return A.modificationTime($.$get$context().style.pathFromUri$1(A._parseUri(url))); + }, + couldCanonicalize$2(url, canonicalUrl) { + var t1, t2, basename, canonicalBasename; + if (url.get$scheme() !== "file" && url.get$scheme() !== "") + return false; + if (canonicalUrl.get$scheme() !== "file") + return false; + t1 = $.$get$url(); + t2 = t1.style; + basename = A.ParsedPath_ParsedPath$parse(url.get$path(url), t2).get$basename(); + canonicalBasename = A.ParsedPath_ParsedPath$parse(canonicalUrl.get$path(canonicalUrl), t2).get$basename(); + if (!B.JSString_methods.startsWith$1(basename, "_") && B.JSString_methods.startsWith$1(canonicalBasename, "_")) + canonicalBasename = B.JSString_methods.substring$1(canonicalBasename, 1); + return basename === canonicalBasename || basename === t1.withoutExtension$1(canonicalBasename); + }, + toString$0(_) { + var t1 = this._loadPath; + return t1 == null ? "" : t1; + } + }; + A.FilesystemImporter_canonicalize_closure.prototype = { + call$1(resolved) { + var t2, t0, _null = null, + t1 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : _null; + t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (t1) { + t1 = A.absolute(resolved, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + t2 = $.$get$context(); + t1 = A._realCasePath(t2.normalize$1(t1)); + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, resolved); + t0 = t2; + t2 = t1; + t1 = t0; + } + return t2.toUri$1(t1); + }, + $signature: 127 + }; + A.NoOpImporter.prototype = {}; + A.NodePackageImporter.prototype = { + isNonCanonicalScheme$1(scheme) { + return scheme === "pkg"; + }, + canonicalize$1(_, url) { + var packageName, jsonPath, jsonString, packageManifest, e, t1, t2, t3, t4, baseDirectory, parts, t5, $name, subpath, packageRoot, exception, _1_0, rootPath, subpathInRoot, _this = this, _null = null; + if (url.get$scheme() === "file") + return $.$get$FilesystemImporter_cwd().canonicalize$1(0, url); + if (url.get$scheme() !== "pkg") + return _null; + if (url.get$hasAuthority()) + throw A.wrapException(string$.A_pkg_h); + else { + t1 = $.$get$url(); + t2 = t1.style; + if (t2.rootLength$1(url.get$path(url)) > 0) + throw A.wrapException("A pkg: URL's path must not begin with /."); + else if (url.get$path(url).length === 0) + throw A.wrapException("A pkg: URL must not have an empty path."); + else if (url.get$hasQuery() || url.get$hasFragment()) + throw A.wrapException(string$.A_pkg_q); + } + t3 = A.canonicalizeContext(); + t3._wasContainingUrlAccessed = true; + t3 = t3._containingUrl; + if ((t3 == null ? _null : t3.get$scheme()) === "file") { + t3 = A.canonicalizeContext(); + t3._wasContainingUrlAccessed = true; + t3 = t3._containingUrl; + t3.toString; + t4 = $.$get$context(); + baseDirectory = t4.dirname$1(t4.style.pathFromUri$1(A._parseUri(t3))); + } else { + t3 = _this.__NodePackageImporter__entryPointDirectory_F; + t3 === $ && A.throwUnnamedLateFieldNI(); + baseDirectory = t3; + } + packageName = null; + parts = t1.split$1(0, url.get$path(url)); + t3 = B.JSArray_methods.removeAt$1(parts, 0); + t4 = $.$get$context(); + t5 = t4.style; + $name = t5.pathFromUri$1(A._parseUri(t3)); + if (B.JSString_methods.startsWith$1($name, "@")) + $name = parts.length !== 0 ? t1.join$2(0, $name, B.JSArray_methods.removeAt$1(parts, 0)) : $name; + subpath = parts.length !== 0 ? t5.pathFromUri$1(A._parseUri(t1.joinAll$1(parts))) : _null; + packageName = $name; + t1 = true; + if (!J.startsWith$1$s(packageName, ".")) + if (!J.contains$1$asx(packageName, "\\")) + if (!J.contains$1$asx(packageName, "%")) + t1 = J.startsWith$1$s(packageName, "@") && !J.contains$1$asx(packageName, t2.get$separator(t2)); + if (t1) + return _null; + packageRoot = _this._resolvePackageRoot$2(packageName, baseDirectory); + if (packageRoot == null) + return _null; + jsonPath = A.join(packageRoot, "package.json", _null); + jsonString = A.readFile(jsonPath); + packageManifest = null; + try { + packageManifest = type$.Map_String_dynamic._as(B.C_JsonCodec.decode$1(jsonString)); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.S(jsonPath); + t2 = A.S(packageName); + t3 = A.S(e); + throw A.wrapException("Failed to parse " + t1 + ' for "pkg:' + t2 + '": ' + t3); + } + _1_0 = _this._resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName); + if (_1_0 != null) + if (B.Set_FTDN4.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, t5)._splitExtension$1(1)[1])) + return t4.toUri$1(t4.canonicalize$1(0, _1_0)); + else { + t1 = subpath == null ? "root" : subpath; + throw A.wrapException("The export for '" + t1 + "' in '" + A.S(packageName) + "' resolved to '" + _1_0 + string$.x27x2c_whi); + } + if (subpath == null) { + rootPath = _this._resolvePackageRootValues$2(packageRoot, packageManifest); + return rootPath != null ? t4.toUri$1(t4.canonicalize$1(0, rootPath)) : _null; + } + subpathInRoot = A.join(packageRoot, subpath, _null); + return $.$get$FilesystemImporter_cwd().canonicalize$1(0, t4.toUri$1(subpathInRoot)); + }, + load$1(_, url) { + return $.$get$FilesystemImporter_cwd().load$1(0, url); + }, + _resolvePackageRoot$2(packageName, baseDirectory) { + var potentialPackage, t1; + for (;;) { + potentialPackage = A.join(baseDirectory, "node_modules", packageName); + if (A.dirExists(potentialPackage)) + return potentialPackage; + t1 = $.$get$context(); + if (t1.split$1(0, baseDirectory).length === 1) + return null; + baseDirectory = t1.dirname$1(baseDirectory); + } + }, + _resolvePackageRootValues$2(packageRoot, packageManifest) { + var t1, sassValue, _1_0, styleValue, _null = null, + _0_0 = packageManifest.$index(0, "sass"); + if (typeof _0_0 == "string") { + t1 = B.Set_FTDN4.contains$1(0, A.ParsedPath_ParsedPath$parse(_0_0, $.$get$url().style)._splitExtension$1(1)[1]); + sassValue = _0_0; + } else { + sassValue = _null; + t1 = false; + } + if (t1) + return A.join(packageRoot, sassValue, _null); + else { + _1_0 = packageManifest.$index(0, "style"); + if (typeof _1_0 == "string") { + t1 = B.Set_FTDN4.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, $.$get$url().style)._splitExtension$1(1)[1]); + styleValue = _1_0; + } else { + styleValue = _null; + t1 = false; + } + if (t1) + return A.join(packageRoot, styleValue, _null); + } + return A.resolveImportPath(A.join(packageRoot, "index", _null)); + }, + _resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName) { + var _0_0, _1_0, _this = this, + exports = packageManifest.$index(0, "exports"); + if (exports == null) + return null; + _0_0 = _this._nodePackageExportsResolve$5(packageRoot, _this._exportsToCheck$1(subpath), exports, subpath, packageName); + if (_0_0 != null) + return _0_0; + if (subpath != null && A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1].length !== 0) + return null; + _1_0 = _this._nodePackageExportsResolve$5(packageRoot, _this._exportsToCheck$2$addIndex(subpath, true), exports, subpath, packageName); + if (_1_0 != null) + return _1_0; + return null; + }, + _nodePackageExportsResolve$5(packageRoot, subpathVariants, exports, subpath, packageName) { + var t2, matches, _1_1, path, + t1 = false; + if (type$.Map_String_dynamic._is(exports)) { + t2 = exports.get$keys(exports); + if (t2.any$1(t2, new A.NodePackageImporter__nodePackageExportsResolve_closure())) { + t1 = exports.get$keys(exports); + t1 = t1.any$1(t1, new A.NodePackageImporter__nodePackageExportsResolve_closure0()); + } + } + if (t1) { + t1 = exports.get$keys(exports); + throw A.wrapException("`exports` in " + packageName + string$.x20can_n + t1.map$1$1(t1, new A.NodePackageImporter__nodePackageExportsResolve_closure1(), type$.String).join$1(0, ",") + " in " + A.join(packageRoot, "package.json", null) + "."); + } + t1 = type$.NonNullsIterable_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(new A.NonNullsIterable(new A.MappedListIterable(subpathVariants, new A.NodePackageImporter__nodePackageExportsResolve_closure2(this, exports, packageRoot), A._arrayInstanceType(subpathVariants)._eval$1("MappedListIterable<1,String?>")), t1), t1._eval$1("Iterable.E")); + matches = A.List_List$_of(t1, A._instanceType(t1)._precomputed1); + $label0$1: { + _1_1 = matches.length; + if (_1_1 === 1) { + path = matches[0]; + t1 = path; + break $label0$1; + } + if (_1_1 <= 0) { + t1 = null; + break $label0$1; + } + t1 = subpath == null ? "root" : subpath; + t1 = A.throwExpression(string$.Unable + t1 + " in " + packageName + " should be used. \n\nFound:\n" + B.JSArray_methods.join$1(matches, "\n")); + } + return t1; + }, + _compareExpansionKeys$2(keyA, keyB) { + var t1 = B.JSString_methods.contains$1(keyA, "*"), + baseLengthA = t1 ? B.JSString_methods.indexOf$1(keyA, "*") + 1 : keyA.length, + t2 = B.JSString_methods.contains$1(keyB, "*"), + baseLengthB = t2 ? B.JSString_methods.indexOf$1(keyB, "*") + 1 : keyB.length; + if (baseLengthA > baseLengthB) + return -1; + if (baseLengthB > baseLengthA) + return 1; + if (!t1) + return 1; + if (!t2) + return -1; + t1 = keyA.length; + t2 = keyB.length; + if (t1 > t2) + return -1; + if (t2 > t1) + return 1; + return 0; + }, + _packageTargetResolve$4(subpath, exports, packageRoot, patternMatch) { + var t2, string, path, map, key, value, _1_0, array, _2_0, _null = null, + t1 = typeof exports == "string"; + if (t1) { + t2 = !B.JSString_methods.startsWith$1(exports, "./"); + string = exports; + } else { + string = _null; + t2 = false; + } + if (t2) + throw A.wrapException("Export '" + A.S(string) + string$.x27x20must + packageRoot + "'."); + if (t1) { + t2 = patternMatch != null; + string = exports; + } else { + string = _null; + t2 = false; + } + if (t2) { + t1 = J.replaceFirst$2$s(string, "*", patternMatch); + t2 = $.$get$context(); + path = t2.normalize$1(A.join(packageRoot, t2.style.pathFromUri$1(A._parseUri(t1)), _null)); + return A.fileExists(path) ? path : _null; + } + string = t1 ? exports : _null; + if (t1) { + t1 = $.$get$context(); + string.toString; + return A.join(packageRoot, t1.style.pathFromUri$1(A._parseUri(string)), _null); + } + t1 = type$.Map_String_dynamic._is(exports); + map = t1 ? exports : _null; + if (t1) { + for (t1 = A.MapExtensions_get_pairs(map, type$.String, type$.dynamic), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + key = t2._0; + value = t2._1; + if (!B.Set_8229z.contains$1(0, key)) + continue; + if (value == null) + continue; + _1_0 = this._packageTargetResolve$4(subpath, value, packageRoot, patternMatch); + if (_1_0 != null) + return _1_0; + } + return _null; + } + t1 = type$.List_dynamic._is(exports); + if (t1 && J.get$length$asx(exports) <= 0) + return _null; + array = t1 ? exports : _null; + if (t1) { + for (t1 = J.get$iterator$ax(array); t1.moveNext$0();) { + value = t1.get$current(t1); + if (value == null) + continue; + _2_0 = this._packageTargetResolve$4(subpath, value, packageRoot, patternMatch); + if (_2_0 != null) + return _2_0; + } + return _null; + } + throw A.wrapException("Invalid 'exports' value " + A.S(exports) + " in " + A.join(packageRoot, "package.json", _null) + "."); + }, + _packageTargetResolve$3(subpath, exports, packageRoot) { + return this._packageTargetResolve$4(subpath, exports, packageRoot, null); + }, + _getMainExport$1(exports) { + var t1, t2, t3, map, _0_4, t4, $export; + $label0$0: { + t1 = null; + if (typeof exports == "string") { + t1 = exports; + break $label0$0; + } + if (type$.List_String._is(exports)) { + t1 = exports; + break $label0$0; + } + t2 = type$.Map_String_dynamic._is(exports); + if (t2) { + t3 = exports.get$keys(exports); + t3 = !t3.any$1(t3, new A.NodePackageImporter__getMainExport_closure()); + map = exports; + } else { + map = t1; + t3 = false; + } + if (t3) { + t1 = map; + break $label0$0; + } + t3 = false; + if (t2) { + _0_4 = exports.$index(0, "."); + if (_0_4 == null) + t4 = exports.containsKey$1("."); + else + t4 = true; + if (t4) + t3 = _0_4 != null; + } else + _0_4 = null; + if (t3) { + $export = t2 ? _0_4 : exports.$index(0, "."); + t1 = $export; + break $label0$0; + } + break $label0$0; + } + return t1; + }, + _exportsToCheck$2$addIndex(subpath, addIndex) { + var basename, dirname, t3, t4, _i, path, + t1 = type$.JSArray_String, + paths = A._setArrayType([], t1), + t2 = subpath == null; + if (t2 && addIndex) + subpath = "index"; + else if (!t2 && addIndex) + subpath = A.join(subpath, "index", null); + if (subpath == null) + return A._setArrayType([null], type$.JSArray_nullable_String); + if (B.Set_FTDN4.contains$1(0, A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1])) + paths.push(subpath); + else + B.JSArray_methods.addAll$1(paths, A._setArrayType([subpath, subpath + ".scss", subpath + ".sass", subpath + ".css"], t1)); + t1 = $.$get$context(); + t2 = t1.style; + basename = A.ParsedPath_ParsedPath$parse(subpath, t2).get$basename(); + dirname = t1.dirname$1(subpath); + if (B.JSString_methods.startsWith$1(basename, "_")) + return paths; + t1 = A.List_List$_of(paths, type$.nullable_String); + for (t3 = paths.length, t4 = dirname === ".", _i = 0; _i < paths.length; paths.length === t3 || (0, A.throwConcurrentModificationError)(paths), ++_i) { + path = paths[_i]; + if (t4) + t1.push("_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename()); + else + t1.push(A.join(dirname, "_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename(), null)); + } + return t1; + }, + _exportsToCheck$1(subpath) { + return this._exportsToCheck$2$addIndex(subpath, false); + } + }; + A.NodePackageImporter__nodePackageExportsResolve_closure.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 4 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure0.prototype = { + call$1(key) { + return !B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 4 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure1.prototype = { + call$1(key) { + return '"' + key + '"'; + }, + $signature: 6 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure2.prototype = { + call$1(variant) { + var t1, t2, matchKey, t3, t4, t5, _i, expansionKey, _0_0, t6, patternBase, patternTrailer, t7, target, _this = this, _null = null; + if (variant == null) { + t1 = _this.$this; + return A.NullableExtension_andThen(t1._getMainExport$1(_this.exports), new A.NodePackageImporter__nodePackageExportsResolve__closure(t1, variant, _this.packageRoot)); + } else { + t1 = _this.exports; + if (type$.Map_String_dynamic._is(t1)) { + t2 = t1.get$keys(t1); + t2 = t2.every$1(t2, new A.NodePackageImporter__nodePackageExportsResolve__closure0()); + } else + t2 = true; + if (t2) + return _null; + } + matchKey = "./" + $.$get$context().toUri$1(variant).toString$0(0); + if (t1.containsKey$1(matchKey) && t1.$index(0, matchKey) != null && !B.JSString_methods.contains$1(matchKey, "*")) { + t1 = t1.$index(0, matchKey); + if (t1 == null) + t1 = A._asObject(t1); + return _this.$this._packageTargetResolve$3(matchKey, t1, _this.packageRoot); + } + t2 = A._setArrayType([], type$.JSArray_String); + for (t3 = t1.get$keys(t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + if (B.JSString_methods.allMatches$1("*", t4).get$length(0) === 1) + t2.push(t4); + } + t3 = _this.$this; + B.JSArray_methods.sort$1(t2, t3.get$_compareExpansionKeys()); + for (t4 = t2.length, t5 = matchKey.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + expansionKey = t2[_i]; + _0_0 = expansionKey.split("*"); + t6 = _0_0.length === 2; + if (t6) { + patternBase = _0_0[0]; + patternTrailer = _0_0[1]; + } else { + patternTrailer = _null; + patternBase = patternTrailer; + } + if (!t6) + throw A.wrapException(A.StateError$("Pattern matching error")); + if (!B.JSString_methods.startsWith$1(matchKey, patternBase)) + continue; + if (matchKey === patternBase) + continue; + t6 = patternTrailer.length; + if (t6 !== 0) + t7 = B.JSString_methods.endsWith$1(matchKey, patternTrailer) && t5 >= expansionKey.length; + else + t7 = true; + if (t7) { + target = t1.$index(0, expansionKey); + if (target == null) + continue; + return t3._packageTargetResolve$4(variant, target, _this.packageRoot, B.JSString_methods.substring$2(matchKey, patternBase.length, t5 - t6)); + } + } + return _null; + }, + $signature: 146 + }; + A.NodePackageImporter__nodePackageExportsResolve__closure.prototype = { + call$1(mainExport) { + return this.$this._packageTargetResolve$3(this.variant, mainExport, this.packageRoot); + }, + $signature: 147 + }; + A.NodePackageImporter__nodePackageExportsResolve__closure0.prototype = { + call$1(key) { + return !B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 4 + }; + A.NodePackageImporter__getMainExport_closure.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 4 + }; + A.ImporterResult.prototype = { + get$sourceMapUrl(_) { + return this._sourceMapUrl; + } + }; + A.resolveImportPath_closure.prototype = { + call$0() { + return A._exactlyOne(A._tryPath($.$get$context().withoutExtension$1(this.path) + ".import" + this.extension)); + }, + $signature: 47 + }; + A.resolveImportPath_closure0.prototype = { + call$0() { + return A._exactlyOne(A._tryPathWithExtensions(this.path + ".import")); + }, + $signature: 47 + }; + A._tryPathAsDirectory_closure.prototype = { + call$0() { + return A._exactlyOne(A._tryPathWithExtensions(A.join(this.path, "index.import", null))); + }, + $signature: 47 + }; + A._exactlyOne_closure.prototype = { + call$1(path) { + var t1 = $.$get$context(); + return " " + t1.prettyUri$1(t1.toUri$1(path)); + }, + $signature: 6 + }; + A.InterpolationBuffer.prototype = { + writeCharCode$1(character) { + var t1 = this._interpolation_buffer$_text, + t2 = A.Primitives_stringFromCharCode(character); + t1._contents += t2; + return null; + }, + add$2(_, expression, span) { + this._flushText$0(); + this._interpolation_buffer$_contents.push(expression); + this._spans.push(span); + }, + addInterpolation$1(interpolation) { + var spansToAdd, _0_4_isSet, _0_4, first, rest, t2, t3, _this = this, + toAdd = interpolation.contents, + t1 = toAdd.length; + if (t1 === 0) + return; + spansToAdd = interpolation.spans; + _0_4_isSet = t1 >= 1; + if (_0_4_isSet) { + _0_4 = toAdd[0]; + t1 = typeof _0_4 == "string"; + } else { + _0_4 = null; + t1 = false; + } + if (t1) { + first = A._asString(_0_4_isSet ? _0_4 : toAdd[0]); + rest = B.JSArray_methods.sublist$1(toAdd, 1); + t1 = _this._interpolation_buffer$_text; + t1._contents += first; + spansToAdd = A.SubListIterable$(spansToAdd, 1, null, A._arrayInstanceType(spansToAdd)._precomputed1); + toAdd = rest; + } + _this._flushText$0(); + t1 = _this._interpolation_buffer$_contents; + B.JSArray_methods.addAll$1(t1, toAdd); + t2 = _this._spans; + B.JSArray_methods.addAll$1(t2, spansToAdd); + if (typeof B.JSArray_methods.get$last(t1) == "string") { + t3 = _this._interpolation_buffer$_text; + t1 = A.S(t1.pop()); + t3._contents += t1; + t2.pop(); + } + }, + _flushText$0() { + var t1 = this._interpolation_buffer$_text, + t2 = t1._contents; + if (t2.length === 0) + return; + this._interpolation_buffer$_contents.push(t2.charCodeAt(0) == 0 ? t2 : t2); + this._spans.push(null); + t1._contents = ""; + }, + interpolation$1(span) { + var t1 = A.List_List$_of(this._interpolation_buffer$_contents, type$.Object), + t2 = this._interpolation_buffer$_text, + t3 = t2._contents; + if (t3.length !== 0) + t1.push(t3.charCodeAt(0) == 0 ? t3 : t3); + t3 = A.List_List$_of(this._spans, type$.nullable_FileSpan); + if (t2._contents.length !== 0) + t3.push(null); + return A.Interpolation$(t1, t3, span); + }, + toString$0(_) { + var t1, t2, _i, t3, element; + for (t1 = this._interpolation_buffer$_contents, t2 = t1.length, _i = 0, t3 = ""; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + element = t1[_i]; + t3 = typeof element == "string" ? t3 + element : t3 + "#{" + A.S(element) + A.Primitives_stringFromCharCode(125); + } + t1 = t3 + this._interpolation_buffer$_text.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.InterpolationMap.prototype = { + mapException$1(error) { + var source, startIndex, endIndex, t3, t4, _this = this, + target = error.get$span(error), + t1 = _this._interpolation, + t2 = t1.contents; + if (t2.length === 0) { + if (_this._isMapped$1(target)) + return error; + return new A.SourceSpanFormatException(error.get$source(), error._span_exception$_message, t1.span); + } + source = _this.mapSpan$1(target); + if (source === target) + return error; + startIndex = _this._indexInContents$1(target.get$start(target)); + endIndex = _this._indexInContents$1(target.get$end(target)); + t1 = error._span_exception$_message; + if (!A.SubListIterable$(t2, startIndex, null, A._arrayInstanceType(t2)._precomputed1).take$1(0, endIndex - startIndex + 1).any$1(0, new A.InterpolationMap_mapException_closure())) + return new A.SourceSpanFormatException(error.get$source(), t1, source); + else { + t2 = type$.SourceSpan; + t3 = type$.String; + t4 = A.LinkedHashMap_LinkedHashMap$_literal([target, "error in interpolated output"], t2, t3); + return new A.MultiSourceSpanFormatException(error.get$source(), "", A.ConstantMap_ConstantMap$from(t4, t2, t3), t1, source); + } + }, + mapSpan$1(target) { + var _0_1, _0_2, t1, _0_2_isSet, t2, start, _0_20, end, _this = this, _null = null; + if (_this._isMapped$1(target)) + return target; + _0_1 = _this._mapLocation$1(target.get$start(target)); + _0_2 = _this._mapLocation$1(target.get$end(target)); + $label0$0: { + t1 = type$.FileSpan; + _0_2_isSet = t1._is(_0_1); + t2 = false; + if (_0_2_isSet) { + t2 = t1._is(_0_2); + start = _0_1; + _0_20 = _0_2; + } else { + start = _null; + _0_20 = start; + } + if (t2) { + t1 = start.expand$1(0, t1._as(_0_2_isSet ? _0_20 : _0_2)); + break $label0$0; + } + t2 = false; + if (t1._is(_0_1)) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + t2 = t2 instanceof A.FileLocation; + start = _0_1; + } else + start = _null; + if (t2) { + t1 = _0_2_isSet ? _0_20 : _0_2; + type$.FileLocation._as(t1); + t2 = _this._interpolation.span; + t1 = t2.get$file(t2).span$2(0, _this._expandInterpolationSpanLeft$1(start.get$start(start)), t1.offset); + break $label0$0; + } + t2 = false; + if (_0_1 instanceof A.FileLocation) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + t2 = t1._is(t2); + start = _0_1; + } else + start = _null; + if (t2) { + end = t1._as(_0_2_isSet ? _0_20 : _0_2); + t1 = _this._interpolation.span; + t1 = t1.get$file(t1).span$2(0, start.offset, _this._expandInterpolationSpanRight$1(end.get$end(end))); + break $label0$0; + } + t1 = false; + if (_0_1 instanceof A.FileLocation) { + if (_0_2_isSet) + t1 = _0_20; + else { + t1 = _0_2; + _0_20 = t1; + _0_2_isSet = true; + } + t1 = t1 instanceof A.FileLocation; + start = _0_1; + } else + start = _null; + if (t1) { + t1 = _0_2_isSet ? _0_20 : _0_2; + type$.FileLocation._as(t1); + t2 = _this._interpolation.span; + t1 = t2.get$file(t2).span$2(0, start.offset, t1.offset); + break $label0$0; + } + t1 = A.throwExpression("[BUG] Unreachable"); + } + return t1; + }, + _isMapped$1(span) { + var file, t1; + $label0$0: { + file = span.get$file(span); + t1 = this._interpolation.span; + t1 = t1.get$file(t1); + break $label0$0; + } + return file === t1; + }, + _mapLocation$1(target) { + var index, _0_0, t3, previousLocation, _this = this, + t1 = _this._interpolation, + t2 = t1.contents; + if (t2.length === 0) + return t1.span; + index = _this._indexInContents$1(target); + _0_0 = t2[index]; + if (_0_0 instanceof A.Expression) + return _0_0.get$span(_0_0); + t3 = index === 0; + t1 = t1.span; + if (t3) + previousLocation = t1.get$start(t1); + else { + t1 = t1.get$file(t1); + t2 = type$.Expression._as(t2[index - 1]); + t2 = t2.get$span(t2); + previousLocation = A.FileLocation$_(t1, _this._expandInterpolationSpanRight$1(t2.get$end(t2))); + } + t1 = t3 ? 0 : _this._targetOffsets[index - 1]; + return A.FileLocation$_(previousLocation.file, previousLocation.offset + (target.offset - t1)); + }, + _indexInContents$1(target) { + var t1, t2, t3, i; + for (t1 = this._targetOffsets, t2 = t1.length, t3 = target.offset, i = 0; i < t2; ++i) + if (t3 < t1[i]) + return i; + return this._interpolation.contents.length - 1; + }, + _expandInterpolationSpanLeft$1(start) { + var i0, prev, char, + source = start.file._decodedChars, + i = start.offset - 1; + while (i >= 0) { + i0 = i - 1; + prev = source[i]; + if (prev === 123) { + if (source[i0] === 35) { + i = i0; + break; + } + i = i0; + } else if (prev === 47) { + i = i0 - 1; + if (source[i0] === 42) + for (;;) { + i0 = i - 1; + if (source[i] !== 42) { + i = i0; + continue; + } + i = i0; + do { + i0 = i - 1; + char = source[i]; + if (char === 42) { + i = i0; + continue; + } else + break; + } while (true); + if (char === 47) { + i = i0; + break; + } + i = i0; + } + } else + i = i0; + } + return i; + }, + _expandInterpolationSpanRight$1(end) { + var t1, i0, next, second, t2, char, + source = end.file._decodedChars, + i = end.offset; + for (t1 = source.length; i < t1;) { + i0 = i + 1; + next = source[i]; + if (next === 125) { + i = i0; + break; + } + if (next === 47) { + i = i0 + 1; + second = source[i0]; + if (second === 47) { + for (;;) { + i0 = i + 1; + t2 = source[i]; + if (!!(t2 === 10 || t2 === 13 || t2 === 12)) + break; + i = i0; + } + i = i0; + } else if (second === 42) + for (;;) { + i0 = i + 1; + if (source[i] !== 42) { + i = i0; + continue; + } + i = i0; + do { + i0 = i + 1; + char = source[i]; + if (char === 42) { + i = i0; + continue; + } else + break; + } while (true); + if (char === 47) { + i = i0; + break; + } + i = i0; + } + } else + i = i0; + } + return i; + } + }; + A.InterpolationMap_mapException_closure.prototype = { + call$1($content) { + return $content instanceof A.Expression; + }, + $signature: 73 + }; + A._realCasePath_helper.prototype = { + call$2(path, realPath) { + var dirname = $.$get$context().dirname$1(path); + if (dirname === path) + return path; + return $._realCaseCache.putIfAbsent$2(path, new A._realCasePath_helper_closure(path, realPath, this, dirname)); + }, + call$1(path) { + return this.call$2(path, null); + }, + $signature: 149 + }; + A._realCasePath_helper_closure.prototype = { + call$0() { + var realPathNonNull, realDirname, basename, matches, t1, _0_0, match, realPathNonNull0, exception, _this = this, + t2 = _this.path; + if (!A.linkExists(t2)) { + realPathNonNull = null; + try { + realPathNonNull0 = _this.realPath; + realPathNonNull = realPathNonNull0 == null ? A.realpath(t2) : realPathNonNull0; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException) + return t2; + else + throw exception; + } + t1 = realPathNonNull; + t2 = $.$get$context(); + return A.join(_this.helper.call$2(_this.dirname, t2.dirname$1(t1)), A.ParsedPath_ParsedPath$parse(realPathNonNull, t2.style).get$basename(), null); + } + realDirname = _this.helper.call$1(_this.dirname); + basename = A.ParsedPath_ParsedPath$parse(t2, $.$get$context().style).get$basename(); + try { + matches = J.where$1$ax(A.listDir(realDirname, false), new A._realCasePath_helper__closure(basename)).toList$0(0); + t1 = null; + _0_0 = matches; + $label0$0: { + match = null; + if (J.get$length$asx(_0_0) === 1) { + match = J.$index$asx(_0_0, 0); + t1 = match; + break $label0$0; + } + t1 = A.join(realDirname, basename, null); + break $label0$0; + } + t1 = t1; + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException) + return t2; + else + throw exception; + } + }, + $signature: 29 + }; + A._realCasePath_helper__closure.prototype = { + call$1(realPath) { + return A.equalsIgnoreCase(A.ParsedPath_ParsedPath$parse(realPath, $.$get$context().style).get$basename(), this.basename); + }, + $signature: 4 + }; + A.FileSystemException.prototype = { + toString$0(_) { + var t1 = $.$get$context(); + return t1.prettyUri$1(t1.toUri$1(this.path)) + ": " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A._readFile_closure.prototype = { + call$0() { + return J.readFileSync$2$x(A.fs(), this.path, this.encoding); + }, + $signature: 64 + }; + A.writeFile_closure.prototype = { + call$0() { + return J.writeFileSync$2$x(A.fs(), this.path, this.contents); + }, + $signature: 0 + }; + A.deleteFile_closure.prototype = { + call$0() { + return J.unlinkSync$1$x(A.fs(), this.path); + }, + $signature: 0 + }; + A.readStdin_closure.prototype = { + call$1(result) { + this._box_0.contents = result; + this.completer.complete$1(result); + }, + $signature: 90 + }; + A.readStdin_closure0.prototype = { + call$1(chunk) { + this.sink.add$1(0, type$.List_int._as(chunk)); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 84 + }; + A.readStdin_closure1.prototype = { + call$1(arg) { + this.sink.close$0(0); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 84 + }; + A.readStdin_closure2.prototype = { + call$1(e) { + A.printError("Failed to read from stdin"); + A.printError(e); + e.toString; + this.completer.completeError$1(e); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 84 + }; + A.fileExists_closure.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isFile$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 20 + }; + A.dirExists_closure.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isDirectory$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 20 + }; + A.linkExists_closure.prototype = { + call$0() { + var error, systemError, t1, exception; + try { + t1 = J.isSymbolicLink$0$x(J.lstatSync$1$x(A.fs(), this.path)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 20 + }; + A.ensureDir_closure.prototype = { + call$0() { + var error, systemError, exception, t1; + try { + J.mkdirSync$1$x(A.fs(), this.path); + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "EEXIST")) + return; + if (!J.$eq$(J.get$code$x(systemError), "ENOENT")) + throw exception; + t1 = this.path; + A.ensureDir($.$get$context().dirname$1(t1)); + J.mkdirSync$1$x(A.fs(), t1); + } + }, + $signature: 0 + }; + A.listDir_closure.prototype = { + call$0() { + var t1 = this.path; + if (!this.recursive) + return J.map$1$1$ax(J.readdirSync$1$x(A.fs(), t1), new A.listDir__closure(t1), type$.String).super$Iterable$where(0, new A.listDir__closure0()); + else + return new A.listDir_closure_list().call$1(t1); + }, + $signature: 152 + }; + A.listDir__closure.prototype = { + call$1(child) { + return A.join(this.path, A._asString(child), null); + }, + $signature: 134 + }; + A.listDir__closure0.prototype = { + call$1(child) { + return !A.dirExists(child); + }, + $signature: 4 + }; + A.listDir_closure_list.prototype = { + call$1($parent) { + return J.expand$1$1$ax(J.readdirSync$1$x(A.fs(), $parent), new A.listDir__list_closure($parent, this), type$.String); + }, + $signature: 153 + }; + A.listDir__list_closure.prototype = { + call$1(child) { + var path = A.join(this.parent, A._asString(child), null); + return A.dirExists(path) ? this.list.call$1(path) : A._setArrayType([path], type$.JSArray_String); + }, + $signature: 154 + }; + A.realpath_closure.prototype = { + call$0() { + return J.native$1$x(J.get$realpathSync$x(A.fs()), this.path); + }, + $signature: 29 + }; + A.modificationTime_closure.prototype = { + call$0() { + return A.DateTime$fromMillisecondsSinceEpoch(J.getTime$0$x(J.get$mtime$x(J.statSync$1$x(A.fs(), this.path)))); + }, + $signature: 155 + }; + A.watchDir_closure0.prototype = { + call$2(error, events) { + var t1, t2, t3, t4, t5, lastEvent; + if (error != null) { + t1 = this._box_0.controller; + if (t1 != null) + t1.addError$1(error); + } else + for (t1 = J.get$iterator$ax(events), t2 = this._box_0; t1.moveNext$0();) { + t3 = t1.get$current(t1); + switch (t3.type) { + case "create": + t4 = t2.controller; + if (t4 != null) { + t3 = new A.WatchEvent(B.ChangeType_add, t3.path); + t5 = t4._state; + if (t5 >= 4) + A.throwExpression(t4._badEventState$0()); + if ((t5 & 1) !== 0) + t4._sendData$1(t3); + else if ((t5 & 3) === 0) { + t4 = t4._ensurePendingEvents$0(); + t3 = new A._DelayedData(t3); + lastEvent = t4.lastPendingEvent; + if (lastEvent == null) + t4.firstPendingEvent = t4.lastPendingEvent = t3; + else { + lastEvent.set$next(t3); + t4.lastPendingEvent = t3; + } + } + } + break; + case "update": + t4 = t2.controller; + if (t4 != null) { + t3 = new A.WatchEvent(B.ChangeType_modify, t3.path); + t5 = t4._state; + if (t5 >= 4) + A.throwExpression(t4._badEventState$0()); + if ((t5 & 1) !== 0) + t4._sendData$1(t3); + else if ((t5 & 3) === 0) { + t4 = t4._ensurePendingEvents$0(); + t3 = new A._DelayedData(t3); + lastEvent = t4.lastPendingEvent; + if (lastEvent == null) + t4.firstPendingEvent = t4.lastPendingEvent = t3; + else { + lastEvent.set$next(t3); + t4.lastPendingEvent = t3; + } + } + } + break; + case "delete": + t4 = t2.controller; + if (t4 != null) { + t3 = new A.WatchEvent(B.ChangeType_remove, t3.path); + t5 = t4._state; + if (t5 >= 4) + A.throwExpression(t4._badEventState$0()); + if ((t5 & 1) !== 0) + t4._sendData$1(t3); + else if ((t5 & 3) === 0) { + t4 = t4._ensurePendingEvents$0(); + t3 = new A._DelayedData(t3); + lastEvent = t4.lastPendingEvent; + if (lastEvent == null) + t4.firstPendingEvent = t4.lastPendingEvent = t3; + else { + lastEvent.set$next(t3); + t4.lastPendingEvent = t3; + } + } + } + break; + } + } + }, + $signature: 344 + }; + A.watchDir_closure.prototype = { + call$0() { + this.subscription.unsubscribe(); + }, + $signature: 1 + }; + A.watchDir_closure1.prototype = { + call$2(path, _) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_add, path)); + }, + call$1(path) { + return this.call$2(path, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 156 + }; + A.watchDir_closure2.prototype = { + call$2(path, _) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_modify, path)); + }, + call$1(path) { + return this.call$2(path, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 156 + }; + A.watchDir_closure3.prototype = { + call$1(path) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.add$1(0, new A.WatchEvent(B.ChangeType_remove, path)); + }, + $signature: 90 + }; + A.watchDir_closure4.prototype = { + call$1(error) { + var t1 = this._box_0.controller; + return t1 == null ? null : t1.addError$1(error); + }, + $signature: 97 + }; + A.watchDir_closure5.prototype = { + call$0() { + var controller = A.StreamController_StreamController(new A.watchDir__closure(this.watcher), null, null, null, false, type$.WatchEvent); + this._box_0.controller = controller; + this.completer.complete$1(new A._ControllerStream(controller, A._instanceType(controller)._eval$1("_ControllerStream<1>"))); + }, + $signature: 1 + }; + A.watchDir__closure.prototype = { + call$0() { + J.close$0$x(this.watcher); + }, + $signature: 1 + }; + A.JSArray0.prototype = {}; + A.Chokidar.prototype = {}; + A.ChokidarOptions.prototype = {}; + A.ChokidarWatcher.prototype = {}; + A.JSFunction.prototype = {}; + A.ImmutableList.prototype = {}; + A.ImmutableMap.prototype = {}; + A.NodeImporterResult.prototype = {}; + A.RenderContext.prototype = {}; + A.RenderContextOptions.prototype = {}; + A.RenderContextResult.prototype = {}; + A.RenderContextResultStats.prototype = {}; + A.JSModule.prototype = {}; + A.JSModuleRequire.prototype = {}; + A.ParcelWatcher_subscribe_closure.prototype = { + call$2(error, events) { + var t1 = type$.List_JSObject._is(events) ? events : new A.CastList(events, A._arrayInstanceType(events)._eval$1("CastList<1,JSObject>")); + this.callback.call$2(error, t1); + }, + $signature: 385 + }; + A.JSClass.prototype = {}; + A.JSUrl.prototype = {}; + A._PropertyDescriptor.prototype = {}; + A._RequireMain.prototype = {}; + A.LoggerWithDeprecationType.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + this.internalWarn$4$deprecation$span$trace(message, deprecation ? B.Deprecation_gGh : null, span, trace); + }, + warn$1(_, message) { + return this.warn$4$deprecation$span$trace(0, message, false, null, null); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + } + }; + A._QuietLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + }, + warn$1(_, message) { + return this.warn$4$deprecation$span$trace(0, message, false, null, null); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + }, + debug$2(_, message, span) { + } + }; + A.DefaultLogger.prototype = { + get$_default$_inner() { + var t1 = $._default; + if (t1 == null) + t1 = $._default = new A.StderrLogger(A.hasTerminal() || A.isBrowser()); + return t1; + }, + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + return this.get$_default$_inner().internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + }, + debug$2(_, message, span) { + return this.get$_default$_inner().debug$2(0, message, span); + } + }; + A.DeprecationProcessingLogger.prototype = { + validate$0() { + var t1, t2, t3, $self, t4, t5, _this = this, _null = null; + for (t1 = _this.fatalDeprecations, t1 = t1.get$iterator(t1), t2 = _this.silenceDeprecations; t1.moveNext$0();) { + t3 = t1.get$current(t1); + $self = t3._obsoleteIn; + if ($self == null) + t4 = _null; + else + t4 = A.Version___parse_tearOff($self); + if (t4 instanceof A.Version) { + t3 = t3.toString$0(0); + _this.internalWarn$4$deprecation$span$trace(t3 + string$.x20deprex20ix2c, _null, _null, _null); + continue; + } + t4 = t2.contains$1(0, t3); + if (t4) { + t3 = t3.toString$0(0); + _this.internalWarn$4$deprecation$span$trace("Ignoring setting to silence " + t3 + string$.x20deprex2c, _null, _null, _null); + continue; + } + } + for (t1 = A._LinkedHashSetIterator$(t2, t2._collection$_modifications, A._instanceType(t2)._precomputed1), t2 = t1.$ti._precomputed1, t3 = _this.futureDeprecations; t1.moveNext$0();) { + t4 = t1._collection$_current; + if (t4 == null) + t4 = t2._as(t4); + if (B.Deprecation_gGh === t4) { + _this.internalWarn$4$deprecation$span$trace(string$.User_a, _null, _null, _null); + continue; + } + $self = t4._obsoleteIn; + if ($self == null) + t5 = _null; + else + t5 = A.Version___parse_tearOff($self); + if (t5 instanceof A.Version) { + t4 = t4.toString$0(0); + _this.internalWarn$4$deprecation$span$trace(t4 + string$.x20deprex20ix2e, _null, _null, _null); + continue; + } + } + for (t1 = A._LinkedHashSetIterator$(t3, t3._collection$_modifications, A._instanceType(t3)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + t3 = (t3 == null ? t2._as(t3) : t3).toString$0(0); + _this.internalWarn$4$deprecation$span$trace(t3 + string$.x20is_noaf, _null, _null, _null); + } + }, + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + if (deprecation != null) + this._handleDeprecation$4$span$trace(deprecation, message, span, trace); + else + this._inner.warn$3$span$trace(0, message, span, trace); + }, + _handleDeprecation$4$span$trace(deprecation, message, span, trace) { + var _0_3_isSet, t1, span0, _0_3, t2, count, _1_0, _this = this, _null = null; + if (_this.fatalDeprecations.contains$1(0, deprecation)) { + message += string$.x0a_This + deprecation.toString$0(0) + string$.x20deprex20t; + $label0$0: { + _0_3_isSet = span != null; + t1 = false; + if (_0_3_isSet) { + t1 = trace != null; + span0 = span; + _0_3 = trace; + } else { + span0 = _null; + _0_3 = span0; + } + if (t1) { + if (_0_3_isSet) + trace = _0_3; + t1 = A.SassRuntimeException$(message, span0, trace == null ? type$.Trace._as(trace) : trace, _null); + break $label0$0; + } + t1 = false; + if (span != null) + t1 = (_0_3_isSet ? _0_3 : trace) == null; + else + span = _null; + if (t1) { + t1 = A.SassException$(message, span, _null); + break $label0$0; + } + t1 = A.SassScriptException$(message, _null); + break $label0$0; + } + throw A.wrapException(t1); + } + if (_this.silenceDeprecations.contains$1(0, deprecation)) + return; + if (_this.limitRepetition) { + t1 = _this._warningCounts; + t2 = t1.$index(0, deprecation); + count = (t2 == null ? 0 : t2) + 1; + t1.$indexSet(0, deprecation, count); + if (count > 5) + return; + } + _1_0 = _this._inner; + if (_1_0 instanceof A.LoggerWithDeprecationType) + _1_0.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + else + _1_0.warn$4$deprecation$span$trace(0, message, true, span, trace); + }, + debug$2(_, message, span) { + return this._inner.debug$2(0, message, span); + }, + summarize$1$js(js) { + var t1 = this._warningCounts, + t2 = A._instanceType(t1)._eval$1("LinkedHashMapValuesIterable<2>"), + total = A.IterableIntegerExtension_get_sum(new A.MappedIterable(new A.WhereIterable(new A.LinkedHashMapValuesIterable(t1, t2), new A.DeprecationProcessingLogger_summarize_closure(), t2._eval$1("WhereIterable")), new A.DeprecationProcessingLogger_summarize_closure0(), t2._eval$1("MappedIterable"))); + if (total > 0) { + t1 = js ? "" : string$.x0aRun_i; + this._inner.warn$1(0, "" + total + string$.x20repet + t1); + } + } + }; + A.DeprecationProcessingLogger_summarize_closure.prototype = { + call$1(count) { + return count > 5; + }, + $signature: 50 + }; + A.DeprecationProcessingLogger_summarize_closure0.prototype = { + call$1(count) { + return count - 5; + }, + $signature: 157 + }; + A.StderrLogger.prototype = { + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + var t3, + result = new A.StringBuffer(""), + t1 = deprecation != null, + showDeprecation = t1 && deprecation !== B.Deprecation_gGh, + t2 = this.color; + if (t2) { + t3 = result._contents = "\x1b[33m\x1b[1m"; + t3 = result._contents = (t1 ? result._contents = "\x1b[33m\x1b[1mDeprecation " : t3) + "Warning\x1b[0m"; + if (showDeprecation) { + t1 = t3 + (" [\x1b[34m" + deprecation.toString$0(0) + "\x1b[0m]"); + result._contents = t1; + } else + t1 = t3; + } else { + t3 = result._contents = (t1 ? result._contents = "DEPRECATION " : "") + "WARNING"; + if (showDeprecation) { + t1 = t3 + (" [" + deprecation.toString$0(0) + "]"); + result._contents = t1; + } else + t1 = t3; + } + if (span == null) + t1 = result._contents = t1 + (": " + message + "\n"); + else if (trace != null) { + t1 += ": " + message + "\n\n" + span.highlight$1$color(t2) + "\n"; + result._contents = t1; + } else { + t1 += " on " + span.message$2$color(0, "\n" + message, t2) + "\n"; + result._contents = t1; + } + if (trace != null) + result._contents = t1 + (A.indent(B.JSString_methods.trimRight$0(trace.toString$0(0)), 4) + "\n"); + A.printError(result); + }, + debug$2(_, message, span) { + var url, t1, t2; + if (span.get$start(span).file.url == null) + url = "-"; + else { + t1 = span.get$start(span).file.url; + t2 = $.$get$context(); + t1.toString; + url = t2.prettyUri$1(t1); + } + t1 = span.get$start(span); + t1 = t1.file.getLine$1(t1.offset); + t2 = this.color ? "\x1b[1mDebug\x1b[0m" : "DEBUG"; + t2 = url + ":" + (t1 + 1) + " " + t2 + (": " + message); + A.printError(t2.charCodeAt(0) == 0 ? t2 : t2); + } + }; + A.TrackingLogger.prototype = { + warn$4$deprecation$span$trace(_, message, deprecation, span, trace) { + this._emittedWarning = true; + this._tracking$_logger.warn$4$deprecation$span$trace(0, message, deprecation, span, trace); + }, + warn$1(_, message) { + return this.warn$4$deprecation$span$trace(0, message, false, null, null); + }, + warn$3$span$trace(_, message, span, trace) { + return this.warn$4$deprecation$span$trace(0, message, false, span, trace); + }, + debug$2(_, message, span) { + this._emittedDebug = true; + this._tracking$_logger.debug$2(0, message, span); + } + }; + A.BuiltInModule.prototype = { + get$upstream() { + return B.List_empty7; + }, + get$variableNodes() { + return B.Map_empty3; + }, + get$extensionStore() { + return B.C_EmptyExtensionStore; + }, + get$css(_) { + return new A.CssStylesheet(B.List_empty3, A.SourceFile$decoded(B.List_empty4, this.url).span$2(0, 0, 0)); + }, + get$preModuleComments() { + return B.Map_empty1; + }, + get$transitivelyContainsCss() { + return false; + }, + get$transitivelyContainsExtensions() { + return false; + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + throw A.wrapException(A.SassScriptException$("Cannot modify built-in variable.", null)); + }, + variableIdentity$1($name) { + return this; + }, + couldHaveBeenConfigured$1(_) { + return false; + }, + cloneCss$0() { + return this; + }, + $isModule0: 1, + get$url(receiver) { + return this.url; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$variables() { + return this.variables; + } + }; + A.ForwardedModuleView.prototype = { + get$url(_) { + var t1 = this._forwarded_view$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._forwarded_view$_inner.get$upstream(); + }, + get$extensionStore() { + return this._forwarded_view$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._forwarded_view$_inner; + return t1.get$css(t1); + }, + get$preModuleComments() { + return this._forwarded_view$_inner.get$preModuleComments(); + }, + get$transitivelyContainsCss() { + return this._forwarded_view$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._forwarded_view$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + var t2, _1_0, _2_0, + _s19_ = "Undefined variable.", + t1 = this._rule, + _0_0 = t1.shownVariables; + if (_0_0 != null) + t2 = !_0_0._base.contains$1(0, $name); + else + t2 = false; + if (t2) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + else { + _1_0 = t1.hiddenVariables; + if (_1_0 != null) + t2 = _1_0._base.contains$1(0, $name); + else + t2 = false; + if (t2) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + } + _2_0 = t1.prefix; + if (_2_0 != null) { + if (!B.JSString_methods.startsWith$1($name, _2_0)) + throw A.wrapException(A.SassScriptException$(_s19_, null)); + $name = B.JSString_methods.substring$1($name, _2_0.length); + } + return this._forwarded_view$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + var _0_0 = this._rule.prefix; + if (_0_0 != null) + $name = B.JSString_methods.substring$1($name, _0_0.length); + return this._forwarded_view$_inner.variableIdentity$1($name); + }, + couldHaveBeenConfigured$1(variables) { + var t5, t6, _1_0, _2_0, blocklist, _this = this, + t1 = _this._rule, + t2 = t1.prefix, + t3 = t2 == null, + t4 = false; + if (t3) + if (t1.shownVariables == null) { + t4 = t1.hiddenVariables; + t4 = t4 == null ? null : t4._base.get$isEmpty(0); + t4 = t4 !== false; + } + if (t4) + return _this._forwarded_view$_inner.couldHaveBeenConfigured$1(variables); + if (!t3) { + t3 = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + for (t4 = variables.get$iterator(variables), t5 = t2.length; t4.moveNext$0();) { + t6 = t4.get$current(t4); + if (B.JSString_methods.startsWith$1(t6, t2)) + t3.add$1(0, B.JSString_methods.substring$1(t6, t5)); + } + variables = t3; + } + _1_0 = t1.shownVariables; + if (_1_0 != null) + return _this._forwarded_view$_inner.couldHaveBeenConfigured$1(variables.intersection$1(_1_0)); + else { + _2_0 = t1.hiddenVariables; + if (_2_0 != null) { + t1 = _2_0._base.get$isNotEmpty(0); + blocklist = _2_0; + } else { + blocklist = null; + t1 = false; + } + t2 = _this._forwarded_view$_inner; + if (t1) + return t2.couldHaveBeenConfigured$1(variables.difference$1(blocklist)); + else + return t2.couldHaveBeenConfigured$1(variables); + } + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ForwardedModuleView && this._forwarded_view$_inner.$eq(0, other._forwarded_view$_inner) && this._rule === other._rule; + }, + get$hashCode(_) { + var t1 = this._forwarded_view$_inner; + return (t1.get$hashCode(t1) ^ A.Primitives_objectHashCode(this._rule)) >>> 0; + }, + cloneCss$0() { + return A.ForwardedModuleView$(this._forwarded_view$_inner.cloneCss$0(), this._rule, this.$ti._precomputed1); + }, + toString$0(_) { + return "forwarded " + this._forwarded_view$_inner.toString$0(0); + }, + $isModule0: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.ShadowedModuleView.prototype = { + get$url(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._shadowed_view$_inner.get$upstream(); + }, + get$extensionStore() { + return this._shadowed_view$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$css(t1); + }, + get$preModuleComments() { + return this._shadowed_view$_inner.get$preModuleComments(); + }, + get$transitivelyContainsCss() { + return this._shadowed_view$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._shadowed_view$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$("Undefined variable.", null)); + else + this._shadowed_view$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + return this._shadowed_view$_inner.variableIdentity$1($name); + }, + couldHaveBeenConfigured$1(variables) { + var t3, t4, + t1 = this.variables, + t2 = this._shadowed_view$_inner; + if (t1 === t2.get$variables()) + t1 = t2.couldHaveBeenConfigured$1(variables); + else { + t3 = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + for (t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (variables.contains$1(0, t4)) + t3.add$1(0, t4); + } + t1 = t2.couldHaveBeenConfigured$1(t3); + } + return t1; + }, + $eq(_, other) { + var t1, t2, t3, _this = this; + if (other == null) + return false; + t1 = false; + if (other instanceof A.ShadowedModuleView) + if (_this._shadowed_view$_inner.$eq(0, other._shadowed_view$_inner)) { + t2 = _this.variables; + t2 = t2.get$keys(t2); + t3 = other.variables; + if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { + t2 = _this.functions; + t2 = t2.get$keys(t2); + t3 = other.functions; + if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { + t1 = _this.mixins; + t1 = t1.get$keys(t1); + t2 = other.mixins; + t2 = B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2)); + t1 = t2; + } + } + } + return t1; + }, + get$hashCode(_) { + var t1 = this._shadowed_view$_inner; + return t1.get$hashCode(t1); + }, + cloneCss$0() { + var _this = this; + return new A.ShadowedModuleView(_this._shadowed_view$_inner.cloneCss$0(), _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.$ti); + }, + toString$0(_) { + return "shadowed " + this._shadowed_view$_inner.toString$0(0); + }, + $isModule0: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.AtRootQueryParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.AtRootQueryParser_parse_closure(this)); + } + }; + A.AtRootQueryParser_parse_closure.prototype = { + call$0() { + var include, atRules, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$1(40); + t1.whitespace$1$consumeNewlines(true); + include = t1.scanIdentifier$1("with"); + if (!include) + t1.expectIdentifier$2$name("without", '"with" or "without"'); + t1.whitespace$1$consumeNewlines(true); + t2.expectChar$1(58); + t1.whitespace$1$consumeNewlines(true); + atRules = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + do { + atRules.add$1(0, t1.identifier$0().toLowerCase()); + t1.whitespace$1$consumeNewlines(true); + } while (t1.lookingAtIdentifier$0()); + t2.expectChar$1(41); + t2.expectDone$0(); + return new A.AtRootQuery(include, atRules, atRules.contains$1(0, "all"), atRules.contains$1(0, "rule")); + }, + $signature: 423 + }; + A._disallowedFunctionNames_closure.prototype = { + call$1($function) { + return $function.name; + }, + $signature: 424 + }; + A.CssParser.prototype = { + get$plainCss() { + return true; + }, + silentComment$0() { + var t1, t2, _this = this; + if (_this._inExpression) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.super$Parser$silentComment(); + _this.error$2(0, string$.Silent, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + atRule$2$root(child, root) { + var $name, _0_0, result, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(64); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$1$consumeNewlines(true); + _0_0 = $name.get$asPlain(); + $label0$0: { + if ("at-root" === _0_0 || "content" === _0_0 || "debug" === _0_0 || "each" === _0_0 || "error" === _0_0 || "extend" === _0_0 || "for" === _0_0 || "if" === _0_0 || "include" === _0_0 || "mixin" === _0_0 || "return" === _0_0 || "warn" === _0_0 || "while" === _0_0) + _this._forbiddenAtRule$1(start); + if ("import" === _0_0) { + t1 = _this._cssImportRule$1(start); + break $label0$0; + } + if ("function" === _0_0) { + _this.whitespace$1$consumeNewlines(true); + if (!t1.matches$1("--")) { + _this.almostAnyValue$0(); + _this.error$2(0, "This at-rule isn't allowed in plain CSS.", t1.spanFrom$1(start)); + result = null; + } else + result = _this.unknownAtRule$2(start, $name); + t1 = result; + break $label0$0; + } + if ("media" === _0_0) { + t1 = _this.mediaRule$1(start); + break $label0$0; + } + if ("-moz-document" === _0_0) { + t1 = _this.mozDocumentRule$2(start, $name); + break $label0$0; + } + if ("supports" === _0_0) { + t1 = _this.supportsRule$1(start); + break $label0$0; + } + t1 = _this.unknownAtRule$2(start, $name); + break $label0$0; + } + return t1; + }, + _forbiddenAtRule$1(start) { + this.almostAnyValue$0(); + this.error$2(0, "This at-rule isn't allowed in plain CSS.", this.spanFrom$1(start)); + }, + _cssImportRule$1(start) { + var _0_0, t3, string, $name, _0_3, _0_4, t4, _0_8, t5, modifiers, _this = this, _null = null, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + _1_0 = t1.peekChar$0(); + $label1$1: { + if (117 === _1_0 || 85 === _1_0) { + _0_0 = _this.dynamicUrl$0(); + $label0$0: { + if (_0_0 instanceof A.StringExpression) { + t3 = _0_0.text; + break $label0$0; + } + string = _null; + t3 = false; + if (_0_0 instanceof A.InterpolatedFunctionExpression) { + $name = _0_0.name; + _0_3 = _0_0.$arguments; + _0_4 = _0_3.positional; + t4 = _0_4; + if (t4.length === 1) { + _0_8 = _0_4[0]; + t4 = _0_8; + if (t4 instanceof A.StringExpression) { + type$.StringExpression._as(_0_8); + t4 = _0_3.named; + if (t4.get$isEmpty(t4)) + if (_0_3.rest == null) + t3 = _0_3.keywordRest == null; + string = _0_8; + } + } + } else + $name = _null; + if (t3) { + t3 = new A.StringBuffer(""); + t4 = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t4.addInterpolation$1($name); + t5 = A.Primitives_stringFromCharCode(40); + t3._contents += t5; + t4.addInterpolation$1(string.asInterpolation$0()); + t5 = A.Primitives_stringFromCharCode(41); + t3._contents += t5; + t4 = t4.interpolation$1(_0_0.span); + t3 = t4; + break $label0$0; + } + t3 = _this.error$2(0, "Unsupported plain CSS import.", _0_0.get$span(_0_0)); + } + break $label1$1; + } + t3 = _this.interpolatedString$0().asInterpolation$1$static(true); + break $label1$1; + } + _this.whitespace$1$consumeNewlines(true); + modifiers = _this.tryImportModifiers$0(); + _this.expectStatementSeparator$1("@import rule"); + t2 = A._setArrayType([new A.StaticImport(t3, modifiers, _this.spanFrom$1(new A._SpanScannerState(t1, t2)))], type$.JSArray_Import); + t1 = _this.spanFrom$1(start); + return new A.ImportRule(A.List_List$unmodifiable(t2, type$.Import), t1); + }, + parentheses$0() { + var expression, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + expression = _this.expressionUntilComma$0(); + t1.expectChar$1(41); + return new A.ParenthesizedExpression(expression, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + identifierLike$0() { + var t2, allowEmptySecondArg, $arguments, t3, t4, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = plain.toLowerCase(), + _0_0 = _this.trySpecialFunction$2(lower, start); + if (_0_0 != null) + return _0_0; + t2 = t1._string_scanner$_position; + if (t1.scanChar$1(46)) + return _this.namespacedExpression$2(plain, start); + else if (lower === "if" && t1.peekChar$0() === 40) + return _this.ifExpression$1(start); + else if (!t1.scanChar$1(40)) + return new A.StringExpression(identifier, false); + allowEmptySecondArg = lower === "var"; + $arguments = A._setArrayType([], type$.JSArray_Expression); + if (!t1.scanChar$1(41)) { + do { + _this.whitespace$1$consumeNewlines(true); + if (allowEmptySecondArg && $arguments.length === 1 && t1.peekChar$0() === 41) { + t3 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t4 = t3.offset; + t4 = A._FileSpan$(t3.file, t4, t4); + $arguments.push(new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable([""], type$.Object), B.List_null, t4), false)); + break; + } + $arguments.push(_this.expressionUntilComma$1$singleEquals(true)); + _this.whitespace$1$consumeNewlines(true); + } while (t1.scanChar$1(44)); + t1.expectChar$1(41); + } + if ($.$get$_disallowedFunctionNames().contains$1(0, plain)) + _this.error$2(0, string$.This_f, _this.spanFrom$1(start)); + t1 = A.ArgumentList$($arguments, B.Map_empty4, B.Map_empty5, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), null, null); + t2 = _this.spanFrom$1(start); + return new A.FunctionExpression(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, t1, t2); + }, + namespacedExpression$2(namespace, start) { + var expression = this.super$StylesheetParser$namespacedExpression(namespace, start); + this.error$2(0, string$.Modulen, expression.get$span(expression)); + } + }; + A.KeyframeSelectorParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.KeyframeSelectorParser_parse_closure(this)); + }, + _percentage$0() { + var $self, _0_0, + t1 = this.scanner, + t2 = t1.scanChar$1(43) ? A.Primitives_stringFromCharCode(43) : "", + second = t1.peekChar$0(); + if (!(second != null && second >= 48 && second <= 57) && second !== 46) + t1.error$1(0, "Expected number."); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + if (t1.peekChar$0() === 46) { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + } + if (this.scanIdentChar$1(101)) { + t2 += A.Primitives_stringFromCharCode(101); + _0_0 = t1.peekChar$0(); + if (43 === _0_0 || 45 === _0_0) + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected digit."); + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + } + t1.expectChar$1(37); + t2 += A.Primitives_stringFromCharCode(37); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A.KeyframeSelectorParser_parse_closure.prototype = { + call$0() { + var selectors = A._setArrayType([], type$.JSArray_String), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$1$consumeNewlines(true); + if (t1.lookingAtIdentifier$0()) + if (t1.scanIdentifier$1("from")) + selectors.push("from"); + else { + t1.expectIdentifier$2$name("to", '"to" or "from"'); + selectors.push("to"); + } + else + selectors.push(t1._percentage$0()); + t1.whitespace$1$consumeNewlines(true); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return selectors; + }, + $signature: 139 + }; + A.MediaQueryParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.MediaQueryParser_parse_closure(this)); + }, + _mediaQuery$0() { + var conditions, conjunction, t1, identifier1, identifier2, type, modifier, _this = this, _null = null, _s3_ = "and"; + if (_this.scanner.peekChar$0() === 40) { + conditions = A._setArrayType([_this._mediaInParens$0()], type$.JSArray_String); + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._mediaLogicSequence$1(_s3_)); + conjunction = true; + } else { + t1 = _this.scanIdentifier$1("or"); + if (t1) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._mediaLogicSequence$1("or")); + } + conjunction = !t1; + } + return A.CssMediaQuery$condition(conditions, conjunction); + } + identifier1 = _this.identifier$0(); + if (A.equalsIgnoreCase(identifier1, "not")) { + _this.expectWhitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$condition(A._setArrayType(["(not " + _this._mediaInParens$0() + ")"], type$.JSArray_String), _null); + } + _this.whitespace$1$consumeNewlines(true); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$type(identifier1, _null, _null); + identifier2 = _this.identifier$0(); + if (A.equalsIgnoreCase(identifier2, _s3_)) { + _this.expectWhitespace$0(); + type = identifier1; + modifier = _null; + } else { + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1(_s3_)) + _this.expectWhitespace$0(); + else + return A.CssMediaQuery$type(identifier2, _null, identifier1); + type = identifier2; + modifier = identifier1; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + return A.CssMediaQuery$type(type, A._setArrayType(["(not " + _this._mediaInParens$0() + ")"], type$.JSArray_String), modifier); + } + return A.CssMediaQuery$type(type, _this._mediaLogicSequence$1(_s3_), modifier); + }, + _mediaLogicSequence$1(operator) { + var t1, t2, _this = this, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.scanner;;) { + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = _this.declarationValue$0(); + t1.expectChar$1(41); + result.push("(" + t2 + ")"); + _this.whitespace$1$consumeNewlines(true); + if (!_this.scanIdentifier$1(operator)) + return result; + _this.expectWhitespace$0(); + } + }, + _mediaInParens$0() { + var t2, + t1 = this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = this.declarationValue$0(); + t1.expectChar$1(41); + return "(" + t2 + ")"; + } + }; + A.MediaQueryParser_parse_closure.prototype = { + call$0() { + var queries = A._setArrayType([], type$.JSArray_CssMediaQuery), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$1$consumeNewlines(true); + queries.push(t1._mediaQuery$0()); + t1.whitespace$1$consumeNewlines(true); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return queries; + }, + $signature: 430 + }; + A.Parser.prototype = { + _parseIdentifier$0() { + return this.wrapSpanFormatException$1(new A.Parser__parseIdentifier_closure(this)); + }, + _isVariableDeclarationLike$0() { + var _this = this, + t1 = _this.scanner; + if (!t1.scanChar$1(36)) + return false; + if (!_this.lookingAtIdentifier$0()) + return false; + _this.identifier$0(); + _this.whitespace$1$consumeNewlines(true); + return t1.scanChar$1(58); + }, + whitespace$1$consumeNewlines(consumeNewlines) { + do + this.whitespaceWithoutComments$1$consumeNewlines(consumeNewlines); + while (this.scanComment$0()); + }, + whitespaceWithoutComments$1$consumeNewlines(consumeNewlines) { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + for (;;) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + spaces$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + for (;;) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + scanComment$0() { + var _0_0, + t1 = this.scanner; + if (t1.peekChar$0() !== 47) + return false; + _0_0 = t1.peekChar$1(1); + if (47 === _0_0) + return this.silentComment$0(); + if (42 === _0_0) { + this.loudComment$0(); + return true; + } + return false; + }, + expectWhitespace$1$consumeNewlines(consumeNewlines) { + var t2, t3, + t1 = this.scanner; + if (t1._string_scanner$_position !== t1.string.length) { + t2 = t1.peekChar$0(); + t3 = !(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || this.scanComment$0()); + t2 = t3; + } else + t2 = true; + if (t2) + t1.error$1(0, "Expected whitespace."); + this.whitespace$1$consumeNewlines(consumeNewlines); + }, + expectWhitespace$0() { + return this.expectWhitespace$1$consumeNewlines(false); + }, + silentComment$0() { + var t2, t3, + t1 = this.scanner; + t1.expect$1("//"); + t2 = t1.string.length; + for (;;) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + return true; + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (;;) { + if (t1.readChar$0() !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + identifier$2$normalize$unit(normalize, unit) { + var t2, _0_0, _this = this, + _s20_ = "Expected identifier.", + text = new A.StringBuffer(""), + t1 = _this.scanner; + if (t1.scanChar$1(45)) { + t2 = text._contents = A.Primitives_stringFromCharCode(45); + if (t1.scanChar$1(45)) { + text._contents = t2 + t2; + _this._identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + } else + t2 = ""; + $label0$0: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s20_); + if (95 === _0_0 && normalize) { + t1.readChar$0(); + text._contents = t2 + A.Primitives_stringFromCharCode(45); + break $label0$0; + } + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128) { + text._contents = t2 + A.Primitives_stringFromCharCode(t1.readChar$0()); + break $label0$0; + } + if (92 === _0_0) { + text._contents = t2 + _this.escape$1$identifierStart(true); + break $label0$0; + } + t1.error$1(0, _s20_); + } + _this._identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + identifier$0() { + return this.identifier$2$normalize$unit(false, false); + }, + identifier$1$normalize(normalize) { + return this.identifier$2$normalize$unit(normalize, false); + }, + identifier$1$unit(unit) { + return this.identifier$2$normalize$unit(false, unit); + }, + _identifierBody$3$normalize$unit(text, normalize, unit) { + var t1, _1_0, _0_0, t2; + for (t1 = this.scanner;;) { + _1_0 = t1.peekChar$0(); + if (_1_0 == null) + break; + if (45 === _1_0 && unit) { + _0_0 = t1.peekChar$1(1); + if (46 !== _0_0) + t2 = A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57; + else + t2 = true; + if (t2) + break; + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + text._contents += t2; + continue; + } + if (95 === _1_0 && normalize) { + t1.readChar$0(); + t2 = A.Primitives_stringFromCharCode(45); + text._contents += t2; + continue; + } + if (_1_0 !== 95) { + if (!(_1_0 >= 97 && _1_0 <= 122)) + t2 = _1_0 >= 65 && _1_0 <= 90; + else + t2 = true; + t2 = t2 || _1_0 >= 128; + } else + t2 = true; + if (!t2) + t2 = _1_0 >= 48 && _1_0 <= 57 || _1_0 === 45; + else + t2 = true; + if (t2) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + text._contents += t2; + continue; + } + if (92 === _1_0) { + t2 = this.escape$0(); + text._contents += t2; + continue; + } + break; + } + }, + _identifierBody$1(text) { + return this._identifierBody$3$normalize$unit(text, false, false); + }, + string$0() { + var buffer, _0_0, t2, + t1 = this.scanner, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t1._string_scanner$_position - 1); + buffer = new A.StringBuffer(""); + for (;;) { + _0_0 = t1.peekChar$0(); + if (_0_0 === quote) { + t1.readChar$0(); + break; + } + if (_0_0 == null || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + if (92 === _0_0) { + t2 = t1.peekChar$1(1); + if (t2 === 10 || t2 === 13 || t2 === 12) { + t1.readChar$0(); + t1.readChar$0(); + } else { + t2 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter(t1)); + buffer._contents += t2; + } + continue; + } + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t2; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$1$allowEmpty(allowEmpty) { + var t1, t2, t3, wroteNewline, next, wroteNewline0, t4, start, end, _0_0, _this = this, + buffer = new A.StringBuffer(""), + brackets = A._setArrayType([], type$.JSArray_int); + for (t1 = _this.scanner, t2 = _this.get$loudComment(), t3 = _this.get$string(), wroteNewline = false;;) { + next = t1.peekChar$0(); + if (next == null) + break; + wroteNewline0 = false; + if (92 === next) { + t4 = _this.escape$1$identifierStart(true); + buffer._contents += t4; + wroteNewline = wroteNewline0; + continue; + } + if (34 === next || 39 === next) { + start = t1._string_scanner$_position; + t3.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + wroteNewline = wroteNewline0; + continue; + } + if (47 === next) { + if (t1.peekChar$1(1) === 42) { + start = t1._string_scanner$_position; + t2.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + } else { + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t4; + } + wroteNewline = wroteNewline0; + continue; + } + if (32 === next || 9 === next) { + if (!wroteNewline) { + t4 = t1.peekChar$1(1); + t4 = !(t4 === 32 || t4 === 9 || t4 === 10 || t4 === 13 || t4 === 12); + } else + t4 = true; + if (t4) { + t4 = A.Primitives_stringFromCharCode(32); + buffer._contents += t4; + } + t1.readChar$0(); + continue; + } + if (10 === next || 13 === next || 12 === next) { + t4 = t1.peekChar$1(-1); + if (!(t4 === 10 || t4 === 13 || t4 === 12)) + buffer._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + continue; + } + if (40 === next || 123 === next || 91 === next) { + t4 = A.Primitives_stringFromCharCode(next); + buffer._contents += t4; + brackets.push(A.opposite(t1.readChar$0())); + wroteNewline = wroteNewline0; + continue; + } + if (41 === next || 125 === next || 93 === next) { + if (brackets.length === 0) + break; + t4 = A.Primitives_stringFromCharCode(next); + buffer._contents += t4; + t1.expectChar$1(brackets.pop()); + wroteNewline = wroteNewline0; + continue; + } + if (59 === next) { + if (brackets.length === 0) + break; + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t4; + continue; + } + if (117 === next || 85 === next) { + _0_0 = _this.tryUrl$0(); + if (_0_0 != null) + buffer._contents += _0_0; + else { + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t4; + } + wroteNewline = wroteNewline0; + continue; + } + if (_this.lookingAtIdentifier$0()) { + t4 = _this.identifier$0(); + buffer._contents += t4; + } else { + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t4; + } + wroteNewline = wroteNewline0; + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._contents.length === 0) + t1.error$1(0, "Expected token."); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$0() { + return this.declarationValue$1$allowEmpty(false); + }, + tryUrl$0() { + var buffer, _0_0, t2, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (!_this.scanIdentifier$1("url")) + return null; + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + _this.whitespace$1$consumeNewlines(true); + buffer = new A.StringBuffer(""); + buffer._contents = "url("; + for (;;) { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + break; + if (92 === _0_0) { + t2 = _this.escape$0(); + buffer._contents += t2; + continue; + } + t2 = true; + if (37 !== _0_0) + if (38 !== _0_0) + if (35 !== _0_0) + t2 = _0_0 >= 42 && _0_0 <= 126 || _0_0 >= 128; + if (t2) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t2; + continue; + } + if (_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) { + _this.whitespace$1$consumeNewlines(true); + if (t1.peekChar$0() !== 41) + break; + continue; + } + if (41 === _0_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2 = buffer._contents += t2; + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + break; + } + t1.set$state(start); + return null; + }, + variableName$0() { + this.scanner.expectChar$1(36); + return this.identifier$1$normalize(true); + }, + escape$1$identifierStart(identifierStart) { + var value, _0_0, i, next, t2, exception, + _s25_ = "Expected escape sequence.", + t1 = this.scanner, + start = t1._string_scanner$_position; + t1.expectChar$1(92); + value = 0; + $label0$1: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s25_); + if (_0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, _s25_); + if (A.CharacterExtension_get_isHex(_0_0)) { + for (i = 0; i < 6; ++i) { + next = t1.peekChar$0(); + if (next != null) { + t2 = true; + if (!(next >= 48 && next <= 57)) + if (!(next >= 97 && next <= 102)) + t2 = next >= 65 && next <= 70; + t2 = !t2; + } else + t2 = true; + if (t2) + break; + value *= 16; + value += A.asHex(t1.readChar$0()); + } + this.scanCharIf$1(new A.Parser_escape_closure()); + break $label0$1; + } + value = t1.readChar$0(); + } + if (identifierStart) { + t2 = value; + t2 = t2 === 95 || A.CharacterExtension_get_isAlphabetic(t2) || t2 >= 128; + } else { + t2 = value; + if (!(t2 === 95 || A.CharacterExtension_get_isAlphabetic(t2) || t2 >= 128)) + t2 = t2 >= 48 && t2 <= 57 || t2 === 45; + else + t2 = true; + } + if (t2) + try { + t2 = A.Primitives_stringFromCharCode(value); + return t2; + } catch (exception) { + if (type$.RangeError._is(A.unwrapException(exception))) + t1.error$3$length$position(0, "Invalid Unicode code point.", t1._string_scanner$_position - start, start); + else + throw exception; + } + else { + t1 = true; + if (!(value <= 31)) + if (!J.$eq$(value, 127)) + if (identifierStart) { + t1 = value; + t1 = t1 >= 48 && t1 <= 57; + } else + t1 = false; + if (t1) { + t1 = A.Primitives_stringFromCharCode(92); + if (value > 15) + t1 += A.Primitives_stringFromCharCode(A.hexCharFor(B.JSNumber_methods._shrOtherPositive$1(value, 4))); + t1 = t1 + A.Primitives_stringFromCharCode(A.hexCharFor(value & 15)) + A.Primitives_stringFromCharCode(32); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else + return A.String_String$fromCharCodes(A._setArrayType([92, value], type$.JSArray_int), 0, null); + } + }, + escape$0() { + return this.escape$1$identifierStart(false); + }, + scanCharIf$1(condition) { + var t1 = this.scanner; + if (!condition.call$1(t1.peekChar$0())) + return false; + t1.readChar$0(); + return true; + }, + scanIdentChar$2$caseSensitive(char, caseSensitive) { + var t3, + t1 = new A.Parser_scanIdentChar_matches(caseSensitive, char), + t2 = this.scanner, + _0_0 = t2.peekChar$0(); + if (_0_0 != null) + t3 = t1.call$1(_0_0); + else + t3 = false; + if (t3) { + t2.readChar$0(); + return true; + } + if (92 === _0_0) { + t3 = t2._string_scanner$_position; + if (t1.call$1(A.consumeEscapedCharacter(t2))) + return true; + t2.set$state(new A._SpanScannerState(t2, t3)); + } + return false; + }, + scanIdentChar$1(char) { + return this.scanIdentChar$2$caseSensitive(char, false); + }, + expectIdentChar$1(letter) { + var t1; + if (this.scanIdentChar$2$caseSensitive(letter, false)) + return; + t1 = this.scanner; + t1.error$2$position(0, 'Expected "' + A.Primitives_stringFromCharCode(letter) + '".', t1._string_scanner$_position); + }, + lookingAtIdentifier$1($forward) { + var t1, _1_0, t2, _0_0; + if ($forward == null) + $forward = 0; + t1 = this.scanner; + _1_0 = t1.peekChar$1($forward); + $label0$0: { + if (A._isInt(_1_0)) + t2 = _1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128; + else + t2 = false; + if (t2 || 92 === _1_0) { + t1 = true; + break $label0$0; + } + if (45 === _1_0) { + _0_0 = t1.peekChar$1($forward + 1); + $label1$1: { + if (A._isInt(_0_0)) + t1 = _0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128; + else + t1 = false; + t1 = t1 || 92 === _0_0 || 45 === _0_0; + break $label1$1; + } + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + lookingAtIdentifier$0() { + return this.lookingAtIdentifier$1(null); + }, + lookingAtIdentifierBody$0() { + var t1, + next = this.scanner.peekChar$0(); + if (next != null) { + if (!(next === 95 || A.CharacterExtension_get_isAlphabetic(next) || next >= 128)) + t1 = next >= 48 && next <= 57 || next === 45; + else + t1 = true; + t1 = t1 || next === 92; + } else + t1 = false; + return t1; + }, + scanIdentifier$2$caseSensitive(text, caseSensitive) { + var t1, t2, _this = this; + if (!_this.lookingAtIdentifier$0()) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + if (_this._consumeIdentifier$2(text, caseSensitive) && !_this.lookingAtIdentifierBody$0()) + return true; + else { + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + } + }, + scanIdentifier$1(text) { + return this.scanIdentifier$2$caseSensitive(text, false); + }, + _consumeIdentifier$2(text, caseSensitive) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (!this.scanIdentChar$2$caseSensitive(t3 == null ? t2._as(t3) : t3, caseSensitive)) + return false; + } + return true; + }, + expectIdentifier$2$name(text, $name) { + var t1, start, t2, t3, t4, t5, t6; + if ($name == null) + $name = '"' + text + '"'; + t1 = this.scanner; + start = t1._string_scanner$_position; + for (t2 = new A.CodeUnits(text), t3 = type$.CodeUnits, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = "Expected " + $name, t5 = t4 + ".", t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t6 = t2.__internal$_current; + if (this.scanIdentChar$2$caseSensitive(t6 == null ? t3._as(t6) : t6, false)) + continue; + t1.error$2$position(0, t5, start); + } + if (!this.lookingAtIdentifierBody$0()) + return; + t1.error$2$position(0, t4, start); + }, + expectIdentifier$1(text) { + return this.expectIdentifier$2$name(text, null); + }, + rawText$1(consumer) { + var t1 = this.scanner, + start = t1._string_scanner$_position; + consumer.call$0(); + return t1.substring$1(0, start); + }, + spanFrom$2(start, end) { + var span = this.scanner.spanFrom$2(start, end); + return this._interpolationMap == null ? span : new A.LazyFileSpan(new A.Parser_spanFrom_closure(this, span)); + }, + spanFrom$1(start) { + return this.spanFrom$2(start, null); + }, + spanFromPosition$2(start, end) { + var span = this.scanner.spanFromPosition$2(start, end); + return this._interpolationMap == null ? span : new A.LazyFileSpan(new A.Parser_spanFromPosition_closure(this, span)); + }, + spanFromPosition$1(start) { + return this.spanFromPosition$2(start, null); + }, + error$3(_, message, span, trace) { + var exception = new A.StringScannerException(this.scanner.string, message, span); + if (trace == null) + throw A.wrapException(exception); + else + A.throwWithTrace(exception, this.get$error(this), trace); + }, + error$2(_, message, span) { + return this.error$3(0, message, span, null); + }, + withErrorMessage$1$2(message, callback) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = J.get$span$x(error); + A.throwWithTrace(new A.SourceSpanFormatException(error.get$source(), message, t1), error, stackTrace); + } else + throw exception; + } + }, + withErrorMessage$2(message, callback) { + return this.withErrorMessage$1$2(message, callback, type$.dynamic); + }, + wrapSpanFormatException$1$1(callback) { + var error, stackTrace, map, mapped, error0, stackTrace0, span, secondarySpans, t1, t2, span0, description, _0_0, error1, stackTrace1, span1, t3, exception, t4, _this = this, + _s8_ = "expected"; + try { + try { + t3 = callback.call$0(); + return t3; + } catch (exception) { + t3 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t3)) { + error = t3; + stackTrace = A.getTraceFromException(exception); + map = _this._interpolationMap; + if (map == null) + throw exception; + mapped = map.mapException$1(error); + t3 = mapped; + t4 = error; + if (t3 == null ? t4 == null : t3 === t4) + throw exception; + A.throwWithTrace(mapped, error, stackTrace); + } else + throw exception; + } + } catch (exception) { + t3 = A.unwrapException(exception); + if (type$.MultiSourceSpanFormatException._is(t3)) { + error0 = t3; + stackTrace0 = A.getTraceFromException(exception); + span = J.get$span$x(error0); + t3 = type$.FileSpan; + t4 = type$.String; + secondarySpans = error0.get$secondarySpans().cast$2$0(0, t3, t4); + if (A.startsWithIgnoreCase(error0._span_exception$_message, _s8_)) { + span = _this._adjustExceptionSpan$1(span); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); + for (t3 = A.MapExtensions_get_pairs(secondarySpans, t3, t4), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t2 = t3.get$current(t3); + span0 = null; + description = null; + _0_0 = t2; + span0 = _0_0._0; + description = _0_0._1; + J.$indexSet$ax(t1, _this._adjustExceptionSpan$1(span0), description); + } + secondarySpans = t1; + } + A.throwWithTrace(A.MultiSpanSassFormatException$(error0._span_exception$_message, span, error0.get$primaryLabel(), secondarySpans, null), error0, stackTrace0); + } else if (type$.SourceSpanFormatException._is(t3)) { + error1 = t3; + stackTrace1 = A.getTraceFromException(exception); + span1 = J.get$span$x(error1); + if (A.startsWithIgnoreCase(error1._span_exception$_message, _s8_)) + span1 = _this._adjustExceptionSpan$1(span1); + t1 = error1._span_exception$_message; + t2 = span1; + A.throwWithTrace(new A.SassFormatException(B.Set_empty, t1, t2), error1, stackTrace1); + } else + throw exception; + } + }, + wrapSpanFormatException$1(callback) { + return this.wrapSpanFormatException$1$1(callback, type$.dynamic); + }, + _adjustExceptionSpan$1(span) { + var start, t1; + if (span.get$length(span) > 0) + return span; + start = this._firstNewlineBefore$1(span.get$start(span)); + if (start.$eq(0, span.get$start(span))) + t1 = span; + else { + t1 = start.offset; + t1 = A._FileSpan$(start.file, t1, t1); + } + return t1; + }, + _firstNewlineBefore$1($location) { + var lastNewline, codeUnit, + t1 = $location.file, + t2 = $location.offset, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, 0, t2), 0, null), + index = t2 - 1; + for (lastNewline = null; index >= 0;) { + codeUnit = text.charCodeAt(index); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) { + if (lastNewline == null) + t1 = $location; + else { + t2 = new A.FileLocation(t1, lastNewline); + t2.FileLocation$_$2(t1, lastNewline); + t1 = t2; + } + return t1; + } + if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) + lastNewline = index; + --index; + } + return $location; + } + }; + A.Parser__parseIdentifier_closure.prototype = { + call$0() { + var t1 = this.$this, + result = t1.identifier$0(); + t1.scanner.expectDone$0(); + return result; + }, + $signature: 29 + }; + A.Parser_escape_closure.prototype = { + call$1(char) { + return char === 32 || char === 9 || char === 10 || char === 13 || char === 12; + }, + $signature: 31 + }; + A.Parser_scanIdentChar_matches.prototype = { + call$1(actual) { + var t1 = this.char; + return this.caseSensitive ? actual === t1 : A.characterEqualsIgnoreCase(t1, actual); + }, + $signature: 50 + }; + A.Parser_spanFrom_closure.prototype = { + call$0() { + var t1 = this.$this._interpolationMap; + if (t1 == null) + t1 = type$.InterpolationMap._as(t1); + return t1.mapSpan$1(this.span); + }, + $signature: 16 + }; + A.Parser_spanFromPosition_closure.prototype = { + call$0() { + var t1 = this.$this._interpolationMap; + if (t1 == null) + t1 = type$.InterpolationMap._as(t1); + return t1.mapSpan$1(this.span); + }, + $signature: 16 + }; + A.SassParser.prototype = { + get$currentIndentation() { + return this._currentIndentation; + }, + get$indented() { + return true; + }, + styleRuleSelector$0() { + var t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + do { + buffer.addInterpolation$1(_this.almostAnyValue$1$omitComments(true)); + t4 = A.Primitives_stringFromCharCode(10); + t4 = t3._contents += t4; + } while (B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), ",") && _this.scanCharIf$1(new A.SassParser_styleRuleSelector_closure())); + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + expectStatementSeparator$1($name) { + var t1, _this = this, + trailingSemicolon = _this._tryTrailingSemicolon$0(); + if (!_this.atEndOfStatement$0()) + _this._expectNewline$1$trailingSemicolon(trailingSemicolon); + if (_this._peekIndentation$0() <= _this._currentIndentation) + return; + t1 = $name == null ? "here" : "beneath a " + $name; + _this.scanner.error$2$position(0, "Nothing may be indented " + t1 + ".", _this._nextIndentationEnd.position); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var t1 = this.scanner.peekChar$0(); + if (t1 == null) + t1 = null; + else + t1 = t1 === 10 || t1 === 13 || t1 === 12; + return t1 !== false; + }, + lookingAtChildren$0() { + return this.atEndOfStatement$0() && this._peekIndentation$0() > this._currentIndentation; + }, + importArgument$0() { + var url, span, innerError, stackTrace, t1, _0_0, start, t2, next, t3, exception, _this = this; + $label0$0: { + t1 = _this.scanner; + _0_0 = t1.peekChar$0(); + if (117 === _0_0 || 85 === _0_0) { + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this.scanIdentifier$1("url")) + if (t1.scanChar$1(40)) { + t1.set$state(start); + return _this.super$StylesheetParser$importArgument(); + } else + t1.set$state(start); + break $label0$0; + } + if (39 === _0_0 || 34 === _0_0) + return _this.super$StylesheetParser$importArgument(); + } + t2 = t1._string_scanner$_position; + next = t1.peekChar$0(); + for (;;) { + t3 = false; + if (next != null) + if (next !== 44) + if (next !== 59) + t3 = !(next === 10 || next === 13 || next === 12); + if (!t3) + break; + t1.readChar$0(); + next = t1.peekChar$0(); + } + url = t1.substring$1(0, t2); + span = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (_this.isPlainImportUrl$1(url)) + return new A.StaticImport(new A.Interpolation(A.List_List$unmodifiable([A.serializeValue(new A.SassString(url, true), true, true)], type$.Object), B.List_null, span), null, span); + else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport(t1, span); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), span, stackTrace); + } else + throw exception; + } + }, + scanElse$1(ifIndentation) { + var t1, t2, startIndentation, startNextIndentation, startNextIndentationEnd, _this = this; + if (_this._peekIndentation$0() !== ifIndentation) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + startIndentation = _this._currentIndentation; + startNextIndentation = _this._nextIndentation; + startNextIndentationEnd = _this._nextIndentationEnd; + _this._readIndentation$0(); + if (t1.scanChar$1(64) && _this.scanIdentifier$1("else")) + return true; + t1.set$state(new A._SpanScannerState(t1, t2)); + _this._currentIndentation = startIndentation; + _this._nextIndentation = startNextIndentation; + _this._nextIndentationEnd = startNextIndentationEnd; + return false; + }, + children$1(_, child) { + var children = A._setArrayType([], type$.JSArray_Statement); + this._whileIndentedLower$1(new A.SassParser_children_closure(this, child, children)); + return children; + }, + statements$1(statement) { + var statements, t2, _1_0, + t1 = this.scanner, + _0_0 = t1.peekChar$0(); + if (9 === _0_0 || 32 === _0_0) + t1.error$3$length$position(0, string$.Indent, t1._string_scanner$_position, 0); + statements = A._setArrayType([], type$.JSArray_Statement); + for (t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + _1_0 = this._child$1(statement); + if (_1_0 != null) + statements.push(_1_0); + this._readIndentation$0(); + } + return statements; + }, + _child$1(child) { + var _0_0, _this = this, + t1 = _this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + if (13 === _1_0 || 10 === _1_0 || 12 === _1_0) { + t1 = null; + break $label0$0; + } + if (36 === _1_0) { + t1 = _this.variableDeclarationWithoutNamespace$0(); + break $label0$0; + } + if (47 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (47 === _0_0) { + t1 = _this._silentComment$0(); + break $label1$1; + } + if (42 === _0_0) { + t1 = _this._loudComment$0(); + break $label1$1; + } + t1 = child.call$0(); + break $label1$1; + } + break $label0$0; + } + t1 = child.call$0(); + break $label0$0; + } + return t1; + }, + _silentComment$0() { + var buffer, parentIndentation, t3, t4, t5, commentPrefix, i, t6, i0, t7, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("//"); + buffer = new A.StringBuffer(""); + parentIndentation = _this._currentIndentation; + t3 = t1.string.length; + t4 = 1 + parentIndentation; + t5 = 2 + parentIndentation; + $label0$0: + do { + commentPrefix = t1.scanChar$1(47) ? "///" : "//"; + for (i = commentPrefix.length;;) { + t6 = buffer._contents += commentPrefix; + for (i0 = i; i0 < _this._currentIndentation - parentIndentation; ++i0) { + t6 += A.Primitives_stringFromCharCode(32); + buffer._contents = t6; + } + for (;;) { + if (t1._string_scanner$_position !== t3) { + t7 = t1.peekChar$0(); + t7 = !(t7 === 10 || t7 === 13 || t7 === 12); + } else + t7 = false; + if (!t7) + break; + t6 += A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents = t6; + } + buffer._contents = t6 + "\n"; + if (_this._peekIndentation$0() < parentIndentation) + break $label0$0; + if (_this._peekIndentation$0() === parentIndentation) { + if (t1.peekChar$1(t4) === 47 && t1.peekChar$1(t5) === 47) + _this._readIndentation$0(); + break; + } + _this._readIndentation$0(); + } + } while (t1.scan$1("//")); + t3 = buffer._contents; + return _this.lastSilentComment = new A.SilentComment(t3.charCodeAt(0) == 0 ? t3 : t3, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _loudComment$0() { + var t2, t3, t4, buffer, parentIndentation, t5, t6, first, beginningOfComment, t7, end, i, _1_0, _0_0, span, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expect$1("/*"); + t2 = new A.StringBuffer(""); + t3 = A._setArrayType([], type$.JSArray_Object); + t4 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer(t2, t3, t4); + t2._contents = "/*"; + parentIndentation = _this._currentIndentation; + for (t5 = t1.string, t6 = t5.length, first = true;; first = false) { + if (first) { + beginningOfComment = t1._string_scanner$_position; + _this.spaces$0(); + t7 = t1.peekChar$0(); + if (t7 === 10 || t7 === 13 || t7 === 12) { + _this._readIndentation$0(); + t7 = A.Primitives_stringFromCharCode(32); + t2._contents += t7; + } else { + end = t1._string_scanner$_position; + t2._contents += B.JSString_methods.substring$2(t5, beginningOfComment, end); + } + } else + t2._contents = (t2._contents += "\n") + " * "; + for (i = 3; i < _this._currentIndentation - parentIndentation; ++i) { + t7 = A.Primitives_stringFromCharCode(32); + t2._contents += t7; + } + while (t1._string_scanner$_position !== t6) { + _1_0 = t1.peekChar$0(); + if (10 === _1_0 || 13 === _1_0 || 12 === _1_0) + break; + if (35 === _1_0) { + if (t1.peekChar$1(1) === 123) { + _0_0 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t3.push(_0_0._0); + t4.push(_0_0._1); + } else { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t7; + } + continue; + } + if (42 === _1_0) { + if (t1.peekChar$1(1) === 47) { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + span = _this.spanFrom$1(start); + _this.whitespace$1$consumeNewlines(false); + for (;;) { + t2 = t1.peekChar$0(); + if (!((t2 === 10 || t2 === 13 || t2 === 12) && _this._peekIndentation$0() > parentIndentation)) + break; + while (_this._lookingAtDoubleNewline$0()) + _this._expectNewline$0(); + _this._readIndentation$0(); + _this.whitespace$1$consumeNewlines(false); + } + if (t1._string_scanner$_position !== t6) { + t2 = t1.peekChar$0(); + t2 = !(t2 === 10 || t2 === 13 || t2 === 12); + } else + t2 = false; + if (t2) { + t2 = t1._string_scanner$_position; + for (;;) { + if (t1._string_scanner$_position !== t6) { + t3 = t1.peekChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + throw A.wrapException(A.MultiSpanSassFormatException$("Unexpected text after end of comment", _this.spanFrom$1(new A._SpanScannerState(t1, t2)), "extra text", A.LinkedHashMap_LinkedHashMap$_literal([span, "comment"], type$.FileSpan, type$.String), null)); + } else + return new A.LoudComment(buffer.interpolation$1(span)); + } else { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t7; + } + continue; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t7; + } + if (_this._peekIndentation$0() <= parentIndentation) + break; + while (_this._lookingAtDoubleNewline$0()) { + _this._expectNewline$0(); + t2._contents = (t2._contents += "\n") + " *"; + } + _this._readIndentation$0(); + } + return new A.LoudComment(buffer.interpolation$1(_this.spanFrom$1(start))); + }, + whitespaceWithoutComments$1$consumeNewlines(consumeNewlines) { + var t1, t2, next, t3; + for (t1 = this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + next = t1.peekChar$0(); + if (consumeNewlines) + t3 = !(next === 32 || next === 9 || next === 10 || next === 13 || next === 12); + else + t3 = !(next === 32 || next === 9); + if (t3) + break; + t1.readChar$0(); + } + }, + _expectNewline$1$trailingSemicolon(trailingSemicolon) { + var t1 = this.scanner, + _0_0 = t1.peekChar$0(); + if (13 === _0_0) { + t1.readChar$0(); + if (t1.peekChar$0() === 10) + t1.readChar$0(); + return; + } + if (10 === _0_0 || 12 === _0_0) { + t1.readChar$0(); + return; + } + t1.error$1(0, trailingSemicolon ? string$.multip : "expected newline."); + }, + _expectNewline$0() { + return this._expectNewline$1$trailingSemicolon(false); + }, + _lookingAtDoubleNewline$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label1$1: { + t2 = false; + if (13 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label0$0: { + if (10 === _0_0) { + t1 = t1.peekChar$1(2); + t1 = t1 === 10 || t1 === 13 || t1 === 12; + break $label0$0; + } + if (13 === _0_0 || 12 === _0_0) { + t1 = true; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + break $label1$1; + } + if (10 === _1_0 || 12 === _1_0) { + t1 = t1.peekChar$1(1); + t1 = t1 === 10 || t1 === 13 || t1 === 12; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + return t1; + }, + _whileIndentedLower$1(body) { + var t1, t2, childIndentation, indentation, t3, t4, _this = this, + parentIndentation = _this._currentIndentation; + for (t1 = _this.scanner, t2 = t1._sourceFile, childIndentation = null; _this._peekIndentation$0() > parentIndentation;) { + indentation = _this._readIndentation$0(); + if (childIndentation == null) + childIndentation = indentation; + if (childIndentation !== indentation) { + t3 = t1._string_scanner$_position; + t4 = t2.getColumn$1(t3); + t1.error$3$length$position(0, "Inconsistent indentation, expected " + childIndentation + " spaces.", t2.getColumn$1(t1._string_scanner$_position), t3 - t4); + } + body.call$0(); + } + }, + _readIndentation$0() { + var t1, _this = this, + currentIndentation = _this._nextIndentation; + if (currentIndentation == null) + currentIndentation = _this._nextIndentation = _this._peekIndentation$0(); + _this._currentIndentation = currentIndentation; + t1 = _this._nextIndentationEnd; + t1.toString; + _this.scanner.set$state(t1); + _this._nextIndentationEnd = _this._nextIndentation = null; + return currentIndentation; + }, + _peekIndentation$0() { + var t1, t2, t3, start, containsTab, containsSpace, nextIndentation, _1_0, t4, _this = this, + _0_0 = _this._nextIndentation; + if (_0_0 != null) + return _0_0; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + t3 = t1.string.length; + if (t2 === t3) { + _this._nextIndentation = 0; + _this._nextIndentationEnd = new A._SpanScannerState(t1, t2); + return 0; + } + start = new A._SpanScannerState(t1, t2); + if (!_this.scanCharIf$1(new A.SassParser__peekIndentation_closure())) + t1.error$2$position(0, "Expected newline.", t1._string_scanner$_position); + containsTab = A._Cell$(); + containsSpace = A._Cell$(); + nextIndentation = A._Cell$(); + do { + containsSpace.__late_helper$_value = containsTab.__late_helper$_value = false; + nextIndentation.__late_helper$_value = 0; + for (;;) { + $label0$0: { + _1_0 = t1.peekChar$0(); + if (32 === _1_0) { + containsSpace.__late_helper$_value = true; + break $label0$0; + } + if (9 === _1_0) { + containsTab.__late_helper$_value = true; + break $label0$0; + } + break; + } + t2 = nextIndentation.__late_helper$_value; + if (t2 === nextIndentation) + A.throwExpression(A.LateError$localNI("")); + nextIndentation.__late_helper$_value = t2 + 1; + t1.readChar$0(); + } + t2 = t1._string_scanner$_position; + if (t2 === t3) { + _this._nextIndentation = 0; + _this._nextIndentationEnd = new A._SpanScannerState(t1, t2); + t1.set$state(start); + return 0; + } + } while (_this.scanCharIf$1(new A.SassParser__peekIndentation_closure0())); + t2 = containsTab._readLocal$0(); + t3 = containsSpace._readLocal$0(); + if (t2) { + if (t3) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Tabs and spaces may not be mixed.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } else if (_this._spaces === true) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected spaces, was tabs.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + } else if (t3 && _this._spaces === false) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected tabs, was spaces.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + _this._nextIndentation = nextIndentation._readLocal$0(); + if (nextIndentation._readLocal$0() > 0) + if (_this._spaces == null) + _this._spaces = containsSpace._readLocal$0(); + _this._nextIndentationEnd = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.set$state(start); + return nextIndentation._readLocal$0(); + }, + _tryTrailingSemicolon$0() { + if (this.scanCharIf$1(new A.SassParser__tryTrailingSemicolon_closure())) { + this.whitespace$1$consumeNewlines(false); + return true; + } + return false; + } + }; + A.SassParser_styleRuleSelector_closure.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 31 + }; + A.SassParser_children_closure.prototype = { + call$0() { + var _0_0 = this.$this._child$1(this.child); + if (_0_0 != null) + this.children.push(_0_0); + }, + $signature: 0 + }; + A.SassParser__peekIndentation_closure.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 31 + }; + A.SassParser__peekIndentation_closure0.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 31 + }; + A.SassParser__tryTrailingSemicolon_closure.prototype = { + call$1(char) { + return char === 59; + }, + $signature: 31 + }; + A.ScssParser.prototype = { + get$indented() { + return false; + }, + get$currentIndentation() { + return 0; + }, + styleRuleSelector$0() { + return this.almostAnyValue$0(); + }, + expectStatementSeparator$1($name) { + var t1, _0_0; + this.whitespaceWithoutComments$1$consumeNewlines(true); + t1 = this.scanner; + if (t1._string_scanner$_position === t1.string.length) + return; + _0_0 = t1.peekChar$0(); + if (59 === _0_0 || 125 === _0_0) + return; + t1.expectChar$1(59); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var next = this.scanner.peekChar$0(); + return next == null || next === 59 || next === 125 || next === 123; + }, + lookingAtChildren$0() { + return this.scanner.peekChar$0() === 123; + }, + scanElse$1(ifIndentation) { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + _this.whitespace$1$consumeNewlines(true); + t3 = t1._string_scanner$_position; + if (t1.scanChar$1(64)) { + if (_this.scanIdentifier$2$caseSensitive("else", true)) + return true; + if (_this.scanIdentifier$2$caseSensitive("elseif", true)) { + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_HUu, string$.x40elsei, _this.spanFrom$1(new A._SpanScannerState(t1, t3)))); + t1.set$position(t1._string_scanner$_position - 2); + return true; + } + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + }, + children$1(_, child) { + var children, _this = this, + t1 = _this.scanner; + t1.expectChar$1(123); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + children = A._setArrayType([], type$.JSArray_Statement); + for (;;) + switch (t1.peekChar$0()) { + case 36: + children.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + children.push(_this._scss$_silentComment$0()); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + case 42: + children.push(_this._scss$_loudComment$0()); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + default: + children.push(child.call$0()); + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + case 125: + t1.expectChar$1(125); + return children; + default: + children.push(child.call$0()); + } + }, + statements$1(statement) { + var t1, t2, _0_0, _1_0, _this = this, + statements = A._setArrayType([], type$.JSArray_Statement); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + for (t1 = _this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) + switch (t1.peekChar$0()) { + case 36: + statements.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + statements.push(_this._scss$_silentComment$0()); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + case 42: + statements.push(_this._scss$_loudComment$0()); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + default: + _0_0 = statement.call$0(); + if (_0_0 != null) + statements.push(_0_0); + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + default: + _1_0 = statement.call$0(); + if (_1_0 != null) + statements.push(_1_0); + } + return statements; + }, + _scss$_silentComment$0() { + var t3, t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + start = new A._SpanScannerState(t1, t2); + t1.expect$1("//"); + t3 = t1.string.length; + do { + for (;;) { + if (t1._string_scanner$_position !== t3) { + t4 = t1.readChar$0(); + t4 = !(t4 === 10 || t4 === 13 || t4 === 12); + } else + t4 = false; + if (!t4) + break; + } + if (t1._string_scanner$_position === t3) + break; + _this.spaces$0(); + } while (t1.scan$1("//")); + if (_this.get$plainCss()) + _this.error$2(0, string$.Silent, _this.spanFrom$1(start)); + return _this.lastSilentComment = new A.SilentComment(t1.substring$1(0, t2), _this.spanFrom$1(start)); + }, + _scss$_loudComment$0() { + var t3, t4, t5, buffer, _0_0, t6, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer(t3, t4, t5); + t3._contents = "/*"; + $label0$1: + for (;;) + switch (t1.peekChar$0()) { + case 35: + if (t1.peekChar$1(1) === 123) { + _0_0 = this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + } else { + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + } + break; + case 42: + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + if (t1.peekChar$0() !== 47) + continue $label0$1; + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t4; + return new A.LoudComment(buffer.interpolation$1(this.spanFrom$1(new A._SpanScannerState(t1, t2)))); + case 13: + t1.readChar$0(); + if (t1.peekChar$0() !== 10) { + t6 = A.Primitives_stringFromCharCode(10); + t3._contents += t6; + } + break; + case 12: + t1.readChar$0(); + t6 = A.Primitives_stringFromCharCode(10); + t3._contents += t6; + break; + default: + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + } + } + }; + A.SelectorParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.SelectorParser_parse_closure(this)); + }, + parseCompoundSelector$0() { + return this.wrapSpanFormatException$1(new A.SelectorParser_parseCompoundSelector_closure(this)); + }, + _selectorList$0() { + var t4, t5, lineBreak, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = t1._sourceFile, + previousLine = t3.getLine$1(t2), + components = A._setArrayType([_this._complexSelector$0()], type$.JSArray_ComplexSelector); + _this.whitespace$1$consumeNewlines(true); + for (t4 = t1.string.length; t1.scanChar$1(44);) { + _this.whitespace$1$consumeNewlines(true); + if (t1.peekChar$0() === 44) + continue; + t5 = t1._string_scanner$_position; + if (t5 === t4) + break; + lineBreak = t3.getLine$1(t5) !== previousLine; + if (lineBreak) + previousLine = t3.getLine$1(t1._string_scanner$_position); + components.push(_this._complexSelector$1$lineBreak(lineBreak)); + } + return A.SelectorList$(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _complexSelector$1$lineBreak(lineBreak) { + var t4, t5, lastCompound, initialCombinators, beforeWhitespace, t6, _0_0, t7, t8, result, nextCompound, _this = this, + _s18_ = "expected selector.", + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + componentStart = new A._SpanScannerState(t1, t2), + t3 = type$.JSArray_CssValue_Combinator, + combinators = A._setArrayType([], t3), + components = A._setArrayType([], type$.JSArray_ComplexSelectorComponent); + for (t4 = type$.CssValue_Combinator, t5 = _this._selector$_logger, lastCompound = null, initialCombinators = null;;) { + beforeWhitespace = t1._string_scanner$_position; + _this.whitespace$1$consumeNewlines(true); + t6 = t1._string_scanner$_position === beforeWhitespace; + _0_0 = t1.peekChar$0(); + if (43 === _0_0) { + t6 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue(B.Combinator_sHB, _this.spanFrom$1(new A._SpanScannerState(t1, t6)), t4)); + continue; + } + if (62 === _0_0) { + t6 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue(B.Combinator_iUF, _this.spanFrom$1(new A._SpanScannerState(t1, t6)), t4)); + continue; + } + if (126 === _0_0) { + t6 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue(B.Combinator_98W, _this.spanFrom$1(new A._SpanScannerState(t1, t6)), t4)); + continue; + } + if (_0_0 == null) + break; + t7 = true; + if (91 !== _0_0) + if (46 !== _0_0) + if (35 !== _0_0) + if (37 !== _0_0) + if (58 !== _0_0) + if (38 !== _0_0) + if (42 !== _0_0) + if (124 !== _0_0) + t7 = _this.lookingAtIdentifier$0(); + if (t7) { + t7 = lastCompound != null; + if (t7) { + t8 = _this.spanFrom$1(componentStart); + result = A.List_List$from(combinators, false, t4); + result.$flags = 3; + components.push(new A.ComplexSelectorComponent(lastCompound, result, t8)); + } else if (combinators.length !== 0) { + componentStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + initialCombinators = combinators; + } + nextCompound = _this._compoundSelector$0(); + if (t7 && combinators.length === 0 && t6) + A.WarnForDeprecation_warnForDeprecation(t5, B.Deprecation_V8h, string$.Adjace + lastCompound.toString$0(0) + " " + nextCompound.toString$0(0) + string$.x0a_Morex3aa, lastCompound.span.expand$1(0, nextCompound.span), null); + combinators = A._setArrayType([], t3); + if (t1.peekChar$0() === 38) + t1.error$1(0, string$.x22x26__ma); + lastCompound = nextCompound; + continue; + } + break; + } + t3 = combinators.length !== 0; + if (t3 && _this._plainCss) + t1.error$1(0, _s18_); + else if (lastCompound != null) { + t3 = _this.spanFrom$1(componentStart); + components.push(new A.ComplexSelectorComponent(lastCompound, A.List_List$unmodifiable(combinators, t4), t3)); + } else if (t3) + initialCombinators = combinators; + else + t1.error$1(0, _s18_); + t3 = initialCombinators == null ? B.List_empty0 : initialCombinators; + return A.ComplexSelector$(t3, components, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), lineBreak); + }, + _complexSelector$0() { + return this._complexSelector$1$lineBreak(false); + }, + _compoundSelector$0() { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + components = A._setArrayType([_this._simpleSelector$0()], type$.JSArray_SimpleSelector); + for (t3 = _this._plainCss; _this._isSimpleSelectorStart$1(t1.peekChar$0());) + components.push(_this._simpleSelector$1$allowParent(t3)); + return A.CompoundSelector$(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _simpleSelector$1$allowParent(allowParent) { + var t2, $name, text, t3, suffix, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (allowParent == null) + allowParent = _this._allowParent; + switch (t1.peekChar$0()) { + case 91: + return _this._attributeSelector$0(); + case 46: + t2 = t1._string_scanner$_position; + t1.expectChar$1(46); + return new A.ClassSelector(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + case 35: + t2 = t1._string_scanner$_position; + t1.expectChar$1(35); + return new A.IDSelector(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + case 37: + t2 = t1._string_scanner$_position; + t1.expectChar$1(37); + $name = _this.identifier$0(); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (_this._plainCss) + _this.error$2(0, string$.Placeh, _this.spanFrom$1(start)); + return new A.PlaceholderSelector($name, t2); + case 58: + return _this._pseudoSelector$0(); + case 38: + t2 = t1._string_scanner$_position; + t1.expectChar$1(38); + if (_this.lookingAtIdentifierBody$0()) { + text = new A.StringBuffer(""); + _this._identifierBody$1(text); + if (text._contents.length === 0) + t1.error$1(0, "Expected identifier body."); + t3 = text._contents; + suffix = t3.charCodeAt(0) == 0 ? t3 : t3; + } else + suffix = null; + if (_this._plainCss && suffix != null) + t1.error$3$length$position(0, string$.Parent, t1._string_scanner$_position - t2, t2); + t1 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (!allowParent) + _this.error$2(0, "Parent selectors aren't allowed here.", _this.spanFrom$1(start)); + return new A.ParentSelector(suffix, t1); + default: + return _this._typeOrUniversalSelector$0(); + } + }, + _simpleSelector$0() { + return this._simpleSelector$1$allowParent(null); + }, + _attributeSelector$0() { + var $name, operator, next, value, modifier, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(91); + _this.whitespace$1$consumeNewlines(true); + $name = _this._attributeName$0(); + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(93)) + return new A.AttributeSelector($name, _null, _null, _null, _this.spanFrom$1(start)); + operator = _this._attributeOperator$0(); + _this.whitespace$1$consumeNewlines(true); + next = t1.peekChar$0(); + value = next === 39 || next === 34 ? _this.string$0() : _this.identifier$0(); + _this.whitespace$1$consumeNewlines(true); + next = t1.peekChar$0(); + modifier = next != null && A.CharacterExtension_get_isAlphabetic(next) ? A.Primitives_stringFromCharCode(t1.readChar$0()) : _null; + t1.expectChar$1(93); + return new A.AttributeSelector($name, operator, value, modifier, _this.spanFrom$1(start)); + }, + _attributeName$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner; + if (t1.scanChar$1(42)) { + t1.expectChar$1(124); + return new A.QualifiedName(_this.identifier$0(), "*"); + } + if (t1.scanChar$1(124)) + return new A.QualifiedName(_this.identifier$0(), ""); + nameOrNamespace = _this.identifier$0(); + if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) + return new A.QualifiedName(nameOrNamespace, null); + t1.readChar$0(); + return new A.QualifiedName(_this.identifier$0(), nameOrNamespace); + }, + _attributeOperator$0() { + var t1 = this.scanner, + start = t1._string_scanner$_position; + switch (t1.readChar$0()) { + case 61: + return B.AttributeOperator_jFZ; + case 126: + t1.expectChar$1(61); + return B.AttributeOperator_OrK; + case 124: + t1.expectChar$1(61); + return B.AttributeOperator_g5B; + case 94: + t1.expectChar$1(61); + return B.AttributeOperator_stc; + case 36: + t1.expectChar$1(61); + return B.AttributeOperator_xJ9; + case 42: + t1.expectChar$1(61); + return B.AttributeOperator_h20; + default: + t1.error$2$position(0, 'Expected "]".', start); + } + }, + _pseudoSelector$0() { + var element, $name, unvendored, argument, selector, t2, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(58); + element = t1.scanChar$1(58); + $name = _this.identifier$0(); + if (!t1.scanChar$1(40)) + return A.PseudoSelector$($name, _this.spanFrom$1(start), _null, element, _null); + _this.whitespace$1$consumeNewlines(true); + unvendored = A.unvendor($name); + argument = _null; + selector = _null; + if (element) + if ($.selectorPseudoElements.contains$1(0, unvendored)) + selector = _this._selectorList$0(); + else + argument = _this.declarationValue$1$allowEmpty(true); + else if ($.selectorPseudoClasses.contains$1(0, unvendored)) + selector = _this._selectorList$0(); + else if (unvendored === "nth-child" || unvendored === "nth-last-child") { + argument = _this._aNPlusB$0(); + _this.whitespace$1$consumeNewlines(true); + t2 = t1.peekChar$1(-1); + if ((t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12) && t1.peekChar$0() !== 41) { + _this.expectIdentifier$1("of"); + argument += " of"; + _this.whitespace$1$consumeNewlines(true); + selector = _this._selectorList$0(); + } + } else + argument = B.JSString_methods.trimRight$0(_this.declarationValue$1$allowEmpty(true)); + t1.expectChar$1(41); + return A.PseudoSelector$($name, _this.spanFrom$1(start), argument, element, selector); + }, + _aNPlusB$0() { + var t1, _0_0, t2, $self, next, _this = this; + $label0$0: { + t1 = _this.scanner; + _0_0 = t1.peekChar$0(); + if (101 === _0_0 || 69 === _0_0) { + _this.expectIdentifier$1("even"); + return "even"; + } + if (111 === _0_0 || 79 === _0_0) { + _this.expectIdentifier$1("odd"); + return "odd"; + } + if (43 === _0_0 || 45 === _0_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + break $label0$0; + } + t2 = ""; + } + $self = t1.peekChar$0(); + if ($self != null && $self >= 48 && $self <= 57) { + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + _this.whitespace$1$consumeNewlines(true); + if (!_this.scanIdentChar$1(110)) + return t2.charCodeAt(0) == 0 ? t2 : t2; + } else + _this.expectIdentChar$1(110); + t2 += A.Primitives_stringFromCharCode(110); + _this.whitespace$1$consumeNewlines(true); + next = t1.peekChar$0(); + if (next !== 43 && next !== 45) + return t2.charCodeAt(0) == 0 ? t2 : t2; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + _this.whitespace$1$consumeNewlines(true); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected a number."); + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + _typeOrUniversalSelector$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (t1.scanChar$1(42)) { + if (!t1.scanChar$1(124)) + return new A.UniversalSelector(null, _this.spanFrom$1(start)); + return t1.scanChar$1(42) ? new A.UniversalSelector("*", _this.spanFrom$1(start)) : new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), "*"), _this.spanFrom$1(start)); + } else if (t1.scanChar$1(124)) + return t1.scanChar$1(42) ? new A.UniversalSelector("", _this.spanFrom$1(start)) : new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), ""), _this.spanFrom$1(start)); + nameOrNamespace = _this.identifier$0(); + if (!t1.scanChar$1(124)) + return new A.TypeSelector(new A.QualifiedName(nameOrNamespace, null), _this.spanFrom$1(start)); + else if (t1.scanChar$1(42)) + return new A.UniversalSelector(nameOrNamespace, _this.spanFrom$1(start)); + else + return new A.TypeSelector(new A.QualifiedName(_this.identifier$0(), nameOrNamespace), _this.spanFrom$1(start)); + }, + _isSimpleSelectorStart$1(character) { + var t1; + $label0$0: { + if (42 === character || 91 === character || 46 === character || 35 === character || 37 === character || 58 === character) { + t1 = true; + break $label0$0; + } + if (38 === character) { + t1 = this._plainCss; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + } + }; + A.SelectorParser_parse_closure.prototype = { + call$0() { + var t1 = this.$this, + selector = t1._selectorList$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return selector; + }, + $signature: 450 + }; + A.SelectorParser_parseCompoundSelector_closure.prototype = { + call$0() { + var t1 = this.$this, + compound = t1._compoundSelector$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return compound; + }, + $signature: 453 + }; + A.StylesheetParser.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parse_closure(this)); + }, + parseParameterList$0() { + return this._parseSingleProduction$1$1(new A.StylesheetParser_parseParameterList_closure(this), type$.ParameterList); + }, + parseVariableDeclaration$0() { + return new A._Record_2(this._parseSingleProduction$1$1(new A.StylesheetParser_parseVariableDeclaration_closure(this), type$.VariableDeclaration), this.warnings); + }, + parseUseRule$0() { + return new A._Record_2(this._parseSingleProduction$1$1(new A.StylesheetParser_parseUseRule_closure(this), type$.UseRule), this.warnings); + }, + _parseSingleProduction$1$1(production, $T) { + return this.wrapSpanFormatException$1(new A.StylesheetParser__parseSingleProduction_closure(this, production, $T)); + }, + _statement$1$root(root) { + var t2, _this = this, + t1 = _this.scanner, + _0_0 = t1.peekChar$0(); + if (64 === _0_0) + return _this.atRule$2$root(new A.StylesheetParser__statement_closure(_this), root); + if (43 === _0_0) { + if (!_this.get$indented() || !_this.lookingAtIdentifier$1(1)) + return _this._styleRule$0(); + _this._isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + return _this._includeRule$1(new A._SpanScannerState(t1, t2)); + } + if (61 === _0_0) { + if (!_this.get$indented()) + return _this._styleRule$0(); + _this._isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + _this.whitespace$1$consumeNewlines(true); + return _this._mixinRule$1(new A._SpanScannerState(t1, t2)); + } + if (125 === _0_0) + t1.error$2$length(0, 'unmatched "}".', 1); + return _this._inStyleRule || _this._stylesheet$_inUnknownAtRule || _this._stylesheet$_inMixin || _this._inContentBlock ? _this._declarationOrStyleRule$0() : _this._variableDeclarationOrStyleRule$0(); + }, + _statement$0() { + return this._statement$1$root(false); + }, + _variableDeclarationWithNamespace$0() { + var t1 = this.scanner, + t2 = t1._string_scanner$_position, + namespace = this.identifier$0(); + t1.expectChar$1(46); + return this.variableDeclarationWithoutNamespace$2(namespace, new A._SpanScannerState(t1, t2)); + }, + variableDeclarationWithoutNamespace$2(namespace, start_) { + var t1, start, $name, t2, value, flagStart, t3, guarded, global, _0_0, declaration, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + if (start_ == null) { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + } else + start = start_; + $name = _this.variableName$0(); + t1 = namespace != null; + if (t1) + _this._assertPublic$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure(_this, start)); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sass_v, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(true); + t2 = _this.scanner; + t2.expectChar$1(58); + _this.whitespace$1$consumeNewlines(true); + value = _this._expression$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + for (t3 = _this.warnings, guarded = false, global = false; t2.scanChar$1(33);) { + $label0$0: { + _0_0 = _this.identifier$0(); + if ("default" === _0_0) { + if (guarded) + t3.push(new A._Record_3_deprecation_message_span(B.Deprecation_nRC, string$.x21defau, _this.spanFrom$1(flagStart))); + guarded = true; + break $label0$0; + } + if ("global" === _0_0) { + if (t1) + _this.error$2(0, string$.x21globai, _this.spanFrom$1(flagStart)); + else if (global) + t3.push(new A._Record_3_deprecation_message_span(B.Deprecation_nRC, string$.x21globas, _this.spanFrom$1(flagStart))); + global = true; + break $label0$0; + } + _this.error$2(0, "Invalid flag name.", _this.spanFrom$1(flagStart)); + } + _this.whitespace$1$consumeNewlines(false); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + } + _this.expectStatementSeparator$1("variable declaration"); + declaration = A.VariableDeclaration$($name, value, _this.spanFrom$1(start), precedingComment, global, guarded, namespace); + if (global) + _this._globalVariables.putIfAbsent$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure0(declaration)); + return declaration; + }, + variableDeclarationWithoutNamespace$0() { + return this.variableDeclarationWithoutNamespace$2(null, null); + }, + _variableDeclarationOrStyleRule$0() { + var t1, t2, variableOrInterpolation, t3, _this = this; + if (_this.get$plainCss()) + return _this._styleRule$0(); + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._styleRule$0(); + if (!_this.lookingAtIdentifier$0()) + return _this._styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + variableOrInterpolation = _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + t1 = variableOrInterpolation; + else { + t3 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t3.addInterpolation$1(type$.Interpolation._as(variableOrInterpolation)); + t2 = _this._styleRule$2(t3, new A._SpanScannerState(t1, t2)); + t1 = t2; + } + return t1; + }, + _declarationOrStyleRule$0() { + var t1, t2, declarationOrBuffer, _this = this; + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + declarationOrBuffer = _this._declarationOrBuffer$0(); + return declarationOrBuffer instanceof A.Statement ? declarationOrBuffer : _this._styleRule$2(type$.InterpolationBuffer._as(declarationOrBuffer), new A._SpanScannerState(t1, t2)); + }, + _declarationOrBuffer$0() { + var midBuffer, couldBeSelector, beforeDeclaration, value, additional, t2, t3, variableOrInterpolation, $name, isCustomProperty, t4, postColonWhitespace, _0_0, exception, _1_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + nameBuffer = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + startsWithPunctuation = _this._lookingAtPotentialPropertyHack$0(); + if (startsWithPunctuation) { + t2 = t1.readChar$0(); + t3 = nameBuffer._interpolation_buffer$_text; + t2 = A.Primitives_stringFromCharCode(t2); + t3._contents += t2; + t2 = _this.rawText$1(new A.StylesheetParser__declarationOrBuffer_closure(_this)); + t3 = nameBuffer._interpolation_buffer$_text; + t3._contents += t2; + } + if (!_this._lookingAtInterpolatedIdentifier$0()) + return nameBuffer; + variableOrInterpolation = startsWithPunctuation ? _this.interpolatedIdentifier$0() : _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + return variableOrInterpolation; + else + nameBuffer.addInterpolation$1(type$.Interpolation._as(variableOrInterpolation)); + _this._isUseAllowed = false; + if (t1.matches$1("/*")) { + t2 = _this.rawText$1(_this.get$loudComment()); + t3 = nameBuffer._interpolation_buffer$_text; + t3._contents += t2; + } + midBuffer = new A.StringBuffer(""); + t2 = midBuffer; + t3 = _this.rawText$1(new A.StylesheetParser__declarationOrBuffer_closure0(_this)); + t2._contents += t3; + t3 = t1._string_scanner$_position; + if (!t1.scanChar$1(58)) { + if (midBuffer._contents.length !== 0) { + t1 = nameBuffer._interpolation_buffer$_text; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + } + return nameBuffer; + } + t2 = A.Primitives_stringFromCharCode(58); + midBuffer._contents += t2; + $name = nameBuffer.interpolation$1(_this.spanFrom$2(start, new A._SpanScannerState(t1, t3))); + isCustomProperty = B.JSString_methods.startsWith$1($name.get$initialPlain(), "--"); + if (!isCustomProperty) + if (_this._inPlainCssFunction) { + t3 = A.NullableExtension_andThen($name.get$asPlain(), new A.StylesheetParser__declarationOrBuffer_closure1()); + if (t3 == null) + t3 = false; + } else + t3 = false; + else + t3 = true; + if (t3) { + if (_this.atEndOfStatement$0()) { + t1 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t2 = t1.offset; + t2 = A.Interpolation$(B.List_empty12, B.List_empty13, A._FileSpan$(t1.file, t2, t2)); + t1 = t2; + } else + t1 = _this._interpolatedDeclarationValue$1$silentComments(false); + _this.expectStatementSeparator$1(isCustomProperty ? "custom property" : "@function result"); + return A.Declaration$notSassScript($name, new A.StringExpression(t1, false), _this.spanFrom$1(start)); + } + if (t1.scanChar$1(58)) { + t1 = nameBuffer; + t3 = t1._interpolation_buffer$_text; + t4 = A.S(midBuffer); + t3._contents = (t3._contents += t4) + t2; + return t1; + } else if (_this.get$indented() && _this._lookingAtInterpolatedIdentifier$0()) { + t1 = nameBuffer; + t2 = t1._interpolation_buffer$_text; + t3 = A.S(midBuffer); + t2._contents += t3; + return t1; + } + postColonWhitespace = _this.rawText$1(new A.StylesheetParser__declarationOrBuffer_closure2(_this)); + _0_0 = _this._tryDeclarationChildren$2($name, start); + if (_0_0 != null) + return _0_0; + midBuffer._contents += postColonWhitespace; + couldBeSelector = postColonWhitespace.length === 0 && _this._lookingAtInterpolatedIdentifier$0(); + beforeDeclaration = new A._SpanScannerState(t1, t1._string_scanner$_position); + value = null; + try { + value = _this._expression$0(); + if (_this.lookingAtChildren$0()) { + if (couldBeSelector) + _this.expectStatementSeparator$0(); + } else if (!_this.atEndOfStatement$0()) + _this.expectStatementSeparator$0(); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + if (!couldBeSelector) + throw exception; + t1.set$state(beforeDeclaration); + additional = _this.almostAnyValue$0(); + if (!_this.get$indented() && t1.peekChar$0() === 59) + throw exception; + t1 = nameBuffer._interpolation_buffer$_text; + t2 = A.S(midBuffer); + t1._contents += t2; + nameBuffer.addInterpolation$1(additional); + return nameBuffer; + } else + throw exception; + } + _1_0 = _this._tryDeclarationChildren$3$value($name, start, value); + if (_1_0 != null) + return _1_0; + else { + _this.expectStatementSeparator$0(); + return A.Declaration$($name, value, _this.spanFrom$1(start)); + } + }, + _variableDeclarationOrInterpolation$0() { + var t1, start, identifier, buffer, _this = this; + if (!_this.lookingAtIdentifier$0()) + return _this.interpolatedIdentifier$0(); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + identifier = _this.identifier$0(); + if (t1.matches$1(".$")) { + t1.readChar$0(); + return _this.variableDeclarationWithoutNamespace$2(identifier, start); + } else { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = identifier; + if (_this._lookingAtInterpolatedIdentifierBody$0()) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } + }, + _styleRule$2(buffer, start_) { + var t1, start, interpolation, t2, _this = this; + _this._isUseAllowed = false; + if (start_ == null) { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + } else + start = start_; + t1 = {}; + interpolation = t1.interpolation = _this.styleRuleSelector$0(); + if (buffer != null) { + buffer.addInterpolation$1(interpolation); + t2 = t1.interpolation = buffer.interpolation$1(_this.spanFrom$1(start)); + } else + t2 = interpolation; + if (t2.contents.length === 0) + _this.scanner.error$1(0, 'expected "}".'); + return _this._withStyleRuleChildren$1$3(t2, start, new A.StylesheetParser__styleRule_closure(t1, _this, start), type$.StyleRule); + }, + _styleRule$0() { + return this._styleRule$2(null, null); + }, + _withStyleRuleChildren$1$3(nodeWithSpan, start, create, $T) { + var _this = this, + wasInStyleRule = _this._inStyleRule; + _this._inStyleRule = true; + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__withStyleRuleChildren_closure(_this, nodeWithSpan, wasInStyleRule, create, $T)); + }, + _propertyOrVariableDeclaration$0() { + var t2, nameBuffer, t3, $name, variableOrInterpolation, _0_0, value, _1_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._lookingAtPotentialPropertyHack$0()) { + t2 = new A.StringBuffer(""); + nameBuffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + t3 = _this.rawText$1(new A.StylesheetParser__propertyOrVariableDeclaration_closure(_this)); + t2._contents += t3; + nameBuffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + $name = nameBuffer.interpolation$1(_this.spanFrom$1(start)); + } else if (!_this.get$plainCss()) { + variableOrInterpolation = _this._variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration) + return variableOrInterpolation; + else + type$.Interpolation._as(variableOrInterpolation); + $name = variableOrInterpolation; + } else + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$1$consumeNewlines(false); + t1.expectChar$1(58); + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--")) + _this.error$2(0, string$.Declarw, $name.span); + _this.whitespace$1$consumeNewlines(false); + _0_0 = _this._tryDeclarationChildren$2($name, start); + if (_0_0 != null) + return _0_0; + value = _this._expression$0(); + _1_0 = _this._tryDeclarationChildren$3$value($name, start, value); + if (_1_0 != null) + return _1_0; + else { + _this.expectStatementSeparator$0(); + return A.Declaration$($name, value, _this.spanFrom$1(start)); + } + }, + _tryDeclarationChildren$3$value($name, start, value) { + var _this = this; + if (!_this.lookingAtChildren$0()) + return null; + if (_this.get$plainCss()) + _this.scanner.error$1(0, string$.Nested); + return _this._withChildren$3(_this.get$_declarationChild(), start, new A.StylesheetParser__tryDeclarationChildren_closure($name, value)); + }, + _tryDeclarationChildren$2($name, start) { + return this._tryDeclarationChildren$3$value($name, start, null); + }, + _declarationChild$0() { + return this.scanner.peekChar$0() === 64 ? this._declarationAtRule$0() : this._propertyOrVariableDeclaration$0(); + }, + atRule$2$root(child, root) { + var $name, wasUseAllowed, value, optional, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$2$name(64, "@-rule"); + $name = _this.interpolatedIdentifier$0(); + wasUseAllowed = _this._isUseAllowed; + _this._isUseAllowed = false; + switch ($name.get$asPlain()) { + case "at-root": + return _this._atRootRule$1(start); + case "content": + return _this._contentRule$1(start); + case "debug": + return _this._debugRule$1(start); + case "each": + return _this._eachRule$2(start, child); + case "else": + return _this._disallowedAtRule$1(start); + case "error": + return _this._errorRule$1(start); + case "extend": + _this.whitespace$1$consumeNewlines(true); + if (!_this._inStyleRule && !_this._stylesheet$_inMixin && !_this._inContentBlock) + _this.error$2(0, string$.x40exten, _this.spanFrom$1(start)); + value = _this.almostAnyValue$0(); + optional = t1.scanChar$1(33); + if (optional) { + _this.expectIdentifier$1("optional"); + _this.whitespace$1$consumeNewlines(false); + } + _this.expectStatementSeparator$1("@extend rule"); + return new A.ExtendRule(value, optional, _this.spanFrom$1(start)); + case "for": + return _this._forRule$2(start, child); + case "forward": + _this._isUseAllowed = wasUseAllowed; + if (!root) + _this._disallowedAtRule$1(start); + return _this._forwardRule$1(start); + case "function": + return _this._functionRule$2(start, $name); + case "if": + return _this._ifRule$2(start, child); + case "import": + return _this._importRule$1(start); + case "include": + return _this._includeRule$1(start); + case "media": + return _this.mediaRule$1(start); + case "mixin": + return _this._mixinRule$1(start); + case "-moz-document": + return _this.mozDocumentRule$2(start, $name); + case "return": + return _this._disallowedAtRule$1(start); + case "supports": + return _this.supportsRule$1(start); + case "use": + _this._isUseAllowed = wasUseAllowed; + if (!root) + _this._disallowedAtRule$1(start); + return _this._useRule$1(start); + case "warn": + return _this._warnRule$1(start); + case "while": + return _this._whileRule$2(start, child); + default: + return _this.unknownAtRule$2(start, $name); + } + }, + _declarationAtRule$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = _this._plainAtRuleName$0(); + $label0$0: { + if ("content" === _0_0) { + t1 = _this._contentRule$1(start); + break $label0$0; + } + if ("debug" === _0_0) { + t1 = _this._debugRule$1(start); + break $label0$0; + } + if ("each" === _0_0) { + t1 = _this._eachRule$2(start, _this.get$_declarationChild()); + break $label0$0; + } + if ("else" === _0_0) + _this._disallowedAtRule$1(start); + if ("error" === _0_0) { + t1 = _this._errorRule$1(start); + break $label0$0; + } + if ("for" === _0_0) { + t1 = _this._forRule$2(start, _this.get$_declarationChild()); + break $label0$0; + } + if ("if" === _0_0) { + t1 = _this._ifRule$2(start, _this.get$_declarationChild()); + break $label0$0; + } + if ("include" === _0_0) { + t1 = _this._includeRule$1(start); + break $label0$0; + } + if ("warn" === _0_0) { + t1 = _this._warnRule$1(start); + break $label0$0; + } + if ("while" === _0_0) { + t1 = _this._whileRule$2(start, _this.get$_declarationChild()); + break $label0$0; + } + t1 = _this._disallowedAtRule$1(start); + } + return t1; + }, + _functionChild$0() { + var state, variableDeclarationError, stackTrace, statement, t2, exception, t3, start, _0_0, value, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() !== 64) { + state = new A._SpanScannerState(t1, t1._string_scanner$_position); + try { + t2 = _this._variableDeclarationWithNamespace$0(); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + t3 = type$.SourceSpanFormatException; + if (t3._is(t2)) { + variableDeclarationError = t2; + stackTrace = A.getTraceFromException(exception); + t1.set$state(state); + statement = null; + try { + statement = _this._declarationOrStyleRule$0(); + } catch (exception) { + if (t3._is(A.unwrapException(exception))) + throw A.wrapException(variableDeclarationError); + else + throw exception; + } + t2 = statement instanceof A.StyleRule ? "style rules" : "declarations"; + _this.error$3(0, "@function rules may not contain " + t2 + ".", J.get$span$x(statement), stackTrace); + } else + throw exception; + } + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _0_0 = _this._plainAtRuleName$0(); + $label0$0: { + if ("debug" === _0_0) { + t1 = _this._debugRule$1(start); + break $label0$0; + } + if ("each" === _0_0) { + t1 = _this._eachRule$2(start, _this.get$_functionChild()); + break $label0$0; + } + if ("else" === _0_0) + _this._disallowedAtRule$1(start); + if ("error" === _0_0) { + t1 = _this._errorRule$1(start); + break $label0$0; + } + if ("for" === _0_0) { + t1 = _this._forRule$2(start, _this.get$_functionChild()); + break $label0$0; + } + if ("if" === _0_0) { + t1 = _this._ifRule$2(start, _this.get$_functionChild()); + break $label0$0; + } + if ("return" === _0_0) { + _this.whitespace$1$consumeNewlines(true); + value = _this._expression$0(); + _this.expectStatementSeparator$1("@return rule"); + t1 = new A.ReturnRule(value, _this.spanFrom$1(start)); + break $label0$0; + } + if ("warn" === _0_0) { + t1 = _this._warnRule$1(start); + break $label0$0; + } + if ("while" === _0_0) { + t1 = _this._whileRule$2(start, _this.get$_functionChild()); + break $label0$0; + } + t1 = _this._disallowedAtRule$1(start); + } + return t1; + }, + _plainAtRuleName$0() { + this.scanner.expectChar$2$name(64, "@-rule"); + return this.identifier$0(); + }, + _atRootRule$1(start) { + var t1, t2, t3, buffer, t4, _this = this; + _this.whitespace$1$consumeNewlines(false); + t1 = _this.scanner; + if (t1.peekChar$0() === 40) { + t2 = t1._string_scanner$_position; + t3 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1.expectChar$1(40); + t4 = A.Primitives_stringFromCharCode(40); + t3._contents += t4; + _this.whitespace$1$consumeNewlines(true); + _this._addOrInject$2(buffer, _this._expression$1$consumeNewlines(true)); + if (t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + t4 = A.Primitives_stringFromCharCode(58); + t3._contents += t4; + t4 = A.Primitives_stringFromCharCode(32); + t3._contents += t4; + _this._addOrInject$2(buffer, _this._expression$1$consumeNewlines(true)); + } + t1.expectChar$1(41); + _this.whitespace$1$consumeNewlines(false); + t4 = A.Primitives_stringFromCharCode(41); + t3._contents += t4; + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__atRootRule_closure(buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))))); + } else { + if (!_this.lookingAtChildren$0()) + t1 = _this.get$indented() && _this.atEndOfStatement$0(); + else + t1 = true; + if (t1) + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__atRootRule_closure0()); + else + return A.AtRootRule$(A._setArrayType([_this._styleRule$0()], type$.JSArray_Statement), _this.spanFrom$1(start), null); + } + }, + _contentRule$1(start) { + var t1, beforeWhitespace, $arguments, _this = this; + if (!_this._stylesheet$_inMixin) + _this.error$2(0, string$.x40conte, _this.spanFrom$1(start)); + t1 = _this.scanner; + beforeWhitespace = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + _this.whitespace$1$consumeNewlines(false); + if (t1.peekChar$0() === 40) { + $arguments = _this._argumentInvocation$1$mixin(true); + _this.whitespace$1$consumeNewlines(false); + } else { + t1 = beforeWhitespace.offset; + $arguments = A.ArgumentList$empty(A._FileSpan$(beforeWhitespace.file, t1, t1)); + } + _this.expectStatementSeparator$1("@content rule"); + return new A.ContentRule($arguments, _this.spanFrom$1(start)); + }, + _debugRule$1(start) { + var value, t1, t2, _this = this; + _this.whitespace$1$consumeNewlines(true); + value = _this._expression$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.expectStatementSeparator$1("@debug rule"); + return new A.DebugRule(value, _this.spanFrom$2(start, new A._SpanScannerState(t1, t2))); + }, + _eachRule$2(start, child) { + var wasInControlDirective, variables, t1, _this = this; + _this.whitespace$1$consumeNewlines(true); + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + variables = A._setArrayType([_this.variableName$0()], type$.JSArray_String); + _this.whitespace$1$consumeNewlines(true); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(36); + variables.push(_this.identifier$1$normalize(true)); + _this.whitespace$1$consumeNewlines(true); + } + _this.whitespace$1$consumeNewlines(true); + _this.expectIdentifier$1("in"); + _this.whitespace$1$consumeNewlines(true); + return _this._withChildren$3(child, start, new A.StylesheetParser__eachRule_closure(_this, wasInControlDirective, variables, _this._expression$0())); + }, + _errorRule$1(start) { + var value, t1, t2, _this = this; + _this.whitespace$1$consumeNewlines(true); + value = _this._expression$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.expectStatementSeparator$1("@error rule"); + return new A.ErrorRule(value, _this.spanFrom$2(start, new A._SpanScannerState(t1, t2))); + }, + _functionRule$2(start, atRuleName) { + var precedingComment, t1, beforeName, $name, _1_0, parameters, _this = this; + _this.whitespace$1$consumeNewlines(true); + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + t1 = _this.scanner; + beforeName = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (t1.matches$1("--")) + return _this.unknownAtRule$2(start, atRuleName); + $name = _this.identifier$0(); + if (A.equalsIgnoreCase($name, "type")) + _this.error$2(0, string$.This_n, _this.spanFrom$1(beforeName)); + $label0$0: { + if ("expression" === $name || "url" === $name || "and" === $name || "or" === $name || "not" === $name) { + t1 = true; + break $label0$0; + } + t1 = A.unvendor($name) === "element"; + break $label0$0; + } + if (t1) + _this.error$2(0, "Invalid function name.", _this.spanFrom$1(beforeName)); + else { + _1_0 = $name.toLowerCase(); + $label1$1: { + if ("expression" === _1_0 || "url" === _1_0) { + t1 = true; + break $label1$1; + } + t1 = A.unvendor(_1_0) === "element"; + break $label1$1; + } + if (t1) + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_H4k, string$.Customf, _this.spanFrom$1(beforeName))); + } + _this.whitespace$1$consumeNewlines(true); + parameters = _this._parameterList$0(); + if (_this._stylesheet$_inMixin || _this._inContentBlock) + _this.error$2(0, string$.Mixinscf, _this.spanFrom$1(start)); + else if (_this._inControlDirective) + _this.error$2(0, string$.Functi, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(false); + return _this._withChildren$3(_this.get$_functionChild(), start, new A.StylesheetParser__functionRule_closure($name, parameters, precedingComment)); + }, + _forRule$2(start, child) { + var wasInControlDirective, variable, from, _this = this, t1 = {}; + _this.whitespace$1$consumeNewlines(true); + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + variable = _this.variableName$0(); + _this.whitespace$1$consumeNewlines(true); + _this.expectIdentifier$1("from"); + _this.whitespace$1$consumeNewlines(true); + t1.exclusive = null; + from = _this._expression$2$consumeNewlines$until(true, new A.StylesheetParser__forRule_closure(t1, _this)); + if (t1.exclusive == null) + _this.scanner.error$1(0, 'Expected "to" or "through".'); + _this.whitespace$1$consumeNewlines(true); + return _this._withChildren$3(child, start, new A.StylesheetParser__forRule_closure0(t1, _this, wasInControlDirective, variable, from, _this._expression$0())); + }, + _forwardRule$1(start) { + var url, prefix, hiddenMixinsAndFunctions, hiddenVariables, _0_0, shownMixinsAndFunctions, shownVariables, _1_0, configuration, span, t1, t2, t3, t4, _this = this, _null = null; + _this.whitespace$1$consumeNewlines(true); + url = _this._urlString$0(); + _this.whitespace$1$consumeNewlines(false); + if (_this.scanIdentifier$1("as")) { + _this.whitespace$1$consumeNewlines(true); + prefix = _this.identifier$1$normalize(true); + _this.scanner.expectChar$1(42); + _this.whitespace$1$consumeNewlines(false); + } else + prefix = _null; + hiddenMixinsAndFunctions = _null; + hiddenVariables = _null; + if (_this.scanIdentifier$1("show")) { + _this.whitespace$1$consumeNewlines(true); + _0_0 = _this._memberList$0(); + shownMixinsAndFunctions = _0_0._0; + shownVariables = _0_0._1; + } else { + if (_this.scanIdentifier$1("hide")) { + _this.whitespace$1$consumeNewlines(true); + _1_0 = _this._memberList$0(); + hiddenMixinsAndFunctions = _1_0._0; + hiddenVariables = _1_0._1; + } + shownVariables = _null; + shownMixinsAndFunctions = shownVariables; + } + configuration = _this._stylesheet$_configuration$1$allowGuarded(true); + _this.whitespace$1$consumeNewlines(false); + _this.expectStatementSeparator$1("@forward rule"); + span = _this.spanFrom$1(start); + if (!_this._isUseAllowed) + _this.error$2(0, string$.x40forwa, span); + if (shownMixinsAndFunctions != null) { + shownVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(shownMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(shownVariables, t1); + t4 = configuration == null ? B.List_empty11 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable); + return new A.ForwardRule(url, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), _null, _null, prefix, t4, span); + } else if (hiddenMixinsAndFunctions != null) { + hiddenVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(hiddenMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(hiddenVariables, t1); + t4 = configuration == null ? B.List_empty11 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable); + return new A.ForwardRule(url, _null, _null, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), prefix, t4, span); + } else + return new A.ForwardRule(url, _null, _null, _null, _null, prefix, configuration == null ? B.List_empty11 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable), span); + }, + _memberList$0() { + var _this = this, + t1 = type$.String, + identifiers = A.LinkedHashSet_LinkedHashSet$_empty(t1), + variables = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t1 = _this.scanner; + do { + _this.whitespace$1$consumeNewlines(true); + _this.withErrorMessage$2(string$.Expectv, new A.StylesheetParser__memberList_closure(_this, variables, identifiers)); + _this.whitespace$1$consumeNewlines(false); + } while (t1.scanChar$1(44)); + return new A._Record_2(identifiers, variables); + }, + _ifRule$2(start, child) { + var ifIndentation, wasInControlDirective, condition, children, clauses, lastClause, span, _this = this; + _this.whitespace$1$consumeNewlines(true); + ifIndentation = _this.get$currentIndentation(); + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + condition = _this._expression$0(); + children = _this.children$1(0, child); + _this.whitespaceWithoutComments$1$consumeNewlines(false); + clauses = A._setArrayType([A.IfClause$(condition, children)], type$.JSArray_IfClause); + for (;;) { + if (!_this.scanElse$1(ifIndentation)) { + lastClause = null; + break; + } + _this.whitespace$1$consumeNewlines(false); + if (_this.scanIdentifier$1("if")) { + _this.whitespace$1$consumeNewlines(true); + clauses.push(A.IfClause$(_this._expression$0(), _this.children$1(0, child))); + } else { + lastClause = A.ElseClause$(_this.children$1(0, child)); + break; + } + } + _this._inControlDirective = wasInControlDirective; + span = _this.spanFrom$1(start); + _this.whitespaceWithoutComments$1$consumeNewlines(false); + return new A.IfRule(A.List_List$unmodifiable(clauses, type$.IfClause), lastClause, span); + }, + _importRule$1(start) { + var argument, t3, _this = this, + imports = A._setArrayType([], type$.JSArray_Import), + t1 = _this.scanner, + t2 = _this.warnings; + do { + _this.whitespace$1$consumeNewlines(false); + argument = _this.importArgument$0(); + t3 = argument instanceof A.DynamicImport; + if (t3) + t2.push(new A._Record_3_deprecation_message_span(B.Deprecation_6BW, string$.Sass__i, argument.span)); + if ((_this._inControlDirective || _this._stylesheet$_inMixin) && t3) + _this._disallowedAtRule$1(start); + imports.push(argument); + _this.whitespace$1$consumeNewlines(false); + } while (t1.scanChar$1(44)); + _this.expectStatementSeparator$1("@import rule"); + t1 = _this.spanFrom$1(start); + return new A.ImportRule(A.List_List$unmodifiable(imports, type$.Import), t1); + }, + importArgument$0() { + var url, urlSpan, innerError, stackTrace, modifiers, exception, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = t1.peekChar$0(); + if (117 === _0_0 || 85 === _0_0) { + url = _this.dynamicUrl$0(); + _this.whitespace$1$consumeNewlines(false); + modifiers = _this.tryImportModifiers$0(); + t1 = url instanceof A.StringExpression ? url.text : A.Interpolation$(A._setArrayType([url], type$.JSArray_Object), A._setArrayType([url.get$span(url)], type$.JSArray_nullable_FileSpan), url.get$span(url)); + return new A.StaticImport(t1, modifiers, _this.spanFrom$1(start)); + } + url = _this.string$0(); + urlSpan = _this.spanFrom$1(start); + _this.whitespace$1$consumeNewlines(false); + modifiers = _this.tryImportModifiers$0(); + if (_this.isPlainImportUrl$1(url) || modifiers != null) + return new A.StaticImport(new A.Interpolation(A.List_List$unmodifiable([urlSpan.get$text()], type$.Object), B.List_null, urlSpan), modifiers, _this.spanFrom$1(start)); + else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport(t1, urlSpan); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), urlSpan, stackTrace); + } else + throw exception; + } + }, + parseImportUrl$1(url) { + var t1 = $.$get$windows(); + if (t1.style.rootLength$1(url) > 0 && !$.$get$url().style.isRootRelative$1(url)) + return t1.toUri$1(url).toString$0(0); + A.Uri_parse(url); + return url; + }, + isPlainImportUrl$1(url) { + var _0_0, t1; + if (url.length < 5) + return false; + if (B.JSString_methods.endsWith$1(url, ".css")) + return true; + _0_0 = url.charCodeAt(0); + $label0$0: { + if (47 === _0_0) { + t1 = url.charCodeAt(1) === 47; + break $label0$0; + } + if (104 === _0_0) { + t1 = B.JSString_methods.startsWith$1(url, "http://") || B.JSString_methods.startsWith$1(url, "https://"); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + tryImportModifiers$0() { + var t1, start, t2, t3, t4, buffer, t5, identifier, $name, query, t6, _this = this; + if (!_this._lookingAtInterpolatedIdentifier$0() && _this.scanner.peekChar$0() !== 40) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t2 = new A.StringBuffer(""); + t3 = A._setArrayType([], type$.JSArray_Object); + t4 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer(t2, t3, t4); + for (;;) + if (_this._lookingAtInterpolatedIdentifier$0()) { + if (!(t3.length === 0 && t2._contents.length === 0)) { + t5 = A.Primitives_stringFromCharCode(32); + t2._contents += t5; + } + identifier = _this.interpolatedIdentifier$0(); + buffer.addInterpolation$1(identifier); + t5 = identifier.get$asPlain(); + $name = t5 == null ? null : t5.toLowerCase(); + if ($name !== "and" && t1.scanChar$1(40)) { + if ($name === "supports") { + query = _this._importSupportsQuery$0(); + t5 = !(query instanceof A.SupportsDeclaration); + if (t5) { + t6 = A.Primitives_stringFromCharCode(40); + t2._contents += t6; + } + t6 = query.get$span(query); + buffer._flushText$0(); + t3.push(new A.SupportsExpression(query)); + t4.push(t6); + if (t5) { + t5 = A.Primitives_stringFromCharCode(41); + t2._contents += t5; + } + } else { + t5 = A.Primitives_stringFromCharCode(40); + t2._contents += t5; + buffer.addInterpolation$1(_this._interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true)); + t5 = A.Primitives_stringFromCharCode(41); + t2._contents += t5; + } + t1.expectChar$1(41); + _this.whitespace$1$consumeNewlines(false); + } else { + _this.whitespace$1$consumeNewlines(false); + if (t1.scanChar$1(44)) { + t2._contents += ", "; + buffer.addInterpolation$1(_this._mediaQueryList$0()); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } + } + } else if (t1.peekChar$0() === 40) { + if (!(t3.length === 0 && t2._contents.length === 0)) { + t1 = A.Primitives_stringFromCharCode(32); + t2._contents += t1; + } + buffer.addInterpolation$1(_this._mediaQueryList$0()); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } else + return buffer.interpolation$1(_this.spanFrom$1(start)); + }, + _importSupportsQuery$0() { + var t1, t2, _0_0, $name, _this = this; + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$1$consumeNewlines(true); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + return new A.SupportsNegation(_this._supportsConditionInParens$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + } else { + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + return _this._supportsCondition$1$inParentheses(true); + else { + _0_0 = _this._tryImportSupportsFunction$0(); + if (_0_0 != null) + return _0_0; + t2 = t1._string_scanner$_position; + $name = _this._expression$1$consumeNewlines(true); + t1.expectChar$1(58); + return new A.SupportsDeclaration($name, _this._supportsDeclarationValue$1($name), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + } + }, + _tryImportSupportsFunction$0() { + var t1, start, $name, value, _this = this; + if (!_this._lookingAtInterpolatedIdentifier$0()) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + $name = _this.interpolatedIdentifier$0(); + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + value = _this._interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true); + t1.expectChar$1(41); + return new A.SupportsFunction($name, value, _this.spanFrom$1(start)); + }, + _includeRule$1(start) { + var $name, t1, name0, namespace, $arguments, t2, t3, contentParameters, contentParameters_, wasInContentBlock, $content, span, _this = this, _null = null; + _this.whitespace$1$consumeNewlines(true); + $name = _this.identifier$0(); + t1 = _this.scanner; + if (t1.scanChar$1(46)) { + name0 = _this._publicIdentifier$0(); + namespace = $name; + $name = name0; + } else + namespace = _null; + _this.whitespace$1$consumeNewlines(false); + if (t1.peekChar$0() === 40) + $arguments = _this._argumentInvocation$1$mixin(true); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = A.ArgumentList$empty(A._FileSpan$(t2.file, t3, t3)); + } + _this.whitespace$1$consumeNewlines(false); + if (_this.scanIdentifier$1("using")) { + _this.whitespace$1$consumeNewlines(true); + contentParameters = _this._parameterList$0(); + _this.whitespace$1$consumeNewlines(false); + } else + contentParameters = _null; + t2 = contentParameters == null; + if (!t2 || _this.lookingAtChildren$0()) { + if (t2) { + t1 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t2 = t1.offset; + contentParameters_ = new A.ParameterList(B.List_empty14, _null, A._FileSpan$(t1.file, t2, t2)); + } else + contentParameters_ = contentParameters; + wasInContentBlock = _this._inContentBlock; + _this._inContentBlock = true; + $content = _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__includeRule_closure(contentParameters_)); + _this._inContentBlock = wasInContentBlock; + } else { + _this.expectStatementSeparator$0(); + $content = _null; + } + t1 = _this.spanFrom$2(start, start); + t2 = $content == null ? $arguments : $content; + span = t1.expand$1(0, t2.get$span(t2)); + return new A.IncludeRule(namespace, A.stringReplaceAllUnchecked($name, "_", "-"), $name, $arguments, $content, span); + }, + mediaRule$1(start) { + var _this = this; + _this.whitespace$1$consumeNewlines(false); + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_mediaRule_closure(_this._mediaQueryList$0())); + }, + _mixinRule$1(start) { + var precedingComment, t1, t2, $name, parameters, _this = this; + _this.whitespace$1$consumeNewlines(true); + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + $name = _this.identifier$0(); + if (B.JSString_methods.startsWith$1($name, "--")) + _this.error$2(0, string$.Sass__m, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + _this.whitespace$1$consumeNewlines(false); + if (t1.peekChar$0() === 40) + parameters = _this._parameterList$0(); + else { + t1 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t2 = t1.offset; + parameters = new A.ParameterList(B.List_empty14, null, A._FileSpan$(t1.file, t2, t2)); + } + if (_this._stylesheet$_inMixin || _this._inContentBlock) + _this.error$2(0, string$.Mixinscm, _this.spanFrom$1(start)); + else if (_this._inControlDirective) + _this.error$2(0, string$.Mixinsb, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(false); + _this._stylesheet$_inMixin = true; + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser__mixinRule_closure(_this, $name, parameters, precedingComment)); + }, + mozDocumentRule$2(start, $name) { + var t1, t2, t3, t4, t5, buffer, _0_0, identifierStart, identifier, _1_0, argument, t6, trailing, start0, end, _this = this, _box_0 = {}; + _this.whitespace$1$consumeNewlines(false); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer(t3, t4, t5); + _box_0.needsDeprecationWarning = false; + for (;;) { + if (t1.peekChar$0() === 35) { + _0_0 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + _box_0.needsDeprecationWarning = true; + } else { + identifierStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + identifier = _this.identifier$0(); + $label0$0: { + if ("url" === identifier || "url-prefix" === identifier || "domain" === identifier) { + _1_0 = _this._tryUrlContents$2$name(identifierStart, identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(false); + argument = _this.interpolatedStringToken$0(); + t1.expectChar$1(41); + t3._contents += identifier; + t6 = A.Primitives_stringFromCharCode(40); + t3._contents += t6; + buffer.addInterpolation$1(argument); + t6 = A.Primitives_stringFromCharCode(41); + t3._contents += t6; + } + t6 = t3._contents; + trailing = t6.charCodeAt(0) == 0 ? t6 : t6; + if (!B.JSString_methods.endsWith$1(trailing, "url-prefix()") && !B.JSString_methods.endsWith$1(trailing, "url-prefix('')") && !B.JSString_methods.endsWith$1(trailing, 'url-prefix("")')) + _box_0.needsDeprecationWarning = true; + break $label0$0; + } + if ("regexp" === identifier) { + t3._contents += "regexp("; + t1.expectChar$1(40); + buffer.addInterpolation$1(_this.interpolatedStringToken$0()); + t1.expectChar$1(41); + t6 = A.Primitives_stringFromCharCode(41); + t3._contents += t6; + _box_0.needsDeprecationWarning = true; + break $label0$0; + } + _this.error$2(0, "Invalid function name.", _this.spanFrom$1(identifierStart)); + } + } + _this.whitespace$1$consumeNewlines(false); + if (!t1.scanChar$1(44)) + break; + t6 = A.Primitives_stringFromCharCode(44); + t3._contents += t6; + start0 = t1._string_scanner$_position; + new A.StylesheetParser_mozDocumentRule_closure(_this).call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t1.string, start0, end); + } + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_mozDocumentRule_closure0(_box_0, _this, $name, buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))))); + }, + supportsRule$1(start) { + var condition, _this = this; + _this.whitespace$1$consumeNewlines(false); + condition = _this._supportsCondition$0(); + _this.whitespace$1$consumeNewlines(false); + return _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_supportsRule_closure(condition)); + }, + _useRule$1(start) { + var url, namespace, configuration, span, t1, _this = this; + _this.whitespace$1$consumeNewlines(true); + url = _this._urlString$0(); + _this.whitespace$1$consumeNewlines(false); + namespace = _this._useNamespace$2(url, start); + _this.whitespace$1$consumeNewlines(false); + configuration = _this._stylesheet$_configuration$0(); + _this.whitespace$1$consumeNewlines(false); + span = _this.spanFrom$1(start); + if (!_this._isUseAllowed) + _this.error$2(0, string$.x40use_r, span); + _this.expectStatementSeparator$1("@use rule"); + t1 = new A.UseRule(url, namespace, configuration == null ? B.List_empty11 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable), span); + t1.UseRule$4$configuration(url, namespace, span, configuration); + return t1; + }, + _useNamespace$2(url, start) { + var namespace, basename, dot, t1, exception, _this = this; + if (_this.scanIdentifier$1("as")) { + _this.whitespace$1$consumeNewlines(true); + return _this.scanner.scanChar$1(42) ? null : _this.identifier$0(); + } + basename = url.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(url.get$pathSegments()); + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = B.JSString_methods.startsWith$1(basename, "_") ? 1 : 0; + namespace = B.JSString_methods.substring$2(basename, t1, dot === -1 ? basename.length : dot); + try { + t1 = new A.Parser(A.SpanScanner$(namespace, null), null)._parseIdentifier$0(); + return t1; + } catch (exception) { + if (type$.SassFormatException._is(A.unwrapException(exception))) + _this.error$2(0, 'The default namespace "' + A.S(namespace) + string$.x22x20is_n, _this.spanFrom$1(start)); + else + throw exception; + } + }, + _stylesheet$_configuration$1$allowGuarded(allowGuarded) { + var variableNames, configuration, t1, t2, variableStart, $name, expression, t3, guarded, span, _this = this; + if (!_this.scanIdentifier$1("with")) + return null; + variableNames = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + configuration = A._setArrayType([], type$.JSArray_ConfiguredVariable); + _this.whitespace$1$consumeNewlines(true); + t1 = _this.scanner; + t1.expectChar$1(40); + for (t2 = _this.warnings;;) { + _this.whitespace$1$consumeNewlines(true); + variableStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + if (B.JSString_methods.startsWith$1($name, "-")) + t2.push(new A._Record_3_deprecation_message_span(B.Deprecation_mXO, string$.Config, _this.spanFrom$1(variableStart))); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(58); + _this.whitespace$1$consumeNewlines(true); + expression = _this.expressionUntilComma$0(); + t3 = t1._string_scanner$_position; + if (allowGuarded && t1.scanChar$1(33)) { + guarded = _this.identifier$0() === "default"; + if (guarded) + _this.whitespace$1$consumeNewlines(true); + else + _this.error$2(0, "Invalid flag name.", _this.spanFrom$1(new A._SpanScannerState(t1, t3))); + } else + guarded = false; + span = _this.spanFrom$1(variableStart); + if (variableNames.contains$1(0, $name)) + _this.error$2(0, string$.The_sa, span); + variableNames.add$1(0, $name); + configuration.push(new A.ConfiguredVariable($name, expression, guarded, span)); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$1$consumeNewlines(true); + if (!_this._lookingAtExpression$0()) + break; + } + t1.expectChar$1(41); + return configuration; + }, + _stylesheet$_configuration$0() { + return this._stylesheet$_configuration$1$allowGuarded(false); + }, + _warnRule$1(start) { + var value, t1, t2, _this = this; + _this.whitespace$1$consumeNewlines(true); + value = _this._expression$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.expectStatementSeparator$1("@warn rule"); + return new A.WarnRule(value, _this.spanFrom$2(start, new A._SpanScannerState(t1, t2))); + }, + _whileRule$2(start, child) { + var wasInControlDirective, _this = this; + _this.whitespace$1$consumeNewlines(true); + wasInControlDirective = _this._inControlDirective; + _this._inControlDirective = true; + return _this._withChildren$3(child, start, new A.StylesheetParser__whileRule_closure(_this, wasInControlDirective, _this._expression$0())); + }, + unknownAtRule$2(start, $name) { + var wasInPlainCssFunction, t2, _0_0, t3, _this = this, t1 = {}, + wasInUnknownAtRule = _this._stylesheet$_inUnknownAtRule; + _this._stylesheet$_inUnknownAtRule = true; + _this.whitespace$1$consumeNewlines(false); + t1.value = null; + t2 = _this.scanner.peekChar$0() !== 33 && !_this.atEndOfStatement$0() ? t1.value = _this._interpolatedDeclarationValue$1$allowOpenBrace(false) : null; + wasInPlainCssFunction = _this._inPlainCssFunction; + _0_0 = $name.get$asPlain(); + if (_0_0 != null) + t3 = A.equalsIgnoreCase(_0_0, "function"); + else + t3 = false; + if (t3) + _this._inPlainCssFunction = true; + try { + if (_this.lookingAtChildren$0()) { + t1 = _this._withChildren$3(_this.get$_statement(), start, new A.StylesheetParser_unknownAtRule_closure(t1, $name)); + return t1; + } else { + _this.expectStatementSeparator$0(); + t1 = A.AtRule$($name, _this.spanFrom$1(start), null, t2); + return t1; + } + } finally { + _this._stylesheet$_inUnknownAtRule = wasInUnknownAtRule; + _this._inPlainCssFunction = wasInPlainCssFunction; + } + }, + _disallowedAtRule$1(start) { + var _this = this; + _this.whitespace$1$consumeNewlines(false); + _this._interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(true, false); + _this.error$2(0, "This at-rule is not allowed here.", _this.spanFrom$1(start)); + }, + _parameterList$0() { + var parameters, named, restParameter, t3, $name, defaultValue, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + parameters = A._setArrayType([], type$.JSArray_Parameter); + named = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + while (restParameter = null, t1.peekChar$0() === 36) { + t3 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + defaultValue = _this.expressionUntilComma$0(); + } else { + if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(44)) + _this.whitespace$1$consumeNewlines(true); + restParameter = $name; + break; + } + defaultValue = null; + } + parameters.push(new A.Parameter($name, defaultValue, _this.spanFrom$1(new A._SpanScannerState(t1, t3)))); + if (!named.add$1(0, $name)) + _this.error$2(0, "Duplicate parameter.", B.JSArray_methods.get$last(parameters).span); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$1$consumeNewlines(true); + } + t1.expectChar$1(41); + t1 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ParameterList(A.List_List$unmodifiable(parameters, type$.Parameter), restParameter, t1); + }, + _argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, mixin) { + var positional, t3, named, namedSpans, t4, t5, t6, rest, emittedRestDeprecation, keywordRest, expression, emittedRestDeprecation0, t7, value, t8, result, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + positional = A._setArrayType([], type$.JSArray_Expression); + t3 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.Expression); + namedSpans = A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.FileSpan); + for (t4 = !mixin, t5 = _this.warnings, t6 = type$.SourceSpan, rest = null, emittedRestDeprecation = false; keywordRest = null, _this._lookingAtExpression$0();) { + expression = _this.expressionUntilComma$1$singleEquals(t4); + _this.whitespace$1$consumeNewlines(true); + emittedRestDeprecation0 = true; + if (expression instanceof A.VariableExpression && t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + t7 = expression.name; + if (named.containsKey$1(t7)) + _this.error$2(0, "Duplicate argument.", expression.span); + value = _this.expressionUntilComma$1$singleEquals(t4); + named.$indexSet(0, t7, value); + t8 = expression.span; + namedSpans.$indexSet(0, t7, t8.expand$1(0, value.get$span(value))); + if (rest != null && !emittedRestDeprecation) { + t5.push(new A._Record_3_deprecation_message_span(B.Deprecation_8Zg, string$.Named_, new A.MultiSpan(_this.spanFromPosition$1(t8.get$start(t8).offset), "named argument", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rest.get$span(rest), "rest argument"], t6, t3), t6, t3)))); + emittedRestDeprecation = emittedRestDeprecation0; + } + } else if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + if (rest != null) { + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(44)) + _this.whitespace$1$consumeNewlines(true); + keywordRest = expression; + break; + } + rest = expression; + } else if (named.__js_helper$_length !== 0) + _this.error$2(0, string$.Positik, expression.get$span(expression)); + else { + positional.push(expression); + if (rest != null && !emittedRestDeprecation) { + t5.push(new A._Record_3_deprecation_message_span(B.Deprecation_8Zg, string$.Positir, new A.MultiSpan(expression.get$span(expression), "positional argument", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rest.get$span(rest), "rest argument"], t6, t3), t6, t3)))); + emittedRestDeprecation = emittedRestDeprecation0; + } + } + _this.whitespace$1$consumeNewlines(true); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$1$consumeNewlines(true); + if (allowEmptySecondArg && positional.length === 1 && named.__js_helper$_length === 0 && rest == null && t1.peekChar$0() === 41) { + t3 = t1._sourceFile; + t4 = t1._string_scanner$_position; + new A.FileLocation(t3, t4).FileLocation$_$2(t3, t4); + t5 = new A._FileSpan(t3, t4, t4); + t5._FileSpan$3(t3, t4, t4); + result = A.List_List$from([""], false, type$.Object); + result.$flags = 3; + positional.push(new A.StringExpression(new A.Interpolation(result, B.List_null, t5), false)); + break; + } + } + t1.expectChar$1(41); + return A.ArgumentList$(positional, named, namedSpans, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), keywordRest, rest); + }, + _argumentInvocation$0() { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(false, false); + }, + _argumentInvocation$1$allowEmptySecondArg(allowEmptySecondArg) { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, false); + }, + _argumentInvocation$1$mixin(mixin) { + return this._argumentInvocation$2$allowEmptySecondArg$mixin(false, mixin); + }, + _expression$4$bracketList$consumeNewlines$singleEquals$until(bracketList, consumeNewlines, singleEquals, until) { + var t2, beforeBracket, start, wasInExpression, wasInParentheses, resetState, resolveOneOperation, resolveOperations, addSingleExpression, addOperator, resolveSpaceExpressions, t3, t4, _3_0, _1_0, t5, _3_28, _2_0, _3_32, _3_40, commaExpressions, spaceExpressions, singleExpression, _this = this, + _s20_ = "Expected expression.", + _box_0 = {}, + t1 = until != null; + if (t1 && until.call$0()) + _this.scanner.error$1(0, _s20_); + if (bracketList) { + t2 = _this.scanner; + beforeBracket = new A._SpanScannerState(t2, t2._string_scanner$_position); + t2.expectChar$1(91); + _this.whitespace$1$consumeNewlines(true); + if (t2.scanChar$1(93)) { + t1 = A._setArrayType([], type$.JSArray_Expression); + t2 = _this.spanFrom$1(beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(t1, type$.Expression), B.ListSeparator_undecided_null_3_undecided, true, t2); + } + } else + beforeBracket = null; + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + wasInExpression = _this._inExpression; + wasInParentheses = _this._inParentheses; + _this._inExpression = true; + _box_0.operands_ = _box_0.operators_ = _box_0.spaceExpressions_ = _box_0.commaExpressions_ = null; + _box_0.allowSlash = true; + _box_0.singleExpression_ = _this._singleExpression$0(); + resetState = new A.StylesheetParser__expression_resetState(_box_0, _this, start); + resolveOneOperation = new A.StylesheetParser__expression_resolveOneOperation(_box_0, _this); + resolveOperations = new A.StylesheetParser__expression_resolveOperations(_box_0, resolveOneOperation); + addSingleExpression = new A.StylesheetParser__expression_addSingleExpression(_box_0, _this, resetState, resolveOperations); + addOperator = new A.StylesheetParser__expression_addOperator(_box_0, _this, resolveOneOperation, addSingleExpression); + resolveSpaceExpressions = new A.StylesheetParser__expression_resolveSpaceExpressions(_box_0, _this, resolveOperations); + for (t3 = !consumeNewlines, t4 = type$.JSArray_Expression;;) { + _this.whitespace$1$consumeNewlines(!t3 || bracketList); + if (t1 && until.call$0()) + break; + _3_0 = t2.peekChar$0(); + if (_3_0 == null) + break; + if (40 === _3_0) { + addSingleExpression.call$1(_this.parentheses$0()); + continue; + } + if (91 === _3_0) { + addSingleExpression.call$1(_this._expression$1$bracketList(true)); + continue; + } + if (36 === _3_0) { + addSingleExpression.call$1(_this._variable$0()); + continue; + } + if (38 === _3_0) { + addSingleExpression.call$1(_this._selector$0()); + continue; + } + if (39 === _3_0 || 34 === _3_0) { + addSingleExpression.call$1(_this.interpolatedString$0()); + continue; + } + if (35 === _3_0) { + addSingleExpression.call$1(_this._hashExpression$0()); + continue; + } + if (61 === _3_0) { + t2.readChar$0(); + if (singleEquals && t2.peekChar$0() !== 61) + addOperator.call$1(B.BinaryOperator_g6F); + else { + t2.expectChar$1(61); + addOperator.call$1(B.BinaryOperator_K7S); + } + continue; + } + if (33 === _3_0) { + $label0$1: { + _1_0 = t2.peekChar$1(1); + if (61 === _1_0) { + t2.readChar$0(); + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_Fv2); + break $label0$1; + } + t5 = true; + if (_1_0 != null) + if (105 !== _1_0) + if (73 !== _1_0) + t5 = _1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12; + if (t5) { + addSingleExpression.call$1(_this._importantExpression$0()); + break $label0$1; + } + break; + } + continue; + } + if (60 === _3_0) { + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_f2c : B.BinaryOperator_CG2); + continue; + } + if (62 === _3_0) { + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_YGt : B.BinaryOperator_Tic); + continue; + } + if (42 === _3_0) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_wkM); + continue; + } + _3_28 = 43 === _3_0; + if (_3_28 && _box_0.singleExpression_ == null) { + addSingleExpression.call$1(_this._unaryOperation$0()); + continue; + } + if (_3_28) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_jCK); + continue; + } + if (45 === _3_0) { + _2_0 = t2.peekChar$1(1); + if (A._isInt(_2_0) && _2_0 >= 48 && _2_0 <= 57 || 46 === _2_0) + if (_box_0.singleExpression_ != null) { + t5 = t2.peekChar$1(-1); + t5 = t5 === 32 || t5 === 9 || t5 === 10 || t5 === 13 || t5 === 12; + } else + t5 = true; + else + t5 = false; + if (t5) + addSingleExpression.call$1(_this._number$0()); + else if (_this._lookingAtInterpolatedIdentifier$0()) + addSingleExpression.call$1(_this.identifierLike$0()); + else if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_tDf); + } + continue; + } + _3_32 = 47 === _3_0; + if (_3_32 && _box_0.singleExpression_ == null) { + addSingleExpression.call$1(_this._unaryOperation$0()); + continue; + } + if (_3_32) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_ehp); + continue; + } + if (37 === _3_0) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_bgA); + continue; + } + if (_3_0 >= 48 && _3_0 <= 57) { + addSingleExpression.call$1(_this._number$0()); + continue; + } + _3_40 = 46 === _3_0; + if (_3_40 && t2.peekChar$1(1) === 46) + break; + if (_3_40) { + addSingleExpression.call$1(_this._number$0()); + continue; + } + if (97 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("and")) { + addOperator.call$1(B.BinaryOperator_5vK); + continue; + } + if (111 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("or")) { + addOperator.call$1(B.BinaryOperator_OOf); + continue; + } + if ((117 === _3_0 || 85 === _3_0) && t2.peekChar$1(1) === 43) { + addSingleExpression.call$1(_this._unicodeRange$0()); + continue; + } + if (!(_3_0 >= 97 && _3_0 <= 122)) + t5 = _3_0 >= 65 && _3_0 <= 90 || 95 === _3_0 || 92 === _3_0 || _3_0 >= 128; + else + t5 = true; + if (t5) { + addSingleExpression.call$1(_this.identifierLike$0()); + continue; + } + if (44 === _3_0) { + if (_this._inParentheses) { + _this._inParentheses = false; + if (_box_0.allowSlash) { + resetState.call$0(); + continue; + } + } + commaExpressions = _box_0.commaExpressions_; + if (commaExpressions == null) + commaExpressions = _box_0.commaExpressions_ = A._setArrayType([], t4); + if (_box_0.singleExpression_ == null) + t2.error$1(0, _s20_); + resolveSpaceExpressions.call$0(); + t5 = _box_0.singleExpression_; + t5.toString; + commaExpressions.push(t5); + t2.readChar$0(); + _box_0.allowSlash = true; + _box_0.singleExpression_ = null; + continue; + } + break; + } + if (bracketList) + t2.expectChar$1(93); + commaExpressions = _box_0.commaExpressions_; + spaceExpressions = _box_0.spaceExpressions_; + if (commaExpressions != null) { + resolveSpaceExpressions.call$0(); + _this._inParentheses = wasInParentheses; + singleExpression = _box_0.singleExpression_; + if (singleExpression != null) + commaExpressions.push(singleExpression); + _this._inExpression = wasInExpression; + t1 = _this.spanFrom$1(beforeBracket == null ? start : beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(commaExpressions, type$.Expression), B.ListSeparator_z0K, bracketList, t1); + } else if (bracketList && spaceExpressions != null) { + resolveOperations.call$0(); + _this._inExpression = wasInExpression; + t1 = _box_0.singleExpression_; + t1.toString; + spaceExpressions.push(t1); + beforeBracket.toString; + t1 = _this.spanFrom$1(beforeBracket); + return new A.ListExpression(A.List_List$unmodifiable(spaceExpressions, type$.Expression), B.ListSeparator_SrV, true, t1); + } else { + resolveSpaceExpressions.call$0(); + if (bracketList) { + t1 = _box_0.singleExpression_; + t1.toString; + t4 = A._setArrayType([t1], t4); + beforeBracket.toString; + t1 = _this.spanFrom$1(beforeBracket); + _box_0.singleExpression_ = new A.ListExpression(A.List_List$unmodifiable(t4, type$.Expression), B.ListSeparator_undecided_null_3_undecided, true, t1); + } + _this._inExpression = wasInExpression; + t1 = _box_0.singleExpression_; + t1.toString; + return t1; + } + }, + _expression$0() { + return this._expression$4$bracketList$consumeNewlines$singleEquals$until(false, false, false, null); + }, + _expression$1$consumeNewlines(consumeNewlines) { + return this._expression$4$bracketList$consumeNewlines$singleEquals$until(false, consumeNewlines, false, null); + }, + _expression$3$consumeNewlines$singleEquals$until(consumeNewlines, singleEquals, until) { + return this._expression$4$bracketList$consumeNewlines$singleEquals$until(false, consumeNewlines, singleEquals, until); + }, + _expression$1$bracketList(bracketList) { + return this._expression$4$bracketList$consumeNewlines$singleEquals$until(bracketList, false, false, null); + }, + _expression$2$consumeNewlines$until(consumeNewlines, until) { + return this._expression$4$bracketList$consumeNewlines$singleEquals$until(false, consumeNewlines, false, until); + }, + expressionUntilComma$1$singleEquals(singleEquals) { + return this._expression$3$consumeNewlines$singleEquals$until(true, singleEquals, new A.StylesheetParser_expressionUntilComma_closure(this)); + }, + expressionUntilComma$0() { + return this.expressionUntilComma$1$singleEquals(false); + }, + _isSlashOperand$1(expression) { + var t1 = true; + if (!(expression instanceof A.NumberExpression)) + if (!(expression instanceof A.FunctionExpression)) + t1 = expression instanceof A.BinaryOperationExpression && expression.allowsSlash; + return t1; + }, + _singleExpression$0() { + var next, t2, _this = this, + _s20_ = "Expected expression.", + t1 = _this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (_0_0 == null) + t1.error$1(0, _s20_); + if (40 === _0_0) { + t1 = _this.parentheses$0(); + break $label0$0; + } + if (47 === _0_0) { + t1 = _this._unaryOperation$0(); + break $label0$0; + } + if (46 === _0_0) { + t1 = _this._number$0(); + break $label0$0; + } + if (91 === _0_0) { + t1 = _this._expression$1$bracketList(true); + break $label0$0; + } + if (36 === _0_0) { + t1 = _this._variable$0(); + break $label0$0; + } + if (38 === _0_0) { + t1 = _this._selector$0(); + break $label0$0; + } + if (39 === _0_0 || 34 === _0_0) { + t1 = _this.interpolatedString$0(); + break $label0$0; + } + if (35 === _0_0) { + t1 = _this._hashExpression$0(); + break $label0$0; + } + if (43 === _0_0) { + next = t1.peekChar$1(1); + t1 = next != null && next >= 48 && next <= 57 || next === 46 ? _this._number$0() : _this._unaryOperation$0(); + break $label0$0; + } + if (45 === _0_0) { + t1 = _this._minusExpression$0(); + break $label0$0; + } + if (33 === _0_0) { + t1 = _this._importantExpression$0(); + break $label0$0; + } + if (37 === _0_0) { + t2 = t1._string_scanner$_position; + t1.readChar$0(); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + t2 = new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable(["%"], type$.Object), B.List_null, t2), false); + t1 = t2; + break $label0$0; + } + if ((117 === _0_0 || 85 === _0_0) && t1.peekChar$1(1) === 43) { + t1 = _this._unicodeRange$0(); + break $label0$0; + } + if (_0_0 >= 48 && _0_0 <= 57) { + t1 = _this._number$0(); + break $label0$0; + } + if (!(_0_0 >= 97 && _0_0 <= 122)) + t2 = _0_0 >= 65 && _0_0 <= 90 || 95 === _0_0 || 92 === _0_0 || _0_0 >= 128; + else + t2 = true; + if (t2) { + t1 = _this.identifierLike$0(); + break $label0$0; + } + t1 = t1.error$1(0, _s20_); + } + return t1; + }, + parentheses$0() { + var start, inside, first, expressions, list, t1, t2, _this = this, + wasInParentheses = _this._inParentheses; + _this._inParentheses = true; + try { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + inside = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (!_this._lookingAtExpression$0()) { + t1.expectChar$1(41); + t1 = A._setArrayType([], type$.JSArray_Expression); + t2 = _this.spanFrom$1(start); + t1 = A.List_List$unmodifiable(t1, type$.Expression); + return new A.ListExpression(t1, B.ListSeparator_undecided_null_3_undecided, false, t2); + } + first = _this.expressionUntilComma$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + t1 = _this._stylesheet$_map$2(first, start); + return t1; + } + if (!t1.scanChar$1(44)) { + t1.expectChar$1(41); + t1 = _this.spanFrom$1(start); + return new A.ParenthesizedExpression(first, t1); + } + _this.whitespace$1$consumeNewlines(true); + expressions = A._setArrayType([first], type$.JSArray_Expression); + for (;;) { + if (!_this._lookingAtExpression$0()) + break; + J.add$1$ax(expressions, _this.expressionUntilComma$0()); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$1$consumeNewlines(true); + } + t2 = _this.spanFrom$1(inside); + list = new A.ListExpression(A.List_List$unmodifiable(expressions, type$.Expression), B.ListSeparator_z0K, false, t2); + t1.expectChar$1(41); + t1 = _this.spanFrom$1(start); + return new A.ParenthesizedExpression(list, t1); + } finally { + _this._inParentheses = wasInParentheses; + } + }, + _stylesheet$_map$2(first, start) { + var t1, key, _this = this, + pairs = A._setArrayType([new A._Record_2(first, _this.expressionUntilComma$0())], type$.JSArray_Record_2_Expression_and_Expression); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$1$consumeNewlines(true); + if (!_this._lookingAtExpression$0()) + break; + key = _this.expressionUntilComma$0(); + t1.expectChar$1(58); + _this.whitespace$1$consumeNewlines(true); + pairs.push(new A._Record_2(key, _this.expressionUntilComma$0())); + } + t1.expectChar$1(41); + t1 = _this.spanFrom$1(start); + return new A.MapExpression(A.List_List$unmodifiable(pairs, type$.Record_2_Expression_and_Expression), t1); + }, + _hashExpression$0() { + var start, t2, identifier, buffer, _this = this, + t1 = _this.scanner; + if (t1.peekChar$1(1) === 123) + return _this.identifierLike$0(); + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(35); + t2 = t1.peekChar$0(); + if (t2 == null) + t2 = null; + else + t2 = t2 >= 48 && t2 <= 57; + if (t2 === true) + return new A.ColorExpression(_this._hexColorContents$1(start), _this.spanFrom$1(start)); + t2 = t1._string_scanner$_position; + identifier = _this.interpolatedIdentifier$0(); + if (_this._isHexColor$1(identifier)) { + t1.set$state(new A._SpanScannerState(t1, t2)); + return new A.ColorExpression(_this._hexColorContents$1(start), _this.spanFrom$1(start)); + } + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t2 = A.Primitives_stringFromCharCode(35); + t1._contents += t2; + buffer.addInterpolation$1(identifier); + return new A.StringExpression(buffer.interpolation$1(_this.spanFrom$1(start)), false); + }, + _hexColorContents$1(start) { + var red, green, blue, alpha, digit4, t2, t3, t4, _this = this, + digit1 = _this._hexDigit$0(), + digit2 = _this._hexDigit$0(), + digit3 = _this._hexDigit$0(), + t1 = _this.scanner, + $self = t1.peekChar$0(); + if (!($self != null && A.CharacterExtension_get_isHex($self))) { + red = (digit1 << 4 >>> 0) + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = (digit3 << 4 >>> 0) + digit3; + alpha = null; + } else { + digit4 = _this._hexDigit$0(); + $self = t1.peekChar$0(); + t2 = $self != null && A.CharacterExtension_get_isHex($self); + t3 = digit1 << 4 >>> 0; + t4 = digit3 << 4 >>> 0; + if (!t2) { + red = t3 + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = t4 + digit3; + alpha = ((digit4 << 4 >>> 0) + digit4) / 255; + } else { + red = t3 + digit2; + green = t4 + digit4; + blue = (_this._hexDigit$0() << 4 >>> 0) + _this._hexDigit$0(); + $self = t1.peekChar$0(); + alpha = $self != null && A.CharacterExtension_get_isHex($self) ? ((_this._hexDigit$0() << 4 >>> 0) + _this._hexDigit$0()) / 255 : null; + } + } + t1 = alpha == null; + t2 = t1 ? 1 : alpha; + return A.SassColor_SassColor$rgbInternal(red, green, blue, t2, t1 ? new A.SpanColorFormat(_this.spanFrom$1(start)) : null); + }, + _isHexColor$1(interpolation) { + var _0_2, t1, + plain = interpolation.get$asPlain(); + if (typeof plain == "string") { + _0_2 = plain.length; + t1 = true; + if (3 !== _0_2) + if (4 !== _0_2) + if (6 !== _0_2) + t1 = 8 === _0_2; + } else + t1 = false; + if (t1) { + t1 = new A.CodeUnits(plain); + return t1.every$1(t1, new A.StylesheetParser__isHexColor_closure()); + } else + return false; + }, + _hexDigit$0() { + var t1 = this.scanner, + t2 = t1.peekChar$0(); + t2 = t2 == null ? null : A.CharacterExtension_get_isHex(t2); + return t2 === true ? A.asHex(t1.readChar$0()) : t1.error$1(0, "Expected hex digit."); + }, + _minusExpression$0() { + var _this = this, + _0_0 = _this.scanner.peekChar$1(1); + if (A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57 || 46 === _0_0) + return _this._number$0(); + if (_this._lookingAtInterpolatedIdentifier$0()) + return _this.identifierLike$0(); + return _this._unaryOperation$0(); + }, + _importantExpression$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.readChar$0(); + _this.whitespace$1$consumeNewlines(true); + _this.expectIdentifier$1("important"); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable(["!important"], type$.Object), B.List_null, t2), false); + }, + _unaryOperation$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + operator = _this._unaryOperatorFor$1(t1.readChar$0()); + if (operator == null) + t1.error$2$position(0, "Expected unary operator.", t1._string_scanner$_position - 1); + else if (_this.get$plainCss() && operator !== B.UnaryOperator_Y93) + t1.error$3$length$position(0, "Operators aren't allowed in plain CSS.", 1, t1._string_scanner$_position - 1); + _this.whitespace$1$consumeNewlines(true); + return new A.UnaryOperationExpression(operator, _this._singleExpression$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _unaryOperatorFor$1(character) { + var t1; + $label0$0: { + if (43 === character) { + t1 = B.UnaryOperator_n2K; + break $label0$0; + } + if (45 === character) { + t1 = B.UnaryOperator_hCO; + break $label0$0; + } + if (47 === character) { + t1 = B.UnaryOperator_Y93; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + _number$0() { + var number, unit, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + first = t1.peekChar$0(), + t3 = first !== 43; + if (!t3 || first === 45) + t1.readChar$0(); + if (t1.peekChar$0() !== 46) + _this._consumeNaturalNumber$0(); + _this._tryDecimal$1$allowTrailingDot(t1._string_scanner$_position !== t2 && t3 && first !== 45); + _this._tryExponent$0(); + number = A.double_parse(t1.substring$1(0, t2)); + if (t1.scanChar$1(37)) + unit = "%"; + else { + if (_this.lookingAtIdentifier$0()) + t3 = t1.peekChar$0() !== 45 || t1.peekChar$1(1) !== 45; + else + t3 = false; + unit = t3 ? _this.identifier$1$unit(true) : null; + } + return new A.NumberExpression(number, unit, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _consumeNaturalNumber$0() { + var $self, + t1 = this.scanner, + t2 = t1.readChar$0(); + if (!(t2 >= 48 && t2 <= 57)) + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position - 1); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _tryDecimal$1$allowTrailingDot(allowTrailingDot) { + var $self, + t1 = this.scanner; + if (t1.peekChar$0() !== 46) + return; + $self = t1.peekChar$1(1); + if (!($self != null && $self >= 48 && $self <= 57)) { + if (allowTrailingDot) + return; + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position + 1); + } + t1.readChar$0(); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _tryExponent$0() { + var next, $self, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first !== 101 && first !== 69) + return; + next = t1.peekChar$1(1); + if (!(next != null && next >= 48 && next <= 57) && next !== 45 && next !== 43) + return; + t1.readChar$0(); + if (43 === next || 45 === next) + t1.readChar$0(); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected digit."); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _unicodeRange$0() { + var firstRangeLength, hasQuestionMark, t3, secondRangeLength, _this = this, + _s26_ = "Expected at most 6 digits.", + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + start = new A._SpanScannerState(t1, t2); + _this.expectIdentChar$1(117); + t1.expectChar$1(43); + for (firstRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure());) + ++firstRangeLength; + for (hasQuestionMark = false; t1.scanChar$1(63); hasQuestionMark = true) + ++firstRangeLength; + if (firstRangeLength === 0) + t1.error$1(0, 'Expected hex digit or "?".'); + else if (firstRangeLength > 6) + _this.error$2(0, _s26_, _this.spanFrom$1(start)); + else if (hasQuestionMark) { + t1 = t1.substring$1(0, t2); + t2 = _this.spanFrom$1(start); + return new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable([t1], type$.Object), B.List_null, t2), false); + } + if (t1.scanChar$1(45)) { + t3 = t1._string_scanner$_position; + for (secondRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure0());) + ++secondRangeLength; + if (secondRangeLength === 0) + t1.error$1(0, "Expected hex digit."); + else if (secondRangeLength > 6) + _this.error$2(0, _s26_, _this.spanFrom$1(new A._SpanScannerState(t1, t3))); + } + if (_this._lookingAtInterpolatedIdentifierBody$0()) + t1.error$1(0, "Expected end of identifier."); + t1 = t1.substring$1(0, t2); + t2 = _this.spanFrom$1(start); + return new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable([t1], type$.Object), B.List_null, t2), false); + }, + _variable$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + $name = _this.variableName$0(); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sass_v, _this.spanFrom$1(start)); + return new A.VariableExpression(null, $name, _this.spanFrom$1(start)); + }, + _selector$0() { + var t1, start, _this = this; + if (_this.get$plainCss()) + _this.scanner.error$2$length(0, string$.The_pa, 1); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(38); + if (t1.scanChar$1(38)) { + _this.warnings.push(new A._Record_3_deprecation_message_span(null, string$.In_Sas, _this.spanFrom$1(start))); + t1.set$position(t1._string_scanner$_position - 1); + } + return new A.SelectorExpression(_this.spanFrom$1(start)); + }, + interpolatedString$0() { + var t3, t4, t5, buffer, _1_0, second, t6, _0_0, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t2); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer(t3, t4, t5); + for (;;) { + _1_0 = t1.peekChar$0(); + if (_1_0 === quote) { + t1.readChar$0(); + break; + } + if (_1_0 == null || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + if (92 === _1_0) { + second = t1.peekChar$1(1); + if (second === 10 || second === 13 || second === 12) { + t1.readChar$0(); + t1.readChar$0(); + if (second === 13) + t1.scanChar$1(10); + } else { + t6 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter(t1)); + t3._contents += t6; + } + continue; + } + if (35 === _1_0 && t1.peekChar$1(1) === 123) { + _0_0 = this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + continue; + } + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + } + return new A.StringExpression(buffer.interpolation$1(this.spanFrom$1(new A._SpanScannerState(t1, t2))), true); + }, + interpolatedStringToken$0() { + var t3, t4, t5, buffer, t6, _1_0, second, t7, start, end, _0_0, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t2); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer(t3, t4, t5); + t6 = A.Primitives_stringFromCharCode(quote); + t3._contents += t6; + for (;;) { + _1_0 = t1.peekChar$0(); + if (_1_0 === quote) { + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t4; + break; + } + if (_1_0 == null || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) + t1.error$1(0, "Expected " + t6 + "."); + if (92 === _1_0) { + second = t1.peekChar$1(1); + if (second === 10 || second === 13 || second === 12) { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + if (second === 13) + if (t1.scanChar$1(10)) { + t7 = A.Primitives_stringFromCharCode(10); + t3._contents += t7; + } + } else { + start = t1._string_scanner$_position; + new A.StylesheetParser_interpolatedStringToken_closure(_this).call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t1.string, start, end); + } + continue; + } + if (35 === _1_0 && t1.peekChar$1(1) === 123) { + _0_0 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + continue; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + identifierLike$0() { + var beforeParen, invocation, expression, t1, _0_0, suggestion, exception, _1_0, t4, _2_0, _3_0, _3_2, _3_4, _this = this, + t2 = _this.scanner, + start = new A._SpanScannerState(t2, t2._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = A._Cell$(), + t3 = plain != null; + if (t3) { + if (plain === "if" && t2.peekChar$0() === 40) { + beforeParen = new A._SpanScannerState(t2, t2._string_scanner$_position); + try { + invocation = _this._argumentInvocation$0(); + expression = new A.LegacyIfExpression(invocation, identifier.span.expand$1(0, invocation.span)); + t1 = null; + _0_0 = expression.get$modernSuggestion(); + $label0$0: { + suggestion = null; + if (_0_0 != null) { + suggestion = _0_0; + t1 = "Suggestion: " + A.S(suggestion) + "\n\n"; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_qPD, B.JSString_methods.$add(string$.The_Sa, t1) + string$.More_i, expression.span)); + return expression; + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t2.set$state(beforeParen); + return _this.ifExpression$1(start); + } else + throw exception; + } + } else if (plain.toLowerCase() === "if" && t2.peekChar$0() === 40) + return _this.ifExpression$1(start); + else if (plain === "not") { + _this.whitespace$1$consumeNewlines(true); + expression = _this._singleExpression$0(); + return new A.UnaryOperationExpression(B.UnaryOperator_not_not_3_not, expression, identifier.span.expand$1(0, expression.get$span(expression))); + } + lower.__late_helper$_value = plain.toLowerCase(); + if (t2.peekChar$0() !== 40) { + switch (plain) { + case "false": + return new A.BooleanExpression(false, identifier.span); + case "null": + return new A.NullExpression(identifier.span); + case "true": + return new A.BooleanExpression(true, identifier.span); + } + _1_0 = $.$get$colorsByName().$index(0, lower._readLocal$0()); + if (_1_0 != null) { + t1 = B.JSNumber_methods.round$0(_1_0._legacyChannel$2(B.RgbColorSpace_i0P, "red")); + t2 = B.JSNumber_methods.round$0(_1_0._legacyChannel$2(B.RgbColorSpace_i0P, "green")); + t3 = B.JSNumber_methods.round$0(_1_0._legacyChannel$2(B.RgbColorSpace_i0P, "blue")); + t4 = _1_0.alphaOrNull; + if (t4 == null) + t4 = 0; + return new A.ColorExpression(A.SassColor_SassColor$rgbInternal(t1, t2, t3, t4, new A.SpanColorFormat(identifier.span)), identifier.span); + } + } + _2_0 = _this.trySpecialFunction$2(lower._readLocal$0(), start); + if (_2_0 != null) + return _2_0; + } + _3_0 = t2.peekChar$0(); + _3_2 = 46 === _3_0; + if (_3_2 && t2.peekChar$1(1) === 46) + return new A.StringExpression(identifier, false); + if (_3_2) { + t2.readChar$0(); + if (t3) + return _this.namespacedExpression$2(plain, start); + _this.error$2(0, string$.Interpn, identifier.span); + } + _3_4 = 40 === _3_0; + if (_3_4 && t3) { + t1 = _this._argumentInvocation$1$allowEmptySecondArg(J.$eq$(lower._readLocal$0(), "var")); + t2 = _this.spanFrom$1(start); + return new A.FunctionExpression(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, t1, t2); + } + if (_3_4) + return new A.InterpolatedFunctionExpression(identifier, _this._argumentInvocation$0(), _this.spanFrom$1(start)); + return new A.StringExpression(identifier, false); + }, + ifExpression$1(start) { + var branches, condition, t2, _this = this, + t1 = _this.scanner; + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + branches = A._setArrayType([], type$.JSArray_Record_2_nullable_IfConditionExpression_and_Expression); + while (t1.peekChar$0() !== 41) { + condition = _this.scanIdentifier$1("else") ? null : _this._ifConditionExpression$0(); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(58); + _this.whitespace$1$consumeNewlines(true); + branches.push(new A._Record_2(condition, _this._expression$1$consumeNewlines(true))); + _this.whitespace$1$consumeNewlines(true); + if (!t1.scanChar$1(59)) + break; + _this.whitespace$1$consumeNewlines(true); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(branches, type$.Record_2_nullable_IfConditionExpression_and_Expression); + if (t2.length === 0) + A.throwExpression(A.ArgumentError$value(t2, "branches", "may not be empty")); + return new A.IfExpression(t2, t1); + }, + _ifConditionExpression$0() { + var groups, op, _0_0, single, result, _2_0, _this = this, + _s44_ = string$.Whitesa, + _s11_ = "expressions", + _s21_ = "must have length >= 2", + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (_this.scanIdentifier$1("not")) { + if (t1.peekChar$0() === 40) + t1.error$1(0, string$.Whitesn); + _this.whitespace$1$consumeNewlines(true); + return new A.IfConditionNegation(_this._ifGroup$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + groups = A._setArrayType([_this._ifGroup$0()], type$.JSArray_IfConditionExpression); + _this.whitespace$1$consumeNewlines(true); + for (op = null;;) { + if (op !== B.BooleanOperator_1 && _this.scanIdentifier$1("and")) { + if (t1.peekChar$0() === 40) + t1.error$1(0, _s44_); + _this.whitespace$1$consumeNewlines(true); + if (op == null) + op = B.BooleanOperator_0; + groups.push(_this._ifGroup$0()); + } else if (op !== B.BooleanOperator_0 && _this.scanIdentifier$1("or")) { + if (t1.peekChar$0() === 40) + t1.error$1(0, _s44_); + _this.whitespace$1$consumeNewlines(true); + if (op == null) + op = B.BooleanOperator_1; + groups.push(_this._ifGroup$0()); + } else { + _0_0 = t1.peekChar$0(); + if (_0_0 != null && _0_0 !== 41 && _0_0 !== 58 && B.JSArray_methods.get$last(groups).get$isArbitrarySubstitution()) { + $label0$0: { + if (groups.length === 1) { + single = groups[0]; + t1 = single; + break $label0$0; + } + op.toString; + result = A.List_List$from(groups, false, type$.IfConditionExpression); + result.$flags = 3; + t1 = result; + t2 = new A.IfConditionOperation(t1, op); + if (t1.length < 2) + A.throwExpression(A.ArgumentError$value(t1, _s11_, _s21_)); + t1 = t2; + break $label0$0; + } + return _this._ifConditionRaw$2(t1, _this._ifGroup$0()); + } else { + _2_0 = _this._tryArbitrarySubstitution$0(); + if (_2_0 != null) { + $label1$1: { + if (groups.length === 1) { + single = groups[0]; + t1 = single; + break $label1$1; + } + op.toString; + result = A.List_List$from(groups, false, type$.IfConditionExpression); + result.$flags = 3; + t1 = result; + t2 = new A.IfConditionOperation(t1, op); + if (t1.length < 2) + A.throwExpression(A.ArgumentError$value(t1, _s11_, _s21_)); + t1 = t2; + break $label1$1; + } + return _this._ifConditionRaw$2(t1, _2_0); + } else + break; + } + } + _this.whitespace$1$consumeNewlines(true); + } + $label2$3: { + if (groups.length === 1) { + single = groups[0]; + t1 = single; + break $label2$3; + } + op.toString; + t1 = A.IfConditionOperation$(groups, op); + break $label2$3; + } + return t1; + }, + _ifConditionRaw$2(preceding, next) { + var t1, t2, _0_5, _0_6, t3, last, buffer, op, t4, lastGroup, lastGroup0, _1_0, _2_0, _this = this, _null = null; + $label0$0: { + if (preceding.get$isArbitrarySubstitution()) { + t1 = preceding; + break $label0$0; + } + t1 = _null; + t2 = false; + if (preceding instanceof A.IfConditionOperation) { + _0_5 = preceding.expressions; + _0_6 = _0_5.length; + t3 = _0_6; + if (t3 >= 1) { + last = _0_5[_0_6 - 1]; + t1 = last.get$isArbitrarySubstitution(); + } else { + last = t1; + t1 = t2; + } + } else { + last = t1; + t1 = t2; + } + if (t1) { + t1 = last; + break $label0$0; + } + t1 = next.get$isArbitrarySubstitution(); + if (t1) { + t1 = next; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$("Either " + preceding.toString$0(0) + string$.x20must_e + next.toString$0(0) + " must be one.", _null)); + } + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + buffer.addInterpolation$1(preceding.toInterpolation$1(t1)); + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + buffer.addInterpolation$1(next.toInterpolation$1(t1)); + op = preceding instanceof A.IfConditionOperation ? preceding.op : _null; + _this.whitespace$1$consumeNewlines(true); + for (t4 = _this.scanner, lastGroup = next;;) { + if (op !== B.BooleanOperator_1 && _this.scanIdentifier$1("and")) { + if (t4.peekChar$0() === 40) + t4.error$1(0, string$.Whitesa); + _this.whitespace$1$consumeNewlines(true); + if (op == null) + op = B.BooleanOperator_0; + lastGroup0 = _this._ifGroup$0(); + t2._contents += " and "; + buffer.addInterpolation$1(lastGroup0.toInterpolation$1(t1)); + } else if (op !== B.BooleanOperator_0 && _this.scanIdentifier$1("or")) { + if (t4.peekChar$0() === 40) + t4.error$1(0, string$.Whiteso); + _this.whitespace$1$consumeNewlines(true); + if (op == null) + op = B.BooleanOperator_1; + lastGroup = _this._ifGroup$0(); + _this.whitespace$1$consumeNewlines(true); + t2._contents += " or "; + buffer.addInterpolation$1(lastGroup.toInterpolation$1(t1)); + } else { + _1_0 = t4.peekChar$0(); + if (_1_0 != null && _1_0 !== 41 && _1_0 !== 58 && lastGroup.get$isArbitrarySubstitution()) { + lastGroup = _this._ifGroup$0(); + t2._contents += t3; + buffer.addInterpolation$1(lastGroup.toInterpolation$1(t1)); + } else { + _2_0 = _this._tryArbitrarySubstitution$0(); + if (_2_0 != null) { + t2._contents += t3; + buffer.addInterpolation$1(_2_0.toInterpolation$1(t1)); + } else + break; + lastGroup = _2_0; + } + } + _this.whitespace$1$consumeNewlines(true); + } + t1 = preceding.get$span(preceding); + t4 = A.FileLocation$_(t4._sourceFile, t4._string_scanner$_position); + t2 = t4.offset; + return new A.IfConditionRaw(buffer.interpolation$1(t1.expand$1(0, A._FileSpan$(t4.file, t2, t2)))); + }, + _ifGroup$0() { + var expression, t2, identifier, _0_1, _0_6, plain, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (40 === t1.peekChar$0()) { + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + expression = _this._ifConditionExpression$0(); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(41); + return new A.IfConditionParenthesized(expression, t1.spanFrom$1(start)); + } + t2 = _this.scanIdentifier$2$caseSensitive("sass", true); + if (t2) { + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + expression = _this._expression$0(); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(41); + if (_this.get$plainCss()) + _this.error$2(0, string$.sass__, t1.spanFrom$1(start)); + else + return new A.IfConditionSass(expression, t1.spanFrom$1(start)); + } + identifier = _this.interpolatedIdentifier$0(); + _0_1 = identifier.contents; + if (_0_1.length === 1) + t2 = _0_1[0] instanceof A.Expression && t1.peekChar$0() !== 40; + else + t2 = false; + if (t2) + return new A.IfConditionRaw(identifier); + _0_6 = identifier.get$asPlain(); + if (_0_6 != null) { + plain = _0_6 == null ? A._asString(_0_6) : _0_6; + t2 = B.Set_6V2Gi.contains$1(0, plain.toLowerCase()) && t1.peekChar$0() === 40; + } else + t2 = false; + if (t2) + t1.error$1(0, 'Whitespace is required between "' + identifier.toString$0(0) + '" and "("'); + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + expression = _this._interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(41); + return new A.IfConditionFunction(identifier, expression, t1.spanFrom$1(start)); + }, + _tryArbitrarySubstitution$0() { + var _0_0, span, start, t2, $arguments, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 35) { + _0_0 = _this.singleInterpolation$0(); + span = _0_0._1; + t1 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1.add$2(0, _0_0._0, span); + return new A.IfConditionRaw(t1.interpolation$1(span)); + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + $label0$0: { + t2 = _this.scanIdentifier$1("if"); + if (t2) { + t2 = t1.spanFrom$1(start); + t2 = new A.Interpolation(A.List_List$unmodifiable(["if"], type$.Object), B.List_null, t2); + break $label0$0; + } + t2 = _this.scanIdentifier$1("var"); + if (t2) { + t2 = t1.spanFrom$1(start); + t2 = new A.Interpolation(A.List_List$unmodifiable(["var"], type$.Object), B.List_null, t2); + break $label0$0; + } + t2 = _this.scanIdentifier$1("attr"); + if (t2) { + t2 = t1.spanFrom$1(start); + t2 = new A.Interpolation(A.List_List$unmodifiable(["attr"], type$.Object), B.List_null, t2); + break $label0$0; + } + t2 = t1.matches$1("--"); + if (t2) { + t2 = _this.interpolatedIdentifier$0(); + break $label0$0; + } + t2 = null; + break $label0$0; + } + if (t2 == null) + return null; + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + $arguments = _this._interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true); + t1.expectChar$1(41); + return new A.IfConditionFunction(t2, $arguments, t1.spanFrom$1(start)); + }, + namespacedExpression$2(namespace, start) { + var $name, t1, t2, t3, _this = this; + if (_this.scanner.peekChar$0() === 36) { + $name = _this.variableName$0(); + _this._assertPublic$2($name, new A.StylesheetParser_namespacedExpression_closure(_this, start)); + return new A.VariableExpression(namespace, $name, _this.spanFrom$1(start)); + } + t1 = _this._publicIdentifier$0(); + t2 = _this._argumentInvocation$0(); + t3 = _this.spanFrom$1(start); + return new A.FunctionExpression(namespace, A.stringReplaceAllUnchecked(t1, "_", "-"), t1, t2, t3); + }, + trySpecialFunction$2($name, start) { + var invalidSassScript, nonCssSassScript, argument, t1, buffer, t2, normalized, vendored, _0_2, t3, exception, value, suggestion, next, _this = this; + if ($name === "type" && _this.scanner.scanChar$1(40)) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = $name; + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + } else { + normalized = A.unvendor($name); + t1 = normalized === $name; + vendored = !t1; + $label0$0: { + _0_2 = "expression" === normalized; + if (_0_2 && vendored && _this.scanner.scanChar$1(40)) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = $name; + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + t2 = _this.scanner; + t3 = t2._string_scanner$_position; + invalidSassScript = false; + nonCssSassScript = false; + try { + argument = _this._expression$0(); + nonCssSassScript = !argument.accept$1(new A.IsPlainCssVisitor(true)); + } catch (exception) { + if (A.unwrapException(exception) instanceof A.StringScannerException) + invalidSassScript = true; + else + throw exception; + } + t2.set$state(new A._SpanScannerState(t2, t3)); + value = _this._interpolatedDeclarationValue$1$allowEmpty(true); + buffer.addInterpolation$1(value); + t2.expectChar$1(41); + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + if (invalidSassScript || nonCssSassScript) { + suggestion = new A.StringExpression(value, true).asInterpolation$0(); + t1 = invalidSassScript ? "be parsed as SassScript. " : "no longer be valid syntax. "; + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_H4k, "Vendor-prefixed " + normalized + string$.x28__fun + t1 + ("To preserve current behavior:\n\n" + $name + "(#{" + suggestion.toString$0(0) + string$.x7dx29__Mo), _this.spanFrom$1(start))); + } + return new A.StringExpression(buffer.interpolation$1(_this.spanFrom$1(start)), false); + } + t2 = true; + if (!("calc" === normalized && vendored && _this.scanner.scanChar$1(40))) + if (!(_0_2 && t1 && _this.scanner.scanChar$1(40))) + t1 = "element" === normalized && _this.scanner.scanChar$1(40); + else + t1 = t2; + else + t1 = t2; + if (t1) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = $name; + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + break $label0$0; + } + if ("progid" === normalized && _this.scanner.scanChar$1(58)) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = $name; + t2 = A.Primitives_stringFromCharCode(58); + t1._contents += t2; + t2 = _this.scanner; + next = t2.peekChar$0(); + for (;;) { + if (next != null) { + if (!(next >= 97 && next <= 122)) + t3 = next >= 65 && next <= 90; + else + t3 = true; + t3 = t3 || next === 46; + } else + t3 = false; + if (!t3) + break; + t3 = A.Primitives_stringFromCharCode(t2.readChar$0()); + t1._contents += t3; + next = t2.peekChar$0(); + } + t2.expectChar$1(40); + t3 = A.Primitives_stringFromCharCode(40); + t1._contents += t3; + buffer.addInterpolation$1(_this._interpolatedDeclarationValue$1$allowEmpty(true)); + t2.expectChar$1(41); + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + if (vendored) + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_H4k, string$.Vendorp + new A.StringExpression(buffer.interpolation$1(_this.spanFrom$1(start)), true).asInterpolation$0().toString$0(0) + string$.x7dx0a_Mor, _this.spanFrom$1(start))); + return new A.StringExpression(buffer.interpolation$1(_this.spanFrom$1(start)), false); + } + if ("url" === normalized) + return A.NullableExtension_andThen(_this._tryUrlContents$2$vendored(start, vendored), new A.StylesheetParser_trySpecialFunction_closure()); + return null; + } + } + buffer.addInterpolation$1(_this._interpolatedDeclarationValue$1$allowEmpty(true)); + _this.scanner.expectChar$1(41); + t1 = buffer._interpolation_buffer$_text; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + return new A.StringExpression(buffer.interpolation$1(_this.spanFrom$1(start)), false); + }, + _tryUrlContents$3$name$vendored(start, $name, vendored) { + var invalidSassScript, t3, exception, t4, t5, buffer, t6, _1_0, _1_6, _0_0, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(40)) + return null; + invalidSassScript = false; + if (vendored) { + t3 = t1._string_scanner$_position; + try { + _this._expression$0(); + } catch (exception) { + if (A.unwrapException(exception) instanceof A.StringScannerException) + invalidSassScript = true; + else + throw exception; + } + t1.set$state(new A._SpanScannerState(t1, t3)); + } + _this.whitespaceWithoutComments$1$consumeNewlines(true); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer(t3, t4, t5); + t3._contents = $name == null ? "url" : $name; + t6 = A.Primitives_stringFromCharCode(40); + t3._contents += t6; + for (;;) { + _1_0 = t1.peekChar$0(); + if (_1_0 == null) + break; + if (92 === _1_0) { + t6 = _this.escape$0(); + t3._contents += t6; + continue; + } + _1_6 = 35 === _1_0; + if (_1_6 && t1.peekChar$1(1) === 123) { + _0_0 = _this.singleInterpolation$0(); + buffer._flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + continue; + } + t6 = true; + if (33 !== _1_0) + if (37 !== _1_0) + if (38 !== _1_0) + if (!_1_6) + t6 = _1_0 >= 42 && _1_0 <= 126 || _1_0 >= 128; + if (t6) { + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + continue; + } + if (_1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) { + _this.whitespaceWithoutComments$1$consumeNewlines(true); + if (t1.peekChar$0() !== 41) + break; + continue; + } + if (41 === _1_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t2; + if (vendored && invalidSassScript) + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_H4k, string$.Vendoru + A.S($name) + "(#{" + new A.StringExpression(buffer.interpolation$1(_this.spanFrom$1(start)), true).asInterpolation$0().toString$0(0) + string$.x7dx29__Mo, _this.spanFrom$1(start))); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } + break; + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return null; + }, + _tryUrlContents$2$vendored(start, vendored) { + return this._tryUrlContents$3$name$vendored(start, null, vendored); + }, + _tryUrlContents$2$name(start, $name) { + return this._tryUrlContents$3$name$vendored(start, $name, false); + }, + _tryUrlContents$1(start) { + return this._tryUrlContents$3$name$vendored(start, null, false); + }, + dynamicUrl$0() { + var _0_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentifier$1("url"); + _0_0 = _this._tryUrlContents$1(start); + if (_0_0 != null) + return new A.StringExpression(_0_0, false); + t1 = _this.spanFrom$1(start); + return new A.InterpolatedFunctionExpression(new A.Interpolation(A.List_List$unmodifiable(["url"], type$.Object), B.List_null, t1), _this._argumentInvocation$0(), _this.spanFrom$1(start)); + }, + almostAnyValue$1$omitComments(omitComments) { + var t4, t5, t6, t7, _2_0, t8, _0_0, _0_2, start, end, _0_4, identifier, _1_0, bracket, char, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + brackets = A._setArrayType([], type$.JSArray_int); + for (t4 = t1.string, t5 = t4.length, t6 = !omitComments, t7 = _this.get$loudComment();;) + $label0$0: { + _2_0 = t1.peekChar$0(); + if (92 === _2_0) { + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + break $label0$0; + } + if (34 === _2_0 || 39 === _2_0) { + buffer.addInterpolation$1(_this.interpolatedStringToken$0()); + break $label0$0; + } + if (47 === _2_0) { + $label1$1: { + _0_0 = t1.peekChar$1(1); + _0_2 = 42 === _0_0; + if (_0_2 && t6) { + start = t1._string_scanner$_position; + t7.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + break $label1$1; + } + if (_0_2) { + _this.loudComment$0(); + break $label1$1; + } + _0_4 = 47 === _0_0; + if (_0_4 && t6) { + t8 = _this.get$silentComment(); + start = t1._string_scanner$_position; + t8.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + break $label1$1; + } + if (_0_4) { + _this.silentComment$0(); + break $label1$1; + } + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + } + break $label0$0; + } + if (35 === _2_0 && t1.peekChar$1(1) === 123) { + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + break $label0$0; + } + if (13 === _2_0 || 10 === _2_0 || 12 === _2_0) { + if (_this.get$indented() && brackets.length === 0) + break; + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + break $label0$0; + } + if (33 === _2_0 || 59 === _2_0 || 123 === _2_0 || 125 === _2_0) + break; + if (117 === _2_0 || 85 === _2_0) { + t8 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + if (identifier !== "url" && identifier !== "url-prefix") { + t3._contents += identifier; + continue; + } + _1_0 = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t8), identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + if ((t8 === 0 ? 1 / t8 < 0 : t8 < 0) || t8 > t5) + A.throwExpression(A.ArgumentError$("Invalid position " + t8, null)); + t1._string_scanner$_position = t8; + t1._lastMatch = null; + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + } + break $label0$0; + } + if (40 === _2_0 || 91 === _2_0) { + bracket = t1.readChar$0(); + t8 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t8; + brackets.push(A.opposite(bracket)); + break $label0$0; + } + if (41 === _2_0 || 93 === _2_0) { + t8 = _2_0 != null; + char = t8 ? _2_0 : null; + } else { + char = null; + t8 = false; + } + if (t8) { + if (brackets.length === 0) + t1.error$1(0, 'Unexpected "' + A.Primitives_stringFromCharCode(char) + '".'); + bracket = brackets.pop(); + t1.expectChar$1(bracket); + t8 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t8; + break $label0$0; + } + if (_2_0 == null) + break; + t8 = _this.lookingAtIdentifier$0(); + if (t8) { + t8 = _this.identifier$0(); + t3._contents += t8; + break $label0$0; + } + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + } + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + almostAnyValue$0() { + return this.almostAnyValue$1$omitComments(false); + }, + _interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(allowColon, allowEmpty, allowOpenBrace, allowSemicolon, consumeNewlines, endAfterOf, silentComments) { + var t5, t6, t7, t8, t9, t10, t11, wroteNewline, _2_0, wroteNewline0, t12, _0_0, start, end, _2_12, _2_14_isSet, _2_14, t13, _2_16, _2_18_isSet, _2_20, _2_18, _2_20_isSet, _2_22, bracket, identifier, _1_0, of, _this = this, _null = null, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + t4 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer(t3, t4, A._setArrayType([], type$.JSArray_nullable_FileSpan)), + brackets = A._setArrayType([], type$.JSArray_int); + for (t5 = !consumeNewlines, t6 = !allowOpenBrace, t7 = t1.string, t8 = t7.length, t9 = !allowColon, t10 = !allowSemicolon, t11 = _this.get$loudComment(), wroteNewline = false;;) + $label0$0: { + _2_0 = t1.peekChar$0(); + wroteNewline0 = false; + if (92 === _2_0) { + t12 = _this.escape$1$identifierStart(true); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (34 === _2_0 || 39 === _2_0) { + buffer.addInterpolation$1(_this.interpolatedStringToken$0()); + wroteNewline = wroteNewline0; + break $label0$0; + } + if (47 === _2_0) { + $label1$1: { + _0_0 = t1.peekChar$1(1); + if (42 === _0_0) { + start = t1._string_scanner$_position; + t11.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t7, start, end); + break $label1$1; + } + if (47 === _0_0 && silentComments) { + _this.silentComment$0(); + break $label1$1; + } + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + } + wroteNewline = wroteNewline0; + break $label0$0; + } + if (35 === _2_0 && t1.peekChar$1(1) === 123) { + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + wroteNewline = wroteNewline0; + break $label0$0; + } + _2_12 = 32 === _2_0; + _2_14_isSet = !_2_12; + if (_2_14_isSet) { + _2_14 = 9 === _2_0; + t12 = _2_14; + } else { + _2_14 = _null; + t12 = true; + } + t13 = false; + if (t12) + if (!wroteNewline) { + t12 = t1.peekChar$1(1); + t12 = t12 === 32 || t12 === 9 || t12 === 10 || t12 === 13 || t12 === 12; + } else + t12 = t13; + else + t12 = t13; + if (t12) { + t1.readChar$0(); + break $label0$0; + } + if (!_2_12) + t12 = _2_14_isSet ? _2_14 : 9 === _2_0; + else + t12 = true; + if (t12) { + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + break $label0$0; + } + _2_16 = 10 === _2_0; + _2_18_isSet = !_2_16; + _2_20 = _null; + t12 = true; + if (_2_18_isSet) { + _2_18 = 13 === _2_0; + _2_20_isSet = !_2_18; + if (_2_20_isSet) { + _2_20 = 12 === _2_0; + t12 = _2_20; + } + } else { + _2_18 = _null; + _2_20_isSet = false; + } + if (t12 && _this.get$indented() && t5 && brackets.length === 0) + break; + t12 = true; + if (!_2_16) + if (!(_2_18_isSet ? _2_18 : 13 === _2_0)) + t12 = _2_20_isSet ? _2_20 : 12 === _2_0; + if (t12) { + t12 = t1.peekChar$1(-1); + if (!(t12 === 10 || t12 === 13 || t12 === 12)) + t3._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + break $label0$0; + } + _2_22 = 123 === _2_0; + if (_2_22 && t6) + break; + if (40 !== _2_0) + t12 = _2_22 || 91 === _2_0; + else + t12 = true; + if (t12) { + bracket = t1.readChar$0(); + t12 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t12; + brackets.push(A.opposite(bracket)); + wroteNewline = wroteNewline0; + break $label0$0; + } + if (41 === _2_0 || 125 === _2_0 || 93 === _2_0) { + if (brackets.length === 0) + break; + bracket = brackets.pop(); + t1.expectChar$1(bracket); + t12 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (59 === _2_0) { + if (t10 && brackets.length === 0) + break; + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (58 === _2_0) { + if (t9 && brackets.length === 0) + break; + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (117 === _2_0 || 85 === _2_0) { + t12 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + if (identifier !== "url" && identifier !== "url-prefix") { + t3._contents += identifier; + wroteNewline = wroteNewline0; + continue; + } + _1_0 = _this._tryUrlContents$2$name(new A._SpanScannerState(t1, t12), identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + if ((t12 === 0 ? 1 / t12 < 0 : t12 < 0) || t12 > t8) + A.throwExpression(A.ArgumentError$("Invalid position " + t12, _null)); + t1._string_scanner$_position = t12; + t1._lastMatch = null; + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + } + wroteNewline = wroteNewline0; + break $label0$0; + } + if (111 === _2_0 || 79 === _2_0) { + if (endAfterOf && brackets.length === 0) { + start = t1._string_scanner$_position; + new A.StylesheetParser__interpolatedDeclarationValue_closure(_this).call$0(); + end = t1._string_scanner$_position; + of = B.JSString_methods.substring$2(t7, start, end); + if (of !== "") { + t3._contents += of; + break; + } + } + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (_2_0 == null) + break; + t12 = _this.lookingAtIdentifier$0(); + if (t12) { + t12 = _this.identifier$0(); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + wroteNewline = wroteNewline0; + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && t4.length === 0 && t3._contents.length === 0) + t1.error$1(0, "Expected token."); + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _interpolatedDeclarationValue$1$allowEmpty(allowEmpty) { + return this._interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, allowEmpty, true, false, false, false, true); + }, + _interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(allowEmpty, allowSemicolon, consumeNewlines) { + return this._interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, allowEmpty, true, allowSemicolon, consumeNewlines, false, true); + }, + _interpolatedDeclarationValue$4$allowColon$allowEmpty$allowSemicolon$consumeNewlines(allowColon, allowEmpty, allowSemicolon, consumeNewlines) { + return this._interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(allowColon, allowEmpty, true, allowSemicolon, consumeNewlines, false, true); + }, + _interpolatedDeclarationValue$0() { + return this._interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, false, true, false, false, false, true); + }, + _interpolatedDeclarationValue$1$allowOpenBrace(allowOpenBrace) { + return this._interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, false, allowOpenBrace, false, false, false, true); + }, + _interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(allowEmpty, allowOpenBrace) { + return this._interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, allowEmpty, allowOpenBrace, false, false, false, true); + }, + _interpolatedDeclarationValue$1$silentComments(silentComments) { + return this._interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, false, true, false, false, false, silentComments); + }, + interpolatedIdentifier$0() { + var t3, _1_0, _0_0, _this = this, + _s20_ = "Expected identifier.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + t2 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + if (t1.scanChar$1(45)) { + t3 = A.Primitives_stringFromCharCode(45); + t2._contents += t3; + if (t1.scanChar$1(45)) { + t2._contents += t3; + _this._interpolatedIdentifierBodyHelper$1(buffer); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } + } + $label0$0: { + _1_0 = t1.peekChar$0(); + if (_1_0 == null) + t1.error$1(0, _s20_); + if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128) { + t1 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t1; + break $label0$0; + } + if (92 === _1_0) { + t1 = _this.escape$1$identifierStart(true); + t2._contents += t1; + break $label0$0; + } + if (35 === _1_0 && t1.peekChar$1(1) === 123) { + _0_0 = _this.singleInterpolation$0(); + buffer.add$2(0, _0_0._0, _0_0._1); + break $label0$0; + } + t1.error$1(0, _s20_); + } + _this._interpolatedIdentifierBodyHelper$1(buffer); + return buffer.interpolation$1(_this.spanFrom$1(start)); + }, + _interpolatedIdentifierBodyHelper$1(buffer) { + var t1, t2, t3, t4, _1_0, t5, _0_0; + for (t1 = buffer._interpolation_buffer$_contents, t2 = buffer._spans, t3 = this.scanner, t4 = buffer._interpolation_buffer$_text;;) { + _1_0 = t3.peekChar$0(); + if (_1_0 == null) + break; + t5 = true; + if (95 !== _1_0) + if (45 !== _1_0) { + if (!(_1_0 >= 97 && _1_0 <= 122)) + t5 = _1_0 >= 65 && _1_0 <= 90; + else + t5 = true; + if (!t5) + t5 = _1_0 >= 48 && _1_0 <= 57; + else + t5 = true; + t5 = t5 || _1_0 >= 128; + } + if (t5) { + t5 = A.Primitives_stringFromCharCode(t3.readChar$0()); + t4._contents += t5; + continue; + } + if (92 === _1_0) { + t5 = this.escape$0(); + t4._contents += t5; + continue; + } + if (35 === _1_0 && t3.peekChar$1(1) === 123) { + _0_0 = this.singleInterpolation$0(); + buffer._flushText$0(); + t1.push(_0_0._0); + t2.push(_0_0._1); + continue; + } + break; + } + }, + singleInterpolation$0() { + var contents, span, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("#{"); + _this.whitespace$1$consumeNewlines(true); + contents = _this._expression$1$consumeNewlines(true); + t1.expectChar$1(125); + span = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (_this.get$plainCss()) + _this.error$2(0, string$.Interpp, span); + return new A._Record_2(contents, span); + }, + _mediaQueryList$0() { + var t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + for (;;) { + _this.whitespace$1$consumeNewlines(false); + _this._stylesheet$_mediaQuery$1(buffer); + _this.whitespace$1$consumeNewlines(false); + if (!t1.scanChar$1(44)) + break; + t4 = A.Primitives_stringFromCharCode(44); + t3._contents += t4; + t4 = A.Primitives_stringFromCharCode(32); + t3._contents += t4; + } + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet$_mediaQuery$1(buffer) { + var identifier1, t1, t2, identifier2, _this = this, _s3_ = "and"; + if (_this.scanner.peekChar$0() === 40) { + _this._stylesheet$_mediaInParens$1(buffer); + _this.whitespace$1$consumeNewlines(false); + if (_this.scanIdentifier$1(_s3_)) { + buffer._interpolation_buffer$_text._contents += " and "; + _this.expectWhitespace$0(); + _this._stylesheet$_mediaLogicSequence$2(buffer, _s3_); + } else if (_this.scanIdentifier$1("or")) { + buffer._interpolation_buffer$_text._contents += " or "; + _this.expectWhitespace$0(); + _this._stylesheet$_mediaLogicSequence$2(buffer, "or"); + } + return; + } + identifier1 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase(identifier1.get$asPlain(), "not")) { + _this.expectWhitespace$0(); + if (!_this._lookingAtInterpolatedIdentifier$0()) { + buffer._interpolation_buffer$_text._contents += "not "; + _this._mediaOrInterp$1(buffer); + return; + } + } + _this.whitespace$1$consumeNewlines(false); + buffer.addInterpolation$1(identifier1); + if (!_this._lookingAtInterpolatedIdentifier$0()) + return; + t1 = buffer._interpolation_buffer$_text; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + identifier2 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase(identifier2.get$asPlain(), _s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else { + _this.whitespace$1$consumeNewlines(false); + buffer.addInterpolation$1(identifier2); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else + return; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + t1._contents += "not "; + _this._mediaOrInterp$1(buffer); + return; + } + _this._stylesheet$_mediaLogicSequence$2(buffer, _s3_); + return; + }, + _stylesheet$_mediaLogicSequence$2(buffer, operator) { + var t1, t2, t3, _this = this; + for (t1 = buffer._interpolation_buffer$_text;;) { + _this._mediaOrInterp$1(buffer); + _this.whitespace$1$consumeNewlines(false); + if (!_this.scanIdentifier$1(operator)) + return; + _this.expectWhitespace$1$consumeNewlines(false); + t2 = A.Primitives_stringFromCharCode(32); + t3 = (t1._contents += t2) + operator; + t1._contents = t3; + t1._contents = t3 + t2; + } + }, + _mediaOrInterp$1(buffer) { + var _0_0; + if (this.scanner.peekChar$0() === 35) { + _0_0 = this.singleInterpolation$0(); + buffer.add$2(0, _0_0._0, _0_0._1); + } else + this._stylesheet$_mediaInParens$1(buffer); + }, + _stylesheet$_mediaInParens$1(buffer) { + var t2, t3, expressionBefore, expressionAfter, next, t4, t5, expressionMiddle, _this = this, + t1 = _this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = buffer._interpolation_buffer$_text; + t3 = A.Primitives_stringFromCharCode(40); + t2._contents += t3; + _this.whitespace$1$consumeNewlines(true); + if (t1.peekChar$0() === 40) { + _this._stylesheet$_mediaInParens$1(buffer); + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1("and")) { + t2._contents += " and "; + _this.expectWhitespace$1$consumeNewlines(true); + _this._stylesheet$_mediaLogicSequence$2(buffer, "and"); + } else if (_this.scanIdentifier$1("or")) { + t2._contents += " or "; + _this.expectWhitespace$1$consumeNewlines(true); + _this._stylesheet$_mediaLogicSequence$2(buffer, "or"); + } + } else if (_this.scanIdentifier$1("not")) { + t2._contents += "not "; + _this.expectWhitespace$1$consumeNewlines(true); + _this._mediaOrInterp$1(buffer); + } else { + expressionBefore = _this._expressionUntilComparison$0(); + buffer.add$2(0, expressionBefore, expressionBefore.get$span(expressionBefore)); + if (t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + t3 = A.Primitives_stringFromCharCode(58); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + expressionAfter = _this._expression$1$consumeNewlines(true); + buffer.add$2(0, expressionAfter, expressionAfter.get$span(expressionAfter)); + } else { + next = t1.peekChar$0(); + t3 = 60 !== next; + if (!t3 || 62 === next || 61 === next) { + t4 = A.Primitives_stringFromCharCode(32); + t2._contents += t4; + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t5; + if ((!t3 || 62 === next) && t1.scanChar$1(61)) { + t5 = A.Primitives_stringFromCharCode(61); + t2._contents += t5; + } + t2._contents += t4; + _this.whitespace$1$consumeNewlines(true); + expressionMiddle = _this._expressionUntilComparison$0(); + buffer.add$2(0, expressionMiddle, expressionMiddle.get$span(expressionMiddle)); + if (!t3 || 62 === next) { + next.toString; + t3 = t1.scanChar$1(next); + } else + t3 = false; + if (t3) { + t2._contents += t4; + t3 = A.Primitives_stringFromCharCode(next); + t2._contents += t3; + if (t1.scanChar$1(61)) { + t3 = A.Primitives_stringFromCharCode(61); + t2._contents += t3; + } + t2._contents += t4; + _this.whitespace$1$consumeNewlines(true); + expressionAfter = _this._expressionUntilComparison$0(); + buffer.add$2(0, expressionAfter, expressionAfter.get$span(expressionAfter)); + } + } + } + } + t1.expectChar$1(41); + _this.whitespace$1$consumeNewlines(false); + t1 = A.Primitives_stringFromCharCode(41); + t2._contents += t1; + }, + _expressionUntilComparison$0() { + return this._expression$2$consumeNewlines$until(true, new A.StylesheetParser__expressionUntilComparison_closure(this)); + }, + _supportsCondition$1$inParentheses(inParentheses) { + var condition, operator, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$1$consumeNewlines(inParentheses); + return new A.SupportsNegation(_this._supportsConditionInParens$0(), _this.spanFrom$1(start)); + } + condition = _this._supportsConditionInParens$0(); + _this.whitespace$1$consumeNewlines(inParentheses); + for (operator = null; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator._name); + else if (_this.scanIdentifier$1("or")) + operator = B.BooleanOperator_1; + else { + _this.expectIdentifier$1("and"); + operator = B.BooleanOperator_0; + } + _this.whitespace$1$consumeNewlines(inParentheses); + condition = new A.SupportsOperation(condition, _this._supportsConditionInParens$0(), operator, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(inParentheses); + } + return condition; + }, + _supportsCondition$0() { + return this._supportsCondition$1$inParentheses(false); + }, + _supportsConditionInParens$0() { + var $name, nameStart, wasInParentheses, identifier, _1_0, operation, contents, identifier0, t2, $arguments, _0_0, _0_4_isSet, _0_4, condition, exception, value, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._lookingAtInterpolatedIdentifier$0()) { + identifier0 = _this.interpolatedIdentifier$0(); + t2 = identifier0.get$asPlain(); + if ((t2 == null ? null : t2.toLowerCase()) === "not") + _this.error$2(0, '"not" is not a valid identifier here.', identifier0.span); + if (t1.scanChar$1(40)) { + $arguments = _this._interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true); + t1.expectChar$1(41); + return new A.SupportsFunction(identifier0, $arguments, _this.spanFrom$1(start)); + } else { + _0_0 = identifier0.contents; + _0_4_isSet = _0_0.length === 1; + if (_0_4_isSet) { + _0_4 = _0_0[0]; + t2 = _0_4 instanceof A.Expression; + } else { + _0_4 = null; + t2 = false; + } + if (t2) { + t1 = _0_4_isSet ? _0_4 : _0_0[0]; + return new A.SupportsInterpolation(type$.Expression._as(t1), _this.spanFrom$1(start)); + } else + _this.error$2(0, "Expected @supports condition.", identifier0.span); + } + } + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$1$consumeNewlines(true); + condition = _this._supportsConditionInParens$0(); + t1.expectChar$1(41); + return new A.SupportsNegation(condition, _this.spanFrom$1(start)); + } else if (t1.peekChar$0() === 40) { + condition = _this._supportsCondition$1$inParentheses(true); + t1.expectChar$1(41); + return condition.withSpan$1(_this.spanFrom$1(start)); + } + $name = null; + nameStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + wasInParentheses = _this._inParentheses; + try { + $name = _this._expression$1$consumeNewlines(true); + t1.expectChar$1(58); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t1.set$state(nameStart); + _this._inParentheses = wasInParentheses; + identifier = _this.interpolatedIdentifier$0(); + _1_0 = _this._trySupportsOperation$2(identifier, nameStart); + operation = null; + if (_1_0 != null) { + operation = _1_0; + t1.expectChar$1(41); + t1 = operation; + t2 = _this.spanFrom$1(start); + return new A.SupportsOperation(t1.left, t1.right, t1.operator, t2); + } + t2 = new A.InterpolationBuffer(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t2.addInterpolation$1(identifier); + t2.addInterpolation$1(_this._interpolatedDeclarationValue$4$allowColon$allowEmpty$allowSemicolon$consumeNewlines(false, true, true, true)); + contents = t2.interpolation$1(_this.spanFrom$1(nameStart)); + if (t1.peekChar$0() === 58) + throw exception; + t1.expectChar$1(41); + return new A.SupportsAnything(contents, _this.spanFrom$1(start)); + } else + throw exception; + } + value = _this._supportsDeclarationValue$1($name); + t1.expectChar$1(41); + return new A.SupportsDeclaration($name, value, _this.spanFrom$1(start)); + }, + _supportsDeclarationValue$1($name) { + var t1 = false; + if ($name instanceof A.StringExpression) + if (!$name.hasQuotes) + t1 = B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--"); + if (t1) + return new A.StringExpression(this._interpolatedDeclarationValue$0(), false); + else { + this.whitespace$1$consumeNewlines(true); + return this._expression$1$consumeNewlines(true); + } + }, + _trySupportsOperation$2(interpolation, start) { + var expression, t2, t3, operator, operation, right, t4, _this = this, _null = null, + t1 = interpolation.contents; + if (t1.length !== 1) + return _null; + expression = B.JSArray_methods.get$first(t1); + if (!(expression instanceof A.Expression)) + return _null; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.whitespace$1$consumeNewlines(true); + for (t3 = interpolation.span, operator = _null, operation = operator; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator._name); + else if (_this.scanIdentifier$1("and")) + operator = B.BooleanOperator_0; + else { + if (!_this.scanIdentifier$1("or")) { + if ((t2 === 0 ? 1 / t2 < 0 : t2 < 0) || t2 > t1.string.length) + A.throwExpression(A.ArgumentError$("Invalid position " + t2, _null)); + t1._string_scanner$_position = t2; + return t1._lastMatch = null; + } + operator = B.BooleanOperator_1; + } + _this.whitespace$1$consumeNewlines(true); + right = _this._supportsConditionInParens$0(); + t4 = operation == null ? new A.SupportsInterpolation(expression, t3) : operation; + operation = new A.SupportsOperation(t4, right, operator, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(true); + } + return operation; + }, + _lookingAtInterpolatedIdentifier$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + t2 = false; + if (_1_0 == null) { + t1 = t2; + break $label0$0; + } + if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128 || 92 === _1_0) { + t1 = true; + break $label0$0; + } + if (35 === _1_0) { + t1 = t1.peekChar$1(1) === 123; + break $label0$0; + } + if (45 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (_0_0 == null) { + t1 = t2; + break $label1$1; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(2) === 123; + break $label1$1; + } + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128 || 92 === _0_0 || 45 === _0_0) { + t1 = true; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + _lookingAtPotentialPropertyHack$0() { + var t1 = this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (58 === _0_0 || 42 === _0_0 || 46 === _0_0) { + t1 = true; + break $label0$0; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(1) !== 123; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _lookingAtInterpolatedIdentifierBody$0() { + var t2, t3, + t1 = this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + t2 = false; + if (_0_0 == null) { + t1 = t2; + break $label0$0; + } + if (!(_0_0 === 95 || A.CharacterExtension_get_isAlphabetic(_0_0) || _0_0 >= 128)) + t3 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; + else + t3 = true; + if (t3 || 92 === _0_0) { + t1 = true; + break $label0$0; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(1) === 123; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + _lookingAtExpression$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + t2 = true; + if (_1_0 == null) { + t1 = false; + break $label0$0; + } + if (46 === _1_0) { + t1 = t1.peekChar$1(1) !== 46; + break $label0$0; + } + if (33 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (_0_0 != null) + if (105 !== _0_0) + if (73 !== _0_0) + t1 = _0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12; + else + t1 = t2; + else + t1 = t2; + else + t1 = t2; + break $label1$1; + } + break $label0$0; + } + t1 = true; + if (40 !== _1_0) + if (47 !== _1_0) + if (91 !== _1_0) + if (39 !== _1_0) + if (34 !== _1_0) + if (35 !== _1_0) + if (43 !== _1_0) + if (45 !== _1_0) + if (92 !== _1_0) + if (36 !== _1_0) + if (38 !== _1_0) + if (37 !== _1_0) + if (!(_1_0 === 95 || A.CharacterExtension_get_isAlphabetic(_1_0) || _1_0 >= 128)) + t1 = _1_0 >= 48 && _1_0 <= 57; + if (t1) { + t1 = t2; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _withChildren$1$3(child, start, create) { + var result = create.call$2(this.children$1(0, child), this.spanFrom$1(start)); + this.whitespaceWithoutComments$1$consumeNewlines(false); + return result; + }, + _withChildren$3(child, start, create) { + return this._withChildren$1$3(child, start, create, type$.dynamic); + }, + _urlString$0() { + var innerError, stackTrace, exception, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + url = _this.string$0(); + try { + t1 = A.Uri_parse(url); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), _this.spanFrom$1(start), stackTrace); + } else + throw exception; + } + }, + _publicIdentifier$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + result = _this.identifier$0(); + _this._assertPublic$2(result, new A.StylesheetParser__publicIdentifier_closure(_this, new A._SpanScannerState(t1, t2))); + return result; + }, + _assertPublic$2(identifier, span) { + var first = identifier.charCodeAt(0); + if (!(first === 45 || first === 95)) + return; + this.error$2(0, string$.Privat, span.call$0()); + }, + _addOrInject$2(buffer, expression) { + if (expression instanceof A.StringExpression && !expression.hasQuotes) + buffer.addInterpolation$1(expression.text); + else + buffer.add$2(0, expression, expression.get$span(expression)); + }, + get$plainCss() { + return false; + } + }; + A.StylesheetParser_parse_closure.prototype = { + call$0() { + var statements, + t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.scanChar$1(65279); + statements = t1.statements$1(new A.StylesheetParser_parse__closure(t1)); + t2.expectDone$0(); + return A.Stylesheet$internal(statements, t1.spanFrom$1(new A._SpanScannerState(t2, t3)), t1.warnings, t1._globalVariables, t1.get$plainCss()); + }, + $signature: 487 + }; + A.StylesheetParser_parse__closure.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.scan$1("@charset")) { + t1.whitespace$1$consumeNewlines(false); + t1.string$0(); + return null; + } + return t1._statement$1$root(true); + }, + $signature: 531 + }; + A.StylesheetParser_parseParameterList_closure.prototype = { + call$0() { + var parameters, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$2$name(64, "@-rule"); + t1.identifier$0(); + t1.whitespace$1$consumeNewlines(true); + t1.identifier$0(); + parameters = t1._parameterList$0(); + t1.whitespace$1$consumeNewlines(true); + t2.expectChar$1(123); + return parameters; + }, + $signature: 540 + }; + A.StylesheetParser_parseVariableDeclaration_closure.prototype = { + call$0() { + var t1 = this.$this; + return t1.lookingAtIdentifier$0() ? t1._variableDeclarationWithNamespace$0() : t1.variableDeclarationWithoutNamespace$0(); + }, + $signature: 547 + }; + A.StylesheetParser_parseUseRule_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.expectChar$2$name(64, "@-rule"); + t1.expectIdentifier$1("use"); + t1.whitespace$1$consumeNewlines(true); + return t1._useRule$1(new A._SpanScannerState(t2, t3)); + }, + $signature: 548 + }; + A.StylesheetParser__parseSingleProduction_closure.prototype = { + call$0() { + var result = this.production.call$0(); + this.$this.scanner.expectDone$0(); + return result; + }, + $signature() { + return this.T._eval$1("0()"); + } + }; + A.StylesheetParser__statement_closure.prototype = { + call$0() { + return this.$this._statement$0(); + }, + $signature: 125 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure.prototype = { + call$0() { + return this.$this.spanFrom$1(this.start); + }, + $signature: 16 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure0.prototype = { + call$0() { + return this.declaration.span; + }, + $signature: 16 + }; + A.StylesheetParser__declarationOrBuffer_closure.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser__declarationOrBuffer_closure0.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser__declarationOrBuffer_closure1.prototype = { + call$1($name) { + return A.equalsIgnoreCase($name, "result"); + }, + $signature: 4 + }; + A.StylesheetParser__declarationOrBuffer_closure2.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser__styleRule_closure.prototype = { + call$2(children, span) { + return A.StyleRule$(this._box_0.interpolation, children, this.$this.spanFrom$1(this.start)); + }, + $signature: 549 + }; + A.StylesheetParser__withStyleRuleChildren_closure.prototype = { + call$2(children, span) { + var t2, _this = this, + t1 = _this.$this; + if (t1.get$indented() && children.length === 0) { + t2 = _this.nodeWithSpan; + t1.warnings.push(new A._Record_3_deprecation_message_span(null, string$.This_s, t2.get$span(t2))); + } + t1._inStyleRule = _this.wasInStyleRule; + return _this.create.call$2(children, span); + }, + $signature() { + return this.T._eval$1("0(List,FileSpan)"); + } + }; + A.StylesheetParser__propertyOrVariableDeclaration_closure.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser__tryDeclarationChildren_closure.prototype = { + call$2(children, span) { + return A.Declaration$nested(this.name, children, span, this.value); + }, + $signature: 551 + }; + A.StylesheetParser__atRootRule_closure.prototype = { + call$2(children, span) { + return A.AtRootRule$(children, span, this.query); + }, + $signature: 160 + }; + A.StylesheetParser__atRootRule_closure0.prototype = { + call$2(children, span) { + return A.AtRootRule$(children, span, null); + }, + $signature: 160 + }; + A.StylesheetParser__eachRule_closure.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._inControlDirective = _this.wasInControlDirective; + return A.EachRule$(_this.variables, _this.list, children, span); + }, + $signature: 608 + }; + A.StylesheetParser__functionRule_closure.prototype = { + call$2(children, span) { + return A.FunctionRule$(this.name, this.parameters, children, span, this.precedingComment); + }, + $signature: 624 + }; + A.StylesheetParser__forRule_closure.prototype = { + call$0() { + var t1 = this.$this; + if (!t1.lookingAtIdentifier$0()) + return false; + if (t1.scanIdentifier$1("to")) + return this._box_0.exclusive = true; + else if (t1.scanIdentifier$1("through")) { + this._box_0.exclusive = false; + return true; + } else + return false; + }, + $signature: 20 + }; + A.StylesheetParser__forRule_closure0.prototype = { + call$2(children, span) { + var t1, _this = this; + _this.$this._inControlDirective = _this.wasInControlDirective; + t1 = _this._box_0.exclusive; + t1.toString; + return A.ForRule$(_this.variable, _this.from, _this.to, children, span, t1); + }, + $signature: 278 + }; + A.StylesheetParser__memberList_closure.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.peekChar$0() === 36) + this.variables.add$1(0, t1.variableName$0()); + else + this.identifiers.add$1(0, t1.identifier$1$normalize(true)); + }, + $signature: 1 + }; + A.StylesheetParser__includeRule_closure.prototype = { + call$2(children, span) { + return A.ContentBlock$(this.contentParameters_, children, span); + }, + $signature: 282 + }; + A.StylesheetParser_mediaRule_closure.prototype = { + call$2(children, span) { + return A.MediaRule$(this.query, children, span); + }, + $signature: 297 + }; + A.StylesheetParser__mixinRule_closure.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet$_inMixin = false; + return A.MixinRule$(_this.name, _this.parameters, children, span, _this.precedingComment); + }, + $signature: 299 + }; + A.StylesheetParser_mozDocumentRule_closure.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser_mozDocumentRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + if (_this._box_0.needsDeprecationWarning) + _this.$this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_PmQ, string$.x40_moz_, span)); + return A.AtRule$(_this.name, span, children, _this.value); + }, + $signature: 161 + }; + A.StylesheetParser_supportsRule_closure.prototype = { + call$2(children, span) { + return A.SupportsRule$(this.condition, children, span); + }, + $signature: 302 + }; + A.StylesheetParser__whileRule_closure.prototype = { + call$2(children, span) { + this.$this._inControlDirective = this.wasInControlDirective; + return A.WhileRule$(this.condition, children, span); + }, + $signature: 303 + }; + A.StylesheetParser_unknownAtRule_closure.prototype = { + call$2(children, span) { + return A.AtRule$(this.name, span, children, this._box_0.value); + }, + $signature: 161 + }; + A.StylesheetParser__expression_resetState.prototype = { + call$0() { + var t2, + t1 = this._box_0; + t1.operands_ = t1.operators_ = t1.spaceExpressions_ = t1.commaExpressions_ = null; + t2 = this.$this; + t2.scanner.set$state(this.start); + t1.allowSlash = true; + t1.singleExpression_ = t2._singleExpression$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOneOperation.prototype = { + call$0() { + var t2, t3, t4, t5, t6, t7, _this = this, + t1 = _this._box_0, + operator = t1.operators_.pop(), + left = t1.operands_.pop(), + right = t1.singleExpression_; + if (right == null) { + t2 = _this.$this.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Expected expression.", t3, t2._string_scanner$_position - t3); + } + if (t1.allowSlash) { + t2 = _this.$this; + t2 = !t2._inParentheses && operator === B.BinaryOperator_ehp && t2._isSlashOperand$1(left) && t2._isSlashOperand$1(right); + } else + t2 = false; + if (t2) + t1.singleExpression_ = new A.BinaryOperationExpression(B.BinaryOperator_ehp, left, right, true); + else { + t1.singleExpression_ = new A.BinaryOperationExpression(operator, left, right, false); + t2 = t1.allowSlash = false; + if (B.BinaryOperator_jCK === operator || B.BinaryOperator_tDf === operator) { + t3 = _this.$this; + t4 = t3.scanner.string; + t5 = right.get$span(right); + t5 = t5.get$start(t5); + t6 = right.get$span(right); + t7 = operator.operator; + if (B.JSString_methods.substring$2(t4, t5.offset - 1, t6.get$start(t6).offset) === t7) { + t2 = left.get$span(left); + t2 = t4.charCodeAt(t2.get$end(t2).offset); + t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; + } + if (t2) { + t2 = left.toString$0(0); + t4 = right.toString$0(0); + t5 = left.toString$0(0); + t6 = right.toString$0(0); + t1 = t1.singleExpression_; + t3.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_K9u, "This operation is parsed as:\n\n " + t2 + " " + t7 + " " + t4 + string$.x0a_but_ + t5 + " (" + t7 + t6 + ")\n\nAdd a space after " + t7 + string$.x20to_cl, t1.get$span(t1))); + } + } + } + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOperations.prototype = { + call$0() { + var t1, + operators = this._box_0.operators_; + if (operators == null) + return; + for (t1 = this.resolveOneOperation; operators.length !== 0;) + t1.call$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_addSingleExpression.prototype = { + call$1(expression) { + var t2, spaceExpressions, _this = this, + t1 = _this._box_0; + if (t1.singleExpression_ != null) { + t2 = _this.$this; + if (t2._inParentheses) { + t2._inParentheses = false; + if (t1.allowSlash) { + _this.resetState.call$0(); + return; + } + } + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + spaceExpressions = t1.spaceExpressions_ = A._setArrayType([], type$.JSArray_Expression); + _this.resolveOperations.call$0(); + t2 = t1.singleExpression_; + t2.toString; + spaceExpressions.push(t2); + t1.allowSlash = true; + } + t1.singleExpression_ = expression; + }, + $signature: 305 + }; + A.StylesheetParser__expression_addOperator.prototype = { + call$1(operator) { + var t2, t3, operators, operands, t4, singleExpression, operatorEnd, _this = this, + t1 = _this.$this; + if (t1.get$plainCss() && operator !== B.BinaryOperator_g6F && operator !== B.BinaryOperator_jCK && operator !== B.BinaryOperator_tDf && operator !== B.BinaryOperator_wkM && operator !== B.BinaryOperator_ehp) { + t2 = t1.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Operators aren't allowed in plain CSS.", t3, t2._string_scanner$_position - t3); + } + t2 = _this._box_0; + t2.allowSlash = t2.allowSlash && operator === B.BinaryOperator_ehp; + operators = t2.operators_; + if (operators == null) + operators = t2.operators_ = A._setArrayType([], type$.JSArray_BinaryOperator); + operands = t2.operands_; + if (operands == null) + operands = t2.operands_ = A._setArrayType([], type$.JSArray_Expression); + t3 = _this.resolveOneOperation; + t4 = operator.precedence; + for (;;) { + if (!(operators.length !== 0 && B.JSArray_methods.get$last(operators).precedence >= t4)) + break; + t3.call$0(); + } + singleExpression = t2.singleExpression_; + if (singleExpression == null) { + t3 = t1.scanner; + t4 = operator.operator.length; + t3.error$3$length$position(0, "Expected expression.", t4, t3._string_scanner$_position - t4); + } + operatorEnd = t1.scanner._string_scanner$_position; + t1.whitespace$1$consumeNewlines(true); + if (operator === B.BinaryOperator_bgA && !t1._lookingAtExpression$0()) { + t1 = t1.spanFromPosition$2(operatorEnd - 1, operatorEnd); + _this.addSingleExpression.call$1(new A.StringExpression(new A.Interpolation(A.List_List$unmodifiable(["%"], type$.Object), B.List_null, t1), false)); + } else { + operators.push(operator); + operands.push(singleExpression); + t2.singleExpression_ = t1._singleExpression$0(); + } + }, + $signature: 308 + }; + A.StylesheetParser__expression_resolveSpaceExpressions.prototype = { + call$0() { + var t1, spaceExpressions, singleExpression, t2; + this.resolveOperations.call$0(); + t1 = this._box_0; + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + return; + singleExpression = t1.singleExpression_; + if (singleExpression == null) + this.$this.scanner.error$1(0, "Expected expression."); + spaceExpressions.push(singleExpression); + t2 = B.JSArray_methods.get$first(spaceExpressions); + t2 = t2.get$span(t2).expand$1(0, singleExpression.get$span(singleExpression)); + t1.singleExpression_ = new A.ListExpression(A.List_List$unmodifiable(spaceExpressions, type$.Expression), B.ListSeparator_SrV, false, t2); + t1.spaceExpressions_ = null; + }, + $signature: 0 + }; + A.StylesheetParser_expressionUntilComma_closure.prototype = { + call$0() { + return this.$this.scanner.peekChar$0() === 44; + }, + $signature: 20 + }; + A.StylesheetParser__isHexColor_closure.prototype = { + call$1(char) { + return A.CharacterExtension_get_isHex(char); + }, + $signature: 50 + }; + A.StylesheetParser__unicodeRange_closure.prototype = { + call$1(char) { + return char != null && A.CharacterExtension_get_isHex(char); + }, + $signature: 31 + }; + A.StylesheetParser__unicodeRange_closure0.prototype = { + call$1(char) { + return char != null && A.CharacterExtension_get_isHex(char); + }, + $signature: 31 + }; + A.StylesheetParser_interpolatedStringToken_closure.prototype = { + call$0() { + return A.consumeEscapedCharacter(this.$this.scanner); + }, + $signature: 0 + }; + A.StylesheetParser_namespacedExpression_closure.prototype = { + call$0() { + return this.$this.spanFrom$1(this.start); + }, + $signature: 16 + }; + A.StylesheetParser_trySpecialFunction_closure.prototype = { + call$1(contents) { + return new A.StringExpression(contents, false); + }, + $signature: 316 + }; + A.StylesheetParser__interpolatedDeclarationValue_closure.prototype = { + call$0() { + return this.$this.scanIdentifier$2$caseSensitive("of", false); + }, + $signature: 0 + }; + A.StylesheetParser__expressionUntilComparison_closure.prototype = { + call$0() { + var t1 = this.$this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (61 === _0_0) { + t1 = t1.peekChar$1(1) !== 61; + break $label0$0; + } + if (60 === _0_0 || 62 === _0_0) { + t1 = true; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 20 + }; + A.StylesheetParser__publicIdentifier_closure.prototype = { + call$0() { + return this.$this.spanFrom$1(this.start); + }, + $signature: 16 + }; + A.StylesheetGraph.prototype = { + modifiedSince$3(url, since, baseImporter) { + var node = this._stylesheet_graph$_add$3(url, baseImporter, null); + if (node == null) + return true; + return new A.StylesheetGraph_modifiedSince_transitiveModificationTime(this, A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode)).call$1(node).isAfter$1(since); + }, + _stylesheet_graph$_add$3(url, baseImporter, baseUrl) { + var importer, canonicalUrl, _this = this, + result = _this._ignoreErrors$1(new A.StylesheetGraph__add_closure(_this, url, baseImporter, baseUrl)); + if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(result)) { + importer = result._0; + canonicalUrl = result._1; + _this.addCanonical$3(importer, canonicalUrl, result._2); + return _this._nodes.$index(0, canonicalUrl); + } else + return null; + }, + addCanonical$4$recanonicalize(importer, canonicalUrl, originalUrl, recanonicalize) { + var stylesheet, _this = this, + t1 = _this._nodes; + if (t1.$index(0, canonicalUrl) != null) + return B.Set_empty4; + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph_addCanonical_closure(_this, importer, canonicalUrl, originalUrl)); + if (stylesheet == null) + return B.Set_empty4; + t1.$indexSet(0, canonicalUrl, A.StylesheetNode$_(stylesheet, importer, canonicalUrl, _this._upstreamNodes$3(stylesheet, importer, canonicalUrl))); + return recanonicalize ? _this._recanonicalizeImports$2(importer, canonicalUrl) : B.Set_empty4; + }, + addCanonical$3(importer, canonicalUrl, originalUrl) { + return this.addCanonical$4$recanonicalize(importer, canonicalUrl, originalUrl, true); + }, + _upstreamNodes$4(stylesheet, baseImporter, baseUrl, active) { + var t1, t2, t3, t4, t5, t6, t7, t8; + if (active == null) + active = A.LinkedHashSet_LinkedHashSet$_literal([baseUrl], type$.Uri); + t1 = type$.Uri; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t5 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + new A._FindDependenciesVisitor(t2, t3, t4, t5, A.LinkedHashSet_LinkedHashSet$_empty(type$.nullable_String)).visitChildren$1(stylesheet.children); + t6 = type$.UnmodifiableSetView_Uri; + t7 = type$.nullable_StylesheetNode; + t8 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t7); + for (t2 = new A.UnionSet(A.LinkedHashSet_LinkedHashSet$_literal([new A.UnmodifiableSetView0(t2, t6), new A.UnmodifiableSetView0(t3, t6), new A.UnmodifiableSetView0(t4, t6)], type$.Set_Uri), type$.UnionSet_Uri).get$_union_set$_iterable(), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t8.$indexSet(0, t3, this._nodeFor$4(t3, baseImporter, baseUrl, active)); + } + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t7); + for (t2 = t5.get$iterator(0); t2.moveNext$0();) { + t3 = t2.get$current(0); + t1.$indexSet(0, t3, this._nodeFor$5$forImport(t3, baseImporter, baseUrl, active, true)); + } + return new A._Record_2_imports_modules(t1, t8); + }, + _upstreamNodes$3(stylesheet, baseImporter, baseUrl) { + return this._upstreamNodes$4(stylesheet, baseImporter, baseUrl, null); + }, + reload$1(canonicalUrl) { + var stylesheet, upstream, _this = this, + node = _this._nodes.$index(0, canonicalUrl); + if (node == null) + throw A.wrapException(A.StateError$(canonicalUrl.toString$0(0) + " is not in the dependency graph.")); + _this._transitiveModificationTimes.clear$0(0); + _this.importCache.clearImport$1(canonicalUrl); + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph_reload_closure(_this, node, canonicalUrl)); + if (stylesheet == null) + return false; + node._stylesheet = stylesheet; + upstream = _this._upstreamNodes$3(stylesheet, node.importer, canonicalUrl); + node._replaceUpstream$2(upstream._1, upstream._0); + return true; + }, + reloadAllModified$0() { + var node, modified, loadTime, t2, t3, _i, t4, t5, t6, t7, modified0, exception, _this = this, + t1 = _this._nodes; + t1 = A.List_List$_of(new A.LinkedHashMapValuesIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapValuesIterable<2>")), type$.StylesheetNode); + t2 = t1.length; + t3 = _this.importCache._loadTimes; + _i = 0; + for (; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + node = t1[_i]; + modified = false; + try { + loadTime = t3.$index(0, node.canonicalUrl); + if (loadTime != null) { + t4 = node.importer.modificationTime$1(node.canonicalUrl); + t5 = loadTime; + t6 = t4._value; + t7 = t5._value; + if (t6 <= t7) { + t4 = t6 === t7 && t4._microsecond > t5._microsecond; + modified0 = t4; + } else + modified0 = true; + } else + modified0 = false; + modified = modified0; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException) + modified = true; + else + throw exception; + } + if (modified) + if (!_this.reload$1(node.canonicalUrl)) + _this.remove$2(0, node.importer, node.canonicalUrl); + } + }, + remove$2(_, importer, canonicalUrl) { + var toRecompile, _this = this, + node = _this._nodes.remove$1(0, canonicalUrl), + t1 = node != null; + if (t1) { + _this._transitiveModificationTimes.clear$0(0); + _this.importCache.clearImport$1(canonicalUrl); + node._stylesheet_graph$_remove$0(); + } + toRecompile = _this._recanonicalizeImports$2(importer, canonicalUrl); + if (t1) + toRecompile.addAll$1(0, node._downstream); + return toRecompile; + }, + _recanonicalizeImports$2(importer, canonicalUrl) { + var changed, t1, t2, t3, t4, t5, newUpstream, newUpstreamImports, _this = this; + _this.importCache.clearCanonicalize$1(canonicalUrl); + changed = A.LinkedHashSet_LinkedHashSet$_empty(type$.StylesheetNode); + for (t1 = _this._nodes.get$values(0).get$iterator(0), t2 = type$.UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode, t3 = type$.Uri, t4 = type$.nullable_StylesheetNode; t1.moveNext$0();) { + t5 = t1.get$current(0); + newUpstream = _this._recanonicalizeImportsForNode$4$forImport(t5, importer, canonicalUrl, false); + newUpstreamImports = _this._recanonicalizeImportsForNode$4$forImport(t5, importer, canonicalUrl, true); + if (newUpstream.__js_helper$_length !== 0 || newUpstreamImports.__js_helper$_length !== 0) { + changed.add$1(0, t5); + t5._replaceUpstream$2(A.mergeMaps(new A.UnmodifiableMapView(t5._upstream, t2), newUpstream, t3, t4), A.mergeMaps(new A.UnmodifiableMapView(t5._upstreamImports, t2), newUpstreamImports, t3, t4)); + } + } + if (changed._collection$_length !== 0) + _this._transitiveModificationTimes.clear$0(0); + return changed; + }, + _recanonicalizeImportsForNode$4$forImport(node, importer, canonicalUrl, forImport) { + var url, result, t2, newMap, t3, t4, t5, t6, upstream, exception, newCanonicalUrl, + t1 = type$.UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode, + map = forImport ? new A.UnmodifiableMapView(node._upstreamImports, t1) : new A.UnmodifiableMapView(node._upstream, t1); + t1 = type$.Uri; + t2 = type$.nullable_StylesheetNode; + newMap = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs(map, t1, t2), t1 = t1.get$iterator(t1), t2 = this._nodes, t3 = this.importCache, t4 = node.importer, t5 = node.canonicalUrl; t1.moveNext$0();) { + t6 = t1.get$current(t1); + url = null; + url = t6._0; + upstream = t6._1; + if (!importer.couldCanonicalize$2(url, canonicalUrl)) + continue; + result = null; + try { + result = t3.canonicalize$4$baseImporter$baseUrl$forImport(0, url, t4, t5, forImport); + } catch (exception) { + } + t6 = result; + newCanonicalUrl = t6 == null ? null : t6._1; + if (J.$eq$(newCanonicalUrl, upstream == null ? null : upstream.canonicalUrl)) + continue; + t6 = url; + newMap.$indexSet(0, t6, result == null ? null : t2.$index(0, newCanonicalUrl)); + } + return newMap; + }, + _nodeFor$5$forImport(url, baseImporter, baseUrl, active, forImport) { + var canonicalUrl, t2, _1_0, stylesheet, t3, t4, node, _this = this, t1 = {}, + result = _this._ignoreErrors$1(new A.StylesheetGraph__nodeFor_closure(_this, url, baseImporter, baseUrl, forImport)); + if (result == null) + return null; + t1.originalUrl = t1.canonicalUrl = t1.importer = null; + t1.importer = result._0; + canonicalUrl = t1.canonicalUrl = result._1; + t1.originalUrl = result._2; + t2 = _this._nodes; + _1_0 = t2.$index(0, canonicalUrl); + if (_1_0 != null) + return _1_0; + if (active.contains$1(0, canonicalUrl)) + return null; + stylesheet = _this._ignoreErrors$1(new A.StylesheetGraph__nodeFor_closure0(t1, _this)); + if (stylesheet == null) + return null; + active.add$1(0, t1.canonicalUrl); + t3 = t1.importer; + t4 = t1.canonicalUrl; + node = A.StylesheetNode$_(stylesheet, t3, t4, _this._upstreamNodes$4(stylesheet, t3, t4, active)); + active.remove$1(0, t1.canonicalUrl); + t2.$indexSet(0, t1.canonicalUrl, node); + return node; + }, + _nodeFor$4(url, baseImporter, baseUrl, active) { + return this._nodeFor$5$forImport(url, baseImporter, baseUrl, active, false); + }, + _ignoreErrors$1$1(callback) { + var t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + return null; + } + }, + _ignoreErrors$1(callback) { + return this._ignoreErrors$1$1(callback, type$.dynamic); + } + }; + A.StylesheetGraph_modifiedSince_transitiveModificationTime.prototype = { + call$1(node) { + var t1 = this.seenNodes; + t1.add$1(0, node); + return this.$this._transitiveModificationTimes.putIfAbsent$2(node.canonicalUrl, new A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure(node, t1, this)); + }, + $signature: 317 + }; + A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure.prototype = { + call$0() { + var t2, t3, t4, t5, t6, + t1 = this.node, + latest = t1.importer.modificationTime$1(t1.canonicalUrl); + for (t1 = t1._upstream.get$values(0).followedBy$1(0, t1._upstreamImports.get$values(0)).get$iterator(0), t2 = this.transitiveModificationTime, t3 = this.seenNodes; t1.moveNext$0();) { + t4 = t1.get$current(0); + $label0$0: { + if (t4 == null) { + t4 = new A.DateTime(Date.now(), 0, false); + break $label0$0; + } + t5 = t3.contains$1(0, t4); + if (t5) { + t4 = new A.DateTime(A.DateTime__validate(0, 0, false), 0, false); + break $label0$0; + } + t4 = t2.call$1(t4); + break $label0$0; + } + t5 = t4._value; + t6 = latest._value; + if (t5 <= t6) + t5 = t5 === t6 && t4._microsecond > latest._microsecond; + else + t5 = true; + if (t5) + latest = t4; + } + return latest; + }, + $signature: 155 + }; + A.StylesheetGraph__add_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.canonicalize$3$baseImporter$baseUrl(0, _this.url, _this.baseImporter, _this.baseUrl); + }, + $signature: 128 + }; + A.StylesheetGraph_addCanonical_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.importCanonical$3$originalUrl(_this.importer, _this.canonicalUrl, _this.originalUrl); + }, + $signature: 86 + }; + A.StylesheetGraph_reload_closure.prototype = { + call$0() { + return this.$this.importCache.importCanonical$2(this.node.importer, this.canonicalUrl); + }, + $signature: 86 + }; + A.StylesheetGraph__nodeFor_closure.prototype = { + call$0() { + var _this = this; + return _this.$this.importCache.canonicalize$4$baseImporter$baseUrl$forImport(0, _this.url, _this.baseImporter, _this.baseUrl, _this.forImport); + }, + $signature: 128 + }; + A.StylesheetGraph__nodeFor_closure0.prototype = { + call$0() { + var t1 = this._box_0; + return this.$this.importCache.importCanonical$3$originalUrl(t1.importer, t1.canonicalUrl, t1.originalUrl); + }, + $signature: 86 + }; + A.StylesheetNode.prototype = { + StylesheetNode$_$4(_stylesheet, importer, canonicalUrl, allUpstream) { + var t1, t2; + for (t1 = this._upstream.get$values(0).followedBy$1(0, this._upstreamImports.get$values(0)).get$iterator(0); t1.moveNext$0();) { + t2 = t1.get$current(0); + if (t2 != null) + t2._downstream.add$1(0, this); + } + }, + _replaceUpstream$2(newUpstream, newUpstreamImports) { + var t3, oldUpstream, newUpstreamSet, _this = this, + t1 = type$.nullable_StylesheetNode, + t2 = A.LinkedHashSet_LinkedHashSet$of(_this._upstream.get$values(0), t1); + t2.addAll$1(0, _this._upstreamImports.get$values(0)); + t3 = type$.StylesheetNode; + oldUpstream = A.SetExtension_removeNull(t2, t3); + t1 = A.LinkedHashSet_LinkedHashSet$of(new A.LinkedHashMapValuesIterable(newUpstream, A._instanceType(newUpstream)._eval$1("LinkedHashMapValuesIterable<2>")), t1); + t1.addAll$1(0, new A.LinkedHashMapValuesIterable(newUpstreamImports, A._instanceType(newUpstreamImports)._eval$1("LinkedHashMapValuesIterable<2>"))); + newUpstreamSet = A.SetExtension_removeNull(t1, t3); + for (t1 = oldUpstream.difference$1(newUpstreamSet), t1 = t1.get$iterator(t1); t1.moveNext$0();) + t1.get$current(t1)._downstream.remove$1(0, _this); + for (t1 = newUpstreamSet.difference$1(oldUpstream), t1 = t1.get$iterator(t1); t1.moveNext$0();) + t1.get$current(t1)._downstream.add$1(0, _this); + _this._upstream = newUpstream; + _this._upstreamImports = newUpstreamImports; + }, + _stylesheet_graph$_remove$0() { + var t1, t2, t3, t4, _i, url, _this = this; + for (t1 = A.LinkedHashSet_LinkedHashSet$of(_this._upstream.get$values(0), type$.nullable_StylesheetNode), t1.addAll$1(0, _this._upstreamImports.get$values(0)), t1 = A._LinkedHashSetIterator$(t1, t1._collection$_modifications, A._instanceType(t1)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 == null) + continue; + t3._downstream.remove$1(0, _this); + } + for (t1 = _this._downstream.get$iterator(0); t1.moveNext$0();) { + t2 = t1.get$current(0); + t3 = t2._upstream; + t4 = A._instanceType(t3)._eval$1("LinkedHashMapKeysIterable<1>"); + t3 = A.List_List$_of(new A.LinkedHashMapKeysIterable(t3, t4), t4._eval$1("Iterable.E")); + t4 = t3.length; + _i = 0; + for (; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + url = t3[_i]; + if (t2._upstream.$index(0, url) === _this) { + t2._upstream.$indexSet(0, url, null); + break; + } + } + t3 = t2._upstreamImports; + t4 = A._instanceType(t3)._eval$1("LinkedHashMapKeysIterable<1>"); + t3 = A.List_List$_of(new A.LinkedHashMapKeysIterable(t3, t4), t4._eval$1("Iterable.E")); + t4 = t3.length; + _i = 0; + for (; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + url = t3[_i]; + if (t2._upstreamImports.$index(0, url) === _this) { + t2._upstreamImports.$indexSet(0, url, null); + break; + } + } + } + }, + toString$0(_) { + var t1 = this._stylesheet.span; + t1 = A.NullableExtension_andThen(t1.get$sourceUrl(t1), A.path__prettyUri$closure()); + return t1 == null ? "" : t1; + } + }; + A.Syntax.prototype = { + _enumToString$0() { + return "Syntax." + this._name; + }, + toString$0(_) { + return this._syntax$_name; + } + }; + A.Box.prototype = { + $eq(_, other) { + if (other == null) + return false; + return this.$ti._is(other) && other._box$_inner === this._box$_inner; + }, + get$hashCode(_) { + return A.Primitives_objectHashCode(this._box$_inner); + }, + toString$0(_) { + return ""; + } + }; + A.ModifiableBox.prototype = { + toString$0(_) { + return ""; + } + }; + A.LazyFileSpan.prototype = { + get$span(_) { + var t1 = this._lazy_file_span$_span; + return t1 == null ? this._lazy_file_span$_span = this._builder.call$0() : t1; + }, + compareTo$1(_, other) { + return this.get$span(0).compareTo$1(0, other); + }, + get$context(_) { + var t1 = this.get$span(0); + return t1.get$context(t1); + }, + get$end(_) { + var t1 = this.get$span(0); + return t1.get$end(t1); + }, + expand$1(_, other) { + return this.get$span(0).expand$1(0, other); + }, + get$file(_) { + var t1 = this.get$span(0); + return t1.get$file(t1); + }, + highlight$1$color(color) { + return this.get$span(0).highlight$1$color(color); + }, + get$length(_) { + var t1 = this.get$span(0); + return t1.get$length(t1); + }, + message$2$color(_, message, color) { + return this.get$span(0).message$2$color(0, message, color); + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + get$sourceUrl(_) { + var t1 = this.get$span(0); + return t1.get$sourceUrl(t1); + }, + get$start(_) { + var t1 = this.get$span(0); + return t1.get$start(t1); + }, + get$text() { + return this.get$span(0).get$text(); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.LimitedMapView.prototype = { + get$keys(_) { + return this._limited_map_view$_keys; + }, + get$length(_) { + return this._limited_map_view$_keys._collection$_length; + }, + get$isEmpty(_) { + return this._limited_map_view$_keys._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._limited_map_view$_keys._collection$_length !== 0; + }, + $index(_, key) { + return this._limited_map_view$_keys.contains$1(0, key) ? this._limited_map_view$_map.$index(0, key) : null; + }, + containsKey$1(key) { + return this._limited_map_view$_keys.contains$1(0, key); + }, + remove$1(_, key) { + return this._limited_map_view$_keys.contains$1(0, key) ? this._limited_map_view$_map.remove$1(0, key) : null; + } + }; + A.MapExtensions_get_pairs_closure.prototype = { + call$1(e) { + return new A._Record_2(e.key, e.value); + }, + $signature() { + return this.K._eval$1("@<0>")._bind$1(this.V)._eval$1("+(1,2)(MapEntry<1,2>)"); + } + }; + A.MergedMapView.prototype = { + get$keys(_) { + var t1 = this._mapsByKey; + return new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")); + }, + get$length(_) { + return this._mapsByKey.__js_helper$_length; + }, + get$isEmpty(_) { + return this._mapsByKey.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this._mapsByKey.__js_helper$_length !== 0; + }, + MergedMapView$1(maps, $K, $V) { + var t1, t2, _i, map, t3, t4; + for (t1 = maps.length, t2 = this._mapsByKey, _i = 0; _i < maps.length; maps.length === t1 || (0, A.throwConcurrentModificationError)(maps), ++_i) { + map = maps[_i]; + if (map instanceof A.MergedMapView) + for (t3 = map._mapsByKey, t3 = new A.LinkedHashMapValueIterator(t3, t3._modifications, t3._first); t3.moveNext$0();) { + t4 = t3.__js_helper$_current; + A.setAll(t2, t4.get$keys(t4), t4); + } + else + A.setAll(t2, map.get$keys(map), map); + } + }, + $index(_, key) { + var t1 = this._mapsByKey.$index(0, this.$ti._precomputed1._as(key)); + return t1 == null ? null : t1.$index(0, key); + }, + $indexSet(_, key, value) { + var _0_0 = this._mapsByKey.$index(0, key); + if (_0_0 != null) + _0_0.$indexSet(0, key, value); + else + throw A.wrapException(A.UnsupportedError$(string$.New_en)); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$(string$.Entrie)); + }, + containsKey$1(key) { + return this._mapsByKey.containsKey$1(key); + } + }; + A.MultiDirWatcher.prototype = { + watch$1(_, directory) { + var t1, t2, t3, t4, isParentOfExistingDir, _i, t5, _0_1, t6, future, stream, completer; + for (t1 = this._watchers, t2 = A.MapExtensions_get_pairs(t1, type$.nullable_String, type$.Stream_WatchEvent).toList$0(0), t3 = t2.length, t1 = t1._map, t4 = this._group, isParentOfExistingDir = false, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t5 = t2[_i]; + _0_1 = t5._0; + _0_1.toString; + if (!isParentOfExistingDir) { + t6 = $.$get$context(); + t6 = t6._isWithinOrEquals$2(_0_1, directory) === B._PathRelation_equal || t6._isWithinOrEquals$2(_0_1, directory) === B._PathRelation_within; + } else + t6 = false; + if (t6) { + t1 = new A._Future($.Zone__current, type$._Future_void); + t1._asyncComplete$1(null); + return t1; + } + if ($.$get$context()._isWithinOrEquals$2(directory, _0_1) === B._PathRelation_within) { + t1.remove$1(0, _0_1); + t4.remove$1(0, t5._1); + isParentOfExistingDir = true; + } + } + future = A.watchDir(directory, this._poll); + stream = new A._CompleterStream(type$._CompleterStream_WatchEvent); + completer = new A.StreamCompleter(stream, type$.StreamCompleter_WatchEvent); + future.then$1$2$onError(0, completer.get$setSourceStream(), completer.get$setError(), type$.void); + t1.$indexSet(0, directory, stream); + t4.add$1(0, stream); + return future; + } + }; + A.MultiSpan.prototype = { + get$start(_) { + var t1 = this._multi_span$_primary; + return t1.get$start(t1); + }, + get$end(_) { + var t1 = this._multi_span$_primary; + return t1.get$end(t1); + }, + get$text() { + return this._multi_span$_primary.get$text(); + }, + get$context(_) { + var t1 = this._multi_span$_primary; + return t1.get$context(t1); + }, + get$file(_) { + var t1 = this._multi_span$_primary; + return t1.get$file(t1); + }, + get$length(_) { + var t1 = this._multi_span$_primary; + return t1.get$length(t1); + }, + get$sourceUrl(_) { + var t1 = this._multi_span$_primary; + return t1.get$sourceUrl(t1); + }, + compareTo$1(_, other) { + return this._multi_span$_primary.compareTo$1(0, other); + }, + toString$0(_) { + return this._multi_span$_primary.toString$0(0); + }, + expand$1(_, other) { + return new A.MultiSpan(this._multi_span$_primary.expand$1(0, other), this.primaryLabel, this.secondarySpans); + }, + highlight$1$color(color) { + return A.Highlighter$multiple(this._multi_span$_primary, this.primaryLabel, this.secondarySpans, color === true, null, null).highlight$0(); + }, + message$2$color(_, message, color) { + var t1 = J.$eq$(color, true) || typeof color == "string", + t2 = typeof color == "string" ? color : null; + return A.SourceSpanExtension_messageMultiple(this._multi_span$_primary, message, this.primaryLabel, this.secondarySpans, t1, t2, null); + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.NoSourceMapBuffer.prototype = { + get$length(_) { + return this._no_source_map_buffer$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + return callback.call$0(); + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + write$1(_, object) { + var t1 = this._no_source_map_buffer$_buffer, + t2 = A.S(object); + t1._contents += t2; + return null; + }, + writeCharCode$1(charCode) { + var t1 = this._no_source_map_buffer$_buffer, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + return null; + }, + toString$0(_) { + var t1 = this._no_source_map_buffer$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + return A.throwExpression(A.UnsupportedError$(string$.NoSour)); + } + }; + A.PrefixedMapView.prototype = { + get$keys(_) { + return new A._PrefixedKeys(this); + }, + get$length(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._prefixed_map_view$_map; + return t1.get$isNotEmpty(t1); + }, + $index(_, key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefix) ? this._prefixed_map_view$_map.$index(0, B.JSString_methods.substring$1(key, this._prefix.length)) : null; + }, + containsKey$1(key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefix) && this._prefixed_map_view$_map.containsKey$1(B.JSString_methods.substring$1(key, this._prefix.length)); + } + }; + A._PrefixedKeys.prototype = { + get$length(_) { + var t1 = this._view._prefixed_map_view$_map; + return t1.get$length(t1); + }, + get$iterator(_) { + var t1 = this._view._prefixed_map_view$_map; + t1 = t1.get$keys(t1); + t1 = t1.map$1$1(t1, new A._PrefixedKeys_iterator_closure(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._view.containsKey$1(key); + } + }; + A._PrefixedKeys_iterator_closure.prototype = { + call$1(key) { + return this.$this._view._prefix + key; + }, + $signature: 6 + }; + A.PublicMemberMapView.prototype = { + get$keys(_) { + var t1 = this._public_member_map_view$_inner; + t1 = t1.get$keys(t1); + return t1.where$1(t1, A.utils__isPublic$closure()); + }, + containsKey$1(key) { + return typeof key == "string" && A.isPublic(key) && this._public_member_map_view$_inner.containsKey$1(key); + }, + $index(_, key) { + if (typeof key == "string" && A.isPublic(key)) + return this._public_member_map_view$_inner.$index(0, key); + return null; + } + }; + A.SourceMapBuffer.prototype = { + get$_targetLocation() { + var t1 = this._source_map_buffer$_buffer._contents, + t2 = this._line; + return A.SourceLocation$(t1.length, this._column, t2, null); + }, + get$length(_) { + return this._source_map_buffer$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + var t1, _this = this, + wasInSpan = _this._inSpan; + _this._inSpan = true; + _this._addEntry$2(span.get$start(span), _this.get$_targetLocation()); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._inSpan = wasInSpan; + } + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + _addEntry$2(source, target) { + var entry, t2, + t1 = this._entries; + if (t1.length !== 0) { + entry = B.JSArray_methods.get$last(t1); + t2 = entry.source; + if (t2.file.getLine$1(t2.offset) === source.file.getLine$1(source.offset) && entry.target.line === target.line) + return; + if (entry.target.offset === target.offset) + return; + } + t1.push(new A.Entry(source, target, null)); + }, + write$1(_, object) { + var t1, i, + string = J.toString$0$(object); + this._source_map_buffer$_buffer._contents += string; + for (t1 = string.length, i = 0; i < t1; ++i) + if (string.charCodeAt(i) === 10) + this._source_map_buffer$_writeLine$0(); + else + ++this._column; + }, + writeCharCode$1(charCode) { + var t1 = this._source_map_buffer$_buffer, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + if (charCode === 10) + this._source_map_buffer$_writeLine$0(); + else + ++this._column; + }, + _source_map_buffer$_writeLine$0() { + var _this = this, + t1 = _this._entries; + if (B.JSArray_methods.get$last(t1).target.line === _this._line && B.JSArray_methods.get$last(t1).target.column === _this._column) + t1.pop(); + ++_this._line; + _this._column = 0; + if (_this._inSpan) + t1.push(new A.Entry(B.JSArray_methods.get$last(t1).source, _this.get$_targetLocation(), null)); + }, + toString$0(_) { + var t1 = this._source_map_buffer$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + var i, t2, prefixColumn, _box_0 = {}, + t1 = prefix.length; + if (t1 === 0) + return A.SingleMapping_SingleMapping$fromEntries(this._entries); + _box_0.prefixColumn = _box_0.prefixLines = 0; + for (i = 0, t2 = 0; i < t1; ++i) + if (prefix.charCodeAt(i) === 10) { + ++_box_0.prefixLines; + _box_0.prefixColumn = 0; + t2 = 0; + } else { + prefixColumn = t2 + 1; + _box_0.prefixColumn = prefixColumn; + t2 = prefixColumn; + } + t2 = this._entries; + return A.SingleMapping_SingleMapping$fromEntries(new A.MappedListIterable(t2, new A.SourceMapBuffer_buildSourceMap_closure(_box_0, t1), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Entry>"))); + } + }; + A.SourceMapBuffer_buildSourceMap_closure.prototype = { + call$1(entry) { + var t1 = entry.target, + t2 = t1.line, + t3 = this._box_0, + t4 = t3.prefixLines; + t3 = t2 === 0 ? t3.prefixColumn : 0; + return new A.Entry(entry.source, A.SourceLocation$(t1.offset + this.prefixLength, t1.column + t3, t2 + t4, null), entry.identifierName); + }, + $signature: 164 + }; + A.UnprefixedMapView.prototype = { + get$keys(_) { + return new A._UnprefixedKeys(this); + }, + $index(_, key) { + return typeof key == "string" ? this._unprefixed_map_view$_map.$index(0, this._unprefixed_map_view$_prefix + key) : null; + }, + containsKey$1(key) { + return typeof key == "string" && this._unprefixed_map_view$_map.containsKey$1(this._unprefixed_map_view$_prefix + key); + }, + remove$1(_, key) { + return typeof key == "string" ? this._unprefixed_map_view$_map.remove$1(0, this._unprefixed_map_view$_prefix + key) : null; + } + }; + A._UnprefixedKeys.prototype = { + get$iterator(_) { + var t1 = this._unprefixed_map_view$_view._unprefixed_map_view$_map; + t1 = t1.get$keys(t1); + t1 = t1.where$1(t1, new A._UnprefixedKeys_iterator_closure(this)).map$1$1(0, new A._UnprefixedKeys_iterator_closure0(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._unprefixed_map_view$_view.containsKey$1(key); + } + }; + A._UnprefixedKeys_iterator_closure.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, this.$this._unprefixed_map_view$_view._unprefixed_map_view$_prefix); + }, + $signature: 4 + }; + A._UnprefixedKeys_iterator_closure0.prototype = { + call$1(key) { + return B.JSString_methods.substring$1(key, this.$this._unprefixed_map_view$_view._unprefixed_map_view$_prefix.length); + }, + $signature: 6 + }; + A.indent_closure.prototype = { + call$1(line) { + return B.JSString_methods.$mul(" ", this.indentation) + line; + }, + $signature: 6 + }; + A.flattenVertically_closure.prototype = { + call$1(inner) { + return A.QueueList_QueueList$from(inner, this.T); + }, + $signature() { + return this.T._eval$1("QueueList<0>(Iterable<0>)"); + } + }; + A.flattenVertically_closure0.prototype = { + call$1(queue) { + this.result.push(queue.removeFirst$0()); + return queue.get$length(0) === 0; + }, + $signature() { + return this.T._eval$1("bool(QueueList<0>)"); + } + }; + A.longestCommonSubsequence_backtrack.prototype = { + call$2(i, j) { + var selection, t1, _this = this; + if (i === -1 || j === -1) + return A._setArrayType([], _this.T._eval$1("JSArray<0>")); + selection = _this.selections[i][j]; + if (selection != null) { + t1 = _this.call$2(i - 1, j - 1); + J.add$1$ax(t1, selection); + return t1; + } + t1 = _this.lengths; + return t1[i + 1][j] > t1[i][j + 1] ? _this.call$2(i, j - 1) : _this.call$2(i - 1, j); + }, + $signature() { + return this.T._eval$1("List<0>(int,int)"); + } + }; + A.mapAddAll2_closure.prototype = { + call$2(key, inner) { + var t1 = this.destination, + _0_0 = t1.$index(0, key); + if (_0_0 != null) + _0_0.addAll$1(0, inner); + else + t1.$indexSet(0, key, inner); + }, + $signature() { + return this.K1._eval$1("@<0>")._bind$1(this.K2)._bind$1(this.V)._eval$1("~(1,Map<2,3>)"); + } + }; + A.Value.prototype = { + get$isTruthy() { + return true; + }, + get$separator(_) { + return B.ListSeparator_undecided_null_3_undecided; + }, + get$hasBrackets() { + return false; + }, + get$asList() { + return A._setArrayType([this], type$.JSArray_Value); + }, + get$lengthAsList() { + return 1; + }, + get$isBlank() { + return false; + }, + get$isSpecialNumber() { + return false; + }, + get$isSpecialVariable() { + return false; + }, + get$realNull() { + return this; + }, + sassIndexToListIndex$2(sassIndex, $name) { + var t1, index, + indexValue = sassIndex.assertNumber$1($name); + if (indexValue.get$hasUnits()) { + t1 = indexValue.get$unitString(); + A.warnForDeprecation("$" + $name + ": Passing a number with unit " + t1 + string$.x20is_de + indexValue.unitSuggestion$1($name) + string$.x0a_Morex3af, B.Deprecation_7TE); + } + index = indexValue.assertInt$1($name); + if (index === 0) + throw A.wrapException(A.SassScriptException$("List index may not be 0.", $name)); + if (Math.abs(index) > this.get$lengthAsList()) + throw A.wrapException(A.SassScriptException$("Invalid index " + sassIndex.toString$0(0) + " for a list with " + this.get$lengthAsList() + " elements.", $name)); + return index < 0 ? this.get$lengthAsList() + index : index - 1; + }, + assertCalculation$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a calculation.", $name)); + }, + assertColor$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a color.", $name)); + }, + assertFunction$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a function reference.", $name)); + }, + assertMixin$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a mixin reference.", $name)); + }, + assertMap$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a map.", $name)); + }, + tryMap$0() { + return null; + }, + assertNumber$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a number.", $name)); + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertString$1($name) { + return A.throwExpression(A.SassScriptException$(this.toString$0(0) + " is not a string.", $name)); + }, + assertCommonListStyle$2$allowSlash($name, allowSlash) { + var invalidSeparator, buffer, t1, _this = this, + _s8_ = "Expected", + _s23_ = "Expected an unbracketed"; + if (_this.get$separator(_this) !== B.ListSeparator_z0K) + invalidSeparator = !allowSlash && _this.get$separator(_this) === B.ListSeparator_Lul; + else + invalidSeparator = true; + if (!invalidSeparator && !_this.get$hasBrackets()) + return _this.get$asList(); + buffer = new A.StringBuffer(_s8_); + if (_this.get$hasBrackets()) { + buffer._contents = _s23_; + t1 = _s23_; + } else + t1 = _s8_; + if (invalidSeparator) { + t1 += _this.get$hasBrackets() ? "," : " a"; + buffer._contents = t1; + t1 = buffer._contents = t1 + " space-"; + t1 = buffer._contents = (allowSlash ? buffer._contents = t1 + " or slash-" : t1) + "separated"; + } + buffer._contents = t1 + (" list, was " + _this.toString$0(0)); + throw A.wrapException(A.SassScriptException$(buffer.toString$0(0), $name)); + }, + _selectorString$1($name) { + var _0_0 = this._selectorStringOrNull$0(); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$(this.toString$0(0) + string$.x20is_noav, $name)); + }, + _selectorStringOrNull$0() { + var t1, t2, result, _1_0, _i, complex, string, compound, _this = this, _null = null; + if (_this instanceof A.SassString) + return _this._string$_text; + if (!(_this instanceof A.SassList)) + return _null; + t1 = _this._list$_contents; + t2 = t1.length; + if (t2 === 0) + return _null; + result = A._setArrayType([], type$.JSArray_String); + $label0$1: { + _1_0 = _this._separator; + if (B.ListSeparator_z0K === _1_0) { + for (_i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex instanceof A.SassString) { + result.push(complex._string$_text); + continue; + } + if (complex instanceof A.SassList && B.ListSeparator_SrV === complex._separator) { + string = complex._selectorStringOrNull$0(); + if (string == null) + return _null; + result.push(string); + continue; + } + return _null; + } + break $label0$1; + } + if (B.ListSeparator_Lul === _1_0) + return _null; + for (_i = 0; _i < t2; ++_i) { + compound = t1[_i]; + if (!(compound instanceof A.SassString)) + return _null; + result.push(compound._string$_text); + } + } + return B.JSArray_methods.join$1(result, _1_0 === B.ListSeparator_z0K ? ", " : " "); + }, + withListContents$2$separator(contents, separator) { + var t1 = separator == null ? this.get$separator(this) : separator, + t2 = this.get$hasBrackets(); + return A.SassList$(contents, t1, t2); + }, + withListContents$1(contents) { + return this.withListContents$2$separator(contents, null); + }, + greaterThan$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var t1; + $label0$0: { + if (other instanceof A.SassString) { + t1 = new A.SassString(A.serializeValue(this, false, true) + other._string$_text, other._hasQuotes); + break $label0$0; + } + if (other instanceof A.SassCalculation) + A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + t1 = new A.SassString(A.serializeValue(this, false, true) + A.serializeValue(other, false, true), false); + break $label0$0; + } + return t1; + }, + minus$1(other) { + return other instanceof A.SassCalculation ? A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)) : new A.SassString(A.serializeValue(this, false, true) + "-" + A.serializeValue(other, false, true), false); + }, + dividedBy$1(other) { + return new A.SassString(A.serializeValue(this, false, true) + "/" + A.serializeValue(other, false, true), false); + }, + unaryPlus$0() { + return new A.SassString("+" + A.serializeValue(this, false, true), false); + }, + unaryMinus$0() { + return new A.SassString("-" + A.serializeValue(this, false, true), false); + }, + unaryNot$0() { + return B.SassBoolean_false; + }, + withoutSlash$0() { + return this; + }, + toCssString$1$quote(quote) { + return A.serializeValue(this, false, quote); + }, + toCssString$0() { + return this.toCssString$1$quote(true); + }, + toString$0(_) { + return A.serializeValue(this, true, true); + } + }; + A.SassArgumentList.prototype = {}; + A.SassBoolean.prototype = { + get$isTruthy() { + return this.value; + }, + accept$1$1(visitor) { + return visitor._serialize$_buffer.write$1(0, String(this.value)); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return this.value ? B.SassBoolean_false : B.SassBoolean_true; + } + }; + A.SassCalculation.prototype = { + get$isSpecialNumber() { + return true; + }, + accept$1$1(visitor) { + return visitor.visitCalculation$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertCalculation$1($name) { + return this; + }, + plus$1(other) { + if (other instanceof A.SassString) + return this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + return A.throwExpression(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + unaryPlus$0() { + return A.throwExpression(A.SassScriptException$('Undefined operation "+' + this.toString$0(0) + '".', null)); + }, + unaryMinus$0() { + return A.throwExpression(A.SassScriptException$('Undefined operation "-' + this.toString$0(0) + '".', null)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassCalculation && this.name === other.name && B.C_ListEquality.equals$2(0, this.$arguments, other.$arguments); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ B.C_ListEquality0.hash$1(this.$arguments); + } + }; + A.SassCalculation__verifyLength_closure.prototype = { + call$1(arg) { + return arg instanceof A.SassString; + }, + $signature: 73 + }; + A.CalculationOperation.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationOperation && this._operator === other._operator && J.$eq$(this._left, other._left) && J.$eq$(this._right, other._right); + }, + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._operator) ^ J.get$hashCode$(this._left) ^ J.get$hashCode$(this._right)) >>> 0; + }, + toString$0(_) { + var parenthesized = A.serializeValue(new A.SassCalculation("", A._setArrayType([this], type$.JSArray_Object)), true, true); + return B.JSString_methods.substring$2(parenthesized, 1, parenthesized.length - 1); + } + }; + A.CalculationOperator.prototype = { + _enumToString$0() { + return "CalculationOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.SassColor.prototype = { + get$channels() { + var t2, t3, + t1 = this.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = this.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = this.channel2OrNull; + return A.List_List$unmodifiable([t1, t2, t3 == null ? 0 : t3], type$.double); + }, + get$channelsOrNull() { + return A.List_List$unmodifiable([this.channel0OrNull, this.channel1OrNull, this.channel2OrNull], type$.nullable_double); + }, + get$isChannel0Powerless() { + var t1, t2, _this = this, + _0_0 = _this._space; + $label0$0: { + if (B.HslColorSpace_JQ2 === _0_0) { + t1 = _this.channel1OrNull; + t1 = A.fuzzyEquals(t1 == null ? 0 : t1, 0); + break $label0$0; + } + if (B.HwbColorSpace_guQ === _0_0) { + t1 = _this.channel1OrNull; + if (t1 == null) + t1 = 0; + t2 = _this.channel2OrNull; + t1 += t2 == null ? 0 : t2; + t1 = t1 > 100 || A.fuzzyEquals(t1, 100); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isChannel2Powerless() { + var t1, + _0_0 = this._space; + $label0$0: { + if (B.LchColorSpace_Bpv === _0_0 || B.OklchColorSpace_9Gj === _0_0) { + t1 = this.channel1OrNull; + t1 = A.fuzzyEquals(t1 == null ? 0 : t1, 0); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isInGamut() { + var t2, t3, _this = this, + t1 = _this._space; + if (!t1.get$isBoundedInternal()) + return true; + t2 = _this.channel0OrNull; + if (t2 == null) + t2 = 0; + t1 = t1._channels; + t3 = false; + if (_this._isChannelInGamut$2(t2, t1[0])) { + t2 = _this.channel1OrNull; + if (t2 == null) + t2 = 0; + if (_this._isChannelInGamut$2(t2, t1[1])) { + t2 = _this.channel2OrNull; + if (t2 == null) + t2 = 0; + t1 = _this._isChannelInGamut$2(t2, t1[2]); + } else + t1 = t3; + } else + t1 = t3; + return t1; + }, + _isChannelInGamut$2(value, channel) { + var min, max, t1; + $label0$0: { + if (channel instanceof A.LinearChannel) { + min = channel.min; + max = channel.max; + if (value < max || A.fuzzyEquals(value, max)) + t1 = value > min || A.fuzzyEquals(value, min); + else + t1 = false; + break $label0$0; + } + t1 = true; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitColor$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertColor$1($name) { + return this; + }, + assertLegacy$1($name) { + if (this._space.get$isLegacyInternal()) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + string$.x20to_be, $name)); + }, + channel$1(_, channel) { + var t1, _this = this, + channels = _this._space._channels; + if (channel === channels[0].name) { + t1 = _this.channel0OrNull; + return t1 == null ? 0 : t1; + } + if (channel === channels[1].name) { + t1 = _this.channel1OrNull; + return t1 == null ? 0 : t1; + } + if (channel === channels[2].name) { + t1 = _this.channel2OrNull; + return t1 == null ? 0 : t1; + } + if (channel === "alpha") { + t1 = _this.alphaOrNull; + return t1 == null ? 0 : t1; + } + throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', null)); + }, + isChannelMissing$3$channelName$colorName(channel, channelName, colorName) { + var _this = this, + channels = _this._space._channels; + if (channel === channels[0].name) + return _this.channel0OrNull == null; + if (channel === channels[1].name) + return _this.channel1OrNull == null; + if (channel === channels[2].name) + return _this.channel2OrNull == null; + if (channel === "alpha") + return _this.alphaOrNull == null; + throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); + }, + isChannelMissing$1(channel) { + return this.isChannelMissing$3$channelName$colorName(channel, null, null); + }, + isChannelPowerless$3$channelName$colorName(channel, channelName, colorName) { + var _this = this, + channels = _this._space._channels; + if (channel === channels[0].name) + return _this.get$isChannel0Powerless(); + if (channel === channels[1].name) + return false; + if (channel === channels[2].name) + return _this.get$isChannel2Powerless(); + if (channel === "alpha") + return false; + throw A.wrapException(A.SassScriptException$("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); + }, + _legacyChannel$2(space, channel) { + if (!this._space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$("color." + channel + string$.x28__is_oc, null)); + return this.toSpace$1(space).channel$1(0, channel); + }, + toSpace$2$legacyMissing(space, legacyMissing) { + var t2, converted, t3, t4, _this = this, + t1 = _this._space; + if (t1 === space) + return _this; + t2 = _this.alphaOrNull; + if (t2 == null) + t2 = 0; + converted = t1.convert$5(space, _this.channel0OrNull, _this.channel1OrNull, _this.channel2OrNull, t2); + t1 = false; + if (!legacyMissing) + if (converted._space.get$isLegacyInternal()) + t1 = converted.channel0OrNull == null || converted.channel1OrNull == null || converted.channel2OrNull == null || converted.alphaOrNull == null; + if (t1) { + t1 = converted.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = converted.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = converted.channel2OrNull; + if (t3 == null) + t3 = 0; + t4 = converted.alphaOrNull; + if (t4 == null) + t4 = 0; + t4 = A.SassColor_SassColor$forSpaceInternal(converted._space, t1, t2, t3, t4); + t1 = t4; + } else + t1 = converted; + return t1; + }, + toSpace$1(space) { + return this.toSpace$2$legacyMissing(space, true); + }, + changeHsl$3$hue$lightness$saturation(hue, lightness, saturation) { + var t2, t3, t4, t5, _this = this, _null = null, + t1 = _this._space; + if (!t1.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$(string$.color_c, _null)); + t2 = hue == null ? _null : hue; + if (t2 == null) + t2 = _this._legacyChannel$2(B.HslColorSpace_JQ2, "hue"); + t3 = saturation == null ? _null : saturation; + if (t3 == null) + t3 = _this._legacyChannel$2(B.HslColorSpace_JQ2, "saturation"); + t4 = lightness == null ? _null : lightness; + if (t4 == null) + t4 = _this._legacyChannel$2(B.HslColorSpace_JQ2, "lightness"); + t5 = _this.alphaOrNull; + if (t5 == null) + t5 = 0; + return A.SassColor_SassColor$hsl(t2, t3, t4, t5).toSpace$1(t1); + }, + changeHsl$1$saturation(saturation) { + return this.changeHsl$3$hue$lightness$saturation(null, null, saturation); + }, + changeHsl$1$lightness(lightness) { + return this.changeHsl$3$hue$lightness$saturation(null, lightness, null); + }, + changeHsl$1$hue(hue) { + return this.changeHsl$3$hue$lightness$saturation(hue, null, null); + }, + changeAlpha$1(alpha) { + var t2, t3, _this = this, + t1 = _this.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = _this.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = _this.channel2OrNull; + if (t3 == null) + t3 = 0; + return A.SassColor_SassColor$forSpaceInternal(_this._space, t1, t2, t3, alpha); + }, + interpolate$4$legacyMissing$weight(other, method, legacyMissing, weight) { + var t1, color1, color2, missing1_0, missing1_1, missing1_2, missing2_0, missing2_1, missing2_2, channel1_0, channel1_1, channel1_2, channel2_0, channel2_1, channel2_2, alpha1, t2, t3, alpha10, alpha2, alpha20, thisMultiplier, t4, t5, otherMultiplier, mixedAlpha, mixed0, mixed1, mixed2, _this = this, _null = null; + if (A.fuzzyEquals(weight, 0)) + return other; + if (A.fuzzyEquals(weight, 1)) + return _this; + t1 = method.space; + color1 = _this.toSpace$1(t1); + color2 = other.toSpace$1(t1); + if (weight < 0 || weight > 1) + throw A.wrapException(A.RangeError$range(weight, 0, 1, "weight", _null)); + missing1_0 = _this._isAnalogousChannelMissing$3(_this, color1, 0); + missing1_1 = _this._isAnalogousChannelMissing$3(_this, color1, 1); + missing1_2 = _this._isAnalogousChannelMissing$3(_this, color1, 2); + missing2_0 = _this._isAnalogousChannelMissing$3(other, color2, 0); + missing2_1 = _this._isAnalogousChannelMissing$3(other, color2, 1); + missing2_2 = _this._isAnalogousChannelMissing$3(other, color2, 2); + channel1_0 = (missing1_0 ? color2 : color1).channel0OrNull; + if (channel1_0 == null) + channel1_0 = 0; + channel1_1 = (missing1_1 ? color2 : color1).channel1OrNull; + if (channel1_1 == null) + channel1_1 = 0; + channel1_2 = (missing1_2 ? color2 : color1).channel2OrNull; + if (channel1_2 == null) + channel1_2 = 0; + channel2_0 = (missing2_0 ? color1 : color2).channel0OrNull; + if (channel2_0 == null) + channel2_0 = 0; + channel2_1 = (missing2_1 ? color1 : color2).channel1OrNull; + if (channel2_1 == null) + channel2_1 = 0; + channel2_2 = (missing2_2 ? color1 : color2).channel2OrNull; + if (channel2_2 == null) + channel2_2 = 0; + alpha1 = _this.alphaOrNull; + t2 = alpha1 == null; + if (t2) { + t3 = other.alphaOrNull; + alpha10 = t3 == null ? 0 : t3; + } else + alpha10 = alpha1; + alpha2 = other.alphaOrNull; + t3 = alpha2 == null; + if (t3) + alpha20 = t2 ? 0 : alpha1; + else + alpha20 = alpha2; + thisMultiplier = (t2 ? 1 : alpha1) * weight; + t4 = t3 ? 1 : alpha2; + t5 = 1 - weight; + otherMultiplier = t4 * t5; + mixedAlpha = t2 && t3 ? _null : alpha10 * weight + alpha20 * t5; + if (missing1_0 && missing2_0) + mixed0 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed0 = (channel1_0 * thisMultiplier + channel2_0 * otherMultiplier) / t2; + } + if (missing1_1 && missing2_1) + mixed1 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed1 = (channel1_1 * thisMultiplier + channel2_1 * otherMultiplier) / t2; + } + if (missing1_2 && missing2_2) + mixed2 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed2 = (channel1_2 * thisMultiplier + channel2_2 * otherMultiplier) / t2; + } + $label0$0: { + if (B.HslColorSpace_JQ2 === t1 || B.HwbColorSpace_guQ === t1) { + if (missing1_0 && missing2_0) + t2 = _null; + else { + t2 = method.hue; + t2.toString; + t2 = _this._interpolateHues$4(channel1_0, channel2_0, t2, weight); + } + t2 = A.SassColor_SassColor$forSpaceInternal(t1, t2, mixed1, mixed2, mixedAlpha); + t1 = t2; + break $label0$0; + } + if (B.LchColorSpace_Bpv === t1 || B.OklchColorSpace_9Gj === t1) { + if (missing1_2 && missing2_2) + t2 = _null; + else { + t2 = method.hue; + t2.toString; + t2 = _this._interpolateHues$4(channel1_2, channel2_2, t2, weight); + } + t2 = A.SassColor_SassColor$forSpaceInternal(t1, mixed0, mixed1, t2, mixedAlpha); + t1 = t2; + break $label0$0; + } + t1 = A.SassColor_SassColor$forSpaceInternal(t1, mixed0, mixed1, mixed2, mixedAlpha); + break $label0$0; + } + return t1.toSpace$2$legacyMissing(_this._space, false); + }, + _isAnalogousChannelMissing$3(original, output, outputChannelIndex) { + var originalChannel; + if (output.get$channelsOrNull()[outputChannelIndex] == null) + return true; + if (original === output) + return false; + originalChannel = A.IterableExtension_firstWhereOrNull(original._space._channels, output._space._channels[outputChannelIndex].get$isAnalogous()); + if (originalChannel == null) + return false; + return original.isChannelMissing$1(originalChannel.name); + }, + _interpolateHues$4(hue1, hue2, method, weight) { + var _0_0, _1_0; + $label1$1: { + if (B.HueInterpolationMethod_0 === method) { + $label0$0: { + _0_0 = hue2 - hue1; + if (_0_0 > 180) { + hue1 += 360; + break $label0$0; + } + if (_0_0 < -180) + hue2 += 360; + } + break $label1$1; + } + if (B.HueInterpolationMethod_1 === method) { + $label2$2: { + _1_0 = hue2 - hue1; + if (_1_0 > 0 && _1_0 < 180) { + hue2 += 360; + break $label2$2; + } + if (_1_0 > -180 && _1_0 <= 0) + hue1 += 360; + } + break $label1$1; + } + if (B.HueInterpolationMethod_2 === method && hue2 < hue1) { + hue2 += 360; + break $label1$1; + } + if (B.HueInterpolationMethod_3 === method && hue1 < hue2) { + hue1 += 360; + break $label1$1; + } + } + return hue1 * weight + hue2 * (1 - weight); + }, + plus$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$minus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + if (!(other instanceof A.SassNumber) && !(other instanceof A.SassColor)) + return this.super$Value$dividedBy(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " / " + other.toString$0(0) + '".', null)); + }, + $eq(_, other) { + var t1, t2, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassColor)) + return false; + t1 = _this._space; + if (t1.get$isLegacyInternal()) { + t2 = other._space; + if (!t2.get$isLegacyInternal()) + return false; + if (!A.fuzzyEqualsNullable(_this.alphaOrNull, other.alphaOrNull)) + return false; + if (t1 === t2) + return A.fuzzyEqualsNullable(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable(_this.channel2OrNull, other.channel2OrNull); + else + return _this.toSpace$1(B.RgbColorSpace_i0P).$eq(0, other.toSpace$1(B.RgbColorSpace_i0P)); + } + return t1 === other._space && A.fuzzyEqualsNullable(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable(_this.channel2OrNull, other.channel2OrNull) && A.fuzzyEqualsNullable(_this.alphaOrNull, other.alphaOrNull); + }, + get$hashCode(_) { + var rgb, t2, t3, t4, t5, _this = this, + t1 = _this._space; + if (t1.get$isLegacyInternal()) { + rgb = _this.toSpace$1(B.RgbColorSpace_i0P); + t1 = rgb.channel0OrNull; + t1 = A.fuzzyHashCode(t1 == null ? 0 : t1); + t2 = rgb.channel1OrNull; + t2 = A.fuzzyHashCode(t2 == null ? 0 : t2); + t3 = rgb.channel2OrNull; + t3 = A.fuzzyHashCode(t3 == null ? 0 : t3); + t4 = _this.alphaOrNull; + return t1 ^ t2 ^ t3 ^ A.fuzzyHashCode(t4 == null ? 0 : t4); + } else { + t1 = A.Primitives_objectHashCode(t1); + t2 = _this.channel0OrNull; + t2 = A.fuzzyHashCode(t2 == null ? 0 : t2); + t3 = _this.channel1OrNull; + t3 = A.fuzzyHashCode(t3 == null ? 0 : t3); + t4 = _this.channel2OrNull; + t4 = A.fuzzyHashCode(t4 == null ? 0 : t4); + t5 = _this.alphaOrNull; + return (t1 ^ t2 ^ t3 ^ t4 ^ A.fuzzyHashCode(t5 == null ? 0 : t5)) >>> 0; + } + } + }; + A.SassColor$_forSpace_closure.prototype = { + call$1(alpha) { + return A.fuzzyAssertRange(alpha, 0, 1, "alpha"); + }, + $signature: 12 + }; + A._ColorFormatEnum.prototype = { + toString$0(_) { + return "rgbFunction"; + } + }; + A.SpanColorFormat.prototype = {}; + A.ColorChannel.prototype = { + isAnalogous$1(other) { + var _0_6_isSet, t1, _0_60, t2, _0_6_isSet0, + _0_1 = this.name, + _0_6 = other.name; + $label0$0: { + if ("red" !== _0_1) + _0_6_isSet = "x" === _0_1; + else + _0_6_isSet = true; + if (_0_6_isSet) { + if ("red" !== _0_6) + t1 = "x" === _0_6; + else + t1 = true; + _0_60 = _0_6; + } else { + _0_60 = null; + t1 = false; + } + t2 = true; + if (!t1) { + if ("green" !== _0_1) + t1 = "y" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("green" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "y" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("blue" !== _0_1) + t1 = "z" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("blue" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "z" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("chroma" !== _0_1) + t1 = "saturation" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("chroma" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "saturation" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("lightness" === _0_1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_60 = t1; + _0_6_isSet = true; + } + t1 = "lightness" === t1; + } else + t1 = false; + if (!t1) + if ("hue" === _0_1) + t1 = "hue" === (_0_6_isSet ? _0_60 : _0_6); + else + t1 = false; + else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + break $label0$0; + } + return t1; + } + }; + A.LinearChannel.prototype = {}; + A.GamutMapMethod.prototype = { + toString$0(_) { + return this.name; + } + }; + A.ClipGamutMap.prototype = { + map$1(_, color) { + var t1 = color._space, + t2 = t1._channels; + return A.SassColor_SassColor$forSpaceInternal(t1, this._clampChannel$2(color.channel0OrNull, t2[0]), this._clampChannel$2(color.channel1OrNull, t2[1]), this._clampChannel$2(color.channel2OrNull, t2[2]), color.alphaOrNull); + }, + _clampChannel$2(value, channel) { + var t1, min; + if (value == null) + t1 = null; + else + $label0$0: { + if (channel instanceof A.LinearChannel) { + min = channel.min; + t1 = isNaN(value) ? min : B.JSNumber_methods.clamp$2(value, min, channel.max); + break $label0$0; + } + t1 = value; + break $label0$0; + } + return t1; + } + }; + A.LocalMindeGamutMap.prototype = { + map$1(_, color) { + var clipped, max, min, minInGamut, chroma, current, e, + originOklch = color.toSpace$1(B.OklchColorSpace_9Gj), + lightness = originOklch.channel0OrNull, + hue = originOklch.channel2OrNull, + alpha = originOklch.alphaOrNull, + t1 = lightness == null, + t2 = t1 ? 0 : lightness; + if (t2 > 1 || A.fuzzyEquals(t2, 1)) { + t1 = color._space; + t2 = color.alphaOrNull; + return t1.get$isLegacyInternal() ? A.SassColor_SassColor$rgbInternal(255, 255, 255, t2, null).toSpace$1(t1) : A.SassColor_SassColor$forSpaceInternal(t1, 1, 1, 1, t2); + } else { + t1 = t1 ? 0 : lightness; + if (t1 < 0 || A.fuzzyEquals(t1, 0)) + return A.SassColor_SassColor$rgbInternal(0, 0, 0, color.alphaOrNull, null).toSpace$1(color._space); + } + clipped = color.get$isInGamut() ? color : B.ClipGamutMap_clip.map$1(0, color); + if (this._deltaEOK$2(clipped, color) < 0.02) + return clipped; + max = originOklch.channel1OrNull; + if (max == null) + max = 0; + for (t1 = color._space, min = 0, minInGamut = true; max - min > 0.0001;) { + chroma = (min + max) / 2; + current = B.OklchColorSpace_9Gj.convert$5(t1, lightness, chroma, hue, alpha); + if (minInGamut && current.get$isInGamut()) { + min = chroma; + continue; + } + clipped = current.get$isInGamut() ? current : B.ClipGamutMap_clip.map$1(0, current); + e = this._deltaEOK$2(clipped, current); + if (e < 0.02) { + if (0.02 - e < 0.0001) + return clipped; + min = chroma; + minInGamut = false; + } else + max = chroma; + } + return clipped; + }, + _deltaEOK$2(color1, color2) { + var t2, t3, t4, + lab1 = color1.toSpace$1(B.OklabColorSpace_540), + lab2 = color2.toSpace$1(B.OklabColorSpace_540), + t1 = lab1.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = lab2.channel0OrNull; + t1 = Math.pow(t1 - (t2 == null ? 0 : t2), 2); + t2 = lab1.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = lab2.channel1OrNull; + t2 = Math.pow(t2 - (t3 == null ? 0 : t3), 2); + t3 = lab1.channel2OrNull; + if (t3 == null) + t3 = 0; + t4 = lab2.channel2OrNull; + return Math.sqrt(t1 + t2 + Math.pow(t3 - (t4 == null ? 0 : t4), 2)); + } + }; + A.InterpolationMethod.prototype = { + toString$0(_) { + var t1 = this.hue; + t1 = t1 == null ? "" : " " + t1.toString$0(0) + " hue"; + return this.space.name + t1; + } + }; + A.HueInterpolationMethod.prototype = { + _enumToString$0() { + return "HueInterpolationMethod." + this._name; + } + }; + A.ColorSpace.prototype = { + get$isLegacyInternal() { + return false; + }, + get$isPolarInternal() { + return false; + }, + convert$5(dest, channel0, channel1, channel2, alpha) { + return this.convertLinear$5(dest, channel0, channel1, channel2, alpha); + }, + convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var t1, t2, transformedBlue, transformedGreen, transformedRed, linearRed, linearGreen, linearBlue, matrix, _this = this; + $label0$0: { + t1 = B.HslColorSpace_JQ2 !== dest; + if (!t1 || B.HwbColorSpace_guQ === dest) { + t2 = B.SrgbColorSpace_thf; + break $label0$0; + } + if (B.LabColorSpace_2nT === dest || B.LchColorSpace_Bpv === dest) { + t2 = B.XyzD50ColorSpace_2OB; + break $label0$0; + } + if (B.OklabColorSpace_540 === dest || B.OklchColorSpace_9Gj === dest) { + t2 = B.LmsColorSpace_Os3; + break $label0$0; + } + t2 = dest; + break $label0$0; + } + if (t2 === _this) { + transformedBlue = blue; + transformedGreen = green; + transformedRed = red; + } else { + linearRed = _this.toLinear$1(red == null ? 0 : red); + linearGreen = _this.toLinear$1(green == null ? 0 : green); + linearBlue = _this.toLinear$1(blue == null ? 0 : blue); + matrix = _this.transformationMatrix$1(t2); + transformedRed = t2.fromLinear$1(matrix[0] * linearRed + matrix[1] * linearGreen + matrix[2] * linearBlue); + transformedGreen = t2.fromLinear$1(matrix[3] * linearRed + matrix[4] * linearGreen + matrix[5] * linearBlue); + transformedBlue = t2.fromLinear$1(matrix[6] * linearRed + matrix[7] * linearGreen + matrix[8] * linearBlue); + } + $label1$1: { + if (!t1 || B.HwbColorSpace_guQ === dest) { + t1 = B.SrgbColorSpace_thf.convert$8$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingChroma, missingHue, missingLightness); + break $label1$1; + } + if (B.LabColorSpace_2nT === dest || B.LchColorSpace_Bpv === dest) { + t1 = B.XyzD50ColorSpace_2OB.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + break $label1$1; + } + if (B.OklabColorSpace_540 === dest || B.OklchColorSpace_9Gj === dest) { + t1 = B.LmsColorSpace_Os3.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + break $label1$1; + } + t1 = red == null ? null : transformedRed; + t2 = green == null ? null : transformedGreen; + t1 = A.SassColor_SassColor$forSpaceInternal(dest, t1, t2, blue == null ? null : transformedBlue, alpha); + break $label1$1; + } + return t1; + }, + convertLinear$5(dest, red, green, blue, alpha) { + return this.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false, false, false); + }, + toLinear$1(channel) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); + }, + fromLinear$1(channel) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); + }, + transformationMatrix$1(dest) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space conversion from " + this.toString$0(0) + " to " + dest.toString$0(0) + " not implemented.")); + }, + toString$0(_) { + return this.name; + } + }; + A.A98RgbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 2.19921875); + }, + fromLinear$1(channel) { + return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 0.4547069271758437); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj === dest || B.SrgbColorSpace_thf === dest || B.RgbColorSpace_i0P === dest) { + t1 = $.$get$linearA98RgbToLinearSrgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT === dest || B.DisplayP3LinearColorSpace_PrP === dest) { + t1 = $.$get$linearA98RgbToLinearDisplayP3(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$linearA98RgbToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$linearA98RgbToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$linearA98RgbToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$linearA98RgbToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$linearA98RgbToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.DisplayP3ColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1; + if (dest === B.DisplayP3LinearColorSpace_PrP) { + t1 = this.get$toLinear(); + t1 = A.SassColor_SassColor$forSpaceInternal(dest, A.NullableExtension_andThen(red, t1), A.NullableExtension_andThen(green, t1), A.NullableExtension_andThen(blue, t1), alpha); + } else + t1 = this.super$ColorSpace$convertLinear(dest, red, green, blue, alpha, false, false, false, false, false); + return t1; + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear(channel); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear(channel); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj === dest || B.SrgbColorSpace_thf === dest || B.RgbColorSpace_i0P === dest) { + t1 = $.$get$linearDisplayP3ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$linearDisplayP3ToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$linearDisplayP3ToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$linearDisplayP3ToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$linearDisplayP3ToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$linearDisplayP3ToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$linearDisplayP3ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.DisplayP3LinearColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + return dest === B.DisplayP3ColorSpace_MmT ? A.SassColor_SassColor$forSpaceInternal(dest, A.NullableExtension_andThen(red, A.utils0__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen(green, A.utils0__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen(blue, A.utils0__srgbAndDisplayP3FromLinear$closure()), alpha) : this.super$ColorSpace$convert(dest, red, green, blue, alpha); + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj === dest || B.SrgbColorSpace_thf === dest || B.RgbColorSpace_i0P === dest) { + t1 = $.$get$linearDisplayP3ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$linearDisplayP3ToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$linearDisplayP3ToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$linearDisplayP3ToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$linearDisplayP3ToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$linearDisplayP3ToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$linearDisplayP3ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.HslColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, hue, saturation, lightness, alpha) { + var t1 = hue == null, + scaledHue = B.JSNumber_methods.$mod((t1 ? 0 : hue) / 360, 1), + t2 = saturation == null, + scaledSaturation = (t2 ? 0 : saturation) / 100, + t3 = lightness == null, + scaledLightness = (t3 ? 0 : lightness) / 100, + m2 = scaledLightness <= 0.5 ? scaledLightness * (scaledSaturation + 1) : scaledLightness + scaledSaturation - scaledLightness * scaledSaturation, + m1 = scaledLightness * 2 - m2; + return B.SrgbColorSpace_thf.convert$8$missingChroma$missingHue$missingLightness(dest, A.hueToRgb(m1, m2, scaledHue + 0.3333333333333333), A.hueToRgb(m1, m2, scaledHue), A.hueToRgb(m1, m2, scaledHue - 0.3333333333333333), alpha, t2, t1, t3); + } + }; + A.HwbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, hue, whiteness, blackness, alpha) { + var t3, t1 = {}, + t2 = hue == null, + scaledHue = B.JSNumber_methods.$mod(t2 ? 0 : hue, 360) / 360, + scaledWhiteness = t1.scaledWhiteness = (whiteness == null ? 0 : whiteness) / 100, + scaledBlackness = (blackness == null ? 0 : blackness) / 100, + sum = scaledWhiteness + scaledBlackness; + if (sum > 1) { + t3 = t1.scaledWhiteness = scaledWhiteness / sum; + scaledBlackness /= sum; + } else + t3 = scaledWhiteness; + t3 = new A.HwbColorSpace_convert_toRgb(t1, 1 - t3 - scaledBlackness); + return B.SrgbColorSpace_thf.convert$6$missingHue(dest, t3.call$1(scaledHue + 0.3333333333333333), t3.call$1(scaledHue), t3.call$1(scaledHue - 0.3333333333333333), alpha, t2); + } + }; + A.HwbColorSpace_convert_toRgb.prototype = { + call$1(hue) { + return A.hueToRgb(0, 1, hue) * this.factor + this._box_0.scaledWhiteness; + }, + $signature: 12 + }; + A.LabColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var powerlessAB, t1, missingLightness, f1, t2, t3, t4; + switch (dest) { + case B.LabColorSpace_2nT: + powerlessAB = lightness == null || A.fuzzyEquals(lightness, 0); + t1 = a == null || powerlessAB ? null : a; + return A.SassColor$_forSpace(B.LabColorSpace_2nT, lightness, t1, b == null || powerlessAB ? null : b, alpha, null); + case B.LchColorSpace_Bpv: + return A.labToLch(dest, lightness, a, b, alpha, false, false); + default: + missingLightness = lightness == null; + if (missingLightness) + lightness = 0; + f1 = (lightness + 16) / 116; + t1 = a == null; + t2 = this._convertFToXorZ$1((t1 ? 0 : a) / 500 + f1); + t3 = lightness > 8 ? Math.pow(f1, 3) : lightness / 903.2962962962963; + t4 = b == null; + return B.XyzD50ColorSpace_2OB.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, t2 * 0.9642956764295677, t3, this._convertFToXorZ$1(f1 - (t4 ? 0 : b) / 200) * 0.8251046025104602, alpha, t1, t4, missingChroma, missingHue, missingLightness); + } + }, + convert$5(dest, lightness, a, b, alpha) { + return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); + }, + _convertFToXorZ$1(component) { + var cubed = Math.pow(component, 3) + 0; + return cubed > 0.008856451679035631 ? cubed : (116 * component - 16) / 903.2962962962963; + } + }; + A.LchColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, lightness, chroma, hue, alpha) { + var t1 = hue == null, + hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, + t2 = chroma == null, + t3 = t2 ? 0 : chroma, + t4 = Math.cos(hueRadians), + t5 = t2 ? 0 : chroma; + return B.LabColorSpace_2nT.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); + } + }; + A.LmsColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var t1, longScaled, mediumScaled, shortScaled, lightness, t2, t3, _null = null; + switch (dest) { + case B.OklabColorSpace_540: + t1 = long == null ? 0 : long; + longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = medium == null ? 0 : medium; + mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = short == null ? 0 : short; + shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = $.$get$lmsToOklab(); + lightness = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; + t2 = missingLightness ? _null : lightness; + t3 = missingA ? _null : t1[3] * longScaled + t1[4] * mediumScaled + t1[5] * shortScaled; + return A.SassColor$_forSpace(B.OklabColorSpace_540, t2, t3, missingB ? _null : t1[6] * longScaled + t1[7] * mediumScaled + t1[8] * shortScaled, alpha, _null); + case B.OklchColorSpace_9Gj: + t1 = long == null ? 0 : long; + longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = medium == null ? 0 : medium; + mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = short == null ? 0 : short; + shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + if (missingLightness) + t1 = _null; + else { + t1 = $.$get$lmsToOklab(); + t1 = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; + } + t2 = $.$get$lmsToOklab(); + return A.labToLch(dest, t1, t2[3] * longScaled + t2[4] * mediumScaled + t2[5] * shortScaled, t2[6] * longScaled + t2[7] * mediumScaled + t2[8] * shortScaled, alpha, missingChroma, missingHue); + default: + return this.super$ColorSpace$convertLinear(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + } + }, + convert$5(dest, long, medium, short, alpha) { + return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, false, false, false, false, false); + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj === dest || B.SrgbColorSpace_thf === dest || B.RgbColorSpace_i0P === dest) { + t1 = $.$get$lmsToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$lmsToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$lmsToLinearProphotoRgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT === dest || B.DisplayP3LinearColorSpace_PrP === dest) { + t1 = $.$get$lmsToLinearDisplayP3(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$lmsToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$lmsToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$lmsToXyzD50(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.OklabColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var missingLightness, missingA, missingB, t1; + if (dest === B.OklchColorSpace_9Gj) + return A.labToLch(dest, lightness, a, b, alpha, missingChroma, missingHue); + missingLightness = lightness == null; + missingA = a == null; + missingB = b == null; + if (missingLightness) + lightness = 0; + if (missingA) + a = 0; + if (missingB) + b = 0; + t1 = $.$get$oklabToLms(); + return B.LmsColorSpace_Os3.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, Math.pow(t1[0] * lightness + t1[1] * a + t1[2] * b, 3) + 0, Math.pow(t1[3] * lightness + t1[4] * a + t1[5] * b, 3) + 0, Math.pow(t1[6] * lightness + t1[7] * a + t1[8] * b, 3) + 0, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, lightness, a, b, alpha) { + return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); + } + }; + A.OklchColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, lightness, chroma, hue, alpha) { + var t1 = hue == null, + hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, + t2 = chroma == null, + t3 = t2 ? 0 : chroma, + t4 = Math.cos(hueRadians), + t5 = t2 ? 0 : chroma; + return B.OklabColorSpace_540.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); + } + }; + A.ProphotoRgbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + var abs = Math.abs(channel); + return abs <= 0.03125 ? channel / 16 : J.get$sign$in(channel) * Math.pow(abs, 1.8); + }, + fromLinear$1(channel) { + var abs = Math.abs(channel); + return abs >= 0.001953125 ? J.get$sign$in(channel) * Math.pow(abs, 0.5555555555555556) : 16 * channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj === dest || B.SrgbColorSpace_thf === dest || B.RgbColorSpace_i0P === dest) { + t1 = $.$get$linearProphotoRgbToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$linearProphotoRgbToLinearA98Rgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT === dest || B.DisplayP3LinearColorSpace_PrP === dest) { + t1 = $.$get$linearProphotoRgbToLinearDisplayP3(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$linearProphotoRgbToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$linearProphotoRgbToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$linearProphotoRgbToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$linearProphotoRgbToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.Rec2020ColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + var abs = Math.abs(channel); + return abs < 0.08124285829863151 ? channel / 4.5 : J.get$sign$in(channel) * Math.pow((abs + 1.09929682680944 - 1) / 1.09929682680944, 2.2222222222222223); + }, + fromLinear$1(channel) { + var abs = Math.abs(channel); + return abs > 0.018053968510807 ? J.get$sign$in(channel) * (1.09929682680944 * Math.pow(abs, 0.45) - 0.09929682680944008) : 4.5 * channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj === dest || B.SrgbColorSpace_thf === dest || B.RgbColorSpace_i0P === dest) { + t1 = $.$get$linearRec2020ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$linearRec2020ToLinearA98Rgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT === dest || B.DisplayP3LinearColorSpace_PrP === dest) { + t1 = $.$get$linearRec2020ToLinearDisplayP3(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$linearRec2020ToLinearProphotoRgb(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$linearRec2020ToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$linearRec2020ToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$linearRec2020ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.RgbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1 = red == null ? null : red / 255, + t2 = green == null ? null : green / 255; + return B.SrgbColorSpace_thf.convert$5(dest, t1, t2, blue == null ? null : blue / 255, alpha); + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear(channel / 255); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear(channel) * 255; + } + }; + A.SrgbColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingChroma, missingHue, missingLightness) { + var max, min, delta, hue, lightness, saturation, t1, t2, whiteness, blackness, _null = null; + if (B.HslColorSpace_JQ2 === dest || B.HwbColorSpace_guQ === dest) { + if (red == null) + red = 0; + if (green == null) + green = 0; + if (blue == null) + blue = 0; + max = Math.max(Math.max(red, green), blue); + min = Math.min(Math.min(red, green), blue); + delta = max - min; + if (max === min) + hue = 0; + else if (max === red) + hue = 60 * (green - blue) / delta + 360; + else + hue = max === green ? 60 * (blue - red) / delta + 120 : 60 * (red - green) / delta + 240; + if (dest === B.HslColorSpace_JQ2) { + lightness = (min + max) / 2; + saturation = lightness === 0 || lightness === 1 ? 0 : 100 * (max - lightness) / Math.min(lightness, 1 - lightness); + if (saturation < 0) { + hue += 180; + saturation = Math.abs(saturation); + } + t1 = missingHue || A.fuzzyEquals(saturation, 0) ? _null : B.JSNumber_methods.$mod(hue, 360); + t2 = missingChroma ? _null : saturation; + return A.SassColor_SassColor$forSpaceInternal(dest, t1, t2, missingLightness ? _null : lightness * 100, alpha); + } else { + whiteness = min * 100; + blackness = 100 - max * 100; + if (!missingHue) { + t1 = whiteness + blackness; + t1 = t1 > 100 || A.fuzzyEquals(t1, 100); + } else + t1 = true; + return A.SassColor_SassColor$forSpaceInternal(dest, t1 ? _null : B.JSNumber_methods.$mod(hue, 360), whiteness, blackness, alpha); + } + } + if (B.RgbColorSpace_i0P === dest) { + t1 = red == null ? _null : red * 255; + t2 = green == null ? _null : green * 255; + return A.SassColor_SassColor$rgbInternal(t1, t2, blue == null ? _null : blue * 255, alpha, _null); + } + if (B.SrgbLinearColorSpace_kUj === dest) { + t1 = this.get$toLinear(); + return A.SassColor_SassColor$forSpaceInternal(dest, A.NullableExtension_andThen(red, t1), A.NullableExtension_andThen(green, t1), A.NullableExtension_andThen(blue, t1), alpha); + } + return this.super$ColorSpace$convertLinear(dest, red, green, blue, alpha, false, false, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, red, green, blue, alpha) { + return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false); + }, + convert$6$missingHue(dest, red, green, blue, alpha, missingHue) { + return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, missingHue, false); + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear(channel); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear(channel); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.DisplayP3ColorSpace_MmT === dest || B.DisplayP3LinearColorSpace_PrP === dest) { + t1 = $.$get$linearSrgbToLinearDisplayP3(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$linearSrgbToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$linearSrgbToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$linearSrgbToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$linearSrgbToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$linearSrgbToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$linearSrgbToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.SrgbLinearColorSpace.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1; + $label0$0: { + if (B.RgbColorSpace_i0P === dest || B.HslColorSpace_JQ2 === dest || B.HwbColorSpace_guQ === dest || B.SrgbColorSpace_thf === dest) { + t1 = B.SrgbColorSpace_thf.convert$5(dest, A.NullableExtension_andThen(red, A.utils0__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen(green, A.utils0__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen(blue, A.utils0__srgbAndDisplayP3FromLinear$closure()), alpha); + break $label0$0; + } + t1 = this.super$ColorSpace$convert(dest, red, green, blue, alpha); + break $label0$0; + } + return t1; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.DisplayP3ColorSpace_MmT === dest || B.DisplayP3LinearColorSpace_PrP === dest) { + t1 = $.$get$linearSrgbToLinearDisplayP3(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$linearSrgbToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$linearSrgbToLinearProphotoRgb(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$linearSrgbToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$linearSrgbToXyzD65(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$linearSrgbToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$linearSrgbToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.XyzD50ColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var f0, f1, f2, lightness, a, b, t1, _this = this, _null = null; + if (B.LabColorSpace_2nT === dest || B.LchColorSpace_Bpv === dest) { + f0 = _this._convertComponentToLabF$1((x == null ? 0 : x) / 0.9642956764295677); + f1 = _this._convertComponentToLabF$1((y == null ? 0 : y) / 1); + f2 = _this._convertComponentToLabF$1((z == null ? 0 : z) / 0.8251046025104602); + lightness = missingLightness ? _null : 116 * f1 - 16; + a = 500 * (f0 - f1); + b = 200 * (f1 - f2); + if (dest === B.LabColorSpace_2nT) { + t1 = missingA ? _null : a; + t1 = A.SassColor$_forSpace(B.LabColorSpace_2nT, lightness, t1, missingB ? _null : b, alpha, _null); + } else + t1 = A.labToLch(B.LchColorSpace_Bpv, lightness, a, b, alpha, missingChroma, missingHue); + return t1; + } + return _this.super$ColorSpace$convertLinear(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, x, y, z, alpha) { + return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, false, false, false, false, false); + }, + _convertComponentToLabF$1(component) { + return component > 0.008856451679035631 ? Math.pow(component, 0.3333333333333333) + 0 : (903.2962962962963 * component + 16) / 116; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj === dest || B.SrgbColorSpace_thf === dest || B.RgbColorSpace_i0P === dest) { + t1 = $.$get$xyzD50ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$xyzD50ToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$xyzD50ToLinearProphotoRgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT === dest || B.DisplayP3LinearColorSpace_PrP === dest) { + t1 = $.$get$xyzD50ToLinearDisplayP3(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$xyzD50ToLinearRec2020(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ === dest) { + t1 = $.$get$xyzD50ToXyzD65(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$xyzD50ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.XyzD65ColorSpace.prototype = { + get$isBoundedInternal() { + return false; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj === dest || B.SrgbColorSpace_thf === dest || B.RgbColorSpace_i0P === dest) { + t1 = $.$get$xyzD65ToLinearSrgb(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf2 === dest) { + t1 = $.$get$xyzD65ToLinearA98Rgb(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz === dest) { + t1 = $.$get$xyzD65ToLinearProphotoRgb(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT === dest || B.DisplayP3LinearColorSpace_PrP === dest) { + t1 = $.$get$xyzD65ToLinearDisplayP3(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo === dest) { + t1 = $.$get$xyzD65ToLinearRec2020(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB === dest) { + t1 = $.$get$xyzD65ToXyzD50(); + break $label0$0; + } + if (B.LmsColorSpace_Os3 === dest) { + t1 = $.$get$xyzD65ToLms(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix(dest); + break $label0$0; + } + return t1; + } + }; + A.SassFunction.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._inspect) + A.throwExpression(A.SassScriptException$(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize$_buffer; + t1.write$1(0, "get-function("); + t2 = this.callable; + visitor._visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertFunction$1($name) { + return this; + }, + assertCompileContext$1(compileContext) { + var t1 = this._function$_compileContext !== compileContext; + if (t1) + throw A.wrapException(A.SassScriptException$(this.toString$0(0) + " does not belong to current compilation.", null)); + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassFunction && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A.SassList.prototype = { + get$separator(_) { + return this._separator; + }, + get$hasBrackets() { + return this._hasBrackets; + }, + get$isBlank() { + return !this._hasBrackets && B.JSArray_methods.every$1(this._list$_contents, new A.SassList_isBlank_closure()); + }, + get$asList() { + return this._list$_contents; + }, + get$lengthAsList() { + return this._list$_contents.length; + }, + SassList$3$brackets(contents, _separator, brackets) { + if (this._separator === B.ListSeparator_undecided_null_3_undecided && this._list$_contents.length > 1) + throw A.wrapException(A.ArgumentError$(string$.A_list, null)); + }, + toString$0(_) { + var t2, _this = this, + t1 = true; + if (!_this._hasBrackets) { + t2 = _this._list$_contents.length; + if (t2 !== 0) + t1 = t2 === 1 && _this._separator === B.ListSeparator_z0K; + } + if (t1) + return _this.super$Value$toString(0); + return "(" + _this.super$Value$toString(0) + ")"; + }, + accept$1$1(visitor) { + return visitor.visitList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this._list$_contents.length === 0 ? B.SassMap_Map_empty : this.super$Value$assertMap($name); + }, + tryMap$0() { + return this._list$_contents.length === 0 ? B.SassMap_Map_empty : null; + }, + $eq(_, other) { + var t1, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassList && other._separator === _this._separator && other._hasBrackets === _this._hasBrackets && B.C_ListEquality.equals$2(0, other._list$_contents, _this._list$_contents))) + t1 = _this._list$_contents.length === 0 && other instanceof A.SassMap && other.get$asList().length === 0; + else + t1 = true; + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this._list$_contents); + } + }; + A.SassList_isBlank_closure.prototype = { + call$1(element) { + return element.get$isBlank(); + }, + $signature: 79 + }; + A.ListSeparator.prototype = { + _enumToString$0() { + return "ListSeparator." + this._name; + }, + toString$0(_) { + return this._list$_name; + } + }; + A.SassMap.prototype = { + get$separator(_) { + var t1 = this._map$_contents; + return t1.get$isEmpty(t1) ? B.ListSeparator_undecided_null_3_undecided : B.ListSeparator_z0K; + }, + get$asList() { + var t3, t4, t5, result, + t1 = type$.JSArray_Value, + t2 = A._setArrayType([], t1); + for (t3 = type$.Value, t4 = A.MapExtensions_get_pairs(this._map$_contents, t3, t3), t4 = t4.get$iterator(t4); t4.moveNext$0();) { + t5 = t4.get$current(t4); + result = A.List_List$from(A._setArrayType([t5._0, t5._1], t1), false, t3); + result.$flags = 3; + t2.push(new A.SassList(result, B.ListSeparator_SrV, false)); + } + return t2; + }, + get$lengthAsList() { + var t1 = this._map$_contents; + return t1.get$length(t1); + }, + accept$1$1(visitor) { + return visitor.visitMap$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this; + }, + tryMap$0() { + return this; + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (!(other instanceof A.SassMap && B.C_MapEquality.equals$2(0, other._map$_contents, this._map$_contents))) { + t1 = this._map$_contents; + t1 = t1.get$isEmpty(t1) && other instanceof A.SassList && other._list$_contents.length === 0; + } else + t1 = true; + return t1; + }, + get$hashCode(_) { + var t1 = this._map$_contents; + return t1.get$isEmpty(t1) ? B.C_ListEquality0.hash$1(B.List_empty8) : B.C_MapEquality.hash$1(t1); + } + }; + A.SassMixin.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._inspect) + A.throwExpression(A.SassScriptException$(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize$_buffer; + t1.write$1(0, "get-mixin("); + t2 = this.callable; + visitor._visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMixin$1($name) { + return this; + }, + assertCompileContext$1(compileContext) { + var t1 = this._mixin$_compileContext !== compileContext; + if (t1) + throw A.wrapException(A.SassScriptException$(this.toString$0(0) + " does not belong to current compilation.", null)); + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassMixin && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A._SassNull.prototype = { + get$isTruthy() { + return false; + }, + get$isBlank() { + return true; + }, + get$realNull() { + return null; + }, + accept$1$1(visitor) { + if (visitor._inspect) + visitor._serialize$_buffer.write$1(0, "null"); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return B.SassBoolean_true; + } + }; + A.SassNumber.prototype = { + get$unitString() { + var _this = this; + return _this.get$hasUnits() ? _this._unitString$2(_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this)) : ""; + }, + accept$1$1(visitor) { + return visitor.visitNumber$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + withoutSlash$0() { + var _this = this; + return _this.asSlash == null ? _this : _this.withValue$1(_this._number$_value); + }, + assertNumber$1($name) { + return this; + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertInt$1($name) { + var _0_0 = A.fuzzyAsInt(this._number$_value); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$(this.toString$0(0) + " is not an int.", $name)); + }, + assertInt$0() { + return this.assertInt$1(null); + }, + valueInRange$3(min, max, $name) { + var _this = this, + _0_0 = A.fuzzyCheckRange(_this._number$_value, min, max); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$("Expected " + _this.toString$0(0) + " to be within " + min + _this.get$unitString() + " and " + max + _this.get$unitString() + ".", $name)); + }, + valueInRangeWithUnit$4(min, max, $name, unit) { + var _0_0 = A.fuzzyCheckRange(this._number$_value, min, max); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be within " + min + unit + " and " + max + unit + ".", $name)); + }, + hasCompatibleUnits$1(other) { + var _this = this; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length) + return false; + if (_this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + return _this.isComparableTo$1(other); + }, + assertUnit$2(unit, $name) { + if (this.hasUnit$1(unit)) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + ' to have unit "' + unit + '".', $name)); + }, + assertNoUnits$1($name) { + if (!this.get$hasUnits()) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to have no units.", $name)); + }, + assertNoUnits$0() { + return this.assertNoUnits$1(null); + }, + convertValueToMatch$3(other, $name, otherName) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), false, $name, other, otherName); + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits(this.coerceValue$3(newNumerators, newDenominators, $name), newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, true, $name); + }, + coerceValueToUnit$2(unit, $name) { + var t1 = type$.JSArray_String; + return this.coerceValue$3(A._setArrayType([unit], t1), A._setArrayType([], t1), $name); + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + coerceToMatch$3(other, $name, otherName) { + var t1 = this.coerceValueToMatch$3(other, $name, otherName), + t2 = other.get$numeratorUnits(other); + return A.SassNumber_SassNumber$withUnits(t1, other.get$denominatorUnits(other), t2); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), true, $name, other, otherName); + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + _coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, other, otherName) { + var otherHasUnits, t1, compatibilityException, oldNumerators, _i, oldDenominators, _this = this, _box_0 = {}; + if (B.C_ListEquality.equals$2(0, _this.get$numeratorUnits(_this), newNumerators) && B.C_ListEquality.equals$2(0, _this.get$denominatorUnits(_this), newDenominators)) + return _this._number$_value; + otherHasUnits = newNumerators.length !== 0 || newDenominators.length !== 0; + if (coerceUnitless) + t1 = !_this.get$hasUnits() || !otherHasUnits; + else + t1 = false; + if (t1) + return _this._number$_value; + compatibilityException = new A.SassNumber__coerceOrConvertValue_compatibilityException(_this, other, otherName, otherHasUnits, $name, newNumerators, newDenominators); + _box_0.value = _this._number$_value; + t1 = _this.get$numeratorUnits(_this); + oldNumerators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = newNumerators.length, _i = 0; _i < newNumerators.length; newNumerators.length === t1 || (0, A.throwConcurrentModificationError)(newNumerators), ++_i) + A.removeFirstWhere(oldNumerators, new A.SassNumber__coerceOrConvertValue_closure(_box_0, newNumerators[_i]), new A.SassNumber__coerceOrConvertValue_closure0(compatibilityException)); + t1 = _this.get$denominatorUnits(_this); + oldDenominators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = newDenominators.length, _i = 0; _i < newDenominators.length; newDenominators.length === t1 || (0, A.throwConcurrentModificationError)(newDenominators), ++_i) + A.removeFirstWhere(oldDenominators, new A.SassNumber__coerceOrConvertValue_closure1(_box_0, newDenominators[_i]), new A.SassNumber__coerceOrConvertValue_closure2(compatibilityException)); + if (oldNumerators.length !== 0 || oldDenominators.length !== 0) + throw A.wrapException(compatibilityException.call$0()); + return _box_0.value; + }, + _coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, coerceUnitless, $name) { + return this._coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, null, null); + }, + isComparableTo$1(other) { + var exception; + if (!this.get$hasUnits() || !other.get$hasUnits()) + return true; + try { + this.greaterThan$1(other); + return true; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException) + return false; + else + throw exception; + } + }, + greaterThan$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyGreaterThan$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyGreaterThanOrEquals$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyLessThan$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + if (other instanceof A.SassNumber) + return this._coerceUnits$2(other, A.number0__fuzzyLessThanOrEquals$closure()) ? B.SassBoolean_true : B.SassBoolean_false; + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + if (other instanceof A.SassNumber) + return this.withValue$1(this._coerceUnits$2(other, A.number0__moduloLikeSass$closure())); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var _this = this; + if (other instanceof A.SassNumber) + return _this.withValue$1(_this._coerceUnits$2(other, new A.SassNumber_plus_closure())); + if (!(other instanceof A.SassColor)) + return _this.super$Value$plus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + var _this = this; + if (other instanceof A.SassNumber) + return _this.withValue$1(_this._coerceUnits$2(other, new A.SassNumber_minus_closure())); + if (!(other instanceof A.SassColor)) + return _this.super$Value$minus(other); + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + var _this = this; + if (other instanceof A.SassNumber) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number$_value * other._number$_value); + return _this.multiplyUnits$3(_this._number$_value * other._number$_value, other.get$numeratorUnits(other), other.get$denominatorUnits(other)); + } + throw A.wrapException(A.SassScriptException$('Undefined operation "' + _this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + var _this = this; + if (other instanceof A.SassNumber) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number$_value / other._number$_value); + return _this.multiplyUnits$3(_this._number$_value / other._number$_value, other.get$denominatorUnits(other), other.get$numeratorUnits(other)); + } + return _this.super$Value$dividedBy(other); + }, + unaryPlus$0() { + return this; + }, + _coerceUnits$1$2(other, operation) { + var t1, exception; + try { + t1 = operation.call$2(this._number$_value, other.coerceValueToMatch$1(this)); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException) { + this.coerceValueToMatch$1(other); + throw exception; + } else + throw exception; + } + }, + _coerceUnits$2(other, operation) { + return this._coerceUnits$1$2(other, operation, type$.dynamic); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var t1, _0_1, _0_6, _0_3, _0_9, _0_9_isSet, _0_7, _0_7_isSet, t2, _0_2, t3, denominators_case_0, _0_11_isSet, _0_11, _0_13, _0_13_isSet, numerators_case_0, t4, t5, t6, t7, numerators_case_1, denominators_case_1, t0, newNumerators, mutableOtherDenominators, _i, numerator, mutableDenominatorUnits, _this = this, _null = null, _box_0 = {}; + _box_0.value = value; + t1 = [_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this), otherNumerators, otherDenominators]; + _0_1 = t1[0]; + _0_6 = _null; + _0_3 = _null; + _0_9 = _null; + _0_9_isSet = false; + _0_7 = _null; + _0_7_isSet = false; + t2 = false; + _0_2 = t1[1]; + _0_3 = t1[2]; + _0_6 = _0_3.length <= 0; + t3 = _0_6; + if (t3) { + _0_7 = t1[3]; + _0_9 = _0_7.length <= 0; + t2 = _0_9; + _0_9_isSet = true; + _0_7_isSet = true; + } + denominators_case_0 = _0_2; + _0_11_isSet = !t2; + _0_11 = _null; + _0_13 = _null; + _0_13_isSet = false; + t2 = true; + if (_0_11_isSet) { + _0_11 = _0_1.length <= 0; + t3 = _0_11; + if (t3) { + _0_13 = _0_2.length <= 0; + t3 = _0_13; + if (t3) { + if (_0_7_isSet) + denominators_case_0 = _0_7; + else { + _0_7 = t1[3]; + denominators_case_0 = _0_7; + _0_7_isSet = true; + } + numerators_case_0 = _0_3; + } else { + numerators_case_0 = _0_1; + t2 = false; + } + _0_13_isSet = true; + } else { + numerators_case_0 = _0_1; + t2 = false; + } + } else + numerators_case_0 = _0_1; + if (t2) { + t4 = denominators_case_0; + t3 = numerators_case_0; + } else { + t4 = _null; + t3 = t4; + } + if (!t2) { + t2 = _null; + t5 = _null; + if (_0_11_isSet) + t6 = _0_11; + else { + _0_11 = _0_1.length <= 0; + t6 = _0_11; + } + t7 = false; + if (t6) { + if (_0_9_isSet) + t2 = _0_9; + else { + if (_0_7_isSet) + t2 = _0_7; + else { + _0_7 = t1[3]; + t2 = _0_7; + _0_7_isSet = true; + } + _0_9 = t2.length <= 0; + t2 = _0_9; + } + numerators_case_1 = _0_3; + denominators_case_1 = _0_2; + } else { + numerators_case_1 = t2; + t2 = t7; + denominators_case_1 = t5; + } + if (!t2) { + t2 = false; + if (_0_13_isSet) + t5 = _0_13; + else { + _0_13 = _0_2.length <= 0; + t5 = _0_13; + } + if (t5) + if (_0_6) { + denominators_case_1 = _0_7_isSet ? _0_7 : t1[3]; + t1 = true; + } else + t1 = t2; + else + t1 = t2; + numerators_case_1 = _0_1; + } else + t1 = true; + if (t1) { + t1 = !_this._areAnyConvertible$2(numerators_case_1, denominators_case_1); + if (t1) { + t3 = denominators_case_1; + t2 = numerators_case_1; + } else { + t2 = t3; + t3 = t4; + } + t0 = t3; + t3 = t1; + t1 = t2; + t2 = t0; + } else { + t2 = t4; + t1 = t3; + t3 = false; + } + } else { + t2 = t4; + t1 = t3; + t3 = true; + } + if (t3) + return A.SassNumber_SassNumber$withUnits(value, t2, t1); + newNumerators = A._setArrayType([], type$.JSArray_String); + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + for (t1 = _this.get$numeratorUnits(_this), t2 = t1.length, _i = 0; _i < t2; ++_i) { + numerator = t1[_i]; + A.removeFirstWhere(mutableOtherDenominators, new A.SassNumber_multiplyUnits_closure(_box_0, numerator), new A.SassNumber_multiplyUnits_closure0(newNumerators, numerator)); + } + t1 = _this.get$denominatorUnits(_this); + mutableDenominatorUnits = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = otherNumerators.length, _i = 0; _i < t1; ++_i) { + numerator = otherNumerators[_i]; + A.removeFirstWhere(mutableDenominatorUnits, new A.SassNumber_multiplyUnits_closure1(_box_0, numerator), new A.SassNumber_multiplyUnits_closure2(newNumerators, numerator)); + } + t1 = _box_0.value; + B.JSArray_methods.addAll$1(mutableDenominatorUnits, mutableOtherDenominators); + return A.SassNumber_SassNumber$withUnits(t1, mutableDenominatorUnits, newNumerators); + }, + _areAnyConvertible$2(units1, units2) { + return B.JSArray_methods.any$1(units1, new A.SassNumber__areAnyConvertible_closure(units2)); + }, + _unitString$2(numerators, denominators) { + var _0_4, _0_7, _0_6, _0_5, t1, _0_9, _0_10, denominator, _null = null; + $label0$0: { + _0_4 = numerators.length <= 0; + _0_7 = _null; + _0_6 = _null; + _0_5 = _null; + if (_0_4) { + _0_6 = denominators.length; + t1 = _0_6; + _0_7 = t1 <= 0; + t1 = _0_7; + _0_5 = denominators; + } else + t1 = false; + if (t1) { + t1 = "no units"; + break $label0$0; + } + _0_9 = _null; + if (_0_4) { + t1 = _0_6; + _0_9 = t1 === 1; + t1 = _0_9; + } else + t1 = false; + if (t1) { + _0_10 = (_0_4 ? _0_5 : denominators)[0]; + denominator = _0_10; + t1 = denominator + "^-1"; + break $label0$0; + } + if (_0_4) { + t1 = "(" + B.JSArray_methods.join$1(denominators, "*") + ")^-1"; + break $label0$0; + } + t1 = denominators; + _0_5 = t1; + _0_6 = t1.length; + t1 = _0_6; + _0_7 = t1 <= 0; + t1 = _0_7; + if (t1) { + t1 = B.JSArray_methods.join$1(numerators, "*"); + break $label0$0; + } + t1 = _0_6; + _0_9 = t1 === 1; + t1 = _0_9; + if (t1) { + _0_10 = _0_5[0]; + denominator = _0_10; + t1 = B.JSArray_methods.join$1(numerators, "*") + "/" + denominator; + break $label0$0; + } + t1 = B.JSArray_methods.join$1(numerators, "*") + "/(" + B.JSArray_methods.join$1(denominators, "*") + ")"; + break $label0$0; + } + return t1; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassNumber)) + return false; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length || _this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + if (!_this.get$hasUnits()) + return A.fuzzyEquals(_this._number$_value, other._number$_value); + if (!B.C_ListEquality.equals$2(0, _this._canonicalizeUnitList$1(_this.get$numeratorUnits(_this)), _this._canonicalizeUnitList$1(other.get$numeratorUnits(other))) || !B.C_ListEquality.equals$2(0, _this._canonicalizeUnitList$1(_this.get$denominatorUnits(_this)), _this._canonicalizeUnitList$1(other.get$denominatorUnits(other)))) + return false; + return A.fuzzyEquals(_this._number$_value * _this._canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._canonicalMultiplier$1(_this.get$denominatorUnits(_this)), other._number$_value * _this._canonicalMultiplier$1(other.get$numeratorUnits(other)) / _this._canonicalMultiplier$1(other.get$denominatorUnits(other))); + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode(_this._number$_value * _this._canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._canonicalMultiplier$1(_this.get$denominatorUnits(_this))) : t1; + }, + _canonicalizeUnitList$1(units) { + var type, + t1 = units.length; + if (t1 === 0) + return units; + if (t1 === 1) { + type = $.$get$_typesByUnit().$index(0, B.JSArray_methods.get$first(units)); + if (type == null) + t1 = units; + else { + t1 = B.Map_Sr65K.$index(0, type); + t1.toString; + t1 = A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_String); + } + return t1; + } + t1 = A._arrayInstanceType(units)._eval$1("MappedListIterable<1,String>"); + t1 = A.List_List$_of(new A.MappedListIterable(units, new A.SassNumber__canonicalizeUnitList_closure(), t1), t1._eval$1("ListIterable.E")); + B.JSArray_methods.sort$0(t1); + return t1; + }, + _canonicalMultiplier$1(units) { + return B.JSArray_methods.fold$2(units, 1, new A.SassNumber__canonicalMultiplier_closure(this)); + }, + canonicalMultiplierForUnit$1(unit) { + var t1, + innerMap = B.Map_NtHoP.$index(0, unit); + if (innerMap == null) + t1 = 1; + else { + t1 = innerMap.get$values(innerMap); + t1 = 1 / t1.get$first(t1); + } + return t1; + }, + unitSuggestion$2($name, unit) { + var t2, t3, result, _this = this, + t1 = _this.get$denominatorUnits(_this); + t1 = new A.MappedListIterable(t1, new A.SassNumber_unitSuggestion_closure(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + t2 = _this.get$numeratorUnits(_this); + t2 = new A.MappedListIterable(t2, new A.SassNumber_unitSuggestion_closure0(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,String>")).join$0(0); + t3 = unit == null ? "" : " * 1" + unit; + result = "$" + $name + t1 + t2 + t3; + return _this.get$numeratorUnits(_this).length === 0 ? result : "calc(" + result + ")"; + }, + unitSuggestion$1($name) { + return this.unitSuggestion$2($name, null); + } + }; + A.SassNumber__coerceOrConvertValue_compatibilityException.prototype = { + call$0() { + var t2, t3, message, t4, type, unit, _this = this, + t1 = _this.other; + if (t1 != null) { + t2 = _this.$this; + t3 = t2.toString$0(0) + " and"; + message = new A.StringBuffer(t3); + t4 = _this.otherName; + if (t4 != null) + t3 = message._contents = t3 + (" $" + t4 + ":"); + t1 = t3 + (" " + t1.toString$0(0) + " have incompatible units"); + message._contents = t1; + if (!t2.get$hasUnits() || !_this.otherHasUnits) + message._contents = t1 + " (one has units and the other doesn't)"; + t1 = message.toString$0(0) + "."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else if (!_this.otherHasUnits) { + t1 = "Expected " + _this.$this.toString$0(0) + " to have no units."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else { + t1 = _this.newNumerators; + if (t1.length === 1 && _this.newDenominators.length === 0) { + type = $.$get$_typesByUnit().$index(0, B.JSArray_methods.get$first(t1)); + if (type != null) { + t1 = _this.$this.toString$0(0); + t2 = B.JSArray_methods.contains$1(A._setArrayType([97, 101, 105, 111, 117], type$.JSArray_int), type.charCodeAt(0)) ? "an " + type : "a " + type; + t3 = B.Map_Sr65K.$index(0, type); + t3.toString; + t3 = "Expected " + t1 + " to have " + t2 + " unit (" + B.JSArray_methods.join$1(t3, ", ") + ")."; + t2 = _this.name; + return new A.SassScriptException(t2 == null ? t3 : "$" + t2 + ": " + t3); + } + } + t2 = _this.newDenominators; + unit = A.pluralize("unit", t1.length + t2.length, null); + t3 = _this.$this; + t2 = "Expected " + t3.toString$0(0) + " to have " + unit + " " + t3._unitString$2(t1, t2) + "."; + t1 = _this.name; + return new A.SassScriptException(t1 == null ? t2 : "$" + t1 + ": " + t2); + } + }, + $signature: 328 + }; + A.SassNumber__coerceOrConvertValue_closure.prototype = { + call$1(oldNumerator) { + var factor = A.conversionFactor(this.newNumerator, oldNumerator); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 4 + }; + A.SassNumber__coerceOrConvertValue_closure0.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber__coerceOrConvertValue_closure1.prototype = { + call$1(oldDenominator) { + var factor = A.conversionFactor(this.newDenominator, oldDenominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 4 + }; + A.SassNumber__coerceOrConvertValue_closure2.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber_plus_closure.prototype = { + call$2(num1, num2) { + return num1 + num2; + }, + $signature: 57 + }; + A.SassNumber_minus_closure.prototype = { + call$2(num1, num2) { + return num1 - num2; + }, + $signature: 57 + }; + A.SassNumber_multiplyUnits_closure.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 4 + }; + A.SassNumber_multiplyUnits_closure0.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber_multiplyUnits_closure1.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 4 + }; + A.SassNumber_multiplyUnits_closure2.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber__areAnyConvertible_closure.prototype = { + call$1(unit1) { + var t1, + _0_0 = B.Map_NtHoP.$index(0, unit1); + $label0$0: { + if (_0_0 != null) { + t1 = B.JSArray_methods.any$1(this.units2, _0_0.get$containsKey()); + break $label0$0; + } + t1 = B.JSArray_methods.contains$1(this.units2, unit1); + break $label0$0; + } + return t1; + }, + $signature: 4 + }; + A.SassNumber__canonicalizeUnitList_closure.prototype = { + call$1(unit) { + var t1, + type = $.$get$_typesByUnit().$index(0, unit); + if (type == null) + t1 = unit; + else { + t1 = B.Map_Sr65K.$index(0, type); + t1.toString; + t1 = B.JSArray_methods.get$first(t1); + } + return t1; + }, + $signature: 6 + }; + A.SassNumber__canonicalMultiplier_closure.prototype = { + call$2(multiplier, unit) { + return multiplier * this.$this.canonicalMultiplierForUnit$1(unit); + }, + $signature: 165 + }; + A.SassNumber_unitSuggestion_closure.prototype = { + call$1(unit) { + return " * 1" + unit; + }, + $signature: 6 + }; + A.SassNumber_unitSuggestion_closure0.prototype = { + call$1(unit) { + return " / 1" + unit; + }, + $signature: 6 + }; + A.ComplexSassNumber.prototype = { + get$numeratorUnits(_) { + return this._numeratorUnits; + }, + get$denominatorUnits(_) { + return this._denominatorUnits; + }, + get$hasUnits() { + return true; + }, + get$hasComplexUnits() { + return true; + }, + hasUnit$1(unit) { + return false; + }, + compatibleWithUnit$1(unit) { + return false; + }, + hasPossiblyCompatibleUnits$1(other) { + throw A.wrapException(A.UnimplementedError$(string$.Comple)); + }, + withValue$1(value) { + return new A.ComplexSassNumber(this._numeratorUnits, this._denominatorUnits, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.ComplexSassNumber(this._numeratorUnits, this._denominatorUnits, this._number$_value, new A._Record_2(numerator, denominator)); + } + }; + A.SingleUnitSassNumber.prototype = { + get$numeratorUnits(_) { + return A.List_List$unmodifiable([this._unit], type$.String); + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return true; + }, + get$hasComplexUnits() { + return false; + }, + withValue$1(value) { + return new A.SingleUnitSassNumber(this._unit, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.SingleUnitSassNumber(this._unit, this._number$_value, new A._Record_2(numerator, denominator)); + }, + hasUnit$1(unit) { + return unit === this._unit; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.SingleUnitSassNumber && A.conversionFactor(this._unit, other._unit) != null; + }, + hasPossiblyCompatibleUnits$1(other) { + var t1, knownCompatibilities, otherUnit; + if (!(other instanceof A.SingleUnitSassNumber)) + return false; + t1 = $.$get$_knownCompatibilitiesByUnit(); + knownCompatibilities = t1.$index(0, this._unit.toLowerCase()); + if (knownCompatibilities == null) + return true; + otherUnit = other._unit.toLowerCase(); + return knownCompatibilities.contains$1(0, otherUnit) || !t1.containsKey$1(otherUnit); + }, + compatibleWithUnit$1(unit) { + return A.conversionFactor(this._unit, unit) != null; + }, + coerceToMatch$1(other) { + var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceToUnit$1(other._unit) : null; + return t1 == null ? this.super$SassNumber$coerceToMatch(other, null, null) : t1; + }, + coerceValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceValueToUnit$1(other._unit) : null; + return t1 == null ? this.super$SassNumber$coerceValueToMatch(other, $name, otherName) : t1; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber ? this._coerceValueToUnit$1(other._unit) : null; + return t1 == null ? this.super$SassNumber$convertValueToMatch(other, $name, otherName) : t1; + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$2(newNumerators, newDenominators) { + var t1 = newNumerators.length === 1 && newDenominators.length === 0 ? this._coerceToUnit$1(newNumerators[0]) : null; + return t1 == null ? this.super$SassNumber$coerce(newNumerators, newDenominators, null) : t1; + }, + coerceValue$3(newNumerators, newDenominators, $name) { + var t1 = newNumerators.length === 1 && newDenominators.length === 0 ? this._coerceValueToUnit$1(newNumerators[0]) : null; + return t1 == null ? this.super$SassNumber$coerceValue(newNumerators, newDenominators, $name) : t1; + }, + coerceValueToUnit$2(unit, $name) { + var t1 = this._coerceValueToUnit$1(unit); + return t1 == null ? this.super$SassNumber$coerceValueToUnit(unit, $name) : t1; + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + _coerceToUnit$1(unit) { + var t1 = this._unit; + if (t1 === unit) + return this; + return A.NullableExtension_andThen(A.conversionFactor(unit, t1), new A.SingleUnitSassNumber__coerceToUnit_closure(this, unit)); + }, + _coerceValueToUnit$1(unit) { + return A.NullableExtension_andThen(A.conversionFactor(unit, this._unit), new A.SingleUnitSassNumber__coerceValueToUnit_closure(this)); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var mutableOtherDenominators, t1 = {}; + t1.value = value; + t1.newNumerators = otherNumerators; + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + A.removeFirstWhere(mutableOtherDenominators, new A.SingleUnitSassNumber_multiplyUnits_closure(t1, this), new A.SingleUnitSassNumber_multiplyUnits_closure0(t1, this)); + return A.SassNumber_SassNumber$withUnits(t1.value, mutableOtherDenominators, t1.newNumerators); + }, + unaryMinus$0() { + return new A.SingleUnitSassNumber(this._unit, -this._number$_value, null); + }, + $eq(_, other) { + var factor; + if (other == null) + return false; + if (other instanceof A.SingleUnitSassNumber) { + factor = A.conversionFactor(other._unit, this._unit); + return factor != null && A.fuzzyEquals(this._number$_value * factor, other._number$_value); + } else + return false; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode(_this._number$_value * _this.canonicalMultiplierForUnit$1(_this._unit)) : t1; + } + }; + A.SingleUnitSassNumber__coerceToUnit_closure.prototype = { + call$1(factor) { + return new A.SingleUnitSassNumber(this.unit, this.$this._number$_value * factor, null); + }, + $signature: 336 + }; + A.SingleUnitSassNumber__coerceValueToUnit_closure.prototype = { + call$1(factor) { + return this.$this._number$_value * factor; + }, + $signature: 12 + }; + A.SingleUnitSassNumber_multiplyUnits_closure.prototype = { + call$1(denominator) { + var factor = A.conversionFactor(denominator, this.$this._unit); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 4 + }; + A.SingleUnitSassNumber_multiplyUnits_closure0.prototype = { + call$0() { + var t1 = A._setArrayType([this.$this._unit], type$.JSArray_String), + t2 = this._box_0; + B.JSArray_methods.addAll$1(t1, t2.newNumerators); + t2.newNumerators = t1; + }, + $signature: 0 + }; + A.UnitlessSassNumber.prototype = { + get$numeratorUnits(_) { + return B.List_empty; + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return false; + }, + get$hasComplexUnits() { + return false; + }, + withValue$1(value) { + return new A.UnitlessSassNumber(value, null); + }, + withSlash$2(numerator, denominator) { + return new A.UnitlessSassNumber(this._number$_value, new A._Record_2(numerator, denominator)); + }, + hasUnit$1(unit) { + return false; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber; + }, + hasPossiblyCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber; + }, + compatibleWithUnit$1(unit) { + return true; + }, + coerceToMatch$1(other) { + return other.withValue$1(this._number$_value); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._number$_value; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertValueToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertValueToMatch(other, $name, otherName) : this._number$_value; + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$2(newNumerators, newDenominators) { + return A.SassNumber_SassNumber$withUnits(this._number$_value, newDenominators, newNumerators); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number$_value; + }, + coerceValueToUnit$2(unit, $name) { + return this._number$_value; + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + greaterThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 > t2 && !A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$greaterThan(other); + }, + greaterThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 > t2 || A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$greaterThanOrEquals(other); + }, + lessThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 < t2 && !A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$lessThan(other); + }, + lessThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value; + t2 = other._number$_value; + return t1 < t2 || A.fuzzyEquals(t1, t2) ? B.SassBoolean_true : B.SassBoolean_false; + } + return this.super$SassNumber$lessThanOrEquals(other); + }, + modulo$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(A.moduloLikeSass(this._number$_value, other._number$_value)); + return this.super$SassNumber$modulo(other); + }, + plus$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value + other._number$_value); + return this.super$SassNumber$plus(other); + }, + minus$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value - other._number$_value); + return this.super$SassNumber$minus(other); + }, + times$1(other) { + if (other instanceof A.SassNumber) + return other.withValue$1(this._number$_value * other._number$_value); + return this.super$SassNumber$times(other); + }, + dividedBy$1(other) { + var t1, t2; + if (other instanceof A.SassNumber) { + t1 = this._number$_value / other._number$_value; + if (other.get$hasUnits()) { + t2 = other.get$denominatorUnits(other); + t2 = A.SassNumber_SassNumber$withUnits(t1, other.get$numeratorUnits(other), t2); + t1 = t2; + } else + t1 = new A.UnitlessSassNumber(t1, null); + return t1; + } + return this.super$SassNumber$dividedBy(other); + }, + unaryMinus$0() { + return new A.UnitlessSassNumber(-this._number$_value, null); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UnitlessSassNumber && A.fuzzyEquals(this._number$_value, other._number$_value); + }, + get$hashCode(_) { + var t1 = this.hashCache; + return t1 == null ? this.hashCache = A.fuzzyHashCode(this._number$_value) : t1; + } + }; + A.SassString.prototype = { + get$_sassLength() { + var result, _this = this, + value = _this.__SassString__sassLength_FI; + if (value === $) { + result = new A.Runes(_this._string$_text).get$length(0); + _this.__SassString__sassLength_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__SassString__sassLength_FI = result; + value = result; + } + return value; + }, + get$isSpecialNumber() { + var t1, _2_0, t2, _0_0, _1_0; + if (this._hasQuotes) + return false; + t1 = this._string$_text; + if (t1.length < 6) + return false; + _2_0 = t1.charCodeAt(0); + $label0$0: { + t2 = false; + if (97 === _2_0 || 65 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 116 && (t1.charCodeAt(2) | 32) === 116 && (t1.charCodeAt(3) | 32) === 114 && t1.charCodeAt(4) === 40; + break $label0$0; + } + if (99 === _2_0 || 67 === _2_0) { + _0_0 = t1.charCodeAt(1); + $label1$1: { + if (108 === _0_0 || 76 === _0_0) { + t1 = (t1.charCodeAt(2) | 32) === 97 && (t1.charCodeAt(3) | 32) === 109 && (t1.charCodeAt(4) | 32) === 112 && t1.charCodeAt(5) === 40; + break $label1$1; + } + if (97 === _0_0 || 65 === _0_0) { + t1 = (t1.charCodeAt(2) | 32) === 108 && (t1.charCodeAt(3) | 32) === 99 && t1.charCodeAt(4) === 40; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + break $label0$0; + } + if (118 === _2_0 || 86 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; + break $label0$0; + } + if (101 === _2_0 || 69 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 110 && (t1.charCodeAt(2) | 32) === 118 && t1.charCodeAt(3) === 40; + break $label0$0; + } + if (109 === _2_0 || 77 === _2_0) { + _1_0 = t1.charCodeAt(1); + $label2$2: { + if (97 === _1_0 || 65 === _1_0) { + t1 = (t1.charCodeAt(2) | 32) === 120 && t1.charCodeAt(3) === 40; + break $label2$2; + } + if (105 === _1_0 || 73 === _1_0) { + t1 = (t1.charCodeAt(2) | 32) === 110 && t1.charCodeAt(3) === 40; + break $label2$2; + } + t1 = t2; + break $label2$2; + } + break $label0$0; + } + if (105 === _2_0 || 73 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 102 && t1.charCodeAt(2) === 40; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + get$isSpecialVariable() { + var t1, _0_0; + if (this._hasQuotes) + return false; + t1 = this._string$_text; + if (t1.length < 6) + return false; + _0_0 = t1.charCodeAt(0); + $label0$0: { + if (97 === _0_0 || 65 === _0_0) { + t1 = (t1.charCodeAt(1) | 32) === 116 && (t1.charCodeAt(2) | 32) === 116 && (t1.charCodeAt(3) | 32) === 114 && t1.charCodeAt(4) === 40; + break $label0$0; + } + if (105 === _0_0 || 73 === _0_0) { + t1 = (t1.charCodeAt(1) | 32) === 102 && t1.charCodeAt(2) === 40; + break $label0$0; + } + if (118 === _0_0 || 86 === _0_0) { + t1 = (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isBlank() { + return !this._hasQuotes && this._string$_text.length === 0; + }, + assertQuoted$1($name) { + if (this._hasQuotes) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be a quoted string.", $name)); + }, + assertUnquoted$1($name) { + if (!this._hasQuotes) + return; + throw A.wrapException(A.SassScriptException$("Expected " + this.toString$0(0) + " to be an unquoted string.", $name)); + }, + assertUnquoted$0() { + return this.assertUnquoted$1(null); + }, + accept$1$1(visitor) { + var t1 = visitor._quote && this._hasQuotes, + t2 = this._string$_text; + if (t1) + visitor._visitQuotedString$1(t2); + else + visitor._visitUnquotedString$1(t2); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertString$1($name) { + return this; + }, + plus$1(other) { + var t1 = this._string$_text, + t2 = this._hasQuotes; + return other instanceof A.SassString ? new A.SassString(t1 + other._string$_text, t2) : new A.SassString(t1 + A.serializeValue(other, false, true), t2); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassString && this._string$_text === other._string$_text; + }, + get$hashCode(_) { + var t1 = this._hashCache; + return t1 == null ? this._hashCache = B.JSString_methods.get$hashCode(this._string$_text) : t1; + } + }; + A.AnySelectorVisitor.prototype = { + visitComplexSelector$1(complex) { + return B.JSArray_methods.any$1(complex.components, new A.AnySelectorVisitor_visitComplexSelector_closure(this)); + }, + visitCompoundSelector$1(compound) { + return B.JSArray_methods.any$1(compound.components, new A.AnySelectorVisitor_visitCompoundSelector_closure(this)); + }, + visitPseudoSelector$1(_, pseudo) { + var selector = pseudo.selector; + return selector == null ? false : this.visitSelectorList$1(selector); + }, + visitSelectorList$1(list) { + return B.JSArray_methods.any$1(list.components, this.get$visitComplexSelector()); + }, + visitAttributeSelector$1(_, attribute) { + return false; + }, + visitClassSelector$1(_, klass) { + return false; + }, + visitIDSelector$1(_, id) { + return false; + }, + visitParentSelector$1(_, $parent) { + return false; + }, + visitPlaceholderSelector$1(_, placeholder) { + return false; + }, + visitTypeSelector$1(_, type) { + return false; + }, + visitUniversalSelector$1(_, universal) { + return false; + } + }; + A.AnySelectorVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 54 + }; + A.AnySelectorVisitor_visitCompoundSelector_closure.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature: 14 + }; + A._EvaluateVisitor0.prototype = { + get$_async_evaluate$_hasCssNesting() { + var _0_0, t1, grandparent, + $parent = this._async_evaluate$_atRootExcludingStyleRule ? null : this._async_evaluate$_styleRuleIgnoringAtRoot; + for (;; $parent = grandparent) { + _0_0 = $parent == null ? null : $parent._parent; + if (_0_0 instanceof A.ModifiableCssStyleRule) + return true; + t1 = _0_0 != null; + grandparent = t1 ? _0_0 : null; + if (t1) + continue; + return false; + } + }, + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap0(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + _s7_ = "$module", + t1 = type$.JSArray_AsyncBuiltInCallable, + metaFunctions = A._setArrayType([A.BuiltInCallable$function("global-variable-exists", _s20_, new A._EvaluateVisitor_closure12(_this), _s9_), A.BuiltInCallable$function("variable-exists", "$name", new A._EvaluateVisitor_closure13(_this), _s9_), A.BuiltInCallable$function("function-exists", _s20_, new A._EvaluateVisitor_closure14(_this), _s9_), A.BuiltInCallable$function("mixin-exists", _s20_, new A._EvaluateVisitor_closure15(_this), _s9_), A.BuiltInCallable$function("content-exists", "", new A._EvaluateVisitor_closure16(_this), _s9_), A.BuiltInCallable$function("module-variables", _s7_, new A._EvaluateVisitor_closure17(_this), _s9_), A.BuiltInCallable$function("module-functions", _s7_, new A._EvaluateVisitor_closure18(_this), _s9_), A.BuiltInCallable$function("module-mixins", _s7_, new A._EvaluateVisitor_closure19(_this), _s9_), A.BuiltInCallable$function("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure20(_this), _s9_), A.BuiltInCallable$function("get-mixin", _s20_, new A._EvaluateVisitor_closure21(_this), _s9_), new A.AsyncBuiltInCallable("call", A.ScssParser$("@function call($function, $args...) {", false, _s9_).parseParameterList$0(), new A._EvaluateVisitor_closure22(_this), false)], t1), + metaMixins = A._setArrayType([A.AsyncBuiltInCallable$mixin("load-css", "$url, $with: null", new A._EvaluateVisitor_closure23(_this), false, _s9_), A.AsyncBuiltInCallable$mixin("apply", "$mixin, $args...", new A._EvaluateVisitor_closure24(_this), true, _s9_)], t1); + t1 = type$.AsyncBuiltInCallable; + t2 = A.List_List$_of($.$get$moduleFunctions(), t1); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$("meta", t2, metaMixins, null, t1); + t1 = A.List_List$_of($.$get$coreModules(), type$.BuiltInModule_AsyncCallable); + t1.push(metaModule); + t2 = t1.length; + t3 = _this._async_evaluate$_builtInModules; + _i = 0; + for (; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = type$.JSArray_AsyncCallable; + t2 = A._setArrayType([], t1); + B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions()); + t1 = A._setArrayType([], t1); + for (_i = 0; _i < 11; ++_i) + t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); + B.JSArray_methods.addAll$1(t2, t1); + for (t1 = t2.length, t3 = _this._async_evaluate$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $function = t2[_i]; + t4 = $function.get$name($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + return this.run$body$_EvaluateVisitor(0, importer, node); + }, + run$body$_EvaluateVisitor(_, importer, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, error, stackTrace, t1, exception, $async$exception; + var $async$run$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = type$.nullable_Object; + t1 = A.runZoned(new A._EvaluateVisitor_run_closure0($async$self, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext0($async$self, node)], t1, t1), type$.FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet); + $async$goto = 7; + return A._asyncAwait(type$.Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet._is(t1) ? t1 : A._Future$value(t1, type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), $async$run$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace(error.withLoadedUrls$1($async$self._async_evaluate$_loadedUrls), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$run$2, $async$completer); + }, + _async_evaluate$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _async_evaluate$_assertInModule$2(value, $name) { + return this._async_evaluate$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + return this._loadModule$body$_EvaluateVisitor(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors); + }, + _async_evaluate$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _async_evaluate$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _loadModule$body$_EvaluateVisitor(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t2, _0_0, t1; + var $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + _0_0 = $async$self._async_evaluate$_builtInModules.$index(0, url); + t1 = {}; + t1.builtInModule = null; + $async$goto = _0_0 != null ? 3 : 4; + break; + case 3: + // then + t1.builtInModule = _0_0; + if (configuration instanceof A.ExplicitConfiguration) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException($async$self._async_evaluate$_exception$2(t1, t2.get$span(t2))); + } + $async$goto = 5; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure1(t1, callback), type$.void), $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withStackFrame$1$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure2($async$self, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback), type$.Null), $async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors, $async$completer); + }, + _async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + return this._execute$body$_EvaluateVisitor(importer, stylesheet, configuration, namesInErrors, nodeWithSpan); + }, + _async_evaluate$_execute$2(importer, stylesheet) { + return this._async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _execute$body$_EvaluateVisitor(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Module_AsyncCallable), + $async$returnValue, $async$self = this, currentConfiguration, t2, _0_0, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, t1, url; + var $async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = stylesheet.span; + url = t1.get$sourceUrl(t1); + t1 = configuration == null; + currentConfiguration = t1 ? $async$self._async_evaluate$_configuration : configuration; + t2 = $async$self._async_evaluate$_modules; + _0_0 = t2.$index(0, url); + if (_0_0 != null) { + t2 = $async$self._async_evaluate$_moduleConfigurations.$index(0, url); + t3 = t2.__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration.__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration && _0_0.couldHaveBeenConfigured$1(new A.MapKeySet(new A.UnmodifiableMapView(currentConfiguration._configuration$_values, type$.UnmodifiableMapView_String_ConfiguredValue), type$.MapKeySet_String))) { + if (namesInErrors) { + t2 = $.$get$context(); + url.toString; + message = t2.prettyUri$1(url) + string$.x20was_a; + } else + message = string$.This_mw; + t2 = $async$self._async_evaluate$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : t2.get$span(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(0) ? $async$self._async_evaluate$_exception$1(message) : $async$self._async_evaluate$_multiSpanException$3(message, "new load", t1)); + } + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + environment = A.AsyncEnvironment$(); + css = A._Cell$(); + preModuleComments = A._Cell$(); + extensionStore = A.ExtensionStore$(); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_withEnvironment$1$2(environment, new A._EvaluateVisitor__execute_closure0($async$self, importer, stylesheet, extensionStore, configuration, css, preModuleComments), type$.Null), $async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan); + case 3: + // returning from await. + t1 = css._readLocal$0(); + t3 = preModuleComments._readLocal$0(); + module = environment.toModule$3(t1, t3 == null ? B.Map_empty7 : t3, extensionStore); + if (url != null) { + t2.$indexSet(0, url, module); + $async$self._async_evaluate$_moduleConfigurations.$indexSet(0, url, currentConfiguration); + if (nodeWithSpan != null) + $async$self._async_evaluate$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + $async$returnValue = module; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan, $async$completer); + }, + _async_evaluate$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + _0_0 = _this._async_evaluate$_outOfOrderImports; + $label0$0: { + if (_0_0 == null) { + t1 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + break $label0$0; + } + t1 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + t1 = A.List_List$_of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), type$.ModifiableCssNode); + B.JSArray_methods.addAll$1(t1, _0_0); + t2 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); + break $label0$0; + } + return t1; + }, + _async_evaluate$_combineCss$2$clone(root, clone) { + var selectors, _0_0, t1, imports, css, sorted, t2; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure1())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure2(selectors))); + if (_0_0 != null) + this._async_evaluate$_throwForUnsatisfiedExtension$1(_0_0); + return root.get$css(root); + } + t1 = type$.JSArray_CssNode; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + t1 = type$.Module_AsyncCallable; + sorted = A.ListQueue$(t1); + new A._EvaluateVisitor__combineCss_visitModule0(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); + if (root.get$transitivelyContainsExtensions()) + this._async_evaluate$_extendModules$1(sorted); + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode), t2.get$span(t2)); + }, + _async_evaluate$_combineCss$1(root) { + return this._async_evaluate$_combineCss$2$clone(root, false); + }, + _async_evaluate$_extendModules$1(sortedModules) { + var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension); + for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure1(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); + t4 = t3.get$extensionStore().get$addExtensions(); + if ($self != null) + t4.call$1($self); + t4 = t3.get$extensionStore(); + if (t4.get$isEmpty(t4)) + continue; + for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { + upstream = t4[_i]; + _0_0 = upstream.get$url(upstream); + if (_0_0 != null) + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure2()), t3.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._async_evaluate$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); + }, + _async_evaluate$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); + }, + _async_evaluate$_indexAfterImports$1(statements) { + var t1, lastImport, i, _0_0; + for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + $label0$0: { + _0_0 = t1.$index(statements, i); + if (_0_0 instanceof A.ModifiableCssImport) + break $label0$0; + if (_0_0 instanceof A.ModifiableCssComment) + continue; + break; + } + lastImport = i; + } + return lastImport + 1; + }, + visitStylesheet$1(_, node) { + return this.visitStylesheet$body$_EvaluateVisitor(0, node); + }, + visitStylesheet$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, warning, _i, $name, span; + var $async$visitStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + for (t1 = node.parseTimeWarnings, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + warning = t1.__internal$_current; + if (warning == null) + warning = t2._as(warning); + $async$self._async_evaluate$_warn$3(warning._1, warning._2, warning._0); + } + t1 = node.children, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1($async$self), $async$visitStylesheet$1); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + for (t1 = A.MapExtensions_get_pairs(node.globalVariables, type$.String, type$.FileSpan), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + $name = t2._0; + span = t2._1; + $async$self.visitVariableDeclaration$1(0, new A.VariableDeclaration(null, $name, new A.NullExpression(span), true, false, span)); + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStylesheet$1, $async$completer); + }, + visitAtRootRule$1(_, node) { + return this.visitAtRootRule$body$_EvaluateVisitor(0, node); + }, + visitAtRootRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, _1_0, resolved, query, $parent, included, t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _0_0; + var $async$visitAtRootRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + _0_0 = node.query; + $async$goto = _0_0 != null ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(_0_0, true), $async$visitAtRootRule$1); + case 6: + // returning from await. + _1_0 = $async$result; + resolved = _1_0._0; + _1_0._1; + query = new A.AtRootQueryParser(A.SpanScanner$(resolved, null), null).parse$0(0); + // goto join + $async$goto = 4; + break; + case 5: + // else + query = B.AtRootQuery_bfj; + case 4: + // join + $parent = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode); + for (t1 = type$.CssStylesheet; !t1._is($parent); $parent = _2_0) { + if (!query.excludes$1($parent)) + included.push($parent); + _2_0 = $parent._parent; + if (_2_0 == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = $async$self._async_evaluate$_trimIncluded$1(included); + $async$goto = root === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure1($async$self, node), node.hasDeclarations, type$.Null), $async$visitAtRootRule$1); + case 9: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 8: + // join + if (included.length >= 1) { + first = included[0]; + rest = B.JSArray_methods.sublist$1(included, 1); + innerCopy = first.copyWithoutChildren$0(); + for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { + copy = rest[_i].copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure2($async$self, node)), $async$visitAtRootRule$1); + case 10: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRootRule$1, $async$completer); + }, + _async_evaluate$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_); + $parent = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { + _0_0 = $parent._parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + _1_0 = $parent._parent; + if (_1_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_)) + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _async_evaluate$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure5(_this, newParent, node), + t1 = query._all || query._at_root_query$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure6(_this, scope); + if (_this._async_evaluate$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure7(_this, scope); + if (_this._async_evaluate$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure8(_this, scope); + return _this._async_evaluate$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure9()) ? new A._EvaluateVisitor__scopeForAtRoot_closure10(_this, scope) : scope; + }, + visitContentBlock$1(_, node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(_, node) { + return this.visitContentRule$body$_EvaluateVisitor(0, node); + }, + visitContentRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, $content; + var $async$visitContentRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $content = $async$self._async_evaluate$_environment._async_environment$_content; + if ($content == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure0($async$self, $content), type$.Null), $async$visitContentRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitContentRule$1, $async$completer); + }, + visitDebugRule$1(_, node) { + return this.visitDebugRule$body$_EvaluateVisitor(0, node); + }, + visitDebugRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, value, t1; + var $async$visitDebugRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitDebugRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString ? value._string$_text : A.serializeValue(value, true, true); + $async$self._async_evaluate$_logger.debug$2(0, t1, node.span); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDebugRule$1, $async$completer); + }, + visitDeclaration$1(_, node) { + return this.visitDeclaration$body$_EvaluateVisitor(0, node); + }, + visitDeclaration$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, $name, _0_0, _1_0, value, t2, t3, _2_0, oldDeclarationName; + var $async$visitDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (($async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot) == null && !$async$self._async_evaluate$_inUnknownAtRule && !$async$self._async_evaluate$_inKeyframes) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Declarm, node.span)); + if ($async$self._async_evaluate$_declarationName != null && !node.parsedAsSassScript) { + t1 = B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--") ? string$.Declarw : string$.Declarp; + throw A.wrapException($async$self._async_evaluate$_exception$2(t1, node.span)); + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$2$warnForColor(node.name, true), $async$visitDeclaration$1); + case 3: + // returning from await. + $name = $async$result; + _0_0 = $async$self._async_evaluate$_declarationName; + if (_0_0 != null) + $name = new A.CssValue(_0_0 + "-" + $name.value, $name.span, type$.CssValue_String); + _1_0 = node.value; + $async$goto = _1_0 != null ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait(_1_0.accept$1($async$self), $async$visitDeclaration$1); + case 6: + // returning from await. + value = $async$result; + if (!value.get$isBlank() || value.get$asList().length === 0 || B.JSString_methods.startsWith$1($name.value, "--")) { + $async$self._async_evaluate$_copyParentAfterSibling$0(); + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + t2 = _1_0.get$span(_1_0); + if ($async$self._async_evaluate$_sourceMap) { + t3 = A.NullableExtension_andThen(_1_0, $async$self.get$_async_evaluate$_expressionNode()); + t3 = t3 == null ? null : J.get$span$x(t3); + } else + t3 = null; + t1.addChild$1(A.ModifiableCssDeclaration$($name, new A.CssValue(value, t2, type$.CssValue_Value), node.span, node.parsedAsSassScript, t3)); + } + case 5: + // join + _2_0 = node.children; + t1 = {}; + t1.children = null; + $async$goto = _2_0 != null ? 7 : 8; + break; + case 7: + // then + t1.children = _2_0; + oldDeclarationName = $async$self._async_evaluate$_declarationName; + $async$self._async_evaluate$_declarationName = $name.value; + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure0(t1, $async$self), node.hasDeclarations, type$.Null), $async$visitDeclaration$1); + case 9: + // returning from await. + $async$self._async_evaluate$_declarationName = oldDeclarationName; + case 8: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDeclaration$1, $async$completer); + }, + visitEachRule$1(_, node) { + return this.visitEachRule$body$_EvaluateVisitor(0, node); + }, + visitEachRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, list, nodeWithSpan, _0_0; + var $async$visitEachRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.list; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitEachRule$1); + case 3: + // returning from await. + list = $async$result; + nodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t1); + _0_0 = node.variables; + $label0$0: { + t1 = {}; + t1.variable = null; + if (_0_0.length === 1) { + t1.variable = _0_0[0]; + t1 = new A._EvaluateVisitor_visitEachRule_closure2(t1, $async$self, nodeWithSpan); + break $label0$0; + } + t1 = {}; + t1.variables = null; + t1.variables = _0_0; + t1 = new A._EvaluateVisitor_visitEachRule_closure3(t1, $async$self, nodeWithSpan); + break $label0$0; + } + $async$returnValue = $async$self._async_evaluate$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure4($async$self, list, t1, node), true, type$.nullable_Value); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitEachRule$1, $async$completer); + }, + _async_evaluate$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._async_evaluate$_environment.setLocalVariable$3(variables[i], this._async_evaluate$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._async_evaluate$_environment.setLocalVariable$3(variables[i], B.C__SassNull, nodeWithSpan); + }, + visitErrorRule$1(_, node) { + return this.visitErrorRule$body$_EvaluateVisitor(0, node); + }, + visitErrorRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$self = this, $async$temp1, $async$temp2; + var $async$visitErrorRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$temp2 = J; + $async$goto = 2; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitErrorRule$1); + case 2: + // returning from await. + throw $async$temp1.wrapException($async$self._async_evaluate$_exception$2($async$temp2.toString$0$($async$result), node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitErrorRule$1, $async$completer); + }, + visitExtendRule$1(_, node) { + return this.visitExtendRule$body$_EvaluateVisitor(0, node); + }, + visitExtendRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, targetText, targetMap, compound, simple, styleRule; + var $async$visitExtendRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + styleRule = $async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + if (styleRule == null || $async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + visitor = A._SerializeVisitor$(null, true, null, null, true, false, null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t7 = complex.accept$1(B.C__IsUselessVisitor) ? "can't" : "shouldn't"; + $async$self._async_evaluate$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan(A.SpanExtensions_trimRight(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_0rM); + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(node.selector, true), $async$visitExtendRule$1); + case 3: + // returning from await. + _0_0 = $async$result; + targetText = _0_0._0; + targetMap = _0_0._1; + for (t1 = A.SelectorList_SelectorList$parse(A.trimAscii(targetText, true), false, targetMap, $async$self._async_evaluate$_logger, false).components, t2 = t1.length, t3 = styleRule._style_rule$_selector._box$_inner, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassFormatException$("complex selectors may not be extended.", complex.span, null)); + t4 = compound.components; + simple = t4.length === 1 ? B.JSArray_methods.get$first(t4) : null; + if (simple == null) + throw A.wrapException(A.SassFormatException$(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, null)); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addExtension$4(t3.value, simple, node, $async$self._async_evaluate$_mediaQueries); + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitExtendRule$1, $async$completer); + }, + visitAtRule$1(_, node) { + return this.visitAtRule$body$_EvaluateVisitor(0, node); + }, + visitAtRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, $name, t1, value, children, wasInKeyframes, wasInUnknownAtRule, rule; + var $async$visitAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.At_rul, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$1(node.name), $async$visitAtRule$1); + case 3: + // returning from await. + $name = $async$result; + t1 = A.NullableExtension_andThen(node.value, new A._EvaluateVisitor_visitAtRule_closure3($async$self)); + $async$goto = 4; + return A._asyncAwait(type$.Future_nullable_CssValue_String._is(t1) ? t1 : A._Future$value(t1, type$.nullable_CssValue_String), $async$visitAtRule$1); + case 4: + // returning from await. + value = $async$result; + children = node.children; + if (children == null) { + $async$self._async_evaluate$_copyParentAfterSibling$0(); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$($name, node.span, true, value)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate$_inUnknownAtRule; + if (A.unvendor($name.value) === "keyframes") + $async$self._async_evaluate$_inKeyframes = true; + else + $async$self._async_evaluate$_inUnknownAtRule = true; + rule = A.ModifiableCssAtRule$($name, node.span, false, value); + $async$goto = $async$self.get$_async_evaluate$_hasCssNesting() ? 5 : 6; + break; + case 5: + // then + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitAtRule_closure4($async$self, children), node.hasDeclarations, type$.ModifiableCssAtRule, type$.Null), $async$visitAtRule$1); + case 7: + // returning from await. + $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate$_inKeyframes = wasInKeyframes; + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 6: + // join + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitAtRule_closure5($async$self, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure6(), type$.ModifiableCssAtRule, type$.Null), $async$visitAtRule$1); + case 8: + // returning from await. + $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate$_inKeyframes = wasInKeyframes; + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRule$1, $async$completer); + }, + visitForRule$1(_, node) { + return this.visitForRule$body$_EvaluateVisitor(0, node); + }, + visitForRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, fromNumber, t4, toNumber, from, to, direction; + var $async$visitForRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = node.from; + t3 = type$.SassNumber; + $async$goto = 3; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(t2, new A._EvaluateVisitor_visitForRule_closure4($async$self, node), t3), $async$visitForRule$1); + case 3: + // returning from await. + fromNumber = $async$result; + t4 = node.to; + $async$goto = 4; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(t4, new A._EvaluateVisitor_visitForRule_closure5($async$self, node), t3), $async$visitForRule$1); + case 4: + // returning from await. + toNumber = $async$result; + from = $async$self._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure6(fromNumber)); + to = t1.to = $async$self._async_evaluate$_addExceptionSpan$2(t4, new A._EvaluateVisitor_visitForRule_closure7(toNumber, fromNumber)); + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = $async$self._async_evaluate$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure8(t1, $async$self, node, from, direction, fromNumber), true, type$.nullable_Value); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForRule$1, $async$completer); + }, + visitForwardRule$1(_, node) { + return this.visitForwardRule$body$_EvaluateVisitor(0, node); + }, + visitForwardRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, newConfiguration, t4, _i, variable, $name, oldConfiguration, adjustedConfiguration, t1, t2, t3; + var $async$visitForwardRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldConfiguration = $async$self._async_evaluate$_configuration; + adjustedConfiguration = oldConfiguration.throughForward$1(node); + t1 = node.configuration; + t2 = t1.length; + t3 = node.url; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_addForwardConfiguration$2(adjustedConfiguration, node), $async$visitForwardRule$1); + case 6: + // returning from await. + newConfiguration = $async$result; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_loadModule$5$configuration(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure1($async$self, node), newConfiguration), $async$visitForwardRule$1); + case 7: + // returning from await. + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + $async$self._async_evaluate$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration$_values, t2 = t1.get$keys(t1), t2 = t2.toList$0(t2), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + $async$self._async_evaluate$_assertConfigurationIsEmpty$1(newConfiguration); + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$self._async_evaluate$_configuration = adjustedConfiguration; + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate$_loadModule$4(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure2($async$self, node)), $async$visitForwardRule$1); + case 8: + // returning from await. + $async$self._async_evaluate$_configuration = oldConfiguration; + case 4: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForwardRule$1, $async$completer); + }, + _async_evaluate$_addForwardConfiguration$2(configuration, node) { + return this._addForwardConfiguration$body$_EvaluateVisitor(configuration, node); + }, + _addForwardConfiguration$body$_EvaluateVisitor(configuration, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Configuration), + $async$returnValue, $async$self = this, t2, t3, t4, t5, _i, variable, t6, _0_0, t7, oldValue, variableNodeWithSpan, t1, newValues, $async$temp1, $async$temp2, $async$temp3; + var $async$_async_evaluate$_addForwardConfiguration$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = configuration._configuration$_values; + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + t2 = node.configuration, t3 = t2.length, t4 = type$._Future_Value, t5 = type$.Future_Value, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + variable = t2[_i]; + if (variable.isGuarded) { + t6 = variable.name; + _0_0 = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t6); + if (_0_0 != null) { + t7 = !_0_0.value.$eq(0, B.C__SassNull); + oldValue = _0_0; + } else { + oldValue = null; + t7 = false; + } + if (t7) { + newValues.$indexSet(0, t6, oldValue); + // goto for update + $async$goto = 4; + break; + } + } + t6 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t6); + t6 = t6.accept$1($async$self); + if (!t5._is(t6)) { + t7 = new A._Future($.Zone__current, t4); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$temp1 = newValues; + $async$temp2 = variable.name; + $async$temp3 = A; + $async$goto = 6; + return A._asyncAwait(t6, $async$_async_evaluate$_addForwardConfiguration$2); + case 6: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue($async$self._async_evaluate$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + if (configuration instanceof A.ExplicitConfiguration || t1.get$isEmpty(t1)) { + $async$returnValue = new A.ExplicitConfiguration(node, newValues, null); + // goto return + $async$goto = 1; + break; + } else { + $async$returnValue = new A.Configuration(newValues, null); + // goto return + $async$goto = 1; + break; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_addForwardConfiguration$2, $async$completer); + }, + _async_evaluate$_registerCommentsForModule$1(module) { + var _this = this, _s5_ = "_root", + t1 = _this._async_evaluate$__root; + if (t1 == null) + return; + if (_this._async_evaluate$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) + return; + t1 = _this._async_evaluate$_preModuleComments; + if (t1 == null) + t1 = _this._async_evaluate$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable, type$.List_CssComment); + J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure0()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).children._collection$_source, type$.CssComment), type$.UnmodifiableListView_CssComment)); + _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__root, _s5_).clearChildren$0(); + _this._async_evaluate$__endOfImports = 0; + }, + _async_evaluate$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration$_values, t2 = t1.get$keys(t1), t2 = t2.toList$0(t2), t3 = t2.length, t4 = downstream._configuration$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, _0_0; + if (!(configuration instanceof A.ExplicitConfiguration)) + return; + t1 = configuration._configuration$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + _0_0 = t1.get$first(t1); + t1 = nameInError ? "$" + _0_0._0 + string$.x20was_n : string$.This_v; + throw A.wrapException(this._async_evaluate$_exception$2(t1, _0_0._1.configurationSpan)); + }, + _async_evaluate$_assertConfigurationIsEmpty$1(configuration) { + return this._async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(_, node) { + return this.visitFunctionRule$body$_EvaluateVisitor(0, node); + }, + visitFunctionRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitFunctionRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate$_inDependency; + t4 = t1._async_environment$_functions; + index = t4.length - 1; + t5 = node.name; + t1._async_environment$_functionIndices.$indexSet(0, t5, index); + t4[index].$indexSet(0, t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionRule$1, $async$completer); + }, + visitIfRule$1(_, node) { + return this.visitIfRule$body$_EvaluateVisitor(0, node); + }, + visitIfRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, _i, clauseToCheck, clause; + var $async$visitIfRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + clause = node.lastClause; + t1 = node.clauses, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + clauseToCheck = t1[_i]; + $async$goto = 6; + return A._asyncAwait(clauseToCheck.expression.accept$1($async$self), $async$visitIfRule$1); + case 6: + // returning from await. + if ($async$result.get$isTruthy()) { + clause = clauseToCheck; + // goto after for + $async$goto = 5; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = A.NullableExtension_andThen(clause, new A._EvaluateVisitor_visitIfRule_closure0($async$self)); + $async$goto = 7; + return A._asyncAwait(type$.Future_nullable_Value._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Value), $async$visitIfRule$1); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfRule$1, $async$completer); + }, + visitImportRule$1(_, node) { + return this.visitImportRule$body$_EvaluateVisitor(0, node); + }, + visitImportRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, _i, $import; + var $async$visitImportRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.imports, t2 = t1.length, t3 = type$.StaticImport, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $import = t1[_i]; + $async$goto = $import instanceof A.DynamicImport ? 6 : 8; + break; + case 6: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_visitDynamicImport$1($import), $async$visitImportRule$1); + case 9: + // returning from await. + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = 10; + return A._asyncAwait($async$self._visitStaticImport$1(t3._as($import)), $async$visitImportRule$1); + case 10: + // returning from await. + case 7: + // join + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitImportRule$1, $async$completer); + }, + _async_evaluate$_visitDynamicImport$1($import) { + return this._async_evaluate$_withStackFrame$1$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure0(this, $import), type$.void); + }, + _async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + return this._loadStylesheet$body$_EvaluateVisitor(url, span, baseUrl, forImport); + }, + _async_evaluate$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _async_evaluate$_loadStylesheet$3$forImport(url, span, forImport) { + return this._async_evaluate$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _loadStylesheet$body$_EvaluateVisitor(url, span, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, error, stackTrace, error0, stackTrace0, t1, t2, exception, $async$exception; + var $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + baseUrl = baseUrl; + $async$handler = 4; + $async$self._async_evaluate$_importSpan = span; + _0_0 = $async$self._async_evaluate$_importCache; + importCache = null; + $async$goto = _0_0 != null ? 7 : 8; + break; + case 7: + // then + importCache = _0_0; + if (baseUrl == null) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").span; + baseUrl = t1.get$sourceUrl(t1); + } + $async$goto = 9; + return A._asyncAwait(J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), $async$self._async_evaluate$_importer, baseUrl, forImport), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); + case 9: + // returning from await. + _1_0 = $async$result; + importer = null; + canonicalUrl = null; + originalUrl = null; + $async$goto = type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0) ? 10 : 11; + break; + case 10: + // then + importer = _1_0._0; + canonicalUrl = _1_0._1; + originalUrl = _1_0._2; + if (canonicalUrl.get$scheme() === "") + A.WarnForDeprecation_warnForDeprecation($async$self._async_evaluate$_logger, B.Deprecation_IqB, "Importer " + A.S(importer) + " canonicalized " + url + " to " + A.S(canonicalUrl) + string$.x2e_Rela, null, null); + $async$self._async_evaluate$_loadedUrls.add$1(0, canonicalUrl); + isDependency = $async$self._async_evaluate$_inDependency || !J.$eq$(importer, $async$self._async_evaluate$_importer); + $async$goto = 12; + return A._asyncAwait(importCache.importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl), $async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport); + case 12: + // returning from await. + _2_0 = $async$result; + stylesheet = null; + if (_2_0 != null) { + stylesheet = _2_0; + t1 = stylesheet; + t2 = importer; + $async$returnValue = new A._Record_3_importer_isDependency(t1, t2, isDependency); + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 11: + // join + case 8: + // join + t1 = B.JSString_methods.startsWith$1(url, "package:"); + if (t1) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) + throw $async$exception; + else if (t1 instanceof A.ArgumentError) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace($async$self._async_evaluate$_exception$1(J.toString$0$(error)), error, stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + A.throwWithTrace($async$self._async_evaluate$_exception$1($async$self._async_evaluate$_getErrorMessage$1(error0)), error0, stackTrace0); + } + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 3: + // uncaught + $async$next = [2]; + case 5: + // finally + $async$handler = 2; + $async$self._async_evaluate$_importSpan = null; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_loadStylesheet$4$baseUrl$forImport, $async$completer); + }, + _visitStaticImport$1($import) { + return this._visitStaticImport$body$_EvaluateVisitor($import); + }, + _visitStaticImport$body$_EvaluateVisitor($import) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, node, $async$temp1, $async$temp2; + var $async$_visitStaticImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_interpolationToValue$1($import.url), $async$_visitStaticImport$1); + case 2: + // returning from await. + t1 = $async$result; + t2 = A.NullableExtension_andThen($import.modifiers, $async$self.get$_async_evaluate$_interpolationToValue()); + $async$temp1 = A; + $async$temp2 = t1; + $async$goto = 3; + return A._asyncAwait(type$.Future_nullable_CssValue_String._is(t2) ? t2 : A._Future$value(t2, type$.nullable_CssValue_String), $async$_visitStaticImport$1); + case 3: + // returning from await. + node = new $async$temp1.ModifiableCssImport($async$temp2, $async$result, $import.span); + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root")) { + $async$self._async_evaluate$_copyParentAfterSibling$0(); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(node); + } else if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").addChild$1(node); + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(node); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_visitStaticImport$1, $async$completer); + }, + _async_evaluate$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + return this._applyMixin$body$_EvaluateVisitor(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent); + }, + _applyMixin$body$_EvaluateVisitor(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, _0_0, t2, _1_8, t3; + var $async$_async_evaluate$_applyMixin$5 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (mixin == null) + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); + t1 = type$.AsyncBuiltInCallable._is(mixin); + $async$goto = t1 && !mixin.get$acceptsContent() && contentCallable != null ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_applyMixin$5); + case 5: + // returning from await. + t1 = $async$result._values; + _0_0 = mixin.callbackFor$2(J.get$length$asx(t1[2]), new A.MapKeySet(t1[0], type$.MapKeySet_String)); + throw A.wrapException(A.MultiSpanSassRuntimeException$("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + case 4: + // join + $async$goto = t1 ? 6 : 7; + break; + case 6: + // then + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure1($async$self, $arguments, mixin, nodeWithSpanWithoutContent)), $async$_async_evaluate$_applyMixin$5); + case 8: + // returning from await. + // goto break $label0$0 + $async$goto = 2; + break; + case 7: + // join + t1 = type$.UserDefinedCallable_AsyncEnvironment._is(mixin); + t2 = false; + if (t1) { + _1_8 = mixin.declaration; + t3 = _1_8; + if (t3 instanceof A.MixinRule) + t2 = !type$.MixinRule._as(_1_8).get$hasContent() && contentCallable != null; + } + if (t2) + throw A.wrapException(A.MultiSpanSassRuntimeException$("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.parameters.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + $async$goto = t1 ? 9 : 10; + break; + case 9: + // then + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure2($async$self, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null), $async$_async_evaluate$_applyMixin$5); + case 11: + // returning from await. + // goto break $label0$0 + $async$goto = 2; + break; + case 10: + // join + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + case 2: + // break $label0$0 + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_applyMixin$5, $async$completer); + }, + visitIncludeRule$1(_, node) { + return this.visitIncludeRule$body$_EvaluateVisitor(0, node); + }, + visitIncludeRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, mixin; + var $async$visitIncludeRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + mixin = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure2($async$self, node)); + if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Sass__m, node.get$nameSpan())); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_applyMixin$5(mixin, A.NullableExtension_andThen(node.content, new A._EvaluateVisitor_visitIncludeRule_closure3($async$self)), node.$arguments, node, new A._FakeAstNode(new A._EvaluateVisitor_visitIncludeRule_closure4(node))), $async$visitIncludeRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIncludeRule$1, $async$completer); + }, + visitMixinRule$1(_, node) { + return this.visitMixinRule$body$_EvaluateVisitor(0, node); + }, + visitMixinRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitMixinRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate$_inDependency; + t4 = t1._async_environment$_mixins; + index = t4.length - 1; + t5 = node.name; + t1._async_environment$_mixinIndices.$indexSet(0, t5, index); + t4[index].$indexSet(0, t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMixinRule$1, $async$completer); + }, + visitLoudComment$1(_, node) { + return this.visitLoudComment$body$_EvaluateVisitor(0, node); + }, + visitLoudComment$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, text; + var $async$visitLoudComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_inFunction) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root") && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + t1 = node.text; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(t1), $async$visitLoudComment$1); + case 3: + // returning from await. + text = $async$result; + if (!B.JSString_methods.endsWith$1(text, "*/")) + text += " */"; + $async$self._async_evaluate$_copyParentAfterSibling$0(); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(new A.ModifiableCssComment(text, t1.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitLoudComment$1, $async$completer); + }, + visitMediaRule$1(_, node) { + return this.visitMediaRule$body$_EvaluateVisitor(0, node); + }, + visitMediaRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, queries, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Media_, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._visitMediaQueries$1(node.query), $async$visitMediaRule$1); + case 3: + // returning from await. + queries = $async$result; + $async$goto = $async$self.get$_async_evaluate$_hasCssNesting() ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssMediaRule$(queries, node.span), new A._EvaluateVisitor_visitMediaRule_closure3($async$self, node), false, type$.ModifiableCssMediaRule, type$.Null), $async$visitMediaRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + mergedQueries = A.NullableExtension_andThen($async$self._async_evaluate$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure4($async$self, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty2; + else { + t2 = $async$self._async_evaluate$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = $async$self._async_evaluate$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure5($async$self, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure6(mergedSources), type$.ModifiableCssMediaRule, type$.Null), $async$visitMediaRule$1); + case 7: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMediaRule$1, $async$completer); + }, + _visitMediaQueries$1(interpolation) { + return this._visitMediaQueries$body$_EvaluateVisitor(interpolation); + }, + _visitMediaQueries$body$_EvaluateVisitor(interpolation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.List_CssMediaQuery), + $async$returnValue, $async$self = this, _0_0, resolved, map; + var $async$_visitMediaQueries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(interpolation, true), $async$_visitMediaQueries$1); + case 3: + // returning from await. + _0_0 = $async$result; + resolved = _0_0._0; + map = _0_0._1; + $async$returnValue = new A.MediaQueryParser(A.SpanScanner$(resolved, null), map).parse$0(0); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_visitMediaQueries$1, $async$completer); + }, + _async_evaluate$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, _0_0, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { + t3 = t1.get$current(t1); + for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) { + _0_0 = t3.merge$1(t4.get$current(t4)); + if (B._SingletonCssMediaQueryMergeResult_0 === _0_0) + continue; + if (B._SingletonCssMediaQueryMergeResult_1 === _0_0) + return null; + t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult; + result = t5 ? _0_0 : null; + if (t5) + queries.push(result.query); + } + } + return queries; + }, + visitReturnRule$1(_, node) { + return this.visitReturnRule$body$_EvaluateVisitor(0, node); + }, + visitReturnRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1, t2; + var $async$visitReturnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.expression; + t2 = t1.accept$1($async$self); + $async$goto = 3; + return A._asyncAwait(type$.Future_Value._is(t2) ? t2 : A._Future$value(t2, type$.Value), $async$visitReturnRule$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitReturnRule$1, $async$completer); + }, + visitSilentComment$1(_, node) { + return this.visitSilentComment$body$_EvaluateVisitor(0, node); + }, + visitSilentComment$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue; + var $async$visitSilentComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSilentComment$1, $async$completer); + }, + visitStyleRule$1(_, node) { + return this.visitStyleRule$body$_EvaluateVisitor(0, node); + }, + visitStyleRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, _0_0, selectorText, selectorMap, parsedSelector, _1_0, t2, t3, _i, _2_0, first, t4, rule, oldAtRootExcludingStyleRule; + var $async$visitStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_n, node.span)); + else if ($async$self._async_evaluate$_inKeyframes && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_k, node.span)); + t1 = node.selector; + t1.toString; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationWithMap$2$warnForColor(t1, true), $async$visitStyleRule$1); + case 3: + // returning from await. + _0_0 = $async$result; + selectorText = _0_0._0; + selectorMap = _0_0._1; + $async$goto = $async$self._async_evaluate$_inKeyframes ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(new A.CssValue(A.List_List$unmodifiable(new A.KeyframeSelectorParser(A.SpanScanner$(selectorText, null), selectorMap).parse$0(0), type$.String), t1.span, type$.CssValue_List_String), node.span), new A._EvaluateVisitor_visitStyleRule_closure3($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure4(), type$.ModifiableCssKeyframeBlock, type$.Null), $async$visitStyleRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + parsedSelector = A.SelectorList_SelectorList$parse(selectorText, true, selectorMap, $async$self._async_evaluate$_logger, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss); + _1_0 = $async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + $label0$0: { + if (_1_0 == null) { + t1 = true; + break $label0$0; + } + if (_1_0.fromPlainCss) { + t1 = false; + break $label0$0; + } + t1 = !($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss && parsedSelector.accept$1(B.C__ContainsParentSelectorVisitor)); + break $label0$0; + } + if (t1) { + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss) + for (t2 = parsedSelector.components, t3 = t2.length, _i = 0; _i < t3; ++_i) { + _2_0 = t2[_i].leadingCombinators; + if (_2_0.length >= 1) { + first = _2_0[0]; + t4 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss; + } else { + first = null; + t4 = false; + } + if (t4) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Top_le, first.span)); + } + t2 = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t2 = t2 == null ? null : t2.originalSelector; + parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t2, !$async$self._async_evaluate$_atRootExcludingStyleRule, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss); + } + rule = A.ModifiableCssStyleRule$($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, $async$self._async_evaluate$_mediaQueries), node.span, $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss, parsedSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate$_atRootExcludingStyleRule; + t2 = $async$self._async_evaluate$_atRootExcludingStyleRule = false; + t1 = t1 ? new A._EvaluateVisitor_visitStyleRule_closure5() : null; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure6($async$self, rule, node), node.hasDeclarations, t1, type$.ModifiableCssStyleRule, type$.Null), $async$visitStyleRule$1); + case 7: + // returning from await. + $async$self._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + $async$self._async_evaluate$_warnForBogusCombinators$1(rule); + if (($async$self._async_evaluate$_atRootExcludingStyleRule ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot) == null) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = t2; + if (t1) { + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children; + t1.get$last(t1).isGroupEnd = true; + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStyleRule$1, $async$completer); + }, + _async_evaluate$_warnForBogusCombinators$1(rule) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false)) + for (t1 = rule._style_rule$_selector._box$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor)) { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._async_evaluate$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight(complex.span), B.Deprecation_0rM); + } else if (complex.leadingCombinators.length !== 0) { + if (!_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss) { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._async_evaluate$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight(complex.span), B.Deprecation_0rM); + } + } else { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t7 = complex.accept$1(B._IsBogusVisitor_false) ? string$.x20It_wi : ""; + t8 = A.SpanExtensions_trimRight(complex.span); + if (t5.get$length(0) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$x(t5.$index(0, 0)); + _this._async_evaluate$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure0()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_0rM); + } + } + }, + visitSupportsRule$1(_, node) { + return this.visitSupportsRule$body$_EvaluateVisitor(0, node); + }, + visitSupportsRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, rule, $async$temp1, $async$temp2; + var $async$visitSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + $async$temp1 = A; + $async$temp2 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(t1), $async$visitSupportsRule$1); + case 3: + // returning from await. + rule = $async$temp1.ModifiableCssSupportsRule$(new $async$temp2.CssValue($async$result, t1.get$span(t1), type$.CssValue_String), node.span); + $async$goto = $async$self.get$_async_evaluate$_hasCssNesting() ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitSupportsRule_closure2($async$self, node), node.hasDeclarations, type$.ModifiableCssSupportsRule, type$.Null), $async$visitSupportsRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitSupportsRule_closure3($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure4(), type$.ModifiableCssSupportsRule, type$.Null), $async$visitSupportsRule$1); + case 7: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsRule$1, $async$completer); + }, + _async_evaluate$_visitSupportsCondition$1(condition) { + return this._visitSupportsCondition$body$_EvaluateVisitor(condition); + }, + _visitSupportsCondition$body$_EvaluateVisitor(condition) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; + var $async$_async_evaluate$_visitSupportsCondition$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = condition instanceof A.SupportsOperation ? 4 : 5; + break; + case 4: + // then + t1 = condition.operator; + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$2(condition.left, t1), $async$_async_evaluate$_visitSupportsCondition$1); + case 6: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + " " + t1.toString$0(0) + " "; + $async$temp2 = A; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$2(condition.right, t1), $async$_async_evaluate$_visitSupportsCondition$1); + case 7: + // returning from await. + t1 = $async$temp1 + $async$temp2.S($async$result); + // goto break $label0$0 + $async$goto = 3; + break; + case 5: + // join + $async$goto = condition instanceof A.SupportsNegation ? 8 : 9; + break; + case 8: + // then + $async$temp1 = A; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_parenthesize$1(condition.condition), $async$_async_evaluate$_visitSupportsCondition$1); + case 10: + // returning from await. + t1 = "not " + $async$temp1.S($async$result); + // goto break $label0$0 + $async$goto = 3; + break; + case 9: + // join + $async$goto = condition instanceof A.SupportsInterpolation ? 11 : 12; + break; + case 11: + // then + $async$goto = 13; + return A._asyncAwait($async$self._evaluateToCss$2$quote(condition.expression, false), $async$_async_evaluate$_visitSupportsCondition$1); + case 13: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 12: + // join + t1 = {}; + t1.declaration = null; + $async$goto = condition instanceof A.SupportsDeclaration ? 14 : 15; + break; + case 14: + // then + t1.declaration = condition; + $async$goto = 16; + return A._asyncAwait($async$self._async_evaluate$_withSupportsDeclaration$1$1(new A._EvaluateVisitor__visitSupportsCondition_closure0(t1, $async$self), type$.String), $async$_async_evaluate$_visitSupportsCondition$1); + case 16: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 15: + // join + $async$goto = condition instanceof A.SupportsFunction ? 17 : 18; + break; + case 17: + // then + $async$temp1 = A; + $async$goto = 19; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.name), $async$_async_evaluate$_visitSupportsCondition$1); + case 19: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + "("; + $async$temp2 = A; + $async$goto = 20; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.$arguments), $async$_async_evaluate$_visitSupportsCondition$1); + case 20: + // returning from await. + t1 = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto break $label0$0 + $async$goto = 3; + break; + case 18: + // join + $async$goto = condition instanceof A.SupportsAnything ? 21 : 22; + break; + case 21: + // then + $async$temp1 = A; + $async$goto = 23; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(condition.contents), $async$_async_evaluate$_visitSupportsCondition$1); + case 23: + // returning from await. + t1 = "(" + $async$temp1.S($async$result) + ")"; + // goto break $label0$0 + $async$goto = 3; + break; + case 22: + // join + t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); + case 3: + // break $label0$0 + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitSupportsCondition$1, $async$completer); + }, + _async_evaluate$_withSupportsDeclaration$1$1(callback, $T) { + return this._withSupportsDeclaration$body$_EvaluateVisitor(callback, $T, $T); + }, + _withSupportsDeclaration$body$_EvaluateVisitor(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, t1, oldInSupportsDeclaration; + var $async$_async_evaluate$_withSupportsDeclaration$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = true; + $async$handler = 3; + t1 = callback.call$0(); + $async$goto = 6; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate$_withSupportsDeclaration$1$1); + case 6: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [2]; + case 4: + // finally + $async$handler = 2; + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withSupportsDeclaration$1$1, $async$completer); + }, + _async_evaluate$_parenthesize$2(condition, operator) { + return this._parenthesize$body$_EvaluateVisitor(condition, operator); + }, + _async_evaluate$_parenthesize$1(condition) { + return this._async_evaluate$_parenthesize$2(condition, null); + }, + _parenthesize$body$_EvaluateVisitor(condition, operator) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, $async$temp1; + var $async$_async_evaluate$_parenthesize$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (!(condition instanceof A.SupportsNegation)) + if (condition instanceof A.SupportsOperation) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + $async$goto = t1 ? 3 : 4; + break; + case 3: + // then + $async$temp1 = A; + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(condition), $async$_async_evaluate$_parenthesize$2); + case 5: + // returning from await. + $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(condition), $async$_async_evaluate$_parenthesize$2); + case 6: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_parenthesize$2, $async$completer); + }, + visitVariableDeclaration$1(_, node) { + return this.visitVariableDeclaration$body$_EvaluateVisitor(0, node); + }, + visitVariableDeclaration$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, _0_0, value, $async$temp1, $async$temp2, $async$temp3; + var $async$visitVariableDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (node.isGuarded) { + if (node.namespace == null && $async$self._async_evaluate$_environment._async_environment$_variables.length === 1) { + t1 = node.name; + $async$self._async_evaluate$_environment._async_environment$_configurableVariables.add$1(0, t1); + t2 = $async$self._async_evaluate$_configuration._configuration$_values; + _0_0 = t2.get$isEmpty(t2) ? null : t2.remove$1(0, t1); + t1 = {}; + t1.override = null; + if (_0_0 != null) { + t1.override = _0_0; + t2 = !_0_0.value.$eq(0, B.C__SassNull); + } else + t2 = false; + if (t2) { + $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure2(t1, $async$self, node)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + value = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure3($async$self, node)); + if (value != null && !value.$eq(0, B.C__SassNull)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + if (node.isGlobal && !$async$self._async_evaluate$_environment.globalVariableExists$1(node.name)) { + t1 = $async$self._async_evaluate$_environment._async_environment$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName(node.span) + ": null` at the stylesheet root."; + $async$self._async_evaluate$_warn$3(t1, node.span, B.Deprecation_jGw); + } + t1 = node.expression; + t2 = t1.accept$1($async$self); + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(type$.Future_Value._is(t2) ? t2 : A._Future$value(t2, type$.Value), $async$visitVariableDeclaration$1); + case 3: + // returning from await. + $async$self._async_evaluate$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitVariableDeclaration_closure4($async$self, $async$temp3, $async$self._async_evaluate$_withoutSlash$2($async$result, t1))); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableDeclaration$1, $async$completer); + }, + visitUseRule$1(_, node) { + return this.visitUseRule$body$_EvaluateVisitor(0, node); + }, + visitUseRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, values, t3, t4, _i, variable, t5, variableNodeWithSpan, t6, configuration, t1, t2, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUseRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.configuration; + t2 = t1.length; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + t3 = type$._Future_Value, t4 = type$.Future_Value, _i = 0; + case 6: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 8; + break; + } + variable = t1[_i]; + t5 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate$_expressionNode$1(t5); + t5 = t5.accept$1($async$self); + if (!t4._is(t5)) { + t6 = new A._Future($.Zone__current, t3); + t6._state = 8; + t6._resultOrListeners = t5; + t5 = t6; + } + $async$temp1 = values; + $async$temp2 = variable.name; + $async$temp3 = A; + $async$goto = 9; + return A._asyncAwait(t5, $async$visitUseRule$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue($async$self._async_evaluate$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + configuration = new A.ExplicitConfiguration(node, values, null); + // goto join + $async$goto = 4; + break; + case 5: + // else + configuration = B.Configuration_Map_empty_null; + case 4: + // join + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure0($async$self, node), configuration), $async$visitUseRule$1); + case 10: + // returning from await. + $async$self._async_evaluate$_assertConfigurationIsEmpty$1(configuration); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUseRule$1, $async$completer); + }, + visitWarnRule$1(_, node) { + return this.visitWarnRule$body$_EvaluateVisitor(0, node); + }, + visitWarnRule$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, value, t1, t2; + var $async$visitWarnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitWarnRule_closure0($async$self, node), type$.Value), $async$visitWarnRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString ? value._string$_text : $async$self._async_evaluate$_serialize$2(value, node.expression); + t2 = $async$self._async_evaluate$_stackTrace$1(node.span); + $async$self._async_evaluate$_logger.internalWarn$4$deprecation$span$trace(t1, null, null, t2); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitWarnRule$1, $async$completer); + }, + visitWhileRule$1(_, node) { + return this._async_evaluate$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure0(this, node), true, node.hasDeclarations, type$.nullable_Value); + }, + visitBinaryOperationExpression$1(_, node) { + var t1, _this = this; + if (_this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss) { + t1 = node.operator; + t1 = t1 !== B.BinaryOperator_g6F && t1 !== B.BinaryOperator_ehp; + } else + t1 = false; + if (t1) + throw A.wrapException(_this._async_evaluate$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); + return _this._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure0(_this, node), type$.Value); + }, + _async_evaluate$_slash$3(left, right, node) { + var left0, _1_2, + result = left.dividedBy$1(right), + _1_2_isSet = left instanceof A.SassNumber, + right0 = null, + t1 = false; + if (_1_2_isSet) { + if (right instanceof A.SassNumber) { + t1 = node.allowsSlash && this._async_evaluate$_operandAllowsSlash$1(node.left) && this._async_evaluate$_operandAllowsSlash$1(node.right); + right0 = right; + } + left0 = left; + _1_2 = right; + } else { + _1_2 = null; + left0 = null; + } + if (t1) + return type$.SassNumber._as(result).withSlash$2(left0, right0); + if (left instanceof A.SassNumber) + t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber; + else + t1 = false; + if (t1) { + this._async_evaluate$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation0().call$1(node)) + " or " + A.expressionToCalc(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_qZ1); + return result; + } + return result; + }, + _async_evaluate$_operandAllowsSlash$1(node) { + var t1; + if (node instanceof A.FunctionExpression) + if (node.namespace == null) { + t1 = node.name; + t1 = B.Set_Pr3yj.contains$1(0, t1.toLowerCase()) && this._async_evaluate$_environment.getFunction$1(t1) == null; + } else + t1 = false; + else + t1 = true; + return t1; + }, + visitValueExpression$1(_, node) { + return this.visitValueExpression$body$_EvaluateVisitor(0, node); + }, + visitValueExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue; + var $async$visitValueExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitValueExpression$1, $async$completer); + }, + visitVariableExpression$1(_, node) { + return this.visitVariableExpression$body$_EvaluateVisitor(0, node); + }, + visitVariableExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, result; + var $async$visitVariableExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure0($async$self, node)); + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined variable.", node.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableExpression$1, $async$completer); + }, + visitUnaryOperationExpression$1(_, node) { + return this.visitUnaryOperationExpression$body$_EvaluateVisitor(0, node); + }, + visitUnaryOperationExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUnaryOperationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(node.operand.accept$1($async$self), $async$visitUnaryOperationExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitUnaryOperationExpression_closure0($async$temp3, $async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUnaryOperationExpression$1, $async$completer); + }, + visitBooleanExpression$1(_, node) { + return this.visitBooleanExpression$body$_EvaluateVisitor(0, node); + }, + visitBooleanExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassBoolean), + $async$returnValue; + var $async$visitBooleanExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value ? B.SassBoolean_true : B.SassBoolean_false; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitBooleanExpression$1, $async$completer); + }, + visitIfExpression$1(_, node) { + return this.visitIfExpression$body$_EvaluateVisitor(0, node); + }, + visitIfExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, results, _i, t7, condition, expression, t8, result, _1_2, $async$temp1, $async$temp2, $async$temp3; + var $async$visitIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.branches, t2 = t1.length, t3 = type$._Future_nullable_Object, t4 = type$._Future_Value, t5 = type$.Future_Value, t6 = type$.JSArray_Record_2_String_and_Value, results = null, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + t7 = t1[_i]; + condition = t7._0; + expression = t7._1; + t7 = condition == null ? null : condition.accept$1($async$self); + if (!(t7 instanceof A._Future)) { + t8 = new A._Future($.Zone__current, t3); + t8._state = 8; + t8._resultOrListeners = t7; + t7 = t8; + } + $async$goto = 6; + return A._asyncAwait(t7, $async$visitIfExpression$1); + case 6: + // returning from await. + result = $async$result; + if (result == null) + result = true; + t7 = typeof result == "string"; + condition = t7 ? result : null; + $async$goto = t7 ? 7 : 8; + break; + case 7: + // then + if (results == null) + results = A._setArrayType([], t6); + t7 = expression.accept$1($async$self); + if (!t5._is(t7)) { + t8 = new A._Future($.Zone__current, t4); + t8._state = 8; + t8._resultOrListeners = t7; + t7 = t8; + } + $async$temp1 = results; + $async$temp2 = A; + $async$temp3 = condition; + $async$goto = 9; + return A._asyncAwait(t7, $async$visitIfExpression$1); + case 9: + // returning from await. + $async$temp1.push(new $async$temp2._Record_2($async$temp3, $async$result)); + // goto for update + $async$goto = 4; + break; + case 8: + // join + _1_2 = true === result; + $async$goto = _1_2 && results != null ? 10 : 11; + break; + case 10: + // then + t7 = expression.accept$1($async$self); + if (!t5._is(t7)) { + t8 = new A._Future($.Zone__current, t4); + t8._state = 8; + t8._resultOrListeners = t7; + t7 = t8; + } + $async$temp1 = results; + $async$temp2 = A; + $async$goto = 12; + return A._asyncAwait(t7, $async$visitIfExpression$1); + case 12: + // returning from await. + $async$temp1.push(new $async$temp2._Record_2("else", $async$result)); + // goto for update + $async$goto = 4; + break; + case 11: + // join + $async$goto = _1_2 ? 13 : 14; + break; + case 13: + // then + t1 = expression.accept$1($async$self); + if (!t5._is(t1)) { + t2 = new A._Future($.Zone__current, t4); + t2._state = 8; + t2._resultOrListeners = t1; + t1 = t2; + } + $async$goto = 15; + return A._asyncAwait(t1, $async$visitIfExpression$1); + case 15: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 14: + // join + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + if (results == null) { + $async$returnValue = B.C__SassNull; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = new A.SassString("if(" + new A.MappedListIterable(results, new A._EvaluateVisitor_visitIfExpression_closure0(), A._arrayInstanceType(results)._eval$1("MappedListIterable<1,String>")).join$1(0, "; ") + ")", false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfExpression$1, $async$completer); + }, + visitIfConditionParenthesized$1(_, node) { + return this.visitIfConditionParenthesized$body$_EvaluateVisitor(0, node); + }, + visitIfConditionParenthesized$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, _0_0; + var $async$visitIfConditionParenthesized$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitIfConditionParenthesized$1); + case 3: + // returning from await. + _0_0 = $async$result; + $label0$0: { + if (typeof _0_0 == "string") { + t1 = "(" + _0_0 + ")"; + break $label0$0; + } + t1 = _0_0; + break $label0$0; + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionParenthesized$1, $async$completer); + }, + visitIfConditionNegation$1(_, node) { + return this.visitIfConditionNegation$body$_EvaluateVisitor(0, node); + }, + visitIfConditionNegation$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, _0_0; + var $async$visitIfConditionNegation$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitIfConditionNegation$1); + case 3: + // returning from await. + _0_0 = $async$result; + $label0$0: { + if (typeof _0_0 == "string") { + t1 = "not " + _0_0; + break $label0$0; + } + if (A._isBool(_0_0)) { + t1 = !_0_0; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("unreachable")); + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionNegation$1, $async$completer); + }, + visitIfConditionOperation$1(_, node) { + return this.visitIfConditionOperation$body$_EvaluateVisitor(0, node); + }, + visitIfConditionOperation$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, values, _i, expression, _0_0, t7, right, _1_6_isSet, _1_6, string; + var $async$visitIfConditionOperation$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.expressions, t2 = t1.length, t3 = node.op, t4 = t3 === B.BooleanOperator_0, t5 = t3 === B.BooleanOperator_1, t6 = type$.JSArray_Record_2_IfConditionExpression_and_String, values = null, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + expression = t1[_i]; + $async$goto = 6; + return A._asyncAwait(expression.accept$1($async$self), $async$visitIfConditionOperation$1); + case 6: + // returning from await. + _0_0 = $async$result; + t7 = typeof _0_0 == "string"; + right = t7 ? _0_0 : null; + if (t7) { + if (values == null) + values = A._setArrayType([], t6); + values.push(new A._Record_2(expression, right)); + // goto for update + $async$goto = 4; + break; + } + if (false === _0_0 && t4) { + $async$returnValue = false; + // goto return + $async$goto = 1; + break; + } + if (true === _0_0 && t5) { + $async$returnValue = true; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $label0$1: { + if (values == null) { + t1 = t4; + break $label0$1; + } + _1_6_isSet = values.length === 1; + if (_1_6_isSet) { + _1_6 = values[0]; + t1 = _1_6._0 instanceof A.IfConditionParenthesized; + } else { + _1_6 = null; + t1 = false; + } + if (t1) { + string = (_1_6_isSet ? _1_6 : values[0])._1; + t1 = B.JSString_methods.substring$2(string, 1, string.length - 1); + break $label0$1; + } + t1 = new A.MappedListIterable(values, new A._EvaluateVisitor_visitIfConditionOperation_closure0(), A._arrayInstanceType(values)._eval$1("MappedListIterable<1,String>")).join$1(0, " " + t3.toString$0(0) + " "); + break $label0$1; + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionOperation$1, $async$completer); + }, + visitIfConditionFunction$1(_, node) { + return this.visitIfConditionFunction$body$_EvaluateVisitor(0, node); + }, + visitIfConditionFunction$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2; + var $async$visitIfConditionFunction$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = B.JSString_methods; + $async$temp2 = J; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(node.name), $async$visitIfConditionFunction$1); + case 3: + // returning from await. + $async$temp2 = $async$temp2.$add$ansx($async$result, "("); + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(node.$arguments), $async$visitIfConditionFunction$1); + case 4: + // returning from await. + $async$returnValue = $async$temp1.$add($async$temp2, $async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionFunction$1, $async$completer); + }, + visitIfConditionSass$1(_, node) { + return this.visitIfConditionSass$body$_EvaluateVisitor(0, node); + }, + visitIfConditionSass$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this; + var $async$visitIfConditionSass$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitIfConditionSass$1); + case 3: + // returning from await. + $async$returnValue = $async$result.get$isTruthy(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionSass$1, $async$completer); + }, + visitIfConditionRaw$1(_, node) { + return this.visitIfConditionRaw$body$_EvaluateVisitor(0, node); + }, + visitIfConditionRaw$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this; + var $async$visitIfConditionRaw$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(node.text), $async$visitIfConditionRaw$1); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionRaw$1, $async$completer); + }, + visitLegacyIfExpression$1(_, node) { + return this.visitLegacyIfExpression$body$_EvaluateVisitor(0, node); + }, + visitLegacyIfExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, condition, t1, ifTrue, ifFalse, result, _0_0, positional, named; + var $async$visitLegacyIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateMacroArguments$1(node), $async$visitLegacyIfExpression$1); + case 3: + // returning from await. + _0_0 = $async$result; + positional = _0_0._0; + named = _0_0._1; + $async$self._async_evaluate$_verifyArguments$4(J.get$length$asx(positional), named, $.$get$LegacyIfExpression_declaration(), node); + condition = A.ListExtensions_elementAtOrNull(positional, 0); + if (condition == null) { + t1 = named.$index(0, "condition"); + t1.toString; + condition = t1; + } + ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); + if (ifTrue == null) { + t1 = named.$index(0, "if-true"); + t1.toString; + ifTrue = t1; + } + ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); + if (ifFalse == null) { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + $async$goto = 4; + return A._asyncAwait(condition.accept$1($async$self), $async$visitLegacyIfExpression$1); + case 4: + // returning from await. + result = $async$result.get$isTruthy() ? ifTrue : ifFalse; + t1 = result.accept$1($async$self); + $async$goto = 5; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$visitLegacyIfExpression$1); + case 5: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, $async$self._async_evaluate$_expressionNode$1(result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitLegacyIfExpression$1, $async$completer); + }, + visitNullExpression$1(_, node) { + return this.visitNullExpression$body$_EvaluateVisitor(0, node); + }, + visitNullExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue; + var $async$visitNullExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = B.C__SassNull; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNullExpression$1, $async$completer); + }, + visitNumberExpression$1(_, node) { + return this.visitNumberExpression$body$_EvaluateVisitor(0, node); + }, + visitNumberExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue; + var $async$visitNumberExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = A.SassNumber_SassNumber(node.value, node.unit); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNumberExpression$1, $async$completer); + }, + visitParenthesizedExpression$1(_, node) { + var _this = this; + return _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._async_evaluate$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); + }, + visitColorExpression$1(_, node) { + return this.visitColorExpression$body$_EvaluateVisitor(0, node); + }, + visitColorExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassColor), + $async$returnValue; + var $async$visitColorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitColorExpression$1, $async$completer); + }, + visitListExpression$1(_, node) { + return this.visitListExpression$body$_EvaluateVisitor(0, node); + }, + visitListExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassList), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitListExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A.mapAsync(node.contents, new A._EvaluateVisitor_visitListExpression_closure0($async$self), type$.Expression, type$.Value), $async$visitListExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$temp1.SassList$($async$result, node.separator, node.hasBrackets); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitListExpression$1, $async$completer); + }, + visitMapExpression$1(_, node) { + return this.visitMapExpression$body$_EvaluateVisitor(0, node); + }, + visitMapExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassMap), + $async$returnValue, $async$self = this, t2, t3, _i, t4, key, keyValue, valueValue, oldValueSpan, t1, map, keyNodes; + var $async$visitMapExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Value; + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode); + t2 = node.pairs, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + t4 = t2[_i]; + key = t4._0; + $async$goto = 6; + return A._asyncAwait(key.accept$1($async$self), $async$visitMapExpression$1); + case 6: + // returning from await. + keyValue = $async$result; + $async$goto = 7; + return A._asyncAwait(t4._1.accept$1($async$self), $async$visitMapExpression$1); + case 7: + // returning from await. + valueValue = $async$result; + if (map.containsKey$1(keyValue)) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = key.get$span(key); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t2.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("Duplicate key.", t1, "second key", t2, $async$self._async_evaluate$_stackTrace$1(key.get$span(key)), null)); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, key); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = new A.SassMap(A.ConstantMap_ConstantMap$from(map, t1, t1)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMapExpression$1, $async$completer); + }, + visitFunctionExpression$1(_, node) { + return this.visitFunctionExpression$body$_EvaluateVisitor(0, node); + }, + visitFunctionExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t2, _0_0, t3, t4, $name, oldInFunction, result, t1, $function; + var $async$visitFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + $function = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure2($async$self, node)); + t1.$function = $function; + $async$goto = $function == null || B.JSString_methods.startsWith$1(node.originalName, "--") ? 3 : 4; + break; + case 3: + // then + if (node.namespace != null) + throw A.wrapException($async$self._async_evaluate$_exception$2("Undefined function.", node.span)); + t2 = node.name; + _0_0 = t2.toLowerCase(); + t3 = false; + if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { + t3 = node.$arguments; + t4 = t3.named; + t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure3()); + $name = _0_0; + } else + $name = null; + $async$goto = t3 ? 5 : 6; + break; + case 5: + // then + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate$_visitCalculation$2$inLegacySassFunction(node, $name), $async$visitFunctionExpression$1); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 6: + // join + $async$goto = "calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0 || "calc-size" === _0_0 ? 8 : 9; + break; + case 8: + // then + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_visitCalculation$1(node), $async$visitFunctionExpression$1); + case 10: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 9: + // join + $function = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate$_builtInFunctions.$index(0, t2); + t1.$function = $function == null ? new A.PlainCssCallable(node.originalName) : $function; + case 4: + // join + oldInFunction = $async$self._async_evaluate$_inFunction; + $async$self._async_evaluate$_inFunction = true; + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure4(t1, $async$self, node), type$.Value), $async$visitFunctionExpression$1); + case 11: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionExpression$1, $async$completer); + }, + _async_evaluate$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { + return this._visitCalculation$body$_EvaluateVisitor(node, inLegacySassFunction); + }, + _async_evaluate$_visitCalculation$1(node) { + return this._async_evaluate$_visitCalculation$2$inLegacySassFunction(node, null); + }, + _visitCalculation$body$_EvaluateVisitor(node, inLegacySassFunction) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$next = [], $async$self = this, $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, t2, t3, $async$temp1; + var $async$_async_evaluate$_visitCalculation$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t2 = node.$arguments; + t3 = t2.named; + if (t3.get$isNotEmpty(t3)) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Keywor, node.span)); + else if (t2.rest != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Rest_a, node.span)); + $async$self._async_evaluate$_checkCalculationArguments$1(node); + t3 = A._setArrayType([], type$.JSArray_Object); + t2 = t2.positional, t4 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t4)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t3; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate$_visitCalculation$2$inLegacySassFunction); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $arguments = t3; + if ($async$self._async_evaluate$_inSupportsDeclaration) { + $async$returnValue = new A.SassCalculation(node.name, A.List_List$unmodifiable($arguments, type$.Object)); + // goto return + $async$goto = 1; + break; + } + oldCallableNode = $async$self._async_evaluate$_callableNode; + $async$self._async_evaluate$_callableNode = node; + try { + t1 = null; + t3 = node.name; + _0_0 = t3.toLowerCase(); + $label0$0: { + if ("calc" === _0_0) { + t1 = A.SassCalculation_calc(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sqrt" === _0_0) { + t1 = A.SassCalculation__singleArgument("sqrt", J.$index$asx($arguments, 0), A.number0__sqrt$closure(), true); + break $label0$0; + } + if ("sin" === _0_0) { + t1 = A.SassCalculation__singleArgument("sin", J.$index$asx($arguments, 0), A.number0__sin$closure(), false); + break $label0$0; + } + if ("cos" === _0_0) { + t1 = A.SassCalculation__singleArgument("cos", J.$index$asx($arguments, 0), A.number0__cos$closure(), false); + break $label0$0; + } + if ("tan" === _0_0) { + t1 = A.SassCalculation__singleArgument("tan", J.$index$asx($arguments, 0), A.number0__tan$closure(), false); + break $label0$0; + } + if ("asin" === _0_0) { + t1 = A.SassCalculation__singleArgument("asin", J.$index$asx($arguments, 0), A.number0__asin$closure(), true); + break $label0$0; + } + if ("acos" === _0_0) { + t1 = A.SassCalculation__singleArgument("acos", J.$index$asx($arguments, 0), A.number0__acos$closure(), true); + break $label0$0; + } + if ("atan" === _0_0) { + t1 = A.SassCalculation__singleArgument("atan", J.$index$asx($arguments, 0), A.number0__atan$closure(), true); + break $label0$0; + } + if ("abs" === _0_0) { + t1 = A.SassCalculation_abs(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("exp" === _0_0) { + t1 = A.SassCalculation_exp(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sign" === _0_0) { + t1 = A.SassCalculation_sign(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("min" === _0_0) { + t1 = A.SassCalculation_min($arguments); + break $label0$0; + } + if ("max" === _0_0) { + t1 = A.SassCalculation_max($arguments); + break $label0$0; + } + if ("hypot" === _0_0) { + t1 = A.SassCalculation_hypot($arguments); + break $label0$0; + } + if ("pow" === _0_0) { + t1 = A.SassCalculation_pow(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("atan2" === _0_0) { + t1 = A.SassCalculation_atan2(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("log" === _0_0) { + t1 = A.SassCalculation_log(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("mod" === _0_0) { + t1 = A.SassCalculation_mod(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("rem" === _0_0) { + t1 = A.SassCalculation_rem(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("round" === _0_0) { + t1 = A.SassCalculation_roundInternal(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2), inLegacySassFunction, node.span, new A._EvaluateVisitor__visitCalculation_closure0($async$self, node)); + break $label0$0; + } + if ("clamp" === _0_0) { + t1 = A.SassCalculation_clamp(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + if ("calc-size" === _0_0) { + t1 = A.SassCalculation_calcSize(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); + t1 = A.throwExpression(t3); + } + t1 = t1; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (B.JSString_methods.contains$1(error.message, "compatible")) + $async$self._async_evaluate$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace($async$self._async_evaluate$_exception$2(error.message, node.span), error, stackTrace); + } else + throw exception; + } finally { + $async$self._async_evaluate$_callableNode = oldCallableNode; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitCalculation$2$inLegacySassFunction, $async$completer); + }, + _async_evaluate$_checkCalculationArguments$1(node) { + var t1, _0_0, + check = new A._EvaluateVisitor__checkCalculationArguments_check0(this, node); + $label0$0: { + t1 = node.name; + _0_0 = t1.toLowerCase(); + if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { + check.call$1(1); + break $label0$0; + } + if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { + check.call$0(); + break $label0$0; + } + if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "calc-size" === _0_0) { + check.call$1(2); + break $label0$0; + } + if ("round" === _0_0 || "clamp" === _0_0) { + check.call$1(3); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); + } + }, + _async_evaluate$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, _0_0, arg, t2, number1, j, number2, t3, t4, t5, t6; + for (i = 0; t1 = args.length, i < t1; ++i) { + _0_0 = args[i]; + if (_0_0 instanceof A.SassNumber) { + t1 = _0_0.get$hasComplexUnits(); + arg = _0_0; + } else { + arg = null; + t1 = false; + } + if (t1) { + t1 = A.S(arg); + t2 = nodesWithSpans[i]; + throw A.wrapException(this._async_evaluate$_exception$2("Number " + t1 + " isn't compatible with CSS calculations.", t2.get$span(t2))); + } + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + t1 = number1.toString$0(0); + t2 = number2.toString$0(0); + t3 = nodesWithSpans[i]; + t3 = t3.get$span(t3); + t4 = number1.toString$0(0); + t5 = nodesWithSpans[j]; + t5 = A.LinkedHashMap_LinkedHashMap$_literal([t5.get$span(t5), number2.toString$0(0)], type$.FileSpan, type$.String); + t6 = nodesWithSpans[i]; + throw A.wrapException(A.MultiSpanSassRuntimeException$(t1 + " and " + t2 + " are incompatible.", t3, t4, t5, this._async_evaluate$_stackTrace$1(t6.get$span(t6)), null)); + } + } + }, + _async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { + return this._visitCalculationExpression$body$_EvaluateVisitor(node, inLegacySassFunction); + }, + _visitCalculationExpression$body$_EvaluateVisitor(node, inLegacySassFunction) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, result, t2, _0_0, _box_0, _1_0, t3, _i, i, t1, inner, $async$temp1; + var $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node instanceof A.ParenthesizedExpression; + inner = t1 ? node.expression : null; + $async$goto = t1 ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 5: + // returning from await. + result = $async$result; + $async$returnValue = result instanceof A.SassString ? new A.SassString("(" + result._string$_text + ")", false) : result; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = node instanceof A.StringExpression && node.accept$1(B.C_IsCalculationSafeVisitor) ? 6 : 7; + break; + case 6: + // then + t1 = node.text; + t2 = t1.get$asPlain(); + _0_0 = t2 == null ? null : t2.toLowerCase(); + if ("pi" === _0_0) { + t1 = A.SassNumber_SassNumber(3.141592653589793, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("e" === _0_0) { + t1 = A.SassNumber_SassNumber(2.718281828459045, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("infinity" === _0_0) { + t1 = A.SassNumber_SassNumber(1 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("-infinity" === _0_0) { + t1 = A.SassNumber_SassNumber(-1 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("nan" === _0_0) { + t1 = A.SassNumber_SassNumber(0 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + $async$temp1 = A; + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(t1), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 9: + // returning from await. + t1 = new $async$temp1.SassString($async$result, false); + // goto break $label0$0 + $async$goto = 8; + break; + case 8: + // break $label0$0 + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 7: + // join + _box_0 = {}; + _box_0.right = _box_0.left = _box_0.operator = null; + t1 = node instanceof A.BinaryOperationExpression; + if (t1) { + _box_0.operator = node.operator; + _box_0.left = node.left; + _box_0.right = node.right; + } + $async$goto = t1 ? 10 : 11; + break; + case 10: + // then + $async$self._async_evaluate$_checkWhitespaceAroundCalculationOperator$1(node); + $async$goto = 12; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure0(_box_0, $async$self, node, inLegacySassFunction), type$.Object), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 12: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 11: + // join + $async$goto = node instanceof A.NumberExpression || node instanceof A.VariableExpression || node instanceof A.FunctionExpression || node instanceof A.LegacyIfExpression ? 13 : 14; + break; + case 13: + // then + $async$goto = 15; + return A._asyncAwait(node.accept$1($async$self), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 15: + // returning from await. + _1_0 = $async$result; + $label1$1: { + if (_1_0 instanceof A.SassNumber) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassCalculation) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassString) { + t1 = !_1_0._hasQuotes; + result = _1_0; + } else { + result = null; + t1 = false; + } + if (t1) { + t1 = result; + break $label1$1; + } + t1 = A.throwExpression($async$self._async_evaluate$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 14: + // join + $async$goto = node instanceof A.ListExpression && !node.hasBrackets && B.ListSeparator_SrV === node.separator && node.contents.length >= 2 ? 16 : 17; + break; + case 16: + // then + t1 = A._setArrayType([], type$.JSArray_Object); + t2 = node.contents, t3 = t2.length, _i = 0; + case 18: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 20; + break; + } + $async$temp1 = t1; + $async$goto = 21; + return A._asyncAwait($async$self._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction); + case 21: + // returning from await. + $async$temp1.push($async$result); + case 19: + // for update + ++_i; + // goto for condition + $async$goto = 18; + break; + case 20: + // after for + $async$self._async_evaluate$_checkAdjacentCalculationValues$2(t1, node); + for (i = 0; i < t1.length; ++i) { + t3 = t1[i]; + if (t3 instanceof A.CalculationOperation && t2[i] instanceof A.ParenthesizedExpression) + t1[i] = new A.SassString("(" + t3.toString$0(0) + ")", false); + } + $async$returnValue = new A.SassString(B.JSArray_methods.join$1(t1, " "), false); + // goto return + $async$goto = 1; + break; + case 17: + // join + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.This_e, node.get$span(node))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_visitCalculationExpression$2$inLegacySassFunction, $async$completer); + }, + _async_evaluate$_checkWhitespaceAroundCalculationOperator$1(node) { + var t2, t3, t4, textBetweenOperands, first, last, + t1 = node.operator; + if (t1 !== B.BinaryOperator_jCK && t1 !== B.BinaryOperator_tDf) + return; + t1 = node.left; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = node.right; + t4 = t3.get$span(t3); + if (t2 !== t4.get$file(t4)) + return; + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + if (t2.offset >= t4.get$start(t4).offset) + return; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); + first = textBetweenOperands.charCodeAt(0); + last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) + t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); + else + t1 = true; + if (t1) + throw A.wrapException(this._async_evaluate$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); + }, + _async_evaluate$_binaryOperatorToCalculationOperator$2(operator, node) { + var t1; + $label0$0: { + if (B.BinaryOperator_jCK === operator) { + t1 = B.CalculationOperator_dpX; + break $label0$0; + } + if (B.BinaryOperator_tDf === operator) { + t1 = B.CalculationOperator_KrC; + break $label0$0; + } + if (B.BinaryOperator_wkM === operator) { + t1 = B.CalculationOperator_LPB; + break $label0$0; + } + if (B.BinaryOperator_ehp === operator) { + t1 = B.CalculationOperator_wFL; + break $label0$0; + } + t1 = A.throwExpression(this._async_evaluate$_exception$2(string$.This_o, node.get$operatorSpan())); + } + return t1; + }, + _async_evaluate$_checkAdjacentCalculationValues$2(elements, node) { + var t1, i, t2, previous, current, previousNode, currentNode, _0_2; + for (t1 = elements.length, i = 1; i < t1; ++i) { + t2 = i - 1; + previous = elements[t2]; + current = elements[i]; + if (previous instanceof A.SassString || current instanceof A.SassString) + continue; + t1 = node.contents; + previousNode = t1[t2]; + currentNode = t1[i]; + if (currentNode instanceof A.UnaryOperationExpression) { + _0_2 = currentNode.operator; + if (B.UnaryOperator_hCO !== _0_2) + t1 = B.UnaryOperator_n2K === _0_2; + else + t1 = true; + } else + t1 = false; + if (!t1) + t1 = currentNode instanceof A.NumberExpression && currentNode.value < 0; + else + t1 = true; + if (t1) + throw A.wrapException(this._async_evaluate$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); + else + throw A.wrapException(this._async_evaluate$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); + } + }, + visitInterpolatedFunctionExpression$1(_, node) { + return this.visitInterpolatedFunctionExpression$body$_EvaluateVisitor(0, node); + }, + visitInterpolatedFunctionExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, result, t1, oldInFunction; + var $async$visitInterpolatedFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$1(node.name), $async$visitInterpolatedFunctionExpression$1); + case 3: + // returning from await. + t1 = $async$result; + oldInFunction = $async$self._async_evaluate$_inFunction; + $async$self._async_evaluate$_inFunction = true; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0($async$self, node, new A.PlainCssCallable(t1)), type$.Value), $async$visitInterpolatedFunctionExpression$1); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitInterpolatedFunctionExpression$1, $async$completer); + }, + _async_evaluate$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + return this._runUserDefinedCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan, run, $V, $V); + }, + _runUserDefinedCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan, run, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldInDependency, result, evaluated, $name; + var $async$_async_evaluate$_runUserDefinedCallable$1$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_runUserDefinedCallable$1$4); + case 3: + // returning from await. + evaluated = $async$result; + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldInDependency = $async$self._async_evaluate$_inDependency; + $async$self._async_evaluate$_inDependency = callable.inDependency; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate$_withStackFrame$1$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure0($async$self, callable, evaluated, nodeWithSpan, run, $V), $V), $async$_async_evaluate$_runUserDefinedCallable$1$4); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_inDependency = oldInDependency; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runUserDefinedCallable$1$4, $async$completer); + }, + _async_evaluate$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + return this._runFunctionCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan); + }, + _runFunctionCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, $async$exception, $async$temp1; + var $async$_async_evaluate$_runFunctionCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = type$.AsyncBuiltInCallable._is(callable) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), $async$_async_evaluate$_runFunctionCallable$3); + case 6: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_withoutSlash$2($async$result, nodeWithSpan); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = type$.UserDefinedCallable_AsyncEnvironment._is(callable) ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure0($async$self, callable), type$.Value), $async$_async_evaluate$_runFunctionCallable$3); + case 10: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = callable instanceof A.PlainCssCallable ? 11 : 13; + break; + case 11: + // then + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + buffer = new A.StringBuffer(callable.name + "("); + $async$handler = 15; + first = true; + t1 = $arguments.positional, t2 = t1.length, _i = 0; + case 18: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 20; + break; + } + argument = t1[_i]; + if (first) + first = false; + else + buffer._contents += ", "; + t3 = buffer; + $async$temp1 = A; + $async$goto = 21; + return A._asyncAwait($async$self._evaluateToCss$1(argument), $async$_async_evaluate$_runFunctionCallable$3); + case 21: + // returning from await. + t4 = $async$temp1.S($async$result); + t3._contents += t4; + case 19: + // for update + ++_i; + // goto for condition + $async$goto = 18; + break; + case 20: + // after for + restArg = $arguments.rest; + $async$goto = restArg != null ? 22 : 23; + break; + case 22: + // then + $async$goto = 24; + return A._asyncAwait(restArg.accept$1($async$self), $async$_async_evaluate$_runFunctionCallable$3); + case 24: + // returning from await. + rest = $async$result; + if (!first) + buffer._contents += ", "; + t1 = buffer; + t2 = $async$self._async_evaluate$_serialize$2(rest, restArg); + t1._contents += t2; + case 23: + // join + $async$handler = 2; + // goto after finally + $async$goto = 17; + break; + case 15: + // catch + $async$handler = 14; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) + throw $async$exception; + throw A.wrapException(A.MultiSpanSassRuntimeException$(error._span_exception$_message, J.get$span$x(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); + } else + throw $async$exception; + // goto after finally + $async$goto = 17; + break; + case 14: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 17: + // after finally + t1 = buffer; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + t2 = buffer._contents; + $async$returnValue = new A.SassString(t2.charCodeAt(0) == 0 ? t2 : t2, false); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 12; + break; + case 13: + // else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); + case 12: + // join + case 8: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runFunctionCallable$3, $async$completer); + }, + _async_evaluate$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + return this._runBuiltInCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan); + }, + _runBuiltInCallable$body$_EvaluateVisitor($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, result, error, stackTrace, namedSet, _0_0, parameters, i, t1, t2, t3, parameter, t4, t5, t6, t7, rest, argumentList, exception, _box_0, evaluated, oldCallableNode, $async$exception; + var $async$_async_evaluate$_runBuiltInCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_evaluateArguments$1($arguments), $async$_async_evaluate$_runBuiltInCallable$3); + case 3: + // returning from await. + evaluated = $async$result; + oldCallableNode = $async$self._async_evaluate$_callableNode; + $async$self._async_evaluate$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); + _box_0.callback = _box_0.overload = null; + _0_0 = callable.callbackFor$2(J.get$length$asx(evaluated._values[2]), namedSet); + _box_0.overload = _0_0._0; + _box_0.callback = _0_0._1; + $async$self._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure2(_box_0, evaluated, namedSet)); + parameters = _box_0.overload.parameters; + i = J.get$length$asx(evaluated._values[2]), t1 = parameters.length, t2 = type$._Future_Value, t3 = type$.Future_Value; + case 4: + // for condition + if (!(i < t1)) { + // goto after for + $async$goto = 6; + break; + } + parameter = parameters[i]; + t4 = evaluated._values[2]; + t5 = evaluated._values[0].remove$1(0, parameter.name); + $async$goto = t5 == null ? 7 : 8; + break; + case 7: + // then + t5 = parameter.defaultValue; + t6 = t5.accept$1($async$self); + if (!t3._is(t6)) { + t7 = new A._Future($.Zone__current, t2); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$goto = 9; + return A._asyncAwait(t6, $async$_async_evaluate$_runBuiltInCallable$3); + case 9: + // returning from await. + t5 = $async$self._async_evaluate$_withoutSlash$2($async$result, t5); + case 8: + // join + J.add$1$ax(t4, t5); + case 5: + // for update + ++i; + // goto for condition + $async$goto = 4; + break; + case 6: + // after for + if (_box_0.overload.restParameter != null) { + if (J.get$length$asx(evaluated._values[2]) > t1) { + rest = J.sublist$1$ax(evaluated._values[2], t1); + J.removeRange$2$ax(evaluated._values[2], t1, J.get$length$asx(evaluated._values[2])); + } else + rest = B.List_empty8; + t1 = evaluated._values[0]; + argumentList = A.SassArgumentList$(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_3_undecided ? B.ListSeparator_z0K : evaluated._values[4]); + J.add$1$ax(evaluated._values[2], argumentList); + } else + argumentList = null; + result = null; + $async$handler = 11; + $async$goto = 14; + return A._asyncAwait($async$self._addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure3(_box_0, evaluated), type$.Value), $async$_async_evaluate$_runBuiltInCallable$3); + case 14: + // returning from await. + result = $async$result; + $async$handler = 2; + // goto after finally + $async$goto = 13; + break; + case 11: + // catch + $async$handler = 10; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException) + throw $async$exception; + else { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace($async$self._async_evaluate$_exception$2($async$self._async_evaluate$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); + } + // goto after finally + $async$goto = 13; + break; + case 10: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 13: + // after finally + $async$self._async_evaluate$_callableNode = oldCallableNode; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated._values[0]; + if (t1.get$isEmpty(t1)) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated._values[0]; + t1 = t1.get$keys(t1); + t1 = A.pluralize("parameter", t1.get$length(t1), null); + t2 = evaluated._values[0]; + t2 = t2.get$keys(t2); + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + t1 + " named " + A.toSentence(t2.map$1$1(t2, new A._EvaluateVisitor__runBuiltInCallable_closure4(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_runBuiltInCallable$3, $async$completer); + }, + _async_evaluate$_evaluateArguments$1($arguments) { + return this._evaluateArguments$body$_EvaluateVisitor($arguments); + }, + _evaluateArguments$body$_EvaluateVisitor($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, expression, nodeForSpan, t5, t6, named, namedNodes, $name, value, t7, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, positional, positionalNodes, $async$temp1, $async$temp2; + var $async$_async_evaluate$_evaluateArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + positional = A._setArrayType([], type$.JSArray_Value); + positionalNodes = A._setArrayType([], type$.JSArray_AstNode); + t1 = $arguments.positional, t2 = t1.length, t3 = type$._Future_Value, t4 = type$.Future_Value, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + expression = t1[_i]; + nodeForSpan = $async$self._async_evaluate$_expressionNode$1(expression); + t5 = expression.accept$1($async$self); + if (!t4._is(t5)) { + t6 = new A._Future($.Zone__current, t3); + t6._state = 8; + t6._resultOrListeners = t5; + t5 = t6; + } + $async$temp1 = positional; + $async$goto = 6; + return A._asyncAwait(t5, $async$_async_evaluate$_evaluateArguments$1); + case 6: + // returning from await. + $async$temp1.push($async$self._async_evaluate$_withoutSlash$2($async$result, nodeForSpan)); + positionalNodes.push(nodeForSpan); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value); + t2 = type$.AstNode; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + t5 = A.MapExtensions_get_pairs($arguments.named, t1, type$.Expression), t5 = t5.get$iterator(t5); + case 7: + // for condition + if (!t5.moveNext$0()) { + // goto after for + $async$goto = 8; + break; + } + t6 = t5.get$current(t5); + $name = t6._0; + value = t6._1; + nodeForSpan = $async$self._async_evaluate$_expressionNode$1(value); + t6 = value.accept$1($async$self); + if (!t4._is(t6)) { + t7 = new A._Future($.Zone__current, t3); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$temp1 = named; + $async$temp2 = $name; + $async$goto = 9; + return A._asyncAwait(t6, $async$_async_evaluate$_evaluateArguments$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, $async$self._async_evaluate$_withoutSlash$2($async$result, nodeForSpan)); + namedNodes.$indexSet(0, $name, nodeForSpan); + // goto for condition + $async$goto = 7; + break; + case 8: + // after for + restArgs = $arguments.rest; + if (restArgs == null) { + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_3_undecided]); + // goto return + $async$goto = 1; + break; + } + $async$goto = 10; + return A._asyncAwait(restArgs.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); + case 10: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure3()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map$_contents, t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4), t5 = type$.SassString; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_3_undecided; + } else if (rest instanceof A.SassList) { + t3 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure4($async$self, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._separator; + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure5($async$self, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push($async$self._async_evaluate$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_3_undecided; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) { + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + // goto return + $async$goto = 1; + break; + } + $async$goto = 11; + return A._asyncAwait(keywordRestArgs.accept$1($async$self), $async$_async_evaluate$_evaluateArguments$1); + case 11: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure6()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map$_contents, t2 = t2.get$keys(t2), t2 = t2.get$iterator(t2), t3 = type$.SassString; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_evaluateArguments$1, $async$completer); + }, + _async_evaluate$_evaluateMacroArguments$1(invocation) { + return this._evaluateMacroArguments$body$_EvaluateVisitor(invocation); + }, + _evaluateMacroArguments$body$_EvaluateVisitor(invocation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_List_Expression_and_Map_String_Expression), + $async$returnValue, $async$self = this, t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, t1, restArgs_; + var $async$_async_evaluate$_evaluateMacroArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = invocation.$arguments; + restArgs_ = t1.rest; + if (restArgs_ == null) { + $async$returnValue = new A._Record_2(t1.positional, t1.named); + // goto return + $async$goto = 1; + break; + } + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression); + $async$goto = 3; + return A._asyncAwait(restArgs_.accept$1($async$self), $async$_async_evaluate$_evaluateMacroArguments$1); + case 3: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap) + $async$self._async_evaluate$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure3(restArgs_)); + else if (rest instanceof A.SassList) { + t2 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure4($async$self, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression>"))); + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure5($async$self, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression($async$self._async_evaluate$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) { + $async$returnValue = new A._Record_2(positional, named); + // goto return + $async$goto = 1; + break; + } + $async$goto = 4; + return A._asyncAwait(keywordRestArgs_.accept$1($async$self), $async$_async_evaluate$_evaluateMacroArguments$1); + case 4: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap) { + $async$self._async_evaluate$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure6($async$self, keywordRestNodeForSpan, keywordRestArgs_)); + $async$returnValue = new A._Record_2(positional, named); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_evaluateMacroArguments$1, $async$completer); + }, + _async_evaluate$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure0(this, values, convert, this._async_evaluate$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _async_evaluate$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._async_evaluate$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _async_evaluate$_verifyArguments$4(positional, named, parameters, nodeWithSpan) { + return this._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure0(parameters, positional, named)); + }, + visitSelectorExpression$1(_, node) { + return this.visitSelectorExpression$body$_EvaluateVisitor(0, node); + }, + visitSelectorExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1; + var $async$visitSelectorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + $async$returnValue = t1 == null ? B.C__SassNull : t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSelectorExpression$1, $async$completer); + }, + visitStringExpression$1(_, node) { + return this.visitStringExpression$body$_EvaluateVisitor(0, node); + }, + visitStringExpression$body$_EvaluateVisitor(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString), + $async$returnValue, $async$self = this, t1, t2, t3, _i, value, t4, _0_0, text, oldInSupportsDeclaration; + var $async$visitStringExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = false; + t1 = A._setArrayType([], type$.JSArray_String); + t2 = node.text.contents, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + value = t2[_i]; + if (typeof value == "string") { + t4 = value; + // goto break $label0$0 + $async$goto = 6; + break; + } + $async$goto = value instanceof A.Expression ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait(value.accept$1($async$self), $async$visitStringExpression$1); + case 9: + // returning from await. + _0_0 = $async$result; + $label1$1: { + if (_0_0 instanceof A.SassString) { + text = _0_0._string$_text; + t4 = text; + break $label1$1; + } + t4 = $async$self._async_evaluate$_serialize$3$quote(_0_0, value, false); + break $label1$1; + } + // goto break $label0$0 + $async$goto = 6; + break; + case 8: + // join + t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); + case 6: + // break $label0$0 + t1.push(t4); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = B.JSArray_methods.join$0(t1); + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A.SassString(t1, node.hasQuotes); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStringExpression$1, $async$completer); + }, + visitSupportsExpression$1(_, expression) { + return this.visitSupportsExpression$body$_EvaluateVisitor(0, expression); + }, + visitSupportsExpression$body$_EvaluateVisitor(_, expression) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitSupportsExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_visitSupportsCondition$1(expression.condition), $async$visitSupportsExpression$1); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.SassString($async$result, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsExpression$1, $async$completer); + }, + visitCssAtRule$1(node) { + return this.visitCssAtRule$body$_EvaluateVisitor(node); + }, + visitCssAtRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, wasInKeyframes, wasInUnknownAtRule, t1, rule; + var $async$visitCssAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + $async$self._async_evaluate$_copyParentAfterSibling$0(); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$(node.name, node.span, true, node.value)); + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor(t1.value) === "keyframes") + $async$self._async_evaluate$_inKeyframes = true; + else + $async$self._async_evaluate$_inUnknownAtRule = true; + rule = A.ModifiableCssAtRule$(t1, node.span, false, node.value); + $async$goto = $async$self.get$_async_evaluate$_hasCssNesting() ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitCssAtRule_closure2($async$self, node), false, type$.ModifiableCssAtRule, type$.Null), $async$visitCssAtRule$1); + case 5: + // returning from await. + $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate$_inKeyframes = wasInKeyframes; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssAtRule_closure3($async$self, node), false, new A._EvaluateVisitor_visitCssAtRule_closure4(), type$.ModifiableCssAtRule, type$.Null), $async$visitCssAtRule$1); + case 6: + // returning from await. + $async$self._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate$_inKeyframes = wasInKeyframes; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssAtRule$1, $async$completer); + }, + visitCssComment$1(node) { + return this.visitCssComment$body$_EvaluateVisitor(node); + }, + visitCssComment$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") === $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root") && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + $async$self._async_evaluate$_copyParentAfterSibling$0(); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(new A.ModifiableCssComment(node.text, node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssComment$1, $async$completer); + }, + visitCssDeclaration$1(node) { + return this.visitCssDeclaration$body$_EvaluateVisitor(node); + }, + visitCssDeclaration$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate$_copyParentAfterSibling$0(); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$(node.name, node.value, node.span, node.parsedAsSassScript, node.valueSpanForMap)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssDeclaration$1, $async$completer); + }, + visitCssImport$1(node) { + return this.visitCssImport$body$_EvaluateVisitor(node); + }, + visitCssImport$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, modifiableNode; + var $async$visitCssImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + modifiableNode = new A.ModifiableCssImport(node.url, node.modifiers, node.span); + if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") !== $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root")) { + $async$self._async_evaluate$_copyParentAfterSibling$0(); + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").addChild$1(modifiableNode); + } else if ($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__root, "_root").addChild$1(modifiableNode); + $async$self._async_evaluate$__endOfImports = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(modifiableNode); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssImport$1, $async$completer); + }, + visitCssKeyframeBlock$1(node) { + return this.visitCssKeyframeBlock$body$_EvaluateVisitor(node); + }, + visitCssKeyframeBlock$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssKeyframeBlock$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure1($async$self, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure2(), type$.ModifiableCssKeyframeBlock, type$.Null), $async$visitCssKeyframeBlock$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssKeyframeBlock$1, $async$completer); + }, + visitCssMediaRule$1(node) { + return this.visitCssMediaRule$body$_EvaluateVisitor(node); + }, + visitCssMediaRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitCssMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Media_, node.span)); + $async$goto = $async$self.get$_async_evaluate$_hasCssNesting() ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssMediaRule$(node.queries, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure3($async$self, node), false, type$.ModifiableCssMediaRule, type$.Null), $async$visitCssMediaRule$1); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + mergedQueries = A.NullableExtension_andThen($async$self._async_evaluate$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure4($async$self, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty2; + else { + t2 = $async$self._async_evaluate$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = $async$self._async_evaluate$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure5($async$self, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure6(mergedSources), type$.ModifiableCssMediaRule, type$.Null), $async$visitCssMediaRule$1); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssMediaRule$1, $async$completer); + }, + visitCssStyleRule$1(node) { + return this.visitCssStyleRule$body$_EvaluateVisitor(node); + }, + visitCssStyleRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, styleRule, _0_0, t2, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _1_1, lastChild; + var $async$visitCssStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_n, node.span)); + else if ($async$self._async_evaluate$_inKeyframes && $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Style_k, node.span)); + t1 = $async$self._async_evaluate$_atRootExcludingStyleRule; + styleRule = t1 ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + _0_0 = t1 ? null : $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + $label0$0: { + if (_0_0 == null) { + t1 = true; + break $label0$0; + } + if (_0_0.fromPlainCss) { + t1 = false; + break $label0$0; + } + t1 = !(node.fromPlainCss && node._style_rule$_selector._box$_inner.value.accept$1(B.C__ContainsParentSelectorVisitor)); + break $label0$0; + } + t2 = node._style_rule$_selector._box$_inner; + if (t1) { + t2 = t2.value; + t3 = styleRule == null ? null : styleRule.originalSelector; + originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !$async$self._async_evaluate$_atRootExcludingStyleRule, node.fromPlainCss); + } else + originalSelector = t2.value; + rule = A.ModifiableCssStyleRule$($async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__extensionStore, "_extensionStore").addSelector$2(originalSelector, $async$self._async_evaluate$_mediaQueries), node.span, node.fromPlainCss, originalSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate$_atRootExcludingStyleRule; + $async$self._async_evaluate$_atRootExcludingStyleRule = false; + t1 = t1 ? new A._EvaluateVisitor_visitCssStyleRule_closure1() : null; + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure2($async$self, rule, node), false, t1, type$.ModifiableCssStyleRule, type$.Null), $async$visitCssStyleRule$1); + case 2: + // returning from await. + $async$self._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + t1 = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent").children._collection$_source; + t2 = J.getInterceptor$asx(t1); + _1_1 = t2.get$length(t1); + if (_1_1 >= 1) { + lastChild = t2.elementAt$1(t1, _1_1 - 1); + t1 = styleRule == null; + } else { + lastChild = null; + t1 = false; + } + if (t1) + lastChild.isGroupEnd = true; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStyleRule$1, $async$completer); + }, + visitCssStylesheet$1(node) { + return this.visitCssStylesheet$body$_EvaluateVisitor(node); + }, + visitCssStylesheet$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$visitCssStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.get$iterator$ax(node.get$children(node)); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + $async$goto = 4; + return A._asyncAwait(t1.get$current(t1).accept$1($async$self), $async$visitCssStylesheet$1); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStylesheet$1, $async$completer); + }, + visitCssSupportsRule$1(node) { + return this.visitCssSupportsRule$body$_EvaluateVisitor(node); + }, + visitCssSupportsRule$body$_EvaluateVisitor(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, rule; + var $async$visitCssSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate$_declarationName != null) + throw A.wrapException($async$self._async_evaluate$_exception$2(string$.Suppor, node.span)); + rule = A.ModifiableCssSupportsRule$(node.condition, node.span); + $async$goto = $async$self.get$_async_evaluate$_hasCssNesting() ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitCssSupportsRule_closure2($async$self, node), false, type$.ModifiableCssSupportsRule, type$.Null), $async$visitCssSupportsRule$1); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssSupportsRule_closure3($async$self, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure4(), type$.ModifiableCssSupportsRule, type$.Null), $async$visitCssSupportsRule$1); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssSupportsRule$1, $async$completer); + }, + _async_evaluate$_handleReturn$1$2(list, callback) { + return this._handleReturn$body$_EvaluateVisitor(list, callback); + }, + _async_evaluate$_handleReturn$2(list, callback) { + return this._async_evaluate$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _handleReturn$body$_EvaluateVisitor(list, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, t1, _i, _0_0; + var $async$_async_evaluate$_handleReturn$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = list.length, _i = 0; + case 3: + // for condition + if (!(_i < list.length)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(callback.call$1(list[_i]), $async$_async_evaluate$_handleReturn$1$2); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_handleReturn$1$2, $async$completer); + }, + _async_evaluate$_withEnvironment$1$2(environment, callback, $T) { + return this._withEnvironment$body$_EvaluateVisitor(environment, callback, $T, $T); + }, + _withEnvironment$body$_EvaluateVisitor(environment, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldEnvironment; + var $async$_async_evaluate$_withEnvironment$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldEnvironment = $async$self._async_evaluate$_environment; + $async$self._async_evaluate$_environment = environment; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withEnvironment$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_environment = oldEnvironment; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withEnvironment$1$2, $async$completer); + }, + _async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + return this._interpolationToValue$body$_EvaluateVisitor(interpolation, trim, warnForColor); + }, + _async_evaluate$_interpolationToValue$1(interpolation) { + return this._async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _async_evaluate$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._async_evaluate$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _interpolationToValue$body$_EvaluateVisitor(interpolation, trim, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_String), + $async$returnValue, $async$self = this, result, t1; + var $async$_async_evaluate$_interpolationToValue$3$trim$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolation$2$warnForColor(interpolation, warnForColor), $async$_async_evaluate$_interpolationToValue$3$trim$warnForColor); + case 3: + // returning from await. + result = $async$result; + t1 = trim ? A.trimAscii(result, true) : result; + $async$returnValue = new A.CssValue(t1, interpolation.span, type$.CssValue_String); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_interpolationToValue$3$trim$warnForColor, $async$completer); + }, + _async_evaluate$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolation$body$_EvaluateVisitor(interpolation, warnForColor); + }, + _async_evaluate$_performInterpolation$1(interpolation) { + return this._async_evaluate$_performInterpolation$2$warnForColor(interpolation, false); + }, + _performInterpolation$body$_EvaluateVisitor(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this; + var $async$_async_evaluate$_performInterpolation$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor), $async$_async_evaluate$_performInterpolation$2$warnForColor); + case 3: + // returning from await. + $async$returnValue = $async$result._0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_performInterpolation$2$warnForColor, $async$completer); + }, + _async_evaluate$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolationWithMap$body$_EvaluateVisitor(interpolation, true); + }, + _performInterpolationWithMap$body$_EvaluateVisitor(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_InterpolationMap), + $async$returnValue, $async$self = this, _0_0, result, map; + var $async$_async_evaluate$_performInterpolationWithMap$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), $async$_async_evaluate$_performInterpolationWithMap$2$warnForColor); + case 3: + // returning from await. + _0_0 = $async$result; + result = _0_0._0; + map = _0_0._1; + map.toString; + $async$returnValue = new A._Record_2(result, map); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_performInterpolationWithMap$2$warnForColor, $async$completer); + }, + _async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { + return this._performInterpolationHelper$body$_EvaluateVisitor(interpolation, sourceMap, warnForColor); + }, + _performInterpolationHelper$body$_EvaluateVisitor(interpolation, sourceMap, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_nullable_InterpolationMap), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, first, _i, t7, value, result, result0, t8, targetOffsets, oldInSupportsDeclaration; + var $async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + targetOffsets = sourceMap ? A._setArrayType([], type$.JSArray_int) : null; + oldInSupportsDeclaration = $async$self._async_evaluate$_inSupportsDeclaration; + $async$self._async_evaluate$_inSupportsDeclaration = false; + t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression, t4 = targetOffsets == null, t5 = interpolation.span, t6 = type$.Object, first = true, _i = 0, t7 = ""; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + value = t1[_i]; + if (!first) + if (!t4) + targetOffsets.push(t7.length); + if (typeof value == "string") { + t7 += value; + // goto for update + $async$goto = 4; + break; + } + t3._as(value); + $async$goto = 6; + return A._asyncAwait(value.accept$1($async$self), $async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor); + case 6: + // returning from await. + result = $async$result; + if (warnForColor && $.$get$namesByColor().containsKey$1(result)) { + result0 = A.List_List$from([""], false, t6); + result0.$flags = 3; + t8 = $.$get$namesByColor(); + $async$self._async_evaluate$_warn$2(string$.You_pr + A.S(t8.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t8.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression(B.BinaryOperator_jCK, new A.StringExpression(new A.Interpolation(result0, B.List_null, t5), true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + t7 += $async$self._async_evaluate$_serialize$3$quote(result, value, false); + case 4: + // for update + ++_i, first = false; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$self._async_evaluate$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A._Record_2(t7.charCodeAt(0) == 0 ? t7 : t7, A.NullableExtension_andThen(targetOffsets, new A._EvaluateVisitor__performInterpolationHelper_closure0(interpolation))); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_performInterpolationHelper$3$sourceMap$warnForColor, $async$completer); + }, + _evaluateToCss$2$quote(expression, quote) { + return this._evaluateToCss$body$_EvaluateVisitor(expression, quote); + }, + _evaluateToCss$1(expression) { + return this._evaluateToCss$2$quote(expression, true); + }, + _evaluateToCss$body$_EvaluateVisitor(expression, quote) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1; + var $async$_evaluateToCss$2$quote = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = expression.accept$1($async$self); + $async$goto = 3; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$_evaluateToCss$2$quote); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate$_serialize$3$quote($async$result, expression, quote); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_evaluateToCss$2$quote, $async$completer); + }, + _async_evaluate$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._async_evaluate$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure0(value, quote)); + }, + _async_evaluate$_serialize$2(value, nodeWithSpan) { + return this._async_evaluate$_serialize$3$quote(value, nodeWithSpan, true); + }, + _async_evaluate$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression) { + t1 = this._async_evaluate$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure0(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + return this._withParent$body$_EvaluateVisitor(node, callback, scopeWhen, through, $S, $T, $T); + }, + _async_evaluate$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _async_evaluate$_withParent$2$2(node, callback, $S, $T) { + return this._async_evaluate$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _withParent$body$_EvaluateVisitor(node, callback, scopeWhen, through, $S, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldParent, result; + var $async$_async_evaluate$_withParent$2$4$scopeWhen$through = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate$_addChild$2$through(node, through); + oldParent = $async$self._async_evaluate$_assertInModule$2($async$self._async_evaluate$__parent, "__parent"); + $async$self._async_evaluate$__parent = node; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate$_environment.scope$1$2$when(callback, scopeWhen, $T), $async$_async_evaluate$_withParent$2$4$scopeWhen$through); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$__parent = oldParent; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withParent$2$4$scopeWhen$through, $async$completer); + }, + _async_evaluate$_copyParentAfterSibling$0() { + var t1, grandparent, newParent, _this = this, + _s8_ = "__parent", + _0_0 = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__parent, _s8_)._parent; + if (_0_0 != null) { + t1 = _0_0.children; + t1 = t1.get$last(t1) !== _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__parent, _s8_); + grandparent = _0_0; + } else { + grandparent = null; + t1 = false; + } + if (t1) { + newParent = _this._async_evaluate$_assertInModule$2(_this._async_evaluate$__parent, _s8_).copyWithoutChildren$0(); + grandparent.addChild$1(newParent); + _this._async_evaluate$__parent = newParent; + } + }, + _async_evaluate$_addChild$2$through(node, through) { + var _0_0, grandparent, t1, + $parent = this._async_evaluate$_assertInModule$2(this._async_evaluate$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = _0_0) { + _0_0 = $parent._parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + grandparent = $parent._parent; + t1 = grandparent.children; + if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) + $parent = type$.ModifiableCssParentNode._as(t1.get$last(t1)); + else { + $parent = $parent.copyWithoutChildren$0(); + grandparent.addChild$1($parent); + } + } + } + $parent.addChild$1(node); + }, + _async_evaluate$_addChild$1(node) { + return this._async_evaluate$_addChild$2$through(node, null); + }, + _async_evaluate$_withStyleRule$1$2(rule, callback, $T) { + return this._withStyleRule$body$_EvaluateVisitor(rule, callback, $T, $T); + }, + _withStyleRule$body$_EvaluateVisitor(rule, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldRule; + var $async$_async_evaluate$_withStyleRule$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldRule = $async$self._async_evaluate$_styleRuleIgnoringAtRoot; + $async$self._async_evaluate$_styleRuleIgnoringAtRoot = rule; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withStyleRule$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_styleRuleIgnoringAtRoot = oldRule; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withStyleRule$1$2, $async$completer); + }, + _async_evaluate$_withMediaQueries$1$3(queries, sources, callback, $T) { + return this._withMediaQueries$body$_EvaluateVisitor(queries, sources, callback, $T, $T); + }, + _withMediaQueries$body$_EvaluateVisitor(queries, sources, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldMediaQueries, oldSources; + var $async$_async_evaluate$_withMediaQueries$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldMediaQueries = $async$self._async_evaluate$_mediaQueries; + oldSources = $async$self._async_evaluate$_mediaQuerySources; + $async$self._async_evaluate$_mediaQueries = queries; + $async$self._async_evaluate$_mediaQuerySources = sources; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withMediaQueries$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_mediaQueries = oldMediaQueries; + $async$self._async_evaluate$_mediaQuerySources = oldSources; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withMediaQueries$1$3, $async$completer); + }, + _async_evaluate$_withStackFrame$1$3(member, nodeWithSpan, callback, $T) { + return this._withStackFrame$body$_EvaluateVisitor(member, nodeWithSpan, callback, $T, $T); + }, + _withStackFrame$body$_EvaluateVisitor(member, nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldMember, result, t1; + var $async$_async_evaluate$_withStackFrame$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate$_stack; + t1.push(new A._Record_2($async$self._async_evaluate$_member, nodeWithSpan)); + oldMember = $async$self._async_evaluate$_member; + $async$self._async_evaluate$_member = member; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_withStackFrame$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate$_member = oldMember; + t1.pop(); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_withStackFrame$1$3, $async$completer); + }, + _async_evaluate$_withoutSlash$2(value, nodeForSpan) { + var t1; + if (value instanceof A.SassNumber) + t1 = value.asSlash != null; + else + t1 = false; + if (t1) + this._async_evaluate$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation0().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_qZ1); + return value.withoutSlash$0(); + }, + _async_evaluate$_stackFrame$2(member, span) { + return A.frameForSpan(span, member, A.NullableExtension_andThen(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure0(this))); + }, + _async_evaluate$_stackTrace$1(span) { + var t2, t3, _i, t4, nodeWithSpan, _this = this, + t1 = A._setArrayType([], type$.JSArray_Frame); + for (t2 = _this._async_evaluate$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = t2[_i]; + nodeWithSpan = t4._1; + t1.push(_this._async_evaluate$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); + } + if (span != null) + t1.push(_this._async_evaluate$_stackFrame$2(_this._async_evaluate$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); + }, + _async_evaluate$_stackTrace$0() { + return this._async_evaluate$_stackTrace$1(null); + }, + _async_evaluate$_warn$3(message, span, deprecation) { + var trace, t1, _this = this; + if (_this._async_evaluate$_quietDeps && _this._async_evaluate$_inDependency) + return; + if (!_this._async_evaluate$_warningsEmitted.add$1(0, new A._Record_2(message, span))) + return; + trace = _this._async_evaluate$_stackTrace$1(span); + t1 = _this._async_evaluate$_logger; + if (deprecation == null) + t1.internalWarn$4$deprecation$span$trace(message, null, span, trace); + else + A.WarnForDeprecation_warnForDeprecation(t1, deprecation, message, span, trace); + }, + _async_evaluate$_warn$2(message, span) { + return this._async_evaluate$_warn$3(message, span, null); + }, + _async_evaluate$_exception$2(message, span) { + var t1, t2; + if (span == null) { + t1 = B.JSArray_methods.get$last(this._async_evaluate$_stack)._1; + t1 = t1.get$span(t1); + } else + t1 = span; + t2 = this._async_evaluate$_stackTrace$1(span); + return new A.SassRuntimeException(t2, B.Set_empty, message, t1); + }, + _async_evaluate$_exception$1(message) { + return this._async_evaluate$_exception$2(message, null); + }, + _async_evaluate$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = B.JSArray_methods.get$last(this._async_evaluate$_stack)._1; + return A.MultiSpanSassRuntimeException$(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._async_evaluate$_stackTrace$0(), null); + }, + _async_evaluate$_addExceptionSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, + addStackFrame = true; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace(t1.withTrace$1(this._async_evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw exception; + } + }, + _async_evaluate$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._async_evaluate$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, $T) { + return this._addExceptionSpanAsync$body$_EvaluateVisitor(nodeWithSpan, callback, addStackFrame, $T, $T); + }, + _addExceptionSpanAsync$1$2(nodeWithSpan, callback, $T) { + return this._addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, true, $T); + }, + _addExceptionSpanAsync$body$_EvaluateVisitor(nodeWithSpan, callback, addStackFrame, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, error, stackTrace, t1, exception, $async$exception; + var $async$_addExceptionSpanAsync$1$3$addStackFrame = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = callback.call$0(); + $async$goto = 7; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_addExceptionSpanAsync$1$3$addStackFrame); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace(t1.withTrace$1($async$self._async_evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_addExceptionSpanAsync$1$3$addStackFrame, $async$completer); + }, + _async_evaluate$_addExceptionTrace$1$1(callback, $T) { + return this._addExceptionTrace$body$_EvaluateVisitor(callback, $T, $T); + }, + _addExceptionTrace$body$_EvaluateVisitor(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, error, stackTrace, t1, exception, t2, $async$exception; + var $async$_async_evaluate$_addExceptionTrace$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = callback.call$0(); + $async$goto = 7; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate$_addExceptionTrace$1$1); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t1)) + throw $async$exception; + else if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error; + t2 = J.getInterceptor$x(t1); + A.throwWithTrace(error.withTrace$1($async$self._async_evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_addExceptionTrace$1$1, $async$completer); + }, + _async_evaluate$_addErrorSpan$1$2(nodeWithSpan, callback, $T) { + return this._addErrorSpan$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $T); + }, + _addErrorSpan$body$_EvaluateVisitor(nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, error, stackTrace, t1, exception, t2, t3, $async$exception; + var $async$_async_evaluate$_addErrorSpan$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate$_addErrorSpan$1$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + if (!B.JSString_methods.startsWith$1(J.get$span$x(error).get$text(), "@error")) + throw $async$exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = $async$self._async_evaluate$_stackTrace$0(); + A.throwWithTrace(new A.SassRuntimeException(t3, B.Set_empty, t1, t2), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate$_addErrorSpan$1$2, $async$completer); + }, + _async_evaluate$_getErrorMessage$1(error) { + var t1, exception; + if (type$.Error._is(error)) + return error.toString$0(0); + try { + t1 = A._asString(J.get$message$x(error)); + return t1; + } catch (exception) { + t1 = J.toString$0$(error); + return t1; + } + } + }; + A._EvaluateVisitor_closure12.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure13.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._async_evaluate$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string$_text, "_", "-")) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure14.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate$_environment; + t3 = variable._string$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string$_text) != null || t1._async_evaluate$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure15.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string$_text) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure16.prototype = { + call$1($arguments) { + var t1 = this.$this._async_evaluate$_environment; + if (!t1._async_environment$_inMixin) + throw A.wrapException(A.SassScriptException$(string$.conten, null)); + return t1._async_environment$_content != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure17.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._async_evaluate$_environment._async_environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, true), t4._1); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure18.prototype = { + call$1($arguments) { + var t3, t4, t5, + t1 = this.$this, + t2 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = t1._async_evaluate$_environment._async_environment$_modules.$index(0, t2); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t2 + '".'); + t2 = type$.Value; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t4 = A.MapExtensions_get_pairs(module.get$functions(module), type$.String, type$.AsyncCallable), t4 = t4.get$iterator(t4), t1 = t1._async_evaluate$_compileContext; t4.moveNext$0();) { + t5 = t4.get$current(t4); + t3.$indexSet(0, new A.SassString(t5._0, true), new A.SassFunction(t5._1, t1)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t3, t2, t2)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure19.prototype = { + call$1($arguments) { + var t3, t4, t5, + t1 = this.$this, + t2 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = t1._async_evaluate$_environment._async_environment$_modules.$index(0, t2); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t2 + '".'); + t2 = type$.Value; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t4 = A.MapExtensions_get_pairs(module.get$mixins(), type$.String, type$.AsyncCallable), t4 = t4.get$iterator(t4), t1 = t1._async_evaluate$_compileContext; t4.moveNext$0();) { + t5 = t4.get$current(t4); + t3.$indexSet(0, new A.SassString(t5._0, true), new A.SassMixin(t5._1, t1)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t3, t2, t2)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure20.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css) { + if (module != null) + throw A.wrapException(string$.x24css_a); + return new A.SassFunction(new A.PlainCssCallable($name._string$_text), this.$this._async_evaluate$_compileContext); + } + t1 = this.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + callable = t1._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure6(t1, $name, module)); + if (callable == null) + throw A.wrapException("Function not found: " + $name.toString$0(0)); + return new A.SassFunction(callable, t1._async_evaluate$_compileContext); + }, + $signature: 167 + }; + A._EvaluateVisitor__closure6.prototype = { + call$0() { + var local, + normalizedName = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t1 = this.module, + namespace = t1 == null ? null : t1._string$_text; + t1 = this.$this; + local = t1._async_evaluate$_environment.getFunction$2$namespace(normalizedName, namespace); + if (local != null || namespace != null) + return local; + return t1._async_evaluate$_builtInFunctions.$index(0, normalizedName); + }, + $signature: 103 + }; + A._EvaluateVisitor_closure21.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + callable = t1._async_evaluate$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure5(t1, $name, module)); + if (callable == null) + throw A.wrapException("Mixin not found: " + $name.toString$0(0)); + return new A.SassMixin(callable, t1._async_evaluate$_compileContext); + }, + $signature: 168 + }; + A._EvaluateVisitor__closure5.prototype = { + call$0() { + var t1 = this.$this._async_evaluate$_environment, + t2 = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t3 = this.module; + return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string$_text); + }, + $signature: 103 + }; + A._EvaluateVisitor_closure22.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure1($arguments); + }, + $call$body$_EvaluateVisitor_closure1($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, callableNode, t2, t3, t4, t5, t6, t7, invocation, t1, $function, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + $function = t1.$index($arguments, 0); + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + callableNode = t1._async_evaluate$_callableNode; + t2 = callableNode.get$span(callableNode); + t3 = callableNode.get$span(callableNode); + args._wereKeywordsAccessed = true; + t4 = args._keywords; + if (t4.get$isEmpty(t4)) + t4 = null; + else { + t5 = type$.Value; + t6 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t5); + for (args._wereKeywordsAccessed = true, t4 = A.MapExtensions_get_pairs(t4, type$.String, t5), t4 = t4.get$iterator(t4); t4.moveNext$0();) { + t7 = t4.get$current(t4); + t6.$indexSet(0, new A.SassString(t7._0, false), t7._1); + } + t4 = new A.ValueExpression(new A.SassMap(A.ConstantMap_ConstantMap$from(t6, t5, t5)), callableNode.get$span(callableNode)); + } + invocation = A.ArgumentList$(B.List_empty9, B.Map_empty4, B.Map_empty5, t2, t4, new A.ValueExpression(args, t3)); + $async$goto = $function instanceof A.SassString ? 3 : 4; + break; + case 3: + // then + A.warnForDeprecation(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_c4i); + callableNode = t1._async_evaluate$_callableNode; + t2 = $function._string$_text; + t3 = callableNode.get$span(callableNode); + t1 = t1.visitFunctionExpression$1(0, new A.FunctionExpression(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); + $async$goto = 5; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$1); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + t2 = $function.assertFunction$1("function").assertCompileContext$1(t1._async_evaluate$_compileContext); + t3 = t1._async_evaluate$_callableNode; + t3.toString; + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate$_runFunctionCallable$3(invocation, t2.callable, t3), $async$call$1); + case 6: + // returning from await. + t3 = $async$result; + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 190 + }; + A._EvaluateVisitor_closure23.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure0($arguments); + }, + $call$body$_EvaluateVisitor_closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, withMap, t2, t3, values, span, configuration, t1, url; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map$_contents; + t1 = $async$self.$this; + t2 = t1._async_evaluate$_callableNode; + t2.toString; + if (withMap != null) { + t3 = {}; + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + span = t2.get$span(t2); + t3.privateDeprecation = false; + withMap.forEach$1(0, new A._EvaluateVisitor__closure3(t3, values, span, t2)); + configuration = new A.ExplicitConfiguration(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null; + t3 = t2.get$span(t2); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure4(t1), t3.get$sourceUrl(t3), configuration, true), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 169 + }; + A._EvaluateVisitor__closure3.prototype = { + call$2(variable, value) { + var _this = this, + t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string$_text, "_", "-"); + t1 = _this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + else if (B.JSString_methods.startsWith$1($name, "-") && !_this._box_0.privateDeprecation) { + _this._box_0.privateDeprecation = true; + A.warnForDeprecation("Configuring private variables (such as $" + $name + string$.x29x20is_dT, B.Deprecation_mXO); + } + t1.$indexSet(0, $name, new A.ConfiguredValue(value, _this.span, _this.callableNode)); + }, + $signature: 99 + }; + A._EvaluateVisitor__closure4.prototype = { + call$2(module, _) { + var t1 = this.$this; + return t1._async_evaluate$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 363 + }; + A._EvaluateVisitor_closure24.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure($arguments); + }, + $call$body$_EvaluateVisitor_closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, callableNode, invocation, t1, mixin, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + mixin = t1.$index($arguments, 0); + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + callableNode = t1._async_evaluate$_callableNode; + invocation = A.ArgumentList$(B.List_empty9, B.Map_empty4, B.Map_empty5, callableNode.get$span(callableNode), null, new A.ValueExpression(args, callableNode.get$span(callableNode))); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_applyMixin$5(mixin.assertMixin$1("mixin").assertCompileContext$1(t1._async_evaluate$_compileContext).callable, t1._async_evaluate$_environment._async_environment$_content, invocation, callableNode, callableNode), $async$call$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 169 + }; + A._EvaluateVisitor_run_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet), + $async$returnValue, $async$self = this, module, t1, t2, _0_0, url; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = t1.span; + _0_0 = t2.get$sourceUrl(t2); + url = null; + if (_0_0 != null) { + url = _0_0; + t2 = $async$self.$this; + t2._async_evaluate$_activeModules.$indexSet(0, url, null); + t2._async_evaluate$_loadedUrls.add$1(0, url); + } + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t2._async_evaluate$_addExceptionTrace$1$1(new A._EvaluateVisitor_run__closure0(t2, $async$self.importer, t1), type$.Module_AsyncCallable), $async$call$0); + case 3: + // returning from await. + module = $async$result; + $async$returnValue = new A._Record_2_loadedUrls_stylesheet(t2._async_evaluate$_loadedUrls, t2._async_evaluate$_combineCss$1(module)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 365 + }; + A._EvaluateVisitor_run__closure0.prototype = { + call$0() { + return this.$this._async_evaluate$_execute$2(this.importer, this.node); + }, + $signature: 366 + }; + A._EvaluateVisitor__loadModule_closure1.prototype = { + call$0() { + return this.callback.call$2(this._box_0.builtInModule, false); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure2.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__loadModule_closure(); + }, + $call$body$_EvaluateVisitor__loadModule_closure() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$handler = 1, $async$errorStack = [], $async$next = [], $async$self = this, canonicalUrl, oldInDependency, isDependency, t4, message, t1, stylesheet, importer, t2, t3, _1_0, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + stylesheet = null; + importer = null; + t2 = $async$self.$this; + t3 = $async$self.nodeWithSpan; + $async$goto = 2; + return A._asyncAwait(t2._async_evaluate$_loadStylesheet$3$baseUrl($async$self.url.toString$0(0), t3.get$span(t3), $async$self.baseUrl), $async$call$0); + case 2: + // returning from await. + _1_0 = $async$result; + stylesheet = _1_0._0; + importer = _1_0._1; + isDependency = _1_0._2; + t4 = stylesheet.span; + canonicalUrl = t4.get$sourceUrl(t4); + if (canonicalUrl != null) { + t4 = t2._async_evaluate$_activeModules; + if (t4.containsKey$1(canonicalUrl)) { + message = $async$self.namesInErrors ? "Module loop: " + $.$get$context().prettyUri$1(canonicalUrl) + " is already being loaded." : string$.Modulel; + t1 = A.NullableExtension_andThen(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure1(t2, message)); + throw A.wrapException(t1 == null ? t2._async_evaluate$_exception$1(message) : t1); + } else + t4.$indexSet(0, canonicalUrl, t3); + } + t4 = t2._async_evaluate$_modules.containsKey$1(canonicalUrl); + oldInDependency = t2._async_evaluate$_inDependency; + t2._async_evaluate$_inDependency = isDependency; + t1.module = null; + $async$handler = 3; + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(t2._async_evaluate$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, $async$self.configuration, $async$self.namesInErrors, t3), $async$call$0); + case 6: + // returning from await. + $async$temp1.module = $async$result; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [1]; + case 4: + // finally + $async$handler = 1; + t2._async_evaluate$_activeModules.remove$1(0, canonicalUrl); + t2._async_evaluate$_inDependency = oldInDependency; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + $async$goto = 7; + return A._asyncAwait(t2._addExceptionSpanAsync$1$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure2(t1, $async$self.callback, !t4), false, type$.void), $async$call$0); + case 7: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__loadModule__closure1.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 111 + }; + A._EvaluateVisitor__loadModule__closure2.prototype = { + call$0() { + return this.callback.call$2(this._box_1.module, this.firstLoad); + }, + $signature: 0 + }; + A._EvaluateVisitor__execute_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t3, t4, t5, t6, t1, oldImporter, oldStylesheet, oldRoot, oldPreModuleComments, oldParent, oldEndOfImports, oldOutOfOrderImports, oldExtensionStore, t2, oldStyleRule, oldMediaQueries, oldDeclarationName, oldInUnknownAtRule, oldInKeyframes, oldConfiguration; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate$_importer; + oldStylesheet = t1._async_evaluate$__stylesheet; + oldRoot = t1._async_evaluate$__root; + oldPreModuleComments = t1._async_evaluate$_preModuleComments; + oldParent = t1._async_evaluate$__parent; + oldEndOfImports = t1._async_evaluate$__endOfImports; + oldOutOfOrderImports = t1._async_evaluate$_outOfOrderImports; + oldExtensionStore = t1._async_evaluate$__extensionStore; + t2 = t1._async_evaluate$_atRootExcludingStyleRule; + oldStyleRule = t2 ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + oldMediaQueries = t1._async_evaluate$_mediaQueries; + oldDeclarationName = t1._async_evaluate$_declarationName; + oldInUnknownAtRule = t1._async_evaluate$_inUnknownAtRule; + oldInKeyframes = t1._async_evaluate$_inKeyframes; + oldConfiguration = t1._async_evaluate$_configuration; + t1._async_evaluate$_importer = $async$self.importer; + t3 = t1._async_evaluate$__stylesheet = $async$self.stylesheet; + t4 = t3.span; + t5 = t1._async_evaluate$__parent = t1._async_evaluate$__root = A.ModifiableCssStylesheet$(t4); + t1._async_evaluate$__endOfImports = 0; + t1._async_evaluate$_outOfOrderImports = null; + t1._async_evaluate$__extensionStore = $async$self.extensionStore; + t1._async_evaluate$_declarationName = t1._async_evaluate$_mediaQueries = t1._async_evaluate$_styleRuleIgnoringAtRoot = null; + t1._async_evaluate$_inKeyframes = t1._async_evaluate$_atRootExcludingStyleRule = t1._async_evaluate$_inUnknownAtRule = false; + t6 = $async$self.configuration; + if (t6 != null) + t1._async_evaluate$_configuration = t6; + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(0, t3), $async$call$0); + case 2: + // returning from await. + t3 = t1._async_evaluate$_outOfOrderImports == null ? t5 : new A.CssStylesheet(new A.UnmodifiableListView(t1._async_evaluate$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode), t4); + $async$self.css.__late_helper$_value = t3; + $async$self.preModuleComments.__late_helper$_value = t1._async_evaluate$_preModuleComments; + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = oldStylesheet; + t1._async_evaluate$__root = oldRoot; + t1._async_evaluate$_preModuleComments = oldPreModuleComments; + t1._async_evaluate$__parent = oldParent; + t1._async_evaluate$__endOfImports = oldEndOfImports; + t1._async_evaluate$_outOfOrderImports = oldOutOfOrderImports; + t1._async_evaluate$__extensionStore = oldExtensionStore; + t1._async_evaluate$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._async_evaluate$_mediaQueries = oldMediaQueries; + t1._async_evaluate$_declarationName = oldDeclarationName; + t1._async_evaluate$_inUnknownAtRule = oldInUnknownAtRule; + t1._async_evaluate$_atRootExcludingStyleRule = t2; + t1._async_evaluate$_inKeyframes = oldInKeyframes; + t1._async_evaluate$_configuration = oldConfiguration; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__combineCss_closure1.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 102 + }; + A._EvaluateVisitor__combineCss_closure2.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__combineCss_visitModule0.prototype = { + call$1(module) { + var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; + if (!_this.seen.add$1(0, module)) + return; + if (_this.clone) + module = module.cloneCss$0(); + for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss()) { + _1_0 = module.get$preModuleComments().$index(0, upstream); + if (_1_0 != null) + B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); + _this.call$1(upstream); + } + } + _this.sorted.addFirst$1(module); + t1 = module.get$css(module); + statements = t1.get$children(t1); + index = _this.$this._async_evaluate$_indexAfterImports$1(statements); + t1 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); + }, + $signature: 374 + }; + A._EvaluateVisitor__extendModules_closure1.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__extendModules_closure2.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore); + }, + $signature: 170 + }; + A._EvaluateVisitor_visitAtRootRule_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRootRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__scopeForAtRoot_closure5.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, oldParent; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldParent = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent"); + t1._async_evaluate$__parent = $async$self.newParent; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.scope$1$2$when(callback, $async$self.node.hasDeclarations, type$.void), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$__parent = oldParent; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure6.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, oldAtRootExcludingStyleRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldAtRootExcludingStyleRule = t1._async_evaluate$_atRootExcludingStyleRule; + t1._async_evaluate$_atRootExcludingStyleRule = true; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure7.prototype = { + call$1(callback) { + return this.$this._async_evaluate$_withMediaQueries$1$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure0(this.innerScope, callback), type$.Null); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot__closure0.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 2 + }; + A._EvaluateVisitor__scopeForAtRoot_closure8.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInKeyframes; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInKeyframes = t1._async_evaluate$_inKeyframes; + t1._async_evaluate$_inKeyframes = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_inKeyframes = wasInKeyframes; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure9.prototype = { + call$1($parent) { + return $parent instanceof A.ModifiableCssAtRule; + }, + $signature: 172 + }; + A._EvaluateVisitor__scopeForAtRoot_closure10.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInUnknownAtRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInUnknownAtRule = t1._async_evaluate$_inUnknownAtRule; + t1._async_evaluate$_inUnknownAtRule = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate$_inUnknownAtRule = wasInUnknownAtRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitContentRule_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$returnValue, $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.content.declaration.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitDeclaration_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._box_0.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitEachRule_closure2.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._async_evaluate$_environment.setLocalVariable$3(this._box_0.variable, t1._async_evaluate$_withoutSlash$2(value, t2), t2); + }, + $signature: 58 + }; + A._EvaluateVisitor_visitEachRule_closure3.prototype = { + call$1(value) { + return this.$this._async_evaluate$_setMultipleVariables$3(this._box_1.variables, value, this.nodeWithSpan); + }, + $signature: 58 + }; + A._EvaluateVisitor_visitEachRule_closure4.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._async_evaluate$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure0(t1, _this.setVariables, _this.node)); + }, + $signature: 69 + }; + A._EvaluateVisitor_visitEachRule__closure0.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._async_evaluate$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure0(t1)); + }, + $signature: 418 + }; + A._EvaluateVisitor_visitEachRule___closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 87 + }; + A._EvaluateVisitor_visitAtRule_closure3.prototype = { + call$1(value) { + return this.$this._async_evaluate$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 348 + }; + A._EvaluateVisitor_visitAtRule_closure4.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null || t1._async_evaluate$_inKeyframes || $async$self.name.value === "font-face" ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule._style_rule$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure0(t1, $async$self.children), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule_closure6.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitForRule_closure4.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.from.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 175 + }; + A._EvaluateVisitor_visitForRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.to.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 175 + }; + A._EvaluateVisitor_visitForRule_closure6.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure7.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure8.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, i, t3, t4, t5, t6, t7, t8, _0_0, t1, t2, nodeWithSpan; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.node; + nodeWithSpan = t1._async_evaluate$_expressionNode$1(t2.from); + i = $async$self.from, t3 = $async$self._box_0, t4 = $async$self.direction, t5 = t2.variable, t6 = $async$self.fromNumber, t2 = t2.children; + case 3: + // for condition + if (!(i !== t3.to)) { + // goto after for + $async$goto = 5; + break; + } + t7 = t1._async_evaluate$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure0(t1)), $async$call$0); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + i += t4; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 69 + }; + A._EvaluateVisitor_visitForRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 87 + }; + A._EvaluateVisitor_visitForwardRule_closure1.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._async_evaluate$_registerCommentsForModule$1(module); + this.$this._async_evaluate$_environment.forwardModule$2(module, this.node); + }, + $signature: 141 + }; + A._EvaluateVisitor_visitForwardRule_closure2.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._async_evaluate$_registerCommentsForModule$1(module); + this.$this._async_evaluate$_environment.forwardModule$2(module, this.node); + }, + $signature: 141 + }; + A._EvaluateVisitor__registerCommentsForModule_closure0.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_CssComment); + }, + $signature: 177 + }; + A._EvaluateVisitor_visitIfRule_closure0.prototype = { + call$1(clause) { + var t1 = this.$this; + return t1._async_evaluate$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure0(t1, clause), true, clause.hasDeclarations, type$.nullable_Value); + }, + $signature: 449 + }; + A._EvaluateVisitor_visitIfRule__closure0.prototype = { + call$0() { + var t1 = this.$this; + return t1._async_evaluate$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure0(t1)); + }, + $signature: 69 + }; + A._EvaluateVisitor_visitIfRule___closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 87 + }; + A._EvaluateVisitor__visitDynamicImport_closure0.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__visitDynamicImport_closure(); + }, + $call$body$_EvaluateVisitor__visitDynamicImport_closure() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t1, t2, _0_0, stylesheet, importer, isDependency, t3, url, oldImporter, oldStylesheet, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, t11, environment, module, visitor, _box_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; + t1 = $async$self.$this; + t2 = $async$self.$import; + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), $async$call$0); + case 3: + // returning from await. + _0_0 = $async$result; + stylesheet = _box_0.stylesheet = _0_0._0; + importer = _0_0._1; + _box_0.importer = importer; + isDependency = _0_0._2; + _box_0.isDependency = isDependency; + t3 = stylesheet.span; + url = t3.get$sourceUrl(t3); + if (url != null) { + t3 = t1._async_evaluate$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure3(t1)); + throw A.wrapException(t2 == null ? t1._async_evaluate$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._uses; + t3 = type$.UnmodifiableListView_UseRule; + $async$goto = new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule).get$length(0) === 0 ? 4 : 5; + break; + case 4: + // then + oldImporter = t1._async_evaluate$_importer; + oldStylesheet = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__stylesheet, "_stylesheet"); + oldInDependency = t1._async_evaluate$_inDependency; + t1._async_evaluate$_importer = importer; + t1._async_evaluate$__stylesheet = stylesheet; + t1._async_evaluate$_inDependency = isDependency; + $async$goto = 6; + return A._asyncAwait(t1.visitStylesheet$1(0, stylesheet), $async$call$0); + case 6: + // returning from await. + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = oldStylesheet; + t1._async_evaluate$_inDependency = oldInDependency; + t1._async_evaluate$_activeModules.remove$1(0, url); + // goto return + $async$goto = 1; + break; + case 5: + // join + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure4())) { + t2 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure5()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._async_evaluate$_environment; + t3 = type$.String; + t4 = type$.Module_AsyncCallable; + t5 = type$.AstNode; + t6 = t2._async_environment$_nestedForwardedModules; + t7 = A._setArrayType([], type$.JSArray_Module_AsyncCallable); + t8 = t2._async_environment$_variables; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._async_environment$_variableNodes; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._async_environment$_functions; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + t11 = t2._async_environment$_mixins; + t11 = A._setArrayType(t11.slice(0), A._arrayInstanceType(t11)); + environment = A.AsyncEnvironment$_(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._async_environment$_importedModules, null, t6, t7, t8, t9, t10, t11, t2._async_environment$_content, t2._async_environment$_configurableVariables); + $async$goto = 7; + return A._asyncAwait(t1._async_evaluate$_withEnvironment$1$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure6(_box_0, t1, loadsUserDefinedModules, environment, children), type$.Null), $async$call$0); + case 7: + // returning from await. + module = environment.toDummyModule$0(); + t1._async_evaluate$_environment.importForwards$1(module); + $async$goto = loadsUserDefinedModules ? 8 : 9; + break; + case 8: + // then + $async$goto = module.transitivelyContainsCss ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(t1._async_evaluate$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1), $async$call$0); + case 12: + // returning from await. + case 11: + // join + visitor = new A._ImportedCssVisitor0(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + case 9: + // join + t1._async_evaluate$_activeModules.remove$1(0, url); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__visitDynamicImport__closure3.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 111 + }; + A._EvaluateVisitor__visitDynamicImport__closure4.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 178 + }; + A._EvaluateVisitor__visitDynamicImport__closure5.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 179 + }; + A._EvaluateVisitor__visitDynamicImport__closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t3, t4, t1, oldImporter, oldStylesheet, oldRoot, oldParent, oldEndOfImports, oldOutOfOrderImports, oldConfiguration, oldInDependency, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate$_importer; + oldStylesheet = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__stylesheet, "_stylesheet"); + oldRoot = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root"); + oldParent = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent"); + oldEndOfImports = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, "_endOfImports"); + oldOutOfOrderImports = t1._async_evaluate$_outOfOrderImports; + oldConfiguration = t1._async_evaluate$_configuration; + oldInDependency = t1._async_evaluate$_inDependency; + t2 = $async$self._box_0; + t1._async_evaluate$_importer = t2.importer; + t3 = t2.stylesheet; + t1._async_evaluate$__stylesheet = t3; + t4 = $async$self.loadsUserDefinedModules; + if (t4) { + t3 = A.ModifiableCssStylesheet$(t3.span); + t1._async_evaluate$__root = t3; + t1._async_evaluate$__parent = t1._async_evaluate$_assertInModule$2(t3, "_root"); + t1._async_evaluate$__endOfImports = 0; + t1._async_evaluate$_outOfOrderImports = null; + } + t1._async_evaluate$_inDependency = t2.isDependency; + t3 = new A.UnmodifiableListView(t2.stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + if (!t3.get$isEmpty(t3)) + t1._async_evaluate$_configuration = $async$self.environment.toImplicitConfiguration$0(); + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(0, t2.stylesheet), $async$call$0); + case 2: + // returning from await. + t2 = t4 ? t1._async_evaluate$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode); + $async$self.children.__late_helper$_value = t2; + t1._async_evaluate$_importer = oldImporter; + t1._async_evaluate$__stylesheet = oldStylesheet; + if (t4) { + t1._async_evaluate$__root = oldRoot; + t1._async_evaluate$__parent = oldParent; + t1._async_evaluate$__endOfImports = oldEndOfImports; + t1._async_evaluate$_outOfOrderImports = oldOutOfOrderImports; + } + t1._async_evaluate$_configuration = oldConfiguration; + t1._async_evaluate$_inDependency = oldInDependency; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__applyMixin_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure2(t1, $async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__applyMixin__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self.$this._async_evaluate$_runBuiltInCallable$3($async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__applyMixin_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.withContent$2($async$self.contentCallable, new A._EvaluateVisitor__applyMixin__closure1(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__applyMixin__closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure0(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__applyMixin___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, t4, t5, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.mixin.declaration.children, t2 = t1.length, t3 = $async$self.$this, t4 = $async$self.nodeWithSpanWithoutContent, t5 = type$.nullable_Value, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t3._async_evaluate$_addErrorSpan$1$2(t4, new A._EvaluateVisitor__applyMixin____closure0(t3, t1[_i]), t5), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__applyMixin____closure0.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 69 + }; + A._EvaluateVisitor_visitIncludeRule_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 103 + }; + A._EvaluateVisitor_visitIncludeRule_closure3.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable($content, t1._async_evaluate$_environment.closure$0(), t1._async_evaluate$_inDependency, type$.UserDefinedCallable_AsyncEnvironment); + }, + $signature: 454 + }; + A._EvaluateVisitor_visitIncludeRule_closure4.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 16 + }; + A._EvaluateVisitor_visitMediaRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule_closure4.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 89 + }; + A._EvaluateVisitor_visitMediaRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure0(t1, $async$self.node), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 6: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 8; + break; + } + $async$goto = 9; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 9: + // returning from await. + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule_closure6.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitStyleRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure5.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor__warnForBogusCombinators_closure0.prototype = { + call$1(child) { + return child instanceof A.ModifiableCssComment; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitSupportsRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate$_withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure0(t1, $async$self.node), type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 6: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 8; + break; + } + $async$goto = 9; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 9: + // returning from await. + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor__visitSupportsCondition_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self._box_0; + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(t1._evaluateToCss$1(t2.declaration.name), $async$call$0); + case 3: + // returning from await. + t3 = $async$temp1.S($async$result); + t4 = t2.declaration.get$isCustomProperty() ? "" : " "; + $async$temp1 = "(" + t3 + ":" + t4; + $async$temp2 = A; + $async$goto = 4; + return A._asyncAwait(t1._evaluateToCss$1(t2.declaration.value), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 181 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure2.prototype = { + call$0() { + var t1 = this.$this._async_evaluate$_environment, + t2 = this._box_0.override; + t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure3.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 44 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._async_evaluate$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._async_evaluate$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure0.prototype = { + call$2(module, firstLoad) { + var t1, t2, t3, _0_0, t4, t5, span; + if (firstLoad) + this.$this._async_evaluate$_registerCommentsForModule$1(module); + t1 = this.$this._async_evaluate$_environment; + t2 = this.node; + t3 = t2.namespace; + if (t3 == null) { + t1._async_environment$_globalModules.$indexSet(0, module, t2); + t1._async_environment$_allModules.push(module); + t1 = B.JSArray_methods.get$first(t1._async_environment$_variables); + _0_0 = A.IterableExtension_firstWhereOrNull(t1.get$keys(t1), module.get$variables().get$containsKey()); + if (_0_0 != null) + A.throwExpression(A.SassScriptException$(string$.This_ma + _0_0 + '".', null)); + } else { + t4 = t1._async_environment$_modules; + if (t4.containsKey$1(t3)) { + t5 = t1._async_environment$_namespaceNodes.$index(0, t3); + span = t5 == null ? null : t5.span; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t5.$indexSet(0, span, "original @use"); + A.throwExpression(A.MultiSpanSassScriptException$(string$.There_ + t3 + '".', "new @use", t5)); + } + t4.$indexSet(0, t3, module); + t1._async_environment$_namespaceNodes.$indexSet(0, t3, t2); + t1._async_environment$_allModules.push(module); + } + }, + $signature: 141 + }; + A._EvaluateVisitor_visitWarnRule_closure0.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 72 + }; + A._EvaluateVisitor_visitWhileRule_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value), + $async$returnValue, $async$self = this, t1, t2, t3, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node, t2 = t1.condition, t3 = $async$self.$this, t1 = t1.children; + case 3: + // for condition + $async$goto = 5; + return A._asyncAwait(t2.accept$1(t3), $async$call$0); + case 5: + // returning from await. + if (!$async$result.get$isTruthy()) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 6; + return A._asyncAwait(t3._async_evaluate$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure0(t3)), $async$call$0); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + // goto for condition + $async$goto = 3; + break; + case 4: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 69 + }; + A._EvaluateVisitor_visitWhileRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 87 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t3, t1, t2, left, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t1.left.accept$1(t2), $async$call$0); + case 3: + // returning from await. + left = $async$result; + case 4: + // switch + switch (t1.operator.index) { + case 0: + // goto case + $async$goto = 6; + break; + case 1: + // goto case + $async$goto = 7; + break; + case 2: + // goto case + $async$goto = 8; + break; + case 3: + // goto case + $async$goto = 9; + break; + case 4: + // goto case + $async$goto = 10; + break; + case 5: + // goto case + $async$goto = 11; + break; + case 6: + // goto case + $async$goto = 12; + break; + case 7: + // goto case + $async$goto = 13; + break; + case 8: + // goto case + $async$goto = 14; + break; + case 9: + // goto case + $async$goto = 15; + break; + case 10: + // goto case + $async$goto = 16; + break; + case 11: + // goto case + $async$goto = 17; + break; + case 12: + // goto case + $async$goto = 18; + break; + case 13: + // goto case + $async$goto = 19; + break; + default: + // goto default + $async$goto = 20; + break; + } + break; + case 6: + // case + t1 = t1.right.accept$1(t2); + $async$goto = 21; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 21: + // returning from await. + t1 = $async$result; + t1 = new A.SassString(A.serializeValue(left, false, true) + "=" + A.serializeValue(t1, false, true), false); + // goto after switch + $async$goto = 5; + break; + case 7: + // case + $async$goto = left.get$isTruthy() ? 22 : 24; + break; + case 22: + // then + t1 = left; + // goto join + $async$goto = 23; + break; + case 24: + // else + t1 = t1.right.accept$1(t2); + $async$goto = 25; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 25: + // returning from await. + t1 = $async$result; + case 23: + // join + // goto after switch + $async$goto = 5; + break; + case 8: + // case + $async$goto = left.get$isTruthy() ? 26 : 28; + break; + case 26: + // then + t1 = t1.right.accept$1(t2); + $async$goto = 29; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 29: + // returning from await. + t1 = $async$result; + // goto join + $async$goto = 27; + break; + case 28: + // else + t1 = left; + case 27: + // join + // goto after switch + $async$goto = 5; + break; + case 9: + // case + $async$temp1 = left; + $async$goto = 30; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 30: + // returning from await. + t1 = $async$temp1.$eq(0, $async$result) ? B.SassBoolean_true : B.SassBoolean_false; + // goto after switch + $async$goto = 5; + break; + case 10: + // case + $async$temp1 = left; + $async$goto = 31; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 31: + // returning from await. + t1 = !$async$temp1.$eq(0, $async$result) ? B.SassBoolean_true : B.SassBoolean_false; + // goto after switch + $async$goto = 5; + break; + case 11: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 32; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 32: + // returning from await. + t1 = $async$temp1.greaterThan$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 12: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 33; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 33: + // returning from await. + t1 = $async$temp1.greaterThanOrEquals$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 13: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 34; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 34: + // returning from await. + t1 = $async$temp1.lessThan$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 14: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 35; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 35: + // returning from await. + t1 = $async$temp1.lessThanOrEquals$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 15: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 36; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 36: + // returning from await. + t1 = $async$temp1.plus$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 16: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 37; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 37: + // returning from await. + t1 = $async$temp1.minus$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 17: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 38; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 38: + // returning from await. + t1 = $async$temp1.times$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 18: + // case + t3 = t1.right.accept$1(t2); + $async$temp1 = t2; + $async$temp2 = left; + $async$goto = 39; + return A._asyncAwait(type$.Future_Value._is(t3) ? t3 : A._Future$value(t3, type$.Value), $async$call$0); + case 39: + // returning from await. + t1 = $async$temp1._async_evaluate$_slash$3($async$temp2, $async$result, t1); + // goto after switch + $async$goto = 5; + break; + case 19: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 40; + return A._asyncAwait(type$.Future_Value._is(t1) ? t1 : A._Future$value(t1, type$.Value), $async$call$0); + case 40: + // returning from await. + t1 = $async$temp1.modulo$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 20: + // default + t1 = null; + case 5: + // after switch + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 72 + }; + A._EvaluateVisitor__slash_recommendation0.prototype = { + call$1(expression) { + var t1; + $label0$0: { + if (expression instanceof A.BinaryOperationExpression && B.BinaryOperator_ehp === expression.operator) { + t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + break $label0$0; + } + if (expression instanceof A.ParenthesizedExpression) { + t1 = expression.expression.toString$0(0); + break $label0$0; + } + t1 = expression.toString$0(0); + break $label0$0; + } + return t1; + }, + $signature: 133 + }; + A._EvaluateVisitor_visitVariableExpression_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 44 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure0.prototype = { + call$0() { + var t1, _this = this; + switch (_this.node.operator.index) { + case 0: + t1 = _this.operand.unaryPlus$0(); + break; + case 1: + t1 = _this.operand.unaryMinus$0(); + break; + case 2: + t1 = new A.SassString("/" + A.serializeValue(_this.operand, false, true), false); + break; + case 3: + t1 = _this.operand.unaryNot$0(); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 33 + }; + A._EvaluateVisitor_visitIfExpression_closure0.prototype = { + call$1(pair) { + return pair._0 + ": " + pair._1.toString$0(0); + }, + $signature: 183 + }; + A._EvaluateVisitor_visitIfConditionOperation_closure0.prototype = { + call$1(pair) { + return pair._1; + }, + $signature: 184 + }; + A._EvaluateVisitor_visitListExpression_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 493 + }; + A._EvaluateVisitor_visitFunctionExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_environment.getFunction$2$namespace(t1.name, t1.namespace); + }, + $signature: 103 + }; + A._EvaluateVisitor_visitFunctionExpression_closure3.prototype = { + call$1(argument) { + return argument.accept$1(B.C_IsCalculationSafeVisitor); + }, + $signature: 74 + }; + A._EvaluateVisitor_visitFunctionExpression_closure4.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 72 + }; + A._EvaluateVisitor__visitCalculation_closure0.prototype = { + call$2(message, deprecation) { + return this.$this._async_evaluate$_warn$3(message, this.node.span, deprecation); + }, + call$1(message) { + return this.call$2(message, null); + }, + $signature: 105 + }; + A._EvaluateVisitor__checkCalculationArguments_check0.prototype = { + call$1(maxArgs) { + var t1 = this.node, + t2 = t1.$arguments.positional.length; + if (t2 === 0) + throw A.wrapException(this.$this._async_evaluate$_exception$2("Missing argument.", t1.span)); + else if (maxArgs != null && t2 > maxArgs) + throw A.wrapException(this.$this._async_evaluate$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize("was", t2, "were") + " passed.", t1.span)); + }, + call$0() { + return this.call$1(null); + }, + $signature: 82 + }; + A._EvaluateVisitor__visitCalculationExpression_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2, $async$temp3; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self._box_0; + t3 = $async$self.node; + t4 = $async$self.inLegacySassFunction; + $async$temp1 = A; + $async$temp2 = t1._async_evaluate$_binaryOperatorToCalculationOperator$2(t2.operator, t3); + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t4), $async$call$0); + case 3: + // returning from await. + $async$temp3 = $async$result; + $async$goto = 4; + return A._asyncAwait(t1._async_evaluate$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t4), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1.SassCalculation_operateInternal($async$temp2, $async$temp3, $async$result, t4, !t1._async_evaluate$_inSupportsDeclaration, new A._EvaluateVisitor__visitCalculationExpression__closure0(t1, t3)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 185 + }; + A._EvaluateVisitor__visitCalculationExpression__closure0.prototype = { + call$2(message, deprecation) { + return this.$this._async_evaluate$_warn$3(message, this.node.get$span(0), deprecation); + }, + call$1(message) { + return this.call$2(message, null); + }, + $signature: 105 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 72 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable, + t3 = _this.V; + return t1._async_evaluate$_withEnvironment$1$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure0(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, t3), t3); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._async_evaluate$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure0(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure0.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__runUserDefinedCallable___closure(this.V); + }, + $call$body$_EvaluateVisitor__runUserDefinedCallable___closure($async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, parameters, t5, minLength, i, parameter, t6, value, t7, t8, restParameter, rest, argumentList, result, parameterWord, t1, t2, t3, t4, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.evaluated._values; + t3 = $async$self.callable.declaration.parameters; + t4 = $async$self.nodeWithSpan; + t1._async_evaluate$_verifyArguments$4(J.get$length$asx(t2[2]), t2[0], t3, t4); + parameters = t3.parameters; + t5 = parameters.length; + minLength = Math.min(J.get$length$asx(t2[2]), t5); + for (i = 0; i < minLength; ++i) + t1._async_evaluate$_environment.setLocalVariable$3(parameters[i].name, J.$index$asx(t2[2], i), J.$index$asx(t2[3], i)); + i = J.get$length$asx(t2[2]); + case 3: + // for condition + if (!(i < t5)) { + // goto after for + $async$goto = 5; + break; + } + parameter = parameters[i]; + t6 = parameter.name; + value = t2[0].remove$1(0, t6); + $async$goto = value == null ? 6 : 7; + break; + case 6: + // then + t7 = parameter.defaultValue; + $async$temp1 = t1; + $async$goto = 8; + return A._asyncAwait(t7.accept$1(t1), $async$call$0); + case 8: + // returning from await. + value = $async$temp1._async_evaluate$_withoutSlash$2($async$result, t1._async_evaluate$_expressionNode$1(t7)); + case 7: + // join + t7 = t1._async_evaluate$_environment; + t8 = t2[1].$index(0, t6); + if (t8 == null) { + t8 = parameter.defaultValue; + t8.toString; + t8 = t1._async_evaluate$_expressionNode$1(t8); + } + t7.setLocalVariable$3(t6, value, t8); + case 4: + // for update + ++i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + restParameter = t3.restParameter; + if (restParameter != null) { + rest = J.get$length$asx(t2[2]) > t5 ? J.sublist$1$ax(t2[2], t5) : B.List_empty8; + t5 = t2[0]; + t6 = t2[4]; + argumentList = A.SassArgumentList$(rest, t5, t6 === B.ListSeparator_undecided_null_3_undecided ? B.ListSeparator_z0K : t6); + t1._async_evaluate$_environment.setLocalVariable$3(restParameter, argumentList, t4); + } else + argumentList = null; + $async$goto = 9; + return A._asyncAwait($async$self.run.call$0(), $async$call$0); + case 9: + // returning from await. + result = $async$result; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t5 = t2[0]; + if (t5.get$isEmpty(t5)) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t5 = t2[0]; + t5 = t5.get$keys(t5); + parameterWord = A.pluralize("parameter", t5.get$length(t5), null); + t2 = t2[0]; + t2 = t2.get$keys(t2); + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + parameterWord + " named " + A.toSentence(t2.map$1$1(t2, new A._EvaluateVisitor__runUserDefinedCallable____closure0(), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._async_evaluate$_stackTrace$1(t4.get$span(t4)), null)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure0.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__runFunctionCallable_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, $returnValue; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t2[_i].accept$1(t4), $async$call$0); + case 6: + // returning from await. + $returnValue = $async$result; + if ($returnValue instanceof A.Value) { + $async$returnValue = $returnValue; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + throw A.wrapException(t4._async_evaluate$_exception$2("Function finished without @return.", t1.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 72 + }; + A._EvaluateVisitor__runBuiltInCallable_closure2.prototype = { + call$0() { + return this._box_0.overload.verify$2(J.get$length$asx(this.evaluated._values[2]), this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure3.prototype = { + call$0() { + return this._box_0.callback.call$1(this.evaluated._values[2]); + }, + $signature: 533 + }; + A._EvaluateVisitor__runBuiltInCallable_closure4.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__evaluateArguments_closure3.prototype = { + call$1(value) { + return value; + }, + $signature: 43 + }; + A._EvaluateVisitor__evaluateArguments_closure4.prototype = { + call$1(value) { + return this.$this._async_evaluate$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 43 + }; + A._EvaluateVisitor__evaluateArguments_closure5.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._async_evaluate$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 109 + }; + A._EvaluateVisitor__evaluateArguments_closure6.prototype = { + call$1(value) { + return value; + }, + $signature: 43 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure3.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(value, t1.get$span(t1)); + }, + $signature: 60 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure4.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(this.$this._async_evaluate$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 60 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure5.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression(_this.$this._async_evaluate$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 109 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure6.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression(this.$this._async_evaluate$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 60 + }; + A._EvaluateVisitor__addRestMap_closure0.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString) + _this.values.$indexSet(0, key._string$_text, _this.convert.call$1(t1._async_evaluate$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._async_evaluate$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 99 + }; + A._EvaluateVisitor__verifyArguments_closure0.prototype = { + call$0() { + return this.parameters.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitCssAtRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssAtRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssAtRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure1.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssMediaRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule_closure4.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 89 + }; + A._EvaluateVisitor_visitCssMediaRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.node.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure0(t1, $async$self.node), false, type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); + case 6: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 7; + break; + } + t4 = t2.__internal$_current; + $async$goto = 8; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 8: + // returning from await. + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule___closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule_closure6.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssStyleRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitCssStyleRule__closure0(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure3.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate$_atRootExcludingStyleRule ? null : t1._async_evaluate$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate$_withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure0(t1, $async$self.node), type$.ModifiableCssStyleRule, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); + case 6: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 7; + break; + } + t4 = t2.__internal$_current; + $async$goto = 8; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 8: + // returning from await. + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor__performInterpolationHelper_closure0.prototype = { + call$1(targetOffsets) { + return A.InterpolationMap$(this.interpolation, targetOffsets); + }, + $signature: 143 + }; + A._EvaluateVisitor__serialize_closure0.prototype = { + call$0() { + return A.serializeValue(this.value, false, this.quote); + }, + $signature: 29 + }; + A._EvaluateVisitor__expressionNode_closure0.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._async_evaluate$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 188 + }; + A._EvaluateVisitor__withoutSlash_recommendation0.prototype = { + call$1(number) { + var before, after, t1, + _1_0 = number.asSlash; + $label0$0: { + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { + before = _1_0._0; + after = _1_0._1; + t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; + break $label0$0; + } + t1 = A.serializeValue(number, true, true); + break $label0$0; + } + return t1; + }, + $signature: 189 + }; + A._EvaluateVisitor__stackFrame_closure0.prototype = { + call$1(url) { + var t1 = this.$this._async_evaluate$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 49 + }; + A._ImportedCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure0(); + this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$1(node); + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._async_evaluate$_visitor; + if (t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__parent, "__parent") !== t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root")) + t1._async_evaluate$_addChild$1(node); + else if (t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, _s13_) === J.get$length$asx(t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__root, "_root").children._collection$_source)) { + t1._async_evaluate$_addChild$1(node); + t1._async_evaluate$__endOfImports = t1._async_evaluate$_assertInModule$2(t1._async_evaluate$__endOfImports, _s13_) + 1; + } else { + t2 = t1._async_evaluate$_outOfOrderImports; + (t2 == null ? t1._async_evaluate$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._async_evaluate$_visitor, + mediaQueries = t1._async_evaluate$_mediaQueries; + t1._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure0(mediaQueries == null || t1._async_evaluate$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure0()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._async_evaluate$_visitor._async_evaluate$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure0()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure0.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) + t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule; + else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluationContext0.prototype = { + get$currentCallableSpan() { + var _0_0 = this._async_evaluate$_visitor._async_evaluate$_callableNode; + if (_0_0 != null) + return _0_0.get$span(_0_0); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2(_, message, deprecation) { + var t1 = this._async_evaluate$_visitor, + t2 = t1._async_evaluate$_importSpan; + if (t2 == null) { + t2 = t1._async_evaluate$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._async_evaluate$_warn$3(message, t2 == null ? this._async_evaluate$_defaultWarnNodeWithSpan.span : t2, deprecation); + } + }; + A._CloneCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless, + rule = A.ModifiableCssAtRule$(node.name, node.span, t1, node.value); + return t1 ? rule : this._visitChildren$2(rule, node); + }, + visitCssComment$1(node) { + return new A.ModifiableCssComment(node.text, node.span); + }, + visitCssDeclaration$1(node) { + return A.ModifiableCssDeclaration$(node.name, node.value, node.span, node.parsedAsSassScript, node.valueSpanForMap); + }, + visitCssImport$1(node) { + return new A.ModifiableCssImport(node.url, node.modifiers, node.span); + }, + visitCssKeyframeBlock$1(node) { + return this._visitChildren$2(A.ModifiableCssKeyframeBlock$(node.selector, node.span), node); + }, + visitCssMediaRule$1(node) { + return this._visitChildren$2(A.ModifiableCssMediaRule$(node.queries, node.span), node); + }, + visitCssStyleRule$1(node) { + var _0_0 = this._oldToNewSelectors.$index(0, node._style_rule$_selector._box$_inner.value); + if (_0_0 != null) + return this._visitChildren$2(A.ModifiableCssStyleRule$(_0_0, node.span, false, node.originalSelector), node); + else + throw A.wrapException(A.StateError$(string$.The_Ex)); + }, + visitCssStylesheet$1(node) { + return this._visitChildren$2(A.ModifiableCssStylesheet$(node.get$span(node)), node); + }, + visitCssSupportsRule$1(node) { + return this._visitChildren$2(A.ModifiableCssSupportsRule$(node.condition, node.span), node); + }, + _visitChildren$1$2(newParent, oldParent) { + var t1, t2, newChild; + for (t1 = J.get$iterator$ax(oldParent.get$children(oldParent)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + newChild = t2.accept$1(this); + newChild.isGroupEnd = t2.get$isGroupEnd(); + newParent.addChild$1(newChild); + } + return newParent; + }, + _visitChildren$2(newParent, oldParent) { + return this._visitChildren$1$2(newParent, oldParent, type$.ModifiableCssParentNode); + } + }; + A.Evaluator.prototype = {}; + A._EvaluateVisitor.prototype = { + get$_hasCssNesting() { + var _0_0, t1, grandparent, + $parent = this._atRootExcludingStyleRule ? null : this._styleRuleIgnoringAtRoot; + for (;; $parent = grandparent) { + _0_0 = $parent == null ? null : $parent._parent; + if (_0_0 instanceof A.ModifiableCssStyleRule) + return true; + t1 = _0_0 != null; + grandparent = t1 ? _0_0 : null; + if (t1) + continue; + return false; + } + }, + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + _s7_ = "$module", + t1 = type$.JSArray_BuiltInCallable, + metaFunctions = A._setArrayType([A.BuiltInCallable$function("global-variable-exists", _s20_, new A._EvaluateVisitor_closure(_this), _s9_), A.BuiltInCallable$function("variable-exists", "$name", new A._EvaluateVisitor_closure0(_this), _s9_), A.BuiltInCallable$function("function-exists", _s20_, new A._EvaluateVisitor_closure1(_this), _s9_), A.BuiltInCallable$function("mixin-exists", _s20_, new A._EvaluateVisitor_closure2(_this), _s9_), A.BuiltInCallable$function("content-exists", "", new A._EvaluateVisitor_closure3(_this), _s9_), A.BuiltInCallable$function("module-variables", _s7_, new A._EvaluateVisitor_closure4(_this), _s9_), A.BuiltInCallable$function("module-functions", _s7_, new A._EvaluateVisitor_closure5(_this), _s9_), A.BuiltInCallable$function("module-mixins", _s7_, new A._EvaluateVisitor_closure6(_this), _s9_), A.BuiltInCallable$function("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure7(_this), _s9_), A.BuiltInCallable$function("get-mixin", _s20_, new A._EvaluateVisitor_closure8(_this), _s9_), A.BuiltInCallable$function("call", "$function, $args...", new A._EvaluateVisitor_closure9(_this), _s9_)], t1), + metaMixins = A._setArrayType([A.BuiltInCallable$mixin("load-css", "$url, $with: null", new A._EvaluateVisitor_closure10(_this), false, _s9_), A.BuiltInCallable$mixin("apply", "$mixin, $args...", new A._EvaluateVisitor_closure11(_this), true, _s9_)], t1); + t1 = type$.BuiltInCallable; + t2 = A.List_List$_of($.$get$moduleFunctions(), t1); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$("meta", t2, metaMixins, null, t1); + t1 = A.List_List$_of($.$get$coreModules(), type$.BuiltInModule_Callable); + t1.push(metaModule); + t2 = t1.length; + t3 = _this._builtInModules; + _i = 0; + for (; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = type$.JSArray_Callable; + t2 = A._setArrayType([], t1); + B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions()); + t1 = A._setArrayType([], t1); + for (_i = 0; _i < 11; ++_i) + t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); + B.JSArray_methods.addAll$1(t2, t1); + for (t1 = t2.length, t3 = _this._builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $function = t2[_i]; + t4 = $function.get$name($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + var error, stackTrace, t1, exception; + try { + t1 = type$.nullable_Object; + t1 = A.runZoned(new A._EvaluateVisitor_run_closure(this, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, node)], t1, t1), type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(error.withLoadedUrls$1(this._loadedUrls), error, stackTrace); + } else + throw exception; + } + }, + runExpression$2(importer, expression) { + var t1 = type$.nullable_Object; + return A.runZoned(new A._EvaluateVisitor_runExpression_closure(this, importer, expression), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, expression)], t1, t1), type$.Value); + }, + runStatement$2(importer, statement) { + var t1 = type$.nullable_Object; + return A.runZoned(new A._EvaluateVisitor_runStatement_closure(this, importer, statement), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext(this, statement)], t1, t1), type$.void); + }, + _assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _assertInModule$2(value, $name) { + return this._assertInModule$1$2(value, $name, type$.dynamic); + }, + _withFakeStylesheet$1$3(importer, nodeWithSpan, callback) { + var t1, _this = this, + oldImporter = _this._importer; + _this._importer = importer; + _this.__stylesheet = A.Stylesheet$(B.List_empty16, nodeWithSpan.get$span(nodeWithSpan)); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._importer = oldImporter; + _this.__stylesheet = null; + } + }, + _withFakeStylesheet$3(importer, nodeWithSpan, callback) { + return this._withFakeStylesheet$1$3(importer, nodeWithSpan, callback, type$.dynamic); + }, + _loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var t2, _this = this, + _0_0 = _this._builtInModules.$index(0, url), + t1 = {}; + t1.builtInModule = null; + if (_0_0 != null) { + t1.builtInModule = _0_0; + if (configuration instanceof A.ExplicitConfiguration) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException(_this._evaluate$_exception$2(t1, t2.get$span(t2))); + } + _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure(t1, callback)); + return; + } + _this._withStackFrame$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure0(_this, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback)); + }, + _loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var currentConfiguration, t2, _0_0, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, _this = this, + t1 = stylesheet.span, + url = t1.get$sourceUrl(t1); + t1 = configuration == null; + currentConfiguration = t1 ? _this._configuration : configuration; + t2 = _this._modules; + _0_0 = t2.$index(0, url); + if (_0_0 != null) { + t2 = _this._moduleConfigurations.$index(0, url); + t3 = t2.__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration.__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration && _0_0.couldHaveBeenConfigured$1(new A.MapKeySet(new A.UnmodifiableMapView(currentConfiguration._configuration$_values, type$.UnmodifiableMapView_String_ConfiguredValue), type$.MapKeySet_String))) { + if (namesInErrors) { + t2 = $.$get$context(); + url.toString; + message = t2.prettyUri$1(url) + string$.x20was_a; + } else + message = string$.This_mw; + t2 = _this._moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : t2.get$span(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(0) ? _this._evaluate$_exception$1(message) : _this._multiSpanException$3(message, "new load", t1)); + } + return _0_0; + } + environment = A.Environment$(); + css = A._Cell$(); + preModuleComments = A._Cell$(); + extensionStore = A.ExtensionStore$(); + _this._withEnvironment$2(environment, new A._EvaluateVisitor__execute_closure(_this, importer, stylesheet, extensionStore, configuration, css, preModuleComments)); + t1 = css._readLocal$0(); + t3 = preModuleComments._readLocal$0(); + module = environment.toModule$3(t1, t3 == null ? B.Map_empty : t3, extensionStore); + if (url != null) { + t2.$indexSet(0, url, module); + _this._moduleConfigurations.$indexSet(0, url, currentConfiguration); + if (nodeWithSpan != null) + _this._moduleNodes.$indexSet(0, url, nodeWithSpan); + } + return module; + }, + _execute$2(importer, stylesheet) { + return this._execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + _0_0 = _this._outOfOrderImports; + $label0$0: { + if (_0_0 == null) { + t1 = _this._assertInModule$2(_this.__root, _s5_).children; + break $label0$0; + } + t1 = _this._assertInModule$2(_this.__root, _s5_).children; + t1 = A.List_List$_of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._assertInModule$2(_this.__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), type$.ModifiableCssNode); + B.JSArray_methods.addAll$1(t1, _0_0); + t2 = _this._assertInModule$2(_this.__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._assertInModule$2(_this.__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); + break $label0$0; + } + return t1; + }, + _combineCss$2$clone(root, clone) { + var selectors, _0_0, t1, imports, css, sorted, t2; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure0(selectors))); + if (_0_0 != null) + this._throwForUnsatisfiedExtension$1(_0_0); + return root.get$css(root); + } + t1 = type$.JSArray_CssNode; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + t1 = type$.Module_Callable; + sorted = A.ListQueue$(t1); + new A._EvaluateVisitor__combineCss_visitModule(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); + if (root.get$transitivelyContainsExtensions()) + this._extendModules$1(sorted); + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode), t2.get$span(t2)); + }, + _combineCss$1(root) { + return this._combineCss$2$clone(root, false); + }, + _extendModules$1(sortedModules) { + var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension); + for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); + t4 = t3.get$extensionStore().get$addExtensions(); + if ($self != null) + t4.call$1($self); + t4 = t3.get$extensionStore(); + if (t4.get$isEmpty(t4)) + continue; + for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { + upstream = t4[_i]; + _0_0 = upstream.get$url(upstream); + if (_0_0 != null) + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure0()), t3.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); + }, + _throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); + }, + _indexAfterImports$1(statements) { + var t1, lastImport, i, _0_0; + for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + $label0$0: { + _0_0 = t1.$index(statements, i); + if (_0_0 instanceof A.ModifiableCssImport) + break $label0$0; + if (_0_0 instanceof A.ModifiableCssComment) + continue; + break; + } + lastImport = i; + } + return lastImport + 1; + }, + visitStylesheet$1(_, node) { + var t1, t2, warning, _i, $name, span; + for (t1 = node.parseTimeWarnings, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + warning = t1.__internal$_current; + if (warning == null) + warning = t2._as(warning); + this._warn$3(warning._1, warning._2, warning._0); + } + for (t1 = node.children, t2 = t1.length, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(this); + for (t1 = A.MapExtensions_get_pairs(node.globalVariables, type$.String, type$.FileSpan), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + $name = t2._0; + span = t2._1; + this.visitVariableDeclaration$1(0, new A.VariableDeclaration(null, $name, new A.NullExpression(span), true, false, span)); + } + return null; + }, + visitAtRootRule$1(_, node) { + var t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _this = this, _null = null, + _s8_ = "__parent", + _0_0 = node.query, + query = _0_0 != null ? new A.AtRootQueryParser(A.SpanScanner$(_this._performInterpolationWithMap$2$warnForColor(_0_0, true)._0, _null), _null).parse$0(0) : B.AtRootQuery_bfj, + $parent = _this._assertInModule$2(_this.__parent, _s8_), + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode); + for (t1 = type$.CssStylesheet; !t1._is($parent); $parent = _2_0) { + if (!query.excludes$1($parent)) + included.push($parent); + _2_0 = $parent._parent; + if (_2_0 == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = _this._trimIncluded$1(included); + if (root === _this._assertInModule$2(_this.__parent, _s8_)) { + _this._environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure(_this, node), node.hasDeclarations, type$.Null); + return _null; + } + if (included.length >= 1) { + first = included[0]; + rest = B.JSArray_methods.sublist$1(included, 1); + innerCopy = first.copyWithoutChildren$0(); + for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { + copy = rest[_i].copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + _this._scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure0(_this, node)); + return _null; + }, + _trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._assertInModule$2(_this.__root, _s5_); + $parent = _this._assertInModule$2(_this.__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { + _0_0 = $parent._parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + _1_0 = $parent._parent; + if (_1_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._assertInModule$2(_this.__root, _s5_)) + return _this._assertInModule$2(_this.__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure(_this, newParent, node), + t1 = query._all || query._at_root_query$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure0(_this, scope); + if (_this._mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure1(_this, scope); + if (_this._inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure2(_this, scope); + return _this._inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure3()) ? new A._EvaluateVisitor__scopeForAtRoot_closure4(_this, scope) : scope; + }, + visitContentBlock$1(_, node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(_, node) { + var $content = this._environment._content; + if ($content == null) + return null; + this._runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure(this, $content), type$.Null); + return null; + }, + visitDebugRule$1(_, node) { + var value = node.expression.accept$1(this), + t1 = value instanceof A.SassString ? value._string$_text : A.serializeValue(value, true, true); + this._logger.debug$2(0, t1, node.span); + return null; + }, + visitDeclaration$1(_, node) { + var t1, $name, _0_0, _1_0, value, t2, t3, _2_0, oldDeclarationName, _this = this, _null = null; + if ((_this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot) == null && !_this._inUnknownAtRule && !_this._inKeyframes) + throw A.wrapException(_this._evaluate$_exception$2(string$.Declarm, node.span)); + if (_this._declarationName != null && !node.parsedAsSassScript) { + t1 = B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--") ? string$.Declarw : string$.Declarp; + throw A.wrapException(_this._evaluate$_exception$2(t1, node.span)); + } + $name = _this._interpolationToValue$2$warnForColor(node.name, true); + _0_0 = _this._declarationName; + if (_0_0 != null) + $name = new A.CssValue(_0_0 + "-" + $name.value, $name.span, type$.CssValue_String); + _1_0 = node.value; + if (_1_0 != null) { + value = _1_0.accept$1(_this); + if (!value.get$isBlank() || value.get$asList().length === 0 || B.JSString_methods.startsWith$1($name.value, "--")) { + _this._copyParentAfterSibling$0(); + t1 = _this._assertInModule$2(_this.__parent, "__parent"); + t2 = _1_0.get$span(_1_0); + if (_this._sourceMap) { + t3 = A.NullableExtension_andThen(_1_0, _this.get$_expressionNode()); + t3 = t3 == null ? _null : J.get$span$x(t3); + } else + t3 = _null; + t1.addChild$1(A.ModifiableCssDeclaration$($name, new A.CssValue(value, t2, type$.CssValue_Value), node.span, node.parsedAsSassScript, t3)); + } + } + _2_0 = node.children; + t1 = {}; + t1.children = null; + if (_2_0 != null) { + t1.children = _2_0; + oldDeclarationName = _this._declarationName; + _this._declarationName = $name.value; + _this._environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure(t1, _this), node.hasDeclarations, type$.Null); + _this._declarationName = oldDeclarationName; + } + return _null; + }, + visitEachRule$1(_, node) { + var _this = this, + t1 = node.list, + list = t1.accept$1(_this), + nodeWithSpan = _this._expressionNode$1(t1), + _0_0 = node.variables; + $label0$0: { + t1 = {}; + t1.variable = null; + if (_0_0.length === 1) { + t1.variable = _0_0[0]; + t1 = new A._EvaluateVisitor_visitEachRule_closure(t1, _this, nodeWithSpan); + break $label0$0; + } + t1 = {}; + t1.variables = null; + t1.variables = _0_0; + t1 = new A._EvaluateVisitor_visitEachRule_closure0(t1, _this, nodeWithSpan); + break $label0$0; + } + return _this._environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure1(_this, list, t1, node), true, type$.nullable_Value); + }, + _setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._environment.setLocalVariable$3(variables[i], this._withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._environment.setLocalVariable$3(variables[i], B.C__SassNull, nodeWithSpan); + }, + visitErrorRule$1(_, node) { + throw A.wrapException(this._evaluate$_exception$2(node.expression.accept$1(this).toString$0(0), node.span)); + }, + visitExtendRule$1(_, node) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, compound, simple, _this = this, _null = null, + styleRule = _this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot; + if (styleRule == null || _this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t7 = complex.accept$1(B.C__IsUselessVisitor) ? "can't" : "shouldn't"; + _this._warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan(A.SpanExtensions_trimRight(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_0rM); + } + _0_0 = _this._performInterpolationWithMap$2$warnForColor(node.selector, true); + for (t1 = A.SelectorList_SelectorList$parse(A.trimAscii(_0_0._0, true), false, _0_0._1, _this._logger, false).components, t2 = t1.length, t3 = styleRule._style_rule$_selector._box$_inner, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassFormatException$("complex selectors may not be extended.", complex.span, _null)); + t4 = compound.components; + simple = t4.length === 1 ? B.JSArray_methods.get$first(t4) : _null; + if (simple == null) + throw A.wrapException(A.SassFormatException$(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, _null)); + _this._assertInModule$2(_this.__extensionStore, "_extensionStore").addExtension$4(t3.value, simple, node, _this._mediaQueries); + } + return _null; + }, + visitAtRule$1(_, node) { + var $name, value, children, wasInKeyframes, wasInUnknownAtRule, rule, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.At_rul, node.span)); + $name = _this._interpolationToValue$1(node.name); + value = A.NullableExtension_andThen(node.value, new A._EvaluateVisitor_visitAtRule_closure(_this)); + children = node.children; + if (children == null) { + _this._copyParentAfterSibling$0(); + _this._assertInModule$2(_this.__parent, "__parent").addChild$1(A.ModifiableCssAtRule$($name, node.span, true, value)); + return null; + } + wasInKeyframes = _this._inKeyframes; + wasInUnknownAtRule = _this._inUnknownAtRule; + if (A.unvendor($name.value) === "keyframes") + _this._inKeyframes = true; + else + _this._inUnknownAtRule = true; + rule = A.ModifiableCssAtRule$($name, node.span, false, value); + if (_this.get$_hasCssNesting()) { + _this._withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitAtRule_closure0(_this, children), node.hasDeclarations, type$.ModifiableCssAtRule, type$.Null); + _this._inUnknownAtRule = wasInUnknownAtRule; + _this._inKeyframes = wasInKeyframes; + return null; + } + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitAtRule_closure1(_this, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure2(), type$.ModifiableCssAtRule, type$.Null); + _this._inUnknownAtRule = wasInUnknownAtRule; + _this._inKeyframes = wasInKeyframes; + return null; + }, + visitForRule$1(_, node) { + var _this = this, t1 = {}, + t2 = node.from, + fromNumber = _this._addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure(_this, node)), + t3 = node.to, + toNumber = _this._addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure0(_this, node)), + from = _this._addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure1(fromNumber)), + to = t1.to = _this._addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure2(toNumber, fromNumber)), + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) + return null; + return _this._environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure3(t1, _this, node, from, direction, fromNumber), true, type$.nullable_Value); + }, + visitForwardRule$1(_, node) { + var newConfiguration, t4, _i, variable, $name, _this = this, + _s8_ = "@forward", + oldConfiguration = _this._configuration, + adjustedConfiguration = oldConfiguration.throughForward$1(node), + t1 = node.configuration, + t2 = t1.length, + t3 = node.url; + if (t2 !== 0) { + newConfiguration = _this._addForwardConfiguration$2(adjustedConfiguration, node); + _this._loadModule$5$configuration(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure(_this, node), newConfiguration); + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + _this._removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration$_values, t2 = t1.get$keys(t1), t2 = t2.toList$0(t2), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + _this._assertConfigurationIsEmpty$1(newConfiguration); + } else { + _this._configuration = adjustedConfiguration; + _this._loadModule$4(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure0(_this, node)); + _this._configuration = oldConfiguration; + } + return null; + }, + _addForwardConfiguration$2(configuration, node) { + var t2, t3, _i, variable, t4, _0_0, t5, oldValue, variableNodeWithSpan, _null = null, + t1 = configuration._configuration$_values, + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + for (t2 = node.configuration, t3 = t2.length, _i = 0; _i < t3; ++_i) { + variable = t2[_i]; + if (variable.isGuarded) { + t4 = variable.name; + _0_0 = t1.get$isEmpty(t1) ? _null : t1.remove$1(0, t4); + if (_0_0 != null) { + t5 = !_0_0.value.$eq(0, B.C__SassNull); + oldValue = _0_0; + } else { + oldValue = _null; + t5 = false; + } + if (t5) { + newValues.$indexSet(0, t4, oldValue); + continue; + } + } + t4 = variable.expression; + variableNodeWithSpan = this._expressionNode$1(t4); + newValues.$indexSet(0, variable.name, new A.ConfiguredValue(this._withoutSlash$2(t4.accept$1(this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + if (configuration instanceof A.ExplicitConfiguration || t1.get$isEmpty(t1)) + return new A.ExplicitConfiguration(node, newValues, _null); + else + return new A.Configuration(newValues, _null); + }, + _registerCommentsForModule$1(module) { + var _this = this, _s5_ = "_root", + t1 = _this.__root; + if (t1 == null) + return; + if (_this._assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) + return; + t1 = _this._preModuleComments; + if (t1 == null) + t1 = _this._preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable, type$.List_CssComment); + J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source, type$.CssComment), type$.UnmodifiableListView_CssComment)); + _this._assertInModule$2(_this.__root, _s5_).clearChildren$0(); + _this.__endOfImports = 0; + }, + _removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration$_values, t2 = t1.get$keys(t1), t2 = t2.toList$0(t2), t3 = t2.length, t4 = downstream._configuration$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, _0_0; + if (!(configuration instanceof A.ExplicitConfiguration)) + return; + t1 = configuration._configuration$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = A.MapExtensions_get_pairs(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue), type$.String, type$.ConfiguredValue); + _0_0 = t1.get$first(t1); + t1 = nameInError ? "$" + _0_0._0 + string$.x20was_n : string$.This_v; + throw A.wrapException(this._evaluate$_exception$2(t1, _0_0._1.configurationSpan)); + }, + _assertConfigurationIsEmpty$1(configuration) { + return this._assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(_, node) { + var t1 = this._environment, + t2 = t1.closure$0(), + t3 = this._inDependency, + t4 = t1._functions, + index = t4.length - 1, + t5 = node.name; + t1._functionIndices.$indexSet(0, t5, index); + t4[index].$indexSet(0, t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_Environment)); + return null; + }, + visitIfRule$1(_, node) { + var t1, t2, _i, clauseToCheck, + clause = node.lastClause; + for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) { + clauseToCheck = t1[_i]; + if (clauseToCheck.expression.accept$1(this).get$isTruthy()) { + clause = clauseToCheck; + break; + } + } + return A.NullableExtension_andThen(clause, new A._EvaluateVisitor_visitIfRule_closure(this)); + }, + visitImportRule$1(_, node) { + var t1, t2, t3, t4, t5, t6, _i, $import, t7, _0_0, $self, t8, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports"; + for (t1 = node.imports, t2 = t1.length, t3 = type$.CssValue_String, t4 = _this.get$_interpolationToValue(), t5 = type$.StaticImport, t6 = type$.JSArray_ModifiableCssImport, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport) + _this._visitDynamicImport$1($import); + else { + t5._as($import); + t7 = $import.url; + _0_0 = _this._performInterpolationHelper$3$sourceMap$warnForColor(t7, false, false); + $self = $import.modifiers; + t8 = $self == null ? null : t4.call$1($self); + node = new A.ModifiableCssImport(new A.CssValue(_0_0._0, t7.span, t3), t8, $import.span); + if (_this._assertInModule$2(_this.__parent, _s8_) !== _this._assertInModule$2(_this.__root, _s5_)) { + _this._copyParentAfterSibling$0(); + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(node); + } else if (_this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source)) { + t7 = _this._assertInModule$2(_this.__root, _s5_); + node._parent = t7; + t7 = t7._children; + node._indexInParent = t7.length; + t7.push(node); + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + } else { + t7 = _this._outOfOrderImports; + (t7 == null ? _this._outOfOrderImports = A._setArrayType([], t6) : t7).push(node); + } + } + } + return null; + }, + _visitDynamicImport$1($import) { + return this._withStackFrame$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure(this, $import)); + }, + _loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + var _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, error, stackTrace, error0, stackTrace0, t1, t2, exception, _this = this; + baseUrl = baseUrl; + try { + _this._importSpan = span; + _0_0 = _this._evaluate$_importCache; + importCache = null; + if (_0_0 != null) { + importCache = _0_0; + if (baseUrl == null) { + t1 = _this._assertInModule$2(_this.__stylesheet, "_stylesheet").span; + baseUrl = t1.get$sourceUrl(t1); + } + _1_0 = J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), _this._importer, baseUrl, forImport); + importer = null; + canonicalUrl = null; + originalUrl = null; + if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0)) { + importer = _1_0._0; + canonicalUrl = _1_0._1; + originalUrl = _1_0._2; + if (canonicalUrl.get$scheme() === "") + A.WarnForDeprecation_warnForDeprecation(_this._logger, B.Deprecation_IqB, "Importer " + A.S(importer) + " canonicalized " + url + " to " + A.S(canonicalUrl) + string$.x2e_Rela, null, null); + _this._loadedUrls.add$1(0, canonicalUrl); + isDependency = _this._inDependency || !J.$eq$(importer, _this._importer); + _2_0 = importCache.importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl); + stylesheet = null; + if (_2_0 != null) { + stylesheet = _2_0; + t1 = stylesheet; + t2 = importer; + return new A._Record_3_importer_isDependency(t1, t2, isDependency); + } + } + } + t1 = B.JSString_methods.startsWith$1(url, "package:"); + if (t1) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) + throw exception; + else if (t1 instanceof A.ArgumentError) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(_this._evaluate$_exception$1(J.toString$0$(error)), error, stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + A.throwWithTrace(_this._evaluate$_exception$1(_this._getErrorMessage$1(error0)), error0, stackTrace0); + } + } finally { + _this._importSpan = null; + } + }, + _loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _loadStylesheet$3$forImport(url, span, forImport) { + return this._loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + var t1, _0_0, t2, _1_8, t3, _this = this, _null = null, + _s37_ = "Mixin doesn't accept a content block.", + _s10_ = "invocation"; + $label0$0: { + if (mixin == null) + throw A.wrapException(_this._evaluate$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); + t1 = mixin instanceof A.BuiltInCallable; + if (t1 && !mixin.acceptsContent && contentCallable != null) { + t1 = _this._evaluateArguments$1($arguments)._values; + _0_0 = mixin.callbackFor$2(t1[2].length, new A.MapKeySet(t1[0], type$.MapKeySet_String)); + throw A.wrapException(A.MultiSpanSassRuntimeException$(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), _null)); + } + if (t1) { + _this._environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure(_this, $arguments, mixin, nodeWithSpanWithoutContent)); + break $label0$0; + } + t1 = type$.UserDefinedCallable_Environment._is(mixin); + t2 = false; + if (t1) { + _1_8 = mixin.declaration; + t3 = _1_8; + if (t3 instanceof A.MixinRule) + t2 = !type$.MixinRule._as(_1_8).get$hasContent() && contentCallable != null; + } + if (t2) + throw A.wrapException(A.MultiSpanSassRuntimeException$(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.parameters.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), _null)); + if (t1) { + _this._runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure0(_this, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + } + }, + visitIncludeRule$1(_, node) { + var _this = this, + mixin = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure(_this, node)); + if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) + throw A.wrapException(_this._evaluate$_exception$2(string$.Sass__m, node.get$nameSpan())); + _this._applyMixin$5(mixin, A.NullableExtension_andThen(node.content, new A._EvaluateVisitor_visitIncludeRule_closure0(_this)), node.$arguments, node, new A._FakeAstNode(new A._EvaluateVisitor_visitIncludeRule_closure1(node))); + return null; + }, + visitMixinRule$1(_, node) { + var t1 = this._environment, + t2 = t1.closure$0(), + t3 = this._inDependency, + t4 = t1._mixins, + index = t4.length - 1, + t5 = node.name; + t1._mixinIndices.$indexSet(0, t5, index); + t4[index].$indexSet(0, t5, new A.UserDefinedCallable(node, t2, t3, type$.UserDefinedCallable_Environment)); + return null; + }, + visitLoudComment$1(_, node) { + var t1, text, _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._inFunction) + return null; + if (_this._assertInModule$2(_this.__parent, _s8_) === _this._assertInModule$2(_this.__root, "_root") && _this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, "_root").children._collection$_source)) + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + t1 = node.text; + text = _this._performInterpolation$1(t1); + if (!B.JSString_methods.endsWith$1(text, "*/")) + text += " */"; + _this._copyParentAfterSibling$0(); + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(new A.ModifiableCssComment(text, t1.span)); + return null; + }, + visitMediaRule$1(_, node) { + var _0_0, queries, mergedQueries, t1, mergedSources, t2, t3, _this = this, _null = null; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Media_, node.span)); + _0_0 = _this._performInterpolationWithMap$2$warnForColor(node.query, true); + queries = new A.MediaQueryParser(A.SpanScanner$(_0_0._0, _null), _0_0._1).parse$0(0); + if (_this.get$_hasCssNesting()) { + _this._withParent$2$3$scopeWhen(A.ModifiableCssMediaRule$(queries, node.span), new A._EvaluateVisitor_visitMediaRule_closure(_this, node), false, type$.ModifiableCssMediaRule, type$.Null); + return _null; + } + mergedQueries = A.NullableExtension_andThen(_this._mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure0(_this, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return _null; + if (t1) + mergedSources = B.Set_empty2; + else { + t2 = _this._mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = _this._mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure1(_this, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure2(mergedSources), type$.ModifiableCssMediaRule, type$.Null); + return _null; + }, + _mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, _0_0, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { + t3 = t1.get$current(t1); + for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) { + _0_0 = t3.merge$1(t4.get$current(t4)); + if (B._SingletonCssMediaQueryMergeResult_0 === _0_0) + continue; + if (B._SingletonCssMediaQueryMergeResult_1 === _0_0) + return null; + t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult; + result = t5 ? _0_0 : null; + if (t5) + queries.push(result.query); + } + } + return queries; + }, + visitReturnRule$1(_, node) { + var t1 = node.expression; + return this._withoutSlash$2(t1.accept$1(this), t1); + }, + visitSilentComment$1(_, node) { + return null; + }, + visitStyleRule$1(_, node) { + var t1, _0_0, selectorText, selectorMap, parsedSelector, _1_0, t2, t3, _i, _2_0, first, t4, rule, oldAtRootExcludingStyleRule, _this = this, _null = null, + _s8_ = "__parent", + _s11_ = "_stylesheet"; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_n, node.span)); + else if (_this._inKeyframes && _this._assertInModule$2(_this.__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_k, node.span)); + t1 = node.selector; + t1.toString; + _0_0 = _this._performInterpolationWithMap$2$warnForColor(t1, true); + selectorText = _0_0._0; + selectorMap = _0_0._1; + if (_this._inKeyframes) { + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(new A.CssValue(A.List_List$unmodifiable(new A.KeyframeSelectorParser(A.SpanScanner$(selectorText, _null), selectorMap).parse$0(0), type$.String), t1.span, type$.CssValue_List_String), node.span), new A._EvaluateVisitor_visitStyleRule_closure(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure0(), type$.ModifiableCssKeyframeBlock, type$.Null); + return _null; + } + parsedSelector = A.SelectorList_SelectorList$parse(selectorText, true, selectorMap, _this._logger, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss); + _1_0 = _this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot; + $label0$0: { + if (_1_0 == null) { + t1 = true; + break $label0$0; + } + if (_1_0.fromPlainCss) { + t1 = false; + break $label0$0; + } + t1 = !(_this._assertInModule$2(_this.__stylesheet, _s11_).plainCss && parsedSelector.accept$1(B.C__ContainsParentSelectorVisitor)); + break $label0$0; + } + if (t1) { + if (_this._assertInModule$2(_this.__stylesheet, _s11_).plainCss) + for (t2 = parsedSelector.components, t3 = t2.length, _i = 0; _i < t3; ++_i) { + _2_0 = t2[_i].leadingCombinators; + if (_2_0.length >= 1) { + first = _2_0[0]; + t4 = _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss; + } else { + first = _null; + t4 = false; + } + if (t4) + throw A.wrapException(_this._evaluate$_exception$2(string$.Top_le, first.span)); + } + t2 = _this._styleRuleIgnoringAtRoot; + t2 = t2 == null ? _null : t2.originalSelector; + parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t2, !_this._atRootExcludingStyleRule, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss); + } + rule = A.ModifiableCssStyleRule$(_this._assertInModule$2(_this.__extensionStore, "_extensionStore").addSelector$2(parsedSelector, _this._mediaQueries), node.span, _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss, parsedSelector); + oldAtRootExcludingStyleRule = _this._atRootExcludingStyleRule; + t2 = _this._atRootExcludingStyleRule = false; + t1 = t1 ? new A._EvaluateVisitor_visitStyleRule_closure1() : _null; + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure2(_this, rule, node), node.hasDeclarations, t1, type$.ModifiableCssStyleRule, type$.Null); + _this._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + _this._warnForBogusCombinators$1(rule); + if ((_this._atRootExcludingStyleRule ? _null : _this._styleRuleIgnoringAtRoot) == null) { + t1 = _this._assertInModule$2(_this.__parent, _s8_).children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = t2; + if (t1) { + t1 = _this._assertInModule$2(_this.__parent, _s8_).children; + t1.get$last(t1).isGroupEnd = true; + } + return _null; + }, + _warnForBogusCombinators$1(rule) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false)) + for (t1 = rule._style_rule$_selector._box$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor)) { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight(complex.span), B.Deprecation_0rM); + } else if (complex.leadingCombinators.length !== 0) { + if (!_this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss) { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight(complex.span), B.Deprecation_0rM); + } + } else { + visitor = A._SerializeVisitor$(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize$_buffer.toString$0(0)); + t7 = complex.accept$1(B._IsBogusVisitor_false) ? string$.x20It_wi : ""; + t8 = A.SpanExtensions_trimRight(complex.span); + if (t5.get$length(0) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$x(t5.$index(0, 0)); + _this._warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_0rM); + } + } + }, + visitSupportsRule$1(_, node) { + var t1, rule, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + rule = A.ModifiableCssSupportsRule$(new A.CssValue(_this._visitSupportsCondition$1(t1), t1.get$span(t1), type$.CssValue_String), node.span); + if (_this.get$_hasCssNesting()) { + _this._withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitSupportsRule_closure(_this, node), node.hasDeclarations, type$.ModifiableCssSupportsRule, type$.Null); + return null; + } + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitSupportsRule_closure0(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure1(), type$.ModifiableCssSupportsRule, type$.Null); + return null; + }, + _visitSupportsCondition$1(condition) { + var t1, _this = this; + $label0$0: { + if (condition instanceof A.SupportsOperation) { + t1 = condition.operator; + t1 = _this._evaluate$_parenthesize$2(condition.left, t1) + " " + t1.toString$0(0) + " " + _this._evaluate$_parenthesize$2(condition.right, t1); + break $label0$0; + } + if (condition instanceof A.SupportsNegation) { + t1 = "not " + _this._evaluate$_parenthesize$1(condition.condition); + break $label0$0; + } + if (condition instanceof A.SupportsInterpolation) { + t1 = condition.expression; + t1 = _this._evaluate$_serialize$3$quote(t1.accept$1(_this), t1, false); + break $label0$0; + } + t1 = {}; + t1.declaration = null; + if (condition instanceof A.SupportsDeclaration) { + t1.declaration = condition; + t1 = _this._withSupportsDeclaration$1(new A._EvaluateVisitor__visitSupportsCondition_closure(t1, _this)); + break $label0$0; + } + if (condition instanceof A.SupportsFunction) { + t1 = _this._performInterpolation$1(condition.name) + "(" + _this._performInterpolation$1(condition.$arguments) + ")"; + break $label0$0; + } + if (condition instanceof A.SupportsAnything) { + t1 = "(" + _this._performInterpolation$1(condition.contents) + ")"; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); + } + return t1; + }, + _withSupportsDeclaration$1$1(callback) { + var t1, + oldInSupportsDeclaration = this._inSupportsDeclaration; + this._inSupportsDeclaration = true; + try { + t1 = callback.call$0(); + return t1; + } finally { + this._inSupportsDeclaration = oldInSupportsDeclaration; + } + }, + _withSupportsDeclaration$1(callback) { + return this._withSupportsDeclaration$1$1(callback, type$.dynamic); + }, + _evaluate$_parenthesize$2(condition, operator) { + var t1; + if (!(condition instanceof A.SupportsNegation)) + if (condition instanceof A.SupportsOperation) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + if (t1) + return "(" + this._visitSupportsCondition$1(condition) + ")"; + return this._visitSupportsCondition$1(condition); + }, + _evaluate$_parenthesize$1(condition) { + return this._evaluate$_parenthesize$2(condition, null); + }, + visitVariableDeclaration$1(_, node) { + var t1, t2, _0_0, value, _this = this, _null = null; + if (node.isGuarded) { + if (node.namespace == null && _this._environment._variables.length === 1) { + t1 = node.name; + _this._environment._configurableVariables.add$1(0, t1); + t2 = _this._configuration._configuration$_values; + _0_0 = t2.get$isEmpty(t2) ? _null : t2.remove$1(0, t1); + t1 = {}; + t1.override = null; + if (_0_0 != null) { + t1.override = _0_0; + t2 = !_0_0.value.$eq(0, B.C__SassNull); + } else + t2 = false; + if (t2) { + _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure(t1, _this, node)); + return _null; + } + } + value = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure0(_this, node)); + if (value != null && !value.$eq(0, B.C__SassNull)) + return _null; + } + if (node.isGlobal && !_this._environment.globalVariableExists$1(node.name)) { + t1 = _this._environment._variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName(node.span) + ": null` at the stylesheet root."; + _this._warn$3(t1, node.span, B.Deprecation_jGw); + } + t1 = node.expression; + _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure1(_this, node, _this._withoutSlash$2(t1.accept$1(_this), t1))); + return _null; + }, + visitUseRule$1(_, node) { + var values, _i, variable, t3, variableNodeWithSpan, configuration, _this = this, + t1 = node.configuration, + t2 = t1.length; + if (t2 !== 0) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + t3 = variable.expression; + variableNodeWithSpan = _this._expressionNode$1(t3); + values.$indexSet(0, variable.name, new A.ConfiguredValue(_this._withoutSlash$2(t3.accept$1(_this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + configuration = new A.ExplicitConfiguration(node, values, null); + } else + configuration = B.Configuration_Map_empty_null; + _this._loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure(_this, node), configuration); + _this._assertConfigurationIsEmpty$1(configuration); + return null; + }, + visitWarnRule$1(_, node) { + var _this = this, + value = _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitWarnRule_closure(_this, node)), + t1 = value instanceof A.SassString ? value._string$_text : _this._evaluate$_serialize$2(value, node.expression), + t2 = _this._evaluate$_stackTrace$1(node.span); + _this._logger.internalWarn$4$deprecation$span$trace(t1, null, null, t2); + return null; + }, + visitWhileRule$1(_, node) { + return this._environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure(this, node), true, node.hasDeclarations, type$.nullable_Value); + }, + visitBinaryOperationExpression$1(_, node) { + var t1, _this = this; + if (_this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss) { + t1 = node.operator; + t1 = t1 !== B.BinaryOperator_g6F && t1 !== B.BinaryOperator_ehp; + } else + t1 = false; + if (t1) + throw A.wrapException(_this._evaluate$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); + return _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure(_this, node)); + }, + _slash$3(left, right, node) { + var left0, _1_2, + result = left.dividedBy$1(right), + _1_2_isSet = left instanceof A.SassNumber, + right0 = null, + t1 = false; + if (_1_2_isSet) { + if (right instanceof A.SassNumber) { + t1 = node.allowsSlash && this._operandAllowsSlash$1(node.left) && this._operandAllowsSlash$1(node.right); + right0 = right; + } + left0 = left; + _1_2 = right; + } else { + _1_2 = null; + left0 = null; + } + if (t1) + return type$.SassNumber._as(result).withSlash$2(left0, right0); + if (left instanceof A.SassNumber) + t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber; + else + t1 = false; + if (t1) { + this._warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation().call$1(node)) + " or " + A.expressionToCalc(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_qZ1); + return result; + } + return result; + }, + _operandAllowsSlash$1(node) { + var t1; + if (node instanceof A.FunctionExpression) + if (node.namespace == null) { + t1 = node.name; + t1 = B.Set_Pr3yj.contains$1(0, t1.toLowerCase()) && this._environment.getFunction$1(t1) == null; + } else + t1 = false; + else + t1 = true; + return t1; + }, + visitValueExpression$1(_, node) { + return node.value; + }, + visitVariableExpression$1(_, node) { + var result = this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure(this, node)); + if (result != null) + return result; + throw A.wrapException(this._evaluate$_exception$2("Undefined variable.", node.span)); + }, + visitUnaryOperationExpression$1(_, node) { + return this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitUnaryOperationExpression_closure(node, node.operand.accept$1(this))); + }, + visitBooleanExpression$1(_, node) { + return node.value ? B.SassBoolean_true : B.SassBoolean_false; + }, + visitIfExpression$1(_, node) { + var t1, t2, t3, results, _i, t4, condition, expression, result, _1_2, _this = this; + for (t1 = node.branches, t2 = t1.length, t3 = type$.JSArray_Record_2_String_and_Value, results = null, _i = 0; _i < t2; ++_i) { + t4 = t1[_i]; + condition = t4._0; + expression = t4._1; + result = condition == null ? null : condition.accept$1(_this); + if (result == null) + result = true; + t4 = typeof result == "string"; + condition = t4 ? result : null; + if (t4) { + if (results == null) + results = A._setArrayType([], t3); + results.push(new A._Record_2(condition, expression.accept$1(_this))); + continue; + } + _1_2 = true === result; + if (_1_2 && results != null) { + results.push(new A._Record_2("else", expression.accept$1(_this))); + continue; + } + if (_1_2) + return expression.accept$1(_this); + } + if (results == null) + return B.C__SassNull; + return new A.SassString("if(" + new A.MappedListIterable(results, new A._EvaluateVisitor_visitIfExpression_closure(), A._arrayInstanceType(results)._eval$1("MappedListIterable<1,String>")).join$1(0, "; ") + ")", false); + }, + visitIfConditionParenthesized$1(_, node) { + var t1, + _0_0 = node.expression.accept$1(this); + $label0$0: { + if (typeof _0_0 == "string") { + t1 = "(" + _0_0 + ")"; + break $label0$0; + } + t1 = _0_0; + break $label0$0; + } + return t1; + }, + visitIfConditionNegation$1(_, node) { + var t1, + _0_0 = node.expression.accept$1(this); + $label0$0: { + if (typeof _0_0 == "string") { + t1 = "not " + _0_0; + break $label0$0; + } + if (A._isBool(_0_0)) { + t1 = !_0_0; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("unreachable")); + } + return t1; + }, + visitIfConditionOperation$1(_, node) { + var t1, t2, t3, t4, t5, t6, values, _i, expression, _0_0, t7, right, _1_6_isSet, _1_6, string; + for (t1 = node.expressions, t2 = t1.length, t3 = node.op, t4 = t3 === B.BooleanOperator_0, t5 = t3 === B.BooleanOperator_1, t6 = type$.JSArray_Record_2_IfConditionExpression_and_String, values = null, _i = 0; _i < t2; ++_i) { + expression = t1[_i]; + _0_0 = expression.accept$1(this); + t7 = typeof _0_0 == "string"; + right = t7 ? _0_0 : null; + if (t7) { + if (values == null) + values = A._setArrayType([], t6); + values.push(new A._Record_2(expression, right)); + continue; + } + if (false === _0_0 && t4) + return false; + if (true === _0_0 && t5) + return true; + } + $label0$1: { + if (values == null) { + t1 = t4; + break $label0$1; + } + _1_6_isSet = values.length === 1; + if (_1_6_isSet) { + _1_6 = values[0]; + t1 = _1_6._0 instanceof A.IfConditionParenthesized; + } else { + _1_6 = null; + t1 = false; + } + if (t1) { + string = (_1_6_isSet ? _1_6 : values[0])._1; + t1 = B.JSString_methods.substring$2(string, 1, string.length - 1); + break $label0$1; + } + t1 = new A.MappedListIterable(values, new A._EvaluateVisitor_visitIfConditionOperation_closure(), A._arrayInstanceType(values)._eval$1("MappedListIterable<1,String>")).join$1(0, " " + t3.toString$0(0) + " "); + break $label0$1; + } + return t1; + }, + visitIfConditionFunction$1(_, node) { + return this._performInterpolation$1(node.name) + "(" + this._performInterpolation$1(node.$arguments) + ")"; + }, + visitIfConditionSass$1(_, node) { + return node.expression.accept$1(this).get$isTruthy(); + }, + visitIfConditionRaw$1(_, node) { + return this._performInterpolation$1(node.text); + }, + visitLegacyIfExpression$1(_, node) { + var condition, t1, ifTrue, ifFalse, result, _this = this, + _0_0 = _this._evaluateMacroArguments$1(node), + positional = _0_0._0, + named = _0_0._1; + _this._verifyArguments$4(positional.length, named, $.$get$LegacyIfExpression_declaration(), node); + condition = A.ListExtensions_elementAtOrNull(positional, 0); + if (condition == null) { + t1 = named.$index(0, "condition"); + t1.toString; + condition = t1; + } + ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); + if (ifTrue == null) { + t1 = named.$index(0, "if-true"); + t1.toString; + ifTrue = t1; + } + ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); + if (ifFalse == null) { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + result = condition.accept$1(_this).get$isTruthy() ? ifTrue : ifFalse; + return _this._withoutSlash$2(result.accept$1(_this), _this._expressionNode$1(result)); + }, + visitNullExpression$1(_, node) { + return B.C__SassNull; + }, + visitNumberExpression$1(_, node) { + return A.SassNumber_SassNumber(node.value, node.unit); + }, + visitParenthesizedExpression$1(_, node) { + var _this = this; + return _this._assertInModule$2(_this.__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._evaluate$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); + }, + visitColorExpression$1(_, node) { + return node.value; + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return A.SassList$(new A.MappedListIterable(t1, new A._EvaluateVisitor_visitListExpression_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value>")), node.separator, node.hasBrackets); + }, + visitMapExpression$1(_, node) { + var t2, t3, _i, t4, key, keyValue, valueValue, oldValueSpan, + t1 = type$.Value, + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + key = t4._0; + keyValue = key.accept$1(this); + valueValue = t4._1.accept$1(this); + if (map.containsKey$1(keyValue)) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = key.get$span(key); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t2.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("Duplicate key.", t1, "second key", t2, this._evaluate$_stackTrace$1(key.get$span(key)), null)); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, key); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(map, t1, t1)); + }, + visitFunctionExpression$1(_, node) { + var t2, _0_0, t3, t4, $name, oldInFunction, result, _this = this, + _s11_ = "_stylesheet", + t1 = {}, + $function = _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss ? null : _this._addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure(_this, node)); + t1.$function = $function; + if ($function == null || B.JSString_methods.startsWith$1(node.originalName, "--")) { + if (node.namespace != null) + throw A.wrapException(_this._evaluate$_exception$2("Undefined function.", node.span)); + t2 = node.name; + _0_0 = t2.toLowerCase(); + t3 = false; + if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { + t3 = node.$arguments; + t4 = t3.named; + t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure0()); + $name = _0_0; + } else + $name = null; + if (t3) + return _this._visitCalculation$2$inLegacySassFunction(node, $name); + if ("calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0 || "calc-size" === _0_0) + return _this._visitCalculation$1(node); + $function = _this._assertInModule$2(_this.__stylesheet, _s11_).plainCss ? null : _this._builtInFunctions.$index(0, t2); + t1.$function = $function == null ? new A.PlainCssCallable(node.originalName) : $function; + } + oldInFunction = _this._inFunction; + _this._inFunction = true; + result = _this._addErrorSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure1(t1, _this, node)); + _this._inFunction = oldInFunction; + return result; + }, + _visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { + var $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, _this = this, + t2 = node.$arguments, + t3 = t2.named; + if (t3.get$isNotEmpty(t3)) + throw A.wrapException(_this._evaluate$_exception$2(string$.Keywor, node.span)); + else if (t2.rest != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Rest_a, node.span)); + _this._checkCalculationArguments$1(node); + t3 = A._setArrayType([], type$.JSArray_Object); + for (t2 = t2.positional, t4 = t2.length, _i = 0; _i < t4; ++_i) + t3.push(_this._visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); + $arguments = t3; + if (_this._inSupportsDeclaration) + return new A.SassCalculation(node.name, A.List_List$unmodifiable($arguments, type$.Object)); + oldCallableNode = _this._callableNode; + _this._callableNode = node; + try { + t1 = null; + t3 = node.name; + _0_0 = t3.toLowerCase(); + $label0$0: { + if ("calc" === _0_0) { + t1 = A.SassCalculation_calc(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sqrt" === _0_0) { + t1 = A.SassCalculation__singleArgument("sqrt", J.$index$asx($arguments, 0), A.number0__sqrt$closure(), true); + break $label0$0; + } + if ("sin" === _0_0) { + t1 = A.SassCalculation__singleArgument("sin", J.$index$asx($arguments, 0), A.number0__sin$closure(), false); + break $label0$0; + } + if ("cos" === _0_0) { + t1 = A.SassCalculation__singleArgument("cos", J.$index$asx($arguments, 0), A.number0__cos$closure(), false); + break $label0$0; + } + if ("tan" === _0_0) { + t1 = A.SassCalculation__singleArgument("tan", J.$index$asx($arguments, 0), A.number0__tan$closure(), false); + break $label0$0; + } + if ("asin" === _0_0) { + t1 = A.SassCalculation__singleArgument("asin", J.$index$asx($arguments, 0), A.number0__asin$closure(), true); + break $label0$0; + } + if ("acos" === _0_0) { + t1 = A.SassCalculation__singleArgument("acos", J.$index$asx($arguments, 0), A.number0__acos$closure(), true); + break $label0$0; + } + if ("atan" === _0_0) { + t1 = A.SassCalculation__singleArgument("atan", J.$index$asx($arguments, 0), A.number0__atan$closure(), true); + break $label0$0; + } + if ("abs" === _0_0) { + t1 = A.SassCalculation_abs(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("exp" === _0_0) { + t1 = A.SassCalculation_exp(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sign" === _0_0) { + t1 = A.SassCalculation_sign(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("min" === _0_0) { + t1 = A.SassCalculation_min($arguments); + break $label0$0; + } + if ("max" === _0_0) { + t1 = A.SassCalculation_max($arguments); + break $label0$0; + } + if ("hypot" === _0_0) { + t1 = A.SassCalculation_hypot($arguments); + break $label0$0; + } + if ("pow" === _0_0) { + t1 = A.SassCalculation_pow(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("atan2" === _0_0) { + t1 = A.SassCalculation_atan2(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("log" === _0_0) { + t1 = A.SassCalculation_log(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("mod" === _0_0) { + t1 = A.SassCalculation_mod(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("rem" === _0_0) { + t1 = A.SassCalculation_rem(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("round" === _0_0) { + t1 = A.SassCalculation_roundInternal(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2), inLegacySassFunction, node.span, new A._EvaluateVisitor__visitCalculation_closure(_this, node)); + break $label0$0; + } + if ("clamp" === _0_0) { + t1 = A.SassCalculation_clamp(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + if ("calc-size" === _0_0) { + t1 = A.SassCalculation_calcSize(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); + t1 = A.throwExpression(t3); + } + t1 = t1; + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (B.JSString_methods.contains$1(error.message, "compatible")) + _this._verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace(_this._evaluate$_exception$2(error.message, node.span), error, stackTrace); + } else + throw exception; + } finally { + _this._callableNode = oldCallableNode; + } + }, + _visitCalculation$1(node) { + return this._visitCalculation$2$inLegacySassFunction(node, null); + }, + _checkCalculationArguments$1(node) { + var t1, _0_0, + check = new A._EvaluateVisitor__checkCalculationArguments_check(this, node); + $label0$0: { + t1 = node.name; + _0_0 = t1.toLowerCase(); + if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { + check.call$1(1); + break $label0$0; + } + if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { + check.call$0(); + break $label0$0; + } + if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "calc-size" === _0_0) { + check.call$1(2); + break $label0$0; + } + if ("round" === _0_0 || "clamp" === _0_0) { + check.call$1(3); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); + } + }, + _verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, _0_0, arg, t2, number1, j, number2, t3, t4, t5, t6; + for (i = 0; t1 = args.length, i < t1; ++i) { + _0_0 = args[i]; + if (_0_0 instanceof A.SassNumber) { + t1 = _0_0.get$hasComplexUnits(); + arg = _0_0; + } else { + arg = null; + t1 = false; + } + if (t1) { + t1 = A.S(arg); + t2 = nodesWithSpans[i]; + throw A.wrapException(this._evaluate$_exception$2("Number " + t1 + " isn't compatible with CSS calculations.", t2.get$span(t2))); + } + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + t1 = number1.toString$0(0); + t2 = number2.toString$0(0); + t3 = nodesWithSpans[i]; + t3 = t3.get$span(t3); + t4 = number1.toString$0(0); + t5 = nodesWithSpans[j]; + t5 = A.LinkedHashMap_LinkedHashMap$_literal([t5.get$span(t5), number2.toString$0(0)], type$.FileSpan, type$.String); + t6 = nodesWithSpans[i]; + throw A.wrapException(A.MultiSpanSassRuntimeException$(t1 + " and " + t2 + " are incompatible.", t3, t4, t5, this._evaluate$_stackTrace$1(t6.get$span(t6)), null)); + } + } + }, + _visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { + var result, t2, _0_0, _box_0, _1_0, t3, _i, i, _this = this, _null = null, + t1 = node instanceof A.ParenthesizedExpression, + inner = t1 ? node.expression : _null; + if (t1) { + result = _this._visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction); + return result instanceof A.SassString ? new A.SassString("(" + result._string$_text + ")", false) : result; + } + if (node instanceof A.StringExpression && node.accept$1(B.C_IsCalculationSafeVisitor)) { + t1 = node.text; + t2 = t1.get$asPlain(); + _0_0 = t2 == null ? _null : t2.toLowerCase(); + $label0$0: { + if ("pi" === _0_0) { + t1 = A.SassNumber_SassNumber(3.141592653589793, _null); + break $label0$0; + } + if ("e" === _0_0) { + t1 = A.SassNumber_SassNumber(2.718281828459045, _null); + break $label0$0; + } + if ("infinity" === _0_0) { + t1 = A.SassNumber_SassNumber(1 / 0, _null); + break $label0$0; + } + if ("-infinity" === _0_0) { + t1 = A.SassNumber_SassNumber(-1 / 0, _null); + break $label0$0; + } + if ("nan" === _0_0) { + t1 = A.SassNumber_SassNumber(0 / 0, _null); + break $label0$0; + } + t1 = new A.SassString(_this._performInterpolation$1(t1), false); + break $label0$0; + } + return t1; + } + _box_0 = {}; + _box_0.right = _box_0.left = _box_0.operator = null; + t1 = node instanceof A.BinaryOperationExpression; + if (t1) { + _box_0.operator = node.operator; + _box_0.left = node.left; + _box_0.right = node.right; + } + if (t1) { + _this._checkWhitespaceAroundCalculationOperator$1(node); + return _this._addExceptionSpan$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure(_box_0, _this, node, inLegacySassFunction)); + } + if (node instanceof A.NumberExpression || node instanceof A.VariableExpression || node instanceof A.FunctionExpression || node instanceof A.LegacyIfExpression) { + _1_0 = node.accept$1(_this); + $label1$1: { + if (_1_0 instanceof A.SassNumber) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassCalculation) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassString) { + t1 = !_1_0._hasQuotes; + result = _1_0; + } else { + result = _null; + t1 = false; + } + if (t1) { + t1 = result; + break $label1$1; + } + t1 = A.throwExpression(_this._evaluate$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + return t1; + } + if (node instanceof A.ListExpression && !node.hasBrackets && B.ListSeparator_SrV === node.separator && node.contents.length >= 2) { + t1 = A._setArrayType([], type$.JSArray_Object); + for (t2 = node.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push(_this._visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); + _this._checkAdjacentCalculationValues$2(t1, node); + for (i = 0; i < t1.length; ++i) { + t3 = t1[i]; + if (t3 instanceof A.CalculationOperation && t2[i] instanceof A.ParenthesizedExpression) + t1[i] = new A.SassString("(" + t3.toString$0(0) + ")", false); + } + return new A.SassString(B.JSArray_methods.join$1(t1, " "), false); + } + throw A.wrapException(_this._evaluate$_exception$2(string$.This_e, node.get$span(node))); + }, + _checkWhitespaceAroundCalculationOperator$1(node) { + var t2, t3, t4, textBetweenOperands, first, last, + t1 = node.operator; + if (t1 !== B.BinaryOperator_jCK && t1 !== B.BinaryOperator_tDf) + return; + t1 = node.left; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = node.right; + t4 = t3.get$span(t3); + if (t2 !== t4.get$file(t4)) + return; + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + if (t2.offset >= t4.get$start(t4).offset) + return; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); + first = textBetweenOperands.charCodeAt(0); + last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) + t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); + else + t1 = true; + if (t1) + throw A.wrapException(this._evaluate$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); + }, + _binaryOperatorToCalculationOperator$2(operator, node) { + var t1; + $label0$0: { + if (B.BinaryOperator_jCK === operator) { + t1 = B.CalculationOperator_dpX; + break $label0$0; + } + if (B.BinaryOperator_tDf === operator) { + t1 = B.CalculationOperator_KrC; + break $label0$0; + } + if (B.BinaryOperator_wkM === operator) { + t1 = B.CalculationOperator_LPB; + break $label0$0; + } + if (B.BinaryOperator_ehp === operator) { + t1 = B.CalculationOperator_wFL; + break $label0$0; + } + t1 = A.throwExpression(this._evaluate$_exception$2(string$.This_o, node.get$operatorSpan())); + } + return t1; + }, + _checkAdjacentCalculationValues$2(elements, node) { + var t1, i, t2, previous, current, previousNode, currentNode, _0_2; + for (t1 = elements.length, i = 1; i < t1; ++i) { + t2 = i - 1; + previous = elements[t2]; + current = elements[i]; + if (previous instanceof A.SassString || current instanceof A.SassString) + continue; + t1 = node.contents; + previousNode = t1[t2]; + currentNode = t1[i]; + if (currentNode instanceof A.UnaryOperationExpression) { + _0_2 = currentNode.operator; + if (B.UnaryOperator_hCO !== _0_2) + t1 = B.UnaryOperator_n2K === _0_2; + else + t1 = true; + } else + t1 = false; + if (!t1) + t1 = currentNode instanceof A.NumberExpression && currentNode.value < 0; + else + t1 = true; + if (t1) + throw A.wrapException(this._evaluate$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); + else + throw A.wrapException(this._evaluate$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); + } + }, + visitInterpolatedFunctionExpression$1(_, node) { + var result, _this = this, + t1 = _this._performInterpolation$1(node.name), + oldInFunction = _this._inFunction; + _this._inFunction = true; + result = _this._addErrorSpan$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure(_this, node, new A.PlainCssCallable(t1))); + _this._inFunction = oldInFunction; + return result; + }, + _runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + var oldInDependency, result, _this = this, + evaluated = _this._evaluateArguments$1($arguments), + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldInDependency = _this._inDependency; + _this._inDependency = callable.inDependency; + result = _this._withStackFrame$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure(_this, callable, evaluated, nodeWithSpan, run, $V)); + _this._inDependency = oldInDependency; + return result; + }, + _runFunctionCallable$3($arguments, callable, nodeWithSpan) { + var buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, _this = this; + if (callable instanceof A.BuiltInCallable) + return _this._withoutSlash$2(_this._runBuiltInCallable$3($arguments, callable, nodeWithSpan), nodeWithSpan); + else if (type$.UserDefinedCallable_Environment._is(callable)) + return _this._runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure(_this, callable), type$.Value); + else if (callable instanceof A.PlainCssCallable) { + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + buffer = new A.StringBuffer(callable.name + "("); + try { + first = true; + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + argument = t1[_i]; + if (first) + first = false; + else + buffer._contents += ", "; + t3 = buffer; + t4 = argument; + t4 = _this._evaluate$_serialize$3$quote(t4.accept$1(_this), t4, true); + t3._contents += t4; + } + restArg = $arguments.rest; + if (restArg != null) { + rest = restArg.accept$1(_this); + if (!first) + buffer._contents += ", "; + t1 = buffer; + t2 = _this._evaluate$_serialize$2(rest, restArg); + t1._contents += t2; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) + throw exception; + throw A.wrapException(A.MultiSpanSassRuntimeException$(error._span_exception$_message, J.get$span$x(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); + } else + throw exception; + } + t1 = buffer; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + t2 = buffer._contents; + return new A.SassString(t2.charCodeAt(0) == 0 ? t2 : t2, false); + } else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); + }, + _runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + var result, error, stackTrace, namedSet, _0_0, parameters, i, t1, parameter, t2, t3, rest, argumentList, exception, _this = this, _box_0 = {}, + evaluated = _this._evaluateArguments$1($arguments), + oldCallableNode = _this._callableNode; + _this._callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); + _box_0.callback = _box_0.overload = null; + _0_0 = callable.callbackFor$2(evaluated._values[2].length, namedSet); + _box_0.overload = _0_0._0; + _box_0.callback = _0_0._1; + _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure(_box_0, evaluated, namedSet)); + parameters = _box_0.overload.parameters; + for (i = evaluated._values[2].length, t1 = parameters.length; i < t1; ++i) { + parameter = parameters[i]; + t2 = evaluated._values[2]; + t3 = evaluated._values[0].remove$1(0, parameter.name); + if (t3 == null) { + t3 = parameter.defaultValue; + t3 = _this._withoutSlash$2(t3.accept$1(_this), t3); + } + t2.push(t3); + } + if (_box_0.overload.restParameter != null) { + if (evaluated._values[2].length > t1) { + rest = B.JSArray_methods.sublist$1(evaluated._values[2], t1); + B.JSArray_methods.removeRange$2(evaluated._values[2], t1, evaluated._values[2].length); + } else + rest = B.List_empty8; + t1 = evaluated._values[0]; + argumentList = A.SassArgumentList$(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_3_undecided ? B.ListSeparator_z0K : evaluated._values[4]); + evaluated._values[2].push(argumentList); + } else + argumentList = null; + result = null; + try { + result = _this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure0(_box_0, evaluated)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException) + throw exception; + else { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(_this._evaluate$_exception$2(_this._getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); + } + } + _this._callableNode = oldCallableNode; + if (argumentList == null) + return result; + if (evaluated._values[0].__js_helper$_length === 0) + return result; + if (argumentList._wereKeywordsAccessed) + return result; + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + A.pluralize("parameter", evaluated._values[0].get$keys(0).get$length(0), null) + " named " + A.toSentence(evaluated._values[0].get$keys(0).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure1(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); + }, + _evaluateArguments$1($arguments) { + var t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, $name, value, restArgs, rest, restNodeForSpan, t5, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, _this = this, + positional = A._setArrayType([], type$.JSArray_Value), + positionalNodes = A._setArrayType([], type$.JSArray_AstNode); + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + expression = t1[_i]; + nodeForSpan = _this._expressionNode$1(expression); + positional.push(_this._withoutSlash$2(expression.accept$1(_this), nodeForSpan)); + positionalNodes.push(nodeForSpan); + } + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value); + t2 = type$.AstNode; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t3 = A.MapExtensions_get_pairs($arguments.named, t1, type$.Expression), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + $name = t4._0; + value = t4._1; + nodeForSpan = _this._expressionNode$1(value); + named.$indexSet(0, $name, _this._withoutSlash$2(value.accept$1(_this), nodeForSpan)); + namedNodes.$indexSet(0, $name, nodeForSpan); + } + restArgs = $arguments.rest; + if (restArgs == null) + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_3_undecided]); + rest = restArgs.accept$1(_this); + restNodeForSpan = _this._expressionNode$1(restArgs); + if (rest instanceof A.SassMap) { + _this._addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map$_contents, t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4), t5 = type$.SassString; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_3_undecided; + } else if (rest instanceof A.SassList) { + t3 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure0(_this, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._separator; + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure1(_this, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push(_this._withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_3_undecided; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + keywordRest = keywordRestArgs.accept$1(_this); + keywordRestNodeForSpan = _this._expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap) { + _this._addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure2()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map$_contents, t2 = t2.get$keys(t2), t2 = t2.get$iterator(t2), t3 = type$.SassString; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + } else + throw A.wrapException(_this._evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + }, + _evaluateMacroArguments$1(invocation) { + var t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, _this = this, + t1 = invocation.$arguments, + restArgs_ = t1.rest; + if (restArgs_ == null) + return new A._Record_2(t1.positional, t1.named); + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression); + rest = restArgs_.accept$1(_this); + restNodeForSpan = _this._expressionNode$1(restArgs_); + if (rest instanceof A.SassMap) + _this._addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure(restArgs_)); + else if (rest instanceof A.SassList) { + t2 = rest._list$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure0(_this, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression>"))); + if (rest instanceof A.SassArgumentList) { + rest._wereKeywordsAccessed = true; + rest._keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure1(_this, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression(_this._withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) + return new A._Record_2(positional, named); + keywordRest = keywordRestArgs_.accept$1(_this); + keywordRestNodeForSpan = _this._expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap) { + _this._addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure2(_this, keywordRestNodeForSpan, keywordRestArgs_)); + return new A._Record_2(positional, named); + } else + throw A.wrapException(_this._evaluate$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + }, + _addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure(this, values, convert, this._expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _addRestMap$4(values, map, nodeWithSpan, convert) { + return this._addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _verifyArguments$4(positional, named, parameters, nodeWithSpan) { + return this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure(parameters, positional, named)); + }, + visitSelectorExpression$1(_, node) { + var t1 = this._styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + return t1 == null ? B.C__SassNull : t1; + }, + visitStringExpression$1(_, node) { + var t1, t2, t3, _i, value, t4, _0_0, text, _this = this, + oldInSupportsDeclaration = _this._inSupportsDeclaration; + _this._inSupportsDeclaration = false; + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = node.text.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) { + value = t2[_i]; + $label0$0: { + if (typeof value == "string") { + t4 = value; + break $label0$0; + } + if (value instanceof A.Expression) { + _0_0 = value.accept$1(_this); + $label1$1: { + if (_0_0 instanceof A.SassString) { + text = _0_0._string$_text; + t4 = text; + break $label1$1; + } + t4 = _this._evaluate$_serialize$3$quote(_0_0, value, false); + break $label1$1; + } + break $label0$0; + } + t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); + } + t1.push(t4); + } + t1 = B.JSArray_methods.join$0(t1); + _this._inSupportsDeclaration = oldInSupportsDeclaration; + return new A.SassString(t1, node.hasQuotes); + }, + visitSupportsExpression$1(_, expression) { + return new A.SassString(this._visitSupportsCondition$1(expression.condition), false); + }, + visitCssAtRule$1(node) { + var wasInKeyframes, wasInUnknownAtRule, t1, rule, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + _this._copyParentAfterSibling$0(); + _this._assertInModule$2(_this.__parent, "__parent").addChild$1(A.ModifiableCssAtRule$(node.name, node.span, true, node.value)); + return; + } + wasInKeyframes = _this._inKeyframes; + wasInUnknownAtRule = _this._inUnknownAtRule; + t1 = node.name; + if (A.unvendor(t1.value) === "keyframes") + _this._inKeyframes = true; + else + _this._inUnknownAtRule = true; + rule = A.ModifiableCssAtRule$(t1, node.span, false, node.value); + if (_this.get$_hasCssNesting()) { + _this._withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitCssAtRule_closure(_this, node), false, type$.ModifiableCssAtRule, type$.Null); + _this._inUnknownAtRule = wasInUnknownAtRule; + _this._inKeyframes = wasInKeyframes; + return; + } + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssAtRule_closure0(_this, node), false, new A._EvaluateVisitor_visitCssAtRule_closure1(), type$.ModifiableCssAtRule, type$.Null); + _this._inUnknownAtRule = wasInUnknownAtRule; + _this._inKeyframes = wasInKeyframes; + }, + visitCssComment$1(node) { + var _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._assertInModule$2(_this.__parent, _s8_) === _this._assertInModule$2(_this.__root, "_root") && _this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, "_root").children._collection$_source)) + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + _this._copyParentAfterSibling$0(); + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(new A.ModifiableCssComment(node.text, node.span)); + }, + visitCssDeclaration$1(node) { + this._copyParentAfterSibling$0(); + this._assertInModule$2(this.__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$(node.name, node.value, node.span, node.parsedAsSassScript, node.valueSpanForMap)); + }, + visitCssImport$1(node) { + var t1, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports", + modifiableNode = new A.ModifiableCssImport(node.url, node.modifiers, node.span); + if (_this._assertInModule$2(_this.__parent, _s8_) !== _this._assertInModule$2(_this.__root, _s5_)) { + _this._copyParentAfterSibling$0(); + _this._assertInModule$2(_this.__parent, _s8_).addChild$1(modifiableNode); + } else if (_this._assertInModule$2(_this.__endOfImports, _s13_) === J.get$length$asx(_this._assertInModule$2(_this.__root, _s5_).children._collection$_source)) { + _this._assertInModule$2(_this.__root, _s5_).addChild$1(modifiableNode); + _this.__endOfImports = _this._assertInModule$2(_this.__endOfImports, _s13_) + 1; + } else { + t1 = _this._outOfOrderImports; + (t1 == null ? _this._outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t1).push(modifiableNode); + } + }, + visitCssKeyframeBlock$1(node) { + this._withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure(this, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure0(), type$.ModifiableCssKeyframeBlock, type$.Null); + }, + visitCssMediaRule$1(node) { + var mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Media_, node.span)); + if (_this.get$_hasCssNesting()) { + _this._withParent$2$3$scopeWhen(A.ModifiableCssMediaRule$(node.queries, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure(_this, node), false, type$.ModifiableCssMediaRule, type$.Null); + return; + } + mergedQueries = A.NullableExtension_andThen(_this._mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure0(_this, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return; + if (t1) + mergedSources = B.Set_empty2; + else { + t2 = _this._mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery); + t3 = _this._mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + _this._withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure1(_this, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure2(mergedSources), type$.ModifiableCssMediaRule, type$.Null); + }, + visitCssStyleRule$1(node) { + var t1, styleRule, _0_0, t2, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _1_1, lastChild, _this = this, _null = null, + _s8_ = "__parent"; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_n, node.span)); + else if (_this._inKeyframes && _this._assertInModule$2(_this.__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock) + throw A.wrapException(_this._evaluate$_exception$2(string$.Style_k, node.span)); + t1 = _this._atRootExcludingStyleRule; + styleRule = t1 ? _null : _this._styleRuleIgnoringAtRoot; + _0_0 = t1 ? _null : _this._styleRuleIgnoringAtRoot; + $label0$0: { + if (_0_0 == null) { + t1 = true; + break $label0$0; + } + if (_0_0.fromPlainCss) { + t1 = false; + break $label0$0; + } + t1 = !(node.fromPlainCss && node._style_rule$_selector._box$_inner.value.accept$1(B.C__ContainsParentSelectorVisitor)); + break $label0$0; + } + t2 = node._style_rule$_selector._box$_inner; + if (t1) { + t2 = t2.value; + t3 = styleRule == null ? _null : styleRule.originalSelector; + originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !_this._atRootExcludingStyleRule, node.fromPlainCss); + } else + originalSelector = t2.value; + rule = A.ModifiableCssStyleRule$(_this._assertInModule$2(_this.__extensionStore, "_extensionStore").addSelector$2(originalSelector, _this._mediaQueries), node.span, node.fromPlainCss, originalSelector); + oldAtRootExcludingStyleRule = _this._atRootExcludingStyleRule; + _this._atRootExcludingStyleRule = false; + t1 = t1 ? new A._EvaluateVisitor_visitCssStyleRule_closure() : _null; + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure0(_this, rule, node), false, t1, type$.ModifiableCssStyleRule, type$.Null); + _this._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + t1 = _this._assertInModule$2(_this.__parent, _s8_).children._collection$_source; + t2 = J.getInterceptor$asx(t1); + _1_1 = t2.get$length(t1); + if (_1_1 >= 1) { + lastChild = t2.elementAt$1(t1, _1_1 - 1); + t1 = styleRule == null; + } else { + lastChild = _null; + t1 = false; + } + if (t1) + lastChild.isGroupEnd = true; + }, + visitCssStylesheet$1(node) { + var t1; + for (t1 = J.get$iterator$ax(node.get$children(node)); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + }, + visitCssSupportsRule$1(node) { + var rule, _this = this; + if (_this._declarationName != null) + throw A.wrapException(_this._evaluate$_exception$2(string$.Suppor, node.span)); + rule = A.ModifiableCssSupportsRule$(node.condition, node.span); + if (_this.get$_hasCssNesting()) { + _this._withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitCssSupportsRule_closure(_this, node), false, type$.ModifiableCssSupportsRule, type$.Null); + return; + } + _this._withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssSupportsRule_closure0(_this, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure1(), type$.ModifiableCssSupportsRule, type$.Null); + }, + _handleReturn$1$2(list, callback) { + var t1, _i, _0_0; + for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i) { + _0_0 = callback.call$1(list[_i]); + if (_0_0 != null) + return _0_0; + } + return null; + }, + _handleReturn$2(list, callback) { + return this._handleReturn$1$2(list, callback, type$.dynamic); + }, + _withEnvironment$1$2(environment, callback) { + var result, + oldEnvironment = this._environment; + this._environment = environment; + result = callback.call$0(); + this._environment = oldEnvironment; + return result; + }, + _withEnvironment$2(environment, callback) { + return this._withEnvironment$1$2(environment, callback, type$.dynamic); + }, + _interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + var result = this._performInterpolation$2$warnForColor(interpolation, warnForColor), + t1 = trim ? A.trimAscii(result, true) : result; + return new A.CssValue(t1, interpolation.span, type$.CssValue_String); + }, + _interpolationToValue$1(interpolation) { + return this._interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor)._0; + }, + _performInterpolation$1(interpolation) { + return this._performInterpolation$2$warnForColor(interpolation, false); + }, + _performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { + var _0_0 = this._performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), + map = _0_0._1; + map.toString; + return new A._Record_2(_0_0._0, map); + }, + _performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { + var t1, t2, t3, t4, t5, t6, first, _i, t7, value, result, result0, t8, _this = this, + targetOffsets = sourceMap ? A._setArrayType([], type$.JSArray_int) : null, + oldInSupportsDeclaration = _this._inSupportsDeclaration; + _this._inSupportsDeclaration = false; + for (t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression, t4 = targetOffsets == null, t5 = interpolation.span, t6 = type$.Object, first = true, _i = 0, t7 = ""; _i < t2; ++_i, first = false) { + value = t1[_i]; + if (!first) + if (!t4) + targetOffsets.push(t7.length); + if (typeof value == "string") { + t7 += value; + continue; + } + t3._as(value); + result = value.accept$1(_this); + if (warnForColor && $.$get$namesByColor().containsKey$1(result)) { + result0 = A.List_List$from([""], false, t6); + result0.$flags = 3; + t8 = $.$get$namesByColor(); + _this._warn$2(string$.You_pr + A.S(t8.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t8.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression(B.BinaryOperator_jCK, new A.StringExpression(new A.Interpolation(result0, B.List_null, t5), true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + t7 += _this._evaluate$_serialize$3$quote(result, value, false); + } + _this._inSupportsDeclaration = oldInSupportsDeclaration; + return new A._Record_2(t7.charCodeAt(0) == 0 ? t7 : t7, A.NullableExtension_andThen(targetOffsets, new A._EvaluateVisitor__performInterpolationHelper_closure(interpolation))); + }, + _evaluate$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure(value, quote)); + }, + _evaluate$_serialize$2(value, nodeWithSpan) { + return this._evaluate$_serialize$3$quote(value, nodeWithSpan, true); + }, + _expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression) { + t1 = this._addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + var oldParent, result, _this = this; + _this._addChild$2$through(node, through); + oldParent = _this._assertInModule$2(_this.__parent, "__parent"); + _this.__parent = node; + result = _this._environment.scope$1$2$when(callback, scopeWhen, $T); + _this.__parent = oldParent; + return result; + }, + _withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _withParent$2$2(node, callback, $S, $T) { + return this._withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _copyParentAfterSibling$0() { + var t1, grandparent, newParent, _this = this, + _s8_ = "__parent", + _0_0 = _this._assertInModule$2(_this.__parent, _s8_)._parent; + if (_0_0 != null) { + t1 = _0_0.children; + t1 = t1.get$last(t1) !== _this._assertInModule$2(_this.__parent, _s8_); + grandparent = _0_0; + } else { + grandparent = null; + t1 = false; + } + if (t1) { + newParent = _this._assertInModule$2(_this.__parent, _s8_).copyWithoutChildren$0(); + grandparent.addChild$1(newParent); + _this.__parent = newParent; + } + }, + _addChild$2$through(node, through) { + var _0_0, grandparent, t1, + $parent = this._assertInModule$2(this.__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = _0_0) { + _0_0 = $parent._parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + grandparent = $parent._parent; + t1 = grandparent.children; + if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) + $parent = type$.ModifiableCssParentNode._as(t1.get$last(t1)); + else { + $parent = $parent.copyWithoutChildren$0(); + grandparent.addChild$1($parent); + } + } + } + $parent.addChild$1(node); + }, + _addChild$1(node) { + return this._addChild$2$through(node, null); + }, + _withStyleRule$1$2(rule, callback) { + var result, + oldRule = this._styleRuleIgnoringAtRoot; + this._styleRuleIgnoringAtRoot = rule; + result = callback.call$0(); + this._styleRuleIgnoringAtRoot = oldRule; + return result; + }, + _withStyleRule$2(rule, callback) { + return this._withStyleRule$1$2(rule, callback, type$.dynamic); + }, + _withMediaQueries$1$3(queries, sources, callback) { + var result, _this = this, + oldMediaQueries = _this._mediaQueries, + oldSources = _this._mediaQuerySources; + _this._mediaQueries = queries; + _this._mediaQuerySources = sources; + result = callback.call$0(); + _this._mediaQueries = oldMediaQueries; + _this._mediaQuerySources = oldSources; + return result; + }, + _withMediaQueries$3(queries, sources, callback) { + return this._withMediaQueries$1$3(queries, sources, callback, type$.dynamic); + }, + _withStackFrame$1$3(member, nodeWithSpan, callback) { + var oldMember, result, _this = this, + t1 = _this._stack; + t1.push(new A._Record_2(_this._member, nodeWithSpan)); + oldMember = _this._member; + _this._member = member; + result = callback.call$0(); + _this._member = oldMember; + t1.pop(); + return result; + }, + _withStackFrame$3(member, nodeWithSpan, callback) { + return this._withStackFrame$1$3(member, nodeWithSpan, callback, type$.dynamic); + }, + _withoutSlash$2(value, nodeForSpan) { + var t1; + if (value instanceof A.SassNumber) + t1 = value.asSlash != null; + else + t1 = false; + if (t1) + this._warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_qZ1); + return value.withoutSlash$0(); + }, + _stackFrame$2(member, span) { + return A.frameForSpan(span, member, A.NullableExtension_andThen(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure(this))); + }, + _evaluate$_stackTrace$1(span) { + var t2, t3, _i, t4, nodeWithSpan, _this = this, + t1 = A._setArrayType([], type$.JSArray_Frame); + for (t2 = _this._stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = t2[_i]; + nodeWithSpan = t4._1; + t1.push(_this._stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); + } + if (span != null) + t1.push(_this._stackFrame$2(_this._member, span)); + return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); + }, + _evaluate$_stackTrace$0() { + return this._evaluate$_stackTrace$1(null); + }, + _warn$3(message, span, deprecation) { + var trace, t1, _this = this; + if (_this._quietDeps && _this._inDependency) + return; + if (!_this._warningsEmitted.add$1(0, new A._Record_2(message, span))) + return; + trace = _this._evaluate$_stackTrace$1(span); + t1 = _this._logger; + if (deprecation == null) + t1.internalWarn$4$deprecation$span$trace(message, null, span, trace); + else + A.WarnForDeprecation_warnForDeprecation(t1, deprecation, message, span, trace); + }, + _warn$2(message, span) { + return this._warn$3(message, span, null); + }, + _evaluate$_exception$2(message, span) { + var t1, t2; + if (span == null) { + t1 = B.JSArray_methods.get$last(this._stack)._1; + t1 = t1.get$span(t1); + } else + t1 = span; + t2 = this._evaluate$_stackTrace$1(span); + return new A.SassRuntimeException(t2, B.Set_empty, message, t1); + }, + _evaluate$_exception$1(message) { + return this._evaluate$_exception$2(message, null); + }, + _multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = B.JSArray_methods.get$last(this._stack)._1; + return A.MultiSpanSassRuntimeException$(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._evaluate$_stackTrace$0(), null); + }, + _addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace(t1.withTrace$1(this._evaluate$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw exception; + } + }, + _addExceptionSpan$2(nodeWithSpan, callback) { + return this._addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, true, type$.dynamic); + }, + _addExceptionSpan$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { + return this._addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, type$.dynamic); + }, + _addExceptionTrace$1$1(callback) { + var error, stackTrace, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t1)) + throw exception; + else if (t1 instanceof A.SassException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$x(t1); + A.throwWithTrace(error.withTrace$1(this._evaluate$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); + } else + throw exception; + } + }, + _addExceptionTrace$1(callback) { + return this._addExceptionTrace$1$1(callback, type$.dynamic); + }, + _addErrorSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, t2, t3; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (!B.JSString_methods.startsWith$1(J.get$span$x(error).get$text(), "@error")) + throw exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = this._evaluate$_stackTrace$0(); + A.throwWithTrace(new A.SassRuntimeException(t3, B.Set_empty, t1, t2), error, stackTrace); + } else + throw exception; + } + }, + _addErrorSpan$2(nodeWithSpan, callback) { + return this._addErrorSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _getErrorMessage$1(error) { + var t1, exception; + if (type$.Error._is(error)) + return error.toString$0(0); + try { + t1 = A._asString(J.get$message$x(error)); + return t1; + } catch (exception) { + t1 = J.toString$0$(error); + return t1; + } + } + }; + A._EvaluateVisitor_closure.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string$_text) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure0.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string$_text, "_", "-")) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure1.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._environment; + t3 = variable._string$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string$_text) != null || t1._builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure2.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._environment; + t2 = A.stringReplaceAllUnchecked(variable._string$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string$_text) != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure3.prototype = { + call$1($arguments) { + var t1 = this.$this._environment; + if (!t1._inMixin) + throw A.wrapException(A.SassScriptException$(string$.conten, null)); + return t1._content != null ? B.SassBoolean_true : B.SassBoolean_false; + }, + $signature: 11 + }; + A._EvaluateVisitor_closure4.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = this.$this._environment._environment$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString(t4._0, true), t4._1); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure5.prototype = { + call$1($arguments) { + var t3, t4, t5, + t1 = this.$this, + t2 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = t1._environment._environment$_modules.$index(0, t2); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t2 + '".'); + t2 = type$.Value; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t4 = A.MapExtensions_get_pairs(module.get$functions(module), type$.String, type$.Callable), t4 = t4.get$iterator(t4), t1 = t1._compileContext; t4.moveNext$0();) { + t5 = t4.get$current(t4); + t3.$indexSet(0, new A.SassString(t5._0, true), new A.SassFunction(t5._1, t1)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t3, t2, t2)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure6.prototype = { + call$1($arguments) { + var t3, t4, t5, + t1 = this.$this, + t2 = J.$index$asx($arguments, 0).assertString$1("module")._string$_text, + module = t1._environment._environment$_modules.$index(0, t2); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t2 + '".'); + t2 = type$.Value; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t4 = A.MapExtensions_get_pairs(module.get$mixins(), type$.String, type$.Callable), t4 = t4.get$iterator(t4), t1 = t1._compileContext; t4.moveNext$0();) { + t5 = t4.get$current(t4); + t3.$indexSet(0, new A.SassString(t5._0, true), new A.SassMixin(t5._1, t1)); + } + return new A.SassMap(A.ConstantMap_ConstantMap$from(t3, t2, t2)); + }, + $signature: 38 + }; + A._EvaluateVisitor_closure7.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css) { + if (module != null) + throw A.wrapException(string$.x24css_a); + return new A.SassFunction(new A.PlainCssCallable($name._string$_text), this.$this._compileContext); + } + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + callable = t1._addExceptionSpan$2(t2, new A._EvaluateVisitor__closure2(t1, $name, module)); + if (callable == null) + throw A.wrapException("Function not found: " + $name.toString$0(0)); + return new A.SassFunction(callable, t1._compileContext); + }, + $signature: 167 + }; + A._EvaluateVisitor__closure2.prototype = { + call$0() { + var local, + normalizedName = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t1 = this.module, + namespace = t1 == null ? null : t1._string$_text; + t1 = this.$this; + local = t1._environment.getFunction$2$namespace(normalizedName, namespace); + if (local != null || namespace != null) + return local; + return t1._builtInFunctions.$index(0, normalizedName); + }, + $signature: 113 + }; + A._EvaluateVisitor_closure8.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + callable = t1._addExceptionSpan$2(t2, new A._EvaluateVisitor__closure1(t1, $name, module)); + if (callable == null) + throw A.wrapException("Mixin not found: " + $name.toString$0(0)); + return new A.SassMixin(callable, t1._compileContext); + }, + $signature: 168 + }; + A._EvaluateVisitor__closure1.prototype = { + call$0() { + var t1 = this.$this._environment, + t2 = A.stringReplaceAllUnchecked(this.name._string$_text, "_", "-"), + t3 = this.module; + return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string$_text); + }, + $signature: 113 + }; + A._EvaluateVisitor_closure9.prototype = { + call$1($arguments) { + var callableNode, t2, t3, t4, t5, t6, t7, invocation, callable, + t1 = J.getInterceptor$asx($arguments), + $function = t1.$index($arguments, 0), + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = this.$this; + callableNode = t1._callableNode; + t2 = callableNode.get$span(callableNode); + t3 = callableNode.get$span(callableNode); + args._wereKeywordsAccessed = true; + t4 = args._keywords; + if (t4.get$isEmpty(t4)) + t4 = null; + else { + t5 = type$.Value; + t6 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t5); + for (args._wereKeywordsAccessed = true, t4 = A.MapExtensions_get_pairs(t4, type$.String, t5), t4 = t4.get$iterator(t4); t4.moveNext$0();) { + t7 = t4.get$current(t4); + t6.$indexSet(0, new A.SassString(t7._0, false), t7._1); + } + t4 = new A.ValueExpression(new A.SassMap(A.ConstantMap_ConstantMap$from(t6, t5, t5)), callableNode.get$span(callableNode)); + } + invocation = A.ArgumentList$(B.List_empty9, B.Map_empty4, B.Map_empty5, t2, t4, new A.ValueExpression(args, t3)); + if ($function instanceof A.SassString) { + A.warnForDeprecation(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_c4i); + callableNode = t1._callableNode; + t2 = $function._string$_text; + t3 = callableNode.get$span(callableNode); + return t1.visitFunctionExpression$1(0, new A.FunctionExpression(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); + } + callable = $function.assertFunction$1("function").assertCompileContext$1(t1._compileContext).callable; + if (type$.Callable._is(callable)) { + t2 = t1._callableNode; + t2.toString; + return t1._runFunctionCallable$3(invocation, callable, t2); + } else + throw A.wrapException(A.SassScriptException$("The function " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 5 + }; + A._EvaluateVisitor_closure10.prototype = { + call$1($arguments) { + var withMap, t2, t3, values, span, configuration, + t1 = J.getInterceptor$asx($arguments), + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map$_contents; + t1 = this.$this; + t2 = t1._callableNode; + t2.toString; + if (withMap != null) { + t3 = {}; + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue); + span = t2.get$span(t2); + t3.privateDeprecation = false; + withMap.forEach$1(0, new A._EvaluateVisitor__closure(t3, values, span, t2)); + configuration = new A.ExplicitConfiguration(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null; + t3 = t2.get$span(t2); + t1._loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure0(t1), t3.get$sourceUrl(t3), configuration, true); + t1._assertConfigurationIsEmpty$2$nameInError(configuration, true); + }, + $signature: 191 + }; + A._EvaluateVisitor__closure.prototype = { + call$2(variable, value) { + var _this = this, + t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string$_text, "_", "-"); + t1 = _this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + else if (B.JSString_methods.startsWith$1($name, "-") && !_this._box_0.privateDeprecation) { + _this._box_0.privateDeprecation = true; + A.warnForDeprecation("Configuring private variables (such as $" + $name + string$.x29x20is_dT, B.Deprecation_mXO); + } + t1.$indexSet(0, $name, new A.ConfiguredValue(value, _this.span, _this.callableNode)); + }, + $signature: 99 + }; + A._EvaluateVisitor__closure0.prototype = { + call$2(module, _) { + var t1 = this.$this; + return t1._combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 114 + }; + A._EvaluateVisitor_closure11.prototype = { + call$1($arguments) { + var callableNode, invocation, callable, $content, + t1 = J.getInterceptor$asx($arguments), + mixin = t1.$index($arguments, 0), + args = type$.SassArgumentList._as(t1.$index($arguments, 1)); + t1 = this.$this; + callableNode = t1._callableNode; + invocation = A.ArgumentList$(B.List_empty9, B.Map_empty4, B.Map_empty5, callableNode.get$span(callableNode), null, new A.ValueExpression(args, callableNode.get$span(callableNode))); + callable = mixin.assertMixin$1("mixin").assertCompileContext$1(t1._compileContext).callable; + $content = t1._environment._content; + if (type$.Callable._is(callable)) + t1._applyMixin$5(callable, $content, invocation, callableNode, callableNode); + else + throw A.wrapException(A.SassScriptException$("The mixin " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 191 + }; + A._EvaluateVisitor_run_closure.prototype = { + call$0() { + var module, _this = this, + t1 = _this.node, + t2 = t1.span, + _0_0 = t2.get$sourceUrl(t2), + url = null; + if (_0_0 != null) { + url = _0_0; + t2 = _this.$this; + t2._activeModules.$indexSet(0, url, null); + t2._loadedUrls.add$1(0, url); + } + t2 = _this.$this; + module = t2._addExceptionTrace$1(new A._EvaluateVisitor_run__closure(t2, _this.importer, t1)); + return new A._Record_2_loadedUrls_stylesheet(t2._loadedUrls, t2._combineCss$1(module)); + }, + $signature: 589 + }; + A._EvaluateVisitor_run__closure.prototype = { + call$0() { + return this.$this._execute$2(this.importer, this.node); + }, + $signature: 601 + }; + A._EvaluateVisitor_runExpression_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.expression; + return t1._withFakeStylesheet$3(this.importer, t2, new A._EvaluateVisitor_runExpression__closure(t1, t2)); + }, + $signature: 33 + }; + A._EvaluateVisitor_runExpression__closure.prototype = { + call$0() { + var t1 = this.$this; + return t1._addExceptionTrace$1(new A._EvaluateVisitor_runExpression___closure(t1, this.expression)); + }, + $signature: 33 + }; + A._EvaluateVisitor_runExpression___closure.prototype = { + call$0() { + return this.expression.accept$1(this.$this); + }, + $signature: 33 + }; + A._EvaluateVisitor_runStatement_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.statement; + return t1._withFakeStylesheet$3(this.importer, t2, new A._EvaluateVisitor_runStatement__closure(t1, t2)); + }, + $signature: 0 + }; + A._EvaluateVisitor_runStatement__closure.prototype = { + call$0() { + var t1 = this.$this; + return t1._addExceptionTrace$1(new A._EvaluateVisitor_runStatement___closure(t1, this.statement)); + }, + $signature: 0 + }; + A._EvaluateVisitor_runStatement___closure.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure.prototype = { + call$0() { + return this.callback.call$2(this._box_0.builtInModule, false); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure0.prototype = { + call$0() { + var canonicalUrl, oldInDependency, t4, message, _this = this, t1 = {}, stylesheet = null, importer = null, + t2 = _this.$this, + t3 = _this.nodeWithSpan, + _1_0 = t2._loadStylesheet$3$baseUrl(_this.url.toString$0(0), t3.get$span(t3), _this.baseUrl); + stylesheet = _1_0._0; + importer = _1_0._1; + t4 = stylesheet.span; + canonicalUrl = t4.get$sourceUrl(t4); + if (canonicalUrl != null) { + t4 = t2._activeModules; + if (t4.containsKey$1(canonicalUrl)) { + message = _this.namesInErrors ? "Module loop: " + $.$get$context().prettyUri$1(canonicalUrl) + " is already being loaded." : string$.Modulel; + t1 = A.NullableExtension_andThen(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure(t2, message)); + throw A.wrapException(t1 == null ? t2._evaluate$_exception$1(message) : t1); + } else + t4.$indexSet(0, canonicalUrl, t3); + } + t4 = t2._modules.containsKey$1(canonicalUrl); + oldInDependency = t2._inDependency; + t2._inDependency = _1_0._2; + t1.module = null; + try { + t1.module = t2._execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, _this.configuration, _this.namesInErrors, t3); + } finally { + t2._activeModules.remove$1(0, canonicalUrl); + t2._inDependency = oldInDependency; + } + t2._addExceptionSpan$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure0(t1, _this.callback, !t4), false); + }, + $signature: 1 + }; + A._EvaluateVisitor__loadModule__closure.prototype = { + call$1(previousLoad) { + return this.$this._multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 111 + }; + A._EvaluateVisitor__loadModule__closure0.prototype = { + call$0() { + return this.callback.call$2(this._box_1.module, this.firstLoad); + }, + $signature: 0 + }; + A._EvaluateVisitor__execute_closure.prototype = { + call$0() { + var t3, t4, t5, t6, _this = this, + t1 = _this.$this, + oldImporter = t1._importer, + oldStylesheet = t1.__stylesheet, + oldRoot = t1.__root, + oldPreModuleComments = t1._preModuleComments, + oldParent = t1.__parent, + oldEndOfImports = t1.__endOfImports, + oldOutOfOrderImports = t1._outOfOrderImports, + oldExtensionStore = t1.__extensionStore, + t2 = t1._atRootExcludingStyleRule, + oldStyleRule = t2 ? null : t1._styleRuleIgnoringAtRoot, + oldMediaQueries = t1._mediaQueries, + oldDeclarationName = t1._declarationName, + oldInUnknownAtRule = t1._inUnknownAtRule, + oldInKeyframes = t1._inKeyframes, + oldConfiguration = t1._configuration; + t1._importer = _this.importer; + t3 = t1.__stylesheet = _this.stylesheet; + t4 = t3.span; + t5 = t1.__parent = t1.__root = A.ModifiableCssStylesheet$(t4); + t1.__endOfImports = 0; + t1._outOfOrderImports = null; + t1.__extensionStore = _this.extensionStore; + t1._declarationName = t1._mediaQueries = t1._styleRuleIgnoringAtRoot = null; + t1._inKeyframes = t1._atRootExcludingStyleRule = t1._inUnknownAtRule = false; + t6 = _this.configuration; + if (t6 != null) + t1._configuration = t6; + t1.visitStylesheet$1(0, t3); + t3 = t1._outOfOrderImports == null ? t5 : new A.CssStylesheet(new A.UnmodifiableListView(t1._addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode), t4); + _this.css.__late_helper$_value = t3; + _this.preModuleComments.__late_helper$_value = t1._preModuleComments; + t1._importer = oldImporter; + t1.__stylesheet = oldStylesheet; + t1.__root = oldRoot; + t1._preModuleComments = oldPreModuleComments; + t1.__parent = oldParent; + t1.__endOfImports = oldEndOfImports; + t1._outOfOrderImports = oldOutOfOrderImports; + t1.__extensionStore = oldExtensionStore; + t1._styleRuleIgnoringAtRoot = oldStyleRule; + t1._mediaQueries = oldMediaQueries; + t1._declarationName = oldDeclarationName; + t1._inUnknownAtRule = oldInUnknownAtRule; + t1._atRootExcludingStyleRule = t2; + t1._inKeyframes = oldInKeyframes; + t1._configuration = oldConfiguration; + }, + $signature: 1 + }; + A._EvaluateVisitor__combineCss_closure.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 95 + }; + A._EvaluateVisitor__combineCss_closure0.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__combineCss_visitModule.prototype = { + call$1(module) { + var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; + if (!_this.seen.add$1(0, module)) + return; + if (_this.clone) + module = module.cloneCss$0(); + for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss()) { + _1_0 = module.get$preModuleComments().$index(0, upstream); + if (_1_0 != null) + B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); + _this.call$1(upstream); + } + } + _this.sorted.addFirst$1(module); + t1 = module.get$css(module); + statements = t1.get$children(t1); + index = _this.$this._indexAfterImports$1(statements); + t1 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); + }, + $signature: 604 + }; + A._EvaluateVisitor__extendModules_closure.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 14 + }; + A._EvaluateVisitor__extendModules_closure0.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore); + }, + $signature: 170 + }; + A._EvaluateVisitor_visitAtRootRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRootRule_closure0.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 0 + }; + A._EvaluateVisitor__scopeForAtRoot_closure.prototype = { + call$1(callback) { + var t1 = this.$this, + oldParent = t1._assertInModule$2(t1.__parent, "__parent"); + t1.__parent = this.newParent; + t1._environment.scope$1$2$when(callback, this.node.hasDeclarations, type$.void); + t1.__parent = oldParent; + }, + $signature: 35 + }; + A._EvaluateVisitor__scopeForAtRoot_closure0.prototype = { + call$1(callback) { + var t1 = this.$this, + oldAtRootExcludingStyleRule = t1._atRootExcludingStyleRule; + t1._atRootExcludingStyleRule = true; + this.innerScope.call$1(callback); + t1._atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + }, + $signature: 35 + }; + A._EvaluateVisitor__scopeForAtRoot_closure1.prototype = { + call$1(callback) { + return this.$this._withMediaQueries$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure(this.innerScope, callback)); + }, + $signature: 35 + }; + A._EvaluateVisitor__scopeForAtRoot__closure.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 1 + }; + A._EvaluateVisitor__scopeForAtRoot_closure2.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInKeyframes = t1._inKeyframes; + t1._inKeyframes = false; + this.innerScope.call$1(callback); + t1._inKeyframes = wasInKeyframes; + }, + $signature: 35 + }; + A._EvaluateVisitor__scopeForAtRoot_closure3.prototype = { + call$1($parent) { + return $parent instanceof A.ModifiableCssAtRule; + }, + $signature: 172 + }; + A._EvaluateVisitor__scopeForAtRoot_closure4.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInUnknownAtRule = t1._inUnknownAtRule; + t1._inUnknownAtRule = false; + this.innerScope.call$1(callback); + t1._inUnknownAtRule = wasInUnknownAtRule; + }, + $signature: 35 + }; + A._EvaluateVisitor_visitContentRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.content.declaration.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + return null; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitDeclaration_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this._box_0.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitEachRule_closure.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._environment.setLocalVariable$3(this._box_0.variable, t1._withoutSlash$2(value, t2), t2); + }, + $signature: 58 + }; + A._EvaluateVisitor_visitEachRule_closure0.prototype = { + call$1(value) { + return this.$this._setMultipleVariables$3(this._box_1.variables, value, this.nodeWithSpan); + }, + $signature: 58 + }; + A._EvaluateVisitor_visitEachRule_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure(t1, _this.setVariables, _this.node)); + }, + $signature: 44 + }; + A._EvaluateVisitor_visitEachRule__closure.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure(t1)); + }, + $signature: 605 + }; + A._EvaluateVisitor_visitEachRule___closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 116 + }; + A._EvaluateVisitor_visitAtRule_closure.prototype = { + call$1(value) { + return this.$this._interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 618 + }; + A._EvaluateVisitor_visitAtRule_closure0.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule_closure1.prototype = { + call$0() { + var t2, t3, _i, _this = this, + t1 = _this.$this, + styleRule = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (styleRule == null || t1._inKeyframes || _this.name.value === "font-face") + for (t2 = _this.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(styleRule._style_rule$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure(t1, _this.children), false, type$.ModifiableCssStyleRule, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitForRule_closure.prototype = { + call$0() { + return this.node.from.accept$1(this.$this).assertNumber$0(); + }, + $signature: 193 + }; + A._EvaluateVisitor_visitForRule_closure0.prototype = { + call$0() { + return this.node.to.accept$1(this.$this).assertNumber$0(); + }, + $signature: 193 + }; + A._EvaluateVisitor_visitForRule_closure1.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure2.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure3.prototype = { + call$0() { + var i, t3, t4, t5, t6, t7, t8, _0_0, _this = this, + t1 = _this.$this, + t2 = _this.node, + nodeWithSpan = t1._expressionNode$1(t2.from); + for (i = _this.from, t3 = _this._box_0, t4 = _this.direction, t5 = t2.variable, t6 = _this.fromNumber, t2 = t2.children; i !== t3.to; i += t4) { + t7 = t1._environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + _0_0 = t1._handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure(t1)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + $signature: 44 + }; + A._EvaluateVisitor_visitForRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 116 + }; + A._EvaluateVisitor_visitForwardRule_closure.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._registerCommentsForModule$1(module); + this.$this._environment.forwardModule$2(module, this.node); + }, + $signature: 114 + }; + A._EvaluateVisitor_visitForwardRule_closure0.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._registerCommentsForModule$1(module); + this.$this._environment.forwardModule$2(module, this.node); + }, + $signature: 114 + }; + A._EvaluateVisitor__registerCommentsForModule_closure.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_CssComment); + }, + $signature: 177 + }; + A._EvaluateVisitor_visitIfRule_closure.prototype = { + call$1(clause) { + var t1 = this.$this; + return t1._environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure(t1, clause), true, clause.hasDeclarations, type$.nullable_Value); + }, + $signature: 626 + }; + A._EvaluateVisitor_visitIfRule__closure.prototype = { + call$0() { + var t1 = this.$this; + return t1._handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure(t1)); + }, + $signature: 44 + }; + A._EvaluateVisitor_visitIfRule___closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 116 + }; + A._EvaluateVisitor__visitDynamicImport_closure.prototype = { + call$0() { + var t1, t2, _0_0, stylesheet, importer, isDependency, t3, url, oldImporter, oldStylesheet, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, t11, environment, module, visitor, _box_0 = {}; + _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; + t1 = this.$this; + t2 = this.$import; + _0_0 = t1._loadStylesheet$3$forImport(t2.urlString, t2.span, true); + stylesheet = _box_0.stylesheet = _0_0._0; + importer = _0_0._1; + _box_0.importer = importer; + isDependency = _0_0._2; + _box_0.isDependency = isDependency; + t3 = stylesheet.span; + url = t3.get$sourceUrl(t3); + if (url != null) { + t3 = t1._activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure(t1)); + throw A.wrapException(t2 == null ? t1._evaluate$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._uses; + t3 = type$.UnmodifiableListView_UseRule; + if (new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule).get$length(0) === 0) { + oldImporter = t1._importer; + oldStylesheet = t1._assertInModule$2(t1.__stylesheet, "_stylesheet"); + oldInDependency = t1._inDependency; + t1._importer = importer; + t1.__stylesheet = stylesheet; + t1._inDependency = isDependency; + t1.visitStylesheet$1(0, stylesheet); + t1._importer = oldImporter; + t1.__stylesheet = oldStylesheet; + t1._inDependency = oldInDependency; + t1._activeModules.remove$1(0, url); + return; + } + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure0())) { + t2 = new A.UnmodifiableListView(stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure1()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._environment; + t3 = type$.String; + t4 = type$.Module_Callable; + t5 = type$.AstNode; + t6 = t2._nestedForwardedModules; + t7 = A._setArrayType([], type$.JSArray_Module_Callable); + t8 = t2._variables; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._variableNodes; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._functions; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + t11 = t2._mixins; + t11 = A._setArrayType(t11.slice(0), A._arrayInstanceType(t11)); + environment = A.Environment$_(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._importedModules, null, t6, t7, t8, t9, t10, t11, t2._content, t2._configurableVariables); + t1._withEnvironment$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure2(_box_0, t1, loadsUserDefinedModules, environment, children)); + module = environment.toDummyModule$0(); + t1._environment.importForwards$1(module); + if (loadsUserDefinedModules) { + if (module.transitivelyContainsCss) + t1._combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1); + visitor = new A._ImportedCssVisitor(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + } + t1._activeModules.remove$1(0, url); + }, + $signature: 0 + }; + A._EvaluateVisitor__visitDynamicImport__closure.prototype = { + call$1(previousLoad) { + return this.$this._multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 111 + }; + A._EvaluateVisitor__visitDynamicImport__closure0.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 178 + }; + A._EvaluateVisitor__visitDynamicImport__closure1.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 179 + }; + A._EvaluateVisitor__visitDynamicImport__closure2.prototype = { + call$0() { + var t3, t4, _this = this, + t1 = _this.$this, + oldImporter = t1._importer, + oldStylesheet = t1._assertInModule$2(t1.__stylesheet, "_stylesheet"), + oldRoot = t1._assertInModule$2(t1.__root, "_root"), + oldParent = t1._assertInModule$2(t1.__parent, "__parent"), + oldEndOfImports = t1._assertInModule$2(t1.__endOfImports, "_endOfImports"), + oldOutOfOrderImports = t1._outOfOrderImports, + oldConfiguration = t1._configuration, + oldInDependency = t1._inDependency, + t2 = _this._box_0; + t1._importer = t2.importer; + t3 = t2.stylesheet; + t1.__stylesheet = t3; + t4 = _this.loadsUserDefinedModules; + if (t4) { + t3 = A.ModifiableCssStylesheet$(t3.span); + t1.__root = t3; + t1.__parent = t1._assertInModule$2(t3, "_root"); + t1.__endOfImports = 0; + t1._outOfOrderImports = null; + } + t1._inDependency = t2.isDependency; + t3 = new A.UnmodifiableListView(t2.stylesheet._forwards, type$.UnmodifiableListView_ForwardRule); + if (!t3.get$isEmpty(t3)) + t1._configuration = _this.environment.toImplicitConfiguration$0(); + t1.visitStylesheet$1(0, t2.stylesheet); + t2 = t4 ? t1._addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode); + _this.children.__late_helper$_value = t2; + t1._importer = oldImporter; + t1.__stylesheet = oldStylesheet; + if (t4) { + t1.__root = oldRoot; + t1.__parent = oldParent; + t1.__endOfImports = oldEndOfImports; + t1._outOfOrderImports = oldOutOfOrderImports; + } + t1._configuration = oldConfiguration; + t1._inDependency = oldInDependency; + }, + $signature: 1 + }; + A._EvaluateVisitor__applyMixin_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + t1._environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure0(t1, _this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent)); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin__closure0.prototype = { + call$0() { + var _this = this; + _this.$this._runBuiltInCallable$3(_this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + t1._environment.withContent$2(_this.contentCallable, new A._EvaluateVisitor__applyMixin__closure(t1, _this.mixin, _this.nodeWithSpanWithoutContent)); + }, + $signature: 1 + }; + A._EvaluateVisitor__applyMixin__closure.prototype = { + call$0() { + var t1 = this.$this; + t1._environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure(t1, this.mixin, this.nodeWithSpanWithoutContent)); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin___closure.prototype = { + call$0() { + var t1, t2, t3, t4, _i; + for (t1 = this.mixin.declaration.children, t2 = t1.length, t3 = this.$this, t4 = this.nodeWithSpanWithoutContent, _i = 0; _i < t2; ++_i) + t3._addErrorSpan$2(t4, new A._EvaluateVisitor__applyMixin____closure(t3, t1[_i])); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin____closure.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 44 + }; + A._EvaluateVisitor_visitIncludeRule_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 113 + }; + A._EvaluateVisitor_visitIncludeRule_closure0.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable($content, t1._environment.closure$0(), t1._inDependency, type$.UserDefinedCallable_Environment); + }, + $signature: 633 + }; + A._EvaluateVisitor_visitIncludeRule_closure1.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 16 + }; + A._EvaluateVisitor_visitMediaRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule_closure0.prototype = { + call$1(mediaQueries) { + return this.$this._mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 89 + }; + A._EvaluateVisitor_visitMediaRule_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.queries; + t1._withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule__closure.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure(t1, this.node), false, type$.ModifiableCssStyleRule, type$.Null); + else + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule___closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule_closure2.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitStyleRule_closure2.prototype = { + call$0() { + var t1 = this.$this; + t1._withStyleRule$2(this.rule, new A._EvaluateVisitor_visitStyleRule__closure(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor__warnForBogusCombinators_closure.prototype = { + call$1(child) { + return child instanceof A.ModifiableCssComment; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitSupportsRule_closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule_closure0.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure(t1, this.node), type$.ModifiableCssStyleRule, type$.Null); + else + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule__closure.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor__visitSupportsCondition_closure.prototype = { + call$0() { + var t4, + t1 = this.$this, + t2 = this._box_0, + t3 = t2.declaration.name; + t3 = t1._evaluate$_serialize$3$quote(t3.accept$1(t1), t3, true); + t4 = t2.declaration.get$isCustomProperty() ? "" : " "; + t2 = t2.declaration.value; + return "(" + t3 + ":" + t4 + t1._evaluate$_serialize$3$quote(t2.accept$1(t1), t2, true) + ")"; + }, + $signature: 29 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure.prototype = { + call$0() { + var t1 = this.$this._environment, + t2 = this._box_0.override; + t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure0.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 44 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._environment.setVariable$5$global$namespace(t2.name, this.value, t1._expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure.prototype = { + call$2(module, firstLoad) { + var t1, t2, t3, _0_0, t4, t5, span; + if (firstLoad) + this.$this._registerCommentsForModule$1(module); + t1 = this.$this._environment; + t2 = this.node; + t3 = t2.namespace; + if (t3 == null) { + t1._globalModules.$indexSet(0, module, t2); + t1._allModules.push(module); + t1 = B.JSArray_methods.get$first(t1._variables); + _0_0 = A.IterableExtension_firstWhereOrNull(t1.get$keys(t1), module.get$variables().get$containsKey()); + if (_0_0 != null) + A.throwExpression(A.SassScriptException$(string$.This_ma + _0_0 + '".', null)); + } else { + t4 = t1._environment$_modules; + if (t4.containsKey$1(t3)) { + t5 = t1._namespaceNodes.$index(0, t3); + span = t5 == null ? null : t5.span; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t5.$indexSet(0, span, "original @use"); + A.throwExpression(A.MultiSpanSassScriptException$(string$.There_ + t3 + '".', "new @use", t5)); + } + t4.$indexSet(0, t3, module); + t1._namespaceNodes.$indexSet(0, t3, t2); + t1._allModules.push(module); + } + }, + $signature: 114 + }; + A._EvaluateVisitor_visitWarnRule_closure.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 33 + }; + A._EvaluateVisitor_visitWhileRule_closure.prototype = { + call$0() { + var t1, t2, t3, _0_0; + for (t1 = this.node, t2 = t1.condition, t3 = this.$this, t1 = t1.children; t2.accept$1(t3).get$isTruthy();) { + _0_0 = t3._handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure(t3)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + $signature: 44 + }; + A._EvaluateVisitor_visitWhileRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 116 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure.prototype = { + call$0() { + var t1 = this.node, + t2 = this.$this, + left = t1.left.accept$1(t2); + switch (t1.operator.index) { + case 0: + t1 = t1.right.accept$1(t2); + t1 = new A.SassString(A.serializeValue(left, false, true) + "=" + A.serializeValue(t1, false, true), false); + break; + case 1: + t1 = left.get$isTruthy() ? left : t1.right.accept$1(t2); + break; + case 2: + t1 = left.get$isTruthy() ? t1.right.accept$1(t2) : left; + break; + case 3: + t1 = left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + break; + case 4: + t1 = !left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true : B.SassBoolean_false; + break; + case 5: + t1 = left.greaterThan$1(t1.right.accept$1(t2)); + break; + case 6: + t1 = left.greaterThanOrEquals$1(t1.right.accept$1(t2)); + break; + case 7: + t1 = left.lessThan$1(t1.right.accept$1(t2)); + break; + case 8: + t1 = left.lessThanOrEquals$1(t1.right.accept$1(t2)); + break; + case 9: + t1 = left.plus$1(t1.right.accept$1(t2)); + break; + case 10: + t1 = left.minus$1(t1.right.accept$1(t2)); + break; + case 11: + t1 = left.times$1(t1.right.accept$1(t2)); + break; + case 12: + t1 = t2._slash$3(left, t1.right.accept$1(t2), t1); + break; + case 13: + t1 = left.modulo$1(t1.right.accept$1(t2)); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 33 + }; + A._EvaluateVisitor__slash_recommendation.prototype = { + call$1(expression) { + var t1; + $label0$0: { + if (expression instanceof A.BinaryOperationExpression && B.BinaryOperator_ehp === expression.operator) { + t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + break $label0$0; + } + if (expression instanceof A.ParenthesizedExpression) { + t1 = expression.expression.toString$0(0); + break $label0$0; + } + t1 = expression.toString$0(0); + break $label0$0; + } + return t1; + }, + $signature: 133 + }; + A._EvaluateVisitor_visitVariableExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 44 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure.prototype = { + call$0() { + var t1, _this = this; + switch (_this.node.operator.index) { + case 0: + t1 = _this.operand.unaryPlus$0(); + break; + case 1: + t1 = _this.operand.unaryMinus$0(); + break; + case 2: + t1 = new A.SassString("/" + A.serializeValue(_this.operand, false, true), false); + break; + case 3: + t1 = _this.operand.unaryNot$0(); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 33 + }; + A._EvaluateVisitor_visitIfExpression_closure.prototype = { + call$1(pair) { + return pair._0 + ": " + pair._1.toString$0(0); + }, + $signature: 183 + }; + A._EvaluateVisitor_visitIfConditionOperation_closure.prototype = { + call$1(pair) { + return pair._1; + }, + $signature: 184 + }; + A._EvaluateVisitor_visitListExpression_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 653 + }; + A._EvaluateVisitor_visitFunctionExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._environment.getFunction$2$namespace(t1.name, t1.namespace); + }, + $signature: 113 + }; + A._EvaluateVisitor_visitFunctionExpression_closure0.prototype = { + call$1(argument) { + return argument.accept$1(B.C_IsCalculationSafeVisitor); + }, + $signature: 74 + }; + A._EvaluateVisitor_visitFunctionExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 33 + }; + A._EvaluateVisitor__visitCalculation_closure.prototype = { + call$2(message, deprecation) { + return this.$this._warn$3(message, this.node.span, deprecation); + }, + call$1(message) { + return this.call$2(message, null); + }, + $signature: 105 + }; + A._EvaluateVisitor__checkCalculationArguments_check.prototype = { + call$1(maxArgs) { + var t1 = this.node, + t2 = t1.$arguments.positional.length; + if (t2 === 0) + throw A.wrapException(this.$this._evaluate$_exception$2("Missing argument.", t1.span)); + else if (maxArgs != null && t2 > maxArgs) + throw A.wrapException(this.$this._evaluate$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize("was", t2, "were") + " passed.", t1.span)); + }, + call$0() { + return this.call$1(null); + }, + $signature: 82 + }; + A._EvaluateVisitor__visitCalculationExpression_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this._box_0, + t3 = _this.node, + t4 = _this.inLegacySassFunction; + return A.SassCalculation_operateInternal(t1._binaryOperatorToCalculationOperator$2(t2.operator, t3), t1._visitCalculationExpression$2$inLegacySassFunction(t2.left, t4), t1._visitCalculationExpression$2$inLegacySassFunction(t2.right, t4), t4, !t1._inSupportsDeclaration, new A._EvaluateVisitor__visitCalculationExpression__closure(t1, t3)); + }, + $signature: 83 + }; + A._EvaluateVisitor__visitCalculationExpression__closure.prototype = { + call$2(message, deprecation) { + return this.$this._warn$3(message, this.node.get$span(0), deprecation); + }, + call$1(message) { + return this.call$2(message, null); + }, + $signature: 105 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure.prototype = { + call$0() { + var t1 = this.node; + return this.$this._runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 33 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable; + return t1._withEnvironment$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, _this.V)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure.prototype = { + call$0() { + var parameters, t5, minLength, i, parameter, t6, value, t7, t8, restParameter, rest, argumentList, result, parameterWord, _this = this, + t1 = _this.$this, + t2 = _this.evaluated._values, + t3 = _this.callable.declaration.parameters, + t4 = _this.nodeWithSpan; + t1._verifyArguments$4(t2[2].length, t2[0], t3, t4); + parameters = t3.parameters; + t5 = parameters.length; + minLength = Math.min(t2[2].length, t5); + for (i = 0; i < minLength; ++i) + t1._environment.setLocalVariable$3(parameters[i].name, t2[2][i], t2[3][i]); + for (i = t2[2].length; i < t5; ++i) { + parameter = parameters[i]; + t6 = parameter.name; + value = t2[0].remove$1(0, t6); + if (value == null) { + t7 = parameter.defaultValue; + value = t1._withoutSlash$2(t7.accept$1(t1), t1._expressionNode$1(t7)); + } + t7 = t1._environment; + t8 = t2[1].$index(0, t6); + if (t8 == null) { + t8 = parameter.defaultValue; + t8.toString; + t8 = t1._expressionNode$1(t8); + } + t7.setLocalVariable$3(t6, value, t8); + } + restParameter = t3.restParameter; + if (restParameter != null) { + t6 = t2[2]; + rest = t6.length > t5 ? B.JSArray_methods.sublist$1(t6, t5) : B.List_empty8; + t5 = t2[0]; + t6 = t2[4]; + argumentList = A.SassArgumentList$(rest, t5, t6 === B.ListSeparator_undecided_null_3_undecided ? B.ListSeparator_z0K : t6); + t1._environment.setLocalVariable$3(restParameter, argumentList, t4); + } else + argumentList = null; + result = _this.run.call$0(); + if (argumentList == null) + return result; + t5 = t2[0].__js_helper$_length; + if (t5 === 0) + return result; + if (argumentList._wereKeywordsAccessed) + return result; + parameterWord = A.pluralize("parameter", t5, null); + t2 = t2[0]; + t5 = A._instanceType(t2)._eval$1("LinkedHashMapKeysIterable<1>"); + throw A.wrapException(A.MultiSpanSassRuntimeException$("No " + parameterWord + " named " + A.toSentence(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeysIterable(t2, t5), new A._EvaluateVisitor__runUserDefinedCallable____closure(), t5._eval$1("Iterable.E"), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._evaluate$_stackTrace$1(t4.get$span(t4)), null)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__runFunctionCallable_closure.prototype = { + call$0() { + var t1, t2, t3, t4, _i, $returnValue; + for (t1 = this.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = this.$this, _i = 0; _i < t3; ++_i) { + $returnValue = t2[_i].accept$1(t4); + if ($returnValue instanceof A.Value) + return $returnValue; + } + throw A.wrapException(t4._evaluate$_exception$2("Function finished without @return.", t1.span)); + }, + $signature: 33 + }; + A._EvaluateVisitor__runBuiltInCallable_closure.prototype = { + call$0() { + return this._box_0.overload.verify$2(this.evaluated._values[2].length, this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure0.prototype = { + call$0() { + return this._box_0.callback.call$1(this.evaluated._values[2]); + }, + $signature: 33 + }; + A._EvaluateVisitor__runBuiltInCallable_closure1.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__evaluateArguments_closure.prototype = { + call$1(value) { + return value; + }, + $signature: 43 + }; + A._EvaluateVisitor__evaluateArguments_closure0.prototype = { + call$1(value) { + return this.$this._withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 43 + }; + A._EvaluateVisitor__evaluateArguments_closure1.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 109 + }; + A._EvaluateVisitor__evaluateArguments_closure2.prototype = { + call$1(value) { + return value; + }, + $signature: 43 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(value, t1.get$span(t1)); + }, + $signature: 60 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure0.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression(this.$this._withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 60 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure1.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression(_this.$this._withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 109 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure2.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression(this.$this._withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 60 + }; + A._EvaluateVisitor__addRestMap_closure.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString) + _this.values.$indexSet(0, key._string$_text, _this.convert.call$1(t1._withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._evaluate$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 99 + }; + A._EvaluateVisitor__verifyArguments_closure.prototype = { + call$0() { + return this.parameters.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitCssAtRule_closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssAtRule_closure0.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssAtRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssMediaRule_closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule_closure0.prototype = { + call$1(mediaQueries) { + return this.$this._mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 89 + }; + A._EvaluateVisitor_visitCssMediaRule_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.node.queries; + t1._withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule__closure.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure(t1, this.node), false, type$.ModifiableCssStyleRule, type$.Null); + else + for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule___closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule_closure2.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssStyleRule_closure0.prototype = { + call$0() { + var t1 = this.$this; + t1._withStyleRule$2(this.rule, new A._EvaluateVisitor_visitCssStyleRule__closure(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule__closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule_closure.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure0.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + _0_0 = t1._atRootExcludingStyleRule ? null : t1._styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._withParent$2$2(A.ModifiableCssStyleRule$(_0_0._style_rule$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure(t1, this.node), type$.ModifiableCssStyleRule, type$.Null); + else + for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluateVisitor__performInterpolationHelper_closure.prototype = { + call$1(targetOffsets) { + return A.InterpolationMap$(this.interpolation, targetOffsets); + }, + $signature: 143 + }; + A._EvaluateVisitor__serialize_closure.prototype = { + call$0() { + return A.serializeValue(this.value, false, this.quote); + }, + $signature: 29 + }; + A._EvaluateVisitor__expressionNode_closure.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 188 + }; + A._EvaluateVisitor__withoutSlash_recommendation.prototype = { + call$1(number) { + var before, after, t1, + _1_0 = number.asSlash; + $label0$0: { + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { + before = _1_0._0; + after = _1_0._1; + t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; + break $label0$0; + } + t1 = A.serializeValue(number, true, true); + break $label0$0; + } + return t1; + }, + $signature: 189 + }; + A._EvaluateVisitor__stackFrame_closure.prototype = { + call$1(url) { + var t1 = this.$this._evaluate$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 49 + }; + A._ImportedCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure(); + this._visitor._addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._visitor._addChild$1(node); + }, + visitCssDeclaration$1(node) { + return this._visitor._addChild$1(node); + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._visitor; + if (t1._assertInModule$2(t1.__parent, "__parent") !== t1._assertInModule$2(t1.__root, "_root")) + t1._addChild$1(node); + else if (t1._assertInModule$2(t1.__endOfImports, _s13_) === J.get$length$asx(t1._assertInModule$2(t1.__root, "_root").children._collection$_source)) { + t1._addChild$1(node); + t1.__endOfImports = t1._assertInModule$2(t1.__endOfImports, _s13_) + 1; + } else { + t2 = t1._outOfOrderImports; + (t2 == null ? t1._outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._visitor, + mediaQueries = t1._mediaQueries; + t1._addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure(mediaQueries == null || t1._mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._visitor._addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._visitor._addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule)) + t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule; + else + t1 = true; + return t1; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule; + }, + $signature: 7 + }; + A._EvaluationContext.prototype = { + get$currentCallableSpan() { + var _0_0 = this._visitor._callableNode; + if (_0_0 != null) + return _0_0.get$span(_0_0); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2(_, message, deprecation) { + var t1 = this._visitor, + t2 = t1._importSpan; + if (t2 == null) { + t2 = t1._callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + if (t2 == null) { + t2 = this._defaultWarnNodeWithSpan; + t2 = t2.get$span(t2); + } + t1._warn$3(message, t2, deprecation); + } + }; + A.EveryCssVisitor.prototype = { + visitCssAtRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssAtRule_closure(this)); + }, + visitCssComment$1(node) { + return false; + }, + visitCssDeclaration$1(node) { + return false; + }, + visitCssImport$1(node) { + return false; + }, + visitCssKeyframeBlock$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssKeyframeBlock_closure(this)); + }, + visitCssMediaRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssMediaRule_closure(this)); + }, + visitCssStyleRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssStyleRule_closure(this)); + }, + visitCssStylesheet$1(node) { + return J.every$1$ax(node.get$children(node), new A.EveryCssVisitor_visitCssStylesheet_closure(this)); + }, + visitCssSupportsRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssSupportsRule_closure(this)); + } + }; + A.EveryCssVisitor_visitCssAtRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssKeyframeBlock_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssMediaRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssStyleRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssStylesheet_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A.EveryCssVisitor_visitCssSupportsRule_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 7 + }; + A._MakeExpressionCalculationSafe.prototype = { + visitBinaryOperationExpression$1(_, node) { + var t1, t2; + if (node.operator === B.BinaryOperator_bgA) { + t1 = A.ArgumentList$(A._setArrayType([node], type$.JSArray_Expression), B.Map_empty4, B.Map_empty5, node.get$span(0), null, null); + t2 = node.get$span(0); + t1 = new A.FunctionExpression("math", A.stringReplaceAllUnchecked("max", "_", "-"), "max", t1, t2); + } else + t1 = this.super$ReplaceExpressionVisitor$visitBinaryOperationExpression(0, node); + return t1; + }, + visitInterpolatedFunctionExpression$1(_, node) { + return node; + }, + visitIfExpression$1(_, node) { + return node; + }, + visitUnaryOperationExpression$1(_, node) { + var t1, + _0_0 = node.operator; + $label0$0: { + if (B.UnaryOperator_n2K === _0_0) { + t1 = node.operand; + break $label0$0; + } + if (B.UnaryOperator_hCO === _0_0) { + t1 = new A.BinaryOperationExpression(B.BinaryOperator_wkM, new A.NumberExpression(-1, null, node.span), node.operand, false); + break $label0$0; + } + t1 = this.super$ReplaceExpressionVisitor$visitUnaryOperationExpression(0, node); + break $label0$0; + } + return t1; + } + }; + A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor.prototype = {}; + A._FindDependenciesVisitor.prototype = { + visitEachRule$1(_, node) { + }, + visitForRule$1(_, node) { + }, + visitIfRule$1(_, node) { + }, + visitWhileRule$1(_, node) { + }, + visitUseRule$1(_, node) { + var t1 = node.url; + if (t1.get$scheme() !== "sass") + this._find_dependencies$_uses.add$1(0, t1); + else if (t1.toString$0(0) === "sass:meta") + this._metaNamespaces.add$1(0, node.namespace); + }, + visitForwardRule$1(_, node) { + var t1 = node.url; + if (t1.get$scheme() !== "sass") + this._find_dependencies$_forwards.add$1(0, t1); + }, + visitImportRule$1(_, node) { + var t1, t2, t3, _i, $import; + for (t1 = node.imports, t2 = t1.length, t3 = this._imports, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport) + t3.add$1(0, A.Uri_parse($import.urlString)); + } + }, + visitIncludeRule$1(_, node) { + var url, _0_0, _0_4_isSet, _0_7, t1, _0_4, _0_7_isSet, url0, exception; + if (node.name !== "load-css") + return; + if (!this._metaNamespaces.contains$1(0, node.namespace)) + return; + _0_0 = node.$arguments.positional; + url = null; + _0_4_isSet = _0_0.length === 1; + _0_7 = null; + t1 = false; + if (_0_4_isSet) { + _0_4 = _0_0[0]; + _0_7_isSet = _0_4 instanceof A.StringExpression; + if (_0_7_isSet) { + type$.StringExpression._as(_0_4); + _0_7 = _0_4.text.get$asPlain(); + t1 = _0_7; + t1 = t1 != null; + } + } else { + _0_4 = null; + _0_7_isSet = false; + } + if (t1) { + if (_0_7_isSet) + url0 = _0_7; + else { + t1 = _0_4_isSet ? _0_4 : _0_0[0]; + _0_7 = type$.StringExpression._as(t1).text.get$asPlain(); + url0 = _0_7; + } + url = url0 == null ? A._asString(url0) : url0; + try { + this._metaLoadCss.add$1(0, A.Uri_parse(url)); + } catch (exception) { + if (!type$.FormatException._is(A.unwrapException(exception))) + throw exception; + } + } + } + }; + A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor.prototype = {}; + A.IsCalculationSafeVisitor.prototype = { + visitBinaryOperationExpression$1(_, node) { + return B.Set_xkEMv.contains$1(0, node.operator) && node.left.accept$1(this) && node.right.accept$1(this); + }, + visitBooleanExpression$1(_, node) { + return false; + }, + visitColorExpression$1(_, node) { + return false; + }, + visitFunctionExpression$1(_, node) { + return true; + }, + visitIfExpression$1(_, node) { + return true; + }, + visitInterpolatedFunctionExpression$1(_, node) { + return true; + }, + visitLegacyIfExpression$1(_, node) { + return true; + }, + visitListExpression$1(_, node) { + var t1 = false; + if (node.separator === B.ListSeparator_SrV) + if (!node.hasBrackets) { + t1 = node.contents; + t1 = t1.length > 1 && B.JSArray_methods.every$1(t1, new A.IsCalculationSafeVisitor_visitListExpression_closure(this)); + } + return t1; + }, + visitMapExpression$1(_, node) { + return false; + }, + visitNullExpression$1(_, node) { + return false; + }, + visitNumberExpression$1(_, node) { + return true; + }, + visitParenthesizedExpression$1(_, node) { + return node.expression.accept$1(this); + }, + visitSelectorExpression$1(_, node) { + return false; + }, + visitStringExpression$1(_, node) { + var text, t1, t2; + if (node.hasQuotes) + return false; + text = node.text.get$initialPlain(); + t1 = false; + if (!B.JSString_methods.startsWith$1(text, "!")) + if (!B.JSString_methods.startsWith$1(text, "#")) { + t2 = text.length; + if ((1 >= t2 ? null : text.charCodeAt(1)) !== 43) + t1 = (3 >= t2 ? null : text.charCodeAt(3)) !== 40; + } + return t1; + }, + visitSupportsExpression$1(_, node) { + return false; + }, + visitUnaryOperationExpression$1(_, node) { + return false; + }, + visitValueExpression$1(_, node) { + return false; + }, + visitVariableExpression$1(_, node) { + return true; + } + }; + A.IsCalculationSafeVisitor_visitListExpression_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 74 + }; + A.IsPlainCssVisitor.prototype = { + visitBinaryOperationExpression$1(_, node) { + return false; + }, + visitBooleanExpression$1(_, node) { + return false; + }, + visitColorExpression$1(_, node) { + return true; + }, + visitFunctionExpression$1(_, node) { + return node.namespace == null && this._visitArgumentList$1(node.$arguments); + }, + visitIfExpression$1(_, node) { + return B.JSArray_methods.every$1(node.branches, new A.IsPlainCssVisitor_visitIfExpression_closure(this)); + }, + visitInterpolatedFunctionExpression$1(_, node) { + var t1 = this._visitArgumentList$1(node.$arguments); + return t1; + }, + visitLegacyIfExpression$1(_, node) { + return false; + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return (t1.length !== 0 || node.hasBrackets) && B.JSArray_methods.every$1(t1, new A.IsPlainCssVisitor_visitListExpression_closure(this)); + }, + visitMapExpression$1(_, node) { + return false; + }, + visitNullExpression$1(_, node) { + return false; + }, + visitNumberExpression$1(_, node) { + return true; + }, + visitParenthesizedExpression$1(_, node) { + return node.expression.accept$1(this); + }, + visitSelectorExpression$1(_, node) { + return false; + }, + visitStringExpression$1(_, node) { + return true; + }, + visitSupportsExpression$1(_, node) { + return false; + }, + visitUnaryOperationExpression$1(_, node) { + return false; + }, + visitValueExpression$1(_, node) { + return false; + }, + visitVariableExpression$1(_, node) { + return false; + }, + visitIfConditionParenthesized$1(_, node) { + return node.expression.accept$1(this); + }, + visitIfConditionNegation$1(_, node) { + return node.expression.accept$1(this); + }, + visitIfConditionOperation$1(_, node) { + return B.JSArray_methods.every$1(node.expressions, new A.IsPlainCssVisitor_visitIfConditionOperation_closure(this)); + }, + visitIfConditionFunction$1(_, node) { + return true; + }, + visitIfConditionSass$1(_, node) { + return false; + }, + visitIfConditionRaw$1(_, node) { + return true; + }, + _visitArgumentList$1(node) { + var t1 = node.named; + return t1.get$isEmpty(t1) && node.rest == null && B.JSArray_methods.every$1(node.positional, new A.IsPlainCssVisitor__visitArgumentList_closure(this)); + } + }; + A.IsPlainCssVisitor_visitIfExpression_closure.prototype = { + call$1(pair) { + var _0_1, condition, t1; + $label0$0: { + _0_1 = pair._0; + if (_0_1 != null) { + condition = _0_1 == null ? type$.IfConditionExpression._as(_0_1) : _0_1; + t1 = this.$this; + t1 = condition.accept$1(t1) && pair._1.accept$1(t1); + break $label0$0; + } + t1 = pair._1.accept$1(this.$this); + break $label0$0; + } + return t1; + }, + $signature: 669 + }; + A.IsPlainCssVisitor_visitListExpression_closure.prototype = { + call$1(element) { + return element.accept$1(this.$this); + }, + $signature: 74 + }; + A.IsPlainCssVisitor_visitIfConditionOperation_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 672 + }; + A.IsPlainCssVisitor__visitArgumentList_closure.prototype = { + call$1(argument) { + return argument.accept$1(this.$this); + }, + $signature: 74 + }; + A.RecursiveStatementVisitor.prototype = { + visitAtRootRule$1(_, node) { + this.visitChildren$1(node.children); + }, + visitAtRule$1(_, node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(_, node) { + return null; + }, + visitContentRule$1(_, node) { + }, + visitDebugRule$1(_, node) { + }, + visitDeclaration$1(_, node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitEachRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitErrorRule$1(_, node) { + }, + visitExtendRule$1(_, node) { + }, + visitForRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitForwardRule$1(_, node) { + }, + visitFunctionRule$1(_, node) { + return null; + }, + visitIfRule$1(_, node) { + var t1, t2, _i, t3, t4, _i0, _0_0; + for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) + for (t3 = t1[_i].children, t4 = t3.length, _i0 = 0; _i0 < t4; ++_i0) + t3[_i0].accept$1(this); + _0_0 = node.lastClause; + if (_0_0 != null) + for (t1 = _0_0.children, t2 = t1.length, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(this); + }, + visitImportRule$1(_, node) { + }, + visitIncludeRule$1(_, node) { + return A.NullableExtension_andThen(node.content, this.get$visitContentBlock(this)); + }, + visitLoudComment$1(_, node) { + }, + visitMediaRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(_, node) { + return null; + }, + visitReturnRule$1(_, node) { + }, + visitSilentComment$1(_, node) { + }, + visitStyleRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitUseRule$1(_, node) { + }, + visitVariableDeclaration$1(_, node) { + }, + visitWarnRule$1(_, node) { + }, + visitWhileRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitChildren$1(children) { + var t1; + for (t1 = J.get$iterator$ax(children); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + } + }; + A.ReplaceExpressionVisitor.prototype = { + visitBinaryOperationExpression$1(_, node) { + return new A.BinaryOperationExpression(node.operator, node.left.accept$1(this), node.right.accept$1(this), false); + }, + visitBooleanExpression$1(_, node) { + return node; + }, + visitColorExpression$1(_, node) { + return node; + }, + visitFunctionExpression$1(_, node) { + var t1 = node.originalName, + t2 = this.visitArgumentList$1(node.$arguments); + return new A.FunctionExpression(node.namespace, A.stringReplaceAllUnchecked(t1, "_", "-"), t1, t2, node.span); + }, + visitInterpolatedFunctionExpression$1(_, node) { + return new A.InterpolatedFunctionExpression(this.visitInterpolation$1(node.name), this.visitArgumentList$1(node.$arguments), node.span); + }, + visitLegacyIfExpression$1(_, node) { + return new A.LegacyIfExpression(this.visitArgumentList$1(node.$arguments), node.span); + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return new A.ListExpression(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitListExpression_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression>")), type$.Expression), node.separator, node.hasBrackets, node.span); + }, + visitMapExpression$1(_, node) { + var t2, t3, _i, t4, + t1 = A._setArrayType([], type$.JSArray_Record_2_Expression_and_Expression); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + t1.push(new A._Record_2(t4._0.accept$1(this), t4._1.accept$1(this))); + } + return new A.MapExpression(A.List_List$unmodifiable(t1, type$.Record_2_Expression_and_Expression), node.span); + }, + visitNullExpression$1(_, node) { + return node; + }, + visitNumberExpression$1(_, node) { + return node; + }, + visitParenthesizedExpression$1(_, node) { + return new A.ParenthesizedExpression(node.expression.accept$1(this), node.span); + }, + visitSelectorExpression$1(_, node) { + return node; + }, + visitStringExpression$1(_, node) { + return new A.StringExpression(this.visitInterpolation$1(node.text), node.hasQuotes); + }, + visitSupportsExpression$1(_, node) { + return new A.SupportsExpression(this.visitSupportsCondition$1(node.condition)); + }, + visitUnaryOperationExpression$1(_, node) { + return new A.UnaryOperationExpression(node.operator, node.operand.accept$1(this), node.span); + }, + visitValueExpression$1(_, node) { + return node; + }, + visitVariableExpression$1(_, node) { + return node; + }, + visitIfConditionParenthesized$1(_, node) { + return new A.IfConditionParenthesized(node.expression.accept$1(this), node.span); + }, + visitIfConditionNegation$1(_, node) { + return new A.IfConditionNegation(node.expression.accept$1(this), node.span); + }, + visitIfConditionOperation$1(_, node) { + var t1 = node.expressions; + return A.IfConditionOperation$(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitIfConditionOperation_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,IfConditionExpression>")), node.op); + }, + visitIfConditionFunction$1(_, node) { + return new A.IfConditionFunction(this.visitInterpolation$1(node.name), this.visitInterpolation$1(node.$arguments), node.span); + }, + visitIfConditionSass$1(_, node) { + return new A.IfConditionSass(node.expression.accept$1(this), node.span); + }, + visitIfConditionRaw$1(_, node) { + return new A.IfConditionRaw(this.visitInterpolation$1(node.text)); + }, + visitArgumentList$1(invocation) { + var _this = this, + t1 = invocation.positional, + t2 = type$.String, + t3 = type$.Expression, + t4 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + for (t2 = A.MapExtensions_get_pairs(invocation.named, t2, t3), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4.$indexSet(0, t3._0, t3._1.accept$1(_this)); + } + t2 = invocation.rest; + t2 = t2 == null ? null : t2.accept$1(_this); + t3 = invocation.keywordRest; + t3 = t3 == null ? null : t3.accept$1(_this); + return A.ArgumentList$(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitArgumentList_closure(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression>")), t4, invocation.namedSpans, invocation.span, t3, t2); + }, + visitSupportsCondition$1(condition) { + var _this = this; + if (condition instanceof A.SupportsOperation) + return new A.SupportsOperation(_this.visitSupportsCondition$1(condition.left), _this.visitSupportsCondition$1(condition.right), condition.operator, condition.span); + else if (condition instanceof A.SupportsNegation) + return new A.SupportsNegation(_this.visitSupportsCondition$1(condition.condition), condition.span); + else if (condition instanceof A.SupportsInterpolation) + return new A.SupportsInterpolation(condition.expression.accept$1(_this), condition.span); + else if (condition instanceof A.SupportsDeclaration) + return new A.SupportsDeclaration(condition.name.accept$1(_this), condition.value.accept$1(_this), condition.span); + else + throw A.wrapException(A.SassException$("BUG: Unknown SupportsCondition " + condition.toString$0(0) + ".", condition.get$span(condition), null)); + }, + visitInterpolation$1(interpolation) { + var t1 = interpolation.contents; + return A.Interpolation$(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitInterpolation_closure(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>")), interpolation.spans, interpolation.span); + } + }; + A.ReplaceExpressionVisitor_visitListExpression_closure.prototype = { + call$1(item) { + return item.accept$1(this.$this); + }, + $signature: 194 + }; + A.ReplaceExpressionVisitor_visitIfConditionOperation_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 279 + }; + A.ReplaceExpressionVisitor_visitArgumentList_closure.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 194 + }; + A.ReplaceExpressionVisitor_visitInterpolation_closure.prototype = { + call$1(node) { + return node instanceof A.Expression ? node.accept$1(this.$this) : node; + }, + $signature: 75 + }; + A.SelectorSearchVisitor.prototype = { + visitAttributeSelector$1(_, attribute) { + return null; + }, + visitClassSelector$1(_, klass) { + return null; + }, + visitIDSelector$1(_, id) { + return null; + }, + visitParentSelector$1(_, placeholder) { + return null; + }, + visitPlaceholderSelector$1(_, placeholder) { + return null; + }, + visitTypeSelector$1(_, type) { + return null; + }, + visitUniversalSelector$1(_, universal) { + return null; + }, + visitComplexSelector$1(complex) { + return A.IterableExtension_search(complex.components, new A.SelectorSearchVisitor_visitComplexSelector_closure(this)); + }, + visitCompoundSelector$1(compound) { + return A.IterableExtension_search(compound.components, new A.SelectorSearchVisitor_visitCompoundSelector_closure(this)); + }, + visitPseudoSelector$1(_, pseudo) { + return A.NullableExtension_andThen(pseudo.selector, this.get$visitSelectorList()); + }, + visitSelectorList$1(list) { + return A.IterableExtension_search(list.components, this.get$visitComplexSelector()); + } + }; + A.SelectorSearchVisitor_visitComplexSelector_closure.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor.T?(ComplexSelectorComponent)"); + } + }; + A.SelectorSearchVisitor_visitCompoundSelector_closure.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor.T?(SimpleSelector)"); + } + }; + A.serialize_closure.prototype = { + call$1(codeUnit) { + return codeUnit > 127; + }, + $signature: 50 + }; + A._SerializeVisitor.prototype = { + visitCssStylesheet$1(node) { + var t1, t2, t3, t4, t5, t6, previous, previous0, t7, _this = this; + for (t1 = J.get$iterator$ax(node.get$children(node)), t2 = !_this._inspect, t3 = _this._style === B.OutputStyle_1, t4 = !t3, t5 = type$.CssParentNode, t6 = _this._serialize$_buffer, previous = null; t1.moveNext$0();) { + previous0 = t1.get$current(t1); + if (t2) + t7 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true) : previous0.accept$1(B._IsInvisibleVisitor_true_false); + else + t7 = false; + if (t7) + continue; + if (previous != null) { + if (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) + t6.writeCharCode$1(59); + if (_this._isTrailingComment$2(previous0, previous)) { + if (t4) + t6.writeCharCode$1(32); + } else { + if (t4) + t6.write$1(0, "\n"); + if (previous.get$isGroupEnd()) + if (t4) + t6.write$1(0, "\n"); + } + } + previous0.accept$1(_this); + previous = previous0; + } + if (previous != null) + t1 = (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) && t4; + else + t1 = false; + if (t1) + t6.writeCharCode$1(59); + }, + visitCssComment$1(node) { + this._serialize$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssComment_closure(this, node)); + }, + visitCssAtRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssAtRule_closure(_this, node)); + if (!node.isChildless) { + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + } + }, + visitCssMediaRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssMediaRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssImport$1(node) { + this._writeIndentation$0(); + this._serialize$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssImport_closure(this, node)); + }, + _writeImportUrl$1(url) { + var urlContents, maybeQuote, _this = this; + if (_this._style !== B.OutputStyle_1 || url.charCodeAt(0) !== 117) { + _this._serialize$_buffer.write$1(0, url); + return; + } + urlContents = B.JSString_methods.substring$2(url, 4, url.length - 1); + maybeQuote = urlContents.charCodeAt(0); + if (maybeQuote === 39 || maybeQuote === 34) + _this._serialize$_buffer.write$1(0, urlContents); + else + _this._visitQuotedString$1(urlContents); + }, + visitCssKeyframeBlock$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssKeyframeBlock_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + _visitMediaQuery$1(query) { + var t1, _1_0, _2_0, condition, operator, t2, _this = this, + _0_0 = query.modifier; + if (_0_0 != null) { + t1 = _this._serialize$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(32); + } + _1_0 = query.type; + if (_1_0 != null) { + t1 = _this._serialize$_buffer; + t1.write$1(0, _1_0); + if (query.conditions.length !== 0) + t1.write$1(0, " and "); + } + _2_0 = query.conditions; + if (_2_0.length === 1) + t1 = B.JSString_methods.startsWith$1(_2_0[0], "(not "); + else + t1 = false; + if (t1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, "not "); + condition = B.JSArray_methods.get$first(_2_0); + t1.write$1(0, B.JSString_methods.substring$2(condition, 5, condition.length - 1)); + } else { + operator = query.conjunction ? "and" : "or"; + t1 = _this._style === B.OutputStyle_1 ? operator + " " : " " + operator + " "; + t2 = _this._serialize$_buffer; + _this._writeBetween$3(_2_0, t1, t2.get$write(t2)); + } + }, + visitCssStyleRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node._style_rule$_selector._box$_inner.value.span, new A._SerializeVisitor_visitCssStyleRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssSupportsRule$1(node) { + var t1, _this = this; + _this._writeIndentation$0(); + t1 = _this._serialize$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssSupportsRule_closure(_this, node)); + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + _this._serialize$_visitChildren$1(node); + }, + visitCssDeclaration$1(node) { + var error, stackTrace, error0, stackTrace0, t1, exception, _this = this; + _this._writeIndentation$0(); + _this._serialize$_write$1(node.name); + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(58); + if (!node.parsedAsSassScript) + t1.forSpan$2(node.value.span, new A._SerializeVisitor_visitCssDeclaration_closure(_this, node)); + else { + if (_this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + try { + t1.forSpan$2(node.valueSpanForMap, new A._SerializeVisitor_visitCssDeclaration_closure0(_this, node)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace(A.MultiSpanSassException$(error.message, node.value.span, error.primaryLabel, error.secondarySpans, null), error, stackTrace); + } else if (t1 instanceof A.SassScriptException) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = error0.message; + A.throwWithTrace(new A.SassException(B.Set_empty, t1, node.value.span), error0, stackTrace0); + } else + throw exception; + } + } + }, + _writeFoldedValue$1(node) { + var t1, t2, next, t3, + scanner = A.StringScanner$(type$.SassString._as(node.value.value)._string$_text, null, null); + for (t1 = scanner.string.length, t2 = this._serialize$_buffer; scanner._string_scanner$_position !== t1;) { + next = scanner.readChar$0(); + if (next !== 10) { + t2.writeCharCode$1(next); + continue; + } + t2.writeCharCode$1(32); + for (;;) { + t3 = scanner.peekChar$0(); + if (!(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12)) + break; + scanner.readChar$0(); + } + } + }, + _writeReindentedValue$1(node) { + var _0_0, t1, _this = this, + value = type$.SassString._as(node.value.value)._string$_text; + $label0$0: { + _0_0 = _this._minimumIndentation$1(value); + if (_0_0 == null) { + _this._serialize$_buffer.write$1(0, value); + break $label0$0; + } + if (-1 === _0_0) { + t1 = _this._serialize$_buffer; + t1.write$1(0, A.trimAsciiRight(value, true)); + t1.writeCharCode$1(32); + break $label0$0; + } + t1 = node.name.span; + t1 = t1.get$start(t1); + _this._writeWithIndent$2(value, Math.min(_0_0, t1.file.getColumn$1(t1.offset))); + } + }, + _minimumIndentation$1(text) { + var character, t2, min, next, min0, + scanner = A.LineScanner$(text), + t1 = scanner.string.length; + for (;;) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + if (scanner._string_scanner$_position === t1) + return scanner.peekChar$1(-1) === 10 ? -1 : null; + for (min = null; scanner._string_scanner$_position !== t1;) { + while (scanner._string_scanner$_position !== t1) { + next = scanner.peekChar$0(); + if (next !== 32 && next !== 9) + break; + scanner._adjustLineAndColumn$1(scanner.super$StringScanner$readChar()); + } + if (scanner._string_scanner$_position === t1 || scanner.scanChar$1(10)) + continue; + min0 = scanner._line_scanner$_column; + min = min == null ? min0 : Math.min(min, min0); + for (;;) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + } + return min == null ? -1 : min; + }, + _writeWithIndent$2(text, minimumIndentation) { + var t1, t2, t3, character, lineStart, newlines, end, + scanner = A.LineScanner$(text); + for (t1 = scanner.string, t2 = t1.length, t3 = this._serialize$_buffer; scanner._string_scanner$_position !== t2;) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + for (;;) { + lineStart = scanner._string_scanner$_position; + for (newlines = 1;;) { + if (scanner._string_scanner$_position === t2) { + t3.writeCharCode$1(32); + return; + } + $label0$2: { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (32 === character || 9 === character) + continue; + if (10 === character) { + lineStart = scanner._string_scanner$_position; + ++newlines; + break $label0$2; + } + break; + } + } + this._writeTimes$2(10, newlines); + this._writeIndentation$0(); + end = scanner._string_scanner$_position; + t3.write$1(0, B.JSString_methods.substring$2(t1, lineStart + minimumIndentation, end)); + for (;;) { + if (scanner._string_scanner$_position === t2) + return; + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + } + }, + visitCalculation$1(value) { + var t2, _this = this, + t1 = _this._serialize$_buffer; + t1.write$1(0, value.name); + t1.writeCharCode$1(40); + t2 = _this._style === B.OutputStyle_1 ? "," : ", "; + _this._writeBetween$3(value.$arguments, t2, _this.get$_writeCalculationValue()); + t1.writeCharCode$1(41); + }, + _writeCalculationValue$1(value) { + var t1, _0_0, _1_0, first, rest, left, right, operator, parenthesizeLeft, operatorWhitespace, parenthesizeRight, t2, _this = this; + $label1$1: { + t1 = value instanceof A.SassNumber; + if (t1 && !isFinite(value._number$_value)) { + $label0$0: { + _0_0 = value._number$_value; + if (1 / 0 === _0_0) { + _this._serialize$_buffer.write$1(0, "infinity"); + break $label0$0; + } + if (-1 / 0 === _0_0) { + _this._serialize$_buffer.write$1(0, "-infinity"); + break $label0$0; + } + if (isNaN(_0_0)) + _this._serialize$_buffer.write$1(0, "NaN"); + } + _this._writeCalculationUnits$2(value.get$numeratorUnits(value), value.get$denominatorUnits(value)); + break $label1$1; + } + if (t1 && value.get$hasComplexUnits()) { + _this._writeNumber$1(value._number$_value); + _1_0 = value.get$numeratorUnits(value); + if (_1_0.length >= 1) { + first = _1_0[0]; + rest = B.JSArray_methods.sublist$1(_1_0, 1); + _this._serialize$_buffer.write$1(0, first); + _this._writeCalculationUnits$2(rest, value.get$denominatorUnits(value)); + } else + _this._writeCalculationUnits$2(A._setArrayType([], type$.JSArray_String), value.get$denominatorUnits(value)); + break $label1$1; + } + if (value instanceof A.Value) { + value.accept$1(_this); + break $label1$1; + } + t1 = value instanceof A.CalculationOperation; + left = null; + right = null; + if (t1) { + operator = value._operator; + left = value._left; + right = value._right; + } else + operator = null; + if (t1) { + parenthesizeLeft = left instanceof A.CalculationOperation && left._operator.precedence < operator.precedence; + if (parenthesizeLeft) + _this._serialize$_buffer.writeCharCode$1(40); + _this._writeCalculationValue$1(left); + if (parenthesizeLeft) + _this._serialize$_buffer.writeCharCode$1(41); + operatorWhitespace = _this._style !== B.OutputStyle_1 || operator.precedence === 1; + if (operatorWhitespace) + _this._serialize$_buffer.writeCharCode$1(32); + t1 = _this._serialize$_buffer; + t1.write$1(0, operator.operator); + if (operatorWhitespace) + t1.writeCharCode$1(32); + if (!(right instanceof A.CalculationOperation && _this._parenthesizeCalculationRhs$2(operator, right._operator))) { + parenthesizeRight = false; + if (operator === B.CalculationOperator_wFL) { + if (right instanceof A.SassNumber) + t2 = isFinite(right._number$_value) ? right.get$hasComplexUnits() : right.get$hasUnits(); + else + t2 = parenthesizeRight; + parenthesizeRight = t2; + } + } else + parenthesizeRight = true; + if (parenthesizeRight) + t1.writeCharCode$1(40); + _this._writeCalculationValue$1(right); + if (parenthesizeRight) + t1.writeCharCode$1(41); + } + } + }, + _writeCalculationUnits$2(numeratorUnits, denominatorUnits) { + var t1, t2, t3, t4; + for (t1 = J.get$iterator$ax(numeratorUnits), t2 = this._serialize$_buffer, t3 = this._style !== B.OutputStyle_1; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(42); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(49); + t2.write$1(0, t4); + } + for (t1 = J.get$iterator$ax(denominatorUnits); t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(47); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(49); + t2.write$1(0, t4); + } + }, + _parenthesizeCalculationRhs$2(outer, right) { + var t1; + $label0$0: { + if (B.CalculationOperator_wFL === outer) { + t1 = true; + break $label0$0; + } + if (B.CalculationOperator_dpX === outer) { + t1 = false; + break $label0$0; + } + t1 = right === B.CalculationOperator_dpX || right === B.CalculationOperator_KrC; + break $label0$0; + } + return t1; + }, + visitColor$1(value) { + var _0_0, _0_2, _0_6, t1, _0_4, _0_6_isSet, t2, _0_10_isSet, _0_10, _0_12_isSet, _0_14, _0_12, _0_14_isSet, t3, _0_10_isSet0, polar, t4, t5, _this = this, _null = null; + $label0$0: { + _0_0 = value._space; + _0_2 = B.RgbColorSpace_i0P === _0_0; + _0_6 = _null; + t1 = true; + if (!_0_2) { + _0_4 = B.HslColorSpace_JQ2 === _0_0; + _0_6_isSet = !_0_4; + if (_0_6_isSet) { + _0_6 = B.HwbColorSpace_guQ === _0_0; + t1 = _0_6; + } + } else { + _0_4 = _null; + _0_6_isSet = false; + } + if (t1 && value.channel0OrNull != null && value.channel1OrNull != null && value.channel2OrNull != null && value.alphaOrNull != null) { + _this._writeLegacyColor$1(value); + break $label0$0; + } + if (_0_2) { + t1 = _this._serialize$_buffer; + t1.write$1(0, "rgb("); + _this._writeChannel$1(value.channel0OrNull); + t1.writeCharCode$1(32); + _this._writeChannel$1(value.channel1OrNull); + t1.writeCharCode$1(32); + _this._writeChannel$1(value.channel2OrNull); + _this._maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + if (!_0_4) + t1 = _0_6_isSet ? _0_6 : B.HwbColorSpace_guQ === _0_0; + else + t1 = true; + if (t1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(40); + t2 = _this._style === B.OutputStyle_1 ? _null : "deg"; + _this._writeChannel$2(value.channel0OrNull, t2); + t1.writeCharCode$1(32); + _this._writeChannel$2(value.channel1OrNull, "%"); + t1.writeCharCode$1(32); + _this._writeChannel$2(value.channel2OrNull, "%"); + _this._maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + _0_10_isSet = B.LabColorSpace_2nT !== _0_0; + if (_0_10_isSet) { + _0_10 = B.LchColorSpace_Bpv === _0_0; + t1 = _0_10; + } else { + _0_10 = _null; + t1 = true; + } + t2 = false; + if (t1) + if (!_this._inspect) { + t1 = value.channel0OrNull; + if (t1 == null) + t1 = 0; + if (t1 > 0 || A.fuzzyEquals(t1, 0)) + t1 = t1 < 100 || A.fuzzyEquals(t1, 100); + else + t1 = false; + t1 = !t1 && value.channel1OrNull != null && value.channel2OrNull != null; + } else + t1 = t2; + else + t1 = t2; + _0_12_isSet = !t1; + _0_14 = _null; + if (_0_12_isSet) { + _0_12 = B.OklabColorSpace_540 === _0_0; + t1 = false; + _0_14_isSet = !_0_12; + if (_0_14_isSet) { + _0_14 = B.OklchColorSpace_9Gj === _0_0; + t2 = _0_14; + } else + t2 = true; + t3 = false; + if (t2) + if (!_this._inspect) { + t2 = value.channel0OrNull; + if (t2 == null) + t2 = 0; + if (t2 > 0 || A.fuzzyEquals(t2, 0)) + t2 = t2 < 1 || A.fuzzyEquals(t2, 1); + else + t2 = false; + t2 = !t2 && value.channel1OrNull != null && value.channel2OrNull != null; + } else + t2 = t3; + else + t2 = t3; + if (!t2) { + if (_0_10_isSet) { + t2 = _0_10; + _0_10_isSet0 = _0_10_isSet; + } else { + _0_10 = B.LchColorSpace_Bpv === _0_0; + t2 = _0_10; + _0_10_isSet0 = true; + } + if (!t2) + if (_0_14_isSet) + t2 = _0_14; + else { + _0_14 = B.OklchColorSpace_9Gj === _0_0; + t2 = _0_14; + _0_14_isSet = true; + } + else + t2 = true; + if (t2) + if (!_this._inspect) { + t1 = value.channel1OrNull; + t2 = t1 == null; + if (t2) + t1 = 0; + t1 = t1 < 0 && !A.fuzzyEquals(t1, 0) && value.channel0OrNull != null && !t2; + } + } else { + _0_10_isSet0 = _0_10_isSet; + t1 = true; + } + } else { + _0_12 = _null; + _0_10_isSet0 = _0_10_isSet; + _0_14_isSet = false; + t1 = true; + } + if (t1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, "color-mix(in "); + t1.write$1(0, _0_0); + t2 = _this._style === B.OutputStyle_1; + t1.write$1(0, t2 ? "," : ", "); + _this._writeColorFunction$1(value.toSpace$1(B.XyzD65ColorSpace_WiJ)); + if (!t2) + t1.writeCharCode$1(32); + t1.write$1(0, "100%"); + t1.write$1(0, t2 ? "," : ", "); + t1.write$1(0, t2 ? "red" : "black"); + t1.writeCharCode$1(41); + break $label0$0; + } + t1 = true; + if (_0_10_isSet) + if (!(_0_12_isSet ? _0_12 : B.OklabColorSpace_540 === _0_0)) + if (!(_0_10_isSet0 ? _0_10 : B.LchColorSpace_Bpv === _0_0)) + t1 = _0_14_isSet ? _0_14 : B.OklchColorSpace_9Gj === _0_0; + if (t1) { + t1 = _this._serialize$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(40); + t2 = _0_0._channels; + polar = t2[2].isPolarAngle; + t3 = false; + if (!_this._inspect) { + t4 = value.channel0OrNull; + if (t4 == null) + t4 = 0; + if (t4 > 0 || A.fuzzyEquals(t4, 0)) + t4 = t4 < 100 || A.fuzzyEquals(t4, 100); + else + t4 = false; + if (t4) { + if (polar) { + t3 = value.channel1OrNull; + if (t3 == null) + t3 = 0; + t3 = t3 < 0 && !A.fuzzyEquals(t3, 0); + } + } else + t3 = true; + } + if (t3) { + t1.write$1(0, "from "); + t1.write$1(0, _this._style === B.OutputStyle_1 ? "red" : "black"); + t1.writeCharCode$1(32); + } + t3 = _this._style !== B.OutputStyle_1; + t4 = t3 && value.channel0OrNull != null; + t5 = value.channel0OrNull; + if (t4) { + t2 = type$.LinearChannel._as(t2[0]); + _this._writeNumber$1((t5 == null ? 0 : t5) * 100 / t2.max); + t1.writeCharCode$1(37); + } else + _this._writeChannel$1(t5); + t1.writeCharCode$1(32); + _this._writeChannel$1(value.channel1OrNull); + t1.writeCharCode$1(32); + t2 = polar && t3 ? "deg" : _null; + _this._writeChannel$2(value.channel2OrNull, t2); + _this._maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + _this._writeColorFunction$1(value); + } + }, + _writeChannel$2(channel, unit) { + var _this = this; + if (channel == null) + _this._serialize$_buffer.write$1(0, "none"); + else if (isFinite(channel)) { + _this._writeNumber$1(channel); + if (unit != null) + _this._serialize$_buffer.write$1(0, unit); + } else + _this.visitNumber$1(A.SassNumber_SassNumber(channel, unit)); + }, + _writeChannel$1(channel) { + return this._writeChannel$2(channel, null); + }, + _writeLegacyColor$1(color) { + var rgb, t3, red, green, blue, hsl, hue, saturation, lightness, hwb, _0_0, format, _1_0, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals(t2 ? 0 : t1, 1); + if (!color.get$isInGamut() && !_this._inspect) { + _this._writeHsl$1(color); + return; + } + if (_this._style === B.OutputStyle_1) { + rgb = color.toSpace$1(B.RgbColorSpace_i0P); + if (opaque && _this._tryIntegerRgb$1(rgb)) + return; + t3 = rgb.channel0OrNull; + red = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = rgb.channel1OrNull; + green = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = rgb.channel2OrNull; + blue = _this._writeNumberToString$1(t3 == null ? 0 : t3); + hsl = color.toSpace$1(B.HslColorSpace_JQ2); + t3 = hsl.channel0OrNull; + hue = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = hsl.channel1OrNull; + saturation = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = hsl.channel2OrNull; + lightness = _this._writeNumberToString$1(t3 == null ? 0 : t3); + t3 = _this._serialize$_buffer; + if (red.length + green.length + blue.length <= hue.length + saturation.length + lightness.length + 2) { + t3.write$1(0, opaque ? "rgb(" : "rgba("); + t3.write$1(0, red); + t3.writeCharCode$1(44); + t3.write$1(0, green); + t3.writeCharCode$1(44); + t3.write$1(0, blue); + } else { + t3.write$1(0, opaque ? "hsl(" : "hsla("); + t3.write$1(0, hue); + t3.writeCharCode$1(44); + t3.write$1(0, saturation); + t3.write$1(0, "%,"); + t3.write$1(0, lightness); + t3.writeCharCode$1(37); + } + if (!opaque) { + t3.writeCharCode$1(44); + _this._writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + return; + } + t3 = color._space; + if (t3 === B.HslColorSpace_JQ2) { + _this._writeHsl$1(color); + return; + } else if (_this._inspect && t3 === B.HwbColorSpace_guQ) { + t3 = _this._serialize$_buffer; + t3.write$1(0, "hwb("); + hwb = color.toSpace$1(B.HwbColorSpace_guQ); + _this._writeNumber$1(hwb.channel$1(0, "hue")); + t3.writeCharCode$1(32); + _this._writeNumber$1(hwb.channel$1(0, "whiteness")); + t3.writeCharCode$1(37); + t3.writeCharCode$1(32); + _this._writeNumber$1(hwb.channel$1(0, "blackness")); + t3.writeCharCode$1(37); + if (!A.fuzzyEquals(t2 ? 0 : t1, 1)) { + t3.write$1(0, " / "); + _this._writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + return; + } + _0_0 = color.format; + if (B.C__ColorFormatEnum === _0_0) { + _this._writeRgb$1(color); + return; + } + t1 = _0_0 instanceof A.SpanColorFormat; + format = t1 ? _0_0 : null; + if (t1) { + _this._serialize$_buffer.write$1(0, format._color$_span.get$text()); + return; + } + if (opaque) { + rgb = color.toSpace$1(B.RgbColorSpace_i0P); + _1_0 = $.$get$namesByColor().$index(0, rgb); + if (_1_0 != null) { + _this._serialize$_buffer.write$1(0, _1_0); + return; + } + if (_this._canUseHex$1(rgb)) { + _this._serialize$_buffer.writeCharCode$1(35); + t1 = rgb.channel0OrNull; + _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + t1 = rgb.channel1OrNull; + _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + t1 = rgb.channel2OrNull; + _this._writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + return; + } + } + if (t3 === B.HwbColorSpace_guQ) + _this._writeHsl$1(color); + else + _this._writeRgb$1(color); + }, + _tryIntegerRgb$1(rgb) { + var t1, redInt, greenInt, blueInt, shortHex, _0_0, t2, t3, $name, _this = this; + if (!_this._canUseHex$1(rgb)) + return false; + t1 = rgb.channel0OrNull; + redInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = rgb.channel1OrNull; + greenInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = rgb.channel2OrNull; + blueInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = redInt & 15; + shortHex = t1 === B.JSInt_methods._shrOtherPositive$1(redInt, 4) && (greenInt & 15) === B.JSInt_methods._shrOtherPositive$1(greenInt, 4) && (blueInt & 15) === B.JSInt_methods._shrOtherPositive$1(blueInt, 4); + _0_0 = $.$get$namesByColor().$index(0, rgb); + t2 = false; + if (_0_0 != null) { + t3 = _0_0.length; + t2 = t3 <= (shortHex ? 4 : 7); + $name = _0_0; + } else + $name = null; + if (t2) + _this._serialize$_buffer.write$1(0, $name); + else { + t2 = _this._serialize$_buffer; + if (shortHex) { + t2.writeCharCode$1(35); + t2.writeCharCode$1(A.hexCharFor(t1)); + t2.writeCharCode$1(A.hexCharFor(greenInt & 15)); + t2.writeCharCode$1(A.hexCharFor(blueInt & 15)); + } else { + t2.writeCharCode$1(35); + _this._writeHexComponent$1(redInt); + _this._writeHexComponent$1(greenInt); + _this._writeHexComponent$1(blueInt); + } + } + return true; + }, + _canUseHex$1(rgb) { + var t2, + t1 = rgb.channel0OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt(t1)) + t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); + else + t1 = false; + t2 = false; + if (t1) { + t1 = rgb.channel1OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt(t1)) + t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); + else + t1 = false; + if (t1) { + t1 = rgb.channel2OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt(t1)) + t1 = (t1 > 0 || A.fuzzyEquals(t1, 0)) && t1 < 256 && !A.fuzzyEquals(t1, 256); + else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + return t1; + }, + _writeRgb$1(color) { + var t4, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals(t2 ? 0 : t1, 1), + rgb = color.toSpace$1(B.RgbColorSpace_i0P), + t3 = _this._serialize$_buffer; + t3.write$1(0, opaque ? "rgb(" : "rgba("); + _this._writeNumber$1(rgb.channel$1(0, "red")); + t4 = _this._style === B.OutputStyle_1; + t3.write$1(0, t4 ? "," : ", "); + _this._writeNumber$1(rgb.channel$1(0, "green")); + t3.write$1(0, t4 ? "," : ", "); + _this._writeNumber$1(rgb.channel$1(0, "blue")); + if (!opaque) { + t3.write$1(0, t4 ? "," : ", "); + _this._writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + }, + _writeHsl$1(color) { + var t4, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals(t2 ? 0 : t1, 1), + hsl = color.toSpace$1(B.HslColorSpace_JQ2), + t3 = _this._serialize$_buffer; + t3.write$1(0, opaque ? "hsl(" : "hsla("); + _this._writeChannel$1(hsl.channel$1(0, "hue")); + t4 = _this._style === B.OutputStyle_1; + t3.write$1(0, t4 ? "," : ", "); + _this._writeChannel$2(hsl.channel$1(0, "saturation"), "%"); + t3.write$1(0, t4 ? "," : ", "); + _this._writeChannel$2(hsl.channel$1(0, "lightness"), "%"); + if (!opaque) { + t3.write$1(0, t4 ? "," : ", "); + _this._writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + }, + _writeColorFunction$1(color) { + var _this = this, + t1 = _this._serialize$_buffer; + t1.write$1(0, "color("); + t1.write$1(0, color._space); + t1.writeCharCode$1(32); + _this._writeBetween$3(color.get$channelsOrNull(), " ", _this.get$_writeChannel()); + _this._maybeWriteSlashAlpha$1(color); + t1.writeCharCode$1(41); + }, + _writeHexComponent$1(color) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(A.hexCharFor(B.JSInt_methods._shrOtherPositive$1(color, 4))); + t1.writeCharCode$1(A.hexCharFor(color & 15)); + }, + _maybeWriteSlashAlpha$1(color) { + var t2, t3, _this = this, + t1 = color.alphaOrNull; + if (A.fuzzyEquals(t1 == null ? 0 : t1, 1)) + return; + t2 = _this._style !== B.OutputStyle_1; + if (t2) + _this._serialize$_buffer.writeCharCode$1(32); + t3 = _this._serialize$_buffer; + t3.writeCharCode$1(47); + if (t2) + t3.writeCharCode$1(32); + _this._writeChannel$1(t1); + }, + visitList$1(value) { + var t2, singleton, t3, t4, t5, _this = this, + t1 = value._hasBrackets; + if (t1) + _this._serialize$_buffer.writeCharCode$1(91); + else if (value._list$_contents.length === 0) { + if (!_this._inspect) + throw A.wrapException(A.SassScriptException$("() isn't a valid CSS value.", null)); + _this._serialize$_buffer.write$1(0, "()"); + return; + } + t2 = _this._inspect; + singleton = false; + if (t2) + if (value._list$_contents.length === 1) { + t3 = value._separator; + t3 = t3 === B.ListSeparator_z0K || t3 === B.ListSeparator_Lul; + singleton = t3; + } + if (singleton && !t1) + _this._serialize$_buffer.writeCharCode$1(40); + t3 = value._list$_contents; + t3 = t2 ? t3 : new A.WhereIterable(t3, new A._SerializeVisitor_visitList_closure(), A._arrayInstanceType(t3)._eval$1("WhereIterable<1>")); + t4 = value._separator; + t5 = _this._separatorString$1(t4); + _this._writeBetween$3(t3, t5, t2 ? new A._SerializeVisitor_visitList_closure0(_this, value) : new A._SerializeVisitor_visitList_closure1(_this)); + if (singleton) { + t2 = _this._serialize$_buffer; + t2.write$1(0, t4.separator); + if (!t1) + t2.writeCharCode$1(41); + } + if (t1) + _this._serialize$_buffer.writeCharCode$1(93); + }, + _separatorString$1(separator) { + var t1; + $label0$0: { + if (B.ListSeparator_z0K === separator) { + t1 = this._style === B.OutputStyle_1 ? "," : ", "; + break $label0$0; + } + if (B.ListSeparator_Lul === separator) { + t1 = this._style === B.OutputStyle_1 ? "/" : " / "; + break $label0$0; + } + if (B.ListSeparator_SrV === separator) { + t1 = " "; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + return t1; + }, + _elementNeedsParens$2(separator, value) { + var t1; + $label1$1: { + if (value instanceof A.SassList && value._list$_contents.length > 1 && !value._hasBrackets) { + $label0$0: { + if (B.ListSeparator_z0K === separator) { + t1 = value._separator === B.ListSeparator_z0K; + break $label0$0; + } + if (B.ListSeparator_Lul === separator) { + t1 = value._separator; + t1 = t1 === B.ListSeparator_z0K || t1 === B.ListSeparator_Lul; + break $label0$0; + } + t1 = value._separator !== B.ListSeparator_undecided_null_3_undecided; + break $label0$0; + } + break $label1$1; + } + t1 = false; + break $label1$1; + } + return t1; + }, + visitMap$1(map) { + var t1, t2, _this = this; + if (!_this._inspect) + throw A.wrapException(A.SassScriptException$(map.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(40); + t2 = map._map$_contents; + _this._writeBetween$3(t2.get$entries(t2), ", ", new A._SerializeVisitor_visitMap_closure(_this)); + t1.writeCharCode$1(41); + }, + _writeMapElement$1(value) { + var needsParens = value instanceof A.SassList && value._separator === B.ListSeparator_z0K && !value._hasBrackets; + if (needsParens) + this._serialize$_buffer.writeCharCode$1(40); + value.accept$1(this); + if (needsParens) + this._serialize$_buffer.writeCharCode$1(41); + }, + visitNumber$1(value) { + var before, after, t1, _1_0, _this = this, + _0_0 = value.asSlash; + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_0_0)) { + before = _0_0._0; + after = _0_0._1; + _this.visitNumber$1(before); + _this._serialize$_buffer.writeCharCode$1(47); + _this.visitNumber$1(after); + return; + } + t1 = value._number$_value; + if (!isFinite(t1)) { + _this.visitCalculation$1(new A.SassCalculation("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); + return; + } + if (value.get$hasComplexUnits()) + _this.visitCalculation$1(new A.SassCalculation("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); + else { + _this._writeNumber$1(t1); + _1_0 = value.get$numeratorUnits(value); + if (_1_0.length === 1) + _this._serialize$_buffer.write$1(0, _1_0[0]); + } + }, + _writeNumberToString$1(number) { + var t1 = new A.StringBuffer(""); + this._writeNumber$2(number, new A.NoSourceMapBuffer(t1)); + t1 = t1._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _writeNumber$2(number, buffer) { + var _0_0, t1, integer, text, _this = this; + if (buffer == null) + buffer = _this._serialize$_buffer; + _0_0 = A.fuzzyAsInt(number); + t1 = false; + if (_0_0 != null) { + t1 = !_this._inspect || number === _0_0; + integer = _0_0; + } else + integer = null; + if (t1) { + buffer.write$1(0, _this._removeExponent$1(J.toString$0$(integer))); + return; + } + text = _this._removeExponent$1(B.JSNumber_methods.toString$0(number)); + if (_this._inspect) { + buffer.write$1(0, text); + return; + } + if (text.length < 12) { + buffer.write$1(0, _this._style === B.OutputStyle_1 && text.charCodeAt(0) === 48 ? B.JSString_methods.substring$1(text, 1) : text); + return; + } + _this._writeRounded$2(text, buffer); + }, + _writeNumber$1(number) { + return this._writeNumber$2(number, null); + }, + _removeExponent$1(text) { + var buffer, t2, t3, additionalZeroes, + negative = text.charCodeAt(0) === 45, + exponent = A._Cell$(), + t1 = text.length, + i = 0; + for (;;) { + if (!(i < t1)) { + buffer = null; + break; + } + c$0: { + if (text.charCodeAt(i) !== 101) + break c$0; + buffer = new A.StringBuffer(""); + t2 = buffer._contents = A.Primitives_stringFromCharCode(text.charCodeAt(0)); + if (negative) { + t2 += A.Primitives_stringFromCharCode(text.charCodeAt(1)); + buffer._contents = t2; + if (i > 3) + buffer._contents = t2 + B.JSString_methods.substring$2(text, 3, i); + } else if (i > 2) + buffer._contents = t2 + B.JSString_methods.substring$2(text, 2, i); + exponent.__late_helper$_value = A.int_parse(B.JSString_methods.substring$2(text, i + 1, t1), null); + break; + } + ++i; + } + if (buffer == null) + return text; + if (exponent._readLocal$0() > 0) { + t1 = exponent._readLocal$0(); + t2 = buffer._contents; + t3 = negative ? 1 : 0; + additionalZeroes = t1 - (t2.length - 1 - t3); + for (t1 = t2, i = 0; i < additionalZeroes; ++i) { + t1 = A.Primitives_stringFromCharCode(48); + t1 = buffer._contents += t1; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + negative = text.charCodeAt(0) === 45; + t1 = (negative ? A.Primitives_stringFromCharCode(45) : "") + "0."; + i = -1; + for (;;) { + t2 = exponent.__late_helper$_value; + if (t2 === exponent) + A.throwExpression(A.LateError$localNI("")); + if (!(i > t2)) + break; + t1 += A.Primitives_stringFromCharCode(48); + --i; + } + if (negative) { + t2 = buffer._contents; + t2 = B.JSString_methods.substring$1(t2.charCodeAt(0) == 0 ? t2 : t2, 1); + } else + t2 = buffer; + t2 = t1 + A.S(t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }, + _writeRounded$2(text, buffer) { + var t1, digits, negative, textIndex, digitsIndex, textIndex0, codeUnit, digitsIndex0, indexAfterPrecision, digitsIndex1, newDigit, writtenIndex; + if (B.JSString_methods.endsWith$1(text, ".0")) { + buffer.write$1(0, B.JSString_methods.substring$2(text, 0, text.length - 2)); + return; + } + t1 = text.length; + digits = new Uint8Array(t1 + 1); + negative = text.charCodeAt(0) === 45; + textIndex = negative ? 1 : 0; + for (digitsIndex = 1;; textIndex = textIndex0, digitsIndex = digitsIndex0) { + if (textIndex === t1) { + buffer.write$1(0, text); + return; + } + textIndex0 = textIndex + 1; + codeUnit = text.charCodeAt(textIndex); + if (codeUnit === 46) { + textIndex = textIndex0; + break; + } + digitsIndex0 = digitsIndex + 1; + digits[digitsIndex] = codeUnit - 48; + } + indexAfterPrecision = textIndex + 10; + if (indexAfterPrecision >= t1) { + buffer.write$1(0, text); + return; + } + for (digitsIndex0 = digitsIndex; textIndex < indexAfterPrecision; textIndex = textIndex0, digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 + 1; + textIndex0 = textIndex + 1; + digits[digitsIndex0] = text.charCodeAt(textIndex) - 48; + } + if (text.charCodeAt(textIndex) - 48 >= 5) + for (;; digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 - 1; + newDigit = digits[digitsIndex1] + 1; + digits[digitsIndex1] = newDigit; + if (newDigit !== 10) + break; + } + for (; digitsIndex0 < digitsIndex; ++digitsIndex0) + digits[digitsIndex0] = 0; + for (;;) { + t1 = digitsIndex0 > digitsIndex; + if (!(t1 && digits[digitsIndex0 - 1] === 0)) + break; + --digitsIndex0; + } + if (digitsIndex0 === 2 && digits[0] === 0 && digits[1] === 0) { + buffer.writeCharCode$1(48); + return; + } + if (negative) + buffer.writeCharCode$1(45); + if (digits[0] === 0) + writtenIndex = this._style === B.OutputStyle_1 && digits[1] === 0 ? 2 : 1; + else + writtenIndex = 0; + for (; writtenIndex < digitsIndex; ++writtenIndex) + buffer.writeCharCode$1(48 + digits[writtenIndex]); + if (t1) { + buffer.writeCharCode$1(46); + for (; writtenIndex < digitsIndex0; ++writtenIndex) + buffer.writeCharCode$1(48 + digits[writtenIndex]); + } + }, + _visitQuotedString$2$forceDoubleQuote(string, forceDoubleQuote) { + var t1, includesSingleQuote, includesDoubleQuote, i, char, _1_2, _1_4, _0_0, quote, _this = this, + buffer = forceDoubleQuote ? _this._serialize$_buffer : new A.StringBuffer(""); + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + for (t1 = string.length, includesSingleQuote = false, includesDoubleQuote = false, i = 0; i < t1; ++i) { + char = string.charCodeAt(i); + _1_2 = 39 === char; + if (_1_2 && forceDoubleQuote) { + buffer.writeCharCode$1(39); + continue; + } + if (_1_2 && includesDoubleQuote) { + _this._visitQuotedString$2$forceDoubleQuote(string, true); + return; + } + if (_1_2) { + buffer.writeCharCode$1(39); + includesSingleQuote = true; + continue; + } + _1_4 = 34 === char; + if (_1_4 && forceDoubleQuote) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(34); + continue; + } + if (_1_4 && includesSingleQuote) { + _this._visitQuotedString$2$forceDoubleQuote(string, true); + return; + } + if (_1_4) { + buffer.writeCharCode$1(34); + includesDoubleQuote = true; + continue; + } + if (0 === char || 1 === char || 2 === char || 3 === char || 4 === char || 5 === char || 6 === char || 7 === char || 8 === char || 10 === char || 11 === char || 12 === char || 13 === char || 14 === char || 15 === char || 16 === char || 17 === char || 18 === char || 19 === char || 20 === char || 21 === char || 22 === char || 23 === char || 24 === char || 25 === char || 26 === char || 27 === char || 28 === char || 29 === char || 30 === char || 31 === char || 127 === char) { + _this._writeEscape$4(buffer, char, string, i); + continue; + } + if (92 === char) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(92); + continue; + } + _0_0 = _this._tryPrivateUseCharacter$4(buffer, char, string, i); + if (_0_0 != null) + i = _0_0; + else + buffer.writeCharCode$1(char); + } + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + else { + quote = includesDoubleQuote ? 39 : 34; + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(quote); + t1.write$1(0, buffer); + t1.writeCharCode$1(quote); + } + }, + _visitQuotedString$1(string) { + return this._visitQuotedString$2$forceDoubleQuote(string, false); + }, + _visitUnquotedString$1(string) { + var t1, t2, afterNewline, i, _1_0, _0_0; + for (t1 = string.length, t2 = this._serialize$_buffer, afterNewline = false, i = 0; i < t1; ++i) { + _1_0 = string.charCodeAt(i); + if (10 === _1_0) { + t2.writeCharCode$1(32); + afterNewline = true; + continue; + } + if (32 === _1_0) { + if (!afterNewline) + t2.writeCharCode$1(32); + continue; + } + _0_0 = this._tryPrivateUseCharacter$4(t2, _1_0, string, i); + if (_0_0 != null) + i = _0_0; + else + t2.writeCharCode$1(_1_0); + afterNewline = false; + } + }, + _tryPrivateUseCharacter$4(buffer, codeUnit, string, i) { + var t1; + if (this._style === B.OutputStyle_1) + return null; + if (codeUnit >= 57344 && codeUnit <= 63743) { + this._writeEscape$4(buffer, codeUnit, string, i); + return i; + } + if (codeUnit >>> 7 === 439 && string.length > i + 1) { + t1 = i + 1; + this._writeEscape$4(buffer, 65536 + ((codeUnit & 1023) << 10) + (string.charCodeAt(t1) & 1023), string, t1); + return t1; + } + return null; + }, + _writeEscape$4(buffer, character, string, i) { + var t1, next; + buffer.writeCharCode$1(92); + buffer.write$1(0, B.JSInt_methods.toRadixString$1(character, 16)); + t1 = i + 1; + if (string.length === t1) + return; + next = string.charCodeAt(t1); + if (A.CharacterExtension_get_isHex(next) || 32 === next || 9 === next) + buffer.writeCharCode$1(32); + }, + visitAttributeSelector$1(_, attribute) { + var _0_0, t2, + t1 = this._serialize$_buffer; + t1.writeCharCode$1(91); + t1.write$1(0, attribute.name); + _0_0 = attribute.value; + if (_0_0 != null) { + t1.write$1(0, attribute.op); + if (A.Parser_isIdentifier(_0_0) && !B.JSString_methods.startsWith$1(_0_0, "--")) { + t1.write$1(0, _0_0); + t2 = attribute.modifier; + if (t2 != null) + t1.writeCharCode$1(32); + } else { + this._visitQuotedString$1(_0_0); + t2 = attribute.modifier; + if (t2 != null) + if (this._style !== B.OutputStyle_1) + t1.writeCharCode$1(32); + } + A.NullableExtension_andThen(t2, t1.get$write(t1)); + } + t1.writeCharCode$1(93); + }, + visitClassSelector$1(_, klass) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(46); + t1.write$1(0, klass.name); + }, + visitComplexSelector$1(complex) { + var t2, t3, t4, t5, t6, i, component, t7, t8, t9, _this = this, + t1 = complex.leadingCombinators; + _this._writeCombinators$1(t1); + if (t1.length >= 1 && complex.components.length >= 1) + if (_this._style !== B.OutputStyle_1) + _this._serialize$_buffer.writeCharCode$1(32); + for (t1 = complex.components, t2 = t1.length, t3 = t2 - 1, t4 = _this._serialize$_buffer, t5 = _this._style === B.OutputStyle_1, t6 = !t5, i = 0; i < t2; ++i) { + component = t1[i]; + _this.visitCompoundSelector$1(component.selector); + t7 = component.combinators; + t8 = t7.length === 0; + if (!t8) + if (t6) + t4.writeCharCode$1(32); + t9 = t5 ? "" : " "; + _this._writeBetween$3(t7, t9, t4.get$write(t4)); + if (i !== t3) + t7 = !t5 || t8; + else + t7 = false; + if (t7) + t4.writeCharCode$1(32); + } + }, + _writeCombinators$1(combinators) { + var t1 = this._style === B.OutputStyle_1 ? "" : " ", + t2 = this._serialize$_buffer; + return this._writeBetween$3(combinators, t1, t2.get$write(t2)); + }, + visitCompoundSelector$1(compound) { + var t2, t3, _i, + t1 = this._serialize$_buffer, + start = t1.get$length(t1); + for (t2 = compound.components, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(this); + if (t1.get$length(t1) === start) + t1.writeCharCode$1(42); + }, + visitIDSelector$1(_, id) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(35); + t1.write$1(0, id.name); + }, + visitSelectorList$1(list) { + var t1, t2, t3, first, t4, _this = this, + complexes = list.components; + for (t1 = J.get$iterator$ax(_this._inspect ? complexes : new A.WhereIterable(complexes, new A._SerializeVisitor_visitSelectorList_closure(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>"))), t2 = _this._style !== B.OutputStyle_1, t3 = _this._serialize$_buffer, first = true; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (first) + first = false; + else { + t3.writeCharCode$1(44); + if (t4.lineBreak) { + if (t2) + t3.write$1(0, "\n"); + _this._writeIndentation$0(); + } else if (t2) + t3.writeCharCode$1(32); + } + _this.visitComplexSelector$1(t4); + } + }, + visitParentSelector$1(_, $parent) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(38); + A.NullableExtension_andThen($parent.suffix, t1.get$write(t1)); + }, + visitPlaceholderSelector$1(_, placeholder) { + var t1 = this._serialize$_buffer; + t1.writeCharCode$1(37); + t1.write$1(0, placeholder.name); + }, + visitPseudoSelector$1(_, pseudo) { + var _0_4, t3, + t1 = pseudo.name, + t2 = false; + if ("not" === t1) { + _0_4 = pseudo.selector; + if (_0_4 instanceof A.SelectorList) + t2 = (_0_4 == null ? type$.SelectorList._as(_0_4) : _0_4).accept$1(B._IsInvisibleVisitor_true); + } + if (t2) + return; + t2 = this._serialize$_buffer; + t2.writeCharCode$1(58); + if (!pseudo.isSyntacticClass) + t2.writeCharCode$1(58); + t2.write$1(0, t1); + t1 = pseudo.argument; + t3 = t1 == null; + if (t3 && pseudo.selector == null) + return; + t2.writeCharCode$1(40); + if (!t3) { + t2.write$1(0, t1); + if (pseudo.selector != null) + t2.writeCharCode$1(32); + } + A.NullableExtension_andThen(pseudo.selector, this.get$visitSelectorList()); + t2.writeCharCode$1(41); + }, + visitTypeSelector$1(_, type) { + this._serialize$_buffer.write$1(0, type.name); + }, + visitUniversalSelector$1(_, universal) { + var t2, + t1 = universal.namespace; + if (t1 != null) { + t2 = this._serialize$_buffer; + t2.write$1(0, t1); + t2.writeCharCode$1(124); + } + this._serialize$_buffer.writeCharCode$1(42); + }, + _serialize$_write$1(value) { + return this._serialize$_buffer.forSpan$2(value.span, new A._SerializeVisitor__write_closure(this, value)); + }, + _serialize$_visitChildren$1($parent) { + var t2, t3, t4, t5, t6, t7, prePrevious, previous, t8, previous0, t9, savedIndentation, _this = this, + t1 = _this._serialize$_buffer; + t1.writeCharCode$1(123); + for (t2 = $parent.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = _this._style === B.OutputStyle_1, t5 = !t4, t6 = _this.get$_requiresSemicolon(), t7 = !_this._inspect, t3 = t3._eval$1("ListBase.E"), prePrevious = null, previous = null; t2.moveNext$0();) { + t8 = t2.__internal$_current; + previous0 = t8 == null ? t3._as(t8) : t8; + if (t7) + t8 = t4 ? previous0.accept$1(B._IsInvisibleVisitor_true_true) : previous0.accept$1(B._IsInvisibleVisitor_true_false); + else + t8 = false; + if (t8) + continue; + t8 = previous == null; + t9 = t8 ? null : t6.call$1(previous); + if (t9 == null ? false : t9) + t1.writeCharCode$1(59); + if (_this._isTrailingComment$2(previous0, t8 ? $parent : previous)) { + if (t5) + t1.writeCharCode$1(32); + savedIndentation = _this._indentation; + _this._indentation = 0; + new A._SerializeVisitor__visitChildren_closure(_this, previous0).call$0(); + _this._indentation = savedIndentation; + } else { + if (t5) + t1.write$1(0, "\n"); + ++_this._indentation; + new A._SerializeVisitor__visitChildren_closure0(_this, previous0).call$0(); + --_this._indentation; + } + prePrevious = previous; + previous = previous0; + } + if (previous != null) { + if ((type$.CssParentNode._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment)) && t5) + t1.writeCharCode$1(59); + if (prePrevious == null && _this._isTrailingComment$2(previous, $parent)) { + if (t5) + t1.writeCharCode$1(32); + } else { + _this._writeLineFeed$0(); + _this._writeIndentation$0(); + } + } + t1.writeCharCode$1(125); + }, + _requiresSemicolon$1(node) { + return type$.CssParentNode._is(node) ? node.get$isChildless() : !(node instanceof A.ModifiableCssComment); + }, + _isTrailingComment$2(node, previous) { + var t1, t2, t3, searchFrom, endOffset, t4, span; + if (this._style === B.OutputStyle_1) + return false; + if (!(node instanceof A.ModifiableCssComment)) + return false; + t1 = node.span; + t2 = t1.get$sourceUrl(t1); + t3 = previous.get$span(previous); + if (!J.$eq$(t2, t3.get$sourceUrl(t3))) + return false; + t2 = previous.get$span(previous); + if (!(J.$eq$(t2.get$file(t2).url, t1.get$file(t1).url) && t2.get$start(t2).offset <= t1.get$start(t1).offset && t2.get$end(t2).offset >= t1.get$end(t1).offset)) { + t1 = t1.get$start(t1); + t1 = t1.file.getLine$1(t1.offset); + t2 = previous.get$span(previous); + t2 = t2.get$end(t2); + return t1 === t2.file.getLine$1(t2.offset); + } + t2 = t1.get$start(t1); + t3 = previous.get$span(previous); + searchFrom = t2.offset - t3.get$start(t3).offset - 1; + if (searchFrom < 0) + return false; + endOffset = Math.max(0, B.JSString_methods.lastIndexOf$2(previous.get$span(previous).get$text(), "{", searchFrom)); + t2 = previous.get$span(previous); + t2 = t2.get$file(t2); + t3 = previous.get$span(previous); + t3 = t3.get$start(t3); + t4 = previous.get$span(previous); + span = t2.span$2(0, t3.offset, t4.get$start(t4).offset + endOffset); + t1 = t1.get$start(t1); + t1 = t1.file.getLine$1(t1.offset); + t4 = A.FileLocation$_(span.file, span._end); + return t1 === t4.file.getLine$1(t4.offset); + }, + _writeLineFeed$0() { + if (this._style !== B.OutputStyle_1) + this._serialize$_buffer.write$1(0, "\n"); + }, + _writeIndentation$0() { + var _this = this; + if (_this._style === B.OutputStyle_1) + return; + _this._writeTimes$2(_this._indentCharacter, _this._indentation * _this._indentWidth); + }, + _writeTimes$2(char, times) { + var t1, i; + for (t1 = this._serialize$_buffer, i = 0; i < times; ++i) + t1.writeCharCode$1(char); + }, + _writeBetween$1$3(iterable, text, callback) { + var t1, t2, first, value; + for (t1 = J.get$iterator$ax(iterable), t2 = this._serialize$_buffer, first = true; t1.moveNext$0();) { + value = t1.get$current(t1); + if (first) + first = false; + else + t2.write$1(0, text); + callback.call$1(value); + } + }, + _writeBetween$3(iterable, text, callback) { + return this._writeBetween$1$3(iterable, text, callback, type$.dynamic); + } + }; + A._SerializeVisitor_visitCssComment_closure.prototype = { + call$0() { + var t2, t3, _0_0, minimumIndentation, + t1 = this.$this; + if (t1._style === B.OutputStyle_1 && this.node.text.charCodeAt(2) !== 33) + return; + t2 = this.node; + t3 = t2.text; + if (B.JSString_methods.startsWith$1(t3, A.RegExp_RegExp("/\\*# source(Mapping)?URL=", false))) + return; + _0_0 = t1._minimumIndentation$1(t3); + if (_0_0 != null) { + t2 = t2.span; + t2 = t2.get$start(t2); + minimumIndentation = Math.min(_0_0, t2.file.getColumn$1(t2.offset)); + t1._writeIndentation$0(); + t1._writeWithIndent$2(t3, minimumIndentation); + } else { + t1._writeIndentation$0(); + t1._serialize$_buffer.write$1(0, t3); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssAtRule_closure.prototype = { + call$0() { + var t3, _0_0, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.writeCharCode$1(64); + t3 = this.node; + t1._serialize$_write$1(t3.name); + _0_0 = t3.value; + if (_0_0 != null) { + t2.writeCharCode$1(32); + t1._serialize$_write$1(_0_0); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssMediaRule_closure.prototype = { + call$0() { + var t3, firstQuery, t4, t5, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@media"); + t3 = this.node.queries; + firstQuery = B.JSArray_methods.get$first(t3); + t4 = t1._style === B.OutputStyle_1; + t5 = true; + if (t4) + if (firstQuery.modifier == null) + if (firstQuery.type == null) { + t5 = firstQuery.conditions; + t5 = t5.length === 1 && B.JSString_methods.startsWith$1(B.JSArray_methods.get$first(t5), "(not "); + } + if (t5) + t2.writeCharCode$1(32); + t2 = t4 ? "," : ", "; + t1._writeBetween$3(t3, t2, t1.get$_visitMediaQuery()); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport_closure.prototype = { + call$0() { + var t3, t4, _0_0, + t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@import"); + t3 = t1._style !== B.OutputStyle_1; + if (t3) + t2.writeCharCode$1(32); + t4 = this.node; + t2.forSpan$2(t4.url.span, new A._SerializeVisitor_visitCssImport__closure(t1, t4)); + _0_0 = t4.modifiers; + if (_0_0 != null) { + if (t3) + t2.writeCharCode$1(32); + t2.write$1(0, _0_0); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport__closure.prototype = { + call$0() { + return this.$this._writeImportUrl$1(this.node.url.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssKeyframeBlock_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._style === B.OutputStyle_1 ? "," : ", ", + t3 = t1._serialize$_buffer; + return t1._writeBetween$3(this.node.selector.value, t2, t3.get$write(t3)); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssStyleRule_closure.prototype = { + call$0() { + return this.$this.visitSelectorList$1(this.node._style_rule$_selector._box$_inner.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssSupportsRule_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize$_buffer; + t2.write$1(0, "@supports"); + if (!(t1._style === B.OutputStyle_1 && this.node.condition.value.charCodeAt(0) === 40)) + t2.writeCharCode$1(32); + t1._serialize$_write$1(this.node.condition); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + if (t1._style === B.OutputStyle_1) + t1._writeFoldedValue$1(t2); + else + t1._writeReindentedValue$1(t2); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure0.prototype = { + call$0() { + return this.node.value.value.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor_visitList_closure.prototype = { + call$1(element) { + return !element.get$isBlank(); + }, + $signature: 79 + }; + A._SerializeVisitor_visitList_closure0.prototype = { + call$1(element) { + var t1 = this.$this, + needsParens = t1._elementNeedsParens$2(this.value._separator, element); + if (needsParens) + t1._serialize$_buffer.writeCharCode$1(40); + element.accept$1(t1); + if (needsParens) + t1._serialize$_buffer.writeCharCode$1(41); + }, + $signature: 58 + }; + A._SerializeVisitor_visitList_closure1.prototype = { + call$1(element) { + element.accept$1(this.$this); + }, + $signature: 58 + }; + A._SerializeVisitor_visitMap_closure.prototype = { + call$1(entry) { + var t1 = this.$this; + t1._writeMapElement$1(entry.key); + t1._serialize$_buffer.write$1(0, ": "); + t1._writeMapElement$1(entry.value); + }, + $signature: 284 + }; + A._SerializeVisitor_visitSelectorList_closure.prototype = { + call$1(complex) { + return !complex.accept$1(B._IsInvisibleVisitor_true); + }, + $signature: 21 + }; + A._SerializeVisitor__write_closure.prototype = { + call$0() { + return this.$this._serialize$_buffer.write$1(0, this.value.value); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure.prototype = { + call$0() { + return this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure0.prototype = { + call$0() { + this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A.OutputStyle.prototype = { + _enumToString$0() { + return "OutputStyle." + this._name; + } + }; + A.LineFeed.prototype = { + _enumToString$0() { + return "LineFeed." + this._name; + }, + toString$0(_) { + return "lf"; + } + }; + A.StatementSearchVisitor.prototype = { + visitAtRootRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitAtRule$1(_, node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitContentRule$1(_, node) { + return null; + }, + visitDebugRule$1(_, node) { + return null; + }, + visitDeclaration$1(_, node) { + return A.NullableExtension_andThen(node.children, this.get$visitChildren()); + }, + visitEachRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitErrorRule$1(_, node) { + return null; + }, + visitExtendRule$1(_, node) { + return null; + }, + visitForRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitForwardRule$1(_, node) { + return null; + }, + visitFunctionRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitIfRule$1(_, node) { + var t1 = A.IterableExtension_search(node.clauses, new A.StatementSearchVisitor_visitIfRule_closure(this)); + return t1 == null ? A.NullableExtension_andThen(node.lastClause, new A.StatementSearchVisitor_visitIfRule_closure0(this)) : t1; + }, + visitImportRule$1(_, node) { + return null; + }, + visitIncludeRule$1(_, node) { + return A.NullableExtension_andThen(node.content, this.get$visitContentBlock(this)); + }, + visitLoudComment$1(_, node) { + return null; + }, + visitMediaRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitReturnRule$1(_, node) { + return null; + }, + visitSilentComment$1(_, node) { + return null; + }, + visitStyleRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitUseRule$1(_, node) { + return null; + }, + visitVariableDeclaration$1(_, node) { + return null; + }, + visitWarnRule$1(_, node) { + return null; + }, + visitWhileRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitChildren$1(children) { + return A.IterableExtension_search(children, new A.StatementSearchVisitor_visitChildren_closure(this)); + } + }; + A.StatementSearchVisitor_visitIfRule_closure.prototype = { + call$1(clause) { + return A.IterableExtension_search(clause.children, new A.StatementSearchVisitor_visitIfRule__closure0(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(IfClause)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.StatementSearchVisitor_visitIfRule_closure0.prototype = { + call$1(lastClause) { + return A.IterableExtension_search(lastClause.children, new A.StatementSearchVisitor_visitIfRule__closure(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(ElseClause)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.StatementSearchVisitor_visitChildren_closure.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor.T?(Statement)"); + } + }; + A.Entry.prototype = { + compareTo$1(_, other) { + var t1, t2, + res = this.target.compareTo$1(0, other.target); + if (res !== 0) + return res; + t1 = this.source; + t2 = other.source; + res = B.JSString_methods.compareTo$1(J.toString$0$(t1.file.url), J.toString$0$(t2.file.url)); + if (res !== 0) + return res; + return t1.compareTo$1(0, t2); + }, + $isComparable: 1 + }; + A.Mapping.prototype = {}; + A.SingleMapping.prototype = { + toJson$1$includeSourceContents(includeSourceContents) { + var t1, t2, line, column, srcLine, srcColumn, srcUrlId, srcNameId, first, _i, entry, nextLine, i, t3, t4, column0, t5, newUrlId, srcLine0, srcColumn0, srcNameId0, result, _this = this, + buff = new A.StringBuffer(""); + for (t1 = _this.lines, t2 = t1.length, line = 0, column = 0, srcLine = 0, srcColumn = 0, srcUrlId = 0, srcNameId = 0, first = true, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + entry = t1[_i]; + nextLine = entry.line; + if (nextLine > line) { + for (i = line; i < nextLine; ++i) + buff._contents += ";"; + line = nextLine; + column = 0; + first = true; + } + for (t3 = J.get$iterator$ax(entry.entries); t3.moveNext$0(); column = column0, first = false) { + t4 = t3.get$current(t3); + if (!first) + buff._contents += ","; + column0 = t4.column; + t5 = A.encodeVlq(column0 - column); + t5 = A.StringBuffer__writeAll(buff._contents, t5, ""); + buff._contents = t5; + newUrlId = t4.sourceUrlId; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(newUrlId - srcUrlId), ""); + buff._contents = t5; + srcLine0 = t4.sourceLine; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(srcLine0 - srcLine), ""); + buff._contents = t5; + srcColumn0 = t4.sourceColumn; + t5 = A.StringBuffer__writeAll(t5, A.encodeVlq(srcColumn0 - srcColumn), ""); + buff._contents = t5; + srcNameId0 = t4.sourceNameId; + if (srcNameId0 == null) { + srcUrlId = newUrlId; + srcColumn = srcColumn0; + srcLine = srcLine0; + continue; + } + buff._contents = A.StringBuffer__writeAll(t5, A.encodeVlq(srcNameId0 - srcNameId), ""); + srcNameId = srcNameId0; + srcUrlId = newUrlId; + srcColumn = srcColumn0; + srcLine = srcLine0; + } + } + t1 = _this.sourceRoot; + if (t1 == null) + t1 = ""; + t2 = buff._contents; + result = A.LinkedHashMap_LinkedHashMap$_literal(["version", 3, "sourceRoot", t1, "sources", _this.urls, "names", _this.names, "mappings", t2.charCodeAt(0) == 0 ? t2 : t2], type$.String, type$.dynamic); + t1 = _this.targetUrl; + if (t1 != null) + result.$indexSet(0, "file", t1); + if (includeSourceContents) { + t1 = _this.files; + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String?>"); + t1 = A.List_List$_of(new A.MappedListIterable(t1, new A.SingleMapping_toJson_closure(), t2), t2._eval$1("ListIterable.E")); + result.$indexSet(0, "sourcesContent", t1); + } + _this.extensions.forEach$1(0, new A.SingleMapping_toJson_closure0(result)); + return result; + }, + toJson$0() { + return this.toJson$1$includeSourceContents(false); + }, + toString$0(_) { + var _this = this, + t1 = A.getRuntimeTypeOfDartObject(_this).toString$0(0) + " : [targetUrl: " + A.S(_this.targetUrl) + ", sourceRoot: " + A.S(_this.sourceRoot) + ", urls: " + A.S(_this.urls) + ", names: " + A.S(_this.names) + ", lines: " + A.S(_this.lines) + "]"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.SingleMapping_SingleMapping$fromEntries_closure.prototype = { + call$0() { + return this.urls.__js_helper$_length; + }, + $signature: 10 + }; + A.SingleMapping_SingleMapping$fromEntries_closure0.prototype = { + call$0() { + return this.sourceEntry.source.file; + }, + $signature: 285 + }; + A.SingleMapping_SingleMapping$fromEntries_closure1.prototype = { + call$1(i) { + return this.files.$index(0, i); + }, + $signature: 286 + }; + A.SingleMapping_toJson_closure.prototype = { + call$1(file) { + return file == null ? null : A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(file._decodedChars, 0, null), 0, null); + }, + $signature: 287 + }; + A.SingleMapping_toJson_closure0.prototype = { + call$2($name, value) { + this.result.$indexSet(0, $name, value); + return value; + }, + $signature: 140 + }; + A.TargetLineEntry.prototype = { + toString$0(_) { + return A.getRuntimeTypeOfDartObject(this).toString$0(0) + ": " + this.line + " " + A.S(this.entries); + } + }; + A.TargetEntry.prototype = { + toString$0(_) { + var _this = this; + return A.getRuntimeTypeOfDartObject(_this).toString$0(0) + ": (" + _this.column + ", " + _this.sourceUrlId + ", " + _this.sourceLine + ", " + _this.sourceColumn + ", " + A.S(_this.sourceNameId) + ")"; + } + }; + A.SourceFile.prototype = { + get$length(_) { + return this._decodedChars.length; + }, + get$lines() { + return this._lineStarts.length; + }, + SourceFile$_fromList$2$url(decodedChars, url) { + var t1, t2, t3, t4, t5, i, c, j; + for (t1 = this._decodedChars, t2 = t1.length, t3 = J.getInterceptor$asx(decodedChars), t4 = t1.$flags | 0, t5 = this._lineStarts, i = 0; i < t2; ++i) { + c = t3.$index(decodedChars, i); + t4 & 2 && A.throwUnsupportedOperation(t1); + t1[i] = c; + if (c === 13) { + j = i + 1; + if (j >= t3.get$length(decodedChars) || t3.$index(decodedChars, j) !== 10) + c = 10; + } + if (c === 10) + t5.push(i + 1); + } + }, + span$2(_, start, end) { + return A._FileSpan$(this, start, end == null ? this._decodedChars.length : end); + }, + span$1(_, start) { + return this.span$2(0, start, null); + }, + getLine$1(offset) { + var t1, _this = this; + if (offset < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > _this._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + offset + string$.x20must_n + _this.get$length(0) + ".")); + t1 = _this._lineStarts; + if (offset < B.JSArray_methods.get$first(t1)) + return -1; + if (offset >= B.JSArray_methods.get$last(t1)) + return t1.length - 1; + if (_this._isNearCachedLine$1(offset)) { + t1 = _this._cachedLine; + t1.toString; + return t1; + } + return _this._cachedLine = _this._binarySearch$1(offset) - 1; + }, + _isNearCachedLine$1(offset) { + var t2, t3, + t1 = this._cachedLine; + if (t1 == null) + return false; + t2 = this._lineStarts; + if (offset < t2[t1]) + return false; + t3 = t2.length; + if (t1 >= t3 - 1 || offset < t2[t1 + 1]) + return true; + if (t1 >= t3 - 2 || offset < t2[t1 + 2]) { + this._cachedLine = t1 + 1; + return true; + } + return false; + }, + _binarySearch$1(offset) { + var min, half, + t1 = this._lineStarts, + max = t1.length - 1; + for (min = 0; min < max;) { + half = min + B.JSInt_methods._tdivFast$1(max - min, 2); + if (t1[half] > offset) + max = half; + else + min = half + 1; + } + return max; + }, + getColumn$1(offset) { + var line, lineStart, _this = this; + if (offset < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + offset + ".")); + else if (offset > _this._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + offset + " must be not be greater than the number of characters in the file, " + _this.get$length(0) + ".")); + line = _this.getLine$1(offset); + lineStart = _this._lineStarts[line]; + if (lineStart > offset) + throw A.wrapException(A.RangeError$("Line " + line + " comes after offset " + offset + ".")); + return offset - lineStart; + }, + getOffset$1(line) { + var t1, t2, result, t3; + if (line < 0) + throw A.wrapException(A.RangeError$("Line may not be negative, was " + line + ".")); + else { + t1 = this._lineStarts; + t2 = t1.length; + if (line >= t2) + throw A.wrapException(A.RangeError$("Line " + line + " must be less than the number of lines in the file, " + this.get$lines() + ".")); + } + result = t1[line]; + if (result <= this._decodedChars.length) { + t3 = line + 1; + t1 = t3 < t2 && result >= t1[t3]; + } else + t1 = true; + if (t1) + throw A.wrapException(A.RangeError$("Line " + line + " doesn't have 0 columns.")); + return result; + } + }; + A.FileLocation.prototype = { + get$sourceUrl(_) { + return this.file.url; + }, + get$line() { + return this.file.getLine$1(this.offset); + }, + get$column() { + return this.file.getColumn$1(this.offset); + }, + FileLocation$_$2(file, offset) { + var t2, + t1 = this.offset; + if (t1 < 0) + throw A.wrapException(A.RangeError$("Offset may not be negative, was " + t1 + ".")); + else { + t2 = this.file; + if (t1 > t2._decodedChars.length) + throw A.wrapException(A.RangeError$("Offset " + t1 + string$.x20must_n + t2.get$length(0) + ".")); + } + }, + pointSpan$0() { + var t1 = this.offset; + return A._FileSpan$(this.file, t1, t1); + }, + get$offset() { + return this.offset; + } + }; + A._FileSpan.prototype = { + get$sourceUrl(_) { + return this.file.url; + }, + get$length(_) { + return this._end - this._file$_start; + }, + get$start(_) { + return A.FileLocation$_(this.file, this._file$_start); + }, + get$end(_) { + return A.FileLocation$_(this.file, this._end); + }, + get$text() { + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(this.file._decodedChars, this._file$_start, this._end), 0, null); + }, + get$context(_) { + var _this = this, + t1 = _this.file, + endOffset = _this._end, + endLine = t1.getLine$1(endOffset); + if (t1.getColumn$1(endOffset) === 0 && endLine !== 0) { + if (endOffset - _this._file$_start === 0) + return endLine === t1._lineStarts.length - 1 ? "" : A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, t1.getOffset$1(endLine), t1.getOffset$1(endLine + 1)), 0, null); + } else + endOffset = endLine === t1._lineStarts.length - 1 ? t1._decodedChars.length : t1.getOffset$1(endLine + 1); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, t1.getOffset$1(t1.getLine$1(_this._file$_start)), endOffset), 0, null); + }, + _FileSpan$3(file, _start, _end) { + var t3, + t1 = this._end, + t2 = this._file$_start; + if (t1 < t2) + throw A.wrapException(A.ArgumentError$("End " + t1 + " must come after start " + t2 + ".", null)); + else { + t3 = this.file; + if (t1 > t3._decodedChars.length) + throw A.wrapException(A.RangeError$("End " + t1 + string$.x20must_n + t3.get$length(0) + ".")); + else if (t2 < 0) + throw A.wrapException(A.RangeError$("Start may not be negative, was " + t2 + ".")); + } + }, + compareTo$1(_, other) { + var result; + if (!(other instanceof A._FileSpan)) + return this.super$SourceSpanMixin$compareTo(0, other); + result = B.JSInt_methods.compareTo$1(this._file$_start, other._file$_start); + return result === 0 ? B.JSInt_methods.compareTo$1(this._end, other._end) : result; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (!type$.FileSpan._is(other)) + return _this.super$SourceSpanMixin$$eq(0, other); + if (!(other instanceof A._FileSpan)) + return _this.super$SourceSpanMixin$$eq(0, other) && J.$eq$(_this.file.url, other.get$sourceUrl(other)); + return _this._file$_start === other._file$_start && _this._end === other._end && J.$eq$(_this.file.url, other.file.url); + }, + get$hashCode(_) { + return A.Object_hash(this._file$_start, this._end, this.file.url, B.C_SentinelValue); + }, + expand$1(_, other) { + var t2, t3, _this = this, + t1 = _this.file; + if (!J.$eq$(t1.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(_this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + t2 = _this._file$_start; + t3 = _this._end; + if (other instanceof A._FileSpan) + return A._FileSpan$(t1, Math.min(t2, other._file$_start), Math.max(t3, other._end)); + else + return A._FileSpan$(t1, Math.min(t2, other.get$start(other).offset), Math.max(t3, other.get$end(other).offset)); + }, + $isFileSpan: 1, + $isSourceSpanWithContext: 1, + get$file(receiver) { + return this.file; + } + }; + A.Highlighter.prototype = { + highlight$0() { + var t2, highlightsByColumn, t3, t4, i, line, lastLine, t5, t6, t7, t8, t9, t10, t11, index, primaryIdx, primary, _i, highlight, _this = this, _null = null, + t1 = _this._lines; + _this._writeFileStart$1(B.JSArray_methods.get$first(t1).url); + t2 = _this._maxMultilineSpans; + highlightsByColumn = A.List_List$filled(t2, _null, false, type$.nullable__Highlight); + for (t3 = _this._highlighter$_buffer, t2 = t2 !== 0, t4 = _this._primaryColor, i = 0; i < t1.length; ++i) { + line = t1[i]; + if (i > 0) { + lastLine = t1[i - 1]; + t5 = line.url; + if (!J.$eq$(lastLine.url, t5)) { + _this._writeSidebar$1$end($._glyphs.get$upEnd()); + t3._contents += "\n"; + _this._writeFileStart$1(t5); + } else if (lastLine.number + 1 !== line.number) { + _this._writeSidebar$1$text("..."); + t3._contents += "\n"; + } + } + for (t5 = line.highlights, t6 = A._arrayInstanceType(t5)._eval$1("ReversedListIterable<1>"), t7 = new A.ReversedListIterable(t5, t6), t7 = new A.ListIterator(t7, t7.get$length(0), t6._eval$1("ListIterator")), t6 = t6._eval$1("ListIterable.E"), t8 = line.number, t9 = line.text; t7.moveNext$0();) { + t10 = t7.__internal$_current; + if (t10 == null) + t10 = t6._as(t10); + t11 = t10.span; + if (t11.get$start(t11).get$line() !== t11.get$end(t11).get$line() && t11.get$start(t11).get$line() === t8 && _this._isOnlyWhitespace$1(B.JSString_methods.substring$2(t9, 0, t11.get$start(t11).get$column()))) { + index = B.JSArray_methods.indexOf$1(highlightsByColumn, _null); + if (index < 0) + A.throwExpression(A.ArgumentError$(A.S(highlightsByColumn) + " contains no null elements.", _null)); + highlightsByColumn[index] = t10; + } + } + _this._writeSidebar$1$line(t8); + t3._contents += " "; + _this._writeMultilineHighlights$2(line, highlightsByColumn); + if (t2) + t3._contents += " "; + primaryIdx = B.JSArray_methods.indexWhere$1(t5, new A.Highlighter_highlight_closure()); + primary = primaryIdx === -1 ? _null : t5[primaryIdx]; + t6 = primary != null; + if (t6) { + t7 = primary.span; + t10 = t7.get$start(t7).get$line() === t8 ? t7.get$start(t7).get$column() : 0; + _this._writeHighlightedText$4$color(t9, t10, t7.get$end(t7).get$line() === t8 ? t7.get$end(t7).get$column() : t9.length, t4); + } else + _this._writeText$1(t9); + t3._contents += "\n"; + if (t6) + _this._writeIndicator$3(line, primary, highlightsByColumn); + for (t6 = t5.length, _i = 0; _i < t5.length; t5.length === t6 || (0, A.throwConcurrentModificationError)(t5), ++_i) { + highlight = t5[_i]; + if (highlight.isPrimary) + continue; + _this._writeIndicator$3(line, highlight, highlightsByColumn); + } + } + _this._writeSidebar$1$end($._glyphs.get$upEnd()); + t1 = t3._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _writeFileStart$1(url) { + var _this = this, + t1 = !_this._multipleFiles || !type$.Uri._is(url), + t2 = $._glyphs; + if (t1) + _this._writeSidebar$1$end(t2.get$downEnd()); + else { + _this._writeSidebar$1$end(t2.get$topLeftCorner()); + _this._colorize$2$color(new A.Highlighter__writeFileStart_closure(_this), "\x1b[34m"); + t1 = _this._highlighter$_buffer; + t2 = " " + $.$get$context().prettyUri$1(url); + t1._contents += t2; + } + _this._highlighter$_buffer._contents += "\n"; + }, + _writeMultilineHighlights$3$current(line, highlightsByColumn, current) { + var t1, currentColor, t2, t3, t4, t5, foundCurrent, _i, highlight, t6, startLine, t7, endLine, _this = this, _box_0 = {}; + _box_0.openedOnThisLine = false; + _box_0.openedOnThisLineColor = null; + t1 = current == null; + if (t1) + currentColor = null; + else + currentColor = current.isPrimary ? _this._primaryColor : _this._secondaryColor; + for (t2 = highlightsByColumn.length, t3 = _this._secondaryColor, t1 = !t1, t4 = _this._primaryColor, t5 = _this._highlighter$_buffer, foundCurrent = false, _i = 0; _i < t2; ++_i) { + highlight = highlightsByColumn[_i]; + t6 = highlight == null; + if (t6) + startLine = null; + else { + t7 = highlight.span; + startLine = t7.get$start(t7).get$line(); + } + if (t6) + endLine = null; + else { + t7 = highlight.span; + endLine = t7.get$end(t7).get$line(); + } + if (t1 && highlight === current) { + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure(_this, startLine, line), currentColor); + foundCurrent = true; + } else if (foundCurrent) + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure0(_this, highlight), currentColor); + else if (t6) + if (_box_0.openedOnThisLine) + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure1(_this), _box_0.openedOnThisLineColor); + else + t5._contents += " "; + else { + t6 = highlight.isPrimary ? t4 : t3; + _this._colorize$2$color(new A.Highlighter__writeMultilineHighlights_closure2(_box_0, _this, current, startLine, line, highlight, endLine), t6); + } + } + }, + _writeMultilineHighlights$2(line, highlightsByColumn) { + return this._writeMultilineHighlights$3$current(line, highlightsByColumn, null); + }, + _writeHighlightedText$4$color(text, startColumn, endColumn, color) { + var _this = this; + _this._writeText$1(B.JSString_methods.substring$2(text, 0, startColumn)); + _this._colorize$2$color(new A.Highlighter__writeHighlightedText_closure(_this, text, startColumn, endColumn), color); + _this._writeText$1(B.JSString_methods.substring$2(text, endColumn, text.length)); + }, + _writeIndicator$3(line, highlight, highlightsByColumn) { + var t2, coversWholeLine, _this = this, + color = highlight.isPrimary ? _this._primaryColor : _this._secondaryColor, + t1 = highlight.span; + if (t1.get$start(t1).get$line() === t1.get$end(t1).get$line()) { + _this._writeSidebar$0(); + t1 = _this._highlighter$_buffer; + t1._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + if (highlightsByColumn.length !== 0) + t1._contents += " "; + _this._writeLabel$3(highlight, highlightsByColumn, _this._colorize$2$color(new A.Highlighter__writeIndicator_closure(_this, line, highlight), color)); + } else { + t2 = line.number; + if (t1.get$start(t1).get$line() === t2) { + if (B.JSArray_methods.contains$1(highlightsByColumn, highlight)) + return; + A.replaceFirstNull(highlightsByColumn, highlight); + _this._writeSidebar$0(); + t1 = _this._highlighter$_buffer; + t1._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + _this._colorize$2$color(new A.Highlighter__writeIndicator_closure0(_this, line, highlight), color); + t1._contents += "\n"; + } else if (t1.get$end(t1).get$line() === t2) { + coversWholeLine = t1.get$end(t1).get$column() === line.text.length; + if (coversWholeLine && highlight.label == null) { + A.replaceWithNull(highlightsByColumn, highlight); + return; + } + _this._writeSidebar$0(); + _this._highlighter$_buffer._contents += " "; + _this._writeMultilineHighlights$3$current(line, highlightsByColumn, highlight); + _this._writeLabel$3(highlight, highlightsByColumn, _this._colorize$2$color(new A.Highlighter__writeIndicator_closure1(_this, coversWholeLine, line, highlight), color)); + A.replaceWithNull(highlightsByColumn, highlight); + } + } + }, + _writeArrow$3$beginning(line, column, beginning) { + var t2, + t1 = beginning ? 0 : 1, + tabs = this._countTabs$1(B.JSString_methods.substring$2(line.text, 0, column + t1)); + t1 = this._highlighter$_buffer; + t2 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 1 + column + tabs * 3); + t1._contents = (t1._contents += t2) + "^"; + }, + _writeArrow$2(line, column) { + return this._writeArrow$3$beginning(line, column, true); + }, + _writeLabel$3(highlight, highlightsByColumn, underlineLength) { + var lines, color, t1, t2, t3, t4, t5, t6, _i, columnHighlight, _this = this, + label = highlight.label; + if (label == null) { + _this._highlighter$_buffer._contents += "\n"; + return; + } + lines = A._setArrayType(label.split("\n"), type$.JSArray_String); + color = highlight.isPrimary ? _this._primaryColor : _this._secondaryColor; + _this._colorize$2$color(new A.Highlighter__writeLabel_closure(_this, lines), color); + t1 = _this._highlighter$_buffer; + t1._contents += "\n"; + for (t2 = A.SubListIterable$(lines, 1, null, type$.String), t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = highlightsByColumn.length, t3 = t3._eval$1("ListIterable.E"); t2.moveNext$0();) { + t5 = t2.__internal$_current; + if (t5 == null) + t5 = t3._as(t5); + _this._writeSidebar$0(); + t6 = t1._contents += " "; + for (_i = 0; _i < t4; ++_i) { + columnHighlight = highlightsByColumn[_i]; + if (columnHighlight == null || columnHighlight === highlight) { + t6 += " "; + t1._contents = t6; + } else { + t6 = $._glyphs.get$verticalLine(); + t6 = t1._contents += t6; + } + } + t1._contents = t6 + B.JSString_methods.$mul(" ", underlineLength); + _this._colorize$2$color(new A.Highlighter__writeLabel_closure0(_this, t5), color); + t1._contents += "\n"; + } + }, + _writeText$1(text) { + var t1, t2, t3, t4; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this._highlighter$_buffer, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + if (t4 == null) + t4 = t2._as(t4); + if (t4 === 9) + t3._contents += B.JSString_methods.$mul(" ", 4); + else { + t4 = A.Primitives_stringFromCharCode(t4); + t3._contents += t4; + } + } + }, + _writeSidebar$3$end$line$text(end, line, text) { + var t1 = {}; + t1.text = text; + if (line != null) + t1.text = B.JSInt_methods.toString$0(line + 1); + this._colorize$2$color(new A.Highlighter__writeSidebar_closure(t1, this, end), "\x1b[34m"); + }, + _writeSidebar$1$end(end) { + return this._writeSidebar$3$end$line$text(end, null, null); + }, + _writeSidebar$1$text(text) { + return this._writeSidebar$3$end$line$text(null, null, text); + }, + _writeSidebar$1$line(line) { + return this._writeSidebar$3$end$line$text(null, line, null); + }, + _writeSidebar$0() { + return this._writeSidebar$3$end$line$text(null, null, null); + }, + _countTabs$1(text) { + var t1, t2, count, t3; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"), count = 0; t1.moveNext$0();) { + t3 = t1.__internal$_current; + if ((t3 == null ? t2._as(t3) : t3) === 9) + ++count; + } + return count; + }, + _isOnlyWhitespace$1(text) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 !== 32 && t3 !== 9) + return false; + } + return true; + }, + _colorize$1$2$color(callback, color) { + var result, + t1 = this._primaryColor != null; + if (t1 && color != null) + this._highlighter$_buffer._contents += color; + result = callback.call$0(); + if (t1 && color != null) + this._highlighter$_buffer._contents += "\x1b[0m"; + return result; + }, + _colorize$2$color(callback, color) { + return this._colorize$1$2$color(callback, color, type$.dynamic); + } + }; + A.Highlighter_closure.prototype = { + call$0() { + var t1 = this.color, + t2 = J.getInterceptor$(t1); + if (t2.$eq(t1, true)) + return "\x1b[31m"; + if (t2.$eq(t1, false)) + return null; + return A._asStringQ(t1); + }, + $signature: 47 + }; + A.Highlighter$__closure.prototype = { + call$1(line) { + var t1 = line.highlights; + return new A.WhereIterable(t1, new A.Highlighter$___closure(), A._arrayInstanceType(t1)._eval$1("WhereIterable<1>")).get$length(0); + }, + $signature: 288 + }; + A.Highlighter$___closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + return t1.get$start(t1).get$line() !== t1.get$end(t1).get$line(); + }, + $signature: 122 + }; + A.Highlighter$__closure0.prototype = { + call$1(line) { + return line.url; + }, + $signature: 290 + }; + A.Highlighter__collateLines_closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + t1 = t1.get$sourceUrl(t1); + return t1 == null ? new A.Object() : t1; + }, + $signature: 291 + }; + A.Highlighter__collateLines_closure0.prototype = { + call$2(highlight1, highlight2) { + return highlight1.span.compareTo$1(0, highlight2.span); + }, + $signature: 292 + }; + A.Highlighter__collateLines_closure1.prototype = { + call$1(entry) { + var t1, t2, t3, t4, context, t5, linesBeforeSpan, lineNumber, _i, line, activeHighlights, flags, highlightIndex, oldHighlightLength, t6, t7, + url = entry.key, + highlightsForFile = entry.value, + lines = A._setArrayType([], type$.JSArray__Line); + for (t1 = J.getInterceptor$ax(highlightsForFile), t2 = t1.get$iterator(highlightsForFile), t3 = type$.JSArray__Highlight; t2.moveNext$0();) { + t4 = t2.get$current(t2).span; + context = t4.get$context(t4); + t5 = A.findLineStart(context, t4.get$text(), t4.get$start(t4).get$column()); + t5.toString; + linesBeforeSpan = B.JSString_methods.allMatches$1("\n", B.JSString_methods.substring$2(context, 0, t5)).get$length(0); + lineNumber = t4.get$start(t4).get$line() - linesBeforeSpan; + for (t4 = context.split("\n"), t5 = t4.length, _i = 0; _i < t5; ++_i) { + line = t4[_i]; + if (lines.length === 0 || lineNumber > B.JSArray_methods.get$last(lines).number) + lines.push(new A._Line(line, lineNumber, url, A._setArrayType([], t3))); + ++lineNumber; + } + } + activeHighlights = A._setArrayType([], t3); + for (t2 = lines.length, flags = activeHighlights.$flags | 0, highlightIndex = 0, _i = 0; _i < lines.length; lines.length === t2 || (0, A.throwConcurrentModificationError)(lines), ++_i) { + line = lines[_i]; + flags & 1 && A.throwUnsupportedOperation(activeHighlights, 16); + B.JSArray_methods._removeWhere$2(activeHighlights, new A.Highlighter__collateLines__closure(line), true); + oldHighlightLength = activeHighlights.length; + for (t3 = t1.skip$1(highlightsForFile, highlightIndex), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t5 = line.number, t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t6 = t3.__internal$_current; + if (t6 == null) + t6 = t4._as(t6); + t7 = t6.span; + if (t7.get$start(t7).get$line() > t5) + break; + activeHighlights.push(t6); + } + highlightIndex += activeHighlights.length - oldHighlightLength; + B.JSArray_methods.addAll$1(line.highlights, activeHighlights); + } + return lines; + }, + $signature: 293 + }; + A.Highlighter__collateLines__closure.prototype = { + call$1(highlight) { + var t1 = highlight.span; + return t1.get$end(t1).get$line() < this.line.number; + }, + $signature: 122 + }; + A.Highlighter_highlight_closure.prototype = { + call$1(highlight) { + return highlight.isPrimary; + }, + $signature: 122 + }; + A.Highlighter__writeFileStart_closure.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 2) + ">"; + t1._contents += t2; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeMultilineHighlights_closure.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = $._glyphs; + t2 = this.startLine === this.line.number ? t2.get$topLeftCorner() : t2.get$bottomLeftCorner(); + t1._contents += t2; + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights_closure0.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = $._glyphs; + t2 = this.highlight == null ? t2.get$horizontalLine() : t2.get$cross(); + t1._contents += t2; + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights_closure1.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = $._glyphs.get$horizontalLine(); + t1._contents += t2; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeMultilineHighlights_closure2.prototype = { + call$0() { + var _this = this, + t1 = _this._box_0, + t2 = t1.openedOnThisLine, + t3 = $._glyphs, + vertical = t2 ? t3.get$cross() : t3.get$verticalLine(); + if (_this.current != null) + _this.$this._highlighter$_buffer._contents += vertical; + else { + t2 = _this.line; + t3 = t2.number; + if (_this.startLine === t3) { + t2 = _this.$this; + t2._colorize$2$color(new A.Highlighter__writeMultilineHighlights__closure(t1, t2), t1.openedOnThisLineColor); + t1.openedOnThisLine = true; + if (t1.openedOnThisLineColor == null) + t1.openedOnThisLineColor = _this.highlight.isPrimary ? t2._primaryColor : t2._secondaryColor; + } else { + if (_this.endLine === t3) { + t3 = _this.highlight.span; + t2 = t3.get$end(t3).get$column() === t2.text.length; + } else + t2 = false; + t3 = _this.$this; + if (t2) { + t1 = t3._highlighter$_buffer; + t2 = _this.highlight.label == null ? $._glyphs.glyphOrAscii$2("\u2514", "\\") : vertical; + t1._contents += t2; + } else + t3._colorize$2$color(new A.Highlighter__writeMultilineHighlights__closure0(t3, vertical), t1.openedOnThisLineColor); + } + } + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights__closure.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = this._box_0.openedOnThisLine ? "\u252c" : "\u250c"; + t2 = $._glyphs.glyphOrAscii$2(t2, "/"); + t1._contents += t2; + }, + $signature: 1 + }; + A.Highlighter__writeMultilineHighlights__closure0.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += this.vertical; + }, + $signature: 1 + }; + A.Highlighter__writeHighlightedText_closure.prototype = { + call$0() { + var _this = this; + return _this.$this._writeText$1(B.JSString_methods.substring$2(_this.text, _this.startColumn, _this.endColumn)); + }, + $signature: 0 + }; + A.Highlighter__writeIndicator_closure.prototype = { + call$0() { + var startColumn, endColumn, tabsBefore, tabsInside, + t1 = this.$this, + t2 = t1._highlighter$_buffer, + t3 = t2._contents, + t4 = this.highlight, + t5 = t4.span; + t4 = t4.isPrimary ? "^" : $._glyphs.get$horizontalLineBold(); + startColumn = t5.get$start(t5).get$column(); + endColumn = t5.get$end(t5).get$column(); + t5 = this.line.text; + tabsBefore = t1._countTabs$1(B.JSString_methods.substring$2(t5, 0, startColumn)); + tabsInside = t1._countTabs$1(B.JSString_methods.substring$2(t5, startColumn, endColumn)); + startColumn += tabsBefore * 3; + t4 = (t2._contents += B.JSString_methods.$mul(" ", startColumn)) + B.JSString_methods.$mul(t4, Math.max(endColumn + (tabsBefore + tabsInside) * 3 - startColumn, 1)); + t2._contents = t4; + return t4.length - t3.length; + }, + $signature: 10 + }; + A.Highlighter__writeIndicator_closure0.prototype = { + call$0() { + var t1 = this.highlight.span; + return this.$this._writeArrow$2(this.line, t1.get$start(t1).get$column()); + }, + $signature: 0 + }; + A.Highlighter__writeIndicator_closure1.prototype = { + call$0() { + var t4, _this = this, + t1 = _this.$this, + t2 = t1._highlighter$_buffer, + t3 = t2._contents; + if (_this.coversWholeLine) { + t1 = B.JSString_methods.$mul($._glyphs.get$horizontalLine(), 3); + t2._contents += t1; + } else { + t4 = _this.highlight.span; + t1._writeArrow$3$beginning(_this.line, Math.max(t4.get$end(t4).get$column() - 1, 0), false); + } + return t2._contents.length - t3.length; + }, + $signature: 10 + }; + A.Highlighter__writeLabel_closure.prototype = { + call$0() { + var t1 = this.$this._highlighter$_buffer, + t2 = " " + B.JSArray_methods.get$first(this.lines); + t1._contents += t2; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeLabel_closure0.prototype = { + call$0() { + this.$this._highlighter$_buffer._contents += " " + this.text; + return null; + }, + $signature: 0 + }; + A.Highlighter__writeSidebar_closure.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._highlighter$_buffer, + t3 = this._box_0.text; + if (t3 == null) + t3 = ""; + t1 = B.JSString_methods.padRight$1(t3, t1._paddingBeforeSidebar); + t2._contents += t1; + t1 = this.end; + if (t1 == null) + t1 = $._glyphs.get$verticalLine(); + t2._contents += t1; + }, + $signature: 1 + }; + A._Highlight.prototype = { + toString$0(_) { + var t1 = this.isPrimary ? "primary " : "", + t2 = this.span; + t2 = t1 + ("" + t2.get$start(t2).get$line() + ":" + t2.get$start(t2).get$column() + "-" + t2.get$end(t2).get$line() + ":" + t2.get$end(t2).get$column()); + t1 = this.label; + t1 = t1 != null ? t2 + (" (" + t1 + ")") : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._Highlight_closure.prototype = { + call$0() { + var t1, t2, t3, t4, + newSpan = this.span; + if (!(type$.SourceSpanWithContext._is(newSpan) && A.findLineStart(newSpan.get$context(newSpan), newSpan.get$text(), newSpan.get$start(newSpan).get$column()) != null)) { + t1 = A.SourceLocation$(newSpan.get$start(newSpan).get$offset(), 0, 0, newSpan.get$sourceUrl(newSpan)); + t2 = newSpan.get$end(newSpan).get$offset(); + t3 = newSpan.get$sourceUrl(newSpan); + t4 = A.countCodeUnits(newSpan.get$text(), 10); + newSpan = A.SourceSpanWithContext$(t1, A.SourceLocation$(t2, A._Highlight__lastLineLength(newSpan.get$text()), t4, t3), newSpan.get$text(), newSpan.get$text()); + } + return A._Highlight__normalizeEndOfLine(A._Highlight__normalizeTrailingNewline(A._Highlight__normalizeNewlines(newSpan))); + }, + $signature: 294 + }; + A._Line.prototype = { + toString$0(_) { + return "" + this.number + ': "' + this.text + '" (' + B.JSArray_methods.join$1(this.highlights, ", ") + ")"; + } + }; + A.SourceLocation.prototype = { + distance$1(other) { + var t1 = this.sourceUrl; + if (!J.$eq$(t1, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t1) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return Math.abs(this.offset - other.get$offset()); + }, + compareTo$1(_, other) { + var t1 = this.sourceUrl; + if (!J.$eq$(t1, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t1) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return this.offset - other.get$offset(); + }, + $eq(_, other) { + if (other == null) + return false; + return type$.SourceLocation._is(other) && J.$eq$(this.sourceUrl, other.get$sourceUrl(other)) && this.offset === other.get$offset(); + }, + get$hashCode(_) { + var t1 = this.sourceUrl; + t1 = t1 == null ? null : t1.get$hashCode(t1); + if (t1 == null) + t1 = 0; + return t1 + this.offset; + }, + toString$0(_) { + var _this = this, + t1 = A.getRuntimeTypeOfDartObject(_this).toString$0(0), + source = _this.sourceUrl; + return "<" + t1 + ": " + _this.offset + " " + (A.S(source == null ? "unknown source" : source) + ":" + (_this.line + 1) + ":" + (_this.column + 1)) + ">"; + }, + $isComparable: 1, + get$sourceUrl(receiver) { + return this.sourceUrl; + }, + get$offset() { + return this.offset; + }, + get$line() { + return this.line; + }, + get$column() { + return this.column; + } + }; + A.SourceLocationMixin.prototype = { + distance$1(other) { + if (!J.$eq$(this.file.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return Math.abs(this.offset - other.get$offset()); + }, + compareTo$1(_, other) { + if (!J.$eq$(this.file.url, other.get$sourceUrl(other))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(this.get$sourceUrl(0)) + '" and "' + A.S(other.get$sourceUrl(other)) + "\" don't match.", null)); + return this.offset - other.get$offset(); + }, + $eq(_, other) { + if (other == null) + return false; + return type$.SourceLocation._is(other) && J.$eq$(this.file.url, other.get$sourceUrl(other)) && this.offset === other.get$offset(); + }, + get$hashCode(_) { + var t1 = this.file.url; + t1 = t1 == null ? null : t1.get$hashCode(t1); + if (t1 == null) + t1 = 0; + return t1 + this.offset; + }, + toString$0(_) { + var t1 = A.getRuntimeTypeOfDartObject(this).toString$0(0), + t2 = this.offset, + t3 = this.file, + source = t3.url; + return "<" + t1 + ": " + t2 + " " + (A.S(source == null ? "unknown source" : source) + ":" + (t3.getLine$1(t2) + 1) + ":" + (t3.getColumn$1(t2) + 1)) + ">"; + }, + $isComparable: 1, + $isSourceLocation: 1 + }; + A.SourceSpanBase.prototype = { + SourceSpanBase$3(start, end, text) { + var t3, + t1 = this.end, + t2 = this.start; + if (!J.$eq$(t1.get$sourceUrl(t1), t2.get$sourceUrl(t2))) + throw A.wrapException(A.ArgumentError$('Source URLs "' + A.S(t2.get$sourceUrl(t2)) + '" and "' + A.S(t1.get$sourceUrl(t1)) + "\" don't match.", null)); + else if (t1.get$offset() < t2.get$offset()) + throw A.wrapException(A.ArgumentError$("End " + t1.toString$0(0) + " must come after start " + t2.toString$0(0) + ".", null)); + else { + t3 = this.text; + if (t3.length !== t2.distance$1(t1)) + throw A.wrapException(A.ArgumentError$('Text "' + t3 + '" must be ' + t2.distance$1(t1) + " characters long.", null)); + } + }, + get$start(receiver) { + return this.start; + }, + get$end(receiver) { + return this.end; + }, + get$text() { + return this.text; + } + }; + A.SourceSpanException.prototype = { + get$message(_) { + return this._span_exception$_message; + }, + get$span(_) { + return this._span; + }, + toString$1$color(_, color) { + var _this = this; + _this.get$span(_this); + return "Error on " + _this.get$span(_this).message$2$color(0, _this._span_exception$_message, color); + }, + toString$0(_) { + return this.toString$1$color(0, null); + }, + $isException: 1 + }; + A.SourceSpanFormatException.prototype = {$isFormatException: 1, + get$source() { + return this.source; + } + }; + A.MultiSourceSpanException.prototype = { + toString$0(_) { + var _this = this; + return "Error on " + A.SourceSpanExtension_messageMultiple(_this._span, _this._span_exception$_message, _this.primaryLabel, _this.secondarySpans, false, null, null); + }, + get$primaryLabel() { + return this.primaryLabel; + }, + get$secondarySpans() { + return this.secondarySpans; + } + }; + A.MultiSourceSpanFormatException.prototype = {$isFormatException: 1}; + A.SourceSpanMixin.prototype = { + get$sourceUrl(_) { + var t1 = this.get$start(this); + return t1.get$sourceUrl(t1); + }, + get$length(_) { + var _this = this; + return _this.get$end(_this).get$offset() - _this.get$start(_this).get$offset(); + }, + compareTo$1(_, other) { + var _this = this, + result = _this.get$start(_this).compareTo$1(0, other.get$start(other)); + return result === 0 ? _this.get$end(_this).compareTo$1(0, other.get$end(other)) : result; + }, + message$2$color(_, message, color) { + var t2, t3, highlight, _this = this, + t1 = "line " + (_this.get$start(_this).get$line() + 1) + ", column " + (_this.get$start(_this).get$column() + 1); + if (_this.get$sourceUrl(_this) != null) { + t2 = _this.get$sourceUrl(_this); + t3 = $.$get$context(); + t2.toString; + t2 = t1 + (" of " + t3.prettyUri$1(t2)); + t1 = t2; + } + t1 += ": " + message; + highlight = _this.highlight$1$color(color); + if (highlight.length !== 0) + t1 = t1 + "\n" + highlight; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + highlight$1$color(color) { + var _this = this; + if (!type$.SourceSpanWithContext._is(_this) && _this.get$length(_this) === 0) + return ""; + return A.Highlighter$(_this, color).highlight$0(); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return type$.SourceSpan._is(other) && _this.get$start(_this).$eq(0, other.get$start(other)) && _this.get$end(_this).$eq(0, other.get$end(other)); + }, + get$hashCode(_) { + var _this = this; + return A.Object_hash(_this.get$start(_this), _this.get$end(_this), B.C_SentinelValue, B.C_SentinelValue); + }, + toString$0(_) { + var _this = this; + return "<" + A.getRuntimeTypeOfDartObject(_this).toString$0(0) + ": from " + _this.get$start(_this).toString$0(0) + " to " + _this.get$end(_this).toString$0(0) + ' "' + _this.get$text() + '">'; + }, + $isComparable: 1, + $isSourceSpan: 1 + }; + A.SourceSpanWithContext.prototype = { + get$context(_) { + return this._context; + } + }; + A.Chain.prototype = { + toTrace$0() { + var t1 = this.traces; + return A.Trace$(new A.ExpandIterable(t1, new A.Chain_toTrace_closure(), A._arrayInstanceType(t1)._eval$1("ExpandIterable<1,Frame>")), null); + }, + toString$0(_) { + var t1 = this.traces, + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, new A.Chain_toString_closure(new A.MappedListIterable(t1, new A.Chain_toString_closure0(), t2._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT)), t2._eval$1("MappedListIterable<1,String>")).join$1(0, string$.x3d_____); + }, + $isStackTrace: 1 + }; + A.Chain_Chain$parse_closure.prototype = { + call$1(line) { + return line.length !== 0; + }, + $signature: 4 + }; + A.Chain_toTrace_closure.prototype = { + call$1(trace) { + return trace.get$frames(); + }, + $signature: 295 + }; + A.Chain_toString_closure0.prototype = { + call$1(trace) { + var t1 = trace.get$frames(); + return new A.MappedListIterable(t1, new A.Chain_toString__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT); + }, + $signature: 296 + }; + A.Chain_toString__closure0.prototype = { + call$1(frame) { + return frame.get$location().length; + }, + $signature: 196 + }; + A.Chain_toString_closure.prototype = { + call$1(trace) { + var t1 = trace.get$frames(); + return new A.MappedListIterable(t1, new A.Chain_toString__closure(this.longest), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $signature: 298 + }; + A.Chain_toString__closure.prototype = { + call$1(frame) { + return B.JSString_methods.padRight$1(frame.get$location(), this.longest) + " " + A.S(frame.get$member()) + "\n"; + }, + $signature: 197 + }; + A.Frame.prototype = { + get$isCore() { + return this.uri.get$scheme() === "dart"; + }, + get$library() { + var t1 = this.uri; + if (t1.get$scheme() === "data") + return "data:..."; + return $.$get$context().prettyUri$1(t1); + }, + get$$package() { + var t1 = this.uri; + if (t1.get$scheme() !== "package") + return null; + return B.JSArray_methods.get$first(t1.get$path(t1).split("/")); + }, + get$location() { + var t2, _this = this, + t1 = _this.line; + if (t1 == null) + return _this.get$library(); + t2 = _this.column; + if (t2 == null) + return _this.get$library() + " " + A.S(t1); + return _this.get$library() + " " + A.S(t1) + ":" + A.S(t2); + }, + toString$0(_) { + return this.get$location() + " in " + A.S(this.member); + }, + get$uri() { + return this.uri; + }, + get$line() { + return this.line; + }, + get$column() { + return this.column; + }, + get$member() { + return this.member; + } + }; + A.Frame_Frame$parseVM_closure.prototype = { + call$0() { + var match, t2, t3, member, uri, lineAndColumn, line, _null = null, + t1 = this.frame; + if (t1 === "...") + return new A.Frame(A._Uri__Uri(_null, _null, _null, _null), _null, _null, "..."); + match = $.$get$_vmFrame().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t1 = match._match; + t2 = t1[1]; + t2.toString; + t3 = $.$get$_asyncBody(); + t2 = A.stringReplaceAllUnchecked(t2, t3, ""); + member = A.stringReplaceAllUnchecked(t2, "", ""); + t2 = t1[2]; + t3 = t2; + t3.toString; + if (B.JSString_methods.startsWith$1(t3, " 1 ? A.int_parse(lineAndColumn[1], _null) : _null; + return new A.Frame(uri, line, t1 > 2 ? A.int_parse(lineAndColumn[2], _null) : _null, member); + }, + $signature: 76 + }; + A.Frame_Frame$parseV8_closure.prototype = { + call$0() { + var member, uri, t2, functionOffset, t3, _s4_ = "", + t1 = this.frame, + match = $.$get$_v8WasmFrame().firstMatch$1(t1); + if (match != null) { + member = match.namedGroup$1("member"); + t1 = match.namedGroup$1("uri"); + t1.toString; + uri = A.Frame__uriOrPathToUri(t1); + t1 = match.namedGroup$1("index"); + t1.toString; + t2 = match.namedGroup$1("offset"); + t2.toString; + functionOffset = A.int_parse(t2, 16); + if (!(member == null)) + t1 = member; + return new A.Frame(uri, 1, functionOffset + 1, t1); + } + match = $.$get$_v8JsFrame().firstMatch$1(t1); + if (match != null) { + t1 = new A.Frame_Frame$parseV8_closure_parseJsLocation(t1); + t2 = match._match; + t3 = t2[2]; + if (t3 != null) { + t3 = t3; + t3.toString; + t2 = t2[1]; + t2.toString; + t2 = A.stringReplaceAllUnchecked(t2, "", _s4_); + t2 = A.stringReplaceAllUnchecked(t2, "Anonymous function", _s4_); + return t1.call$2(t3, A.stringReplaceAllUnchecked(t2, "(anonymous function)", _s4_)); + } else { + t2 = t2[3]; + t2.toString; + return t1.call$2(t2, _s4_); + } + } + return new A.UnparsedFrame(A._Uri__Uri(null, "unparsed", null, null), t1); + }, + $signature: 76 + }; + A.Frame_Frame$parseV8_closure_parseJsLocation.prototype = { + call$2($location, member) { + var t2, urlMatch, uri, line, columnMatch, _null = null, + t1 = $.$get$_v8EvalLocation(), + evalMatch = t1.firstMatch$1($location); + for (; evalMatch != null; $location = t2) { + t2 = evalMatch._match[1]; + t2.toString; + evalMatch = t1.firstMatch$1(t2); + } + if ($location === "native") + return new A.Frame(A.Uri_parse("native"), _null, _null, member); + urlMatch = $.$get$_v8JsUrlLocation().firstMatch$1($location); + if (urlMatch == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), this.frame); + t1 = urlMatch._match; + t2 = t1[1]; + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); + t2 = t1[2]; + t2.toString; + line = A.int_parse(t2, _null); + columnMatch = t1[3]; + return new A.Frame(uri, line, columnMatch != null ? A.int_parse(columnMatch, _null) : _null, member); + }, + $signature: 301 + }; + A.Frame_Frame$_parseFirefoxEval_closure.prototype = { + call$0() { + var t2, member, uri, line, _null = null, + t1 = this.frame, + match = $.$get$_firefoxEvalLocation().firstMatch$1(t1); + if (match == null) + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + t1 = match._match; + t2 = t1[1]; + t2.toString; + member = A.stringReplaceAllUnchecked(t2, "/<", ""); + t2 = t1[2]; + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); + t1 = t1[3]; + t1.toString; + line = A.int_parse(t1, _null); + return new A.Frame(uri, line, _null, member.length === 0 || member === "anonymous" ? "" : member); + }, + $signature: 76 + }; + A.Frame_Frame$parseFirefox_closure.prototype = { + call$0() { + var t2, t3, t4, uri, member, line, column, functionOffset, _null = null, + t1 = this.frame, + match = $.$get$_firefoxSafariJSFrame().firstMatch$1(t1); + if (match != null) { + t2 = match._match; + t3 = t2[3]; + t4 = t3; + t4.toString; + if (B.JSString_methods.contains$1(t4, " line ")) + return A.Frame_Frame$_parseFirefoxEval(t1); + t1 = t3; + t1.toString; + uri = A.Frame__uriOrPathToUri(t1); + member = t2[1]; + if (member != null) { + t1 = t2[2]; + t1.toString; + member += B.JSArray_methods.join$0(A.List_List$filled(B.JSString_methods.allMatches$1("/", t1).get$length(0), ".", false, type$.String)); + if (member === "") + member = ""; + member = B.JSString_methods.replaceFirst$2(member, $.$get$_initialDot(), ""); + } else + member = ""; + t1 = t2[4]; + if (t1 === "") + line = _null; + else { + t1 = t1; + t1.toString; + line = A.int_parse(t1, _null); + } + t1 = t2[5]; + if (t1 == null || t1 === "") + column = _null; + else { + t1 = t1; + t1.toString; + column = A.int_parse(t1, _null); + } + return new A.Frame(uri, line, column, member); + } + match = $.$get$_firefoxWasmFrame().firstMatch$1(t1); + if (match != null) { + t1 = match.namedGroup$1("member"); + t1.toString; + t2 = match.namedGroup$1("uri"); + t2.toString; + uri = A.Frame__uriOrPathToUri(t2); + t2 = match.namedGroup$1("index"); + t2.toString; + t3 = match.namedGroup$1("offset"); + t3.toString; + functionOffset = A.int_parse(t3, 16); + if (!(t1.length !== 0)) + t1 = t2; + return new A.Frame(uri, 1, functionOffset + 1, t1); + } + match = $.$get$_safariWasmFrame().firstMatch$1(t1); + if (match != null) { + t1 = match.namedGroup$1("member"); + t1.toString; + return new A.Frame(A._Uri__Uri(_null, "wasm code", _null, _null), _null, _null, t1); + } + return new A.UnparsedFrame(A._Uri__Uri(_null, "unparsed", _null, _null), t1); + }, + $signature: 76 + }; + A.Frame_Frame$parseFriendly_closure.prototype = { + call$0() { + var t2, uri, line, column, _null = null, + t1 = this.frame, + match = $.$get$_friendlyFrame().firstMatch$1(t1); + if (match == null) + throw A.wrapException(A.FormatException$("Couldn't parse package:stack_trace stack trace line '" + t1 + "'.", _null, _null)); + t1 = match._match; + t2 = t1[1]; + if (t2 === "data:...") + uri = A.Uri_Uri$dataFromString("", _null, _null); + else { + t2 = t2; + t2.toString; + uri = A.Uri_parse(t2); + } + if (uri.get$scheme() === "") { + t2 = $.$get$context(); + uri = t2.toUri$1(A.absolute(t2.style.pathFromUri$1(A._parseUri(uri)), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); + } + t2 = t1[2]; + if (t2 == null) + line = _null; + else { + t2 = t2; + t2.toString; + line = A.int_parse(t2, _null); + } + t2 = t1[3]; + if (t2 == null) + column = _null; + else { + t2 = t2; + t2.toString; + column = A.int_parse(t2, _null); + } + return new A.Frame(uri, line, column, t1[4]); + }, + $signature: 76 + }; + A.LazyTrace.prototype = { + get$_lazy_trace$_trace() { + var result, _this = this, + value = _this.__LazyTrace__trace_FI; + if (value === $) { + result = _this._thunk.call$0(); + _this.__LazyTrace__trace_FI !== $ && A.throwUnnamedLateFieldADI(); + _this.__LazyTrace__trace_FI = result; + value = result; + } + return value; + }, + get$frames() { + return this.get$_lazy_trace$_trace().get$frames(); + }, + get$terse() { + return new A.LazyTrace(new A.LazyTrace_terse_closure(this)); + }, + toString$0(_) { + return this.get$_lazy_trace$_trace().toString$0(0); + }, + $isStackTrace: 1, + $isTrace: 1 + }; + A.LazyTrace_terse_closure.prototype = { + call$0() { + return this.$this.get$_lazy_trace$_trace().get$terse(); + }, + $signature: 199 + }; + A.Trace.prototype = { + get$terse() { + return this.foldFrames$2$terse(new A.Trace_terse_closure(), true); + }, + foldFrames$2$terse(predicate, terse) { + var newFrames, t1, t2, t3, _box_0 = {}; + _box_0.predicate = predicate; + _box_0.predicate = new A.Trace_foldFrames_closure(predicate); + newFrames = A._setArrayType([], type$.JSArray_Frame); + for (t1 = this.frames, t2 = A._arrayInstanceType(t1)._eval$1("ReversedListIterable<1>"), t1 = new A.ReversedListIterable(t1, t2), t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListIterable.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (t3 == null) + t3 = t2._as(t3); + if (t3 instanceof A.UnparsedFrame || !_box_0.predicate.call$1(t3)) + newFrames.push(t3); + else if (newFrames.length === 0 || !_box_0.predicate.call$1(B.JSArray_methods.get$last(newFrames))) + newFrames.push(new A.Frame(t3.get$uri(), t3.get$line(), t3.get$column(), t3.get$member())); + } + t1 = type$.MappedListIterable_Frame_Frame; + newFrames = A.List_List$_of(new A.MappedListIterable(newFrames, new A.Trace_foldFrames_closure0(_box_0), t1), t1._eval$1("ListIterable.E")); + if (newFrames.length > 1 && _box_0.predicate.call$1(B.JSArray_methods.get$first(newFrames))) + B.JSArray_methods.removeAt$1(newFrames, 0); + return A.Trace$(new A.ReversedListIterable(newFrames, A._arrayInstanceType(newFrames)._eval$1("ReversedListIterable<1>")), this.original._stackTrace); + }, + toString$0(_) { + var t1 = this.frames, + t2 = A._arrayInstanceType(t1); + return new A.MappedListIterable(t1, new A.Trace_toString_closure(new A.MappedListIterable(t1, new A.Trace_toString_closure0(), t2._eval$1("MappedListIterable<1,int>")).fold$2(0, 0, B.CONSTANT)), t2._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isStackTrace: 1, + get$frames() { + return this.frames; + } + }; + A.Trace_Trace$from_closure.prototype = { + call$0() { + return A.Trace_Trace$parse(this.trace.toString$0(0)); + }, + $signature: 199 + }; + A.Trace__parseVM_closure.prototype = { + call$1(line) { + return line.length !== 0; + }, + $signature: 4 + }; + A.Trace$parseV8_closure.prototype = { + call$1(line) { + return !B.JSString_methods.startsWith$1(line, $.$get$_v8TraceLine()); + }, + $signature: 4 + }; + A.Trace$parseJSCore_closure.prototype = { + call$1(line) { + return line !== "\tat "; + }, + $signature: 4 + }; + A.Trace$parseFirefox_closure.prototype = { + call$1(line) { + return line.length !== 0 && line !== "[native code]"; + }, + $signature: 4 + }; + A.Trace$parseFriendly_closure.prototype = { + call$1(line) { + return !B.JSString_methods.startsWith$1(line, "====="); + }, + $signature: 4 + }; + A.Trace_terse_closure.prototype = { + call$1(_) { + return false; + }, + $signature: 200 + }; + A.Trace_foldFrames_closure.prototype = { + call$1(frame) { + var t1; + if (this.oldPredicate.call$1(frame)) + return true; + if (frame.get$isCore()) + return true; + if (frame.get$$package() === "stack_trace") + return true; + t1 = frame.get$member(); + t1.toString; + if (!B.JSString_methods.contains$1(t1, "")) + return false; + return frame.get$line() == null; + }, + $signature: 200 + }; + A.Trace_foldFrames_closure0.prototype = { + call$1(frame) { + var t1, t2; + if (frame instanceof A.UnparsedFrame || !this._box_0.predicate.call$1(frame)) + return frame; + t1 = frame.get$library(); + t2 = $.$get$_terseRegExp(); + return new A.Frame(A.Uri_parse(A.stringReplaceAllUnchecked(t1, t2, "")), null, null, frame.get$member()); + }, + $signature: 304 + }; + A.Trace_toString_closure0.prototype = { + call$1(frame) { + return frame.get$location().length; + }, + $signature: 196 + }; + A.Trace_toString_closure.prototype = { + call$1(frame) { + if (frame instanceof A.UnparsedFrame) + return frame.toString$0(0) + "\n"; + return B.JSString_methods.padRight$1(frame.get$location(), this.longest) + " " + A.S(frame.get$member()) + "\n"; + }, + $signature: 197 + }; + A.UnparsedFrame.prototype = { + toString$0(_) { + return this.member; + }, + $isFrame: 1, + get$uri() { + return this.uri; + }, + get$line() { + return null; + }, + get$column() { + return null; + }, + get$isCore() { + return false; + }, + get$library() { + return "unparsed"; + }, + get$$package() { + return null; + }, + get$location() { + return "unparsed"; + }, + get$member() { + return this.member; + } + }; + A.TransformByHandlers_transformByHandlers_closure.prototype = { + call$0() { + var t2, subscription, t3, t4, _this = this, t1 = {}; + t1.valuesDone = false; + t2 = _this.controller; + subscription = _this._this.listen$3$onDone$onError(0, new A.TransformByHandlers_transformByHandlers__closure(_this.onData, t2, _this.S), new A.TransformByHandlers_transformByHandlers__closure0(t1, _this.handleDone, t2), new A.TransformByHandlers_transformByHandlers__closure1(_this.handleError, t2)); + t3 = _this._box_1; + t3.subscription = subscription; + t2.set$onPause(subscription.get$pause(subscription)); + t4 = t3.subscription; + t2.set$onResume(t4.get$resume(t4)); + t2.set$onCancel(new A.TransformByHandlers_transformByHandlers__closure2(t3, t1)); + }, + $signature: 0 + }; + A.TransformByHandlers_transformByHandlers__closure.prototype = { + call$1(value) { + return this.onData.call$2(value, this.controller); + }, + $signature() { + return this.S._eval$1("~(0)"); + } + }; + A.TransformByHandlers_transformByHandlers__closure1.prototype = { + call$2(error, stackTrace) { + this.handleError.call$3(error, stackTrace, this.controller); + }, + $signature: 51 + }; + A.TransformByHandlers_transformByHandlers__closure0.prototype = { + call$0() { + this._box_0.valuesDone = true; + this.handleDone.call$1(this.controller); + }, + $signature: 0 + }; + A.TransformByHandlers_transformByHandlers__closure2.prototype = { + call$0() { + var t1 = this._box_1, + toCancel = t1.subscription; + t1.subscription = null; + if (!this._box_0.valuesDone) + return toCancel.cancel$0(); + return null; + }, + $signature: 226 + }; + A.RateLimit__debounceAggregate_closure.prototype = { + call$2(value, sink) { + var _this = this, + t1 = _this._box_0, + t2 = new A.RateLimit__debounceAggregate_closure_emit(t1, sink, _this.S), + t3 = t1.timer; + if (t3 != null) + t3.cancel$0(); + t1.soFar = _this.collect.call$2(value, t1.soFar); + t1.hasPending = true; + if (t1.timer == null && _this.leading) { + t1.emittedLatestAsLeading = true; + t2.call$0(); + } else + t1.emittedLatestAsLeading = false; + t1.timer = A.Timer_Timer(_this.duration, new A.RateLimit__debounceAggregate__closure(t1, _this.trailing, t2, sink)); + }, + $signature() { + return this.T._eval$1("@<0>")._bind$1(this.S)._eval$1("~(1,EventSink<2>)"); + } + }; + A.RateLimit__debounceAggregate_closure_emit.prototype = { + call$0() { + var t1 = this._box_0, + t2 = t1.soFar; + if (t2 == null) + t2 = this.S._as(t2); + this.sink.add$1(0, t2); + t1.soFar = null; + t1.hasPending = false; + }, + $signature: 0 + }; + A.RateLimit__debounceAggregate__closure.prototype = { + call$0() { + var t1 = this._box_0, + t2 = t1.emittedLatestAsLeading; + if (!t2) + this.emit.call$0(); + if (t1.shouldClose) + this.sink.close$0(0); + t1.timer = null; + }, + $signature: 0 + }; + A.RateLimit__debounceAggregate_closure0.prototype = { + call$1(sink) { + var t1 = this._box_0; + if (t1.hasPending && this.trailing) + t1.shouldClose = true; + else { + t1 = t1.timer; + if (t1 != null) + t1.cancel$0(); + sink.close$0(0); + } + }, + $signature() { + return this.S._eval$1("~(EventSink<0>)"); + } + }; + A.StringScannerException.prototype = { + get$source() { + return A._asString(this.source); + } + }; + A.LineScanner.prototype = { + scanChar$1(character) { + if (!this.super$StringScanner$scanChar(character)) + return false; + this._adjustLineAndColumn$1(character); + return true; + }, + readChar$0() { + var character = this.super$StringScanner$readChar(); + this._adjustLineAndColumn$1(character); + return character; + }, + _adjustLineAndColumn$1(character) { + var t1, _this = this; + if (character !== 10) + t1 = character === 13 && _this.peekChar$0() !== 10; + else + t1 = true; + if (t1) { + ++_this._line_scanner$_line; + _this._line_scanner$_column = 0; + } else { + t1 = _this._line_scanner$_column; + _this._line_scanner$_column = t1 + (character >= 65536 && character <= 1114111 ? 2 : 1); + } + }, + scan$1(pattern) { + var t1, newlines, t2, _this = this; + if (!_this.super$StringScanner$scan(pattern)) + return false; + t1 = _this.get$lastMatch(); + newlines = _this._newlinesIn$2$endPosition(t1.pattern, _this._string_scanner$_position); + t1 = _this._line_scanner$_line; + t2 = newlines.length; + _this._line_scanner$_line = t1 + t2; + if (t2 === 0) { + t1 = _this._line_scanner$_column; + t2 = _this.get$lastMatch(); + _this._line_scanner$_column = t1 + t2.pattern.length; + } else { + t1 = _this.get$lastMatch(); + t1 = t1.pattern; + t2 = B.JSArray_methods.get$last(newlines); + _this._line_scanner$_column = t1.length - t2.get$end(t2); + } + return true; + }, + _newlinesIn$2$endPosition(text, endPosition) { + var t1 = $.$get$_newlineRegExp().allMatches$1(0, text), + newlines = A.List_List$_of(t1, A._instanceType(t1)._eval$1("Iterable.E")); + t1 = this.string; + if (endPosition < t1.length && B.JSString_methods.endsWith$1(text, "\r") && t1[endPosition] === "\n") + newlines.pop(); + return newlines; + } + }; + A.SpanScanner.prototype = { + set$state(state) { + if (state._scanner !== this) + throw A.wrapException(A.ArgumentError$("The given LineScannerState was not returned by this LineScanner.", null)); + this.set$position(state.position); + }, + spanFrom$2(startState, endState) { + var endPosition = endState == null ? this._string_scanner$_position : endState.position; + return this._sourceFile.span$2(0, startState.position, endPosition); + }, + spanFrom$1(startState) { + return this.spanFrom$2(startState, null); + }, + spanFromPosition$2(startPosition, endPosition) { + var t1 = endPosition == null ? this._string_scanner$_position : endPosition; + return this._sourceFile.span$2(0, startPosition, t1); + }, + matches$1(pattern) { + var t1, t2, _this = this; + if (!_this.super$StringScanner$matches(pattern)) + return false; + t1 = _this._string_scanner$_position; + t2 = _this.get$lastMatch(); + _this._sourceFile.span$2(0, t1, t2.start + t2.pattern.length); + return true; + }, + error$3$length$position(_, message, $length, position) { + var match, t2, _this = this, + t1 = _this.string; + A.validateErrorArgs(t1, null, position, $length); + match = position == null && $length == null ? _this.get$lastMatch() : null; + if (position == null) + position = match == null ? _this._string_scanner$_position : match.start; + if ($length == null) + if (match == null) + $length = 0; + else { + t2 = match.start; + $length = t2 + match.pattern.length - t2; + } + throw A.wrapException(A.StringScannerException$(message, _this._sourceFile.span$2(0, position, position + $length), t1)); + }, + error$1(_, message) { + return this.error$3$length$position(0, message, null, null); + }, + error$2$position(_, message, position) { + return this.error$3$length$position(0, message, null, position); + }, + error$2$length(_, message, $length) { + return this.error$3$length$position(0, message, $length, null); + } + }; + A._SpanScannerState.prototype = {}; + A.StringScanner.prototype = { + set$position(position) { + if (B.JSInt_methods.get$isNegative(position) || position > this.string.length) + throw A.wrapException(A.ArgumentError$("Invalid position " + position, null)); + this._string_scanner$_position = position; + this._lastMatch = null; + }, + get$lastMatch() { + var _this = this; + if (_this._string_scanner$_position !== _this._lastMatchPosition) + _this._lastMatch = null; + return _this._lastMatch; + }, + readChar$0() { + var _this = this, + t1 = _this.string; + if (_this._string_scanner$_position === t1.length) + _this._fail$1("more input"); + return t1.charCodeAt(_this._string_scanner$_position++); + }, + peekChar$1(offset) { + var index; + if (offset == null) + offset = 0; + index = this._string_scanner$_position + offset; + if (index < 0 || index >= this.string.length) + return null; + return this.string.charCodeAt(index); + }, + peekChar$0() { + return this.peekChar$1(null); + }, + scanChar$1(character) { + var t1, t2, t3, t4, _this = this; + if (character >= 65536 && character <= 1114111) { + t1 = _this._string_scanner$_position; + t2 = t1 + 1; + t3 = _this.string; + if (t2 < t3.length) { + t4 = character - 65536; + t2 = t3.charCodeAt(t1) !== B.JSInt_methods._shrOtherPositive$1(t4, 10) + 55296 || t3.charCodeAt(t2) !== (t4 & 1023) + 56320; + } else + t2 = true; + if (t2) + return false; + else { + _this._string_scanner$_position = t1 + 2; + return true; + } + } else { + t1 = _this._string_scanner$_position; + t2 = _this.string; + if (t1 === t2.length) + return false; + if (t2.charCodeAt(t1) !== character) + return false; + _this._string_scanner$_position = t1 + 1; + return true; + } + }, + expectChar$2$name(character, $name) { + if (this.scanChar$1(character)) + return; + if ($name == null) + if (character === 92) + $name = '"\\"'; + else + $name = character === 34 ? '"\\""' : '"' + A.Primitives_stringFromCharCode(character) + '"'; + this._fail$1($name); + }, + expectChar$1(character) { + return this.expectChar$2$name(character, null); + }, + scan$1(pattern) { + var t1, _this = this, + success = _this.matches$1(pattern); + if (success) { + t1 = _this._lastMatch; + _this._lastMatchPosition = _this._string_scanner$_position = t1.start + t1.pattern.length; + } + return success; + }, + expect$1(pattern) { + var t1, $name; + if (this.scan$1(pattern)) + return; + t1 = A.stringReplaceAllUnchecked(pattern, "\\", "\\\\"); + $name = '"' + A.stringReplaceAllUnchecked(t1, '"', '\\"') + '"'; + this._fail$1($name); + }, + expectDone$0() { + if (this._string_scanner$_position === this.string.length) + return; + this._fail$1("no more input"); + }, + matches$1(pattern) { + var _this = this, + t1 = B.JSString_methods.matchAsPrefix$2(pattern, _this.string, _this._string_scanner$_position); + _this._lastMatch = t1; + _this._lastMatchPosition = _this._string_scanner$_position; + return t1 != null; + }, + substring$1(_, start) { + var end = this._string_scanner$_position; + return B.JSString_methods.substring$2(this.string, start, end); + }, + error$3$length$position(_, message, $length, position) { + var match, t2, _this = this, + t1 = _this.string; + A.validateErrorArgs(t1, null, position, $length); + match = position == null && $length == null ? _this.get$lastMatch() : null; + if (position == null) + position = match == null ? _this._string_scanner$_position : match.start; + if ($length == null) + if (match == null) + $length = 0; + else { + t2 = match.start; + $length = t2 + match.pattern.length - t2; + } + throw A.wrapException(A.StringScannerException$(message, A.SourceFile$fromString(t1, _this.sourceUrl).span$2(0, position, position + $length), t1)); + }, + error$1(_, message) { + return this.error$3$length$position(0, message, null, null); + }, + _fail$1($name) { + this.error$3$length$position(0, "expected " + $name + ".", 0, this._string_scanner$_position); + } + }; + A.AsciiGlyphSet.prototype = { + glyphOrAscii$2(glyph, alternative) { + return alternative; + }, + get$horizontalLine() { + return "-"; + }, + get$verticalLine() { + return "|"; + }, + get$topLeftCorner() { + return ","; + }, + get$bottomLeftCorner() { + return "'"; + }, + get$cross() { + return "+"; + }, + get$upEnd() { + return "'"; + }, + get$downEnd() { + return ","; + }, + get$horizontalLineBold() { + return "="; + } + }; + A.UnicodeGlyphSet.prototype = { + glyphOrAscii$2(glyph, alternative) { + return glyph; + }, + get$horizontalLine() { + return "\u2500"; + }, + get$verticalLine() { + return "\u2502"; + }, + get$topLeftCorner() { + return "\u250c"; + }, + get$bottomLeftCorner() { + return "\u2514"; + }, + get$cross() { + return "\u253c"; + }, + get$upEnd() { + return "\u2575"; + }, + get$downEnd() { + return "\u2577"; + }, + get$horizontalLineBold() { + return "\u2501"; + } + }; + A.WatchEvent.prototype = { + toString$0(_) { + return this.type.toString$0(0) + " " + this.path; + } + }; + A.ChangeType.prototype = { + toString$0(_) { + return this._watch_event$_name; + } + }; + A.A98RgbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 2.19921875); + }, + fromLinear$1(channel) { + return J.get$sign$in(channel) * Math.pow(Math.abs(channel), 0.4547069271758437); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj0 === dest || B.SrgbColorSpace_thf0 === dest || B.RgbColorSpace_i0P0 === dest) { + t1 = $.$get$linearA98RgbToLinearSrgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT0 === dest || B.DisplayP3LinearColorSpace_PrP0 === dest) { + t1 = $.$get$linearA98RgbToLinearDisplayP30(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$linearA98RgbToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$linearA98RgbToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$linearA98RgbToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$linearA98RgbToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$linearA98RgbToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.AnySelectorVisitor0.prototype = { + visitComplexSelector$1(complex) { + return B.JSArray_methods.any$1(complex.components, new A.AnySelectorVisitor_visitComplexSelector_closure0(this)); + }, + visitCompoundSelector$1(compound) { + return B.JSArray_methods.any$1(compound.components, new A.AnySelectorVisitor_visitCompoundSelector_closure0(this)); + }, + visitPseudoSelector$1(_, pseudo) { + var selector = pseudo.selector; + return selector == null ? false : this.visitSelectorList$1(selector); + }, + visitSelectorList$1(list) { + return B.JSArray_methods.any$1(list.components, this.get$visitComplexSelector()); + }, + visitAttributeSelector$1(_, attribute) { + return false; + }, + visitClassSelector$1(_, klass) { + return false; + }, + visitIDSelector$1(_, id) { + return false; + }, + visitParentSelector$1(_, $parent) { + return false; + }, + visitPlaceholderSelector$1(_, placeholder) { + return false; + }, + visitTypeSelector$1(_, type) { + return false; + }, + visitUniversalSelector$1(_, universal) { + return false; + } + }; + A.AnySelectorVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 55 + }; + A.AnySelectorVisitor_visitCompoundSelector_closure0.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature: 15 + }; + A.SupportsAnything0.prototype = { + toInterpolation$0() { + var t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + t3 = this.span, + t4 = this.contents, + t5 = t4.span, + t6 = A.SpanExtensions_before(t3, t5); + t6 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t6.file._decodedChars, t6._file$_start, t6._end), 0, null); + t1._contents += t6; + t2.addInterpolation$1(t4); + t5 = A.SpanExtensions_after(t3, t5); + t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); + t1._contents += t5; + return t2.interpolation$1(t3); + }, + withSpan$1(span) { + return new A.SupportsAnything0(this.contents, span); + }, + toString$0(_) { + return "(" + this.contents.toString$0(0) + ")"; + }, + $isAstNode0: 1, + $isSassNode: 1, + $isSupportsCondition: 1, + get$span(receiver) { + return this.span; + } + }; + A.ArgumentList0.prototype = { + get$isEmpty(_) { + var t1; + if (this.positional.length === 0) { + t1 = this.named; + t1 = t1.get$isEmpty(t1) && this.rest == null; + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t2, t3, _i, _1_0, _2_0, _this = this, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = _this.positional, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push(_this._argument_list0$_parenthesizeArgument$1(t2[_i])); + for (t2 = A.MapExtensions_get_pairs0(_this.named, type$.String, type$.Expression_2), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push("$" + t3._0 + ": " + _this._argument_list0$_parenthesizeArgument$1(t3._1)); + } + _1_0 = _this.rest; + if (_1_0 != null) + t1.push(_this._argument_list0$_parenthesizeArgument$1(_1_0) + "..."); + _2_0 = _this.keywordRest; + if (_2_0 != null) + t1.push(_this._argument_list0$_parenthesizeArgument$1(_2_0) + "..."); + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + _argument_list0$_parenthesizeArgument$1(argument) { + var t1; + $label0$0: { + if (argument instanceof A.ListExpression0 && B.ListSeparator_z0K0 === argument.separator && !argument.hasBrackets && argument.contents.length >= 2) { + t1 = "(" + argument.toString$0(0) + ")"; + break $label0$0; + } + t1 = argument.toString$0(0); + break $label0$0; + } + return t1; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.argumentListClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassArgumentList", new A.argumentListClass__closure())); + A.defineGetter(J.get$$prototype$x(jsClass), "keywords", new A.argumentListClass__closure0(), null); + A.JSClassExtension_injectSuperclass(t1._as(A.SassArgumentList$0(A._setArrayType([], type$.JSArray_Value_2), A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.Value_2), B.ListSeparator_undecided_null_3_undecided0).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.argumentListClass__closure.prototype = { + call$4($self, contents, keywords, separator) { + var t3, + t1 = self.immutable.isOrderedMap(contents) ? J.toArray$0$x(type$.ImmutableList._as(contents)) : type$.List_dynamic._as(contents), + t2 = type$.Value_2; + t1 = J.cast$1$0$ax(t1, t2); + t3 = self.immutable.isOrderedMap(keywords) ? A.immutableMapToDartMap(type$.ImmutableMap._as(keywords)) : A.objectToMap(keywords); + return A.SassArgumentList$0(t1, t3.cast$2$0(0, type$.String, t2), A.jsToDartSeparator(separator)); + }, + call$3($self, contents, keywords) { + return this.call$4($self, contents, keywords, ","); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [","]; + }, + $signature: 309 + }; + A.argumentListClass__closure0.prototype = { + call$1($self) { + $self._argument_list$_wereKeywordsAccessed = true; + return A.dartMapToImmutableMap($self._argument_list$_keywords); + }, + $signature: 310 + }; + A.SassArgumentList0.prototype = {}; + A.JSArray1.prototype = {}; + A.AsyncImporter0.prototype = { + isNonCanonicalScheme$1(scheme) { + return false; + } + }; + A.JSToDartAsyncImporter.prototype = { + canonicalize$1(_, url) { + return this.canonicalize$body$JSToDartAsyncImporter(0, url); + }, + canonicalize$body$JSToDartAsyncImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), + $async$returnValue, $async$self = this, t1, result; + var $async$canonicalize$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + result = A.wrapJSExceptions(new A.JSToDartAsyncImporter_canonicalize_closure($async$self, url)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture0(type$.Promise._as(result), type$.nullable_Object), $async$canonicalize$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t1 = self.URL; + if (result instanceof t1) { + $async$returnValue = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + // goto return + $async$goto = 1; + break; + } + A.jsThrow(new self.Error(string$.The_ca)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$1, $async$completer); + }, + load$1(_, url) { + return this.load$body$JSToDartAsyncImporter(0, url); + }, + load$body$JSToDartAsyncImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_ImporterResult_2), + $async$returnValue, $async$self = this, t1, contents, syntax, t2, result; + var $async$load$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + result = A.wrapJSExceptions(new A.JSToDartAsyncImporter_load_closure($async$self, url)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture0(type$.Promise._as(result), type$.nullable_Object), $async$load$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + type$.JSImporterResult._as(result); + t1 = J.getInterceptor$x(result); + contents = t1.get$contents(result); + if (A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") + A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); + syntax = t1.get$syntax(result); + if (contents == null || syntax == null) + A.jsThrow(new self.Error(string$.The_lo)); + t2 = A.parseSyntax(syntax); + $async$returnValue = A.ImporterResult$(contents, A.NullableExtension_andThen0(t1.get$sourceMapUrl(result), A.utils3__jsToDartUrl$closure()), t2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$load$1, $async$completer); + }, + isNonCanonicalScheme$1(scheme) { + return this._nonCanonicalSchemes.contains$1(0, scheme); + } + }; + A.JSToDartAsyncImporter_canonicalize_closure.prototype = { + call$0() { + return this.$this._async0$_canonicalize.call$2(this.url.toString$0(0), A.canonicalizeContext0()); + }, + $signature: 36 + }; + A.JSToDartAsyncImporter_load_closure.prototype = { + call$0() { + return this.$this._load.call$1(new self.URL(this.url.toString$0(0))); + }, + $signature: 36 + }; + A.AsyncBuiltInCallable0.prototype = { + callbackFor$2(positional, names) { + return new A._Record_2(this._async_built_in0$_parameters, this._async_built_in0$_callback); + }, + withDeprecationWarning$1(module) { + return new A.AsyncBuiltInCallable0(this.name, this._async_built_in0$_parameters, new A.AsyncBuiltInCallable_withDeprecationWarning_closure0(this, module, null), false); + }, + $isAsyncCallable0: 1, + get$name(receiver) { + return this.name; + }, + get$acceptsContent() { + return this.acceptsContent; + } + }; + A.AsyncBuiltInCallable$mixin_closure0.prototype = { + call$1($arguments) { + return this.$call$body$AsyncBuiltInCallable$mixin_closure0($arguments); + }, + $call$body$AsyncBuiltInCallable$mixin_closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callback.call$1($arguments); + $async$goto = 3; + return A._asyncAwait(t1 instanceof A._Future ? t1 : A._Future$value(t1, type$.void), $async$call$1); + case 3: + // returning from await. + $async$returnValue = B.C__SassNull0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 92 + }; + A.AsyncBuiltInCallable_withDeprecationWarning_closure0.prototype = { + call$1(args) { + var t1 = this.$this; + A.warnForDeprecation0(string$.Global + this.module + "." + t1.name + string$.x20inste, B.Deprecation_SGB); + return t1._async_built_in0$_callback.call$1(args); + }, + $signature: 313 + }; + A._compileStylesheet_closure2.prototype = { + call$1(url) { + var t1; + if (url === "") { + t1 = this.stylesheet.span; + t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); + } else + t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + return t1; + }, + $signature: 6 + }; + A.AsyncEnvironment0.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._async_environment0$_forwardedModules, + t2 = _this._async_environment0$_nestedForwardedModules, + t3 = _this._async_environment0$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._async_environment0$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._async_environment0$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._async_environment0$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.AsyncEnvironment$_0(_this._async_environment0$_modules, _this._async_environment0$_namespaceNodes, _this._async_environment0$_globalModules, _this._async_environment0$_importedModules, t1, t2, _this._async_environment0$_allModules, t3, t4, t5, t6, _this._async_environment0$_content, B.Set_empty1); + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._async_environment0$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._async_environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); + view = A.ForwardedModuleView_ifNecessary0(module, rule, type$.AsyncCallable_2); + for (t1 = new A.LinkedHashMapKeyIterator(forwardedModules, forwardedModules._modifications, forwardedModules._first); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._async_environment0$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._async_environment0$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._async_environment0$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._async_environment0$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _async_environment0$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, t3, t4, $name, small, large, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = type$.String, t2 = A.MapExtensions_get_pairs0(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { + t4 = t2.get$current(t2); + $name = t4._0; + small = t4._1; + large = larger.$index(0, $name); + if (large == null) + continue; + if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) + continue; + if (t3) + $name = "$" + $name; + t2 = this._async_environment0$_forwardedModules; + if (t2 == null) + span = null; + else { + t2 = t2.$index(0, oldModule); + span = t2 == null ? null : t2.get$span(t2); + } + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); + if (span != null) + t2.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$0("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, t13, _length, _list, _this = this, + forwarded = module._async_environment0$_environment._async_environment0$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._async_environment0$_forwardedModules; + if (forwardedModules != null) { + t1 = type$.Module_AsyncCallable_2; + t2 = type$.AstNode_2; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs0(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._async_environment0$_globalModules; t1.moveNext$0();) { + t4 = t1.get$current(t1); + module = t4._0; + node = t4._1; + if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) + t3.$indexSet(0, module, node); + } + forwarded = t3; + } else + forwardedModules = _this._async_environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.AstNode_2); + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t3 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t3.moveNext$0();) + for (t4 = t3.__js_helper$_current.get$variables(), t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4); t4.moveNext$0();) + t2.add$1(0, t4.get$current(t4)); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t4.moveNext$0();) { + t5 = t4.__js_helper$_current; + for (t5 = t5.get$functions(t5), t5 = t5.get$keys(t5), t5 = t5.get$iterator(t5); t5.moveNext$0();) + t3.add$1(0, t5.get$current(t5)); + } + t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t4.moveNext$0();) + for (t5 = t4.__js_helper$_current.get$mixins(), t5 = t5.get$keys(t5), t5 = t5.get$iterator(t5); t5.moveNext$0();) + t1.add$1(0, t5.get$current(t5)); + t4 = _this._async_environment0$_variables; + t5 = t4.length; + if (t5 === 1) { + for (t5 = _this._async_environment0$_importedModules, t6 = type$.Module_AsyncCallable_2, t7 = type$.AstNode_2, t8 = A.MapExtensions_get_pairs0(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.AsyncCallable_2, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { + t11 = t8[_i]; + module = t11._0; + shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); + if (shadowed != null) { + t5.remove$1(0, module); + t12 = shadowed.variables; + t13 = false; + if (t12.get$isEmpty(t12)) { + t12 = shadowed.functions; + if (t12.get$isEmpty(t12)) { + t12 = shadowed.mixins; + if (t12.get$isEmpty(t12)) { + t12 = shadowed._shadowed_view0$_inner; + t12 = t12.get$css(t12); + t12 = J.get$isEmpty$asx(t12.get$children(t12)); + } else + t12 = t13; + } else + t12 = t13; + } else + t12 = t13; + if (!t12) + t5.$indexSet(0, shadowed, t11._1); + } + } + for (t6 = A.MapExtensions_get_pairs0(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { + t8 = t6[_i]; + module = t8._0; + shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t9 = shadowed.variables; + t11 = false; + if (t9.get$isEmpty(t9)) { + t9 = shadowed.functions; + if (t9.get$isEmpty(t9)) { + t9 = shadowed.mixins; + if (t9.get$isEmpty(t9)) { + t9 = shadowed._shadowed_view0$_inner; + t9 = t9.get$css(t9); + t9 = J.get$isEmpty$asx(t9.get$children(t9)); + } else + t9 = t11; + } else + t9 = t11; + } else + t9 = t11; + if (!t9) + forwardedModules.$indexSet(0, shadowed, t8._1); + } + } + t5.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t6 = _this._async_environment0$_nestedForwardedModules; + if (t6 == null) { + _length = t5 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_AsyncCallable_2); + for (t5 = type$.JSArray_Module_AsyncCallable_2, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t5); + _this._async_environment0$_nestedForwardedModules = _list; + t5 = _list; + } else + t5 = t6; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeysIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeysIterable<1>"))); + } + for (t2 = A._LinkedHashSetIterator$(t2, t2._collection$_modifications, t2.$ti._precomputed1), t5 = _this._async_environment0$_variableIndices, t6 = _this._async_environment0$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { + t8 = t2._collection$_current; + if (t8 == null) + t8 = t7._as(t8); + t5.remove$1(0, t8); + B.JSArray_methods.get$last(t4).remove$1(0, t8); + B.JSArray_methods.get$last(t6).remove$1(0, t8); + } + for (t2 = A._LinkedHashSetIterator$(t3, t3._collection$_modifications, t3.$ti._precomputed1), t3 = _this._async_environment0$_functionIndices, t4 = _this._async_environment0$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { + t6 = t2._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + B.JSArray_methods.get$last(t4).remove$1(0, t6); + } + for (t1 = A._LinkedHashSetIterator$(t1, t1._collection$_modifications, t1.$ti._precomputed1), t2 = _this._async_environment0$_mixinIndices, t3 = _this._async_environment0$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + B.JSArray_methods.get$last(t3).remove$1(0, t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + t1 = _this._async_environment0$_variables[t1].$index(0, $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment0$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = _0_0; + t1 = _this._async_environment0$_variables[_0_0].$index(0, $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment0$_variableIndex$1($name); + if (_1_0 != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = _this._async_environment0$_variables[_1_0].$index(0, $name); + return t1 == null ? _this._async_environment0$_getVariableFromGlobalModule$1($name) : t1; + } else + return _this._async_environment0$_getVariableFromGlobalModule$1($name); + } + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _async_environment0$_getVariableFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$3($name, "variable", new A.AsyncEnvironment__getVariableFromGlobalModule_closure0($name)); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + t1 = _this._async_environment0$_variableNodes[t1].$index(0, $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._async_environment0$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = _0_0; + t1 = _this._async_environment0$_variableNodes[_0_0].$index(0, $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment0$_variableIndex$1($name); + if (_1_0 != null) { + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = _this._async_environment0$_variableNodes[_1_0].$index(0, $name); + return t1 == null ? _this._async_environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } else + return _this._async_environment0$_getVariableNodeFromGlobalModule$1($name); + } + }, + _async_environment0$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, _0_0; + for (t1 = this._async_environment0$_importedModules, t2 = this._async_environment0$_globalModules, t2 = new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeysIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeysIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (_0_0 != null) + return _0_0; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._async_environment0$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._async_environment0$_variables).containsKey$1($name)) + return true; + return this._async_environment0$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _async_environment0$_variableIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._async_environment0$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._async_environment0$_variables.length === 1) { + _this._async_environment0$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure2(_this, $name)); + t1 = _this._async_environment0$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._async_environment0$_fromOneModule$3($name, "variable", new A.AsyncEnvironment_setVariable_closure3($name)); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + B.JSArray_methods.get$first(t1).$indexSet(0, $name, value); + B.JSArray_methods.get$first(_this._async_environment0$_variableNodes).$indexSet(0, $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._async_environment0$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._async_environment0$_variableIndices.containsKey$1($name) && _this._async_environment0$_variableIndex$1($name) == null) + for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._async_environment0$_lastVariableName === $name) { + t1 = _this._async_environment0$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._async_environment0$_variableIndices.putIfAbsent$2($name, new A.AsyncEnvironment_setVariable_closure4(_this, $name)); + if (!_this._async_environment0$_inSemiGlobalScope && index === 0) { + index = _this._async_environment0$_variables.length - 1; + _this._async_environment0$_variableIndices.$indexSet(0, $name, index); + } + _this._async_environment0$_lastVariableName = $name; + _this._async_environment0$_lastVariableIndex = index; + _this._async_environment0$_variables[index].$indexSet(0, $name, value); + _this._async_environment0$_variableNodes[index].$indexSet(0, $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._async_environment0$_variables, + t2 = t1.length; + _this._async_environment0$_lastVariableName = $name; + index = _this._async_environment0$_lastVariableIndex = t2 - 1; + _this._async_environment0$_variableIndices.$indexSet(0, $name, index); + t1[index].$indexSet(0, $name, value); + _this._async_environment0$_variableNodes[index].$indexSet(0, $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) { + t1 = _this._async_environment0$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._async_environment0$_functionIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = _this._async_environment0$_functions[_0_0].$index(0, $name); + return t1 == null ? _this._async_environment0$_getFunctionFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment0$_functionIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = _this._async_environment0$_functions[_1_0].$index(0, $name); + return t1 == null ? _this._async_environment0$_getFunctionFromGlobalModule$1($name) : t1; + } else + return _this._async_environment0$_getFunctionFromGlobalModule$1($name); + } + }, + getFunction$1($name) { + return this.getFunction$2$namespace($name, null); + }, + _async_environment0$_getFunctionFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$3($name, "function", new A.AsyncEnvironment__getFunctionFromGlobalModule_closure0($name)); + }, + _async_environment0$_functionIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._async_environment0$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._async_environment0$_mixinIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = _this._async_environment0$_mixins[_0_0].$index(0, $name); + return t1 == null ? _this._async_environment0$_getMixinFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._async_environment0$_mixinIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = _this._async_environment0$_mixins[_1_0].$index(0, $name); + return t1 == null ? _this._async_environment0$_getMixinFromGlobalModule$1($name) : t1; + } else + return _this._async_environment0$_getMixinFromGlobalModule$1($name); + } + }, + _async_environment0$_getMixinFromGlobalModule$1($name) { + return this._async_environment0$_fromOneModule$3($name, "mixin", new A.AsyncEnvironment__getMixinFromGlobalModule_closure0($name)); + }, + _async_environment0$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._async_environment0$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + return this.withContent$body$AsyncEnvironment0($content, callback); + }, + withContent$body$AsyncEnvironment0($content, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldContent; + var $async$withContent$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldContent = $async$self._async_environment0$_content; + $async$self._async_environment0$_content = $content; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$withContent$2); + case 2: + // returning from await. + $async$self._async_environment0$_content = oldContent; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$withContent$2, $async$completer); + }, + asMixin$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, oldInMixin; + var $async$asMixin$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldInMixin = $async$self._async_environment0$_inMixin; + $async$self._async_environment0$_inMixin = true; + $async$goto = 2; + return A._asyncAwait(callback.call$0(), $async$asMixin$1); + case 2: + // returning from await. + $async$self._async_environment0$_inMixin = oldInMixin; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$asMixin$1, $async$completer); + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when, $T) { + return this.scope$body$AsyncEnvironment0(callback, semiGlobal, when, $T, $T); + }, + scope$1$1(callback, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, true, $T); + }, + scope$1$2$when(callback, when, $T) { + return this.scope$1$3$semiGlobal$when(callback, false, when, $T); + }, + scope$1$2$semiGlobal(callback, semiGlobal, $T) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true, $T); + }, + scope$body$AsyncEnvironment0(callback, semiGlobal, when, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6; + var $async$scope$1$3$semiGlobal$when = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + semiGlobal = semiGlobal && $async$self._async_environment0$_inSemiGlobalScope; + wasInSemiGlobalScope = $async$self._async_environment0$_inSemiGlobalScope; + $async$self._async_environment0$_inSemiGlobalScope = semiGlobal; + $async$goto = !when ? 3 : 4; + break; + case 3: + // then + $async$handler = 5; + $async$goto = 8; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 8: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 6; + break; + $async$next.push(7); + // goto finally + $async$goto = 6; + break; + case 5: + // uncaught + $async$next = [2]; + case 6: + // finally + $async$handler = 2; + $async$self._async_environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 7: + // after finally + case 4: + // join + t1 = $async$self._async_environment0$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value_2)); + t3 = $async$self._async_environment0$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode_2)); + t4 = $async$self._async_environment0$_functions; + t5 = type$.AsyncCallable_2; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = $async$self._async_environment0$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = $async$self._async_environment0$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_AsyncCallable_2)); + $async$handler = 9; + $async$goto = 12; + return A._asyncAwait(callback.call$0(), $async$scope$1$3$semiGlobal$when); + case 12: + // returning from await. + t2 = $async$result; + $async$returnValue = t2; + $async$next = [1]; + // goto finally + $async$goto = 10; + break; + $async$next.push(11); + // goto finally + $async$goto = 10; + break; + case 9: + // uncaught + $async$next = [2]; + case 10: + // finally + $async$handler = 2; + $async$self._async_environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + $async$self._async_environment0$_lastVariableIndex = $async$self._async_environment0$_lastVariableName = null; + for (t1 = B.JSArray_methods.removeLast$0(t1), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = $async$self._async_environment0$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = B.JSArray_methods.removeLast$0(t4), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = $async$self._async_environment0$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = B.JSArray_methods.removeLast$0(t6), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = $async$self._async_environment0$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = $async$self._async_environment0$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 11: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$scope$1$3$semiGlobal$when, $async$completer); + }, + toImplicitConfiguration$0() { + var t2, t3, t4, t5, t6, i, modules, t7, t8, t9, t10, $name, value, values, nodes, _this = this, _null = null, + t1 = type$.String, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue_2); + for (t2 = _this._async_environment0$_variables, t3 = type$.Value_2, t4 = _this._async_environment0$_variableNodes, t5 = _this._async_environment0$_importedModules, t6 = A._instanceType(t5)._eval$1("LinkedHashMapKeysIterable<1>"), i = 0; i < t2.length; ++i) { + if (i === 0) + modules = new A.LinkedHashMapKeysIterable(t5, t6); + else { + t7 = _this._async_environment0$_nestedForwardedModules; + modules = t7 == null ? _null : t7[i - 1]; + } + t7 = J.get$iterator$ax(modules == null ? B.List_empty30 : modules); + while (t7.moveNext$0()) { + t8 = t7.get$current(t7); + for (t9 = A.MapExtensions_get_pairs0(t8.get$variables(), t1, t3), t9 = t9.get$iterator(t9); t9.moveNext$0();) { + t10 = t9.get$current(t9); + $name = t10._0; + value = t10._1; + t10 = t8.get$variableNodes().$index(0, $name); + t10.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue0(value, _null, t10)); + } + } + values = t2[i]; + nodes = t4[i]; + for (t7 = A.MapExtensions_get_pairs0(values, t1, t3), t7 = t7.get$iterator(t7); t7.moveNext$0();) { + t8 = t7.get$current(t7); + $name = t8._0; + value = t8._1; + t8 = nodes.$index(0, $name); + t8.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue0(value, _null, t8)); + } + } + return new A.Configuration0(configuration, _null); + }, + toModule$3(css, preModuleComments, extensionStore) { + return A._EnvironmentModule__EnvironmentModule2(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen0(this._async_environment0$_forwardedModules, new A.AsyncEnvironment_toModule_closure0())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule2(this, new A.CssStylesheet0(new A.UnmodifiableListView(B.List_empty20, type$.UnmodifiableListView_CssNode_2), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty16, B.C_EmptyExtensionStore0, A.NullableExtension_andThen0(this._async_environment0$_forwardedModules, new A.AsyncEnvironment_toDummyModule_closure0())); + }, + _async_environment0$_getModule$1(namespace) { + var _0_0 = this._async_environment0$_modules.$index(0, namespace); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0('There is no module with the namespace "' + namespace + '".', null)); + }, + _async_environment0$_fromOneModule$1$3($name, type, callback) { + var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, + _0_0 = this._async_environment0$_nestedForwardedModules; + if (_0_0 != null) + for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (_1_0 != null) + return _1_0; + } + } + for (t1 = this._async_environment0$_importedModules, t1 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first); t1.moveNext$0();) { + _2_0 = callback.call$1(t1.__js_helper$_current); + if (_2_0 != null) + return _2_0; + } + for (t1 = this._async_environment0$_globalModules, t2 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first), t3 = type$.AsyncCallable_2, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t3 = A.MapExtensions_get_pairs0(t1, type$.Module_AsyncCallable_2, type$.AstNode_2), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { + t1 = t3.get$current(t3); + module = t1._0; + node = t1._1; + if (callback.call$1(module) != null) + t2.$indexSet(0, node.get$span(node), t4); + } + throw A.wrapException(A.MultiSpanSassScriptException$0("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + }, + _async_environment0$_fromOneModule$3($name, type, callback) { + return this._async_environment0$_fromOneModule$1$3($name, type, callback, type$.dynamic); + } + }; + A.AsyncEnvironment__getVariableFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 314 + }; + A.AsyncEnvironment_setVariable_closure2.prototype = { + call$0() { + var t1 = this.$this; + t1._async_environment0$_lastVariableName = this.name; + return t1._async_environment0$_lastVariableIndex = 0; + }, + $signature: 10 + }; + A.AsyncEnvironment_setVariable_closure3.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 315 + }; + A.AsyncEnvironment_setVariable_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._async_environment0$_variableIndex$1(this.name); + return t2 == null ? t1._async_environment0$_variables.length - 1 : t2; + }, + $signature: 10 + }; + A.AsyncEnvironment__getFunctionFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 203 + }; + A.AsyncEnvironment__getMixinFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 203 + }; + A.AsyncEnvironment_toModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable_2); + }, + $signature: 204 + }; + A.AsyncEnvironment_toDummyModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_AsyncCallable_2); + }, + $signature: 204 + }; + A._EnvironmentModule2.prototype = { + get$url(_) { + var t1 = this.css; + t1 = t1.get$span(t1); + return t1.get$sourceUrl(t1); + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + _0_0 = this._async_environment0$_modulesByVariable.$index(0, $name); + if (_0_0 != null) { + _0_0.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._async_environment0$_environment; + t2 = t1._async_environment0$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + B.JSArray_methods.get$first(t2).$indexSet(0, $name, value); + B.JSArray_methods.get$first(t1._async_environment0$_variableNodes).$indexSet(0, $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._async_environment0$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + couldHaveBeenConfigured$1(variables) { + var t2, t3, _0_0, variable, module, + t1 = this._async_environment0$_environment._async_environment0$_configurableVariables; + if (!(variables.get$length(variables) < t1.get$length(t1) ? variables.any$1(0, t1.get$contains(t1)) : t1.any$1(0, variables.get$contains(variables)))) { + t1 = this._async_environment0$_modulesByVariable; + t2 = type$.Module_AsyncCallable_2; + if (variables.get$length(variables) < t1.get$length(t1)) { + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + for (t3 = variables.get$iterator(variables); t3.moveNext$0();) { + _0_0 = t1.$index(0, t3.get$current(t3)); + if (_0_0 != null) + t2.add$1(0, _0_0); + } + t1 = t2; + } else { + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + for (t1 = A.MapExtensions_get_pairs0(t1, type$.String, t2), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + variable = t2._0; + module = t2._1; + if (variables.contains$1(0, variable)) + t3.add$1(0, module); + } + t1 = t3; + } + t1 = t1.any$1(0, new A._EnvironmentModule_couldHaveBeenConfigured_closure2(variables)); + } else + t1 = true; + return t1; + }, + cloneCss$0() { + var _0_0, _this = this; + if (!_this.transitivelyContainsCss) + return _this; + _0_0 = A.cloneCssStylesheet0(_this.css, _this.extensionStore); + return A._EnvironmentModule$_2(_this._async_environment0$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._async_environment0$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css, + t2 = t1.get$span(t1); + if (t2.get$sourceUrl(t2) == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = t1.get$sourceUrl(t1); + t2 = $.$get$context(); + t1.toString; + t1 = t2.prettyUri$1(t1); + } + return t1; + }, + $isModule1: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$preModuleComments() { + return this.preModuleComments; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure17.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 318 + }; + A._EnvironmentModule__EnvironmentModule_closure18.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 319 + }; + A._EnvironmentModule__EnvironmentModule_closure19.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 205 + }; + A._EnvironmentModule__EnvironmentModule_closure20.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 205 + }; + A._EnvironmentModule__EnvironmentModule_closure21.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 118 + }; + A._EnvironmentModule__EnvironmentModule_closure22.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 118 + }; + A._EnvironmentModule_couldHaveBeenConfigured_closure2.prototype = { + call$1(module) { + return module.couldHaveBeenConfigured$1(this.variables); + }, + $signature: 118 + }; + A._EvaluateVisitor2.prototype = { + get$_async_evaluate0$_hasCssNesting() { + var _0_0, t1, grandparent, + $parent = this._async_evaluate0$_atRootExcludingStyleRule ? null : this._async_evaluate0$_styleRuleIgnoringAtRoot; + for (;; $parent = grandparent) { + _0_0 = $parent == null ? null : $parent._node$_parent; + if (_0_0 instanceof A.ModifiableCssStyleRule0) + return true; + t1 = _0_0 != null; + grandparent = t1 ? _0_0 : null; + if (t1) + continue; + return false; + } + }, + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap2(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + _s7_ = "$module", + t1 = type$.JSArray_AsyncBuiltInCallable_2, + metaFunctions = A._setArrayType([A.BuiltInCallable$function0("global-variable-exists", _s20_, new A._EvaluateVisitor_closure38(_this), _s9_), A.BuiltInCallable$function0("variable-exists", "$name", new A._EvaluateVisitor_closure39(_this), _s9_), A.BuiltInCallable$function0("function-exists", _s20_, new A._EvaluateVisitor_closure40(_this), _s9_), A.BuiltInCallable$function0("mixin-exists", _s20_, new A._EvaluateVisitor_closure41(_this), _s9_), A.BuiltInCallable$function0("content-exists", "", new A._EvaluateVisitor_closure42(_this), _s9_), A.BuiltInCallable$function0("module-variables", _s7_, new A._EvaluateVisitor_closure43(_this), _s9_), A.BuiltInCallable$function0("module-functions", _s7_, new A._EvaluateVisitor_closure44(_this), _s9_), A.BuiltInCallable$function0("module-mixins", _s7_, new A._EvaluateVisitor_closure45(_this), _s9_), A.BuiltInCallable$function0("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure46(_this), _s9_), A.BuiltInCallable$function0("get-mixin", _s20_, new A._EvaluateVisitor_closure47(_this), _s9_), new A.AsyncBuiltInCallable0("call", A.ScssParser$0("@function call($function, $args...) {", false, _s9_).parseParameterList$0(), new A._EvaluateVisitor_closure48(_this), false)], t1), + metaMixins = A._setArrayType([A.AsyncBuiltInCallable$mixin0("load-css", "$url, $with: null", new A._EvaluateVisitor_closure49(_this), false, _s9_), A.AsyncBuiltInCallable$mixin0("apply", "$mixin, $args...", new A._EvaluateVisitor_closure50(_this), true, _s9_)], t1); + t1 = type$.AsyncBuiltInCallable_2; + t2 = A.List_List$_of($.$get$moduleFunctions0(), t1); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$0("meta", t2, metaMixins, null, t1); + t1 = A.List_List$_of($.$get$coreModules0(), type$.BuiltInModule_AsyncCallable_2); + t1.push(metaModule); + t2 = t1.length; + t3 = _this._async_evaluate0$_builtInModules; + _i = 0; + for (; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = type$.JSArray_AsyncCallable_2; + t2 = A._setArrayType([], t1); + B.JSArray_methods.addAll$1(t2, functions); + B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions0()); + t1 = A._setArrayType([], t1); + for (_i = 0; _i < 11; ++_i) + t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); + B.JSArray_methods.addAll$1(t2, t1); + for (t1 = t2.length, t3 = _this._async_evaluate0$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $function = t2[_i]; + t4 = $function.get$name($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + return this.run$body$_EvaluateVisitor0(0, importer, node); + }, + run$body$_EvaluateVisitor0(_, importer, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, error, stackTrace, t1, exception, $async$exception; + var $async$run$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = type$.nullable_Object; + t1 = A.runZoned(new A._EvaluateVisitor_run_closure2($async$self, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext2($async$self, node)], t1, t1), type$.FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2); + $async$goto = 7; + return A._asyncAwait(type$.Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2._is(t1) ? t1 : A._Future$value(t1, type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), $async$run$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace0(error.withLoadedUrls$1($async$self._async_evaluate0$_loadedUrls), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$run$2, $async$completer); + }, + _async_evaluate0$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _async_evaluate0$_assertInModule$2(value, $name) { + return this._async_evaluate0$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + return this._loadModule$body$_EvaluateVisitor0(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors); + }, + _async_evaluate0$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _async_evaluate0$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _loadModule$body$_EvaluateVisitor0(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t2, _0_0, t1; + var $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + _0_0 = $async$self._async_evaluate0$_builtInModules.$index(0, url); + t1 = {}; + t1.builtInModule = null; + $async$goto = _0_0 != null ? 3 : 4; + break; + case 3: + // then + t1.builtInModule = _0_0; + if (configuration instanceof A.ExplicitConfiguration0) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException($async$self._async_evaluate0$_exception$2(t1, t2.get$span(t2))); + } + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure5(t1, callback), type$.void), $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withStackFrame$1$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure6($async$self, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback), type$.Null), $async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors, $async$completer); + }, + _async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + return this._execute$body$_EvaluateVisitor0(importer, stylesheet, configuration, namesInErrors, nodeWithSpan); + }, + _async_evaluate0$_execute$2(importer, stylesheet) { + return this._async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _execute$body$_EvaluateVisitor0(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Module_AsyncCallable_2), + $async$returnValue, $async$self = this, currentConfiguration, t2, _0_0, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, t1, url; + var $async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = stylesheet.span; + url = t1.get$sourceUrl(t1); + t1 = configuration == null; + currentConfiguration = t1 ? $async$self._async_evaluate0$_configuration : configuration; + t2 = $async$self._async_evaluate0$_modules; + _0_0 = t2.$index(0, url); + if (_0_0 != null) { + t2 = $async$self._async_evaluate0$_moduleConfigurations.$index(0, url); + t3 = t2._configuration0$__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration._configuration0$__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration0 && _0_0.couldHaveBeenConfigured$1(new A.MapKeySet(new A.UnmodifiableMapView(currentConfiguration._configuration0$_values, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.MapKeySet_String))) { + if (namesInErrors) { + t2 = $.$get$context(); + url.toString; + message = t2.prettyUri$1(url) + string$.x20was_a; + } else + message = string$.This_mw; + t2 = $async$self._async_evaluate0$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : t2.get$span(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(0) ? $async$self._async_evaluate0$_exception$1(message) : $async$self._async_evaluate0$_multiSpanException$3(message, "new load", t1)); + } + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + environment = A.AsyncEnvironment$0(); + css = A._Cell$(); + preModuleComments = A._Cell$(); + extensionStore = A.ExtensionStore$0(); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_withEnvironment$1$2(environment, new A._EvaluateVisitor__execute_closure2($async$self, importer, stylesheet, extensionStore, configuration, css, preModuleComments), type$.Null), $async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan); + case 3: + // returning from await. + t1 = css._readLocal$0(); + t3 = preModuleComments._readLocal$0(); + module = environment.toModule$3(t1, t3 == null ? B.Map_empty16 : t3, extensionStore); + if (url != null) { + t2.$indexSet(0, url, module); + $async$self._async_evaluate0$_moduleConfigurations.$indexSet(0, url, currentConfiguration); + if (nodeWithSpan != null) + $async$self._async_evaluate0$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + $async$returnValue = module; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan, $async$completer); + }, + _async_evaluate0$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + _0_0 = _this._async_evaluate0$_outOfOrderImports; + $label0$0: { + if (_0_0 == null) { + t1 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + break $label0$0; + } + t1 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + t1 = A.List_List$_of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), type$.ModifiableCssNode_2); + B.JSArray_methods.addAll$1(t1, _0_0); + t2 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); + break $label0$0; + } + return t1; + }, + _async_evaluate0$_combineCss$2$clone(root, clone) { + var selectors, _0_0, t1, imports, css, sorted, t2; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure5())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure6(selectors))); + if (_0_0 != null) + this._async_evaluate0$_throwForUnsatisfiedExtension$1(_0_0); + return root.get$css(root); + } + t1 = type$.JSArray_CssNode_2; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + t1 = type$.Module_AsyncCallable_2; + sorted = A.ListQueue$(t1); + new A._EvaluateVisitor__combineCss_visitModule2(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); + if (root.get$transitivelyContainsExtensions()) + this._async_evaluate0$_extendModules$1(sorted); + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet0(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode_2), t2.get$span(t2)); + }, + _async_evaluate0$_combineCss$1(root) { + return this._async_evaluate0$_combineCss$2$clone(root, false); + }, + _async_evaluate0$_extendModules$1(sortedModules) { + var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore_2), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension_2); + for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure5(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); + t4 = t3.get$extensionStore().get$addExtensions(); + if ($self != null) + t4.call$1($self); + t4 = t3.get$extensionStore(); + if (t4.get$isEmpty(t4)) + continue; + for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { + upstream = t4[_i]; + _0_0 = upstream.get$url(upstream); + if (_0_0 != null) + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure6()), t3.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._async_evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); + }, + _async_evaluate0$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$0(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); + }, + _async_evaluate0$_indexAfterImports$1(statements) { + var t1, lastImport, i, _0_0; + for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + $label0$0: { + _0_0 = t1.$index(statements, i); + if (_0_0 instanceof A.ModifiableCssImport0) + break $label0$0; + if (_0_0 instanceof A.ModifiableCssComment0) + continue; + break; + } + lastImport = i; + } + return lastImport + 1; + }, + visitStylesheet$1(_, node) { + return this.visitStylesheet$body$_EvaluateVisitor0(0, node); + }, + visitStylesheet$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, warning, _i, $name, span; + var $async$visitStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + for (t1 = node.parseTimeWarnings, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + warning = t1.__internal$_current; + if (warning == null) + warning = t2._as(warning); + $async$self._async_evaluate0$_warn$3(warning._1, warning._2, warning._0); + } + t1 = node.children, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1($async$self), $async$visitStylesheet$1); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + for (t1 = A.MapExtensions_get_pairs0(node.globalVariables, type$.String, type$.FileSpan), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + $name = t2._0; + span = t2._1; + $async$self.visitVariableDeclaration$1(0, new A.VariableDeclaration0(null, $name, new A.NullExpression0(span), true, false, span)); + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStylesheet$1, $async$completer); + }, + visitAtRootRule$1(_, node) { + return this.visitAtRootRule$body$_EvaluateVisitor0(0, node); + }, + visitAtRootRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, _1_0, resolved, query, $parent, included, t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _0_0; + var $async$visitAtRootRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + _0_0 = node.query; + $async$goto = _0_0 != null ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(_0_0, true), $async$visitAtRootRule$1); + case 6: + // returning from await. + _1_0 = $async$result; + resolved = _1_0._0; + _1_0._1; + query = new A.AtRootQueryParser0(A.SpanScanner$(resolved, null), null).parse$0(0); + // goto join + $async$goto = 4; + break; + case 5: + // else + query = B.AtRootQuery_bfj0; + case 4: + // join + $parent = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode_2); + for (t1 = type$.CssStylesheet_2; !t1._is($parent); $parent = _2_0) { + if (!query.excludes$1($parent)) + included.push($parent); + _2_0 = $parent._node$_parent; + if (_2_0 == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = $async$self._async_evaluate0$_trimIncluded$1(included); + $async$goto = root === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure5($async$self, node), node.hasDeclarations, type$.Null), $async$visitAtRootRule$1); + case 9: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 8: + // join + if (included.length >= 1) { + first = included[0]; + rest = B.JSArray_methods.sublist$1(included, 1); + innerCopy = first.copyWithoutChildren$0(); + for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { + copy = rest[_i].copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure6($async$self, node)), $async$visitAtRootRule$1); + case 10: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRootRule$1, $async$completer); + }, + _async_evaluate0$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_); + $parent = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { + _0_0 = $parent._node$_parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + _1_0 = $parent._node$_parent; + if (_1_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_)) + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _async_evaluate0$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure17(_this, newParent, node), + t1 = query._at_root_query0$_all || query._at_root_query0$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure18(_this, scope); + if (_this._async_evaluate0$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure19(_this, scope); + if (_this._async_evaluate0$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure20(_this, scope); + return _this._async_evaluate0$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure21()) ? new A._EvaluateVisitor__scopeForAtRoot_closure22(_this, scope) : scope; + }, + visitContentBlock$1(_, node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(_, node) { + return this.visitContentRule$body$_EvaluateVisitor0(0, node); + }, + visitContentRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, $content; + var $async$visitContentRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $content = $async$self._async_evaluate0$_environment._async_environment0$_content; + if ($content == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure2($async$self, $content), type$.Null), $async$visitContentRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitContentRule$1, $async$completer); + }, + visitDebugRule$1(_, node) { + return this.visitDebugRule$body$_EvaluateVisitor0(0, node); + }, + visitDebugRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, value, t1; + var $async$visitDebugRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitDebugRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString0 ? value._string0$_text : A.serializeValue0(value, true, true); + $async$self._async_evaluate0$_logger.debug$2(0, t1, node.span); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDebugRule$1, $async$completer); + }, + visitDeclaration$1(_, node) { + return this.visitDeclaration$body$_EvaluateVisitor0(0, node); + }, + visitDeclaration$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, $name, _0_0, _1_0, value, t2, t3, _2_0, oldDeclarationName; + var $async$visitDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (($async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot) == null && !$async$self._async_evaluate0$_inUnknownAtRule && !$async$self._async_evaluate0$_inKeyframes) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Declarm, node.span)); + if ($async$self._async_evaluate0$_declarationName != null && !node.parsedAsSassScript) { + t1 = B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--") ? string$.Declarw : string$.Declarp; + throw A.wrapException($async$self._async_evaluate0$_exception$2(t1, node.span)); + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$2$warnForColor(node.name, true), $async$visitDeclaration$1); + case 3: + // returning from await. + $name = $async$result; + _0_0 = $async$self._async_evaluate0$_declarationName; + if (_0_0 != null) + $name = new A.CssValue0(_0_0 + "-" + $name.value, $name.span, type$.CssValue_String_2); + _1_0 = node.value; + $async$goto = _1_0 != null ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait(_1_0.accept$1($async$self), $async$visitDeclaration$1); + case 6: + // returning from await. + value = $async$result; + if (!value.get$isBlank() || value.get$asList().length === 0 || B.JSString_methods.startsWith$1($name.value, "--")) { + $async$self._async_evaluate0$_copyParentAfterSibling$0(); + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + t2 = _1_0.get$span(_1_0); + if ($async$self._async_evaluate0$_sourceMap) { + t3 = A.NullableExtension_andThen0(_1_0, $async$self.get$_async_evaluate0$_expressionNode()); + t3 = t3 == null ? null : J.get$span$x(t3); + } else + t3 = null; + t1.addChild$1(A.ModifiableCssDeclaration$0($name, new A.CssValue0(value, t2, type$.CssValue_Value_2), node.span, node.parsedAsSassScript, t3)); + } + case 5: + // join + _2_0 = node.children; + t1 = {}; + t1.children = null; + $async$goto = _2_0 != null ? 7 : 8; + break; + case 7: + // then + t1.children = _2_0; + oldDeclarationName = $async$self._async_evaluate0$_declarationName; + $async$self._async_evaluate0$_declarationName = $name.value; + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure2(t1, $async$self), node.hasDeclarations, type$.Null), $async$visitDeclaration$1); + case 9: + // returning from await. + $async$self._async_evaluate0$_declarationName = oldDeclarationName; + case 8: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitDeclaration$1, $async$completer); + }, + visitEachRule$1(_, node) { + return this.visitEachRule$body$_EvaluateVisitor0(0, node); + }, + visitEachRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, list, nodeWithSpan, _0_0; + var $async$visitEachRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.list; + $async$goto = 3; + return A._asyncAwait(t1.accept$1($async$self), $async$visitEachRule$1); + case 3: + // returning from await. + list = $async$result; + nodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t1); + _0_0 = node.variables; + $label0$0: { + t1 = {}; + t1.variable = null; + if (_0_0.length === 1) { + t1.variable = _0_0[0]; + t1 = new A._EvaluateVisitor_visitEachRule_closure8(t1, $async$self, nodeWithSpan); + break $label0$0; + } + t1 = {}; + t1.variables = null; + t1.variables = _0_0; + t1 = new A._EvaluateVisitor_visitEachRule_closure9(t1, $async$self, nodeWithSpan); + break $label0$0; + } + $async$returnValue = $async$self._async_evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure10($async$self, list, t1, node), true, type$.nullable_Value_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitEachRule$1, $async$completer); + }, + _async_evaluate0$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._async_evaluate0$_environment.setLocalVariable$3(variables[i], this._async_evaluate0$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._async_evaluate0$_environment.setLocalVariable$3(variables[i], B.C__SassNull0, nodeWithSpan); + }, + visitErrorRule$1(_, node) { + return this.visitErrorRule$body$_EvaluateVisitor0(0, node); + }, + visitErrorRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$self = this, $async$temp1, $async$temp2; + var $async$visitErrorRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$temp2 = J; + $async$goto = 2; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitErrorRule$1); + case 2: + // returning from await. + throw $async$temp1.wrapException($async$self._async_evaluate0$_exception$2($async$temp2.toString$0$($async$result), node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitErrorRule$1, $async$completer); + }, + visitExtendRule$1(_, node) { + return this.visitExtendRule$body$_EvaluateVisitor0(0, node); + }, + visitExtendRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, targetText, targetMap, compound, simple, styleRule; + var $async$visitExtendRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + styleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || $async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + visitor = A._SerializeVisitor$0(null, true, null, null, true, false, null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t7 = complex.accept$1(B.C__IsUselessVisitor0) ? "can't" : "shouldn't"; + $async$self._async_evaluate0$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan0(A.SpanExtensions_trimRight0(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_2PR); + } + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(node.selector, true), $async$visitExtendRule$1); + case 3: + // returning from await. + _0_0 = $async$result; + targetText = _0_0._0; + targetMap = _0_0._1; + for (t1 = A.SelectorList_SelectorList$parse0(A.trimAscii0(targetText, true), false, targetMap, $async$self._async_evaluate0$_logger, false).components, t2 = t1.length, t3 = styleRule._style_rule0$_selector._box0$_inner, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassFormatException$0("complex selectors may not be extended.", complex.span, null)); + t4 = compound.components; + simple = t4.length === 1 ? B.JSArray_methods.get$first(t4) : null; + if (simple == null) + throw A.wrapException(A.SassFormatException$0(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, null)); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addExtension$4(t3.value, simple, node, $async$self._async_evaluate0$_mediaQueries); + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitExtendRule$1, $async$completer); + }, + visitAtRule$1(_, node) { + return this.visitAtRule$body$_EvaluateVisitor0(0, node); + }, + visitAtRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, $name, t1, value, children, wasInKeyframes, wasInUnknownAtRule, rule; + var $async$visitAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.At_rul, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$1(node.name), $async$visitAtRule$1); + case 3: + // returning from await. + $name = $async$result; + t1 = A.NullableExtension_andThen0(node.value, new A._EvaluateVisitor_visitAtRule_closure11($async$self)); + $async$goto = 4; + return A._asyncAwait(type$.Future_nullable_CssValue_String_2._is(t1) ? t1 : A._Future$value(t1, type$.nullable_CssValue_String_2), $async$visitAtRule$1); + case 4: + // returning from await. + value = $async$result; + children = node.children; + if (children == null) { + $async$self._async_evaluate0$_copyParentAfterSibling$0(); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0($name, node.span, true, value)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate0$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate0$_inUnknownAtRule; + if (A.unvendor0($name.value) === "keyframes") + $async$self._async_evaluate0$_inKeyframes = true; + else + $async$self._async_evaluate0$_inUnknownAtRule = true; + rule = A.ModifiableCssAtRule$0($name, node.span, false, value); + $async$goto = $async$self.get$_async_evaluate0$_hasCssNesting() ? 5 : 6; + break; + case 5: + // then + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitAtRule_closure12($async$self, children), node.hasDeclarations, type$.ModifiableCssAtRule_2, type$.Null), $async$visitAtRule$1); + case 7: + // returning from await. + $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 6: + // join + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitAtRule_closure13($async$self, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure14(), type$.ModifiableCssAtRule_2, type$.Null), $async$visitAtRule$1); + case 8: + // returning from await. + $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitAtRule$1, $async$completer); + }, + visitForRule$1(_, node) { + return this.visitForRule$body$_EvaluateVisitor0(0, node); + }, + visitForRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, fromNumber, t4, toNumber, from, to, direction; + var $async$visitForRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + t2 = node.from; + t3 = type$.SassNumber_2; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(t2, new A._EvaluateVisitor_visitForRule_closure14($async$self, node), t3), $async$visitForRule$1); + case 3: + // returning from await. + fromNumber = $async$result; + t4 = node.to; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(t4, new A._EvaluateVisitor_visitForRule_closure15($async$self, node), t3), $async$visitForRule$1); + case 4: + // returning from await. + toNumber = $async$result; + from = $async$self._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure16(fromNumber)); + to = t1.to = $async$self._async_evaluate0$_addExceptionSpan$2(t4, new A._EvaluateVisitor_visitForRule_closure17(toNumber, fromNumber)); + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = $async$self._async_evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure18(t1, $async$self, node, from, direction, fromNumber), true, type$.nullable_Value_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForRule$1, $async$completer); + }, + visitForwardRule$1(_, node) { + return this.visitForwardRule$body$_EvaluateVisitor0(0, node); + }, + visitForwardRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, newConfiguration, t4, _i, variable, $name, oldConfiguration, adjustedConfiguration, t1, t2, t3; + var $async$visitForwardRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldConfiguration = $async$self._async_evaluate0$_configuration; + adjustedConfiguration = oldConfiguration.throughForward$1(node); + t1 = node.configuration; + t2 = t1.length; + t3 = node.url; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_addForwardConfiguration$2(adjustedConfiguration, node), $async$visitForwardRule$1); + case 6: + // returning from await. + newConfiguration = $async$result; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$5$configuration(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure5($async$self, node), newConfiguration), $async$visitForwardRule$1); + case 7: + // returning from await. + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + $async$self._async_evaluate0$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration0$_values, t2 = t1.get$keys(t1), t2 = t2.toList$0(t2), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + $async$self._async_evaluate0$_assertConfigurationIsEmpty$1(newConfiguration); + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$self._async_evaluate0$_configuration = adjustedConfiguration; + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$4(t3, "@forward", node, new A._EvaluateVisitor_visitForwardRule_closure6($async$self, node)), $async$visitForwardRule$1); + case 8: + // returning from await. + $async$self._async_evaluate0$_configuration = oldConfiguration; + case 4: + // join + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitForwardRule$1, $async$completer); + }, + _async_evaluate0$_addForwardConfiguration$2(configuration, node) { + return this._addForwardConfiguration$body$_EvaluateVisitor0(configuration, node); + }, + _addForwardConfiguration$body$_EvaluateVisitor0(configuration, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Configuration_2), + $async$returnValue, $async$self = this, t2, t3, t4, t5, _i, variable, t6, _0_0, t7, oldValue, variableNodeWithSpan, t1, newValues, $async$temp1, $async$temp2, $async$temp3; + var $async$_async_evaluate0$_addForwardConfiguration$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = configuration._configuration0$_values; + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + t2 = node.configuration, t3 = t2.length, t4 = type$._Future_Value_2, t5 = type$.Future_Value_2, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + variable = t2[_i]; + if (variable.isGuarded) { + t6 = variable.name; + _0_0 = t1.get$isEmpty(t1) ? null : t1.remove$1(0, t6); + if (_0_0 != null) { + t7 = !_0_0.value.$eq(0, B.C__SassNull0); + oldValue = _0_0; + } else { + oldValue = null; + t7 = false; + } + if (t7) { + newValues.$indexSet(0, t6, oldValue); + // goto for update + $async$goto = 4; + break; + } + } + t6 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t6); + t6 = t6.accept$1($async$self); + if (!t5._is(t6)) { + t7 = new A._Future($.Zone__current, t4); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$temp1 = newValues; + $async$temp2 = variable.name; + $async$temp3 = A; + $async$goto = 6; + return A._asyncAwait(t6, $async$_async_evaluate0$_addForwardConfiguration$2); + case 6: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue0($async$self._async_evaluate0$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + if (configuration instanceof A.ExplicitConfiguration0 || t1.get$isEmpty(t1)) { + $async$returnValue = new A.ExplicitConfiguration0(node, newValues, null); + // goto return + $async$goto = 1; + break; + } else { + $async$returnValue = new A.Configuration0(newValues, null); + // goto return + $async$goto = 1; + break; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addForwardConfiguration$2, $async$completer); + }, + _async_evaluate0$_registerCommentsForModule$1(module) { + var _this = this, _s5_ = "_root", + t1 = _this._async_evaluate0$__root; + if (t1 == null) + return; + if (_this._async_evaluate0$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) + return; + t1 = _this._async_evaluate0$_preModuleComments; + if (t1 == null) + t1 = _this._async_evaluate0$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_AsyncCallable_2, type$.List_CssComment_2); + J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure2()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).children._collection$_source, type$.CssComment_2), type$.UnmodifiableListView_CssComment_2)); + _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__root, _s5_).clearChildren$0(); + _this._async_evaluate0$__endOfImports = 0; + }, + _async_evaluate0$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration0$_values, t2 = t1.get$keys(t1), t2 = t2.toList$0(t2), t3 = t2.length, t4 = downstream._configuration0$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, _0_0; + if (!(configuration instanceof A.ExplicitConfiguration0)) + return; + t1 = configuration._configuration0$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + _0_0 = t1.get$first(t1); + t1 = nameInError ? "$" + _0_0._0 + string$.x20was_n : string$.This_v; + throw A.wrapException(this._async_evaluate0$_exception$2(t1, _0_0._1.configurationSpan)); + }, + _async_evaluate0$_assertConfigurationIsEmpty$1(configuration) { + return this._async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(_, node) { + return this.visitFunctionRule$body$_EvaluateVisitor0(0, node); + }, + visitFunctionRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitFunctionRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate0$_inDependency; + t4 = t1._async_environment0$_functions; + index = t4.length - 1; + t5 = node.name; + t1._async_environment0$_functionIndices.$indexSet(0, t5, index); + t4[index].$indexSet(0, t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment_2)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionRule$1, $async$completer); + }, + visitIfRule$1(_, node) { + return this.visitIfRule$body$_EvaluateVisitor0(0, node); + }, + visitIfRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, _i, clauseToCheck, clause; + var $async$visitIfRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + clause = node.lastClause; + t1 = node.clauses, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + clauseToCheck = t1[_i]; + $async$goto = 6; + return A._asyncAwait(clauseToCheck.expression.accept$1($async$self), $async$visitIfRule$1); + case 6: + // returning from await. + if ($async$result.get$isTruthy()) { + clause = clauseToCheck; + // goto after for + $async$goto = 5; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = A.NullableExtension_andThen0(clause, new A._EvaluateVisitor_visitIfRule_closure2($async$self)); + $async$goto = 7; + return A._asyncAwait(type$.Future_nullable_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Value_2), $async$visitIfRule$1); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfRule$1, $async$completer); + }, + visitImportRule$1(_, node) { + return this.visitImportRule$body$_EvaluateVisitor0(0, node); + }, + visitImportRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, _i, $import; + var $async$visitImportRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.imports, t2 = t1.length, t3 = type$.StaticImport_2, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $import = t1[_i]; + $async$goto = $import instanceof A.DynamicImport0 ? 6 : 8; + break; + case 6: + // then + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_visitDynamicImport$1($import), $async$visitImportRule$1); + case 9: + // returning from await. + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_visitStaticImport$1(t3._as($import)), $async$visitImportRule$1); + case 10: + // returning from await. + case 7: + // join + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitImportRule$1, $async$completer); + }, + _async_evaluate0$_visitDynamicImport$1($import) { + return this._async_evaluate0$_withStackFrame$1$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure2(this, $import), type$.void); + }, + _async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + return this._loadStylesheet$body$_EvaluateVisitor0(url, span, baseUrl, forImport); + }, + _async_evaluate0$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _async_evaluate0$_loadStylesheet$3$forImport(url, span, forImport) { + return this._async_evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _loadStylesheet$body$_EvaluateVisitor0(url, span, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency_2), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, _3_0, result, error, stackTrace, error0, stackTrace0, t1, t2, exception, $async$exception; + var $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + baseUrl = baseUrl; + $async$handler = 4; + $async$self._async_evaluate0$_importSpan = span; + _0_0 = $async$self._async_evaluate0$_importCache; + importCache = null; + $async$goto = _0_0 != null ? 7 : 8; + break; + case 7: + // then + importCache = _0_0; + if (baseUrl == null) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").span; + baseUrl = t1.get$sourceUrl(t1); + } + $async$goto = 9; + return A._asyncAwait(J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), $async$self._async_evaluate0$_importer, baseUrl, forImport), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 9: + // returning from await. + _1_0 = $async$result; + importer = null; + canonicalUrl = null; + originalUrl = null; + $async$goto = type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0) ? 10 : 11; + break; + case 10: + // then + importer = _1_0._0; + canonicalUrl = _1_0._1; + originalUrl = _1_0._2; + if (canonicalUrl.get$scheme() === "") + A.WarnForDeprecation_warnForDeprecation0($async$self._async_evaluate0$_logger, B.Deprecation_Vc9, "Importer " + A.S(importer) + " canonicalized " + url + " to " + A.S(canonicalUrl) + string$.x2e_Rela, null, null); + $async$self._async_evaluate0$_loadedUrls.add$1(0, canonicalUrl); + isDependency = $async$self._async_evaluate0$_inDependency || !J.$eq$(importer, $async$self._async_evaluate0$_importer); + $async$goto = 12; + return A._asyncAwait(importCache.importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 12: + // returning from await. + _2_0 = $async$result; + stylesheet = null; + if (_2_0 != null) { + stylesheet = _2_0; + t1 = stylesheet; + t2 = importer; + $async$returnValue = new A._Record_3_importer_isDependency(t1, t2, isDependency); + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 11: + // join + case 8: + // join + $async$goto = $async$self._async_evaluate0$_nodeImporter != null ? 13 : 14; + break; + case 13: + // then + t1 = baseUrl; + if (t1 == null) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").span; + t1 = t1.get$sourceUrl(t1); + } + $async$goto = 15; + return A._asyncAwait($async$self._async_evaluate0$_importLikeNode$3(url, t1, forImport), $async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport); + case 15: + // returning from await. + _3_0 = $async$result; + result = null; + if (_3_0 != null) { + result = _3_0; + t1 = result._0.span; + t2 = $async$self._async_evaluate0$_loadedUrls; + A.NullableExtension_andThen0(t1.get$sourceUrl(t1), t2.get$add(t2)); + t2 = result; + $async$returnValue = t2; + $async$next = [1]; + // goto finally + $async$goto = 5; + break; + } + case 14: + // join + t1 = B.JSString_methods.startsWith$1(url, "package:"); + if (t1) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException0) + throw $async$exception; + else if (t1 instanceof A.ArgumentError) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace0($async$self._async_evaluate0$_exception$1(J.toString$0$(error)), error, stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException($async$exception); + A.throwWithTrace0($async$self._async_evaluate0$_exception$1($async$self._async_evaluate0$_getErrorMessage$1(error0)), error0, stackTrace0); + } + $async$next.push(6); + // goto finally + $async$goto = 5; + break; + case 3: + // uncaught + $async$next = [2]; + case 5: + // finally + $async$handler = 2; + $async$self._async_evaluate0$_importSpan = null; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_loadStylesheet$4$baseUrl$forImport, $async$completer); + }, + _async_evaluate0$_importLikeNode$3(originalUrl, previous, forImport) { + return this._importLikeNode$body$_EvaluateVisitor(originalUrl, previous, forImport); + }, + _importLikeNode$body$_EvaluateVisitor(originalUrl, previous, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency), + $async$returnValue, $async$self = this, isDependency, url, t1, result; + var $async$_async_evaluate0$_importLikeNode$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_nodeImporter; + result = t1.loadRelative$3(originalUrl, previous, forImport); + $async$goto = result != null ? 3 : 5; + break; + case 3: + // then + isDependency = $async$self._async_evaluate0$_inDependency; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = 6; + return A._asyncAwait(t1.loadAsync$3(originalUrl, previous, forImport), $async$_async_evaluate0$_importLikeNode$3); + case 6: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + isDependency = true; + case 4: + // join + url = result._1; + t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath0(url) : B.Syntax_SCSS_0_scss0; + $async$returnValue = new A._Record_3_importer_isDependency(A.Stylesheet_Stylesheet$parse0(result._0, t1, false, url), null, isDependency); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_importLikeNode$3, $async$completer); + }, + _async_evaluate0$_visitStaticImport$1($import) { + return this._visitStaticImport$body$_EvaluateVisitor0($import); + }, + _visitStaticImport$body$_EvaluateVisitor0($import) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, node, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_visitStaticImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_interpolationToValue$1($import.url), $async$_async_evaluate0$_visitStaticImport$1); + case 2: + // returning from await. + t1 = $async$result; + t2 = A.NullableExtension_andThen0($import.modifiers, $async$self.get$_async_evaluate0$_interpolationToValue()); + $async$temp1 = A; + $async$temp2 = t1; + $async$goto = 3; + return A._asyncAwait(type$.Future_nullable_CssValue_String_2._is(t2) ? t2 : A._Future$value(t2, type$.nullable_CssValue_String_2), $async$_async_evaluate0$_visitStaticImport$1); + case 3: + // returning from await. + node = new $async$temp1.ModifiableCssImport0($async$temp2, $async$result, $import.span); + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root")) { + $async$self._async_evaluate0$_copyParentAfterSibling$0(); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(node); + } else if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").addChild$1(node); + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate0$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(node); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitStaticImport$1, $async$completer); + }, + _async_evaluate0$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + return this._applyMixin$body$_EvaluateVisitor0(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent); + }, + _applyMixin$body$_EvaluateVisitor0(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, _0_0, t2, _1_8, t3; + var $async$_async_evaluate0$_applyMixin$5 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (mixin == null) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); + t1 = type$.AsyncBuiltInCallable_2._is(mixin); + $async$goto = t1 && !mixin.get$acceptsContent() && contentCallable != null ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_applyMixin$5); + case 5: + // returning from await. + t1 = $async$result._values; + _0_0 = mixin.callbackFor$2(J.get$length$asx(t1[2]), new A.MapKeySet(t1[0], type$.MapKeySet_String)); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + case 4: + // join + $async$goto = t1 ? 6 : 7; + break; + case 6: + // then + $async$goto = 8; + return A._asyncAwait($async$self._async_evaluate0$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure5($async$self, $arguments, mixin, nodeWithSpanWithoutContent)), $async$_async_evaluate0$_applyMixin$5); + case 8: + // returning from await. + // goto break $label0$0 + $async$goto = 2; + break; + case 7: + // join + t1 = type$.UserDefinedCallable_AsyncEnvironment_2._is(mixin); + t2 = false; + if (t1) { + _1_8 = mixin.declaration; + t3 = _1_8; + if (t3 instanceof A.MixinRule0) + t2 = !type$.MixinRule_2._as(_1_8).get$hasContent() && contentCallable != null; + } + if (t2) + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Mixin doesn't accept a content block.", nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.parameters.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), null)); + $async$goto = t1 ? 9 : 10; + break; + case 9: + // then + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure6($async$self, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null), $async$_async_evaluate0$_applyMixin$5); + case 11: + // returning from await. + // goto break $label0$0 + $async$goto = 2; + break; + case 10: + // join + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + case 2: + // break $label0$0 + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_applyMixin$5, $async$completer); + }, + visitIncludeRule$1(_, node) { + return this.visitIncludeRule$body$_EvaluateVisitor0(0, node); + }, + visitIncludeRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, mixin; + var $async$visitIncludeRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + mixin = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure8($async$self, node)); + if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Sass__m, node.get$nameSpan())); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_applyMixin$5(mixin, A.NullableExtension_andThen0(node.content, new A._EvaluateVisitor_visitIncludeRule_closure9($async$self)), node.$arguments, node, new A._FakeAstNode0(new A._EvaluateVisitor_visitIncludeRule_closure10(node))), $async$visitIncludeRule$1); + case 3: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIncludeRule$1, $async$completer); + }, + visitMixinRule$1(_, node) { + return this.visitMixinRule$body$_EvaluateVisitor0(0, node); + }, + visitMixinRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, index, t5; + var $async$visitMixinRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_environment; + t2 = t1.closure$0(); + t3 = $async$self._async_evaluate0$_inDependency; + t4 = t1._async_environment0$_mixins; + index = t4.length - 1; + t5 = node.name; + t1._async_environment0$_mixinIndices.$indexSet(0, t5, index); + t4[index].$indexSet(0, t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_AsyncEnvironment_2)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMixinRule$1, $async$completer); + }, + visitLoudComment$1(_, node) { + return this.visitLoudComment$body$_EvaluateVisitor0(0, node); + }, + visitLoudComment$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, text; + var $async$visitLoudComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_inFunction) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root") && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + t1 = node.text; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(t1), $async$visitLoudComment$1); + case 3: + // returning from await. + text = $async$result; + if (!B.JSString_methods.endsWith$1(text, "*/")) + text += " */"; + $async$self._async_evaluate0$_copyParentAfterSibling$0(); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(new A.ModifiableCssComment0(text, t1.span)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitLoudComment$1, $async$completer); + }, + visitMediaRule$1(_, node) { + return this.visitMediaRule$body$_EvaluateVisitor0(0, node); + }, + visitMediaRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, queries, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Media_, node.span)); + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_visitMediaQueries$1(node.query), $async$visitMediaRule$1); + case 3: + // returning from await. + queries = $async$result; + $async$goto = $async$self.get$_async_evaluate0$_hasCssNesting() ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssMediaRule$0(queries, node.span), new A._EvaluateVisitor_visitMediaRule_closure11($async$self, node), false, type$.ModifiableCssMediaRule_2, type$.Null), $async$visitMediaRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + mergedQueries = A.NullableExtension_andThen0($async$self._async_evaluate0$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure12($async$self, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty6; + else { + t2 = $async$self._async_evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = $async$self._async_evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure13($async$self, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure14(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null), $async$visitMediaRule$1); + case 7: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMediaRule$1, $async$completer); + }, + _async_evaluate0$_visitMediaQueries$1(interpolation) { + return this._visitMediaQueries$body$_EvaluateVisitor0(interpolation); + }, + _visitMediaQueries$body$_EvaluateVisitor0(interpolation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.List_CssMediaQuery_2), + $async$returnValue, $async$self = this, _0_0, resolved, map; + var $async$_async_evaluate0$_visitMediaQueries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, true), $async$_async_evaluate0$_visitMediaQueries$1); + case 3: + // returning from await. + _0_0 = $async$result; + resolved = _0_0._0; + map = _0_0._1; + $async$returnValue = new A.MediaQueryParser0(A.SpanScanner$(resolved, null), map).parse$0(0); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitMediaQueries$1, $async$completer); + }, + _async_evaluate0$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, _0_0, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { + t3 = t1.get$current(t1); + for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) { + _0_0 = t3.merge$1(t4.get$current(t4)); + if (B._SingletonCssMediaQueryMergeResult_00 === _0_0) + continue; + if (B._SingletonCssMediaQueryMergeResult_10 === _0_0) + return null; + t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult0; + result = t5 ? _0_0 : null; + if (t5) + queries.push(result.query); + } + } + return queries; + }, + visitReturnRule$1(_, node) { + return this.visitReturnRule$body$_EvaluateVisitor0(0, node); + }, + visitReturnRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1, t2; + var $async$visitReturnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.expression; + t2 = t1.accept$1($async$self); + $async$goto = 3; + return A._asyncAwait(type$.Future_Value_2._is(t2) ? t2 : A._Future$value(t2, type$.Value_2), $async$visitReturnRule$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitReturnRule$1, $async$completer); + }, + visitSilentComment$1(_, node) { + return this.visitSilentComment$body$_EvaluateVisitor0(0, node); + }, + visitSilentComment$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue; + var $async$visitSilentComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSilentComment$1, $async$completer); + }, + visitStyleRule$1(_, node) { + return this.visitStyleRule$body$_EvaluateVisitor0(0, node); + }, + visitStyleRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, _0_0, selectorText, selectorMap, parsedSelector, _1_0, t2, t3, _i, _2_0, first, t4, rule, oldAtRootExcludingStyleRule; + var $async$visitStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_n, node.span)); + else if ($async$self._async_evaluate0$_inKeyframes && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock0) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_k, node.span)); + t1 = node.selector; + t1.toString; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationWithMap$2$warnForColor(t1, true), $async$visitStyleRule$1); + case 3: + // returning from await. + _0_0 = $async$result; + selectorText = _0_0._0; + selectorMap = _0_0._1; + $async$goto = $async$self._async_evaluate0$_inKeyframes ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(new A.CssValue0(A.List_List$unmodifiable(new A.KeyframeSelectorParser0(A.SpanScanner$(selectorText, null), selectorMap).parse$0(0), type$.String), t1.span, type$.CssValue_List_String_2), node.span), new A._EvaluateVisitor_visitStyleRule_closure11($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure12(), type$.ModifiableCssKeyframeBlock_2, type$.Null), $async$visitStyleRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + parsedSelector = A.SelectorList_SelectorList$parse0(selectorText, true, selectorMap, $async$self._async_evaluate0$_logger, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss); + _1_0 = $async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + $label0$0: { + if (_1_0 == null) { + t1 = true; + break $label0$0; + } + if (_1_0.fromPlainCss) { + t1 = false; + break $label0$0; + } + t1 = !($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss && parsedSelector.accept$1(B.C__ContainsParentSelectorVisitor0)); + break $label0$0; + } + if (t1) { + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss) + for (t2 = parsedSelector.components, t3 = t2.length, _i = 0; _i < t3; ++_i) { + _2_0 = t2[_i].leadingCombinators; + if (_2_0.length >= 1) { + first = _2_0[0]; + t4 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss; + } else { + first = null; + t4 = false; + } + if (t4) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Top_le, first.span)); + } + t2 = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t2 = t2 == null ? null : t2.originalSelector; + parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t2, !$async$self._async_evaluate0$_atRootExcludingStyleRule, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss); + } + rule = A.ModifiableCssStyleRule$0($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, $async$self._async_evaluate0$_mediaQueries), node.span, $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss, parsedSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule; + t2 = $async$self._async_evaluate0$_atRootExcludingStyleRule = false; + t1 = t1 ? new A._EvaluateVisitor_visitStyleRule_closure13() : null; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure14($async$self, rule, node), node.hasDeclarations, t1, type$.ModifiableCssStyleRule_2, type$.Null), $async$visitStyleRule$1); + case 7: + // returning from await. + $async$self._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + $async$self._async_evaluate0$_warnForBogusCombinators$1(rule); + if (($async$self._async_evaluate0$_atRootExcludingStyleRule ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot) == null) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = t2; + if (t1) { + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children; + t1.get$last(t1).isGroupEnd = true; + } + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStyleRule$1, $async$completer); + }, + _async_evaluate0$_warnForBogusCombinators$1(rule) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false0)) + for (t1 = rule._style_rule0$_selector._box0$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor0)) { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._async_evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_2PR); + } else if (complex.leadingCombinators.length !== 0) { + if (!_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss) { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._async_evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_2PR); + } + } else { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t7 = complex.accept$1(B._IsBogusVisitor_false0) ? string$.x20It_wi : ""; + t8 = A.SpanExtensions_trimRight0(complex.span); + if (t5.get$length(0) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$x(t5.$index(0, 0)); + _this._async_evaluate0$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan0(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure2()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_2PR); + } + } + }, + visitSupportsRule$1(_, node) { + return this.visitSupportsRule$body$_EvaluateVisitor0(0, node); + }, + visitSupportsRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, rule, $async$temp1, $async$temp2; + var $async$visitSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + $async$temp1 = A; + $async$temp2 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(t1), $async$visitSupportsRule$1); + case 3: + // returning from await. + rule = $async$temp1.ModifiableCssSupportsRule$0(new $async$temp2.CssValue0($async$result, t1.get$span(t1), type$.CssValue_String_2), node.span); + $async$goto = $async$self.get$_async_evaluate0$_hasCssNesting() ? 4 : 5; + break; + case 4: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitSupportsRule_closure8($async$self, node), node.hasDeclarations, type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitSupportsRule$1); + case 6: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 5: + // join + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitSupportsRule_closure9($async$self, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure10(), type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitSupportsRule$1); + case 7: + // returning from await. + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsRule$1, $async$completer); + }, + _async_evaluate0$_visitSupportsCondition$1(condition) { + return this._visitSupportsCondition$body$_EvaluateVisitor0(condition); + }, + _visitSupportsCondition$body$_EvaluateVisitor0(condition) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_visitSupportsCondition$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = condition instanceof A.SupportsOperation0 ? 4 : 5; + break; + case 4: + // then + t1 = condition.operator; + $async$temp1 = A; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$2(condition.left, t1), $async$_async_evaluate0$_visitSupportsCondition$1); + case 6: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + " " + t1.toString$0(0) + " "; + $async$temp2 = A; + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$2(condition.right, t1), $async$_async_evaluate0$_visitSupportsCondition$1); + case 7: + // returning from await. + t1 = $async$temp1 + $async$temp2.S($async$result); + // goto break $label0$0 + $async$goto = 3; + break; + case 5: + // join + $async$goto = condition instanceof A.SupportsNegation0 ? 8 : 9; + break; + case 8: + // then + $async$temp1 = A; + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_parenthesize$1(condition.condition), $async$_async_evaluate0$_visitSupportsCondition$1); + case 10: + // returning from await. + t1 = "not " + $async$temp1.S($async$result); + // goto break $label0$0 + $async$goto = 3; + break; + case 9: + // join + $async$goto = condition instanceof A.SupportsInterpolation0 ? 11 : 12; + break; + case 11: + // then + $async$goto = 13; + return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$2$quote(condition.expression, false), $async$_async_evaluate0$_visitSupportsCondition$1); + case 13: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 12: + // join + t1 = {}; + t1.declaration = null; + $async$goto = condition instanceof A.SupportsDeclaration0 ? 14 : 15; + break; + case 14: + // then + t1.declaration = condition; + $async$goto = 16; + return A._asyncAwait($async$self._async_evaluate0$_withSupportsDeclaration$1$1(new A._EvaluateVisitor__visitSupportsCondition_closure2(t1, $async$self), type$.String), $async$_async_evaluate0$_visitSupportsCondition$1); + case 16: + // returning from await. + t1 = $async$result; + // goto break $label0$0 + $async$goto = 3; + break; + case 15: + // join + $async$goto = condition instanceof A.SupportsFunction0 ? 17 : 18; + break; + case 17: + // then + $async$temp1 = A; + $async$goto = 19; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.name), $async$_async_evaluate0$_visitSupportsCondition$1); + case 19: + // returning from await. + $async$temp1 = $async$temp1.S($async$result) + "("; + $async$temp2 = A; + $async$goto = 20; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.$arguments), $async$_async_evaluate0$_visitSupportsCondition$1); + case 20: + // returning from await. + t1 = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto break $label0$0 + $async$goto = 3; + break; + case 18: + // join + $async$goto = condition instanceof A.SupportsAnything0 ? 21 : 22; + break; + case 21: + // then + $async$temp1 = A; + $async$goto = 23; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(condition.contents), $async$_async_evaluate0$_visitSupportsCondition$1); + case 23: + // returning from await. + t1 = "(" + $async$temp1.S($async$result) + ")"; + // goto break $label0$0 + $async$goto = 3; + break; + case 22: + // join + t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); + case 3: + // break $label0$0 + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitSupportsCondition$1, $async$completer); + }, + _async_evaluate0$_withSupportsDeclaration$1$1(callback, $T) { + return this._withSupportsDeclaration$body$_EvaluateVisitor0(callback, $T, $T); + }, + _withSupportsDeclaration$body$_EvaluateVisitor0(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, t1, oldInSupportsDeclaration; + var $async$_async_evaluate0$_withSupportsDeclaration$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = true; + $async$handler = 3; + t1 = callback.call$0(); + $async$goto = 6; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_withSupportsDeclaration$1$1); + case 6: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + $async$next = [1]; + // goto finally + $async$goto = 4; + break; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [2]; + case 4: + // finally + $async$handler = 2; + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withSupportsDeclaration$1$1, $async$completer); + }, + _async_evaluate0$_parenthesize$2(condition, operator) { + return this._parenthesize$body$_EvaluateVisitor0(condition, operator); + }, + _async_evaluate0$_parenthesize$1(condition) { + return this._async_evaluate0$_parenthesize$2(condition, null); + }, + _parenthesize$body$_EvaluateVisitor0(condition, operator) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, $async$temp1; + var $async$_async_evaluate0$_parenthesize$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (!(condition instanceof A.SupportsNegation0)) + if (condition instanceof A.SupportsOperation0) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + $async$goto = t1 ? 3 : 4; + break; + case 3: + // then + $async$temp1 = A; + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(condition), $async$_async_evaluate0$_parenthesize$2); + case 5: + // returning from await. + $async$returnValue = "(" + $async$temp1.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(condition), $async$_async_evaluate0$_parenthesize$2); + case 6: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_parenthesize$2, $async$completer); + }, + visitVariableDeclaration$1(_, node) { + return this.visitVariableDeclaration$body$_EvaluateVisitor0(0, node); + }, + visitVariableDeclaration$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, _0_0, value, $async$temp1, $async$temp2, $async$temp3; + var $async$visitVariableDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (node.isGuarded) { + if (node.namespace == null && $async$self._async_evaluate0$_environment._async_environment0$_variables.length === 1) { + t1 = node.name; + $async$self._async_evaluate0$_environment._async_environment0$_configurableVariables.add$1(0, t1); + t2 = $async$self._async_evaluate0$_configuration._configuration0$_values; + _0_0 = t2.get$isEmpty(t2) ? null : t2.remove$1(0, t1); + t1 = {}; + t1.override = null; + if (_0_0 != null) { + t1.override = _0_0; + t2 = !_0_0.value.$eq(0, B.C__SassNull0); + } else + t2 = false; + if (t2) { + $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure8(t1, $async$self, node)); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + value = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure9($async$self, node)); + if (value != null && !value.$eq(0, B.C__SassNull0)) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + } + if (node.isGlobal && !$async$self._async_evaluate0$_environment.globalVariableExists$1(node.name)) { + t1 = $async$self._async_evaluate0$_environment._async_environment0$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName0(node.span) + ": null` at the stylesheet root."; + $async$self._async_evaluate0$_warn$3(t1, node.span, B.Deprecation_pwd); + } + t1 = node.expression; + t2 = t1.accept$1($async$self); + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(type$.Future_Value_2._is(t2) ? t2 : A._Future$value(t2, type$.Value_2), $async$visitVariableDeclaration$1); + case 3: + // returning from await. + $async$self._async_evaluate0$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitVariableDeclaration_closure10($async$self, $async$temp3, $async$self._async_evaluate0$_withoutSlash$2($async$result, t1))); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableDeclaration$1, $async$completer); + }, + visitUseRule$1(_, node) { + return this.visitUseRule$body$_EvaluateVisitor0(0, node); + }, + visitUseRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, values, t3, t4, _i, variable, t5, variableNodeWithSpan, t6, configuration, t1, t2, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUseRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.configuration; + t2 = t1.length; + $async$goto = t2 !== 0 ? 3 : 5; + break; + case 3: + // then + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + t3 = type$._Future_Value_2, t4 = type$.Future_Value_2, _i = 0; + case 6: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 8; + break; + } + variable = t1[_i]; + t5 = variable.expression; + variableNodeWithSpan = $async$self._async_evaluate0$_expressionNode$1(t5); + t5 = t5.accept$1($async$self); + if (!t4._is(t5)) { + t6 = new A._Future($.Zone__current, t3); + t6._state = 8; + t6._resultOrListeners = t5; + t5 = t6; + } + $async$temp1 = values; + $async$temp2 = variable.name; + $async$temp3 = A; + $async$goto = 9; + return A._asyncAwait(t5, $async$visitUseRule$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, new $async$temp3.ConfiguredValue0($async$self._async_evaluate0$_withoutSlash$2($async$result, variableNodeWithSpan), variable.span, variableNodeWithSpan)); + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + configuration = new A.ExplicitConfiguration0(node, values, null); + // goto join + $async$goto = 4; + break; + case 5: + // else + configuration = B.Configuration_Map_empty_null0; + case 4: + // join + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure2($async$self, node), configuration), $async$visitUseRule$1); + case 10: + // returning from await. + $async$self._async_evaluate0$_assertConfigurationIsEmpty$1(configuration); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUseRule$1, $async$completer); + }, + visitWarnRule$1(_, node) { + return this.visitWarnRule$body$_EvaluateVisitor0(0, node); + }, + visitWarnRule$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, value, t1, t2; + var $async$visitWarnRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitWarnRule_closure2($async$self, node), type$.Value_2), $async$visitWarnRule$1); + case 3: + // returning from await. + value = $async$result; + t1 = value instanceof A.SassString0 ? value._string0$_text : $async$self._async_evaluate0$_serialize$2(value, node.expression); + t2 = $async$self._async_evaluate0$_stackTrace$1(node.span); + $async$self._async_evaluate0$_logger.internalWarn$4$deprecation$span$trace(t1, null, null, t2); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitWarnRule$1, $async$completer); + }, + visitWhileRule$1(_, node) { + return this._async_evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure2(this, node), true, node.hasDeclarations, type$.nullable_Value_2); + }, + visitBinaryOperationExpression$1(_, node) { + var t1, _this = this; + if (_this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss) { + t1 = node.operator; + t1 = t1 !== B.BinaryOperator_g6F0 && t1 !== B.BinaryOperator_ehp0; + } else + t1 = false; + if (t1) + throw A.wrapException(_this._async_evaluate0$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); + return _this._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure2(_this, node), type$.Value_2); + }, + _async_evaluate0$_slash$3(left, right, node) { + var left0, _1_2, + result = left.dividedBy$1(right), + _1_2_isSet = left instanceof A.SassNumber0, + right0 = null, + t1 = false; + if (_1_2_isSet) { + if (right instanceof A.SassNumber0) { + t1 = node.allowsSlash && this._async_evaluate0$_operandAllowsSlash$1(node.left) && this._async_evaluate0$_operandAllowsSlash$1(node.right); + right0 = right; + } + left0 = left; + _1_2 = right; + } else { + _1_2 = null; + left0 = null; + } + if (t1) + return type$.SassNumber_2._as(result).withSlash$2(left0, right0); + if (left instanceof A.SassNumber0) + t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber0; + else + t1 = false; + if (t1) { + this._async_evaluate0$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation2().call$1(node)) + " or " + A.expressionToCalc0(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_v81); + return result; + } + return result; + }, + _async_evaluate0$_operandAllowsSlash$1(node) { + var t1; + if (node instanceof A.FunctionExpression0) + if (node.namespace == null) { + t1 = node.name; + t1 = B.Set_Pr3yj.contains$1(0, t1.toLowerCase()) && this._async_evaluate0$_environment.getFunction$1(t1) == null; + } else + t1 = false; + else + t1 = true; + return t1; + }, + visitValueExpression$1(_, node) { + return this.visitValueExpression$body$_EvaluateVisitor0(0, node); + }, + visitValueExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue; + var $async$visitValueExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitValueExpression$1, $async$completer); + }, + visitVariableExpression$1(_, node) { + return this.visitVariableExpression$body$_EvaluateVisitor0(0, node); + }, + visitVariableExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result; + var $async$visitVariableExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + result = $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure2($async$self, node)); + if (result != null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined variable.", node.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitVariableExpression$1, $async$completer); + }, + visitUnaryOperationExpression$1(_, node) { + return this.visitUnaryOperationExpression$body$_EvaluateVisitor0(0, node); + }, + visitUnaryOperationExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2, $async$temp3; + var $async$visitUnaryOperationExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = node; + $async$temp2 = A; + $async$temp3 = node; + $async$goto = 3; + return A._asyncAwait(node.operand.accept$1($async$self), $async$visitUnaryOperationExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_addExceptionSpan$2($async$temp1, new $async$temp2._EvaluateVisitor_visitUnaryOperationExpression_closure2($async$temp3, $async$result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitUnaryOperationExpression$1, $async$completer); + }, + visitBooleanExpression$1(_, node) { + return this.visitBooleanExpression$body$_EvaluateVisitor0(0, node); + }, + visitBooleanExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassBoolean_2), + $async$returnValue; + var $async$visitBooleanExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitBooleanExpression$1, $async$completer); + }, + visitIfExpression$1(_, node) { + return this.visitIfExpression$body$_EvaluateVisitor0(0, node); + }, + visitIfExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, results, _i, t7, condition, expression, t8, result, _1_2, $async$temp1, $async$temp2, $async$temp3; + var $async$visitIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.branches, t2 = t1.length, t3 = type$._Future_nullable_Object, t4 = type$._Future_Value_2, t5 = type$.Future_Value_2, t6 = type$.JSArray_Record_2_String_and_Value_2, results = null, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + t7 = t1[_i]; + condition = t7._0; + expression = t7._1; + t7 = condition == null ? null : condition.accept$1($async$self); + if (!(t7 instanceof A._Future)) { + t8 = new A._Future($.Zone__current, t3); + t8._state = 8; + t8._resultOrListeners = t7; + t7 = t8; + } + $async$goto = 6; + return A._asyncAwait(t7, $async$visitIfExpression$1); + case 6: + // returning from await. + result = $async$result; + if (result == null) + result = true; + t7 = typeof result == "string"; + condition = t7 ? result : null; + $async$goto = t7 ? 7 : 8; + break; + case 7: + // then + if (results == null) + results = A._setArrayType([], t6); + t7 = expression.accept$1($async$self); + if (!t5._is(t7)) { + t8 = new A._Future($.Zone__current, t4); + t8._state = 8; + t8._resultOrListeners = t7; + t7 = t8; + } + $async$temp1 = results; + $async$temp2 = A; + $async$temp3 = condition; + $async$goto = 9; + return A._asyncAwait(t7, $async$visitIfExpression$1); + case 9: + // returning from await. + $async$temp1.push(new $async$temp2._Record_2($async$temp3, $async$result)); + // goto for update + $async$goto = 4; + break; + case 8: + // join + _1_2 = true === result; + $async$goto = _1_2 && results != null ? 10 : 11; + break; + case 10: + // then + t7 = expression.accept$1($async$self); + if (!t5._is(t7)) { + t8 = new A._Future($.Zone__current, t4); + t8._state = 8; + t8._resultOrListeners = t7; + t7 = t8; + } + $async$temp1 = results; + $async$temp2 = A; + $async$goto = 12; + return A._asyncAwait(t7, $async$visitIfExpression$1); + case 12: + // returning from await. + $async$temp1.push(new $async$temp2._Record_2("else", $async$result)); + // goto for update + $async$goto = 4; + break; + case 11: + // join + $async$goto = _1_2 ? 13 : 14; + break; + case 13: + // then + t1 = expression.accept$1($async$self); + if (!t5._is(t1)) { + t2 = new A._Future($.Zone__current, t4); + t2._state = 8; + t2._resultOrListeners = t1; + t1 = t2; + } + $async$goto = 15; + return A._asyncAwait(t1, $async$visitIfExpression$1); + case 15: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 14: + // join + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + if (results == null) { + $async$returnValue = B.C__SassNull0; + // goto return + $async$goto = 1; + break; + } + $async$returnValue = new A.SassString0("if(" + new A.MappedListIterable(results, new A._EvaluateVisitor_visitIfExpression_closure2(), A._arrayInstanceType(results)._eval$1("MappedListIterable<1,String>")).join$1(0, "; ") + ")", false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfExpression$1, $async$completer); + }, + visitIfConditionParenthesized$1(_, node) { + return this.visitIfConditionParenthesized$body$_EvaluateVisitor0(0, node); + }, + visitIfConditionParenthesized$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, _0_0; + var $async$visitIfConditionParenthesized$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitIfConditionParenthesized$1); + case 3: + // returning from await. + _0_0 = $async$result; + $label0$0: { + if (typeof _0_0 == "string") { + t1 = "(" + _0_0 + ")"; + break $label0$0; + } + t1 = _0_0; + break $label0$0; + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionParenthesized$1, $async$completer); + }, + visitIfConditionNegation$1(_, node) { + return this.visitIfConditionNegation$body$_EvaluateVisitor0(0, node); + }, + visitIfConditionNegation$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, _0_0; + var $async$visitIfConditionNegation$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitIfConditionNegation$1); + case 3: + // returning from await. + _0_0 = $async$result; + $label0$0: { + if (typeof _0_0 == "string") { + t1 = "not " + _0_0; + break $label0$0; + } + if (A._isBool(_0_0)) { + t1 = !_0_0; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("unreachable")); + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionNegation$1, $async$completer); + }, + visitIfConditionOperation$1(_, node) { + return this.visitIfConditionOperation$body$_EvaluateVisitor0(0, node); + }, + visitIfConditionOperation$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, values, _i, expression, _0_0, t7, right, _1_6_isSet, _1_6, string; + var $async$visitIfConditionOperation$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node.expressions, t2 = t1.length, t3 = node.op, t4 = t3 === B.BooleanOperator_00, t5 = t3 === B.BooleanOperator_10, t6 = type$.JSArray_Record_2_IfConditionExpression_and_String_2, values = null, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + expression = t1[_i]; + $async$goto = 6; + return A._asyncAwait(expression.accept$1($async$self), $async$visitIfConditionOperation$1); + case 6: + // returning from await. + _0_0 = $async$result; + t7 = typeof _0_0 == "string"; + right = t7 ? _0_0 : null; + if (t7) { + if (values == null) + values = A._setArrayType([], t6); + values.push(new A._Record_2(expression, right)); + // goto for update + $async$goto = 4; + break; + } + if (false === _0_0 && t4) { + $async$returnValue = false; + // goto return + $async$goto = 1; + break; + } + if (true === _0_0 && t5) { + $async$returnValue = true; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $label0$1: { + if (values == null) { + t1 = t4; + break $label0$1; + } + _1_6_isSet = values.length === 1; + if (_1_6_isSet) { + _1_6 = values[0]; + t1 = _1_6._0 instanceof A.IfConditionParenthesized0; + } else { + _1_6 = null; + t1 = false; + } + if (t1) { + string = (_1_6_isSet ? _1_6 : values[0])._1; + t1 = B.JSString_methods.substring$2(string, 1, string.length - 1); + break $label0$1; + } + t1 = new A.MappedListIterable(values, new A._EvaluateVisitor_visitIfConditionOperation_closure2(), A._arrayInstanceType(values)._eval$1("MappedListIterable<1,String>")).join$1(0, " " + t3.toString$0(0) + " "); + break $label0$1; + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionOperation$1, $async$completer); + }, + visitIfConditionFunction$1(_, node) { + return this.visitIfConditionFunction$body$_EvaluateVisitor0(0, node); + }, + visitIfConditionFunction$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, $async$temp1, $async$temp2; + var $async$visitIfConditionFunction$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = B.JSString_methods; + $async$temp2 = J; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(node.name), $async$visitIfConditionFunction$1); + case 3: + // returning from await. + $async$temp2 = $async$temp2.$add$ansx($async$result, "("); + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(node.$arguments), $async$visitIfConditionFunction$1); + case 4: + // returning from await. + $async$returnValue = $async$temp1.$add($async$temp2, $async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionFunction$1, $async$completer); + }, + visitIfConditionSass$1(_, node) { + return this.visitIfConditionSass$body$_EvaluateVisitor0(0, node); + }, + visitIfConditionSass$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this; + var $async$visitIfConditionSass$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(node.expression.accept$1($async$self), $async$visitIfConditionSass$1); + case 3: + // returning from await. + $async$returnValue = $async$result.get$isTruthy(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionSass$1, $async$completer); + }, + visitIfConditionRaw$1(_, node) { + return this.visitIfConditionRaw$body$_EvaluateVisitor0(0, node); + }, + visitIfConditionRaw$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this; + var $async$visitIfConditionRaw$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(node.text), $async$visitIfConditionRaw$1); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitIfConditionRaw$1, $async$completer); + }, + visitLegacyIfExpression$1(_, node) { + return this.visitLegacyIfExpression$body$_EvaluateVisitor0(0, node); + }, + visitLegacyIfExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, condition, t1, ifTrue, ifFalse, result, _0_0, positional, named; + var $async$visitLegacyIfExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateMacroArguments$1(node), $async$visitLegacyIfExpression$1); + case 3: + // returning from await. + _0_0 = $async$result; + positional = _0_0._0; + named = _0_0._1; + $async$self._async_evaluate0$_verifyArguments$4(J.get$length$asx(positional), named, $.$get$LegacyIfExpression_declaration0(), node); + condition = A.ListExtensions_elementAtOrNull(positional, 0); + if (condition == null) { + t1 = named.$index(0, "condition"); + t1.toString; + condition = t1; + } + ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); + if (ifTrue == null) { + t1 = named.$index(0, "if-true"); + t1.toString; + ifTrue = t1; + } + ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); + if (ifFalse == null) { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + $async$goto = 4; + return A._asyncAwait(condition.accept$1($async$self), $async$visitLegacyIfExpression$1); + case 4: + // returning from await. + result = $async$result.get$isTruthy() ? ifTrue : ifFalse; + t1 = result.accept$1($async$self); + $async$goto = 5; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$visitLegacyIfExpression$1); + case 5: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, $async$self._async_evaluate0$_expressionNode$1(result)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitLegacyIfExpression$1, $async$completer); + }, + visitNullExpression$1(_, node) { + return this.visitNullExpression$body$_EvaluateVisitor0(0, node); + }, + visitNullExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue; + var $async$visitNullExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = B.C__SassNull0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNullExpression$1, $async$completer); + }, + visitNumberExpression$1(_, node) { + return this.visitNumberExpression$body$_EvaluateVisitor0(0, node); + }, + visitNumberExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue; + var $async$visitNumberExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = A.SassNumber_SassNumber0(node.value, node.unit); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitNumberExpression$1, $async$completer); + }, + visitParenthesizedExpression$1(_, node) { + var _this = this; + return _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._async_evaluate0$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); + }, + visitColorExpression$1(_, node) { + return this.visitColorExpression$body$_EvaluateVisitor0(0, node); + }, + visitColorExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassColor_2), + $async$returnValue; + var $async$visitColorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = node.value; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitColorExpression$1, $async$completer); + }, + visitListExpression$1(_, node) { + return this.visitListExpression$body$_EvaluateVisitor0(0, node); + }, + visitListExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassList_2), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitListExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(A.mapAsync0(node.contents, new A._EvaluateVisitor_visitListExpression_closure2($async$self), type$.Expression_2, type$.Value_2), $async$visitListExpression$1); + case 3: + // returning from await. + $async$returnValue = $async$temp1.SassList$0($async$result, node.separator, node.hasBrackets); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitListExpression$1, $async$completer); + }, + visitMapExpression$1(_, node) { + return this.visitMapExpression$body$_EvaluateVisitor0(0, node); + }, + visitMapExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassMap_2), + $async$returnValue, $async$self = this, t2, t3, _i, t4, key, keyValue, valueValue, oldValueSpan, t1, map, keyNodes; + var $async$visitMapExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = type$.Value_2; + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2); + t2 = node.pairs, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + t4 = t2[_i]; + key = t4._0; + $async$goto = 6; + return A._asyncAwait(key.accept$1($async$self), $async$visitMapExpression$1); + case 6: + // returning from await. + keyValue = $async$result; + $async$goto = 7; + return A._asyncAwait(t4._1.accept$1($async$self), $async$visitMapExpression$1); + case 7: + // returning from await. + valueValue = $async$result; + if (map.containsKey$1(keyValue)) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = key.get$span(key); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t2.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Duplicate key.", t1, "second key", t2, $async$self._async_evaluate0$_stackTrace$1(key.get$span(key)), null)); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, key); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitMapExpression$1, $async$completer); + }, + visitFunctionExpression$1(_, node) { + return this.visitFunctionExpression$body$_EvaluateVisitor0(0, node); + }, + visitFunctionExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t2, _0_0, t3, t4, $name, oldInFunction, result, t1, $function; + var $async$visitFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + $function = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure8($async$self, node)); + t1.$function = $function; + $async$goto = $function == null || B.JSString_methods.startsWith$1(node.originalName, "--") ? 3 : 4; + break; + case 3: + // then + if (node.namespace != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2("Undefined function.", node.span)); + t2 = node.name; + _0_0 = t2.toLowerCase(); + t3 = false; + if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { + t3 = node.$arguments; + t4 = t3.named; + t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure9()); + $name = _0_0; + } else + $name = null; + $async$goto = t3 ? 5 : 6; + break; + case 5: + // then + $async$goto = 7; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, $name), $async$visitFunctionExpression$1); + case 7: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 6: + // join + $async$goto = "calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0 || "calc-size" === _0_0 ? 8 : 9; + break; + case 8: + // then + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculation$1(node), $async$visitFunctionExpression$1); + case 10: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 9: + // join + $function = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__stylesheet, "_stylesheet").plainCss ? null : $async$self._async_evaluate0$_builtInFunctions.$index(0, t2); + t1.$function = $function == null ? new A.PlainCssCallable0(node.originalName) : $function; + case 4: + // join + oldInFunction = $async$self._async_evaluate0$_inFunction; + $async$self._async_evaluate0$_inFunction = true; + $async$goto = 11; + return A._asyncAwait($async$self._async_evaluate0$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure10(t1, $async$self, node), type$.Value_2), $async$visitFunctionExpression$1); + case 11: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitFunctionExpression$1, $async$completer); + }, + _async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { + return this._visitCalculation$body$_EvaluateVisitor0(node, inLegacySassFunction); + }, + _async_evaluate0$_visitCalculation$1(node) { + return this._async_evaluate0$_visitCalculation$2$inLegacySassFunction(node, null); + }, + _visitCalculation$body$_EvaluateVisitor0(node, inLegacySassFunction) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$next = [], $async$self = this, $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, t2, t3, $async$temp1; + var $async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t2 = node.$arguments; + t3 = t2.named; + if (t3.get$isNotEmpty(t3)) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Keywor, node.span)); + else if (t2.rest != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Rest_a, node.span)); + $async$self._async_evaluate0$_checkCalculationArguments$1(node); + t3 = A._setArrayType([], type$.JSArray_Object); + t2 = t2.positional, t4 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t4)) { + // goto after for + $async$goto = 5; + break; + } + $async$temp1 = t3; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction); + case 6: + // returning from await. + $async$temp1.push($async$result); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $arguments = t3; + if ($async$self._async_evaluate0$_inSupportsDeclaration) { + $async$returnValue = new A.SassCalculation0(node.name, A.List_List$unmodifiable($arguments, type$.Object)); + // goto return + $async$goto = 1; + break; + } + oldCallableNode = $async$self._async_evaluate0$_callableNode; + $async$self._async_evaluate0$_callableNode = node; + try { + t1 = null; + t3 = node.name; + _0_0 = t3.toLowerCase(); + $label0$0: { + if ("calc" === _0_0) { + t1 = A.SassCalculation_calc0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sqrt" === _0_0) { + t1 = A.SassCalculation__singleArgument0("sqrt", J.$index$asx($arguments, 0), A.number2__sqrt$closure(), true); + break $label0$0; + } + if ("sin" === _0_0) { + t1 = A.SassCalculation__singleArgument0("sin", J.$index$asx($arguments, 0), A.number2__sin$closure(), false); + break $label0$0; + } + if ("cos" === _0_0) { + t1 = A.SassCalculation__singleArgument0("cos", J.$index$asx($arguments, 0), A.number2__cos$closure(), false); + break $label0$0; + } + if ("tan" === _0_0) { + t1 = A.SassCalculation__singleArgument0("tan", J.$index$asx($arguments, 0), A.number2__tan$closure(), false); + break $label0$0; + } + if ("asin" === _0_0) { + t1 = A.SassCalculation__singleArgument0("asin", J.$index$asx($arguments, 0), A.number2__asin$closure(), true); + break $label0$0; + } + if ("acos" === _0_0) { + t1 = A.SassCalculation__singleArgument0("acos", J.$index$asx($arguments, 0), A.number2__acos$closure(), true); + break $label0$0; + } + if ("atan" === _0_0) { + t1 = A.SassCalculation__singleArgument0("atan", J.$index$asx($arguments, 0), A.number2__atan$closure(), true); + break $label0$0; + } + if ("abs" === _0_0) { + t1 = A.SassCalculation_abs0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("exp" === _0_0) { + t1 = A.SassCalculation_exp0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sign" === _0_0) { + t1 = A.SassCalculation_sign0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("min" === _0_0) { + t1 = A.SassCalculation_min0($arguments); + break $label0$0; + } + if ("max" === _0_0) { + t1 = A.SassCalculation_max0($arguments); + break $label0$0; + } + if ("hypot" === _0_0) { + t1 = A.SassCalculation_hypot0($arguments); + break $label0$0; + } + if ("pow" === _0_0) { + t1 = A.SassCalculation_pow0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("atan2" === _0_0) { + t1 = A.SassCalculation_atan20(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("log" === _0_0) { + t1 = A.SassCalculation_log0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("mod" === _0_0) { + t1 = A.SassCalculation_mod0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("rem" === _0_0) { + t1 = A.SassCalculation_rem0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("round" === _0_0) { + t1 = A.SassCalculation_roundInternal0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2), inLegacySassFunction, node.span, new A._EvaluateVisitor__visitCalculation_closure2($async$self, node)); + break $label0$0; + } + if ("clamp" === _0_0) { + t1 = A.SassCalculation_clamp0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + if ("calc-size" === _0_0) { + t1 = A.SassCalculation_calcSize0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); + t1 = A.throwExpression(t3); + } + t1 = t1; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (B.JSString_methods.contains$1(error.message, "compatible")) + $async$self._async_evaluate0$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace0($async$self._async_evaluate0$_exception$2(error.message, node.span), error, stackTrace); + } else + throw exception; + } finally { + $async$self._async_evaluate0$_callableNode = oldCallableNode; + } + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitCalculation$2$inLegacySassFunction, $async$completer); + }, + _async_evaluate0$_checkCalculationArguments$1(node) { + var t1, _0_0, + check = new A._EvaluateVisitor__checkCalculationArguments_check2(this, node); + $label0$0: { + t1 = node.name; + _0_0 = t1.toLowerCase(); + if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { + check.call$1(1); + break $label0$0; + } + if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { + check.call$0(); + break $label0$0; + } + if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "calc-size" === _0_0) { + check.call$1(2); + break $label0$0; + } + if ("round" === _0_0 || "clamp" === _0_0) { + check.call$1(3); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); + } + }, + _async_evaluate0$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, _0_0, arg, t2, number1, j, number2, t3, t4, t5, t6; + for (i = 0; t1 = args.length, i < t1; ++i) { + _0_0 = args[i]; + if (_0_0 instanceof A.SassNumber0) { + t1 = _0_0.get$hasComplexUnits(); + arg = _0_0; + } else { + arg = null; + t1 = false; + } + if (t1) { + t1 = A.S(arg); + t2 = nodesWithSpans[i]; + throw A.wrapException(this._async_evaluate0$_exception$2("Number " + t1 + " isn't compatible with CSS calculations.", t2.get$span(t2))); + } + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + t1 = number1.toString$0(0); + t2 = number2.toString$0(0); + t3 = nodesWithSpans[i]; + t3 = t3.get$span(t3); + t4 = number1.toString$0(0); + t5 = nodesWithSpans[j]; + t5 = A.LinkedHashMap_LinkedHashMap$_literal([t5.get$span(t5), number2.toString$0(0)], type$.FileSpan, type$.String); + t6 = nodesWithSpans[i]; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(t1 + " and " + t2 + " are incompatible.", t3, t4, t5, this._async_evaluate0$_stackTrace$1(t6.get$span(t6)), null)); + } + } + }, + _async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { + return this._visitCalculationExpression$body$_EvaluateVisitor0(node, inLegacySassFunction); + }, + _visitCalculationExpression$body$_EvaluateVisitor0(node, inLegacySassFunction) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, result, t2, _0_0, _box_0, _1_0, t3, _i, i, t1, inner, $async$temp1; + var $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = node instanceof A.ParenthesizedExpression0; + inner = t1 ? node.expression : null; + $async$goto = t1 ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 5: + // returning from await. + result = $async$result; + $async$returnValue = result instanceof A.SassString0 ? new A.SassString0("(" + result._string0$_text + ")", false) : result; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = node instanceof A.StringExpression0 && node.accept$1(B.C_IsCalculationSafeVisitor0) ? 6 : 7; + break; + case 6: + // then + t1 = node.text; + t2 = t1.get$asPlain(); + _0_0 = t2 == null ? null : t2.toLowerCase(); + if ("pi" === _0_0) { + t1 = A.SassNumber_SassNumber0(3.141592653589793, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("e" === _0_0) { + t1 = A.SassNumber_SassNumber0(2.718281828459045, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("infinity" === _0_0) { + t1 = A.SassNumber_SassNumber0(1 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("-infinity" === _0_0) { + t1 = A.SassNumber_SassNumber0(-1 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + if ("nan" === _0_0) { + t1 = A.SassNumber_SassNumber0(0 / 0, null); + // goto break $label0$0 + $async$goto = 8; + break; + } + $async$temp1 = A; + $async$goto = 9; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(t1), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 9: + // returning from await. + t1 = new $async$temp1.SassString0($async$result, false); + // goto break $label0$0 + $async$goto = 8; + break; + case 8: + // break $label0$0 + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 7: + // join + _box_0 = {}; + _box_0.right = _box_0.left = _box_0.operator = null; + t1 = node instanceof A.BinaryOperationExpression0; + if (t1) { + _box_0.operator = node.operator; + _box_0.left = node.left; + _box_0.right = node.right; + } + $async$goto = t1 ? 10 : 11; + break; + case 10: + // then + $async$self._async_evaluate0$_checkWhitespaceAroundCalculationOperator$1(node); + $async$goto = 12; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure2(_box_0, $async$self, node, inLegacySassFunction), type$.Object), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 12: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 11: + // join + $async$goto = node instanceof A.NumberExpression0 || node instanceof A.VariableExpression0 || node instanceof A.FunctionExpression0 || node instanceof A.LegacyIfExpression0 ? 13 : 14; + break; + case 13: + // then + $async$goto = 15; + return A._asyncAwait(node.accept$1($async$self), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 15: + // returning from await. + _1_0 = $async$result; + $label1$1: { + if (_1_0 instanceof A.SassNumber0) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassCalculation0) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassString0) { + t1 = !_1_0._string0$_hasQuotes; + result = _1_0; + } else { + result = null; + t1 = false; + } + if (t1) { + t1 = result; + break $label1$1; + } + t1 = A.throwExpression($async$self._async_evaluate0$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 14: + // join + $async$goto = node instanceof A.ListExpression0 && !node.hasBrackets && B.ListSeparator_SrV0 === node.separator && node.contents.length >= 2 ? 16 : 17; + break; + case 16: + // then + t1 = A._setArrayType([], type$.JSArray_Object); + t2 = node.contents, t3 = t2.length, _i = 0; + case 18: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 20; + break; + } + $async$temp1 = t1; + $async$goto = 21; + return A._asyncAwait($async$self._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction), $async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction); + case 21: + // returning from await. + $async$temp1.push($async$result); + case 19: + // for update + ++_i; + // goto for condition + $async$goto = 18; + break; + case 20: + // after for + $async$self._async_evaluate0$_checkAdjacentCalculationValues$2(t1, node); + for (i = 0; i < t1.length; ++i) { + t3 = t1[i]; + if (t3 instanceof A.CalculationOperation0 && t2[i] instanceof A.ParenthesizedExpression0) + t1[i] = new A.SassString0("(" + t3.toString$0(0) + ")", false); + } + $async$returnValue = new A.SassString0(B.JSArray_methods.join$1(t1, " "), false); + // goto return + $async$goto = 1; + break; + case 17: + // join + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.This_e, node.get$span(node))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction, $async$completer); + }, + _async_evaluate0$_checkWhitespaceAroundCalculationOperator$1(node) { + var t2, t3, t4, textBetweenOperands, first, last, + t1 = node.operator; + if (t1 !== B.BinaryOperator_jCK0 && t1 !== B.BinaryOperator_tDf0) + return; + t1 = node.left; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = node.right; + t4 = t3.get$span(t3); + if (t2 !== t4.get$file(t4)) + return; + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + if (t2.offset >= t4.get$start(t4).offset) + return; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); + first = textBetweenOperands.charCodeAt(0); + last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) + t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); + else + t1 = true; + if (t1) + throw A.wrapException(this._async_evaluate0$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); + }, + _async_evaluate0$_binaryOperatorToCalculationOperator$2(operator, node) { + var t1; + $label0$0: { + if (B.BinaryOperator_jCK0 === operator) { + t1 = B.CalculationOperator_dpX0; + break $label0$0; + } + if (B.BinaryOperator_tDf0 === operator) { + t1 = B.CalculationOperator_KrC0; + break $label0$0; + } + if (B.BinaryOperator_wkM0 === operator) { + t1 = B.CalculationOperator_LPB0; + break $label0$0; + } + if (B.BinaryOperator_ehp0 === operator) { + t1 = B.CalculationOperator_wFL0; + break $label0$0; + } + t1 = A.throwExpression(this._async_evaluate0$_exception$2(string$.This_o, node.get$operatorSpan())); + } + return t1; + }, + _async_evaluate0$_checkAdjacentCalculationValues$2(elements, node) { + var t1, i, t2, previous, current, previousNode, currentNode, _0_2; + for (t1 = elements.length, i = 1; i < t1; ++i) { + t2 = i - 1; + previous = elements[t2]; + current = elements[i]; + if (previous instanceof A.SassString0 || current instanceof A.SassString0) + continue; + t1 = node.contents; + previousNode = t1[t2]; + currentNode = t1[i]; + if (currentNode instanceof A.UnaryOperationExpression0) { + _0_2 = currentNode.operator; + if (B.UnaryOperator_hCO0 !== _0_2) + t1 = B.UnaryOperator_n2K0 === _0_2; + else + t1 = true; + } else + t1 = false; + if (!t1) + t1 = currentNode instanceof A.NumberExpression0 && currentNode.value < 0; + else + t1 = true; + if (t1) + throw A.wrapException(this._async_evaluate0$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); + else + throw A.wrapException(this._async_evaluate0$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); + } + }, + visitInterpolatedFunctionExpression$1(_, node) { + return this.visitInterpolatedFunctionExpression$body$_EvaluateVisitor0(0, node); + }, + visitInterpolatedFunctionExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result, t1, oldInFunction; + var $async$visitInterpolatedFunctionExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$1(node.name), $async$visitInterpolatedFunctionExpression$1); + case 3: + // returning from await. + t1 = $async$result; + oldInFunction = $async$self._async_evaluate0$_inFunction; + $async$self._async_evaluate0$_inFunction = true; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_addErrorSpan$1$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2($async$self, node, new A.PlainCssCallable0(t1)), type$.Value_2), $async$visitInterpolatedFunctionExpression$1); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_inFunction = oldInFunction; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitInterpolatedFunctionExpression$1, $async$completer); + }, + _async_evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + return this._runUserDefinedCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan, run, $V, $V); + }, + _runUserDefinedCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan, run, $V, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldInDependency, result, evaluated, $name; + var $async$_async_evaluate0$_runUserDefinedCallable$1$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_runUserDefinedCallable$1$4); + case 3: + // returning from await. + evaluated = $async$result; + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldInDependency = $async$self._async_evaluate0$_inDependency; + $async$self._async_evaluate0$_inDependency = callable.inDependency; + $async$goto = 4; + return A._asyncAwait($async$self._async_evaluate0$_withStackFrame$1$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure2($async$self, callable, evaluated, nodeWithSpan, run, $V), $V), $async$_async_evaluate0$_runUserDefinedCallable$1$4); + case 4: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_inDependency = oldInDependency; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runUserDefinedCallable$1$4, $async$completer); + }, + _async_evaluate0$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + return this._runFunctionCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan); + }, + _runFunctionCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, $async$exception, $async$temp1; + var $async$_async_evaluate0$_runFunctionCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = type$.AsyncBuiltInCallable_2._is(callable) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), $async$_async_evaluate0$_runFunctionCallable$3); + case 6: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_withoutSlash$2($async$result, nodeWithSpan); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$goto = type$.UserDefinedCallable_AsyncEnvironment_2._is(callable) ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return A._asyncAwait($async$self._async_evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure2($async$self, callable), type$.Value_2), $async$_async_evaluate0$_runFunctionCallable$3); + case 10: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = callable instanceof A.PlainCssCallable0 ? 11 : 13; + break; + case 11: + // then + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + buffer = new A.StringBuffer(callable.name + "("); + $async$handler = 15; + first = true; + t1 = $arguments.positional, t2 = t1.length, _i = 0; + case 18: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 20; + break; + } + argument = t1[_i]; + if (first) + first = false; + else + buffer._contents += ", "; + t3 = buffer; + $async$temp1 = A; + $async$goto = 21; + return A._asyncAwait($async$self._async_evaluate0$_evaluateToCss$1(argument), $async$_async_evaluate0$_runFunctionCallable$3); + case 21: + // returning from await. + t4 = $async$temp1.S($async$result); + t3._contents += t4; + case 19: + // for update + ++_i; + // goto for condition + $async$goto = 18; + break; + case 20: + // after for + restArg = $arguments.rest; + $async$goto = restArg != null ? 22 : 23; + break; + case 22: + // then + $async$goto = 24; + return A._asyncAwait(restArg.accept$1($async$self), $async$_async_evaluate0$_runFunctionCallable$3); + case 24: + // returning from await. + rest = $async$result; + if (!first) + buffer._contents += ", "; + t1 = buffer; + t2 = $async$self._async_evaluate0$_serialize$2(rest, restArg); + t1._contents += t2; + case 23: + // join + $async$handler = 2; + // goto after finally + $async$goto = 17; + break; + case 15: + // catch + $async$handler = 14; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) + throw $async$exception; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(error._span_exception$_message, J.get$span$x(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); + } else + throw $async$exception; + // goto after finally + $async$goto = 17; + break; + case 14: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 17: + // after finally + t1 = buffer; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + t2 = buffer._contents; + $async$returnValue = new A.SassString0(t2.charCodeAt(0) == 0 ? t2 : t2, false); + // goto return + $async$goto = 1; + break; + // goto join + $async$goto = 12; + break; + case 13: + // else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); + case 12: + // join + case 8: + // join + case 4: + // join + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runFunctionCallable$3, $async$completer); + }, + _async_evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + return this._runBuiltInCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan); + }, + _runBuiltInCallable$body$_EvaluateVisitor0($arguments, callable, nodeWithSpan) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, result, error, stackTrace, namedSet, _0_0, parameters, i, t1, t2, t3, parameter, t4, t5, t6, t7, rest, argumentList, exception, _box_0, evaluated, oldCallableNode, $async$exception; + var $async$_async_evaluate0$_runBuiltInCallable$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_evaluateArguments$1($arguments), $async$_async_evaluate0$_runBuiltInCallable$3); + case 3: + // returning from await. + evaluated = $async$result; + oldCallableNode = $async$self._async_evaluate0$_callableNode; + $async$self._async_evaluate0$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); + _box_0.callback = _box_0.overload = null; + _0_0 = callable.callbackFor$2(J.get$length$asx(evaluated._values[2]), namedSet); + _box_0.overload = _0_0._0; + _box_0.callback = _0_0._1; + $async$self._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure8(_box_0, evaluated, namedSet)); + parameters = _box_0.overload.parameters; + i = J.get$length$asx(evaluated._values[2]), t1 = parameters.length, t2 = type$._Future_Value_2, t3 = type$.Future_Value_2; + case 4: + // for condition + if (!(i < t1)) { + // goto after for + $async$goto = 6; + break; + } + parameter = parameters[i]; + t4 = evaluated._values[2]; + t5 = evaluated._values[0].remove$1(0, parameter.name); + $async$goto = t5 == null ? 7 : 8; + break; + case 7: + // then + t5 = parameter.defaultValue; + t6 = t5.accept$1($async$self); + if (!t3._is(t6)) { + t7 = new A._Future($.Zone__current, t2); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$goto = 9; + return A._asyncAwait(t6, $async$_async_evaluate0$_runBuiltInCallable$3); + case 9: + // returning from await. + t5 = $async$self._async_evaluate0$_withoutSlash$2($async$result, t5); + case 8: + // join + J.add$1$ax(t4, t5); + case 5: + // for update + ++i; + // goto for condition + $async$goto = 4; + break; + case 6: + // after for + if (_box_0.overload.restParameter != null) { + if (J.get$length$asx(evaluated._values[2]) > t1) { + rest = J.sublist$1$ax(evaluated._values[2], t1); + J.removeRange$2$ax(evaluated._values[2], t1, J.get$length$asx(evaluated._values[2])); + } else + rest = B.List_empty23; + t1 = evaluated._values[0]; + argumentList = A.SassArgumentList$0(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_3_undecided0 ? B.ListSeparator_z0K0 : evaluated._values[4]); + J.add$1$ax(evaluated._values[2], argumentList); + } else + argumentList = null; + result = null; + $async$handler = 11; + $async$goto = 14; + return A._asyncAwait($async$self._async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure9(_box_0, evaluated), type$.Value_2), $async$_async_evaluate0$_runBuiltInCallable$3); + case 14: + // returning from await. + result = $async$result; + $async$handler = 2; + // goto after finally + $async$goto = 13; + break; + case 11: + // catch + $async$handler = 10; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassException0) + throw $async$exception; + else { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + A.throwWithTrace0($async$self._async_evaluate0$_exception$2($async$self._async_evaluate0$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); + } + // goto after finally + $async$goto = 13; + break; + case 10: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 13: + // after finally + $async$self._async_evaluate0$_callableNode = oldCallableNode; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated._values[0]; + if (t1.get$isEmpty(t1)) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._argument_list$_wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t1 = evaluated._values[0]; + t1 = t1.get$keys(t1); + t1 = A.pluralize0("parameter", t1.get$length(t1), null); + t2 = evaluated._values[0]; + t2 = t2.get$keys(t2); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + t1 + " named " + A.toSentence0(t2.map$1$1(t2, new A._EvaluateVisitor__runBuiltInCallable_closure10(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), $async$self._async_evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_runBuiltInCallable$3, $async$completer); + }, + _async_evaluate0$_evaluateArguments$1($arguments) { + return this._evaluateArguments$body$_EvaluateVisitor0($arguments); + }, + _evaluateArguments$body$_EvaluateVisitor0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, expression, nodeForSpan, t5, t6, named, namedNodes, $name, value, t7, restArgs, rest, restNodeForSpan, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, positional, positionalNodes, $async$temp1, $async$temp2; + var $async$_async_evaluate0$_evaluateArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + positional = A._setArrayType([], type$.JSArray_Value_2); + positionalNodes = A._setArrayType([], type$.JSArray_AstNode_2); + t1 = $arguments.positional, t2 = t1.length, t3 = type$._Future_Value_2, t4 = type$.Future_Value_2, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + expression = t1[_i]; + nodeForSpan = $async$self._async_evaluate0$_expressionNode$1(expression); + t5 = expression.accept$1($async$self); + if (!t4._is(t5)) { + t6 = new A._Future($.Zone__current, t3); + t6._state = 8; + t6._resultOrListeners = t5; + t5 = t6; + } + $async$temp1 = positional; + $async$goto = 6; + return A._asyncAwait(t5, $async$_async_evaluate0$_evaluateArguments$1); + case 6: + // returning from await. + $async$temp1.push($async$self._async_evaluate0$_withoutSlash$2($async$result, nodeForSpan)); + positionalNodes.push(nodeForSpan); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2); + t2 = type$.AstNode_2; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + t5 = A.MapExtensions_get_pairs0($arguments.named, t1, type$.Expression_2), t5 = t5.get$iterator(t5); + case 7: + // for condition + if (!t5.moveNext$0()) { + // goto after for + $async$goto = 8; + break; + } + t6 = t5.get$current(t5); + $name = t6._0; + value = t6._1; + nodeForSpan = $async$self._async_evaluate0$_expressionNode$1(value); + t6 = value.accept$1($async$self); + if (!t4._is(t6)) { + t7 = new A._Future($.Zone__current, t3); + t7._state = 8; + t7._resultOrListeners = t6; + t6 = t7; + } + $async$temp1 = named; + $async$temp2 = $name; + $async$goto = 9; + return A._asyncAwait(t6, $async$_async_evaluate0$_evaluateArguments$1); + case 9: + // returning from await. + $async$temp1.$indexSet(0, $async$temp2, $async$self._async_evaluate0$_withoutSlash$2($async$result, nodeForSpan)); + namedNodes.$indexSet(0, $name, nodeForSpan); + // goto for condition + $async$goto = 7; + break; + case 8: + // after for + restArgs = $arguments.rest; + if (restArgs == null) { + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_3_undecided0]); + // goto return + $async$goto = 1; + break; + } + $async$goto = 10; + return A._asyncAwait(restArgs.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); + case 10: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure11()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map0$_contents, t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4), t5 = type$.SassString_2; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string0$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_3_undecided0; + } else if (rest instanceof A.SassList0) { + t3 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure12($async$self, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value0>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._list1$_separator; + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure13($async$self, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push($async$self._async_evaluate0$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_3_undecided0; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) { + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + // goto return + $async$goto = 1; + break; + } + $async$goto = 11; + return A._asyncAwait(keywordRestArgs.accept$1($async$self), $async$_async_evaluate0$_evaluateArguments$1); + case 11: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure14()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map0$_contents, t2 = t2.get$keys(t2), t2 = t2.get$iterator(t2), t3 = type$.SassString_2; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string0$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + $async$returnValue = new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateArguments$1, $async$completer); + }, + _async_evaluate0$_evaluateMacroArguments$1(invocation) { + return this._evaluateMacroArguments$body$_EvaluateVisitor0(invocation); + }, + _evaluateMacroArguments$body$_EvaluateVisitor0(invocation) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_List_Expression_and_Map_String_Expression_2), + $async$returnValue, $async$self = this, t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, t1, restArgs_; + var $async$_async_evaluate0$_evaluateMacroArguments$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = invocation.$arguments; + restArgs_ = t1.rest; + if (restArgs_ == null) { + $async$returnValue = new A._Record_2(t1.positional, t1.named); + // goto return + $async$goto = 1; + break; + } + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression_2); + $async$goto = 3; + return A._asyncAwait(restArgs_.accept$1($async$self), $async$_async_evaluate0$_evaluateMacroArguments$1); + case 3: + // returning from await. + rest = $async$result; + restNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap0) + $async$self._async_evaluate0$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure11(restArgs_)); + else if (rest instanceof A.SassList0) { + t2 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure12($async$self, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression0>"))); + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure13($async$self, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression0($async$self._async_evaluate0$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) { + $async$returnValue = new A._Record_2(positional, named); + // goto return + $async$goto = 1; + break; + } + $async$goto = 4; + return A._asyncAwait(keywordRestArgs_.accept$1($async$self), $async$_async_evaluate0$_evaluateMacroArguments$1); + case 4: + // returning from await. + keywordRest = $async$result; + keywordRestNodeForSpan = $async$self._async_evaluate0$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap0) { + $async$self._async_evaluate0$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure14($async$self, keywordRestNodeForSpan, keywordRestArgs_)); + $async$returnValue = new A._Record_2(positional, named); + // goto return + $async$goto = 1; + break; + } else + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateMacroArguments$1, $async$completer); + }, + _async_evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map0$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure2(this, values, convert, this._async_evaluate0$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _async_evaluate0$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._async_evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _async_evaluate0$_verifyArguments$4(positional, named, parameters, nodeWithSpan) { + return this._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure2(parameters, positional, named)); + }, + visitSelectorExpression$1(_, node) { + return this.visitSelectorExpression$body$_EvaluateVisitor0(0, node); + }, + visitSelectorExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1; + var $async$visitSelectorExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + $async$returnValue = t1 == null ? B.C__SassNull0 : t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSelectorExpression$1, $async$completer); + }, + visitStringExpression$1(_, node) { + return this.visitStringExpression$body$_EvaluateVisitor0(0, node); + }, + visitStringExpression$body$_EvaluateVisitor0(_, node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString_2), + $async$returnValue, $async$self = this, t1, t2, t3, _i, value, t4, _0_0, text, oldInSupportsDeclaration; + var $async$visitStringExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = false; + t1 = A._setArrayType([], type$.JSArray_String); + t2 = node.text.contents, t3 = t2.length, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + value = t2[_i]; + if (typeof value == "string") { + t4 = value; + // goto break $label0$0 + $async$goto = 6; + break; + } + $async$goto = value instanceof A.Expression0 ? 7 : 8; + break; + case 7: + // then + $async$goto = 9; + return A._asyncAwait(value.accept$1($async$self), $async$visitStringExpression$1); + case 9: + // returning from await. + _0_0 = $async$result; + $label1$1: { + if (_0_0 instanceof A.SassString0) { + text = _0_0._string0$_text; + t4 = text; + break $label1$1; + } + t4 = $async$self._async_evaluate0$_serialize$3$quote(_0_0, value, false); + break $label1$1; + } + // goto break $label0$0 + $async$goto = 6; + break; + case 8: + // join + t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); + case 6: + // break $label0$0 + t1.push(t4); + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + t1 = B.JSArray_methods.join$0(t1); + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A.SassString0(t1, node.hasQuotes); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitStringExpression$1, $async$completer); + }, + visitSupportsExpression$1(_, expression) { + return this.visitSupportsExpression$body$_EvaluateVisitor0(0, expression); + }, + visitSupportsExpression$body$_EvaluateVisitor0(_, expression) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassString_2), + $async$returnValue, $async$self = this, $async$temp1; + var $async$visitSupportsExpression$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_visitSupportsCondition$1(expression.condition), $async$visitSupportsExpression$1); + case 3: + // returning from await. + $async$returnValue = new $async$temp1.SassString0($async$result, false); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitSupportsExpression$1, $async$completer); + }, + visitCssAtRule$1(node) { + return this.visitCssAtRule$body$_EvaluateVisitor0(node); + }, + visitCssAtRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, wasInKeyframes, wasInUnknownAtRule, t1, rule; + var $async$visitCssAtRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + $async$self._async_evaluate0$_copyParentAfterSibling$0(); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0(node.name, node.span, true, node.value)); + // goto return + $async$goto = 1; + break; + } + wasInKeyframes = $async$self._async_evaluate0$_inKeyframes; + wasInUnknownAtRule = $async$self._async_evaluate0$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor0(t1.value) === "keyframes") + $async$self._async_evaluate0$_inKeyframes = true; + else + $async$self._async_evaluate0$_inUnknownAtRule = true; + rule = A.ModifiableCssAtRule$0(t1, node.span, false, node.value); + $async$goto = $async$self.get$_async_evaluate0$_hasCssNesting() ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitCssAtRule_closure8($async$self, node), false, type$.ModifiableCssAtRule_2, type$.Null), $async$visitCssAtRule$1); + case 5: + // returning from await. + $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssAtRule_closure9($async$self, node), false, new A._EvaluateVisitor_visitCssAtRule_closure10(), type$.ModifiableCssAtRule_2, type$.Null), $async$visitCssAtRule$1); + case 6: + // returning from await. + $async$self._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + $async$self._async_evaluate0$_inKeyframes = wasInKeyframes; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssAtRule$1, $async$completer); + }, + visitCssComment$1(node) { + return this.visitCssComment$body$_EvaluateVisitor0(node); + }, + visitCssComment$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssComment$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") === $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root") && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + $async$self._async_evaluate0$_copyParentAfterSibling$0(); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(new A.ModifiableCssComment0(node.text, node.span)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssComment$1, $async$completer); + }, + visitCssDeclaration$1(node) { + return this.visitCssDeclaration$body$_EvaluateVisitor0(node); + }, + visitCssDeclaration$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssDeclaration$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate0$_copyParentAfterSibling$0(); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$0(node.name, node.value, node.span, node.parsedAsSassScript, node.valueSpanForMap)); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssDeclaration$1, $async$completer); + }, + visitCssImport$1(node) { + return this.visitCssImport$body$_EvaluateVisitor0(node); + }, + visitCssImport$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, modifiableNode; + var $async$visitCssImport$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + modifiableNode = new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") !== $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root")) { + $async$self._async_evaluate0$_copyParentAfterSibling$0(); + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").addChild$1(modifiableNode); + } else if ($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") === J.get$length$asx($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").children._collection$_source)) { + $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__root, "_root").addChild$1(modifiableNode); + $async$self._async_evaluate0$__endOfImports = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__endOfImports, "_endOfImports") + 1; + } else { + t1 = $async$self._async_evaluate0$_outOfOrderImports; + (t1 == null ? $async$self._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(modifiableNode); + } + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssImport$1, $async$completer); + }, + visitCssKeyframeBlock$1(node) { + return this.visitCssKeyframeBlock$body$_EvaluateVisitor0(node); + }, + visitCssKeyframeBlock$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$visitCssKeyframeBlock$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure5($async$self, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure6(), type$.ModifiableCssKeyframeBlock_2, type$.Null), $async$visitCssKeyframeBlock$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssKeyframeBlock$1, $async$completer); + }, + visitCssMediaRule$1(node) { + return this.visitCssMediaRule$body$_EvaluateVisitor0(node); + }, + visitCssMediaRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, mergedQueries, t1, mergedSources, t2, t3; + var $async$visitCssMediaRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Media_, node.span)); + $async$goto = $async$self.get$_async_evaluate0$_hasCssNesting() ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssMediaRule$0(node.queries, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure11($async$self, node), false, type$.ModifiableCssMediaRule_2, type$.Null), $async$visitCssMediaRule$1); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + mergedQueries = A.NullableExtension_andThen0($async$self._async_evaluate0$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure12($async$self, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) { + // goto return + $async$goto = 1; + break; + } + if (t1) + mergedSources = B.Set_empty6; + else { + t2 = $async$self._async_evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = $async$self._async_evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure13($async$self, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure14(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null), $async$visitCssMediaRule$1); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssMediaRule$1, $async$completer); + }, + visitCssStyleRule$1(node) { + return this.visitCssStyleRule$body$_EvaluateVisitor0(node); + }, + visitCssStyleRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, styleRule, _0_0, t2, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _1_1, lastChild; + var $async$visitCssStyleRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_n, node.span)); + else if ($async$self._async_evaluate0$_inKeyframes && $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent") instanceof A.ModifiableCssKeyframeBlock0) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Style_k, node.span)); + t1 = $async$self._async_evaluate0$_atRootExcludingStyleRule; + styleRule = t1 ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + _0_0 = t1 ? null : $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + $label0$0: { + if (_0_0 == null) { + t1 = true; + break $label0$0; + } + if (_0_0.fromPlainCss) { + t1 = false; + break $label0$0; + } + t1 = !(node.fromPlainCss && node._style_rule0$_selector._box0$_inner.value.accept$1(B.C__ContainsParentSelectorVisitor0)); + break $label0$0; + } + t2 = node._style_rule0$_selector._box0$_inner; + if (t1) { + t2 = t2.value; + t3 = styleRule == null ? null : styleRule.originalSelector; + originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !$async$self._async_evaluate0$_atRootExcludingStyleRule, node.fromPlainCss); + } else + originalSelector = t2.value; + rule = A.ModifiableCssStyleRule$0($async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__extensionStore, "_extensionStore").addSelector$2(originalSelector, $async$self._async_evaluate0$_mediaQueries), node.span, node.fromPlainCss, originalSelector); + oldAtRootExcludingStyleRule = $async$self._async_evaluate0$_atRootExcludingStyleRule; + $async$self._async_evaluate0$_atRootExcludingStyleRule = false; + t1 = t1 ? new A._EvaluateVisitor_visitCssStyleRule_closure5() : null; + $async$goto = 2; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure6($async$self, rule, node), false, t1, type$.ModifiableCssStyleRule_2, type$.Null), $async$visitCssStyleRule$1); + case 2: + // returning from await. + $async$self._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + t1 = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent").children._collection$_source; + t2 = J.getInterceptor$asx(t1); + _1_1 = t2.get$length(t1); + if (_1_1 >= 1) { + lastChild = t2.elementAt$1(t1, _1_1 - 1); + t1 = styleRule == null; + } else { + lastChild = null; + t1 = false; + } + if (t1) + lastChild.isGroupEnd = true; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStyleRule$1, $async$completer); + }, + visitCssStylesheet$1(node) { + return this.visitCssStylesheet$body$_EvaluateVisitor0(node); + }, + visitCssStylesheet$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$visitCssStylesheet$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.get$iterator$ax(node.get$children(node)); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + $async$goto = 4; + return A._asyncAwait(t1.get$current(t1).accept$1($async$self), $async$visitCssStylesheet$1); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssStylesheet$1, $async$completer); + }, + visitCssSupportsRule$1(node) { + return this.visitCssSupportsRule$body$_EvaluateVisitor0(node); + }, + visitCssSupportsRule$body$_EvaluateVisitor0(node) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, rule; + var $async$visitCssSupportsRule$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if ($async$self._async_evaluate0$_declarationName != null) + throw A.wrapException($async$self._async_evaluate0$_exception$2(string$.Suppor, node.span)); + rule = A.ModifiableCssSupportsRule$0(node.condition, node.span); + $async$goto = $async$self.get$_async_evaluate0$_hasCssNesting() ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitCssSupportsRule_closure8($async$self, node), false, type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitCssSupportsRule$1); + case 5: + // returning from await. + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$goto = 6; + return A._asyncAwait($async$self._async_evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssSupportsRule_closure9($async$self, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure10(), type$.ModifiableCssSupportsRule_2, type$.Null), $async$visitCssSupportsRule$1); + case 6: + // returning from await. + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$visitCssSupportsRule$1, $async$completer); + }, + _async_evaluate0$_handleReturn$1$2(list, callback) { + return this._handleReturn$body$_EvaluateVisitor0(list, callback); + }, + _async_evaluate0$_handleReturn$2(list, callback) { + return this._async_evaluate0$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _handleReturn$body$_EvaluateVisitor0(list, callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, t1, _i, _0_0; + var $async$_async_evaluate0$_handleReturn$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = list.length, _i = 0; + case 3: + // for condition + if (!(_i < list.length)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(callback.call$1(list[_i]), $async$_async_evaluate0$_handleReturn$1$2); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_handleReturn$1$2, $async$completer); + }, + _async_evaluate0$_withEnvironment$1$2(environment, callback, $T) { + return this._withEnvironment$body$_EvaluateVisitor0(environment, callback, $T, $T); + }, + _withEnvironment$body$_EvaluateVisitor0(environment, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldEnvironment; + var $async$_async_evaluate0$_withEnvironment$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldEnvironment = $async$self._async_evaluate0$_environment; + $async$self._async_evaluate0$_environment = environment; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withEnvironment$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_environment = oldEnvironment; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withEnvironment$1$2, $async$completer); + }, + _async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + return this._interpolationToValue$body$_EvaluateVisitor0(interpolation, trim, warnForColor); + }, + _async_evaluate0$_interpolationToValue$1(interpolation) { + return this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _async_evaluate0$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _interpolationToValue$body$_EvaluateVisitor0(interpolation, trim, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.CssValue_String_2), + $async$returnValue, $async$self = this, result, t1; + var $async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor), $async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor); + case 3: + // returning from await. + result = $async$result; + t1 = trim ? A.trimAscii0(result, true) : result; + $async$returnValue = new A.CssValue0(t1, interpolation.span, type$.CssValue_String_2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_interpolationToValue$3$trim$warnForColor, $async$completer); + }, + _async_evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolation$body$_EvaluateVisitor0(interpolation, warnForColor); + }, + _async_evaluate0$_performInterpolation$1(interpolation) { + return this._async_evaluate0$_performInterpolation$2$warnForColor(interpolation, false); + }, + _performInterpolation$body$_EvaluateVisitor0(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this; + var $async$_async_evaluate0$_performInterpolation$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor), $async$_async_evaluate0$_performInterpolation$2$warnForColor); + case 3: + // returning from await. + $async$returnValue = $async$result._0; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_performInterpolation$2$warnForColor, $async$completer); + }, + _async_evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { + return this._performInterpolationWithMap$body$_EvaluateVisitor0(interpolation, true); + }, + _performInterpolationWithMap$body$_EvaluateVisitor0(interpolation, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_InterpolationMap_2), + $async$returnValue, $async$self = this, _0_0, result, map; + var $async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), $async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor); + case 3: + // returning from await. + _0_0 = $async$result; + result = _0_0._0; + map = _0_0._1; + map.toString; + $async$returnValue = new A._Record_2(result, map); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_performInterpolationWithMap$2$warnForColor, $async$completer); + }, + _async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { + return this._performInterpolationHelper$body$_EvaluateVisitor0(interpolation, sourceMap, warnForColor); + }, + _performInterpolationHelper$body$_EvaluateVisitor0(interpolation, sourceMap, warnForColor) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_String_and_nullable_InterpolationMap_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, t5, t6, first, _i, t7, value, result, result0, t8, targetOffsets, oldInSupportsDeclaration; + var $async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + targetOffsets = sourceMap ? A._setArrayType([], type$.JSArray_int) : null; + oldInSupportsDeclaration = $async$self._async_evaluate0$_inSupportsDeclaration; + $async$self._async_evaluate0$_inSupportsDeclaration = false; + t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression_2, t4 = targetOffsets == null, t5 = interpolation.span, t6 = type$.Object, first = true, _i = 0, t7 = ""; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + value = t1[_i]; + if (!first) + if (!t4) + targetOffsets.push(t7.length); + if (typeof value == "string") { + t7 += value; + // goto for update + $async$goto = 4; + break; + } + t3._as(value); + $async$goto = 6; + return A._asyncAwait(value.accept$1($async$self), $async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor); + case 6: + // returning from await. + result = $async$result; + if (warnForColor && $.$get$namesByColor0().containsKey$1(result)) { + result0 = A.List_List$from([""], false, t6); + result0.$flags = 3; + t8 = $.$get$namesByColor0(); + $async$self._async_evaluate0$_warn$2(string$.You_pr + A.S(t8.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t8.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression0(B.BinaryOperator_jCK0, new A.StringExpression0(new A.Interpolation0(result0, B.List_null, t5), true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + t7 += $async$self._async_evaluate0$_serialize$3$quote(result, value, false); + case 4: + // for update + ++_i, first = false; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$self._async_evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + $async$returnValue = new A._Record_2(t7.charCodeAt(0) == 0 ? t7 : t7, A.NullableExtension_andThen0(targetOffsets, new A._EvaluateVisitor__performInterpolationHelper_closure2(interpolation))); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor, $async$completer); + }, + _async_evaluate0$_evaluateToCss$2$quote(expression, quote) { + return this._evaluateToCss$body$_EvaluateVisitor0(expression, quote); + }, + _async_evaluate0$_evaluateToCss$1(expression) { + return this._async_evaluate0$_evaluateToCss$2$quote(expression, true); + }, + _evaluateToCss$body$_EvaluateVisitor0(expression, quote) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1; + var $async$_async_evaluate0$_evaluateToCss$2$quote = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = expression.accept$1($async$self); + $async$goto = 3; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$_async_evaluate0$_evaluateToCss$2$quote); + case 3: + // returning from await. + $async$returnValue = $async$self._async_evaluate0$_serialize$3$quote($async$result, expression, quote); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_evaluateToCss$2$quote, $async$completer); + }, + _async_evaluate0$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._async_evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure2(value, quote)); + }, + _async_evaluate0$_serialize$2(value, nodeWithSpan) { + return this._async_evaluate0$_serialize$3$quote(value, nodeWithSpan, true); + }, + _async_evaluate0$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression0) { + t1 = this._async_evaluate0$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure2(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + return this._withParent$body$_EvaluateVisitor0(node, callback, scopeWhen, through, $S, $T, $T); + }, + _async_evaluate0$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _async_evaluate0$_withParent$2$2(node, callback, $S, $T) { + return this._async_evaluate0$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _withParent$body$_EvaluateVisitor0(node, callback, scopeWhen, through, $S, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldParent, result; + var $async$_async_evaluate0$_withParent$2$4$scopeWhen$through = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$self._async_evaluate0$_addChild$2$through(node, through); + oldParent = $async$self._async_evaluate0$_assertInModule$2($async$self._async_evaluate0$__parent, "__parent"); + $async$self._async_evaluate0$__parent = node; + $async$goto = 3; + return A._asyncAwait($async$self._async_evaluate0$_environment.scope$1$2$when(callback, scopeWhen, $T), $async$_async_evaluate0$_withParent$2$4$scopeWhen$through); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$__parent = oldParent; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withParent$2$4$scopeWhen$through, $async$completer); + }, + _async_evaluate0$_copyParentAfterSibling$0() { + var t1, grandparent, newParent, _this = this, + _s8_ = "__parent", + _0_0 = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__parent, _s8_)._node$_parent; + if (_0_0 != null) { + t1 = _0_0.children; + t1 = t1.get$last(t1) !== _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__parent, _s8_); + grandparent = _0_0; + } else { + grandparent = null; + t1 = false; + } + if (t1) { + newParent = _this._async_evaluate0$_assertInModule$2(_this._async_evaluate0$__parent, _s8_).copyWithoutChildren$0(); + grandparent.addChild$1(newParent); + _this._async_evaluate0$__parent = newParent; + } + }, + _async_evaluate0$_addChild$2$through(node, through) { + var _0_0, grandparent, t1, + $parent = this._async_evaluate0$_assertInModule$2(this._async_evaluate0$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = _0_0) { + _0_0 = $parent._node$_parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + grandparent = $parent._node$_parent; + t1 = grandparent.children; + if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) + $parent = type$.ModifiableCssParentNode_2._as(t1.get$last(t1)); + else { + $parent = $parent.copyWithoutChildren$0(); + grandparent.addChild$1($parent); + } + } + } + $parent.addChild$1(node); + }, + _async_evaluate0$_addChild$1(node) { + return this._async_evaluate0$_addChild$2$through(node, null); + }, + _async_evaluate0$_withStyleRule$1$2(rule, callback, $T) { + return this._withStyleRule$body$_EvaluateVisitor0(rule, callback, $T, $T); + }, + _withStyleRule$body$_EvaluateVisitor0(rule, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldRule; + var $async$_async_evaluate0$_withStyleRule$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldRule = $async$self._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$self._async_evaluate0$_styleRuleIgnoringAtRoot = rule; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withStyleRule$1$2); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_styleRuleIgnoringAtRoot = oldRule; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withStyleRule$1$2, $async$completer); + }, + _async_evaluate0$_withMediaQueries$1$3(queries, sources, callback, $T) { + return this._withMediaQueries$body$_EvaluateVisitor0(queries, sources, callback, $T, $T); + }, + _withMediaQueries$body$_EvaluateVisitor0(queries, sources, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, result, oldMediaQueries, oldSources; + var $async$_async_evaluate0$_withMediaQueries$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + oldMediaQueries = $async$self._async_evaluate0$_mediaQueries; + oldSources = $async$self._async_evaluate0$_mediaQuerySources; + $async$self._async_evaluate0$_mediaQueries = queries; + $async$self._async_evaluate0$_mediaQuerySources = sources; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withMediaQueries$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_mediaQueries = oldMediaQueries; + $async$self._async_evaluate0$_mediaQuerySources = oldSources; + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withMediaQueries$1$3, $async$completer); + }, + _async_evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback, $T) { + return this._withStackFrame$body$_EvaluateVisitor0(member, nodeWithSpan, callback, $T, $T); + }, + _withStackFrame$body$_EvaluateVisitor0(member, nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, oldMember, result, t1; + var $async$_async_evaluate0$_withStackFrame$1$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._async_evaluate0$_stack; + t1.push(new A._Record_2($async$self._async_evaluate0$_member, nodeWithSpan)); + oldMember = $async$self._async_evaluate0$_member; + $async$self._async_evaluate0$_member = member; + $async$goto = 3; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_withStackFrame$1$3); + case 3: + // returning from await. + result = $async$result; + $async$self._async_evaluate0$_member = oldMember; + t1.pop(); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_withStackFrame$1$3, $async$completer); + }, + _async_evaluate0$_withoutSlash$2(value, nodeForSpan) { + var t1; + if (value instanceof A.SassNumber0) + t1 = value.asSlash != null; + else + t1 = false; + if (t1) + this._async_evaluate0$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation2().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_v81); + return value.withoutSlash$0(); + }, + _async_evaluate0$_stackFrame$2(member, span) { + return A.frameForSpan0(span, member, A.NullableExtension_andThen0(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure2(this))); + }, + _async_evaluate0$_stackTrace$1(span) { + var t2, t3, _i, t4, nodeWithSpan, _this = this, + t1 = A._setArrayType([], type$.JSArray_Frame); + for (t2 = _this._async_evaluate0$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = t2[_i]; + nodeWithSpan = t4._1; + t1.push(_this._async_evaluate0$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); + } + if (span != null) + t1.push(_this._async_evaluate0$_stackFrame$2(_this._async_evaluate0$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); + }, + _async_evaluate0$_stackTrace$0() { + return this._async_evaluate0$_stackTrace$1(null); + }, + _async_evaluate0$_warn$3(message, span, deprecation) { + var trace, t1, _this = this; + if (_this._async_evaluate0$_quietDeps && _this._async_evaluate0$_inDependency) + return; + if (!_this._async_evaluate0$_warningsEmitted.add$1(0, new A._Record_2(message, span))) + return; + trace = _this._async_evaluate0$_stackTrace$1(span); + t1 = _this._async_evaluate0$_logger; + if (deprecation == null) + t1.internalWarn$4$deprecation$span$trace(message, null, span, trace); + else + A.WarnForDeprecation_warnForDeprecation0(t1, deprecation, message, span, trace); + }, + _async_evaluate0$_warn$2(message, span) { + return this._async_evaluate0$_warn$3(message, span, null); + }, + _async_evaluate0$_exception$2(message, span) { + var t1, t2; + if (span == null) { + t1 = B.JSArray_methods.get$last(this._async_evaluate0$_stack)._1; + t1 = t1.get$span(t1); + } else + t1 = span; + t2 = this._async_evaluate0$_stackTrace$1(span); + return new A.SassRuntimeException0(t2, B.Set_empty, message, t1); + }, + _async_evaluate0$_exception$1(message) { + return this._async_evaluate0$_exception$2(message, null); + }, + _async_evaluate0$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = B.JSArray_methods.get$last(this._async_evaluate0$_stack)._1; + return A.MultiSpanSassRuntimeException$0(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._async_evaluate0$_stackTrace$0(), null); + }, + _async_evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, + addStackFrame = true; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace0(t1.withTrace$1(this._async_evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw exception; + } + }, + _async_evaluate0$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._async_evaluate0$_addExceptionSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, $T) { + return this._addExceptionSpanAsync$body$_EvaluateVisitor0(nodeWithSpan, callback, addStackFrame, $T, $T); + }, + _async_evaluate0$_addExceptionSpanAsync$1$2(nodeWithSpan, callback, $T) { + return this._async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(nodeWithSpan, callback, true, $T); + }, + _addExceptionSpanAsync$body$_EvaluateVisitor0(nodeWithSpan, callback, addStackFrame, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, error, stackTrace, t1, exception, $async$exception; + var $async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = callback.call$0(); + $async$goto = 7; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace0(t1.withTrace$1($async$self._async_evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame, $async$completer); + }, + _async_evaluate0$_addExceptionTrace$1$1(callback, $T) { + return this._addExceptionTrace$body$_EvaluateVisitor0(callback, $T, $T); + }, + _addExceptionTrace$body$_EvaluateVisitor0(callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, error, stackTrace, t1, exception, t2, $async$exception; + var $async$_async_evaluate0$_addExceptionTrace$1$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + t1 = callback.call$0(); + $async$goto = 7; + return A._asyncAwait($T._eval$1("Future<0>")._is(t1) ? t1 : A._Future$value(t1, $T), $async$_async_evaluate0$_addExceptionTrace$1$1); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t1)) + throw $async$exception; + else if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + t1 = error; + t2 = J.getInterceptor$x(t1); + A.throwWithTrace0(error.withTrace$1($async$self._async_evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addExceptionTrace$1$1, $async$completer); + }, + _async_evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback, $T) { + return this._addErrorSpan$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $T); + }, + _addErrorSpan$body$_EvaluateVisitor0(nodeWithSpan, callback, $T, $async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$self = this, error, stackTrace, t1, exception, t2, t3, $async$exception; + var $async$_async_evaluate0$_addErrorSpan$1$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$handler = 4; + $async$goto = 7; + return A._asyncAwait(callback.call$0(), $async$_async_evaluate0$_addErrorSpan$1$2); + case 7: + // returning from await. + t1 = $async$result; + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + $async$handler = 2; + // goto after finally + $async$goto = 6; + break; + case 4: + // catch + $async$handler = 3; + $async$exception = $async$errorStack.pop(); + t1 = A.unwrapException($async$exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException($async$exception); + if (!B.JSString_methods.startsWith$1(J.get$span$x(error).get$text(), "@error")) + throw $async$exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = $async$self._async_evaluate0$_stackTrace$0(); + A.throwWithTrace0(new A.SassRuntimeException0(t3, B.Set_empty, t1, t2), error, stackTrace); + } else + throw $async$exception; + // goto after finally + $async$goto = 6; + break; + case 3: + // uncaught + // goto rethrow + $async$goto = 2; + break; + case 6: + // after finally + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + case 2: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$_async_evaluate0$_addErrorSpan$1$2, $async$completer); + }, + _async_evaluate0$_getErrorMessage$1(error) { + var t1, exception; + if (type$.Error._is(error)) + return error.toString$0(0); + try { + t1 = A._asString(J.get$message$x(error)); + return t1; + } catch (exception) { + t1 = J.toString$0$(error); + return t1; + } + }, + $isExpressionVisitor: 1, + $isIfConditionExpressionVisitor: 1, + $isStatementVisitor: 1 + }; + A._EvaluateVisitor_closure38.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure39.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._async_evaluate0$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-")) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure40.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate0$_environment; + t3 = variable._string0$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string0$_text) != null || t1._async_evaluate0$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure41.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._async_evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string0$_text) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure42.prototype = { + call$1($arguments) { + var t1 = this.$this._async_evaluate0$_environment; + if (!t1._async_environment0$_inMixin) + throw A.wrapException(A.SassScriptException$0(string$.conten, null)); + return t1._async_environment0$_content != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure43.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._async_evaluate0$_environment._async_environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, true), t4._1); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure44.prototype = { + call$1($arguments) { + var t3, t4, t5, + t1 = this.$this, + t2 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = t1._async_evaluate0$_environment._async_environment0$_modules.$index(0, t2); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t2 + '".'); + t2 = type$.Value_2; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t4 = A.MapExtensions_get_pairs0(module.get$functions(module), type$.String, type$.AsyncCallable_2), t4 = t4.get$iterator(t4), t1 = t1._async_evaluate0$_compileContext; t4.moveNext$0();) { + t5 = t4.get$current(t4); + t3.$indexSet(0, new A.SassString0(t5._0, true), new A.SassFunction0(t5._1, t1)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t3, t2, t2)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure45.prototype = { + call$1($arguments) { + var t3, t4, t5, + t1 = this.$this, + t2 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = t1._async_evaluate0$_environment._async_environment0$_modules.$index(0, t2); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t2 + '".'); + t2 = type$.Value_2; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t4 = A.MapExtensions_get_pairs0(module.get$mixins(), type$.String, type$.AsyncCallable_2), t4 = t4.get$iterator(t4), t1 = t1._async_evaluate0$_compileContext; t4.moveNext$0();) { + t5 = t4.get$current(t4); + t3.$indexSet(0, new A.SassString0(t5._0, true), new A.SassMixin0(t5._1, t1)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t3, t2, t2)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure46.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css) { + if (module != null) + throw A.wrapException(string$.x24css_a); + return new A.SassFunction0(new A.PlainCssCallable0($name._string0$_text), this.$this._async_evaluate0$_compileContext); + } + t1 = this.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + callable = t1._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure14(t1, $name, module)); + if (callable == null) + throw A.wrapException("Function not found: " + $name.toString$0(0)); + return new A.SassFunction0(callable, t1._async_evaluate0$_compileContext); + }, + $signature: 207 + }; + A._EvaluateVisitor__closure14.prototype = { + call$0() { + var local, + normalizedName = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t1 = this.module, + namespace = t1 == null ? null : t1._string0$_text; + t1 = this.$this; + local = t1._async_evaluate0$_environment.getFunction$2$namespace(normalizedName, namespace); + if (local != null || namespace != null) + return local; + return t1._async_evaluate0$_builtInFunctions.$index(0, normalizedName); + }, + $signature: 96 + }; + A._EvaluateVisitor_closure47.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + callable = t1._async_evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure13(t1, $name, module)); + if (callable == null) + throw A.wrapException("Mixin not found: " + $name.toString$0(0)); + return new A.SassMixin0(callable, t1._async_evaluate0$_compileContext); + }, + $signature: 208 + }; + A._EvaluateVisitor__closure13.prototype = { + call$0() { + var t1 = this.$this._async_evaluate0$_environment, + t2 = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t3 = this.module; + return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string0$_text); + }, + $signature: 96 + }; + A._EvaluateVisitor_closure48.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure4($arguments); + }, + $call$body$_EvaluateVisitor_closure4($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, callableNode, t2, t3, t4, t5, t6, t7, invocation, t1, $function, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + $function = t1.$index($arguments, 0); + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + callableNode = t1._async_evaluate0$_callableNode; + t2 = callableNode.get$span(callableNode); + t3 = callableNode.get$span(callableNode); + args._argument_list$_wereKeywordsAccessed = true; + t4 = args._argument_list$_keywords; + if (t4.get$isEmpty(t4)) + t4 = null; + else { + t5 = type$.Value_2; + t6 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t5); + for (args._argument_list$_wereKeywordsAccessed = true, t4 = A.MapExtensions_get_pairs0(t4, type$.String, t5), t4 = t4.get$iterator(t4); t4.moveNext$0();) { + t7 = t4.get$current(t4); + t6.$indexSet(0, new A.SassString0(t7._0, false), t7._1); + } + t4 = new A.ValueExpression0(new A.SassMap0(A.ConstantMap_ConstantMap$from(t6, t5, t5)), callableNode.get$span(callableNode)); + } + invocation = A.ArgumentList$0(B.List_empty24, B.Map_empty14, B.Map_empty5, t2, t4, new A.ValueExpression0(args, t3)); + $async$goto = $function instanceof A.SassString0 ? 3 : 4; + break; + case 3: + // then + A.warnForDeprecation0(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_LIY); + callableNode = t1._async_evaluate0$_callableNode; + t2 = $function._string0$_text; + t3 = callableNode.get$span(callableNode); + t1 = t1.visitFunctionExpression$1(0, new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); + $async$goto = 5; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$1); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + t2 = $function.assertFunction$1("function").assertCompileContext$1(t1._async_evaluate0$_compileContext); + t3 = t1._async_evaluate0$_callableNode; + t3.toString; + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate0$_runFunctionCallable$3(invocation, t2.callable, t3), $async$call$1); + case 6: + // returning from await. + t3 = $async$result; + $async$returnValue = t3; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 92 + }; + A._EvaluateVisitor_closure49.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure3($arguments); + }, + $call$body$_EvaluateVisitor_closure3($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, withMap, t2, t3, values, span, configuration, t1, url; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string0$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map0$_contents; + t1 = $async$self.$this; + t2 = t1._async_evaluate0$_callableNode; + t2.toString; + if (withMap != null) { + t3 = {}; + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + span = t2.get$span(t2); + t3.privateDeprecation = false; + withMap.forEach$1(0, new A._EvaluateVisitor__closure11(t3, values, span, t2)); + configuration = new A.ExplicitConfiguration0(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + t3 = t2.get$span(t2); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure12(t1), t3.get$sourceUrl(t3), configuration, true), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 209 + }; + A._EvaluateVisitor__closure11.prototype = { + call$2(variable, value) { + var _this = this, + t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string0$_text, "_", "-"); + t1 = _this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + else if (B.JSString_methods.startsWith$1($name, "-") && !_this._box_0.privateDeprecation) { + _this._box_0.privateDeprecation = true; + A.warnForDeprecation0("Configuring private variables (such as $" + $name + string$.x29x20is_dT, B.Deprecation_lkJ); + } + t1.$indexSet(0, $name, new A.ConfiguredValue0(value, _this.span, _this.callableNode)); + }, + $signature: 117 + }; + A._EvaluateVisitor__closure12.prototype = { + call$2(module, _) { + var t1 = this.$this; + return t1._async_evaluate0$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 331 + }; + A._EvaluateVisitor_closure50.prototype = { + call$1($arguments) { + return this.$call$body$_EvaluateVisitor_closure2($arguments); + }, + $call$body$_EvaluateVisitor_closure2($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, callableNode, invocation, t1, mixin, args; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.getInterceptor$asx($arguments); + mixin = t1.$index($arguments, 0); + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = $async$self.$this; + callableNode = t1._async_evaluate0$_callableNode; + invocation = A.ArgumentList$0(B.List_empty24, B.Map_empty14, B.Map_empty5, callableNode.get$span(callableNode), null, new A.ValueExpression0(args, callableNode.get$span(callableNode))); + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_applyMixin$5(mixin.assertMixin$1("mixin").assertCompileContext$1(t1._async_evaluate0$_compileContext).callable, t1._async_evaluate0$_environment._async_environment0$_content, invocation, callableNode, callableNode), $async$call$1); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 209 + }; + A._EvaluateVisitor_run_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2), + $async$returnValue, $async$self = this, module, t1, t2, _0_0, url; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = t1.span; + _0_0 = t2.get$sourceUrl(t2); + url = null; + if (_0_0 != null) { + url = _0_0; + t2 = $async$self.$this; + t2._async_evaluate0$_activeModules.$indexSet(0, url, null); + if (!(t2._async_evaluate0$_nodeImporter != null && J.toString$0$(url) === "stdin")) + t2._async_evaluate0$_loadedUrls.add$1(0, url); + } + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t2._async_evaluate0$_addExceptionTrace$1$1(new A._EvaluateVisitor_run__closure2(t2, $async$self.importer, t1), type$.Module_AsyncCallable_2), $async$call$0); + case 3: + // returning from await. + module = $async$result; + $async$returnValue = new A._Record_2_loadedUrls_stylesheet(t2._async_evaluate0$_loadedUrls, t2._async_evaluate0$_combineCss$1(module)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 332 + }; + A._EvaluateVisitor_run__closure2.prototype = { + call$0() { + return this.$this._async_evaluate0$_execute$2(this.importer, this.node); + }, + $signature: 333 + }; + A._EvaluateVisitor__loadModule_closure5.prototype = { + call$0() { + return this.callback.call$2(this._box_0.builtInModule, false); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure6.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__loadModule_closure0(); + }, + $call$body$_EvaluateVisitor__loadModule_closure0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$handler = 1, $async$errorStack = [], $async$next = [], $async$self = this, canonicalUrl, oldInDependency, isDependency, t4, message, t1, stylesheet, importer, t2, t3, _1_0, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = {}; + stylesheet = null; + importer = null; + t2 = $async$self.$this; + t3 = $async$self.nodeWithSpan; + $async$goto = 2; + return A._asyncAwait(t2._async_evaluate0$_loadStylesheet$3$baseUrl($async$self.url.toString$0(0), t3.get$span(t3), $async$self.baseUrl), $async$call$0); + case 2: + // returning from await. + _1_0 = $async$result; + stylesheet = _1_0._0; + importer = _1_0._1; + isDependency = _1_0._2; + t4 = stylesheet.span; + canonicalUrl = t4.get$sourceUrl(t4); + if (canonicalUrl != null) { + t4 = t2._async_evaluate0$_activeModules; + if (t4.containsKey$1(canonicalUrl)) { + message = $async$self.namesInErrors ? "Module loop: " + $.$get$context().prettyUri$1(canonicalUrl) + " is already being loaded." : string$.Modulel; + t1 = A.NullableExtension_andThen0(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure5(t2, message)); + throw A.wrapException(t1 == null ? t2._async_evaluate0$_exception$1(message) : t1); + } else + t4.$indexSet(0, canonicalUrl, t3); + } + t4 = t2._async_evaluate0$_modules.containsKey$1(canonicalUrl); + oldInDependency = t2._async_evaluate0$_inDependency; + t2._async_evaluate0$_inDependency = isDependency; + t1.module = null; + $async$handler = 3; + $async$temp1 = t1; + $async$goto = 6; + return A._asyncAwait(t2._async_evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, $async$self.configuration, $async$self.namesInErrors, t3), $async$call$0); + case 6: + // returning from await. + $async$temp1.module = $async$result; + $async$next.push(5); + // goto finally + $async$goto = 4; + break; + case 3: + // uncaught + $async$next = [1]; + case 4: + // finally + $async$handler = 1; + t2._async_evaluate0$_activeModules.remove$1(0, canonicalUrl); + t2._async_evaluate0$_inDependency = oldInDependency; + // goto the next finally handler + $async$goto = $async$next.pop(); + break; + case 5: + // after finally + $async$goto = 7; + return A._asyncAwait(t2._async_evaluate0$_addExceptionSpanAsync$1$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure6(t1, $async$self.callback, !t4), false, type$.void), $async$call$0); + case 7: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + case 1: + // rethrow + return A._asyncRethrow($async$errorStack.at(-1), $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__loadModule__closure5.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate0$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 98 + }; + A._EvaluateVisitor__loadModule__closure6.prototype = { + call$0() { + return this.callback.call$2(this._box_1.module, this.firstLoad); + }, + $signature: 0 + }; + A._EvaluateVisitor__execute_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t3, t4, t5, t6, t1, oldImporter, oldStylesheet, oldRoot, oldPreModuleComments, oldParent, oldEndOfImports, oldOutOfOrderImports, oldExtensionStore, t2, oldStyleRule, oldMediaQueries, oldDeclarationName, oldInUnknownAtRule, oldInKeyframes, oldConfiguration; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate0$_importer; + oldStylesheet = t1._async_evaluate0$__stylesheet; + oldRoot = t1._async_evaluate0$__root; + oldPreModuleComments = t1._async_evaluate0$_preModuleComments; + oldParent = t1._async_evaluate0$__parent; + oldEndOfImports = t1._async_evaluate0$__endOfImports; + oldOutOfOrderImports = t1._async_evaluate0$_outOfOrderImports; + oldExtensionStore = t1._async_evaluate0$__extensionStore; + t2 = t1._async_evaluate0$_atRootExcludingStyleRule; + oldStyleRule = t2 ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + oldMediaQueries = t1._async_evaluate0$_mediaQueries; + oldDeclarationName = t1._async_evaluate0$_declarationName; + oldInUnknownAtRule = t1._async_evaluate0$_inUnknownAtRule; + oldInKeyframes = t1._async_evaluate0$_inKeyframes; + oldConfiguration = t1._async_evaluate0$_configuration; + t1._async_evaluate0$_importer = $async$self.importer; + t3 = t1._async_evaluate0$__stylesheet = $async$self.stylesheet; + t4 = t3.span; + t5 = t1._async_evaluate0$__parent = t1._async_evaluate0$__root = A.ModifiableCssStylesheet$0(t4); + t1._async_evaluate0$__endOfImports = 0; + t1._async_evaluate0$_outOfOrderImports = null; + t1._async_evaluate0$__extensionStore = $async$self.extensionStore; + t1._async_evaluate0$_declarationName = t1._async_evaluate0$_mediaQueries = t1._async_evaluate0$_styleRuleIgnoringAtRoot = null; + t1._async_evaluate0$_inKeyframes = t1._async_evaluate0$_atRootExcludingStyleRule = t1._async_evaluate0$_inUnknownAtRule = false; + t6 = $async$self.configuration; + if (t6 != null) + t1._async_evaluate0$_configuration = t6; + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(0, t3), $async$call$0); + case 2: + // returning from await. + t3 = t1._async_evaluate0$_outOfOrderImports == null ? t5 : new A.CssStylesheet0(new A.UnmodifiableListView(t1._async_evaluate0$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode_2), t4); + $async$self.css.__late_helper$_value = t3; + $async$self.preModuleComments.__late_helper$_value = t1._async_evaluate0$_preModuleComments; + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = oldStylesheet; + t1._async_evaluate0$__root = oldRoot; + t1._async_evaluate0$_preModuleComments = oldPreModuleComments; + t1._async_evaluate0$__parent = oldParent; + t1._async_evaluate0$__endOfImports = oldEndOfImports; + t1._async_evaluate0$_outOfOrderImports = oldOutOfOrderImports; + t1._async_evaluate0$__extensionStore = oldExtensionStore; + t1._async_evaluate0$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._async_evaluate0$_mediaQueries = oldMediaQueries; + t1._async_evaluate0$_declarationName = oldDeclarationName; + t1._async_evaluate0$_inUnknownAtRule = oldInUnknownAtRule; + t1._async_evaluate0$_atRootExcludingStyleRule = t2; + t1._async_evaluate0$_inKeyframes = oldInKeyframes; + t1._async_evaluate0$_configuration = oldConfiguration; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__combineCss_closure5.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 118 + }; + A._EvaluateVisitor__combineCss_closure6.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 15 + }; + A._EvaluateVisitor__combineCss_visitModule2.prototype = { + call$1(module) { + var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; + if (!_this.seen.add$1(0, module)) + return; + if (_this.clone) + module = module.cloneCss$0(); + for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss()) { + _1_0 = module.get$preModuleComments().$index(0, upstream); + if (_1_0 != null) + B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); + _this.call$1(upstream); + } + } + _this.sorted.addFirst$1(module); + t1 = module.get$css(module); + statements = t1.get$children(t1); + index = _this.$this._async_evaluate0$_indexAfterImports$1(statements); + t1 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); + }, + $signature: 335 + }; + A._EvaluateVisitor__extendModules_closure5.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 15 + }; + A._EvaluateVisitor__extendModules_closure6.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore_2); + }, + $signature: 211 + }; + A._EvaluateVisitor_visitAtRootRule_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRootRule_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__scopeForAtRoot_closure17.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, oldParent; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldParent = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent"); + t1._async_evaluate0$__parent = $async$self.newParent; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.scope$1$2$when(callback, $async$self.node.hasDeclarations, type$.void), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$__parent = oldParent; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure18.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, oldAtRootExcludingStyleRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldAtRootExcludingStyleRule = t1._async_evaluate0$_atRootExcludingStyleRule; + t1._async_evaluate0$_atRootExcludingStyleRule = true; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure19.prototype = { + call$1(callback) { + return this.$this._async_evaluate0$_withMediaQueries$1$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure2(this.innerScope, callback), type$.Null); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot__closure2.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 2 + }; + A._EvaluateVisitor__scopeForAtRoot_closure20.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInKeyframes; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInKeyframes = t1._async_evaluate0$_inKeyframes; + t1._async_evaluate0$_inKeyframes = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_inKeyframes = wasInKeyframes; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor__scopeForAtRoot_closure21.prototype = { + call$1($parent) { + return $parent instanceof A.ModifiableCssAtRule0; + }, + $signature: 212 + }; + A._EvaluateVisitor__scopeForAtRoot_closure22.prototype = { + call$1(callback) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, wasInUnknownAtRule; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + wasInUnknownAtRule = t1._async_evaluate0$_inUnknownAtRule; + t1._async_evaluate0$_inUnknownAtRule = false; + $async$goto = 2; + return A._asyncAwait($async$self.innerScope.call$1(callback), $async$call$1); + case 2: + // returning from await. + t1._async_evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 40 + }; + A._EvaluateVisitor_visitContentRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$returnValue, $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.content.declaration.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 6: + // returning from await. + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitDeclaration_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self._box_0.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitEachRule_closure8.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._async_evaluate0$_environment.setLocalVariable$3(this._box_0.variable, t1._async_evaluate0$_withoutSlash$2(value, t2), t2); + }, + $signature: 63 + }; + A._EvaluateVisitor_visitEachRule_closure9.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_setMultipleVariables$3(this._box_1.variables, value, this.nodeWithSpan); + }, + $signature: 63 + }; + A._EvaluateVisitor_visitEachRule_closure10.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._async_evaluate0$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure2(t1, _this.setVariables, _this.node)); + }, + $signature: 78 + }; + A._EvaluateVisitor_visitEachRule__closure2.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._async_evaluate0$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure2(t1)); + }, + $signature: 340 + }; + A._EvaluateVisitor_visitEachRule___closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 101 + }; + A._EvaluateVisitor_visitAtRule_closure11.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 342 + }; + A._EvaluateVisitor_visitAtRule_closure12.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule_closure13.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, styleRule; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + styleRule = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = styleRule == null || t1._async_evaluate0$_inKeyframes || $async$self.name.value === "font-face" ? 2 : 4; + break; + case 2: + // then + t2 = $async$self.children, t3 = t2.length, _i = 0; + case 5: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 7; + break; + } + $async$goto = 8; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 8: + // returning from await. + case 6: + // for update + ++_i; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 9; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule._style_rule0$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure2(t1, $async$self.children), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 9: + // returning from await. + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitAtRule_closure14.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitForRule_closure14.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.from.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 214 + }; + A._EvaluateVisitor_visitForRule_closure15.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.SassNumber_2), + $async$returnValue, $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait($async$self.node.to.accept$1($async$self.$this), $async$call$0); + case 3: + // returning from await. + $async$returnValue = $async$result.assertNumber$0(); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 214 + }; + A._EvaluateVisitor_visitForRule_closure16.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure17.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure18.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, i, t3, t4, t5, t6, t7, t8, _0_0, t1, t2, nodeWithSpan; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.node; + nodeWithSpan = t1._async_evaluate0$_expressionNode$1(t2.from); + i = $async$self.from, t3 = $async$self._box_0, t4 = $async$self.direction, t5 = t2.variable, t6 = $async$self.fromNumber, t2 = t2.children; + case 3: + // for condition + if (!(i !== t3.to)) { + // goto after for + $async$goto = 5; + break; + } + t7 = t1._async_evaluate0$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits0(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + $async$goto = 6; + return A._asyncAwait(t1._async_evaluate0$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure2(t1)), $async$call$0); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + i += t4; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 78 + }; + A._EvaluateVisitor_visitForRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 101 + }; + A._EvaluateVisitor_visitForwardRule_closure5.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._async_evaluate0$_registerCommentsForModule$1(module); + this.$this._async_evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 121 + }; + A._EvaluateVisitor_visitForwardRule_closure6.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._async_evaluate0$_registerCommentsForModule$1(module); + this.$this._async_evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 121 + }; + A._EvaluateVisitor__registerCommentsForModule_closure2.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_CssComment_2); + }, + $signature: 215 + }; + A._EvaluateVisitor_visitIfRule_closure2.prototype = { + call$1(clause) { + var t1 = this.$this; + return t1._async_evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure2(t1, clause), true, clause.hasDeclarations, type$.nullable_Value_2); + }, + $signature: 347 + }; + A._EvaluateVisitor_visitIfRule__closure2.prototype = { + call$0() { + var t1 = this.$this; + return t1._async_evaluate0$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure2(t1)); + }, + $signature: 78 + }; + A._EvaluateVisitor_visitIfRule___closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 101 + }; + A._EvaluateVisitor__visitDynamicImport_closure2.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__visitDynamicImport_closure0(); + }, + $call$body$_EvaluateVisitor__visitDynamicImport_closure0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$returnValue, $async$self = this, t1, t2, _0_0, stylesheet, importer, isDependency, t3, url, oldImporter, oldStylesheet, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, t11, environment, module, visitor, _box_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + _box_0 = {}; + _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; + t1 = $async$self.$this; + t2 = $async$self.$import; + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate0$_loadStylesheet$3$forImport(t2.urlString, t2.span, true), $async$call$0); + case 3: + // returning from await. + _0_0 = $async$result; + stylesheet = _box_0.stylesheet = _0_0._0; + importer = _0_0._1; + _box_0.importer = importer; + isDependency = _0_0._2; + _box_0.isDependency = isDependency; + t3 = stylesheet.span; + url = t3.get$sourceUrl(t3); + if (url != null) { + t3 = t1._async_evaluate0$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen0(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure11(t1)); + throw A.wrapException(t2 == null ? t1._async_evaluate0$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._stylesheet1$_uses; + t3 = type$.UnmodifiableListView_UseRule_2; + $async$goto = new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2).get$length(0) === 0 ? 4 : 5; + break; + case 4: + // then + oldImporter = t1._async_evaluate0$_importer; + oldStylesheet = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__stylesheet, "_stylesheet"); + oldInDependency = t1._async_evaluate0$_inDependency; + t1._async_evaluate0$_importer = importer; + t1._async_evaluate0$__stylesheet = stylesheet; + t1._async_evaluate0$_inDependency = isDependency; + $async$goto = 6; + return A._asyncAwait(t1.visitStylesheet$1(0, stylesheet), $async$call$0); + case 6: + // returning from await. + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = oldStylesheet; + t1._async_evaluate0$_inDependency = oldInDependency; + t1._async_evaluate0$_activeModules.remove$1(0, url); + // goto return + $async$goto = 1; + break; + case 5: + // join + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure12())) { + t2 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure13()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._async_evaluate0$_environment; + t3 = type$.String; + t4 = type$.Module_AsyncCallable_2; + t5 = type$.AstNode_2; + t6 = t2._async_environment0$_nestedForwardedModules; + t7 = A._setArrayType([], type$.JSArray_Module_AsyncCallable_2); + t8 = t2._async_environment0$_variables; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._async_environment0$_variableNodes; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._async_environment0$_functions; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + t11 = t2._async_environment0$_mixins; + t11 = A._setArrayType(t11.slice(0), A._arrayInstanceType(t11)); + environment = A.AsyncEnvironment$_0(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._async_environment0$_importedModules, null, t6, t7, t8, t9, t10, t11, t2._async_environment0$_content, t2._async_environment0$_configurableVariables); + $async$goto = 7; + return A._asyncAwait(t1._async_evaluate0$_withEnvironment$1$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure14(_box_0, t1, loadsUserDefinedModules, environment, children), type$.Null), $async$call$0); + case 7: + // returning from await. + module = environment.toDummyModule$0(); + t1._async_evaluate0$_environment.importForwards$1(module); + $async$goto = loadsUserDefinedModules ? 8 : 9; + break; + case 8: + // then + $async$goto = module.transitivelyContainsCss ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return A._asyncAwait(t1._async_evaluate0$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1), $async$call$0); + case 12: + // returning from await. + case 11: + // join + visitor = new A._ImportedCssVisitor2(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + case 9: + // join + t1._async_evaluate0$_activeModules.remove$1(0, url); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__visitDynamicImport__closure11.prototype = { + call$1(previousLoad) { + return this.$this._async_evaluate0$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 98 + }; + A._EvaluateVisitor__visitDynamicImport__closure12.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 142 + }; + A._EvaluateVisitor__visitDynamicImport__closure13.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 216 + }; + A._EvaluateVisitor__visitDynamicImport__closure14.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t3, t4, t1, oldImporter, oldStylesheet, oldRoot, oldParent, oldEndOfImports, oldOutOfOrderImports, oldConfiguration, oldInDependency, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + oldImporter = t1._async_evaluate0$_importer; + oldStylesheet = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__stylesheet, "_stylesheet"); + oldRoot = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root"); + oldParent = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent"); + oldEndOfImports = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, "_endOfImports"); + oldOutOfOrderImports = t1._async_evaluate0$_outOfOrderImports; + oldConfiguration = t1._async_evaluate0$_configuration; + oldInDependency = t1._async_evaluate0$_inDependency; + t2 = $async$self._box_0; + t1._async_evaluate0$_importer = t2.importer; + t3 = t2.stylesheet; + t1._async_evaluate0$__stylesheet = t3; + t4 = $async$self.loadsUserDefinedModules; + if (t4) { + t3 = A.ModifiableCssStylesheet$0(t3.span); + t1._async_evaluate0$__root = t3; + t1._async_evaluate0$__parent = t1._async_evaluate0$_assertInModule$2(t3, "_root"); + t1._async_evaluate0$__endOfImports = 0; + t1._async_evaluate0$_outOfOrderImports = null; + } + t1._async_evaluate0$_inDependency = t2.isDependency; + t3 = new A.UnmodifiableListView(t2.stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + if (!t3.get$isEmpty(t3)) + t1._async_evaluate0$_configuration = $async$self.environment.toImplicitConfiguration$0(); + $async$goto = 2; + return A._asyncAwait(t1.visitStylesheet$1(0, t2.stylesheet), $async$call$0); + case 2: + // returning from await. + t2 = t4 ? t1._async_evaluate0$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + $async$self.children.__late_helper$_value = t2; + t1._async_evaluate0$_importer = oldImporter; + t1._async_evaluate0$__stylesheet = oldStylesheet; + if (t4) { + t1._async_evaluate0$__root = oldRoot; + t1._async_evaluate0$__parent = oldParent; + t1._async_evaluate0$__endOfImports = oldEndOfImports; + t1._async_evaluate0$_outOfOrderImports = oldOutOfOrderImports; + } + t1._async_evaluate0$_configuration = oldConfiguration; + t1._async_evaluate0$_inDependency = oldInDependency; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__applyMixin_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure6(t1, $async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__applyMixin__closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 2; + return A._asyncAwait($async$self.$this._async_evaluate0$_runBuiltInCallable$3($async$self.$arguments, $async$self.mixin, $async$self.nodeWithSpanWithoutContent), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__applyMixin_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.withContent$2($async$self.contentCallable, new A._EvaluateVisitor__applyMixin__closure5(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor__applyMixin__closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure2(t1, $async$self.mixin, $async$self.nodeWithSpanWithoutContent)), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__applyMixin___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1, t2, t3, t4, t5, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.mixin.declaration.children, t2 = t1.length, t3 = $async$self.$this, t4 = $async$self.nodeWithSpanWithoutContent, t5 = type$.nullable_Value_2, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t3._async_evaluate0$_addErrorSpan$1$2(t4, new A._EvaluateVisitor__applyMixin____closure2(t3, t1[_i]), t5), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 32 + }; + A._EvaluateVisitor__applyMixin____closure2.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 78 + }; + A._EvaluateVisitor_visitIncludeRule_closure8.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 96 + }; + A._EvaluateVisitor_visitIncludeRule_closure9.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable0($content, t1._async_evaluate0$_environment.closure$0(), t1._async_evaluate0$_inDependency, type$.UserDefinedCallable_AsyncEnvironment_2); + }, + $signature: 350 + }; + A._EvaluateVisitor_visitIncludeRule_closure10.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 16 + }; + A._EvaluateVisitor_visitMediaRule_closure11.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule_closure12.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate0$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 104 + }; + A._EvaluateVisitor_visitMediaRule_closure13.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure2(t1, $async$self.node), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 6: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 8; + break; + } + $async$goto = 9; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 9: + // returning from await. + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitMediaRule_closure14.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitStyleRule_closure11.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure12.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitStyleRule_closure14.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitStyleRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitStyleRule_closure13.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor__warnForBogusCombinators_closure2.prototype = { + call$1(child) { + return child instanceof A.ModifiableCssComment0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitSupportsRule_closure8.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, _i, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure2(t1, $async$self.node), type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.length, _i = 0; + case 6: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 8; + break; + } + $async$goto = 9; + return A._asyncAwait(t2[_i].accept$1(t1), $async$call$0); + case 9: + // returning from await. + case 7: + // for update + ++_i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, _i; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.length, t3 = $async$self.$this, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 5; + return A._asyncAwait(t1[_i].accept$1(t3), $async$call$0); + case 5: + // returning from await. + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitSupportsRule_closure10.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor__visitSupportsCondition_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.String), + $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self._box_0; + $async$temp1 = A; + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate0$_evaluateToCss$1(t2.declaration.name), $async$call$0); + case 3: + // returning from await. + t3 = $async$temp1.S($async$result); + t4 = t2.declaration.get$isCustomProperty() ? "" : " "; + $async$temp1 = "(" + t3 + ":" + t4; + $async$temp2 = A; + $async$goto = 4; + return A._asyncAwait(t1._async_evaluate0$_evaluateToCss$1(t2.declaration.value), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1 + $async$temp2.S($async$result) + ")"; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 181 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure8.prototype = { + call$0() { + var t1 = this.$this._async_evaluate0$_environment, + t2 = this._box_0.override; + t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure9.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure10.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._async_evaluate0$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._async_evaluate0$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure2.prototype = { + call$2(module, firstLoad) { + var t1, t2, t3, _0_0, t4, t5, span; + if (firstLoad) + this.$this._async_evaluate0$_registerCommentsForModule$1(module); + t1 = this.$this._async_evaluate0$_environment; + t2 = this.node; + t3 = t2.namespace; + if (t3 == null) { + t1._async_environment0$_globalModules.$indexSet(0, module, t2); + t1._async_environment0$_allModules.push(module); + t1 = B.JSArray_methods.get$first(t1._async_environment0$_variables); + _0_0 = A.IterableExtension_firstWhereOrNull(t1.get$keys(t1), module.get$variables().get$containsKey()); + if (_0_0 != null) + A.throwExpression(A.SassScriptException$0(string$.This_ma + _0_0 + '".', null)); + } else { + t4 = t1._async_environment0$_modules; + if (t4.containsKey$1(t3)) { + t5 = t1._async_environment0$_namespaceNodes.$index(0, t3); + span = t5 == null ? null : t5.span; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t5.$indexSet(0, span, "original @use"); + A.throwExpression(A.MultiSpanSassScriptException$0(string$.There_ + t3 + '".', "new @use", t5)); + } + t4.$indexSet(0, t3, module); + t1._async_environment0$_namespaceNodes.$indexSet(0, t3, t2); + t1._async_environment0$_allModules.push(module); + } + }, + $signature: 121 + }; + A._EvaluateVisitor_visitWarnRule_closure2.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 80 + }; + A._EvaluateVisitor_visitWhileRule_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node, t2 = t1.condition, t3 = $async$self.$this, t1 = t1.children; + case 3: + // for condition + $async$goto = 5; + return A._asyncAwait(t2.accept$1(t3), $async$call$0); + case 5: + // returning from await. + if (!$async$result.get$isTruthy()) { + // goto after for + $async$goto = 4; + break; + } + $async$goto = 6; + return A._asyncAwait(t3._async_evaluate0$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure2(t3)), $async$call$0); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = _0_0; + // goto return + $async$goto = 1; + break; + } + // goto for condition + $async$goto = 3; + break; + case 4: + // after for + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 78 + }; + A._EvaluateVisitor_visitWhileRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 101 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t3, t1, t2, left, $async$temp1, $async$temp2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node; + t2 = $async$self.$this; + $async$goto = 3; + return A._asyncAwait(t1.left.accept$1(t2), $async$call$0); + case 3: + // returning from await. + left = $async$result; + case 4: + // switch + switch (t1.operator.index) { + case 0: + // goto case + $async$goto = 6; + break; + case 1: + // goto case + $async$goto = 7; + break; + case 2: + // goto case + $async$goto = 8; + break; + case 3: + // goto case + $async$goto = 9; + break; + case 4: + // goto case + $async$goto = 10; + break; + case 5: + // goto case + $async$goto = 11; + break; + case 6: + // goto case + $async$goto = 12; + break; + case 7: + // goto case + $async$goto = 13; + break; + case 8: + // goto case + $async$goto = 14; + break; + case 9: + // goto case + $async$goto = 15; + break; + case 10: + // goto case + $async$goto = 16; + break; + case 11: + // goto case + $async$goto = 17; + break; + case 12: + // goto case + $async$goto = 18; + break; + case 13: + // goto case + $async$goto = 19; + break; + default: + // goto default + $async$goto = 20; + break; + } + break; + case 6: + // case + t1 = t1.right.accept$1(t2); + $async$goto = 21; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 21: + // returning from await. + t1 = $async$result; + t1 = new A.SassString0(A.serializeValue0(left, false, true) + "=" + A.serializeValue0(t1, false, true), false); + // goto after switch + $async$goto = 5; + break; + case 7: + // case + $async$goto = left.get$isTruthy() ? 22 : 24; + break; + case 22: + // then + t1 = left; + // goto join + $async$goto = 23; + break; + case 24: + // else + t1 = t1.right.accept$1(t2); + $async$goto = 25; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 25: + // returning from await. + t1 = $async$result; + case 23: + // join + // goto after switch + $async$goto = 5; + break; + case 8: + // case + $async$goto = left.get$isTruthy() ? 26 : 28; + break; + case 26: + // then + t1 = t1.right.accept$1(t2); + $async$goto = 29; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 29: + // returning from await. + t1 = $async$result; + // goto join + $async$goto = 27; + break; + case 28: + // else + t1 = left; + case 27: + // join + // goto after switch + $async$goto = 5; + break; + case 9: + // case + $async$temp1 = left; + $async$goto = 30; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 30: + // returning from await. + t1 = $async$temp1.$eq(0, $async$result) ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto after switch + $async$goto = 5; + break; + case 10: + // case + $async$temp1 = left; + $async$goto = 31; + return A._asyncAwait(t1.right.accept$1(t2), $async$call$0); + case 31: + // returning from await. + t1 = !$async$temp1.$eq(0, $async$result) ? B.SassBoolean_true0 : B.SassBoolean_false0; + // goto after switch + $async$goto = 5; + break; + case 11: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 32; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 32: + // returning from await. + t1 = $async$temp1.greaterThan$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 12: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 33; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 33: + // returning from await. + t1 = $async$temp1.greaterThanOrEquals$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 13: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 34; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 34: + // returning from await. + t1 = $async$temp1.lessThan$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 14: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 35; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 35: + // returning from await. + t1 = $async$temp1.lessThanOrEquals$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 15: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 36; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 36: + // returning from await. + t1 = $async$temp1.plus$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 16: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 37; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 37: + // returning from await. + t1 = $async$temp1.minus$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 17: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 38; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 38: + // returning from await. + t1 = $async$temp1.times$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 18: + // case + t3 = t1.right.accept$1(t2); + $async$temp1 = t2; + $async$temp2 = left; + $async$goto = 39; + return A._asyncAwait(type$.Future_Value_2._is(t3) ? t3 : A._Future$value(t3, type$.Value_2), $async$call$0); + case 39: + // returning from await. + t1 = $async$temp1._async_evaluate0$_slash$3($async$temp2, $async$result, t1); + // goto after switch + $async$goto = 5; + break; + case 19: + // case + t1 = t1.right.accept$1(t2); + $async$temp1 = left; + $async$goto = 40; + return A._asyncAwait(type$.Future_Value_2._is(t1) ? t1 : A._Future$value(t1, type$.Value_2), $async$call$0); + case 40: + // returning from await. + t1 = $async$temp1.modulo$1($async$result); + // goto after switch + $async$goto = 5; + break; + case 20: + // default + t1 = null; + case 5: + // after switch + $async$returnValue = t1; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 80 + }; + A._EvaluateVisitor__slash_recommendation2.prototype = { + call$1(expression) { + var t1; + $label0$0: { + if (expression instanceof A.BinaryOperationExpression0 && B.BinaryOperator_ehp0 === expression.operator) { + t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + break $label0$0; + } + if (expression instanceof A.ParenthesizedExpression0) { + t1 = expression.expression.toString$0(0); + break $label0$0; + } + t1 = expression.toString$0(0); + break $label0$0; + } + return t1; + }, + $signature: 120 + }; + A._EvaluateVisitor_visitVariableExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure2.prototype = { + call$0() { + var t1, _this = this; + switch (_this.node.operator.index) { + case 0: + t1 = _this.operand.unaryPlus$0(); + break; + case 1: + t1 = _this.operand.unaryMinus$0(); + break; + case 2: + t1 = new A.SassString0("/" + A.serializeValue0(_this.operand, false, true), false); + break; + case 3: + t1 = _this.operand.unaryNot$0(); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 46 + }; + A._EvaluateVisitor_visitIfExpression_closure2.prototype = { + call$1(pair) { + return pair._0 + ": " + pair._1.toString$0(0); + }, + $signature: 217 + }; + A._EvaluateVisitor_visitIfConditionOperation_closure2.prototype = { + call$1(pair) { + return pair._1; + }, + $signature: 218 + }; + A._EvaluateVisitor_visitListExpression_closure2.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 358 + }; + A._EvaluateVisitor_visitFunctionExpression_closure8.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_environment.getFunction$2$namespace(t1.name, t1.namespace); + }, + $signature: 96 + }; + A._EvaluateVisitor_visitFunctionExpression_closure9.prototype = { + call$1(argument) { + return argument.accept$1(B.C_IsCalculationSafeVisitor0); + }, + $signature: 81 + }; + A._EvaluateVisitor_visitFunctionExpression_closure10.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 80 + }; + A._EvaluateVisitor__visitCalculation_closure2.prototype = { + call$2(message, deprecation) { + return this.$this._async_evaluate0$_warn$3(message, this.node.span, deprecation); + }, + call$1(message) { + return this.call$2(message, null); + }, + $signature: 110 + }; + A._EvaluateVisitor__checkCalculationArguments_check2.prototype = { + call$1(maxArgs) { + var t1 = this.node, + t2 = t1.$arguments.positional.length; + if (t2 === 0) + throw A.wrapException(this.$this._async_evaluate0$_exception$2("Missing argument.", t1.span)); + else if (maxArgs != null && t2 > maxArgs) + throw A.wrapException(this.$this._async_evaluate0$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize0("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize0("was", t2, "were") + " passed.", t1.span)); + }, + call$0() { + return this.call$1(null); + }, + $signature: 82 + }; + A._EvaluateVisitor__visitCalculationExpression_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Object), + $async$returnValue, $async$self = this, t1, t2, t3, t4, $async$temp1, $async$temp2, $async$temp3; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self._box_0; + t3 = $async$self.node; + t4 = $async$self.inLegacySassFunction; + $async$temp1 = A; + $async$temp2 = t1._async_evaluate0$_binaryOperatorToCalculationOperator$2(t2.operator, t3); + $async$goto = 3; + return A._asyncAwait(t1._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t4), $async$call$0); + case 3: + // returning from await. + $async$temp3 = $async$result; + $async$goto = 4; + return A._asyncAwait(t1._async_evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t4), $async$call$0); + case 4: + // returning from await. + $async$returnValue = $async$temp1.SassCalculation_operateInternal0($async$temp2, $async$temp3, $async$result, t4, !t1._async_evaluate0$_inSupportsDeclaration, new A._EvaluateVisitor__visitCalculationExpression__closure2(t1, t3)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 185 + }; + A._EvaluateVisitor__visitCalculationExpression__closure2.prototype = { + call$2(message, deprecation) { + return this.$this._async_evaluate0$_warn$3(message, this.node.get$span(0), deprecation); + }, + call$1(message) { + return this.call$2(message, null); + }, + $signature: 110 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2.prototype = { + call$0() { + var t1 = this.node; + return this.$this._async_evaluate0$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 80 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure2.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable, + t3 = _this.V; + return t1._async_evaluate0$_withEnvironment$1$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure2(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, t3), t3); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure2.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._async_evaluate0$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure2(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure2.prototype = { + call$0() { + return this.$call$body$_EvaluateVisitor__runUserDefinedCallable___closure0(this.V); + }, + $call$body$_EvaluateVisitor__runUserDefinedCallable___closure0($async$type) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter($async$type), + $async$returnValue, $async$self = this, parameters, t5, minLength, i, parameter, t6, value, t7, t8, restParameter, rest, argumentList, result, parameterWord, t1, t2, t3, t4, $async$temp1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.evaluated._values; + t3 = $async$self.callable.declaration.parameters; + t4 = $async$self.nodeWithSpan; + t1._async_evaluate0$_verifyArguments$4(J.get$length$asx(t2[2]), t2[0], t3, t4); + parameters = t3.parameters; + t5 = parameters.length; + minLength = Math.min(J.get$length$asx(t2[2]), t5); + for (i = 0; i < minLength; ++i) + t1._async_evaluate0$_environment.setLocalVariable$3(parameters[i].name, J.$index$asx(t2[2], i), J.$index$asx(t2[3], i)); + i = J.get$length$asx(t2[2]); + case 3: + // for condition + if (!(i < t5)) { + // goto after for + $async$goto = 5; + break; + } + parameter = parameters[i]; + t6 = parameter.name; + value = t2[0].remove$1(0, t6); + $async$goto = value == null ? 6 : 7; + break; + case 6: + // then + t7 = parameter.defaultValue; + $async$temp1 = t1; + $async$goto = 8; + return A._asyncAwait(t7.accept$1(t1), $async$call$0); + case 8: + // returning from await. + value = $async$temp1._async_evaluate0$_withoutSlash$2($async$result, t1._async_evaluate0$_expressionNode$1(t7)); + case 7: + // join + t7 = t1._async_evaluate0$_environment; + t8 = t2[1].$index(0, t6); + if (t8 == null) { + t8 = parameter.defaultValue; + t8.toString; + t8 = t1._async_evaluate0$_expressionNode$1(t8); + } + t7.setLocalVariable$3(t6, value, t8); + case 4: + // for update + ++i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + restParameter = t3.restParameter; + if (restParameter != null) { + rest = J.get$length$asx(t2[2]) > t5 ? J.sublist$1$ax(t2[2], t5) : B.List_empty23; + t5 = t2[0]; + t6 = t2[4]; + argumentList = A.SassArgumentList$0(rest, t5, t6 === B.ListSeparator_undecided_null_3_undecided0 ? B.ListSeparator_z0K0 : t6); + t1._async_evaluate0$_environment.setLocalVariable$3(restParameter, argumentList, t4); + } else + argumentList = null; + $async$goto = 9; + return A._asyncAwait($async$self.run.call$0(), $async$call$0); + case 9: + // returning from await. + result = $async$result; + if (argumentList == null) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t5 = t2[0]; + if (t5.get$isEmpty(t5)) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (argumentList._argument_list$_wereKeywordsAccessed) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + t5 = t2[0]; + t5 = t5.get$keys(t5); + parameterWord = A.pluralize0("parameter", t5.get$length(t5), null); + t2 = t2[0]; + t2 = t2.get$keys(t2); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + parameterWord + " named " + A.toSentence0(t2.map$1$1(t2, new A._EvaluateVisitor__runUserDefinedCallable____closure2(), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._async_evaluate0$_stackTrace$1(t4.get$span(t4)), null)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature() { + return this.V._eval$1("Future<0>()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure2.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__runFunctionCallable_closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1, t2, t3, t4, _i, $returnValue; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = $async$self.$this, _i = 0; + case 3: + // for condition + if (!(_i < t3)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait(t2[_i].accept$1(t4), $async$call$0); + case 6: + // returning from await. + $returnValue = $async$result; + if ($returnValue instanceof A.Value0) { + $async$returnValue = $returnValue; + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + throw A.wrapException(t4._async_evaluate0$_exception$2("Function finished without @return.", t1.span)); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 80 + }; + A._EvaluateVisitor__runBuiltInCallable_closure8.prototype = { + call$0() { + return this._box_0.overload.verify$2(J.get$length$asx(this.evaluated._values[2]), this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure9.prototype = { + call$0() { + return this._box_0.callback.call$1(this.evaluated._values[2]); + }, + $signature: 361 + }; + A._EvaluateVisitor__runBuiltInCallable_closure10.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__evaluateArguments_closure11.prototype = { + call$1(value) { + return value; + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateArguments_closure12.prototype = { + call$1(value) { + return this.$this._async_evaluate0$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateArguments_closure13.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._async_evaluate0$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 112 + }; + A._EvaluateVisitor__evaluateArguments_closure14.prototype = { + call$1(value) { + return value; + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure11.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(value, t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure12.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(this.$this._async_evaluate0$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure13.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression0(_this.$this._async_evaluate0$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 112 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure14.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression0(this.$this._async_evaluate0$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__addRestMap_closure2.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString0) + _this.values.$indexSet(0, key._string0$_text, _this.convert.call$1(t1._async_evaluate0$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._async_evaluate0$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 117 + }; + A._EvaluateVisitor__verifyArguments_closure2.prototype = { + call$0() { + return this.parameters.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitCssAtRule_closure8.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssAtRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssAtRule_closure10.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure5.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure6.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssMediaRule_closure11.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule_closure12.prototype = { + call$1(mediaQueries) { + return this.$this._async_evaluate0$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 104 + }; + A._EvaluateVisitor_visitCssMediaRule_closure13.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.mergedQueries; + if (t2 == null) + t2 = $async$self.node.queries; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withMediaQueries$1$3(t2, $async$self.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure2(t1, $async$self.node), false, type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); + case 6: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 7; + break; + } + t4 = t2.__internal$_current; + $async$goto = 8; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 8: + // returning from await. + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule___closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssMediaRule_closure14.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssStyleRule_closure6.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + $async$goto = 2; + return A._asyncAwait(t1._async_evaluate0$_withStyleRule$1$2($async$self.rule, new A._EvaluateVisitor_visitCssStyleRule__closure2(t1, $async$self.node), type$.Null), $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssStyleRule_closure5.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure8.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure9.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t2, t3, t4, t1, _0_0; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + _0_0 = t1._async_evaluate0$_atRootExcludingStyleRule ? null : t1._async_evaluate0$_styleRuleIgnoringAtRoot; + $async$goto = _0_0 != null ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return A._asyncAwait(t1._async_evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure2(t1, $async$self.node), type$.ModifiableCssStyleRule_2, type$.Null), $async$call$0); + case 5: + // returning from await. + // goto join + $async$goto = 3; + break; + case 4: + // else + t2 = $async$self.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); + case 6: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 7; + break; + } + t4 = t2.__internal$_current; + $async$goto = 8; + return A._asyncAwait((t4 == null ? t3._as(t4) : t4).accept$1(t1), $async$call$0); + case 8: + // returning from await. + // goto for condition + $async$goto = 6; + break; + case 7: + // after for + case 3: + // join + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure2.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = $async$self.$this, t2 = t2._eval$1("ListBase.E"); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t4 = t1.__internal$_current; + $async$goto = 4; + return A._asyncAwait((t4 == null ? t2._as(t4) : t4).accept$1(t3), $async$call$0); + case 4: + // returning from await. + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure10.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor__performInterpolationHelper_closure2.prototype = { + call$1(targetOffsets) { + return A.InterpolationMap$0(this.interpolation, targetOffsets); + }, + $signature: 220 + }; + A._EvaluateVisitor__serialize_closure2.prototype = { + call$0() { + return A.serializeValue0(this.value, false, this.quote); + }, + $signature: 29 + }; + A._EvaluateVisitor__expressionNode_closure2.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._async_evaluate0$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 221 + }; + A._EvaluateVisitor__withoutSlash_recommendation2.prototype = { + call$1(number) { + var before, after, t1, + _1_0 = number.asSlash; + $label0$0: { + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { + before = _1_0._0; + after = _1_0._1; + t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; + break $label0$0; + } + t1 = A.serializeValue0(number, true, true); + break $label0$0; + } + return t1; + }, + $signature: 222 + }; + A._EvaluateVisitor__stackFrame_closure2.prototype = { + call$1(url) { + var t1 = this.$this._async_evaluate0$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 49 + }; + A._ImportedCssVisitor2.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure2(); + this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$1(node); + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._async_evaluate0$_visitor; + if (t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__parent, "__parent") !== t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root")) + t1._async_evaluate0$_addChild$1(node); + else if (t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, _s13_) === J.get$length$asx(t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__root, "_root").children._collection$_source)) { + t1._async_evaluate0$_addChild$1(node); + t1._async_evaluate0$__endOfImports = t1._async_evaluate0$_assertInModule$2(t1._async_evaluate0$__endOfImports, _s13_) + 1; + } else { + t2 = t1._async_evaluate0$_outOfOrderImports; + (t2 == null ? t1._async_evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._async_evaluate0$_visitor, + mediaQueries = t1._async_evaluate0$_mediaQueries; + t1._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure2(mediaQueries == null || t1._async_evaluate0$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure2()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._async_evaluate0$_visitor._async_evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure2()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure2.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) + t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule0; + else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure2.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluationContext2.prototype = { + get$currentCallableSpan() { + var _0_0 = this._async_evaluate0$_visitor._async_evaluate0$_callableNode; + if (_0_0 != null) + return _0_0.get$span(_0_0); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2(_, message, deprecation) { + var t1 = this._async_evaluate0$_visitor, + t2 = t1._async_evaluate0$_importSpan; + if (t2 == null) { + t2 = t1._async_evaluate0$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._async_evaluate0$_warn$3(message, t2 == null ? this._async_evaluate0$_defaultWarnNodeWithSpan.span : t2, deprecation); + } + }; + A.JSToDartAsyncFileImporter.prototype = { + canonicalize$1(_, url) { + return this.canonicalize$body$JSToDartAsyncFileImporter(0, url); + }, + canonicalize$body$JSToDartAsyncFileImporter(_, url) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Uri), + $async$returnValue, $async$self = this, result, t1, resultUrl; + var $async$canonicalize$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (url.get$scheme() === "file") { + $async$returnValue = $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); + // goto return + $async$goto = 1; + break; + } + result = A.wrapJSExceptions(new A.JSToDartAsyncFileImporter_canonicalize_closure($async$self, url)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture0(type$.Promise._as(result), type$.nullable_Object), $async$canonicalize$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t1 = self.URL; + if (!(result instanceof t1)) + A.jsThrow(new self.Error(string$.The_fie)); + resultUrl = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + if (resultUrl.get$scheme() !== "file") + A.jsThrow(new self.Error(string$.The_fiu + url.toString$0(0) + '".')); + $async$returnValue = $.$get$FilesystemImporter_cwd0().canonicalize$1(0, resultUrl); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$1, $async$completer); + }, + load$1(_, url) { + return $.$get$FilesystemImporter_cwd0().load$1(0, url); + }, + isNonCanonicalScheme$1(scheme) { + return scheme !== "file"; + } + }; + A.JSToDartAsyncFileImporter_canonicalize_closure.prototype = { + call$0() { + return this.$this._findFileUrl.call$2(this.url.toString$0(0), A.canonicalizeContext0()); + }, + $signature: 36 + }; + A.AsyncImportCache0.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + return this.canonicalize$body$AsyncImportCache0(0, url, baseImporter, baseUrl, forImport); + }, + canonicalize$body$AsyncImportCache0(_, url, baseImporter, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), + $async$returnValue, $async$self = this, t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j; + var $async$canonicalize$4$baseImporter$baseUrl$forImport = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + if (A.isBrowser()) + t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter0) && $async$self._async_import_cache0$_importers.length === 0; + else + t1 = false; + if (t1) + throw A.wrapException(string$.Customi); + $async$goto = baseImporter != null && url.get$scheme() === "" ? 3 : 4; + break; + case 3: + // then + resolvedUrl = baseUrl == null ? null : baseUrl.resolveUri$1(url); + if (resolvedUrl == null) + resolvedUrl = url; + key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); + $async$goto = 5; + return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_perImporterCanonicalizeCache, key, new A.AsyncImportCache_canonicalize_closure0($async$self, baseImporter, resolvedUrl, baseUrl, forImport, key, url), type$.Record_3_AsyncImporter_and_Uri_and_bool_forImport_2, type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 5: + // returning from await. + relativeResult = $async$result; + if (relativeResult != null) { + $async$returnValue = relativeResult; + // goto return + $async$goto = 1; + break; + } + case 4: + // join + key = new A._Record_2_forImport(url, forImport); + t1 = $async$self._async_import_cache0$_canonicalizeCache; + if (t1.containsKey$1(key)) { + $async$returnValue = t1.$index(0, key); + // goto return + $async$goto = 1; + break; + } + t2 = $async$self._async_import_cache0$_importers, t3 = type$.Record_1_nullable_Object, t4 = $async$self._async_import_cache0$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, t6 = type$.Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2, cacheable = true, i = 0; + case 6: + // for condition + if (!(i < t2.length)) { + // goto after for + $async$goto = 8; + break; + } + importer = t2[i]; + perImporterKey = new A._Record_3_forImport(importer, url, forImport); + if (t4.containsKey$1(perImporterKey)) { + t7 = t4.$index(0, perImporterKey); + _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); + } else + _1_0 = null; + _1_2_isSet = t3._is(_1_0); + result = null; + if (_1_2_isSet) { + _1_2 = _1_0._0; + t7 = _1_2 != null; + if (t7) { + t6._as(_1_2); + result = _1_2; + } + } else { + _1_2 = null; + t7 = false; + } + if (t7) { + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (_1_2_isSet) + t7 = _1_2 == null; + else + t7 = false; + if (t7) { + // goto for update + $async$goto = 7; + break; + } + $async$goto = 10; + return A._asyncAwait($async$self._async_import_cache0$_canonicalize$4(importer, url, baseUrl, forImport), $async$canonicalize$4$baseImporter$baseUrl$forImport); + case 10: + // returning from await. + _2_0 = $async$result; + _2_1 = _2_0._0; + _2_5_isSet = _2_1 != null; + _2_5 = null; + _2_3 = null; + t7 = false; + if (_2_5_isSet) { + result = _2_1 == null ? t6._as(_2_1) : _2_1; + _2_3 = _2_0._1; + t7 = _2_3; + _2_5 = t7; + t7 = t7 && cacheable; + } else + result = null; + if (t7) { + t1.$indexSet(0, key, result); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + } + if (_2_5_isSet) { + t7 = _2_5; + _2_3_isSet = _2_5_isSet; + } else { + _2_3 = _2_0._1; + t7 = _2_3; + _2_3_isSet = true; + } + t7 = t7 && !cacheable; + if (t7) { + t4.$indexSet(0, perImporterKey, _2_1); + if (_2_1 != null) { + $async$returnValue = _2_1; + // goto return + $async$goto = 1; + break; + } + // goto break $label0$1 + $async$goto = 9; + break; + } + t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); + if (t7) { + if (cacheable) { + for (j = 0; j < i; ++j) + t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), null); + cacheable = false; + } + if (_2_1 != null) { + $async$returnValue = _2_1; + // goto return + $async$goto = 1; + break; + } + } + case 9: + // break $label0$1 + case 7: + // for update + ++i; + // goto for condition + $async$goto = 6; + break; + case 8: + // after for + if (cacheable) + t1.$indexSet(0, key, null); + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$canonicalize$4$baseImporter$baseUrl$forImport, $async$completer); + }, + _async_import_cache0$_canonicalize$4(importer, url, baseUrl, forImport) { + return this._canonicalize$body$AsyncImportCache0(importer, url, baseUrl, forImport); + }, + _canonicalize$body$AsyncImportCache0(importer, url, baseUrl, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool_2), + $async$returnValue, t1, passContainingUrl, canonicalizeContext, result, cacheable; + var $async$_async_import_cache0$_canonicalize$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = baseUrl != null ? 3 : 5; + break; + case 3: + // then + $async$goto = url.get$scheme() !== "" ? 6 : 8; + break; + case 6: + // then + t1 = A._Future$value(importer.isNonCanonicalScheme$1(url.get$scheme()), type$.bool); + $async$goto = 9; + return A._asyncAwait(t1, $async$_async_import_cache0$_canonicalize$4); + case 9: + // returning from await. + t1 = $async$result; + passContainingUrl = t1; + // goto join + $async$goto = 7; + break; + case 8: + // else + passContainingUrl = true; + case 7: + // join + // goto join + $async$goto = 4; + break; + case 5: + // else + passContainingUrl = false; + case 4: + // join + canonicalizeContext = new A.CanonicalizeContext0(forImport, passContainingUrl ? baseUrl : null); + t1 = type$.nullable_Object; + t1 = A.runZoned(new A.AsyncImportCache__canonicalize_closure0(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.FutureOr_nullable_Uri); + $async$goto = 10; + return A._asyncAwait(type$.Future_nullable_Uri._is(t1) ? t1 : A._Future$value(t1, type$.nullable_Uri), $async$_async_import_cache0$_canonicalize$4); + case 10: + // returning from await. + result = $async$result; + cacheable = !passContainingUrl || !canonicalizeContext._canonicalize_context$_wasContainingUrlAccessed; + if (result == null) { + $async$returnValue = new A._Record_2(null, cacheable); + // goto return + $async$goto = 1; + break; + } + $async$goto = result.get$scheme() !== "" ? 11 : 13; + break; + case 11: + // then + t1 = A._Future$value(importer.isNonCanonicalScheme$1(result.get$scheme()), type$.bool); + $async$goto = 14; + return A._asyncAwait(t1, $async$_async_import_cache0$_canonicalize$4); + case 14: + // returning from await. + t1 = $async$result; + // goto join + $async$goto = 12; + break; + case 13: + // else + t1 = false; + case 12: + // join + if (t1) + throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); + $async$returnValue = new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_async_import_cache0$_canonicalize$4, $async$completer); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this.importCanonical$body$AsyncImportCache0(importer, canonicalUrl, originalUrl); + }, + importCanonical$body$AsyncImportCache0(importer, canonicalUrl, originalUrl) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet_2), + $async$returnValue, $async$self = this; + var $async$importCanonical$3$originalUrl = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$goto = 3; + return A._asyncAwait(A.putIfAbsentAsync0($async$self._async_import_cache0$_importCache, canonicalUrl, new A.AsyncImportCache_importCanonical_closure0($async$self, importer, canonicalUrl, originalUrl), type$.Uri, type$.nullable_Stylesheet_2), $async$importCanonical$3$originalUrl); + case 3: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$importCanonical$3$originalUrl, $async$completer); + }, + humanize$1(canonicalUrl) { + var t1 = this._async_import_cache0$_canonicalizeCache, + t2 = type$.NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2; + t2 = A.NullableExtension_andThen0(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(new A.LinkedHashMapValuesIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapValuesIterable<2>")), t2), new A.AsyncImportCache_humanize_closure3(canonicalUrl), t2._eval$1("WhereIterable")), new A.AsyncImportCache_humanize_closure4(), t2._eval$1("MappedIterable")), new A.AsyncImportCache_humanize_closure5()), new A.AsyncImportCache_humanize_closure6(canonicalUrl)); + return t2 == null ? canonicalUrl : t2; + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._async_import_cache0$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(0); + return t1 == null ? canonicalUrl : t1; + } + }; + A.AsyncImportCache_canonicalize_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2), + $async$returnValue, $async$self = this, t1, t2, _0_0, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.$this; + t2 = $async$self.baseUrl; + $async$goto = 3; + return A._asyncAwait(t1._async_import_cache0$_canonicalize$4($async$self.baseImporter, $async$self.resolvedUrl, t2, $async$self.forImport), $async$call$0); + case 3: + // returning from await. + _0_0 = $async$result; + result = _0_0._0; + _0_0._1; + if (t2 != null) + t1._async_import_cache0$_nonCanonicalRelativeUrls.$indexSet(0, $async$self.key, $async$self.url); + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 368 + }; + A.AsyncImportCache__canonicalize_closure0.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 182 + }; + A.AsyncImportCache_importCanonical_closure0.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Stylesheet_2), + $async$returnValue, $async$self = this, t1, t2, t3, result; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = Date.now(); + t2 = $async$self.canonicalUrl; + t3 = $async$self.importer.load$1(0, t2); + $async$goto = 3; + return A._asyncAwait(type$.Future_nullable_ImporterResult._is(t3) ? t3 : A._Future$value(t3, type$.nullable_ImporterResult_2), $async$call$0); + case 3: + // returning from await. + result = $async$result; + if (result == null) { + $async$returnValue = null; + // goto return + $async$goto = 1; + break; + } + t3 = $async$self.$this; + t3._async_import_cache0$_loadTimes.$indexSet(0, t2, new A.DateTime(t1, 0, false)); + t3._async_import_cache0$_resultsCache.$indexSet(0, t2, result); + t3 = result.contents; + t1 = result.syntax; + t2 = $async$self.originalUrl.resolveUri$1(t2); + $async$returnValue = A.Stylesheet_Stylesheet$parse0(t3, t1, false, t2); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 369 + }; + A.AsyncImportCache_humanize_closure3.prototype = { + call$1(result) { + return result._1.$eq(0, this.canonicalUrl); + }, + $signature: 370 + }; + A.AsyncImportCache_humanize_closure4.prototype = { + call$1(result) { + return result._2; + }, + $signature: 371 + }; + A.AsyncImportCache_humanize_closure5.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 107 + }; + A.AsyncImportCache_humanize_closure6.prototype = { + call$1(url) { + var t1 = $.$get$url(), + t2 = this.canonicalUrl; + return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); + }, + $signature: 49 + }; + A.AtRootQueryParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.AtRootQueryParser_parse_closure0(this)); + } + }; + A.AtRootQueryParser_parse_closure0.prototype = { + call$0() { + var include, atRules, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$1(40); + t1.whitespace$1$consumeNewlines(true); + include = t1.scanIdentifier$1("with"); + if (!include) + t1.expectIdentifier$2$name("without", '"with" or "without"'); + t1.whitespace$1$consumeNewlines(true); + t2.expectChar$1(58); + t1.whitespace$1$consumeNewlines(true); + atRules = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + do { + atRules.add$1(0, t1.identifier$0().toLowerCase()); + t1.whitespace$1$consumeNewlines(true); + } while (t1.lookingAtIdentifier$0()); + t2.expectChar$1(41); + t2.expectDone$0(); + return new A.AtRootQuery0(include, atRules, atRules.contains$1(0, "all"), atRules.contains$1(0, "rule")); + }, + $signature: 372 + }; + A.AtRootQuery0.prototype = { + excludes$1(node) { + var t1, _this = this; + if (_this._at_root_query0$_all) + return !_this.include; + $label0$0: { + if (node instanceof A.ModifiableCssStyleRule0) { + t1 = _this._at_root_query0$_rule !== _this.include; + break $label0$0; + } + if (node instanceof A.ModifiableCssMediaRule0) { + t1 = _this.excludesName$1("media"); + break $label0$0; + } + if (node instanceof A.ModifiableCssSupportsRule0) { + t1 = _this.excludesName$1("supports"); + break $label0$0; + } + if (node instanceof A.ModifiableCssAtRule0) { + t1 = _this.excludesName$1(node.name.value.toLowerCase()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + excludesName$1($name) { + var t1 = this._at_root_query0$_all || this.names.contains$1(0, $name); + return t1 !== this.include; + } + }; + A.AtRootRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRootRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var buffer = new A.StringBuffer("@at-root "), + t1 = this.query; + if (t1 != null) + buffer._contents = "@at-root " + (t1.toString$0(0) + " "); + return buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssAtRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssAtRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1, t2; + if (other instanceof A.ModifiableCssAtRule0) { + t1 = this.name; + t2 = other.name; + t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value) && J.$eq$(this.value, other.value) && this.isChildless === other.isChildless; + } else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + var _this = this; + return A.ModifiableCssAtRule$0(_this.name, _this.span, _this.isChildless, _this.value); + }, + addChild$1(child) { + this.super$ModifiableCssParentNode$addChild0(child); + }, + get$isChildless() { + return this.isChildless; + }, + get$span(receiver) { + return this.span; + } + }; + A.AtRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitAtRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var children, + t1 = "@" + this.name.toString$0(0), + buffer = new A.StringBuffer(t1), + t2 = this.value; + if (t2 != null) + buffer._contents = t1 + (" " + t2.toString$0(0)); + children = this.children; + return children == null ? buffer.toString$0(0) + ";" : buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.InterpolatedAttributeSelector.prototype = { + accept$1$1(visitor) { + return J.visitAttributeSelector$1$x(visitor._simple_selector$_inner, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + result = "[" + _this.name.toString$0(0), + t1 = _this.op; + if (t1 != null) { + result += t1.toString$0(0) + A.S(_this.value); + t1 = _this.modifier; + if (t1 != null) + result += " " + t1.toString$0(0); + } + return result; + }, + get$span(receiver) { + return this.span; + } + }; + A.AttributeSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitAttributeSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.AttributeSelector0 && other.name.$eq(0, _this.name) && other.op == _this.op && other.value == _this.value && other.modifier == _this.modifier; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.name; + return (B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace) ^ J.get$hashCode$(_this.op) ^ J.get$hashCode$(_this.value) ^ J.get$hashCode$(_this.modifier)) >>> 0; + } + }; + A.AttributeOperator0.prototype = { + _enumToString$0() { + return "AttributeOperator." + this._name; + }, + toString$0(_) { + return this._attribute0$_text; + } + }; + A.BinaryOperationExpression0.prototype = { + get$span(_) { + var right, + left = this.left; + while (left instanceof A.BinaryOperationExpression0) + left = left.left; + right = this.right; + while (right instanceof A.BinaryOperationExpression0) + right = right.right; + return left.get$span(left).expand$1(0, right.get$span(right)); + }, + get$operatorSpan() { + var t3, t4, + t1 = this.left, + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = this.right; + t4 = t3.get$span(t3); + if (t2 === t4.get$file(t4)) { + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + t4 = t2.offset < t4.get$start(t4).offset; + t2 = t4; + } else + t2 = false; + if (t2) { + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + t3 = A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t2.span$2(0, t1.offset, t3.get$start(t3).offset))); + t1 = t3; + } else + t1 = this.get$span(0); + return t1; + }, + accept$1$1(visitor) { + return visitor.visitBinaryOperationExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1, t2, t3, right, operator, _this = this, + _0_0 = _this.left; + $label0$0: { + if (_0_0 instanceof A.BinaryOperationExpression0) { + t1 = _0_0.operator.precedence < _this.operator.precedence; + break $label0$0; + } + if (_0_0 instanceof A.ListExpression0 && !_0_0.hasBrackets && _0_0.contents.length >= 2) { + t1 = true; + break $label0$0; + } + t1 = false; + break $label0$0; + } + t2 = t1 ? A.Primitives_stringFromCharCode(40) : ""; + t2 += _0_0.toString$0(0); + t1 = t1 ? t2 + A.Primitives_stringFromCharCode(41) : t2; + t2 = A.Primitives_stringFromCharCode(32); + t3 = _this.operator; + t2 = t1 + t2 + t3.operator + t2; + right = _this.right; + $label1$1: { + t1 = false; + if (right instanceof A.BinaryOperationExpression0) { + operator = right.operator; + if (operator.precedence <= t3.precedence) + t1 = !(operator === t3 && operator.isAssociative); + break $label1$1; + } + if (right instanceof A.ListExpression0 && !right.hasBrackets && right.contents.length >= 2) { + t1 = true; + break $label1$1; + } + break $label1$1; + } + if (t1) + t2 += A.Primitives_stringFromCharCode(40); + t2 += right.toString$0(0); + t1 = t1 ? t2 + A.Primitives_stringFromCharCode(41) : t2; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.BinaryOperator0.prototype = { + _enumToString$0() { + return "BinaryOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.BooleanExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitBooleanExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return String(this.value); + }, + get$span(receiver) { + return this.span; + } + }; + A.booleanClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassBoolean", new A.booleanClass__closure())); + A.JSClassExtension_injectSuperclass(t1._as(B.SassBoolean_true0.constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.booleanClass__closure.prototype = { + call$2($self, _) { + A.jsThrow(new self.Error("new sass.SassBoolean() isn't allowed.\nUse sass.sassTrue or sass.sassFalse instead.")); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 223 + }; + A.legacyBooleanClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.types.Boolean", new A.legacyBooleanClass__closure())); + J.get$$prototype$x(jsClass).getValue = A.allowInteropCaptureThisNamed("getValue", new A.legacyBooleanClass__closure0()); + jsClass.TRUE = B.SassBoolean_true0; + jsClass.FALSE = B.SassBoolean_false0; + A.JSClassExtension_injectSuperclass(t1._as(B.SassBoolean_true0.constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.legacyBooleanClass__closure.prototype = { + call$2(_, __) { + throw A.wrapException("new sass.types.Boolean() isn't allowed.\nUse sass.types.Boolean.TRUE or sass.types.Boolean.FALSE instead."); + }, + call$1(_) { + return this.call$2(_, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 224 + }; + A.legacyBooleanClass__closure0.prototype = { + call$1($self) { + return $self === B.SassBoolean_true0; + }, + $signature: 73 + }; + A.SassBoolean0.prototype = { + get$isTruthy() { + return this.value; + }, + accept$1$1(visitor) { + return visitor._serialize0$_buffer.write$1(0, String(this.value)); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertBoolean$1($name) { + return this; + }, + unaryNot$0() { + return this.value ? B.SassBoolean_false0 : B.SassBoolean_true0; + } + }; + A.BooleanOperator0.prototype = { + _enumToString$0() { + return "BooleanOperator." + this._name; + }, + toString$0(_) { + return this._name; + } + }; + A.Box0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return this.$ti._is(other) && other._box0$_inner === this._box0$_inner; + }, + get$hashCode(_) { + return A.Primitives_objectHashCode(this._box0$_inner); + }, + toString$0(_) { + return ""; + } + }; + A.ModifiableBox0.prototype = { + toString$0(_) { + return ""; + } + }; + A.BuiltInCallable0.prototype = { + callbackFor$2(positional, names) { + var t1, t2, fuzzyMatch, minMismatchDistance, _i, overload, t3, mismatchDistance, t4; + for (t1 = this._built_in$_overloads, t2 = t1.length, fuzzyMatch = null, minMismatchDistance = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + overload = t1[_i]; + t3 = overload._0; + if (t3.matches$2(positional, names)) + return overload; + mismatchDistance = t3.parameters.length - positional; + if (minMismatchDistance != null) { + t3 = Math.abs(mismatchDistance); + t4 = Math.abs(minMismatchDistance); + if (t3 > t4) + continue; + if (t3 === t4 && mismatchDistance < 0) + continue; + } + minMismatchDistance = mismatchDistance; + fuzzyMatch = overload; + } + if (fuzzyMatch != null) + return fuzzyMatch; + throw A.wrapException(A.StateError$("BuiltInCallable " + this.name + " may not have empty overloads.")); + }, + withName$1($name) { + return new A.BuiltInCallable0($name, this._built_in$_overloads, this.acceptsContent); + }, + withDeprecationWarning$2(module, newName) { + var t2, t3, _i, t4, t5, _this = this, + t1 = A._setArrayType([], type$.JSArray_Record_2_ParameterList_and_Value_Function_List_Value_2); + for (t2 = _this._built_in$_overloads, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = {}; + t5 = t2[_i]; + t4.$function = null; + t4.$function = t5._1; + t1.push(new A._Record_2(t5._0, new A.BuiltInCallable_withDeprecationWarning_closure0(t4, _this, module, newName))); + } + return new A.BuiltInCallable0(_this.name, t1, _this.acceptsContent); + }, + withDeprecationWarning$1(module) { + return this.withDeprecationWarning$2(module, null); + }, + $isAsyncCallable0: 1, + $isAsyncBuiltInCallable0: 1, + $isCallable: 1, + get$name(receiver) { + return this.name; + }, + get$acceptsContent() { + return this.acceptsContent; + } + }; + A.BuiltInCallable$mixin_closure0.prototype = { + call$1($arguments) { + this.callback.call$1($arguments); + return B.C__SassNull0; + }, + $signature: 3 + }; + A.BuiltInCallable_withDeprecationWarning_closure0.prototype = { + call$1(args) { + var _this = this, + t1 = _this.newName; + if (t1 == null) + t1 = _this.$this.name; + A.warnForDeprecation0(string$.Global + _this.module + "." + t1 + string$.x20inste, B.Deprecation_SGB); + return _this._box_0.$function.call$1(args); + }, + $signature: 3 + }; + A.BuiltInModule0.prototype = { + get$upstream() { + return B.List_empty22; + }, + get$variableNodes() { + return B.Map_empty13; + }, + get$extensionStore() { + return B.C_EmptyExtensionStore0; + }, + get$css(_) { + return new A.CssStylesheet0(B.List_empty20, A.SourceFile$decoded(B.List_empty4, this.url).span$2(0, 0, 0)); + }, + get$preModuleComments() { + return B.Map_empty12; + }, + get$transitivelyContainsCss() { + return false; + }, + get$transitivelyContainsExtensions() { + return false; + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + throw A.wrapException(A.SassScriptException$0("Cannot modify built-in variable.", null)); + }, + variableIdentity$1($name) { + return this; + }, + couldHaveBeenConfigured$1(_) { + return false; + }, + cloneCss$0() { + return this; + }, + $isModule1: 1, + get$url(receiver) { + return this.url; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$variables() { + return this.variables; + } + }; + A.calculationClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassCalculation", new A.calculationClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["calc", new A.calculationClass__closure0(), "min", new A.calculationClass__closure1(), "max", new A.calculationClass__closure2(), "clamp", new A.calculationClass__closure3()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineStaticMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["assertCalculation", new A.calculationClass__closure4()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["arguments", new A.calculationClass__closure5()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([A.SassNumber_SassNumber0(1, null)], type$.JSArray_Object), type$.Object)).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.calculationClass__closure.prototype = { + call$2($self, _) { + A.jsThrow0(new self.Error("new sass.SassCalculation() isn't allowed")); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 223 + }; + A.calculationClass__closure0.prototype = { + call$1(argument) { + A._assertCalculationValue(argument); + return new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([argument], type$.JSArray_Object), type$.Object)); + }, + $signature: 119 + }; + A.calculationClass__closure1.prototype = { + call$1($arguments) { + var t1 = self.immutable.isOrderedMap($arguments) ? J.toArray$0$x(type$.ImmutableList_2._as($arguments)) : type$.List_dynamic._as($arguments), + t2 = type$.Object, + argList = J.cast$1$0$ax(t1, t2); + argList.forEach$1(argList, A.calculation1___assertCalculationValue$closure()); + return new A.SassCalculation0("min", A.List_List$unmodifiable(argList, t2)); + }, + $signature: 119 + }; + A.calculationClass__closure2.prototype = { + call$1($arguments) { + var t1 = self.immutable.isOrderedMap($arguments) ? J.toArray$0$x(type$.ImmutableList_2._as($arguments)) : type$.List_dynamic._as($arguments), + t2 = type$.Object, + argList = J.cast$1$0$ax(t1, t2); + argList.forEach$1(argList, A.calculation1___assertCalculationValue$closure()); + return new A.SassCalculation0("max", A.List_List$unmodifiable(argList, t2)); + }, + $signature: 119 + }; + A.calculationClass__closure3.prototype = { + call$3(min, value, max) { + var t1; + if (!(value == null && !A._isValidClampArg(min))) + t1 = max == null && !B.JSArray_methods.any$1([min, value], A.calculation1___isValidClampArg$closure()); + else + t1 = true; + if (t1) + A.jsThrow0(new self.Error("Expected at least one SassString or CalculationInterpolation in `" + new A.NonNullsIterable([min, value, max], type$.NonNullsIterable_Object).toString$0(0) + "`")); + t1 = type$.NonNullsIterable_Object; + new A.NonNullsIterable([min, value, max], t1).forEach$1(0, A.calculation1___assertCalculationValue$closure()); + return new A.SassCalculation0("clamp", A.List_List$unmodifiable(new A.NonNullsIterable([min, value, max], t1), type$.Object)); + }, + call$1(min) { + return this.call$3(min, null, null); + }, + call$2(min, value) { + return this.call$3(min, value, null); + }, + "call*": "call$3", + $requiredArgCount: 1, + $defaultValues() { + return [null, null]; + }, + $signature: 377 + }; + A.calculationClass__closure4.prototype = { + call$2($self, $name) { + return $self; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 378 + }; + A.calculationClass__closure5.prototype = { + call$1($self) { + return new self.immutable.List($self.$arguments); + }, + $signature: 379 + }; + A.calculationOperationClass_closure.prototype = { + call$0() { + var _null = null, + t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.CalculationOperation", new A.calculationOperationClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.calculationOperationClass__closure0(), "hashCode", new A.calculationOperationClass__closure1()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["operator", new A.calculationOperationClass__closure2(), "left", new A.calculationOperationClass__closure3(), "right", new A.calculationOperationClass__closure4()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(A.SassCalculation_operateInternal0(B.CalculationOperator_dpX0, A.SassNumber_SassNumber0(1, _null), A.SassNumber_SassNumber0(1, _null), _null, false, _null).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.calculationOperationClass__closure.prototype = { + call$4($self, strOperator, left, right) { + var operator = A.IterableExtension_firstWhereOrNull(B.List_UqK, new A.calculationOperationClass___closure(strOperator)); + if (operator == null) + A.jsThrow0(new self.Error("Invalid operator: " + strOperator)); + A._assertCalculationValue(left); + A._assertCalculationValue(right); + return A.SassCalculation_operateInternal0(operator, left, right, null, false, null); + }, + "call*": "call$4", + $requiredArgCount: 4, + $signature: 380 + }; + A.calculationOperationClass___closure.prototype = { + call$1(value) { + return value.operator === this.strOperator; + }, + $signature: 381 + }; + A.calculationOperationClass__closure0.prototype = { + call$2($self, other) { + return $self.$eq(0, other); + }, + $signature: 382 + }; + A.calculationOperationClass__closure1.prototype = { + call$1($self) { + return $self.get$hashCode(0); + }, + $signature: 383 + }; + A.calculationOperationClass__closure2.prototype = { + call$1($self) { + return $self._calculation0$_operator.operator; + }, + $signature: 384 + }; + A.calculationOperationClass__closure3.prototype = { + call$1($self) { + return $self._calculation0$_left; + }, + $signature: 225 + }; + A.calculationOperationClass__closure4.prototype = { + call$1($self) { + return $self._calculation0$_right; + }, + $signature: 225 + }; + A.calculationInterpolationClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.CalculationInterpolation", new A.calculationInterpolationClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.calculationInterpolationClass__closure0(), "hashCode", new A.calculationInterpolationClass__closure1()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["value", new A.calculationInterpolationClass__closure2()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(new A.CalculationInterpolation("").constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.calculationInterpolationClass__closure.prototype = { + call$2($self, value) { + return new A.CalculationInterpolation(value); + }, + $signature: 386 + }; + A.calculationInterpolationClass__closure0.prototype = { + call$2($self, other) { + return other instanceof A.CalculationInterpolation && $self._calculation0$_value === other._calculation0$_value; + }, + $signature: 387 + }; + A.calculationInterpolationClass__closure1.prototype = { + call$1($self) { + return B.JSString_methods.get$hashCode($self._calculation0$_value); + }, + $signature: 388 + }; + A.calculationInterpolationClass__closure2.prototype = { + call$1($self) { + return $self._calculation0$_value; + }, + $signature: 389 + }; + A.SassCalculation0.prototype = { + get$isSpecialNumber() { + return true; + }, + accept$1$1(visitor) { + return visitor.visitCalculation$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertCalculation$1($name) { + return this; + }, + plus$1(other) { + if (other instanceof A.SassString0) + return this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + unaryPlus$0() { + return A.throwExpression(A.SassScriptException$0('Undefined operation "+' + this.toString$0(0) + '".', null)); + }, + unaryMinus$0() { + return A.throwExpression(A.SassScriptException$0('Undefined operation "-' + this.toString$0(0) + '".', null)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassCalculation0 && this.name === other.name && B.C_ListEquality.equals$2(0, this.$arguments, other.$arguments); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ B.C_ListEquality0.hash$1(this.$arguments); + } + }; + A.SassCalculation__verifyLength_closure0.prototype = { + call$1(arg) { + return arg instanceof A.SassString0; + }, + $signature: 73 + }; + A.CalculationOperation0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationOperation0 && this._calculation0$_operator === other._calculation0$_operator && J.$eq$(this._calculation0$_left, other._calculation0$_left) && J.$eq$(this._calculation0$_right, other._calculation0$_right); + }, + get$hashCode(_) { + return (A.Primitives_objectHashCode(this._calculation0$_operator) ^ J.get$hashCode$(this._calculation0$_left) ^ J.get$hashCode$(this._calculation0$_right)) >>> 0; + }, + toString$0(_) { + var parenthesized = A.serializeValue0(new A.SassCalculation0("", A._setArrayType([this], type$.JSArray_Object)), true, true); + return B.JSString_methods.substring$2(parenthesized, 1, parenthesized.length - 1); + } + }; + A.CalculationOperator0.prototype = { + _enumToString$0() { + return "CalculationOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.CalculationInterpolation.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CalculationInterpolation && this._calculation0$_value === other._calculation0$_value; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this._calculation0$_value); + }, + toString$0(_) { + return this._calculation0$_value; + } + }; + A.CallableDeclaration0.prototype = { + get$span(receiver) { + return this.span; + } + }; + A.updateCanonicalizeContextPrototype_closure.prototype = { + call$1($self) { + return $self._canonicalize_context$_fromImport; + }, + $signature: 390 + }; + A.updateCanonicalizeContextPrototype_closure0.prototype = { + call$1($self) { + $self._canonicalize_context$_wasContainingUrlAccessed = true; + return A.NullableExtension_andThen0($self._canonicalize_context$_containingUrl, A.utils3__dartToJSUrl$closure()); + }, + $signature: 391 + }; + A.CanonicalizeContext0.prototype = { + withFromImport$1$2(fromImport, callback) { + var t1, + oldFromImport = this._canonicalize_context$_fromImport; + this._canonicalize_context$_fromImport = true; + try { + t1 = callback.call$0(); + return t1; + } finally { + this._canonicalize_context$_fromImport = oldFromImport; + } + }, + withFromImport$2(fromImport, callback) { + return this.withFromImport$1$2(fromImport, callback, type$.dynamic); + } + }; + A.ColorChannel0.prototype = { + isAnalogous$1(other) { + var _0_6_isSet, t1, _0_60, t2, _0_6_isSet0, + _0_1 = this.name, + _0_6 = other.name; + $label0$0: { + if ("red" !== _0_1) + _0_6_isSet = "x" === _0_1; + else + _0_6_isSet = true; + if (_0_6_isSet) { + if ("red" !== _0_6) + t1 = "x" === _0_6; + else + t1 = true; + _0_60 = _0_6; + } else { + _0_60 = null; + t1 = false; + } + t2 = true; + if (!t1) { + if ("green" !== _0_1) + t1 = "y" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("green" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "y" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("blue" !== _0_1) + t1 = "z" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("blue" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "z" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("chroma" !== _0_1) + t1 = "saturation" === _0_1; + else + t1 = true; + if (t1) { + _0_6_isSet0 = true; + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + if ("chroma" !== t1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_6_isSet = _0_6_isSet0; + _0_60 = t1; + } + t1 = "saturation" === t1; + } else + t1 = true; + } else + t1 = false; + if (!t1) { + if ("lightness" === _0_1) { + if (_0_6_isSet) + t1 = _0_60; + else { + t1 = _0_6; + _0_60 = t1; + _0_6_isSet = true; + } + t1 = "lightness" === t1; + } else + t1 = false; + if (!t1) + if ("hue" === _0_1) + t1 = "hue" === (_0_6_isSet ? _0_60 : _0_6); + else + t1 = false; + else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + break $label0$0; + } + return t1; + } + }; + A.LinearChannel0.prototype = {}; + A.Chokidar0.prototype = {}; + A.ChokidarOptions0.prototype = {}; + A.ChokidarWatcher0.prototype = {}; + A.InterpolatedClassSelector.prototype = { + get$span(_) { + var t1 = this.name.span; + return t1.get$file(t1).span$2(0, t1.get$start(t1).offset - 1, t1.get$end(t1).offset); + }, + accept$1$1(visitor) { + return J.visitClassSelector$1$x(visitor._simple_selector$_inner, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "." + this.name.toString$0(0); + } + }; + A.ClassSelector0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ClassSelector0 && other.name === this.name; + }, + accept$1$1(visitor) { + return visitor.visitClassSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.ClassSelector0(this.name + suffix, this.span); + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.ClipGamutMap0.prototype = { + map$1(_, color) { + var t1 = color._color0$_space, + t2 = t1._space$_channels; + return A.SassColor_SassColor$forSpaceInternal0(t1, this._clip$_clampChannel$2(color.channel0OrNull, t2[0]), this._clip$_clampChannel$2(color.channel1OrNull, t2[1]), this._clip$_clampChannel$2(color.channel2OrNull, t2[2]), color.alphaOrNull); + }, + _clip$_clampChannel$2(value, channel) { + var t1, min; + if (value == null) + t1 = null; + else + $label0$0: { + if (channel instanceof A.LinearChannel0) { + min = channel.min; + t1 = isNaN(value) ? min : B.JSNumber_methods.clamp$2(value, min, channel.max); + break $label0$0; + } + t1 = value; + break $label0$0; + } + return t1; + } + }; + A._CloneCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless, + rule = A.ModifiableCssAtRule$0(node.name, node.span, t1, node.value); + return t1 ? rule : this._clone_css$_visitChildren$2(rule, node); + }, + visitCssComment$1(node) { + return new A.ModifiableCssComment0(node.text, node.span); + }, + visitCssDeclaration$1(node) { + return A.ModifiableCssDeclaration$0(node.name, node.value, node.span, node.parsedAsSassScript, node.valueSpanForMap); + }, + visitCssImport$1(node) { + return new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + }, + visitCssKeyframeBlock$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), node); + }, + visitCssMediaRule$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssMediaRule$0(node.queries, node.span), node); + }, + visitCssStyleRule$1(node) { + var _0_0 = this._clone_css$_oldToNewSelectors.$index(0, node._style_rule0$_selector._box0$_inner.value); + if (_0_0 != null) + return this._clone_css$_visitChildren$2(A.ModifiableCssStyleRule$0(_0_0, node.span, false, node.originalSelector), node); + else + throw A.wrapException(A.StateError$(string$.The_Ex)); + }, + visitCssStylesheet$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssStylesheet$0(node.get$span(node)), node); + }, + visitCssSupportsRule$1(node) { + return this._clone_css$_visitChildren$2(A.ModifiableCssSupportsRule$0(node.condition, node.span), node); + }, + _clone_css$_visitChildren$1$2(newParent, oldParent) { + var t1, t2, newChild; + for (t1 = J.get$iterator$ax(oldParent.get$children(oldParent)); t1.moveNext$0();) { + t2 = t1.get$current(t1); + newChild = t2.accept$1(this); + newChild.isGroupEnd = t2.get$isGroupEnd(); + newParent.addChild$1(newChild); + } + return newParent; + }, + _clone_css$_visitChildren$2(newParent, oldParent) { + return this._clone_css$_visitChildren$1$2(newParent, oldParent, type$.ModifiableCssParentNode_2); + } + }; + A.ColorExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitColorExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue0(this.value, true, true); + }, + get$span(receiver) { + return this.span; + } + }; + A.global_closure44.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "red")); + }, + $signature: 39 + }; + A.global_closure45.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "green")); + }, + $signature: 39 + }; + A.global_closure46.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "blue")); + }, + $signature: 39 + }; + A.global_closure47.prototype = { + call$1($arguments) { + return A._rgb0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure48.prototype = { + call$1($arguments) { + return A._rgb0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure49.prototype = { + call$1($arguments) { + return A._rgbTwoArg0("rgb", $arguments); + }, + $signature: 3 + }; + A.global_closure50.prototype = { + call$1($arguments) { + return A._parseChannels0("rgb", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_i0P0); + }, + $signature: 3 + }; + A.global_closure51.prototype = { + call$1($arguments) { + return A._rgb0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure52.prototype = { + call$1($arguments) { + return A._rgb0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure53.prototype = { + call$1($arguments) { + return A._rgbTwoArg0("rgba", $arguments); + }, + $signature: 3 + }; + A.global_closure54.prototype = { + call$1($arguments) { + return A._parseChannels0("rgba", J.$index$asx($arguments, 0), "channels", B.RgbColorSpace_i0P0); + }, + $signature: 3 + }; + A.global_closure55.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (!(t1.$index($arguments, 0) instanceof A.SassNumber0) && !t1.$index($arguments, 0).get$isSpecialNumber()) + A.warnForDeprecation0(string$.Globalci, B.Deprecation_SGB); + return A._invert0($arguments, true); + }, + $signature: 3 + }; + A.global_closure56.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "hue"); + }, + $signature: 30 + }; + A.global_closure57.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "saturation"); + }, + $signature: 30 + }; + A.global_closure58.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "lightness"); + }, + $signature: 30 + }; + A.global_closure59.prototype = { + call$1($arguments) { + return A._hsl0("hsl", $arguments); + }, + $signature: 3 + }; + A.global_closure60.prototype = { + call$1($arguments) { + return A._hsl0("hsl", $arguments); + }, + $signature: 3 + }; + A.global_closure61.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isSpecialVariable() || t1.$index($arguments, 1).get$isSpecialVariable()) + return A._functionString0("hsl", $arguments); + else + throw A.wrapException(A.SassScriptException$0("Missing argument $lightness.", null)); + }, + $signature: 18 + }; + A.global_closure62.prototype = { + call$1($arguments) { + return A._parseChannels0("hsl", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_JQ20); + }, + $signature: 3 + }; + A.global_closure63.prototype = { + call$1($arguments) { + return A._hsl0("hsla", $arguments); + }, + $signature: 3 + }; + A.global_closure64.prototype = { + call$1($arguments) { + return A._hsl0("hsla", $arguments); + }, + $signature: 3 + }; + A.global_closure65.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).get$isSpecialVariable() || t1.$index($arguments, 1).get$isSpecialVariable()) + return A._functionString0("hsla", $arguments); + else + throw A.wrapException(A.SassScriptException$0("Missing argument $lightness.", null)); + }, + $signature: 18 + }; + A.global_closure66.prototype = { + call$1($arguments) { + return A._parseChannels0("hsla", J.$index$asx($arguments, 0), "channels", B.HslColorSpace_JQ20); + }, + $signature: 3 + }; + A.global_closure67.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString0("grayscale", $arguments); + else { + A.warnForDeprecation0(string$.Globalcg, B.Deprecation_SGB); + return A._grayscale0(t1.$index($arguments, 0)); + } + }, + $signature: 3 + }; + A.global_closure68.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + degrees = A._angleValue0(t1.$index($arguments, 1), "degrees"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.adjusto, null)); + A.warnForDeprecation0(string$.adjustd + A.serializeValue0(A.SassNumber_SassNumber0(degrees, "deg"), false, true) + string$.x29x0a_Mor_, B.Deprecation_hJG); + return color.changeHsl$1$hue(color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "hue") + degrees); + }, + $signature: 26 + }; + A.global_closure69.prototype = { + call$1($arguments) { + var result, + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.lighte, null)); + t1 = color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, _s9_) + amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation0("lighten() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_hJG); + return result; + }, + $signature: 26 + }; + A.global_closure70.prototype = { + call$1($arguments) { + var result, + _s9_ = "lightness", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.darken, null)); + t1 = color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, _s9_) - amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$lightness(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation0("darken() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, _s9_) + string$.x0a_Morex3ac, B.Deprecation_hJG); + return result; + }, + $signature: 26 + }; + A.global_closure71.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString0("saturate", $arguments); + return new A.SassString0("saturate(" + A.serializeValue0(t1.$index($arguments, 0).assertNumber$1("amount"), false, true) + ")", false); + }, + $signature: 18 + }; + A.global_closure72.prototype = { + call$1($arguments) { + var t1, color, amount, result, + _s10_ = "saturation"; + A.warnForDeprecation0(string$.Globalcad, B.Deprecation_SGB); + t1 = J.getInterceptor$asx($arguments); + color = t1.$index($arguments, 0).assertColor$1("color"); + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.satura, null)); + t1 = color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, _s10_) + amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation0("saturate() is deprecated. " + A._suggestScaleAndAdjust0(color, amount._number1$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_hJG); + return result; + }, + $signature: 26 + }; + A.global_closure73.prototype = { + call$1($arguments) { + var result, + _s10_ = "saturation", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + amount = t1.$index($arguments, 1).assertNumber$1("amount"); + if (!color._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.desatu, null)); + t1 = color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, _s10_) - amount.valueInRange$3(0, 100, "amount"); + result = color.changeHsl$1$saturation(isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 100)); + A.warnForDeprecation0("desaturate() is deprecated. " + A._suggestScaleAndAdjust0(color, -amount._number1$_value, _s10_) + string$.x0a_Morex3ac, B.Deprecation_hJG); + return result; + }, + $signature: 26 + }; + A.global_closure74.prototype = { + call$1($arguments) { + return A._opacify0("opacify", $arguments); + }, + $signature: 26 + }; + A.global_closure75.prototype = { + call$1($arguments) { + return A._opacify0("fade-in", $arguments); + }, + $signature: 26 + }; + A.global_closure76.prototype = { + call$1($arguments) { + return A._transparentize0("transparentize", $arguments); + }, + $signature: 26 + }; + A.global_closure77.prototype = { + call$1($arguments) { + return A._transparentize0("fade-out", $arguments); + }, + $signature: 26 + }; + A.global_closure78.prototype = { + call$1($arguments) { + var _0_0 = J.$index$asx($arguments, 0), + t1 = false; + if (_0_0 instanceof A.SassString0) + if (!_0_0._string0$_hasQuotes) + t1 = B.JSString_methods.contains$1(_0_0._string0$_text, $.$get$_microsoftFilterStart0()); + if (t1) + return A._functionString0("alpha", $arguments); + if (_0_0 instanceof A.SassColor0 && !_0_0._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.alpha_, null)); + A.warnForDeprecation0(string$.Globalcal, B.Deprecation_SGB); + t1 = _0_0.assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + }, + $signature: 3 + }; + A.global_closure79.prototype = { + call$1($arguments) { + var t1, + argList = J.$index$asx($arguments, 0).get$asList(); + if (argList.length !== 0 && B.JSArray_methods.every$1(argList, new A.global__closure0())) + return A._functionString0("alpha", $arguments); + t1 = argList.length; + if (t1 === 0) + throw A.wrapException(A.SassScriptException$0("Missing argument $color.", null)); + else + throw A.wrapException(A.SassScriptException$0("Only 1 argument allowed, but " + t1 + " were passed.", null)); + }, + $signature: 18 + }; + A.global__closure0.prototype = { + call$1(argument) { + return argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0()); + }, + $signature: 56 + }; + A.global_closure80.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0 || t1.$index($arguments, 0).get$isSpecialNumber()) + return A._functionString0("opacity", $arguments); + A.warnForDeprecation0(string$.Globalco, B.Deprecation_SGB); + t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + }, + $signature: 3 + }; + A.global_closure81.prototype = { + call$1($arguments) { + return A._parseChannels0("color", J.$index$asx($arguments, 0), "description", null); + }, + $signature: 3 + }; + A.global_closure82.prototype = { + call$1($arguments) { + return A._parseChannels0("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_guQ0); + }, + $signature: 3 + }; + A.global_closure83.prototype = { + call$1($arguments) { + return A._parseChannels0("lab", J.$index$asx($arguments, 0), "channels", B.LabColorSpace_2nT0); + }, + $signature: 3 + }; + A.global_closure84.prototype = { + call$1($arguments) { + return A._parseChannels0("lch", J.$index$asx($arguments, 0), "channels", B.LchColorSpace_Bpv0); + }, + $signature: 3 + }; + A.global_closure85.prototype = { + call$1($arguments) { + return A._parseChannels0("oklab", J.$index$asx($arguments, 0), "channels", B.OklabColorSpace_5400); + }, + $signature: 3 + }; + A.global_closure86.prototype = { + call$1($arguments) { + return A._parseChannels0("oklch", J.$index$asx($arguments, 0), "channels", B.OklchColorSpace_9Gj0); + }, + $signature: 3 + }; + A.module_closure27.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "red")); + }, + $signature: 39 + }; + A.module_closure28.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "green")); + }, + $signature: 39 + }; + A.module_closure29.prototype = { + call$1(color) { + return B.JSNumber_methods.round$0(color._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "blue")); + }, + $signature: 39 + }; + A.module_closure30.prototype = { + call$1($arguments) { + var result = A._invert0($arguments, false); + if (result instanceof A.SassString0) + A.warnForDeprecation0("Passing a number (" + J.$index$asx($arguments, 0).toString$0(0) + string$.x29x20to_cli + result.toString$0(0), B.Deprecation_mqF); + return result; + }, + $signature: 3 + }; + A.module_closure31.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "hue"); + }, + $signature: 30 + }; + A.module_closure32.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "saturation"); + }, + $signature: 30 + }; + A.module_closure33.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "lightness"); + }, + $signature: 30 + }; + A.module_closure34.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) { + result = A._functionString0("grayscale", t1.take$1($arguments, 1)); + A.warnForDeprecation0("Passing a number (" + t1.$index($arguments, 0).toString$0(0) + string$.x29x20to_clg + result.toString$0(0), B.Deprecation_mqF); + return result; + } + return A._grayscale0(t1.$index($arguments, 0)); + }, + $signature: 3 + }; + A.module_closure35.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = type$.JSArray_Value_2; + return A._parseChannels0("hwb", A.SassList$0(A._setArrayType([A.SassList$0(A._setArrayType([t1.$index($arguments, 0), t1.$index($arguments, 1), t1.$index($arguments, 2)], t2), B.ListSeparator_SrV0, false), t1.$index($arguments, 3)], t2), B.ListSeparator_Lul0, false), null, B.HwbColorSpace_guQ0); + }, + $signature: 3 + }; + A.module_closure36.prototype = { + call$1($arguments) { + return A._parseChannels0("hwb", J.$index$asx($arguments, 0), "channels", B.HwbColorSpace_guQ0); + }, + $signature: 3 + }; + A.module_closure37.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HwbColorSpace_guQ0, "whiteness"); + }, + $signature: 30 + }; + A.module_closure38.prototype = { + call$1(color) { + return color._color0$_legacyChannel$2(B.HwbColorSpace_guQ0, "blackness"); + }, + $signature: 30 + }; + A.module_closure39.prototype = { + call$1($arguments) { + var result, + _0_0 = J.$index$asx($arguments, 0), + t1 = false; + if (_0_0 instanceof A.SassString0) + if (!_0_0._string0$_hasQuotes) + t1 = B.JSString_methods.contains$1(_0_0._string0$_text, $.$get$_microsoftFilterStart0()); + if (t1) { + result = A._functionString0("alpha", $arguments); + A.warnForDeprecation0(string$.Using_c + result.toString$0(0), B.Deprecation_mqF); + return result; + } + if (_0_0 instanceof A.SassColor0 && !_0_0._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.color_a, null)); + t1 = _0_0.assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + }, + $signature: 3 + }; + A.module_closure40.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (B.JSArray_methods.every$1(t1.$index($arguments, 0).get$asList(), new A.module__closure6())) { + result = A._functionString0("alpha", $arguments); + A.warnForDeprecation0(string$.Using_c + result.toString$0(0), B.Deprecation_mqF); + return result; + } + throw A.wrapException(A.SassScriptException$0("Only 1 argument allowed, but " + t1.get$length($arguments) + " were passed.", null)); + }, + $signature: 18 + }; + A.module__closure6.prototype = { + call$1(argument) { + return argument instanceof A.SassString0 && !argument._string0$_hasQuotes && B.JSString_methods.contains$1(argument._string0$_text, $.$get$_microsoftFilterStart0()); + }, + $signature: 56 + }; + A.module_closure41.prototype = { + call$1($arguments) { + var result, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0) instanceof A.SassNumber0) { + result = A._functionString0("opacity", $arguments); + A.warnForDeprecation0("Passing a number (" + t1.$index($arguments, 0).toString$0(0) + string$.x20to_co + result.toString$0(0), B.Deprecation_mqF); + return result; + } + t1 = t1.$index($arguments, 0).assertColor$1("color").alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + }, + $signature: 3 + }; + A.module_closure42.prototype = { + call$1($arguments) { + return new A.SassString0(J.get$first$ax($arguments).assertColor$1("color")._color0$_space.name, false); + }, + $signature: 18 + }; + A.module_closure43.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 1), false); + }, + $signature: 26 + }; + A.module_closure44.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertColor$1("color")._color0$_space.get$isLegacyInternal() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A.module_closure45.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertColor$1("color").isChannelMissing$3$channelName$colorName(A._channelName0(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A.module_closure46.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 1), true).get$isInGamut() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A.module_closure47.prototype = { + call$1($arguments) { + var space, method, _s5_ = "space", _s6_ = "method", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + t2 = t1.$index($arguments, 1); + if (t2.$eq(0, B.C__SassNull0)) + space = color._color0$_space; + else { + t2 = t2.assertString$1(_s5_); + t2.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName0(t2._string0$_text, _s5_); + } + if (t1.$index($arguments, 2).$eq(0, B.C__SassNull0)) + throw A.wrapException(A.SassScriptException$0(string$.color_t, _s6_)); + t1 = t1.$index($arguments, 2).assertString$1(_s6_); + t1.assertUnquoted$1(_s6_); + method = A.GamutMapMethod_GamutMapMethod$fromName0(t1._string0$_text); + if (!space.get$isBoundedInternal()) + return color; + t1 = color.toSpace$1(space); + t1 = t1.get$isInGamut() ? t1 : method.map$1(0, t1); + return t1.toSpace$2$legacyMissing(color._color0$_space, false); + }, + $signature: 26 + }; + A.module_closure48.prototype = { + call$1($arguments) { + var channelIndex, channelInfo, channelValue, unit, + t1 = J.getInterceptor$asx($arguments), + color = A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 2), true), + channelName = A._channelName0(t1.$index($arguments, 1)); + if (channelName === "alpha") { + t1 = color.alphaOrNull; + return A.SassNumber_SassNumber0(t1 == null ? 0 : t1, null); + } + t1 = color._color0$_space._space$_channels; + channelIndex = B.JSArray_methods.indexWhere$1(t1, new A.module__closure5(channelName)); + if (channelIndex === -1) + throw A.wrapException(A.SassScriptException$0("Color " + color.toString$0(0) + " has no channel named " + channelName + ".", "channel")); + channelInfo = t1[channelIndex]; + channelValue = color.get$channels()[channelIndex]; + unit = channelInfo.associatedUnit; + return A.SassNumber_SassNumber0(unit === "%" ? channelValue * 100 / type$.LinearChannel_2._as(channelInfo).max : channelValue, unit); + }, + $signature: 25 + }; + A.module__closure5.prototype = { + call$1(channel) { + return channel.name === this.channelName; + }, + $signature: 67 + }; + A.module_closure49.prototype = { + call$1($arguments) { + var t2, t3, + t1 = J.getInterceptor$asx($arguments), + color1 = t1.$index($arguments, 0).assertColor$1("color1"), + color2 = t1.$index($arguments, 1).assertColor$1("color2"); + t1 = new A.module_closure_toXyzNoMissing0(); + if (color1._color0$_space === color2._color0$_space) { + t1 = color1.channel0OrNull; + t2 = false; + if (t1 == null) + t1 = 0; + t3 = color2.channel0OrNull; + if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { + t1 = color1.channel1OrNull; + if (t1 == null) + t1 = 0; + t3 = color2.channel1OrNull; + if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { + t1 = color1.channel2OrNull; + if (t1 == null) + t1 = 0; + t3 = color2.channel2OrNull; + if (A.fuzzyEquals0(t1, t3 == null ? 0 : t3)) { + t1 = color1.alphaOrNull; + if (t1 == null) + t1 = 0; + t2 = color2.alphaOrNull; + t1 = A.fuzzyEquals0(t1, t2 == null ? 0 : t2); + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + } else + t1 = J.$eq$(t1.call$1(color1), t1.call$1(color2)); + return t1 ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A.module_closure_toXyzNoMissing0.prototype = { + call$1(color) { + var _1_1, _1_3, t1, _1_7, channel0, _1_8, channel1, _1_9, channel2, _1_10, alpha, _null = null; + $label0$0: { + _1_1 = color._color0$_space; + _1_3 = B.XyzD65ColorSpace_WiJ0 === _1_1; + t1 = _1_3; + if (t1) + t1 = !(color.channel0OrNull == null || color.channel1OrNull == null || color.channel2OrNull == null || color.alphaOrNull == null); + else + t1 = false; + if (t1) { + t1 = color; + break $label0$0; + } + if (_1_3) { + _1_7 = color.channel0OrNull; + if (_1_7 == null) + _1_7 = 0; + channel0 = _1_7; + _1_8 = color.channel1OrNull; + if (_1_8 == null) + _1_8 = 0; + channel1 = _1_8; + _1_9 = color.channel2OrNull; + if (_1_9 == null) + _1_9 = 0; + channel2 = _1_9; + _1_10 = color.alphaOrNull; + if (_1_10 == null) + _1_10 = 0; + alpha = _1_10; + t1 = A.SassColor$_forSpace0(B.XyzD65ColorSpace_WiJ0, channel0, channel1, channel2, alpha, _null); + break $label0$0; + } + _1_7 = color.channel0OrNull; + if (_1_7 == null) + _1_7 = 0; + channel0 = _1_7; + _1_8 = color.channel1OrNull; + if (_1_8 == null) + _1_8 = 0; + channel1 = _1_8; + _1_9 = color.channel2OrNull; + if (_1_9 == null) + _1_9 = 0; + channel2 = _1_9; + _1_10 = color.alphaOrNull; + if (_1_10 == null) + _1_10 = 0; + alpha = _1_10; + t1 = _1_1.convert$5(B.XyzD65ColorSpace_WiJ0, channel0, channel1, channel2, alpha); + break $label0$0; + } + return t1; + }, + $signature: 399 + }; + A.module_closure50.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._colorInSpace0(t1.$index($arguments, 0), t1.$index($arguments, 2), true).isChannelPowerless$3$channelName$colorName(A._channelName0(t1.$index($arguments, 1)), "channel", "color") ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._mix_closure0.prototype = { + call$1($arguments) { + var _s6_ = "weight", + _s41_ = string$.To_usem, + _s29_ = ", you must provide a $method.", + t1 = J.getInterceptor$asx($arguments), + color1 = t1.$index($arguments, 0).assertColor$1("color1"), + color2 = t1.$index($arguments, 1).assertColor$1("color2"), + weight = t1.$index($arguments, 2).assertNumber$1(_s6_); + if (!t1.$index($arguments, 3).$eq(0, B.C__SassNull0)) + return color1.interpolate$4$legacyMissing$weight(color2, A.InterpolationMethod_InterpolationMethod$fromValue0(t1.$index($arguments, 3), "method"), false, weight.valueInRangeWithUnit$4(0, 100, _s6_, "%") / 100); + A._checkPercent0(weight, _s6_); + if (!color1._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(_s41_ + color1.toString$0(0) + _s29_, "color1")); + else if (!color2._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(_s41_ + color2.toString$0(0) + _s29_, "color2")); + return A._mixLegacy0(color1, color2, weight); + }, + $signature: 26 + }; + A._complement_closure0.prototype = { + call$1($arguments) { + var space, t3, colorInSpace, t4, t5, t6, _s5_ = "space", + t1 = J.getInterceptor$asx($arguments), + color = t1.$index($arguments, 0).assertColor$1("color"), + t2 = color._color0$_space; + if (t2.get$isLegacyInternal() && t1.$index($arguments, 1).$eq(0, B.C__SassNull0)) + space = B.HslColorSpace_JQ20; + else { + t3 = t1.$index($arguments, 1).assertString$1(_s5_); + t3.assertUnquoted$1(_s5_); + space = A.ColorSpace_fromName0(t3._string0$_text, _s5_); + } + if (!space.get$isPolarInternal()) + throw A.wrapException(A.SassScriptException$0("Color space " + space.toString$0(0) + " doesn't have a hue channel.", _s5_)); + colorInSpace = color.toSpace$2$legacyMissing(space, !t1.$index($arguments, 1).$eq(0, B.C__SassNull0)); + t1 = space._space$_channels; + t3 = colorInSpace.channel0OrNull; + t4 = colorInSpace.channel1OrNull; + t5 = colorInSpace.channel2OrNull; + t6 = colorInSpace.alphaOrNull; + return (space.get$isLegacyInternal() ? A.SassColor_SassColor$forSpaceInternal0(space, A._adjustChannel0(colorInSpace, t1[0], t3, A.SassNumber_SassNumber0(180, null)), t4, t5, t6) : A.SassColor_SassColor$forSpaceInternal0(space, t3, t4, A._adjustChannel0(colorInSpace, t1[2], t5, A.SassNumber_SassNumber0(180, null)), t6)).toSpace$2$legacyMissing(t2, false); + }, + $signature: 26 + }; + A._adjust_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, true, false, false); + }, + $signature: 26 + }; + A._scale_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, false, false, true); + }, + $signature: 26 + }; + A._change_closure0.prototype = { + call$1($arguments) { + return A._updateComponents0($arguments, false, true, false); + }, + $signature: 26 + }; + A._ieHexStr_closure0.prototype = { + call$1($arguments) { + var t1, t2, t3, t4, t5, + color = J.$index$asx($arguments, 0).assertColor$1("color").toSpace$1(B.RgbColorSpace_i0P0); + color = color.get$isInGamut() ? color : B.LocalMindeGamutMap_A2x0.map$1(0, color); + t1 = new A._ieHexStr_closure_hexString0(); + t2 = color.alphaOrNull; + t2 = A.S(t1.call$1((t2 == null ? 0 : t2) * 255)); + t3 = color.channel0OrNull; + t3 = A.S(t1.call$1(t3 == null ? 0 : t3)); + t4 = color.channel1OrNull; + t4 = A.S(t1.call$1(t4 == null ? 0 : t4)); + t5 = color.channel2OrNull; + return new A.SassString0("#" + t2 + t3 + t4 + A.S(t1.call$1(t5 == null ? 0 : t5)), false); + }, + $signature: 18 + }; + A._ieHexStr_closure_hexString0.prototype = { + call$1(component) { + return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(A.fuzzyRound0(component), 16), 2, "0").toUpperCase(); + }, + $signature: 275 + }; + A._updateComponents_closure1.prototype = { + call$1(space) { + return this.originalColor.toSpace$2$legacyMissing(space, false); + }, + $signature: 400 + }; + A._updateComponents_closure2.prototype = { + call$1(info) { + return this._box_0.name === info.name; + }, + $signature: 67 + }; + A._changeColor_closure0.prototype = { + call$0() { + var t1 = this.alphaArg; + A.warnForDeprecation0("$alpha: Passing a unit other than % (" + t1.toString$0(0) + string$.x29x20is_d_ + t1.unitSuggestion$1("alpha") + string$.x0a_See_, B.Deprecation_PHd); + return t1.valueInRange$3(0, 1, "alpha"); + }, + $signature: 240 + }; + A._adjustColor_closure0.prototype = { + call$1(alpha) { + return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); + }, + $signature: 12 + }; + A._functionString_closure0.prototype = { + call$1(argument) { + return A.serializeValue0(argument, false, true); + }, + $signature: 228 + }; + A._removedColorFunction_closure0.prototype = { + call$1($arguments) { + var t1 = this.name, + t2 = J.getInterceptor$asx($arguments), + t3 = t2.$index($arguments, 0).toString$0(0), + t4 = this.negative ? "-" : ""; + throw A.wrapException(A.SassScriptException$0("The function " + t1 + string$.x28__isn + t3 + ", $" + this.argument + ": " + t4 + t2.$index($arguments, 1).toString$0(0) + string$.x29x0a_Moro + t1, null)); + }, + $signature: 402 + }; + A._rgb_closure0.prototype = { + call$1(alpha) { + var t1 = A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); + return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); + }, + $signature: 229 + }; + A._hsl_closure0.prototype = { + call$1(alpha) { + var t1 = A._percentageOrUnitless0(alpha.assertNumber$1("alpha"), 1, "alpha"); + return isNaN(t1) ? 0 : B.JSNumber_methods.clamp$2(t1, 0, 1); + }, + $signature: 229 + }; + A._parseChannels_closure1.prototype = { + call$1($name) { + return $name + " channel"; + }, + $signature: 6 + }; + A._parseChannels_closure2.prototype = { + call$1(channel) { + return channel.get$isSpecialNumber(); + }, + $signature: 56 + }; + A._colorFromChannels_closure1.prototype = { + call$1(channel0) { + return A._angleValue0(channel0, "hue"); + }, + $signature: 100 + }; + A._colorFromChannels_closure2.prototype = { + call$1(channel0) { + return A._angleValue0(channel0, "hue"); + }, + $signature: 100 + }; + A._channelFromValue_closure0.prototype = { + call$1(value) { + var t1, _0_8, t2, _0_5, _0_8_isSet, upperClamped, t3, + _0_0 = this.channel; + $label0$0: { + t1 = _0_0 instanceof A.LinearChannel0; + if (t1 && _0_0.requiresPercent && !value.hasUnit$1("%")) + A.throwExpression(A.SassScriptException$0("Expected " + value.toString$0(0) + ' to have unit "%".', _0_0.name)); + _0_8 = null; + t2 = false; + if (t1) { + _0_5 = _0_0.lowerClamped; + _0_8_isSet = !_0_5; + if (_0_8_isSet) { + _0_8 = _0_0.upperClamped; + t2 = !_0_8; + } + } else { + _0_5 = null; + _0_8_isSet = false; + } + if (t2) { + t1 = A._percentageOrUnitless0(value, _0_0.max, _0_0.name); + break $label0$0; + } + if (t1 && !this.clamp) { + t1 = A._percentageOrUnitless0(value, _0_0.max, _0_0.name); + break $label0$0; + } + if (t1) { + upperClamped = _0_8_isSet ? _0_8 : _0_0.upperClamped; + t1 = _0_0.max; + t2 = A._percentageOrUnitless0(value, t1, _0_0.name); + t3 = _0_5 ? _0_0.min : -1 / 0; + t1 = upperClamped ? t1 : 1 / 0; + t1 = isNaN(t2) ? t3 : B.JSNumber_methods.clamp$2(t2, t3, t1); + break $label0$0; + } + t1 = B.JSNumber_methods.$mod(value.coerceValueToUnit$2("deg", _0_0.name), 360); + break $label0$0; + } + return t1; + }, + $signature: 100 + }; + A._channelFunction_closure0.prototype = { + call$1($arguments) { + var _this = this, + result = A.SassNumber_SassNumber0(_this.getter.call$1(J.get$first$ax($arguments).assertColor$1("color")), _this.unit), + t1 = _this.global ? "" : "color.", + t2 = _this.name; + A.warnForDeprecation0(t1 + t2 + string$.x28__is_d + t2 + '", $space: ' + _this.space.toString$0(0) + string$.x29x0a_Mor_, B.Deprecation_hJG); + return result; + }, + $signature: 25 + }; + A._suggestScaleAndAdjust_closure0.prototype = { + call$1(channel) { + return channel.name === this.channelName; + }, + $signature: 67 + }; + A.colorClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassColor", new A.colorClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["equals", new A.colorClass__closure0(), "hashCode", new A.colorClass__closure1(), "toSpace", new A.colorClass__closure2(), "isInGamut", new A.colorClass__closure3(), "toGamut", new A.colorClass__closure4(), "channel", new A.colorClass__closure5(), "isChannelMissing", new A.colorClass__closure6(), "isChannelPowerless", new A.colorClass__closure7(), "change", new A.colorClass__closure8(), "interpolate", new A.colorClass__closure9()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["red", new A.colorClass__closure10(), "green", new A.colorClass__closure11(), "blue", new A.colorClass__closure12(), "hue", new A.colorClass__closure13(), "saturation", new A.colorClass__closure14(), "lightness", new A.colorClass__closure15(), "whiteness", new A.colorClass__closure16(), "blackness", new A.colorClass__closure17(), "alpha", new A.colorClass__closure18(), "space", new A.colorClass__closure19(), "isLegacy", new A.colorClass__closure20(), "channelsOrNull", new A.colorClass__closure21(), "channels", new A.colorClass__closure22()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(A.SassColor_SassColor$rgbInternal0(0, 0, 0, 1, null).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.colorClass__closure.prototype = { + call$2($self, options) { + var t1, t2, t3, t4, _null = null; + switch (A._constructionSpace(options)) { + case B.RgbColorSpace_i0P0: + A._checkNullAlphaDeprecation(options); + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$rgbInternal0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.HslColorSpace_JQ20: + A._checkNullAlphaDeprecation(options); + t1 = J.getInterceptor$x(options); + t2 = t1.get$hue(options); + t3 = t1.get$saturation(options); + t4 = t1.get$lightness(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$hsl0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); + case B.HwbColorSpace_guQ0: + A._checkNullAlphaDeprecation(options); + t1 = J.getInterceptor$x(options); + t2 = t1.get$hue(options); + t3 = t1.get$whiteness(options); + t4 = t1.get$blackness(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$hwb0(t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); + case B.LabColorSpace_2nT0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$lightness(options); + t3 = t1.get$a(options); + t4 = t1.get$b(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.LabColorSpace_2nT0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.OklabColorSpace_5400: + t1 = J.getInterceptor$x(options); + t2 = t1.get$lightness(options); + t3 = t1.get$a(options); + t4 = t1.get$b(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.OklabColorSpace_5400, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.LchColorSpace_Bpv0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$lightness(options); + t3 = t1.get$chroma(options); + t4 = t1.get$hue(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$forSpaceInternal0(B.LchColorSpace_Bpv0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); + case B.OklchColorSpace_9Gj0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$lightness(options); + t3 = t1.get$chroma(options); + t4 = t1.get$hue(options); + t1 = t1.get$alpha(options); + return A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_9Gj0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1); + case B.SrgbColorSpace_thf0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.SrgbColorSpace_thf0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.SrgbLinearColorSpace_kUj0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.SrgbLinearColorSpace_kUj0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.DisplayP3ColorSpace_MmT0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.DisplayP3ColorSpace_MmT0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.DisplayP3LinearColorSpace_PrP0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.DisplayP3LinearColorSpace_PrP0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.A98RgbColorSpace_lf20: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.A98RgbColorSpace_lf20, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.ProphotoRgbColorSpace_BDz0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.ProphotoRgbColorSpace_BDz0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.Rec2020ColorSpace_6oo0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$red(options); + t3 = t1.get$green(options); + t4 = t1.get$blue(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.Rec2020ColorSpace_6oo0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.XyzD50ColorSpace_2OB0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$x(options); + t3 = t1.get$y(options); + t4 = t1.get$z(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.XyzD50ColorSpace_2OB0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + case B.XyzD65ColorSpace_WiJ0: + t1 = J.getInterceptor$x(options); + t2 = t1.get$x(options); + t3 = t1.get$y(options); + t4 = t1.get$z(options); + t1 = t1.get$alpha(options); + return A.SassColor$_forSpace0(B.XyzD65ColorSpace_WiJ0, t2, t3, t4, A._asBool($.$get$_isUndefined().call$1(t1)) ? 1 : t1, _null); + default: + throw A.wrapException("Unreachable"); + } + }, + $signature: 405 + }; + A.colorClass__closure0.prototype = { + call$2($self, other) { + return $self.$eq(0, other); + }, + $signature: 406 + }; + A.colorClass__closure1.prototype = { + call$1($self) { + return $self.get$hashCode(0); + }, + $signature: 39 + }; + A.colorClass__closure2.prototype = { + call$2($self, space) { + return A._toSpace($self, space); + }, + $signature: 407 + }; + A.colorClass__closure3.prototype = { + call$2($self, space) { + return A._toSpace($self, space).get$isInGamut(); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 408 + }; + A.colorClass__closure4.prototype = { + call$2($self, options) { + var t1 = J.getInterceptor$x(options), + t2 = A._toSpace($self, t1.get$space(options)); + t1 = A.GamutMapMethod_GamutMapMethod$fromName0(t1.get$method(options)); + t1 = t2.get$isInGamut() ? t2 : t1.map$1(0, t2); + return t1.toSpace$1($self._color0$_space); + }, + $signature: 409 + }; + A.colorClass__closure5.prototype = { + call$3($self, channel, options) { + return A._toSpace($self, options == null ? null : J.get$space$x(options)).channel$1(0, channel); + }, + call$2($self, channel) { + return this.call$3($self, channel, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 410 + }; + A.colorClass__closure6.prototype = { + call$2($self, channel) { + return $self.isChannelMissing$1(channel); + }, + $signature: 411 + }; + A.colorClass__closure7.prototype = { + call$3($self, channel, options) { + return A._toSpace($self, options == null ? null : J.get$space$x(options)).isChannelPowerless$1(channel); + }, + call$2($self, channel) { + return this.call$3($self, channel, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 412 + }; + A.colorClass__closure8.prototype = { + call$2($self, options) { + var t3, space, t4, t5, t6, color, changedValue, _0_2, changedColor, _0_4, _0_6, _null = null, + _s9_ = "whiteness", + _s9_0 = "blackness", + _s3_ = "hue", + _s10_ = "saturation", + _s9_1 = "lightness", + _s3_0 = "red", _s5_ = "green", _s4_ = "blue", _s5_0 = "alpha", + _s106_ = string$.Passin_, + _s105_ = "Passing `hue: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", + t1 = J.getInterceptor$x(options), + t2 = t1.get$space(options) == null, + spaceSetExplicitly = !t2; + if (spaceSetExplicitly) { + t3 = t1.get$space(options); + t3.toString; + space = A.ColorSpace_fromName0(t3, _null); + } else + space = $self._color0$_space; + t3 = $self._color0$_space; + if (t3.get$isLegacyInternal() && t2) { + if ("whiteness" in options || "blackness" in options) + space = B.HwbColorSpace_guQ0; + else if ("hue" in options && t3 === B.HwbColorSpace_guQ0) + space = B.HwbColorSpace_guQ0; + else if ("hue" in options || "saturation" in options || "lightness" in options) + space = B.HslColorSpace_JQ20; + else if ("red" in options || "green" in options || "blue" in options) + space = B.RgbColorSpace_i0P0; + if (space !== t3) + A.warnForDeprecationFromApi("Changing a channel not in this color's space without explicitly specifying the `space` option is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + } + for (t2 = J.get$iterator$ax(self.Object.keys(options)), t4 = space._space$_channels, t5 = type$.JSArray_String; t2.moveNext$0();) { + t6 = t2.get$current(t2); + if (B.JSArray_methods.contains$1(A._setArrayType(["alpha", "space"], t5), t6)) + continue; + if (!B.JSArray_methods.any$1(t4, new A.colorClass___closure(t6))) + A.jsThrow(new self.Error("`" + t6 + "` is not a valid channel in `" + space.toString$0(0) + "`.")); + } + color = $self.toSpace$1(space); + changedValue = new A.colorClass__closure_changedValue(color, options); + $label0$2: { + _0_2 = B.HslColorSpace_JQ20 === space; + if (_0_2 && spaceSetExplicitly) { + changedColor = A.SassColor_SassColor$hsl0(changedValue.call$1(_s3_), changedValue.call$1(_s10_), changedValue.call$1(_s9_1), changedValue.call$1(_s5_0)); + break $label0$2; + } + if (_0_2) { + t2 = t1.get$hue(options); + t4 = $.$get$_isNull(); + if (A._asBool(t4.call$1(t2))) + A.warnForDeprecationFromApi(_s105_, B.Deprecation_alT); + else if (A._asBool(t4.call$1(t1.get$saturation(options)))) + A.warnForDeprecationFromApi("Passing `saturation: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + else if (A._asBool(t4.call$1(t1.get$lightness(options)))) + A.warnForDeprecationFromApi("Passing `lightness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + if (A._asBool(t4.call$1(t1.get$alpha(options)))) + A.warnForDeprecationFromApi(_s106_, B.Deprecation_ox0); + t2 = t1.get$hue(options); + if (t2 == null) + t2 = color.channel$1(0, _s3_); + t4 = t1.get$saturation(options); + if (t4 == null) + t4 = color.channel$1(0, _s10_); + t5 = t1.get$lightness(options); + if (t5 == null) + t5 = color.channel$1(0, _s9_1); + t1 = t1.get$alpha(options); + changedColor = A.SassColor_SassColor$hsl0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_0) : t1); + break $label0$2; + } + _0_4 = B.HwbColorSpace_guQ0 === space; + if (_0_4 && spaceSetExplicitly) { + changedColor = A.SassColor_SassColor$hwb0(changedValue.call$1(_s3_), changedValue.call$1(_s9_), changedValue.call$1(_s9_0), changedValue.call$1(_s5_0)); + break $label0$2; + } + if (_0_4) { + t2 = t1.get$hue(options); + t4 = $.$get$_isNull(); + if (A._asBool(t4.call$1(t2))) + A.warnForDeprecationFromApi(_s105_, B.Deprecation_alT); + else if (A._asBool(t4.call$1(t1.get$whiteness(options)))) + A.warnForDeprecationFromApi("Passing `whiteness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + else if (A._asBool(t4.call$1(t1.get$blackness(options)))) + A.warnForDeprecationFromApi("Passing `blackness: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + if (A._asBool(t4.call$1(t1.get$alpha(options)))) + A.warnForDeprecationFromApi(_s106_, B.Deprecation_ox0); + t2 = t1.get$hue(options); + if (t2 == null) + t2 = color.channel$1(0, _s3_); + t4 = t1.get$whiteness(options); + if (t4 == null) + t4 = color.channel$1(0, _s9_); + t5 = t1.get$blackness(options); + if (t5 == null) + t5 = color.channel$1(0, _s9_0); + t1 = t1.get$alpha(options); + changedColor = A.SassColor_SassColor$hwb0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_0) : t1); + break $label0$2; + } + _0_6 = B.RgbColorSpace_i0P0 === space; + if (_0_6 && spaceSetExplicitly) { + changedColor = A.SassColor_SassColor$rgbInternal0(changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (_0_6) { + t2 = t1.get$red(options); + t4 = $.$get$_isNull(); + if (A._asBool(t4.call$1(t2))) + A.warnForDeprecationFromApi("Passing `red: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + else if (A._asBool(t4.call$1(t1.get$green(options)))) + A.warnForDeprecationFromApi("Passing `green: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + else if (A._asBool(t4.call$1(t1.get$blue(options)))) + A.warnForDeprecationFromApi("Passing `blue: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + if (A._asBool(t4.call$1(t1.get$alpha(options)))) + A.warnForDeprecationFromApi(_s106_, B.Deprecation_ox0); + t2 = t1.get$red(options); + if (t2 == null) + t2 = color.channel$1(0, _s3_0); + t4 = t1.get$green(options); + if (t4 == null) + t4 = color.channel$1(0, _s5_); + t5 = t1.get$blue(options); + if (t5 == null) + t5 = color.channel$1(0, _s4_); + t1 = t1.get$alpha(options); + changedColor = A.SassColor_SassColor$rgbInternal0(t2, t4, t5, t1 == null ? color.channel$1(0, _s5_0) : t1, _null); + break $label0$2; + } + if (B.LabColorSpace_2nT0 === space) { + changedColor = A.SassColor$_forSpace0(B.LabColorSpace_2nT0, changedValue.call$1(_s9_1), changedValue.call$1("a"), changedValue.call$1("b"), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.OklabColorSpace_5400 === space) { + changedColor = A.SassColor$_forSpace0(B.OklabColorSpace_5400, changedValue.call$1(_s9_1), changedValue.call$1("a"), changedValue.call$1("b"), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.LchColorSpace_Bpv0 === space) { + changedColor = A.SassColor_SassColor$forSpaceInternal0(B.LchColorSpace_Bpv0, changedValue.call$1(_s9_1), changedValue.call$1("chroma"), changedValue.call$1(_s3_), changedValue.call$1(_s5_0)); + break $label0$2; + } + if (B.OklchColorSpace_9Gj0 === space) { + changedColor = A.SassColor_SassColor$forSpaceInternal0(B.OklchColorSpace_9Gj0, changedValue.call$1(_s9_1), changedValue.call$1("chroma"), changedValue.call$1(_s3_), changedValue.call$1(_s5_0)); + break $label0$2; + } + if (B.A98RgbColorSpace_lf20 === space) { + changedColor = A.SassColor$_forSpace0(B.A98RgbColorSpace_lf20, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.DisplayP3ColorSpace_MmT0 === space) { + changedColor = A.SassColor$_forSpace0(B.DisplayP3ColorSpace_MmT0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.DisplayP3LinearColorSpace_PrP0 === space) { + changedColor = A.SassColor$_forSpace0(B.DisplayP3LinearColorSpace_PrP0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.ProphotoRgbColorSpace_BDz0 === space) { + changedColor = A.SassColor$_forSpace0(B.ProphotoRgbColorSpace_BDz0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.Rec2020ColorSpace_6oo0 === space) { + changedColor = A.SassColor$_forSpace0(B.Rec2020ColorSpace_6oo0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.SrgbColorSpace_thf0 === space) { + changedColor = A.SassColor$_forSpace0(B.SrgbColorSpace_thf0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.SrgbLinearColorSpace_kUj0 === space) { + changedColor = A.SassColor$_forSpace0(B.SrgbLinearColorSpace_kUj0, changedValue.call$1(_s3_0), changedValue.call$1(_s5_), changedValue.call$1(_s4_), changedValue.call$1(_s5_0), _null); + break $label0$2; + } + if (B.XyzD50ColorSpace_2OB0 === space) { + changedColor = A.SassColor_SassColor$forSpaceInternal0(space, changedValue.call$1("x"), changedValue.call$1("y"), changedValue.call$1("z"), changedValue.call$1(_s5_0)); + break $label0$2; + } + if (B.XyzD65ColorSpace_WiJ0 === space) { + changedColor = A.SassColor_SassColor$forSpaceInternal0(space, changedValue.call$1("x"), changedValue.call$1("y"), changedValue.call$1("z"), changedValue.call$1(_s5_0)); + break $label0$2; + } + throw A.wrapException("No space set"); + } + return changedColor.toSpace$1(t3); + }, + $signature: 413 + }; + A.colorClass___closure.prototype = { + call$1(channel) { + return channel.name === this.key; + }, + $signature: 67 + }; + A.colorClass__closure_changedValue.prototype = { + call$1(channel) { + var t2, + t1 = this.options; + if (channel in t1) { + t2 = t1[channel]; + t2 = !A._asBool($.$get$_isUndefined().call$1(t2)); + } else + t2 = false; + return t2 ? t1[channel] : this.color.channel$1(0, channel); + }, + $signature: 414 + }; + A.colorClass__closure9.prototype = { + call$3($self, color2, options) { + var interpolationMethod, t2, + t1 = options == null, + _1_0 = t1 ? null : J.get$method$x(options); + if (_1_0 != null) + interpolationMethod = A.InterpolationMethod$0($self._color0$_space, A.EnumByName_byName(B.List_mRc, _1_0)); + else { + t2 = $self._color0$_space; + interpolationMethod = !t2.get$isPolarInternal() ? A.InterpolationMethod$0(t2, null) : A.InterpolationMethod$0(t2, B.HueInterpolationMethod_00); + } + return $self.interpolate$3$weight(color2, interpolationMethod, t1 ? null : J.get$weight$x(options)); + }, + call$2($self, color2) { + return this.call$3($self, color2, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 415 + }; + A.colorClass__closure10.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("red is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "red")); + }, + $signature: 39 + }; + A.colorClass__closure11.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("green is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "green")); + }, + $signature: 39 + }; + A.colorClass__closure12.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("blue is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + return B.JSNumber_methods.round$0($self._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "blue")); + }, + $signature: 39 + }; + A.colorClass__closure13.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("hue is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + return $self._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "hue"); + }, + $signature: 30 + }; + A.colorClass__closure14.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("saturation is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + return $self._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "saturation"); + }, + $signature: 30 + }; + A.colorClass__closure15.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("lightness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + return $self._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "lightness"); + }, + $signature: 30 + }; + A.colorClass__closure16.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("whiteness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + return $self._color0$_legacyChannel$2(B.HwbColorSpace_guQ0, "whiteness"); + }, + $signature: 30 + }; + A.colorClass__closure17.prototype = { + call$1($self) { + A.warnForDeprecationFromApi("blackness is deprecated, use `channel` instead.\nMore info: https://sass-lang.com/d/color-4-api", B.Deprecation_alT); + return $self._color0$_legacyChannel$2(B.HwbColorSpace_guQ0, "blackness"); + }, + $signature: 30 + }; + A.colorClass__closure18.prototype = { + call$1($self) { + var t1 = $self.alphaOrNull; + return t1 == null ? 0 : t1; + }, + $signature: 30 + }; + A.colorClass__closure19.prototype = { + call$1($self) { + return $self._color0$_space.name; + }, + $signature: 416 + }; + A.colorClass__closure20.prototype = { + call$1($self) { + return $self._color0$_space.get$isLegacyInternal(); + }, + $signature: 417 + }; + A.colorClass__closure21.prototype = { + call$1($self) { + return new self.immutable.List($self.get$channelsOrNull()); + }, + $signature: 230 + }; + A.colorClass__closure22.prototype = { + call$1($self) { + return new self.immutable.List($self.get$channels()); + }, + $signature: 230 + }; + A._Channels.prototype = {}; + A._ConstructionOptions.prototype = {}; + A._ChannelOptions.prototype = {}; + A._ToGamutOptions.prototype = {}; + A._InterpolationOptions.prototype = {}; + A._NodeSassColor.prototype = {}; + A.legacyColorClass_closure.prototype = { + call$6(thisArg, redOrArgb, green, blue, alpha, dartValue) { + var red, t1, t2, t3, t4; + if (dartValue != null) { + J.set$dartValue$x(thisArg, dartValue); + return; + } + if (green == null || blue == null) { + A._asInt(redOrArgb); + alpha = B.JSInt_methods._shrOtherPositive$1(redOrArgb, 24) / 255; + red = B.JSInt_methods.$mod(B.JSInt_methods._shrOtherPositive$1(redOrArgb, 16), 256); + green = B.JSInt_methods.$mod(B.JSInt_methods._shrOtherPositive$1(redOrArgb, 8), 256); + blue = B.JSInt_methods.$mod(redOrArgb, 256); + } else { + redOrArgb.toString; + red = redOrArgb; + } + t1 = A.fuzzyRound0(isNaN(red) ? 0 : B.JSNumber_methods.clamp$2(red, 0, 255)); + t2 = A.fuzzyRound0(isNaN(green) ? 0 : B.JSNumber_methods.clamp$2(green, 0, 255)); + t3 = A.fuzzyRound0(isNaN(blue) ? 0 : B.JSNumber_methods.clamp$2(blue, 0, 255)); + t4 = A.NullableExtension_andThen0(alpha, new A.legacyColorClass__closure()); + J.set$dartValue$x(thisArg, A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4 == null ? 1 : t4, null)); + }, + call$2(thisArg, redOrArgb) { + var _null = null; + return this.call$6(thisArg, redOrArgb, _null, _null, _null, _null); + }, + call$3(thisArg, redOrArgb, green) { + return this.call$6(thisArg, redOrArgb, green, null, null, null); + }, + call$4(thisArg, redOrArgb, green, blue) { + return this.call$6(thisArg, redOrArgb, green, blue, null, null); + }, + call$5(thisArg, redOrArgb, green, blue, alpha) { + return this.call$6(thisArg, redOrArgb, green, blue, alpha, null); + }, + "call*": "call$6", + $requiredArgCount: 2, + $defaultValues() { + return [null, null, null, null]; + }, + $signature: 419 + }; + A.legacyColorClass__closure.prototype = { + call$1(alpha) { + return isNaN(alpha) ? 0 : B.JSNumber_methods.clamp$2(alpha, 0, 1); + }, + $signature: 420 + }; + A.legacyColorClass_closure0.prototype = { + call$1(thisArg) { + return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "red")); + }, + $signature: 124 + }; + A.legacyColorClass_closure1.prototype = { + call$1(thisArg) { + return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "green")); + }, + $signature: 124 + }; + A.legacyColorClass_closure2.prototype = { + call$1(thisArg) { + return B.JSNumber_methods.round$0(J.get$dartValue$x(thisArg)._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "blue")); + }, + $signature: 124 + }; + A.legacyColorClass_closure3.prototype = { + call$1(thisArg) { + var t1 = J.get$dartValue$x(thisArg).alphaOrNull; + return t1 == null ? 0 : t1; + }, + $signature: 422 + }; + A.legacyColorClass_closure4.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg); + t1.set$dartValue(thisArg, t2.changeRgb$1$red(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 106 + }; + A.legacyColorClass_closure5.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg); + t1.set$dartValue(thisArg, t2.changeRgb$1$green(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 106 + }; + A.legacyColorClass_closure6.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg); + t1.set$dartValue(thisArg, t2.changeRgb$1$blue(A.fuzzyRound0(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 255)))); + }, + $signature: 106 + }; + A.legacyColorClass_closure7.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg); + t1.set$dartValue(thisArg, t2.changeRgb$1$alpha(isNaN(value) ? 0 : B.JSNumber_methods.clamp$2(value, 0, 1))); + }, + $signature: 106 + }; + A.SassColor0.prototype = { + get$channels() { + var t2, t3, + t1 = this.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = this.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = this.channel2OrNull; + return A.List_List$unmodifiable([t1, t2, t3 == null ? 0 : t3], type$.double); + }, + get$channelsOrNull() { + return A.List_List$unmodifiable([this.channel0OrNull, this.channel1OrNull, this.channel2OrNull], type$.nullable_double); + }, + get$isChannel0Powerless() { + var t1, t2, _this = this, + _0_0 = _this._color0$_space; + $label0$0: { + if (B.HslColorSpace_JQ20 === _0_0) { + t1 = _this.channel1OrNull; + t1 = A.fuzzyEquals0(t1 == null ? 0 : t1, 0); + break $label0$0; + } + if (B.HwbColorSpace_guQ0 === _0_0) { + t1 = _this.channel1OrNull; + if (t1 == null) + t1 = 0; + t2 = _this.channel2OrNull; + t1 += t2 == null ? 0 : t2; + t1 = t1 > 100 || A.fuzzyEquals0(t1, 100); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isChannel2Powerless() { + var t1, + _0_0 = this._color0$_space; + $label0$0: { + if (B.LchColorSpace_Bpv0 === _0_0 || B.OklchColorSpace_9Gj0 === _0_0) { + t1 = this.channel1OrNull; + t1 = A.fuzzyEquals0(t1 == null ? 0 : t1, 0); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isInGamut() { + var t2, t3, _this = this, + t1 = _this._color0$_space; + if (!t1.get$isBoundedInternal()) + return true; + t2 = _this.channel0OrNull; + if (t2 == null) + t2 = 0; + t1 = t1._space$_channels; + t3 = false; + if (_this._color0$_isChannelInGamut$2(t2, t1[0])) { + t2 = _this.channel1OrNull; + if (t2 == null) + t2 = 0; + if (_this._color0$_isChannelInGamut$2(t2, t1[1])) { + t2 = _this.channel2OrNull; + if (t2 == null) + t2 = 0; + t1 = _this._color0$_isChannelInGamut$2(t2, t1[2]); + } else + t1 = t3; + } else + t1 = t3; + return t1; + }, + _color0$_isChannelInGamut$2(value, channel) { + var min, max, t1; + $label0$0: { + if (channel instanceof A.LinearChannel0) { + min = channel.min; + max = channel.max; + if (value < max || A.fuzzyEquals0(value, max)) + t1 = value > min || A.fuzzyEquals0(value, min); + else + t1 = false; + break $label0$0; + } + t1 = true; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitColor$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertColor$1($name) { + return this; + }, + assertLegacy$1($name) { + if (this._color0$_space.get$isLegacyInternal()) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + string$.x20to_be, $name)); + }, + channel$1(_, channel) { + var t1, _this = this, + channels = _this._color0$_space._space$_channels; + if (channel === channels[0].name) { + t1 = _this.channel0OrNull; + return t1 == null ? 0 : t1; + } + if (channel === channels[1].name) { + t1 = _this.channel1OrNull; + return t1 == null ? 0 : t1; + } + if (channel === channels[2].name) { + t1 = _this.channel2OrNull; + return t1 == null ? 0 : t1; + } + if (channel === "alpha") { + t1 = _this.alphaOrNull; + return t1 == null ? 0 : t1; + } + throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', null)); + }, + isChannelMissing$3$channelName$colorName(channel, channelName, colorName) { + var _this = this, + channels = _this._color0$_space._space$_channels; + if (channel === channels[0].name) + return _this.channel0OrNull == null; + if (channel === channels[1].name) + return _this.channel1OrNull == null; + if (channel === channels[2].name) + return _this.channel2OrNull == null; + if (channel === "alpha") + return _this.alphaOrNull == null; + throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); + }, + isChannelMissing$1(channel) { + return this.isChannelMissing$3$channelName$colorName(channel, null, null); + }, + isChannelPowerless$3$channelName$colorName(channel, channelName, colorName) { + var _this = this, + channels = _this._color0$_space._space$_channels; + if (channel === channels[0].name) + return _this.get$isChannel0Powerless(); + if (channel === channels[1].name) + return false; + if (channel === channels[2].name) + return _this.get$isChannel2Powerless(); + if (channel === "alpha") + return false; + throw A.wrapException(A.SassScriptException$0("Color " + _this.toString$0(0) + " doesn't have a channel named \"" + channel + '".', channelName)); + }, + isChannelPowerless$1(channel) { + return this.isChannelPowerless$3$channelName$colorName(channel, null, null); + }, + _color0$_legacyChannel$2(space, channel) { + if (!this._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0("color." + channel + string$.x28__is_oc, null)); + return this.toSpace$1(space).channel$1(0, channel); + }, + toSpace$2$legacyMissing(space, legacyMissing) { + var t2, converted, t3, t4, _this = this, + t1 = _this._color0$_space; + if (t1 === space) + return _this; + t2 = _this.alphaOrNull; + if (t2 == null) + t2 = 0; + converted = t1.convert$5(space, _this.channel0OrNull, _this.channel1OrNull, _this.channel2OrNull, t2); + t1 = false; + if (!legacyMissing) + if (converted._color0$_space.get$isLegacyInternal()) + t1 = converted.channel0OrNull == null || converted.channel1OrNull == null || converted.channel2OrNull == null || converted.alphaOrNull == null; + if (t1) { + t1 = converted.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = converted.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = converted.channel2OrNull; + if (t3 == null) + t3 = 0; + t4 = converted.alphaOrNull; + if (t4 == null) + t4 = 0; + t4 = A.SassColor_SassColor$forSpaceInternal0(converted._color0$_space, t1, t2, t3, t4); + t1 = t4; + } else + t1 = converted; + return t1; + }, + toSpace$1(space) { + return this.toSpace$2$legacyMissing(space, true); + }, + changeRgb$4$alpha$blue$green$red(alpha, blue, green, red) { + var t1, t2, t3, t4, _this = this, _null = null; + if (!_this._color0$_space.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0("color.changeRgb() is only supported for legacy colors. Please use color.changeChannels() instead with an explicit $space argument.", _null)); + t1 = red == null ? _null : red; + if (t1 == null) + t1 = _this.channel$1(0, "red"); + t2 = green == null ? _null : green; + if (t2 == null) + t2 = _this.channel$1(0, "green"); + t3 = blue == null ? _null : blue; + if (t3 == null) + t3 = _this.channel$1(0, "blue"); + t4 = alpha == null ? _null : alpha; + if (t4 == null) { + t4 = _this.alphaOrNull; + if (t4 == null) + t4 = 0; + } + return A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4, _null); + }, + changeRgb$1$alpha(alpha) { + return this.changeRgb$4$alpha$blue$green$red(alpha, null, null, null); + }, + changeRgb$1$blue(blue) { + return this.changeRgb$4$alpha$blue$green$red(null, blue, null, null); + }, + changeRgb$1$green(green) { + return this.changeRgb$4$alpha$blue$green$red(null, null, green, null); + }, + changeRgb$1$red(red) { + return this.changeRgb$4$alpha$blue$green$red(null, null, null, red); + }, + changeHsl$3$hue$lightness$saturation(hue, lightness, saturation) { + var t2, t3, t4, t5, _this = this, _null = null, + t1 = _this._color0$_space; + if (!t1.get$isLegacyInternal()) + throw A.wrapException(A.SassScriptException$0(string$.color_c, _null)); + t2 = hue == null ? _null : hue; + if (t2 == null) + t2 = _this._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "hue"); + t3 = saturation == null ? _null : saturation; + if (t3 == null) + t3 = _this._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "saturation"); + t4 = lightness == null ? _null : lightness; + if (t4 == null) + t4 = _this._color0$_legacyChannel$2(B.HslColorSpace_JQ20, "lightness"); + t5 = _this.alphaOrNull; + if (t5 == null) + t5 = 0; + return A.SassColor_SassColor$hsl0(t2, t3, t4, t5).toSpace$1(t1); + }, + changeHsl$1$saturation(saturation) { + return this.changeHsl$3$hue$lightness$saturation(null, null, saturation); + }, + changeHsl$1$lightness(lightness) { + return this.changeHsl$3$hue$lightness$saturation(null, lightness, null); + }, + changeHsl$1$hue(hue) { + return this.changeHsl$3$hue$lightness$saturation(hue, null, null); + }, + changeAlpha$1(alpha) { + var t2, t3, _this = this, + t1 = _this.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = _this.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = _this.channel2OrNull; + if (t3 == null) + t3 = 0; + return A.SassColor_SassColor$forSpaceInternal0(_this._color0$_space, t1, t2, t3, alpha); + }, + interpolate$4$legacyMissing$weight(other, method, legacyMissing, weight) { + var t1, color1, color2, missing1_0, missing1_1, missing1_2, missing2_0, missing2_1, missing2_2, channel1_0, channel1_1, channel1_2, channel2_0, channel2_1, channel2_2, alpha1, t2, t3, alpha10, alpha2, alpha20, thisMultiplier, t4, t5, otherMultiplier, mixedAlpha, mixed0, mixed1, mixed2, _this = this, _null = null; + if (weight == null) + weight = 0.5; + if (A.fuzzyEquals0(weight, 0)) + return other; + if (A.fuzzyEquals0(weight, 1)) + return _this; + t1 = method.space; + color1 = _this.toSpace$1(t1); + color2 = other.toSpace$1(t1); + if (weight < 0 || weight > 1) + throw A.wrapException(A.RangeError$range(weight, 0, 1, "weight", _null)); + missing1_0 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 0); + missing1_1 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 1); + missing1_2 = _this._color0$_isAnalogousChannelMissing$3(_this, color1, 2); + missing2_0 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 0); + missing2_1 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 1); + missing2_2 = _this._color0$_isAnalogousChannelMissing$3(other, color2, 2); + channel1_0 = (missing1_0 ? color2 : color1).channel0OrNull; + if (channel1_0 == null) + channel1_0 = 0; + channel1_1 = (missing1_1 ? color2 : color1).channel1OrNull; + if (channel1_1 == null) + channel1_1 = 0; + channel1_2 = (missing1_2 ? color2 : color1).channel2OrNull; + if (channel1_2 == null) + channel1_2 = 0; + channel2_0 = (missing2_0 ? color1 : color2).channel0OrNull; + if (channel2_0 == null) + channel2_0 = 0; + channel2_1 = (missing2_1 ? color1 : color2).channel1OrNull; + if (channel2_1 == null) + channel2_1 = 0; + channel2_2 = (missing2_2 ? color1 : color2).channel2OrNull; + if (channel2_2 == null) + channel2_2 = 0; + alpha1 = _this.alphaOrNull; + t2 = alpha1 == null; + if (t2) { + t3 = other.alphaOrNull; + alpha10 = t3 == null ? 0 : t3; + } else + alpha10 = alpha1; + alpha2 = other.alphaOrNull; + t3 = alpha2 == null; + if (t3) + alpha20 = t2 ? 0 : alpha1; + else + alpha20 = alpha2; + thisMultiplier = (t2 ? 1 : alpha1) * weight; + t4 = t3 ? 1 : alpha2; + t5 = 1 - weight; + otherMultiplier = t4 * t5; + mixedAlpha = t2 && t3 ? _null : alpha10 * weight + alpha20 * t5; + if (missing1_0 && missing2_0) + mixed0 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed0 = (channel1_0 * thisMultiplier + channel2_0 * otherMultiplier) / t2; + } + if (missing1_1 && missing2_1) + mixed1 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed1 = (channel1_1 * thisMultiplier + channel2_1 * otherMultiplier) / t2; + } + if (missing1_2 && missing2_2) + mixed2 = _null; + else { + t2 = mixedAlpha == null ? 1 : mixedAlpha; + mixed2 = (channel1_2 * thisMultiplier + channel2_2 * otherMultiplier) / t2; + } + $label0$0: { + if (B.HslColorSpace_JQ20 === t1 || B.HwbColorSpace_guQ0 === t1) { + if (missing1_0 && missing2_0) + t2 = _null; + else { + t2 = method.hue; + t2.toString; + t2 = _this._color0$_interpolateHues$4(channel1_0, channel2_0, t2, weight); + } + t2 = A.SassColor_SassColor$forSpaceInternal0(t1, t2, mixed1, mixed2, mixedAlpha); + t1 = t2; + break $label0$0; + } + if (B.LchColorSpace_Bpv0 === t1 || B.OklchColorSpace_9Gj0 === t1) { + if (missing1_2 && missing2_2) + t2 = _null; + else { + t2 = method.hue; + t2.toString; + t2 = _this._color0$_interpolateHues$4(channel1_2, channel2_2, t2, weight); + } + t2 = A.SassColor_SassColor$forSpaceInternal0(t1, mixed0, mixed1, t2, mixedAlpha); + t1 = t2; + break $label0$0; + } + t1 = A.SassColor_SassColor$forSpaceInternal0(t1, mixed0, mixed1, mixed2, mixedAlpha); + break $label0$0; + } + return t1.toSpace$2$legacyMissing(_this._color0$_space, legacyMissing); + }, + interpolate$3$weight(other, method, weight) { + return this.interpolate$4$legacyMissing$weight(other, method, true, weight); + }, + _color0$_isAnalogousChannelMissing$3(original, output, outputChannelIndex) { + var originalChannel; + if (output.get$channelsOrNull()[outputChannelIndex] == null) + return true; + if (original === output) + return false; + originalChannel = A.IterableExtension_firstWhereOrNull(original._color0$_space._space$_channels, output._color0$_space._space$_channels[outputChannelIndex].get$isAnalogous()); + if (originalChannel == null) + return false; + return original.isChannelMissing$1(originalChannel.name); + }, + _color0$_interpolateHues$4(hue1, hue2, method, weight) { + var _0_0, _1_0; + $label1$1: { + if (B.HueInterpolationMethod_00 === method) { + $label0$0: { + _0_0 = hue2 - hue1; + if (_0_0 > 180) { + hue1 += 360; + break $label0$0; + } + if (_0_0 < -180) + hue2 += 360; + } + break $label1$1; + } + if (B.HueInterpolationMethod_10 === method) { + $label2$2: { + _1_0 = hue2 - hue1; + if (_1_0 > 0 && _1_0 < 180) { + hue2 += 360; + break $label2$2; + } + if (_1_0 > -180 && _1_0 <= 0) + hue1 += 360; + } + break $label1$1; + } + if (B.HueInterpolationMethod_20 === method && hue2 < hue1) { + hue2 += 360; + break $label1$1; + } + if (B.HueInterpolationMethod_30 === method && hue1 < hue2) { + hue1 += 360; + break $label1$1; + } + } + return hue1 * weight + hue2 * (1 - weight); + }, + plus$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$minus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + if (!(other instanceof A.SassNumber0) && !(other instanceof A.SassColor0)) + return this.super$Value$dividedBy0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " / " + other.toString$0(0) + '".', null)); + }, + $eq(_, other) { + var t1, t2, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassColor0)) + return false; + t1 = _this._color0$_space; + if (t1.get$isLegacyInternal()) { + t2 = other._color0$_space; + if (!t2.get$isLegacyInternal()) + return false; + if (!A.fuzzyEqualsNullable0(_this.alphaOrNull, other.alphaOrNull)) + return false; + if (t1 === t2) + return A.fuzzyEqualsNullable0(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable0(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable0(_this.channel2OrNull, other.channel2OrNull); + else + return _this.toSpace$1(B.RgbColorSpace_i0P0).$eq(0, other.toSpace$1(B.RgbColorSpace_i0P0)); + } + return t1 === other._color0$_space && A.fuzzyEqualsNullable0(_this.channel0OrNull, other.channel0OrNull) && A.fuzzyEqualsNullable0(_this.channel1OrNull, other.channel1OrNull) && A.fuzzyEqualsNullable0(_this.channel2OrNull, other.channel2OrNull) && A.fuzzyEqualsNullable0(_this.alphaOrNull, other.alphaOrNull); + }, + get$hashCode(_) { + var rgb, t2, t3, t4, t5, _this = this, + t1 = _this._color0$_space; + if (t1.get$isLegacyInternal()) { + rgb = _this.toSpace$1(B.RgbColorSpace_i0P0); + t1 = rgb.channel0OrNull; + t1 = A.fuzzyHashCode0(t1 == null ? 0 : t1); + t2 = rgb.channel1OrNull; + t2 = A.fuzzyHashCode0(t2 == null ? 0 : t2); + t3 = rgb.channel2OrNull; + t3 = A.fuzzyHashCode0(t3 == null ? 0 : t3); + t4 = _this.alphaOrNull; + return t1 ^ t2 ^ t3 ^ A.fuzzyHashCode0(t4 == null ? 0 : t4); + } else { + t1 = A.Primitives_objectHashCode(t1); + t2 = _this.channel0OrNull; + t2 = A.fuzzyHashCode0(t2 == null ? 0 : t2); + t3 = _this.channel1OrNull; + t3 = A.fuzzyHashCode0(t3 == null ? 0 : t3); + t4 = _this.channel2OrNull; + t4 = A.fuzzyHashCode0(t4 == null ? 0 : t4); + t5 = _this.alphaOrNull; + return (t1 ^ t2 ^ t3 ^ t4 ^ A.fuzzyHashCode0(t5 == null ? 0 : t5)) >>> 0; + } + } + }; + A.SassColor$_forSpace_closure0.prototype = { + call$1(alpha) { + return A.fuzzyAssertRange0(alpha, 0, 1, "alpha"); + }, + $signature: 12 + }; + A._ColorFormatEnum0.prototype = { + toString$0(_) { + return "rgbFunction"; + } + }; + A.SpanColorFormat0.prototype = {}; + A.Combinator0.prototype = { + _enumToString$0() { + return "Combinator." + this._name; + }, + toString$0(_) { + return this._combinator0$_text; + } + }; + A.ModifiableCssComment0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssComment$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $isCssComment0: 1, + get$span(receiver) { + return this.span; + } + }; + A.compileAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.NodeCompileResult), + $async$returnValue, $async$self = this, t5, t6, t7, t8, t9, t10, t11, t12, t13, result, t1, t2, t3, t4; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.options; + t2 = t1 == null; + t3 = t2 ? null : J.get$loadPaths$x(t1); + t4 = t2 ? null : J.get$quietDeps$x(t1); + if (t4 == null) + t4 = false; + t5 = A._parseOutputStyle0(t2 ? null : J.get$style$x(t1)); + t6 = t2 ? null : J.get$verbose$x(t1); + if (t6 == null) + t6 = false; + t7 = t2 ? null : J.get$charset$x(t1); + if (t7 == null) + t7 = true; + t8 = t2 ? null : J.get$sourceMap$x(t1); + if (t8 == null) + t8 = false; + t9 = $async$self.logger; + if (t2) + t10 = null; + else { + t10 = J.get$importers$x(t1); + t10 = t10 == null ? null : J.map$1$1$ax(t10, new A.compileAsync__closure(), type$.AsyncImporter); + } + t11 = A._parseFunctions0(t2 ? null : J.get$functions$x(t1), true); + t12 = A.parseDeprecations(t9, t2 ? null : J.get$fatalDeprecations$x(t1), true); + t13 = A.parseDeprecations(t9, t2 ? null : J.get$silenceDeprecations$x(t1), false); + $async$goto = 3; + return A._asyncAwait(A.compileAsync0($async$self.path, t7, t12, t11, A.parseDeprecations(t9, t2 ? null : J.get$futureDeprecations$x(t1), false), A.AsyncImportCache$(t10, t3, null), null, null, t9, null, t4, t13, t8, t5, null, true, t6), $async$call$0); + case 3: + // returning from await. + result = $async$result; + t1 = t2 ? null : J.get$sourceMapIncludeSources$x(t1); + $async$returnValue = A._convertResult(result, t1 == null ? false : t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 232 + }; + A.compileAsync__closure.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 233 + }; + A.compileStringAsync_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.NodeCompileResult), + $async$returnValue, $async$self = this, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, result, t1, t2, t3, t4, t5, t6; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.options; + t2 = t1 == null; + t3 = A.parseSyntax(t2 ? null : J.get$syntax$x(t1)); + t4 = t2 ? null : A.NullableExtension_andThen0(J.get$url$x(t1), A.utils3__jsToDartUrl$closure()); + t5 = t2 ? null : J.get$loadPaths$x(t1); + t6 = t2 ? null : J.get$quietDeps$x(t1); + if (t6 == null) + t6 = false; + t7 = A._parseOutputStyle0(t2 ? null : J.get$style$x(t1)); + t8 = t2 ? null : J.get$verbose$x(t1); + if (t8 == null) + t8 = false; + t9 = t2 ? null : J.get$charset$x(t1); + if (t9 == null) + t9 = true; + t10 = t2 ? null : J.get$sourceMap$x(t1); + if (t10 == null) + t10 = false; + t11 = $async$self.logger; + if (t2) + t12 = null; + else { + t12 = J.get$importers$x(t1); + t12 = t12 == null ? null : J.map$1$1$ax(t12, new A.compileStringAsync__closure(), type$.AsyncImporter); + } + t13 = t2 ? null : A.NullableExtension_andThen0(J.get$importer$x(t1), new A.compileStringAsync__closure0()); + if (t13 == null) + t13 = (t2 ? null : J.get$url$x(t1)) == null ? new A.NoOpImporter0() : null; + t14 = A._parseFunctions0(t2 ? null : J.get$functions$x(t1), true); + t15 = A.parseDeprecations(t11, t2 ? null : J.get$fatalDeprecations$x(t1), true); + t16 = A.parseDeprecations(t11, t2 ? null : J.get$silenceDeprecations$x(t1), false); + $async$goto = 3; + return A._asyncAwait(A.compileStringAsync0($async$self.text, t9, t15, t14, A.parseDeprecations(t11, t2 ? null : J.get$futureDeprecations$x(t1), false), A.AsyncImportCache$(t12, t5, null), t13, null, null, t11, null, t6, t16, t10, t7, t3, t4, true, t8), $async$call$0); + case 3: + // returning from await. + result = $async$result; + t1 = t2 ? null : J.get$sourceMapIncludeSources$x(t1); + $async$returnValue = A._convertResult(result, t1 == null ? false : t1); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 232 + }; + A.compileStringAsync__closure.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 233 + }; + A.compileStringAsync__closure0.prototype = { + call$1(importer) { + return A._parseAsyncImporter(importer); + }, + $signature: 426 + }; + A._wrapAsyncSassExceptions_closure.prototype = { + call$1(error) { + var t1; + if (error instanceof A.SassException0) + t1 = A.throwNodeException(error, this.ascii, this.color, null); + else + t1 = A.jsThrow(error == null ? A._asObject(error) : error); + return t1; + }, + $signature: 427 + }; + A._parseFunctions_closure0.prototype = { + call$2(signature, callback) { + var callable, + t1 = this.result; + if (!this.asynch) { + callable = A._Cell$(); + callable.__late_helper$_value = A.Callable_Callable$fromSignature(signature, new A._parseFunctions__closure2(callback, callable), true); + t1.push(callable._readLocal$0()); + } else { + callable = A._Cell$(); + callable.__late_helper$_value = A.AsyncCallable_AsyncCallable$fromSignature(signature, new A._parseFunctions__closure3(callback, callable), true); + t1.push(callable._readLocal$0()); + } + }, + $signature: 126 + }; + A._parseFunctions__closure2.prototype = { + call$1($arguments) { + var t1, t2, + _s42_ = string$.Invali, + result = A.wrapJSExceptions(new A._parseFunctions___closure6(this.callback, $arguments)); + if (result instanceof A.Value0) + return A._simplifyValue(result); + t1 = result != null && result instanceof self.Promise; + t2 = this.callable; + if (t1) { + t1 = t2.readLocal$0(); + throw A.wrapException(_s42_ + t1.get$name(t1) + '":\nPromises may only be returned for sass.compileAsync() and sass.compileStringAsync().'); + } else { + t1 = t2.readLocal$0(); + throw A.wrapException(_s42_ + t1.get$name(t1) + '": ' + A.S(result) + " is not a sass.Value."); + } + }, + $signature: 3 + }; + A._parseFunctions___closure6.prototype = { + call$0() { + return type$.Function._as(this.callback).call$1(A.toJSArray(this.$arguments)); + }, + $signature: 64 + }; + A._parseFunctions__closure3.prototype = { + call$1($arguments) { + return this.$call$body$_parseFunctions__closure0($arguments); + }, + $call$body$_parseFunctions__closure0($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, t1, result; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + result = A.wrapJSExceptions(new A._parseFunctions___closure5($async$self.callback, $arguments)); + $async$goto = result != null && result instanceof self.Promise ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(A.promiseToFuture0(type$.Promise._as(result), type$.Object), $async$call$1); + case 5: + // returning from await. + result = $async$result; + case 4: + // join + if (result instanceof A.Value0) { + $async$returnValue = A._simplifyValue(result); + // goto return + $async$goto = 1; + break; + } + t1 = $async$self.callable.readLocal$0(); + throw A.wrapException(string$.Invali + t1.get$name(t1) + '": ' + A.S(result) + " is not a sass.Value."); + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 92 + }; + A._parseFunctions___closure5.prototype = { + call$0() { + return type$.Function._as(this.callback).call$1(A.toJSArray(this.$arguments)); + }, + $signature: 64 + }; + A.nodePackageImporterClass_closure.prototype = { + call$0() { + return type$.JSClass._as(A.allowInteropCaptureThisNamed("sass.NodePackageImporter", new A.nodePackageImporterClass__closure())); + }, + $signature: 17 + }; + A.nodePackageImporterClass__closure.prototype = { + call$2($self, entrypointDirectory) { + var t1, t2, _null = null, + _0_3 = A.entrypointFilename(); + $label0$0: { + if (entrypointDirectory != null) { + t1 = entrypointDirectory; + break $label0$0; + } + if (_0_3 != null) { + t1 = $.$get$context().dirname$1(_0_3); + break $label0$0; + } + t1 = A.throwExpression("The Node package importer cannot determine an entry point because `require.main.filename` is not defined. Please provide an `entryPointDirectory` to the `NodePackageImporter`."); + } + t2 = new A.NodePackageImporter0(); + if (A.isBrowser()) + A.throwExpression(string$.The_No); + t2._node_package$__NodePackageImporter__entryPointDirectory_F = A.absolute(t1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + return t2; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 429 + }; + A._compileStylesheet_closure1.prototype = { + call$1(url) { + var t1; + if (url === "") { + t1 = this.stylesheet.span; + t1 = A.Uri_Uri$dataFromString(A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), B.C_Utf8Codec, null).get$_text(); + } else + t1 = this.importCache.sourceMapUrl$1(0, A.Uri_parse(url)).toString$0(0); + return t1; + }, + $signature: 6 + }; + A.CompileOptions.prototype = {}; + A.CompileStringOptions.prototype = {}; + A.NodeCompileResult.prototype = {}; + A.CompileResult0.prototype = {}; + A.Compiler.prototype = {}; + A.AsyncCompiler.prototype = { + addCompilation$1(compilation) { + this.compilations.add$1(0, A.promiseToFuture(compilation, type$.dynamic).catchError$1(new A.AsyncCompiler_addCompilation_closure())); + } + }; + A.AsyncCompiler_addCompilation_closure.prototype = { + call$1(err) { + }, + $signature: 62 + }; + A.compilerClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.Compiler", new A.compilerClass__closure())); + A.LinkedHashMap_LinkedHashMap$_literal(["compile", new A.compilerClass__closure0(), "compileString", new A.compilerClass__closure1(), "dispose", new A.compilerClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(new A.Compiler().constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.compilerClass__closure.prototype = { + call$1($self) { + return A.LinkedHashSet_LinkedHashSet$_literal([A.jsThrow(new self.Error("Compiler can not be directly constructed. Please use `sass.initCompiler()` instead."))], type$.Never); + }, + $signature: 234 + }; + A.compilerClass__closure0.prototype = { + call$3($self, path, options) { + if ($self._disposed) + A.jsThrow(new self.Error("Compiler has already been disposed.")); + return A.compile0(path, options); + }, + call$2($self, path) { + return this.call$3($self, path, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 431 + }; + A.compilerClass__closure1.prototype = { + call$3($self, source, options) { + if ($self._disposed) + A.jsThrow(new self.Error("Compiler has already been disposed.")); + return A.compileString0(source, options); + }, + call$2($self, source) { + return this.call$3($self, source, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 432 + }; + A.compilerClass__closure2.prototype = { + call$1($self) { + $self._disposed = true; + }, + $signature: 433 + }; + A.asyncCompilerClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.AsyncCompiler", new A.asyncCompilerClass__closure())); + A.LinkedHashMap_LinkedHashMap$_literal(["compileAsync", new A.asyncCompilerClass__closure0(), "compileStringAsync", new A.asyncCompilerClass__closure1(), "dispose", new A.asyncCompilerClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(new A.AsyncCompiler(new A.FutureGroup(new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_List_void), type$._AsyncCompleter_List_void), [], type$.FutureGroup_void)).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.asyncCompilerClass__closure.prototype = { + call$1($self) { + return A.LinkedHashSet_LinkedHashSet$_literal([A.jsThrow(new self.Error("AsyncCompiler can not be directly constructed. Please use `sass.initAsyncCompiler()` instead."))], type$.Never); + }, + $signature: 234 + }; + A.asyncCompilerClass__closure0.prototype = { + call$3($self, path, options) { + var compilation; + if ($self._disposed) + A.jsThrow(new self.Error("Compiler has already been disposed.")); + compilation = A.compileAsync1(path, options); + $self.addCompilation$1(compilation); + return compilation; + }, + call$2($self, path) { + return this.call$3($self, path, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 434 + }; + A.asyncCompilerClass__closure1.prototype = { + call$3($self, source, options) { + var compilation; + if ($self._disposed) + A.jsThrow(new self.Error("Compiler has already been disposed.")); + compilation = A.compileStringAsync1(source, options); + $self.addCompilation$1(compilation); + return compilation; + }, + call$2($self, source) { + return this.call$3($self, source, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 435 + }; + A.asyncCompilerClass__closure2.prototype = { + call$1($self) { + $self._disposed = true; + return A.futureToPromise0(new A.asyncCompilerClass___closure($self).call$0()); + }, + $signature: 436 + }; + A.asyncCompilerClass___closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Null), + $async$self = this, t1; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = $async$self.self.compilations; + t1.close$0(0); + $async$goto = 2; + return A._asyncAwait(t1._future_group$_completer.future, $async$call$0); + case 2: + // returning from await. + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 2 + }; + A.initAsyncCompiler_closure.prototype = { + call$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.AsyncCompiler), + $async$returnValue; + var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + $async$returnValue = new A.AsyncCompiler(new A.FutureGroup(new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_List_void), type$._AsyncCompleter_List_void), [], type$.FutureGroup_void)); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$0, $async$completer); + }, + $signature: 437 + }; + A.InterpolatedComplexSelector.prototype = { + accept$1$1(visitor) { + return visitor.visitComplexSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return B.JSArray_methods.join$1(this.components, " "); + }, + get$span(receiver) { + return this.span; + } + }; + A.ComplexSassNumber0.prototype = { + get$numeratorUnits(_) { + return this._complex0$_numeratorUnits; + }, + get$denominatorUnits(_) { + return this._complex0$_denominatorUnits; + }, + get$hasUnits() { + return true; + }, + get$hasComplexUnits() { + return true; + }, + hasUnit$1(unit) { + return false; + }, + compatibleWithUnit$1(unit) { + return false; + }, + hasPossiblyCompatibleUnits$1(other) { + throw A.wrapException(A.UnimplementedError$(string$.Comple)); + }, + withValue$1(value) { + return new A.ComplexSassNumber0(this._complex0$_numeratorUnits, this._complex0$_denominatorUnits, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.ComplexSassNumber0(this._complex0$_numeratorUnits, this._complex0$_denominatorUnits, this._number1$_value, new A._Record_2(numerator, denominator)); + } + }; + A.ComplexSelector0.prototype = { + get$specificity() { + var result, _this = this, + value = _this._complex$__ComplexSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.ComplexSelector_specificity_closure0()); + _this._complex$__ComplexSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._complex$__ComplexSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$singleCompound() { + var _0_0, t1, _0_4, selector; + if (this.leadingCombinators.length !== 0) + return null; + _0_0 = this.components; + $label0$0: { + t1 = false; + if (_0_0.length === 1) { + _0_4 = _0_0[0]; + selector = _0_4.selector; + t1 = _0_4.combinators.length <= 0; + } else + selector = null; + if (t1) { + t1 = selector; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitComplexSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + isSuperselector$1(other) { + return this.leadingCombinators.length === 0 && other.leadingCombinators.length === 0 && A.complexIsSuperselector0(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var _0_0, _0_1, t1, initial, last, _this = this; + if (combinators.length === 0) + return _this; + _0_0 = _this.components; + $label0$0: { + _0_1 = _0_0.length; + if (_0_1 >= 1) { + t1 = _0_1 - 1; + initial = B.JSArray_methods.sublist$2(_0_0, 0, t1); + last = _0_0[t1]; + t1 = A.List_List$_of(initial, type$.ComplexSelectorComponent_2); + t1.push(last.withAdditionalCombinators$1(combinators)); + t1 = A.ComplexSelector$0(_this.leadingCombinators, t1, _this.span, _this.lineBreak); + break $label0$0; + } + if (_0_1 <= 0) { + t1 = A.List_List$_of(_this.leadingCombinators, type$.CssValue_Combinator_2); + B.JSArray_methods.addAll$1(t1, combinators); + t1 = A.ComplexSelector$0(t1, B.List_empty19, _this.span, _this.lineBreak); + break $label0$0; + } + t1 = null; + } + return t1; + }, + concatenate$3$forceLineBreak(child, span, forceLineBreak) { + var t2, _0_1, initial, last, _this = this, + t1 = child.leadingCombinators, + _0_0 = _this.components; + if (t1.length === 0) { + t1 = A.List_List$_of(_0_0, type$.ComplexSelectorComponent_2); + B.JSArray_methods.addAll$1(t1, child.components); + t2 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$0(_this.leadingCombinators, t1, span, t2); + } else { + _0_1 = _0_0.length; + if (_0_1 >= 1) { + t2 = _0_1 - 1; + initial = B.JSArray_methods.sublist$2(_0_0, 0, t2); + last = _0_0[t2]; + t2 = A.List_List$_of(initial, type$.ComplexSelectorComponent_2); + t2.push(last.withAdditionalCombinators$1(t1)); + B.JSArray_methods.addAll$1(t2, child.components); + t1 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$0(_this.leadingCombinators, t2, span, t1); + } else { + t2 = A.List_List$_of(_this.leadingCombinators, type$.CssValue_Combinator_2); + B.JSArray_methods.addAll$1(t2, t1); + t1 = _this.lineBreak || child.lineBreak || forceLineBreak; + return A.ComplexSelector$0(t2, child.components, span, t1); + } + } + }, + concatenate$2(child, span) { + return this.concatenate$3$forceLineBreak(child, span, false); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.leadingCombinators) ^ B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ComplexSelector0 && B.C_ListEquality.equals$2(0, this.leadingCombinators, other.leadingCombinators) && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.ComplexSelector_specificity_closure0.prototype = { + call$2(sum, component) { + return sum + component.selector.get$specificity(); + }, + $signature: 438 + }; + A.InterpolatedComplexSelectorComponent.prototype = { + toString$0(_) { + var t1, + _0_0 = this.combinator; + $label0$0: { + if (_0_0 != null) { + t1 = this.selector.toString$0(0) + " " + _0_0.toString$0(0); + break $label0$0; + } + t1 = B.JSArray_methods.join$1(this.selector.components, ""); + break $label0$0; + } + return t1; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ComplexSelectorComponent0.prototype = { + withAdditionalCombinators$1(combinators) { + var t1, t2, _this = this; + if (combinators.length === 0) + t1 = _this; + else { + t1 = type$.CssValue_Combinator_2; + t2 = A.List_List$_of(_this.combinators, t1); + B.JSArray_methods.addAll$1(t2, combinators); + t1 = new A.ComplexSelectorComponent0(_this.selector, A.List_List$unmodifiable(t2, t1), _this.span); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.selector.components) ^ B.C_ListEquality0.hash$1(this.combinators); + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (other instanceof A.ComplexSelectorComponent0) { + t1 = B.C_ListEquality.equals$2(0, this.selector.components, other.selector.components); + t1 = t1 && B.C_ListEquality.equals$2(0, this.combinators, other.combinators); + } else + t1 = false; + return t1; + }, + toString$0(_) { + var t1 = this.combinators; + return A.serializeSelector0(this.selector, true) + new A.MappedListIterable(t1, new A.ComplexSelectorComponent_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ""); + } + }; + A.ComplexSelectorComponent_toString_closure0.prototype = { + call$1(combinator) { + return " " + combinator.toString$0(0); + }, + $signature: 439 + }; + A.InterpolatedCompoundSelector.prototype = { + get$span(_) { + var t2, + t1 = this.components; + if (t1.length === 1) { + t1 = B.JSArray_methods.get$first(t1); + t1 = t1.get$span(t1); + } else { + t2 = B.JSArray_methods.get$first(t1); + t2 = t2.get$span(t2); + t1 = B.JSArray_methods.get$last(t1); + t1 = t2.expand$1(0, t1.get$span(t1)); + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitCompoundSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return B.JSArray_methods.join$1(this.components, ""); + } + }; + A.CompoundSelector0.prototype = { + get$specificity() { + var result, _this = this, + value = _this._compound$__CompoundSelector_specificity_FI; + if (value === $) { + result = B.JSArray_methods.fold$2(_this.components, 0, new A.CompoundSelector_specificity_closure0()); + _this._compound$__CompoundSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._compound$__CompoundSelector_specificity_FI = result; + value = result; + } + return value; + }, + get$hasComplicatedSuperselectorSemantics() { + var result, _this = this, + value = _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI; + if (value === $) { + result = B.JSArray_methods.any$1(_this.components, new A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0()); + _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._compound$__CompoundSelector_hasComplicatedSuperselectorSemantics_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitCompoundSelector$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CompoundSelector0 && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.CompoundSelector_specificity_closure0.prototype = { + call$2(sum, component) { + return sum + component.get$specificity(); + }, + $signature: 440 + }; + A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0.prototype = { + call$1(component) { + return component.get$hasComplicatedSuperselectorSemantics(); + }, + $signature: 15 + }; + A.Configuration0.prototype = { + throughForward$1($forward) { + var _0_0, _1_0, _2_0, t1, hiddenVariables, + newValues = this._configuration0$_values; + if (newValues.get$isEmpty(newValues)) + return this; + _0_0 = $forward.prefix; + if (_0_0 != null) + newValues = new A.UnprefixedMapView0(newValues, _0_0, type$.UnprefixedMapView_ConfiguredValue_2); + _1_0 = $forward.shownVariables; + if (_1_0 != null) + newValues = new A.LimitedMapView0(newValues, _1_0._base.intersection$1(new A.MapKeySet(newValues, type$.MapKeySet_nullable_Object)), type$.LimitedMapView_String_ConfiguredValue_2); + else { + _2_0 = $forward.hiddenVariables; + if (_2_0 != null) { + t1 = _2_0._base.get$isNotEmpty(0); + hiddenVariables = _2_0; + } else { + hiddenVariables = null; + t1 = false; + } + if (t1) + newValues = A.LimitedMapView$blocklist0(newValues, hiddenVariables, type$.String, type$.ConfiguredValue_2); + } + return this._configuration0$_withValues$1(newValues); + }, + _configuration0$_withValues$1(values) { + var t1 = this._configuration0$__originalConfiguration; + return new A.Configuration0(values, t1 == null ? this : t1); + }, + toString$0(_) { + var t2, t3, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(this._configuration0$_values, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t1.push("$" + t3._0 + ": " + t3._1.toString$0(0)); + } + return "(" + B.JSArray_methods.join$1(t1, ",") + ")"; + } + }; + A.ExplicitConfiguration0.prototype = { + _configuration0$_withValues$1(values) { + var t1 = this._configuration0$__originalConfiguration; + if (t1 == null) + t1 = this; + return new A.ExplicitConfiguration0(this.nodeWithSpan, values, t1); + } + }; + A.ConfiguredValue0.prototype = { + toString$0(_) { + return this.value.toString$0(0); + } + }; + A.ConfiguredVariable0.prototype = { + toString$0(_) { + var t1 = this.expression.toString$0(0), + t2 = this.isGuarded ? " !default" : ""; + return "$" + this.name + ": " + t1 + t2; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ContentBlock0.prototype = { + accept$1$1(visitor) { + return visitor.visitContentBlock$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.parameters; + t1 = t1.parameters.length === 0 && t1.restParameter == null ? "" : " using (" + t1.toString$0(0) + ")"; + return t1 + (" {" + B.JSArray_methods.join$1(this.children, " ") + "}"); + } + }; + A.ContentRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitContentRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.$arguments; + return t1.get$isEmpty(0) ? "@content;" : "@content(" + t1.toString$0(0) + ");"; + }, + get$span(receiver) { + return this.span; + } + }; + A._disallowedFunctionNames_closure0.prototype = { + call$1($function) { + return $function.name; + }, + $signature: 441 + }; + A.CssParser0.prototype = { + get$plainCss() { + return true; + }, + silentComment$0() { + var t1, t2, _this = this; + if (_this._stylesheet0$_inExpression) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.super$Parser$silentComment0(); + _this.error$2(0, string$.Silent, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + atRule$2$root(child, root) { + var $name, _0_0, result, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(64); + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$1$consumeNewlines(true); + _0_0 = $name.get$asPlain(); + $label0$0: { + if ("at-root" === _0_0 || "content" === _0_0 || "debug" === _0_0 || "each" === _0_0 || "error" === _0_0 || "extend" === _0_0 || "for" === _0_0 || "if" === _0_0 || "include" === _0_0 || "mixin" === _0_0 || "return" === _0_0 || "warn" === _0_0 || "while" === _0_0) + _this._css$_forbiddenAtRule$1(start); + if ("import" === _0_0) { + t1 = _this._css$_cssImportRule$1(start); + break $label0$0; + } + if ("function" === _0_0) { + _this.whitespace$1$consumeNewlines(true); + if (!t1.matches$1("--")) { + _this.almostAnyValue$0(); + _this.error$2(0, "This at-rule isn't allowed in plain CSS.", t1.spanFrom$1(start)); + result = null; + } else + result = _this.unknownAtRule$2(start, $name); + t1 = result; + break $label0$0; + } + if ("media" === _0_0) { + t1 = _this.mediaRule$1(start); + break $label0$0; + } + if ("-moz-document" === _0_0) { + t1 = _this.mozDocumentRule$2(start, $name); + break $label0$0; + } + if ("supports" === _0_0) { + t1 = _this.supportsRule$1(start); + break $label0$0; + } + t1 = _this.unknownAtRule$2(start, $name); + break $label0$0; + } + return t1; + }, + _css$_forbiddenAtRule$1(start) { + this.almostAnyValue$0(); + this.error$2(0, "This at-rule isn't allowed in plain CSS.", this.spanFrom$1(start)); + }, + _css$_cssImportRule$1(start) { + var _0_0, t3, string, $name, _0_3, _0_4, t4, _0_8, t5, modifiers, _this = this, _null = null, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + _1_0 = t1.peekChar$0(); + $label1$1: { + if (117 === _1_0 || 85 === _1_0) { + _0_0 = _this.dynamicUrl$0(); + $label0$0: { + if (_0_0 instanceof A.StringExpression0) { + t3 = _0_0.text; + break $label0$0; + } + string = _null; + t3 = false; + if (_0_0 instanceof A.InterpolatedFunctionExpression0) { + $name = _0_0.name; + _0_3 = _0_0.$arguments; + _0_4 = _0_3.positional; + t4 = _0_4; + if (t4.length === 1) { + _0_8 = _0_4[0]; + t4 = _0_8; + if (t4 instanceof A.StringExpression0) { + type$.StringExpression_2._as(_0_8); + t4 = _0_3.named; + if (t4.get$isEmpty(t4)) + if (_0_3.rest == null) + t3 = _0_3.keywordRest == null; + string = _0_8; + } + } + } else + $name = _null; + if (t3) { + t3 = new A.StringBuffer(""); + t4 = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t4.addInterpolation$1($name); + t5 = A.Primitives_stringFromCharCode(40); + t3._contents += t5; + t4.addInterpolation$1(string.asInterpolation$0()); + t5 = A.Primitives_stringFromCharCode(41); + t3._contents += t5; + t4 = t4.interpolation$1(_0_0.span); + t3 = t4; + break $label0$0; + } + t3 = _this.error$2(0, "Unsupported plain CSS import.", _0_0.get$span(_0_0)); + } + break $label1$1; + } + t3 = _this.interpolatedString$0().asInterpolation$1$static(true); + break $label1$1; + } + _this.whitespace$1$consumeNewlines(true); + modifiers = _this.tryImportModifiers$0(); + _this.expectStatementSeparator$1("@import rule"); + t2 = A._setArrayType([new A.StaticImport0(t3, modifiers, _this.spanFrom$1(new A._SpanScannerState(t1, t2)))], type$.JSArray_Import_2); + t1 = _this.spanFrom$1(start); + return new A.ImportRule0(A.List_List$unmodifiable(t2, type$.Import_2), t1); + }, + parentheses$0() { + var expression, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + expression = _this.expressionUntilComma$0(); + t1.expectChar$1(41); + return new A.ParenthesizedExpression0(expression, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + identifierLike$0() { + var t2, allowEmptySecondArg, $arguments, t3, t4, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = plain.toLowerCase(), + _0_0 = _this.trySpecialFunction$2(lower, start); + if (_0_0 != null) + return _0_0; + t2 = t1._string_scanner$_position; + if (t1.scanChar$1(46)) + return _this.namespacedExpression$2(plain, start); + else if (lower === "if" && t1.peekChar$0() === 40) + return _this.ifExpression$1(start); + else if (!t1.scanChar$1(40)) + return new A.StringExpression0(identifier, false); + allowEmptySecondArg = lower === "var"; + $arguments = A._setArrayType([], type$.JSArray_Expression_2); + if (!t1.scanChar$1(41)) { + do { + _this.whitespace$1$consumeNewlines(true); + if (allowEmptySecondArg && $arguments.length === 1 && t1.peekChar$0() === 41) { + t3 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t4 = t3.offset; + t4 = A._FileSpan$(t3.file, t4, t4); + $arguments.push(new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable([""], type$.Object), B.List_null, t4), false)); + break; + } + $arguments.push(_this.expressionUntilComma$1$singleEquals(true)); + _this.whitespace$1$consumeNewlines(true); + } while (t1.scanChar$1(44)); + t1.expectChar$1(41); + } + if ($.$get$_disallowedFunctionNames0().contains$1(0, plain)) + _this.error$2(0, string$.This_f, _this.spanFrom$1(start)); + t1 = A.ArgumentList$0($arguments, B.Map_empty14, B.Map_empty5, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), null, null); + t2 = _this.spanFrom$1(start); + return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, t1, t2); + }, + namespacedExpression$2(namespace, start) { + var expression = this.super$StylesheetParser$namespacedExpression0(namespace, start); + this.error$2(0, string$.Modulen, expression.get$span(expression)); + } + }; + A.DebugRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitDebugRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@debug " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssDeclaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssDeclaration$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + ": " + this.value.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Declaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitDeclaration$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _0_0, _this = this, + buffer = new A.StringBuffer(""), + t1 = _this.name.toString$0(0); + buffer._contents = t1; + t1 = buffer._contents = t1 + A.Primitives_stringFromCharCode(58); + t2 = _this.value; + if (t2 != null) { + if (_this.parsedAsSassScript) + t1 = buffer._contents = t1 + A.Primitives_stringFromCharCode(32); + buffer._contents = t1 + t2.toString$0(0); + } + _0_0 = _this.children; + if (_0_0 != null) + return buffer.toString$0(0) + " {" + B.JSArray_methods.join$1(_0_0, " ") + "}"; + else + return buffer.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsDeclaration0.prototype = { + get$isCustomProperty() { + var t1, + _0_0 = this.name; + $label0$0: { + if (_0_0 instanceof A.StringExpression0 && !_0_0.hasQuotes) { + t1 = B.JSString_methods.startsWith$1(_0_0.text.get$initialPlain(), "--"); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + toInterpolation$0() { + var visitor, _1_0, _null = null, + t1 = new A.StringBuffer(""), + t2 = type$.JSArray_Object, + t3 = type$.JSArray_nullable_FileSpan, + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], t2), A._setArrayType([], t3)), + t4 = this.span, + t5 = this.name, + t6 = A.SpanExtensions_before(t4, t5.get$span(t5)); + t6 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t6.file._decodedChars, t6._file$_start, t6._end), 0, _null); + t1._contents += t6; + if (t5 instanceof A.StringExpression0 && !t5.hasQuotes) + buffer.addInterpolation$1(t5.text); + else + buffer.add$2(0, t5, t5.get$span(t5)); + t6 = this.value; + t5 = A.SpanExtensions_between(t5.get$span(t5), t6.get$span(t6)); + t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, _null); + t1._contents += t5; + visitor = new A.SourceInterpolationVisitor(new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], t2), A._setArrayType([], t3))); + t6.accept$1(visitor); + t3 = visitor.buffer; + _1_0 = t3 == null ? _null : t3.interpolation$1(t6.get$span(t6)); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else + buffer.add$2(0, t6, t6.get$span(t6)); + t2 = A.SpanExtensions_after(t4, t6.get$span(t6)); + t2 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, _null); + t1._contents += t2; + return buffer.interpolation$1(t4); + }, + withSpan$1(span) { + return new A.SupportsDeclaration0(this.name, this.value, span); + }, + toString$0(_) { + return "(" + this.name.toString$0(0) + ": " + this.value.toString$0(0) + ")"; + }, + $isAstNode0: 1, + $isSassNode: 1, + $isSupportsCondition: 1, + get$span(receiver) { + return this.span; + } + }; + A.DefaultLogger0.prototype = { + get$_default0$_inner() { + var t1 = $._default0; + if (t1 == null) + t1 = $._default0 = new A.StderrLogger0(A.hasTerminal0() || A.isBrowser()); + return t1; + }, + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + return this.get$_default0$_inner().internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + }, + debug$2(_, message, span) { + return this.get$_default0$_inner().debug$2(0, message, span); + } + }; + A.Deprecation0.prototype = { + _enumToString$0() { + return "Deprecation." + this._name; + }, + get$deprecatedIn(_) { + return A.NullableExtension_andThen0(this._deprecation$_deprecatedIn, A.version_Version___parse_tearOff$closure()); + }, + get$obsoleteIn(_) { + var t1 = this._deprecation$_obsoleteIn; + return t1 == null ? null : A.NullableExtension_andThen0(t1, A.version_Version___parse_tearOff$closure()); + }, + toString$0(_) { + return this.id; + } + }; + A.Deprecation_fromId_closure0.prototype = { + call$1(deprecation) { + return deprecation.id === this.id; + }, + $signature: 442 + }; + A.DeprecationProcessingLogger0.prototype = { + validate$0() { + var t1, t2, t3, t4, $self, t5, _this = this, _null = null; + for (t1 = _this.fatalDeprecations, t1 = A._LinkedHashSetIterator$(t1, t1._collection$_modifications, A._instanceType(t1)._precomputed1), t2 = _this.silenceDeprecations, t3 = t1.$ti._precomputed1; t1.moveNext$0();) { + t4 = t1._collection$_current; + if (t4 == null) + t4 = t3._as(t4); + $self = t4._deprecation$_obsoleteIn; + if ($self == null) + t5 = _null; + else + t5 = A.Version___parse_tearOff($self); + if (t5 instanceof A.Version) { + t4 = t4.toString$0(0); + _this.internalWarn$4$deprecation$span$trace(t4 + string$.x20deprex20ix2c, _null, _null, _null); + continue; + } + t5 = t2.contains$1(0, t4); + if (t5) { + t4 = t4.toString$0(0); + _this.internalWarn$4$deprecation$span$trace("Ignoring setting to silence " + t4 + string$.x20deprex2c, _null, _null, _null); + continue; + } + } + for (t1 = A._LinkedHashSetIterator$(t2, t2._collection$_modifications, A._instanceType(t2)._precomputed1), t2 = t1.$ti._precomputed1, t3 = _this.futureDeprecations; t1.moveNext$0();) { + t4 = t1._collection$_current; + if (t4 == null) + t4 = t2._as(t4); + if (B.Deprecation_dlf === t4) { + _this.internalWarn$4$deprecation$span$trace(string$.User_a, _null, _null, _null); + continue; + } + $self = t4._deprecation$_obsoleteIn; + if ($self == null) + t5 = _null; + else + t5 = A.Version___parse_tearOff($self); + if (t5 instanceof A.Version) { + t4 = t4.toString$0(0); + _this.internalWarn$4$deprecation$span$trace(t4 + string$.x20deprex20ix2e, _null, _null, _null); + continue; + } + } + for (t1 = A._LinkedHashSetIterator$(t3, t3._collection$_modifications, A._instanceType(t3)._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + t3 = (t3 == null ? t2._as(t3) : t3).toString$0(0); + _this.internalWarn$4$deprecation$span$trace(t3 + string$.x20is_noaf, _null, _null, _null); + } + }, + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + if (deprecation != null) + this._deprecation_processing$_handleDeprecation$4$span$trace(deprecation, message, span, trace); + else + this._deprecation_processing$_inner.internalWarn$4$deprecation$span$trace(message, null, span, trace); + }, + _deprecation_processing$_handleDeprecation$4$span$trace(deprecation, message, span, trace) { + var _0_3_isSet, t1, span0, _0_3, t2, count, _this = this, _null = null; + if (_this.fatalDeprecations.contains$1(0, deprecation)) { + message += string$.x0a_This + deprecation.toString$0(0) + string$.x20deprex20t; + $label0$0: { + _0_3_isSet = span != null; + t1 = false; + if (_0_3_isSet) { + t1 = trace != null; + span0 = span; + _0_3 = trace; + } else { + span0 = _null; + _0_3 = span0; + } + if (t1) { + if (_0_3_isSet) + trace = _0_3; + t1 = A.SassRuntimeException$0(message, span0, trace == null ? type$.Trace._as(trace) : trace, _null); + break $label0$0; + } + t1 = false; + if (span != null) + t1 = (_0_3_isSet ? _0_3 : trace) == null; + else + span = _null; + if (t1) { + t1 = A.SassException$0(message, span, _null); + break $label0$0; + } + t1 = A.SassScriptException$0(message, _null); + break $label0$0; + } + throw A.wrapException(t1); + } + if (_this.silenceDeprecations.contains$1(0, deprecation)) + return; + if (_this.limitRepetition) { + t1 = _this._deprecation_processing$_warningCounts; + t2 = t1.$index(0, deprecation); + count = (t2 == null ? 0 : t2) + 1; + t1.$indexSet(0, deprecation, count); + if (count > 5) + return; + } + _this._deprecation_processing$_inner.internalWarn$4$deprecation$span$trace(message, deprecation, span, trace); + }, + debug$2(_, message, span) { + return this._deprecation_processing$_inner.debug$2(0, message, span); + }, + summarize$1$js(js) { + var t1 = this._deprecation_processing$_warningCounts, + t2 = A._instanceType(t1)._eval$1("LinkedHashMapValuesIterable<2>"), + total = A.IterableIntegerExtension_get_sum(new A.MappedIterable(new A.WhereIterable(new A.LinkedHashMapValuesIterable(t1, t2), new A.DeprecationProcessingLogger_summarize_closure1(), t2._eval$1("WhereIterable")), new A.DeprecationProcessingLogger_summarize_closure2(), t2._eval$1("MappedIterable"))); + if (total > 0) { + t1 = js ? "" : string$.x0aRun_i; + this._deprecation_processing$_inner.internalWarn$4$deprecation$span$trace("" + total + string$.x20repet + t1, null, null, null); + } + } + }; + A.DeprecationProcessingLogger_summarize_closure1.prototype = { + call$1(count) { + return count > 5; + }, + $signature: 50 + }; + A.DeprecationProcessingLogger_summarize_closure2.prototype = { + call$1(count) { + return count - 5; + }, + $signature: 157 + }; + A.Deprecation1.prototype = {}; + A.deprecations_closure.prototype = { + call$0() { + var _0_8_isSet, _0_8, t1, + _0_0 = this.deprecation; + $label0$0: { + _0_8_isSet = A.NullableExtension_andThen0(_0_0._deprecation$_deprecatedIn, A.version_Version___parse_tearOff$closure()) == null; + if (_0_8_isSet) { + _0_8 = _0_0.get$obsoleteIn(0) == null; + t1 = _0_8; + } else { + _0_8 = null; + t1 = false; + } + if (t1) { + t1 = "user"; + break $label0$0; + } + if (_0_8_isSet ? _0_8 : _0_0.get$obsoleteIn(0) == null) { + t1 = "active"; + break $label0$0; + } + t1 = "obsolete"; + break $label0$0; + } + return t1; + }, + $signature: 29 + }; + A.parseDeprecations_closure.prototype = { + call$0() { + return new A._SyncStarIterable(this.$call$body$parseDeprecations_closure(), type$._SyncStarIterable_Deprecation); + }, + $call$body$parseDeprecations_closure() { + var $async$self = this; + return function() { + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], t1, t2, t3, t4, item, t5, id, deprecation, version; + return function $async$call$0($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = J.get$iterator$ax($async$self.deprecations), t2 = type$.Deprecation_2, t3 = $async$self.supportVersions, t4 = $async$self.logger; + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + item = t1.get$current(t1); + t5 = typeof item == "string"; + id = t5 ? item : null; + $async$goto = t5 ? 4 : 5; + break; + case 4: + // then + deprecation = A.Deprecation_fromId0(id); + $async$goto = deprecation == null ? 6 : 8; + break; + case 6: + // then + t4.internalWarn$4$deprecation$span$trace('Invalid deprecation "' + A.S(id) + '".', null, null, null); + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = 9; + return $async$iterator._async$_current = deprecation, 1; + case 9: + // after yield + case 7: + // join + // goto for condition + $async$goto = 2; + break; + case 5: + // join + t5 = t2._is(item); + id = t5 ? J.get$id$x(item) : null; + $async$goto = t5 ? 10 : 11; + break; + case 10: + // then + deprecation = A.Deprecation_fromId0(id); + $async$goto = deprecation == null ? 12 : 14; + break; + case 12: + // then + t4.internalWarn$4$deprecation$span$trace('Invalid deprecation "' + A.S(id) + '".', null, null, null); + // goto join + $async$goto = 13; + break; + case 14: + // else + $async$goto = 15; + return $async$iterator._async$_current = deprecation, 1; + case 15: + // after yield + case 13: + // join + // goto for condition + $async$goto = 2; + break; + case 11: + // join + if (item instanceof A.Version) { + t5 = t3; + version = item; + } else { + version = null; + t5 = false; + } + $async$goto = t5 ? 16 : 17; + break; + case 16: + // then + $async$goto = 18; + return $async$iterator._yieldStar$1(A.Deprecation_forVersion0(version)); + case 18: + // after yield + case 17: + // join + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + }, + $signature: 443 + }; + A.versionClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.Version", new A.versionClass__closure())); + jsClass.parse = A.allowInteropNamed("parse", new A.versionClass__closure0()); + A.JSClassExtension_injectSuperclass(t1._as(A.Version_Version(0, 0, 0, null).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.versionClass__closure.prototype = { + call$4($self, major, minor, patch) { + return A.Version_Version(major, minor, patch, null); + }, + "call*": "call$4", + $requiredArgCount: 4, + $signature: 444 + }; + A.versionClass__closure0.prototype = { + call$1(version) { + var v = A.Version_Version$parse(version); + if (v.preRelease.length !== 0 || v.build.length !== 0) + throw A.wrapException(A.FormatException$("Build identifiers and prerelease versions not supported.", null, null)); + return v; + }, + $signature: 235 + }; + A.DisplayP3ColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1; + if (dest === B.DisplayP3LinearColorSpace_PrP0) { + t1 = this.get$toLinear(); + t1 = A.SassColor_SassColor$forSpaceInternal0(dest, A.NullableExtension_andThen0(red, t1), A.NullableExtension_andThen0(green, t1), A.NullableExtension_andThen0(blue, t1), alpha); + } else + t1 = this.super$ColorSpace$convertLinear0(dest, red, green, blue, alpha, false, false, false, false, false); + return t1; + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear0(channel); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear0(channel); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj0 === dest || B.SrgbColorSpace_thf0 === dest || B.RgbColorSpace_i0P0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$linearDisplayP3ToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$linearDisplayP3ToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$linearDisplayP3ToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$linearDisplayP3ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.DisplayP3LinearColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + return dest === B.DisplayP3ColorSpace_MmT0 ? A.SassColor_SassColor$forSpaceInternal0(dest, A.NullableExtension_andThen0(red, A.utils2__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen0(green, A.utils2__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen0(blue, A.utils2__srgbAndDisplayP3FromLinear$closure()), alpha) : this.super$ColorSpace$convert0(dest, red, green, blue, alpha); + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj0 === dest || B.SrgbColorSpace_thf0 === dest || B.RgbColorSpace_i0P0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$linearDisplayP3ToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$linearDisplayP3ToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$linearDisplayP3ToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$linearDisplayP3ToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$linearDisplayP3ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.DynamicImport0.prototype = { + toString$0(_) { + return A.StringExpression_quoteText0(this.urlString); + }, + $isImport0: 1, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.EachRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitEachRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.variables; + return "@each " + new A.MappedListIterable(t1, new A.EachRule_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$1(0, ", ") + " in " + this.list.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.EachRule_toString_closure0.prototype = { + call$1(variable) { + return "$" + variable; + }, + $signature: 6 + }; + A.EmptyExtensionStore0.prototype = { + get$_extension_store$_extensions() { + return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__extensions, "get$_empty_extension_store0$_extensions", 1, [], [], 0))); + }, + get$_extension_store$_sourceSpecificity() { + return A.throwExpression(A.NoSuchMethodError_NoSuchMethodError$withInvocation(this, A.JSInvocationMirror$(B.Symbol__sourceSpecificity, "get$_empty_extension_store0$_sourceSpecificity", 1, [], [], 0))); + }, + get$isEmpty(_) { + return true; + }, + get$simpleSelectors() { + return B.C_EmptyUnmodifiableSet0; + }, + extensionsWhereTarget$1(callback) { + return B.List_empty21; + }, + addSelector$2(selector, mediaContext) { + throw A.wrapException(A.UnsupportedError$(string$.addSel)); + }, + addExtension$4(extender, target, extend, mediaContext) { + throw A.wrapException(A.UnsupportedError$(string$.addExt_)); + }, + addExtensions$1(extenders) { + throw A.wrapException(A.UnsupportedError$(string$.addExts)); + }, + clone$0() { + return B.Record2_EmptyExtensionStore_Map_empty0; + }, + $isExtensionStore0: 1 + }; + A.Environment0.prototype = { + closure$0() { + var t4, t5, t6, _this = this, + t1 = _this._environment0$_forwardedModules, + t2 = _this._environment0$_nestedForwardedModules, + t3 = _this._environment0$_variables; + t3 = A._setArrayType(t3.slice(0), A._arrayInstanceType(t3)); + t4 = _this._environment0$_variableNodes; + t4 = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + t5 = _this._environment0$_functions; + t5 = A._setArrayType(t5.slice(0), A._arrayInstanceType(t5)); + t6 = _this._environment0$_mixins; + t6 = A._setArrayType(t6.slice(0), A._arrayInstanceType(t6)); + return A.Environment$_0(_this._environment0$_modules, _this._environment0$_namespaceNodes, _this._environment0$_globalModules, _this._environment0$_importedModules, t1, t2, _this._environment0$_allModules, t3, t4, t5, t6, _this._environment0$_content, B.Set_empty1); + }, + forwardModule$2(module, rule) { + var view, t1, t2, _this = this, + forwardedModules = _this._environment0$_forwardedModules; + if (forwardedModules == null) + forwardedModules = _this._environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); + view = A.ForwardedModuleView_ifNecessary0(module, rule, type$.Callable_2); + for (t1 = new A.LinkedHashMapKeyIterator(forwardedModules, forwardedModules._modifications, forwardedModules._first); t1.moveNext$0();) { + t2 = t1.__js_helper$_current; + _this._environment0$_assertNoConflicts$5(view.get$variables(), t2.get$variables(), view, t2, "variable"); + _this._environment0$_assertNoConflicts$5(view.get$functions(view), t2.get$functions(t2), view, t2, "function"); + _this._environment0$_assertNoConflicts$5(view.get$mixins(), t2.get$mixins(), view, t2, "mixin"); + } + _this._environment0$_allModules.push(module); + forwardedModules.$indexSet(0, view, rule); + }, + _environment0$_assertNoConflicts$5(newMembers, oldMembers, newModule, oldModule, type) { + var larger, smaller, t1, t2, t3, t4, $name, small, large, span; + if (newMembers.get$length(newMembers) < oldMembers.get$length(oldMembers)) { + larger = oldMembers; + smaller = newMembers; + } else { + larger = newMembers; + smaller = oldMembers; + } + for (t1 = type$.String, t2 = A.MapExtensions_get_pairs0(smaller, t1, type$.Object), t2 = t2.get$iterator(t2), t3 = type === "variable"; t2.moveNext$0();) { + t4 = t2.get$current(t2); + $name = t4._0; + small = t4._1; + large = larger.$index(0, $name); + if (large == null) + continue; + if (t3 ? newModule.variableIdentity$1($name) === oldModule.variableIdentity$1($name) : J.$eq$(large, small)) + continue; + if (t3) + $name = "$" + $name; + t2 = this._environment0$_forwardedModules; + if (t2 == null) + span = null; + else { + t2 = t2.$index(0, oldModule); + span = t2 == null ? null : t2.get$span(t2); + } + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, t1); + if (span != null) + t2.$indexSet(0, span, "original @forward"); + throw A.wrapException(A.MultiSpanSassScriptException$0("Two forwarded modules both define a " + type + " named " + $name + ".", "new @forward", t2)); + } + }, + importForwards$1(module) { + var forwardedModules, t1, t2, t3, t4, node, t5, t6, t7, t8, t9, t10, _i, t11, shadowed, t12, t13, _length, _list, _this = this, + forwarded = module._environment0$_environment._environment0$_forwardedModules; + if (forwarded == null) + return; + forwardedModules = _this._environment0$_forwardedModules; + if (forwardedModules != null) { + t1 = type$.Module_Callable_2; + t2 = type$.AstNode_2; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs0(forwarded, t1, t2), t1 = t1.get$iterator(t1), t2 = _this._environment0$_globalModules; t1.moveNext$0();) { + t4 = t1.get$current(t1); + module = t4._0; + node = t4._1; + if (!forwardedModules.containsKey$1(module) || !t2.containsKey$1(module)) + t3.$indexSet(0, module, node); + } + forwarded = t3; + } else + forwardedModules = _this._environment0$_forwardedModules = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.AstNode_2); + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t3 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t3.moveNext$0();) + for (t4 = t3.__js_helper$_current.get$variables(), t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4); t4.moveNext$0();) + t2.add$1(0, t4.get$current(t4)); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t4.moveNext$0();) { + t5 = t4.__js_helper$_current; + for (t5 = t5.get$functions(t5), t5 = t5.get$keys(t5), t5 = t5.get$iterator(t5); t5.moveNext$0();) + t3.add$1(0, t5.get$current(t5)); + } + t1 = A.LinkedHashSet_LinkedHashSet$_empty(t1); + for (t4 = new A.LinkedHashMapKeyIterator(forwarded, forwarded._modifications, forwarded._first); t4.moveNext$0();) + for (t5 = t4.__js_helper$_current.get$mixins(), t5 = t5.get$keys(t5), t5 = t5.get$iterator(t5); t5.moveNext$0();) + t1.add$1(0, t5.get$current(t5)); + t4 = _this._environment0$_variables; + t5 = t4.length; + if (t5 === 1) { + for (t5 = _this._environment0$_importedModules, t6 = type$.Module_Callable_2, t7 = type$.AstNode_2, t8 = A.MapExtensions_get_pairs0(t5, t6, t7).toList$0(0), t9 = t8.length, t10 = type$.Callable_2, _i = 0; _i < t8.length; t8.length === t9 || (0, A.throwConcurrentModificationError)(t8), ++_i) { + t11 = t8[_i]; + module = t11._0; + shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); + if (shadowed != null) { + t5.remove$1(0, module); + t12 = shadowed.variables; + t13 = false; + if (t12.get$isEmpty(t12)) { + t12 = shadowed.functions; + if (t12.get$isEmpty(t12)) { + t12 = shadowed.mixins; + if (t12.get$isEmpty(t12)) { + t12 = shadowed._shadowed_view0$_inner; + t12 = t12.get$css(t12); + t12 = J.get$isEmpty$asx(t12.get$children(t12)); + } else + t12 = t13; + } else + t12 = t13; + } else + t12 = t13; + if (!t12) + t5.$indexSet(0, shadowed, t11._1); + } + } + for (t6 = A.MapExtensions_get_pairs0(forwardedModules, t6, t7).toList$0(0), t7 = t6.length, _i = 0; _i < t6.length; t6.length === t7 || (0, A.throwConcurrentModificationError)(t6), ++_i) { + t8 = t6[_i]; + module = t8._0; + shadowed = A.ShadowedModuleView_ifNecessary0(module, t3, t1, t2, t10); + if (shadowed != null) { + forwardedModules.remove$1(0, module); + t9 = shadowed.variables; + t11 = false; + if (t9.get$isEmpty(t9)) { + t9 = shadowed.functions; + if (t9.get$isEmpty(t9)) { + t9 = shadowed.mixins; + if (t9.get$isEmpty(t9)) { + t9 = shadowed._shadowed_view0$_inner; + t9 = t9.get$css(t9); + t9 = J.get$isEmpty$asx(t9.get$children(t9)); + } else + t9 = t11; + } else + t9 = t11; + } else + t9 = t11; + if (!t9) + forwardedModules.$indexSet(0, shadowed, t8._1); + } + } + t5.addAll$1(0, forwarded); + forwardedModules.addAll$1(0, forwarded); + } else { + t6 = _this._environment0$_nestedForwardedModules; + if (t6 == null) { + _length = t5 - 1; + _list = J.JSArray_JSArray$allocateGrowable(_length, type$.List_Module_Callable_2); + for (t5 = type$.JSArray_Module_Callable_2, _i = 0; _i < _length; ++_i) + _list[_i] = A._setArrayType([], t5); + _this._environment0$_nestedForwardedModules = _list; + t5 = _list; + } else + t5 = t6; + B.JSArray_methods.addAll$1(B.JSArray_methods.get$last(t5), new A.LinkedHashMapKeysIterable(forwarded, A._instanceType(forwarded)._eval$1("LinkedHashMapKeysIterable<1>"))); + } + for (t2 = A._LinkedHashSetIterator$(t2, t2._collection$_modifications, t2.$ti._precomputed1), t5 = _this._environment0$_variableIndices, t6 = _this._environment0$_variableNodes, t7 = t2.$ti._precomputed1; t2.moveNext$0();) { + t8 = t2._collection$_current; + if (t8 == null) + t8 = t7._as(t8); + t5.remove$1(0, t8); + B.JSArray_methods.get$last(t4).remove$1(0, t8); + B.JSArray_methods.get$last(t6).remove$1(0, t8); + } + for (t2 = A._LinkedHashSetIterator$(t3, t3._collection$_modifications, t3.$ti._precomputed1), t3 = _this._environment0$_functionIndices, t4 = _this._environment0$_functions, t5 = t2.$ti._precomputed1; t2.moveNext$0();) { + t6 = t2._collection$_current; + if (t6 == null) + t6 = t5._as(t6); + t3.remove$1(0, t6); + B.JSArray_methods.get$last(t4).remove$1(0, t6); + } + for (t1 = A._LinkedHashSetIterator$(t1, t1._collection$_modifications, t1.$ti._precomputed1), t2 = _this._environment0$_mixinIndices, t3 = _this._environment0$_mixins, t4 = t1.$ti._precomputed1; t1.moveNext$0();) { + t5 = t1._collection$_current; + if (t5 == null) + t5 = t4._as(t5); + t2.remove$1(0, t5); + B.JSArray_methods.get$last(t3).remove$1(0, t5); + } + }, + getVariable$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$variables().$index(0, $name); + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + t1 = _this._environment0$_variables[t1].$index(0, $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + } + t1 = _this._environment0$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = _0_0; + t1 = _this._environment0$_variables[_0_0].$index(0, $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._environment0$_variableIndex$1($name); + if (_1_0 != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = _this._environment0$_variables[_1_0].$index(0, $name); + return t1 == null ? _this._environment0$_getVariableFromGlobalModule$1($name) : t1; + } else + return _this._environment0$_getVariableFromGlobalModule$1($name); + } + }, + getVariable$1($name) { + return this.getVariable$2$namespace($name, null); + }, + _environment0$_getVariableFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$3($name, "variable", new A.Environment__getVariableFromGlobalModule_closure0($name)); + }, + getVariableNode$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$variableNodes().$index(0, $name); + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + t1 = _this._environment0$_variableNodes[t1].$index(0, $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } + t1 = _this._environment0$_variableIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = _0_0; + t1 = _this._environment0$_variableNodes[_0_0].$index(0, $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._environment0$_variableIndex$1($name); + if (_1_0 != null) { + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = _1_0; + t1.$indexSet(0, $name, _1_0); + t1 = _this._environment0$_variableNodes[_1_0].$index(0, $name); + return t1 == null ? _this._environment0$_getVariableNodeFromGlobalModule$1($name) : t1; + } else + return _this._environment0$_getVariableNodeFromGlobalModule$1($name); + } + }, + _environment0$_getVariableNodeFromGlobalModule$1($name) { + var t1, t2, _0_0; + for (t1 = this._environment0$_importedModules, t2 = this._environment0$_globalModules, t2 = new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")).followedBy$1(0, new A.LinkedHashMapKeysIterable(t2, A._instanceType(t2)._eval$1("LinkedHashMapKeysIterable<1>"))), t2 = new A.FollowedByIterator(J.get$iterator$ax(t2.__internal$_first), t2._second); t2.moveNext$0();) { + t1 = t2._currentIterator; + _0_0 = t1.get$current(t1).get$variableNodes().$index(0, $name); + if (_0_0 != null) + return _0_0; + } + return null; + }, + globalVariableExists$2$namespace($name, namespace) { + if (namespace != null) + return this._environment0$_getModule$1(namespace).get$variables().containsKey$1($name); + if (B.JSArray_methods.get$first(this._environment0$_variables).containsKey$1($name)) + return true; + return this._environment0$_getVariableFromGlobalModule$1($name) != null; + }, + globalVariableExists$1($name) { + return this.globalVariableExists$2$namespace($name, null); + }, + _environment0$_variableIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_variables, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + setVariable$5$global$namespace($name, value, nodeWithSpan, global, namespace) { + var t1, moduleWithName, nestedForwardedModules, t2, t3, t4, t5, index, _this = this; + if (namespace != null) { + _this._environment0$_getModule$1(namespace).setVariable$3($name, value, nodeWithSpan); + return; + } + if (global || _this._environment0$_variables.length === 1) { + _this._environment0$_variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure2(_this, $name)); + t1 = _this._environment0$_variables; + if (!B.JSArray_methods.get$first(t1).containsKey$1($name)) { + moduleWithName = _this._environment0$_fromOneModule$3($name, "variable", new A.Environment_setVariable_closure3($name)); + if (moduleWithName != null) { + moduleWithName.setVariable$3($name, value, nodeWithSpan); + return; + } + } + B.JSArray_methods.get$first(t1).$indexSet(0, $name, value); + B.JSArray_methods.get$first(_this._environment0$_variableNodes).$indexSet(0, $name, nodeWithSpan); + return; + } + nestedForwardedModules = _this._environment0$_nestedForwardedModules; + if (nestedForwardedModules != null && !_this._environment0$_variableIndices.containsKey$1($name) && _this._environment0$_variableIndex$1($name) == null) + for (t1 = A._arrayInstanceType(nestedForwardedModules)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(nestedForwardedModules, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + if (t5 == null) + t5 = t4._as(t5); + if (t5.get$variables().containsKey$1($name)) { + t5.setVariable$3($name, value, nodeWithSpan); + return; + } + } + } + if (_this._environment0$_lastVariableName === $name) { + t1 = _this._environment0$_lastVariableIndex; + t1.toString; + index = t1; + } else + index = _this._environment0$_variableIndices.putIfAbsent$2($name, new A.Environment_setVariable_closure4(_this, $name)); + if (!_this._environment0$_inSemiGlobalScope && index === 0) { + index = _this._environment0$_variables.length - 1; + _this._environment0$_variableIndices.$indexSet(0, $name, index); + } + _this._environment0$_lastVariableName = $name; + _this._environment0$_lastVariableIndex = index; + _this._environment0$_variables[index].$indexSet(0, $name, value); + _this._environment0$_variableNodes[index].$indexSet(0, $name, nodeWithSpan); + }, + setVariable$4$global($name, value, nodeWithSpan, global) { + return this.setVariable$5$global$namespace($name, value, nodeWithSpan, global, null); + }, + setLocalVariable$3($name, value, nodeWithSpan) { + var index, _this = this, + t1 = _this._environment0$_variables, + t2 = t1.length; + _this._environment0$_lastVariableName = $name; + index = _this._environment0$_lastVariableIndex = t2 - 1; + _this._environment0$_variableIndices.$indexSet(0, $name, index); + t1[index].$indexSet(0, $name, value); + _this._environment0$_variableNodes[index].$indexSet(0, $name, nodeWithSpan); + }, + getFunction$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) { + t1 = _this._environment0$_getModule$1(namespace); + return t1.get$functions(t1).$index(0, $name); + } + t1 = _this._environment0$_functionIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = _this._environment0$_functions[_0_0].$index(0, $name); + return t1 == null ? _this._environment0$_getFunctionFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._environment0$_functionIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = _this._environment0$_functions[_1_0].$index(0, $name); + return t1 == null ? _this._environment0$_getFunctionFromGlobalModule$1($name) : t1; + } else + return _this._environment0$_getFunctionFromGlobalModule$1($name); + } + }, + getFunction$1($name) { + return this.getFunction$2$namespace($name, null); + }, + _environment0$_getFunctionFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$3($name, "function", new A.Environment__getFunctionFromGlobalModule_closure0($name)); + }, + _environment0$_functionIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_functions, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + getMixin$2$namespace($name, namespace) { + var t1, _0_0, _1_0, _this = this; + if (namespace != null) + return _this._environment0$_getModule$1(namespace).get$mixins().$index(0, $name); + t1 = _this._environment0$_mixinIndices; + _0_0 = t1.$index(0, $name); + if (_0_0 != null) { + t1 = _this._environment0$_mixins[_0_0].$index(0, $name); + return t1 == null ? _this._environment0$_getMixinFromGlobalModule$1($name) : t1; + } else { + _1_0 = _this._environment0$_mixinIndex$1($name); + if (_1_0 != null) { + t1.$indexSet(0, $name, _1_0); + t1 = _this._environment0$_mixins[_1_0].$index(0, $name); + return t1 == null ? _this._environment0$_getMixinFromGlobalModule$1($name) : t1; + } else + return _this._environment0$_getMixinFromGlobalModule$1($name); + } + }, + _environment0$_getMixinFromGlobalModule$1($name) { + return this._environment0$_fromOneModule$3($name, "mixin", new A.Environment__getMixinFromGlobalModule_closure0($name)); + }, + _environment0$_mixinIndex$1($name) { + var t1, i; + for (t1 = this._environment0$_mixins, i = t1.length - 1; i >= 0; --i) + if (t1[i].containsKey$1($name)) + return i; + return null; + }, + withContent$2($content, callback) { + var oldContent = this._environment0$_content; + this._environment0$_content = $content; + callback.call$0(); + this._environment0$_content = oldContent; + }, + asMixin$1(callback) { + var oldInMixin = this._environment0$_inMixin; + this._environment0$_inMixin = true; + callback.call$0(); + this._environment0$_inMixin = oldInMixin; + }, + scope$1$3$semiGlobal$when(callback, semiGlobal, when) { + var wasInSemiGlobalScope, $name, name0, name1, t1, t2, t3, t4, t5, t6, _this = this; + semiGlobal = semiGlobal && _this._environment0$_inSemiGlobalScope; + wasInSemiGlobalScope = _this._environment0$_inSemiGlobalScope; + _this._environment0$_inSemiGlobalScope = semiGlobal; + if (!when) + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + } + t1 = _this._environment0$_variables; + t2 = type$.String; + B.JSArray_methods.add$1(t1, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.Value_2)); + t3 = _this._environment0$_variableNodes; + B.JSArray_methods.add$1(t3, A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.AstNode_2)); + t4 = _this._environment0$_functions; + t5 = type$.Callable_2; + B.JSArray_methods.add$1(t4, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t6 = _this._environment0$_mixins; + B.JSArray_methods.add$1(t6, A.LinkedHashMap_LinkedHashMap$_empty(t2, t5)); + t5 = _this._environment0$_nestedForwardedModules; + if (t5 != null) + t5.push(A._setArrayType([], type$.JSArray_Module_Callable_2)); + try { + t2 = callback.call$0(); + return t2; + } finally { + _this._environment0$_inSemiGlobalScope = wasInSemiGlobalScope; + _this._environment0$_lastVariableIndex = _this._environment0$_lastVariableName = null; + for (t1 = B.JSArray_methods.removeLast$0(t1), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = _this._environment0$_variableIndices; t1.moveNext$0();) { + $name = t1.get$current(t1); + t2.remove$1(0, $name); + } + B.JSArray_methods.removeLast$0(t3); + for (t1 = B.JSArray_methods.removeLast$0(t4), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = _this._environment0$_functionIndices; t1.moveNext$0();) { + name0 = t1.get$current(t1); + t2.remove$1(0, name0); + } + for (t1 = B.JSArray_methods.removeLast$0(t6), t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1), t2 = _this._environment0$_mixinIndices; t1.moveNext$0();) { + name1 = t1.get$current(t1); + t2.remove$1(0, name1); + } + t1 = _this._environment0$_nestedForwardedModules; + if (t1 != null) + t1.pop(); + } + }, + scope$1$1(callback) { + return this.scope$1$3$semiGlobal$when(callback, false, true); + }, + scope$1$2$when(callback, when) { + return this.scope$1$3$semiGlobal$when(callback, false, when); + }, + scope$1$2$semiGlobal(callback, semiGlobal) { + return this.scope$1$3$semiGlobal$when(callback, semiGlobal, true); + }, + toImplicitConfiguration$0() { + var t2, t3, t4, t5, t6, i, modules, t7, t8, t9, t10, $name, value, values, nodes, _this = this, _null = null, + t1 = type$.String, + configuration = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.ConfiguredValue_2); + for (t2 = _this._environment0$_variables, t3 = type$.Value_2, t4 = _this._environment0$_variableNodes, t5 = _this._environment0$_importedModules, t6 = A._instanceType(t5)._eval$1("LinkedHashMapKeysIterable<1>"), i = 0; i < t2.length; ++i) { + if (i === 0) + modules = new A.LinkedHashMapKeysIterable(t5, t6); + else { + t7 = _this._environment0$_nestedForwardedModules; + modules = t7 == null ? _null : t7[i - 1]; + } + t7 = J.get$iterator$ax(modules == null ? B.List_empty25 : modules); + while (t7.moveNext$0()) { + t8 = t7.get$current(t7); + for (t9 = A.MapExtensions_get_pairs0(t8.get$variables(), t1, t3), t9 = t9.get$iterator(t9); t9.moveNext$0();) { + t10 = t9.get$current(t9); + $name = t10._0; + value = t10._1; + t10 = t8.get$variableNodes().$index(0, $name); + t10.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue0(value, _null, t10)); + } + } + values = t2[i]; + nodes = t4[i]; + for (t7 = A.MapExtensions_get_pairs0(values, t1, t3), t7 = t7.get$iterator(t7); t7.moveNext$0();) { + t8 = t7.get$current(t7); + $name = t8._0; + value = t8._1; + t8 = nodes.$index(0, $name); + t8.toString; + configuration.$indexSet(0, $name, new A.ConfiguredValue0(value, _null, t8)); + } + } + return new A.Configuration0(configuration, _null); + }, + toModule$3(css, preModuleComments, extensionStore) { + return A._EnvironmentModule__EnvironmentModule1(this, css, preModuleComments, extensionStore, A.NullableExtension_andThen0(this._environment0$_forwardedModules, new A.Environment_toModule_closure0())); + }, + toDummyModule$0() { + return A._EnvironmentModule__EnvironmentModule1(this, new A.CssStylesheet0(new A.UnmodifiableListView(B.List_empty20, type$.UnmodifiableListView_CssNode_2), A.SourceFile$decoded(B.List_empty4, "").span$1(0, 0)), B.Map_empty10, B.C_EmptyExtensionStore0, A.NullableExtension_andThen0(this._environment0$_forwardedModules, new A.Environment_toDummyModule_closure0())); + }, + _environment0$_getModule$1(namespace) { + var _0_0 = this._environment0$_modules.$index(0, namespace); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0('There is no module with the namespace "' + namespace + '".', null)); + }, + _environment0$_fromOneModule$1$3($name, type, callback) { + var t1, t2, t3, t4, t5, _1_0, _2_0, value, identity, valueInModule, identityFromModule, module, node, + _0_0 = this._environment0$_nestedForwardedModules; + if (_0_0 != null) + for (t1 = A._arrayInstanceType(_0_0)._eval$1("ReversedListIterable<1>"), t2 = new A.ReversedListIterable(_0_0, t1), t2 = new A.ListIterator(t2, t2.get$length(0), t1._eval$1("ListIterator")), t1 = t1._eval$1("ListIterable.E"); t2.moveNext$0();) { + t3 = t2.__internal$_current; + for (t3 = J.get$reversed$ax(t3 == null ? t1._as(t3) : t3), t4 = t3.$ti, t3 = new A.ListIterator(t3, t3.get$length(0), t4._eval$1("ListIterator")), t4 = t4._eval$1("ListIterable.E"); t3.moveNext$0();) { + t5 = t3.__internal$_current; + _1_0 = callback.call$1(t5 == null ? t4._as(t5) : t5); + if (_1_0 != null) + return _1_0; + } + } + for (t1 = this._environment0$_importedModules, t1 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first); t1.moveNext$0();) { + _2_0 = callback.call$1(t1.__js_helper$_current); + if (_2_0 != null) + return _2_0; + } + for (t1 = this._environment0$_globalModules, t2 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first), t3 = type$.Callable_2, value = null, identity = null; t2.moveNext$0();) { + t4 = t2.__js_helper$_current; + valueInModule = callback.call$1(t4); + if (valueInModule == null) + continue; + identityFromModule = t3._is(valueInModule) ? valueInModule : t4.variableIdentity$1($name); + if (identityFromModule.$eq(0, identity)) + continue; + if (value != null) { + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + for (t3 = A.MapExtensions_get_pairs0(t1, type$.Module_Callable_2, type$.AstNode_2), t3 = t3.get$iterator(t3), t4 = "includes " + type; t3.moveNext$0();) { + t1 = t3.get$current(t3); + module = t1._0; + node = t1._1; + if (callback.call$1(module) != null) + t2.$indexSet(0, node.get$span(node), t4); + } + throw A.wrapException(A.MultiSpanSassScriptException$0("This " + type + string$.x20is_av, type + " use", t2)); + } + identity = identityFromModule; + value = valueInModule; + } + return value; + }, + _environment0$_fromOneModule$3($name, type, callback) { + return this._environment0$_fromOneModule$1$3($name, type, callback, type$.dynamic); + } + }; + A.Environment__getVariableFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$variables().$index(0, this.name); + }, + $signature: 447 + }; + A.Environment_setVariable_closure2.prototype = { + call$0() { + var t1 = this.$this; + t1._environment0$_lastVariableName = this.name; + return t1._environment0$_lastVariableIndex = 0; + }, + $signature: 10 + }; + A.Environment_setVariable_closure3.prototype = { + call$1(module) { + return module.get$variables().containsKey$1(this.name) ? module : null; + }, + $signature: 448 + }; + A.Environment_setVariable_closure4.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._environment0$_variableIndex$1(this.name); + return t2 == null ? t1._environment0$_variables.length - 1 : t2; + }, + $signature: 10 + }; + A.Environment__getFunctionFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$functions(module).$index(0, this.name); + }, + $signature: 237 + }; + A.Environment__getMixinFromGlobalModule_closure0.prototype = { + call$1(module) { + return module.get$mixins().$index(0, this.name); + }, + $signature: 237 + }; + A.Environment_toModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable_2); + }, + $signature: 238 + }; + A.Environment_toDummyModule_closure0.prototype = { + call$1(modules) { + return new A.MapKeySet(modules, type$.MapKeySet_Module_Callable_2); + }, + $signature: 238 + }; + A._EnvironmentModule1.prototype = { + get$url(_) { + var t1 = this.css; + t1 = t1.get$span(t1); + return t1.get$sourceUrl(t1); + }, + setVariable$3($name, value, nodeWithSpan) { + var t1, t2, + _0_0 = this._environment0$_modulesByVariable.$index(0, $name); + if (_0_0 != null) { + _0_0.setVariable$3($name, value, nodeWithSpan); + return; + } + t1 = this._environment0$_environment; + t2 = t1._environment0$_variables; + if (!B.JSArray_methods.get$first(t2).containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + B.JSArray_methods.get$first(t2).$indexSet(0, $name, value); + B.JSArray_methods.get$first(t1._environment0$_variableNodes).$indexSet(0, $name, nodeWithSpan); + return; + }, + variableIdentity$1($name) { + var module = this._environment0$_modulesByVariable.$index(0, $name); + return module == null ? this : module.variableIdentity$1($name); + }, + couldHaveBeenConfigured$1(variables) { + var t2, t3, _0_0, variable, module, + t1 = this._environment0$_environment._environment0$_configurableVariables; + if (!(variables.get$length(variables) < t1.get$length(t1) ? variables.any$1(0, t1.get$contains(t1)) : t1.any$1(0, variables.get$contains(variables)))) { + t1 = this._environment0$_modulesByVariable; + t2 = type$.Module_Callable_2; + if (variables.get$length(variables) < t1.get$length(t1)) { + t2 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + for (t3 = variables.get$iterator(variables); t3.moveNext$0();) { + _0_0 = t1.$index(0, t3.get$current(t3)); + if (_0_0 != null) + t2.add$1(0, _0_0); + } + t1 = t2; + } else { + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t2); + for (t1 = A.MapExtensions_get_pairs0(t1, type$.String, t2), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + variable = t2._0; + module = t2._1; + if (variables.contains$1(0, variable)) + t3.add$1(0, module); + } + t1 = t3; + } + t1 = t1.any$1(0, new A._EnvironmentModule_couldHaveBeenConfigured_closure1(variables)); + } else + t1 = true; + return t1; + }, + cloneCss$0() { + var _0_0, _this = this; + if (!_this.transitivelyContainsCss) + return _this; + _0_0 = A.cloneCssStylesheet0(_this.css, _this.extensionStore); + return A._EnvironmentModule$_1(_this._environment0$_environment, _0_0._0, _this.preModuleComments, _0_0._1, _this._environment0$_modulesByVariable, _this.variables, _this.variableNodes, _this.functions, _this.mixins, true, _this.transitivelyContainsExtensions); + }, + toString$0(_) { + var t1 = this.css, + t2 = t1.get$span(t1); + if (t2.get$sourceUrl(t2) == null) + t1 = ""; + else { + t1 = t1.get$span(t1); + t1 = t1.get$sourceUrl(t1); + t2 = $.$get$context(); + t1.toString; + t1 = t2.prettyUri$1(t1); + } + return t1; + }, + $isModule1: 1, + get$upstream() { + return this.upstream; + }, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + }, + get$extensionStore() { + return this.extensionStore; + }, + get$css(receiver) { + return this.css; + }, + get$preModuleComments() { + return this.preModuleComments; + }, + get$transitivelyContainsCss() { + return this.transitivelyContainsCss; + }, + get$transitivelyContainsExtensions() { + return this.transitivelyContainsExtensions; + } + }; + A._EnvironmentModule__EnvironmentModule_closure11.prototype = { + call$1(module) { + return module.get$variables(); + }, + $signature: 451 + }; + A._EnvironmentModule__EnvironmentModule_closure12.prototype = { + call$1(module) { + return module.get$variableNodes(); + }, + $signature: 452 + }; + A._EnvironmentModule__EnvironmentModule_closure13.prototype = { + call$1(module) { + return module.get$functions(module); + }, + $signature: 239 + }; + A._EnvironmentModule__EnvironmentModule_closure14.prototype = { + call$1(module) { + return module.get$mixins(); + }, + $signature: 239 + }; + A._EnvironmentModule__EnvironmentModule_closure15.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 85 + }; + A._EnvironmentModule__EnvironmentModule_closure16.prototype = { + call$1(module) { + return module.get$transitivelyContainsExtensions(); + }, + $signature: 85 + }; + A._EnvironmentModule_couldHaveBeenConfigured_closure1.prototype = { + call$1(module) { + return module.couldHaveBeenConfigured$1(this.variables); + }, + $signature: 85 + }; + A.ErrorRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitErrorRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@error " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A._EvaluateVisitor1.prototype = { + get$_evaluate0$_hasCssNesting() { + var _0_0, t1, grandparent, + $parent = this._evaluate0$_atRootExcludingStyleRule ? null : this._evaluate0$_styleRuleIgnoringAtRoot; + for (;; $parent = grandparent) { + _0_0 = $parent == null ? null : $parent._node$_parent; + if (_0_0 instanceof A.ModifiableCssStyleRule0) + return true; + t1 = _0_0 != null; + grandparent = t1 ? _0_0 : null; + if (t1) + continue; + return false; + } + }, + _EvaluateVisitor$6$functions$importCache$logger$nodeImporter$quietDeps$sourceMap1(functions, importCache, logger, nodeImporter, quietDeps, sourceMap) { + var t2, metaModule, t3, _i, module, $function, t4, _this = this, + _s20_ = "$name, $module: null", + _s9_ = "sass:meta", + _s7_ = "$module", + t1 = type$.JSArray_BuiltInCallable_2, + metaFunctions = A._setArrayType([A.BuiltInCallable$function0("global-variable-exists", _s20_, new A._EvaluateVisitor_closure25(_this), _s9_), A.BuiltInCallable$function0("variable-exists", "$name", new A._EvaluateVisitor_closure26(_this), _s9_), A.BuiltInCallable$function0("function-exists", _s20_, new A._EvaluateVisitor_closure27(_this), _s9_), A.BuiltInCallable$function0("mixin-exists", _s20_, new A._EvaluateVisitor_closure28(_this), _s9_), A.BuiltInCallable$function0("content-exists", "", new A._EvaluateVisitor_closure29(_this), _s9_), A.BuiltInCallable$function0("module-variables", _s7_, new A._EvaluateVisitor_closure30(_this), _s9_), A.BuiltInCallable$function0("module-functions", _s7_, new A._EvaluateVisitor_closure31(_this), _s9_), A.BuiltInCallable$function0("module-mixins", _s7_, new A._EvaluateVisitor_closure32(_this), _s9_), A.BuiltInCallable$function0("get-function", "$name, $css: false, $module: null", new A._EvaluateVisitor_closure33(_this), _s9_), A.BuiltInCallable$function0("get-mixin", _s20_, new A._EvaluateVisitor_closure34(_this), _s9_), A.BuiltInCallable$function0("call", "$function, $args...", new A._EvaluateVisitor_closure35(_this), _s9_)], t1), + metaMixins = A._setArrayType([A.BuiltInCallable$mixin0("load-css", "$url, $with: null", new A._EvaluateVisitor_closure36(_this), false, _s9_), A.BuiltInCallable$mixin0("apply", "$mixin, $args...", new A._EvaluateVisitor_closure37(_this), true, _s9_)], t1); + t1 = type$.BuiltInCallable_2; + t2 = A.List_List$_of($.$get$moduleFunctions0(), t1); + B.JSArray_methods.addAll$1(t2, metaFunctions); + metaModule = A.BuiltInModule$0("meta", t2, metaMixins, null, t1); + t1 = A.List_List$_of($.$get$coreModules0(), type$.BuiltInModule_Callable_2); + t1.push(metaModule); + t2 = t1.length; + t3 = _this._evaluate0$_builtInModules; + _i = 0; + for (; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + module = t1[_i]; + t3.$indexSet(0, module.url, module); + } + t1 = type$.JSArray_Callable_2; + t2 = A._setArrayType([], t1); + B.JSArray_methods.addAll$1(t2, functions); + B.JSArray_methods.addAll$1(t2, $.$get$globalFunctions0()); + t1 = A._setArrayType([], t1); + for (_i = 0; _i < 11; ++_i) + t1.push(metaFunctions[_i].withDeprecationWarning$1("meta")); + B.JSArray_methods.addAll$1(t2, t1); + for (t1 = t2.length, t3 = _this._evaluate0$_builtInFunctions, _i = 0; _i < t2.length; t2.length === t1 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $function = t2[_i]; + t4 = $function.get$name($function); + t3.$indexSet(0, A.stringReplaceAllUnchecked(t4, "_", "-"), $function); + } + }, + run$2(_, importer, node) { + var error, stackTrace, t1, exception; + try { + t1 = type$.nullable_Object; + t1 = A.runZoned(new A._EvaluateVisitor_run_closure1(this, node, importer), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__evaluationContext, new A._EvaluationContext1(this, node)], t1, t1), type$.Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(error.withLoadedUrls$1(this._evaluate0$_loadedUrls), error, stackTrace); + } else + throw exception; + } + }, + _evaluate0$_assertInModule$1$2(value, $name) { + if (value != null) + return value; + throw A.wrapException(A.StateError$("Can't access " + $name + " outside of a module.")); + }, + _evaluate0$_assertInModule$2(value, $name) { + return this._evaluate0$_assertInModule$1$2(value, $name, type$.dynamic); + }, + _evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, baseUrl, configuration, namesInErrors) { + var t2, _this = this, + _0_0 = _this._evaluate0$_builtInModules.$index(0, url), + t1 = {}; + t1.builtInModule = null; + if (_0_0 != null) { + t1.builtInModule = _0_0; + if (configuration instanceof A.ExplicitConfiguration0) { + t1 = namesInErrors ? "Built-in module " + url.toString$0(0) + " can't be configured." : "Built-in modules can't be configured."; + t2 = configuration.nodeWithSpan; + throw A.wrapException(_this._evaluate0$_exception$2(t1, t2.get$span(t2))); + } + _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__loadModule_closure3(t1, callback)); + return; + } + _this._evaluate0$_withStackFrame$3(stackFrame, nodeWithSpan, new A._EvaluateVisitor__loadModule_closure4(_this, url, nodeWithSpan, baseUrl, namesInErrors, configuration, callback)); + }, + _evaluate0$_loadModule$5$configuration(url, stackFrame, nodeWithSpan, callback, configuration) { + return this._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, configuration, false); + }, + _evaluate0$_loadModule$4(url, stackFrame, nodeWithSpan, callback) { + return this._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, stackFrame, nodeWithSpan, callback, null, null, false); + }, + _evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, configuration, namesInErrors, nodeWithSpan) { + var currentConfiguration, t2, _0_0, t3, message, existingSpan, configurationSpan, environment, css, preModuleComments, extensionStore, module, _this = this, + t1 = stylesheet.span, + url = t1.get$sourceUrl(t1); + t1 = configuration == null; + currentConfiguration = t1 ? _this._evaluate0$_configuration : configuration; + t2 = _this._evaluate0$_modules; + _0_0 = t2.$index(0, url); + if (_0_0 != null) { + t2 = _this._evaluate0$_moduleConfigurations.$index(0, url); + t3 = t2._configuration0$__originalConfiguration; + t2 = t3 == null ? t2 : t3; + t3 = currentConfiguration._configuration0$__originalConfiguration; + if (t2 !== (t3 == null ? currentConfiguration : t3) && currentConfiguration instanceof A.ExplicitConfiguration0 && _0_0.couldHaveBeenConfigured$1(new A.MapKeySet(new A.UnmodifiableMapView(currentConfiguration._configuration0$_values, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.MapKeySet_String))) { + if (namesInErrors) { + t2 = $.$get$context(); + url.toString; + message = t2.prettyUri$1(url) + string$.x20was_a; + } else + message = string$.This_mw; + t2 = _this._evaluate0$_moduleNodes.$index(0, url); + existingSpan = t2 == null ? null : t2.get$span(t2); + if (t1) { + t1 = currentConfiguration.nodeWithSpan; + configurationSpan = t1.get$span(t1); + } else + configurationSpan = null; + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (existingSpan != null) + t1.$indexSet(0, existingSpan, "original load"); + if (configurationSpan != null) + t1.$indexSet(0, configurationSpan, "configuration"); + throw A.wrapException(t1.get$isEmpty(0) ? _this._evaluate0$_exception$1(message) : _this._evaluate0$_multiSpanException$3(message, "new load", t1)); + } + return _0_0; + } + environment = A.Environment$0(); + css = A._Cell$(); + preModuleComments = A._Cell$(); + extensionStore = A.ExtensionStore$0(); + _this._evaluate0$_withEnvironment$2(environment, new A._EvaluateVisitor__execute_closure1(_this, importer, stylesheet, extensionStore, configuration, css, preModuleComments)); + t1 = css._readLocal$0(); + t3 = preModuleComments._readLocal$0(); + module = environment.toModule$3(t1, t3 == null ? B.Map_empty10 : t3, extensionStore); + if (url != null) { + t2.$indexSet(0, url, module); + _this._evaluate0$_moduleConfigurations.$indexSet(0, url, currentConfiguration); + if (nodeWithSpan != null) + _this._evaluate0$_moduleNodes.$indexSet(0, url, nodeWithSpan); + } + return module; + }, + _evaluate0$_execute$2(importer, stylesheet) { + return this._evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, null, false, null); + }, + _evaluate0$_addOutOfOrderImports$0() { + var t1, t2, _this = this, _s5_ = "_root", + _s13_ = "_endOfImports", + _0_0 = _this._evaluate0$_outOfOrderImports; + $label0$0: { + if (_0_0 == null) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + break $label0$0; + } + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + t1 = A.List_List$_of(A.SubListIterable$(t1, 0, A.checkNotNullable(_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_), "count", type$.int), t1.$ti._eval$1("ListBase.E")), type$.ModifiableCssNode_2); + B.JSArray_methods.addAll$1(t1, _0_0); + t2 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children; + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(t2, _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_), null, t2.$ti._eval$1("ListBase.E"))); + break $label0$0; + } + return t1; + }, + _evaluate0$_combineCss$2$clone(root, clone) { + var selectors, _0_0, t1, imports, css, sorted, t2; + if (!B.JSArray_methods.any$1(root.get$upstream(), new A._EvaluateVisitor__combineCss_closure3())) { + selectors = root.get$extensionStore().get$simpleSelectors(); + _0_0 = A.IterableExtension_get_firstOrNull(root.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__combineCss_closure4(selectors))); + if (_0_0 != null) + this._evaluate0$_throwForUnsatisfiedExtension$1(_0_0); + return root.get$css(root); + } + t1 = type$.JSArray_CssNode_2; + imports = A._setArrayType([], t1); + css = A._setArrayType([], t1); + t1 = type$.Module_Callable_2; + sorted = A.ListQueue$(t1); + new A._EvaluateVisitor__combineCss_visitModule1(this, A.LinkedHashSet_LinkedHashSet$_empty(t1), clone, css, imports, sorted).call$1(root); + if (root.get$transitivelyContainsExtensions()) + this._evaluate0$_extendModules$1(sorted); + t1 = B.JSArray_methods.$add(imports, css); + t2 = root.get$css(root); + return new A.CssStylesheet0(new A.UnmodifiableListView(t1, type$.UnmodifiableListView_CssNode_2), t2.get$span(t2)); + }, + _evaluate0$_combineCss$1(root) { + return this._evaluate0$_combineCss$2$clone(root, false); + }, + _evaluate0$_extendModules$1(sortedModules) { + var t1, t2, t3, originalSelectors, $self, t4, t5, _i, upstream, _0_0, + downstreamExtensionStores = A.LinkedHashMap_LinkedHashMap$_empty(type$.Uri, type$.List_ExtensionStore_2), + unsatisfiedExtensions = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_Extension_2); + for (t1 = A._ListQueueIterator$(sortedModules, sortedModules.$ti._precomputed1), t2 = t1.$ti._precomputed1; t1.moveNext$0();) { + t3 = t1._collection$_current; + if (t3 == null) + t3 = t2._as(t3); + originalSelectors = t3.get$extensionStore().get$simpleSelectors().toSet$0(0); + unsatisfiedExtensions.addAll$1(0, t3.get$extensionStore().extensionsWhereTarget$1(new A._EvaluateVisitor__extendModules_closure3(originalSelectors))); + $self = downstreamExtensionStores.$index(0, t3.get$url(t3)); + t4 = t3.get$extensionStore().get$addExtensions(); + if ($self != null) + t4.call$1($self); + t4 = t3.get$extensionStore(); + if (t4.get$isEmpty(t4)) + continue; + for (t4 = t3.get$upstream(), t5 = t4.length, _i = 0; _i < t4.length; t4.length === t5 || (0, A.throwConcurrentModificationError)(t4), ++_i) { + upstream = t4[_i]; + _0_0 = upstream.get$url(upstream); + if (_0_0 != null) + J.add$1$ax(downstreamExtensionStores.putIfAbsent$2(_0_0, new A._EvaluateVisitor__extendModules_closure4()), t3.get$extensionStore()); + } + unsatisfiedExtensions.removeAll$1(t3.get$extensionStore().extensionsWhereTarget$1(originalSelectors.get$contains(originalSelectors))); + } + if (unsatisfiedExtensions._collection$_length !== 0) + this._evaluate0$_throwForUnsatisfiedExtension$1(unsatisfiedExtensions.get$first(0)); + }, + _evaluate0$_throwForUnsatisfiedExtension$1(extension) { + throw A.wrapException(A.SassException$0(string$.The_ta + extension.target.toString$0(0) + ' !optional" to avoid this error.', extension.span, null)); + }, + _evaluate0$_indexAfterImports$1(statements) { + var t1, lastImport, i, _0_0; + for (t1 = J.getInterceptor$asx(statements), lastImport = -1, i = 0; i < t1.get$length(statements); ++i) { + $label0$0: { + _0_0 = t1.$index(statements, i); + if (_0_0 instanceof A.ModifiableCssImport0) + break $label0$0; + if (_0_0 instanceof A.ModifiableCssComment0) + continue; + break; + } + lastImport = i; + } + return lastImport + 1; + }, + visitStylesheet$1(_, node) { + var t1, t2, warning, _i, $name, span; + for (t1 = node.parseTimeWarnings, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + warning = t1.__internal$_current; + if (warning == null) + warning = t2._as(warning); + this._evaluate0$_warn$3(warning._1, warning._2, warning._0); + } + for (t1 = node.children, t2 = t1.length, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(this); + for (t1 = A.MapExtensions_get_pairs0(node.globalVariables, type$.String, type$.FileSpan), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + $name = t2._0; + span = t2._1; + this.visitVariableDeclaration$1(0, new A.VariableDeclaration0(null, $name, new A.NullExpression0(span), true, false, span)); + } + return null; + }, + visitAtRootRule$1(_, node) { + var t1, _2_0, root, first, rest, innerCopy, outerCopy, _i, copy, _this = this, _null = null, + _s8_ = "__parent", + _0_0 = node.query, + query = _0_0 != null ? new A.AtRootQueryParser0(A.SpanScanner$(_this._evaluate0$_performInterpolationWithMap$2$warnForColor(_0_0, true)._0, _null), _null).parse$0(0) : B.AtRootQuery_bfj0, + $parent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_), + included = A._setArrayType([], type$.JSArray_ModifiableCssParentNode_2); + for (t1 = type$.CssStylesheet_2; !t1._is($parent); $parent = _2_0) { + if (!query.excludes$1($parent)) + included.push($parent); + _2_0 = $parent._node$_parent; + if (_2_0 == null) + throw A.wrapException(A.StateError$(string$.CssNod)); + } + root = _this._evaluate0$_trimIncluded$1(included); + if (root === _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)) { + _this._evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitAtRootRule_closure3(_this, node), node.hasDeclarations, type$.Null); + return _null; + } + if (included.length >= 1) { + first = included[0]; + rest = B.JSArray_methods.sublist$1(included, 1); + innerCopy = first.copyWithoutChildren$0(); + for (t1 = rest.length, outerCopy = innerCopy, _i = 0; _i < rest.length; rest.length === t1 || (0, A.throwConcurrentModificationError)(rest), ++_i, outerCopy = copy) { + copy = rest[_i].copyWithoutChildren$0(); + copy.addChild$1(outerCopy); + } + root.addChild$1(outerCopy); + } else + innerCopy = root; + _this._evaluate0$_scopeForAtRoot$4(node, innerCopy, query, included).call$1(new A._EvaluateVisitor_visitAtRootRule_closure4(_this, node)); + return _null; + }, + _evaluate0$_trimIncluded$1(nodes) { + var $parent, t1, innermostContiguous, i, t2, _0_0, _1_0, root, _this = this, _null = null, _s5_ = "_root", + _s22_ = " to be an ancestor of "; + if (nodes.length === 0) + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + $parent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); + for (t1 = nodes.length, innermostContiguous = _null, i = 0; i < t1; ++i, $parent = _1_0) { + for (; t2 = nodes[i], $parent !== t2; innermostContiguous = _null, $parent = _0_0) { + _0_0 = $parent._node$_parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if (innermostContiguous == null) + innermostContiguous = i; + _1_0 = $parent._node$_parent; + if (_1_0 == null) + throw A.wrapException(A.ArgumentError$("Expected " + t2.toString$0(0) + _s22_ + _this.toString$0(0) + ".", _null)); + } + if ($parent !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + innermostContiguous.toString; + root = nodes[innermostContiguous]; + B.JSArray_methods.removeRange$2(nodes, innermostContiguous, nodes.length); + return root; + }, + _evaluate0$_scopeForAtRoot$4(node, newParent, query, included) { + var _this = this, + scope = new A._EvaluateVisitor__scopeForAtRoot_closure11(_this, newParent, node), + t1 = query._at_root_query0$_all || query._at_root_query0$_rule; + if (t1 !== query.include) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure12(_this, scope); + if (_this._evaluate0$_mediaQueries != null && query.excludesName$1("media")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure13(_this, scope); + if (_this._evaluate0$_inKeyframes && query.excludesName$1("keyframes")) + scope = new A._EvaluateVisitor__scopeForAtRoot_closure14(_this, scope); + return _this._evaluate0$_inUnknownAtRule && !B.JSArray_methods.any$1(included, new A._EvaluateVisitor__scopeForAtRoot_closure15()) ? new A._EvaluateVisitor__scopeForAtRoot_closure16(_this, scope) : scope; + }, + visitContentBlock$1(_, node) { + return A.throwExpression(A.UnsupportedError$(string$.Evalua)); + }, + visitContentRule$1(_, node) { + var $content = this._evaluate0$_environment._environment0$_content; + if ($content == null) + return null; + this._evaluate0$_runUserDefinedCallable$1$4(node.$arguments, $content, node, new A._EvaluateVisitor_visitContentRule_closure1(this, $content), type$.Null); + return null; + }, + visitDebugRule$1(_, node) { + var value = node.expression.accept$1(this), + t1 = value instanceof A.SassString0 ? value._string0$_text : A.serializeValue0(value, true, true); + this._evaluate0$_logger.debug$2(0, t1, node.span); + return null; + }, + visitDeclaration$1(_, node) { + var t1, $name, _0_0, _1_0, value, t2, t3, _2_0, oldDeclarationName, _this = this, _null = null; + if ((_this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot) == null && !_this._evaluate0$_inUnknownAtRule && !_this._evaluate0$_inKeyframes) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Declarm, node.span)); + if (_this._evaluate0$_declarationName != null && !node.parsedAsSassScript) { + t1 = B.JSString_methods.startsWith$1(node.name.get$initialPlain(), "--") ? string$.Declarw : string$.Declarp; + throw A.wrapException(_this._evaluate0$_exception$2(t1, node.span)); + } + $name = _this._evaluate0$_interpolationToValue$2$warnForColor(node.name, true); + _0_0 = _this._evaluate0$_declarationName; + if (_0_0 != null) + $name = new A.CssValue0(_0_0 + "-" + $name.value, $name.span, type$.CssValue_String_2); + _1_0 = node.value; + if (_1_0 != null) { + value = _1_0.accept$1(_this); + if (!value.get$isBlank() || value.get$asList().length === 0 || B.JSString_methods.startsWith$1($name.value, "--")) { + _this._evaluate0$_copyParentAfterSibling$0(); + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); + t2 = _1_0.get$span(_1_0); + if (_this._evaluate0$_sourceMap) { + t3 = A.NullableExtension_andThen0(_1_0, _this.get$_evaluate0$_expressionNode()); + t3 = t3 == null ? _null : J.get$span$x(t3); + } else + t3 = _null; + t1.addChild$1(A.ModifiableCssDeclaration$0($name, new A.CssValue0(value, t2, type$.CssValue_Value_2), node.span, node.parsedAsSassScript, t3)); + } + } + _2_0 = node.children; + t1 = {}; + t1.children = null; + if (_2_0 != null) { + t1.children = _2_0; + oldDeclarationName = _this._evaluate0$_declarationName; + _this._evaluate0$_declarationName = $name.value; + _this._evaluate0$_environment.scope$1$2$when(new A._EvaluateVisitor_visitDeclaration_closure1(t1, _this), node.hasDeclarations, type$.Null); + _this._evaluate0$_declarationName = oldDeclarationName; + } + return _null; + }, + visitEachRule$1(_, node) { + var _this = this, + t1 = node.list, + list = t1.accept$1(_this), + nodeWithSpan = _this._evaluate0$_expressionNode$1(t1), + _0_0 = node.variables; + $label0$0: { + t1 = {}; + t1.variable = null; + if (_0_0.length === 1) { + t1.variable = _0_0[0]; + t1 = new A._EvaluateVisitor_visitEachRule_closure5(t1, _this, nodeWithSpan); + break $label0$0; + } + t1 = {}; + t1.variables = null; + t1.variables = _0_0; + t1 = new A._EvaluateVisitor_visitEachRule_closure6(t1, _this, nodeWithSpan); + break $label0$0; + } + return _this._evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitEachRule_closure7(_this, list, t1, node), true, type$.nullable_Value_2); + }, + _evaluate0$_setMultipleVariables$3(variables, value, nodeWithSpan) { + var i, + list = value.get$asList(), + t1 = variables.length, + minLength = Math.min(t1, list.length); + for (i = 0; i < minLength; ++i) + this._evaluate0$_environment.setLocalVariable$3(variables[i], this._evaluate0$_withoutSlash$2(list[i], nodeWithSpan), nodeWithSpan); + for (i = minLength; i < t1; ++i) + this._evaluate0$_environment.setLocalVariable$3(variables[i], B.C__SassNull0, nodeWithSpan); + }, + visitErrorRule$1(_, node) { + throw A.wrapException(this._evaluate0$_exception$2(node.expression.accept$1(this).toString$0(0), node.span)); + }, + visitExtendRule$1(_, node) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, _0_0, compound, simple, _this = this, _null = null, + styleRule = _this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || _this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.x40exten, node.span)); + for (t1 = styleRule.originalSelector.components, t2 = t1.length, t3 = node.span, t4 = type$.SourceSpan, t5 = type$.String, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t7 = complex.accept$1(B.C__IsUselessVisitor0) ? "can't" : "shouldn't"; + _this._evaluate0$_warn$3('The selector "' + t6 + '" is invalid CSS and ' + t7 + string$.x20be_an, new A.MultiSpan0(A.SpanExtensions_trimRight0(complex.span), "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t3, "@extend rule"], t4, t5), t4, t5)), B.Deprecation_2PR); + } + _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(node.selector, true); + for (t1 = A.SelectorList_SelectorList$parse0(A.trimAscii0(_0_0._0, true), false, _0_0._1, _this._evaluate0$_logger, false).components, t2 = t1.length, t3 = styleRule._style_rule0$_selector._box0$_inner, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + compound = complex.get$singleCompound(); + if (compound == null) + throw A.wrapException(A.SassFormatException$0("complex selectors may not be extended.", complex.span, _null)); + t4 = compound.components; + simple = t4.length === 1 ? B.JSArray_methods.get$first(t4) : _null; + if (simple == null) + throw A.wrapException(A.SassFormatException$0(string$.compou + B.JSArray_methods.join$1(t4, ", ") + string$.x60_inst, compound.span, _null)); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addExtension$4(t3.value, simple, node, _this._evaluate0$_mediaQueries); + } + return _null; + }, + visitAtRule$1(_, node) { + var $name, value, children, wasInKeyframes, wasInUnknownAtRule, rule, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.At_rul, node.span)); + $name = _this._evaluate0$_interpolationToValue$1(node.name); + value = A.NullableExtension_andThen0(node.value, new A._EvaluateVisitor_visitAtRule_closure7(_this)); + children = node.children; + if (children == null) { + _this._evaluate0$_copyParentAfterSibling$0(); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0($name, node.span, true, value)); + return null; + } + wasInKeyframes = _this._evaluate0$_inKeyframes; + wasInUnknownAtRule = _this._evaluate0$_inUnknownAtRule; + if (A.unvendor0($name.value) === "keyframes") + _this._evaluate0$_inKeyframes = true; + else + _this._evaluate0$_inUnknownAtRule = true; + rule = A.ModifiableCssAtRule$0($name, node.span, false, value); + if (_this.get$_evaluate0$_hasCssNesting()) { + _this._evaluate0$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitAtRule_closure8(_this, children), node.hasDeclarations, type$.ModifiableCssAtRule_2, type$.Null); + _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + _this._evaluate0$_inKeyframes = wasInKeyframes; + return null; + } + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitAtRule_closure9(_this, $name, children), node.hasDeclarations, new A._EvaluateVisitor_visitAtRule_closure10(), type$.ModifiableCssAtRule_2, type$.Null); + _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + _this._evaluate0$_inKeyframes = wasInKeyframes; + return null; + }, + visitForRule$1(_, node) { + var _this = this, t1 = {}, + t2 = node.from, + fromNumber = _this._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure9(_this, node)), + t3 = node.to, + toNumber = _this._evaluate0$_addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure10(_this, node)), + from = _this._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor_visitForRule_closure11(fromNumber)), + to = t1.to = _this._evaluate0$_addExceptionSpan$2(t3, new A._EvaluateVisitor_visitForRule_closure12(toNumber, fromNumber)), + direction = from > to ? -1 : 1; + if (from === (!node.isExclusive ? t1.to = to + direction : to)) + return null; + return _this._evaluate0$_environment.scope$1$2$semiGlobal(new A._EvaluateVisitor_visitForRule_closure13(t1, _this, node, from, direction, fromNumber), true, type$.nullable_Value_2); + }, + visitForwardRule$1(_, node) { + var newConfiguration, t4, _i, variable, $name, _this = this, + _s8_ = "@forward", + oldConfiguration = _this._evaluate0$_configuration, + adjustedConfiguration = oldConfiguration.throughForward$1(node), + t1 = node.configuration, + t2 = t1.length, + t3 = node.url; + if (t2 !== 0) { + newConfiguration = _this._evaluate0$_addForwardConfiguration$2(adjustedConfiguration, node); + _this._evaluate0$_loadModule$5$configuration(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure3(_this, node), newConfiguration); + t3 = type$.String; + t4 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (!variable.isGuarded) + t4.add$1(0, variable.name); + } + _this._evaluate0$_removeUsedConfiguration$3$except(adjustedConfiguration, newConfiguration, t4); + t3 = A.LinkedHashSet_LinkedHashSet$_empty(t3); + for (_i = 0; _i < t2; ++_i) + t3.add$1(0, t1[_i].name); + for (t1 = newConfiguration._configuration0$_values, t2 = t1.get$keys(t1), t2 = t2.toList$0(t2), t4 = t2.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (!t3.contains$1(0, $name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + _this._evaluate0$_assertConfigurationIsEmpty$1(newConfiguration); + } else { + _this._evaluate0$_configuration = adjustedConfiguration; + _this._evaluate0$_loadModule$4(t3, _s8_, node, new A._EvaluateVisitor_visitForwardRule_closure4(_this, node)); + _this._evaluate0$_configuration = oldConfiguration; + } + return null; + }, + _evaluate0$_addForwardConfiguration$2(configuration, node) { + var t2, t3, _i, variable, t4, _0_0, t5, oldValue, variableNodeWithSpan, _null = null, + t1 = configuration._configuration0$_values, + newValues = A.LinkedHashMap_LinkedHashMap$of(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + for (t2 = node.configuration, t3 = t2.length, _i = 0; _i < t3; ++_i) { + variable = t2[_i]; + if (variable.isGuarded) { + t4 = variable.name; + _0_0 = t1.get$isEmpty(t1) ? _null : t1.remove$1(0, t4); + if (_0_0 != null) { + t5 = !_0_0.value.$eq(0, B.C__SassNull0); + oldValue = _0_0; + } else { + oldValue = _null; + t5 = false; + } + if (t5) { + newValues.$indexSet(0, t4, oldValue); + continue; + } + } + t4 = variable.expression; + variableNodeWithSpan = this._evaluate0$_expressionNode$1(t4); + newValues.$indexSet(0, variable.name, new A.ConfiguredValue0(this._evaluate0$_withoutSlash$2(t4.accept$1(this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + if (configuration instanceof A.ExplicitConfiguration0 || t1.get$isEmpty(t1)) + return new A.ExplicitConfiguration0(node, newValues, _null); + else + return new A.Configuration0(newValues, _null); + }, + _evaluate0$_registerCommentsForModule$1(module) { + var _this = this, _s5_ = "_root", + t1 = _this._evaluate0$__root; + if (t1 == null) + return; + if (_this._evaluate0$_assertInModule$2(t1, _s5_).children.get$length(0) === 0 || !module.get$transitivelyContainsCss()) + return; + t1 = _this._evaluate0$_preModuleComments; + if (t1 == null) + t1 = _this._evaluate0$_preModuleComments = A.LinkedHashMap_LinkedHashMap$_empty(type$.Module_Callable_2, type$.List_CssComment_2); + J.addAll$1$ax(t1.putIfAbsent$2(module, new A._EvaluateVisitor__registerCommentsForModule_closure1()), new A.UnmodifiableListView(J.cast$1$0$ax(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source, type$.CssComment_2), type$.UnmodifiableListView_CssComment_2)); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).clearChildren$0(); + _this._evaluate0$__endOfImports = 0; + }, + _evaluate0$_removeUsedConfiguration$3$except(upstream, downstream, except) { + var t1, t2, t3, t4, _i, $name; + for (t1 = upstream._configuration0$_values, t2 = t1.get$keys(t1), t2 = t2.toList$0(t2), t3 = t2.length, t4 = downstream._configuration0$_values, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + $name = t2[_i]; + if (except.contains$1(0, $name)) + continue; + if (!t4.containsKey$1($name)) + if (!t1.get$isEmpty(t1)) + t1.remove$1(0, $name); + } + }, + _evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, nameInError) { + var t1, _0_0; + if (!(configuration instanceof A.ExplicitConfiguration0)) + return; + t1 = configuration._configuration0$_values; + if (t1.get$isEmpty(t1)) + return; + t1 = A.MapExtensions_get_pairs0(new A.UnmodifiableMapView(t1, type$.UnmodifiableMapView_String_ConfiguredValue_2), type$.String, type$.ConfiguredValue_2); + _0_0 = t1.get$first(t1); + t1 = nameInError ? "$" + _0_0._0 + string$.x20was_n : string$.This_v; + throw A.wrapException(this._evaluate0$_exception$2(t1, _0_0._1.configurationSpan)); + }, + _evaluate0$_assertConfigurationIsEmpty$1(configuration) { + return this._evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, false); + }, + visitFunctionRule$1(_, node) { + var t1 = this._evaluate0$_environment, + t2 = t1.closure$0(), + t3 = this._evaluate0$_inDependency, + t4 = t1._environment0$_functions, + index = t4.length - 1, + t5 = node.name; + t1._environment0$_functionIndices.$indexSet(0, t5, index); + t4[index].$indexSet(0, t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_Environment_2)); + return null; + }, + visitIfRule$1(_, node) { + var t1, t2, _i, clauseToCheck, + clause = node.lastClause; + for (t1 = node.clauses, t2 = t1.length, _i = 0; _i < t2; ++_i) { + clauseToCheck = t1[_i]; + if (clauseToCheck.expression.accept$1(this).get$isTruthy()) { + clause = clauseToCheck; + break; + } + } + return A.NullableExtension_andThen0(clause, new A._EvaluateVisitor_visitIfRule_closure1(this)); + }, + visitImportRule$1(_, node) { + var t1, t2, t3, t4, t5, t6, _i, $import, t7, _0_0, $self, t8, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports"; + for (t1 = node.imports, t2 = t1.length, t3 = type$.CssValue_String_2, t4 = _this.get$_evaluate0$_interpolationToValue(), t5 = type$.StaticImport_2, t6 = type$.JSArray_ModifiableCssImport_2, _i = 0; _i < t2; ++_i) { + $import = t1[_i]; + if ($import instanceof A.DynamicImport0) + _this._evaluate0$_visitDynamicImport$1($import); + else { + t5._as($import); + t7 = $import.url; + _0_0 = _this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(t7, false, false); + $self = $import.modifiers; + t8 = $self == null ? null : t4.call$1($self); + node = new A.ModifiableCssImport0(new A.CssValue0(_0_0._0, t7.span, t3), t8, $import.span); + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) { + _this._evaluate0$_copyParentAfterSibling$0(); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(node); + } else if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source)) { + t7 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_); + node._node$_parent = t7; + t7 = t7._node$_children; + node._node$_indexInParent = t7.length; + t7.push(node); + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + } else { + t7 = _this._evaluate0$_outOfOrderImports; + (t7 == null ? _this._evaluate0$_outOfOrderImports = A._setArrayType([], t6) : t7).push(node); + } + } + } + return null; + }, + _evaluate0$_visitDynamicImport$1($import) { + return this._evaluate0$_withStackFrame$3("@import", $import, new A._EvaluateVisitor__visitDynamicImport_closure1(this, $import)); + }, + _evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, forImport) { + var _0_0, importCache, _1_0, importer, canonicalUrl, originalUrl, isDependency, _2_0, stylesheet, _3_0, result, error, stackTrace, error0, stackTrace0, t1, t2, exception, _this = this, + _s11_ = "_stylesheet"; + baseUrl = baseUrl; + try { + _this._evaluate0$_importSpan = span; + _0_0 = _this._evaluate0$_importCache; + importCache = null; + if (_0_0 != null) { + importCache = _0_0; + if (baseUrl == null) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).span; + baseUrl = t1.get$sourceUrl(t1); + } + _1_0 = J.canonicalize$4$baseImporter$baseUrl$forImport$x(importCache, A.Uri_parse(url), _this._evaluate0$_importer, baseUrl, forImport); + importer = null; + canonicalUrl = null; + originalUrl = null; + if (type$.Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl._is(_1_0)) { + importer = _1_0._0; + canonicalUrl = _1_0._1; + originalUrl = _1_0._2; + if (canonicalUrl.get$scheme() === "") + A.WarnForDeprecation_warnForDeprecation0(_this._evaluate0$_logger, B.Deprecation_Vc9, "Importer " + A.S(importer) + " canonicalized " + url + " to " + A.S(canonicalUrl) + string$.x2e_Rela, null, null); + _this._evaluate0$_loadedUrls.add$1(0, canonicalUrl); + isDependency = _this._evaluate0$_inDependency || !J.$eq$(importer, _this._evaluate0$_importer); + _2_0 = importCache.importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl); + stylesheet = null; + if (_2_0 != null) { + stylesheet = _2_0; + t1 = stylesheet; + t2 = importer; + return new A._Record_3_importer_isDependency(t1, t2, isDependency); + } + } + } + if (_this._nodeImporter != null) { + t1 = baseUrl; + if (t1 == null) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).span; + t1 = t1.get$sourceUrl(t1); + } + _3_0 = _this._importLikeNode$3(url, t1, forImport); + result = null; + if (_3_0 != null) { + result = _3_0; + t1 = result._0.span; + t2 = _this._evaluate0$_loadedUrls; + A.NullableExtension_andThen0(t1.get$sourceUrl(t1), t2.get$add(t2)); + t2 = result; + return t2; + } + } + t1 = B.JSString_methods.startsWith$1(url, "package:"); + if (t1) + throw A.wrapException(string$.x22packa); + else + throw A.wrapException("Can't find stylesheet to import."); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) + throw exception; + else if (t1 instanceof A.ArgumentError) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(_this._evaluate0$_exception$1(J.toString$0$(error)), error, stackTrace); + } else { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + A.throwWithTrace0(_this._evaluate0$_exception$1(_this._evaluate0$_getErrorMessage$1(error0)), error0, stackTrace0); + } + } finally { + _this._evaluate0$_importSpan = null; + } + }, + _evaluate0$_loadStylesheet$3$baseUrl(url, span, baseUrl) { + return this._evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, baseUrl, false); + }, + _evaluate0$_loadStylesheet$3$forImport(url, span, forImport) { + return this._evaluate0$_loadStylesheet$4$baseUrl$forImport(url, span, null, forImport); + }, + _importLikeNode$3(originalUrl, previous, forImport) { + var isDependency, url, + t1 = this._nodeImporter, + result = t1.loadRelative$3(originalUrl, previous, forImport); + if (result != null) + isDependency = this._evaluate0$_inDependency; + else { + result = t1.load$3(0, originalUrl, previous, forImport); + if (result == null) + return null; + isDependency = true; + } + url = result._1; + t1 = B.JSString_methods.startsWith$1(url, "file") ? A.Syntax_forPath0(url) : B.Syntax_SCSS_0_scss0; + return new A._Record_3_importer_isDependency(A.Stylesheet_Stylesheet$parse0(result._0, t1, false, url), null, isDependency); + }, + _evaluate0$_applyMixin$5(mixin, contentCallable, $arguments, nodeWithSpan, nodeWithSpanWithoutContent) { + var t1, _0_0, t2, _1_8, t3, _this = this, _null = null, + _s37_ = "Mixin doesn't accept a content block.", + _s10_ = "invocation"; + $label0$0: { + if (mixin == null) + throw A.wrapException(_this._evaluate0$_exception$2("Undefined mixin.", nodeWithSpan.get$span(nodeWithSpan))); + t1 = mixin instanceof A.BuiltInCallable0; + if (t1 && !mixin.acceptsContent && contentCallable != null) { + t1 = _this._evaluate0$_evaluateArguments$1($arguments)._values; + _0_0 = mixin.callbackFor$2(t1[2].length, new A.MapKeySet(t1[0], type$.MapKeySet_String)); + throw A.wrapException(A.MultiSpanSassRuntimeException$0(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_0_0._0.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), _null)); + } + if (t1) { + _this._evaluate0$_environment.withContent$2(contentCallable, new A._EvaluateVisitor__applyMixin_closure3(_this, $arguments, mixin, nodeWithSpanWithoutContent)); + break $label0$0; + } + t1 = type$.UserDefinedCallable_Environment_2._is(mixin); + t2 = false; + if (t1) { + _1_8 = mixin.declaration; + t3 = _1_8; + if (t3 instanceof A.MixinRule0) + t2 = !type$.MixinRule_2._as(_1_8).get$hasContent() && contentCallable != null; + } + if (t2) + throw A.wrapException(A.MultiSpanSassRuntimeException$0(_s37_, nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent), _s10_, A.LinkedHashMap_LinkedHashMap$_literal([mixin.declaration.parameters.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpanWithoutContent.get$span(nodeWithSpanWithoutContent)), _null)); + if (t1) { + _this._evaluate0$_runUserDefinedCallable$1$4($arguments, mixin, nodeWithSpanWithoutContent, new A._EvaluateVisitor__applyMixin_closure4(_this, contentCallable, mixin, nodeWithSpanWithoutContent), type$.Null); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + } + }, + visitIncludeRule$1(_, node) { + var _this = this, + mixin = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitIncludeRule_closure5(_this, node)); + if (B.JSString_methods.startsWith$1(node.originalName, "--") && mixin instanceof A.UserDefinedCallable0 && !B.JSString_methods.startsWith$1(mixin.declaration.originalName, "--")) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Sass__m, node.get$nameSpan())); + _this._evaluate0$_applyMixin$5(mixin, A.NullableExtension_andThen0(node.content, new A._EvaluateVisitor_visitIncludeRule_closure6(_this)), node.$arguments, node, new A._FakeAstNode0(new A._EvaluateVisitor_visitIncludeRule_closure7(node))); + return null; + }, + visitMixinRule$1(_, node) { + var t1 = this._evaluate0$_environment, + t2 = t1.closure$0(), + t3 = this._evaluate0$_inDependency, + t4 = t1._environment0$_mixins, + index = t4.length - 1, + t5 = node.name; + t1._environment0$_mixinIndices.$indexSet(0, t5, index); + t4[index].$indexSet(0, t5, new A.UserDefinedCallable0(node, t2, t3, type$.UserDefinedCallable_Environment_2)); + return null; + }, + visitLoudComment$1(_, node) { + var t1, text, _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._evaluate0$_inFunction) + return null; + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) === _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root") && _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root").children._collection$_source)) + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + t1 = node.text; + text = _this._evaluate0$_performInterpolation$1(t1); + if (!B.JSString_methods.endsWith$1(text, "*/")) + text += " */"; + _this._evaluate0$_copyParentAfterSibling$0(); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(new A.ModifiableCssComment0(text, t1.span)); + return null; + }, + visitMediaRule$1(_, node) { + var _0_0, queries, mergedQueries, t1, mergedSources, t2, t3, _this = this, _null = null; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Media_, node.span)); + _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(node.query, true); + queries = new A.MediaQueryParser0(A.SpanScanner$(_0_0._0, _null), _0_0._1).parse$0(0); + if (_this.get$_evaluate0$_hasCssNesting()) { + _this._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssMediaRule$0(queries, node.span), new A._EvaluateVisitor_visitMediaRule_closure7(_this, node), false, type$.ModifiableCssMediaRule_2, type$.Null); + return _null; + } + mergedQueries = A.NullableExtension_andThen0(_this._evaluate0$_mediaQueries, new A._EvaluateVisitor_visitMediaRule_closure8(_this, queries)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return _null; + if (t1) + mergedSources = B.Set_empty6; + else { + t2 = _this._evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = _this._evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, queries); + mergedSources = t2; + } + t1 = t1 ? queries : mergedQueries; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitMediaRule_closure9(_this, mergedQueries, queries, mergedSources, node), node.hasDeclarations, new A._EvaluateVisitor_visitMediaRule_closure10(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null); + return _null; + }, + _evaluate0$_mergeMediaQueries$2(queries1, queries2) { + var t1, t2, t3, t4, _0_0, t5, result, + queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2); + for (t1 = J.get$iterator$ax(queries1), t2 = J.getInterceptor$ax(queries2); t1.moveNext$0();) { + t3 = t1.get$current(t1); + for (t4 = t2.get$iterator(queries2); t4.moveNext$0();) { + _0_0 = t3.merge$1(t4.get$current(t4)); + if (B._SingletonCssMediaQueryMergeResult_00 === _0_0) + continue; + if (B._SingletonCssMediaQueryMergeResult_10 === _0_0) + return null; + t5 = _0_0 instanceof A.MediaQuerySuccessfulMergeResult0; + result = t5 ? _0_0 : null; + if (t5) + queries.push(result.query); + } + } + return queries; + }, + visitReturnRule$1(_, node) { + var t1 = node.expression; + return this._evaluate0$_withoutSlash$2(t1.accept$1(this), t1); + }, + visitSilentComment$1(_, node) { + return null; + }, + visitStyleRule$1(_, node) { + var t1, _0_0, selectorText, selectorMap, parsedSelector, _1_0, t2, t3, _i, _2_0, first, t4, rule, oldAtRootExcludingStyleRule, _this = this, _null = null, + _s8_ = "__parent", + _s11_ = "_stylesheet"; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_n, node.span)); + else if (_this._evaluate0$_inKeyframes && _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock0) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_k, node.span)); + t1 = node.selector; + t1.toString; + _0_0 = _this._evaluate0$_performInterpolationWithMap$2$warnForColor(t1, true); + selectorText = _0_0._0; + selectorMap = _0_0._1; + if (_this._evaluate0$_inKeyframes) { + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(new A.CssValue0(A.List_List$unmodifiable(new A.KeyframeSelectorParser0(A.SpanScanner$(selectorText, _null), selectorMap).parse$0(0), type$.String), t1.span, type$.CssValue_List_String_2), node.span), new A._EvaluateVisitor_visitStyleRule_closure7(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitStyleRule_closure8(), type$.ModifiableCssKeyframeBlock_2, type$.Null); + return _null; + } + parsedSelector = A.SelectorList_SelectorList$parse0(selectorText, true, selectorMap, _this._evaluate0$_logger, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss); + _1_0 = _this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + $label0$0: { + if (_1_0 == null) { + t1 = true; + break $label0$0; + } + if (_1_0.fromPlainCss) { + t1 = false; + break $label0$0; + } + t1 = !(_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss && parsedSelector.accept$1(B.C__ContainsParentSelectorVisitor0)); + break $label0$0; + } + if (t1) { + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss) + for (t2 = parsedSelector.components, t3 = t2.length, _i = 0; _i < t3; ++_i) { + _2_0 = t2[_i].leadingCombinators; + if (_2_0.length >= 1) { + first = _2_0[0]; + t4 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss; + } else { + first = _null; + t4 = false; + } + if (t4) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Top_le, first.span)); + } + t2 = _this._evaluate0$_styleRuleIgnoringAtRoot; + t2 = t2 == null ? _null : t2.originalSelector; + parsedSelector = parsedSelector.nestWithin$3$implicitParent$preserveParentSelectors(t2, !_this._evaluate0$_atRootExcludingStyleRule, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss); + } + rule = A.ModifiableCssStyleRule$0(_this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addSelector$2(parsedSelector, _this._evaluate0$_mediaQueries), node.span, _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss, parsedSelector); + oldAtRootExcludingStyleRule = _this._evaluate0$_atRootExcludingStyleRule; + t2 = _this._evaluate0$_atRootExcludingStyleRule = false; + t1 = t1 ? new A._EvaluateVisitor_visitStyleRule_closure9() : _null; + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitStyleRule_closure10(_this, rule, node), node.hasDeclarations, t1, type$.ModifiableCssStyleRule_2, type$.Null); + _this._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + _this._evaluate0$_warnForBogusCombinators$1(rule); + if ((_this._evaluate0$_atRootExcludingStyleRule ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot) == null) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; + t1 = !t1.get$isEmpty(t1); + } else + t1 = t2; + if (t1) { + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children; + t1.get$last(t1).isGroupEnd = true; + } + return _null; + }, + _evaluate0$_warnForBogusCombinators$1(rule) { + var t1, t2, t3, t4, t5, _i, complex, visitor, t6, t7, t8, t9, _this = this, _null = null; + if (!rule.accept$1(B._IsInvisibleVisitor_false_false0)) + for (t1 = rule._style_rule0$_selector._box0$_inner.value.components, t2 = t1.length, t3 = type$.SourceSpan, t4 = type$.String, t5 = rule.children, _i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (!complex.accept$1(B._IsBogusVisitor_true0)) + continue; + if (complex.accept$1(B.C__IsUselessVisitor0)) { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix20, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_2PR); + } else if (complex.leadingCombinators.length !== 0) { + if (!_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss) { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + _this._evaluate0$_warn$3('The selector "' + B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)) + string$.x22x20is_ix0a, A.SpanExtensions_trimRight0(complex.span), B.Deprecation_2PR); + } + } else { + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + complex.accept$1(visitor); + t6 = B.JSString_methods.trim$0(visitor._serialize0$_buffer.toString$0(0)); + t7 = complex.accept$1(B._IsBogusVisitor_false0) ? string$.x20It_wi : ""; + t8 = A.SpanExtensions_trimRight0(complex.span); + if (t5.get$length(0) === 0) + A.throwExpression(A.IterableElementError_noElement()); + t9 = J.get$span$x(t5.$index(0, 0)); + _this._evaluate0$_warn$3('The selector "' + t6 + string$.x22x20is_o + t7 + string$.x0aThis_, new A.MultiSpan0(t8, "invalid selector", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([t9, "this is not a style rule" + (t5.every$1(t5, new A._EvaluateVisitor__warnForBogusCombinators_closure1()) ? "\n(try converting to a //-style comment)" : "")], t3, t4), t3, t4)), B.Deprecation_2PR); + } + } + }, + visitSupportsRule$1(_, node) { + var t1, rule, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Suppor, node.span)); + t1 = node.condition; + rule = A.ModifiableCssSupportsRule$0(new A.CssValue0(_this._evaluate0$_visitSupportsCondition$1(t1), t1.get$span(t1), type$.CssValue_String_2), node.span); + if (_this.get$_evaluate0$_hasCssNesting()) { + _this._evaluate0$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitSupportsRule_closure5(_this, node), node.hasDeclarations, type$.ModifiableCssSupportsRule_2, type$.Null); + return null; + } + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitSupportsRule_closure6(_this, node), node.hasDeclarations, new A._EvaluateVisitor_visitSupportsRule_closure7(), type$.ModifiableCssSupportsRule_2, type$.Null); + return null; + }, + _evaluate0$_visitSupportsCondition$1(condition) { + var t1, _this = this; + $label0$0: { + if (condition instanceof A.SupportsOperation0) { + t1 = condition.operator; + t1 = _this._evaluate0$_parenthesize$2(condition.left, t1) + " " + t1.toString$0(0) + " " + _this._evaluate0$_parenthesize$2(condition.right, t1); + break $label0$0; + } + if (condition instanceof A.SupportsNegation0) { + t1 = "not " + _this._evaluate0$_parenthesize$1(condition.condition); + break $label0$0; + } + if (condition instanceof A.SupportsInterpolation0) { + t1 = condition.expression; + t1 = _this._evaluate0$_serialize$3$quote(t1.accept$1(_this), t1, false); + break $label0$0; + } + t1 = {}; + t1.declaration = null; + if (condition instanceof A.SupportsDeclaration0) { + t1.declaration = condition; + t1 = _this._evaluate0$_withSupportsDeclaration$1(new A._EvaluateVisitor__visitSupportsCondition_closure1(t1, _this)); + break $label0$0; + } + if (condition instanceof A.SupportsFunction0) { + t1 = _this._evaluate0$_performInterpolation$1(condition.name) + "(" + _this._evaluate0$_performInterpolation$1(condition.$arguments) + ")"; + break $label0$0; + } + if (condition instanceof A.SupportsAnything0) { + t1 = "(" + _this._evaluate0$_performInterpolation$1(condition.contents) + ")"; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$("Unknown supports condition type " + A.getRuntimeTypeOfDartObject(condition).toString$0(0) + ".", null)); + } + return t1; + }, + _evaluate0$_withSupportsDeclaration$1$1(callback) { + var t1, + oldInSupportsDeclaration = this._evaluate0$_inSupportsDeclaration; + this._evaluate0$_inSupportsDeclaration = true; + try { + t1 = callback.call$0(); + return t1; + } finally { + this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + } + }, + _evaluate0$_withSupportsDeclaration$1(callback) { + return this._evaluate0$_withSupportsDeclaration$1$1(callback, type$.dynamic); + }, + _evaluate0$_parenthesize$2(condition, operator) { + var t1; + if (!(condition instanceof A.SupportsNegation0)) + if (condition instanceof A.SupportsOperation0) + t1 = operator == null || operator !== condition.operator; + else + t1 = false; + else + t1 = true; + if (t1) + return "(" + this._evaluate0$_visitSupportsCondition$1(condition) + ")"; + return this._evaluate0$_visitSupportsCondition$1(condition); + }, + _evaluate0$_parenthesize$1(condition) { + return this._evaluate0$_parenthesize$2(condition, null); + }, + visitVariableDeclaration$1(_, node) { + var t1, t2, _0_0, value, _this = this, _null = null; + if (node.isGuarded) { + if (node.namespace == null && _this._evaluate0$_environment._environment0$_variables.length === 1) { + t1 = node.name; + _this._evaluate0$_environment._environment0$_configurableVariables.add$1(0, t1); + t2 = _this._evaluate0$_configuration._configuration0$_values; + _0_0 = t2.get$isEmpty(t2) ? _null : t2.remove$1(0, t1); + t1 = {}; + t1.override = null; + if (_0_0 != null) { + t1.override = _0_0; + t2 = !_0_0.value.$eq(0, B.C__SassNull0); + } else + t2 = false; + if (t2) { + _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure5(t1, _this, node)); + return _null; + } + } + value = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure6(_this, node)); + if (value != null && !value.$eq(0, B.C__SassNull0)) + return _null; + } + if (node.isGlobal && !_this._evaluate0$_environment.globalVariableExists$1(node.name)) { + t1 = _this._evaluate0$_environment._environment0$_variables.length === 1 ? string$.As_of_S : string$.As_of_R + A.declarationName0(node.span) + ": null` at the stylesheet root."; + _this._evaluate0$_warn$3(t1, node.span, B.Deprecation_pwd); + } + t1 = node.expression; + _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableDeclaration_closure7(_this, node, _this._evaluate0$_withoutSlash$2(t1.accept$1(_this), t1))); + return _null; + }, + visitUseRule$1(_, node) { + var values, _i, variable, t3, variableNodeWithSpan, configuration, _this = this, + t1 = node.configuration, + t2 = t1.length; + if (t2 !== 0) { + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + for (_i = 0; _i < t2; ++_i) { + variable = t1[_i]; + t3 = variable.expression; + variableNodeWithSpan = _this._evaluate0$_expressionNode$1(t3); + values.$indexSet(0, variable.name, new A.ConfiguredValue0(_this._evaluate0$_withoutSlash$2(t3.accept$1(_this), variableNodeWithSpan), variable.span, variableNodeWithSpan)); + } + configuration = new A.ExplicitConfiguration0(node, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + _this._evaluate0$_loadModule$5$configuration(node.url, "@use", node, new A._EvaluateVisitor_visitUseRule_closure1(_this, node), configuration); + _this._evaluate0$_assertConfigurationIsEmpty$1(configuration); + return null; + }, + visitWarnRule$1(_, node) { + var _this = this, + value = _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitWarnRule_closure1(_this, node)), + t1 = value instanceof A.SassString0 ? value._string0$_text : _this._evaluate0$_serialize$2(value, node.expression), + t2 = _this._evaluate0$_stackTrace$1(node.span); + _this._evaluate0$_logger.internalWarn$4$deprecation$span$trace(t1, null, null, t2); + return null; + }, + visitWhileRule$1(_, node) { + return this._evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitWhileRule_closure1(this, node), true, node.hasDeclarations, type$.nullable_Value_2); + }, + visitBinaryOperationExpression$1(_, node) { + var t1, _this = this; + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss) { + t1 = node.operator; + t1 = t1 !== B.BinaryOperator_g6F0 && t1 !== B.BinaryOperator_ehp0; + } else + t1 = false; + if (t1) + throw A.wrapException(_this._evaluate0$_exception$2("Operators aren't allowed in plain CSS.", node.get$operatorSpan())); + return _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitBinaryOperationExpression_closure1(_this, node)); + }, + _evaluate0$_slash$3(left, right, node) { + var left0, _1_2, + result = left.dividedBy$1(right), + _1_2_isSet = left instanceof A.SassNumber0, + right0 = null, + t1 = false; + if (_1_2_isSet) { + if (right instanceof A.SassNumber0) { + t1 = node.allowsSlash && this._evaluate0$_operandAllowsSlash$1(node.left) && this._evaluate0$_operandAllowsSlash$1(node.right); + right0 = right; + } + left0 = left; + _1_2 = right; + } else { + _1_2 = null; + left0 = null; + } + if (t1) + return type$.SassNumber_2._as(result).withSlash$2(left0, right0); + if (left instanceof A.SassNumber0) + t1 = (_1_2_isSet ? _1_2 : right) instanceof A.SassNumber0; + else + t1 = false; + if (t1) { + this._evaluate0$_warn$3(string$.Using__o + A.S(new A._EvaluateVisitor__slash_recommendation1().call$1(node)) + " or " + A.expressionToCalc0(node).toString$0(0) + string$.x0a_Morex20, node.get$span(0), B.Deprecation_v81); + return result; + } + return result; + }, + _evaluate0$_operandAllowsSlash$1(node) { + var t1; + if (node instanceof A.FunctionExpression0) + if (node.namespace == null) { + t1 = node.name; + t1 = B.Set_Pr3yj.contains$1(0, t1.toLowerCase()) && this._evaluate0$_environment.getFunction$1(t1) == null; + } else + t1 = false; + else + t1 = true; + return t1; + }, + visitValueExpression$1(_, node) { + return node.value; + }, + visitVariableExpression$1(_, node) { + var result = this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitVariableExpression_closure1(this, node)); + if (result != null) + return result; + throw A.wrapException(this._evaluate0$_exception$2("Undefined variable.", node.span)); + }, + visitUnaryOperationExpression$1(_, node) { + return this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitUnaryOperationExpression_closure1(node, node.operand.accept$1(this))); + }, + visitBooleanExpression$1(_, node) { + return node.value ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + visitIfExpression$1(_, node) { + var t1, t2, t3, results, _i, t4, condition, expression, result, _1_2, _this = this; + for (t1 = node.branches, t2 = t1.length, t3 = type$.JSArray_Record_2_String_and_Value_2, results = null, _i = 0; _i < t2; ++_i) { + t4 = t1[_i]; + condition = t4._0; + expression = t4._1; + result = condition == null ? null : condition.accept$1(_this); + if (result == null) + result = true; + t4 = typeof result == "string"; + condition = t4 ? result : null; + if (t4) { + if (results == null) + results = A._setArrayType([], t3); + results.push(new A._Record_2(condition, expression.accept$1(_this))); + continue; + } + _1_2 = true === result; + if (_1_2 && results != null) { + results.push(new A._Record_2("else", expression.accept$1(_this))); + continue; + } + if (_1_2) + return expression.accept$1(_this); + } + if (results == null) + return B.C__SassNull0; + return new A.SassString0("if(" + new A.MappedListIterable(results, new A._EvaluateVisitor_visitIfExpression_closure1(), A._arrayInstanceType(results)._eval$1("MappedListIterable<1,String>")).join$1(0, "; ") + ")", false); + }, + visitIfConditionParenthesized$1(_, node) { + var t1, + _0_0 = node.expression.accept$1(this); + $label0$0: { + if (typeof _0_0 == "string") { + t1 = "(" + _0_0 + ")"; + break $label0$0; + } + t1 = _0_0; + break $label0$0; + } + return t1; + }, + visitIfConditionNegation$1(_, node) { + var t1, + _0_0 = node.expression.accept$1(this); + $label0$0: { + if (typeof _0_0 == "string") { + t1 = "not " + _0_0; + break $label0$0; + } + if (A._isBool(_0_0)) { + t1 = !_0_0; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("unreachable")); + } + return t1; + }, + visitIfConditionOperation$1(_, node) { + var t1, t2, t3, t4, t5, t6, values, _i, expression, _0_0, t7, right, _1_6_isSet, _1_6, string; + for (t1 = node.expressions, t2 = t1.length, t3 = node.op, t4 = t3 === B.BooleanOperator_00, t5 = t3 === B.BooleanOperator_10, t6 = type$.JSArray_Record_2_IfConditionExpression_and_String_2, values = null, _i = 0; _i < t2; ++_i) { + expression = t1[_i]; + _0_0 = expression.accept$1(this); + t7 = typeof _0_0 == "string"; + right = t7 ? _0_0 : null; + if (t7) { + if (values == null) + values = A._setArrayType([], t6); + values.push(new A._Record_2(expression, right)); + continue; + } + if (false === _0_0 && t4) + return false; + if (true === _0_0 && t5) + return true; + } + $label0$1: { + if (values == null) { + t1 = t4; + break $label0$1; + } + _1_6_isSet = values.length === 1; + if (_1_6_isSet) { + _1_6 = values[0]; + t1 = _1_6._0 instanceof A.IfConditionParenthesized0; + } else { + _1_6 = null; + t1 = false; + } + if (t1) { + string = (_1_6_isSet ? _1_6 : values[0])._1; + t1 = B.JSString_methods.substring$2(string, 1, string.length - 1); + break $label0$1; + } + t1 = new A.MappedListIterable(values, new A._EvaluateVisitor_visitIfConditionOperation_closure1(), A._arrayInstanceType(values)._eval$1("MappedListIterable<1,String>")).join$1(0, " " + t3.toString$0(0) + " "); + break $label0$1; + } + return t1; + }, + visitIfConditionFunction$1(_, node) { + return this._evaluate0$_performInterpolation$1(node.name) + "(" + this._evaluate0$_performInterpolation$1(node.$arguments) + ")"; + }, + visitIfConditionSass$1(_, node) { + return node.expression.accept$1(this).get$isTruthy(); + }, + visitIfConditionRaw$1(_, node) { + return this._evaluate0$_performInterpolation$1(node.text); + }, + visitLegacyIfExpression$1(_, node) { + var condition, t1, ifTrue, ifFalse, result, _this = this, + _0_0 = _this._evaluate0$_evaluateMacroArguments$1(node), + positional = _0_0._0, + named = _0_0._1; + _this._evaluate0$_verifyArguments$4(positional.length, named, $.$get$LegacyIfExpression_declaration0(), node); + condition = A.ListExtensions_elementAtOrNull(positional, 0); + if (condition == null) { + t1 = named.$index(0, "condition"); + t1.toString; + condition = t1; + } + ifTrue = A.ListExtensions_elementAtOrNull(positional, 1); + if (ifTrue == null) { + t1 = named.$index(0, "if-true"); + t1.toString; + ifTrue = t1; + } + ifFalse = A.ListExtensions_elementAtOrNull(positional, 2); + if (ifFalse == null) { + t1 = named.$index(0, "if-false"); + t1.toString; + ifFalse = t1; + } + result = condition.accept$1(_this).get$isTruthy() ? ifTrue : ifFalse; + return _this._evaluate0$_withoutSlash$2(result.accept$1(_this), _this._evaluate0$_expressionNode$1(result)); + }, + visitNullExpression$1(_, node) { + return B.C__SassNull0; + }, + visitNumberExpression$1(_, node) { + return A.SassNumber_SassNumber0(node.value, node.unit); + }, + visitParenthesizedExpression$1(_, node) { + var _this = this; + return _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, "_stylesheet").plainCss ? A.throwExpression(_this._evaluate0$_exception$2("Parentheses aren't allowed in plain CSS.", node.span)) : node.expression.accept$1(_this); + }, + visitColorExpression$1(_, node) { + return node.value; + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return A.SassList$0(new A.MappedListIterable(t1, new A._EvaluateVisitor_visitListExpression_closure1(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), node.separator, node.hasBrackets); + }, + visitMapExpression$1(_, node) { + var t2, t3, _i, t4, key, keyValue, valueValue, oldValueSpan, + t1 = type$.Value_2, + map = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1), + keyNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.AstNode_2); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + key = t4._0; + keyValue = key.accept$1(this); + valueValue = t4._1.accept$1(this); + if (map.containsKey$1(keyValue)) { + t1 = keyNodes.$index(0, keyValue); + oldValueSpan = t1 == null ? null : t1.get$span(t1); + t1 = key.get$span(key); + t2 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (oldValueSpan != null) + t2.$indexSet(0, oldValueSpan, "first key"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("Duplicate key.", t1, "second key", t2, this._evaluate0$_stackTrace$1(key.get$span(key)), null)); + } + map.$indexSet(0, keyValue, valueValue); + keyNodes.$indexSet(0, keyValue, key); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + }, + visitFunctionExpression$1(_, node) { + var t2, _0_0, t3, t4, $name, oldInFunction, result, _this = this, + _s11_ = "_stylesheet", + t1 = {}, + $function = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss ? null : _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure5(_this, node)); + t1.$function = $function; + if ($function == null || B.JSString_methods.startsWith$1(node.originalName, "--")) { + if (node.namespace != null) + throw A.wrapException(_this._evaluate0$_exception$2("Undefined function.", node.span)); + t2 = node.name; + _0_0 = t2.toLowerCase(); + t3 = false; + if ("min" === _0_0 || "max" === _0_0 || "round" === _0_0 || "abs" === _0_0) { + t3 = node.$arguments; + t4 = t3.named; + t3 = t4.get$isEmpty(t4) && t3.rest == null && B.JSArray_methods.every$1(t3.positional, new A._EvaluateVisitor_visitFunctionExpression_closure6()); + $name = _0_0; + } else + $name = null; + if (t3) + return _this._evaluate0$_visitCalculation$2$inLegacySassFunction(node, $name); + if ("calc" === _0_0 || "clamp" === _0_0 || "hypot" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "sqrt" === _0_0 || "exp" === _0_0 || "sign" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "atan2" === _0_0 || "pow" === _0_0 || "log" === _0_0 || "calc-size" === _0_0) + return _this._evaluate0$_visitCalculation$1(node); + $function = _this._evaluate0$_assertInModule$2(_this._evaluate0$__stylesheet, _s11_).plainCss ? null : _this._evaluate0$_builtInFunctions.$index(0, t2); + t1.$function = $function == null ? new A.PlainCssCallable0(node.originalName) : $function; + } + oldInFunction = _this._evaluate0$_inFunction; + _this._evaluate0$_inFunction = true; + result = _this._evaluate0$_addErrorSpan$2(node, new A._EvaluateVisitor_visitFunctionExpression_closure7(t1, _this, node)); + _this._evaluate0$_inFunction = oldInFunction; + return result; + }, + _evaluate0$_visitCalculation$2$inLegacySassFunction(node, inLegacySassFunction) { + var $arguments, oldCallableNode, t1, _0_0, error, stackTrace, t4, _i, exception, _this = this, + t2 = node.$arguments, + t3 = t2.named; + if (t3.get$isNotEmpty(t3)) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Keywor, node.span)); + else if (t2.rest != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Rest_a, node.span)); + _this._evaluate0$_checkCalculationArguments$1(node); + t3 = A._setArrayType([], type$.JSArray_Object); + for (t2 = t2.positional, t4 = t2.length, _i = 0; _i < t4; ++_i) + t3.push(_this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); + $arguments = t3; + if (_this._evaluate0$_inSupportsDeclaration) + return new A.SassCalculation0(node.name, A.List_List$unmodifiable($arguments, type$.Object)); + oldCallableNode = _this._evaluate0$_callableNode; + _this._evaluate0$_callableNode = node; + try { + t1 = null; + t3 = node.name; + _0_0 = t3.toLowerCase(); + $label0$0: { + if ("calc" === _0_0) { + t1 = A.SassCalculation_calc0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sqrt" === _0_0) { + t1 = A.SassCalculation__singleArgument0("sqrt", J.$index$asx($arguments, 0), A.number2__sqrt$closure(), true); + break $label0$0; + } + if ("sin" === _0_0) { + t1 = A.SassCalculation__singleArgument0("sin", J.$index$asx($arguments, 0), A.number2__sin$closure(), false); + break $label0$0; + } + if ("cos" === _0_0) { + t1 = A.SassCalculation__singleArgument0("cos", J.$index$asx($arguments, 0), A.number2__cos$closure(), false); + break $label0$0; + } + if ("tan" === _0_0) { + t1 = A.SassCalculation__singleArgument0("tan", J.$index$asx($arguments, 0), A.number2__tan$closure(), false); + break $label0$0; + } + if ("asin" === _0_0) { + t1 = A.SassCalculation__singleArgument0("asin", J.$index$asx($arguments, 0), A.number2__asin$closure(), true); + break $label0$0; + } + if ("acos" === _0_0) { + t1 = A.SassCalculation__singleArgument0("acos", J.$index$asx($arguments, 0), A.number2__acos$closure(), true); + break $label0$0; + } + if ("atan" === _0_0) { + t1 = A.SassCalculation__singleArgument0("atan", J.$index$asx($arguments, 0), A.number2__atan$closure(), true); + break $label0$0; + } + if ("abs" === _0_0) { + t1 = A.SassCalculation_abs0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("exp" === _0_0) { + t1 = A.SassCalculation_exp0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("sign" === _0_0) { + t1 = A.SassCalculation_sign0(J.$index$asx($arguments, 0)); + break $label0$0; + } + if ("min" === _0_0) { + t1 = A.SassCalculation_min0($arguments); + break $label0$0; + } + if ("max" === _0_0) { + t1 = A.SassCalculation_max0($arguments); + break $label0$0; + } + if ("hypot" === _0_0) { + t1 = A.SassCalculation_hypot0($arguments); + break $label0$0; + } + if ("pow" === _0_0) { + t1 = A.SassCalculation_pow0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("atan2" === _0_0) { + t1 = A.SassCalculation_atan20(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("log" === _0_0) { + t1 = A.SassCalculation_log0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("mod" === _0_0) { + t1 = A.SassCalculation_mod0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("rem" === _0_0) { + t1 = A.SassCalculation_rem0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + if ("round" === _0_0) { + t1 = A.SassCalculation_roundInternal0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2), inLegacySassFunction, node.span, new A._EvaluateVisitor__visitCalculation_closure1(_this, node)); + break $label0$0; + } + if ("clamp" === _0_0) { + t1 = A.SassCalculation_clamp0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1), A.ListExtensions_elementAtOrNull($arguments, 2)); + break $label0$0; + } + if ("calc-size" === _0_0) { + t1 = A.SassCalculation_calcSize0(J.$index$asx($arguments, 0), A.ListExtensions_elementAtOrNull($arguments, 1)); + break $label0$0; + } + t3 = A.UnsupportedError$('Unknown calculation name "' + t3 + '".'); + t1 = A.throwExpression(t3); + } + t1 = t1; + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (B.JSString_methods.contains$1(error.message, "compatible")) + _this._evaluate0$_verifyCompatibleNumbers$2($arguments, t2); + A.throwWithTrace0(_this._evaluate0$_exception$2(error.message, node.span), error, stackTrace); + } else + throw exception; + } finally { + _this._evaluate0$_callableNode = oldCallableNode; + } + }, + _evaluate0$_visitCalculation$1(node) { + return this._evaluate0$_visitCalculation$2$inLegacySassFunction(node, null); + }, + _evaluate0$_checkCalculationArguments$1(node) { + var t1, _0_0, + check = new A._EvaluateVisitor__checkCalculationArguments_check1(this, node); + $label0$0: { + t1 = node.name; + _0_0 = t1.toLowerCase(); + if ("calc" === _0_0 || "sqrt" === _0_0 || "sin" === _0_0 || "cos" === _0_0 || "tan" === _0_0 || "asin" === _0_0 || "acos" === _0_0 || "atan" === _0_0 || "abs" === _0_0 || "exp" === _0_0 || "sign" === _0_0) { + check.call$1(1); + break $label0$0; + } + if ("min" === _0_0 || "max" === _0_0 || "hypot" === _0_0) { + check.call$0(); + break $label0$0; + } + if ("pow" === _0_0 || "atan2" === _0_0 || "log" === _0_0 || "mod" === _0_0 || "rem" === _0_0 || "calc-size" === _0_0) { + check.call$1(2); + break $label0$0; + } + if ("round" === _0_0 || "clamp" === _0_0) { + check.call$1(3); + break $label0$0; + } + throw A.wrapException(A.UnsupportedError$('Unknown calculation name "' + t1 + '".')); + } + }, + _evaluate0$_verifyCompatibleNumbers$2(args, nodesWithSpans) { + var i, t1, _0_0, arg, t2, number1, j, number2, t3, t4, t5, t6; + for (i = 0; t1 = args.length, i < t1; ++i) { + _0_0 = args[i]; + if (_0_0 instanceof A.SassNumber0) { + t1 = _0_0.get$hasComplexUnits(); + arg = _0_0; + } else { + arg = null; + t1 = false; + } + if (t1) { + t1 = A.S(arg); + t2 = nodesWithSpans[i]; + throw A.wrapException(this._evaluate0$_exception$2("Number " + t1 + " isn't compatible with CSS calculations.", t2.get$span(t2))); + } + } + for (i = 0; i < t1 - 1; ++i) { + number1 = args[i]; + if (!(number1 instanceof A.SassNumber0)) + continue; + for (j = i + 1; t1 = args.length, j < t1; ++j) { + number2 = args[j]; + if (!(number2 instanceof A.SassNumber0)) + continue; + if (number1.hasPossiblyCompatibleUnits$1(number2)) + continue; + t1 = number1.toString$0(0); + t2 = number2.toString$0(0); + t3 = nodesWithSpans[i]; + t3 = t3.get$span(t3); + t4 = number1.toString$0(0); + t5 = nodesWithSpans[j]; + t5 = A.LinkedHashMap_LinkedHashMap$_literal([t5.get$span(t5), number2.toString$0(0)], type$.FileSpan, type$.String); + t6 = nodesWithSpans[i]; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(t1 + " and " + t2 + " are incompatible.", t3, t4, t5, this._evaluate0$_stackTrace$1(t6.get$span(t6)), null)); + } + } + }, + _evaluate0$_visitCalculationExpression$2$inLegacySassFunction(node, inLegacySassFunction) { + var result, t2, _0_0, _box_0, _1_0, t3, _i, i, _this = this, _null = null, + t1 = node instanceof A.ParenthesizedExpression0, + inner = t1 ? node.expression : _null; + if (t1) { + result = _this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(inner, inLegacySassFunction); + return result instanceof A.SassString0 ? new A.SassString0("(" + result._string0$_text + ")", false) : result; + } + if (node instanceof A.StringExpression0 && node.accept$1(B.C_IsCalculationSafeVisitor0)) { + t1 = node.text; + t2 = t1.get$asPlain(); + _0_0 = t2 == null ? _null : t2.toLowerCase(); + $label0$0: { + if ("pi" === _0_0) { + t1 = A.SassNumber_SassNumber0(3.141592653589793, _null); + break $label0$0; + } + if ("e" === _0_0) { + t1 = A.SassNumber_SassNumber0(2.718281828459045, _null); + break $label0$0; + } + if ("infinity" === _0_0) { + t1 = A.SassNumber_SassNumber0(1 / 0, _null); + break $label0$0; + } + if ("-infinity" === _0_0) { + t1 = A.SassNumber_SassNumber0(-1 / 0, _null); + break $label0$0; + } + if ("nan" === _0_0) { + t1 = A.SassNumber_SassNumber0(0 / 0, _null); + break $label0$0; + } + t1 = new A.SassString0(_this._evaluate0$_performInterpolation$1(t1), false); + break $label0$0; + } + return t1; + } + _box_0 = {}; + _box_0.right = _box_0.left = _box_0.operator = null; + t1 = node instanceof A.BinaryOperationExpression0; + if (t1) { + _box_0.operator = node.operator; + _box_0.left = node.left; + _box_0.right = node.right; + } + if (t1) { + _this._evaluate0$_checkWhitespaceAroundCalculationOperator$1(node); + return _this._evaluate0$_addExceptionSpan$2(node, new A._EvaluateVisitor__visitCalculationExpression_closure1(_box_0, _this, node, inLegacySassFunction)); + } + if (node instanceof A.NumberExpression0 || node instanceof A.VariableExpression0 || node instanceof A.FunctionExpression0 || node instanceof A.LegacyIfExpression0) { + _1_0 = node.accept$1(_this); + $label1$1: { + if (_1_0 instanceof A.SassNumber0) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassCalculation0) { + t1 = _1_0; + break $label1$1; + } + if (_1_0 instanceof A.SassString0) { + t1 = !_1_0._string0$_hasQuotes; + result = _1_0; + } else { + result = _null; + t1 = false; + } + if (t1) { + t1 = result; + break $label1$1; + } + t1 = A.throwExpression(_this._evaluate0$_exception$2("Value " + _1_0.toString$0(0) + " can't be used in a calculation.", node.get$span(node))); + } + return t1; + } + if (node instanceof A.ListExpression0 && !node.hasBrackets && B.ListSeparator_SrV0 === node.separator && node.contents.length >= 2) { + t1 = A._setArrayType([], type$.JSArray_Object); + for (t2 = node.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push(_this._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2[_i], inLegacySassFunction)); + _this._evaluate0$_checkAdjacentCalculationValues$2(t1, node); + for (i = 0; i < t1.length; ++i) { + t3 = t1[i]; + if (t3 instanceof A.CalculationOperation0 && t2[i] instanceof A.ParenthesizedExpression0) + t1[i] = new A.SassString0("(" + t3.toString$0(0) + ")", false); + } + return new A.SassString0(B.JSArray_methods.join$1(t1, " "), false); + } + throw A.wrapException(_this._evaluate0$_exception$2(string$.This_e, node.get$span(node))); + }, + _evaluate0$_checkWhitespaceAroundCalculationOperator$1(node) { + var t2, t3, t4, textBetweenOperands, first, last, + t1 = node.operator; + if (t1 !== B.BinaryOperator_jCK0 && t1 !== B.BinaryOperator_tDf0) + return; + t1 = node.left; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t3 = node.right; + t4 = t3.get$span(t3); + if (t2 !== t4.get$file(t4)) + return; + t2 = t1.get$span(t1); + t2 = t2.get$end(t2); + t4 = t3.get$span(t3); + if (t2.offset >= t4.get$start(t4).offset) + return; + t2 = t1.get$span(t1); + t2 = t2.get$file(t2); + t1 = t1.get$span(t1); + t1 = t1.get$end(t1); + t3 = t3.get$span(t3); + textBetweenOperands = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2._decodedChars, t1.offset, t3.get$start(t3).offset), 0, null); + first = textBetweenOperands.charCodeAt(0); + last = textBetweenOperands.charCodeAt(textBetweenOperands.length - 1); + if (first === 32 || first === 9 || first === 10 || first === 13 || first === 12 || first === 47) + t1 = !(last === 32 || last === 9 || last === 10 || last === 13 || last === 12 || last === 47); + else + t1 = true; + if (t1) + throw A.wrapException(this._evaluate0$_exception$2(string$.x22x2b__an, node.get$operatorSpan())); + }, + _evaluate0$_binaryOperatorToCalculationOperator$2(operator, node) { + var t1; + $label0$0: { + if (B.BinaryOperator_jCK0 === operator) { + t1 = B.CalculationOperator_dpX0; + break $label0$0; + } + if (B.BinaryOperator_tDf0 === operator) { + t1 = B.CalculationOperator_KrC0; + break $label0$0; + } + if (B.BinaryOperator_wkM0 === operator) { + t1 = B.CalculationOperator_LPB0; + break $label0$0; + } + if (B.BinaryOperator_ehp0 === operator) { + t1 = B.CalculationOperator_wFL0; + break $label0$0; + } + t1 = A.throwExpression(this._evaluate0$_exception$2(string$.This_o, node.get$operatorSpan())); + } + return t1; + }, + _evaluate0$_checkAdjacentCalculationValues$2(elements, node) { + var t1, i, t2, previous, current, previousNode, currentNode, _0_2; + for (t1 = elements.length, i = 1; i < t1; ++i) { + t2 = i - 1; + previous = elements[t2]; + current = elements[i]; + if (previous instanceof A.SassString0 || current instanceof A.SassString0) + continue; + t1 = node.contents; + previousNode = t1[t2]; + currentNode = t1[i]; + if (currentNode instanceof A.UnaryOperationExpression0) { + _0_2 = currentNode.operator; + if (B.UnaryOperator_hCO0 !== _0_2) + t1 = B.UnaryOperator_n2K0 === _0_2; + else + t1 = true; + } else + t1 = false; + if (!t1) + t1 = currentNode instanceof A.NumberExpression0 && currentNode.value < 0; + else + t1 = true; + if (t1) + throw A.wrapException(this._evaluate0$_exception$2(string$.x22x2b__an, A.FileSpanExtension_subspan(currentNode.get$span(currentNode), 0, 1))); + else + throw A.wrapException(this._evaluate0$_exception$2("Missing math operator.", previousNode.get$span(previousNode).expand$1(0, currentNode.get$span(currentNode)))); + } + }, + visitInterpolatedFunctionExpression$1(_, node) { + var result, _this = this, + t1 = _this._evaluate0$_performInterpolation$1(node.name), + oldInFunction = _this._evaluate0$_inFunction; + _this._evaluate0$_inFunction = true; + result = _this._evaluate0$_addErrorSpan$2(node, new A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1(_this, node, new A.PlainCssCallable0(t1))); + _this._evaluate0$_inFunction = oldInFunction; + return result; + }, + _evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, run, $V) { + var oldInDependency, result, _this = this, + evaluated = _this._evaluate0$_evaluateArguments$1($arguments), + $name = callable.declaration.name; + if ($name !== "@content") + $name += "()"; + oldInDependency = _this._evaluate0$_inDependency; + _this._evaluate0$_inDependency = callable.inDependency; + result = _this._evaluate0$_withStackFrame$3($name, nodeWithSpan, new A._EvaluateVisitor__runUserDefinedCallable_closure1(_this, callable, evaluated, nodeWithSpan, run, $V)); + _this._evaluate0$_inDependency = oldInDependency; + return result; + }, + _evaluate0$_runFunctionCallable$3($arguments, callable, nodeWithSpan) { + var buffer, first, argument, restArg, rest, error, t1, t2, _i, t3, t4, exception, _this = this; + if (callable instanceof A.BuiltInCallable0) + return _this._evaluate0$_withoutSlash$2(_this._evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan), nodeWithSpan); + else if (type$.UserDefinedCallable_Environment_2._is(callable)) + return _this._evaluate0$_runUserDefinedCallable$1$4($arguments, callable, nodeWithSpan, new A._EvaluateVisitor__runFunctionCallable_closure1(_this, callable), type$.Value_2); + else if (callable instanceof A.PlainCssCallable0) { + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.keywordRest != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Plain_, nodeWithSpan.get$span(nodeWithSpan))); + buffer = new A.StringBuffer(callable.name + "("); + try { + first = true; + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + argument = t1[_i]; + if (first) + first = false; + else + buffer._contents += ", "; + t3 = buffer; + t4 = argument; + t4 = _this._evaluate0$_serialize$3$quote(t4.accept$1(_this), t4, true); + t3._contents += t4; + } + restArg = $arguments.rest; + if (restArg != null) { + rest = restArg.accept$1(_this); + if (!first) + buffer._contents += ", "; + t1 = buffer; + t2 = _this._evaluate0$_serialize$2(rest, restArg); + t1._contents += t2; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + if (!B.JSString_methods.endsWith$1(error._span_exception$_message, "isn't a valid CSS value.")) + throw exception; + throw A.wrapException(A.MultiSpanSassRuntimeException$0(error._span_exception$_message, J.get$span$x(error), "value", A.LinkedHashMap_LinkedHashMap$_literal([nodeWithSpan.get$span(nodeWithSpan), "unknown function treated as plain CSS"], type$.FileSpan, type$.String), J.get$trace$z(error), null)); + } else + throw exception; + } + t1 = buffer; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + t2 = buffer._contents; + return new A.SassString0(t2.charCodeAt(0) == 0 ? t2 : t2, false); + } else + throw A.wrapException(A.ArgumentError$("Unknown callable type " + J.get$runtimeType$(callable).toString$0(0) + ".", null)); + }, + _evaluate0$_runBuiltInCallable$3($arguments, callable, nodeWithSpan) { + var result, error, stackTrace, namedSet, _0_0, parameters, i, t1, parameter, t2, t3, rest, argumentList, exception, _this = this, _box_0 = {}, + evaluated = _this._evaluate0$_evaluateArguments$1($arguments), + oldCallableNode = _this._evaluate0$_callableNode; + _this._evaluate0$_callableNode = nodeWithSpan; + namedSet = new A.MapKeySet(evaluated._values[0], type$.MapKeySet_String); + _box_0.callback = _box_0.overload = null; + _0_0 = callable.callbackFor$2(evaluated._values[2].length, namedSet); + _box_0.overload = _0_0._0; + _box_0.callback = _0_0._1; + _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure5(_box_0, evaluated, namedSet)); + parameters = _box_0.overload.parameters; + for (i = evaluated._values[2].length, t1 = parameters.length; i < t1; ++i) { + parameter = parameters[i]; + t2 = evaluated._values[2]; + t3 = evaluated._values[0].remove$1(0, parameter.name); + if (t3 == null) { + t3 = parameter.defaultValue; + t3 = _this._evaluate0$_withoutSlash$2(t3.accept$1(_this), t3); + } + t2.push(t3); + } + if (_box_0.overload.restParameter != null) { + if (evaluated._values[2].length > t1) { + rest = B.JSArray_methods.sublist$1(evaluated._values[2], t1); + B.JSArray_methods.removeRange$2(evaluated._values[2], t1, evaluated._values[2].length); + } else + rest = B.List_empty23; + t1 = evaluated._values[0]; + argumentList = A.SassArgumentList$0(rest, t1, evaluated._values[4] === B.ListSeparator_undecided_null_3_undecided0 ? B.ListSeparator_z0K0 : evaluated._values[4]); + evaluated._values[2].push(argumentList); + } else + argumentList = null; + result = null; + try { + result = _this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__runBuiltInCallable_closure6(_box_0, evaluated)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) + throw exception; + else { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(_this._evaluate0$_exception$2(_this._evaluate0$_getErrorMessage$1(error), nodeWithSpan.get$span(nodeWithSpan)), error, stackTrace); + } + } + _this._evaluate0$_callableNode = oldCallableNode; + if (argumentList == null) + return result; + if (evaluated._values[0].__js_helper$_length === 0) + return result; + if (argumentList._argument_list$_wereKeywordsAccessed) + return result; + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + A.pluralize0("parameter", evaluated._values[0].get$keys(0).get$length(0), null) + " named " + A.toSentence0(evaluated._values[0].get$keys(0).map$1$1(0, new A._EvaluateVisitor__runBuiltInCallable_closure7(), type$.Object), "or") + ".", nodeWithSpan.get$span(nodeWithSpan), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([_box_0.overload.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), _this._evaluate0$_stackTrace$1(nodeWithSpan.get$span(nodeWithSpan)), null)); + }, + _evaluate0$_evaluateArguments$1($arguments) { + var t1, t2, _i, expression, nodeForSpan, named, namedNodes, t3, t4, $name, value, restArgs, rest, restNodeForSpan, t5, separator, keywordRestArgs, keywordRest, keywordRestNodeForSpan, _this = this, + positional = A._setArrayType([], type$.JSArray_Value_2), + positionalNodes = A._setArrayType([], type$.JSArray_AstNode_2); + for (t1 = $arguments.positional, t2 = t1.length, _i = 0; _i < t2; ++_i) { + expression = t1[_i]; + nodeForSpan = _this._evaluate0$_expressionNode$1(expression); + positional.push(_this._evaluate0$_withoutSlash$2(expression.accept$1(_this), nodeForSpan)); + positionalNodes.push(nodeForSpan); + } + t1 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Value_2); + t2 = type$.AstNode_2; + namedNodes = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t3 = A.MapExtensions_get_pairs0($arguments.named, t1, type$.Expression_2), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + $name = t4._0; + value = t4._1; + nodeForSpan = _this._evaluate0$_expressionNode$1(value); + named.$indexSet(0, $name, _this._evaluate0$_withoutSlash$2(value.accept$1(_this), nodeForSpan)); + namedNodes.$indexSet(0, $name, nodeForSpan); + } + restArgs = $arguments.rest; + if (restArgs == null) + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, B.ListSeparator_undecided_null_3_undecided0]); + rest = restArgs.accept$1(_this); + restNodeForSpan = _this._evaluate0$_expressionNode$1(restArgs); + if (rest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, rest, restArgs, new A._EvaluateVisitor__evaluateArguments_closure7()); + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t4 = rest._map0$_contents, t4 = t4.get$keys(t4), t4 = t4.get$iterator(t4), t5 = type$.SassString_2; t4.moveNext$0();) + t3.$indexSet(0, t5._as(t4.get$current(t4))._string0$_text, restNodeForSpan); + namedNodes.addAll$1(0, t3); + separator = B.ListSeparator_undecided_null_3_undecided0; + } else if (rest instanceof A.SassList0) { + t3 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t3, new A._EvaluateVisitor__evaluateArguments_closure8(_this, restNodeForSpan), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,Value0>"))); + B.JSArray_methods.addAll$1(positionalNodes, A.List_List$filled(t3.length, restNodeForSpan, false, t2)); + separator = rest._list1$_separator; + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateArguments_closure9(_this, named, restNodeForSpan, namedNodes)); + } + } else { + positional.push(_this._evaluate0$_withoutSlash$2(rest, restNodeForSpan)); + positionalNodes.push(restNodeForSpan); + separator = B.ListSeparator_undecided_null_3_undecided0; + } + keywordRestArgs = $arguments.keywordRest; + if (keywordRestArgs == null) + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + keywordRest = keywordRestArgs.accept$1(_this); + keywordRestNodeForSpan = _this._evaluate0$_expressionNode$1(keywordRestArgs); + if (keywordRest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, keywordRest, keywordRestArgs, new A._EvaluateVisitor__evaluateArguments_closure10()); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t2 = keywordRest._map0$_contents, t2 = t2.get$keys(t2), t2 = t2.get$iterator(t2), t3 = type$.SassString_2; t2.moveNext$0();) + t1.$indexSet(0, t3._as(t2.get$current(t2))._string0$_text, keywordRestNodeForSpan); + namedNodes.addAll$1(0, t1); + return new A._Record_5_named_namedNodes_positional_positionalNodes_separator([named, namedNodes, positional, positionalNodes, separator]); + } else + throw A.wrapException(_this._evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs.get$span(keywordRestArgs))); + }, + _evaluate0$_evaluateMacroArguments$1(invocation) { + var t2, positional, named, rest, restNodeForSpan, keywordRestArgs_, keywordRest, keywordRestNodeForSpan, _this = this, + t1 = invocation.$arguments, + restArgs_ = t1.rest; + if (restArgs_ == null) + return new A._Record_2(t1.positional, t1.named); + t2 = t1.positional; + positional = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + named = A.LinkedHashMap_LinkedHashMap$of(t1.named, type$.String, type$.Expression_2); + rest = restArgs_.accept$1(_this); + restNodeForSpan = _this._evaluate0$_expressionNode$1(restArgs_); + if (rest instanceof A.SassMap0) + _this._evaluate0$_addRestMap$4(named, rest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure7(restArgs_)); + else if (rest instanceof A.SassList0) { + t2 = rest._list1$_contents; + B.JSArray_methods.addAll$1(positional, new A.MappedListIterable(t2, new A._EvaluateVisitor__evaluateMacroArguments_closure8(_this, restNodeForSpan, restArgs_), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Expression0>"))); + if (rest instanceof A.SassArgumentList0) { + rest._argument_list$_wereKeywordsAccessed = true; + rest._argument_list$_keywords.forEach$1(0, new A._EvaluateVisitor__evaluateMacroArguments_closure9(_this, named, restNodeForSpan, restArgs_)); + } + } else + positional.push(new A.ValueExpression0(_this._evaluate0$_withoutSlash$2(rest, restNodeForSpan), restArgs_.get$span(restArgs_))); + keywordRestArgs_ = t1.keywordRest; + if (keywordRestArgs_ == null) + return new A._Record_2(positional, named); + keywordRest = keywordRestArgs_.accept$1(_this); + keywordRestNodeForSpan = _this._evaluate0$_expressionNode$1(keywordRestArgs_); + if (keywordRest instanceof A.SassMap0) { + _this._evaluate0$_addRestMap$4(named, keywordRest, invocation, new A._EvaluateVisitor__evaluateMacroArguments_closure10(_this, keywordRestNodeForSpan, keywordRestArgs_)); + return new A._Record_2(positional, named); + } else + throw A.wrapException(_this._evaluate0$_exception$2(string$.Variabs + keywordRest.toString$0(0) + ").", keywordRestArgs_.get$span(keywordRestArgs_))); + }, + _evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert) { + map._map0$_contents.forEach$1(0, new A._EvaluateVisitor__addRestMap_closure1(this, values, convert, this._evaluate0$_expressionNode$1(nodeWithSpan), map, nodeWithSpan)); + }, + _evaluate0$_addRestMap$4(values, map, nodeWithSpan, convert) { + return this._evaluate0$_addRestMap$1$4(values, map, nodeWithSpan, convert, type$.dynamic); + }, + _evaluate0$_verifyArguments$4(positional, named, parameters, nodeWithSpan) { + return this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__verifyArguments_closure1(parameters, positional, named)); + }, + visitSelectorExpression$1(_, node) { + var t1 = this._evaluate0$_styleRuleIgnoringAtRoot; + t1 = t1 == null ? null : t1.originalSelector.get$asSassList(); + return t1 == null ? B.C__SassNull0 : t1; + }, + visitStringExpression$1(_, node) { + var t1, t2, t3, _i, value, t4, _0_0, text, _this = this, + oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; + _this._evaluate0$_inSupportsDeclaration = false; + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = node.text.contents, t3 = t2.length, _i = 0; _i < t3; ++_i) { + value = t2[_i]; + $label0$0: { + if (typeof value == "string") { + t4 = value; + break $label0$0; + } + if (value instanceof A.Expression0) { + _0_0 = value.accept$1(_this); + $label1$1: { + if (_0_0 instanceof A.SassString0) { + text = _0_0._string0$_text; + t4 = text; + break $label1$1; + } + t4 = _this._evaluate0$_serialize$3$quote(_0_0, value, false); + break $label1$1; + } + break $label0$0; + } + t4 = A.throwExpression(A.UnsupportedError$("Unknown interpolation value " + A.S(value))); + } + t1.push(t4); + } + t1 = B.JSArray_methods.join$0(t1); + _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + return new A.SassString0(t1, node.hasQuotes); + }, + visitSupportsExpression$1(_, expression) { + return new A.SassString0(this._evaluate0$_visitSupportsCondition$1(expression.condition), false); + }, + visitCssAtRule$1(node) { + var wasInKeyframes, wasInUnknownAtRule, t1, rule, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.At_rul, node.span)); + if (node.isChildless) { + _this._evaluate0$_copyParentAfterSibling$0(); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssAtRule$0(node.name, node.span, true, node.value)); + return; + } + wasInKeyframes = _this._evaluate0$_inKeyframes; + wasInUnknownAtRule = _this._evaluate0$_inUnknownAtRule; + t1 = node.name; + if (A.unvendor0(t1.value) === "keyframes") + _this._evaluate0$_inKeyframes = true; + else + _this._evaluate0$_inUnknownAtRule = true; + rule = A.ModifiableCssAtRule$0(t1, node.span, false, node.value); + if (_this.get$_evaluate0$_hasCssNesting()) { + _this._evaluate0$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitCssAtRule_closure5(_this, node), false, type$.ModifiableCssAtRule_2, type$.Null); + _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + _this._evaluate0$_inKeyframes = wasInKeyframes; + return; + } + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssAtRule_closure6(_this, node), false, new A._EvaluateVisitor_visitCssAtRule_closure7(), type$.ModifiableCssAtRule_2, type$.Null); + _this._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + _this._evaluate0$_inKeyframes = wasInKeyframes; + }, + visitCssComment$1(node) { + var _this = this, + _s8_ = "__parent", + _s13_ = "_endOfImports"; + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) === _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root") && _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, "_root").children._collection$_source)) + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + _this._evaluate0$_copyParentAfterSibling$0(); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(new A.ModifiableCssComment0(node.text, node.span)); + }, + visitCssDeclaration$1(node) { + this._evaluate0$_copyParentAfterSibling$0(); + this._evaluate0$_assertInModule$2(this._evaluate0$__parent, "__parent").addChild$1(A.ModifiableCssDeclaration$0(node.name, node.value, node.span, node.parsedAsSassScript, node.valueSpanForMap)); + }, + visitCssImport$1(node) { + var t1, _this = this, + _s8_ = "__parent", + _s5_ = "_root", + _s13_ = "_endOfImports", + modifiableNode = new A.ModifiableCssImport0(node.url, node.modifiers, node.span); + if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_)) { + _this._evaluate0$_copyParentAfterSibling$0(); + _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).addChild$1(modifiableNode); + } else if (_this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) === J.get$length$asx(_this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).children._collection$_source)) { + _this._evaluate0$_assertInModule$2(_this._evaluate0$__root, _s5_).addChild$1(modifiableNode); + _this._evaluate0$__endOfImports = _this._evaluate0$_assertInModule$2(_this._evaluate0$__endOfImports, _s13_) + 1; + } else { + t1 = _this._evaluate0$_outOfOrderImports; + (t1 == null ? _this._evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t1).push(modifiableNode); + } + }, + visitCssKeyframeBlock$1(node) { + this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssKeyframeBlock$0(node.selector, node.span), new A._EvaluateVisitor_visitCssKeyframeBlock_closure3(this, node), false, new A._EvaluateVisitor_visitCssKeyframeBlock_closure4(), type$.ModifiableCssKeyframeBlock_2, type$.Null); + }, + visitCssMediaRule$1(node) { + var mergedQueries, t1, mergedSources, t2, t3, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Media_, node.span)); + if (_this.get$_evaluate0$_hasCssNesting()) { + _this._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssMediaRule$0(node.queries, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure7(_this, node), false, type$.ModifiableCssMediaRule_2, type$.Null); + return; + } + mergedQueries = A.NullableExtension_andThen0(_this._evaluate0$_mediaQueries, new A._EvaluateVisitor_visitCssMediaRule_closure8(_this, node)); + t1 = mergedQueries == null; + if (!t1 && J.get$isEmpty$asx(mergedQueries)) + return; + if (t1) + mergedSources = B.Set_empty6; + else { + t2 = _this._evaluate0$_mediaQuerySources; + t2.toString; + t2 = A.LinkedHashSet_LinkedHashSet$of(t2, type$.CssMediaQuery_2); + t3 = _this._evaluate0$_mediaQueries; + t3.toString; + t2.addAll$1(0, t3); + t2.addAll$1(0, node.queries); + mergedSources = t2; + } + t1 = t1 ? node.queries : mergedQueries; + _this._evaluate0$_withParent$2$4$scopeWhen$through(A.ModifiableCssMediaRule$0(t1, node.span), new A._EvaluateVisitor_visitCssMediaRule_closure9(_this, mergedQueries, node, mergedSources), false, new A._EvaluateVisitor_visitCssMediaRule_closure10(mergedSources), type$.ModifiableCssMediaRule_2, type$.Null); + }, + visitCssStyleRule$1(node) { + var t1, styleRule, _0_0, t2, t3, originalSelector, rule, oldAtRootExcludingStyleRule, _1_1, lastChild, _this = this, _null = null, + _s8_ = "__parent"; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_n, node.span)); + else if (_this._evaluate0$_inKeyframes && _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_) instanceof A.ModifiableCssKeyframeBlock0) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Style_k, node.span)); + t1 = _this._evaluate0$_atRootExcludingStyleRule; + styleRule = t1 ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + _0_0 = t1 ? _null : _this._evaluate0$_styleRuleIgnoringAtRoot; + $label0$0: { + if (_0_0 == null) { + t1 = true; + break $label0$0; + } + if (_0_0.fromPlainCss) { + t1 = false; + break $label0$0; + } + t1 = !(node.fromPlainCss && node._style_rule0$_selector._box0$_inner.value.accept$1(B.C__ContainsParentSelectorVisitor0)); + break $label0$0; + } + t2 = node._style_rule0$_selector._box0$_inner; + if (t1) { + t2 = t2.value; + t3 = styleRule == null ? _null : styleRule.originalSelector; + originalSelector = t2.nestWithin$3$implicitParent$preserveParentSelectors(t3, !_this._evaluate0$_atRootExcludingStyleRule, node.fromPlainCss); + } else + originalSelector = t2.value; + rule = A.ModifiableCssStyleRule$0(_this._evaluate0$_assertInModule$2(_this._evaluate0$__extensionStore, "_extensionStore").addSelector$2(originalSelector, _this._evaluate0$_mediaQueries), node.span, node.fromPlainCss, originalSelector); + oldAtRootExcludingStyleRule = _this._evaluate0$_atRootExcludingStyleRule; + _this._evaluate0$_atRootExcludingStyleRule = false; + t1 = t1 ? new A._EvaluateVisitor_visitCssStyleRule_closure3() : _null; + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssStyleRule_closure4(_this, rule, node), false, t1, type$.ModifiableCssStyleRule_2, type$.Null); + _this._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + t1 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).children._collection$_source; + t2 = J.getInterceptor$asx(t1); + _1_1 = t2.get$length(t1); + if (_1_1 >= 1) { + lastChild = t2.elementAt$1(t1, _1_1 - 1); + t1 = styleRule == null; + } else { + lastChild = _null; + t1 = false; + } + if (t1) + lastChild.isGroupEnd = true; + }, + visitCssStylesheet$1(node) { + var t1; + for (t1 = J.get$iterator$ax(node.get$children(node)); t1.moveNext$0();) + t1.get$current(t1).accept$1(this); + }, + visitCssSupportsRule$1(node) { + var rule, _this = this; + if (_this._evaluate0$_declarationName != null) + throw A.wrapException(_this._evaluate0$_exception$2(string$.Suppor, node.span)); + rule = A.ModifiableCssSupportsRule$0(node.condition, node.span); + if (_this.get$_evaluate0$_hasCssNesting()) { + _this._evaluate0$_withParent$2$3$scopeWhen(rule, new A._EvaluateVisitor_visitCssSupportsRule_closure5(_this, node), false, type$.ModifiableCssSupportsRule_2, type$.Null); + return; + } + _this._evaluate0$_withParent$2$4$scopeWhen$through(rule, new A._EvaluateVisitor_visitCssSupportsRule_closure6(_this, node), false, new A._EvaluateVisitor_visitCssSupportsRule_closure7(), type$.ModifiableCssSupportsRule_2, type$.Null); + }, + _evaluate0$_handleReturn$1$2(list, callback) { + var t1, _i, _0_0; + for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, A.throwConcurrentModificationError)(list), ++_i) { + _0_0 = callback.call$1(list[_i]); + if (_0_0 != null) + return _0_0; + } + return null; + }, + _evaluate0$_handleReturn$2(list, callback) { + return this._evaluate0$_handleReturn$1$2(list, callback, type$.dynamic); + }, + _evaluate0$_withEnvironment$1$2(environment, callback) { + var result, + oldEnvironment = this._evaluate0$_environment; + this._evaluate0$_environment = environment; + result = callback.call$0(); + this._evaluate0$_environment = oldEnvironment; + return result; + }, + _evaluate0$_withEnvironment$2(environment, callback) { + return this._evaluate0$_withEnvironment$1$2(environment, callback, type$.dynamic); + }, + _evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, trim, warnForColor) { + var result = this._evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor), + t1 = trim ? A.trimAscii0(result, true) : result; + return new A.CssValue0(t1, interpolation.span, type$.CssValue_String_2); + }, + _evaluate0$_interpolationToValue$1(interpolation) { + return this._evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, false); + }, + _evaluate0$_interpolationToValue$2$warnForColor(interpolation, warnForColor) { + return this._evaluate0$_interpolationToValue$3$trim$warnForColor(interpolation, false, warnForColor); + }, + _evaluate0$_performInterpolation$2$warnForColor(interpolation, warnForColor) { + return this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, false, warnForColor)._0; + }, + _evaluate0$_performInterpolation$1(interpolation) { + return this._evaluate0$_performInterpolation$2$warnForColor(interpolation, false); + }, + _evaluate0$_performInterpolationWithMap$2$warnForColor(interpolation, warnForColor) { + var _0_0 = this._evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, true, true), + map = _0_0._1; + map.toString; + return new A._Record_2(_0_0._0, map); + }, + _evaluate0$_performInterpolationHelper$3$sourceMap$warnForColor(interpolation, sourceMap, warnForColor) { + var t1, t2, t3, t4, t5, t6, first, _i, t7, value, result, result0, t8, _this = this, + targetOffsets = sourceMap ? A._setArrayType([], type$.JSArray_int) : null, + oldInSupportsDeclaration = _this._evaluate0$_inSupportsDeclaration; + _this._evaluate0$_inSupportsDeclaration = false; + for (t1 = interpolation.contents, t2 = t1.length, t3 = type$.Expression_2, t4 = targetOffsets == null, t5 = interpolation.span, t6 = type$.Object, first = true, _i = 0, t7 = ""; _i < t2; ++_i, first = false) { + value = t1[_i]; + if (!first) + if (!t4) + targetOffsets.push(t7.length); + if (typeof value == "string") { + t7 += value; + continue; + } + t3._as(value); + result = value.accept$1(_this); + if (warnForColor && $.$get$namesByColor0().containsKey$1(result)) { + result0 = A.List_List$from([""], false, t6); + result0.$flags = 3; + t8 = $.$get$namesByColor0(); + _this._evaluate0$_warn$2(string$.You_pr + A.S(t8.$index(0, result)) + string$.x20in_in + result.toString$0(0) + string$.x2c_whicw + A.S(t8.$index(0, result)) + string$.x22x29__If + new A.BinaryOperationExpression0(B.BinaryOperator_jCK0, new A.StringExpression0(new A.Interpolation0(result0, B.List_null, t5), true), value, false).toString$0(0) + "'.", value.get$span(value)); + } + t7 += _this._evaluate0$_serialize$3$quote(result, value, false); + } + _this._evaluate0$_inSupportsDeclaration = oldInSupportsDeclaration; + return new A._Record_2(t7.charCodeAt(0) == 0 ? t7 : t7, A.NullableExtension_andThen0(targetOffsets, new A._EvaluateVisitor__performInterpolationHelper_closure1(interpolation))); + }, + _evaluate0$_serialize$3$quote(value, nodeWithSpan, quote) { + return this._evaluate0$_addExceptionSpan$2(nodeWithSpan, new A._EvaluateVisitor__serialize_closure1(value, quote)); + }, + _evaluate0$_serialize$2(value, nodeWithSpan) { + return this._evaluate0$_serialize$3$quote(value, nodeWithSpan, true); + }, + _evaluate0$_expressionNode$1(expression) { + var t1; + if (expression instanceof A.VariableExpression0) { + t1 = this._evaluate0$_addExceptionSpan$2(expression, new A._EvaluateVisitor__expressionNode_closure1(this, expression)); + return t1 == null ? expression : t1; + } else + return expression; + }, + _evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, through, $S, $T) { + var oldParent, result, _this = this; + _this._evaluate0$_addChild$2$through(node, through); + oldParent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, "__parent"); + _this._evaluate0$__parent = node; + result = _this._evaluate0$_environment.scope$1$2$when(callback, scopeWhen, $T); + _this._evaluate0$__parent = oldParent; + return result; + }, + _evaluate0$_withParent$2$3$scopeWhen(node, callback, scopeWhen, $S, $T) { + return this._evaluate0$_withParent$2$4$scopeWhen$through(node, callback, scopeWhen, null, $S, $T); + }, + _evaluate0$_withParent$2$2(node, callback, $S, $T) { + return this._evaluate0$_withParent$2$4$scopeWhen$through(node, callback, true, null, $S, $T); + }, + _evaluate0$_copyParentAfterSibling$0() { + var t1, grandparent, newParent, _this = this, + _s8_ = "__parent", + _0_0 = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_)._node$_parent; + if (_0_0 != null) { + t1 = _0_0.children; + t1 = t1.get$last(t1) !== _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_); + grandparent = _0_0; + } else { + grandparent = null; + t1 = false; + } + if (t1) { + newParent = _this._evaluate0$_assertInModule$2(_this._evaluate0$__parent, _s8_).copyWithoutChildren$0(); + grandparent.addChild$1(newParent); + _this._evaluate0$__parent = newParent; + } + }, + _evaluate0$_addChild$2$through(node, through) { + var _0_0, grandparent, t1, + $parent = this._evaluate0$_assertInModule$2(this._evaluate0$__parent, "__parent"); + if (through != null) { + for (; through.call$1($parent); $parent = _0_0) { + _0_0 = $parent._node$_parent; + if (_0_0 == null) + throw A.wrapException(A.ArgumentError$(string$.throug + node.toString$0(0) + ".", null)); + } + if ($parent.get$hasFollowingSibling()) { + grandparent = $parent._node$_parent; + t1 = grandparent.children; + if ($parent.equalsIgnoringChildren$1(t1.get$last(t1))) + $parent = type$.ModifiableCssParentNode_2._as(t1.get$last(t1)); + else { + $parent = $parent.copyWithoutChildren$0(); + grandparent.addChild$1($parent); + } + } + } + $parent.addChild$1(node); + }, + _evaluate0$_addChild$1(node) { + return this._evaluate0$_addChild$2$through(node, null); + }, + _evaluate0$_withStyleRule$1$2(rule, callback) { + var result, + oldRule = this._evaluate0$_styleRuleIgnoringAtRoot; + this._evaluate0$_styleRuleIgnoringAtRoot = rule; + result = callback.call$0(); + this._evaluate0$_styleRuleIgnoringAtRoot = oldRule; + return result; + }, + _evaluate0$_withStyleRule$2(rule, callback) { + return this._evaluate0$_withStyleRule$1$2(rule, callback, type$.dynamic); + }, + _evaluate0$_withMediaQueries$1$3(queries, sources, callback) { + var result, _this = this, + oldMediaQueries = _this._evaluate0$_mediaQueries, + oldSources = _this._evaluate0$_mediaQuerySources; + _this._evaluate0$_mediaQueries = queries; + _this._evaluate0$_mediaQuerySources = sources; + result = callback.call$0(); + _this._evaluate0$_mediaQueries = oldMediaQueries; + _this._evaluate0$_mediaQuerySources = oldSources; + return result; + }, + _evaluate0$_withMediaQueries$3(queries, sources, callback) { + return this._evaluate0$_withMediaQueries$1$3(queries, sources, callback, type$.dynamic); + }, + _evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback) { + var oldMember, result, _this = this, + t1 = _this._evaluate0$_stack; + t1.push(new A._Record_2(_this._evaluate0$_member, nodeWithSpan)); + oldMember = _this._evaluate0$_member; + _this._evaluate0$_member = member; + result = callback.call$0(); + _this._evaluate0$_member = oldMember; + t1.pop(); + return result; + }, + _evaluate0$_withStackFrame$3(member, nodeWithSpan, callback) { + return this._evaluate0$_withStackFrame$1$3(member, nodeWithSpan, callback, type$.dynamic); + }, + _evaluate0$_withoutSlash$2(value, nodeForSpan) { + var t1; + if (value instanceof A.SassNumber0) + t1 = value.asSlash != null; + else + t1 = false; + if (t1) + this._evaluate0$_warn$3(string$.Using__i + A.S(new A._EvaluateVisitor__withoutSlash_recommendation1().call$1(value)) + string$.x0a_Morex20, nodeForSpan.get$span(nodeForSpan), B.Deprecation_v81); + return value.withoutSlash$0(); + }, + _evaluate0$_stackFrame$2(member, span) { + return A.frameForSpan0(span, member, A.NullableExtension_andThen0(span.get$sourceUrl(span), new A._EvaluateVisitor__stackFrame_closure1(this))); + }, + _evaluate0$_stackTrace$1(span) { + var t2, t3, _i, t4, nodeWithSpan, _this = this, + t1 = A._setArrayType([], type$.JSArray_Frame); + for (t2 = _this._evaluate0$_stack, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + t4 = t2[_i]; + nodeWithSpan = t4._1; + t1.push(_this._evaluate0$_stackFrame$2(t4._0, nodeWithSpan.get$span(nodeWithSpan))); + } + if (span != null) + t1.push(_this._evaluate0$_stackFrame$2(_this._evaluate0$_member, span)); + return A.Trace$(new A.ReversedListIterable(t1, type$.ReversedListIterable_Frame), null); + }, + _evaluate0$_stackTrace$0() { + return this._evaluate0$_stackTrace$1(null); + }, + _evaluate0$_warn$3(message, span, deprecation) { + var trace, t1, _this = this; + if (_this._evaluate0$_quietDeps && _this._evaluate0$_inDependency) + return; + if (!_this._evaluate0$_warningsEmitted.add$1(0, new A._Record_2(message, span))) + return; + trace = _this._evaluate0$_stackTrace$1(span); + t1 = _this._evaluate0$_logger; + if (deprecation == null) + t1.internalWarn$4$deprecation$span$trace(message, null, span, trace); + else + A.WarnForDeprecation_warnForDeprecation0(t1, deprecation, message, span, trace); + }, + _evaluate0$_warn$2(message, span) { + return this._evaluate0$_warn$3(message, span, null); + }, + _evaluate0$_exception$2(message, span) { + var t1, t2; + if (span == null) { + t1 = B.JSArray_methods.get$last(this._evaluate0$_stack)._1; + t1 = t1.get$span(t1); + } else + t1 = span; + t2 = this._evaluate0$_stackTrace$1(span); + return new A.SassRuntimeException0(t2, B.Set_empty, message, t1); + }, + _evaluate0$_exception$1(message) { + return this._evaluate0$_exception$2(message, null); + }, + _evaluate0$_multiSpanException$3(message, primaryLabel, secondaryLabels) { + var t1 = B.JSArray_methods.get$last(this._evaluate0$_stack)._1; + return A.MultiSpanSassRuntimeException$0(message, t1.get$span(t1), primaryLabel, secondaryLabels, this._evaluate0$_stackTrace$0(), null); + }, + _evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error.withSpan$1(nodeWithSpan.get$span(nodeWithSpan)); + A.throwWithTrace0(t1.withTrace$1(this._evaluate0$_stackTrace$1(addStackFrame ? nodeWithSpan.get$span(nodeWithSpan) : null)), error, stackTrace); + } else + throw exception; + } + }, + _evaluate0$_addExceptionSpan$2(nodeWithSpan, callback) { + return this._evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, true, type$.dynamic); + }, + _evaluate0$_addExceptionSpan$3$addStackFrame(nodeWithSpan, callback, addStackFrame) { + return this._evaluate0$_addExceptionSpan$1$3$addStackFrame(nodeWithSpan, callback, addStackFrame, type$.dynamic); + }, + _evaluate0$_addExceptionTrace$1$1(callback) { + var error, stackTrace, t1, exception, t2; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t1)) + throw exception; + else if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$x(t1); + A.throwWithTrace0(error.withTrace$1(this._evaluate0$_stackTrace$1(A.SourceSpanException.prototype.get$span.call(t2, t1))), error, stackTrace); + } else + throw exception; + } + }, + _evaluate0$_addExceptionTrace$1(callback) { + return this._evaluate0$_addExceptionTrace$1$1(callback, type$.dynamic); + }, + _evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback) { + var error, stackTrace, t1, exception, t2, t3; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SassRuntimeException_2._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + if (!B.JSString_methods.startsWith$1(J.get$span$x(error).get$text(), "@error")) + throw exception; + t1 = error._span_exception$_message; + t2 = nodeWithSpan.get$span(nodeWithSpan); + t3 = this._evaluate0$_stackTrace$0(); + A.throwWithTrace0(new A.SassRuntimeException0(t3, B.Set_empty, t1, t2), error, stackTrace); + } else + throw exception; + } + }, + _evaluate0$_addErrorSpan$2(nodeWithSpan, callback) { + return this._evaluate0$_addErrorSpan$1$2(nodeWithSpan, callback, type$.dynamic); + }, + _evaluate0$_getErrorMessage$1(error) { + var t1, exception; + if (type$.Error._is(error)) + return error.toString$0(0); + try { + t1 = A._asString(J.get$message$x(error)); + return t1; + } catch (exception) { + t1 = J.toString$0$(error); + return t1; + } + }, + $isExpressionVisitor: 1, + $isIfConditionExpressionVisitor: 1, + $isStatementVisitor: 1 + }; + A._EvaluateVisitor_closure25.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.globalVariableExists$2$namespace(t2, module == null ? null : module._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure26.prototype = { + call$1($arguments) { + var variable = J.$index$asx($arguments, 0).assertString$1("name"), + t1 = this.$this._evaluate0$_environment; + return t1.getVariable$1(A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-")) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure27.prototype = { + call$1($arguments) { + var module, t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._evaluate0$_environment; + t3 = variable._string0$_text; + t4 = A.stringReplaceAllUnchecked(t3, "_", "-"); + return t2.getFunction$2$namespace(t4, module == null ? null : module._string0$_text) != null || t1._evaluate0$_builtInFunctions.containsKey$1(t3) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure28.prototype = { + call$1($arguments) { + var module, t2, + t1 = J.getInterceptor$asx($arguments), + variable = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this._evaluate0$_environment; + t2 = A.stringReplaceAllUnchecked(variable._string0$_text, "_", "-"); + return t1.getMixin$2$namespace(t2, module == null ? null : module._string0$_text) != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure29.prototype = { + call$1($arguments) { + var t1 = this.$this._evaluate0$_environment; + if (!t1._environment0$_inMixin) + throw A.wrapException(A.SassScriptException$0(string$.conten, null)); + return t1._environment0$_content != null ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._EvaluateVisitor_closure30.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = this.$this._evaluate0$_environment._environment0$_modules.$index(0, t1); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t1 + '".'); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(module.get$variables(), type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, true), t4._1); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure31.prototype = { + call$1($arguments) { + var t3, t4, t5, + t1 = this.$this, + t2 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = t1._evaluate0$_environment._environment0$_modules.$index(0, t2); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t2 + '".'); + t2 = type$.Value_2; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t4 = A.MapExtensions_get_pairs0(module.get$functions(module), type$.String, type$.Callable_2), t4 = t4.get$iterator(t4), t1 = t1._evaluate0$_compileContext; t4.moveNext$0();) { + t5 = t4.get$current(t4); + t3.$indexSet(0, new A.SassString0(t5._0, true), new A.SassFunction0(t5._1, t1)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t3, t2, t2)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure32.prototype = { + call$1($arguments) { + var t3, t4, t5, + t1 = this.$this, + t2 = J.$index$asx($arguments, 0).assertString$1("module")._string0$_text, + module = t1._evaluate0$_environment._environment0$_modules.$index(0, t2); + if (module == null) + throw A.wrapException('There is no module with namespace "' + t2 + '".'); + t2 = type$.Value_2; + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t4 = A.MapExtensions_get_pairs0(module.get$mixins(), type$.String, type$.Callable_2), t4 = t4.get$iterator(t4), t1 = t1._evaluate0$_compileContext; t4.moveNext$0();) { + t5 = t4.get$current(t4); + t3.$indexSet(0, new A.SassString0(t5._0, true), new A.SassMixin0(t5._1, t1)); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t3, t2, t2)); + }, + $signature: 34 + }; + A._EvaluateVisitor_closure33.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"), + css = t1.$index($arguments, 1).get$isTruthy(); + t1 = t1.$index($arguments, 2).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + if (css) { + if (module != null) + throw A.wrapException(string$.x24css_a); + return new A.SassFunction0(new A.PlainCssCallable0($name._string0$_text), this.$this._evaluate0$_compileContext); + } + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + callable = t1._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure10(t1, $name, module)); + if (callable == null) + throw A.wrapException("Function not found: " + $name.toString$0(0)); + return new A.SassFunction0(callable, t1._evaluate0$_compileContext); + }, + $signature: 207 + }; + A._EvaluateVisitor__closure10.prototype = { + call$0() { + var local, + normalizedName = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t1 = this.module, + namespace = t1 == null ? null : t1._string0$_text; + t1 = this.$this; + local = t1._evaluate0$_environment.getFunction$2$namespace(normalizedName, namespace); + if (local != null || namespace != null) + return local; + return t1._evaluate0$_builtInFunctions.$index(0, normalizedName); + }, + $signature: 88 + }; + A._EvaluateVisitor_closure34.prototype = { + call$1($arguments) { + var module, t2, callable, + t1 = J.getInterceptor$asx($arguments), + $name = t1.$index($arguments, 0).assertString$1("name"); + t1 = t1.$index($arguments, 1).get$realNull(); + module = t1 == null ? null : t1.assertString$1("module"); + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + callable = t1._evaluate0$_addExceptionSpan$2(t2, new A._EvaluateVisitor__closure9(t1, $name, module)); + if (callable == null) + throw A.wrapException("Mixin not found: " + $name.toString$0(0)); + return new A.SassMixin0(callable, t1._evaluate0$_compileContext); + }, + $signature: 208 + }; + A._EvaluateVisitor__closure9.prototype = { + call$0() { + var t1 = this.$this._evaluate0$_environment, + t2 = A.stringReplaceAllUnchecked(this.name._string0$_text, "_", "-"), + t3 = this.module; + return t1.getMixin$2$namespace(t2, t3 == null ? null : t3._string0$_text); + }, + $signature: 88 + }; + A._EvaluateVisitor_closure35.prototype = { + call$1($arguments) { + var callableNode, t2, t3, t4, t5, t6, t7, invocation, callable, + t1 = J.getInterceptor$asx($arguments), + $function = t1.$index($arguments, 0), + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = this.$this; + callableNode = t1._evaluate0$_callableNode; + t2 = callableNode.get$span(callableNode); + t3 = callableNode.get$span(callableNode); + args._argument_list$_wereKeywordsAccessed = true; + t4 = args._argument_list$_keywords; + if (t4.get$isEmpty(t4)) + t4 = null; + else { + t5 = type$.Value_2; + t6 = A.LinkedHashMap_LinkedHashMap$_empty(t5, t5); + for (args._argument_list$_wereKeywordsAccessed = true, t4 = A.MapExtensions_get_pairs0(t4, type$.String, t5), t4 = t4.get$iterator(t4); t4.moveNext$0();) { + t7 = t4.get$current(t4); + t6.$indexSet(0, new A.SassString0(t7._0, false), t7._1); + } + t4 = new A.ValueExpression0(new A.SassMap0(A.ConstantMap_ConstantMap$from(t6, t5, t5)), callableNode.get$span(callableNode)); + } + invocation = A.ArgumentList$0(B.List_empty24, B.Map_empty14, B.Map_empty5, t2, t4, new A.ValueExpression0(args, t3)); + if ($function instanceof A.SassString0) { + A.warnForDeprecation0(string$.Passina + $function.toString$0(0) + "))", B.Deprecation_LIY); + callableNode = t1._evaluate0$_callableNode; + t2 = $function._string0$_text; + t3 = callableNode.get$span(callableNode); + return t1.visitFunctionExpression$1(0, new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(t2, "_", "-"), t2, invocation, t3)); + } + callable = $function.assertFunction$1("function").assertCompileContext$1(t1._evaluate0$_compileContext).callable; + if (type$.Callable_2._is(callable)) { + t2 = t1._evaluate0$_callableNode; + t2.toString; + return t1._evaluate0$_runFunctionCallable$3(invocation, callable, t2); + } else + throw A.wrapException(A.SassScriptException$0("The function " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 3 + }; + A._EvaluateVisitor_closure36.prototype = { + call$1($arguments) { + var withMap, t2, t3, values, span, configuration, + t1 = J.getInterceptor$asx($arguments), + url = A.Uri_parse(t1.$index($arguments, 0).assertString$1("url")._string0$_text); + t1 = t1.$index($arguments, 1).get$realNull(); + withMap = t1 == null ? null : t1.assertMap$1("with")._map0$_contents; + t1 = this.$this; + t2 = t1._evaluate0$_callableNode; + t2.toString; + if (withMap != null) { + t3 = {}; + values = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.ConfiguredValue_2); + span = t2.get$span(t2); + t3.privateDeprecation = false; + withMap.forEach$1(0, new A._EvaluateVisitor__closure7(t3, values, span, t2)); + configuration = new A.ExplicitConfiguration0(t2, values, null); + } else + configuration = B.Configuration_Map_empty_null0; + t3 = t2.get$span(t2); + t1._evaluate0$_loadModule$7$baseUrl$configuration$namesInErrors(url, "load-css()", t2, new A._EvaluateVisitor__closure8(t1), t3.get$sourceUrl(t3), configuration, true); + t1._evaluate0$_assertConfigurationIsEmpty$2$nameInError(configuration, true); + }, + $signature: 241 + }; + A._EvaluateVisitor__closure7.prototype = { + call$2(variable, value) { + var _this = this, + t1 = variable.assertString$1("with key"), + $name = A.stringReplaceAllUnchecked(t1._string0$_text, "_", "-"); + t1 = _this.values; + if (t1.containsKey$1($name)) + throw A.wrapException("The variable $" + $name + " was configured twice."); + else if (B.JSString_methods.startsWith$1($name, "-") && !_this._box_0.privateDeprecation) { + _this._box_0.privateDeprecation = true; + A.warnForDeprecation0("Configuring private variables (such as $" + $name + string$.x29x20is_dT, B.Deprecation_lkJ); + } + t1.$indexSet(0, $name, new A.ConfiguredValue0(value, _this.span, _this.callableNode)); + }, + $signature: 117 + }; + A._EvaluateVisitor__closure8.prototype = { + call$2(module, _) { + var t1 = this.$this; + return t1._evaluate0$_combineCss$2$clone(module, true).accept$1(t1); + }, + $signature: 91 + }; + A._EvaluateVisitor_closure37.prototype = { + call$1($arguments) { + var callableNode, invocation, callable, $content, + t1 = J.getInterceptor$asx($arguments), + mixin = t1.$index($arguments, 0), + args = type$.SassArgumentList_2._as(t1.$index($arguments, 1)); + t1 = this.$this; + callableNode = t1._evaluate0$_callableNode; + invocation = A.ArgumentList$0(B.List_empty24, B.Map_empty14, B.Map_empty5, callableNode.get$span(callableNode), null, new A.ValueExpression0(args, callableNode.get$span(callableNode))); + callable = mixin.assertMixin$1("mixin").assertCompileContext$1(t1._evaluate0$_compileContext).callable; + $content = t1._evaluate0$_environment._environment0$_content; + if (type$.Callable_2._is(callable)) + t1._evaluate0$_applyMixin$5(callable, $content, invocation, callableNode, callableNode); + else + throw A.wrapException(A.SassScriptException$0("The mixin " + callable.get$name(callable) + string$.x20is_as, null)); + }, + $signature: 241 + }; + A._EvaluateVisitor_run_closure1.prototype = { + call$0() { + var module, _this = this, + t1 = _this.node, + t2 = t1.span, + _0_0 = t2.get$sourceUrl(t2), + url = null; + if (_0_0 != null) { + url = _0_0; + t2 = _this.$this; + t2._evaluate0$_activeModules.$indexSet(0, url, null); + if (!(t2._nodeImporter != null && J.toString$0$(url) === "stdin")) + t2._evaluate0$_loadedUrls.add$1(0, url); + } + t2 = _this.$this; + module = t2._evaluate0$_addExceptionTrace$1(new A._EvaluateVisitor_run__closure1(t2, _this.importer, t1)); + return new A._Record_2_loadedUrls_stylesheet(t2._evaluate0$_loadedUrls, t2._evaluate0$_combineCss$1(module)); + }, + $signature: 459 + }; + A._EvaluateVisitor_run__closure1.prototype = { + call$0() { + return this.$this._evaluate0$_execute$2(this.importer, this.node); + }, + $signature: 460 + }; + A._EvaluateVisitor__loadModule_closure3.prototype = { + call$0() { + return this.callback.call$2(this._box_0.builtInModule, false); + }, + $signature: 0 + }; + A._EvaluateVisitor__loadModule_closure4.prototype = { + call$0() { + var canonicalUrl, oldInDependency, t4, message, _this = this, t1 = {}, stylesheet = null, importer = null, + t2 = _this.$this, + t3 = _this.nodeWithSpan, + _1_0 = t2._evaluate0$_loadStylesheet$3$baseUrl(_this.url.toString$0(0), t3.get$span(t3), _this.baseUrl); + stylesheet = _1_0._0; + importer = _1_0._1; + t4 = stylesheet.span; + canonicalUrl = t4.get$sourceUrl(t4); + if (canonicalUrl != null) { + t4 = t2._evaluate0$_activeModules; + if (t4.containsKey$1(canonicalUrl)) { + message = _this.namesInErrors ? "Module loop: " + $.$get$context().prettyUri$1(canonicalUrl) + " is already being loaded." : string$.Modulel; + t1 = A.NullableExtension_andThen0(t4.$index(0, canonicalUrl), new A._EvaluateVisitor__loadModule__closure3(t2, message)); + throw A.wrapException(t1 == null ? t2._evaluate0$_exception$1(message) : t1); + } else + t4.$indexSet(0, canonicalUrl, t3); + } + t4 = t2._evaluate0$_modules.containsKey$1(canonicalUrl); + oldInDependency = t2._evaluate0$_inDependency; + t2._evaluate0$_inDependency = _1_0._2; + t1.module = null; + try { + t1.module = t2._evaluate0$_execute$5$configuration$namesInErrors$nodeWithSpan(importer, stylesheet, _this.configuration, _this.namesInErrors, t3); + } finally { + t2._evaluate0$_activeModules.remove$1(0, canonicalUrl); + t2._evaluate0$_inDependency = oldInDependency; + } + t2._evaluate0$_addExceptionSpan$3$addStackFrame(t3, new A._EvaluateVisitor__loadModule__closure4(t1, _this.callback, !t4), false); + }, + $signature: 1 + }; + A._EvaluateVisitor__loadModule__closure3.prototype = { + call$1(previousLoad) { + return this.$this._evaluate0$_multiSpanException$3(this.message, "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 98 + }; + A._EvaluateVisitor__loadModule__closure4.prototype = { + call$0() { + return this.callback.call$2(this._box_1.module, this.firstLoad); + }, + $signature: 0 + }; + A._EvaluateVisitor__execute_closure1.prototype = { + call$0() { + var t3, t4, t5, t6, _this = this, + t1 = _this.$this, + oldImporter = t1._evaluate0$_importer, + oldStylesheet = t1._evaluate0$__stylesheet, + oldRoot = t1._evaluate0$__root, + oldPreModuleComments = t1._evaluate0$_preModuleComments, + oldParent = t1._evaluate0$__parent, + oldEndOfImports = t1._evaluate0$__endOfImports, + oldOutOfOrderImports = t1._evaluate0$_outOfOrderImports, + oldExtensionStore = t1._evaluate0$__extensionStore, + t2 = t1._evaluate0$_atRootExcludingStyleRule, + oldStyleRule = t2 ? null : t1._evaluate0$_styleRuleIgnoringAtRoot, + oldMediaQueries = t1._evaluate0$_mediaQueries, + oldDeclarationName = t1._evaluate0$_declarationName, + oldInUnknownAtRule = t1._evaluate0$_inUnknownAtRule, + oldInKeyframes = t1._evaluate0$_inKeyframes, + oldConfiguration = t1._evaluate0$_configuration; + t1._evaluate0$_importer = _this.importer; + t3 = t1._evaluate0$__stylesheet = _this.stylesheet; + t4 = t3.span; + t5 = t1._evaluate0$__parent = t1._evaluate0$__root = A.ModifiableCssStylesheet$0(t4); + t1._evaluate0$__endOfImports = 0; + t1._evaluate0$_outOfOrderImports = null; + t1._evaluate0$__extensionStore = _this.extensionStore; + t1._evaluate0$_declarationName = t1._evaluate0$_mediaQueries = t1._evaluate0$_styleRuleIgnoringAtRoot = null; + t1._evaluate0$_inKeyframes = t1._evaluate0$_atRootExcludingStyleRule = t1._evaluate0$_inUnknownAtRule = false; + t6 = _this.configuration; + if (t6 != null) + t1._evaluate0$_configuration = t6; + t1.visitStylesheet$1(0, t3); + t3 = t1._evaluate0$_outOfOrderImports == null ? t5 : new A.CssStylesheet0(new A.UnmodifiableListView(t1._evaluate0$_addOutOfOrderImports$0(), type$.UnmodifiableListView_CssNode_2), t4); + _this.css.__late_helper$_value = t3; + _this.preModuleComments.__late_helper$_value = t1._evaluate0$_preModuleComments; + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = oldStylesheet; + t1._evaluate0$__root = oldRoot; + t1._evaluate0$_preModuleComments = oldPreModuleComments; + t1._evaluate0$__parent = oldParent; + t1._evaluate0$__endOfImports = oldEndOfImports; + t1._evaluate0$_outOfOrderImports = oldOutOfOrderImports; + t1._evaluate0$__extensionStore = oldExtensionStore; + t1._evaluate0$_styleRuleIgnoringAtRoot = oldStyleRule; + t1._evaluate0$_mediaQueries = oldMediaQueries; + t1._evaluate0$_declarationName = oldDeclarationName; + t1._evaluate0$_inUnknownAtRule = oldInUnknownAtRule; + t1._evaluate0$_atRootExcludingStyleRule = t2; + t1._evaluate0$_inKeyframes = oldInKeyframes; + t1._evaluate0$_configuration = oldConfiguration; + }, + $signature: 1 + }; + A._EvaluateVisitor__combineCss_closure3.prototype = { + call$1(module) { + return module.get$transitivelyContainsCss(); + }, + $signature: 85 + }; + A._EvaluateVisitor__combineCss_closure4.prototype = { + call$1(target) { + return !this.selectors.contains$1(0, target); + }, + $signature: 15 + }; + A._EvaluateVisitor__combineCss_visitModule1.prototype = { + call$1(module) { + var t1, t2, t3, t4, _i, upstream, _1_0, statements, index, _this = this; + if (!_this.seen.add$1(0, module)) + return; + if (_this.clone) + module = module.cloneCss$0(); + for (t1 = module.get$upstream(), t2 = t1.length, t3 = _this.css, t4 = _this.imports, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + upstream = t1[_i]; + if (upstream.get$transitivelyContainsCss()) { + _1_0 = module.get$preModuleComments().$index(0, upstream); + if (_1_0 != null) + B.JSArray_methods.addAll$1(t3.length === 0 ? t4 : t3, _1_0); + _this.call$1(upstream); + } + } + _this.sorted.addFirst$1(module); + t1 = module.get$css(module); + statements = t1.get$children(t1); + index = _this.$this._evaluate0$_indexAfterImports$1(statements); + t1 = J.getInterceptor$ax(statements); + B.JSArray_methods.addAll$1(t4, t1.getRange$2(statements, 0, index)); + B.JSArray_methods.addAll$1(t3, t1.getRange$2(statements, index, t1.get$length(statements))); + }, + $signature: 461 + }; + A._EvaluateVisitor__extendModules_closure3.prototype = { + call$1(target) { + return !this.originalSelectors.contains$1(0, target); + }, + $signature: 15 + }; + A._EvaluateVisitor__extendModules_closure4.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_ExtensionStore_2); + }, + $signature: 211 + }; + A._EvaluateVisitor_visitAtRootRule_closure3.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRootRule_closure4.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 0 + }; + A._EvaluateVisitor__scopeForAtRoot_closure11.prototype = { + call$1(callback) { + var t1 = this.$this, + oldParent = t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent"); + t1._evaluate0$__parent = this.newParent; + t1._evaluate0$_environment.scope$1$2$when(callback, this.node.hasDeclarations, type$.void); + t1._evaluate0$__parent = oldParent; + }, + $signature: 35 + }; + A._EvaluateVisitor__scopeForAtRoot_closure12.prototype = { + call$1(callback) { + var t1 = this.$this, + oldAtRootExcludingStyleRule = t1._evaluate0$_atRootExcludingStyleRule; + t1._evaluate0$_atRootExcludingStyleRule = true; + this.innerScope.call$1(callback); + t1._evaluate0$_atRootExcludingStyleRule = oldAtRootExcludingStyleRule; + }, + $signature: 35 + }; + A._EvaluateVisitor__scopeForAtRoot_closure13.prototype = { + call$1(callback) { + return this.$this._evaluate0$_withMediaQueries$3(null, null, new A._EvaluateVisitor__scopeForAtRoot__closure1(this.innerScope, callback)); + }, + $signature: 35 + }; + A._EvaluateVisitor__scopeForAtRoot__closure1.prototype = { + call$0() { + return this.innerScope.call$1(this.callback); + }, + $signature: 1 + }; + A._EvaluateVisitor__scopeForAtRoot_closure14.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInKeyframes = t1._evaluate0$_inKeyframes; + t1._evaluate0$_inKeyframes = false; + this.innerScope.call$1(callback); + t1._evaluate0$_inKeyframes = wasInKeyframes; + }, + $signature: 35 + }; + A._EvaluateVisitor__scopeForAtRoot_closure15.prototype = { + call$1($parent) { + return $parent instanceof A.ModifiableCssAtRule0; + }, + $signature: 212 + }; + A._EvaluateVisitor__scopeForAtRoot_closure16.prototype = { + call$1(callback) { + var t1 = this.$this, + wasInUnknownAtRule = t1._evaluate0$_inUnknownAtRule; + t1._evaluate0$_inUnknownAtRule = false; + this.innerScope.call$1(callback); + t1._evaluate0$_inUnknownAtRule = wasInUnknownAtRule; + }, + $signature: 35 + }; + A._EvaluateVisitor_visitContentRule_closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.content.declaration.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + return null; + }, + $signature: 1 + }; + A._EvaluateVisitor_visitDeclaration_closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this._box_0.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitEachRule_closure5.prototype = { + call$1(value) { + var t1 = this.$this, + t2 = this.nodeWithSpan; + return t1._evaluate0$_environment.setLocalVariable$3(this._box_0.variable, t1._evaluate0$_withoutSlash$2(value, t2), t2); + }, + $signature: 63 + }; + A._EvaluateVisitor_visitEachRule_closure6.prototype = { + call$1(value) { + return this.$this._evaluate0$_setMultipleVariables$3(this._box_1.variables, value, this.nodeWithSpan); + }, + $signature: 63 + }; + A._EvaluateVisitor_visitEachRule_closure7.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + return t1._evaluate0$_handleReturn$2(_this.list.get$asList(), new A._EvaluateVisitor_visitEachRule__closure1(t1, _this.setVariables, _this.node)); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitEachRule__closure1.prototype = { + call$1(element) { + var t1; + this.setVariables.call$1(element); + t1 = this.$this; + return t1._evaluate0$_handleReturn$2(this.node.children, new A._EvaluateVisitor_visitEachRule___closure1(t1)); + }, + $signature: 242 + }; + A._EvaluateVisitor_visitEachRule___closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 115 + }; + A._EvaluateVisitor_visitAtRule_closure7.prototype = { + call$1(value) { + return this.$this._evaluate0$_interpolationToValue$3$trim$warnForColor(value, true, true); + }, + $signature: 696 + }; + A._EvaluateVisitor_visitAtRule_closure8.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule_closure9.prototype = { + call$0() { + var t2, t3, _i, _this = this, + t1 = _this.$this, + styleRule = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (styleRule == null || t1._evaluate0$_inKeyframes || _this.name.value === "font-face") + for (t2 = _this.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + else + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(styleRule._style_rule0$_selector, styleRule.span, false, styleRule.originalSelector), new A._EvaluateVisitor_visitAtRule__closure1(t1, _this.children), false, type$.ModifiableCssStyleRule_2, type$.Null); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitAtRule_closure10.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitForRule_closure9.prototype = { + call$0() { + return this.node.from.accept$1(this.$this).assertNumber$0(); + }, + $signature: 243 + }; + A._EvaluateVisitor_visitForRule_closure10.prototype = { + call$0() { + return this.node.to.accept$1(this.$this).assertNumber$0(); + }, + $signature: 243 + }; + A._EvaluateVisitor_visitForRule_closure11.prototype = { + call$0() { + return this.fromNumber.assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure12.prototype = { + call$0() { + var t1 = this.fromNumber; + return this.toNumber.coerce$2(t1.get$numeratorUnits(t1), t1.get$denominatorUnits(t1)).assertInt$0(); + }, + $signature: 10 + }; + A._EvaluateVisitor_visitForRule_closure13.prototype = { + call$0() { + var i, t3, t4, t5, t6, t7, t8, _0_0, _this = this, + t1 = _this.$this, + t2 = _this.node, + nodeWithSpan = t1._evaluate0$_expressionNode$1(t2.from); + for (i = _this.from, t3 = _this._box_0, t4 = _this.direction, t5 = t2.variable, t6 = _this.fromNumber, t2 = t2.children; i !== t3.to; i += t4) { + t7 = t1._evaluate0$_environment; + t8 = t6.get$numeratorUnits(t6); + t7.setLocalVariable$3(t5, A.SassNumber_SassNumber$withUnits0(i, t6.get$denominatorUnits(t6), t8), nodeWithSpan); + _0_0 = t1._evaluate0$_handleReturn$2(t2, new A._EvaluateVisitor_visitForRule__closure1(t1)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + $signature: 42 + }; + A._EvaluateVisitor_visitForRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 115 + }; + A._EvaluateVisitor_visitForwardRule_closure3.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._evaluate0$_registerCommentsForModule$1(module); + this.$this._evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 91 + }; + A._EvaluateVisitor_visitForwardRule_closure4.prototype = { + call$2(module, firstLoad) { + if (firstLoad) + this.$this._evaluate0$_registerCommentsForModule$1(module); + this.$this._evaluate0$_environment.forwardModule$2(module, this.node); + }, + $signature: 91 + }; + A._EvaluateVisitor__registerCommentsForModule_closure1.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_CssComment_2); + }, + $signature: 215 + }; + A._EvaluateVisitor_visitIfRule_closure1.prototype = { + call$1(clause) { + var t1 = this.$this; + return t1._evaluate0$_environment.scope$1$3$semiGlobal$when(new A._EvaluateVisitor_visitIfRule__closure1(t1, clause), true, clause.hasDeclarations, type$.nullable_Value_2); + }, + $signature: 466 + }; + A._EvaluateVisitor_visitIfRule__closure1.prototype = { + call$0() { + var t1 = this.$this; + return t1._evaluate0$_handleReturn$2(this.clause.children, new A._EvaluateVisitor_visitIfRule___closure1(t1)); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitIfRule___closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 115 + }; + A._EvaluateVisitor__visitDynamicImport_closure1.prototype = { + call$0() { + var t1, t2, _0_0, stylesheet, importer, isDependency, t3, url, oldImporter, oldStylesheet, oldInDependency, loadsUserDefinedModules, children, t4, t5, t6, t7, t8, t9, t10, t11, environment, module, visitor, _box_0 = {}; + _box_0.isDependency = _box_0.importer = _box_0.stylesheet = null; + t1 = this.$this; + t2 = this.$import; + _0_0 = t1._evaluate0$_loadStylesheet$3$forImport(t2.urlString, t2.span, true); + stylesheet = _box_0.stylesheet = _0_0._0; + importer = _0_0._1; + _box_0.importer = importer; + isDependency = _0_0._2; + _box_0.isDependency = isDependency; + t3 = stylesheet.span; + url = t3.get$sourceUrl(t3); + if (url != null) { + t3 = t1._evaluate0$_activeModules; + if (t3.containsKey$1(url)) { + t2 = A.NullableExtension_andThen0(t3.$index(0, url), new A._EvaluateVisitor__visitDynamicImport__closure7(t1)); + throw A.wrapException(t2 == null ? t1._evaluate0$_exception$1("This file is already being loaded.") : t2); + } + t3.$indexSet(0, url, t2); + } + t2 = stylesheet._stylesheet1$_uses; + t3 = type$.UnmodifiableListView_UseRule_2; + if (new A.UnmodifiableListView(t2, t3).get$length(0) === 0 && new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2).get$length(0) === 0) { + oldImporter = t1._evaluate0$_importer; + oldStylesheet = t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, "_stylesheet"); + oldInDependency = t1._evaluate0$_inDependency; + t1._evaluate0$_importer = importer; + t1._evaluate0$__stylesheet = stylesheet; + t1._evaluate0$_inDependency = isDependency; + t1.visitStylesheet$1(0, stylesheet); + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = oldStylesheet; + t1._evaluate0$_inDependency = oldInDependency; + t1._evaluate0$_activeModules.remove$1(0, url); + return; + } + t2 = new A.UnmodifiableListView(t2, t3); + if (!t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure8())) { + t2 = new A.UnmodifiableListView(stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + loadsUserDefinedModules = t2.any$1(t2, new A._EvaluateVisitor__visitDynamicImport__closure9()); + } else + loadsUserDefinedModules = true; + children = A._Cell$(); + t2 = t1._evaluate0$_environment; + t3 = type$.String; + t4 = type$.Module_Callable_2; + t5 = type$.AstNode_2; + t6 = t2._environment0$_nestedForwardedModules; + t7 = A._setArrayType([], type$.JSArray_Module_Callable_2); + t8 = t2._environment0$_variables; + t8 = A._setArrayType(t8.slice(0), A._arrayInstanceType(t8)); + t9 = t2._environment0$_variableNodes; + t9 = A._setArrayType(t9.slice(0), A._arrayInstanceType(t9)); + t10 = t2._environment0$_functions; + t10 = A._setArrayType(t10.slice(0), A._arrayInstanceType(t10)); + t11 = t2._environment0$_mixins; + t11 = A._setArrayType(t11.slice(0), A._arrayInstanceType(t11)); + environment = A.Environment$_0(A.LinkedHashMap_LinkedHashMap$_empty(t3, t4), A.LinkedHashMap_LinkedHashMap$_empty(t3, t5), A.LinkedHashMap_LinkedHashMap$_empty(t4, t5), t2._environment0$_importedModules, null, t6, t7, t8, t9, t10, t11, t2._environment0$_content, t2._environment0$_configurableVariables); + t1._evaluate0$_withEnvironment$2(environment, new A._EvaluateVisitor__visitDynamicImport__closure10(_box_0, t1, loadsUserDefinedModules, environment, children)); + module = environment.toDummyModule$0(); + t1._evaluate0$_environment.importForwards$1(module); + if (loadsUserDefinedModules) { + if (module.transitivelyContainsCss) + t1._evaluate0$_combineCss$2$clone(module, module.transitivelyContainsExtensions).accept$1(t1); + visitor = new A._ImportedCssVisitor1(t1); + for (t2 = J.get$iterator$ax(children._readLocal$0()); t2.moveNext$0();) + t2.get$current(t2).accept$1(visitor); + } + t1._evaluate0$_activeModules.remove$1(0, url); + }, + $signature: 0 + }; + A._EvaluateVisitor__visitDynamicImport__closure7.prototype = { + call$1(previousLoad) { + return this.$this._evaluate0$_multiSpanException$3("This file is already being loaded.", "new load", A.LinkedHashMap_LinkedHashMap$_literal([previousLoad.get$span(previousLoad), "original load"], type$.FileSpan, type$.String)); + }, + $signature: 98 + }; + A._EvaluateVisitor__visitDynamicImport__closure8.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 142 + }; + A._EvaluateVisitor__visitDynamicImport__closure9.prototype = { + call$1(rule) { + return rule.url.get$scheme() !== "sass"; + }, + $signature: 216 + }; + A._EvaluateVisitor__visitDynamicImport__closure10.prototype = { + call$0() { + var t3, t4, _this = this, + t1 = _this.$this, + oldImporter = t1._evaluate0$_importer, + oldStylesheet = t1._evaluate0$_assertInModule$2(t1._evaluate0$__stylesheet, "_stylesheet"), + oldRoot = t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root"), + oldParent = t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent"), + oldEndOfImports = t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, "_endOfImports"), + oldOutOfOrderImports = t1._evaluate0$_outOfOrderImports, + oldConfiguration = t1._evaluate0$_configuration, + oldInDependency = t1._evaluate0$_inDependency, + t2 = _this._box_0; + t1._evaluate0$_importer = t2.importer; + t3 = t2.stylesheet; + t1._evaluate0$__stylesheet = t3; + t4 = _this.loadsUserDefinedModules; + if (t4) { + t3 = A.ModifiableCssStylesheet$0(t3.span); + t1._evaluate0$__root = t3; + t1._evaluate0$__parent = t1._evaluate0$_assertInModule$2(t3, "_root"); + t1._evaluate0$__endOfImports = 0; + t1._evaluate0$_outOfOrderImports = null; + } + t1._evaluate0$_inDependency = t2.isDependency; + t3 = new A.UnmodifiableListView(t2.stylesheet._stylesheet1$_forwards, type$.UnmodifiableListView_ForwardRule_2); + if (!t3.get$isEmpty(t3)) + t1._evaluate0$_configuration = _this.environment.toImplicitConfiguration$0(); + t1.visitStylesheet$1(0, t2.stylesheet); + t2 = t4 ? t1._evaluate0$_addOutOfOrderImports$0() : A._setArrayType([], type$.JSArray_ModifiableCssNode_2); + _this.children.__late_helper$_value = t2; + t1._evaluate0$_importer = oldImporter; + t1._evaluate0$__stylesheet = oldStylesheet; + if (t4) { + t1._evaluate0$__root = oldRoot; + t1._evaluate0$__parent = oldParent; + t1._evaluate0$__endOfImports = oldEndOfImports; + t1._evaluate0$_outOfOrderImports = oldOutOfOrderImports; + } + t1._evaluate0$_configuration = oldConfiguration; + t1._evaluate0$_inDependency = oldInDependency; + }, + $signature: 1 + }; + A._EvaluateVisitor__applyMixin_closure3.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + t1._evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin__closure4(t1, _this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent)); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin__closure4.prototype = { + call$0() { + var _this = this; + _this.$this._evaluate0$_runBuiltInCallable$3(_this.$arguments, _this.mixin, _this.nodeWithSpanWithoutContent); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin_closure4.prototype = { + call$0() { + var _this = this, + t1 = _this.$this; + t1._evaluate0$_environment.withContent$2(_this.contentCallable, new A._EvaluateVisitor__applyMixin__closure3(t1, _this.mixin, _this.nodeWithSpanWithoutContent)); + }, + $signature: 1 + }; + A._EvaluateVisitor__applyMixin__closure3.prototype = { + call$0() { + var t1 = this.$this; + t1._evaluate0$_environment.asMixin$1(new A._EvaluateVisitor__applyMixin___closure1(t1, this.mixin, this.nodeWithSpanWithoutContent)); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin___closure1.prototype = { + call$0() { + var t1, t2, t3, t4, _i; + for (t1 = this.mixin.declaration.children, t2 = t1.length, t3 = this.$this, t4 = this.nodeWithSpanWithoutContent, _i = 0; _i < t2; ++_i) + t3._evaluate0$_addErrorSpan$2(t4, new A._EvaluateVisitor__applyMixin____closure1(t3, t1[_i])); + }, + $signature: 0 + }; + A._EvaluateVisitor__applyMixin____closure1.prototype = { + call$0() { + return this.statement.accept$1(this.$this); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitIncludeRule_closure5.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getMixin$2$namespace(t1.name, t1.namespace); + }, + $signature: 88 + }; + A._EvaluateVisitor_visitIncludeRule_closure6.prototype = { + call$1($content) { + var t1 = this.$this; + return new A.UserDefinedCallable0($content, t1._evaluate0$_environment.closure$0(), t1._evaluate0$_inDependency, type$.UserDefinedCallable_Environment_2); + }, + $signature: 467 + }; + A._EvaluateVisitor_visitIncludeRule_closure7.prototype = { + call$0() { + return this.node.get$spanWithoutContent(); + }, + $signature: 16 + }; + A._EvaluateVisitor_visitMediaRule_closure7.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule_closure8.prototype = { + call$1(mediaQueries) { + return this.$this._evaluate0$_mergeMediaQueries$2(mediaQueries, this.queries); + }, + $signature: 104 + }; + A._EvaluateVisitor_visitMediaRule_closure9.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.queries; + t1._evaluate0$_withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitMediaRule__closure1(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule__closure1.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitMediaRule___closure1(t1, this.node), false, type$.ModifiableCssStyleRule_2, type$.Null); + else + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule___closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitMediaRule_closure10.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitStyleRule_closure7.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure8.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitStyleRule_closure10.prototype = { + call$0() { + var t1 = this.$this; + t1._evaluate0$_withStyleRule$2(this.rule, new A._EvaluateVisitor_visitStyleRule__closure1(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitStyleRule_closure9.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor__warnForBogusCombinators_closure1.prototype = { + call$1(child) { + return child instanceof A.ModifiableCssComment0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitSupportsRule_closure5.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule_closure6.prototype = { + call$0() { + var t2, t3, _i, + t1 = this.$this, + _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitSupportsRule__closure1(t1, this.node), type$.ModifiableCssStyleRule_2, type$.Null); + else + for (t2 = this.node.children, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(t1); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule__closure1.prototype = { + call$0() { + var t1, t2, t3, _i; + for (t1 = this.node.children, t2 = t1.length, t3 = this.$this, _i = 0; _i < t2; ++_i) + t1[_i].accept$1(t3); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitSupportsRule_closure7.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor__visitSupportsCondition_closure1.prototype = { + call$0() { + var t4, + t1 = this.$this, + t2 = this._box_0, + t3 = t2.declaration.name; + t3 = t1._evaluate0$_serialize$3$quote(t3.accept$1(t1), t3, true); + t4 = t2.declaration.get$isCustomProperty() ? "" : " "; + t2 = t2.declaration.value; + return "(" + t3 + ":" + t4 + t1._evaluate0$_serialize$3$quote(t2.accept$1(t1), t2, true) + ")"; + }, + $signature: 29 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure5.prototype = { + call$0() { + var t1 = this.$this._evaluate0$_environment, + t2 = this._box_0.override; + t1.setVariable$4$global(this.node.name, t2.value, t2.assignmentNode, true); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure6.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitVariableDeclaration_closure7.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + t1._evaluate0$_environment.setVariable$5$global$namespace(t2.name, this.value, t1._evaluate0$_expressionNode$1(t2.expression), t2.isGlobal, t2.namespace); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitUseRule_closure1.prototype = { + call$2(module, firstLoad) { + var t1, t2, t3, _0_0, t4, t5, span; + if (firstLoad) + this.$this._evaluate0$_registerCommentsForModule$1(module); + t1 = this.$this._evaluate0$_environment; + t2 = this.node; + t3 = t2.namespace; + if (t3 == null) { + t1._environment0$_globalModules.$indexSet(0, module, t2); + t1._environment0$_allModules.push(module); + t1 = B.JSArray_methods.get$first(t1._environment0$_variables); + _0_0 = A.IterableExtension_firstWhereOrNull(t1.get$keys(t1), module.get$variables().get$containsKey()); + if (_0_0 != null) + A.throwExpression(A.SassScriptException$0(string$.This_ma + _0_0 + '".', null)); + } else { + t4 = t1._environment0$_modules; + if (t4.containsKey$1(t3)) { + t5 = t1._environment0$_namespaceNodes.$index(0, t3); + span = t5 == null ? null : t5.span; + t5 = A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String); + if (span != null) + t5.$indexSet(0, span, "original @use"); + A.throwExpression(A.MultiSpanSassScriptException$0(string$.There_ + t3 + '".', "new @use", t5)); + } + t4.$indexSet(0, t3, module); + t1._environment0$_namespaceNodes.$indexSet(0, t3, t2); + t1._environment0$_allModules.push(module); + } + }, + $signature: 91 + }; + A._EvaluateVisitor_visitWarnRule_closure1.prototype = { + call$0() { + return this.node.expression.accept$1(this.$this); + }, + $signature: 46 + }; + A._EvaluateVisitor_visitWhileRule_closure1.prototype = { + call$0() { + var t1, t2, t3, _0_0; + for (t1 = this.node, t2 = t1.condition, t3 = this.$this, t1 = t1.children; t2.accept$1(t3).get$isTruthy();) { + _0_0 = t3._evaluate0$_handleReturn$2(t1, new A._EvaluateVisitor_visitWhileRule__closure1(t3)); + if (_0_0 != null) + return _0_0; + } + return null; + }, + $signature: 42 + }; + A._EvaluateVisitor_visitWhileRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 115 + }; + A._EvaluateVisitor_visitBinaryOperationExpression_closure1.prototype = { + call$0() { + var t1 = this.node, + t2 = this.$this, + left = t1.left.accept$1(t2); + switch (t1.operator.index) { + case 0: + t1 = t1.right.accept$1(t2); + t1 = new A.SassString0(A.serializeValue0(left, false, true) + "=" + A.serializeValue0(t1, false, true), false); + break; + case 1: + t1 = left.get$isTruthy() ? left : t1.right.accept$1(t2); + break; + case 2: + t1 = left.get$isTruthy() ? t1.right.accept$1(t2) : left; + break; + case 3: + t1 = left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + break; + case 4: + t1 = !left.$eq(0, t1.right.accept$1(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + break; + case 5: + t1 = left.greaterThan$1(t1.right.accept$1(t2)); + break; + case 6: + t1 = left.greaterThanOrEquals$1(t1.right.accept$1(t2)); + break; + case 7: + t1 = left.lessThan$1(t1.right.accept$1(t2)); + break; + case 8: + t1 = left.lessThanOrEquals$1(t1.right.accept$1(t2)); + break; + case 9: + t1 = left.plus$1(t1.right.accept$1(t2)); + break; + case 10: + t1 = left.minus$1(t1.right.accept$1(t2)); + break; + case 11: + t1 = left.times$1(t1.right.accept$1(t2)); + break; + case 12: + t1 = t2._evaluate0$_slash$3(left, t1.right.accept$1(t2), t1); + break; + case 13: + t1 = left.modulo$1(t1.right.accept$1(t2)); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 46 + }; + A._EvaluateVisitor__slash_recommendation1.prototype = { + call$1(expression) { + var t1; + $label0$0: { + if (expression instanceof A.BinaryOperationExpression0 && B.BinaryOperator_ehp0 === expression.operator) { + t1 = "math.div(" + A.S(this.call$1(expression.left)) + ", " + A.S(this.call$1(expression.right)) + ")"; + break $label0$0; + } + if (expression instanceof A.ParenthesizedExpression0) { + t1 = expression.expression.toString$0(0); + break $label0$0; + } + t1 = expression.toString$0(0); + break $label0$0; + } + return t1; + }, + $signature: 120 + }; + A._EvaluateVisitor_visitVariableExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getVariable$2$namespace(t1.name, t1.namespace); + }, + $signature: 42 + }; + A._EvaluateVisitor_visitUnaryOperationExpression_closure1.prototype = { + call$0() { + var t1, _this = this; + switch (_this.node.operator.index) { + case 0: + t1 = _this.operand.unaryPlus$0(); + break; + case 1: + t1 = _this.operand.unaryMinus$0(); + break; + case 2: + t1 = new A.SassString0("/" + A.serializeValue0(_this.operand, false, true), false); + break; + case 3: + t1 = _this.operand.unaryNot$0(); + break; + default: + t1 = null; + } + return t1; + }, + $signature: 46 + }; + A._EvaluateVisitor_visitIfExpression_closure1.prototype = { + call$1(pair) { + return pair._0 + ": " + pair._1.toString$0(0); + }, + $signature: 217 + }; + A._EvaluateVisitor_visitIfConditionOperation_closure1.prototype = { + call$1(pair) { + return pair._1; + }, + $signature: 218 + }; + A._EvaluateVisitor_visitListExpression_closure1.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 468 + }; + A._EvaluateVisitor_visitFunctionExpression_closure5.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_environment.getFunction$2$namespace(t1.name, t1.namespace); + }, + $signature: 88 + }; + A._EvaluateVisitor_visitFunctionExpression_closure6.prototype = { + call$1(argument) { + return argument.accept$1(B.C_IsCalculationSafeVisitor0); + }, + $signature: 81 + }; + A._EvaluateVisitor_visitFunctionExpression_closure7.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_runFunctionCallable$3(t1.$arguments, this._box_0.$function, t1); + }, + $signature: 46 + }; + A._EvaluateVisitor__visitCalculation_closure1.prototype = { + call$2(message, deprecation) { + return this.$this._evaluate0$_warn$3(message, this.node.span, deprecation); + }, + call$1(message) { + return this.call$2(message, null); + }, + $signature: 110 + }; + A._EvaluateVisitor__checkCalculationArguments_check1.prototype = { + call$1(maxArgs) { + var t1 = this.node, + t2 = t1.$arguments.positional.length; + if (t2 === 0) + throw A.wrapException(this.$this._evaluate0$_exception$2("Missing argument.", t1.span)); + else if (maxArgs != null && t2 > maxArgs) + throw A.wrapException(this.$this._evaluate0$_exception$2("Only " + A.S(maxArgs) + " " + A.pluralize0("argument", maxArgs, null) + " allowed, but " + t2 + " " + A.pluralize0("was", t2, "were") + " passed.", t1.span)); + }, + call$0() { + return this.call$1(null); + }, + $signature: 82 + }; + A._EvaluateVisitor__visitCalculationExpression_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this._box_0, + t3 = _this.node, + t4 = _this.inLegacySassFunction; + return A.SassCalculation_operateInternal0(t1._evaluate0$_binaryOperatorToCalculationOperator$2(t2.operator, t3), t1._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.left, t4), t1._evaluate0$_visitCalculationExpression$2$inLegacySassFunction(t2.right, t4), t4, !t1._evaluate0$_inSupportsDeclaration, new A._EvaluateVisitor__visitCalculationExpression__closure1(t1, t3)); + }, + $signature: 83 + }; + A._EvaluateVisitor__visitCalculationExpression__closure1.prototype = { + call$2(message, deprecation) { + return this.$this._evaluate0$_warn$3(message, this.node.get$span(0), deprecation); + }, + call$1(message) { + return this.call$2(message, null); + }, + $signature: 110 + }; + A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1.prototype = { + call$0() { + var t1 = this.node; + return this.$this._evaluate0$_runFunctionCallable$3(t1.$arguments, this.$function, t1); + }, + $signature: 46 + }; + A._EvaluateVisitor__runUserDefinedCallable_closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.callable; + return t1._evaluate0$_withEnvironment$2(t2.environment.closure$0(), new A._EvaluateVisitor__runUserDefinedCallable__closure1(t1, _this.evaluated, t2, _this.nodeWithSpan, _this.run, _this.V)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable__closure1.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.V; + return t1._evaluate0$_environment.scope$1$1(new A._EvaluateVisitor__runUserDefinedCallable___closure1(t1, _this.evaluated, _this.callable, _this.nodeWithSpan, _this.run, t2), t2); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable___closure1.prototype = { + call$0() { + var parameters, t5, minLength, i, parameter, t6, value, t7, t8, restParameter, rest, argumentList, result, parameterWord, _this = this, + t1 = _this.$this, + t2 = _this.evaluated._values, + t3 = _this.callable.declaration.parameters, + t4 = _this.nodeWithSpan; + t1._evaluate0$_verifyArguments$4(t2[2].length, t2[0], t3, t4); + parameters = t3.parameters; + t5 = parameters.length; + minLength = Math.min(t2[2].length, t5); + for (i = 0; i < minLength; ++i) + t1._evaluate0$_environment.setLocalVariable$3(parameters[i].name, t2[2][i], t2[3][i]); + for (i = t2[2].length; i < t5; ++i) { + parameter = parameters[i]; + t6 = parameter.name; + value = t2[0].remove$1(0, t6); + if (value == null) { + t7 = parameter.defaultValue; + value = t1._evaluate0$_withoutSlash$2(t7.accept$1(t1), t1._evaluate0$_expressionNode$1(t7)); + } + t7 = t1._evaluate0$_environment; + t8 = t2[1].$index(0, t6); + if (t8 == null) { + t8 = parameter.defaultValue; + t8.toString; + t8 = t1._evaluate0$_expressionNode$1(t8); + } + t7.setLocalVariable$3(t6, value, t8); + } + restParameter = t3.restParameter; + if (restParameter != null) { + t6 = t2[2]; + rest = t6.length > t5 ? B.JSArray_methods.sublist$1(t6, t5) : B.List_empty23; + t5 = t2[0]; + t6 = t2[4]; + argumentList = A.SassArgumentList$0(rest, t5, t6 === B.ListSeparator_undecided_null_3_undecided0 ? B.ListSeparator_z0K0 : t6); + t1._evaluate0$_environment.setLocalVariable$3(restParameter, argumentList, t4); + } else + argumentList = null; + result = _this.run.call$0(); + if (argumentList == null) + return result; + t5 = t2[0].__js_helper$_length; + if (t5 === 0) + return result; + if (argumentList._argument_list$_wereKeywordsAccessed) + return result; + parameterWord = A.pluralize0("parameter", t5, null); + t2 = t2[0]; + t5 = A._instanceType(t2)._eval$1("LinkedHashMapKeysIterable<1>"); + throw A.wrapException(A.MultiSpanSassRuntimeException$0("No " + parameterWord + " named " + A.toSentence0(A.MappedIterable_MappedIterable(new A.LinkedHashMapKeysIterable(t2, t5), new A._EvaluateVisitor__runUserDefinedCallable____closure1(), t5._eval$1("Iterable.E"), type$.Object), "or") + ".", t4.get$span(t4), "invocation", A.LinkedHashMap_LinkedHashMap$_literal([t3.get$spanWithName(), "declaration"], type$.FileSpan, type$.String), t1._evaluate0$_stackTrace$1(t4.get$span(t4)), null)); + }, + $signature() { + return this.V._eval$1("0()"); + } + }; + A._EvaluateVisitor__runUserDefinedCallable____closure1.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__runFunctionCallable_closure1.prototype = { + call$0() { + var t1, t2, t3, t4, _i, $returnValue; + for (t1 = this.callable.declaration, t2 = t1.children, t3 = t2.length, t4 = this.$this, _i = 0; _i < t3; ++_i) { + $returnValue = t2[_i].accept$1(t4); + if ($returnValue instanceof A.Value0) + return $returnValue; + } + throw A.wrapException(t4._evaluate0$_exception$2("Function finished without @return.", t1.span)); + }, + $signature: 46 + }; + A._EvaluateVisitor__runBuiltInCallable_closure5.prototype = { + call$0() { + return this._box_0.overload.verify$2(this.evaluated._values[2].length, this.namedSet); + }, + $signature: 0 + }; + A._EvaluateVisitor__runBuiltInCallable_closure6.prototype = { + call$0() { + return this._box_0.callback.call$1(this.evaluated._values[2]); + }, + $signature: 46 + }; + A._EvaluateVisitor__runBuiltInCallable_closure7.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A._EvaluateVisitor__evaluateArguments_closure7.prototype = { + call$1(value) { + return value; + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateArguments_closure8.prototype = { + call$1(value) { + return this.$this._evaluate0$_withoutSlash$2(value, this.restNodeForSpan); + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateArguments_closure9.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restNodeForSpan; + _this.named.$indexSet(0, key, _this.$this._evaluate0$_withoutSlash$2(value, t1)); + _this.namedNodes.$indexSet(0, key, t1); + }, + $signature: 112 + }; + A._EvaluateVisitor__evaluateArguments_closure10.prototype = { + call$1(value) { + return value; + }, + $signature: 41 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure7.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(value, t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure8.prototype = { + call$1(value) { + var t1 = this.restArgs; + return new A.ValueExpression0(this.$this._evaluate0$_withoutSlash$2(value, this.restNodeForSpan), t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure9.prototype = { + call$2(key, value) { + var _this = this, + t1 = _this.restArgs; + _this.named.$indexSet(0, key, new A.ValueExpression0(_this.$this._evaluate0$_withoutSlash$2(value, _this.restNodeForSpan), t1.get$span(t1))); + }, + $signature: 112 + }; + A._EvaluateVisitor__evaluateMacroArguments_closure10.prototype = { + call$1(value) { + var t1 = this.keywordRestArgs; + return new A.ValueExpression0(this.$this._evaluate0$_withoutSlash$2(value, this.keywordRestNodeForSpan), t1.get$span(t1)); + }, + $signature: 65 + }; + A._EvaluateVisitor__addRestMap_closure1.prototype = { + call$2(key, value) { + var t2, _this = this, + t1 = _this.$this; + if (key instanceof A.SassString0) + _this.values.$indexSet(0, key._string0$_text, _this.convert.call$1(t1._evaluate0$_withoutSlash$2(value, _this.expressionNode))); + else { + t2 = _this.nodeWithSpan; + throw A.wrapException(t1._evaluate0$_exception$2(string$.Variab_ + key.toString$0(0) + " is not a string in " + _this.map.toString$0(0) + ".", t2.get$span(t2))); + } + }, + $signature: 117 + }; + A._EvaluateVisitor__verifyArguments_closure1.prototype = { + call$0() { + return this.parameters.verify$2(this.positional, new A.MapKeySet(this.named, type$.MapKeySet_String)); + }, + $signature: 0 + }; + A._EvaluateVisitor_visitCssAtRule_closure5.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssAtRule_closure6.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssAtRule_closure7.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure3.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssKeyframeBlock_closure4.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssMediaRule_closure7.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule_closure8.prototype = { + call$1(mediaQueries) { + return this.$this._evaluate0$_mergeMediaQueries$2(mediaQueries, this.node.queries); + }, + $signature: 104 + }; + A._EvaluateVisitor_visitCssMediaRule_closure9.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.mergedQueries; + if (t2 == null) + t2 = _this.node.queries; + t1._evaluate0$_withMediaQueries$3(t2, _this.mergedSources, new A._EvaluateVisitor_visitCssMediaRule__closure1(t1, _this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule__closure1.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._evaluate0$_withParent$2$3$scopeWhen(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssMediaRule___closure1(t1, this.node), false, type$.ModifiableCssStyleRule_2, type$.Null); + else + for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule___closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssMediaRule_closure10.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) { + t1 = this.mergedSources; + t1 = t1.get$isNotEmpty(t1) && node instanceof A.ModifiableCssMediaRule0 && B.JSArray_methods.every$1(node.queries, t1.get$contains(t1)); + } else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssStyleRule_closure4.prototype = { + call$0() { + var t1 = this.$this; + t1._evaluate0$_withStyleRule$2(this.rule, new A._EvaluateVisitor_visitCssStyleRule__closure1(t1, this.node)); + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule__closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssStyleRule_closure3.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure5.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure6.prototype = { + call$0() { + var t2, t3, t4, + t1 = this.$this, + _0_0 = t1._evaluate0$_atRootExcludingStyleRule ? null : t1._evaluate0$_styleRuleIgnoringAtRoot; + if (_0_0 != null) + t1._evaluate0$_withParent$2$2(A.ModifiableCssStyleRule$0(_0_0._style_rule0$_selector, _0_0.span, false, _0_0.originalSelector), new A._EvaluateVisitor_visitCssSupportsRule__closure1(t1, this.node), type$.ModifiableCssStyleRule_2, type$.Null); + else + for (t2 = this.node.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t4 = t2.__internal$_current; + (t4 == null ? t3._as(t4) : t4).accept$1(t1); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule__closure1.prototype = { + call$0() { + var t1, t2, t3, t4; + for (t1 = this.node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t3 = this.$this, t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t4 = t1.__internal$_current; + (t4 == null ? t2._as(t4) : t4).accept$1(t3); + } + }, + $signature: 1 + }; + A._EvaluateVisitor_visitCssSupportsRule_closure7.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluateVisitor__performInterpolationHelper_closure1.prototype = { + call$1(targetOffsets) { + return A.InterpolationMap$0(this.interpolation, targetOffsets); + }, + $signature: 220 + }; + A._EvaluateVisitor__serialize_closure1.prototype = { + call$0() { + return A.serializeValue0(this.value, false, this.quote); + }, + $signature: 29 + }; + A._EvaluateVisitor__expressionNode_closure1.prototype = { + call$0() { + var t1 = this.expression; + return this.$this._evaluate0$_environment.getVariableNode$2$namespace(t1.name, t1.namespace); + }, + $signature: 221 + }; + A._EvaluateVisitor__withoutSlash_recommendation1.prototype = { + call$1(number) { + var before, after, t1, + _1_0 = number.asSlash; + $label0$0: { + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_1_0)) { + before = _1_0._0; + after = _1_0._1; + t1 = "math.div(" + A.S(this.call$1(before)) + ", " + A.S(this.call$1(after)) + ")"; + break $label0$0; + } + t1 = A.serializeValue0(number, true, true); + break $label0$0; + } + return t1; + }, + $signature: 222 + }; + A._EvaluateVisitor__stackFrame_closure1.prototype = { + call$1(url) { + var t1 = this.$this._evaluate0$_importCache; + t1 = t1 == null ? null : t1.humanize$1(url); + return t1 == null ? url : t1; + }, + $signature: 49 + }; + A._ImportedCssVisitor1.prototype = { + visitCssAtRule$1(node) { + var t1 = node.isChildless ? null : new A._ImportedCssVisitor_visitCssAtRule_closure1(); + this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, t1); + }, + visitCssComment$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$1(node); + }, + visitCssDeclaration$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$1(node); + }, + visitCssImport$1(node) { + var t2, + _s13_ = "_endOfImports", + t1 = this._evaluate0$_visitor; + if (t1._evaluate0$_assertInModule$2(t1._evaluate0$__parent, "__parent") !== t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root")) + t1._evaluate0$_addChild$1(node); + else if (t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, _s13_) === J.get$length$asx(t1._evaluate0$_assertInModule$2(t1._evaluate0$__root, "_root").children._collection$_source)) { + t1._evaluate0$_addChild$1(node); + t1._evaluate0$__endOfImports = t1._evaluate0$_assertInModule$2(t1._evaluate0$__endOfImports, _s13_) + 1; + } else { + t2 = t1._evaluate0$_outOfOrderImports; + (t2 == null ? t1._evaluate0$_outOfOrderImports = A._setArrayType([], type$.JSArray_ModifiableCssImport_2) : t2).push(node); + } + }, + visitCssKeyframeBlock$1(node) { + }, + visitCssMediaRule$1(node) { + var t1 = this._evaluate0$_visitor, + mediaQueries = t1._evaluate0$_mediaQueries; + t1._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssMediaRule_closure1(mediaQueries == null || t1._evaluate0$_mergeMediaQueries$2(mediaQueries, node.queries) != null)); + }, + visitCssStyleRule$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssStyleRule_closure1()); + }, + visitCssStylesheet$1(node) { + var t1, t2, t3; + for (t1 = node.children, t2 = t1.$ti, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + (t3 == null ? t2._as(t3) : t3).accept$1(this); + } + }, + visitCssSupportsRule$1(node) { + return this._evaluate0$_visitor._evaluate0$_addChild$2$through(node, new A._ImportedCssVisitor_visitCssSupportsRule_closure1()); + } + }; + A._ImportedCssVisitor_visitCssAtRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssMediaRule_closure1.prototype = { + call$1(node) { + var t1; + if (!(node instanceof A.ModifiableCssStyleRule0)) + t1 = this.hasBeenMerged && node instanceof A.ModifiableCssMediaRule0; + else + t1 = true; + return t1; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssStyleRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._ImportedCssVisitor_visitCssSupportsRule_closure1.prototype = { + call$1(node) { + return node instanceof A.ModifiableCssStyleRule0; + }, + $signature: 8 + }; + A._EvaluationContext1.prototype = { + get$currentCallableSpan() { + var _0_0 = this._evaluate0$_visitor._evaluate0$_callableNode; + if (_0_0 != null) + return _0_0.get$span(_0_0); + throw A.wrapException(A.StateError$(string$.No_Sasc)); + }, + warn$2(_, message, deprecation) { + var t1 = this._evaluate0$_visitor, + t2 = t1._evaluate0$_importSpan; + if (t2 == null) { + t2 = t1._evaluate0$_callableNode; + t2 = t2 == null ? null : t2.get$span(t2); + } + t1._evaluate0$_warn$3(message, t2 == null ? this._evaluate0$_defaultWarnNodeWithSpan.span : t2, deprecation); + } + }; + A.EvaluationContext0.prototype = {}; + A._EvaluationContextLogger0.prototype = { + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + this._evaluation_context0$_context.warn$2(0, message, deprecation); + } + }; + A.EveryCssVisitor0.prototype = { + visitCssAtRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssAtRule_closure0(this)); + }, + visitCssComment$1(node) { + return false; + }, + visitCssDeclaration$1(node) { + return false; + }, + visitCssImport$1(node) { + return false; + }, + visitCssKeyframeBlock$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssKeyframeBlock_closure0(this)); + }, + visitCssMediaRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssMediaRule_closure0(this)); + }, + visitCssStyleRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssStyleRule_closure0(this)); + }, + visitCssStylesheet$1(node) { + return J.every$1$ax(node.get$children(node), new A.EveryCssVisitor_visitCssStylesheet_closure0(this)); + }, + visitCssSupportsRule$1(node) { + var t1 = node.children; + return t1.every$1(t1, new A.EveryCssVisitor_visitCssSupportsRule_closure0(this)); + } + }; + A.EveryCssVisitor_visitCssAtRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssMediaRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssStyleRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssStylesheet_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A.EveryCssVisitor_visitCssSupportsRule_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature: 8 + }; + A._NodeException.prototype = {}; + A.exceptionClass_closure.prototype = { + call$0() { + var jsClass = type$.JSClass._as(new self.Function("", " return class Exception extends Error {\n constructor(dartException, message) {\n super(message);\n\n // Define this as non-enumerable so that it doesn't show up when the\n // exception hits the top level.\n Object.defineProperty(this, '_dartException', {\n value: dartException,\n enumerable: false\n });\n }\n\n toString() {\n return this.message;\n }\n }\n ").call$0()); + A.defineGetter(jsClass, "name", null, "sass.Exception"); + A.LinkedHashMap_LinkedHashMap$_literal(["sassMessage", new A.exceptionClass__closure(), "sassStack", new A.exceptionClass__closure0(), "span", new A.exceptionClass__closure1()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + return jsClass; + }, + $signature: 17 + }; + A.exceptionClass__closure.prototype = { + call$1(exception) { + return J.get$_dartException$x(exception)._span_exception$_message; + }, + $signature: 244 + }; + A.exceptionClass__closure0.prototype = { + call$1(exception) { + return J.get$trace$z(J.get$_dartException$x(exception)).toString$0(0); + }, + $signature: 244 + }; + A.exceptionClass__closure1.prototype = { + call$1(exception) { + var t1 = J.get$_dartException$x(exception), + t2 = J.getInterceptor$x(t1); + return A.SourceSpanException.prototype.get$span.call(t2, t1); + }, + $signature: 470 + }; + A.SassException0.prototype = { + get$trace(_) { + return A.Trace$(A._setArrayType([A.frameForSpan0(A.SourceSpanException.prototype.get$span.call(this, 0), "root stylesheet", null)], type$.JSArray_Frame), null); + }, + get$span(_) { + return A.SourceSpanException.prototype.get$span.call(this, 0); + }, + withAdditionalSpan$2(span, label) { + return A.MultiSpanSassException$0(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); + }, + withTrace$1(trace) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(this.loadedUrls, type$.Uri); + return new A.SassRuntimeException0(trace, t2, this._span_exception$_message, t1); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassException0(t2, this._span_exception$_message, t1); + }, + toString$1$color(_, color) { + var t2, _i, frame, _this = this, + buffer = new A.StringBuffer(""), + t1 = "Error: " + _this._span_exception$_message + "\n"; + buffer._contents = t1; + buffer._contents = t1 + A.SourceSpanException.prototype.get$span.call(_this, 0).highlight$1$color(color); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (frame.length === 0) + continue; + buffer._contents = (buffer._contents += "\n") + (" " + frame); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0(_) { + return this.toString$1$color(0, null); + } + }; + A.MultiSpanSassException0.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); + }, + withTrace$1(trace) { + var _this = this; + return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); + }, + toString$1$color(_, color) { + var t1, t2, _i, frame, _this = this, + useColor = color === true, + buffer = new A.StringBuffer("Error: " + _this._span_exception$_message + "\n"); + A.NullableExtension_andThen0(A.Highlighter$multiple(A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, useColor, null, null).highlight$0(), buffer.get$write(buffer)); + for (t1 = _this.get$trace(_this).toString$0(0).split("\n"), t2 = t1.length, _i = 0; _i < t2; ++_i) { + frame = t1[_i]; + if (frame.length === 0) + continue; + buffer._contents = (buffer._contents += "\n") + (" " + frame); + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + toString$0(_) { + return this.toString$1$color(0, null); + }, + get$primaryLabel() { + return this.primaryLabel; + }, + get$secondarySpans() { + return this.secondarySpans; + } + }; + A.SassRuntimeException0.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this; + return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), _this.trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassRuntimeException0(this.trace, t2, this._span_exception$_message, t1); + }, + get$trace(receiver) { + return this.trace; + } + }; + A.MultiSpanSassRuntimeException0.prototype = { + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.trace, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassRuntimeException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, _this.trace, loadedUrls); + }, + $isSassRuntimeException0: 1, + get$trace(receiver) { + return this.trace; + } + }; + A.SassFormatException0.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + withAdditionalSpan$2(span, label) { + return A.MultiSpanSassFormatException$0(this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(this, 0), "", A.LinkedHashMap_LinkedHashMap$_literal([span, label], type$.FileSpan, type$.String), this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0), + t2 = A.Set_Set$unmodifiable(loadedUrls, type$.Uri); + return new A.SassFormatException0(t2, this._span_exception$_message, t1); + }, + $isFormatException: 1, + $isSourceSpanFormatException: 1 + }; + A.MultiSpanSassFormatException0.prototype = { + get$source() { + var t1 = A.SourceSpanException.prototype.get$span.call(this, 0); + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null); + }, + withAdditionalSpan$2(span, label) { + var _this = this, + t1 = A.SourceSpanException.prototype.get$span.call(_this, 0), + t2 = A.LinkedHashMap_LinkedHashMap$of(_this.secondarySpans, type$.FileSpan, type$.String); + t2.$indexSet(0, span, label); + return A.MultiSpanSassFormatException$0(_this._span_exception$_message, t1, _this.primaryLabel, t2, _this.loadedUrls); + }, + withLoadedUrls$1(loadedUrls) { + var _this = this; + return A.MultiSpanSassFormatException$0(_this._span_exception$_message, A.SourceSpanException.prototype.get$span.call(_this, 0), _this.primaryLabel, _this.secondarySpans, loadedUrls); + }, + $isFormatException: 1, + $isSourceSpanFormatException: 1, + $isMultiSourceSpanFormatException: 1, + $isSassFormatException0: 1 + }; + A.SassScriptException0.prototype = { + withSpan$1(span) { + return new A.SassException0(B.Set_empty, this.message, span); + }, + toString$0(_) { + return this.message + string$.x0a_BUG_; + }, + get$message(receiver) { + return this.message; + } + }; + A.MultiSpanSassScriptException0.prototype = { + withSpan$1(span) { + return A.MultiSpanSassException$0(this.message, span, this.primaryLabel, this.secondarySpans, null); + } + }; + A.Exports.prototype = {}; + A.LoggerNamespace.prototype = {}; + A.Expression0.prototype = {$isAstNode0: 1, $isSassNode: 1}; + A.JSExpressionVisitor.prototype = { + visitBinaryOperationExpression$1(_, node) { + return J.visitBinaryOperationExpression$1$x(this._expression$_inner, node); + }, + visitBooleanExpression$1(_, node) { + return J.visitBooleanExpression$1$x(this._expression$_inner, node); + }, + visitColorExpression$1(_, node) { + return J.visitColorExpression$1$x(this._expression$_inner, node); + }, + visitInterpolatedFunctionExpression$1(_, node) { + return J.visitInterpolatedFunctionExpression$1$x(this._expression$_inner, node); + }, + visitFunctionExpression$1(_, node) { + return J.visitFunctionExpression$1$x(this._expression$_inner, node); + }, + visitIfExpression$1(_, node) { + return J.visitIfExpression$1$x(this._expression$_inner, node); + }, + visitLegacyIfExpression$1(_, node) { + return J.visitLegacyIfExpression$1$x(this._expression$_inner, node); + }, + visitListExpression$1(_, node) { + return J.visitListExpression$1$x(this._expression$_inner, node); + }, + visitMapExpression$1(_, node) { + return J.visitMapExpression$1$x(this._expression$_inner, node); + }, + visitNullExpression$1(_, node) { + return J.visitNullExpression$1$x(this._expression$_inner, node); + }, + visitNumberExpression$1(_, node) { + return J.visitNumberExpression$1$x(this._expression$_inner, node); + }, + visitParenthesizedExpression$1(_, node) { + return J.visitParenthesizedExpression$1$x(this._expression$_inner, node); + }, + visitSelectorExpression$1(_, node) { + return J.visitSelectorExpression$1$x(this._expression$_inner, node); + }, + visitStringExpression$1(_, node) { + return J.visitStringExpression$1$x(this._expression$_inner, node); + }, + visitSupportsExpression$1(_, node) { + return J.visitSupportsExpression$1$x(this._expression$_inner, node); + }, + visitUnaryOperationExpression$1(_, node) { + return J.visitUnaryOperationExpression$1$x(this._expression$_inner, node); + }, + visitValueExpression$1(_, node) { + return J.visitValueExpression$1$x(this._expression$_inner, node); + }, + visitVariableExpression$1(_, node) { + return J.visitVariableExpression$1$x(this._expression$_inner, node); + }, + $isExpressionVisitor: 1 + }; + A.JSExpressionVisitorObject.prototype = {}; + A._MakeExpressionCalculationSafe0.prototype = { + visitBinaryOperationExpression$1(_, node) { + var t1, t2; + if (node.operator === B.BinaryOperator_bgA0) { + t1 = A.ArgumentList$0(A._setArrayType([node], type$.JSArray_Expression_2), B.Map_empty14, B.Map_empty5, node.get$span(0), null, null); + t2 = node.get$span(0); + t1 = new A.FunctionExpression0("math", A.stringReplaceAllUnchecked("max", "_", "-"), "max", t1, t2); + } else + t1 = this.super$ReplaceExpressionVisitor$visitBinaryOperationExpression0(0, node); + return t1; + }, + visitInterpolatedFunctionExpression$1(_, node) { + return node; + }, + visitIfExpression$1(_, node) { + return node; + }, + visitUnaryOperationExpression$1(_, node) { + var t1, + _0_0 = node.operator; + $label0$0: { + if (B.UnaryOperator_n2K0 === _0_0) { + t1 = node.operand; + break $label0$0; + } + if (B.UnaryOperator_hCO0 === _0_0) { + t1 = new A.BinaryOperationExpression0(B.BinaryOperator_wkM0, new A.NumberExpression0(-1, null, node.span), node.operand, false); + break $label0$0; + } + t1 = this.super$ReplaceExpressionVisitor$visitUnaryOperationExpression0(0, node); + break $label0$0; + } + return t1; + }, + $isExpressionVisitor: 1, + $isIfConditionExpressionVisitor: 1 + }; + A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0.prototype = {}; + A.ExtendRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitExtendRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.selector.toString$0(0), + t2 = this.isOptional ? " !optional" : ""; + return "@extend " + t1 + t2 + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.Extension0.prototype = { + toString$0(_) { + var t1 = this.extender.toString$0(0), + t2 = this.target.toString$0(0), + t3 = this.isOptional ? " !optional" : ""; + return t1 + " {@extend " + t2 + t3 + "}"; + } + }; + A.Extender0.prototype = { + assertCompatibleMediaContext$1(mediaContext) { + var expectedMediaContext, + extension = this._extension$_extension; + if (extension == null) + return; + expectedMediaContext = extension.mediaContext; + if (expectedMediaContext == null) + return; + if (mediaContext != null && B.C_ListEquality.equals$2(0, expectedMediaContext, mediaContext)) + return; + throw A.wrapException(A.SassException$0(string$.You_ma, extension.span, null)); + }, + toString$0(_) { + return A.serializeSelector0(this.selector, true); + } + }; + A.ExtensionStore0.prototype = { + get$isEmpty(_) { + return this._extension_store$_extensions.__js_helper$_length === 0; + }, + get$simpleSelectors() { + return new A.MapKeySet(this._extension_store$_selectors, type$.MapKeySet_SimpleSelector_2); + }, + extensionsWhereTarget$1(callback) { + return new A._SyncStarIterable(this.extensionsWhereTarget$body$ExtensionStore0(callback), type$._SyncStarIterable_Extension_2); + }, + extensionsWhereTarget$body$ExtensionStore0($async$callback) { + var $async$self = this; + return function() { + var callback = $async$callback; + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], t1, t2, simple, sources, t3; + return function $async$extensionsWhereTarget$1($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = A.MapExtensions_get_pairs0($async$self._extension_store$_extensions, type$.SimpleSelector_2, type$.Map_ComplexSelector_Extension_2), t1 = t1.get$iterator(t1); + case 2: + // for condition + if (!t1.moveNext$0()) { + // goto after for + $async$goto = 3; + break; + } + t2 = t1.get$current(t1); + simple = t2._0; + sources = t2._1; + if (!callback.call$1(simple)) { + // goto for condition + $async$goto = 2; + break; + } + t2 = sources.get$values(sources), t2 = t2.get$iterator(t2); + case 4: + // for condition + if (!t2.moveNext$0()) { + // goto after for + $async$goto = 5; + break; + } + t3 = t2.get$current(t2); + $async$goto = t3 instanceof A.MergedExtension0 ? 6 : 8; + break; + case 6: + // then + t3 = t3.unmerge$0(); + $async$goto = 9; + return $async$iterator._yieldStar$1(new A.WhereIterable(t3, new A.ExtensionStore_extensionsWhereTarget_closure0(), t3.$ti._eval$1("WhereIterable"))); + case 9: + // after yield + // goto join + $async$goto = 7; + break; + case 8: + // else + $async$goto = !t3.isOptional ? 10 : 11; + break; + case 10: + // then + $async$goto = 12; + return $async$iterator._async$_current = t3, 1; + case 12: + // after yield + case 11: + // join + case 7: + // join + // goto for condition + $async$goto = 4; + break; + case 5: + // after for + // goto for condition + $async$goto = 2; + break; + case 3: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + }, + addSelector$2(selector, mediaContext) { + var originalSelector, error, stackTrace, t1, exception, t2, t3, t4, modifiableSelector, _this = this; + selector = selector; + originalSelector = selector; + if (!originalSelector.accept$1(B._IsInvisibleVisitor_true0)) + _this._extension_store$_originals.addAll$1(0, originalSelector.components); + t1 = _this._extension_store$_extensions; + if (t1.__js_helper$_length !== 0) + try { + selector = _this._extension_store$_extendList$3(originalSelector, t1, mediaContext); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = error; + t2 = J.getInterceptor$x(t1); + t1 = A.SourceSpanException.prototype.get$span.call(t2, t1).message$1(0, ""); + t2 = error._span_exception$_message; + t3 = error; + t4 = J.getInterceptor$x(t3); + t3 = A.SourceSpanException.prototype.get$span.call(t4, t3); + A.throwWithTrace0(new A.SassException0(B.Set_empty, "From " + t1 + "\n" + t2, t3), error, stackTrace); + } else + throw exception; + } + modifiableSelector = new A.ModifiableBox0(selector, type$.ModifiableBox_SelectorList_2); + if (mediaContext != null) + _this._extension_store$_mediaContexts.$indexSet(0, modifiableSelector, mediaContext); + _this._extension_store$_registerSelector$2(selector, modifiableSelector); + return new A.Box0(modifiableSelector, type$.Box_SelectorList_2); + }, + _extension_store$_registerSelector$2(list, selector) { + var t1, t2, t3, t4, _i, t5, t6, _i0, t7, t8, _i1, simple, _0_2_isSet, _0_2, t9, selectorInPseudo; + for (t1 = list.components, t2 = t1.length, t3 = this._extension_store$_selectors, t4 = type$.SelectorList_2, _i = 0; _i < t2; ++_i) + for (t5 = t1[_i].components, t6 = t5.length, _i0 = 0; _i0 < t6; ++_i0) + for (t7 = t5[_i0].selector.components, t8 = t7.length, _i1 = 0; _i1 < t8; ++_i1) { + simple = t7[_i1]; + t3.putIfAbsent$2(simple, new A.ExtensionStore__registerSelector_closure0()).add$1(0, selector); + _0_2_isSet = simple instanceof A.PseudoSelector0; + _0_2 = null; + if (_0_2_isSet) { + _0_2 = simple.selector; + t9 = _0_2; + t9 = t9 != null; + } else + t9 = false; + if (t9) { + selectorInPseudo = _0_2_isSet ? _0_2 : simple.selector; + this._extension_store$_registerSelector$2(selectorInPseudo == null ? t4._as(selectorInPseudo) : selectorInPseudo, selector); + } + } + }, + addExtension$4(extender, target, extend, mediaContext) { + var t2, t3, t4, t5, t6, t7, t8, t9, t10, newExtensions, _i, complex, t11, extension, _0_0, t12, newExtensionsByTarget, additionalExtensions, _this = this, + selectors = _this._extension_store$_selectors.$index(0, target), + t1 = _this._extension_store$_extensionsByExtender, + existingExtensions = t1.$index(0, target), + sources = _this._extension_store$_extensions.putIfAbsent$2(target, new A.ExtensionStore_addExtension_closure2()); + for (t2 = extender.components, t3 = t2.length, t4 = selectors == null, t5 = _this._extension_store$_sourceSpecificity, t6 = extend.span, t7 = extend.isOptional, t8 = existingExtensions != null, t9 = type$.ComplexSelector_2, t10 = type$.Extension_2, newExtensions = null, _i = 0; _i < t3; ++_i) { + complex = t2[_i]; + if (complex.accept$1(B.C__IsUselessVisitor0)) + continue; + complex.get$specificity(); + t11 = new A.Extender0(complex, false); + extension = t11._extension$_extension = new A.Extension0(t11, target, mediaContext, t7, t6); + _0_0 = sources.$index(0, complex); + if (_0_0 != null) { + sources.$indexSet(0, complex, A.MergedExtension_merge0(_0_0, extension)); + continue; + } + sources.$indexSet(0, complex, extension); + for (t11 = new A._SyncStarIterator(_this._extension_store$_simpleSelectors$1(complex)._outerHelper()); t11.moveNext$0();) { + t12 = t11._async$_current; + J.add$1$ax(t1.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure3()), extension); + t5.putIfAbsent$2(t12, new A.ExtensionStore_addExtension_closure4(complex)); + } + if (!t4 || t8) { + if (newExtensions == null) + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t9, t10); + newExtensions.$indexSet(0, complex, extension); + } + } + if (newExtensions == null) + return; + t1 = type$.SimpleSelector_2; + newExtensionsByTarget = A.LinkedHashMap_LinkedHashMap$_literal([target, newExtensions], t1, type$.Map_ComplexSelector_Extension_2); + if (t8) { + additionalExtensions = _this._extension_store$_extendExistingExtensions$2(existingExtensions, newExtensionsByTarget); + if (additionalExtensions != null) + A.mapAddAll20(newExtensionsByTarget, additionalExtensions, t1, t9, t10); + } + if (!t4) + _this._extension_store$_extendExistingSelectors$2(selectors, newExtensionsByTarget); + }, + _extension_store$_simpleSelectors$1(complex) { + return new A._SyncStarIterable(this._simpleSelectors$body$ExtensionStore0(complex), type$._SyncStarIterable_SimpleSelector_2); + }, + _simpleSelectors$body$ExtensionStore0($async$complex) { + var $async$self = this; + return function() { + var complex = $async$complex; + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], t1, t2, t3, _i, t4, t5, _i0, simple, _0_2_isSet, _0_2, t6, selector, t7, _i1; + return function $async$_extension_store$_simpleSelectors$1($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = complex.components, t2 = t1.length, t3 = type$.SelectorList_2, _i = 0; + case 2: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 4; + break; + } + t4 = t1[_i].selector.components, t5 = t4.length, _i0 = 0; + case 5: + // for condition + if (!(_i0 < t5)) { + // goto after for + $async$goto = 7; + break; + } + simple = t4[_i0]; + $async$goto = 8; + return $async$iterator._async$_current = simple, 1; + case 8: + // after yield + _0_2_isSet = simple instanceof A.PseudoSelector0; + _0_2 = null; + if (_0_2_isSet) { + _0_2 = simple.selector; + t6 = _0_2; + t6 = t6 != null; + } else + t6 = false; + $async$goto = t6 ? 9 : 10; + break; + case 9: + // then + selector = _0_2_isSet ? _0_2 : simple.selector; + t6 = (selector == null ? t3._as(selector) : selector).components, t7 = t6.length, _i1 = 0; + case 11: + // for condition + if (!(_i1 < t7)) { + // goto after for + $async$goto = 13; + break; + } + $async$goto = 14; + return $async$iterator._yieldStar$1($async$self._extension_store$_simpleSelectors$1(t6[_i1])); + case 14: + // after yield + case 12: + // for update + ++_i1; + // goto for condition + $async$goto = 11; + break; + case 13: + // after for + case 10: + // join + case 6: + // for update + ++_i0; + // goto for condition + $async$goto = 5; + break; + case 7: + // after for + case 3: + // for update + ++_i; + // goto for condition + $async$goto = 2; + break; + case 4: + // after for + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + }, + _extension_store$_extendExistingExtensions$2(extensions, newExtensions) { + var extension, selectors, error, stackTrace, t1, t2, t3, t4, t5, t6, additionalExtensions, _i, t7, exception, t8, t9, selectors0, t10, t11, t12, t13, t14, withExtender, _0_0, _i0, _i1; + for (t1 = J.toList$0$ax(extensions), t2 = t1.length, t3 = this._extension_store$_extensionsByExtender, t4 = type$.SimpleSelector_2, t5 = type$.Map_ComplexSelector_Extension_2, t6 = this._extension_store$_extensions, additionalExtensions = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + extension = t1[_i]; + t7 = t6.$index(0, extension.target); + t7.toString; + selectors = null; + try { + selectors = this._extension_store$_extendComplex$3(extension.extender.selector, newExtensions, extension.mediaContext); + if (selectors == null) + continue; + } catch (exception) { + t8 = A.unwrapException(exception); + if (t8 instanceof A.SassException0) { + error = t8; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(error.withAdditionalSpan$2(extension.extender.selector.span, "target selector"), error, stackTrace); + } else + throw exception; + } + t8 = J.get$first$ax(selectors); + t9 = extension.extender.selector; + if (B.C_ListEquality.equals$2(0, t8.leadingCombinators, t9.leadingCombinators) && B.C_ListEquality.equals$2(0, t8.components, t9.components)) { + t8 = selectors; + t9 = A._arrayInstanceType(t8); + selectors0 = new A.SubListIterable(t8, 1, null, t9._eval$1("SubListIterable<1>")); + selectors0.SubListIterable$3(t8, 1, null, t9._precomputed1); + selectors = selectors0; + } + for (t8 = J.get$iterator$ax(selectors); t8.moveNext$0();) { + t9 = t8.get$current(t8); + t10 = extension; + t11 = t10.target; + t12 = t10.span; + t13 = t10.mediaContext; + t10 = t10.isOptional; + t9.get$specificity(); + t14 = new A.Extender0(t9, false); + withExtender = t14._extension$_extension = new A.Extension0(t14, t11, t13, t10, t12); + _0_0 = t7.$index(0, t9); + if (_0_0 != null) + t7.$indexSet(0, t9, A.MergedExtension_merge0(_0_0, withExtender)); + else { + t7.$indexSet(0, t9, withExtender); + for (t10 = t9.components, t11 = t10.length, _i0 = 0; _i0 < t11; ++_i0) + for (t12 = t10[_i0].selector.components, t13 = t12.length, _i1 = 0; _i1 < t13; ++_i1) + J.add$1$ax(t3.putIfAbsent$2(t12[_i1], new A.ExtensionStore__extendExistingExtensions_closure1()), withExtender); + if (newExtensions.containsKey$1(extension.target)) { + if (additionalExtensions == null) + additionalExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t4, t5); + additionalExtensions.putIfAbsent$2(extension.target, new A.ExtensionStore__extendExistingExtensions_closure2()).$indexSet(0, t9, withExtender); + } + } + } + } + return additionalExtensions; + }, + _extension_store$_extendExistingSelectors$2(selectors, newExtensions) { + var selector, error, stackTrace, t1, t2, oldValue, exception, t3, t4, t5, t6; + for (t1 = selectors.get$iterator(selectors), t2 = this._extension_store$_mediaContexts; t1.moveNext$0();) { + selector = t1.get$current(t1); + oldValue = selector.value; + try { + selector.value = this._extension_store$_extendList$3(selector.value, newExtensions, t2.$index(0, selector)); + } catch (exception) { + t3 = A.unwrapException(exception); + if (t3 instanceof A.SassException0) { + error = t3; + stackTrace = A.getTraceFromException(exception); + t3 = selector.value.span.message$1(0, ""); + t4 = error._span_exception$_message; + t5 = error; + t6 = J.getInterceptor$x(t5); + t5 = A.SourceSpanException.prototype.get$span.call(t6, t5); + A.throwWithTrace0(new A.SassException0(B.Set_empty, "From " + t3 + "\n" + t4, t5), error, stackTrace); + } else + throw exception; + } + if (oldValue === selector.value) + continue; + this._extension_store$_registerSelector$2(selector.value, selector); + } + }, + addExtensions$1(extensionStores) { + var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, newExtensions, selectorsToExtend, extensionsToExtend, t12, t13, target, newSources, first, extensionsForTarget, t14, selectorsForTarget, t15, _2_0, t16, extender, extension, _this = this, _null = null; + for (t1 = J.get$iterator$ax(extensionStores), t2 = type$.SimpleSelector_2, t3 = type$.Map_ComplexSelector_Extension_2, t4 = _this._extension_store$_extensions, t5 = type$.ComplexSelector_2, t6 = type$.Extension_2, t7 = _this._extension_store$_selectors, t8 = _this._extension_store$_extensionsByExtender, t9 = type$.JSArray_Extension_2, t10 = type$.ModifiableBox_SelectorList_2, t11 = _this._extension_store$_sourceSpecificity, newExtensions = _null, selectorsToExtend = newExtensions, extensionsToExtend = selectorsToExtend; t1.moveNext$0();) { + t12 = t1.get$current(t1); + if (t12.get$isEmpty(t12)) + continue; + t11.addAll$1(0, t12.get$_extension_store$_sourceSpecificity()); + for (t12 = A.MapExtensions_get_pairs0(t12.get$_extension_store$_extensions(), t2, t3), t12 = t12.get$iterator(t12); t12.moveNext$0();) { + t13 = t12.get$current(t12); + target = t13._0; + newSources = t13._1; + if (target instanceof A.PlaceholderSelector0) { + first = target.name.charCodeAt(0); + t13 = first === 45 || first === 95; + } else + t13 = false; + if (t13) + continue; + extensionsForTarget = t8.$index(0, target); + t13 = extensionsForTarget == null; + if (!t13) { + if (extensionsToExtend == null) { + extensionsToExtend = A._setArrayType([], t9); + t14 = extensionsToExtend; + } else + t14 = extensionsToExtend; + B.JSArray_methods.addAll$1(t14, extensionsForTarget); + } + selectorsForTarget = t7.$index(0, target); + t14 = selectorsForTarget != null; + if (t14) { + if (selectorsToExtend == null) { + selectorsToExtend = A.LinkedHashSet_LinkedHashSet$_empty(t10); + t15 = selectorsToExtend; + } else + t15 = selectorsToExtend; + t15.addAll$1(0, selectorsForTarget); + } + _2_0 = t4.$index(0, target); + if (_2_0 != null) + for (t15 = A.MapExtensions_get_pairs0(newSources, t5, t6), t15 = t15.get$iterator(t15); t15.moveNext$0();) { + t16 = t15.get$current(t15); + extender = t16._0; + extension = t16._1; + if (_2_0.containsKey$1(extender)) { + t16 = _2_0.$index(0, extender); + extension = A.MergedExtension_merge0(t16 == null ? t6._as(t16) : t16, extension); + _2_0.$indexSet(0, extender, extension); + } else + _2_0.$indexSet(0, extender, extension); + if (!t13 || t14) { + if (newExtensions == null) { + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + t16 = newExtensions; + } else + t16 = newExtensions; + t16.putIfAbsent$2(target, new A.ExtensionStore_addExtensions_closure0()).$indexSet(0, extender, extension); + } + } + else { + t15 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); + t15.addAll$1(0, newSources); + t4.$indexSet(0, target, t15); + if (!t13 || t14) { + if (newExtensions == null) { + newExtensions = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + t13 = newExtensions; + } else + t13 = newExtensions; + t14 = A.LinkedHashMap_LinkedHashMap(_null, _null, _null, t5, t6); + t14.addAll$1(0, newSources); + t13.$indexSet(0, target, t14); + } + } + } + } + if (newExtensions != null) { + if (extensionsToExtend != null) + _this._extension_store$_extendExistingExtensions$2(extensionsToExtend, newExtensions); + if (selectorsToExtend != null) + _this._extension_store$_extendExistingSelectors$2(selectorsToExtend, newExtensions); + } + }, + _extension_store$_extendList$3(list, extensions, mediaQueryContext) { + var t1, t2, t3, extended, i, complex, result, t4; + for (t1 = list.components, t2 = t1.length, t3 = type$.JSArray_ComplexSelector_2, extended = null, i = 0; i < t2; ++i) { + complex = t1[i]; + result = this._extension_store$_extendComplex$3(complex, extensions, mediaQueryContext); + if (result == null) { + if (extended != null) + extended.push(complex); + } else { + if (extended == null) + if (i === 0) + extended = A._setArrayType([], t3); + else { + t4 = B.JSArray_methods.sublist$2(t1, 0, i); + extended = A._setArrayType(t4.slice(0), A._arrayInstanceType(t4)); + } + B.JSArray_methods.addAll$1(extended, result); + } + } + if (extended == null) + return list; + t1 = this._extension_store$_originals; + return A.SelectorList$0(this._extension_store$_trim$2(extended, t1.get$contains(t1)), list.span); + }, + _extension_store$_extendList$2(list, extensions) { + return this._extension_store$_extendList$3(list, extensions, null); + }, + _extension_store$_extendComplex$3(complex, extensions, mediaQueryContext) { + var isOriginal, t3, t4, t5, t6, t7, t8, t9, t10, extendedNotExpanded, i, component, extended, t11, t12, t13, t14, _box_0 = {}, + t1 = complex.leadingCombinators, + t2 = t1.length; + if (t2 > 1) + return null; + isOriginal = this._extension_store$_originals.contains$1(0, complex); + for (t3 = complex.components, t4 = t3.length, t5 = type$.JSArray_List_ComplexSelector_2, t6 = complex.lineBreak, t7 = !t6, t8 = complex.span, t9 = type$.JSArray_ComplexSelector_2, t2 = t2 === 0, t10 = type$.JSArray_ComplexSelectorComponent_2, extendedNotExpanded = null, i = 0; i < t4; ++i) { + component = t3[i]; + extended = this._extension_store$_extendCompound$4$inOriginal(component, extensions, mediaQueryContext, isOriginal); + if (extended == null) { + if (extendedNotExpanded != null) + extendedNotExpanded.push(A._setArrayType([A.ComplexSelector$0(B.List_empty17, A._setArrayType([component], t10), t8, t6)], t9)); + } else if (extendedNotExpanded != null) + extendedNotExpanded.push(extended); + else if (i !== 0) { + t11 = A._arrayInstanceType(t3); + t12 = new A.SubListIterable(t3, 0, i, t11._eval$1("SubListIterable<1>")); + t12.SubListIterable$3(t3, 0, i, t11._precomputed1); + extendedNotExpanded = A._setArrayType([A._setArrayType([A.ComplexSelector$0(t1, t12, t8, t6)], t9), extended], t5); + } else if (t2) + extendedNotExpanded = A._setArrayType([extended], t5); + else { + t11 = A._setArrayType([], t9); + for (t12 = J.get$iterator$ax(extended); t12.moveNext$0();) { + t13 = t12.get$current(t12); + t14 = t13.leadingCombinators; + if (t14.length === 0 || B.C_ListEquality.equals$2(0, t1, t14)) { + t14 = t13.components; + t11.push(A.ComplexSelector$0(t1, t14, t8, !t7 || t13.lineBreak)); + } + } + extendedNotExpanded = A._setArrayType([t11], t5); + } + } + if (extendedNotExpanded == null) + return null; + _box_0.first = true; + t1 = type$.ComplexSelector_2; + t1 = J.expand$1$1$ax(A.paths0(extendedNotExpanded, t1), new A.ExtensionStore__extendComplex_closure0(_box_0, this, complex), t1); + t1 = A.List_List$_of(t1, t1.$ti._eval$1("Iterable.E")); + return t1; + }, + _extension_store$_extendCompound$4$inOriginal(component, extensions, mediaQueryContext, inOriginal) { + var t3, t4, t5, t6, t7, t8, t9, t10, t11, options, i, simple, extended, t12, result, compound, complex, extenderPaths, withCombinators, isOriginal, _this = this, _null = null, + t1 = _this._extension_store$_mode, + targetsUsed = t1 === B.ExtendMode_normal_0_normal0 || extensions.__js_helper$_length < 2 ? _null : A.LinkedHashSet_LinkedHashSet$_empty(type$.SimpleSelector_2), + t2 = component.selector, + simples = t2.components; + for (t3 = simples.length, t4 = type$.JSArray_List_Extender_2, t5 = type$.JSArray_Extender_2, t6 = type$.CssValue_Combinator_2, t7 = type$.JSArray_ComplexSelectorComponent_2, t8 = A._arrayInstanceType(simples), t9 = t8._precomputed1, t8 = t8._eval$1("SubListIterable<1>"), t10 = component.span, t11 = type$.SimpleSelector_2, options = _null, i = 0; i < t3; ++i) { + simple = simples[i]; + extended = _this._extension_store$_extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed); + if (extended == null) { + if (options != null) + options.push(A._setArrayType([_this._extension_store$_extenderForSimple$1(simple)], t5)); + } else { + if (options == null) { + options = A._setArrayType([], t4); + if (i !== 0) { + t12 = new A.SubListIterable(simples, 0, i, t8); + t12.SubListIterable$3(simples, 0, i, t9); + result = A.List_List$from(t12, false, t11); + result.$flags = 3; + t12 = result; + compound = new A.CompoundSelector0(t12, t10); + if (t12.length === 0) + A.throwExpression(A.ArgumentError$("components may not be empty.", _null)); + result = A.List_List$from(B.List_empty17, false, t6); + result.$flags = 3; + t12 = A.ComplexSelector$0(B.List_empty17, A._setArrayType([new A.ComplexSelectorComponent0(compound, result, t10)], t7), t10, false); + _this._extension_store$_sourceSpecificityFor$1(compound); + options.push(A._setArrayType([new A.Extender0(t12, true)], t5)); + } + } + B.JSArray_methods.addAll$1(options, extended); + } + } + if (options == null) + return _null; + if (targetsUsed != null && targetsUsed._collection$_length !== extensions.__js_helper$_length) + return _null; + if (options.length === 1) { + for (t1 = J.get$iterator$ax(options[0]), t2 = component.combinators, t3 = type$.JSArray_ComplexSelector_2, result = _null; t1.moveNext$0();) { + t4 = t1.get$current(t1); + t4.assertCompatibleMediaContext$1(mediaQueryContext); + complex = t4.selector.withAdditionalCombinators$1(t2); + if (complex.accept$1(B.C__IsUselessVisitor0)) + continue; + if (result == null) + result = A._setArrayType([], t3); + result.push(complex); + } + return result; + } + extenderPaths = A.paths0(options, type$.Extender_2); + t3 = A._setArrayType([], type$.JSArray_ComplexSelector_2); + t1 = t1 === B.ExtendMode_replace_1_replace0; + t4 = !t1; + if (t4) + t3.push(A.ComplexSelector$0(B.List_empty17, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(J.expand$1$1$ax(J.get$first$ax(extenderPaths), new A.ExtensionStore__extendCompound_closure2(), t11), t2.span), A.List_List$unmodifiable(component.combinators, t6), t10)], t7), t10, false)); + t2 = J.skip$1$ax(extenderPaths, t1 ? 0 : 1); + t5 = t2.$ti; + t2 = new A.ListIterator(t2, t2.get$length(0), t5._eval$1("ListIterator")); + t6 = component.combinators; + t5 = t5._eval$1("ListIterable.E"); + while (t2.moveNext$0()) { + t1 = t2.__internal$_current; + extended = _this._extension_store$_unifyExtenders$3(t1 == null ? t5._as(t1) : t1, mediaQueryContext, t10); + if (extended == null) + continue; + for (t1 = J.get$iterator$ax(extended); t1.moveNext$0();) { + withCombinators = t1.get$current(t1).withAdditionalCombinators$1(t6); + if (!withCombinators.accept$1(B.C__IsUselessVisitor0)) + t3.push(withCombinators); + } + } + isOriginal = new A.ExtensionStore__extendCompound_closure3(); + return _this._extension_store$_trim$2(t3, inOriginal && t4 ? new A.ExtensionStore__extendCompound_closure4(B.JSArray_methods.get$first(t3)) : isOriginal); + }, + _extension_store$_unifyExtenders$3(extenders, mediaQueryContext, span) { + var t1, t2, t3, originals, originalsLineBreak, t4, complexes, _null = null, + toUnify = A.QueueList$(_null, type$.ComplexSelector_2); + for (t1 = J.getInterceptor$ax(extenders), t2 = t1.get$iterator(extenders), t3 = type$.JSArray_SimpleSelector_2, originals = _null, originalsLineBreak = false; t2.moveNext$0();) { + t4 = t2.get$current(t2); + if (t4.isOriginal) { + if (originals == null) + originals = A._setArrayType([], t3); + t4 = t4.selector; + B.JSArray_methods.addAll$1(originals, B.JSArray_methods.get$last(t4.components).selector.components); + originalsLineBreak = originalsLineBreak || t4.lineBreak; + } else { + t4 = t4.selector; + if (t4.accept$1(B.C__IsUselessVisitor0)) + return _null; + else + toUnify._queue_list$_add$1(t4); + } + } + if (originals != null) + toUnify.addFirst$1(A.ComplexSelector$0(B.List_empty17, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(originals, span), A.List_List$unmodifiable(B.List_empty17, type$.CssValue_Combinator_2), span)], type$.JSArray_ComplexSelectorComponent_2), span, originalsLineBreak)); + complexes = A.unifyComplex0(toUnify, span); + if (complexes == null) + return _null; + for (t1 = t1.get$iterator(extenders); t1.moveNext$0();) + t1.get$current(t1).assertCompatibleMediaContext$1(mediaQueryContext); + return complexes; + }, + _extension_store$_extendSimple$4(simple, extensions, mediaQueryContext, targetsUsed) { + var t2, _1_0, + t1 = new A.ExtensionStore__extendSimple_withoutPseudo0(this, extensions, targetsUsed); + if (simple instanceof A.PseudoSelector0) + t2 = simple.selector != null; + else + t2 = false; + if (t2) { + _1_0 = this._extension_store$_extendPseudo$3(simple, extensions, mediaQueryContext); + if (_1_0 != null) + return new A.MappedListIterable(_1_0, new A.ExtensionStore__extendSimple_closure1(this, t1), A._arrayInstanceType(_1_0)._eval$1("MappedListIterable<1,List>")); + } + return A.NullableExtension_andThen0(t1.call$1(simple), new A.ExtensionStore__extendSimple_closure2()); + }, + _extension_store$_extenderForSimple$1(simple) { + var t1 = simple.span; + t1 = A.ComplexSelector$0(B.List_empty17, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(A._setArrayType([simple], type$.JSArray_SimpleSelector_2), t1), A.List_List$unmodifiable(B.List_empty17, type$.CssValue_Combinator_2), t1)], type$.JSArray_ComplexSelectorComponent_2), t1, false); + this._extension_store$_sourceSpecificity.$index(0, simple); + return new A.Extender0(t1, true); + }, + _extension_store$_extendPseudo$3(pseudo, extensions, mediaQueryContext) { + var extended, complexes, t1, result, + selector = pseudo.selector; + if (selector == null) + throw A.wrapException(A.ArgumentError$("Selector " + pseudo.toString$0(0) + " must have a selector argument.", null)); + extended = this._extension_store$_extendList$3(selector, extensions, mediaQueryContext); + if (extended === selector) + return null; + complexes = extended.components; + t1 = pseudo.normalizedName === "not"; + if (t1 && !B.JSArray_methods.any$1(selector.components, new A.ExtensionStore__extendPseudo_closure4()) && B.JSArray_methods.any$1(complexes, new A.ExtensionStore__extendPseudo_closure5())) + complexes = new A.WhereIterable(complexes, new A.ExtensionStore__extendPseudo_closure6(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>")); + complexes = J.expand$1$1$ax(complexes, new A.ExtensionStore__extendPseudo_closure7(pseudo), type$.ComplexSelector_2); + if (t1 && selector.components.length === 1) { + t1 = A.MappedIterable_MappedIterable(complexes, new A.ExtensionStore__extendPseudo_closure8(pseudo, selector), complexes.$ti._eval$1("Iterable.E"), type$.PseudoSelector_2); + result = A.List_List$_of(t1, A._instanceType(t1)._eval$1("Iterable.E")); + return result.length === 0 ? null : result; + } else + return A._setArrayType([pseudo.withSelector$1(A.SelectorList$0(complexes, selector.span))], type$.JSArray_PseudoSelector_2); + }, + _extension_store$_trim$2(selectors, isOriginal) { + var result, i, t1, t2, numOriginals, _box_0, complex1, j, t3, t4, _i, t5, maxSpecificity; + if (selectors.length > 100) + return selectors; + result = A.QueueList$(null, type$.ComplexSelector_2); + $label0$0: + for (i = selectors.length - 1, t1 = A._arrayInstanceType(selectors), t2 = t1._precomputed1, t1 = t1._eval$1("SubListIterable<1>"), numOriginals = 0; i >= 0; --i) { + _box_0 = {}; + complex1 = selectors[i]; + if (isOriginal.call$1(complex1)) { + for (j = 0; j < numOriginals; ++j) + if (result.$index(0, j).$eq(0, complex1)) { + A.rotateSlice0(result, 0, j + 1); + continue $label0$0; + } + ++numOriginals; + result.addFirst$1(complex1); + continue $label0$0; + } + _box_0.maxSpecificity = 0; + for (t3 = complex1.components, t4 = t3.length, _i = 0, t5 = 0; _i < t4; ++_i, t5 = maxSpecificity) { + maxSpecificity = Math.max(t5, this._extension_store$_sourceSpecificityFor$1(t3[_i].selector)); + _box_0.maxSpecificity = maxSpecificity; + } + if (result.any$1(result, new A.ExtensionStore__trim_closure1(_box_0, complex1))) + continue $label0$0; + t3 = new A.SubListIterable(selectors, 0, i, t1); + t3.SubListIterable$3(selectors, 0, i, t2); + if (t3.any$1(0, new A.ExtensionStore__trim_closure2(_box_0, complex1))) + continue $label0$0; + result.addFirst$1(complex1); + } + return result; + }, + _extension_store$_sourceSpecificityFor$1(compound) { + var t1, t2, t3, specificity, _i, t4; + for (t1 = compound.components, t2 = t1.length, t3 = this._extension_store$_sourceSpecificity, specificity = 0, _i = 0; _i < t2; ++_i) { + t4 = t3.$index(0, t1[_i]); + if (t4 == null) + t4 = 0; + specificity = Math.max(specificity, t4); + } + return specificity; + }, + clone$0() { + var t3, t4, _this = this, + t1 = type$.SimpleSelector_2, + newSelectors = A.LinkedHashMap_LinkedHashMap$_empty(t1, type$.Set_ModifiableBox_SelectorList_2), + t2 = type$.ModifiableBox_SelectorList_2, + newMediaContexts = A.LinkedHashMap_LinkedHashMap$_empty(t2, type$.List_CssMediaQuery_2), + oldToNewSelectors = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList_2); + _this._extension_store$_selectors.forEach$1(0, new A.ExtensionStore_clone_closure0(_this, newSelectors, A.LinkedHashMap_LinkedHashMap$_empty(t2, t2), oldToNewSelectors, newMediaContexts)); + t2 = type$.Extension_2; + t3 = A.copyMapOfMap0(_this._extension_store$_extensions, t1, type$.ComplexSelector_2, t2); + t2 = A.copyMapOfList0(_this._extension_store$_extensionsByExtender, t1, t2); + t1 = new A.JsIdentityLinkedHashMap(type$.JsIdentityLinkedHashMap_SimpleSelector_int_2); + t1.addAll$1(0, _this._extension_store$_sourceSpecificity); + t4 = new A._LinkedIdentityHashSet(type$._LinkedIdentityHashSet_ComplexSelector_2); + t4.addAll$1(0, _this._extension_store$_originals); + return new A._Record_2(new A.ExtensionStore0(newSelectors, t3, t2, newMediaContexts, t1, t4, B.ExtendMode_normal_0_normal0), oldToNewSelectors); + }, + get$_extension_store$_extensions() { + return this._extension_store$_extensions; + }, + get$_extension_store$_sourceSpecificity() { + return this._extension_store$_sourceSpecificity; + } + }; + A.ExtensionStore_extensionsWhereTarget_closure0.prototype = { + call$1(extension) { + return !extension.isOptional; + }, + $signature: 471 + }; + A.ExtensionStore__registerSelector_closure0.prototype = { + call$0() { + return A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableBox_SelectorList_2); + }, + $signature: 472 + }; + A.ExtensionStore_addExtension_closure2.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 131 + }; + A.ExtensionStore_addExtension_closure3.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension_2); + }, + $signature: 246 + }; + A.ExtensionStore_addExtension_closure4.prototype = { + call$0() { + return this.complex.get$specificity(); + }, + $signature: 10 + }; + A.ExtensionStore__extendExistingExtensions_closure1.prototype = { + call$0() { + return A._setArrayType([], type$.JSArray_Extension_2); + }, + $signature: 246 + }; + A.ExtensionStore__extendExistingExtensions_closure2.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 131 + }; + A.ExtensionStore_addExtensions_closure0.prototype = { + call$0() { + return A.LinkedHashMap_LinkedHashMap$_empty(type$.ComplexSelector_2, type$.Extension_2); + }, + $signature: 131 + }; + A.ExtensionStore__extendComplex_closure0.prototype = { + call$1(path) { + var t1 = this.complex; + return J.map$1$1$ax(A.weave0(path, t1.span, t1.lineBreak), new A.ExtensionStore__extendComplex__closure0(this._box_0, this.$this, t1), type$.ComplexSelector_2); + }, + $signature: 475 + }; + A.ExtensionStore__extendComplex__closure0.prototype = { + call$1(outputComplex) { + var _this = this, + t1 = _this._box_0; + if (t1.first && _this.$this._extension_store$_originals.contains$1(0, _this.complex)) + _this.$this._extension_store$_originals.add$1(0, outputComplex); + t1.first = false; + return outputComplex; + }, + $signature: 59 + }; + A.ExtensionStore__extendCompound_closure2.prototype = { + call$1(extender) { + return B.JSArray_methods.get$last(extender.selector.components).selector.components; + }, + $signature: 477 + }; + A.ExtensionStore__extendCompound_closure3.prototype = { + call$1(_) { + return false; + }, + $signature: 22 + }; + A.ExtensionStore__extendCompound_closure4.prototype = { + call$1(complex) { + return complex.$eq(0, this.original); + }, + $signature: 22 + }; + A.ExtensionStore__extendSimple_withoutPseudo0.prototype = { + call$1(simple) { + var t1, t2, + extensionsForSimple = this.extensions.$index(0, simple); + if (extensionsForSimple == null) + return null; + t1 = this.targetsUsed; + if (t1 != null) + t1.add$1(0, simple); + t1 = A._setArrayType([], type$.JSArray_Extender_2); + t2 = this.$this; + if (t2._extension_store$_mode !== B.ExtendMode_replace_1_replace0) + t1.push(t2._extension_store$_extenderForSimple$1(simple)); + for (t2 = extensionsForSimple.get$values(extensionsForSimple), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(t2).extender); + return t1; + }, + $signature: 478 + }; + A.ExtensionStore__extendSimple_closure1.prototype = { + call$1(pseudo) { + var t1 = this.withoutPseudo.call$1(pseudo); + return t1 == null ? A._setArrayType([this.$this._extension_store$_extenderForSimple$1(pseudo)], type$.JSArray_Extender_2) : t1; + }, + $signature: 479 + }; + A.ExtensionStore__extendSimple_closure2.prototype = { + call$1(result) { + return A._setArrayType([result], type$.JSArray_List_Extender_2); + }, + $signature: 480 + }; + A.ExtensionStore__extendPseudo_closure4.prototype = { + call$1(complex) { + return complex.components.length > 1; + }, + $signature: 22 + }; + A.ExtensionStore__extendPseudo_closure5.prototype = { + call$1(complex) { + return complex.components.length === 1; + }, + $signature: 22 + }; + A.ExtensionStore__extendPseudo_closure6.prototype = { + call$1(complex) { + return complex.components.length <= 1; + }, + $signature: 22 + }; + A.ExtensionStore__extendPseudo_closure7.prototype = { + call$1(complex) { + var innerPseudo, innerSelector, + t1 = complex.get$singleCompound(); + if (t1 == null) + innerPseudo = null; + else { + t1 = t1.components; + innerPseudo = t1.length === 1 ? B.JSArray_methods.get$first(t1) : null; + } + if (!(innerPseudo instanceof A.PseudoSelector0)) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + innerSelector = innerPseudo.selector; + if (innerSelector == null) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + t1 = this.pseudo; + switch (t1.normalizedName) { + case "not": + if (!B.Set_0egh6.contains$1(0, innerPseudo.normalizedName)) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + return innerSelector.components; + case "is": + case "matches": + case "where": + case "any": + case "current": + case "nth-child": + case "nth-last-child": + if (innerPseudo.name !== t1.name) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + if (innerPseudo.argument != t1.argument) + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + return innerSelector.components; + case "has": + case "host": + case "host-context": + case "slotted": + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + default: + return A._setArrayType([], type$.JSArray_ComplexSelector_2); + } + }, + $signature: 481 + }; + A.ExtensionStore__extendPseudo_closure8.prototype = { + call$1(complex) { + return this.pseudo.withSelector$1(A.SelectorList$0(A._setArrayType([complex], type$.JSArray_ComplexSelector_2), this.selector.span)); + }, + $signature: 482 + }; + A.ExtensionStore__trim_closure1.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 22 + }; + A.ExtensionStore__trim_closure2.prototype = { + call$1(complex2) { + return complex2.get$specificity() >= this._box_0.maxSpecificity && complex2.isSuperselector$1(this.complex1); + }, + $signature: 22 + }; + A.ExtensionStore_clone_closure0.prototype = { + call$2(simple, selectors) { + var t1, t2, t3, t4, t5, t6, newSelector, _0_0, _this = this, + newSelectorSet = A.LinkedHashSet_LinkedHashSet$_empty(type$.ModifiableBox_SelectorList_2); + _this.newSelectors.$indexSet(0, simple, newSelectorSet); + for (t1 = selectors.get$iterator(selectors), t2 = _this.newBoxes, t3 = _this.oldToNewSelectors, t4 = _this.$this._extension_store$_mediaContexts, t5 = _this.newMediaContexts; t1.moveNext$0();) { + t6 = t1.get$current(t1); + newSelector = t2.putIfAbsent$2(t6, new A.ExtensionStore_clone__closure0(t6)); + newSelectorSet.add$1(0, newSelector); + t3.$indexSet(0, t6.value, new A.Box0(newSelector, newSelector.$ti._eval$1("Box0<1>"))); + _0_0 = t4.$index(0, t6); + if (_0_0 != null) + t5.$indexSet(0, newSelector, _0_0); + } + }, + $signature: 483 + }; + A.ExtensionStore_clone__closure0.prototype = { + call$0() { + return new A.ModifiableBox0(this.selector.value, type$.ModifiableBox_SelectorList_2); + }, + $signature: 484 + }; + A.FiberClass.prototype = {}; + A.Fiber.prototype = {}; + A.JSToDartFileImporter.prototype = { + canonicalize$1(_, url) { + var result, t1, resultUrl; + if (url.get$scheme() === "file") + return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); + result = A.wrapJSExceptions(new A.JSToDartFileImporter_canonicalize_closure(this, url)); + if (result == null) + return null; + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The findFileUrl() function can't return a Promise for synchron compile functions.")); + else { + t1 = self.URL; + if (!(result instanceof t1)) + A.jsThrow(new self.Error(string$.The_fie)); + } + resultUrl = A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + if (resultUrl.get$scheme() !== "file") + A.jsThrow(new self.Error(string$.The_fiu + url.toString$0(0) + '".')); + return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, resultUrl); + }, + load$1(_, url) { + return $.$get$FilesystemImporter_cwd0().load$1(0, url); + }, + isNonCanonicalScheme$1(scheme) { + return scheme !== "file"; + } + }; + A.JSToDartFileImporter_canonicalize_closure.prototype = { + call$0() { + return this.$this._file0$_findFileUrl.call$2(this.url.toString$0(0), A.canonicalizeContext0()); + }, + $signature: 36 + }; + A.FilesystemImporter0.prototype = { + canonicalize$1(_, url) { + var resolved; + if (url.get$scheme() === "file") + resolved = A.resolveImportPath0($.$get$context().style.pathFromUri$1(A._parseUri(url))); + else if (url.get$scheme() !== "") + return null; + else { + resolved = A.resolveImportPath0(A.join(this._filesystem$_loadPath, $.$get$context().style.pathFromUri$1(A._parseUri(url)), null)); + if (resolved != null && this._filesystem$_loadPathDeprecated) + A.warnForDeprecation0(string$.Using_t, B.Deprecation_LUk); + } + return A.NullableExtension_andThen0(resolved, new A.FilesystemImporter_canonicalize_closure0()); + }, + load$1(_, url) { + var path = $.$get$context().style.pathFromUri$1(A._parseUri(url)); + return A.ImporterResult$(A.readFile0(path), url, A.Syntax_forPath0(path)); + }, + toString$0(_) { + return this._filesystem$_loadPath; + } + }; + A.FilesystemImporter_canonicalize_closure0.prototype = { + call$1(resolved) { + var t2, t0, _null = null, + t1 = A.isNodeJs() ? self.process : _null; + if (!J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "win32")) { + t1 = A.isNodeJs() ? self.process : _null; + t1 = J.$eq$(t1 == null ? _null : J.get$platform$x(t1), "darwin"); + } else + t1 = true; + if (t1) { + t1 = A.absolute(resolved, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + t2 = $.$get$context(); + t1 = A._realCasePath0(t2.normalize$1(t1)); + } else { + t1 = $.$get$context(); + t2 = t1.canonicalize$1(0, resolved); + t0 = t2; + t2 = t1; + t1 = t0; + } + return t2.toUri$1(t1); + }, + $signature: 127 + }; + A.ForRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitForRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var _this = this, + t1 = _this.from.toString$0(0), + t2 = _this.isExclusive ? "to" : "through"; + return "@for $" + _this.variable + " from " + t1 + " " + t2 + " " + _this.to.toString$0(0) + " {" + B.JSArray_methods.join$1(_this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ForwardRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitForwardRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, prefix, _this = this, + t1 = "@forward " + A.StringExpression_quoteText0(_this.url.toString$0(0)), + shownMixinsAndFunctions = _this.shownMixinsAndFunctions, + hiddenMixinsAndFunctions = _this.hiddenMixinsAndFunctions; + if (shownMixinsAndFunctions != null) { + t2 = _this.shownVariables; + t2.toString; + t2 = t1 + " show " + _this._forward_rule0$_memberList$2(shownMixinsAndFunctions, t2); + t1 = t2; + } else if (hiddenMixinsAndFunctions != null && hiddenMixinsAndFunctions._base.get$isNotEmpty(0)) { + t2 = _this.hiddenVariables; + t2.toString; + t2 = t1 + " hide " + _this._forward_rule0$_memberList$2(hiddenMixinsAndFunctions, t2); + t1 = t2; + } + prefix = _this.prefix; + if (prefix != null) + t1 += " as " + prefix + "*"; + t2 = _this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _forward_rule0$_memberList$2(mixinsAndFunctions, variables) { + var t2, + t1 = A.List_List$_of(mixinsAndFunctions, type$.String); + for (t2 = variables._base.get$iterator(0); t2.moveNext$0();) + t1.push("$" + t2.get$current(0)); + return B.JSArray_methods.join$1(t1, ", "); + }, + get$span(receiver) { + return this.span; + } + }; + A.ForwardedModuleView0.prototype = { + get$url(_) { + var t1 = this._forwarded_view0$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._forwarded_view0$_inner.get$upstream(); + }, + get$extensionStore() { + return this._forwarded_view0$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._forwarded_view0$_inner; + return t1.get$css(t1); + }, + get$preModuleComments() { + return this._forwarded_view0$_inner.get$preModuleComments(); + }, + get$transitivelyContainsCss() { + return this._forwarded_view0$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._forwarded_view0$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + var t2, _1_0, _2_0, + _s19_ = "Undefined variable.", + t1 = this._forwarded_view0$_rule, + _0_0 = t1.shownVariables; + if (_0_0 != null) + t2 = !_0_0._base.contains$1(0, $name); + else + t2 = false; + if (t2) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + else { + _1_0 = t1.hiddenVariables; + if (_1_0 != null) + t2 = _1_0._base.contains$1(0, $name); + else + t2 = false; + if (t2) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + } + _2_0 = t1.prefix; + if (_2_0 != null) { + if (!B.JSString_methods.startsWith$1($name, _2_0)) + throw A.wrapException(A.SassScriptException$0(_s19_, null)); + $name = B.JSString_methods.substring$1($name, _2_0.length); + } + return this._forwarded_view0$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + var _0_0 = this._forwarded_view0$_rule.prefix; + if (_0_0 != null) + $name = B.JSString_methods.substring$1($name, _0_0.length); + return this._forwarded_view0$_inner.variableIdentity$1($name); + }, + couldHaveBeenConfigured$1(variables) { + var t5, t6, _1_0, _2_0, blocklist, _this = this, + t1 = _this._forwarded_view0$_rule, + t2 = t1.prefix, + t3 = t2 == null, + t4 = false; + if (t3) + if (t1.shownVariables == null) { + t4 = t1.hiddenVariables; + t4 = t4 == null ? null : t4._base.get$isEmpty(0); + t4 = t4 !== false; + } + if (t4) + return _this._forwarded_view0$_inner.couldHaveBeenConfigured$1(variables); + if (!t3) { + t3 = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + for (t4 = variables.get$iterator(variables), t5 = t2.length; t4.moveNext$0();) { + t6 = t4.get$current(t4); + if (B.JSString_methods.startsWith$1(t6, t2)) + t3.add$1(0, B.JSString_methods.substring$1(t6, t5)); + } + variables = t3; + } + _1_0 = t1.shownVariables; + if (_1_0 != null) + return _this._forwarded_view0$_inner.couldHaveBeenConfigured$1(variables.intersection$1(_1_0)); + else { + _2_0 = t1.hiddenVariables; + if (_2_0 != null) { + t1 = _2_0._base.get$isNotEmpty(0); + blocklist = _2_0; + } else { + blocklist = null; + t1 = false; + } + t2 = _this._forwarded_view0$_inner; + if (t1) + return t2.couldHaveBeenConfigured$1(variables.difference$1(blocklist)); + else + return t2.couldHaveBeenConfigured$1(variables); + } + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.ForwardedModuleView0 && this._forwarded_view0$_inner.$eq(0, other._forwarded_view0$_inner) && this._forwarded_view0$_rule === other._forwarded_view0$_rule; + }, + get$hashCode(_) { + var t1 = this._forwarded_view0$_inner; + return (t1.get$hashCode(t1) ^ A.Primitives_objectHashCode(this._forwarded_view0$_rule)) >>> 0; + }, + cloneCss$0() { + return A.ForwardedModuleView$0(this._forwarded_view0$_inner.cloneCss$0(), this._forwarded_view0$_rule, this.$ti._precomputed1); + }, + toString$0(_) { + return "forwarded " + this._forwarded_view0$_inner.toString$0(0); + }, + $isModule1: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.FunctionExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? t1 + "." : ""; + t1 += this.originalName + this.$arguments.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.JSFunction0.prototype = {}; + A.SupportsFunction0.prototype = { + toInterpolation$0() { + var t4, t5, + t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + t3 = this.name; + t2.addInterpolation$1(t3); + t4 = this.$arguments; + t5 = t4.span; + t3 = A.SpanExtensions_between(t3.span, t5); + t3 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t3.file._decodedChars, t3._file$_start, t3._end), 0, null); + t1._contents += t3; + t2.addInterpolation$1(t4); + t4 = this.span; + t5 = A.SpanExtensions_after(t4, t5); + t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); + t1._contents += t5; + return t2.interpolation$1(t4); + }, + withSpan$1(span) { + return new A.SupportsFunction0(this.name, this.$arguments, span); + }, + toString$0(_) { + return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; + }, + $isAstNode0: 1, + $isSassNode: 1, + $isSupportsCondition: 1, + get$span(receiver) { + return this.span; + } + }; + A.functionClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassFunction", new A.functionClass__closure())); + A.JSClassExtension_injectSuperclass(t1._as(new A.SassFunction0(A.BuiltInCallable$function0("f", "", new A.functionClass__closure0(), null), null).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.functionClass__closure.prototype = { + call$3($self, signature, callback) { + var paren = B.JSString_methods.indexOf$1(signature, "("); + if (paren === -1 || !B.JSString_methods.endsWith$1(signature, ")")) + A.jsThrow(new self.Error('Invalid signature for new sass.SassFunction(): "' + signature + '"')); + return new A.SassFunction0(A.BuiltInCallable$function0(B.JSString_methods.substring$2(signature, 0, paren), B.JSString_methods.substring$2(signature, paren + 1, signature.length - 1), callback, null), null); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 485 + }; + A.functionClass__closure0.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 3 + }; + A.SassFunction0.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._serialize0$_inspect) + A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize0$_buffer; + t1.write$1(0, "get-function("); + t2 = this.callable; + visitor._serialize0$_visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertFunction$1($name) { + return this; + }, + assertCompileContext$1(compileContext) { + var t1 = this._function0$_compileContext; + if (t1 != null) + t1 = t1 !== compileContext; + else + t1 = false; + if (t1) + throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + " does not belong to current compilation.", null)); + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassFunction0 && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A.FunctionRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitFunctionRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@function " + this.name + "(" + this.parameters.toString$0(0) + ") {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.unifyComplex_closure0.prototype = { + call$1(complex) { + return complex.lineBreak; + }, + $signature: 22 + }; + A._weaveParents_closure3.prototype = { + call$2(group1, group2) { + var t1, unified; + if (B.C_ListEquality.equals$2(0, group1, group2)) + return group1; + if (A._complexIsParentSuperselector0(group1, group2)) + return group2; + if (A._complexIsParentSuperselector0(group2, group1)) + return group1; + if (!A._mustUnify0(group1, group2)) + return null; + t1 = this.span; + unified = A.unifyComplex0(A._setArrayType([A.ComplexSelector$0(B.List_empty17, group1, t1, false), A.ComplexSelector$0(B.List_empty17, group2, t1, false)], type$.JSArray_ComplexSelector_2), t1); + if (unified == null) + t1 = null; + else { + t1 = A.IterableExtension_get_singleOrNull(unified); + t1 = t1 == null ? null : t1.components; + } + return t1; + }, + $signature: 486 + }; + A._weaveParents_closure4.prototype = { + call$1(sequence) { + return A._complexIsParentSuperselector0(sequence.get$first(sequence), this.group); + }, + $signature: 247 + }; + A._weaveParents_closure5.prototype = { + call$1(sequence) { + return sequence.get$length(0) === 0; + }, + $signature: 247 + }; + A._weaveParents_closure6.prototype = { + call$1(choice) { + return J.get$isNotEmpty$asx(choice); + }, + $signature: 488 + }; + A._mustUnify_closure0.prototype = { + call$1(component) { + return B.JSArray_methods.any$1(component.selector.components, new A._mustUnify__closure0(this.uniqueSelectors)); + }, + $signature: 55 + }; + A._mustUnify__closure0.prototype = { + call$1(simple) { + var t1; + if (!(simple instanceof A.IDSelector0)) + t1 = simple instanceof A.PseudoSelector0 && !simple.isClass; + else + t1 = true; + return t1 && this.uniqueSelectors.contains$1(0, simple); + }, + $signature: 15 + }; + A.paths_closure0.prototype = { + call$2(paths, choice) { + var t1 = this.T; + t1 = J.expand$1$1$ax(choice, new A.paths__closure0(paths, t1), t1._eval$1("List<0>")); + t1 = A.List_List$_of(t1, t1.$ti._eval$1("Iterable.E")); + return t1; + }, + $signature() { + return this.T._eval$1("List>(List>,List<0>)"); + } + }; + A.paths__closure0.prototype = { + call$1(option) { + var t1 = this.T; + return J.map$1$1$ax(this.paths, new A.paths___closure0(option, t1), t1._eval$1("List<0>")); + }, + $signature() { + return this.T._eval$1("Iterable>(0)"); + } + }; + A.paths___closure0.prototype = { + call$1(path) { + var t1 = A.List_List$_of(path, this.T); + t1.push(this.option); + return t1; + }, + $signature() { + return this.T._eval$1("List<0>(List<0>)"); + } + }; + A.listIsSuperselector_closure0.prototype = { + call$1(complex1) { + return B.JSArray_methods.any$1(this.list1, new A.listIsSuperselector__closure0(complex1)); + }, + $signature: 22 + }; + A.listIsSuperselector__closure0.prototype = { + call$1(complex2) { + return complex2.isSuperselector$1(this.complex1); + }, + $signature: 22 + }; + A.complexIsSuperselector_closure1.prototype = { + call$1($parent) { + return $parent.combinators.length > 1; + }, + $signature: 55 + }; + A.complexIsSuperselector_closure2.prototype = { + call$1(component) { + return A._isSupercombinator0(this.combinator1, A.IterableExtension_get_firstOrNull(component.combinators)); + }, + $signature: 55 + }; + A._compatibleWithPreviousCombinator_closure0.prototype = { + call$1(component) { + var t1 = component.combinators, + t2 = A.IterableExtension_get_firstOrNull(t1); + if ((t2 == null ? null : t2.value) !== B.Combinator_98W0) { + t1 = A.IterableExtension_get_firstOrNull(t1); + t1 = (t1 == null ? null : t1.value) === B.Combinator_sHB0; + } else + t1 = true; + return t1; + }, + $signature: 55 + }; + A.compoundIsSuperselector_closure0.prototype = { + call$1(simple1) { + return B.JSArray_methods.any$1(this.compound2.components, simple1.get$isSuperselector()); + }, + $signature: 15 + }; + A._selectorPseudoIsSuperselector_closure6.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 68 + }; + A._selectorPseudoIsSuperselector_closure7.prototype = { + call$1(complex1) { + var t1, t2; + if (complex1.leadingCombinators.length === 0) { + t1 = A._setArrayType([], type$.JSArray_ComplexSelectorComponent_2); + t2 = this.parents; + if (t2 != null) + B.JSArray_methods.addAll$1(t1, t2); + t2 = this.compound2; + t1.push(new A.ComplexSelectorComponent0(t2, A.List_List$unmodifiable(B.List_empty17, type$.CssValue_Combinator_2), t2.span)); + t1 = A.complexIsSuperselector0(complex1.components, t1); + } else + t1 = false; + return t1; + }, + $signature: 22 + }; + A._selectorPseudoIsSuperselector_closure8.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 68 + }; + A._selectorPseudoIsSuperselector_closure9.prototype = { + call$1(selector2) { + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 68 + }; + A._selectorPseudoIsSuperselector_closure10.prototype = { + call$1(complex) { + if (complex.accept$1(B._IsBogusVisitor_true0)) + return false; + return B.JSArray_methods.any$1(this.compound2.components, new A._selectorPseudoIsSuperselector__closure0(complex, this.pseudo1)); + }, + $signature: 22 + }; + A._selectorPseudoIsSuperselector__closure0.prototype = { + call$1(simple2) { + var t1, selector2, _0_4, _this = this; + $label0$1: { + if (simple2 instanceof A.TypeSelector0) { + t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure1(simple2)); + break $label0$1; + } + if (simple2 instanceof A.IDSelector0) { + t1 = B.JSArray_methods.any$1(B.JSArray_methods.get$last(_this.complex.components).selector.components, new A._selectorPseudoIsSuperselector___closure2(simple2)); + break $label0$1; + } + selector2 = null; + t1 = false; + if (simple2 instanceof A.PseudoSelector0) { + _0_4 = simple2.selector; + if (_0_4 != null) { + selector2 = _0_4 == null ? type$.SelectorList_2._as(_0_4) : _0_4; + t1 = simple2.name === _this.pseudo1.name; + } + } + if (t1) { + t1 = A.listIsSuperselector0(selector2.components, A._setArrayType([_this.complex], type$.JSArray_ComplexSelector_2)); + break $label0$1; + } + t1 = false; + break $label0$1; + } + return t1; + }, + $signature: 15 + }; + A._selectorPseudoIsSuperselector___closure1.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.TypeSelector0) { + t1 = this.simple2.name.$eq(0, simple1.name); + t1 = !t1; + } else + t1 = false; + return t1; + }, + $signature: 15 + }; + A._selectorPseudoIsSuperselector___closure2.prototype = { + call$1(simple1) { + var t1; + if (simple1 instanceof A.IDSelector0) + t1 = this.simple2.name !== simple1.name; + else + t1 = false; + return t1; + }, + $signature: 15 + }; + A._selectorPseudoIsSuperselector_closure11.prototype = { + call$1(selector2) { + var t1 = B.C_ListEquality.equals$2(0, this.selector1.components, selector2.components); + return t1; + }, + $signature: 68 + }; + A._selectorPseudoIsSuperselector_closure12.prototype = { + call$1(pseudo2) { + var t1, selector2; + if (!(pseudo2 instanceof A.PseudoSelector0)) + return false; + t1 = this.pseudo1; + if (pseudo2.name !== t1.name) + return false; + if (pseudo2.argument != t1.argument) + return false; + selector2 = pseudo2.selector; + if (selector2 == null) + return false; + return A.listIsSuperselector0(this.selector1.components, selector2.components); + }, + $signature: 15 + }; + A._selectorPseudoArgs_closure1.prototype = { + call$1(pseudo) { + return pseudo.isClass === this.isClass && pseudo.name === this.name; + }, + $signature: 490 + }; + A._selectorPseudoArgs_closure2.prototype = { + call$1(pseudo) { + return pseudo.selector; + }, + $signature: 491 + }; + A.globalFunctions_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).get$isTruthy() ? t1.$index($arguments, 1) : t1.$index($arguments, 2); + }, + $signature: 3 + }; + A.GamutMapMethod0.prototype = { + toString$0(_) { + return this.name; + } + }; + A.HslColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, hue, saturation, lightness, alpha) { + var t1 = hue == null, + scaledHue = B.JSNumber_methods.$mod((t1 ? 0 : hue) / 360, 1), + t2 = saturation == null, + scaledSaturation = (t2 ? 0 : saturation) / 100, + t3 = lightness == null, + scaledLightness = (t3 ? 0 : lightness) / 100, + m2 = scaledLightness <= 0.5 ? scaledLightness * (scaledSaturation + 1) : scaledLightness + scaledSaturation - scaledLightness * scaledSaturation, + m1 = scaledLightness * 2 - m2; + return B.SrgbColorSpace_thf0.convert$8$missingChroma$missingHue$missingLightness(dest, A.hueToRgb0(m1, m2, scaledHue + 0.3333333333333333), A.hueToRgb0(m1, m2, scaledHue), A.hueToRgb0(m1, m2, scaledHue - 0.3333333333333333), alpha, t2, t1, t3); + } + }; + A.HwbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, hue, whiteness, blackness, alpha) { + var t3, t1 = {}, + t2 = hue == null, + scaledHue = B.JSNumber_methods.$mod(t2 ? 0 : hue, 360) / 360, + scaledWhiteness = t1.scaledWhiteness = (whiteness == null ? 0 : whiteness) / 100, + scaledBlackness = (blackness == null ? 0 : blackness) / 100, + sum = scaledWhiteness + scaledBlackness; + if (sum > 1) { + t3 = t1.scaledWhiteness = scaledWhiteness / sum; + scaledBlackness /= sum; + } else + t3 = scaledWhiteness; + t3 = new A.HwbColorSpace_convert_toRgb0(t1, 1 - t3 - scaledBlackness); + return B.SrgbColorSpace_thf0.convert$6$missingHue(dest, t3.call$1(scaledHue + 0.3333333333333333), t3.call$1(scaledHue), t3.call$1(scaledHue - 0.3333333333333333), alpha, t2); + } + }; + A.HwbColorSpace_convert_toRgb0.prototype = { + call$1(hue) { + return A.hueToRgb0(0, 1, hue) * this.factor + this._box_0.scaledWhiteness; + }, + $signature: 12 + }; + A.InterpolatedIDSelector.prototype = { + get$span(_) { + var t1 = this.name.span; + return t1.get$file(t1).span$2(0, t1.get$start(t1).offset - 1, t1.get$end(t1).offset); + }, + accept$1$1(visitor) { + return J.visitIDSelector$1$x(visitor._simple_selector$_inner, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "#" + this.name.toString$0(0); + } + }; + A.IDSelector0.prototype = { + get$specificity() { + return A._asInt(Math.pow(A.SimpleSelector0.prototype.get$specificity.call(this), 2)); + }, + accept$1$1(visitor) { + return visitor.visitIDSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.IDSelector0(this.name + suffix, this.span); + }, + unify$1(compound) { + if (B.JSArray_methods.any$1(compound, new A.IDSelector_unify_closure0(this))) + return null; + return this.super$SimpleSelector$unify0(compound); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.IDSelector0 && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.IDSelector_unify_closure0.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.IDSelector0) + t1 = this.$this.name !== simple.name; + else + t1 = false; + return t1; + }, + $signature: 15 + }; + A.IfExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitIfExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1, t2, first, _i, t3, t4, condition; + for (t1 = this.branches, t2 = t1.length, first = true, _i = 0, t3 = "if("; _i < t2; ++_i) { + t4 = t1[_i]; + condition = t4._0; + if (first) + first = false; + else + t3 += "; "; + t3 = t3 + A.S(condition == null ? "else" : condition) + ": " + t4._1.toString$0(0); + } + t1 = t3 + A.Primitives_stringFromCharCode(41); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionExpression0.prototype = { + get$isArbitrarySubstitution() { + return false; + }, + $isAstNode0: 1, + $isSassNode: 1 + }; + A.IfConditionParenthesized0.prototype = { + toInterpolation$1(arbitrarySubstitution) { + var t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + t3 = A.Primitives_stringFromCharCode(40); + t1._contents += t3; + t2.addInterpolation$1(this.expression.toInterpolation$1(arbitrarySubstitution)); + t3 = A.Primitives_stringFromCharCode(41); + t1._contents += t3; + return t2.interpolation$1(this.span); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionParenthesized$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "(" + this.expression.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionNegation0.prototype = { + toInterpolation$1(arbitrarySubstitution) { + var t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = "not "; + t2.addInterpolation$1(this.expression.toInterpolation$1(arbitrarySubstitution)); + return t2.interpolation$1(this.span); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionNegation$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "not " + this.expression.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionOperation0.prototype = { + get$span(_) { + var t1 = this.expressions, + t2 = B.JSArray_methods.get$first(t1); + t2 = t2.get$span(t2); + t1 = B.JSArray_methods.get$last(t1); + return t2.expand$1(0, t1.get$span(t1)); + }, + toInterpolation$1(arbitrarySubstitution) { + var t2, t3, t4, first, _i, expression, + t1 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + for (t2 = this.expressions, t3 = t2.length, t4 = this.op, first = true, _i = 0; _i < t3; ++_i) { + expression = t2[_i]; + if (first) + first = false; + else + t1._contents += " " + t4.toString$0(0) + " "; + buffer.addInterpolation$1(expression.toInterpolation$1(arbitrarySubstitution)); + } + return buffer.interpolation$1(new A.LazyFileSpan0(new A.IfConditionOperation_toInterpolation_closure0(this))); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionOperation$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return B.JSArray_methods.join$1(this.expressions, " " + this.op.toString$0(0) + " "); + } + }; + A.IfConditionOperation_toInterpolation_closure0.prototype = { + call$0() { + return this.$this.get$span(0); + }, + $signature: 16 + }; + A.IfConditionFunction0.prototype = { + get$isArbitrarySubstitution() { + var t2, + t1 = this.name.get$asPlain(), + _0_0 = t1 == null ? null : t1.toLowerCase(); + $label0$0: { + t1 = true; + if ("if" === _0_0 || "var" === _0_0 || "attr" === _0_0) + break $label0$0; + if (_0_0 != null) + t2 = B.JSString_methods.startsWith$1(_0_0, "--"); + else + t2 = false; + if (t2) + break $label0$0; + t1 = false; + break $label0$0; + } + return t1; + }, + toInterpolation$1(_) { + var t3, + t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t2.addInterpolation$1(this.name); + t3 = A.Primitives_stringFromCharCode(40); + t1._contents += t3; + t2.addInterpolation$1(this.$arguments); + t3 = A.Primitives_stringFromCharCode(41); + t1._contents += t3; + return t2.interpolation$1(this.span); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionFunction$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + "(" + this.$arguments.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionSass0.prototype = { + toInterpolation$1(arbitrarySubstitution) { + return A.throwExpression(A.MultiSourceSpanFormatException$(string$.if___c, arbitrarySubstitution.get$span(arbitrarySubstitution), "arbitrary substitution", A.LinkedHashMap_LinkedHashMap$_literal([this.span, "sass() expression"], type$.SourceSpan, type$.String), null)); + }, + accept$1$1(visitor) { + return visitor.visitIfConditionSass$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "sass(" + this.expression.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfConditionRaw0.prototype = { + get$span(_) { + return this.text.span; + }, + get$isArbitrarySubstitution() { + return true; + }, + toInterpolation$1(_) { + return this.text; + }, + accept$1$1(visitor) { + return visitor.visitIfConditionRaw$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text.toString$0(0); + } + }; + A.JSIfConditionExpressionVisitor.prototype = { + visitIfConditionParenthesized$1(_, node) { + return J.visitIfConditionParenthesized$1$x(this._if_condition_expression$_inner, node); + }, + visitIfConditionNegation$1(_, node) { + return J.visitIfConditionNegation$1$x(this._if_condition_expression$_inner, node); + }, + visitIfConditionOperation$1(_, node) { + return J.visitIfConditionOperation$1$x(this._if_condition_expression$_inner, node); + }, + visitIfConditionFunction$1(_, node) { + return J.visitIfConditionFunction$1$x(this._if_condition_expression$_inner, node); + }, + visitIfConditionSass$1(_, node) { + return J.visitIfConditionSass$1$x(this._if_condition_expression$_inner, node); + }, + visitIfConditionRaw$1(_, node) { + return J.visitIfConditionRaw$1$x(this._if_condition_expression$_inner, node); + }, + $isIfConditionExpressionVisitor: 1 + }; + A.JSIfConditionExpressionVisitorObject.prototype = {}; + A.IfRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitIfRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var result = A.ListExtensions_mapIndexed(this.clauses, new A.IfRule_toString_closure0(), type$.IfClause_2, type$.String).join$1(0, " "), + lastClause = this.lastClause; + return lastClause != null ? result + (" " + lastClause.toString$0(0)) : result; + }, + get$span(receiver) { + return this.span; + } + }; + A.IfRule_toString_closure0.prototype = { + call$2(index, clause) { + var t1 = index === 0 ? "if" : "else if"; + return "@" + t1 + " " + clause.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(clause.children, " ") + "}"; + }, + $signature: 492 + }; + A.IfRuleClause0.prototype = {}; + A.IfRuleClause$__closure0.prototype = { + call$1(child) { + var t1; + $label0$0: { + if (child instanceof A.VariableDeclaration0 || child instanceof A.FunctionRule0 || child instanceof A.MixinRule0) { + t1 = true; + break $label0$0; + } + if (child instanceof A.ImportRule0) { + t1 = B.JSArray_methods.any$1(child.imports, new A.IfRuleClause$___closure0()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 248 + }; + A.IfRuleClause$___closure0.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport0; + }, + $signature: 249 + }; + A.IfClause0.prototype = { + toString$0(_) { + return "@if " + this.expression.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ElseClause0.prototype = { + toString$0(_) { + return "@else {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + } + }; + A.ImmutableList0.prototype = {}; + A.ImmutableMap0.prototype = {}; + A.immutableMapToDartMap_closure.prototype = { + call$3(value, key, _) { + this.dartMap.$indexSet(0, key, value); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 495 + }; + A.NodeImporter.prototype = { + loadRelative$3(url, previous, forImport) { + var t1, t2, _null = null; + if ($.$get$url().style.rootLength$1(url) > 0) { + if (!B.JSString_methods.startsWith$1(url, "/") && !B.JSString_methods.startsWith$1(url, "file:")) + return _null; + return this._tryPath$2($.$get$context().style.pathFromUri$1(A._parseUri(url)), forImport); + } + if ((previous == null ? _null : previous.get$scheme()) !== "file") + return _null; + t1 = $.$get$context(); + previous.toString; + t2 = t1.style; + return this._tryPath$2(A.join(t1.dirname$1(t2.pathFromUri$1(A._parseUri(previous))), t2.pathFromUri$1(A._parseUri(url)), _null), forImport); + }, + load$3(_, url, previous, forImport) { + var t1, t2, _i, _0_0, _this = this, + previousString = _this._previousToString$1(previous); + for (t1 = _this._implementation$_importers, t2 = t1.length, _i = 0; _i < t2; ++_i) { + _0_0 = A.wrapJSExceptions(new A.NodeImporter_load_closure(_this, t1[_i], forImport, url, previousString)); + if (_0_0 != null) + return _this._handleImportResult$4(url, previous, _0_0, forImport); + } + return _this._resolveLoadPathFromUrl$2(A.Uri_parse(url), forImport); + }, + loadAsync$3(url, previous, forImport) { + return this.loadAsync$body$NodeImporter(url, previous, forImport); + }, + loadAsync$body$NodeImporter(url, previous, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Record_2_String_and_String), + $async$returnValue, $async$self = this, t1, t2, _i, _0_0, previousString; + var $async$loadAsync$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + previousString = $async$self._previousToString$1(previous); + t1 = $async$self._implementation$_importers, t2 = t1.length, _i = 0; + case 3: + // for condition + if (!(_i < t2)) { + // goto after for + $async$goto = 5; + break; + } + $async$goto = 6; + return A._asyncAwait($async$self._callImporterAsync$4(t1[_i], url, previousString, forImport), $async$loadAsync$3); + case 6: + // returning from await. + _0_0 = $async$result; + if (_0_0 != null) { + $async$returnValue = $async$self._handleImportResult$4(url, previous, _0_0, forImport); + // goto return + $async$goto = 1; + break; + } + case 4: + // for update + ++_i; + // goto for condition + $async$goto = 3; + break; + case 5: + // after for + $async$returnValue = $async$self._resolveLoadPathFromUrl$2(A.Uri_parse(url), forImport); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$loadAsync$3, $async$completer); + }, + _previousToString$1(previous) { + var t1; + $label0$0: { + if (previous == null) { + t1 = "stdin"; + break $label0$0; + } + if ("file" === previous.get$scheme()) { + t1 = $.$get$context().style.pathFromUri$1(A._parseUri(previous)); + break $label0$0; + } + t1 = previous.toString$0(0); + break $label0$0; + } + return t1; + }, + _resolveLoadPathFromUrl$2(url, forImport) { + return url.get$scheme() === "" || url.get$scheme() === "file" ? this._resolveLoadPath$2($.$get$context().style.pathFromUri$1(A._parseUri(url)), forImport) : null; + }, + _resolveLoadPath$2(path, forImport) { + var t1, t2, _i, t3, _1_0, _null = null, + _0_0 = this._tryPath$2(A.absolute(path, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), forImport); + if (_0_0 != null) + return _0_0; + for (t1 = this._includePaths, t2 = t1.length, _i = 0; _i < t2; ++_i) { + t3 = A.join(t1[_i], path, _null); + _1_0 = this._tryPath$2($.$get$context().absolute$15(t3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), forImport); + if (_1_0 != null) + return _1_0; + } + return _null; + }, + _tryPath$2(path, forImport) { + var t1 = forImport ? A.inImportRule(new A.NodeImporter__tryPath_closure(path), type$.nullable_String) : A.resolveImportPath0(path); + return A.NullableExtension_andThen0(t1, new A.NodeImporter__tryPath_closure0()); + }, + _handleImportResult$4(url, previous, value, forImport) { + var t1, file, contents, t2, resolved; + if (value instanceof self.Error) + throw A.wrapException(value); + if (!type$.NodeImporterResult._is(value)) + return null; + t1 = J.getInterceptor$x(value); + file = t1.get$file(value); + contents = t1.get$contents(value); + t1 = contents == null; + t2 = !t1; + if (t2 && A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") + A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); + if (file == null) + return new A._Record_2(t1 ? "" : contents, url); + else if (t2) + return new A._Record_2(contents, $.$get$context().toUri$1(file).toString$0(0)); + else { + resolved = this.loadRelative$3($.$get$context().toUri$1(file).toString$0(0), previous, forImport); + if (resolved == null) + resolved = this._resolveLoadPath$2(file, forImport); + if (resolved != null) + return resolved; + throw A.wrapException("Can't find stylesheet to import."); + } + }, + _callImporterAsync$4(importer, url, previousString, forImport) { + return this._callImporterAsync$body$NodeImporter(importer, url, previousString, forImport); + }, + _callImporterAsync$body$NodeImporter(importer, url, previousString, forImport) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.nullable_Object), + $async$returnValue, $async$self = this, t1, result; + var $async$_callImporterAsync$4 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = new A._Future($.Zone__current, type$._Future_Object); + result = A.wrapJSExceptions(new A.NodeImporter__callImporterAsync_closure($async$self, importer, forImport, url, previousString, new A._AsyncCompleter(t1, type$._AsyncCompleter_Object))); + $async$goto = A._asBool($.$get$_isUndefined().call$1(result)) ? 3 : 4; + break; + case 3: + // then + $async$goto = 5; + return A._asyncAwait(t1, $async$_callImporterAsync$4); + case 5: + // returning from await. + $async$returnValue = $async$result; + // goto return + $async$goto = 1; + break; + case 4: + // join + $async$returnValue = result; + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$_callImporterAsync$4, $async$completer); + }, + _renderContext$1(fromImport) { + var context = {options: type$.RenderContextOptions._as(this._implementation$_options), fromImport: fromImport}; + J.set$context$x(J.get$options$x(context), context); + return context; + } + }; + A.NodeImporter_load_closure.prototype = { + call$0() { + var _this = this; + return J.apply$2$x(_this.importer, _this.$this._renderContext$1(_this.forImport), A._setArrayType([_this.url, _this.previousString], type$.JSArray_Object)); + }, + $signature: 36 + }; + A.NodeImporter__tryPath_closure.prototype = { + call$0() { + return A.resolveImportPath0(this.path); + }, + $signature: 47 + }; + A.NodeImporter__tryPath_closure0.prototype = { + call$1(resolved) { + return new A._Record_2(A.readFile0(resolved), $.$get$context().toUri$1(resolved).toString$0(0)); + }, + $signature: 496 + }; + A.NodeImporter__callImporterAsync_closure.prototype = { + call$0() { + var _this = this; + return J.apply$2$x(_this.importer, _this.$this._renderContext$1(_this.forImport), A._setArrayType([_this.url, _this.previousString, A.allowInterop(_this.completer.get$complete())], type$.JSArray_Object)); + }, + $signature: 36 + }; + A.ModifiableCssImport0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssImport$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$span(receiver) { + return this.span; + } + }; + A.ImportCache0.prototype = { + canonicalize$4$baseImporter$baseUrl$forImport(_, url, baseImporter, baseUrl, forImport) { + var t1, resolvedUrl, key, relativeResult, t2, t3, t4, t5, t6, cacheable, i, importer, perImporterKey, t7, _1_0, _1_2_isSet, result, _1_2, _2_0, _2_1, _2_5_isSet, _2_5, _2_3, _2_3_isSet, j, _this = this, _null = null; + if (A.isBrowser()) + t1 = (baseImporter == null || baseImporter instanceof A.NoOpImporter0) && _this._import_cache$_importers.length === 0; + else + t1 = false; + if (t1) + throw A.wrapException(string$.Customi); + if (baseImporter != null && url.get$scheme() === "") { + resolvedUrl = baseUrl == null ? _null : baseUrl.resolveUri$1(url); + if (resolvedUrl == null) + resolvedUrl = url; + key = new A._Record_3_forImport(baseImporter, resolvedUrl, forImport); + relativeResult = _this._import_cache$_perImporterCanonicalizeCache.putIfAbsent$2(key, new A.ImportCache_canonicalize_closure0(_this, baseImporter, resolvedUrl, baseUrl, forImport, key, url)); + if (relativeResult != null) + return relativeResult; + } + key = new A._Record_2_forImport(url, forImport); + t1 = _this._import_cache$_canonicalizeCache; + if (t1.containsKey$1(key)) + return t1.$index(0, key); + for (t2 = _this._import_cache$_importers, t3 = type$.Record_1_nullable_Object, t4 = _this._import_cache$_perImporterCanonicalizeCache, t5 = type$.nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2, t6 = type$.Record_3_Importer_and_Uri_and_Uri_originalUrl_2, cacheable = true, i = 0; i < t2.length; ++i) { + importer = t2[i]; + perImporterKey = new A._Record_3_forImport(importer, url, forImport); + if (t4.containsKey$1(perImporterKey)) { + t7 = t4.$index(0, perImporterKey); + _1_0 = new A._Record_1(t7 == null ? t5._as(t7) : t7); + } else + _1_0 = _null; + _1_2_isSet = t3._is(_1_0); + result = _null; + if (_1_2_isSet) { + _1_2 = _1_0._0; + t7 = _1_2 != null; + if (t7) { + t6._as(_1_2); + result = _1_2; + } + } else { + _1_2 = _null; + t7 = false; + } + if (t7) + return result; + if (_1_2_isSet) + t7 = _1_2 == null; + else + t7 = false; + if (t7) + continue; + $label0$1: { + _2_0 = _this._import_cache$_canonicalize$4(importer, url, baseUrl, forImport); + _2_1 = _2_0._0; + _2_5_isSet = _2_1 != null; + _2_5 = _null; + _2_3 = _null; + t7 = false; + if (_2_5_isSet) { + result = _2_1 == null ? t6._as(_2_1) : _2_1; + _2_3 = _2_0._1; + t7 = _2_3; + _2_5 = t7; + t7 = t7 && cacheable; + } else + result = _null; + if (t7) { + t1.$indexSet(0, key, result); + return result; + } + if (_2_5_isSet) { + t7 = _2_5; + _2_3_isSet = _2_5_isSet; + } else { + _2_3 = _2_0._1; + t7 = _2_3; + _2_3_isSet = true; + } + t7 = t7 && !cacheable; + if (t7) { + t4.$indexSet(0, perImporterKey, _2_1); + if (_2_1 != null) + return _2_1; + break $label0$1; + } + t7 = false === (_2_3_isSet ? _2_3 : _2_0._1); + if (t7) { + if (cacheable) { + for (j = 0; j < i; ++j) + t4.$indexSet(0, new A._Record_3_forImport(t2[j], url, forImport), _null); + cacheable = false; + } + if (_2_1 != null) + return _2_1; + } + } + } + if (cacheable) + t1.$indexSet(0, key, _null); + return _null; + }, + _import_cache$_canonicalize$4(importer, url, baseUrl, forImport) { + var passContainingUrl, canonicalizeContext, t1, result, cacheable; + if (baseUrl != null) + passContainingUrl = url.get$scheme() === "" || importer.isNonCanonicalScheme$1(url.get$scheme()); + else + passContainingUrl = false; + canonicalizeContext = new A.CanonicalizeContext0(forImport, passContainingUrl ? baseUrl : null); + t1 = type$.nullable_Object; + result = A.runZoned(new A.ImportCache__canonicalize_closure0(importer, url), A.LinkedHashMap_LinkedHashMap$_literal([B.Symbol__canonicalizeContext, canonicalizeContext], t1, t1), type$.nullable_Uri); + cacheable = !passContainingUrl || !canonicalizeContext._canonicalize_context$_wasContainingUrlAccessed; + if (result == null) + return new A._Record_2(null, cacheable); + if (result.get$scheme() !== "" && importer.isNonCanonicalScheme$1(result.get$scheme())) + throw A.wrapException("Importer " + importer.toString$0(0) + " canonicalized " + url.toString$0(0) + " to " + result.toString$0(0) + string$.x2c_whicu); + return new A._Record_2(new A._Record_3_originalUrl(importer, result, url), cacheable); + }, + importCanonical$3$originalUrl(importer, canonicalUrl, originalUrl) { + return this._import_cache$_importCache.putIfAbsent$2(canonicalUrl, new A.ImportCache_importCanonical_closure0(this, importer, canonicalUrl, originalUrl)); + }, + humanize$1(canonicalUrl) { + var t1 = this._import_cache$_canonicalizeCache, + t2 = type$.NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2; + t2 = A.NullableExtension_andThen0(A.minBy(new A.MappedIterable(new A.WhereIterable(new A.NonNullsIterable(new A.LinkedHashMapValuesIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapValuesIterable<2>")), t2), new A.ImportCache_humanize_closure3(canonicalUrl), t2._eval$1("WhereIterable")), new A.ImportCache_humanize_closure4(), t2._eval$1("MappedIterable")), new A.ImportCache_humanize_closure5()), new A.ImportCache_humanize_closure6(canonicalUrl)); + return t2 == null ? canonicalUrl : t2; + }, + sourceMapUrl$1(_, canonicalUrl) { + var t1 = this._import_cache$_resultsCache.$index(0, canonicalUrl); + t1 = t1 == null ? null : t1.get$sourceMapUrl(0); + return t1 == null ? canonicalUrl : t1; + } + }; + A.ImportCache_canonicalize_closure0.prototype = { + call$0() { + var _this = this, + t1 = _this.$this, + t2 = _this.baseUrl, + _0_0 = t1._import_cache$_canonicalize$4(_this.baseImporter, _this.resolvedUrl, t2, _this.forImport); + if (t2 != null) + t1._import_cache$_nonCanonicalRelativeUrls.$indexSet(0, _this.key, _this.url); + return _0_0._0; + }, + $signature: 497 + }; + A.ImportCache__canonicalize_closure0.prototype = { + call$0() { + return this.importer.canonicalize$1(0, this.url); + }, + $signature: 144 + }; + A.ImportCache_importCanonical_closure0.prototype = { + call$0() { + var t3, _this = this, + t1 = Date.now(), + t2 = _this.canonicalUrl, + result = _this.importer.load$1(0, t2); + if (result == null) + return null; + t3 = _this.$this; + t3._import_cache$_loadTimes.$indexSet(0, t2, new A.DateTime(t1, 0, false)); + t3._import_cache$_resultsCache.$indexSet(0, t2, result); + t3 = result.contents; + t1 = result.syntax; + t2 = _this.originalUrl.resolveUri$1(t2); + return A.Stylesheet_Stylesheet$parse0(t3, t1, false, t2); + }, + $signature: 498 + }; + A.ImportCache_humanize_closure3.prototype = { + call$1(result) { + return result._1.$eq(0, this.canonicalUrl); + }, + $signature: 499 + }; + A.ImportCache_humanize_closure4.prototype = { + call$1(result) { + return result._2; + }, + $signature: 500 + }; + A.ImportCache_humanize_closure5.prototype = { + call$1(url) { + return url.get$path(url).length; + }, + $signature: 107 + }; + A.ImportCache_humanize_closure6.prototype = { + call$1(url) { + var t1 = $.$get$url(), + t2 = this.canonicalUrl; + return url.resolve$1(0, A.ParsedPath_ParsedPath$parse(t2.get$path(t2), t1.style).get$basename()); + }, + $signature: 49 + }; + A.ImportRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitImportRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@import " + B.JSArray_methods.join$1(this.imports, ", ") + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.JSImporter.prototype = {}; + A.JSImporterResult.prototype = {}; + A.Importer0.prototype = { + isNonCanonicalScheme$1(scheme) { + return false; + } + }; + A.NodeImporterResult0.prototype = {}; + A.IncludeRule0.prototype = { + get$spanWithoutContent() { + var t2, + t1 = this.span; + if (!(this.content == null)) { + t2 = this.$arguments.span; + t2 = A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t1.get$file(t1).span$2(0, t1.get$start(t1).offset, t2.get$end(t2).offset))); + t1 = t2; + } + return t1; + }, + get$nameSpan() { + var startSpan, scanner, _null = null, + t1 = this.span; + if (B.JSString_methods.startsWith$1(t1.get$text(), "+")) + startSpan = A.SpanExtensions_trimLeft0(A.FileSpanExtension_subspan(t1, 1, _null)); + else { + scanner = A.StringScanner$(t1.get$text(), _null, _null); + scanner.expectChar$1(64); + A._scanIdentifier0(scanner); + startSpan = A.SpanExtensions_trimLeft0(A.FileSpanExtension_subspan(t1, scanner._string_scanner$_position, _null)); + } + if (this.namespace != null) { + scanner = A.StringScanner$(startSpan.get$text(), _null, _null); + A._scanIdentifier0(scanner); + startSpan = A.FileSpanExtension_subspan(A.FileSpanExtension_subspan(startSpan, scanner._string_scanner$_position, _null), 1, _null); + } + return A.SpanExtensions_initialIdentifier0(startSpan); + }, + accept$1$1(visitor) { + return visitor.visitIncludeRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.namespace; + t1 = t1 != null ? "@include " + (t1 + ".") : "@include "; + t1 += _this.name; + t2 = _this.$arguments; + if (!t2.get$isEmpty(0)) + t1 += "(" + t2.toString$0(0) + ")"; + t2 = _this.content; + t1 += t2 == null ? ";" : " " + t2.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.InterpolatedFunctionExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitInterpolatedFunctionExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0) + this.$arguments.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.InterpolatedSelector.prototype = {$isAstNode0: 1, $isSassNode: 1}; + A.Interpolation0.prototype = { + get$asPlain() { + var _0_1, t1, _0_6_isSet, _0_6, first, + _0_0 = this.contents; + $label0$0: { + _0_1 = _0_0.length; + if (_0_1 <= 0) { + t1 = ""; + break $label0$0; + } + _0_6_isSet = _0_1 === 1; + if (_0_6_isSet) { + _0_6 = _0_0[0]; + t1 = typeof _0_6 == "string"; + } else { + _0_6 = null; + t1 = false; + } + if (t1) { + first = A._asString(_0_6_isSet ? _0_6 : _0_0[0]); + t1 = first; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + get$initialPlain() { + var _0_4_isSet, _0_4, t1, first, + _0_0 = this.contents; + $label0$0: { + _0_4_isSet = _0_0.length >= 1; + if (_0_4_isSet) { + _0_4 = _0_0[0]; + t1 = typeof _0_4 == "string"; + } else { + _0_4 = null; + t1 = false; + } + if (t1) { + first = A._asString(_0_4_isSet ? _0_4 : _0_0[0]); + t1 = first; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + return t1; + }, + spanForElement$1(index) { + var t1, t2, t3, t4, t5, _this = this; + $label0$0: { + if (typeof _this.contents[index] == "string") { + t1 = _this.span; + t2 = t1.get$file(t1); + if (index === 0) + t3 = t1.get$start(t1); + else { + t3 = _this.spans[index - 1]; + t3 = t3.get$end(t3); + } + t4 = index + 1; + t5 = _this.spans; + if (t4 === t5.length) + t1 = t1.get$end(t1); + else { + t1 = t5[t4]; + t1 = t1.get$start(t1); + } + t1 = t2.span$2(0, t3.offset, t1.offset); + break $label0$0; + } + t1 = _this.spans[index]; + t1.toString; + break $label0$0; + } + return t1; + }, + Interpolation$30(contents, spans, span) { + var t1, t2, t3, t4, i, t5, isString, _s5_ = "spans", + _s8_ = "contents"; + if (spans.length !== J.get$length$asx(contents)) + throw A.wrapException(A.ArgumentError$value(this.spans, _s5_, "Must be the same length as contents.")); + for (t1 = this.contents, t2 = t1.length, t3 = spans.length, t4 = this.spans, i = 0; i < t2; ++i) { + t5 = t1[i]; + isString = typeof t5 == "string"; + if (!isString && !(t5 instanceof A.Expression0)) + throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May only contain Strings or Expressions.")); + else if (isString) { + if (i !== 0 && typeof t1[i - 1] == "string") + throw A.wrapException(A.ArgumentError$value(t1, _s8_, "May not contain adjacent Strings.")); + else if (i < t3 && t4[i] != null) + throw A.wrapException(A.ArgumentError$value(t4, _s5_, string$.May_no + i + ").")); + } else if (i >= t3 || t4[i] == null) + throw A.wrapException(A.ArgumentError$value(t4, _s5_, string$.Must_n + i + ").")); + } + }, + toString$0(_) { + var t1 = this.contents; + return new A.MappedListIterable(t1, new A.Interpolation_toString_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.Interpolation_toString_closure0.prototype = { + call$1(value) { + return typeof value == "string" ? value : "#{" + A.S(value) + "}"; + }, + $signature: 132 + }; + A.SupportsInterpolation0.prototype = { + toInterpolation$0() { + var t1 = this.span; + return A.Interpolation$0(A._setArrayType([this.expression], type$.JSArray_Object), A._setArrayType([t1], type$.JSArray_nullable_FileSpan), t1); + }, + withSpan$1(span) { + return new A.SupportsInterpolation0(this.expression, span); + }, + toString$0(_) { + return "#{" + this.expression.toString$0(0) + "}"; + }, + $isAstNode0: 1, + $isSassNode: 1, + $isSupportsCondition: 1, + get$span(receiver) { + return this.span; + } + }; + A.InterpolationBuffer0.prototype = { + writeCharCode$1(character) { + var t1 = this._interpolation_buffer0$_text, + t2 = A.Primitives_stringFromCharCode(character); + t1._contents += t2; + return null; + }, + add$2(_, expression, span) { + this._interpolation_buffer0$_flushText$0(); + this._interpolation_buffer0$_contents.push(expression); + this._interpolation_buffer0$_spans.push(span); + }, + addInterpolation$1(interpolation) { + var spansToAdd, _0_4_isSet, _0_4, first, rest, t2, t3, _this = this, + toAdd = interpolation.contents, + t1 = toAdd.length; + if (t1 === 0) + return; + spansToAdd = interpolation.spans; + _0_4_isSet = t1 >= 1; + if (_0_4_isSet) { + _0_4 = toAdd[0]; + t1 = typeof _0_4 == "string"; + } else { + _0_4 = null; + t1 = false; + } + if (t1) { + first = A._asString(_0_4_isSet ? _0_4 : toAdd[0]); + rest = B.JSArray_methods.sublist$1(toAdd, 1); + t1 = _this._interpolation_buffer0$_text; + t1._contents += first; + spansToAdd = A.SubListIterable$(spansToAdd, 1, null, A._arrayInstanceType(spansToAdd)._precomputed1); + toAdd = rest; + } + _this._interpolation_buffer0$_flushText$0(); + t1 = _this._interpolation_buffer0$_contents; + B.JSArray_methods.addAll$1(t1, toAdd); + t2 = _this._interpolation_buffer0$_spans; + B.JSArray_methods.addAll$1(t2, spansToAdd); + if (typeof B.JSArray_methods.get$last(t1) == "string") { + t3 = _this._interpolation_buffer0$_text; + t1 = A.S(t1.pop()); + t3._contents += t1; + t2.pop(); + } + }, + _interpolation_buffer0$_flushText$0() { + var t1 = this._interpolation_buffer0$_text, + t2 = t1._contents; + if (t2.length === 0) + return; + this._interpolation_buffer0$_contents.push(t2.charCodeAt(0) == 0 ? t2 : t2); + this._interpolation_buffer0$_spans.push(null); + t1._contents = ""; + }, + interpolation$1(span) { + var t1 = A.List_List$_of(this._interpolation_buffer0$_contents, type$.Object), + t2 = this._interpolation_buffer0$_text, + t3 = t2._contents; + if (t3.length !== 0) + t1.push(t3.charCodeAt(0) == 0 ? t3 : t3); + t3 = A.List_List$_of(this._interpolation_buffer0$_spans, type$.nullable_FileSpan); + if (t2._contents.length !== 0) + t3.push(null); + return A.Interpolation$0(t1, t3, span); + }, + toString$0(_) { + var t1, t2, _i, t3, element; + for (t1 = this._interpolation_buffer0$_contents, t2 = t1.length, _i = 0, t3 = ""; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + element = t1[_i]; + t3 = typeof element == "string" ? t3 + element : t3 + "#{" + A.S(element) + A.Primitives_stringFromCharCode(125); + } + t1 = t3 + this._interpolation_buffer0$_text.toString$0(0); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A.InterpolationMap0.prototype = { + mapException$1(error) { + var source, startIndex, endIndex, t3, t4, _this = this, + target = error.get$span(error), + t1 = _this._interpolation_map$_interpolation, + t2 = t1.contents; + if (t2.length === 0) { + if (_this._interpolation_map$_isMapped$1(target)) + return error; + return new A.SourceSpanFormatException(error.get$source(), error._span_exception$_message, t1.span); + } + source = _this.mapSpan$1(target); + if (source === target) + return error; + startIndex = _this._interpolation_map$_indexInContents$1(target.get$start(target)); + endIndex = _this._interpolation_map$_indexInContents$1(target.get$end(target)); + t1 = error._span_exception$_message; + if (!A.SubListIterable$(t2, startIndex, null, A._arrayInstanceType(t2)._precomputed1).take$1(0, endIndex - startIndex + 1).any$1(0, new A.InterpolationMap_mapException_closure0())) + return new A.SourceSpanFormatException(error.get$source(), t1, source); + else { + t2 = type$.SourceSpan; + t3 = type$.String; + t4 = A.LinkedHashMap_LinkedHashMap$_literal([target, "error in interpolated output"], t2, t3); + return new A.MultiSourceSpanFormatException(error.get$source(), "", A.ConstantMap_ConstantMap$from(t4, t2, t3), t1, source); + } + }, + mapSpan$1(target) { + var _0_1, _0_2, t1, _0_2_isSet, t2, start, _0_20, end, _this = this, _null = null; + if (_this._interpolation_map$_isMapped$1(target)) + return target; + _0_1 = _this._interpolation_map$_mapLocation$1(target.get$start(target)); + _0_2 = _this._interpolation_map$_mapLocation$1(target.get$end(target)); + $label0$0: { + t1 = type$.FileSpan; + _0_2_isSet = t1._is(_0_1); + t2 = false; + if (_0_2_isSet) { + t2 = t1._is(_0_2); + start = _0_1; + _0_20 = _0_2; + } else { + start = _null; + _0_20 = start; + } + if (t2) { + t1 = start.expand$1(0, t1._as(_0_2_isSet ? _0_20 : _0_2)); + break $label0$0; + } + t2 = false; + if (t1._is(_0_1)) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + t2 = t2 instanceof A.FileLocation; + start = _0_1; + } else + start = _null; + if (t2) { + t1 = _0_2_isSet ? _0_20 : _0_2; + type$.FileLocation._as(t1); + t2 = _this._interpolation_map$_interpolation.span; + t1 = t2.get$file(t2).span$2(0, _this._interpolation_map$_expandInterpolationSpanLeft$1(start.get$start(start)), t1.offset); + break $label0$0; + } + t2 = false; + if (_0_1 instanceof A.FileLocation) { + if (_0_2_isSet) + t2 = _0_20; + else { + t2 = _0_2; + _0_20 = t2; + _0_2_isSet = true; + } + t2 = t1._is(t2); + start = _0_1; + } else + start = _null; + if (t2) { + end = t1._as(_0_2_isSet ? _0_20 : _0_2); + t1 = _this._interpolation_map$_interpolation.span; + t1 = t1.get$file(t1).span$2(0, start.offset, _this._interpolation_map$_expandInterpolationSpanRight$1(end.get$end(end))); + break $label0$0; + } + t1 = false; + if (_0_1 instanceof A.FileLocation) { + if (_0_2_isSet) + t1 = _0_20; + else { + t1 = _0_2; + _0_20 = t1; + _0_2_isSet = true; + } + t1 = t1 instanceof A.FileLocation; + start = _0_1; + } else + start = _null; + if (t1) { + t1 = _0_2_isSet ? _0_20 : _0_2; + type$.FileLocation._as(t1); + t2 = _this._interpolation_map$_interpolation.span; + t1 = t2.get$file(t2).span$2(0, start.offset, t1.offset); + break $label0$0; + } + t1 = A.throwExpression("[BUG] Unreachable"); + } + return t1; + }, + _interpolation_map$_isMapped$1(span) { + var file, t1; + $label0$0: { + file = span.get$file(span); + t1 = this._interpolation_map$_interpolation.span; + t1 = t1.get$file(t1); + break $label0$0; + } + return file === t1; + }, + _interpolation_map$_mapLocation$1(target) { + var index, _0_0, t3, previousLocation, _this = this, + t1 = _this._interpolation_map$_interpolation, + t2 = t1.contents; + if (t2.length === 0) + return t1.span; + index = _this._interpolation_map$_indexInContents$1(target); + _0_0 = t2[index]; + if (_0_0 instanceof A.Expression0) + return _0_0.get$span(_0_0); + t3 = index === 0; + t1 = t1.span; + if (t3) + previousLocation = t1.get$start(t1); + else { + t1 = t1.get$file(t1); + t2 = type$.Expression_2._as(t2[index - 1]); + t2 = t2.get$span(t2); + previousLocation = A.FileLocation$_(t1, _this._interpolation_map$_expandInterpolationSpanRight$1(t2.get$end(t2))); + } + t1 = t3 ? 0 : _this._interpolation_map$_targetOffsets[index - 1]; + return A.FileLocation$_(previousLocation.file, previousLocation.offset + (target.offset - t1)); + }, + _interpolation_map$_indexInContents$1(target) { + var t1, t2, t3, i; + for (t1 = this._interpolation_map$_targetOffsets, t2 = t1.length, t3 = target.offset, i = 0; i < t2; ++i) + if (t3 < t1[i]) + return i; + return this._interpolation_map$_interpolation.contents.length - 1; + }, + _interpolation_map$_expandInterpolationSpanLeft$1(start) { + var i0, prev, char, + source = start.file._decodedChars, + i = start.offset - 1; + while (i >= 0) { + i0 = i - 1; + prev = source[i]; + if (prev === 123) { + if (source[i0] === 35) { + i = i0; + break; + } + i = i0; + } else if (prev === 47) { + i = i0 - 1; + if (source[i0] === 42) + for (;;) { + i0 = i - 1; + if (source[i] !== 42) { + i = i0; + continue; + } + i = i0; + do { + i0 = i - 1; + char = source[i]; + if (char === 42) { + i = i0; + continue; + } else + break; + } while (true); + if (char === 47) { + i = i0; + break; + } + i = i0; + } + } else + i = i0; + } + return i; + }, + _interpolation_map$_expandInterpolationSpanRight$1(end) { + var t1, i0, next, second, t2, char, + source = end.file._decodedChars, + i = end.offset; + for (t1 = source.length; i < t1;) { + i0 = i + 1; + next = source[i]; + if (next === 125) { + i = i0; + break; + } + if (next === 47) { + i = i0 + 1; + second = source[i0]; + if (second === 47) { + for (;;) { + i0 = i + 1; + t2 = source[i]; + if (!!(t2 === 10 || t2 === 13 || t2 === 12)) + break; + i = i0; + } + i = i0; + } else if (second === 42) + for (;;) { + i0 = i + 1; + if (source[i] !== 42) { + i = i0; + continue; + } + i = i0; + do { + i0 = i + 1; + char = source[i]; + if (char === 42) { + i = i0; + continue; + } else + break; + } while (true); + if (char === 47) { + i = i0; + break; + } + i = i0; + } + } else + i = i0; + } + return i; + } + }; + A.InterpolationMap_mapException_closure0.prototype = { + call$1($content) { + return $content instanceof A.Expression0; + }, + $signature: 73 + }; + A.InterpolationMethod0.prototype = { + toString$0(_) { + var t1 = this.hue; + t1 = t1 == null ? "" : " " + t1.toString$0(0) + " hue"; + return this.space.name + t1; + } + }; + A.HueInterpolationMethod0.prototype = { + _enumToString$0() { + return "HueInterpolationMethod." + this._name; + } + }; + A._realCasePath_helper0.prototype = { + call$2(path, realPath) { + var dirname = $.$get$context().dirname$1(path); + if (dirname === path) + return path; + return $._realCaseCache0.putIfAbsent$2(path, new A._realCasePath_helper_closure0(path, realPath, this, dirname)); + }, + call$1(path) { + return this.call$2(path, null); + }, + $signature: 149 + }; + A._realCasePath_helper_closure0.prototype = { + call$0() { + var realPathNonNull, realDirname, basename, matches, t1, _0_0, match, realPathNonNull0, exception, _this = this, + t2 = _this.path; + if (!A.linkExists0(t2)) { + realPathNonNull = null; + try { + realPathNonNull0 = _this.realPath; + realPathNonNull = realPathNonNull0 == null ? A.realpath0(t2) : realPathNonNull0; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException0) + return t2; + else + throw exception; + } + t1 = realPathNonNull; + t2 = $.$get$context(); + return A.join(_this.helper.call$2(_this.dirname, t2.dirname$1(t1)), A.ParsedPath_ParsedPath$parse(realPathNonNull, t2.style).get$basename(), null); + } + realDirname = _this.helper.call$1(_this.dirname); + basename = A.ParsedPath_ParsedPath$parse(t2, $.$get$context().style).get$basename(); + try { + matches = J.where$1$ax(A.listDir0(realDirname), new A._realCasePath_helper__closure0(basename)).toList$0(0); + t1 = null; + _0_0 = matches; + $label0$0: { + match = null; + if (J.get$length$asx(_0_0) === 1) { + match = J.$index$asx(_0_0, 0); + t1 = match; + break $label0$0; + } + t1 = A.join(realDirname, basename, null); + break $label0$0; + } + t1 = t1; + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.FileSystemException0) + return t2; + else + throw exception; + } + }, + $signature: 29 + }; + A._realCasePath_helper__closure0.prototype = { + call$1(realPath) { + return A.equalsIgnoreCase0(A.ParsedPath_ParsedPath$parse(realPath, $.$get$context().style).get$basename(), this.basename); + }, + $signature: 4 + }; + A.IsCalculationSafeVisitor0.prototype = { + visitBinaryOperationExpression$1(_, node) { + return B.Set_xkEMv0.contains$1(0, node.operator) && node.left.accept$1(this) && node.right.accept$1(this); + }, + visitBooleanExpression$1(_, node) { + return false; + }, + visitColorExpression$1(_, node) { + return false; + }, + visitFunctionExpression$1(_, node) { + return true; + }, + visitIfExpression$1(_, node) { + return true; + }, + visitInterpolatedFunctionExpression$1(_, node) { + return true; + }, + visitLegacyIfExpression$1(_, node) { + return true; + }, + visitListExpression$1(_, node) { + var t1 = false; + if (node.separator === B.ListSeparator_SrV0) + if (!node.hasBrackets) { + t1 = node.contents; + t1 = t1.length > 1 && B.JSArray_methods.every$1(t1, new A.IsCalculationSafeVisitor_visitListExpression_closure0(this)); + } + return t1; + }, + visitMapExpression$1(_, node) { + return false; + }, + visitNullExpression$1(_, node) { + return false; + }, + visitNumberExpression$1(_, node) { + return true; + }, + visitParenthesizedExpression$1(_, node) { + return node.expression.accept$1(this); + }, + visitSelectorExpression$1(_, node) { + return false; + }, + visitStringExpression$1(_, node) { + var text, t1, t2; + if (node.hasQuotes) + return false; + text = node.text.get$initialPlain(); + t1 = false; + if (!B.JSString_methods.startsWith$1(text, "!")) + if (!B.JSString_methods.startsWith$1(text, "#")) { + t2 = text.length; + if ((1 >= t2 ? null : text.charCodeAt(1)) !== 43) + t1 = (3 >= t2 ? null : text.charCodeAt(3)) !== 40; + } + return t1; + }, + visitSupportsExpression$1(_, node) { + return false; + }, + visitUnaryOperationExpression$1(_, node) { + return false; + }, + visitValueExpression$1(_, node) { + return false; + }, + visitVariableExpression$1(_, node) { + return true; + }, + $isExpressionVisitor: 1 + }; + A.IsCalculationSafeVisitor_visitListExpression_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 81 + }; + A.IsPlainCssVisitor0.prototype = { + visitBinaryOperationExpression$1(_, node) { + return false; + }, + visitBooleanExpression$1(_, node) { + return false; + }, + visitColorExpression$1(_, node) { + return true; + }, + visitFunctionExpression$1(_, node) { + return node.namespace == null && this._is_plain_css$_visitArgumentList$1(node.$arguments); + }, + visitIfExpression$1(_, node) { + return B.JSArray_methods.every$1(node.branches, new A.IsPlainCssVisitor_visitIfExpression_closure0(this)); + }, + visitInterpolatedFunctionExpression$1(_, node) { + var t1 = this._is_plain_css$_visitArgumentList$1(node.$arguments); + return t1; + }, + visitLegacyIfExpression$1(_, node) { + return false; + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return (t1.length !== 0 || node.hasBrackets) && B.JSArray_methods.every$1(t1, new A.IsPlainCssVisitor_visitListExpression_closure0(this)); + }, + visitMapExpression$1(_, node) { + return false; + }, + visitNullExpression$1(_, node) { + return false; + }, + visitNumberExpression$1(_, node) { + return true; + }, + visitParenthesizedExpression$1(_, node) { + return node.expression.accept$1(this); + }, + visitSelectorExpression$1(_, node) { + return false; + }, + visitStringExpression$1(_, node) { + return true; + }, + visitSupportsExpression$1(_, node) { + return false; + }, + visitUnaryOperationExpression$1(_, node) { + return false; + }, + visitValueExpression$1(_, node) { + return false; + }, + visitVariableExpression$1(_, node) { + return false; + }, + visitIfConditionParenthesized$1(_, node) { + return node.expression.accept$1(this); + }, + visitIfConditionNegation$1(_, node) { + return node.expression.accept$1(this); + }, + visitIfConditionOperation$1(_, node) { + return B.JSArray_methods.every$1(node.expressions, new A.IsPlainCssVisitor_visitIfConditionOperation_closure0(this)); + }, + visitIfConditionFunction$1(_, node) { + return true; + }, + visitIfConditionSass$1(_, node) { + return false; + }, + visitIfConditionRaw$1(_, node) { + return true; + }, + _is_plain_css$_visitArgumentList$1(node) { + var t1 = node.named; + return t1.get$isEmpty(t1) && node.rest == null && B.JSArray_methods.every$1(node.positional, new A.IsPlainCssVisitor__visitArgumentList_closure0(this)); + }, + $isExpressionVisitor: 1, + $isIfConditionExpressionVisitor: 1 + }; + A.IsPlainCssVisitor_visitIfExpression_closure0.prototype = { + call$1(pair) { + var _0_1, condition, t1; + $label0$0: { + _0_1 = pair._0; + if (_0_1 != null) { + condition = _0_1 == null ? type$.IfConditionExpression_2._as(_0_1) : _0_1; + t1 = this.$this; + t1 = condition.accept$1(t1) && pair._1.accept$1(t1); + break $label0$0; + } + t1 = pair._1.accept$1(this.$this); + break $label0$0; + } + return t1; + }, + $signature: 501 + }; + A.IsPlainCssVisitor_visitListExpression_closure0.prototype = { + call$1(element) { + return element.accept$1(this.$this); + }, + $signature: 81 + }; + A.IsPlainCssVisitor_visitIfConditionOperation_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 502 + }; + A.IsPlainCssVisitor__visitArgumentList_closure0.prototype = { + call$1(argument) { + return argument.accept$1(this.$this); + }, + $signature: 81 + }; + A.FileSystemException0.prototype = { + toString$0(_) { + var t1 = $.$get$context(); + return t1.prettyUri$1(t1.toUri$1(this.path)) + ": " + this.message; + }, + get$message(receiver) { + return this.message; + } + }; + A._readFile_closure0.prototype = { + call$0() { + return J.readFileSync$2$x(A.fs(), this.path, this.encoding); + }, + $signature: 64 + }; + A.fileExists_closure0.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isFile$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 20 + }; + A.dirExists_closure0.prototype = { + call$0() { + var error, systemError, exception, + t1 = this.path; + if (!J.existsSync$1$x(A.fs(), t1)) + return false; + try { + t1 = J.isDirectory$0$x(J.statSync$1$x(A.fs(), t1)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 20 + }; + A.linkExists_closure0.prototype = { + call$0() { + var error, systemError, t1, exception; + try { + t1 = J.isSymbolicLink$0$x(J.lstatSync$1$x(A.fs(), this.path)); + return t1; + } catch (exception) { + error = A.unwrapException(exception); + systemError = type$.JsSystemError._as(error); + if (J.$eq$(J.get$code$x(systemError), "ENOENT")) + return false; + throw exception; + } + }, + $signature: 20 + }; + A.listDir_closure0.prototype = { + call$0() { + var t1 = this.path; + if (!this.recursive) + return J.map$1$1$ax(J.readdirSync$1$x(A.fs(), t1), new A.listDir__closure1(t1), type$.String).super$Iterable$where(0, new A.listDir__closure2()); + else + return new A.listDir_closure_list0().call$1(t1); + }, + $signature: 152 + }; + A.listDir__closure1.prototype = { + call$1(child) { + return A.join(this.path, A._asString(child), null); + }, + $signature: 134 + }; + A.listDir__closure2.prototype = { + call$1(child) { + return !A.dirExists0(child); + }, + $signature: 4 + }; + A.listDir_closure_list0.prototype = { + call$1($parent) { + return J.expand$1$1$ax(J.readdirSync$1$x(A.fs(), $parent), new A.listDir__list_closure0($parent, this), type$.String); + }, + $signature: 153 + }; + A.listDir__list_closure0.prototype = { + call$1(child) { + var path = A.join(this.parent, A._asString(child), null); + return A.dirExists0(path) ? this.list.call$1(path) : A._setArrayType([path], type$.JSArray_String); + }, + $signature: 154 + }; + A.realpath_closure0.prototype = { + call$0() { + return J.native$1$x(J.get$realpathSync$x(A.fs()), this.path); + }, + $signature: 29 + }; + A.main_closure.prototype = { + call$2(_, __) { + }, + $signature: 503 + }; + A.main_closure0.prototype = { + call$2(_, __) { + }, + $signature: 504 + }; + A.JSToDartLogger.prototype = { + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + var t2, t3, t4, + t1 = this._node, + _0_0 = t1 == null ? null : J.get$warn$x(t1); + if (_0_0 != null) { + t1 = span == null ? self.undefined : span; + t2 = J.toString$0$(trace); + t3 = deprecation == null; + t4 = $.$get$deprecations(); + _0_0.call$2(message, {deprecation: !t3, deprecationType: t4.$index(0, t3 ? null : deprecation.id), span: t1, stack: t2}); + } else + this._withAscii$1(new A.JSToDartLogger_internalWarn_closure(this, message, span, trace, deprecation)); + }, + debug$2(_, message, span) { + var t1 = this._node, + _0_0 = t1 == null ? null : J.get$debug$x(t1); + if (_0_0 != null) + _0_0.call$2(message, {span: span}); + else + this._withAscii$1(new A.JSToDartLogger_debug_closure(this, message, span)); + }, + _withAscii$1$1(callback) { + var t1, + wasAscii = $._glyphs === B.C_AsciiGlyphSet; + $._glyphs = this._ascii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + try { + t1 = callback.call$0(); + return t1; + } finally { + $._glyphs = wasAscii ? B.C_AsciiGlyphSet : B.C_UnicodeGlyphSet; + } + }, + _withAscii$1(callback) { + return this._withAscii$1$1(callback, type$.dynamic); + } + }; + A.JSToDartLogger_internalWarn_closure.prototype = { + call$0() { + var _this = this; + $label0$0: { + _this.$this._fallback.internalWarn$4$deprecation$span$trace(_this.message, _this.deprecation, _this.span, _this.trace); + break $label0$0; + } + }, + $signature: 1 + }; + A.JSToDartLogger_debug_closure.prototype = { + call$0() { + return this.$this._fallback.debug$2(0, this.message, this.span); + }, + $signature: 0 + }; + A.ModifiableCssKeyframeBlock0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssKeyframeBlock$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssKeyframeBlock0 && B.C_ListEquality.equals$2(0, this.selector.value, other.selector.value); + }, + copyWithoutChildren$0() { + return A.ModifiableCssKeyframeBlock$0(this.selector, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.KeyframeSelectorParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.KeyframeSelectorParser_parse_closure0(this)); + }, + _keyframe_selector$_percentage$0() { + var $self, _0_0, + t1 = this.scanner, + t2 = t1.scanChar$1(43) ? A.Primitives_stringFromCharCode(43) : "", + second = t1.peekChar$0(); + if (!(second != null && second >= 48 && second <= 57) && second !== 46) + t1.error$1(0, "Expected number."); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + if (t1.peekChar$0() === 46) { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + } + } + if (this.scanIdentChar$1(101)) { + t2 += A.Primitives_stringFromCharCode(101); + _0_0 = t1.peekChar$0(); + if (43 === _0_0 || 45 === _0_0) + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected digit."); + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + } + t1.expectChar$1(37); + t2 += A.Primitives_stringFromCharCode(37); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A.KeyframeSelectorParser_parse_closure0.prototype = { + call$0() { + var selectors = A._setArrayType([], type$.JSArray_String), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$1$consumeNewlines(true); + if (t1.lookingAtIdentifier$0()) + if (t1.scanIdentifier$1("from")) + selectors.push("from"); + else { + t1.expectIdentifier$2$name("to", '"to" or "from"'); + selectors.push("to"); + } + else + selectors.push(t1._keyframe_selector$_percentage$0()); + t1.whitespace$1$consumeNewlines(true); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return selectors; + }, + $signature: 139 + }; + A.LabColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var powerlessAB, t1, missingLightness, f1, t2, t3, t4; + switch (dest) { + case B.LabColorSpace_2nT0: + powerlessAB = lightness == null || A.fuzzyEquals0(lightness, 0); + t1 = a == null || powerlessAB ? null : a; + return A.SassColor$_forSpace0(B.LabColorSpace_2nT0, lightness, t1, b == null || powerlessAB ? null : b, alpha, null); + case B.LchColorSpace_Bpv0: + return A.labToLch0(dest, lightness, a, b, alpha, false, false); + default: + missingLightness = lightness == null; + if (missingLightness) + lightness = 0; + f1 = (lightness + 16) / 116; + t1 = a == null; + t2 = this._lab$_convertFToXorZ$1((t1 ? 0 : a) / 500 + f1); + t3 = lightness > 8 ? Math.pow(f1, 3) : lightness / 903.2962962962963; + t4 = b == null; + return B.XyzD50ColorSpace_2OB0.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, t2 * 0.9642956764295677, t3, this._lab$_convertFToXorZ$1(f1 - (t4 ? 0 : b) / 200) * 0.8251046025104602, alpha, t1, t4, missingChroma, missingHue, missingLightness); + } + }, + convert$5(dest, lightness, a, b, alpha) { + return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); + }, + _lab$_convertFToXorZ$1(component) { + var cubed = Math.pow(component, 3) + 0; + return cubed > 0.008856451679035631 ? cubed : (116 * component - 16) / 903.2962962962963; + } + }; + A.LazyFileSpan0.prototype = { + get$span(_) { + var t1 = this._lazy_file_span0$_span; + return t1 == null ? this._lazy_file_span0$_span = this._lazy_file_span0$_builder.call$0() : t1; + }, + compareTo$1(_, other) { + return this.get$span(0).compareTo$1(0, other); + }, + get$context(_) { + var t1 = this.get$span(0); + return t1.get$context(t1); + }, + get$end(_) { + var t1 = this.get$span(0); + return t1.get$end(t1); + }, + expand$1(_, other) { + return this.get$span(0).expand$1(0, other); + }, + get$file(_) { + var t1 = this.get$span(0); + return t1.get$file(t1); + }, + highlight$1$color(color) { + return this.get$span(0).highlight$1$color(color); + }, + get$length(_) { + var t1 = this.get$span(0); + return t1.get$length(t1); + }, + message$2$color(_, message, color) { + return this.get$span(0).message$2$color(0, message, color); + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + get$sourceUrl(_) { + var t1 = this.get$span(0); + return t1.get$sourceUrl(t1); + }, + get$start(_) { + var t1 = this.get$span(0); + return t1.get$start(t1); + }, + get$text() { + return this.get$span(0).get$text(); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.LchColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, lightness, chroma, hue, alpha) { + var t1 = hue == null, + hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, + t2 = chroma == null, + t3 = t2 ? 0 : chroma, + t4 = Math.cos(hueRadians), + t5 = t2 ? 0 : chroma; + return B.LabColorSpace_2nT0.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); + } + }; + A.render_closure.prototype = { + call$0() { + var error, exception; + try { + this.callback.call$2(null, A.renderSync(this.options)); + } catch (exception) { + error = A.unwrapException(exception); + this.callback.call$2(error, null); + } + return null; + }, + $signature: 1 + }; + A.render_closure0.prototype = { + call$1(result) { + this.callback.call$2(null, result); + }, + $signature: 505 + }; + A.render_closure1.prototype = { + call$2(error, stackTrace) { + var t2, t3, _null = null, + t1 = this.callback; + if (error instanceof A.SassException0) + t1.call$2(A._wrapException(error, stackTrace), _null); + else { + t2 = J.toString$0$(error); + t3 = A.getTrace0(error); + t1.call$2(A._newRenderError(t2, t3 == null ? stackTrace : t3, _null, _null, _null, 3), _null); + } + }, + $signature: 51 + }; + A._parseFunctions_closure.prototype = { + call$2(signature, callback) { + var _0_0, _this = this, + t1 = _this.options, + context = {options: A._contextOptions(t1, _this.start)}; + J.set$context$x(J.get$options$x(context), context); + _0_0 = J.get$fiber$x(t1); + t1 = {}; + t1.fiber = null; + if (_0_0 != null) { + t1.fiber = _0_0; + _this.result.push(A.Callable_Callable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure(t1, callback, context), false)); + } else { + t1 = _this.result; + if (!_this.asynch) + t1.push(A.Callable_Callable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure0(callback, context), false)); + else + t1.push(A.AsyncCallable_AsyncCallable$fromSignature(B.JSString_methods.trimLeft$0(signature), new A._parseFunctions__closure1(callback, context), false)); + } + }, + $signature: 126 + }; + A._parseFunctions__closure.prototype = { + call$1($arguments) { + var result, + t1 = this._box_0, + currentFiber = J.get$current$x(t1.fiber), + t2 = type$.Object; + t2 = A.List_List$_of(J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), t2), t2); + t2.push(A.allowInterop(new A._parseFunctions___closure2(currentFiber))); + result = A.wrapJSExceptions(new A._parseFunctions___closure3(this.callback, this.context, t2)); + return A.unwrapValue(A._asBool($.$get$_isUndefined().call$1(result)) ? A.runZoned(new A._parseFunctions___closure4(t1), null, type$.nullable_Object) : result); + }, + $signature: 3 + }; + A._parseFunctions___closure2.prototype = { + call$1(result) { + A.scheduleMicrotask(new A._parseFunctions____closure(this.currentFiber, result)); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 84 + }; + A._parseFunctions____closure.prototype = { + call$0() { + return J.run$1$x(this.currentFiber, this.result); + }, + $signature: 0 + }; + A._parseFunctions___closure3.prototype = { + call$0() { + return J.apply$2$x(type$.JSFunction._as(this.callback), this.context, this.jsArguments); + }, + $signature: 36 + }; + A._parseFunctions___closure4.prototype = { + call$0() { + return J.yield$0$x(this._box_0.fiber); + }, + $signature: 83 + }; + A._parseFunctions__closure0.prototype = { + call$1($arguments) { + return A.unwrapValue(A.wrapJSExceptions(new A._parseFunctions___closure1(this.callback, this.context, $arguments))); + }, + $signature: 3 + }; + A._parseFunctions___closure1.prototype = { + call$0() { + var t1 = type$.JSFunction._as(this.callback), + t2 = J.map$1$1$ax(this.$arguments, A.value0__wrapValue$closure(), type$.Object); + t2 = A.List_List$_of(t2, t2.$ti._eval$1("ListIterable.E")); + return J.apply$2$x(t1, this.context, t2); + }, + $signature: 36 + }; + A._parseFunctions__closure1.prototype = { + call$1($arguments) { + return this.$call$body$_parseFunctions__closure($arguments); + }, + $call$body$_parseFunctions__closure($arguments) { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.Value_2), + $async$returnValue, $async$self = this, result, t1, t2, $async$temp1; + var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + for (;;) + switch ($async$goto) { + case 0: + // Function start + t1 = new A._Future($.Zone__current, type$._Future_nullable_Object); + t2 = type$.Object; + t2 = A.List_List$_of(J.map$1$1$ax($arguments, A.value0__wrapValue$closure(), t2), t2); + t2.push(A.allowInterop(new A._parseFunctions___closure(new A._AsyncCompleter(t1, type$._AsyncCompleter_nullable_Object)))); + result = A.wrapJSExceptions(new A._parseFunctions___closure0($async$self.callback, $async$self.context, t2)); + $async$temp1 = A; + $async$goto = A._asBool($.$get$_isUndefined().call$1(result)) ? 3 : 5; + break; + case 3: + // then + $async$goto = 6; + return A._asyncAwait(t1, $async$call$1); + case 6: + // returning from await. + // goto join + $async$goto = 4; + break; + case 5: + // else + $async$result = result; + case 4: + // join + $async$returnValue = $async$temp1.unwrapValue($async$result); + // goto return + $async$goto = 1; + break; + case 1: + // return + return A._asyncReturn($async$returnValue, $async$completer); + } + }); + return A._asyncStartSync($async$call$1, $async$completer); + }, + $signature: 92 + }; + A._parseFunctions___closure.prototype = { + call$1(result) { + return this.completer.complete$1(result); + }, + call$0() { + return this.call$1(null); + }, + "call*": "call$1", + $requiredArgCount: 0, + $defaultValues() { + return [null]; + }, + $signature: 192 + }; + A._parseFunctions___closure0.prototype = { + call$0() { + return J.apply$2$x(type$.JSFunction._as(this.callback), this.context, this.jsArguments); + }, + $signature: 36 + }; + A._parseImporter_closure.prototype = { + call$1(importer) { + return type$.JSFunction._as(A.allowInteropCaptureThis(new A._parseImporter__closure(this._box_0, importer))); + }, + $signature: 506 + }; + A._parseImporter__closure.prototype = { + call$4(thisArg, url, previous, _) { + var t1 = this._box_0, + result = J.apply$2$x(this.importer, thisArg, A._setArrayType([url, previous, A.allowInterop(new A._parseImporter___closure(J.get$current$x(t1.fiber)))], type$.JSArray_Object)); + if (A._asBool($.$get$_isUndefined().call$1(result))) + return A.runZoned(new A._parseImporter___closure0(t1), null, type$.Object); + return result; + }, + call$3(thisArg, url, previous) { + return this.call$4(thisArg, url, previous, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 507 + }; + A._parseImporter___closure.prototype = { + call$1(result) { + A.scheduleMicrotask(new A._parseImporter____closure(this.currentFiber, result)); + }, + $signature: 508 + }; + A._parseImporter____closure.prototype = { + call$0() { + return J.run$1$x(this.currentFiber, this.result); + }, + $signature: 0 + }; + A._parseImporter___closure0.prototype = { + call$0() { + return J.yield$0$x(this._box_0.fiber); + }, + $signature: 83 + }; + A.LegacyIfExpression0.prototype = { + get$modernSuggestion() { + var _0_1, ifTrue, ifFalse, t1, condition, _null = null, + _0_0 = this.$arguments; + $label0$0: { + _0_1 = _0_0.positional; + ifTrue = _null; + ifFalse = _null; + t1 = false; + if (_0_1.length === 3) { + condition = _0_1[0]; + ifTrue = _0_1[1]; + ifFalse = _0_1[2]; + t1 = _0_0.named; + t1 = t1.get$isEmpty(t1) && _0_0.rest == null; + } else + condition = _null; + if (t1) { + if (ifFalse instanceof A.NullExpression0) + t1 = "if(sass(" + A.S(condition) + "): " + A.S(ifTrue) + ")"; + else + t1 = ifTrue instanceof A.NullExpression0 ? "if(not sass(" + A.S(condition) + "): " + A.S(ifFalse) + ")" : "if(sass(" + A.S(condition) + "): " + A.S(ifTrue) + "; else: " + A.S(ifFalse) + ")"; + break $label0$0; + } + t1 = _null; + break $label0$0; + } + return t1; + }, + accept$1$1(visitor) { + return visitor.visitLegacyIfExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "if" + this.$arguments.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.LimitedMapView0.prototype = { + get$keys(_) { + return this._limited_map_view0$_keys; + }, + get$length(_) { + return this._limited_map_view0$_keys._collection$_length; + }, + get$isEmpty(_) { + return this._limited_map_view0$_keys._collection$_length === 0; + }, + get$isNotEmpty(_) { + return this._limited_map_view0$_keys._collection$_length !== 0; + }, + $index(_, key) { + return this._limited_map_view0$_keys.contains$1(0, key) ? this._limited_map_view0$_map.$index(0, key) : null; + }, + containsKey$1(key) { + return this._limited_map_view0$_keys.contains$1(0, key); + }, + remove$1(_, key) { + return this._limited_map_view0$_keys.contains$1(0, key) ? this._limited_map_view0$_map.remove$1(0, key) : null; + } + }; + A.ListExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitListExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, t3, t4, t5, _this = this, + t1 = _this.hasBrackets; + if (t1) + t2 = A.Primitives_stringFromCharCode(91); + else { + t2 = _this.contents.length; + if (t2 !== 0) + t2 = t2 === 1 && _this.separator === B.ListSeparator_z0K0; + else + t2 = true; + t2 = t2 ? A.Primitives_stringFromCharCode(40) : ""; + } + t3 = _this.contents; + t4 = _this.separator === B.ListSeparator_z0K0; + t5 = t4 ? ", " : " "; + t5 = t2 + new A.MappedListIterable(t3, new A.ListExpression_toString_closure0(_this), A._arrayInstanceType(t3)._eval$1("MappedListIterable<1,String>")).join$1(0, t5); + if (t1) + t1 = t5 + A.Primitives_stringFromCharCode(93); + else { + t1 = t3.length; + if (t1 === 0) + t1 = t5 + A.Primitives_stringFromCharCode(41); + else + t1 = t1 === 1 && t4 ? t5 + ",)" : t5; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _list3$_elementNeedsParens$1(expression) { + var childSeparator, t1, _0_13; + $label0$0: { + if (expression instanceof A.ListExpression0 && expression.contents.length >= 2 && !expression.hasBrackets) { + childSeparator = expression.separator; + t1 = this.separator === B.ListSeparator_z0K0 ? childSeparator === B.ListSeparator_z0K0 : childSeparator !== B.ListSeparator_undecided_null_3_undecided0; + break $label0$0; + } + if (expression instanceof A.UnaryOperationExpression0) { + _0_13 = expression.operator; + if (B.UnaryOperator_n2K0 !== _0_13) + t1 = B.UnaryOperator_hCO0 === _0_13; + else + t1 = true; + } else + t1 = false; + if (t1) { + t1 = this.separator === B.ListSeparator_SrV0; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.ListExpression_toString_closure0.prototype = { + call$1(element) { + return this.$this._list3$_elementNeedsParens$1(element) ? "(" + element.toString$0(0) + ")" : element.toString$0(0); + }, + $signature: 120 + }; + A._length_closure2.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(J.$index$asx($arguments, 0).get$asList().length, null); + }, + $signature: 25 + }; + A._nth_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1); + return list.get$asList()[list.sassIndexToListIndex$2(index, "n")]; + }, + $signature: 3 + }; + A._setNth_closure0.prototype = { + call$1($arguments) { + var newList, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + index = t1.$index($arguments, 1), + value = t1.$index($arguments, 2); + t1 = list.get$asList(); + newList = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + newList[list.sassIndexToListIndex$2(index, "n")] = value; + return list.withListContents$1(newList); + }, + $signature: 27 + }; + A._join_closure0.prototype = { + call$1($arguments) { + var _0_1, _0_4, _0_3, t2, _0_40, _0_4_isSet, separator, bracketed, _null = null, + t1 = J.getInterceptor$asx($arguments), + list1 = t1.$index($arguments, 0), + list2 = t1.$index($arguments, 1), + separatorParam = t1.$index($arguments, 2).assertString$1("separator"), + bracketedParam = t1.$index($arguments, 3), + _1_0 = separatorParam._string0$_text; + $label1$1: { + if ("auto" === _1_0) { + _0_1 = list1.get$separator(list1); + _0_4 = list2.get$separator(list2); + $label0$0: { + t1 = _null; + _0_3 = B.ListSeparator_undecided_null_3_undecided0 === _0_1; + t2 = _0_3; + if (t2) { + t2 = B.ListSeparator_undecided_null_3_undecided0 === _0_4; + _0_40 = _0_4; + _0_4_isSet = true; + } else { + _0_40 = _null; + _0_4_isSet = false; + t2 = false; + } + if (t2) { + t1 = B.ListSeparator_SrV0; + break $label0$0; + } + if (_0_3) { + separator = _0_4_isSet ? _0_40 : _0_4; + t2 = true; + } else { + separator = t1; + t2 = false; + } + if (!t2) + separator = _0_1; + t1 = separator; + break $label0$0; + } + break $label1$1; + } + if ("space" === _1_0) { + t1 = B.ListSeparator_SrV0; + break $label1$1; + } + if ("comma" === _1_0) { + t1 = B.ListSeparator_z0K0; + break $label1$1; + } + if ("slash" === _1_0) { + t1 = B.ListSeparator_Lul0; + break $label1$1; + } + t1 = A.throwExpression(A.SassScriptException$0(string$.x24separ, _null)); + } + bracketed = bracketedParam instanceof A.SassString0 && bracketedParam._string0$_text === "auto" ? list1.get$hasBrackets() : bracketedParam.get$isTruthy(); + t2 = A.List_List$_of(list1.get$asList(), type$.Value_2); + B.JSArray_methods.addAll$1(t2, list2.get$asList()); + return A.SassList$0(t2, t1, bracketed); + }, + $signature: 27 + }; + A._append_closure2.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + list = t1.$index($arguments, 0), + value = t1.$index($arguments, 1), + _0_0 = t1.$index($arguments, 2).assertString$1("separator")._string0$_text; + $label0$0: { + if ("auto" === _0_0) { + t1 = list.get$separator(list) === B.ListSeparator_undecided_null_3_undecided0 ? B.ListSeparator_SrV0 : list.get$separator(list); + break $label0$0; + } + if ("space" === _0_0) { + t1 = B.ListSeparator_SrV0; + break $label0$0; + } + if ("comma" === _0_0) { + t1 = B.ListSeparator_z0K0; + break $label0$0; + } + if ("slash" === _0_0) { + t1 = B.ListSeparator_Lul0; + break $label0$0; + } + t1 = A.throwExpression(A.SassScriptException$0(string$.x24separ, null)); + } + t2 = A.List_List$_of(list.get$asList(), type$.Value_2); + t2.push(value); + return list.withListContents$2$separator(t2, t1); + }, + $signature: 27 + }; + A._zip_closure0.prototype = { + call$1($arguments) { + var results, result, _box_0 = {}, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,List>"), + lists = A.List_List$_of(new A.MappedListIterable(t1, new A._zip__closure2(), t2), t2._eval$1("ListIterable.E")); + if (lists.length === 0) + return B.SassList_oH00; + _box_0.i = 0; + results = A._setArrayType([], type$.JSArray_SassList_2); + for (t1 = A._arrayInstanceType(lists)._eval$1("MappedListIterable<1,Value0>"), t2 = type$.Value_2; B.JSArray_methods.every$1(lists, new A._zip__closure3(_box_0));) { + result = A.List_List$from(new A.MappedListIterable(lists, new A._zip__closure4(_box_0), t1), false, t2); + result.$flags = 3; + results.push(new A.SassList0(result, B.ListSeparator_SrV0, false)); + ++_box_0.i; + } + return A.SassList$0(results, B.ListSeparator_z0K0, false); + }, + $signature: 27 + }; + A._zip__closure2.prototype = { + call$1(list) { + return list.get$asList(); + }, + $signature: 510 + }; + A._zip__closure3.prototype = { + call$1(list) { + return this._box_0.i !== J.get$length$asx(list); + }, + $signature: 603 + }; + A._zip__closure4.prototype = { + call$1(list) { + return J.$index$asx(list, this._box_0.i); + }, + $signature: 3 + }; + A._index_closure2.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + index = B.JSArray_methods.indexOf$1(t1.$index($arguments, 0).get$asList(), t1.$index($arguments, 1)); + return index === -1 ? B.C__SassNull0 : A.SassNumber_SassNumber0(index + 1, null); + }, + $signature: 3 + }; + A._separator_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0), + _0_0 = t1.get$separator(t1); + $label0$0: { + if (B.ListSeparator_z0K0 === _0_0) { + t1 = new A.SassString0("comma", false); + break $label0$0; + } + if (B.ListSeparator_Lul0 === _0_0) { + t1 = new A.SassString0("slash", false); + break $label0$0; + } + t1 = new A.SassString0("space", false); + break $label0$0; + } + return t1; + }, + $signature: 18 + }; + A._isBracketed_closure0.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).get$hasBrackets() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._slash_closure0.prototype = { + call$1($arguments) { + var list = J.$index$asx($arguments, 0).get$asList(); + if (list.length < 2) + throw A.wrapException(A.SassScriptException$0("At least two elements are required.", null)); + return A.SassList$0(list, B.ListSeparator_Lul0, false); + }, + $signature: 27 + }; + A.InterpolatedSelectorList.prototype = { + get$span(_) { + var t1 = this.components; + return t1.length === 1 ? B.JSArray_methods.get$first(t1).span : B.JSArray_methods.get$first(t1).span.expand$1(0, B.JSArray_methods.get$last(t1).span); + }, + accept$1$1(visitor) { + return visitor.visitSelectorList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return B.JSArray_methods.join$1(this.components, ", "); + } + }; + A.SelectorList0.prototype = { + get$asSassList() { + var t1 = this.components; + return A.SassList$0(new A.MappedListIterable(t1, new A.SelectorList_asSassList_closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_z0K0, false); + }, + accept$1$1(visitor) { + return visitor.visitSelectorList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(other) { + var t3, t4, t5, t6, _i, complex1, t7, _i0, t8, + t1 = type$.JSArray_ComplexSelector_2, + t2 = A._setArrayType([], t1); + for (t3 = this.components, t4 = t3.length, t5 = other.components, t6 = t5.length, _i = 0; _i < t4; ++_i) { + complex1 = t3[_i]; + for (t7 = complex1.span, _i0 = 0; _i0 < t6; ++_i0) { + t8 = A.unifyComplex0(A._setArrayType([complex1, t5[_i0]], t1), t7); + if (t8 != null) + B.JSArray_methods.addAll$1(t2, t8); + } + } + return t2.length === 0 ? null : A.SelectorList$0(t2, this.span); + }, + nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, preserveParentSelectors) { + var _0_0, t1, _this = this; + if ($parent == null) { + if (preserveParentSelectors) + return _this; + _0_0 = B.C__ParentSelectorVisitor0.visitSelectorList$1(_this); + if (_0_0 instanceof A.ParentSelector0) + t1 = _0_0.suffix != null; + else + t1 = false; + if (t1) + throw A.wrapException(A.SassException$0(string$.A_top_, _0_0.span, null)); + return _this; + } + t1 = _this.components; + return A.SelectorList$0(A.flattenVertically0(new A.MappedListIterable(t1, new A.SelectorList_nestWithin_closure0(_this, preserveParentSelectors, implicitParent, $parent), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Iterable>")), type$.ComplexSelector_2), _this.span); + }, + nestWithin$1($parent) { + return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, true, false); + }, + nestWithin$2$implicitParent($parent, implicitParent) { + return this.nestWithin$3$implicitParent$preserveParentSelectors($parent, implicitParent, false); + }, + _list2$_nestWithinCompound$2(component, $parent) { + var resolvedSimples, parentSelector, error, stackTrace, t2, resolvedSimples0, exception, + t1 = component.selector, + simples = t1.components, + containsSelectorPseudo = J.any$1$ax(simples, new A.SelectorList__nestWithinCompound_closure2()); + if (!containsSelectorPseudo && !(J.get$first$ax(simples) instanceof A.ParentSelector0)) + return null; + if (containsSelectorPseudo) { + t2 = simples; + resolvedSimples0 = new A.MappedListIterable(t2, new A.SelectorList__nestWithinCompound_closure3($parent), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,SimpleSelector0>")); + } else + resolvedSimples0 = simples; + resolvedSimples = resolvedSimples0; + parentSelector = J.get$first$ax(simples); + try { + if (!(parentSelector instanceof A.ParentSelector0)) { + t2 = component.span; + t2 = A._setArrayType([A.ComplexSelector$0(B.List_empty17, A._setArrayType([new A.ComplexSelectorComponent0(A.CompoundSelector$0(resolvedSimples, t1.span), A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator_2), t2)], type$.JSArray_ComplexSelectorComponent_2), t2, false)], type$.JSArray_ComplexSelector_2); + return t2; + } else if (J.get$length$asx(simples) === 1 && parentSelector.suffix == null) { + t1 = $parent.withAdditionalCombinators$1(component.combinators); + return t1.components; + } + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(error.withAdditionalSpan$2(parentSelector.span, "parent selector"), error, stackTrace); + } else + throw exception; + } + t1 = $parent.components; + return new A.MappedListIterable(t1, new A.SelectorList__nestWithinCompound_closure4(parentSelector, resolvedSimples, component), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")); + }, + isSuperselector$1(other) { + return A.listIsSuperselector0(this.components, other.components); + }, + withAdditionalCombinators$1(combinators) { + var t1; + if (combinators.length === 0) + t1 = this; + else { + t1 = this.components; + t1 = A.SelectorList$0(new A.MappedListIterable(t1, new A.SelectorList_withAdditionalCombinators_closure0(combinators), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")), this.span); + } + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this.components); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SelectorList0 && B.C_ListEquality.equals$2(0, this.components, other.components); + } + }; + A.SelectorList_asSassList_closure0.prototype = { + call$1(complex) { + var t3, t4, _i, component, visitor, t5, t6, t7, _i0, _null = null, + t1 = type$.JSArray_Value_2, + t2 = A._setArrayType([], t1); + for (t3 = complex.leadingCombinators, t4 = t3.length, _i = 0; _i < t4; ++_i) + t2.push(new A.SassString0(J.toString$0$(t3[_i].value), false)); + for (t3 = complex.components, t4 = t3.length, _i = 0; _i < t4; ++_i) { + component = t3[_i]; + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + component.selector.accept$1(visitor); + t5 = A._setArrayType([new A.SassString0(visitor._serialize0$_buffer.toString$0(0), false)], t1); + for (t6 = component.combinators, t7 = t6.length, _i0 = 0; _i0 < t7; ++_i0) + t5.push(new A.SassString0(J.toString$0$(t6[_i0].value), false)); + B.JSArray_methods.addAll$1(t2, t5); + } + return A.SassList$0(t2, B.ListSeparator_SrV0, false); + }, + $signature: 512 + }; + A.SelectorList_nestWithin_closure0.prototype = { + call$1(complex) { + var t1, newComplexes, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, _i, component, resolved, i, t12, t13, t14, _i0, newComplex, t15, t16, _this = this; + if (_this.preserveParentSelectors || complex.accept$1(B.C__ParentSelectorVisitor0) == null) { + if (!_this.implicitParent) + return A._setArrayType([complex], type$.JSArray_ComplexSelector_2); + t1 = _this.parent.components; + return new A.MappedListIterable(t1, new A.SelectorList_nestWithin__closure1(complex), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")); + } + t1 = type$.JSArray_ComplexSelector_2; + newComplexes = A._setArrayType([], t1); + for (t2 = complex.components, t3 = t2.length, t4 = _this.$this, t5 = _this.parent, t6 = type$.ComplexSelector_2, t7 = complex.leadingCombinators, t8 = t7.length === 0, t9 = complex.span, t10 = type$.ComplexSelectorComponent_2, t11 = type$.JSArray_ComplexSelectorComponent_2, _i = 0; _i < t3; ++_i) { + component = t2[_i]; + resolved = t4._list2$_nestWithinCompound$2(component, t5); + if (resolved == null) + if (newComplexes.length === 0) + newComplexes.push(A.ComplexSelector$0(t7, A._setArrayType([component], t11), t9, false)); + else + for (i = 0; i < newComplexes.length; ++i) { + t12 = newComplexes[i]; + t13 = A.List_List$_of(t12.components, t10); + t13.push(component); + newComplexes[i] = A.ComplexSelector$0(t12.leadingCombinators, t13, t9, t12.lineBreak); + } + else if (newComplexes.length === 0) + B.JSArray_methods.addAll$1(newComplexes, t8 ? resolved : J.map$1$1$ax(resolved, new A.SelectorList_nestWithin__closure2(complex), t6)); + else { + t12 = A._setArrayType([], t1); + for (t13 = newComplexes.length, t14 = J.getInterceptor$ax(resolved), _i0 = 0; _i0 < newComplexes.length; newComplexes.length === t13 || (0, A.throwConcurrentModificationError)(newComplexes), ++_i0) { + newComplex = newComplexes[_i0]; + for (t15 = t14.get$iterator(resolved), t16 = newComplex.span; t15.moveNext$0();) + t12.push(newComplex.concatenate$2(t15.get$current(t15), t16)); + } + newComplexes = t12; + } + } + return newComplexes; + }, + $signature: 513 + }; + A.SelectorList_nestWithin__closure1.prototype = { + call$1(parentComplex) { + var t1 = this.complex; + return parentComplex.concatenate$2(t1, t1.span); + }, + $signature: 59 + }; + A.SelectorList_nestWithin__closure2.prototype = { + call$1(resolvedComplex) { + var t1 = resolvedComplex.leadingCombinators, + t2 = this.complex, + t3 = t2.leadingCombinators; + if (t1.length === 0) + t1 = t3; + else { + t3 = A.List_List$_of(t3, type$.CssValue_Combinator_2); + B.JSArray_methods.addAll$1(t3, t1); + t1 = t3; + } + return A.ComplexSelector$0(t1, resolvedComplex.components, t2.span, resolvedComplex.lineBreak); + }, + $signature: 59 + }; + A.SelectorList__nestWithinCompound_closure2.prototype = { + call$1(simple) { + var selector; + if (!(simple instanceof A.PseudoSelector0)) + return false; + selector = simple.selector; + return selector != null && selector.accept$1(B.C__ParentSelectorVisitor0) != null; + }, + $signature: 15 + }; + A.SelectorList__nestWithinCompound_closure3.prototype = { + call$1(simple) { + var selector, t1, _0_2; + $label0$0: { + selector = null; + t1 = false; + if (simple instanceof A.PseudoSelector0) { + _0_2 = simple.selector; + if (_0_2 != null) { + selector = _0_2 == null ? type$.SelectorList_2._as(_0_2) : _0_2; + t1 = selector.accept$1(B.C__ParentSelectorVisitor0) != null; + } + } + if (t1) { + t1 = simple.withSelector$1(selector.nestWithin$2$implicitParent(this.parent, false)); + break $label0$0; + } + t1 = simple; + break $label0$0; + } + return t1; + }, + $signature: 514 + }; + A.SelectorList__nestWithinCompound_closure4.prototype = { + call$1(complex) { + var lastComponent, suffix, lastSimples, t1, t2, last, t3, error, stackTrace, t4, t5, exception, _this = this; + try { + t4 = complex.components; + lastComponent = B.JSArray_methods.get$last(t4); + if (lastComponent.combinators.length !== 0) { + t1 = A.MultiSpanSassException$0('Selector "' + complex.toString$0(0) + string$.x22x20can_, A.SpanExtensions_trimRight0(lastComponent.span), "outer selector", A.LinkedHashMap_LinkedHashMap$_literal([_this.parentSelector.span, "parent selector"], type$.FileSpan, type$.String), null); + throw A.wrapException(t1); + } + suffix = _this.parentSelector.suffix; + lastSimples = lastComponent.selector.components; + t5 = type$.SimpleSelector_2; + if (suffix == null) { + t2 = A.List_List$_of(lastSimples, t5); + t1 = t2; + J.addAll$1$ax(t1, J.skip$1$ax(_this.resolvedSimples, 1)); + t1 = t1; + } else { + t1 = A.List_List$_of(A.IterableExtension_get_exceptLast0(lastSimples), t5); + t2 = t1; + J.add$1$ax(t2, J.get$last$ax(lastSimples).addSuffix$1(suffix)); + J.addAll$1$ax(t2, J.skip$1$ax(_this.resolvedSimples, 1)); + t1 = t2; + } + t2 = _this.component; + last = A.CompoundSelector$0(t1, t2.selector.span); + t1 = A.List_List$_of(A.IterableExtension_get_exceptLast0(t4), type$.ComplexSelectorComponent_2); + t3 = t1; + t1 = t2.span; + J.add$1$ax(t3, new A.ComplexSelectorComponent0(last, A.List_List$unmodifiable(t2.combinators, type$.CssValue_Combinator_2), t1)); + t1 = A.ComplexSelector$0(complex.leadingCombinators, t3, t1, complex.lineBreak); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.SassException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(error.withAdditionalSpan$2(_this.parentSelector.span, "parent selector"), error, stackTrace); + } else + throw exception; + } + }, + $signature: 59 + }; + A.SelectorList_withAdditionalCombinators_closure0.prototype = { + call$1(complex) { + return complex.withAdditionalCombinators$1(this.combinators); + }, + $signature: 59 + }; + A._ParentSelectorVisitor0.prototype = { + visitParentSelector$1(_, selector) { + return selector; + } + }; + A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0.prototype = {}; + A.listClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassList", new A.listClass__closure())); + J.get$$prototype$x(jsClass).get = A.allowInteropCaptureThisNamed("get", new A.listClass__closure0()); + A.JSClassExtension_injectSuperclass(t1._as(B.SassList_9ua.constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.listClass__closure.prototype = { + call$3($self, contentsOrOptions, options) { + var contents, t1, t2; + if (self.immutable.isList(contentsOrOptions)) + contents = J.cast$1$0$ax(J.toArray$0$x(type$.ImmutableList._as(contentsOrOptions)), type$.Value_2); + else if (type$.List_dynamic._is(contentsOrOptions)) + contents = J.cast$1$0$ax(contentsOrOptions, type$.Value_2); + else { + contents = A._setArrayType([], type$.JSArray_Value_2); + type$.nullable__ConstructorOptions._as(contentsOrOptions); + options = contentsOrOptions; + } + t1 = options == null; + if (!t1) { + t2 = J.get$separator$x(options); + t2 = A._asBool($.$get$_isUndefined().call$1(t2)); + } else + t2 = true; + t2 = t2 ? B.ListSeparator_z0K0 : A.jsToDartSeparator(J.get$separator$x(options)); + t1 = t1 ? null : J.get$brackets$x(options); + return A.SassList$0(contents, t2, t1 == null ? false : t1); + }, + call$1($self) { + return this.call$3($self, null, null); + }, + call$2($self, contentsOrOptions) { + return this.call$3($self, contentsOrOptions, null); + }, + "call*": "call$3", + $requiredArgCount: 1, + $defaultValues() { + return [null, null]; + }, + $signature: 515 + }; + A.listClass__closure0.prototype = { + call$2($self, indexFloat) { + var index = B.JSNumber_methods.floor$0(indexFloat); + if (index < 0) + index = $self.get$asList().length + index; + if (index < 0 || index >= $self.get$asList().length) + return self.undefined; + return $self.get$asList()[index]; + }, + $signature: 250 + }; + A._ConstructorOptions.prototype = {}; + A._NodeSassList.prototype = {}; + A.legacyListClass_closure.prototype = { + call$4(thisArg, $length, commaSeparator, dartValue) { + var t1; + if (dartValue == null) { + $length.toString; + t1 = A.Iterable_Iterable$generate($length, new A.legacyListClass__closure(), type$.Value_2); + t1 = A.SassList$0(t1, commaSeparator !== false ? B.ListSeparator_z0K0 : B.ListSeparator_SrV0, false); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, $length) { + return this.call$4(thisArg, $length, null, null); + }, + call$3(thisArg, $length, commaSeparator) { + return this.call$4(thisArg, $length, commaSeparator, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 517 + }; + A.legacyListClass__closure.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 251 + }; + A.legacyListClass_closure0.prototype = { + call$2(thisArg, index) { + return A.wrapValue(J.get$dartValue$x(thisArg)._list1$_contents[index]); + }, + $signature: 519 + }; + A.legacyListClass_closure1.prototype = { + call$3(thisArg, index, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._list1$_contents, + mutable = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + mutable[index] = A.unwrapValue(value); + t1.set$dartValue(thisArg, t1.get$dartValue(thisArg).withListContents$1(mutable)); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 520 + }; + A.legacyListClass_closure2.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._list1$_separator === B.ListSeparator_z0K0; + }, + $signature: 521 + }; + A.legacyListClass_closure3.prototype = { + call$2(thisArg, isComma) { + var t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._list1$_contents, + t3 = isComma ? B.ListSeparator_z0K0 : B.ListSeparator_SrV0; + t1.set$dartValue(thisArg, A.SassList$0(t2, t3, t1.get$dartValue(thisArg)._list1$_hasBrackets)); + }, + $signature: 522 + }; + A.legacyListClass_closure4.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._list1$_contents.length; + }, + $signature: 523 + }; + A.SassList0.prototype = { + get$separator(_) { + return this._list1$_separator; + }, + get$hasBrackets() { + return this._list1$_hasBrackets; + }, + get$isBlank() { + return !this._list1$_hasBrackets && B.JSArray_methods.every$1(this._list1$_contents, new A.SassList_isBlank_closure0()); + }, + get$asList() { + return this._list1$_contents; + }, + get$lengthAsList() { + return this._list1$_contents.length; + }, + SassList$3$brackets0(contents, _separator, brackets) { + if (this._list1$_separator === B.ListSeparator_undecided_null_3_undecided0 && this._list1$_contents.length > 1) + throw A.wrapException(A.ArgumentError$(string$.A_list, null)); + }, + toString$0(_) { + var t2, _this = this, + t1 = true; + if (!_this._list1$_hasBrackets) { + t2 = _this._list1$_contents.length; + if (t2 !== 0) + t1 = t2 === 1 && _this._list1$_separator === B.ListSeparator_z0K0; + } + if (t1) + return _this.super$Value$toString0(0); + return "(" + _this.super$Value$toString0(0) + ")"; + }, + accept$1$1(visitor) { + return visitor.visitList$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this._list1$_contents.length === 0 ? B.SassMap_Map_empty0 : this.super$Value$assertMap0($name); + }, + tryMap$0() { + return this._list1$_contents.length === 0 ? B.SassMap_Map_empty0 : null; + }, + $eq(_, other) { + var t1, _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassList0 && other._list1$_separator === _this._list1$_separator && other._list1$_hasBrackets === _this._list1$_hasBrackets && B.C_ListEquality.equals$2(0, other._list1$_contents, _this._list1$_contents))) + t1 = _this._list1$_contents.length === 0 && other instanceof A.SassMap0 && other.get$asList().length === 0; + else + t1 = true; + return t1; + }, + get$hashCode(_) { + return B.C_ListEquality0.hash$1(this._list1$_contents); + } + }; + A.SassList_isBlank_closure0.prototype = { + call$1(element) { + return element.get$isBlank(); + }, + $signature: 56 + }; + A.ListSeparator0.prototype = { + _enumToString$0() { + return "ListSeparator." + this._name; + }, + toString$0(_) { + return this._list1$_name; + } + }; + A.LmsColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var t1, longScaled, mediumScaled, shortScaled, lightness, t2, t3, _null = null; + switch (dest) { + case B.OklabColorSpace_5400: + t1 = long == null ? 0 : long; + longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = medium == null ? 0 : medium; + mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = short == null ? 0 : short; + shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = $.$get$lmsToOklab0(); + lightness = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; + t2 = missingLightness ? _null : lightness; + t3 = missingA ? _null : t1[3] * longScaled + t1[4] * mediumScaled + t1[5] * shortScaled; + return A.SassColor$_forSpace0(B.OklabColorSpace_5400, t2, t3, missingB ? _null : t1[6] * longScaled + t1[7] * mediumScaled + t1[8] * shortScaled, alpha, _null); + case B.OklchColorSpace_9Gj0: + t1 = long == null ? 0 : long; + longScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = medium == null ? 0 : medium; + mediumScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + t1 = short == null ? 0 : short; + shortScaled = Math.pow(Math.abs(t1), 0.3333333333333333) * J.get$sign$in(t1); + if (missingLightness) + t1 = _null; + else { + t1 = $.$get$lmsToOklab0(); + t1 = t1[0] * longScaled + t1[1] * mediumScaled + t1[2] * shortScaled; + } + t2 = $.$get$lmsToOklab0(); + return A.labToLch0(dest, t1, t2[3] * longScaled + t2[4] * mediumScaled + t2[5] * shortScaled, t2[6] * longScaled + t2[7] * mediumScaled + t2[8] * shortScaled, alpha, missingChroma, missingHue); + default: + return this.super$ColorSpace$convertLinear0(dest, long, medium, short, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + } + }, + convert$5(dest, long, medium, short, alpha) { + return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, long, medium, short, alpha, false, false, false, false, false); + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj0 === dest || B.SrgbColorSpace_thf0 === dest || B.RgbColorSpace_i0P0 === dest) { + t1 = $.$get$lmsToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$lmsToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$lmsToLinearProphotoRgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT0 === dest || B.DisplayP3LinearColorSpace_PrP0 === dest) { + t1 = $.$get$lmsToLinearDisplayP30(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$lmsToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$lmsToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$lmsToXyzD500(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.LocalMindeGamutMap0.prototype = { + map$1(_, color) { + var clipped, max, min, minInGamut, chroma, current, e, + originOklch = color.toSpace$1(B.OklchColorSpace_9Gj0), + lightness = originOklch.channel0OrNull, + hue = originOklch.channel2OrNull, + alpha = originOklch.alphaOrNull, + t1 = lightness == null, + t2 = t1 ? 0 : lightness; + if (t2 > 1 || A.fuzzyEquals0(t2, 1)) { + t1 = color._color0$_space; + t2 = color.alphaOrNull; + return t1.get$isLegacyInternal() ? A.SassColor_SassColor$rgbInternal0(255, 255, 255, t2, null).toSpace$1(t1) : A.SassColor_SassColor$forSpaceInternal0(t1, 1, 1, 1, t2); + } else { + t1 = t1 ? 0 : lightness; + if (t1 < 0 || A.fuzzyEquals0(t1, 0)) + return A.SassColor_SassColor$rgbInternal0(0, 0, 0, color.alphaOrNull, null).toSpace$1(color._color0$_space); + } + clipped = color.get$isInGamut() ? color : B.ClipGamutMap_clip0.map$1(0, color); + if (this._local_minde$_deltaEOK$2(clipped, color) < 0.02) + return clipped; + max = originOklch.channel1OrNull; + if (max == null) + max = 0; + for (t1 = color._color0$_space, min = 0, minInGamut = true; max - min > 0.0001;) { + chroma = (min + max) / 2; + current = B.OklchColorSpace_9Gj0.convert$5(t1, lightness, chroma, hue, alpha); + if (minInGamut && current.get$isInGamut()) { + min = chroma; + continue; + } + clipped = current.get$isInGamut() ? current : B.ClipGamutMap_clip0.map$1(0, current); + e = this._local_minde$_deltaEOK$2(clipped, current); + if (e < 0.02) { + if (0.02 - e < 0.0001) + return clipped; + min = chroma; + minInGamut = false; + } else + max = chroma; + } + return clipped; + }, + _local_minde$_deltaEOK$2(color1, color2) { + var t2, t3, t4, + lab1 = color1.toSpace$1(B.OklabColorSpace_5400), + lab2 = color2.toSpace$1(B.OklabColorSpace_5400), + t1 = lab1.channel0OrNull; + if (t1 == null) + t1 = 0; + t2 = lab2.channel0OrNull; + t1 = Math.pow(t1 - (t2 == null ? 0 : t2), 2); + t2 = lab1.channel1OrNull; + if (t2 == null) + t2 = 0; + t3 = lab2.channel1OrNull; + t2 = Math.pow(t2 - (t3 == null ? 0 : t3), 2); + t3 = lab1.channel2OrNull; + if (t3 == null) + t3 = 0; + t4 = lab2.channel2OrNull; + return Math.sqrt(t1 + t2 + Math.pow(t3 - (t4 == null ? 0 : t4), 2)); + } + }; + A.JSLogger.prototype = {}; + A.WarnOptions.prototype = {}; + A.DebugOptions.prototype = {}; + A.LoggerWithDeprecationType0.prototype = {}; + A.LoudComment0.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitLoudComment$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text.toString$0(0); + } + }; + A.MapExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitMapExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, t3, _i, t4, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + t1.push(t4._0.toString$0(0) + ": " + t4._1.toString$0(0)); + } + return "(" + B.JSArray_methods.join$1(t1, ", ") + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A._get_closure0.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast0(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map0$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap0)) + return B.C__SassNull0; + } + t1 = map._map0$_contents.$index(0, B.JSArray_methods.get$last(t2)); + return t1 == null ? B.C__SassNull0 : t1; + }, + $signature: 3 + }; + A._set_closure1.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._modify0(t1.$index($arguments, 0).assertMap$1("map"), A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2), new A._set__closure2($arguments), true); + }, + $signature: 3 + }; + A._set__closure2.prototype = { + call$1(_) { + return J.$index$asx(this.$arguments, 2); + }, + $signature: 41 + }; + A._set_closure2.prototype = { + call$1($arguments) { + var keys, t2, t3, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + _0_0 = t1.$index($arguments, 1).get$asList(), + _0_1 = _0_0.length; + if (_0_1 <= 0) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a key.", null)); + if (_0_1 === 1) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a value.", null)); + t1 = {}; + keys = t1.value = null; + t2 = _0_1 >= 1; + if (t2) { + t3 = _0_1 - 1; + keys = B.JSArray_methods.sublist$2(_0_0, 0, t3); + t1.value = _0_0[t3]; + } + if (t2) + return A._modify0(map, keys, new A._set__closure1(t1), true); + throw A.wrapException("[BUG] Unreachable code"); + }, + $signature: 3 + }; + A._set__closure1.prototype = { + call$1(_) { + return this._box_0.value; + }, + $signature: 41 + }; + A._merge_closure1.prototype = { + call$1($arguments) { + var t2, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + map2 = t1.$index($arguments, 1).assertMap$1("map2"); + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(map1._map0$_contents, t1, t1); + t2.addAll$1(0, map2._map0$_contents); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 34 + }; + A._merge_closure2.prototype = { + call$1($arguments) { + var last, t2, keys, _null = null, + t1 = J.getInterceptor$asx($arguments), + map1 = t1.$index($arguments, 0).assertMap$1("map1"), + _0_0 = t1.$index($arguments, 1).get$asList(), + _0_1 = _0_0.length; + if (_0_1 <= 0) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a key.", _null)); + if (_0_1 === 1) + throw A.wrapException(A.SassScriptException$0("Expected $args to contain a map.", _null)); + t1 = _0_1 >= 1; + last = _null; + if (t1) { + t2 = _0_1 - 1; + keys = B.JSArray_methods.sublist$2(_0_0, 0, t2); + last = _0_0[t2]; + } else + keys = _null; + if (t1) + return A._modify0(map1, keys, new A._merge__closure0(last.assertMap$1("map2")), true); + throw A.wrapException("[BUG] Unreachable code"); + }, + $signature: 3 + }; + A._merge__closure0.prototype = { + call$1(oldValue) { + var t1, t2, + nestedMap = oldValue.tryMap$0(); + if (nestedMap == null) + return this.map2; + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map0$_contents, t1, t1); + t2.addAll$1(0, this.map2._map0$_contents); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + }, + $signature: 524 + }; + A._deepMerge_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A._deepMergeImpl0(t1.$index($arguments, 0).assertMap$1("map1"), t1.$index($arguments, 1).assertMap$1("map2")); + }, + $signature: 34 + }; + A._deepRemove_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + return A._modify0(map, A.IterableExtension_get_exceptLast0(t2), new A._deepRemove__closure0(t2), false); + }, + $signature: 3 + }; + A._deepRemove__closure0.prototype = { + call$1(value) { + var t1, nestedMap, t2, + _0_0 = value.tryMap$0(); + if (_0_0 != null) { + t1 = _0_0._map0$_contents.containsKey$1(B.JSArray_methods.get$last(this.keys)); + nestedMap = _0_0; + } else { + nestedMap = null; + t1 = false; + } + if (t1) { + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$of(nestedMap._map0$_contents, t1, t1); + t2.remove$1(0, B.JSArray_methods.get$last(this.keys)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } + return value; + }, + $signature: 41 + }; + A._remove_closure1.prototype = { + call$1($arguments) { + return J.$index$asx($arguments, 0).assertMap$1("map"); + }, + $signature: 34 + }; + A._remove_closure2.prototype = { + call$1($arguments) { + var mutableMap, t3, _i, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + t1 = type$.Value_2; + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map0$_contents, t1, t1); + for (t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) + mutableMap.remove$1(0, t2[_i]); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 34 + }; + A._keys_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map0$_contents; + return A.SassList$0(t1.get$keys(t1), B.ListSeparator_z0K0, false); + }, + $signature: 27 + }; + A._values_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertMap$1("map")._map0$_contents; + return A.SassList$0(t1.get$values(t1), B.ListSeparator_z0K0, false); + }, + $signature: 27 + }; + A._hasKey_closure0.prototype = { + call$1($arguments) { + var value, + t1 = J.getInterceptor$asx($arguments), + map = t1.$index($arguments, 0).assertMap$1("map"), + t2 = A._setArrayType([t1.$index($arguments, 1)], type$.JSArray_Value_2); + B.JSArray_methods.addAll$1(t2, t1.$index($arguments, 2).get$asList()); + for (t1 = A.IterableExtension_get_exceptLast0(t2), t1 = t1.get$iterator(t1); t1.moveNext$0(); map = value) { + value = map._map0$_contents.$index(0, t1.get$current(t1)); + if (!(value instanceof A.SassMap0)) + return B.SassBoolean_false0; + } + return map._map0$_contents.containsKey$1(B.JSArray_methods.get$last(t2)) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._modify_modifyNestedMap0.prototype = { + call$1(map) { + var nestedMap, _this = this, + t1 = type$.Value_2, + mutableMap = A.LinkedHashMap_LinkedHashMap$of(map._map0$_contents, t1, t1), + t2 = _this.keyIterator, + key = t2.get$current(t2); + if (!t2.moveNext$0()) { + t2 = mutableMap.$index(0, key); + if (t2 == null) + t2 = B.C__SassNull0; + mutableMap.$indexSet(0, key, _this.modify.call$1(t2)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + } + t2 = mutableMap.$index(0, key); + nestedMap = t2 == null ? null : t2.tryMap$0(); + t2 = nestedMap == null; + if (t2 && !_this.addNesting) + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + mutableMap.$indexSet(0, key, _this.call$1(t2 ? B.SassMap_Map_empty0 : nestedMap)); + return new A.SassMap0(A.ConstantMap_ConstantMap$from(mutableMap, t1, t1)); + }, + $signature: 525 + }; + A.MapExtensions_get_pairs_closure0.prototype = { + call$1(e) { + return new A._Record_2(e.key, e.value); + }, + $signature() { + return this.K._eval$1("@<0>")._bind$1(this.V)._eval$1("+(1,2)(MapEntry<1,2>)"); + } + }; + A.mapClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassMap", new A.mapClass__closure())), + t2 = J.getInterceptor$x(jsClass); + A.defineGetter(t2.get$$prototype(jsClass), "contents", new A.mapClass__closure0(), null); + t2.get$$prototype(jsClass).get = A.allowInteropCaptureThisNamed("get", new A.mapClass__closure1()); + A.JSClassExtension_injectSuperclass(t1._as(B.SassMap_Map_empty0.constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.mapClass__closure.prototype = { + call$2($self, contents) { + var t1; + if (contents == null) + t1 = B.SassMap_Map_empty0; + else { + t1 = type$.Value_2; + t1 = new A.SassMap0(A.ConstantMap_ConstantMap$from(A.immutableMapToDartMap(contents).cast$2$0(0, t1, t1), t1, t1)); + } + return t1; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 526 + }; + A.mapClass__closure0.prototype = { + call$1($self) { + return A.dartMapToImmutableMap($self._map0$_contents); + }, + $signature: 527 + }; + A.mapClass__closure1.prototype = { + call$2($self, indexOrKey) { + var index, t1, _0_0; + if (typeof indexOrKey == "number") { + index = B.JSNumber_methods.floor$0(indexOrKey); + if (index < 0) { + t1 = $self._map0$_contents; + index = t1.get$length(t1) + index; + } + if (index >= 0) { + t1 = $self._map0$_contents; + t1 = index >= t1.get$length(t1); + } else + t1 = true; + if (t1) + return self.undefined; + t1 = type$.Value_2; + _0_0 = A.MapExtensions_get_pairs0($self._map0$_contents, t1, t1).elementAt$1(0, index); + return A.SassList$0(A._setArrayType([_0_0._0, _0_0._1], type$.JSArray_Value_2), B.ListSeparator_SrV0, false); + } else { + t1 = $self._map0$_contents.$index(0, indexOrKey); + return t1 == null ? self.undefined : t1; + } + }, + $signature: 528 + }; + A._NodeSassMap.prototype = {}; + A.legacyMapClass_closure.prototype = { + call$3(thisArg, $length, dartValue) { + var t1, t2, t3, map; + if (dartValue == null) { + $length.toString; + t1 = type$.Value_2; + t2 = A.Iterable_Iterable$generate($length, new A.legacyMapClass__closure(), t1); + t3 = A.Iterable_Iterable$generate($length, new A.legacyMapClass__closure0(), t1); + map = A.LinkedHashMap_LinkedHashMap(null, null, null, t1, t1); + A.MapBase__fillMapWithIterables(map, t2, t3); + t1 = new A.SassMap0(A.ConstantMap_ConstantMap$from(map, t1, t1)); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, $length) { + return this.call$3(thisArg, $length, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 529 + }; + A.legacyMapClass__closure.prototype = { + call$1(i) { + return A.SassNumber_SassNumber0(i, null); + }, + $signature: 530 + }; + A.legacyMapClass__closure0.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 251 + }; + A.legacyMapClass_closure0.prototype = { + call$2(thisArg, index) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + t1 = t1.get$keys(t1); + return A.wrapValue(t1.elementAt$1(t1, index)); + }, + $signature: 252 + }; + A.legacyMapClass_closure1.prototype = { + call$2(thisArg, index) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + t1 = t1.get$values(t1); + return A.wrapValue(t1.elementAt$1(t1, index)); + }, + $signature: 252 + }; + A.legacyMapClass_closure2.prototype = { + call$1(thisArg) { + var t1 = J.get$dartValue$x(thisArg)._map0$_contents; + return t1.get$length(t1); + }, + $signature: 532 + }; + A.legacyMapClass_closure3.prototype = { + call$3(thisArg, index, key) { + var newKey, t2, newMap, t3, i, t4, oldKey, oldValue, + t1 = J.getInterceptor$x(thisArg), + oldMap = t1.get$dartValue(thisArg)._map0$_contents, + $length = oldMap.get$length(oldMap); + A.IndexError_check(index, $length, oldMap, null, "index"); + newKey = A.unwrapValue(key); + t2 = type$.Value_2; + newMap = A.LinkedHashMap_LinkedHashMap$_empty(t2, t2); + for (t3 = A.MapExtensions_get_pairs0(t1.get$dartValue(thisArg)._map0$_contents, t2, t2), t3 = t3.get$iterator(t3), i = 0; t3.moveNext$0();) { + t4 = t3.get$current(t3); + oldKey = t4._0; + oldValue = t4._1; + if (i === index) + newMap.$indexSet(0, newKey, oldValue); + else { + if (newKey.$eq(0, oldKey)) + throw A.wrapException(A.ArgumentError$value(key, "key", "is already in the map")); + newMap.$indexSet(0, oldKey, oldValue); + } + ++i; + } + t1.set$dartValue(thisArg, new A.SassMap0(A.ConstantMap_ConstantMap$from(newMap, t2, t2))); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 253 + }; + A.legacyMapClass_closure4.prototype = { + call$3(thisArg, index, value) { + var key, t3, + t1 = J.getInterceptor$x(thisArg), + t2 = t1.get$dartValue(thisArg)._map0$_contents; + t2 = t2.get$keys(t2); + key = t2.elementAt$1(t2, index); + t2 = type$.Value_2; + t3 = A.LinkedHashMap_LinkedHashMap$of(t1.get$dartValue(thisArg)._map0$_contents, t2, t2); + t3.$indexSet(0, key, A.unwrapValue(value)); + t1.set$dartValue(thisArg, new A.SassMap0(A.ConstantMap_ConstantMap$from(t3, t2, t2))); + }, + "call*": "call$3", + $requiredArgCount: 3, + $signature: 253 + }; + A.SassMap0.prototype = { + get$separator(_) { + var t1 = this._map0$_contents; + return t1.get$isEmpty(t1) ? B.ListSeparator_undecided_null_3_undecided0 : B.ListSeparator_z0K0; + }, + get$asList() { + var t3, t4, t5, result, + t1 = type$.JSArray_Value_2, + t2 = A._setArrayType([], t1); + for (t3 = type$.Value_2, t4 = A.MapExtensions_get_pairs0(this._map0$_contents, t3, t3), t4 = t4.get$iterator(t4); t4.moveNext$0();) { + t5 = t4.get$current(t4); + result = A.List_List$from(A._setArrayType([t5._0, t5._1], t1), false, t3); + result.$flags = 3; + t2.push(new A.SassList0(result, B.ListSeparator_SrV0, false)); + } + return t2; + }, + get$lengthAsList() { + var t1 = this._map0$_contents; + return t1.get$length(t1); + }, + accept$1$1(visitor) { + return visitor.visitMap$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMap$1($name) { + return this; + }, + tryMap$0() { + return this; + }, + $eq(_, other) { + var t1; + if (other == null) + return false; + if (!(other instanceof A.SassMap0 && B.C_MapEquality.equals$2(0, other._map0$_contents, this._map0$_contents))) { + t1 = this._map0$_contents; + t1 = t1.get$isEmpty(t1) && other instanceof A.SassList0 && other._list1$_contents.length === 0; + } else + t1 = true; + return t1; + }, + get$hashCode(_) { + var t1 = this._map0$_contents; + return t1.get$isEmpty(t1) ? B.C_ListEquality0.hash$1(B.List_empty23) : B.C_MapEquality.hash$1(t1); + } + }; + A.global_closure43.prototype = { + call$1($arguments) { + var t1, + number = J.$index$asx($arguments, 0).assertNumber$1("number"); + if (number.hasUnit$1("%")) + A.warnForDeprecation0(string$.Passinp + number.toString$0(0) + ")\nTo emit a CSS abs() now: abs(#{" + number.toString$0(0) + string$.x7dx29_Mor, B.Deprecation_w3M); + else + A.warnForDeprecation0(string$.Globalm, B.Deprecation_SGB); + t1 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(Math.abs(number._number1$_value), number.get$denominatorUnits(number), t1); + }, + $signature: 25 + }; + A.module_closure26.prototype = { + call$1(value) { + return Math.abs(value); + }, + $signature: 12 + }; + A._ceil_closure0.prototype = { + call$1(value) { + return B.JSNumber_methods.ceil$0(value); + }, + $signature: 12 + }; + A._clamp_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + min = t1.$index($arguments, 0).assertNumber$1("min"), + number = t1.$index($arguments, 1).assertNumber$1("number"), + max = t1.$index($arguments, 2).assertNumber$1("max"); + number.convertValueToMatch$3(min, "number", "min"); + max.convertValueToMatch$3(min, "max", "min"); + if (min.greaterThanOrEquals$1(max).value) + return min; + if (min.greaterThanOrEquals$1(number).value) + return min; + if (number.greaterThanOrEquals$1(max).value) + return max; + return number; + }, + $signature: 25 + }; + A._floor_closure0.prototype = { + call$1(value) { + return B.JSNumber_methods.floor$0(value); + }, + $signature: 12 + }; + A._max_closure0.prototype = { + call$1($arguments) { + var t1, t2, max, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, max = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (max == null || max.lessThan$1(number).value) + max = number; + } + if (max != null) + return max; + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + }, + $signature: 25 + }; + A._min_closure0.prototype = { + call$1($arguments) { + var t1, t2, min, _i, number; + for (t1 = J.$index$asx($arguments, 0).get$asList(), t2 = t1.length, min = null, _i = 0; _i < t1.length; t1.length === t2 || (0, A.throwConcurrentModificationError)(t1), ++_i) { + number = t1[_i].assertNumber$0(); + if (min == null || min.greaterThan$1(number).value) + min = number; + } + if (min != null) + return min; + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + }, + $signature: 25 + }; + A._round_closure0.prototype = { + call$1(number) { + return B.JSNumber_methods.round$0(number); + }, + $signature: 12 + }; + A._hypot_closure0.prototype = { + call$1($arguments) { + var subtotal, i, i0, t3, + t1 = J.$index$asx($arguments, 0).get$asList(), + t2 = A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SassNumber0>"), + numbers = A.List_List$_of(new A.MappedListIterable(t1, new A._hypot__closure0(), t2), t2._eval$1("ListIterable.E")); + if (numbers.length === 0) + throw A.wrapException(A.SassScriptException$0("At least one argument must be passed.", null)); + for (subtotal = 0, i = 0; i < numbers.length; i = i0) { + i0 = i + 1; + subtotal += Math.pow(numbers[i].convertValueToMatch$3(numbers[0], "numbers[" + i0 + "]", "numbers[1]"), 2); + } + t1 = Math.sqrt(subtotal); + t2 = numbers[0]; + t2 = t2.get$numeratorUnits(t2); + t3 = numbers[0]; + return A.SassNumber_SassNumber$withUnits0(t1, t3.get$denominatorUnits(t3), t2); + }, + $signature: 25 + }; + A._hypot__closure0.prototype = { + call$1(argument) { + return argument.assertNumber$0(); + }, + $signature: 534 + }; + A._log_closure0.prototype = { + call$1($arguments) { + var base, + _s18_ = " to have no units.", + _null = null, + t1 = J.getInterceptor$asx($arguments), + number = t1.$index($arguments, 0).assertNumber$1("number"); + if (number.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$number: Expected " + number.toString$0(0) + _s18_, _null)); + else if (t1.$index($arguments, 1).$eq(0, B.C__SassNull0)) + return A.SassNumber_SassNumber0(Math.log(number._number1$_value), _null); + base = t1.$index($arguments, 1).assertNumber$1("base"); + if (base.get$hasUnits()) + throw A.wrapException(A.SassScriptException$0("$base: Expected " + base.toString$0(0) + _s18_, _null)); + else + return A.SassNumber_SassNumber0(Math.log(number._number1$_value) / Math.log(base._number1$_value), _null); + }, + $signature: 25 + }; + A._pow_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return A.pow1(t1.$index($arguments, 0).assertNumber$1("base"), t1.$index($arguments, 1).assertNumber$1("exponent")); + }, + $signature: 25 + }; + A._atan2_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + y = t1.$index($arguments, 0).assertNumber$1("y"); + return A.SassNumber_SassNumber$withUnits0(Math.atan2(y._number1$_value, t1.$index($arguments, 1).assertNumber$1("x").convertValueToMatch$3(y, "x", "y")) * 57.29577951308232, null, A._setArrayType(["deg"], type$.JSArray_String)); + }, + $signature: 25 + }; + A._compatible_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments); + return t1.$index($arguments, 0).assertNumber$1("number1").isComparableTo$1(t1.$index($arguments, 1).assertNumber$1("number2")) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._isUnitless_closure0.prototype = { + call$1($arguments) { + return !J.$index$asx($arguments, 0).assertNumber$1("number").get$hasUnits() ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._unit_closure0.prototype = { + call$1($arguments) { + return new A.SassString0(J.$index$asx($arguments, 0).assertNumber$1("number").get$unitString(), true); + }, + $signature: 18 + }; + A._percentage_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"); + number.assertNoUnits$1("number"); + return A.SassNumber_SassNumber0(number._number1$_value * 100, "%"); + }, + $signature: 25 + }; + A._randomFunction_closure0.prototype = { + call$1($arguments) { + var limit, limitScalar, + t1 = J.getInterceptor$asx($arguments); + if (t1.$index($arguments, 0).$eq(0, B.C__SassNull0)) + return A.SassNumber_SassNumber0($.$get$_random2().nextDouble$0(), null); + limit = t1.$index($arguments, 0).assertNumber$1("limit"); + if (limit.get$hasUnits()) + A.warnForDeprecation0(string$.math_r + limit.toString$0(0) + string$.x29x20in_a + limit.get$unitString() + ")) * 1" + limit.get$unitString() + string$.x0a_To_p + limit.get$unitString() + string$.x29x29__Mo, B.Deprecation_PHd); + limitScalar = limit.assertInt$1("limit"); + if (limitScalar < 1) + throw A.wrapException(A.SassScriptException$0("$limit: Must be greater than 0, was " + limit.toString$0(0) + ".", null)); + return A.SassNumber_SassNumber0($.$get$_random2().nextInt$1(limitScalar) + 1, null); + }, + $signature: 25 + }; + A._div_closure0.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + number1 = t1.$index($arguments, 0), + number2 = t1.$index($arguments, 1); + if (!(number1 instanceof A.SassNumber0) || !(number2 instanceof A.SassNumber0)) + A.warn0(string$.math_d); + return number1.dividedBy$1(number2); + }, + $signature: 3 + }; + A._singleArgumentMathFunc_closure0.prototype = { + call$1($arguments) { + return this.mathFunc.call$1(J.$index$asx($arguments, 0).assertNumber$1("number")); + }, + $signature: 25 + }; + A._numberFunction_closure0.prototype = { + call$1($arguments) { + var number = J.$index$asx($arguments, 0).assertNumber$1("number"), + t1 = this.transform.call$1(number._number1$_value), + t2 = number.get$numeratorUnits(number); + return A.SassNumber_SassNumber$withUnits0(t1, number.get$denominatorUnits(number), t2); + }, + $signature: 25 + }; + A.CssMediaQuery0.prototype = { + merge$1(other) { + var t1, ourModifier, t2, t3, ourType, t4, theirModifier, t5, t6, theirType, t7, t8, negativeConditions, conditions, type, modifier, fewerConditions, fewerConditions0, moreConditions, _this = this, _null = null, _s3_ = "all"; + if (!_this.conjunction || !other.conjunction) + return B._SingletonCssMediaQueryMergeResult_10; + t1 = _this.modifier; + ourModifier = t1 == null ? _null : t1.toLowerCase(); + t2 = _this.type; + t3 = t2 == null; + ourType = t3 ? _null : t2.toLowerCase(); + t4 = other.modifier; + theirModifier = t4 == null ? _null : t4.toLowerCase(); + t5 = other.type; + t6 = t5 == null; + theirType = t6 ? _null : t5.toLowerCase(); + t7 = ourType == null; + if (t7 && theirType == null) { + t1 = A.List_List$_of(_this.conditions, type$.String); + B.JSArray_methods.addAll$1(t1, other.conditions); + return new A.MediaQuerySuccessfulMergeResult0(A.CssMediaQuery$condition0(t1, true)); + } + t8 = ourModifier === "not"; + if (t8 !== (theirModifier === "not")) { + if (ourType == theirType) { + negativeConditions = t8 ? _this.conditions : other.conditions; + if (B.JSArray_methods.every$1(negativeConditions, B.JSArray_methods.get$contains(t8 ? other.conditions : _this.conditions))) + return B._SingletonCssMediaQueryMergeResult_00; + else + return B._SingletonCssMediaQueryMergeResult_10; + } else if (t3 || A.equalsIgnoreCase0(t2, _s3_) || t6 || A.equalsIgnoreCase0(t5, _s3_)) + return B._SingletonCssMediaQueryMergeResult_10; + if (t8) { + conditions = other.conditions; + type = theirType; + modifier = theirModifier; + } else { + conditions = _this.conditions; + type = ourType; + modifier = ourModifier; + } + } else if (t8) { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_10; + fewerConditions = _this.conditions; + fewerConditions0 = other.conditions; + t3 = fewerConditions.length > fewerConditions0.length; + moreConditions = t3 ? fewerConditions : fewerConditions0; + if (t3) + fewerConditions = fewerConditions0; + if (!B.JSArray_methods.every$1(fewerConditions, B.JSArray_methods.get$contains(moreConditions))) + return B._SingletonCssMediaQueryMergeResult_10; + conditions = moreConditions; + type = ourType; + modifier = ourModifier; + } else if (t3 || A.equalsIgnoreCase0(t2, _s3_)) { + type = (t6 || A.equalsIgnoreCase0(t5, _s3_)) && t7 ? _null : theirType; + t3 = A.List_List$_of(_this.conditions, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = theirModifier; + } else { + if (t6 || A.equalsIgnoreCase0(t5, _s3_)) { + t3 = A.List_List$_of(_this.conditions, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + conditions = t3; + modifier = ourModifier; + } else { + if (ourType != theirType) + return B._SingletonCssMediaQueryMergeResult_00; + else { + modifier = ourModifier == null ? theirModifier : ourModifier; + t3 = A.List_List$_of(_this.conditions, type$.String); + B.JSArray_methods.addAll$1(t3, other.conditions); + } + conditions = t3; + } + type = ourType; + } + t2 = type == ourType ? t2 : t5; + return new A.MediaQuerySuccessfulMergeResult0(A.CssMediaQuery$type0(t2, conditions, modifier == ourModifier ? t1 : t4)); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.CssMediaQuery0 && other.modifier == this.modifier && other.type == this.type && B.C_ListEquality.equals$2(0, other.conditions, this.conditions); + }, + get$hashCode(_) { + return J.get$hashCode$(this.modifier) ^ J.get$hashCode$(this.type) ^ B.C_ListEquality0.hash$1(this.conditions); + }, + toString$0(_) { + var t2, _this = this, + t1 = _this.modifier; + t1 = t1 != null ? t1 + " " : ""; + t2 = _this.type; + if (t2 != null) { + t1 += t2; + if (_this.conditions.length !== 0) + t1 += " and "; + } + t2 = _this.conjunction ? " and " : " or "; + t2 = t1 + B.JSArray_methods.join$1(_this.conditions, t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }; + A._SingletonCssMediaQueryMergeResult0.prototype = { + _enumToString$0() { + return "_SingletonCssMediaQueryMergeResult." + this._name; + } + }; + A.MediaQuerySuccessfulMergeResult0.prototype = { + toString$0(_) { + return this.query.toString$0(0); + } + }; + A.MediaQueryParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.MediaQueryParser_parse_closure0(this)); + }, + _media_query$_mediaQuery$0() { + var conditions, conjunction, t1, identifier1, identifier2, type, modifier, _this = this, _null = null, _s3_ = "and"; + if (_this.scanner.peekChar$0() === 40) { + conditions = A._setArrayType([_this._media_query$_mediaInParens$0()], type$.JSArray_String); + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._media_query$_mediaLogicSequence$1(_s3_)); + conjunction = true; + } else { + t1 = _this.scanIdentifier$1("or"); + if (t1) { + _this.expectWhitespace$0(); + B.JSArray_methods.addAll$1(conditions, _this._media_query$_mediaLogicSequence$1("or")); + } + conjunction = !t1; + } + return A.CssMediaQuery$condition0(conditions, conjunction); + } + identifier1 = _this.identifier$0(); + if (A.equalsIgnoreCase0(identifier1, "not")) { + _this.expectWhitespace$0(); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$condition0(A._setArrayType(["(not " + _this._media_query$_mediaInParens$0() + ")"], type$.JSArray_String), _null); + } + _this.whitespace$1$consumeNewlines(true); + if (!_this.lookingAtIdentifier$0()) + return A.CssMediaQuery$type0(identifier1, _null, _null); + identifier2 = _this.identifier$0(); + if (A.equalsIgnoreCase0(identifier2, _s3_)) { + _this.expectWhitespace$0(); + type = identifier1; + modifier = _null; + } else { + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1(_s3_)) + _this.expectWhitespace$0(); + else + return A.CssMediaQuery$type0(identifier2, _null, identifier1); + type = identifier2; + modifier = identifier1; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + return A.CssMediaQuery$type0(type, A._setArrayType(["(not " + _this._media_query$_mediaInParens$0() + ")"], type$.JSArray_String), modifier); + } + return A.CssMediaQuery$type0(type, _this._media_query$_mediaLogicSequence$1(_s3_), modifier); + }, + _media_query$_mediaLogicSequence$1(operator) { + var t1, t2, _this = this, + result = A._setArrayType([], type$.JSArray_String); + for (t1 = _this.scanner;;) { + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = _this.declarationValue$0(); + t1.expectChar$1(41); + result.push("(" + t2 + ")"); + _this.whitespace$1$consumeNewlines(true); + if (!_this.scanIdentifier$1(operator)) + return result; + _this.expectWhitespace$0(); + } + }, + _media_query$_mediaInParens$0() { + var t2, + t1 = this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = this.declarationValue$0(); + t1.expectChar$1(41); + return "(" + t2 + ")"; + } + }; + A.MediaQueryParser_parse_closure0.prototype = { + call$0() { + var queries = A._setArrayType([], type$.JSArray_CssMediaQuery_2), + t1 = this.$this, + t2 = t1.scanner; + do { + t1.whitespace$1$consumeNewlines(true); + queries.push(t1._media_query$_mediaQuery$0()); + t1.whitespace$1$consumeNewlines(true); + } while (t2.scanChar$1(44)); + t2.expectDone$0(); + return queries; + }, + $signature: 535 + }; + A.ModifiableCssMediaRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssMediaRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssMediaRule0 && B.C_ListEquality.equals$2(0, this.queries, other.queries); + }, + copyWithoutChildren$0() { + return A.ModifiableCssMediaRule$0(this.queries, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.MediaRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitMediaRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@media " + this.query.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.MergedExtension0.prototype = { + unmerge$0() { + return new A._SyncStarIterable(this.unmerge$body$MergedExtension0(), type$._SyncStarIterable_Extension_2); + }, + unmerge$body$MergedExtension0() { + var $async$self = this; + return function() { + var $async$goto = 0, $async$handler = 1, $async$errorStack = [], right, left; + return function $async$unmerge$0($async$iterator, $async$errorCode, $async$result) { + if ($async$errorCode === 1) { + $async$errorStack.push($async$result); + $async$goto = $async$handler; + } + for (;;) + switch ($async$goto) { + case 0: + // Function start + left = $async$self.left; + $async$goto = left instanceof A.MergedExtension0 ? 2 : 4; + break; + case 2: + // then + $async$goto = 5; + return $async$iterator._yieldStar$1(left.unmerge$0()); + case 5: + // after yield + // goto join + $async$goto = 3; + break; + case 4: + // else + $async$goto = 6; + return $async$iterator._async$_current = left, 1; + case 6: + // after yield + case 3: + // join + right = $async$self.right; + $async$goto = right instanceof A.MergedExtension0 ? 7 : 9; + break; + case 7: + // then + $async$goto = 10; + return $async$iterator._yieldStar$1(right.unmerge$0()); + case 10: + // after yield + // goto join + $async$goto = 8; + break; + case 9: + // else + $async$goto = 11; + return $async$iterator._async$_current = right, 1; + case 11: + // after yield + case 8: + // join + // implicit return + return 0; + case 1: + // rethrow + return $async$iterator._datum = $async$errorStack.at(-1), 3; + } + }; + }; + } + }; + A.MergedMapView0.prototype = { + get$keys(_) { + var t1 = this._merged_map_view$_mapsByKey; + return new A.LinkedHashMapKeysIterable(t1, A._instanceType(t1)._eval$1("LinkedHashMapKeysIterable<1>")); + }, + get$length(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length; + }, + get$isEmpty(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length === 0; + }, + get$isNotEmpty(_) { + return this._merged_map_view$_mapsByKey.__js_helper$_length !== 0; + }, + MergedMapView$10(maps, $K, $V) { + var t1, t2, _i, map, t3, t4; + for (t1 = maps.length, t2 = this._merged_map_view$_mapsByKey, _i = 0; _i < maps.length; maps.length === t1 || (0, A.throwConcurrentModificationError)(maps), ++_i) { + map = maps[_i]; + if (map instanceof A.MergedMapView0) + for (t3 = map._merged_map_view$_mapsByKey, t3 = new A.LinkedHashMapValueIterator(t3, t3._modifications, t3._first); t3.moveNext$0();) { + t4 = t3.__js_helper$_current; + A.setAll0(t2, t4.get$keys(t4), t4); + } + else + A.setAll0(t2, map.get$keys(map), map); + } + }, + $index(_, key) { + var t1 = this._merged_map_view$_mapsByKey.$index(0, this.$ti._precomputed1._as(key)); + return t1 == null ? null : t1.$index(0, key); + }, + $indexSet(_, key, value) { + var _0_0 = this._merged_map_view$_mapsByKey.$index(0, key); + if (_0_0 != null) + _0_0.$indexSet(0, key, value); + else + throw A.wrapException(A.UnsupportedError$(string$.New_en)); + }, + remove$1(_, key) { + throw A.wrapException(A.UnsupportedError$(string$.Entrie)); + }, + containsKey$1(key) { + return this._merged_map_view$_mapsByKey.containsKey$1(key); + } + }; + A._shared_closure3.prototype = { + call$1($arguments) { + A.warnForDeprecation0(string$.The_fe, B.Deprecation_p2t); + return $._features0.contains$1(0, J.$index$asx($arguments, 0).assertString$1("feature")._string0$_text) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._shared_closure4.prototype = { + call$1($arguments) { + return new A.SassString0(A.serializeValue0(J.get$first$ax($arguments), true, true), false); + }, + $signature: 18 + }; + A._shared_closure5.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + _0_0 = t1.$index($arguments, 0); + $label0$0: { + if (_0_0 instanceof A.SassArgumentList0) { + t1 = "arglist"; + break $label0$0; + } + if (_0_0 instanceof A.SassBoolean0) { + t1 = "bool"; + break $label0$0; + } + if (_0_0 instanceof A.SassColor0) { + t1 = "color"; + break $label0$0; + } + if (_0_0 instanceof A.SassList0) { + t1 = "list"; + break $label0$0; + } + if (_0_0 instanceof A.SassMap0) { + t1 = "map"; + break $label0$0; + } + if (B.C__SassNull0 === _0_0) { + t1 = "null"; + break $label0$0; + } + if (_0_0 instanceof A.SassNumber0) { + t1 = "number"; + break $label0$0; + } + if (_0_0 instanceof A.SassFunction0) { + t1 = "function"; + break $label0$0; + } + if (_0_0 instanceof A.SassMixin0) { + t1 = "mixin"; + break $label0$0; + } + if (_0_0 instanceof A.SassCalculation0) { + t1 = "calculation"; + break $label0$0; + } + if (_0_0 instanceof A.SassString0) { + t1 = "string"; + break $label0$0; + } + t1 = A.throwExpression("[BUG] Unknown value type " + t1.$index($arguments, 0).toString$0(0)); + } + return new A.SassString0(t1, false); + }, + $signature: 18 + }; + A._shared_closure6.prototype = { + call$1($arguments) { + var t2, t3, t4, + t1 = J.getInterceptor$asx($arguments), + _1_0 = t1.$index($arguments, 0); + if (_1_0 instanceof A.SassArgumentList0) { + _1_0._argument_list$_wereKeywordsAccessed = true; + t1 = type$.Value_2; + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t3 = A.MapExtensions_get_pairs0(_1_0._argument_list$_keywords, type$.String, t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + t2.$indexSet(0, new A.SassString0(t4._0, false), t4._1); + } + return new A.SassMap0(A.ConstantMap_ConstantMap$from(t2, t1, t1)); + } else + throw A.wrapException("$args: " + t1.$index($arguments, 0).toString$0(0) + " is not an argument list."); + }, + $signature: 34 + }; + A.moduleFunctions_closure2.prototype = { + call$1($arguments) { + return new A.SassString0(J.$index$asx($arguments, 0).assertCalculation$1("calc").name, true); + }, + $signature: 18 + }; + A.moduleFunctions_closure3.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).assertCalculation$1("calc").$arguments; + return A.SassList$0(new A.MappedListIterable(t1, new A.moduleFunctions__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_z0K0, false); + }, + $signature: 27 + }; + A.moduleFunctions__closure0.prototype = { + call$1(argument) { + return argument instanceof A.Value0 ? argument : new A.SassString0(J.toString$0$(argument), false); + }, + $signature: 536 + }; + A.moduleFunctions_closure4.prototype = { + call$1($arguments) { + var _0_2_isSet, _0_2, acceptsContent, t1, _0_5_isSet, _0_5, hasContent, _null = null, + mixin = J.$index$asx($arguments, 0).assertMixin$1("mixin"), + _0_0 = mixin.callable; + $label0$0: { + _0_2_isSet = type$.AsyncBuiltInCallable_2._is(_0_0); + _0_2 = _null; + acceptsContent = _null; + if (_0_2_isSet) { + _0_2 = _0_0.get$acceptsContent(); + acceptsContent = _0_2; + } + if (!_0_2_isSet) { + _0_2_isSet = _0_0 instanceof A.BuiltInCallable0; + if (_0_2_isSet) + acceptsContent = _0_0.acceptsContent; + t1 = _0_2_isSet; + } else + t1 = true; + if (t1) { + t1 = acceptsContent; + break $label0$0; + } + _0_5_isSet = _0_0 instanceof A.UserDefinedCallable0; + _0_5 = _null; + if (_0_5_isSet) { + _0_5 = _0_0.declaration; + t1 = _0_5; + t1 = t1 instanceof A.MixinRule0; + } else + t1 = false; + if (t1) { + t1 = _0_5_isSet ? _0_5 : _0_0.declaration; + hasContent = type$.MixinRule_2._as(t1).get$hasContent(); + t1 = hasContent; + break $label0$0; + } + t1 = A.throwExpression(A.UnsupportedError$("Unknown callable type " + mixin.toString$0(0) + ".")); + } + return t1 ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A.mixinClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassMixin", new A.mixinClass__closure())); + A.JSClassExtension_injectSuperclass(t1._as(new A.SassMixin0(A.BuiltInCallable$function0("f", "", new A.mixinClass__closure0(), null), null).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.mixinClass__closure.prototype = { + call$1($self) { + A.jsThrow(new self.Error("It is not possible to construct a SassMixin through the JavaScript API")); + }, + $signature: 537 + }; + A.mixinClass__closure0.prototype = { + call$1(_) { + return B.C__SassNull0; + }, + $signature: 3 + }; + A.SassMixin0.prototype = { + accept$1$1(visitor) { + var t1, t2; + if (!visitor._serialize0$_inspect) + A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = visitor._serialize0$_buffer; + t1.write$1(0, "get-mixin("); + t2 = this.callable; + visitor._serialize0$_visitQuotedString$1(t2.get$name(t2)); + t1.writeCharCode$1(41); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertMixin$1($name) { + return this; + }, + assertCompileContext$1(compileContext) { + var t1 = this._mixin0$_compileContext; + if (t1 != null) + t1 = t1 !== compileContext; + else + t1 = false; + if (t1) + throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + " does not belong to current compilation.", null)); + return this; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassMixin0 && this.callable.$eq(0, other.callable); + }, + get$hashCode(_) { + var t1 = this.callable; + return t1.get$hashCode(t1); + } + }; + A.MixinRule0.prototype = { + get$hasContent() { + var result, _this = this, + value = _this._mixin_rule$__MixinRule_hasContent_FI; + if (value === $) { + result = J.$eq$(B.C__HasContentVisitor0.visitChildren$1(_this.children), true); + _this._mixin_rule$__MixinRule_hasContent_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._mixin_rule$__MixinRule_hasContent_FI = result; + value = result; + } + return value; + }, + accept$1$1(visitor) { + return visitor.visitMixinRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = "@mixin " + this.name, + t2 = this.parameters; + if (!(t2.parameters.length === 0 && t2.restParameter == null)) + t1 += "(" + t2.toString$0(0) + ")"; + t1 += " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + }; + A._HasContentVisitor0.prototype = { + visitContentRule$1(_, _0) { + return true; + }, + $isStatementVisitor: 1 + }; + A.__HasContentVisitor_Object_StatementSearchVisitor0.prototype = {}; + A.ExtendMode0.prototype = { + _enumToString$0() { + return "ExtendMode." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.JSModule0.prototype = {}; + A.JSModuleRequire0.prototype = {}; + A.MultiSpan0.prototype = { + get$start(_) { + var t1 = this._multi_span0$_primary; + return t1.get$start(t1); + }, + get$end(_) { + var t1 = this._multi_span0$_primary; + return t1.get$end(t1); + }, + get$text() { + return this._multi_span0$_primary.get$text(); + }, + get$context(_) { + var t1 = this._multi_span0$_primary; + return t1.get$context(t1); + }, + get$file(_) { + var t1 = this._multi_span0$_primary; + return t1.get$file(t1); + }, + get$length(_) { + var t1 = this._multi_span0$_primary; + return t1.get$length(t1); + }, + get$sourceUrl(_) { + var t1 = this._multi_span0$_primary; + return t1.get$sourceUrl(t1); + }, + compareTo$1(_, other) { + return this._multi_span0$_primary.compareTo$1(0, other); + }, + toString$0(_) { + return this._multi_span0$_primary.toString$0(0); + }, + expand$1(_, other) { + return new A.MultiSpan0(this._multi_span0$_primary.expand$1(0, other), this.primaryLabel, this.secondarySpans); + }, + highlight$1$color(color) { + return A.Highlighter$multiple(this._multi_span0$_primary, this.primaryLabel, this.secondarySpans, color === true, null, null).highlight$0(); + }, + message$2$color(_, message, color) { + var t1 = J.$eq$(color, true) || typeof color == "string", + t2 = typeof color == "string" ? color : null; + return A.SourceSpanExtension_messageMultiple(this._multi_span0$_primary, message, this.primaryLabel, this.secondarySpans, t1, t2, null); + }, + message$1(_, message) { + return this.message$2$color(0, message, null); + }, + $isComparable: 1, + $isFileSpan: 1, + $isSourceSpan: 1, + $isSourceSpanWithContext: 1 + }; + A.SupportsNegation0.prototype = { + toInterpolation$0() { + var t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + t3 = this.span, + t4 = this.condition, + t5 = A.SpanExtensions_before(t3, t4.get$span(t4)); + t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); + t1._contents += t5; + t2.addInterpolation$1(t4.toInterpolation$0()); + t4 = A.SpanExtensions_after(t3, t4.get$span(t4)); + t4 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4.file._decodedChars, t4._file$_start, t4._end), 0, null); + t1._contents += t4; + return t2.interpolation$1(t3); + }, + withSpan$1(span) { + return new A.SupportsNegation0(this.condition, span); + }, + toString$0(_) { + var t1 = this.condition; + if (t1 instanceof A.SupportsNegation0 || t1 instanceof A.SupportsOperation0) + return "not (" + t1.toString$0(0) + ")"; + else + return "not " + t1.toString$0(0); + }, + $isAstNode0: 1, + $isSassNode: 1, + $isSupportsCondition: 1, + get$span(receiver) { + return this.span; + } + }; + A.NoOpImporter0.prototype = { + canonicalize$1(_, url) { + return null; + }, + load$1(_, url) { + return null; + }, + toString$0(_) { + return "(unknown)"; + } + }; + A.NoSourceMapBuffer0.prototype = { + get$length(_) { + return this._no_source_map_buffer0$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + return callback.call$0(); + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + write$1(_, object) { + var t1 = this._no_source_map_buffer0$_buffer, + t2 = A.S(object); + t1._contents += t2; + return null; + }, + writeCharCode$1(charCode) { + var t1 = this._no_source_map_buffer0$_buffer, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + return null; + }, + toString$0(_) { + var t1 = this._no_source_map_buffer0$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + return A.throwExpression(A.UnsupportedError$(string$.NoSour)); + } + }; + A._FakeAstNode0.prototype = { + get$span(_) { + return this._node0$_callback.call$0(); + }, + $isAstNode0: 1 + }; + A.CssNode0.prototype = { + toString$0(_) { + var _null = null; + return A.serialize0(this, true, _null, true, _null, _null, false, _null, true)._0; + }, + $isAstNode0: 1 + }; + A.CssParentNode0.prototype = {}; + A._IsInvisibleVisitor1.prototype = { + visitCssAtRule$1(rule) { + return false; + }, + visitCssComment$1(comment) { + return this.includeComments && comment.text.charCodeAt(2) !== 33; + }, + visitCssStyleRule$1(rule) { + var t1 = rule._style_rule0$_selector._box0$_inner; + return (this.includeBogus ? t1.value.accept$1(B._IsInvisibleVisitor_true0) : t1.value.accept$1(B._IsInvisibleVisitor_false0)) || this.super$EveryCssVisitor$visitCssStyleRule0(rule); + } + }; + A.__IsInvisibleVisitor_Object_EveryCssVisitor0.prototype = {}; + A.ModifiableCssNode0.prototype = { + get$hasFollowingSibling() { + var t2, + t1 = this._node$_parent; + if (t1 == null) + t1 = null; + else { + t1 = t1.children; + t2 = this._node$_indexInParent; + t2.toString; + t1 = A.SubListIterable$(t1, t2 + 1, null, t1.$ti._eval$1("ListBase.E")).any$1(0, new A.ModifiableCssNode_hasFollowingSibling_closure0()); + } + return t1 === true; + }, + get$isGroupEnd() { + return this.isGroupEnd; + } + }; + A.ModifiableCssNode_hasFollowingSibling_closure0.prototype = { + call$1(sibling) { + return !sibling.accept$1(B._IsInvisibleVisitor_true_false0); + }, + $signature: 538 + }; + A.ModifiableCssParentNode0.prototype = { + get$isChildless() { + return false; + }, + addChild$1(child) { + var t1; + child._node$_parent = this; + t1 = this._node$_children; + child._node$_indexInParent = t1.length; + t1.push(child); + }, + clearChildren$0() { + var t1, t2, _i, child; + for (t1 = this._node$_children, t2 = t1.length, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + child._node$_indexInParent = child._node$_parent = null; + } + B.JSArray_methods.clear$0(t1); + }, + $isCssParentNode0: 1, + get$children(receiver) { + return this.children; + } + }; + A.NodePackageImporter0.prototype = { + isNonCanonicalScheme$1(scheme) { + return scheme === "pkg"; + }, + canonicalize$1(_, url) { + var packageName, jsonPath, jsonString, packageManifest, e, t1, t2, t3, t4, baseDirectory, parts, t5, $name, subpath, packageRoot, exception, _1_0, rootPath, subpathInRoot, _this = this, _null = null; + if (url.get$scheme() === "file") + return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, url); + if (url.get$scheme() !== "pkg") + return _null; + if (url.get$hasAuthority()) + throw A.wrapException(string$.A_pkg_h); + else { + t1 = $.$get$url(); + t2 = t1.style; + if (t2.rootLength$1(url.get$path(url)) > 0) + throw A.wrapException("A pkg: URL's path must not begin with /."); + else if (url.get$path(url).length === 0) + throw A.wrapException("A pkg: URL must not have an empty path."); + else if (url.get$hasQuery() || url.get$hasFragment()) + throw A.wrapException(string$.A_pkg_q); + } + t3 = A.canonicalizeContext0(); + t3._canonicalize_context$_wasContainingUrlAccessed = true; + t3 = t3._canonicalize_context$_containingUrl; + if ((t3 == null ? _null : t3.get$scheme()) === "file") { + t3 = A.canonicalizeContext0(); + t3._canonicalize_context$_wasContainingUrlAccessed = true; + t3 = t3._canonicalize_context$_containingUrl; + t3.toString; + t4 = $.$get$context(); + baseDirectory = t4.dirname$1(t4.style.pathFromUri$1(A._parseUri(t3))); + } else { + t3 = _this._node_package$__NodePackageImporter__entryPointDirectory_F; + t3 === $ && A.throwUnnamedLateFieldNI(); + baseDirectory = t3; + } + packageName = null; + parts = t1.split$1(0, url.get$path(url)); + t3 = B.JSArray_methods.removeAt$1(parts, 0); + t4 = $.$get$context(); + t5 = t4.style; + $name = t5.pathFromUri$1(A._parseUri(t3)); + if (B.JSString_methods.startsWith$1($name, "@")) + $name = parts.length !== 0 ? t1.join$2(0, $name, B.JSArray_methods.removeAt$1(parts, 0)) : $name; + subpath = parts.length !== 0 ? t5.pathFromUri$1(A._parseUri(t1.joinAll$1(parts))) : _null; + packageName = $name; + t1 = true; + if (!J.startsWith$1$s(packageName, ".")) + if (!J.contains$1$asx(packageName, "\\")) + if (!J.contains$1$asx(packageName, "%")) + t1 = J.startsWith$1$s(packageName, "@") && !J.contains$1$asx(packageName, t2.get$separator(t2)); + if (t1) + return _null; + packageRoot = _this._node_package$_resolvePackageRoot$2(packageName, baseDirectory); + if (packageRoot == null) + return _null; + jsonPath = A.join(packageRoot, "package.json", _null); + jsonString = A.readFile0(jsonPath); + packageManifest = null; + try { + packageManifest = type$.Map_String_dynamic._as(B.C_JsonCodec.decode$1(jsonString)); + } catch (exception) { + e = A.unwrapException(exception); + t1 = A.S(jsonPath); + t2 = A.S(packageName); + t3 = A.S(e); + throw A.wrapException("Failed to parse " + t1 + ' for "pkg:' + t2 + '": ' + t3); + } + _1_0 = _this._node_package$_resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName); + if (_1_0 != null) + if (B.Set_FTDN4.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, t5)._splitExtension$1(1)[1])) + return t4.toUri$1(t4.canonicalize$1(0, _1_0)); + else { + t1 = subpath == null ? "root" : subpath; + throw A.wrapException("The export for '" + t1 + "' in '" + A.S(packageName) + "' resolved to '" + _1_0 + string$.x27x2c_whi); + } + if (subpath == null) { + rootPath = _this._node_package$_resolvePackageRootValues$2(packageRoot, packageManifest); + return rootPath != null ? t4.toUri$1(t4.canonicalize$1(0, rootPath)) : _null; + } + subpathInRoot = A.join(packageRoot, subpath, _null); + return $.$get$FilesystemImporter_cwd0().canonicalize$1(0, t4.toUri$1(subpathInRoot)); + }, + load$1(_, url) { + return $.$get$FilesystemImporter_cwd0().load$1(0, url); + }, + _node_package$_resolvePackageRoot$2(packageName, baseDirectory) { + var potentialPackage, t1; + for (;;) { + potentialPackage = A.join(baseDirectory, "node_modules", packageName); + if (A.dirExists0(potentialPackage)) + return potentialPackage; + t1 = $.$get$context(); + if (t1.split$1(0, baseDirectory).length === 1) + return null; + baseDirectory = t1.dirname$1(baseDirectory); + } + }, + _node_package$_resolvePackageRootValues$2(packageRoot, packageManifest) { + var t1, sassValue, _1_0, styleValue, _null = null, + _0_0 = packageManifest.$index(0, "sass"); + if (typeof _0_0 == "string") { + t1 = B.Set_FTDN4.contains$1(0, A.ParsedPath_ParsedPath$parse(_0_0, $.$get$url().style)._splitExtension$1(1)[1]); + sassValue = _0_0; + } else { + sassValue = _null; + t1 = false; + } + if (t1) + return A.join(packageRoot, sassValue, _null); + else { + _1_0 = packageManifest.$index(0, "style"); + if (typeof _1_0 == "string") { + t1 = B.Set_FTDN4.contains$1(0, A.ParsedPath_ParsedPath$parse(_1_0, $.$get$url().style)._splitExtension$1(1)[1]); + styleValue = _1_0; + } else { + styleValue = _null; + t1 = false; + } + if (t1) + return A.join(packageRoot, styleValue, _null); + } + return A.resolveImportPath0(A.join(packageRoot, "index", _null)); + }, + _node_package$_resolvePackageExports$4(packageRoot, subpath, packageManifest, packageName) { + var _0_0, _1_0, _this = this, + exports = packageManifest.$index(0, "exports"); + if (exports == null) + return null; + _0_0 = _this._node_package$_nodePackageExportsResolve$5(packageRoot, _this._node_package$_exportsToCheck$1(subpath), exports, subpath, packageName); + if (_0_0 != null) + return _0_0; + if (subpath != null && A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1].length !== 0) + return null; + _1_0 = _this._node_package$_nodePackageExportsResolve$5(packageRoot, _this._node_package$_exportsToCheck$2$addIndex(subpath, true), exports, subpath, packageName); + if (_1_0 != null) + return _1_0; + return null; + }, + _node_package$_nodePackageExportsResolve$5(packageRoot, subpathVariants, exports, subpath, packageName) { + var t2, matches, _1_1, path, + t1 = false; + if (type$.Map_String_dynamic._is(exports)) { + t2 = exports.get$keys(exports); + if (t2.any$1(t2, new A.NodePackageImporter__nodePackageExportsResolve_closure3())) { + t1 = exports.get$keys(exports); + t1 = t1.any$1(t1, new A.NodePackageImporter__nodePackageExportsResolve_closure4()); + } + } + if (t1) { + t1 = exports.get$keys(exports); + throw A.wrapException("`exports` in " + packageName + string$.x20can_n + t1.map$1$1(t1, new A.NodePackageImporter__nodePackageExportsResolve_closure5(), type$.String).join$1(0, ",") + " in " + A.join(packageRoot, "package.json", null) + "."); + } + t1 = type$.NonNullsIterable_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(new A.NonNullsIterable(new A.MappedListIterable(subpathVariants, new A.NodePackageImporter__nodePackageExportsResolve_closure6(this, exports, packageRoot), A._arrayInstanceType(subpathVariants)._eval$1("MappedListIterable<1,String?>")), t1), t1._eval$1("Iterable.E")); + matches = A.List_List$_of(t1, A._instanceType(t1)._precomputed1); + $label0$1: { + _1_1 = matches.length; + if (_1_1 === 1) { + path = matches[0]; + t1 = path; + break $label0$1; + } + if (_1_1 <= 0) { + t1 = null; + break $label0$1; + } + t1 = subpath == null ? "root" : subpath; + t1 = A.throwExpression(string$.Unable + t1 + " in " + packageName + " should be used. \n\nFound:\n" + B.JSArray_methods.join$1(matches, "\n")); + } + return t1; + }, + _node_package$_compareExpansionKeys$2(keyA, keyB) { + var t1 = B.JSString_methods.contains$1(keyA, "*"), + baseLengthA = t1 ? B.JSString_methods.indexOf$1(keyA, "*") + 1 : keyA.length, + t2 = B.JSString_methods.contains$1(keyB, "*"), + baseLengthB = t2 ? B.JSString_methods.indexOf$1(keyB, "*") + 1 : keyB.length; + if (baseLengthA > baseLengthB) + return -1; + if (baseLengthB > baseLengthA) + return 1; + if (!t1) + return 1; + if (!t2) + return -1; + t1 = keyA.length; + t2 = keyB.length; + if (t1 > t2) + return -1; + if (t2 > t1) + return 1; + return 0; + }, + _node_package$_packageTargetResolve$4(subpath, exports, packageRoot, patternMatch) { + var t2, string, path, map, key, value, _1_0, array, _2_0, _null = null, + t1 = typeof exports == "string"; + if (t1) { + t2 = !B.JSString_methods.startsWith$1(exports, "./"); + string = exports; + } else { + string = _null; + t2 = false; + } + if (t2) + throw A.wrapException("Export '" + A.S(string) + string$.x27x20must + packageRoot + "'."); + if (t1) { + t2 = patternMatch != null; + string = exports; + } else { + string = _null; + t2 = false; + } + if (t2) { + t1 = J.replaceFirst$2$s(string, "*", patternMatch); + t2 = $.$get$context(); + path = t2.normalize$1(A.join(packageRoot, t2.style.pathFromUri$1(A._parseUri(t1)), _null)); + return A.fileExists0(path) ? path : _null; + } + string = t1 ? exports : _null; + if (t1) { + t1 = $.$get$context(); + string.toString; + return A.join(packageRoot, t1.style.pathFromUri$1(A._parseUri(string)), _null); + } + t1 = type$.Map_String_dynamic._is(exports); + map = t1 ? exports : _null; + if (t1) { + for (t1 = A.MapExtensions_get_pairs(map, type$.String, type$.dynamic), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + key = t2._0; + value = t2._1; + if (!B.Set_8229z.contains$1(0, key)) + continue; + if (value == null) + continue; + _1_0 = this._node_package$_packageTargetResolve$4(subpath, value, packageRoot, patternMatch); + if (_1_0 != null) + return _1_0; + } + return _null; + } + t1 = type$.List_dynamic._is(exports); + if (t1 && J.get$length$asx(exports) <= 0) + return _null; + array = t1 ? exports : _null; + if (t1) { + for (t1 = J.get$iterator$ax(array); t1.moveNext$0();) { + value = t1.get$current(t1); + if (value == null) + continue; + _2_0 = this._node_package$_packageTargetResolve$4(subpath, value, packageRoot, patternMatch); + if (_2_0 != null) + return _2_0; + } + return _null; + } + throw A.wrapException("Invalid 'exports' value " + A.S(exports) + " in " + A.join(packageRoot, "package.json", _null) + "."); + }, + _node_package$_packageTargetResolve$3(subpath, exports, packageRoot) { + return this._node_package$_packageTargetResolve$4(subpath, exports, packageRoot, null); + }, + _node_package$_getMainExport$1(exports) { + var t1, t2, t3, map, _0_4, t4, $export; + $label0$0: { + t1 = null; + if (typeof exports == "string") { + t1 = exports; + break $label0$0; + } + if (type$.List_String._is(exports)) { + t1 = exports; + break $label0$0; + } + t2 = type$.Map_String_dynamic._is(exports); + if (t2) { + t3 = exports.get$keys(exports); + t3 = !t3.any$1(t3, new A.NodePackageImporter__getMainExport_closure0()); + map = exports; + } else { + map = t1; + t3 = false; + } + if (t3) { + t1 = map; + break $label0$0; + } + t3 = false; + if (t2) { + _0_4 = exports.$index(0, "."); + if (_0_4 == null) + t4 = exports.containsKey$1("."); + else + t4 = true; + if (t4) + t3 = _0_4 != null; + } else + _0_4 = null; + if (t3) { + $export = t2 ? _0_4 : exports.$index(0, "."); + t1 = $export; + break $label0$0; + } + break $label0$0; + } + return t1; + }, + _node_package$_exportsToCheck$2$addIndex(subpath, addIndex) { + var basename, dirname, t3, t4, _i, path, + t1 = type$.JSArray_String, + paths = A._setArrayType([], t1), + t2 = subpath == null; + if (t2 && addIndex) + subpath = "index"; + else if (!t2 && addIndex) + subpath = A.join(subpath, "index", null); + if (subpath == null) + return A._setArrayType([null], type$.JSArray_nullable_String); + if (B.Set_FTDN4.contains$1(0, A.ParsedPath_ParsedPath$parse(subpath, $.$get$url().style)._splitExtension$1(1)[1])) + paths.push(subpath); + else + B.JSArray_methods.addAll$1(paths, A._setArrayType([subpath, subpath + ".scss", subpath + ".sass", subpath + ".css"], t1)); + t1 = $.$get$context(); + t2 = t1.style; + basename = A.ParsedPath_ParsedPath$parse(subpath, t2).get$basename(); + dirname = t1.dirname$1(subpath); + if (B.JSString_methods.startsWith$1(basename, "_")) + return paths; + t1 = A.List_List$_of(paths, type$.nullable_String); + for (t3 = paths.length, t4 = dirname === ".", _i = 0; _i < paths.length; paths.length === t3 || (0, A.throwConcurrentModificationError)(paths), ++_i) { + path = paths[_i]; + if (t4) + t1.push("_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename()); + else + t1.push(A.join(dirname, "_" + A.ParsedPath_ParsedPath$parse(path, t2).get$basename(), null)); + } + return t1; + }, + _node_package$_exportsToCheck$1(subpath) { + return this._node_package$_exportsToCheck$2$addIndex(subpath, false); + } + }; + A.NodePackageImporter__nodePackageExportsResolve_closure3.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 4 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure4.prototype = { + call$1(key) { + return !B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 4 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure5.prototype = { + call$1(key) { + return '"' + key + '"'; + }, + $signature: 6 + }; + A.NodePackageImporter__nodePackageExportsResolve_closure6.prototype = { + call$1(variant) { + var t1, t2, matchKey, t3, t4, t5, _i, expansionKey, _0_0, t6, patternBase, patternTrailer, t7, target, _this = this, _null = null; + if (variant == null) { + t1 = _this.$this; + return A.NullableExtension_andThen(t1._node_package$_getMainExport$1(_this.exports), new A.NodePackageImporter__nodePackageExportsResolve__closure1(t1, variant, _this.packageRoot)); + } else { + t1 = _this.exports; + if (type$.Map_String_dynamic._is(t1)) { + t2 = t1.get$keys(t1); + t2 = t2.every$1(t2, new A.NodePackageImporter__nodePackageExportsResolve__closure2()); + } else + t2 = true; + if (t2) + return _null; + } + matchKey = "./" + $.$get$context().toUri$1(variant).toString$0(0); + if (t1.containsKey$1(matchKey) && t1.$index(0, matchKey) != null && !B.JSString_methods.contains$1(matchKey, "*")) { + t1 = t1.$index(0, matchKey); + if (t1 == null) + t1 = A._asObject(t1); + return _this.$this._node_package$_packageTargetResolve$3(matchKey, t1, _this.packageRoot); + } + t2 = A._setArrayType([], type$.JSArray_String); + for (t3 = t1.get$keys(t1), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t4 = t3.get$current(t3); + if (B.JSString_methods.allMatches$1("*", t4).get$length(0) === 1) + t2.push(t4); + } + t3 = _this.$this; + B.JSArray_methods.sort$1(t2, t3.get$_node_package$_compareExpansionKeys()); + for (t4 = t2.length, t5 = matchKey.length, _i = 0; _i < t2.length; t2.length === t4 || (0, A.throwConcurrentModificationError)(t2), ++_i) { + expansionKey = t2[_i]; + _0_0 = expansionKey.split("*"); + t6 = _0_0.length === 2; + if (t6) { + patternBase = _0_0[0]; + patternTrailer = _0_0[1]; + } else { + patternTrailer = _null; + patternBase = patternTrailer; + } + if (!t6) + throw A.wrapException(A.StateError$("Pattern matching error")); + if (!B.JSString_methods.startsWith$1(matchKey, patternBase)) + continue; + if (matchKey === patternBase) + continue; + t6 = patternTrailer.length; + if (t6 !== 0) + t7 = B.JSString_methods.endsWith$1(matchKey, patternTrailer) && t5 >= expansionKey.length; + else + t7 = true; + if (t7) { + target = t1.$index(0, expansionKey); + if (target == null) + continue; + return t3._node_package$_packageTargetResolve$4(variant, target, _this.packageRoot, B.JSString_methods.substring$2(matchKey, patternBase.length, t5 - t6)); + } + } + return _null; + }, + $signature: 146 + }; + A.NodePackageImporter__nodePackageExportsResolve__closure1.prototype = { + call$1(mainExport) { + return this.$this._node_package$_packageTargetResolve$3(this.variant, mainExport, this.packageRoot); + }, + $signature: 147 + }; + A.NodePackageImporter__nodePackageExportsResolve__closure2.prototype = { + call$1(key) { + return !B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 4 + }; + A.NodePackageImporter__getMainExport_closure0.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, "."); + }, + $signature: 4 + }; + A.NullExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitNullExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "null"; + }, + get$span(receiver) { + return this.span; + } + }; + A.legacyNullClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.types.Null", new A.legacyNullClass__closure())); + jsClass.NULL = B.C__SassNull0; + A.JSClassExtension_injectSuperclass(t1._as(B.C__SassNull0.constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.legacyNullClass__closure.prototype = { + call$2(_, __) { + throw A.wrapException("new sass.types.Null() isn't allowed. Use sass.types.Null.NULL instead."); + }, + call$1(_) { + return this.call$2(_, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 224 + }; + A._SassNull0.prototype = { + get$isTruthy() { + return false; + }, + get$isBlank() { + return true; + }, + get$realNull() { + return null; + }, + accept$1$1(visitor) { + if (visitor._serialize0$_inspect) + visitor._serialize0$_buffer.write$1(0, "null"); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unaryNot$0() { + return B.SassBoolean_true0; + } + }; + A.NumberExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitNumberExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return A.serializeValue0(A.SassNumber_SassNumber0(this.value, this.unit), true, true); + }, + get$span(receiver) { + return this.span; + } + }; + A.numberClass_closure.prototype = { + call$0() { + var t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassNumber", new A.numberClass__closure())), + t2 = type$.String, + t3 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["value", new A.numberClass__closure0(), "isInt", new A.numberClass__closure1(), "asInt", new A.numberClass__closure2(), "numeratorUnits", new A.numberClass__closure3(), "denominatorUnits", new A.numberClass__closure4(), "hasUnits", new A.numberClass__closure5()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["assertInt", new A.numberClass__closure6(), "assertInRange", new A.numberClass__closure7(), "assertNoUnits", new A.numberClass__closure8(), "assertUnit", new A.numberClass__closure9(), "hasUnit", new A.numberClass__closure10(), "compatibleWithUnit", new A.numberClass__closure11(), "convert", new A.numberClass__closure12(), "convertToMatch", new A.numberClass__closure13(), "convertValue", new A.numberClass__closure14(), "convertValueToMatch", new A.numberClass__closure15(), "coerce", new A.numberClass__closure16(), "coerceToMatch", new A.numberClass__closure17(), "coerceValue", new A.numberClass__closure18(), "coerceValueToMatch", new A.numberClass__closure19()], t2, t3).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + A.JSClassExtension_injectSuperclass(t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(A.SassNumber_SassNumber0(0, null).constructor))).constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.numberClass__closure.prototype = { + call$3($self, value, unitOrOptions) { + var t1, t2, _null = null; + if (typeof unitOrOptions == "string") + return A.SassNumber_SassNumber0(value, unitOrOptions); + type$.nullable__ConstructorOptions_2._as(unitOrOptions); + t1 = unitOrOptions == null; + if (t1) + t2 = _null; + else { + t2 = A.NullableExtension_andThen0(J.get$numeratorUnits$x(unitOrOptions), A.immutable__jsToDartList$closure()); + t2 = t2 == null ? _null : J.cast$1$0$ax(t2, type$.String); + } + if (t1) + t1 = _null; + else { + t1 = A.NullableExtension_andThen0(J.get$denominatorUnits$x(unitOrOptions), A.immutable__jsToDartList$closure()); + t1 = t1 == null ? _null : J.cast$1$0$ax(t1, type$.String); + } + return A.SassNumber_SassNumber$withUnits0(value, t1, t2); + }, + call$2($self, value) { + return this.call$3($self, value, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 539 + }; + A.numberClass__closure0.prototype = { + call$1($self) { + return $self._number1$_value; + }, + $signature: 100 + }; + A.numberClass__closure1.prototype = { + call$1($self) { + return A.fuzzyIsInt0($self._number1$_value); + }, + $signature: 254 + }; + A.numberClass__closure2.prototype = { + call$1($self) { + return A.fuzzyAsInt0($self._number1$_value); + }, + $signature: 541 + }; + A.numberClass__closure3.prototype = { + call$1($self) { + return new self.immutable.List($self.get$numeratorUnits($self)); + }, + $signature: 255 + }; + A.numberClass__closure4.prototype = { + call$1($self) { + return new self.immutable.List($self.get$denominatorUnits($self)); + }, + $signature: 255 + }; + A.numberClass__closure5.prototype = { + call$1($self) { + return $self.get$hasUnits(); + }, + $signature: 254 + }; + A.numberClass__closure6.prototype = { + call$2($self, $name) { + return $self.assertInt$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 543 + }; + A.numberClass__closure7.prototype = { + call$4($self, min, max, $name) { + return $self.valueInRange$3(min, max, $name); + }, + call$3($self, min, max) { + return this.call$4($self, min, max, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 544 + }; + A.numberClass__closure8.prototype = { + call$2($self, $name) { + $self.assertNoUnits$1($name); + return $self; + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 545 + }; + A.numberClass__closure9.prototype = { + call$3($self, unit, $name) { + $self.assertUnit$2(unit, $name); + return $self; + }, + call$2($self, unit) { + return this.call$3($self, unit, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 546 + }; + A.numberClass__closure10.prototype = { + call$2($self, unit) { + return $self.hasUnit$1(unit); + }, + $signature: 256 + }; + A.numberClass__closure11.prototype = { + call$2($self, unit) { + return $self.get$hasUnits() && $self.compatibleWithUnit$1(unit); + }, + $signature: 256 + }; + A.numberClass__closure12.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + t2 = J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2); + return A.SassNumber_SassNumber$withUnits0($self._number1$_coerceOrConvertValue$4$coerceUnitless$name(t1, t2, false, $name), t2, t1); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 257 + }; + A.numberClass__closure13.prototype = { + call$4($self, other, $name, otherName) { + return $self.convertToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 258 + }; + A.numberClass__closure14.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self._number1$_coerceOrConvertValue$4$coerceUnitless$name(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), false, $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 259 + }; + A.numberClass__closure15.prototype = { + call$4($self, other, $name, otherName) { + return $self.convertValueToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 260 + }; + A.numberClass__closure16.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self.coerce$3(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 257 + }; + A.numberClass__closure17.prototype = { + call$4($self, other, $name, otherName) { + return $self.coerceToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 258 + }; + A.numberClass__closure18.prototype = { + call$4($self, numeratorUnits, denominatorUnits, $name) { + var t1 = self.immutable.isOrderedMap(numeratorUnits) ? J.toArray$0$x(type$.ImmutableList._as(numeratorUnits)) : type$.List_dynamic._as(numeratorUnits), + t2 = type$.String; + t1 = J.cast$1$0$ax(t1, t2); + return $self.coerceValue$3(t1, J.cast$1$0$ax(self.immutable.isOrderedMap(denominatorUnits) ? J.toArray$0$x(type$.ImmutableList._as(denominatorUnits)) : type$.List_dynamic._as(denominatorUnits), t2), $name); + }, + call$3($self, numeratorUnits, denominatorUnits) { + return this.call$4($self, numeratorUnits, denominatorUnits, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 259 + }; + A.numberClass__closure19.prototype = { + call$4($self, other, $name, otherName) { + return $self.coerceValueToMatch$3(other, $name, otherName); + }, + call$2($self, other) { + return this.call$4($self, other, null, null); + }, + call$3($self, other, $name) { + return this.call$4($self, other, $name, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 260 + }; + A._ConstructorOptions0.prototype = {}; + A._NodeSassNumber.prototype = {}; + A.legacyNumberClass_closure.prototype = { + call$4(thisArg, value, unit, dartValue) { + var t1; + if (dartValue == null) { + value.toString; + t1 = A._parseNumber(value, unit); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, value) { + return this.call$4(thisArg, value, null, null); + }, + call$3(thisArg, value, unit) { + return this.call$4(thisArg, value, unit, null); + }, + "call*": "call$4", + $requiredArgCount: 2, + $defaultValues() { + return [null, null]; + }, + $signature: 552 + }; + A.legacyNumberClass_closure0.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._number1$_value; + }, + $signature: 553 + }; + A.legacyNumberClass_closure1.prototype = { + call$2(thisArg, value) { + var t1 = J.getInterceptor$x(thisArg), + t2 = J.get$numeratorUnits$x(t1.get$dartValue(thisArg)); + t1.set$dartValue(thisArg, A.SassNumber_SassNumber$withUnits0(value, J.get$denominatorUnits$x(t1.get$dartValue(thisArg)), t2)); + }, + $signature: 554 + }; + A.legacyNumberClass_closure2.prototype = { + call$1(thisArg) { + var t1 = J.getInterceptor$x(thisArg), + t2 = B.JSArray_methods.join$1(J.get$numeratorUnits$x(t1.get$dartValue(thisArg)), "*"), + t3 = J.get$denominatorUnits$x(t1.get$dartValue(thisArg)).length === 0 ? "" : "/"; + return t2 + t3 + B.JSArray_methods.join$1(J.get$denominatorUnits$x(t1.get$dartValue(thisArg)), "*"); + }, + $signature: 555 + }; + A.legacyNumberClass_closure3.prototype = { + call$2(thisArg, unit) { + var t1 = J.getInterceptor$x(thisArg); + t1.set$dartValue(thisArg, A._parseNumber(t1.get$dartValue(thisArg)._number1$_value, unit)); + }, + $signature: 556 + }; + A._parseNumber_closure.prototype = { + call$1(unit) { + return unit.length === 0; + }, + $signature: 4 + }; + A._parseNumber_closure0.prototype = { + call$1(unit) { + return unit.length === 0; + }, + $signature: 4 + }; + A.SassNumber0.prototype = { + get$unitString() { + var _this = this; + return _this.get$hasUnits() ? _this._number1$_unitString$2(_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this)) : ""; + }, + accept$1$1(visitor) { + return visitor.visitNumber$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + withoutSlash$0() { + var _this = this; + return _this.asSlash == null ? _this : _this.withValue$1(_this._number1$_value); + }, + assertNumber$1($name) { + return this; + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertInt$1($name) { + var _0_0 = A.fuzzyAsInt0(this._number1$_value); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + " is not an int.", $name)); + }, + assertInt$0() { + return this.assertInt$1(null); + }, + valueInRange$3(min, max, $name) { + var _this = this, + _0_0 = A.fuzzyCheckRange0(_this._number1$_value, min, max); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0("Expected " + _this.toString$0(0) + " to be within " + A.S(min) + _this.get$unitString() + " and " + A.S(max) + _this.get$unitString() + ".", $name)); + }, + valueInRangeWithUnit$4(min, max, $name, unit) { + var _0_0 = A.fuzzyCheckRange0(this._number1$_value, min, max); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be within " + min + unit + " and " + max + unit + ".", $name)); + }, + hasCompatibleUnits$1(other) { + var _this = this; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length) + return false; + if (_this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + return _this.isComparableTo$1(other); + }, + assertUnit$2(unit, $name) { + if (this.hasUnit$1(unit)) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + ' to have unit "' + unit + '".', $name)); + }, + assertNoUnits$1($name) { + if (!this.get$hasUnits()) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to have no units.", $name)); + }, + assertNoUnits$0() { + return this.assertNoUnits$1(null); + }, + convertToMatch$3(other, $name, otherName) { + var t1 = this.convertValueToMatch$3(other, $name, otherName), + t2 = other.get$numeratorUnits(other); + return A.SassNumber_SassNumber$withUnits0(t1, other.get$denominatorUnits(other), t2); + }, + convertValueToMatch$3(other, $name, otherName) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), false, $name, other, otherName); + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits0(this.coerceValue$3(newNumerators, newDenominators, $name), newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number1$_coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, true, $name); + }, + coerceValueToUnit$2(unit, $name) { + var t1 = type$.JSArray_String; + return this.coerceValue$3(A._setArrayType([unit], t1), A._setArrayType([], t1), $name); + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + coerceToMatch$3(other, $name, otherName) { + var t1 = this.coerceValueToMatch$3(other, $name, otherName), + t2 = other.get$numeratorUnits(other); + return A.SassNumber_SassNumber$withUnits0(t1, other.get$denominatorUnits(other), t2); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(other.get$numeratorUnits(other), other.get$denominatorUnits(other), true, $name, other, otherName); + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + _number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, other, otherName) { + var t1, otherHasUnits, t2, compatibilityException, oldNumerators, oldDenominators, _this = this, _box_0 = {}; + if (B.C_ListEquality.equals$2(0, _this.get$numeratorUnits(_this), newNumerators) && B.C_ListEquality.equals$2(0, _this.get$denominatorUnits(_this), newDenominators)) + return _this._number1$_value; + t1 = J.getInterceptor$asx(newNumerators); + otherHasUnits = t1.get$isNotEmpty(newNumerators) || J.get$isNotEmpty$asx(newDenominators); + if (coerceUnitless) + t2 = !_this.get$hasUnits() || !otherHasUnits; + else + t2 = false; + if (t2) + return _this._number1$_value; + compatibilityException = new A.SassNumber__coerceOrConvertValue_compatibilityException0(_this, other, otherName, otherHasUnits, $name, newNumerators, newDenominators); + _box_0.value = _this._number1$_value; + t2 = _this.get$numeratorUnits(_this); + oldNumerators = A._setArrayType(t2.slice(0), A._arrayInstanceType(t2)); + for (t1 = t1.get$iterator(newNumerators); t1.moveNext$0();) + A.removeFirstWhere0(oldNumerators, new A.SassNumber__coerceOrConvertValue_closure3(_box_0, t1.get$current(t1)), new A.SassNumber__coerceOrConvertValue_closure4(compatibilityException)); + t1 = _this.get$denominatorUnits(_this); + oldDenominators = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = J.get$iterator$ax(newDenominators); t1.moveNext$0();) + A.removeFirstWhere0(oldDenominators, new A.SassNumber__coerceOrConvertValue_closure5(_box_0, t1.get$current(t1)), new A.SassNumber__coerceOrConvertValue_closure6(compatibilityException)); + if (oldNumerators.length !== 0 || oldDenominators.length !== 0) + throw A.wrapException(compatibilityException.call$0()); + return _box_0.value; + }, + _number1$_coerceOrConvertValue$4$coerceUnitless$name(newNumerators, newDenominators, coerceUnitless, $name) { + return this._number1$_coerceOrConvertValue$6$coerceUnitless$name$other$otherName(newNumerators, newDenominators, coerceUnitless, $name, null, null); + }, + isComparableTo$1(other) { + var exception; + if (!this.get$hasUnits() || !other.get$hasUnits()) + return true; + try { + this.greaterThan$1(other); + return true; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException0) + return false; + else + throw exception; + } + }, + greaterThan$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyGreaterThan$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyGreaterThanOrEquals$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyLessThan$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + if (other instanceof A.SassNumber0) + return this._number1$_coerceUnits$2(other, A.number2__fuzzyLessThanOrEquals$closure()) ? B.SassBoolean_true0 : B.SassBoolean_false0; + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + if (other instanceof A.SassNumber0) + return this.withValue$1(this._number1$_coerceUnits$2(other, A.number2__moduloLikeSass$closure())); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) + return _this.withValue$1(_this._number1$_coerceUnits$2(other, new A.SassNumber_plus_closure0())); + if (!(other instanceof A.SassColor0)) + return _this.super$Value$plus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + }, + minus$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) + return _this.withValue$1(_this._number1$_coerceUnits$2(other, new A.SassNumber_minus_closure0())); + if (!(other instanceof A.SassColor0)) + return _this.super$Value$minus0(other); + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " - " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number1$_value * other._number1$_value); + return _this.multiplyUnits$3(_this._number1$_value * other._number1$_value, other.get$numeratorUnits(other), other.get$denominatorUnits(other)); + } + throw A.wrapException(A.SassScriptException$0('Undefined operation "' + _this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + dividedBy$1(other) { + var _this = this; + if (other instanceof A.SassNumber0) { + if (!other.get$hasUnits()) + return _this.withValue$1(_this._number1$_value / other._number1$_value); + return _this.multiplyUnits$3(_this._number1$_value / other._number1$_value, other.get$denominatorUnits(other), other.get$numeratorUnits(other)); + } + return _this.super$Value$dividedBy0(other); + }, + unaryPlus$0() { + return this; + }, + _number1$_coerceUnits$1$2(other, operation) { + var t1, exception; + try { + t1 = operation.call$2(this._number1$_value, other.coerceValueToMatch$1(this)); + return t1; + } catch (exception) { + if (A.unwrapException(exception) instanceof A.SassScriptException0) { + this.coerceValueToMatch$1(other); + throw exception; + } else + throw exception; + } + }, + _number1$_coerceUnits$2(other, operation) { + return this._number1$_coerceUnits$1$2(other, operation, type$.dynamic); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var t1, _0_1, _0_6, _0_3, _0_9, _0_9_isSet, _0_7, _0_7_isSet, t2, _0_2, t3, denominators_case_0, _0_11_isSet, _0_11, _0_13, _0_13_isSet, numerators_case_0, t4, t5, t6, t7, numerators_case_1, denominators_case_1, t0, newNumerators, mutableOtherDenominators, _i, numerator, mutableDenominatorUnits, _this = this, _null = null, _box_0 = {}; + _box_0.value = value; + t1 = [_this.get$numeratorUnits(_this), _this.get$denominatorUnits(_this), otherNumerators, otherDenominators]; + _0_1 = t1[0]; + _0_6 = _null; + _0_3 = _null; + _0_9 = _null; + _0_9_isSet = false; + _0_7 = _null; + _0_7_isSet = false; + t2 = false; + _0_2 = t1[1]; + _0_3 = t1[2]; + _0_6 = _0_3.length <= 0; + t3 = _0_6; + if (t3) { + _0_7 = t1[3]; + _0_9 = _0_7.length <= 0; + t2 = _0_9; + _0_9_isSet = true; + _0_7_isSet = true; + } + denominators_case_0 = _0_2; + _0_11_isSet = !t2; + _0_11 = _null; + _0_13 = _null; + _0_13_isSet = false; + t2 = true; + if (_0_11_isSet) { + _0_11 = _0_1.length <= 0; + t3 = _0_11; + if (t3) { + _0_13 = _0_2.length <= 0; + t3 = _0_13; + if (t3) { + if (_0_7_isSet) + denominators_case_0 = _0_7; + else { + _0_7 = t1[3]; + denominators_case_0 = _0_7; + _0_7_isSet = true; + } + numerators_case_0 = _0_3; + } else { + numerators_case_0 = _0_1; + t2 = false; + } + _0_13_isSet = true; + } else { + numerators_case_0 = _0_1; + t2 = false; + } + } else + numerators_case_0 = _0_1; + if (t2) { + t4 = denominators_case_0; + t3 = numerators_case_0; + } else { + t4 = _null; + t3 = t4; + } + if (!t2) { + t2 = _null; + t5 = _null; + if (_0_11_isSet) + t6 = _0_11; + else { + _0_11 = _0_1.length <= 0; + t6 = _0_11; + } + t7 = false; + if (t6) { + if (_0_9_isSet) + t2 = _0_9; + else { + if (_0_7_isSet) + t2 = _0_7; + else { + _0_7 = t1[3]; + t2 = _0_7; + _0_7_isSet = true; + } + _0_9 = t2.length <= 0; + t2 = _0_9; + } + numerators_case_1 = _0_3; + denominators_case_1 = _0_2; + } else { + numerators_case_1 = t2; + t2 = t7; + denominators_case_1 = t5; + } + if (!t2) { + t2 = false; + if (_0_13_isSet) + t5 = _0_13; + else { + _0_13 = _0_2.length <= 0; + t5 = _0_13; + } + if (t5) + if (_0_6) { + denominators_case_1 = _0_7_isSet ? _0_7 : t1[3]; + t1 = true; + } else + t1 = t2; + else + t1 = t2; + numerators_case_1 = _0_1; + } else + t1 = true; + if (t1) { + t1 = !_this._number1$_areAnyConvertible$2(numerators_case_1, denominators_case_1); + if (t1) { + t3 = denominators_case_1; + t2 = numerators_case_1; + } else { + t2 = t3; + t3 = t4; + } + t0 = t3; + t3 = t1; + t1 = t2; + t2 = t0; + } else { + t2 = t4; + t1 = t3; + t3 = false; + } + } else { + t2 = t4; + t1 = t3; + t3 = true; + } + if (t3) + return A.SassNumber_SassNumber$withUnits0(value, t2, t1); + newNumerators = A._setArrayType([], type$.JSArray_String); + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + for (t1 = _this.get$numeratorUnits(_this), t2 = t1.length, _i = 0; _i < t2; ++_i) { + numerator = t1[_i]; + A.removeFirstWhere0(mutableOtherDenominators, new A.SassNumber_multiplyUnits_closure3(_box_0, numerator), new A.SassNumber_multiplyUnits_closure4(newNumerators, numerator)); + } + t1 = _this.get$denominatorUnits(_this); + mutableDenominatorUnits = A._setArrayType(t1.slice(0), A._arrayInstanceType(t1)); + for (t1 = otherNumerators.length, _i = 0; _i < t1; ++_i) { + numerator = otherNumerators[_i]; + A.removeFirstWhere0(mutableDenominatorUnits, new A.SassNumber_multiplyUnits_closure5(_box_0, numerator), new A.SassNumber_multiplyUnits_closure6(newNumerators, numerator)); + } + t1 = _box_0.value; + B.JSArray_methods.addAll$1(mutableDenominatorUnits, mutableOtherDenominators); + return A.SassNumber_SassNumber$withUnits0(t1, mutableDenominatorUnits, newNumerators); + }, + _number1$_areAnyConvertible$2(units1, units2) { + return B.JSArray_methods.any$1(units1, new A.SassNumber__areAnyConvertible_closure0(units2)); + }, + _number1$_unitString$2(numerators, denominators) { + var t1, _0_4, _0_7, _0_6, _0_5, t2, _0_9, _0_10, denominator, _null = null; + $label0$0: { + t1 = J.getInterceptor$asx(numerators); + _0_4 = t1.get$length(numerators) <= 0; + _0_7 = _null; + _0_6 = _null; + _0_5 = _null; + if (_0_4) { + _0_6 = J.get$length$asx(denominators); + t2 = _0_6; + _0_7 = t2 <= 0; + t2 = _0_7; + _0_5 = denominators; + } else + t2 = false; + if (t2) { + t1 = "no units"; + break $label0$0; + } + _0_9 = _null; + if (_0_4) { + t2 = _0_6; + _0_9 = t2 === 1; + t2 = _0_9; + } else + t2 = false; + if (t2) { + _0_10 = J.$index$asx(_0_4 ? _0_5 : denominators, 0); + denominator = _0_10; + t1 = denominator + "^-1"; + break $label0$0; + } + if (_0_4) { + t1 = "(" + J.join$1$ax(denominators, "*") + ")^-1"; + break $label0$0; + } + t2 = denominators; + _0_5 = t2; + _0_6 = J.get$length$asx(t2); + t2 = _0_6; + _0_7 = t2 <= 0; + t2 = _0_7; + if (t2) { + t1 = t1.join$1(numerators, "*"); + break $label0$0; + } + t2 = _0_6; + _0_9 = t2 === 1; + t2 = _0_9; + if (t2) { + _0_10 = J.$index$asx(_0_5, 0); + denominator = _0_10; + t1 = t1.join$1(numerators, "*") + "/" + denominator; + break $label0$0; + } + t1 = t1.join$1(numerators, "*") + "/(" + J.join$1$ax(denominators, "*") + ")"; + break $label0$0; + } + return t1; + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + if (!(other instanceof A.SassNumber0)) + return false; + if (_this.get$numeratorUnits(_this).length !== other.get$numeratorUnits(other).length || _this.get$denominatorUnits(_this).length !== other.get$denominatorUnits(other).length) + return false; + if (!_this.get$hasUnits()) + return A.fuzzyEquals0(_this._number1$_value, other._number1$_value); + if (!B.C_ListEquality.equals$2(0, _this._number1$_canonicalizeUnitList$1(_this.get$numeratorUnits(_this)), _this._number1$_canonicalizeUnitList$1(other.get$numeratorUnits(other))) || !B.C_ListEquality.equals$2(0, _this._number1$_canonicalizeUnitList$1(_this.get$denominatorUnits(_this)), _this._number1$_canonicalizeUnitList$1(other.get$denominatorUnits(other)))) + return false; + return A.fuzzyEquals0(_this._number1$_value * _this._number1$_canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._number1$_canonicalMultiplier$1(_this.get$denominatorUnits(_this)), other._number1$_value * _this._number1$_canonicalMultiplier$1(other.get$numeratorUnits(other)) / _this._number1$_canonicalMultiplier$1(other.get$denominatorUnits(other))); + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode0(_this._number1$_value * _this._number1$_canonicalMultiplier$1(_this.get$numeratorUnits(_this)) / _this._number1$_canonicalMultiplier$1(_this.get$denominatorUnits(_this))) : t1; + }, + _number1$_canonicalizeUnitList$1(units) { + var type, + t1 = units.length; + if (t1 === 0) + return units; + if (t1 === 1) { + type = $.$get$_typesByUnit0().$index(0, B.JSArray_methods.get$first(units)); + if (type == null) + t1 = units; + else { + t1 = B.Map_Sr65K.$index(0, type); + t1.toString; + t1 = A._setArrayType([B.JSArray_methods.get$first(t1)], type$.JSArray_String); + } + return t1; + } + t1 = A._arrayInstanceType(units)._eval$1("MappedListIterable<1,String>"); + t1 = A.List_List$_of(new A.MappedListIterable(units, new A.SassNumber__canonicalizeUnitList_closure0(), t1), t1._eval$1("ListIterable.E")); + B.JSArray_methods.sort$0(t1); + return t1; + }, + _number1$_canonicalMultiplier$1(units) { + return B.JSArray_methods.fold$2(units, 1, new A.SassNumber__canonicalMultiplier_closure0(this)); + }, + canonicalMultiplierForUnit$1(unit) { + var t1, + innerMap = B.Map_NtHoP.$index(0, unit); + if (innerMap == null) + t1 = 1; + else { + t1 = innerMap.get$values(innerMap); + t1 = 1 / t1.get$first(t1); + } + return t1; + }, + unitSuggestion$2($name, unit) { + var t2, t3, result, _this = this, + t1 = _this.get$denominatorUnits(_this); + t1 = new A.MappedListIterable(t1, new A.SassNumber_unitSuggestion_closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,String>")).join$0(0); + t2 = _this.get$numeratorUnits(_this); + t2 = new A.MappedListIterable(t2, new A.SassNumber_unitSuggestion_closure2(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,String>")).join$0(0); + t3 = unit == null ? "" : " * 1" + unit; + result = "$" + $name + t1 + t2 + t3; + return _this.get$numeratorUnits(_this).length === 0 ? result : "calc(" + result + ")"; + }, + unitSuggestion$1($name) { + return this.unitSuggestion$2($name, null); + } + }; + A.SassNumber__coerceOrConvertValue_compatibilityException0.prototype = { + call$0() { + var t2, t3, message, t4, type, unit, _this = this, + t1 = _this.other; + if (t1 != null) { + t2 = _this.$this; + t3 = t2.toString$0(0) + " and"; + message = new A.StringBuffer(t3); + t4 = _this.otherName; + if (t4 != null) + t3 = message._contents = t3 + (" $" + t4 + ":"); + t1 = t3 + (" " + t1.toString$0(0) + " have incompatible units"); + message._contents = t1; + if (!t2.get$hasUnits() || !_this.otherHasUnits) + message._contents = t1 + " (one has units and the other doesn't)"; + t1 = message.toString$0(0) + "."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else if (!_this.otherHasUnits) { + t1 = "Expected " + _this.$this.toString$0(0) + " to have no units."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t1 : "$" + t2 + ": " + t1); + } else { + t1 = _this.newNumerators; + t2 = J.getInterceptor$asx(t1); + if (t2.get$length(t1) === 1 && J.get$isEmpty$asx(_this.newDenominators)) { + type = $.$get$_typesByUnit0().$index(0, t2.get$first(t1)); + if (type != null) { + t1 = _this.$this.toString$0(0); + t2 = B.JSArray_methods.contains$1(A._setArrayType([97, 101, 105, 111, 117], type$.JSArray_int), type.charCodeAt(0)) ? "an " + type : "a " + type; + t3 = B.Map_Sr65K.$index(0, type); + t3.toString; + t3 = "Expected " + t1 + " to have " + t2 + " unit (" + B.JSArray_methods.join$1(t3, ", ") + ")."; + t2 = _this.name; + return new A.SassScriptException0(t2 == null ? t3 : "$" + t2 + ": " + t3); + } + } + t3 = _this.newDenominators; + unit = A.pluralize0("unit", t2.get$length(t1) + J.get$length$asx(t3), null); + t2 = _this.$this; + t3 = "Expected " + t2.toString$0(0) + " to have " + unit + " " + t2._number1$_unitString$2(t1, t3) + "."; + t1 = _this.name; + return new A.SassScriptException0(t1 == null ? t3 : "$" + t1 + ": " + t3); + } + }, + $signature: 557 + }; + A.SassNumber__coerceOrConvertValue_closure3.prototype = { + call$1(oldNumerator) { + var factor = A.conversionFactor0(this.newNumerator, oldNumerator); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 4 + }; + A.SassNumber__coerceOrConvertValue_closure4.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber__coerceOrConvertValue_closure5.prototype = { + call$1(oldDenominator) { + var factor = A.conversionFactor0(this.newDenominator, oldDenominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 4 + }; + A.SassNumber__coerceOrConvertValue_closure6.prototype = { + call$0() { + return A.throwExpression(this.compatibilityException.call$0()); + }, + $signature: 0 + }; + A.SassNumber_plus_closure0.prototype = { + call$2(num1, num2) { + return num1 + num2; + }, + $signature: 57 + }; + A.SassNumber_minus_closure0.prototype = { + call$2(num1, num2) { + return num1 - num2; + }, + $signature: 57 + }; + A.SassNumber_multiplyUnits_closure3.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 4 + }; + A.SassNumber_multiplyUnits_closure4.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber_multiplyUnits_closure5.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(this.numerator, denominator); + if (factor == null) + return false; + this._box_0.value /= factor; + return true; + }, + $signature: 4 + }; + A.SassNumber_multiplyUnits_closure6.prototype = { + call$0() { + return this.newNumerators.push(this.numerator); + }, + $signature: 0 + }; + A.SassNumber__areAnyConvertible_closure0.prototype = { + call$1(unit1) { + var t1, + _0_0 = B.Map_NtHoP.$index(0, unit1); + $label0$0: { + if (_0_0 != null) { + t1 = B.JSArray_methods.any$1(this.units2, _0_0.get$containsKey()); + break $label0$0; + } + t1 = B.JSArray_methods.contains$1(this.units2, unit1); + break $label0$0; + } + return t1; + }, + $signature: 4 + }; + A.SassNumber__canonicalizeUnitList_closure0.prototype = { + call$1(unit) { + var t1, + type = $.$get$_typesByUnit0().$index(0, unit); + if (type == null) + t1 = unit; + else { + t1 = B.Map_Sr65K.$index(0, type); + t1.toString; + t1 = B.JSArray_methods.get$first(t1); + } + return t1; + }, + $signature: 6 + }; + A.SassNumber__canonicalMultiplier_closure0.prototype = { + call$2(multiplier, unit) { + return multiplier * this.$this.canonicalMultiplierForUnit$1(unit); + }, + $signature: 165 + }; + A.SassNumber_unitSuggestion_closure1.prototype = { + call$1(unit) { + return " * 1" + unit; + }, + $signature: 6 + }; + A.SassNumber_unitSuggestion_closure2.prototype = { + call$1(unit) { + return " / 1" + unit; + }, + $signature: 6 + }; + A.OklabColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, missingChroma, missingHue) { + var missingLightness, missingA, missingB, t1; + if (dest === B.OklchColorSpace_9Gj0) + return A.labToLch0(dest, lightness, a, b, alpha, missingChroma, missingHue); + missingLightness = lightness == null; + missingA = a == null; + missingB = b == null; + if (missingLightness) + lightness = 0; + if (missingA) + a = 0; + if (missingB) + b = 0; + t1 = $.$get$oklabToLms0(); + return B.LmsColorSpace_Os30.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, Math.pow(t1[0] * lightness + t1[1] * a + t1[2] * b, 3) + 0, Math.pow(t1[3] * lightness + t1[4] * a + t1[5] * b, 3) + 0, Math.pow(t1[6] * lightness + t1[7] * a + t1[8] * b, 3) + 0, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, lightness, a, b, alpha) { + return this.convert$7$missingChroma$missingHue(dest, lightness, a, b, alpha, false, false); + } + }; + A.OklchColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + get$isPolarInternal() { + return true; + }, + convert$5(dest, lightness, chroma, hue, alpha) { + var t1 = hue == null, + hueRadians = (t1 ? 0 : hue) * 3.141592653589793 / 180, + t2 = chroma == null, + t3 = t2 ? 0 : chroma, + t4 = Math.cos(hueRadians), + t5 = t2 ? 0 : chroma; + return B.OklabColorSpace_5400.convert$7$missingChroma$missingHue(dest, lightness, t3 * t4, t5 * Math.sin(hueRadians), alpha, t2, t1); + } + }; + A.SupportsOperation0.prototype = { + toInterpolation$0() { + var t1 = new A.StringBuffer(""), + t2 = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + t3 = this.span, + t4 = this.left, + t5 = A.SpanExtensions_before(t3, t4.get$span(t4)); + t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); + t1._contents += t5; + t2.addInterpolation$1(t4.toInterpolation$0()); + t5 = this.right; + t4 = A.SpanExtensions_between(t4.get$span(t4), t5.get$span(t5)); + t4 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4.file._decodedChars, t4._file$_start, t4._end), 0, null); + t1._contents += t4; + t2.addInterpolation$1(t5.toInterpolation$0()); + t5 = A.SpanExtensions_after(t3, t5.get$span(t5)); + t5 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t5.file._decodedChars, t5._file$_start, t5._end), 0, null); + t1._contents += t5; + return t2.interpolation$1(t3); + }, + withSpan$1(span) { + return new A.SupportsOperation0(this.left, this.right, this.operator, span); + }, + toString$0(_) { + var _this = this; + return _this._operation$_parenthesize$1(_this.left) + " " + _this.operator.toString$0(0) + " " + _this._operation$_parenthesize$1(_this.right); + }, + _operation$_parenthesize$1(condition) { + var t1; + if (!(condition instanceof A.SupportsNegation0)) + t1 = condition instanceof A.SupportsOperation0 && condition.operator === this.operator; + else + t1 = true; + return t1 ? "(" + condition.toString$0(0) + ")" : condition.toString$0(0); + }, + $isAstNode0: 1, + $isSassNode: 1, + $isSupportsCondition: 1, + get$span(receiver) { + return this.span; + } + }; + A.Parameter0.prototype = { + toString$0(_) { + var t1 = this.defaultValue, + t2 = this.name; + return t1 == null ? t2 : t2 + ": " + t1.toString$0(0); + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ParameterList0.prototype = { + get$spanWithName() { + var t2, t3, + t1 = this.span, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.get$file(t1)._decodedChars, 0, null), 0, null), + i = t1.get$start(t1).offset - 1; + for (;;) { + if (i > 0) { + t2 = text.charCodeAt(i); + t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; + } else + t2 = false; + if (!t2) + break; + --i; + } + t2 = text.charCodeAt(i); + if (!(t2 === 95 || A.CharacterExtension_get_isAlphabetic0(t2) || t2 >= 128)) + t2 = t2 >= 48 && t2 <= 57 || t2 === 45; + else + t2 = true; + if (!t2) + return t1; + --i; + for (;;) { + if (i >= 0) { + t2 = text.charCodeAt(i); + if (t2 !== 95) { + if (!(t2 >= 97 && t2 <= 122)) + t3 = t2 >= 65 && t2 <= 90; + else + t3 = true; + t3 = t3 || t2 >= 128; + } else + t3 = true; + if (!t3) + t2 = t2 >= 48 && t2 <= 57 || t2 === 45; + else + t2 = true; + } else + t2 = false; + if (!t2) + break; + --i; + } + t2 = i + 1; + t3 = text.charCodeAt(t2); + if (!(t3 === 95 || A.CharacterExtension_get_isAlphabetic0(t3) || t3 >= 128)) + return t1; + return A.SpanExtensions_trimRight0(A.SpanExtensions_trimLeft0(t1.get$file(t1).span$2(0, t2, t1.get$end(t1).offset))); + }, + verify$2(positional, names) { + var t1, t2, t3, namedUsed, i, parameter, t4, unknownNames, _this = this, + _s10_ = "invocation"; + for (t1 = _this.parameters, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + parameter = t1[i]; + if (i < positional) { + t4 = parameter.name; + if (t3.containsKey$1(t4)) + throw A.wrapException(A.SassScriptException$0("Argument " + _this._parameter_list$_originalParameterName$1(t4) + string$.x20was_p, null)); + } else { + t4 = parameter.name; + if (t3.containsKey$1(t4)) + ++namedUsed; + else if (parameter.defaultValue == null) + throw A.wrapException(A.MultiSpanSassScriptException$0("Missing argument " + _this._parameter_list$_originalParameterName$1(t4) + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + } + if (_this.restParameter != null) + return; + if (positional > t2) { + t1 = names.get$isEmpty(0) ? "" : "positional "; + throw A.wrapException(A.MultiSpanSassScriptException$0("Only " + t2 + " " + t1 + A.pluralize0("argument", t2, null) + " allowed, but " + positional + " " + A.pluralize0("was", positional, "were") + " passed.", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, type$.String))); + } + if (namedUsed < t3.get$length(t3)) { + t2 = type$.String; + unknownNames = A.LinkedHashSet_LinkedHashSet$of(names, t2); + unknownNames.removeAll$1(new A.MappedListIterable(t1, new A.ParameterList_verify_closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object?>"))); + throw A.wrapException(A.MultiSpanSassScriptException$0("No " + A.pluralize0("parameter", unknownNames._collection$_length, null) + " named " + A.toSentence0(unknownNames.map$1$1(0, new A.ParameterList_verify_closure2(), type$.Object), "or") + ".", _s10_, A.LinkedHashMap_LinkedHashMap$_literal([_this.get$spanWithName(), "declaration"], type$.FileSpan, t2))); + } + }, + _parameter_list$_originalParameterName$1($name) { + var text, t1, t2, _i, parameter, end; + if ($name === this.restParameter) { + text = this.span.get$text(); + return B.JSString_methods.substring$2(B.JSString_methods.substring$1(text, B.JSString_methods.lastIndexOf$1(text, "$")), 0, B.JSString_methods.indexOf$1(text, ".")); + } + for (t1 = this.parameters, t2 = t1.length, _i = 0; _i < t2; ++_i) { + parameter = t1[_i]; + if (parameter.name === $name) { + t1 = parameter.span; + if (parameter.defaultValue == null) + t1 = t1.get$text(); + else { + text = t1.get$text(); + t1 = B.JSString_methods.substring$2(text, 0, B.JSString_methods.indexOf$1(text, ":")); + end = A._lastNonWhitespace0(t1, false); + t1 = end == null ? "" : B.JSString_methods.substring$2(t1, 0, end + 1); + } + return t1; + } + } + throw A.wrapException(A.ArgumentError$(string$.This_d + $name + '".', null)); + }, + matches$2(positional, names) { + var t1, t2, t3, namedUsed, i, parameter; + for (t1 = this.parameters, t2 = t1.length, t3 = names._baseMap, namedUsed = 0, i = 0; i < t2; ++i) { + parameter = t1[i]; + if (i < positional) { + if (t3.containsKey$1(parameter.name)) + return false; + } else if (t3.containsKey$1(parameter.name)) + ++namedUsed; + else if (parameter.defaultValue == null) + return false; + } + if (this.restParameter != null) + return true; + if (positional > t2) + return false; + if (namedUsed < t3.get$length(t3)) + return false; + return true; + }, + toString$0(_) { + var t2, t3, _i, + t1 = A._setArrayType([], type$.JSArray_String); + for (t2 = this.parameters, t3 = t2.length, _i = 0; _i < t3; ++_i) + t1.push("$" + t2[_i].toString$0(0)); + t2 = this.restParameter; + if (t2 != null) + t1.push("$" + t2 + "..."); + return B.JSArray_methods.join$1(t1, ", "); + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.ParameterList_verify_closure1.prototype = { + call$1(parameter) { + return parameter.name; + }, + $signature: 558 + }; + A.ParameterList_verify_closure2.prototype = { + call$1($name) { + return "$" + $name; + }, + $signature: 6 + }; + A.InterpolatedParentSelector.prototype = { + accept$1$1(visitor) { + return J.visitParentSelector$1$x(visitor._simple_selector$_inner, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1, + _0_0 = this.suffix; + $label0$0: { + if (_0_0 != null) { + t1 = "&" + _0_0.toString$0(0); + break $label0$0; + } + t1 = "&"; + break $label0$0; + } + return t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.ParentSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitParentSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + return A.throwExpression(A.UnsupportedError$("& doesn't support unification.")); + } + }; + A.ParentStatement0.prototype = {}; + A.ParentStatement_closure0.prototype = { + call$1(child) { + var t1; + $label0$0: { + if (child instanceof A.VariableDeclaration0 || child instanceof A.FunctionRule0 || child instanceof A.MixinRule0) { + t1 = true; + break $label0$0; + } + if (child instanceof A.ImportRule0) { + t1 = B.JSArray_methods.any$1(child.imports, new A.ParentStatement__closure0()); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 248 + }; + A.ParentStatement__closure0.prototype = { + call$1($import) { + return $import instanceof A.DynamicImport0; + }, + $signature: 249 + }; + A.ParenthesizedExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitParenthesizedExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "(" + this.expression.toString$0(0) + ")"; + }, + get$span(receiver) { + return this.span; + } + }; + A.ParserExports.prototype = {}; + A.loadParserExports_closure.prototype = { + call$1(inner) { + return new A.JSExpressionVisitor(inner); + }, + $signature: 559 + }; + A.loadParserExports_closure0.prototype = { + call$1(inner) { + return new A.JSIfConditionExpressionVisitor(inner); + }, + $signature: 560 + }; + A.loadParserExports_closure1.prototype = { + call$1(inner) { + return new A.JSStatementVisitor(inner); + }, + $signature: 561 + }; + A.loadParserExports_closure2.prototype = { + call$1(inner) { + return new A.JSSimpleSelectorVisitor(inner); + }, + $signature: 562 + }; + A.loadParserExports_closure3.prototype = { + call$1(text) { + return A.SourceFile$fromString(text, null); + }, + $signature: 563 + }; + A.loadParserExports_closure4.prototype = { + call$1(set) { + var t1 = A.List_List$_of(set, type$.nullable_Object); + return new self.Set(t1); + }, + $signature: 564 + }; + A._updateLazyFileSpanPrototype_closure.prototype = { + call$0() { + return $.$get$bogusSpan0(); + }, + $signature: 16 + }; + A._updateLazyFileSpanPrototype_closure0.prototype = { + call$1(span) { + var t1 = span.get$span(0); + return t1.get$file(t1); + }, + $signature: 565 + }; + A._updateLazyFileSpanPrototype_closure1.prototype = { + call$1(span) { + var t1 = span.get$span(0); + return t1.get$length(t1); + }, + $signature: 566 + }; + A._updateLazyFileSpanPrototype_closure2.prototype = { + call$1(span) { + var t1 = span.get$span(0); + return t1.get$sourceUrl(t1); + }, + $signature: 567 + }; + A._updateAstPrototypes_closure.prototype = { + call$3($self, start, end) { + return A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2($self._decodedChars, start, end), 0, null); + }, + call$2($self, start) { + return this.call$3($self, start, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 568 + }; + A._updateAstPrototypes_closure0.prototype = { + call$3($self, start, end) { + return $self.span$2(0, start, end); + }, + call$2($self, start) { + return this.call$3($self, start, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 569 + }; + A._updateAstPrototypes_closure1.prototype = { + call$1($self) { + return $self._decodedChars; + }, + $signature: 570 + }; + A._updateAstPrototypes_closure2.prototype = { + call$1($self) { + return $self.get$asPlain(); + }, + $signature: 571 + }; + A._updateAstPrototypes_closure3.prototype = { + call$2($self, visitor) { + return $self.accept$1(visitor); + }, + $signature: 572 + }; + A._updateAstPrototypes_closure4.prototype = { + call$2($self, visitor) { + return $self.accept$1(visitor); + }, + $signature: 573 + }; + A._updateAstPrototypes_closure5.prototype = { + call$2($self, visitor) { + return $self.accept$1(visitor); + }, + $signature: 574 + }; + A._updateAstPrototypes_closure6.prototype = { + call$2($self, visitor) { + return $self.accept$1(visitor); + }, + $signature: 575 + }; + A._updateAstPrototypes_closure7.prototype = { + call$1($self) { + return $self.$arguments; + }, + $signature: 576 + }; + A._updateAstPrototypes_closure8.prototype = { + call$1($self) { + return $self.$arguments; + }, + $signature: 577 + }; + A._updateAstPrototypes_closure9.prototype = { + call$1($self) { + return $self.$arguments; + }, + $signature: 578 + }; + A._updateAstPrototypes_closure10.prototype = { + call$1($self) { + return $self.$arguments; + }, + $signature: 579 + }; + A._updateAstPrototypes_closure11.prototype = { + call$1($self) { + return $self.$arguments; + }, + $signature: 580 + }; + A._updateAstPrototypes_closure12.prototype = { + call$1($self) { + return $self.$arguments; + }, + $signature: 581 + }; + A._updateAstPrototypes_closure13.prototype = { + call$1($self) { + return $self.get$span($self); + }, + $signature: 582 + }; + A._addSupportsConditionToInterpolation_closure.prototype = { + call$1($self) { + return $self.toInterpolation$0(); + }, + $signature: 583 + }; + A.Parser1.prototype = { + _parser1$_parseIdentifier$0() { + return this.wrapSpanFormatException$1(new A.Parser__parseIdentifier_closure0(this)); + }, + whitespace$1$consumeNewlines(consumeNewlines) { + do + this.whitespaceWithoutComments$1$consumeNewlines(consumeNewlines); + while (this.scanComment$0()); + }, + whitespaceWithoutComments$1$consumeNewlines(consumeNewlines) { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + for (;;) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + spaces$0() { + var t3, + t1 = this.scanner, + t2 = t1.string.length; + for (;;) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = t3 === 32 || t3 === 9; + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + }, + scanComment$0() { + var _0_0, + t1 = this.scanner; + if (t1.peekChar$0() !== 47) + return false; + _0_0 = t1.peekChar$1(1); + if (47 === _0_0) + return this.silentComment$0(); + if (42 === _0_0) { + this.loudComment$0(); + return true; + } + return false; + }, + expectWhitespace$1$consumeNewlines(consumeNewlines) { + var t2, t3, + t1 = this.scanner; + if (t1._string_scanner$_position !== t1.string.length) { + t2 = t1.peekChar$0(); + t3 = !(t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12 || this.scanComment$0()); + t2 = t3; + } else + t2 = true; + if (t2) + t1.error$1(0, "Expected whitespace."); + this.whitespace$1$consumeNewlines(consumeNewlines); + }, + expectWhitespace$0() { + return this.expectWhitespace$1$consumeNewlines(false); + }, + silentComment$0() { + var t2, t3, + t1 = this.scanner; + t1.expect$1("//"); + t2 = t1.string.length; + for (;;) { + if (t1._string_scanner$_position !== t2) { + t3 = t1.peekChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + return true; + }, + loudComment$0() { + var next, + t1 = this.scanner; + t1.expect$1("/*"); + for (;;) { + if (t1.readChar$0() !== 42) + continue; + do + next = t1.readChar$0(); + while (next === 42); + if (next === 47) + break; + } + }, + identifier$2$normalize$unit(normalize, unit) { + var t2, _0_0, _this = this, + _s20_ = "Expected identifier.", + text = new A.StringBuffer(""), + t1 = _this.scanner; + if (t1.scanChar$1(45)) { + t2 = text._contents = A.Primitives_stringFromCharCode(45); + if (t1.scanChar$1(45)) { + text._contents = t2 + t2; + _this._parser1$_identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + } + } else + t2 = ""; + $label0$0: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s20_); + if (95 === _0_0 && normalize) { + t1.readChar$0(); + text._contents = t2 + A.Primitives_stringFromCharCode(45); + break $label0$0; + } + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128) { + text._contents = t2 + A.Primitives_stringFromCharCode(t1.readChar$0()); + break $label0$0; + } + if (92 === _0_0) { + text._contents = t2 + _this.escape$1$identifierStart(true); + break $label0$0; + } + t1.error$1(0, _s20_); + } + _this._parser1$_identifierBody$3$normalize$unit(text, normalize, unit); + t1 = text._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + identifier$0() { + return this.identifier$2$normalize$unit(false, false); + }, + identifier$1$normalize(normalize) { + return this.identifier$2$normalize$unit(normalize, false); + }, + identifier$1$unit(unit) { + return this.identifier$2$normalize$unit(false, unit); + }, + _parser1$_identifierBody$3$normalize$unit(text, normalize, unit) { + var t1, _1_0, _0_0, t2; + for (t1 = this.scanner;;) { + _1_0 = t1.peekChar$0(); + if (_1_0 == null) + break; + if (45 === _1_0 && unit) { + _0_0 = t1.peekChar$1(1); + if (46 !== _0_0) + t2 = A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57; + else + t2 = true; + if (t2) + break; + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + text._contents += t2; + continue; + } + if (95 === _1_0 && normalize) { + t1.readChar$0(); + t2 = A.Primitives_stringFromCharCode(45); + text._contents += t2; + continue; + } + if (_1_0 !== 95) { + if (!(_1_0 >= 97 && _1_0 <= 122)) + t2 = _1_0 >= 65 && _1_0 <= 90; + else + t2 = true; + t2 = t2 || _1_0 >= 128; + } else + t2 = true; + if (!t2) + t2 = _1_0 >= 48 && _1_0 <= 57 || _1_0 === 45; + else + t2 = true; + if (t2) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + text._contents += t2; + continue; + } + if (92 === _1_0) { + t2 = this.escape$0(); + text._contents += t2; + continue; + } + break; + } + }, + _parser1$_identifierBody$1(text) { + return this._parser1$_identifierBody$3$normalize$unit(text, false, false); + }, + string$0() { + var buffer, _0_0, t2, + t1 = this.scanner, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t1._string_scanner$_position - 1); + buffer = new A.StringBuffer(""); + for (;;) { + _0_0 = t1.peekChar$0(); + if (_0_0 === quote) { + t1.readChar$0(); + break; + } + if (_0_0 == null || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + if (92 === _0_0) { + t2 = t1.peekChar$1(1); + if (t2 === 10 || t2 === 13 || t2 === 12) { + t1.readChar$0(); + t1.readChar$0(); + } else { + t2 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter0(t1)); + buffer._contents += t2; + } + continue; + } + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t2; + } + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$1$allowEmpty(allowEmpty) { + var t1, t2, t3, wroteNewline, next, wroteNewline0, t4, start, end, _0_0, _this = this, + buffer = new A.StringBuffer(""), + brackets = A._setArrayType([], type$.JSArray_int); + for (t1 = _this.scanner, t2 = _this.get$loudComment(), t3 = _this.get$string(), wroteNewline = false;;) { + next = t1.peekChar$0(); + if (next == null) + break; + wroteNewline0 = false; + if (92 === next) { + t4 = _this.escape$1$identifierStart(true); + buffer._contents += t4; + wroteNewline = wroteNewline0; + continue; + } + if (34 === next || 39 === next) { + start = t1._string_scanner$_position; + t3.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + wroteNewline = wroteNewline0; + continue; + } + if (47 === next) { + if (t1.peekChar$1(1) === 42) { + start = t1._string_scanner$_position; + t2.call$0(); + end = t1._string_scanner$_position; + buffer._contents += B.JSString_methods.substring$2(t1.string, start, end); + } else { + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t4; + } + wroteNewline = wroteNewline0; + continue; + } + if (32 === next || 9 === next) { + if (!wroteNewline) { + t4 = t1.peekChar$1(1); + t4 = !(t4 === 32 || t4 === 9 || t4 === 10 || t4 === 13 || t4 === 12); + } else + t4 = true; + if (t4) { + t4 = A.Primitives_stringFromCharCode(32); + buffer._contents += t4; + } + t1.readChar$0(); + continue; + } + if (10 === next || 13 === next || 12 === next) { + t4 = t1.peekChar$1(-1); + if (!(t4 === 10 || t4 === 13 || t4 === 12)) + buffer._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + continue; + } + if (40 === next || 123 === next || 91 === next) { + t4 = A.Primitives_stringFromCharCode(next); + buffer._contents += t4; + brackets.push(A.opposite0(t1.readChar$0())); + wroteNewline = wroteNewline0; + continue; + } + if (41 === next || 125 === next || 93 === next) { + if (brackets.length === 0) + break; + t4 = A.Primitives_stringFromCharCode(next); + buffer._contents += t4; + t1.expectChar$1(brackets.pop()); + wroteNewline = wroteNewline0; + continue; + } + if (59 === next) { + if (brackets.length === 0) + break; + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t4; + continue; + } + if (117 === next || 85 === next) { + _0_0 = _this.tryUrl$0(); + if (_0_0 != null) + buffer._contents += _0_0; + else { + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t4; + } + wroteNewline = wroteNewline0; + continue; + } + if (_this.lookingAtIdentifier$0()) { + t4 = _this.identifier$0(); + buffer._contents += t4; + } else { + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t4; + } + wroteNewline = wroteNewline0; + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && buffer._contents.length === 0) + t1.error$1(0, "Expected token."); + t1 = buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + declarationValue$0() { + return this.declarationValue$1$allowEmpty(false); + }, + tryUrl$0() { + var buffer, _0_0, t2, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (!_this.scanIdentifier$1("url")) + return null; + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + _this.whitespace$1$consumeNewlines(true); + buffer = new A.StringBuffer(""); + buffer._contents = "url("; + for (;;) { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + break; + if (92 === _0_0) { + t2 = _this.escape$0(); + buffer._contents += t2; + continue; + } + t2 = true; + if (37 !== _0_0) + if (38 !== _0_0) + if (35 !== _0_0) + t2 = _0_0 >= 42 && _0_0 <= 126 || _0_0 >= 128; + if (t2) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents += t2; + continue; + } + if (_0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12) { + _this.whitespace$1$consumeNewlines(true); + if (t1.peekChar$0() !== 41) + break; + continue; + } + if (41 === _0_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2 = buffer._contents += t2; + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + break; + } + t1.set$state(start); + return null; + }, + variableName$0() { + this.scanner.expectChar$1(36); + return this.identifier$1$normalize(true); + }, + escape$1$identifierStart(identifierStart) { + var value, _0_0, i, next, t2, exception, + _s25_ = "Expected escape sequence.", + t1 = this.scanner, + start = t1._string_scanner$_position; + t1.expectChar$1(92); + value = 0; + $label0$1: { + _0_0 = t1.peekChar$0(); + if (_0_0 == null) + t1.error$1(0, _s25_); + if (_0_0 === 10 || _0_0 === 13 || _0_0 === 12) + t1.error$1(0, _s25_); + if (A.CharacterExtension_get_isHex0(_0_0)) { + for (i = 0; i < 6; ++i) { + next = t1.peekChar$0(); + if (next != null) { + t2 = true; + if (!(next >= 48 && next <= 57)) + if (!(next >= 97 && next <= 102)) + t2 = next >= 65 && next <= 70; + t2 = !t2; + } else + t2 = true; + if (t2) + break; + value *= 16; + value += A.asHex0(t1.readChar$0()); + } + this.scanCharIf$1(new A.Parser_escape_closure0()); + break $label0$1; + } + value = t1.readChar$0(); + } + if (identifierStart) { + t2 = value; + t2 = t2 === 95 || A.CharacterExtension_get_isAlphabetic0(t2) || t2 >= 128; + } else { + t2 = value; + if (!(t2 === 95 || A.CharacterExtension_get_isAlphabetic0(t2) || t2 >= 128)) + t2 = t2 >= 48 && t2 <= 57 || t2 === 45; + else + t2 = true; + } + if (t2) + try { + t2 = A.Primitives_stringFromCharCode(value); + return t2; + } catch (exception) { + if (type$.RangeError._is(A.unwrapException(exception))) + t1.error$3$length$position(0, "Invalid Unicode code point.", t1._string_scanner$_position - start, start); + else + throw exception; + } + else { + t1 = true; + if (!(value <= 31)) + if (!J.$eq$(value, 127)) + if (identifierStart) { + t1 = value; + t1 = t1 >= 48 && t1 <= 57; + } else + t1 = false; + if (t1) { + t1 = A.Primitives_stringFromCharCode(92); + if (value > 15) + t1 += A.Primitives_stringFromCharCode(A.hexCharFor0(B.JSNumber_methods._shrOtherPositive$1(value, 4))); + t1 = t1 + A.Primitives_stringFromCharCode(A.hexCharFor0(value & 15)) + A.Primitives_stringFromCharCode(32); + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else + return A.String_String$fromCharCodes(A._setArrayType([92, value], type$.JSArray_int), 0, null); + } + }, + escape$0() { + return this.escape$1$identifierStart(false); + }, + scanCharIf$1(condition) { + var t1 = this.scanner; + if (!condition.call$1(t1.peekChar$0())) + return false; + t1.readChar$0(); + return true; + }, + scanIdentChar$2$caseSensitive(char, caseSensitive) { + var t3, + t1 = new A.Parser_scanIdentChar_matches0(caseSensitive, char), + t2 = this.scanner, + _0_0 = t2.peekChar$0(); + if (_0_0 != null) + t3 = t1.call$1(_0_0); + else + t3 = false; + if (t3) { + t2.readChar$0(); + return true; + } + if (92 === _0_0) { + t3 = t2._string_scanner$_position; + if (t1.call$1(A.consumeEscapedCharacter0(t2))) + return true; + t2.set$state(new A._SpanScannerState(t2, t3)); + } + return false; + }, + scanIdentChar$1(char) { + return this.scanIdentChar$2$caseSensitive(char, false); + }, + expectIdentChar$1(letter) { + var t1; + if (this.scanIdentChar$2$caseSensitive(letter, false)) + return; + t1 = this.scanner; + t1.error$2$position(0, 'Expected "' + A.Primitives_stringFromCharCode(letter) + '".', t1._string_scanner$_position); + }, + lookingAtIdentifier$1($forward) { + var t1, _1_0, t2, _0_0; + if ($forward == null) + $forward = 0; + t1 = this.scanner; + _1_0 = t1.peekChar$1($forward); + $label0$0: { + if (A._isInt(_1_0)) + t2 = _1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128; + else + t2 = false; + if (t2 || 92 === _1_0) { + t1 = true; + break $label0$0; + } + if (45 === _1_0) { + _0_0 = t1.peekChar$1($forward + 1); + $label1$1: { + if (A._isInt(_0_0)) + t1 = _0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128; + else + t1 = false; + t1 = t1 || 92 === _0_0 || 45 === _0_0; + break $label1$1; + } + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + lookingAtIdentifier$0() { + return this.lookingAtIdentifier$1(null); + }, + lookingAtIdentifierBody$0() { + var t1, + next = this.scanner.peekChar$0(); + if (next != null) { + if (!(next === 95 || A.CharacterExtension_get_isAlphabetic0(next) || next >= 128)) + t1 = next >= 48 && next <= 57 || next === 45; + else + t1 = true; + t1 = t1 || next === 92; + } else + t1 = false; + return t1; + }, + scanIdentifier$2$caseSensitive(text, caseSensitive) { + var t1, t2, _this = this; + if (!_this.lookingAtIdentifier$0()) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + if (_this._parser1$_consumeIdentifier$2(text, caseSensitive) && !_this.lookingAtIdentifierBody$0()) + return true; + else { + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + } + }, + scanIdentifier$1(text) { + return this.scanIdentifier$2$caseSensitive(text, false); + }, + _parser1$_consumeIdentifier$2(text, caseSensitive) { + var t1, t2, t3; + for (t1 = new A.CodeUnits(text), t2 = type$.CodeUnits, t1 = new A.ListIterator(t1, t1.get$length(0), t2._eval$1("ListIterator")), t2 = t2._eval$1("ListBase.E"); t1.moveNext$0();) { + t3 = t1.__internal$_current; + if (!this.scanIdentChar$2$caseSensitive(t3 == null ? t2._as(t3) : t3, caseSensitive)) + return false; + } + return true; + }, + expectIdentifier$2$name(text, $name) { + var t1, start, t2, t3, t4, t5, t6; + if ($name == null) + $name = '"' + text + '"'; + t1 = this.scanner; + start = t1._string_scanner$_position; + for (t2 = new A.CodeUnits(text), t3 = type$.CodeUnits, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = "Expected " + $name, t5 = t4 + ".", t3 = t3._eval$1("ListBase.E"); t2.moveNext$0();) { + t6 = t2.__internal$_current; + if (this.scanIdentChar$2$caseSensitive(t6 == null ? t3._as(t6) : t6, false)) + continue; + t1.error$2$position(0, t5, start); + } + if (!this.lookingAtIdentifierBody$0()) + return; + t1.error$2$position(0, t4, start); + }, + expectIdentifier$1(text) { + return this.expectIdentifier$2$name(text, null); + }, + rawText$1(consumer) { + var t1 = this.scanner, + start = t1._string_scanner$_position; + consumer.call$0(); + return t1.substring$1(0, start); + }, + spanFrom$2(start, end) { + var span = this.scanner.spanFrom$2(start, end); + return this._parser1$_interpolationMap == null ? span : new A.LazyFileSpan0(new A.Parser_spanFrom_closure0(this, span)); + }, + spanFrom$1(start) { + return this.spanFrom$2(start, null); + }, + spanFromPosition$2(start, end) { + var span = this.scanner.spanFromPosition$2(start, end); + return this._parser1$_interpolationMap == null ? span : new A.LazyFileSpan0(new A.Parser_spanFromPosition_closure0(this, span)); + }, + spanFromPosition$1(start) { + return this.spanFromPosition$2(start, null); + }, + error$3(_, message, span, trace) { + var exception = new A.StringScannerException(this.scanner.string, message, span); + if (trace == null) + throw A.wrapException(exception); + else + A.throwWithTrace0(exception, this.get$error(this), trace); + }, + error$2(_, message, span) { + return this.error$3(0, message, span, null); + }, + withErrorMessage$1$2(message, callback) { + var error, stackTrace, t1, exception; + try { + t1 = callback.call$0(); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t1)) { + error = t1; + stackTrace = A.getTraceFromException(exception); + t1 = J.get$span$x(error); + A.throwWithTrace0(new A.SourceSpanFormatException(error.get$source(), message, t1), error, stackTrace); + } else + throw exception; + } + }, + withErrorMessage$2(message, callback) { + return this.withErrorMessage$1$2(message, callback, type$.dynamic); + }, + wrapSpanFormatException$1$1(callback) { + var error, stackTrace, map, mapped, error0, stackTrace0, span, secondarySpans, t1, t2, span0, description, _0_0, error1, stackTrace1, span1, t3, exception, t4, _this = this, + _s8_ = "expected"; + try { + try { + t3 = callback.call$0(); + return t3; + } catch (exception) { + t3 = A.unwrapException(exception); + if (type$.SourceSpanFormatException._is(t3)) { + error = t3; + stackTrace = A.getTraceFromException(exception); + map = _this._parser1$_interpolationMap; + if (map == null) + throw exception; + mapped = map.mapException$1(error); + t3 = mapped; + t4 = error; + if (t3 == null ? t4 == null : t3 === t4) + throw exception; + A.throwWithTrace0(mapped, error, stackTrace); + } else + throw exception; + } + } catch (exception) { + t3 = A.unwrapException(exception); + if (type$.MultiSourceSpanFormatException._is(t3)) { + error0 = t3; + stackTrace0 = A.getTraceFromException(exception); + span = J.get$span$x(error0); + t3 = type$.FileSpan; + t4 = type$.String; + secondarySpans = error0.get$secondarySpans().cast$2$0(0, t3, t4); + if (A.startsWithIgnoreCase0(error0._span_exception$_message, _s8_)) { + span = _this._parser1$_adjustExceptionSpan$1(span); + t1 = A.LinkedHashMap_LinkedHashMap$_empty(t3, t4); + for (t3 = A.MapExtensions_get_pairs0(secondarySpans, t3, t4), t3 = t3.get$iterator(t3); t3.moveNext$0();) { + t2 = t3.get$current(t3); + span0 = null; + description = null; + _0_0 = t2; + span0 = _0_0._0; + description = _0_0._1; + J.$indexSet$ax(t1, _this._parser1$_adjustExceptionSpan$1(span0), description); + } + secondarySpans = t1; + } + A.throwWithTrace0(A.MultiSpanSassFormatException$0(error0._span_exception$_message, span, error0.get$primaryLabel(), secondarySpans, null), error0, stackTrace0); + } else if (type$.SourceSpanFormatException._is(t3)) { + error1 = t3; + stackTrace1 = A.getTraceFromException(exception); + span1 = J.get$span$x(error1); + if (A.startsWithIgnoreCase0(error1._span_exception$_message, _s8_)) + span1 = _this._parser1$_adjustExceptionSpan$1(span1); + t1 = error1._span_exception$_message; + t2 = span1; + A.throwWithTrace0(new A.SassFormatException0(B.Set_empty, t1, t2), error1, stackTrace1); + } else + throw exception; + } + }, + wrapSpanFormatException$1(callback) { + return this.wrapSpanFormatException$1$1(callback, type$.dynamic); + }, + _parser1$_adjustExceptionSpan$1(span) { + var start, t1; + if (span.get$length(span) > 0) + return span; + start = this._parser1$_firstNewlineBefore$1(span.get$start(span)); + if (start.$eq(0, span.get$start(span))) + t1 = span; + else { + t1 = start.offset; + t1 = A._FileSpan$(start.file, t1, t1); + } + return t1; + }, + _parser1$_firstNewlineBefore$1($location) { + var lastNewline, codeUnit, + t1 = $location.file, + t2 = $location.offset, + text = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1._decodedChars, 0, t2), 0, null), + index = t2 - 1; + for (lastNewline = null; index >= 0;) { + codeUnit = text.charCodeAt(index); + if (!(codeUnit === 32 || codeUnit === 9 || codeUnit === 10 || codeUnit === 13 || codeUnit === 12)) { + if (lastNewline == null) + t1 = $location; + else { + t2 = new A.FileLocation(t1, lastNewline); + t2.FileLocation$_$2(t1, lastNewline); + t1 = t2; + } + return t1; + } + if (codeUnit === 10 || codeUnit === 13 || codeUnit === 12) + lastNewline = index; + --index; + } + return $location; + } + }; + A.Parser__parseIdentifier_closure0.prototype = { + call$0() { + var t1 = this.$this, + result = t1.identifier$0(); + t1.scanner.expectDone$0(); + return result; + }, + $signature: 29 + }; + A.Parser_escape_closure0.prototype = { + call$1(char) { + return char === 32 || char === 9 || char === 10 || char === 13 || char === 12; + }, + $signature: 31 + }; + A.Parser_scanIdentChar_matches0.prototype = { + call$1(actual) { + var t1 = this.char; + return this.caseSensitive ? actual === t1 : A.characterEqualsIgnoreCase0(t1, actual); + }, + $signature: 50 + }; + A.Parser_spanFrom_closure0.prototype = { + call$0() { + var t1 = this.$this._parser1$_interpolationMap; + if (t1 == null) + t1 = type$.InterpolationMap_2._as(t1); + return t1.mapSpan$1(this.span); + }, + $signature: 16 + }; + A.Parser_spanFromPosition_closure0.prototype = { + call$0() { + var t1 = this.$this._parser1$_interpolationMap; + if (t1 == null) + t1 = type$.InterpolationMap_2._as(t1); + return t1.mapSpan$1(this.span); + }, + $signature: 16 + }; + A.InterpolatedPlaceholderSelector.prototype = { + get$span(_) { + var t1 = this.name.span; + return t1.get$file(t1).span$2(0, t1.get$start(t1).offset - 1, t1.get$end(t1).offset); + }, + accept$1$1(visitor) { + return J.visitPlaceholderSelector$1$x(visitor._simple_selector$_inner, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "%" + this.name.toString$0(0); + } + }; + A.PlaceholderSelector0.prototype = { + accept$1$1(visitor) { + return visitor.visitPlaceholderSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + return new A.PlaceholderSelector0(this.name + suffix, this.span); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlaceholderSelector0 && other.name === this.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + } + }; + A.PlainCssCallable0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.PlainCssCallable0 && this.name === other.name; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name); + }, + $isAsyncCallable0: 1, + $isCallable: 1, + get$name(receiver) { + return this.name; + } + }; + A.PrefixedMapView0.prototype = { + get$keys(_) { + return new A._PrefixedKeys0(this); + }, + get$length(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$length(t1); + }, + get$isEmpty(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$isEmpty(t1); + }, + get$isNotEmpty(_) { + var t1 = this._prefixed_map_view0$_map; + return t1.get$isNotEmpty(t1); + }, + $index(_, key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefixed_map_view0$_prefix) ? this._prefixed_map_view0$_map.$index(0, B.JSString_methods.substring$1(key, this._prefixed_map_view0$_prefix.length)) : null; + }, + containsKey$1(key) { + return typeof key == "string" && B.JSString_methods.startsWith$1(key, this._prefixed_map_view0$_prefix) && this._prefixed_map_view0$_map.containsKey$1(B.JSString_methods.substring$1(key, this._prefixed_map_view0$_prefix.length)); + } + }; + A._PrefixedKeys0.prototype = { + get$length(_) { + var t1 = this._prefixed_map_view0$_view._prefixed_map_view0$_map; + return t1.get$length(t1); + }, + get$iterator(_) { + var t1 = this._prefixed_map_view0$_view._prefixed_map_view0$_map; + t1 = t1.get$keys(t1); + t1 = t1.map$1$1(t1, new A._PrefixedKeys_iterator_closure0(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._prefixed_map_view0$_view.containsKey$1(key); + } + }; + A._PrefixedKeys_iterator_closure0.prototype = { + call$1(key) { + return this.$this._prefixed_map_view0$_view._prefixed_map_view0$_prefix + key; + }, + $signature: 6 + }; + A.ProphotoRgbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + var abs = Math.abs(channel); + return abs <= 0.03125 ? channel / 16 : J.get$sign$in(channel) * Math.pow(abs, 1.8); + }, + fromLinear$1(channel) { + var abs = Math.abs(channel); + return abs >= 0.001953125 ? J.get$sign$in(channel) * Math.pow(abs, 0.5555555555555556) : 16 * channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj0 === dest || B.SrgbColorSpace_thf0 === dest || B.RgbColorSpace_i0P0 === dest) { + t1 = $.$get$linearProphotoRgbToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$linearProphotoRgbToLinearA98Rgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT0 === dest || B.DisplayP3LinearColorSpace_PrP0 === dest) { + t1 = $.$get$linearProphotoRgbToLinearDisplayP30(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$linearProphotoRgbToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$linearProphotoRgbToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$linearProphotoRgbToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$linearProphotoRgbToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.InterpolatedPseudoSelector.prototype = { + accept$1$1(visitor) { + return J.visitPseudoSelector$1$x(visitor._simple_selector$_inner, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t2, _1_0, _this = this, + t1 = _this.isSyntacticClass ? ":" : "::", + result = t1 + _this.name.toString$0(0); + t1 = _this.argument; + t2 = t1 == null; + if (!t2 || _this.selector != null) { + result += "("; + if (!t2) { + result += t1.toString$0(0); + if (_this.selector != null) + result += " "; + } + _1_0 = _this.selector; + result = (_1_0 != null ? result + B.JSArray_methods.join$1(_1_0.components, ", ") : result) + ")"; + } + return result; + }, + get$span(receiver) { + return this.span; + } + }; + A.PseudoSelector0.prototype = { + get$isHostContext() { + return this.isClass && this.name === "host-context" && this.selector != null; + }, + get$hasComplicatedSuperselectorSemantics() { + return !this.isClass || this.selector != null; + }, + get$specificity() { + var result, _this = this, + value = _this._pseudo$__PseudoSelector_specificity_FI; + if (value === $) { + result = new A.PseudoSelector_specificity_closure0(_this).call$0(); + _this._pseudo$__PseudoSelector_specificity_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._pseudo$__PseudoSelector_specificity_FI = result; + value = result; + } + return value; + }, + withSelector$1(selector) { + var _this = this; + return A.PseudoSelector$0(_this.name, _this.span, _this.argument, !_this.isClass, selector); + }, + addSuffix$1(suffix) { + var _this = this; + if (_this.argument != null || _this.selector != null) + _this.super$SimpleSelector$addSuffix0(suffix); + return A.PseudoSelector$0(_this.name + suffix, _this.span, null, !_this.isClass, null); + }, + unify$1(compound) { + var other, result, t2, addedThis, _i, simple, _this = this, + t1 = _this.name; + if (t1 === "host" || t1 === "host-context") { + if (!B.JSArray_methods.every$1(compound, new A.PseudoSelector_unify_closure0())) + return null; + } else { + t1 = false; + if (compound.length === 1) { + other = compound[0]; + if (!(other instanceof A.UniversalSelector0)) { + if (other instanceof A.PseudoSelector0) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + } else + t1 = true; + } else + other = null; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector_2)); + } + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector_2); + for (t1 = compound.length, t2 = !_this.isClass, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (simple instanceof A.PseudoSelector0 && !simple.isClass) { + if (t2) + return null; + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var selector, t1, t2, _this = this; + if (_this.super$SimpleSelector$isSuperselector0(other)) + return true; + selector = _this.selector; + if (selector == null) + return _this.$eq(0, other); + if (other instanceof A.PseudoSelector0 && !_this.isClass && !other.isClass && _this.normalizedName === "slotted" && other.name === _this.name) { + t1 = A.NullableExtension_andThen0(other.selector, selector.get$isSuperselector()); + return t1 == null ? false : t1; + } + t1 = type$.JSArray_SimpleSelector_2; + t2 = _this.span; + return A.compoundIsSuperselector0(A.CompoundSelector$0(A._setArrayType([_this], t1), t2), A.CompoundSelector$0(A._setArrayType([other], t1), t2), null); + }, + accept$1$1(visitor) { + return visitor.visitPseudoSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + $eq(_, other) { + var _this = this; + if (other == null) + return false; + return other instanceof A.PseudoSelector0 && other.name === _this.name && other.isClass === _this.isClass && other.argument == _this.argument && J.$eq$(other.selector, _this.selector); + }, + get$hashCode(_) { + var _this = this, + t1 = B.JSString_methods.get$hashCode(_this.name), + t2 = !_this.isClass ? 519018 : 218159; + return t1 ^ t2 ^ J.get$hashCode$(_this.argument) ^ J.get$hashCode$(_this.selector); + } + }; + A.PseudoSelector_specificity_closure0.prototype = { + call$0() { + var selector, t2, + t1 = this.$this; + if (!t1.isClass) + return 1; + selector = t1.selector; + if (selector == null) + return A.SimpleSelector0.prototype.get$specificity.call(t1); + switch (t1.normalizedName) { + case "where": + return 0; + case "is": + case "not": + case "has": + case "matches": + t1 = selector.components; + return A.IterableIntegerExtension_get_max(new A.MappedListIterable(t1, new A.PseudoSelector_specificity__closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,int>"))); + case "nth-child": + case "nth-last-child": + t1 = A.SimpleSelector0.prototype.get$specificity.call(t1); + t2 = selector.components; + return t1 + A.IterableIntegerExtension_get_max(new A.MappedListIterable(t2, new A.PseudoSelector_specificity__closure2(), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,int>"))); + default: + return A.SimpleSelector0.prototype.get$specificity.call(t1); + } + }, + $signature: 10 + }; + A.PseudoSelector_specificity__closure1.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 261 + }; + A.PseudoSelector_specificity__closure2.prototype = { + call$1(component) { + return component.get$specificity(); + }, + $signature: 261 + }; + A.PseudoSelector_unify_closure0.prototype = { + call$1(simple) { + var t1; + if (simple instanceof A.PseudoSelector0) + t1 = simple.isClass && simple.name === "host" || simple.selector != null; + else + t1 = false; + return t1; + }, + $signature: 15 + }; + A.PublicMemberMapView0.prototype = { + get$keys(_) { + var t1 = this._public_member_map_view0$_inner; + t1 = t1.get$keys(t1); + return t1.where$1(t1, A.utils1__isPublic$closure()); + }, + containsKey$1(key) { + return typeof key == "string" && A.isPublic0(key) && this._public_member_map_view0$_inner.containsKey$1(key); + }, + $index(_, key) { + if (typeof key == "string" && A.isPublic0(key)) + return this._public_member_map_view0$_inner.$index(0, key); + return null; + } + }; + A.InterpolatedQualifiedName.prototype = { + toString$0(_) { + var t1, + _0_0 = this.namespace; + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.toString$0(0) + "|" + this.name.toString$0(0); + break $label0$0; + } + t1 = this.name.toString$0(0); + break $label0$0; + } + return t1; + }, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.QualifiedName0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.QualifiedName0 && other.name === this.name && other.namespace == this.namespace; + }, + get$hashCode(_) { + return B.JSString_methods.get$hashCode(this.name) ^ J.get$hashCode$(this.namespace); + }, + toString$0(_) { + var t1 = this.namespace, + t2 = this.name; + return t1 == null ? t2 : t1 + "|" + t2; + } + }; + A.Rec2020ColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + toLinear$1(channel) { + var abs = Math.abs(channel); + return abs < 0.08124285829863151 ? channel / 4.5 : J.get$sign$in(channel) * Math.pow((abs + 1.09929682680944 - 1) / 1.09929682680944, 2.2222222222222223); + }, + fromLinear$1(channel) { + var abs = Math.abs(channel); + return abs > 0.018053968510807 ? J.get$sign$in(channel) * (1.09929682680944 * Math.pow(abs, 0.45) - 0.09929682680944008) : 4.5 * channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj0 === dest || B.SrgbColorSpace_thf0 === dest || B.RgbColorSpace_i0P0 === dest) { + t1 = $.$get$linearRec2020ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$linearRec2020ToLinearA98Rgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT0 === dest || B.DisplayP3LinearColorSpace_PrP0 === dest) { + t1 = $.$get$linearRec2020ToLinearDisplayP30(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$linearRec2020ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$linearRec2020ToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$linearRec2020ToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$linearRec2020ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.JSClass0.prototype = {}; + A.JSClassExtension_setCustomInspect_closure.prototype = { + call$4($self, _, __, ___) { + return this.inspect.call$1($self); + }, + call$3($self, _, __) { + return this.call$4($self, _, __, null); + }, + "call*": "call$4", + $requiredArgCount: 3, + $defaultValues() { + return [null]; + }, + $signature: 585 + }; + A.JSClassExtension_get_defineStaticMethod_closure.prototype = { + call$2($name, body) { + this._this[$name] = A.allowInteropNamed($name, body); + return null; + }, + $signature: 135 + }; + A.JSClassExtension_get_defineMethod_closure.prototype = { + call$2($name, body) { + J.get$$prototype$x(this._this)[$name] = A.allowInteropCaptureThisNamed($name, body); + return null; + }, + $signature: 135 + }; + A.JSClassExtension_get_defineGetter_closure.prototype = { + call$2($name, body) { + A.defineGetter(J.get$$prototype$x(this._this), $name, body, null); + return null; + }, + $signature: 135 + }; + A.RenderContext0.prototype = {}; + A.RenderContextOptions0.prototype = {}; + A.RenderContextResult0.prototype = {}; + A.RenderContextResultStats0.prototype = {}; + A.RenderOptions.prototype = {}; + A.RenderResult.prototype = {}; + A.RenderResultStats.prototype = {}; + A.ReplaceExpressionVisitor0.prototype = { + visitBinaryOperationExpression$1(_, node) { + return new A.BinaryOperationExpression0(node.operator, node.left.accept$1(this), node.right.accept$1(this), false); + }, + visitBooleanExpression$1(_, node) { + return node; + }, + visitColorExpression$1(_, node) { + return node; + }, + visitFunctionExpression$1(_, node) { + var t1 = node.originalName, + t2 = this.visitArgumentList$1(node.$arguments); + return new A.FunctionExpression0(node.namespace, A.stringReplaceAllUnchecked(t1, "_", "-"), t1, t2, node.span); + }, + visitInterpolatedFunctionExpression$1(_, node) { + return new A.InterpolatedFunctionExpression0(this.visitInterpolation$1(node.name), this.visitArgumentList$1(node.$arguments), node.span); + }, + visitLegacyIfExpression$1(_, node) { + return new A.LegacyIfExpression0(this.visitArgumentList$1(node.$arguments), node.span); + }, + visitListExpression$1(_, node) { + var t1 = node.contents; + return new A.ListExpression0(A.List_List$unmodifiable(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitListExpression_closure0(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression0>")), type$.Expression_2), node.separator, node.hasBrackets, node.span); + }, + visitMapExpression$1(_, node) { + var t2, t3, _i, t4, + t1 = A._setArrayType([], type$.JSArray_Record_2_Expression_and_Expression_2); + for (t2 = node.pairs, t3 = t2.length, _i = 0; _i < t3; ++_i) { + t4 = t2[_i]; + t1.push(new A._Record_2(t4._0.accept$1(this), t4._1.accept$1(this))); + } + return new A.MapExpression0(A.List_List$unmodifiable(t1, type$.Record_2_Expression_and_Expression_2), node.span); + }, + visitNullExpression$1(_, node) { + return node; + }, + visitNumberExpression$1(_, node) { + return node; + }, + visitParenthesizedExpression$1(_, node) { + return new A.ParenthesizedExpression0(node.expression.accept$1(this), node.span); + }, + visitSelectorExpression$1(_, node) { + return node; + }, + visitStringExpression$1(_, node) { + return new A.StringExpression0(this.visitInterpolation$1(node.text), node.hasQuotes); + }, + visitSupportsExpression$1(_, node) { + return new A.SupportsExpression0(this.visitSupportsCondition$1(node.condition)); + }, + visitUnaryOperationExpression$1(_, node) { + return new A.UnaryOperationExpression0(node.operator, node.operand.accept$1(this), node.span); + }, + visitValueExpression$1(_, node) { + return node; + }, + visitVariableExpression$1(_, node) { + return node; + }, + visitIfConditionParenthesized$1(_, node) { + return new A.IfConditionParenthesized0(node.expression.accept$1(this), node.span); + }, + visitIfConditionNegation$1(_, node) { + return new A.IfConditionNegation0(node.expression.accept$1(this), node.span); + }, + visitIfConditionOperation$1(_, node) { + var t1 = node.expressions; + return A.IfConditionOperation$0(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitIfConditionOperation_closure0(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,IfConditionExpression0>")), node.op); + }, + visitIfConditionFunction$1(_, node) { + return new A.IfConditionFunction0(this.visitInterpolation$1(node.name), this.visitInterpolation$1(node.$arguments), node.span); + }, + visitIfConditionSass$1(_, node) { + return new A.IfConditionSass0(node.expression.accept$1(this), node.span); + }, + visitIfConditionRaw$1(_, node) { + return new A.IfConditionRaw0(this.visitInterpolation$1(node.text)); + }, + visitArgumentList$1(invocation) { + var _this = this, + t1 = invocation.positional, + t2 = type$.String, + t3 = type$.Expression_2, + t4 = A.LinkedHashMap_LinkedHashMap$_empty(t2, t3); + for (t2 = A.MapExtensions_get_pairs0(invocation.named, t2, t3), t2 = t2.get$iterator(t2); t2.moveNext$0();) { + t3 = t2.get$current(t2); + t4.$indexSet(0, t3._0, t3._1.accept$1(_this)); + } + t2 = invocation.rest; + t2 = t2 == null ? null : t2.accept$1(_this); + t3 = invocation.keywordRest; + t3 = t3 == null ? null : t3.accept$1(_this); + return A.ArgumentList$0(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitArgumentList_closure0(_this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Expression0>")), t4, invocation.namedSpans, invocation.span, t3, t2); + }, + visitSupportsCondition$1(condition) { + var _this = this; + if (condition instanceof A.SupportsOperation0) + return new A.SupportsOperation0(_this.visitSupportsCondition$1(condition.left), _this.visitSupportsCondition$1(condition.right), condition.operator, condition.span); + else if (condition instanceof A.SupportsNegation0) + return new A.SupportsNegation0(_this.visitSupportsCondition$1(condition.condition), condition.span); + else if (condition instanceof A.SupportsInterpolation0) + return new A.SupportsInterpolation0(condition.expression.accept$1(_this), condition.span); + else if (condition instanceof A.SupportsDeclaration0) + return new A.SupportsDeclaration0(condition.name.accept$1(_this), condition.value.accept$1(_this), condition.span); + else + throw A.wrapException(A.SassException$0("BUG: Unknown SupportsCondition " + condition.toString$0(0) + ".", condition.get$span(condition), null)); + }, + visitInterpolation$1(interpolation) { + var t1 = interpolation.contents; + return A.Interpolation$0(new A.MappedListIterable(t1, new A.ReplaceExpressionVisitor_visitInterpolation_closure0(this), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Object>")), interpolation.spans, interpolation.span); + } + }; + A.ReplaceExpressionVisitor_visitListExpression_closure0.prototype = { + call$1(item) { + return item.accept$1(this.$this); + }, + $signature: 262 + }; + A.ReplaceExpressionVisitor_visitIfConditionOperation_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 588 + }; + A.ReplaceExpressionVisitor_visitArgumentList_closure0.prototype = { + call$1(expression) { + return expression.accept$1(this.$this); + }, + $signature: 262 + }; + A.ReplaceExpressionVisitor_visitInterpolation_closure0.prototype = { + call$1(node) { + return node instanceof A.Expression0 ? node.accept$1(this.$this) : node; + }, + $signature: 75 + }; + A.ImporterResult0.prototype = { + get$sourceMapUrl(_) { + var t1 = this._result$_sourceMapUrl; + return t1 == null ? A.Uri_Uri$dataFromString(this.contents, B.C_Utf8Codec, null) : t1; + } + }; + A.ReturnRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitReturnRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@return " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.RgbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + get$isLegacyInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1 = red == null ? null : red / 255, + t2 = green == null ? null : green / 255; + return B.SrgbColorSpace_thf0.convert$5(dest, t1, t2, blue == null ? null : blue / 255, alpha); + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear0(channel / 255); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear0(channel) * 255; + } + }; + A.SassParser0.prototype = { + get$currentIndentation() { + return this._sass0$_currentIndentation; + }, + get$indented() { + return true; + }, + styleRuleSelector$0() { + var t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + do { + buffer.addInterpolation$1(_this.almostAnyValue$1$omitComments(true)); + t4 = A.Primitives_stringFromCharCode(10); + t4 = t3._contents += t4; + } while (B.JSString_methods.endsWith$1(B.JSString_methods.trimRight$0(t4.charCodeAt(0) == 0 ? t4 : t4), ",") && _this.scanCharIf$1(new A.SassParser_styleRuleSelector_closure0())); + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + expectStatementSeparator$1($name) { + var t1, _this = this, + trailingSemicolon = _this._sass0$_tryTrailingSemicolon$0(); + if (!_this.atEndOfStatement$0()) + _this._sass0$_expectNewline$1$trailingSemicolon(trailingSemicolon); + if (_this._sass0$_peekIndentation$0() <= _this._sass0$_currentIndentation) + return; + t1 = $name == null ? "here" : "beneath a " + $name; + _this.scanner.error$2$position(0, "Nothing may be indented " + t1 + ".", _this._sass0$_nextIndentationEnd.position); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var t1 = this.scanner.peekChar$0(); + if (t1 == null) + t1 = null; + else + t1 = t1 === 10 || t1 === 13 || t1 === 12; + return t1 !== false; + }, + lookingAtChildren$0() { + return this.atEndOfStatement$0() && this._sass0$_peekIndentation$0() > this._sass0$_currentIndentation; + }, + importArgument$0() { + var url, span, innerError, stackTrace, t1, _0_0, start, t2, next, t3, exception, _this = this; + $label0$0: { + t1 = _this.scanner; + _0_0 = t1.peekChar$0(); + if (117 === _0_0 || 85 === _0_0) { + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this.scanIdentifier$1("url")) + if (t1.scanChar$1(40)) { + t1.set$state(start); + return _this.super$StylesheetParser$importArgument0(); + } else + t1.set$state(start); + break $label0$0; + } + if (39 === _0_0 || 34 === _0_0) + return _this.super$StylesheetParser$importArgument0(); + } + t2 = t1._string_scanner$_position; + next = t1.peekChar$0(); + for (;;) { + t3 = false; + if (next != null) + if (next !== 44) + if (next !== 59) + t3 = !(next === 10 || next === 13 || next === 12); + if (!t3) + break; + t1.readChar$0(); + next = t1.peekChar$0(); + } + url = t1.substring$1(0, t2); + span = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (_this.isPlainImportUrl$1(url)) + return new A.StaticImport0(new A.Interpolation0(A.List_List$unmodifiable([A.serializeValue0(new A.SassString0(url, true), true, true)], type$.Object), B.List_null, span), null, span); + else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport0(t1, span); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), span, stackTrace); + } else + throw exception; + } + }, + scanElse$1(ifIndentation) { + var t1, t2, startIndentation, startNextIndentation, startNextIndentationEnd, _this = this; + if (_this._sass0$_peekIndentation$0() !== ifIndentation) + return false; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + startIndentation = _this._sass0$_currentIndentation; + startNextIndentation = _this._sass0$_nextIndentation; + startNextIndentationEnd = _this._sass0$_nextIndentationEnd; + _this._sass0$_readIndentation$0(); + if (t1.scanChar$1(64) && _this.scanIdentifier$1("else")) + return true; + t1.set$state(new A._SpanScannerState(t1, t2)); + _this._sass0$_currentIndentation = startIndentation; + _this._sass0$_nextIndentation = startNextIndentation; + _this._sass0$_nextIndentationEnd = startNextIndentationEnd; + return false; + }, + children$1(_, child) { + var children = A._setArrayType([], type$.JSArray_Statement_2); + this._sass0$_whileIndentedLower$1(new A.SassParser_children_closure0(this, child, children)); + return children; + }, + statements$1(statement) { + var statements, t2, _1_0, + t1 = this.scanner, + _0_0 = t1.peekChar$0(); + if (9 === _0_0 || 32 === _0_0) + t1.error$3$length$position(0, string$.Indent, t1._string_scanner$_position, 0); + statements = A._setArrayType([], type$.JSArray_Statement_2); + for (t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + _1_0 = this._sass0$_child$1(statement); + if (_1_0 != null) + statements.push(_1_0); + this._sass0$_readIndentation$0(); + } + return statements; + }, + _sass0$_child$1(child) { + var _0_0, _this = this, + t1 = _this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + if (13 === _1_0 || 10 === _1_0 || 12 === _1_0) { + t1 = null; + break $label0$0; + } + if (36 === _1_0) { + t1 = _this.variableDeclarationWithoutNamespace$0(); + break $label0$0; + } + if (47 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (47 === _0_0) { + t1 = _this._sass0$_silentComment$0(); + break $label1$1; + } + if (42 === _0_0) { + t1 = _this._sass0$_loudComment$0(); + break $label1$1; + } + t1 = child.call$0(); + break $label1$1; + } + break $label0$0; + } + t1 = child.call$0(); + break $label0$0; + } + return t1; + }, + _sass0$_silentComment$0() { + var buffer, parentIndentation, t3, t4, t5, commentPrefix, i, t6, i0, t7, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("//"); + buffer = new A.StringBuffer(""); + parentIndentation = _this._sass0$_currentIndentation; + t3 = t1.string.length; + t4 = 1 + parentIndentation; + t5 = 2 + parentIndentation; + $label0$0: + do { + commentPrefix = t1.scanChar$1(47) ? "///" : "//"; + for (i = commentPrefix.length;;) { + t6 = buffer._contents += commentPrefix; + for (i0 = i; i0 < _this._sass0$_currentIndentation - parentIndentation; ++i0) { + t6 += A.Primitives_stringFromCharCode(32); + buffer._contents = t6; + } + for (;;) { + if (t1._string_scanner$_position !== t3) { + t7 = t1.peekChar$0(); + t7 = !(t7 === 10 || t7 === 13 || t7 === 12); + } else + t7 = false; + if (!t7) + break; + t6 += A.Primitives_stringFromCharCode(t1.readChar$0()); + buffer._contents = t6; + } + buffer._contents = t6 + "\n"; + if (_this._sass0$_peekIndentation$0() < parentIndentation) + break $label0$0; + if (_this._sass0$_peekIndentation$0() === parentIndentation) { + if (t1.peekChar$1(t4) === 47 && t1.peekChar$1(t5) === 47) + _this._sass0$_readIndentation$0(); + break; + } + _this._sass0$_readIndentation$0(); + } + } while (t1.scan$1("//")); + t3 = buffer._contents; + return _this.lastSilentComment = new A.SilentComment0(t3.charCodeAt(0) == 0 ? t3 : t3, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _sass0$_loudComment$0() { + var t2, t3, t4, buffer, parentIndentation, t5, t6, first, beginningOfComment, t7, end, i, _1_0, _0_0, span, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expect$1("/*"); + t2 = new A.StringBuffer(""); + t3 = A._setArrayType([], type$.JSArray_Object); + t4 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer0(t2, t3, t4); + t2._contents = "/*"; + parentIndentation = _this._sass0$_currentIndentation; + for (t5 = t1.string, t6 = t5.length, first = true;; first = false) { + if (first) { + beginningOfComment = t1._string_scanner$_position; + _this.spaces$0(); + t7 = t1.peekChar$0(); + if (t7 === 10 || t7 === 13 || t7 === 12) { + _this._sass0$_readIndentation$0(); + t7 = A.Primitives_stringFromCharCode(32); + t2._contents += t7; + } else { + end = t1._string_scanner$_position; + t2._contents += B.JSString_methods.substring$2(t5, beginningOfComment, end); + } + } else + t2._contents = (t2._contents += "\n") + " * "; + for (i = 3; i < _this._sass0$_currentIndentation - parentIndentation; ++i) { + t7 = A.Primitives_stringFromCharCode(32); + t2._contents += t7; + } + while (t1._string_scanner$_position !== t6) { + _1_0 = t1.peekChar$0(); + if (10 === _1_0 || 13 === _1_0 || 12 === _1_0) + break; + if (35 === _1_0) { + if (t1.peekChar$1(1) === 123) { + _0_0 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t3.push(_0_0._0); + t4.push(_0_0._1); + } else { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t7; + } + continue; + } + if (42 === _1_0) { + if (t1.peekChar$1(1) === 47) { + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + span = _this.spanFrom$1(start); + _this.whitespace$1$consumeNewlines(false); + for (;;) { + t2 = t1.peekChar$0(); + if (!((t2 === 10 || t2 === 13 || t2 === 12) && _this._sass0$_peekIndentation$0() > parentIndentation)) + break; + while (_this._sass0$_lookingAtDoubleNewline$0()) + _this._sass0$_expectNewline$0(); + _this._sass0$_readIndentation$0(); + _this.whitespace$1$consumeNewlines(false); + } + if (t1._string_scanner$_position !== t6) { + t2 = t1.peekChar$0(); + t2 = !(t2 === 10 || t2 === 13 || t2 === 12); + } else + t2 = false; + if (t2) { + t2 = t1._string_scanner$_position; + for (;;) { + if (t1._string_scanner$_position !== t6) { + t3 = t1.peekChar$0(); + t3 = !(t3 === 10 || t3 === 13 || t3 === 12); + } else + t3 = false; + if (!t3) + break; + t1.readChar$0(); + } + throw A.wrapException(A.MultiSpanSassFormatException$0("Unexpected text after end of comment", _this.spanFrom$1(new A._SpanScannerState(t1, t2)), "extra text", A.LinkedHashMap_LinkedHashMap$_literal([span, "comment"], type$.FileSpan, type$.String), null)); + } else + return new A.LoudComment0(buffer.interpolation$1(span)); + } else { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t7; + } + continue; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t7; + } + if (_this._sass0$_peekIndentation$0() <= parentIndentation) + break; + while (_this._sass0$_lookingAtDoubleNewline$0()) { + _this._sass0$_expectNewline$0(); + t2._contents = (t2._contents += "\n") + " *"; + } + _this._sass0$_readIndentation$0(); + } + return new A.LoudComment0(buffer.interpolation$1(_this.spanFrom$1(start))); + }, + whitespaceWithoutComments$1$consumeNewlines(consumeNewlines) { + var t1, t2, next, t3; + for (t1 = this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) { + next = t1.peekChar$0(); + if (consumeNewlines) + t3 = !(next === 32 || next === 9 || next === 10 || next === 13 || next === 12); + else + t3 = !(next === 32 || next === 9); + if (t3) + break; + t1.readChar$0(); + } + }, + _sass0$_expectNewline$1$trailingSemicolon(trailingSemicolon) { + var t1 = this.scanner, + _0_0 = t1.peekChar$0(); + if (13 === _0_0) { + t1.readChar$0(); + if (t1.peekChar$0() === 10) + t1.readChar$0(); + return; + } + if (10 === _0_0 || 12 === _0_0) { + t1.readChar$0(); + return; + } + t1.error$1(0, trailingSemicolon ? string$.multip : "expected newline."); + }, + _sass0$_expectNewline$0() { + return this._sass0$_expectNewline$1$trailingSemicolon(false); + }, + _sass0$_lookingAtDoubleNewline$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label1$1: { + t2 = false; + if (13 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label0$0: { + if (10 === _0_0) { + t1 = t1.peekChar$1(2); + t1 = t1 === 10 || t1 === 13 || t1 === 12; + break $label0$0; + } + if (13 === _0_0 || 12 === _0_0) { + t1 = true; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + break $label1$1; + } + if (10 === _1_0 || 12 === _1_0) { + t1 = t1.peekChar$1(1); + t1 = t1 === 10 || t1 === 13 || t1 === 12; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + return t1; + }, + _sass0$_whileIndentedLower$1(body) { + var t1, t2, childIndentation, indentation, t3, t4, _this = this, + parentIndentation = _this._sass0$_currentIndentation; + for (t1 = _this.scanner, t2 = t1._sourceFile, childIndentation = null; _this._sass0$_peekIndentation$0() > parentIndentation;) { + indentation = _this._sass0$_readIndentation$0(); + if (childIndentation == null) + childIndentation = indentation; + if (childIndentation !== indentation) { + t3 = t1._string_scanner$_position; + t4 = t2.getColumn$1(t3); + t1.error$3$length$position(0, "Inconsistent indentation, expected " + childIndentation + " spaces.", t2.getColumn$1(t1._string_scanner$_position), t3 - t4); + } + body.call$0(); + } + }, + _sass0$_readIndentation$0() { + var t1, _this = this, + currentIndentation = _this._sass0$_nextIndentation; + if (currentIndentation == null) + currentIndentation = _this._sass0$_nextIndentation = _this._sass0$_peekIndentation$0(); + _this._sass0$_currentIndentation = currentIndentation; + t1 = _this._sass0$_nextIndentationEnd; + t1.toString; + _this.scanner.set$state(t1); + _this._sass0$_nextIndentationEnd = _this._sass0$_nextIndentation = null; + return currentIndentation; + }, + _sass0$_peekIndentation$0() { + var t1, t2, t3, start, containsTab, containsSpace, nextIndentation, _1_0, t4, _this = this, + _0_0 = _this._sass0$_nextIndentation; + if (_0_0 != null) + return _0_0; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + t3 = t1.string.length; + if (t2 === t3) { + _this._sass0$_nextIndentation = 0; + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t2); + return 0; + } + start = new A._SpanScannerState(t1, t2); + if (!_this.scanCharIf$1(new A.SassParser__peekIndentation_closure1())) + t1.error$2$position(0, "Expected newline.", t1._string_scanner$_position); + containsTab = A._Cell$(); + containsSpace = A._Cell$(); + nextIndentation = A._Cell$(); + do { + containsSpace.__late_helper$_value = containsTab.__late_helper$_value = false; + nextIndentation.__late_helper$_value = 0; + for (;;) { + $label0$0: { + _1_0 = t1.peekChar$0(); + if (32 === _1_0) { + containsSpace.__late_helper$_value = true; + break $label0$0; + } + if (9 === _1_0) { + containsTab.__late_helper$_value = true; + break $label0$0; + } + break; + } + t2 = nextIndentation.__late_helper$_value; + if (t2 === nextIndentation) + A.throwExpression(A.LateError$localNI("")); + nextIndentation.__late_helper$_value = t2 + 1; + t1.readChar$0(); + } + t2 = t1._string_scanner$_position; + if (t2 === t3) { + _this._sass0$_nextIndentation = 0; + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t2); + t1.set$state(start); + return 0; + } + } while (_this.scanCharIf$1(new A.SassParser__peekIndentation_closure2())); + t2 = containsTab._readLocal$0(); + t3 = containsSpace._readLocal$0(); + if (t2) { + if (t3) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Tabs and spaces may not be mixed.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } else if (_this._sass0$_spaces === true) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected spaces, was tabs.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + } else if (t3 && _this._sass0$_spaces === false) { + t2 = t1._string_scanner$_position; + t3 = t1._sourceFile; + t4 = t3.getColumn$1(t2); + t1.error$3$length$position(0, "Expected tabs, was spaces.", t3.getColumn$1(t1._string_scanner$_position), t2 - t4); + } + _this._sass0$_nextIndentation = nextIndentation._readLocal$0(); + if (nextIndentation._readLocal$0() > 0) + if (_this._sass0$_spaces == null) + _this._sass0$_spaces = containsSpace._readLocal$0(); + _this._sass0$_nextIndentationEnd = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.set$state(start); + return nextIndentation._readLocal$0(); + }, + _sass0$_tryTrailingSemicolon$0() { + if (this.scanCharIf$1(new A.SassParser__tryTrailingSemicolon_closure0())) { + this.whitespace$1$consumeNewlines(false); + return true; + } + return false; + } + }; + A.SassParser_styleRuleSelector_closure0.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 31 + }; + A.SassParser_children_closure0.prototype = { + call$0() { + var _0_0 = this.$this._sass0$_child$1(this.child); + if (_0_0 != null) + this.children.push(_0_0); + }, + $signature: 0 + }; + A.SassParser__peekIndentation_closure1.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 31 + }; + A.SassParser__peekIndentation_closure2.prototype = { + call$1(char) { + return char === 10 || char === 13 || char === 12; + }, + $signature: 31 + }; + A.SassParser__tryTrailingSemicolon_closure0.prototype = { + call$1(char) { + return char === 59; + }, + $signature: 31 + }; + A._Exports.prototype = {}; + A._wrapMain_closure.prototype = { + call$1(_) { + return A._translateReturnValue(this.main.call$0()); + }, + $signature: 108 + }; + A._wrapMain_closure0.prototype = { + call$1(args) { + return A._translateReturnValue(this.main.call$1(A.List_List$from(type$.List_dynamic._as(args), true, type$.String))); + }, + $signature: 108 + }; + A.ScssParser0.prototype = { + get$indented() { + return false; + }, + get$currentIndentation() { + return 0; + }, + styleRuleSelector$0() { + return this.almostAnyValue$0(); + }, + expectStatementSeparator$1($name) { + var t1, _0_0; + this.whitespaceWithoutComments$1$consumeNewlines(true); + t1 = this.scanner; + if (t1._string_scanner$_position === t1.string.length) + return; + _0_0 = t1.peekChar$0(); + if (59 === _0_0 || 125 === _0_0) + return; + t1.expectChar$1(59); + }, + expectStatementSeparator$0() { + return this.expectStatementSeparator$1(null); + }, + atEndOfStatement$0() { + var next = this.scanner.peekChar$0(); + return next == null || next === 59 || next === 125 || next === 123; + }, + lookingAtChildren$0() { + return this.scanner.peekChar$0() === 123; + }, + scanElse$1(ifIndentation) { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + _this.whitespace$1$consumeNewlines(true); + t3 = t1._string_scanner$_position; + if (t1.scanChar$1(64)) { + if (_this.scanIdentifier$2$caseSensitive("else", true)) + return true; + if (_this.scanIdentifier$2$caseSensitive("elseif", true)) { + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_VUl, string$.x40elsei, _this.spanFrom$1(new A._SpanScannerState(t1, t3)))); + t1.set$position(t1._string_scanner$_position - 2); + return true; + } + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return false; + }, + children$1(_, child) { + var children, _this = this, + t1 = _this.scanner; + t1.expectChar$1(123); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + children = A._setArrayType([], type$.JSArray_Statement_2); + for (;;) + switch (t1.peekChar$0()) { + case 36: + children.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + children.push(_this._scss0$_silentComment$0()); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + case 42: + children.push(_this._scss0$_loudComment$0()); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + default: + children.push(child.call$0()); + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + case 125: + t1.expectChar$1(125); + return children; + default: + children.push(child.call$0()); + } + }, + statements$1(statement) { + var t1, t2, _0_0, _1_0, _this = this, + statements = A._setArrayType([], type$.JSArray_Statement_2); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + for (t1 = _this.scanner, t2 = t1.string.length; t1._string_scanner$_position !== t2;) + switch (t1.peekChar$0()) { + case 36: + statements.push(_this.variableDeclarationWithoutNamespace$0()); + break; + case 47: + switch (t1.peekChar$1(1)) { + case 47: + statements.push(_this._scss0$_silentComment$0()); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + case 42: + statements.push(_this._scss0$_loudComment$0()); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + default: + _0_0 = statement.call$0(); + if (_0_0 != null) + statements.push(_0_0); + } + break; + case 59: + t1.readChar$0(); + _this.whitespaceWithoutComments$1$consumeNewlines(true); + break; + default: + _1_0 = statement.call$0(); + if (_1_0 != null) + statements.push(_1_0); + } + return statements; + }, + _scss0$_silentComment$0() { + var t3, t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + start = new A._SpanScannerState(t1, t2); + t1.expect$1("//"); + t3 = t1.string.length; + do { + for (;;) { + if (t1._string_scanner$_position !== t3) { + t4 = t1.readChar$0(); + t4 = !(t4 === 10 || t4 === 13 || t4 === 12); + } else + t4 = false; + if (!t4) + break; + } + if (t1._string_scanner$_position === t3) + break; + _this.spaces$0(); + } while (t1.scan$1("//")); + if (_this.get$plainCss()) + _this.error$2(0, string$.Silent, _this.spanFrom$1(start)); + return _this.lastSilentComment = new A.SilentComment0(t1.substring$1(0, t2), _this.spanFrom$1(start)); + }, + _scss0$_loudComment$0() { + var t3, t4, t5, buffer, _0_0, t6, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("/*"); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer0(t3, t4, t5); + t3._contents = "/*"; + $label0$1: + for (;;) + switch (t1.peekChar$0()) { + case 35: + if (t1.peekChar$1(1) === 123) { + _0_0 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + } else { + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + } + break; + case 42: + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + if (t1.peekChar$0() !== 47) + continue $label0$1; + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t4; + return new A.LoudComment0(buffer.interpolation$1(this.spanFrom$1(new A._SpanScannerState(t1, t2)))); + case 13: + t1.readChar$0(); + if (t1.peekChar$0() !== 10) { + t6 = A.Primitives_stringFromCharCode(10); + t3._contents += t6; + } + break; + case 12: + t1.readChar$0(); + t6 = A.Primitives_stringFromCharCode(10); + t3._contents += t6; + break; + default: + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + } + } + }; + A.Selector0.prototype = { + assertNotBogus$1$name($name) { + if (!this.accept$1(B._IsBogusVisitor_true0)) + return; + A.warnForDeprecation0("$" + $name + ": " + (this.toString$0(0) + string$.x20is_nov), B.Deprecation_2PR); + }, + toString$0(_) { + var _null = null, + visitor = A._SerializeVisitor$0(_null, true, _null, _null, true, false, _null, true); + this.accept$1(visitor); + return visitor._serialize0$_buffer.toString$0(0); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A._IsInvisibleVisitor2.prototype = { + visitSelectorList$1(list) { + return B.JSArray_methods.every$1(list.components, this.get$visitComplexSelector()); + }, + visitComplexSelector$1(complex) { + var t1; + if (!this.super$AnySelectorVisitor$visitComplexSelector0(complex)) + t1 = this.includeBogus && complex.accept$1(B._IsBogusVisitor_false0); + else + t1 = true; + return t1; + }, + visitPlaceholderSelector$1(_, placeholder) { + return true; + }, + visitPseudoSelector$1(_, pseudo) { + var t1, + _0_0 = pseudo.selector; + if (_0_0 != null) { + if (pseudo.name === "not") + t1 = this.includeBogus && _0_0.accept$1(B._IsBogusVisitor_true0); + else + t1 = this.visitSelectorList$1(_0_0); + return t1; + } else + return false; + } + }; + A._IsBogusVisitor0.prototype = { + visitComplexSelector$1(complex) { + var t2, + t1 = complex.components; + if (t1.length === 0) + return complex.leadingCombinators.length !== 0; + else { + t2 = this.includeLeadingCombinator ? 0 : 1; + return complex.leadingCombinators.length > t2 || B.JSArray_methods.get$last(t1).combinators.length !== 0 || B.JSArray_methods.any$1(t1, new A._IsBogusVisitor_visitComplexSelector_closure0(this)); + } + }, + visitPseudoSelector$1(_, pseudo) { + var selector = pseudo.selector; + if (selector == null) + return false; + return pseudo.name === "has" ? selector.accept$1(B._IsBogusVisitor_false0) : selector.accept$1(B._IsBogusVisitor_true0); + } + }; + A._IsBogusVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 55 + }; + A._IsUselessVisitor0.prototype = { + visitComplexSelector$1(complex) { + return complex.leadingCombinators.length > 1 || B.JSArray_methods.any$1(complex.components, new A._IsUselessVisitor_visitComplexSelector_closure0(this)); + }, + visitPseudoSelector$1(_, pseudo) { + return pseudo.accept$1(B._IsBogusVisitor_true0); + } + }; + A._IsUselessVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return component.combinators.length > 1 || this.$this.visitCompoundSelector$1(component.selector); + }, + $signature: 55 + }; + A._ContainsParentSelectorVisitor0.prototype = { + visitParentSelector$1(_, _0) { + return true; + } + }; + A.__ContainsParentSelectorVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.__IsBogusVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.__IsInvisibleVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.__IsUselessVisitor_Object_AnySelectorVisitor0.prototype = {}; + A.SelectorExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitSelectorExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "&"; + }, + get$span(receiver) { + return this.span; + } + }; + A._nest_closure0.prototype = { + call$1($arguments) { + var t1 = J.$index$asx($arguments, 0).get$asList(); + t1 = new A.MappedListIterable(t1, new A._nest__closure1(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,SelectorList0>")).fold$2(0, null, new A._nest__closure2()); + t1 = t1 == null ? null : t1.get$asSassList(); + return t1 == null ? A.throwExpression(A.SassScriptException$0(string$.x24selec, null)) : t1; + }, + $signature: 27 + }; + A._nest__closure1.prototype = { + call$1(selector) { + return A.SassApiValue_assertSelector0(selector, true, null); + }, + $signature: 263 + }; + A._nest__closure2.prototype = { + call$2($parent, child) { + return child.nestWithin$1($parent); + }, + $signature: 590 + }; + A._append_closure1.prototype = { + call$1($arguments) { + var t1, + selectors = J.$index$asx($arguments, 0).get$asList(); + if (selectors.length === 0) + throw A.wrapException(A.SassScriptException$0(string$.x24selec, null)); + t1 = A.EvaluationContext_currentOrNull0(); + return new A.MappedListIterable(selectors, new A._append__closure1(), A._arrayInstanceType(selectors)._eval$1("MappedListIterable<1,SelectorList0>")).reduce$1(0, new A._append__closure2((t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan())).get$asSassList(); + }, + $signature: 27 + }; + A._append__closure1.prototype = { + call$1(selector) { + return A.SassApiValue_assertSelector0(selector, false, null); + }, + $signature: 263 + }; + A._append__closure2.prototype = { + call$2($parent, child) { + var t1 = child.components, + t2 = this.span; + return A.SelectorList$0(new A.MappedListIterable(t1, new A._append___closure0($parent, t2), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,ComplexSelector0>")), t2).nestWithin$1($parent); + }, + $signature: 591 + }; + A._append___closure0.prototype = { + call$1(complex) { + var _0_0, t1, component, rest, newCompound, t2, _null = null; + if (complex.leadingCombinators.length !== 0) + throw A.wrapException(A.SassScriptException$0("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); + _0_0 = complex.components; + t1 = _0_0.length >= 1; + if (t1) { + component = _0_0[0]; + rest = B.JSArray_methods.sublist$1(_0_0, 1); + } else { + rest = _null; + component = rest; + } + if (!t1) + throw A.wrapException(A.StateError$("Pattern matching error")); + newCompound = A._prependParent0(component.selector); + if (newCompound == null) + throw A.wrapException(A.SassScriptException$0("Can't append " + complex.toString$0(0) + " to " + this.parent.toString$0(0) + ".", _null)); + t1 = this.span; + t2 = A._setArrayType([new A.ComplexSelectorComponent0(newCompound, A.List_List$unmodifiable(component.combinators, type$.CssValue_Combinator_2), t1)], type$.JSArray_ComplexSelectorComponent_2); + B.JSArray_methods.addAll$1(t2, rest); + return A.ComplexSelector$0(B.List_empty17, t2, t1, false); + }, + $signature: 59 + }; + A._extend_closure0.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "extendee", + _s8_1 = "extender", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector0(t1.$index($arguments, 2), false, _s8_1); + source.assertNotBogus$1$name(_s8_1); + t1 = A.EvaluationContext_currentOrNull0(); + return A.ExtensionStore__extendOrReplace0(selector, source, target, B.ExtendMode_allTargets_2_allTargets0, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); + }, + $signature: 27 + }; + A._replace_closure0.prototype = { + call$1($arguments) { + var target, source, + _s8_ = "selector", + _s8_0 = "original", + _s11_ = "replacement", + t1 = J.getInterceptor$asx($arguments), + selector = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s8_); + selector.assertNotBogus$1$name(_s8_); + target = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s8_0); + target.assertNotBogus$1$name(_s8_0); + source = A.SassApiValue_assertSelector0(t1.$index($arguments, 2), false, _s11_); + source.assertNotBogus$1$name(_s11_); + t1 = A.EvaluationContext_currentOrNull0(); + return A.ExtensionStore__extendOrReplace0(selector, source, target, B.ExtendMode_replace_1_replace0, (t1 == null ? A.throwExpression(A.StateError$(string$.No_Sass)) : t1).get$currentCallableSpan()).get$asSassList(); + }, + $signature: 27 + }; + A._unify_closure0.prototype = { + call$1($arguments) { + var selector2, + _s9_ = "selector1", + _s9_0 = "selector2", + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, _s9_); + selector1.assertNotBogus$1$name(_s9_); + selector2 = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, _s9_0); + selector2.assertNotBogus$1$name(_s9_0); + t1 = selector1.unify$1(selector2); + t1 = t1 == null ? null : t1.get$asSassList(); + return t1 == null ? B.C__SassNull0 : t1; + }, + $signature: 3 + }; + A._isSuperselector_closure0.prototype = { + call$1($arguments) { + var selector2, + t1 = J.getInterceptor$asx($arguments), + selector1 = A.SassApiValue_assertSelector0(t1.$index($arguments, 0), false, "super"); + selector1.assertNotBogus$1$name("super"); + selector2 = A.SassApiValue_assertSelector0(t1.$index($arguments, 1), false, "sub"); + selector2.assertNotBogus$1$name("sub"); + return A.listIsSuperselector0(selector1.components, selector2.components) ? B.SassBoolean_true0 : B.SassBoolean_false0; + }, + $signature: 13 + }; + A._simpleSelectors_closure0.prototype = { + call$1($arguments) { + var t1 = A.SassApiValue_assertCompoundSelector0(J.$index$asx($arguments, 0), "selector").components; + return A.SassList$0(new A.MappedListIterable(t1, new A._simpleSelectors__closure0(), A._arrayInstanceType(t1)._eval$1("MappedListIterable<1,Value0>")), B.ListSeparator_z0K0, false); + }, + $signature: 27 + }; + A._simpleSelectors__closure0.prototype = { + call$1(simple) { + return new A.SassString0(A.serializeSelector0(simple, true), false); + }, + $signature: 592 + }; + A._parse_closure0.prototype = { + call$1($arguments) { + return A.SassApiValue_assertSelector0(J.$index$asx($arguments, 0), false, "selector").get$asSassList(); + }, + $signature: 27 + }; + A.SelectorParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.SelectorParser_parse_closure0(this)); + }, + parseCompoundSelector$0() { + return this.wrapSpanFormatException$1(new A.SelectorParser_parseCompoundSelector_closure0(this)); + }, + _selector0$_selectorList$0() { + var t4, t5, lineBreak, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = t1._sourceFile, + previousLine = t3.getLine$1(t2), + components = A._setArrayType([_this._selector0$_complexSelector$0()], type$.JSArray_ComplexSelector_2); + _this.whitespace$1$consumeNewlines(true); + for (t4 = t1.string.length; t1.scanChar$1(44);) { + _this.whitespace$1$consumeNewlines(true); + if (t1.peekChar$0() === 44) + continue; + t5 = t1._string_scanner$_position; + if (t5 === t4) + break; + lineBreak = t3.getLine$1(t5) !== previousLine; + if (lineBreak) + previousLine = t3.getLine$1(t1._string_scanner$_position); + components.push(_this._selector0$_complexSelector$1$lineBreak(lineBreak)); + } + return A.SelectorList$0(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _selector0$_complexSelector$1$lineBreak(lineBreak) { + var t4, t5, lastCompound, initialCombinators, beforeWhitespace, t6, _0_0, t7, t8, result, nextCompound, _this = this, + _s18_ = "expected selector.", + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + componentStart = new A._SpanScannerState(t1, t2), + t3 = type$.JSArray_CssValue_Combinator_2, + combinators = A._setArrayType([], t3), + components = A._setArrayType([], type$.JSArray_ComplexSelectorComponent_2); + for (t4 = type$.CssValue_Combinator_2, t5 = _this._selector0$_logger, lastCompound = null, initialCombinators = null;;) { + beforeWhitespace = t1._string_scanner$_position; + _this.whitespace$1$consumeNewlines(true); + t6 = t1._string_scanner$_position === beforeWhitespace; + _0_0 = t1.peekChar$0(); + if (43 === _0_0) { + t6 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue0(B.Combinator_sHB0, _this.spanFrom$1(new A._SpanScannerState(t1, t6)), t4)); + continue; + } + if (62 === _0_0) { + t6 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue0(B.Combinator_iUF0, _this.spanFrom$1(new A._SpanScannerState(t1, t6)), t4)); + continue; + } + if (126 === _0_0) { + t6 = t1._string_scanner$_position; + t1.readChar$0(); + combinators.push(new A.CssValue0(B.Combinator_98W0, _this.spanFrom$1(new A._SpanScannerState(t1, t6)), t4)); + continue; + } + if (_0_0 == null) + break; + t7 = true; + if (91 !== _0_0) + if (46 !== _0_0) + if (35 !== _0_0) + if (37 !== _0_0) + if (58 !== _0_0) + if (38 !== _0_0) + if (42 !== _0_0) + if (124 !== _0_0) + t7 = _this.lookingAtIdentifier$0(); + if (t7) { + t7 = lastCompound != null; + if (t7) { + t8 = _this.spanFrom$1(componentStart); + result = A.List_List$from(combinators, false, t4); + result.$flags = 3; + components.push(new A.ComplexSelectorComponent0(lastCompound, result, t8)); + } else if (combinators.length !== 0) { + componentStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + initialCombinators = combinators; + } + nextCompound = _this._selector0$_compoundSelector$0(); + if (t7 && combinators.length === 0 && t6) + A.WarnForDeprecation_warnForDeprecation0(t5, B.Deprecation_ldS, string$.Adjace + lastCompound.toString$0(0) + " " + nextCompound.toString$0(0) + string$.x0a_Morex3aa, lastCompound.span.expand$1(0, nextCompound.span), null); + combinators = A._setArrayType([], t3); + if (t1.peekChar$0() === 38) + t1.error$1(0, string$.x22x26__ma); + lastCompound = nextCompound; + continue; + } + break; + } + t3 = combinators.length !== 0; + if (t3 && _this._selector0$_plainCss) + t1.error$1(0, _s18_); + else if (lastCompound != null) { + t3 = _this.spanFrom$1(componentStart); + components.push(new A.ComplexSelectorComponent0(lastCompound, A.List_List$unmodifiable(combinators, t4), t3)); + } else if (t3) + initialCombinators = combinators; + else + t1.error$1(0, _s18_); + t3 = initialCombinators == null ? B.List_empty17 : initialCombinators; + return A.ComplexSelector$0(t3, components, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), lineBreak); + }, + _selector0$_complexSelector$0() { + return this._selector0$_complexSelector$1$lineBreak(false); + }, + _selector0$_compoundSelector$0() { + var t3, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + components = A._setArrayType([_this._selector0$_simpleSelector$0()], type$.JSArray_SimpleSelector_2); + for (t3 = _this._selector0$_plainCss; _this._selector0$_isSimpleSelectorStart$1(t1.peekChar$0());) + components.push(_this._selector0$_simpleSelector$1$allowParent(t3)); + return A.CompoundSelector$0(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _selector0$_simpleSelector$1$allowParent(allowParent) { + var t2, $name, text, t3, suffix, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (allowParent == null) + allowParent = _this._selector0$_allowParent; + switch (t1.peekChar$0()) { + case 91: + return _this._selector0$_attributeSelector$0(); + case 46: + t2 = t1._string_scanner$_position; + t1.expectChar$1(46); + return new A.ClassSelector0(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + case 35: + t2 = t1._string_scanner$_position; + t1.expectChar$1(35); + return new A.IDSelector0(_this.identifier$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + case 37: + t2 = t1._string_scanner$_position; + t1.expectChar$1(37); + $name = _this.identifier$0(); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (_this._selector0$_plainCss) + _this.error$2(0, string$.Placeh, _this.spanFrom$1(start)); + return new A.PlaceholderSelector0($name, t2); + case 58: + return _this._selector0$_pseudoSelector$0(); + case 38: + t2 = t1._string_scanner$_position; + t1.expectChar$1(38); + if (_this.lookingAtIdentifierBody$0()) { + text = new A.StringBuffer(""); + _this._parser1$_identifierBody$1(text); + if (text._contents.length === 0) + t1.error$1(0, "Expected identifier body."); + t3 = text._contents; + suffix = t3.charCodeAt(0) == 0 ? t3 : t3; + } else + suffix = null; + if (_this._selector0$_plainCss && suffix != null) + t1.error$3$length$position(0, string$.Parent, t1._string_scanner$_position - t2, t2); + t1 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (!allowParent) + _this.error$2(0, "Parent selectors aren't allowed here.", _this.spanFrom$1(start)); + return new A.ParentSelector0(suffix, t1); + default: + return _this._selector0$_typeOrUniversalSelector$0(); + } + }, + _selector0$_simpleSelector$0() { + return this._selector0$_simpleSelector$1$allowParent(null); + }, + _selector0$_attributeSelector$0() { + var $name, operator, next, value, modifier, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(91); + _this.whitespace$1$consumeNewlines(true); + $name = _this._selector0$_attributeName$0(); + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(93)) + return new A.AttributeSelector0($name, _null, _null, _null, _this.spanFrom$1(start)); + operator = _this._selector0$_attributeOperator$0(); + _this.whitespace$1$consumeNewlines(true); + next = t1.peekChar$0(); + value = next === 39 || next === 34 ? _this.string$0() : _this.identifier$0(); + _this.whitespace$1$consumeNewlines(true); + next = t1.peekChar$0(); + modifier = next != null && A.CharacterExtension_get_isAlphabetic0(next) ? A.Primitives_stringFromCharCode(t1.readChar$0()) : _null; + t1.expectChar$1(93); + return new A.AttributeSelector0($name, operator, value, modifier, _this.spanFrom$1(start)); + }, + _selector0$_attributeName$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner; + if (t1.scanChar$1(42)) { + t1.expectChar$1(124); + return new A.QualifiedName0(_this.identifier$0(), "*"); + } + if (t1.scanChar$1(124)) + return new A.QualifiedName0(_this.identifier$0(), ""); + nameOrNamespace = _this.identifier$0(); + if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) + return new A.QualifiedName0(nameOrNamespace, null); + t1.readChar$0(); + return new A.QualifiedName0(_this.identifier$0(), nameOrNamespace); + }, + _selector0$_attributeOperator$0() { + var t1 = this.scanner, + start = t1._string_scanner$_position; + switch (t1.readChar$0()) { + case 61: + return B.AttributeOperator_jFZ0; + case 126: + t1.expectChar$1(61); + return B.AttributeOperator_OrK0; + case 124: + t1.expectChar$1(61); + return B.AttributeOperator_g5B0; + case 94: + t1.expectChar$1(61); + return B.AttributeOperator_stc0; + case 36: + t1.expectChar$1(61); + return B.AttributeOperator_xJ90; + case 42: + t1.expectChar$1(61); + return B.AttributeOperator_h200; + default: + t1.error$2$position(0, 'Expected "]".', start); + } + }, + _selector0$_pseudoSelector$0() { + var element, $name, unvendored, argument, selector, t2, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(58); + element = t1.scanChar$1(58); + $name = _this.identifier$0(); + if (!t1.scanChar$1(40)) + return A.PseudoSelector$0($name, _this.spanFrom$1(start), _null, element, _null); + _this.whitespace$1$consumeNewlines(true); + unvendored = A.unvendor0($name); + argument = _null; + selector = _null; + if (element) + if ($.selectorPseudoElements0.contains$1(0, unvendored)) + selector = _this._selector0$_selectorList$0(); + else + argument = _this.declarationValue$1$allowEmpty(true); + else if ($.selectorPseudoClasses0.contains$1(0, unvendored)) + selector = _this._selector0$_selectorList$0(); + else if (unvendored === "nth-child" || unvendored === "nth-last-child") { + argument = _this._selector0$_aNPlusB$0(); + _this.whitespace$1$consumeNewlines(true); + t2 = t1.peekChar$1(-1); + if ((t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12) && t1.peekChar$0() !== 41) { + _this.expectIdentifier$1("of"); + argument += " of"; + _this.whitespace$1$consumeNewlines(true); + selector = _this._selector0$_selectorList$0(); + } + } else + argument = B.JSString_methods.trimRight$0(_this.declarationValue$1$allowEmpty(true)); + t1.expectChar$1(41); + return A.PseudoSelector$0($name, _this.spanFrom$1(start), argument, element, selector); + }, + _selector0$_aNPlusB$0() { + var t1, _0_0, t2, $self, next, _this = this; + $label0$0: { + t1 = _this.scanner; + _0_0 = t1.peekChar$0(); + if (101 === _0_0 || 69 === _0_0) { + _this.expectIdentifier$1("even"); + return "even"; + } + if (111 === _0_0 || 79 === _0_0) { + _this.expectIdentifier$1("odd"); + return "odd"; + } + if (43 === _0_0 || 45 === _0_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + break $label0$0; + } + t2 = ""; + } + $self = t1.peekChar$0(); + if ($self != null && $self >= 48 && $self <= 57) { + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + _this.whitespace$1$consumeNewlines(true); + if (!_this.scanIdentChar$1(110)) + return t2.charCodeAt(0) == 0 ? t2 : t2; + } else + _this.expectIdentChar$1(110); + t2 += A.Primitives_stringFromCharCode(110); + _this.whitespace$1$consumeNewlines(true); + next = t1.peekChar$0(); + if (next !== 43 && next !== 45) + return t2.charCodeAt(0) == 0 ? t2 : t2; + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + _this.whitespace$1$consumeNewlines(true); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected a number."); + do { + t2 += A.Primitives_stringFromCharCode(t1.readChar$0()); + $self = t1.peekChar$0(); + } while ($self != null && $self >= 48 && $self <= 57); + return t2.charCodeAt(0) == 0 ? t2 : t2; + }, + _selector0$_typeOrUniversalSelector$0() { + var nameOrNamespace, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (t1.scanChar$1(42)) { + if (!t1.scanChar$1(124)) + return new A.UniversalSelector0(null, _this.spanFrom$1(start)); + return t1.scanChar$1(42) ? new A.UniversalSelector0("*", _this.spanFrom$1(start)) : new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), "*"), _this.spanFrom$1(start)); + } else if (t1.scanChar$1(124)) + return t1.scanChar$1(42) ? new A.UniversalSelector0("", _this.spanFrom$1(start)) : new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), ""), _this.spanFrom$1(start)); + nameOrNamespace = _this.identifier$0(); + if (!t1.scanChar$1(124)) + return new A.TypeSelector0(new A.QualifiedName0(nameOrNamespace, null), _this.spanFrom$1(start)); + else if (t1.scanChar$1(42)) + return new A.UniversalSelector0(nameOrNamespace, _this.spanFrom$1(start)); + else + return new A.TypeSelector0(new A.QualifiedName0(_this.identifier$0(), nameOrNamespace), _this.spanFrom$1(start)); + }, + _selector0$_isSimpleSelectorStart$1(character) { + var t1; + $label0$0: { + if (42 === character || 91 === character || 46 === character || 35 === character || 37 === character || 58 === character) { + t1 = true; + break $label0$0; + } + if (38 === character) { + t1 = this._selector0$_plainCss; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + } + }; + A.SelectorParser_parse_closure0.prototype = { + call$0() { + var t1 = this.$this, + selector = t1._selector0$_selectorList$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return selector; + }, + $signature: 593 + }; + A.SelectorParser_parseCompoundSelector_closure0.prototype = { + call$0() { + var t1 = this.$this, + compound = t1._selector0$_compoundSelector$0(); + t1 = t1.scanner; + if (t1._string_scanner$_position !== t1.string.length) + t1.error$1(0, "expected selector."); + return compound; + }, + $signature: 594 + }; + A.SelectorSearchVisitor0.prototype = { + visitAttributeSelector$1(_, attribute) { + return null; + }, + visitClassSelector$1(_, klass) { + return null; + }, + visitIDSelector$1(_, id) { + return null; + }, + visitParentSelector$1(_, placeholder) { + return null; + }, + visitPlaceholderSelector$1(_, placeholder) { + return null; + }, + visitTypeSelector$1(_, type) { + return null; + }, + visitUniversalSelector$1(_, universal) { + return null; + }, + visitComplexSelector$1(complex) { + return A.IterableExtension_search0(complex.components, new A.SelectorSearchVisitor_visitComplexSelector_closure0(this)); + }, + visitCompoundSelector$1(compound) { + return A.IterableExtension_search0(compound.components, new A.SelectorSearchVisitor_visitCompoundSelector_closure0(this)); + }, + visitPseudoSelector$1(_, pseudo) { + return A.NullableExtension_andThen0(pseudo.selector, this.get$visitSelectorList()); + }, + visitSelectorList$1(list) { + return A.IterableExtension_search0(list.components, this.get$visitComplexSelector()); + } + }; + A.SelectorSearchVisitor_visitComplexSelector_closure0.prototype = { + call$1(component) { + return this.$this.visitCompoundSelector$1(component.selector); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor0.T?(ComplexSelectorComponent0)"); + } + }; + A.SelectorSearchVisitor_visitCompoundSelector_closure0.prototype = { + call$1(simple) { + return simple.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("SelectorSearchVisitor0.T?(SimpleSelector0)"); + } + }; + A.serialize_closure0.prototype = { + call$1(codeUnit) { + return codeUnit > 127; + }, + $signature: 50 + }; + A._SerializeVisitor0.prototype = { + visitCssStylesheet$1(node) { + var t1, t2, t3, t4, t5, t6, t7, previous, previous0, t8, _this = this; + for (t1 = J.get$iterator$ax(node.get$children(node)), t2 = !_this._serialize0$_inspect, t3 = _this._serialize0$_style === B.OutputStyle_10, t4 = !t3, t5 = type$.CssParentNode_2, t6 = _this._serialize0$_buffer, t7 = _this._lineFeed.text, previous = null; t1.moveNext$0();) { + previous0 = t1.get$current(t1); + if (t2) + t8 = t3 ? previous0.accept$1(B._IsInvisibleVisitor_true_true0) : previous0.accept$1(B._IsInvisibleVisitor_true_false0); + else + t8 = false; + if (t8) + continue; + if (previous != null) { + if (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) + t6.writeCharCode$1(59); + if (_this._serialize0$_isTrailingComment$2(previous0, previous)) { + if (t4) + t6.writeCharCode$1(32); + } else { + if (t4) + t6.write$1(0, t7); + if (previous.get$isGroupEnd()) + if (t4) + t6.write$1(0, t7); + } + } + previous0.accept$1(_this); + previous = previous0; + } + if (previous != null) + t1 = (t5._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) && t4; + else + t1 = false; + if (t1) + t6.writeCharCode$1(59); + }, + visitCssComment$1(node) { + this._serialize0$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssComment_closure0(this, node)); + }, + visitCssAtRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssAtRule_closure0(_this, node)); + if (!node.isChildless) { + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + } + }, + visitCssMediaRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssMediaRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssImport$1(node) { + this._serialize0$_writeIndentation$0(); + this._serialize0$_buffer.forSpan$2(node.span, new A._SerializeVisitor_visitCssImport_closure0(this, node)); + }, + _serialize0$_writeImportUrl$1(url) { + var urlContents, maybeQuote, _this = this; + if (_this._serialize0$_style !== B.OutputStyle_10 || url.charCodeAt(0) !== 117) { + _this._serialize0$_buffer.write$1(0, url); + return; + } + urlContents = B.JSString_methods.substring$2(url, 4, url.length - 1); + maybeQuote = urlContents.charCodeAt(0); + if (maybeQuote === 39 || maybeQuote === 34) + _this._serialize0$_buffer.write$1(0, urlContents); + else + _this._serialize0$_visitQuotedString$1(urlContents); + }, + visitCssKeyframeBlock$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.selector.span, new A._SerializeVisitor_visitCssKeyframeBlock_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + _serialize0$_visitMediaQuery$1(query) { + var t1, _1_0, _2_0, condition, operator, t2, _this = this, + _0_0 = query.modifier; + if (_0_0 != null) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(32); + } + _1_0 = query.type; + if (_1_0 != null) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, _1_0); + if (query.conditions.length !== 0) + t1.write$1(0, " and "); + } + _2_0 = query.conditions; + if (_2_0.length === 1) + t1 = B.JSString_methods.startsWith$1(_2_0[0], "(not "); + else + t1 = false; + if (t1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, "not "); + condition = B.JSArray_methods.get$first(_2_0); + t1.write$1(0, B.JSString_methods.substring$2(condition, 5, condition.length - 1)); + } else { + operator = query.conjunction ? "and" : "or"; + t1 = _this._serialize0$_style === B.OutputStyle_10 ? operator + " " : " " + operator + " "; + t2 = _this._serialize0$_buffer; + _this._serialize0$_writeBetween$3(_2_0, t1, t2.get$write(t2)); + } + }, + visitCssStyleRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node._style_rule0$_selector._box0$_inner.value.span, new A._SerializeVisitor_visitCssStyleRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssSupportsRule$1(node) { + var t1, _this = this; + _this._serialize0$_writeIndentation$0(); + t1 = _this._serialize0$_buffer; + t1.forSpan$2(node.span, new A._SerializeVisitor_visitCssSupportsRule_closure0(_this, node)); + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + _this._serialize0$_visitChildren$1(node); + }, + visitCssDeclaration$1(node) { + var error, stackTrace, error0, stackTrace0, t1, exception, _this = this; + _this._serialize0$_writeIndentation$0(); + _this._serialize0$_write$1(node.name); + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(58); + if (!node.parsedAsSassScript) + t1.forSpan$2(node.value.span, new A._SerializeVisitor_visitCssDeclaration_closure1(_this, node)); + else { + if (_this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + try { + t1.forSpan$2(node.valueSpanForMap, new A._SerializeVisitor_visitCssDeclaration_closure2(_this, node)); + } catch (exception) { + t1 = A.unwrapException(exception); + if (t1 instanceof A.MultiSpanSassScriptException0) { + error = t1; + stackTrace = A.getTraceFromException(exception); + A.throwWithTrace0(A.MultiSpanSassException$0(error.message, node.value.span, error.primaryLabel, error.secondarySpans, null), error, stackTrace); + } else if (t1 instanceof A.SassScriptException0) { + error0 = t1; + stackTrace0 = A.getTraceFromException(exception); + t1 = error0.message; + A.throwWithTrace0(new A.SassException0(B.Set_empty, t1, node.value.span), error0, stackTrace0); + } else + throw exception; + } + } + }, + _serialize0$_writeFoldedValue$1(node) { + var t1, t2, next, t3, + scanner = A.StringScanner$(type$.SassString_2._as(node.value.value)._string0$_text, null, null); + for (t1 = scanner.string.length, t2 = this._serialize0$_buffer; scanner._string_scanner$_position !== t1;) { + next = scanner.readChar$0(); + if (next !== 10) { + t2.writeCharCode$1(next); + continue; + } + t2.writeCharCode$1(32); + for (;;) { + t3 = scanner.peekChar$0(); + if (!(t3 === 32 || t3 === 9 || t3 === 10 || t3 === 13 || t3 === 12)) + break; + scanner.readChar$0(); + } + } + }, + _serialize0$_writeReindentedValue$1(node) { + var _0_0, t1, _this = this, + value = type$.SassString_2._as(node.value.value)._string0$_text; + $label0$0: { + _0_0 = _this._serialize0$_minimumIndentation$1(value); + if (_0_0 == null) { + _this._serialize0$_buffer.write$1(0, value); + break $label0$0; + } + if (-1 === _0_0) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, A.trimAsciiRight0(value, true)); + t1.writeCharCode$1(32); + break $label0$0; + } + t1 = node.name.span; + t1 = t1.get$start(t1); + _this._serialize0$_writeWithIndent$2(value, Math.min(_0_0, t1.file.getColumn$1(t1.offset))); + } + }, + _serialize0$_minimumIndentation$1(text) { + var character, t2, min, next, min0, + scanner = A.LineScanner$(text), + t1 = scanner.string.length; + for (;;) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + if (scanner._string_scanner$_position === t1) + return scanner.peekChar$1(-1) === 10 ? -1 : null; + for (min = null; scanner._string_scanner$_position !== t1;) { + while (scanner._string_scanner$_position !== t1) { + next = scanner.peekChar$0(); + if (next !== 32 && next !== 9) + break; + scanner._adjustLineAndColumn$1(scanner.super$StringScanner$readChar()); + } + if (scanner._string_scanner$_position === t1 || scanner.scanChar$1(10)) + continue; + min0 = scanner._line_scanner$_column; + min = min == null ? min0 : Math.min(min, min0); + for (;;) { + if (scanner._string_scanner$_position !== t1) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + t2 = character !== 10; + } else + t2 = false; + if (!t2) + break; + } + } + return min == null ? -1 : min; + }, + _serialize0$_writeWithIndent$2(text, minimumIndentation) { + var t1, t2, t3, character, lineStart, newlines, end, + scanner = A.LineScanner$(text); + for (t1 = scanner.string, t2 = t1.length, t3 = this._serialize0$_buffer; scanner._string_scanner$_position !== t2;) { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + for (;;) { + lineStart = scanner._string_scanner$_position; + for (newlines = 1;;) { + if (scanner._string_scanner$_position === t2) { + t3.writeCharCode$1(32); + return; + } + $label0$2: { + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (32 === character || 9 === character) + continue; + if (10 === character) { + lineStart = scanner._string_scanner$_position; + ++newlines; + break $label0$2; + } + break; + } + } + this._serialize0$_writeTimes$2(10, newlines); + this._serialize0$_writeIndentation$0(); + end = scanner._string_scanner$_position; + t3.write$1(0, B.JSString_methods.substring$2(t1, lineStart + minimumIndentation, end)); + for (;;) { + if (scanner._string_scanner$_position === t2) + return; + character = scanner.super$StringScanner$readChar(); + scanner._adjustLineAndColumn$1(character); + if (character === 10) + break; + t3.writeCharCode$1(character); + } + } + }, + visitCalculation$1(value) { + var t2, _this = this, + t1 = _this._serialize0$_buffer; + t1.write$1(0, value.name); + t1.writeCharCode$1(40); + t2 = _this._serialize0$_style === B.OutputStyle_10 ? "," : ", "; + _this._serialize0$_writeBetween$3(value.$arguments, t2, _this.get$_serialize0$_writeCalculationValue()); + t1.writeCharCode$1(41); + }, + _serialize0$_writeCalculationValue$1(value) { + var t1, _0_0, _1_0, first, rest, left, right, operator, parenthesizeLeft, operatorWhitespace, parenthesizeRight, t2, _this = this; + $label1$1: { + t1 = value instanceof A.SassNumber0; + if (t1 && !isFinite(value._number1$_value)) { + $label0$0: { + _0_0 = value._number1$_value; + if (1 / 0 === _0_0) { + _this._serialize0$_buffer.write$1(0, "infinity"); + break $label0$0; + } + if (-1 / 0 === _0_0) { + _this._serialize0$_buffer.write$1(0, "-infinity"); + break $label0$0; + } + if (isNaN(_0_0)) + _this._serialize0$_buffer.write$1(0, "NaN"); + } + _this._serialize0$_writeCalculationUnits$2(value.get$numeratorUnits(value), value.get$denominatorUnits(value)); + break $label1$1; + } + if (t1 && value.get$hasComplexUnits()) { + _this._serialize0$_writeNumber$1(value._number1$_value); + _1_0 = value.get$numeratorUnits(value); + if (_1_0.length >= 1) { + first = _1_0[0]; + rest = B.JSArray_methods.sublist$1(_1_0, 1); + _this._serialize0$_buffer.write$1(0, first); + _this._serialize0$_writeCalculationUnits$2(rest, value.get$denominatorUnits(value)); + } else + _this._serialize0$_writeCalculationUnits$2(A._setArrayType([], type$.JSArray_String), value.get$denominatorUnits(value)); + break $label1$1; + } + if (value instanceof A.Value0) { + value.accept$1(_this); + break $label1$1; + } + t1 = value instanceof A.CalculationOperation0; + left = null; + right = null; + if (t1) { + operator = value._calculation0$_operator; + left = value._calculation0$_left; + right = value._calculation0$_right; + } else + operator = null; + if (t1) { + parenthesizeLeft = left instanceof A.CalculationOperation0 && left._calculation0$_operator.precedence < operator.precedence; + if (parenthesizeLeft) + _this._serialize0$_buffer.writeCharCode$1(40); + _this._serialize0$_writeCalculationValue$1(left); + if (parenthesizeLeft) + _this._serialize0$_buffer.writeCharCode$1(41); + operatorWhitespace = _this._serialize0$_style !== B.OutputStyle_10 || operator.precedence === 1; + if (operatorWhitespace) + _this._serialize0$_buffer.writeCharCode$1(32); + t1 = _this._serialize0$_buffer; + t1.write$1(0, operator.operator); + if (operatorWhitespace) + t1.writeCharCode$1(32); + if (!(right instanceof A.CalculationOperation0 && _this._serialize0$_parenthesizeCalculationRhs$2(operator, right._calculation0$_operator))) { + parenthesizeRight = false; + if (operator === B.CalculationOperator_wFL0) { + if (right instanceof A.SassNumber0) + t2 = isFinite(right._number1$_value) ? right.get$hasComplexUnits() : right.get$hasUnits(); + else + t2 = parenthesizeRight; + parenthesizeRight = t2; + } + } else + parenthesizeRight = true; + if (parenthesizeRight) + t1.writeCharCode$1(40); + _this._serialize0$_writeCalculationValue$1(right); + if (parenthesizeRight) + t1.writeCharCode$1(41); + } + } + }, + _serialize0$_writeCalculationUnits$2(numeratorUnits, denominatorUnits) { + var t1, t2, t3, t4; + for (t1 = J.get$iterator$ax(numeratorUnits), t2 = this._serialize0$_buffer, t3 = this._serialize0$_style !== B.OutputStyle_10; t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(42); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(49); + t2.write$1(0, t4); + } + for (t1 = J.get$iterator$ax(denominatorUnits); t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(47); + if (t3) + t2.writeCharCode$1(32); + t2.writeCharCode$1(49); + t2.write$1(0, t4); + } + }, + _serialize0$_parenthesizeCalculationRhs$2(outer, right) { + var t1; + $label0$0: { + if (B.CalculationOperator_wFL0 === outer) { + t1 = true; + break $label0$0; + } + if (B.CalculationOperator_dpX0 === outer) { + t1 = false; + break $label0$0; + } + t1 = right === B.CalculationOperator_dpX0 || right === B.CalculationOperator_KrC0; + break $label0$0; + } + return t1; + }, + visitColor$1(value) { + var _0_0, _0_2, _0_6, t1, _0_4, _0_6_isSet, t2, _0_10_isSet, _0_10, _0_12_isSet, _0_14, _0_12, _0_14_isSet, t3, _0_10_isSet0, polar, t4, t5, _this = this, _null = null; + $label0$0: { + _0_0 = value._color0$_space; + _0_2 = B.RgbColorSpace_i0P0 === _0_0; + _0_6 = _null; + t1 = true; + if (!_0_2) { + _0_4 = B.HslColorSpace_JQ20 === _0_0; + _0_6_isSet = !_0_4; + if (_0_6_isSet) { + _0_6 = B.HwbColorSpace_guQ0 === _0_0; + t1 = _0_6; + } + } else { + _0_4 = _null; + _0_6_isSet = false; + } + if (t1 && value.channel0OrNull != null && value.channel1OrNull != null && value.channel2OrNull != null && value.alphaOrNull != null) { + _this._serialize0$_writeLegacyColor$1(value); + break $label0$0; + } + if (_0_2) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, "rgb("); + _this._serialize0$_writeChannel$1(value.channel0OrNull); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$1(value.channel1OrNull); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$1(value.channel2OrNull); + _this._serialize0$_maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + if (!_0_4) + t1 = _0_6_isSet ? _0_6 : B.HwbColorSpace_guQ0 === _0_0; + else + t1 = true; + if (t1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(40); + t2 = _this._serialize0$_style === B.OutputStyle_10 ? _null : "deg"; + _this._serialize0$_writeChannel$2(value.channel0OrNull, t2); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$2(value.channel1OrNull, "%"); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$2(value.channel2OrNull, "%"); + _this._serialize0$_maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + _0_10_isSet = B.LabColorSpace_2nT0 !== _0_0; + if (_0_10_isSet) { + _0_10 = B.LchColorSpace_Bpv0 === _0_0; + t1 = _0_10; + } else { + _0_10 = _null; + t1 = true; + } + t2 = false; + if (t1) + if (!_this._serialize0$_inspect) { + t1 = value.channel0OrNull; + if (t1 == null) + t1 = 0; + if (t1 > 0 || A.fuzzyEquals0(t1, 0)) + t1 = t1 < 100 || A.fuzzyEquals0(t1, 100); + else + t1 = false; + t1 = !t1 && value.channel1OrNull != null && value.channel2OrNull != null; + } else + t1 = t2; + else + t1 = t2; + _0_12_isSet = !t1; + _0_14 = _null; + if (_0_12_isSet) { + _0_12 = B.OklabColorSpace_5400 === _0_0; + t1 = false; + _0_14_isSet = !_0_12; + if (_0_14_isSet) { + _0_14 = B.OklchColorSpace_9Gj0 === _0_0; + t2 = _0_14; + } else + t2 = true; + t3 = false; + if (t2) + if (!_this._serialize0$_inspect) { + t2 = value.channel0OrNull; + if (t2 == null) + t2 = 0; + if (t2 > 0 || A.fuzzyEquals0(t2, 0)) + t2 = t2 < 1 || A.fuzzyEquals0(t2, 1); + else + t2 = false; + t2 = !t2 && value.channel1OrNull != null && value.channel2OrNull != null; + } else + t2 = t3; + else + t2 = t3; + if (!t2) { + if (_0_10_isSet) { + t2 = _0_10; + _0_10_isSet0 = _0_10_isSet; + } else { + _0_10 = B.LchColorSpace_Bpv0 === _0_0; + t2 = _0_10; + _0_10_isSet0 = true; + } + if (!t2) + if (_0_14_isSet) + t2 = _0_14; + else { + _0_14 = B.OklchColorSpace_9Gj0 === _0_0; + t2 = _0_14; + _0_14_isSet = true; + } + else + t2 = true; + if (t2) + if (!_this._serialize0$_inspect) { + t1 = value.channel1OrNull; + t2 = t1 == null; + if (t2) + t1 = 0; + t1 = t1 < 0 && !A.fuzzyEquals0(t1, 0) && value.channel0OrNull != null && !t2; + } + } else { + _0_10_isSet0 = _0_10_isSet; + t1 = true; + } + } else { + _0_12 = _null; + _0_10_isSet0 = _0_10_isSet; + _0_14_isSet = false; + t1 = true; + } + if (t1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, "color-mix(in "); + t1.write$1(0, _0_0); + t2 = _this._serialize0$_style === B.OutputStyle_10; + t1.write$1(0, t2 ? "," : ", "); + _this._serialize0$_writeColorFunction$1(value.toSpace$1(B.XyzD65ColorSpace_WiJ0)); + if (!t2) + t1.writeCharCode$1(32); + t1.write$1(0, "100%"); + t1.write$1(0, t2 ? "," : ", "); + t1.write$1(0, t2 ? "red" : "black"); + t1.writeCharCode$1(41); + break $label0$0; + } + t1 = true; + if (_0_10_isSet) + if (!(_0_12_isSet ? _0_12 : B.OklabColorSpace_5400 === _0_0)) + if (!(_0_10_isSet0 ? _0_10 : B.LchColorSpace_Bpv0 === _0_0)) + t1 = _0_14_isSet ? _0_14 : B.OklchColorSpace_9Gj0 === _0_0; + if (t1) { + t1 = _this._serialize0$_buffer; + t1.write$1(0, _0_0); + t1.writeCharCode$1(40); + t2 = _0_0._space$_channels; + polar = t2[2].isPolarAngle; + t3 = false; + if (!_this._serialize0$_inspect) { + t4 = value.channel0OrNull; + if (t4 == null) + t4 = 0; + if (t4 > 0 || A.fuzzyEquals0(t4, 0)) + t4 = t4 < 100 || A.fuzzyEquals0(t4, 100); + else + t4 = false; + if (t4) { + if (polar) { + t3 = value.channel1OrNull; + if (t3 == null) + t3 = 0; + t3 = t3 < 0 && !A.fuzzyEquals0(t3, 0); + } + } else + t3 = true; + } + if (t3) { + t1.write$1(0, "from "); + t1.write$1(0, _this._serialize0$_style === B.OutputStyle_10 ? "red" : "black"); + t1.writeCharCode$1(32); + } + t3 = _this._serialize0$_style !== B.OutputStyle_10; + t4 = t3 && value.channel0OrNull != null; + t5 = value.channel0OrNull; + if (t4) { + t2 = type$.LinearChannel_2._as(t2[0]); + _this._serialize0$_writeNumber$1((t5 == null ? 0 : t5) * 100 / t2.max); + t1.writeCharCode$1(37); + } else + _this._serialize0$_writeChannel$1(t5); + t1.writeCharCode$1(32); + _this._serialize0$_writeChannel$1(value.channel1OrNull); + t1.writeCharCode$1(32); + t2 = polar && t3 ? "deg" : _null; + _this._serialize0$_writeChannel$2(value.channel2OrNull, t2); + _this._serialize0$_maybeWriteSlashAlpha$1(value); + t1.writeCharCode$1(41); + break $label0$0; + } + _this._serialize0$_writeColorFunction$1(value); + } + }, + _serialize0$_writeChannel$2(channel, unit) { + var _this = this; + if (channel == null) + _this._serialize0$_buffer.write$1(0, "none"); + else if (isFinite(channel)) { + _this._serialize0$_writeNumber$1(channel); + if (unit != null) + _this._serialize0$_buffer.write$1(0, unit); + } else + _this.visitNumber$1(A.SassNumber_SassNumber0(channel, unit)); + }, + _serialize0$_writeChannel$1(channel) { + return this._serialize0$_writeChannel$2(channel, null); + }, + _serialize0$_writeLegacyColor$1(color) { + var rgb, t3, red, green, blue, hsl, hue, saturation, lightness, hwb, _0_0, format, _1_0, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1); + if (!color.get$isInGamut() && !_this._serialize0$_inspect) { + _this._serialize0$_writeHsl$1(color); + return; + } + if (_this._serialize0$_style === B.OutputStyle_10) { + rgb = color.toSpace$1(B.RgbColorSpace_i0P0); + if (opaque && _this._serialize0$_tryIntegerRgb$1(rgb)) + return; + t3 = rgb.channel0OrNull; + red = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = rgb.channel1OrNull; + green = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = rgb.channel2OrNull; + blue = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + hsl = color.toSpace$1(B.HslColorSpace_JQ20); + t3 = hsl.channel0OrNull; + hue = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = hsl.channel1OrNull; + saturation = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = hsl.channel2OrNull; + lightness = _this._serialize0$_writeNumberToString$1(t3 == null ? 0 : t3); + t3 = _this._serialize0$_buffer; + if (red.length + green.length + blue.length <= hue.length + saturation.length + lightness.length + 2) { + t3.write$1(0, opaque ? "rgb(" : "rgba("); + t3.write$1(0, red); + t3.writeCharCode$1(44); + t3.write$1(0, green); + t3.writeCharCode$1(44); + t3.write$1(0, blue); + } else { + t3.write$1(0, opaque ? "hsl(" : "hsla("); + t3.write$1(0, hue); + t3.writeCharCode$1(44); + t3.write$1(0, saturation); + t3.write$1(0, "%,"); + t3.write$1(0, lightness); + t3.writeCharCode$1(37); + } + if (!opaque) { + t3.writeCharCode$1(44); + _this._serialize0$_writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + return; + } + t3 = color._color0$_space; + if (t3 === B.HslColorSpace_JQ20) { + _this._serialize0$_writeHsl$1(color); + return; + } else if (_this._serialize0$_inspect && t3 === B.HwbColorSpace_guQ0) { + t3 = _this._serialize0$_buffer; + t3.write$1(0, "hwb("); + hwb = color.toSpace$1(B.HwbColorSpace_guQ0); + _this._serialize0$_writeNumber$1(hwb.channel$1(0, "hue")); + t3.writeCharCode$1(32); + _this._serialize0$_writeNumber$1(hwb.channel$1(0, "whiteness")); + t3.writeCharCode$1(37); + t3.writeCharCode$1(32); + _this._serialize0$_writeNumber$1(hwb.channel$1(0, "blackness")); + t3.writeCharCode$1(37); + if (!A.fuzzyEquals0(t2 ? 0 : t1, 1)) { + t3.write$1(0, " / "); + _this._serialize0$_writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + return; + } + _0_0 = color.format; + if (B.C__ColorFormatEnum0 === _0_0) { + _this._serialize0$_writeRgb$1(color); + return; + } + t1 = _0_0 instanceof A.SpanColorFormat0; + format = t1 ? _0_0 : null; + if (t1) { + _this._serialize0$_buffer.write$1(0, format._color0$_span.get$text()); + return; + } + if (opaque) { + rgb = color.toSpace$1(B.RgbColorSpace_i0P0); + _1_0 = $.$get$namesByColor0().$index(0, rgb); + if (_1_0 != null) { + _this._serialize0$_buffer.write$1(0, _1_0); + return; + } + if (_this._serialize0$_canUseHex$1(rgb)) { + _this._serialize0$_buffer.writeCharCode$1(35); + t1 = rgb.channel0OrNull; + _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + t1 = rgb.channel1OrNull; + _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + t1 = rgb.channel2OrNull; + _this._serialize0$_writeHexComponent$1(B.JSNumber_methods.round$0(t1 == null ? 0 : t1)); + return; + } + } + if (t3 === B.HwbColorSpace_guQ0) + _this._serialize0$_writeHsl$1(color); + else + _this._serialize0$_writeRgb$1(color); + }, + _serialize0$_tryIntegerRgb$1(rgb) { + var t1, redInt, greenInt, blueInt, shortHex, _0_0, t2, t3, $name, _this = this; + if (!_this._serialize0$_canUseHex$1(rgb)) + return false; + t1 = rgb.channel0OrNull; + redInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = rgb.channel1OrNull; + greenInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = rgb.channel2OrNull; + blueInt = B.JSNumber_methods.round$0(t1 == null ? 0 : t1); + t1 = redInt & 15; + shortHex = t1 === B.JSInt_methods._shrOtherPositive$1(redInt, 4) && (greenInt & 15) === B.JSInt_methods._shrOtherPositive$1(greenInt, 4) && (blueInt & 15) === B.JSInt_methods._shrOtherPositive$1(blueInt, 4); + _0_0 = $.$get$namesByColor0().$index(0, rgb); + t2 = false; + if (_0_0 != null) { + t3 = _0_0.length; + t2 = t3 <= (shortHex ? 4 : 7); + $name = _0_0; + } else + $name = null; + if (t2) + _this._serialize0$_buffer.write$1(0, $name); + else { + t2 = _this._serialize0$_buffer; + if (shortHex) { + t2.writeCharCode$1(35); + t2.writeCharCode$1(A.hexCharFor0(t1)); + t2.writeCharCode$1(A.hexCharFor0(greenInt & 15)); + t2.writeCharCode$1(A.hexCharFor0(blueInt & 15)); + } else { + t2.writeCharCode$1(35); + _this._serialize0$_writeHexComponent$1(redInt); + _this._serialize0$_writeHexComponent$1(greenInt); + _this._serialize0$_writeHexComponent$1(blueInt); + } + } + return true; + }, + _serialize0$_canUseHex$1(rgb) { + var t2, + t1 = rgb.channel0OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt0(t1)) + t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); + else + t1 = false; + t2 = false; + if (t1) { + t1 = rgb.channel1OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt0(t1)) + t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); + else + t1 = false; + if (t1) { + t1 = rgb.channel2OrNull; + if (t1 == null) + t1 = 0; + if (A.fuzzyIsInt0(t1)) + t1 = (t1 > 0 || A.fuzzyEquals0(t1, 0)) && t1 < 256 && !A.fuzzyEquals0(t1, 256); + else + t1 = t2; + } else + t1 = t2; + } else + t1 = t2; + return t1; + }, + _serialize0$_writeRgb$1(color) { + var t4, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1), + rgb = color.toSpace$1(B.RgbColorSpace_i0P0), + t3 = _this._serialize0$_buffer; + t3.write$1(0, opaque ? "rgb(" : "rgba("); + _this._serialize0$_writeNumber$1(rgb.channel$1(0, "red")); + t4 = _this._serialize0$_style === B.OutputStyle_10; + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeNumber$1(rgb.channel$1(0, "green")); + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeNumber$1(rgb.channel$1(0, "blue")); + if (!opaque) { + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + }, + _serialize0$_writeHsl$1(color) { + var t4, _this = this, + t1 = color.alphaOrNull, + t2 = t1 == null, + opaque = A.fuzzyEquals0(t2 ? 0 : t1, 1), + hsl = color.toSpace$1(B.HslColorSpace_JQ20), + t3 = _this._serialize0$_buffer; + t3.write$1(0, opaque ? "hsl(" : "hsla("); + _this._serialize0$_writeChannel$1(hsl.channel$1(0, "hue")); + t4 = _this._serialize0$_style === B.OutputStyle_10; + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeChannel$2(hsl.channel$1(0, "saturation"), "%"); + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeChannel$2(hsl.channel$1(0, "lightness"), "%"); + if (!opaque) { + t3.write$1(0, t4 ? "," : ", "); + _this._serialize0$_writeNumber$1(t2 ? 0 : t1); + } + t3.writeCharCode$1(41); + }, + _serialize0$_writeColorFunction$1(color) { + var _this = this, + t1 = _this._serialize0$_buffer; + t1.write$1(0, "color("); + t1.write$1(0, color._color0$_space); + t1.writeCharCode$1(32); + _this._serialize0$_writeBetween$3(color.get$channelsOrNull(), " ", _this.get$_serialize0$_writeChannel()); + _this._serialize0$_maybeWriteSlashAlpha$1(color); + t1.writeCharCode$1(41); + }, + _serialize0$_writeHexComponent$1(color) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(A.hexCharFor0(B.JSInt_methods._shrOtherPositive$1(color, 4))); + t1.writeCharCode$1(A.hexCharFor0(color & 15)); + }, + _serialize0$_maybeWriteSlashAlpha$1(color) { + var t2, t3, _this = this, + t1 = color.alphaOrNull; + if (A.fuzzyEquals0(t1 == null ? 0 : t1, 1)) + return; + t2 = _this._serialize0$_style !== B.OutputStyle_10; + if (t2) + _this._serialize0$_buffer.writeCharCode$1(32); + t3 = _this._serialize0$_buffer; + t3.writeCharCode$1(47); + if (t2) + t3.writeCharCode$1(32); + _this._serialize0$_writeChannel$1(t1); + }, + visitList$1(value) { + var t2, singleton, t3, t4, t5, _this = this, + t1 = value._list1$_hasBrackets; + if (t1) + _this._serialize0$_buffer.writeCharCode$1(91); + else if (value._list1$_contents.length === 0) { + if (!_this._serialize0$_inspect) + throw A.wrapException(A.SassScriptException$0("() isn't a valid CSS value.", null)); + _this._serialize0$_buffer.write$1(0, "()"); + return; + } + t2 = _this._serialize0$_inspect; + singleton = false; + if (t2) + if (value._list1$_contents.length === 1) { + t3 = value._list1$_separator; + t3 = t3 === B.ListSeparator_z0K0 || t3 === B.ListSeparator_Lul0; + singleton = t3; + } + if (singleton && !t1) + _this._serialize0$_buffer.writeCharCode$1(40); + t3 = value._list1$_contents; + t3 = t2 ? t3 : new A.WhereIterable(t3, new A._SerializeVisitor_visitList_closure2(), A._arrayInstanceType(t3)._eval$1("WhereIterable<1>")); + t4 = value._list1$_separator; + t5 = _this._serialize0$_separatorString$1(t4); + _this._serialize0$_writeBetween$3(t3, t5, t2 ? new A._SerializeVisitor_visitList_closure3(_this, value) : new A._SerializeVisitor_visitList_closure4(_this)); + if (singleton) { + t2 = _this._serialize0$_buffer; + t2.write$1(0, t4.separator); + if (!t1) + t2.writeCharCode$1(41); + } + if (t1) + _this._serialize0$_buffer.writeCharCode$1(93); + }, + _serialize0$_separatorString$1(separator) { + var t1; + $label0$0: { + if (B.ListSeparator_z0K0 === separator) { + t1 = this._serialize0$_style === B.OutputStyle_10 ? "," : ", "; + break $label0$0; + } + if (B.ListSeparator_Lul0 === separator) { + t1 = this._serialize0$_style === B.OutputStyle_10 ? "/" : " / "; + break $label0$0; + } + if (B.ListSeparator_SrV0 === separator) { + t1 = " "; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + return t1; + }, + _serialize0$_elementNeedsParens$2(separator, value) { + var t1; + $label1$1: { + if (value instanceof A.SassList0 && value._list1$_contents.length > 1 && !value._list1$_hasBrackets) { + $label0$0: { + if (B.ListSeparator_z0K0 === separator) { + t1 = value._list1$_separator === B.ListSeparator_z0K0; + break $label0$0; + } + if (B.ListSeparator_Lul0 === separator) { + t1 = value._list1$_separator; + t1 = t1 === B.ListSeparator_z0K0 || t1 === B.ListSeparator_Lul0; + break $label0$0; + } + t1 = value._list1$_separator !== B.ListSeparator_undecided_null_3_undecided0; + break $label0$0; + } + break $label1$1; + } + t1 = false; + break $label1$1; + } + return t1; + }, + visitMap$1(map) { + var t1, t2, _this = this; + if (!_this._serialize0$_inspect) + throw A.wrapException(A.SassScriptException$0(map.toString$0(0) + " isn't a valid CSS value.", null)); + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(40); + t2 = map._map0$_contents; + _this._serialize0$_writeBetween$3(t2.get$entries(t2), ", ", new A._SerializeVisitor_visitMap_closure0(_this)); + t1.writeCharCode$1(41); + }, + _serialize0$_writeMapElement$1(value) { + var needsParens = value instanceof A.SassList0 && value._list1$_separator === B.ListSeparator_z0K0 && !value._list1$_hasBrackets; + if (needsParens) + this._serialize0$_buffer.writeCharCode$1(40); + value.accept$1(this); + if (needsParens) + this._serialize0$_buffer.writeCharCode$1(41); + }, + visitNumber$1(value) { + var before, after, t1, _1_0, _this = this, + _0_0 = value.asSlash; + if (type$.Record_2_nullable_Object_and_nullable_Object._is(_0_0)) { + before = _0_0._0; + after = _0_0._1; + _this.visitNumber$1(before); + _this._serialize0$_buffer.writeCharCode$1(47); + _this.visitNumber$1(after); + return; + } + t1 = value._number1$_value; + if (!isFinite(t1)) { + _this.visitCalculation$1(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); + return; + } + if (value.get$hasComplexUnits()) + _this.visitCalculation$1(new A.SassCalculation0("calc", A.List_List$unmodifiable(A._setArrayType([value], type$.JSArray_Object), type$.Object))); + else { + _this._serialize0$_writeNumber$1(t1); + _1_0 = value.get$numeratorUnits(value); + if (_1_0.length === 1) + _this._serialize0$_buffer.write$1(0, _1_0[0]); + } + }, + _serialize0$_writeNumberToString$1(number) { + var t1 = new A.StringBuffer(""); + this._serialize0$_writeNumber$2(number, new A.NoSourceMapBuffer0(t1)); + t1 = t1._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _serialize0$_writeNumber$2(number, buffer) { + var _0_0, t1, integer, text, _this = this; + if (buffer == null) + buffer = _this._serialize0$_buffer; + _0_0 = A.fuzzyAsInt0(number); + t1 = false; + if (_0_0 != null) { + t1 = !_this._serialize0$_inspect || number === _0_0; + integer = _0_0; + } else + integer = null; + if (t1) { + buffer.write$1(0, _this._serialize0$_removeExponent$1(J.toString$0$(integer))); + return; + } + text = _this._serialize0$_removeExponent$1(B.JSNumber_methods.toString$0(number)); + if (_this._serialize0$_inspect) { + buffer.write$1(0, text); + return; + } + if (text.length < 12) { + buffer.write$1(0, _this._serialize0$_style === B.OutputStyle_10 && text.charCodeAt(0) === 48 ? B.JSString_methods.substring$1(text, 1) : text); + return; + } + _this._serialize0$_writeRounded$2(text, buffer); + }, + _serialize0$_writeNumber$1(number) { + return this._serialize0$_writeNumber$2(number, null); + }, + _serialize0$_removeExponent$1(text) { + var buffer, t2, t3, additionalZeroes, + negative = text.charCodeAt(0) === 45, + exponent = A._Cell$(), + t1 = text.length, + i = 0; + for (;;) { + if (!(i < t1)) { + buffer = null; + break; + } + c$0: { + if (text.charCodeAt(i) !== 101) + break c$0; + buffer = new A.StringBuffer(""); + t2 = buffer._contents = A.Primitives_stringFromCharCode(text.charCodeAt(0)); + if (negative) { + t2 += A.Primitives_stringFromCharCode(text.charCodeAt(1)); + buffer._contents = t2; + if (i > 3) + buffer._contents = t2 + B.JSString_methods.substring$2(text, 3, i); + } else if (i > 2) + buffer._contents = t2 + B.JSString_methods.substring$2(text, 2, i); + exponent.__late_helper$_value = A.int_parse(B.JSString_methods.substring$2(text, i + 1, t1), null); + break; + } + ++i; + } + if (buffer == null) + return text; + if (exponent._readLocal$0() > 0) { + t1 = exponent._readLocal$0(); + t2 = buffer._contents; + t3 = negative ? 1 : 0; + additionalZeroes = t1 - (t2.length - 1 - t3); + for (t1 = t2, i = 0; i < additionalZeroes; ++i) { + t1 = A.Primitives_stringFromCharCode(48); + t1 = buffer._contents += t1; + } + return t1.charCodeAt(0) == 0 ? t1 : t1; + } else { + negative = text.charCodeAt(0) === 45; + t1 = (negative ? A.Primitives_stringFromCharCode(45) : "") + "0."; + i = -1; + for (;;) { + t2 = exponent.__late_helper$_value; + if (t2 === exponent) + A.throwExpression(A.LateError$localNI("")); + if (!(i > t2)) + break; + t1 += A.Primitives_stringFromCharCode(48); + --i; + } + if (negative) { + t2 = buffer._contents; + t2 = B.JSString_methods.substring$1(t2.charCodeAt(0) == 0 ? t2 : t2, 1); + } else + t2 = buffer; + t2 = t1 + A.S(t2); + return t2.charCodeAt(0) == 0 ? t2 : t2; + } + }, + _serialize0$_writeRounded$2(text, buffer) { + var t1, digits, negative, textIndex, digitsIndex, textIndex0, codeUnit, digitsIndex0, indexAfterPrecision, digitsIndex1, newDigit, writtenIndex; + if (B.JSString_methods.endsWith$1(text, ".0")) { + buffer.write$1(0, B.JSString_methods.substring$2(text, 0, text.length - 2)); + return; + } + t1 = text.length; + digits = new Uint8Array(t1 + 1); + negative = text.charCodeAt(0) === 45; + textIndex = negative ? 1 : 0; + for (digitsIndex = 1;; textIndex = textIndex0, digitsIndex = digitsIndex0) { + if (textIndex === t1) { + buffer.write$1(0, text); + return; + } + textIndex0 = textIndex + 1; + codeUnit = text.charCodeAt(textIndex); + if (codeUnit === 46) { + textIndex = textIndex0; + break; + } + digitsIndex0 = digitsIndex + 1; + digits[digitsIndex] = codeUnit - 48; + } + indexAfterPrecision = textIndex + 10; + if (indexAfterPrecision >= t1) { + buffer.write$1(0, text); + return; + } + for (digitsIndex0 = digitsIndex; textIndex < indexAfterPrecision; textIndex = textIndex0, digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 + 1; + textIndex0 = textIndex + 1; + digits[digitsIndex0] = text.charCodeAt(textIndex) - 48; + } + if (text.charCodeAt(textIndex) - 48 >= 5) + for (;; digitsIndex0 = digitsIndex1) { + digitsIndex1 = digitsIndex0 - 1; + newDigit = digits[digitsIndex1] + 1; + digits[digitsIndex1] = newDigit; + if (newDigit !== 10) + break; + } + for (; digitsIndex0 < digitsIndex; ++digitsIndex0) + digits[digitsIndex0] = 0; + for (;;) { + t1 = digitsIndex0 > digitsIndex; + if (!(t1 && digits[digitsIndex0 - 1] === 0)) + break; + --digitsIndex0; + } + if (digitsIndex0 === 2 && digits[0] === 0 && digits[1] === 0) { + buffer.writeCharCode$1(48); + return; + } + if (negative) + buffer.writeCharCode$1(45); + if (digits[0] === 0) + writtenIndex = this._serialize0$_style === B.OutputStyle_10 && digits[1] === 0 ? 2 : 1; + else + writtenIndex = 0; + for (; writtenIndex < digitsIndex; ++writtenIndex) + buffer.writeCharCode$1(48 + digits[writtenIndex]); + if (t1) { + buffer.writeCharCode$1(46); + for (; writtenIndex < digitsIndex0; ++writtenIndex) + buffer.writeCharCode$1(48 + digits[writtenIndex]); + } + }, + _serialize0$_visitQuotedString$2$forceDoubleQuote(string, forceDoubleQuote) { + var t1, includesSingleQuote, includesDoubleQuote, i, char, _1_2, _1_4, _0_0, quote, _this = this, + buffer = forceDoubleQuote ? _this._serialize0$_buffer : new A.StringBuffer(""); + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + for (t1 = string.length, includesSingleQuote = false, includesDoubleQuote = false, i = 0; i < t1; ++i) { + char = string.charCodeAt(i); + _1_2 = 39 === char; + if (_1_2 && forceDoubleQuote) { + buffer.writeCharCode$1(39); + continue; + } + if (_1_2 && includesDoubleQuote) { + _this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, true); + return; + } + if (_1_2) { + buffer.writeCharCode$1(39); + includesSingleQuote = true; + continue; + } + _1_4 = 34 === char; + if (_1_4 && forceDoubleQuote) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(34); + continue; + } + if (_1_4 && includesSingleQuote) { + _this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, true); + return; + } + if (_1_4) { + buffer.writeCharCode$1(34); + includesDoubleQuote = true; + continue; + } + if (0 === char || 1 === char || 2 === char || 3 === char || 4 === char || 5 === char || 6 === char || 7 === char || 8 === char || 10 === char || 11 === char || 12 === char || 13 === char || 14 === char || 15 === char || 16 === char || 17 === char || 18 === char || 19 === char || 20 === char || 21 === char || 22 === char || 23 === char || 24 === char || 25 === char || 26 === char || 27 === char || 28 === char || 29 === char || 30 === char || 31 === char || 127 === char) { + _this._serialize0$_writeEscape$4(buffer, char, string, i); + continue; + } + if (92 === char) { + buffer.writeCharCode$1(92); + buffer.writeCharCode$1(92); + continue; + } + _0_0 = _this._serialize0$_tryPrivateUseCharacter$4(buffer, char, string, i); + if (_0_0 != null) + i = _0_0; + else + buffer.writeCharCode$1(char); + } + if (forceDoubleQuote) + buffer.writeCharCode$1(34); + else { + quote = includesDoubleQuote ? 39 : 34; + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(quote); + t1.write$1(0, buffer); + t1.writeCharCode$1(quote); + } + }, + _serialize0$_visitQuotedString$1(string) { + return this._serialize0$_visitQuotedString$2$forceDoubleQuote(string, false); + }, + _serialize0$_visitUnquotedString$1(string) { + var t1, t2, afterNewline, i, _1_0, _0_0; + for (t1 = string.length, t2 = this._serialize0$_buffer, afterNewline = false, i = 0; i < t1; ++i) { + _1_0 = string.charCodeAt(i); + if (10 === _1_0) { + t2.writeCharCode$1(32); + afterNewline = true; + continue; + } + if (32 === _1_0) { + if (!afterNewline) + t2.writeCharCode$1(32); + continue; + } + _0_0 = this._serialize0$_tryPrivateUseCharacter$4(t2, _1_0, string, i); + if (_0_0 != null) + i = _0_0; + else + t2.writeCharCode$1(_1_0); + afterNewline = false; + } + }, + _serialize0$_tryPrivateUseCharacter$4(buffer, codeUnit, string, i) { + var t1; + if (this._serialize0$_style === B.OutputStyle_10) + return null; + if (codeUnit >= 57344 && codeUnit <= 63743) { + this._serialize0$_writeEscape$4(buffer, codeUnit, string, i); + return i; + } + if (codeUnit >>> 7 === 439 && string.length > i + 1) { + t1 = i + 1; + this._serialize0$_writeEscape$4(buffer, A.combineSurrogates(codeUnit, string.charCodeAt(t1)), string, t1); + return t1; + } + return null; + }, + _serialize0$_writeEscape$4(buffer, character, string, i) { + var t1, next; + buffer.writeCharCode$1(92); + buffer.write$1(0, B.JSInt_methods.toRadixString$1(character, 16)); + t1 = i + 1; + if (string.length === t1) + return; + next = string.charCodeAt(t1); + if (A.CharacterExtension_get_isHex0(next) || 32 === next || 9 === next) + buffer.writeCharCode$1(32); + }, + visitAttributeSelector$1(_, attribute) { + var _0_0, t2, + t1 = this._serialize0$_buffer; + t1.writeCharCode$1(91); + t1.write$1(0, attribute.name); + _0_0 = attribute.value; + if (_0_0 != null) { + t1.write$1(0, attribute.op); + if (A.Parser_isIdentifier0(_0_0) && !B.JSString_methods.startsWith$1(_0_0, "--")) { + t1.write$1(0, _0_0); + t2 = attribute.modifier; + if (t2 != null) + t1.writeCharCode$1(32); + } else { + this._serialize0$_visitQuotedString$1(_0_0); + t2 = attribute.modifier; + if (t2 != null) + if (this._serialize0$_style !== B.OutputStyle_10) + t1.writeCharCode$1(32); + } + A.NullableExtension_andThen0(t2, t1.get$write(t1)); + } + t1.writeCharCode$1(93); + }, + visitClassSelector$1(_, klass) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(46); + t1.write$1(0, klass.name); + }, + visitComplexSelector$1(complex) { + var t2, t3, t4, t5, t6, i, component, t7, t8, t9, _this = this, + t1 = complex.leadingCombinators; + _this._serialize0$_writeCombinators$1(t1); + if (t1.length >= 1 && complex.components.length >= 1) + if (_this._serialize0$_style !== B.OutputStyle_10) + _this._serialize0$_buffer.writeCharCode$1(32); + for (t1 = complex.components, t2 = t1.length, t3 = t2 - 1, t4 = _this._serialize0$_buffer, t5 = _this._serialize0$_style === B.OutputStyle_10, t6 = !t5, i = 0; i < t2; ++i) { + component = t1[i]; + _this.visitCompoundSelector$1(component.selector); + t7 = component.combinators; + t8 = t7.length === 0; + if (!t8) + if (t6) + t4.writeCharCode$1(32); + t9 = t5 ? "" : " "; + _this._serialize0$_writeBetween$3(t7, t9, t4.get$write(t4)); + if (i !== t3) + t7 = !t5 || t8; + else + t7 = false; + if (t7) + t4.writeCharCode$1(32); + } + }, + _serialize0$_writeCombinators$1(combinators) { + var t1 = this._serialize0$_style === B.OutputStyle_10 ? "" : " ", + t2 = this._serialize0$_buffer; + return this._serialize0$_writeBetween$3(combinators, t1, t2.get$write(t2)); + }, + visitCompoundSelector$1(compound) { + var t2, t3, _i, + t1 = this._serialize0$_buffer, + start = t1.get$length(t1); + for (t2 = compound.components, t3 = t2.length, _i = 0; _i < t3; ++_i) + t2[_i].accept$1(this); + if (t1.get$length(t1) === start) + t1.writeCharCode$1(42); + }, + visitIDSelector$1(_, id) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(35); + t1.write$1(0, id.name); + }, + visitSelectorList$1(list) { + var t1, t2, t3, t4, first, t5, _this = this, + complexes = list.components; + for (t1 = J.get$iterator$ax(_this._serialize0$_inspect ? complexes : new A.WhereIterable(complexes, new A._SerializeVisitor_visitSelectorList_closure0(), A._arrayInstanceType(complexes)._eval$1("WhereIterable<1>"))), t2 = _this._serialize0$_style !== B.OutputStyle_10, t3 = _this._serialize0$_buffer, t4 = _this._lineFeed.text, first = true; t1.moveNext$0();) { + t5 = t1.get$current(t1); + if (first) + first = false; + else { + t3.writeCharCode$1(44); + if (t5.lineBreak) { + if (t2) + t3.write$1(0, t4); + _this._serialize0$_writeIndentation$0(); + } else if (t2) + t3.writeCharCode$1(32); + } + _this.visitComplexSelector$1(t5); + } + }, + visitParentSelector$1(_, $parent) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(38); + A.NullableExtension_andThen0($parent.suffix, t1.get$write(t1)); + }, + visitPlaceholderSelector$1(_, placeholder) { + var t1 = this._serialize0$_buffer; + t1.writeCharCode$1(37); + t1.write$1(0, placeholder.name); + }, + visitPseudoSelector$1(_, pseudo) { + var _0_4, t3, + t1 = pseudo.name, + t2 = false; + if ("not" === t1) { + _0_4 = pseudo.selector; + if (_0_4 instanceof A.SelectorList0) + t2 = (_0_4 == null ? type$.SelectorList_2._as(_0_4) : _0_4).accept$1(B._IsInvisibleVisitor_true0); + } + if (t2) + return; + t2 = this._serialize0$_buffer; + t2.writeCharCode$1(58); + if (!pseudo.isSyntacticClass) + t2.writeCharCode$1(58); + t2.write$1(0, t1); + t1 = pseudo.argument; + t3 = t1 == null; + if (t3 && pseudo.selector == null) + return; + t2.writeCharCode$1(40); + if (!t3) { + t2.write$1(0, t1); + if (pseudo.selector != null) + t2.writeCharCode$1(32); + } + A.NullableExtension_andThen0(pseudo.selector, this.get$visitSelectorList()); + t2.writeCharCode$1(41); + }, + visitTypeSelector$1(_, type) { + this._serialize0$_buffer.write$1(0, type.name); + }, + visitUniversalSelector$1(_, universal) { + var t2, + t1 = universal.namespace; + if (t1 != null) { + t2 = this._serialize0$_buffer; + t2.write$1(0, t1); + t2.writeCharCode$1(124); + } + this._serialize0$_buffer.writeCharCode$1(42); + }, + _serialize0$_write$1(value) { + return this._serialize0$_buffer.forSpan$2(value.span, new A._SerializeVisitor__write_closure0(this, value)); + }, + _serialize0$_visitChildren$1($parent) { + var t2, t3, t4, t5, t6, t7, t8, prePrevious, previous, t9, previous0, t10, savedIndentation, _this = this, + t1 = _this._serialize0$_buffer; + t1.writeCharCode$1(123); + for (t2 = $parent.children, t3 = t2.$ti, t2 = new A.ListIterator(t2, t2.get$length(0), t3._eval$1("ListIterator")), t4 = _this._serialize0$_style === B.OutputStyle_10, t5 = !t4, t6 = _this.get$_serialize0$_requiresSemicolon(), t7 = !_this._serialize0$_inspect, t3 = t3._eval$1("ListBase.E"), t8 = _this._lineFeed.text, prePrevious = null, previous = null; t2.moveNext$0();) { + t9 = t2.__internal$_current; + previous0 = t9 == null ? t3._as(t9) : t9; + if (t7) + t9 = t4 ? previous0.accept$1(B._IsInvisibleVisitor_true_true0) : previous0.accept$1(B._IsInvisibleVisitor_true_false0); + else + t9 = false; + if (t9) + continue; + t9 = previous == null; + t10 = t9 ? null : t6.call$1(previous); + if (t10 == null ? false : t10) + t1.writeCharCode$1(59); + if (_this._serialize0$_isTrailingComment$2(previous0, t9 ? $parent : previous)) { + if (t5) + t1.writeCharCode$1(32); + savedIndentation = _this._serialize0$_indentation; + _this._serialize0$_indentation = 0; + new A._SerializeVisitor__visitChildren_closure1(_this, previous0).call$0(); + _this._serialize0$_indentation = savedIndentation; + } else { + if (t5) + t1.write$1(0, t8); + ++_this._serialize0$_indentation; + new A._SerializeVisitor__visitChildren_closure2(_this, previous0).call$0(); + --_this._serialize0$_indentation; + } + prePrevious = previous; + previous = previous0; + } + if (previous != null) { + if ((type$.CssParentNode_2._is(previous) ? previous.get$isChildless() : !(previous instanceof A.ModifiableCssComment0)) && t5) + t1.writeCharCode$1(59); + if (prePrevious == null && _this._serialize0$_isTrailingComment$2(previous, $parent)) { + if (t5) + t1.writeCharCode$1(32); + } else { + _this._serialize0$_writeLineFeed$0(); + _this._serialize0$_writeIndentation$0(); + } + } + t1.writeCharCode$1(125); + }, + _serialize0$_requiresSemicolon$1(node) { + return type$.CssParentNode_2._is(node) ? node.get$isChildless() : !(node instanceof A.ModifiableCssComment0); + }, + _serialize0$_isTrailingComment$2(node, previous) { + var t1, t2, t3, searchFrom, endOffset, t4, span; + if (this._serialize0$_style === B.OutputStyle_10) + return false; + if (!(node instanceof A.ModifiableCssComment0)) + return false; + t1 = node.span; + t2 = t1.get$sourceUrl(t1); + t3 = previous.get$span(previous); + if (!J.$eq$(t2, t3.get$sourceUrl(t3))) + return false; + t2 = previous.get$span(previous); + if (!(J.$eq$(t2.get$file(t2).url, t1.get$file(t1).url) && t2.get$start(t2).offset <= t1.get$start(t1).offset && t2.get$end(t2).offset >= t1.get$end(t1).offset)) { + t1 = t1.get$start(t1); + t1 = t1.file.getLine$1(t1.offset); + t2 = previous.get$span(previous); + t2 = t2.get$end(t2); + return t1 === t2.file.getLine$1(t2.offset); + } + t2 = t1.get$start(t1); + t3 = previous.get$span(previous); + searchFrom = t2.offset - t3.get$start(t3).offset - 1; + if (searchFrom < 0) + return false; + endOffset = Math.max(0, B.JSString_methods.lastIndexOf$2(previous.get$span(previous).get$text(), "{", searchFrom)); + t2 = previous.get$span(previous); + t2 = t2.get$file(t2); + t3 = previous.get$span(previous); + t3 = t3.get$start(t3); + t4 = previous.get$span(previous); + span = t2.span$2(0, t3.offset, t4.get$start(t4).offset + endOffset); + t1 = t1.get$start(t1); + t1 = t1.file.getLine$1(t1.offset); + t4 = A.FileLocation$_(span.file, span._end); + return t1 === t4.file.getLine$1(t4.offset); + }, + _serialize0$_writeLineFeed$0() { + if (this._serialize0$_style !== B.OutputStyle_10) + this._serialize0$_buffer.write$1(0, this._lineFeed.text); + }, + _serialize0$_writeIndentation$0() { + var _this = this; + if (_this._serialize0$_style === B.OutputStyle_10) + return; + _this._serialize0$_writeTimes$2(_this._serialize0$_indentCharacter, _this._serialize0$_indentation * _this._serialize0$_indentWidth); + }, + _serialize0$_writeTimes$2(char, times) { + var t1, i; + for (t1 = this._serialize0$_buffer, i = 0; i < times; ++i) + t1.writeCharCode$1(char); + }, + _serialize0$_writeBetween$1$3(iterable, text, callback) { + var t1, t2, first, value; + for (t1 = J.get$iterator$ax(iterable), t2 = this._serialize0$_buffer, first = true; t1.moveNext$0();) { + value = t1.get$current(t1); + if (first) + first = false; + else + t2.write$1(0, text); + callback.call$1(value); + } + }, + _serialize0$_writeBetween$3(iterable, text, callback) { + return this._serialize0$_writeBetween$1$3(iterable, text, callback, type$.dynamic); + } + }; + A._SerializeVisitor_visitCssComment_closure0.prototype = { + call$0() { + var t2, t3, _0_0, minimumIndentation, + t1 = this.$this; + if (t1._serialize0$_style === B.OutputStyle_10 && this.node.text.charCodeAt(2) !== 33) + return; + t2 = this.node; + t3 = t2.text; + if (B.JSString_methods.startsWith$1(t3, A.RegExp_RegExp("/\\*# source(Mapping)?URL=", false))) + return; + _0_0 = t1._serialize0$_minimumIndentation$1(t3); + if (_0_0 != null) { + t2 = t2.span; + t2 = t2.get$start(t2); + minimumIndentation = Math.min(_0_0, t2.file.getColumn$1(t2.offset)); + t1._serialize0$_writeIndentation$0(); + t1._serialize0$_writeWithIndent$2(t3, minimumIndentation); + } else { + t1._serialize0$_writeIndentation$0(); + t1._serialize0$_buffer.write$1(0, t3); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssAtRule_closure0.prototype = { + call$0() { + var t3, _0_0, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.writeCharCode$1(64); + t3 = this.node; + t1._serialize0$_write$1(t3.name); + _0_0 = t3.value; + if (_0_0 != null) { + t2.writeCharCode$1(32); + t1._serialize0$_write$1(_0_0); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssMediaRule_closure0.prototype = { + call$0() { + var t3, firstQuery, t4, t5, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@media"); + t3 = this.node.queries; + firstQuery = B.JSArray_methods.get$first(t3); + t4 = t1._serialize0$_style === B.OutputStyle_10; + t5 = true; + if (t4) + if (firstQuery.modifier == null) + if (firstQuery.type == null) { + t5 = firstQuery.conditions; + t5 = t5.length === 1 && B.JSString_methods.startsWith$1(B.JSArray_methods.get$first(t5), "(not "); + } + if (t5) + t2.writeCharCode$1(32); + t2 = t4 ? "," : ", "; + t1._serialize0$_writeBetween$3(t3, t2, t1.get$_serialize0$_visitMediaQuery()); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport_closure0.prototype = { + call$0() { + var t3, t4, _0_0, + t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@import"); + t3 = t1._serialize0$_style !== B.OutputStyle_10; + if (t3) + t2.writeCharCode$1(32); + t4 = this.node; + t2.forSpan$2(t4.url.span, new A._SerializeVisitor_visitCssImport__closure0(t1, t4)); + _0_0 = t4.modifiers; + if (_0_0 != null) { + if (t3) + t2.writeCharCode$1(32); + t2.write$1(0, _0_0); + } + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssImport__closure0.prototype = { + call$0() { + return this.$this._serialize0$_writeImportUrl$1(this.node.url.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssKeyframeBlock_closure0.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize0$_style === B.OutputStyle_10 ? "," : ", ", + t3 = t1._serialize0$_buffer; + return t1._serialize0$_writeBetween$3(this.node.selector.value, t2, t3.get$write(t3)); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssStyleRule_closure0.prototype = { + call$0() { + return this.$this.visitSelectorList$1(this.node._style_rule0$_selector._box0$_inner.value); + }, + $signature: 0 + }; + A._SerializeVisitor_visitCssSupportsRule_closure0.prototype = { + call$0() { + var t1 = this.$this, + t2 = t1._serialize0$_buffer; + t2.write$1(0, "@supports"); + if (!(t1._serialize0$_style === B.OutputStyle_10 && this.node.condition.value.charCodeAt(0) === 40)) + t2.writeCharCode$1(32); + t1._serialize0$_write$1(this.node.condition); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure1.prototype = { + call$0() { + var t1 = this.$this, + t2 = this.node; + if (t1._serialize0$_style === B.OutputStyle_10) + t1._serialize0$_writeFoldedValue$1(t2); + else + t1._serialize0$_writeReindentedValue$1(t2); + }, + $signature: 1 + }; + A._SerializeVisitor_visitCssDeclaration_closure2.prototype = { + call$0() { + return this.node.value.value.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor_visitList_closure2.prototype = { + call$1(element) { + return !element.get$isBlank(); + }, + $signature: 56 + }; + A._SerializeVisitor_visitList_closure3.prototype = { + call$1(element) { + var t1 = this.$this, + needsParens = t1._serialize0$_elementNeedsParens$2(this.value._list1$_separator, element); + if (needsParens) + t1._serialize0$_buffer.writeCharCode$1(40); + element.accept$1(t1); + if (needsParens) + t1._serialize0$_buffer.writeCharCode$1(41); + }, + $signature: 63 + }; + A._SerializeVisitor_visitList_closure4.prototype = { + call$1(element) { + element.accept$1(this.$this); + }, + $signature: 63 + }; + A._SerializeVisitor_visitMap_closure0.prototype = { + call$1(entry) { + var t1 = this.$this; + t1._serialize0$_writeMapElement$1(entry.key); + t1._serialize0$_buffer.write$1(0, ": "); + t1._serialize0$_writeMapElement$1(entry.value); + }, + $signature: 597 + }; + A._SerializeVisitor_visitSelectorList_closure0.prototype = { + call$1(complex) { + return !complex.accept$1(B._IsInvisibleVisitor_true0); + }, + $signature: 22 + }; + A._SerializeVisitor__write_closure0.prototype = { + call$0() { + return this.$this._serialize0$_buffer.write$1(0, this.value.value); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure1.prototype = { + call$0() { + return this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A._SerializeVisitor__visitChildren_closure2.prototype = { + call$0() { + this.child.accept$1(this.$this); + }, + $signature: 0 + }; + A.OutputStyle0.prototype = { + _enumToString$0() { + return "OutputStyle." + this._name; + } + }; + A.LineFeed0.prototype = { + _enumToString$0() { + return "LineFeed." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.JSSet.prototype = {}; + A.ShadowedModuleView0.prototype = { + get$url(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$url(t1); + }, + get$upstream() { + return this._shadowed_view0$_inner.get$upstream(); + }, + get$extensionStore() { + return this._shadowed_view0$_inner.get$extensionStore(); + }, + get$css(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$css(t1); + }, + get$preModuleComments() { + return this._shadowed_view0$_inner.get$preModuleComments(); + }, + get$transitivelyContainsCss() { + return this._shadowed_view0$_inner.get$transitivelyContainsCss(); + }, + get$transitivelyContainsExtensions() { + return this._shadowed_view0$_inner.get$transitivelyContainsExtensions(); + }, + setVariable$3($name, value, nodeWithSpan) { + if (!this.variables.containsKey$1($name)) + throw A.wrapException(A.SassScriptException$0("Undefined variable.", null)); + else + this._shadowed_view0$_inner.setVariable$3($name, value, nodeWithSpan); + }, + variableIdentity$1($name) { + return this._shadowed_view0$_inner.variableIdentity$1($name); + }, + couldHaveBeenConfigured$1(variables) { + var t3, t4, + t1 = this.variables, + t2 = this._shadowed_view0$_inner; + if (t1 === t2.get$variables()) + t1 = t2.couldHaveBeenConfigured$1(variables); + else { + t3 = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + for (t1 = t1.get$keys(t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t4 = t1.get$current(t1); + if (variables.contains$1(0, t4)) + t3.add$1(0, t4); + } + t1 = t2.couldHaveBeenConfigured$1(t3); + } + return t1; + }, + $eq(_, other) { + var t1, t2, t3, _this = this; + if (other == null) + return false; + t1 = false; + if (other instanceof A.ShadowedModuleView0) + if (_this._shadowed_view0$_inner.$eq(0, other._shadowed_view0$_inner)) { + t2 = _this.variables; + t2 = t2.get$keys(t2); + t3 = other.variables; + if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { + t2 = _this.functions; + t2 = t2.get$keys(t2); + t3 = other.functions; + if (B.C_IterableEquality.equals$2(0, t2, t3.get$keys(t3))) { + t1 = _this.mixins; + t1 = t1.get$keys(t1); + t2 = other.mixins; + t2 = B.C_IterableEquality.equals$2(0, t1, t2.get$keys(t2)); + t1 = t2; + } + } + } + return t1; + }, + get$hashCode(_) { + var t1 = this._shadowed_view0$_inner; + return t1.get$hashCode(t1); + }, + cloneCss$0() { + var _this = this; + return new A.ShadowedModuleView0(_this._shadowed_view0$_inner.cloneCss$0(), _this.variables, _this.variableNodes, _this.functions, _this.mixins, _this.$ti); + }, + toString$0(_) { + return "shadowed " + this._shadowed_view0$_inner.toString$0(0); + }, + $isModule1: 1, + get$variables() { + return this.variables; + }, + get$variableNodes() { + return this.variableNodes; + }, + get$functions(receiver) { + return this.functions; + }, + get$mixins() { + return this.mixins; + } + }; + A.SilentComment0.prototype = { + accept$1$1(visitor) { + return visitor.visitSilentComment$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.text; + }, + get$span(receiver) { + return this.span; + } + }; + A.InterpolatedSimpleSelector.prototype = {}; + A.SimpleSelector0.prototype = { + get$specificity() { + return 1000; + }, + get$hasComplicatedSuperselectorSemantics() { + return false; + }, + addSuffix$1(suffix) { + return A.throwExpression(A.MultiSpanSassException$0('Selector "' + this.toString$0(0) + "\" can't have a suffix", this.span, "outer selector", A.LinkedHashMap_LinkedHashMap$_empty(type$.FileSpan, type$.String), null)); + }, + unify$1(compound) { + var other, result, addedThis, _i, simple, _this = this, + t1 = false; + if (compound.length === 1) { + other = compound[0]; + if (!(other instanceof A.UniversalSelector0)) { + if (other instanceof A.PseudoSelector0) + t1 = other.isClass && other.name === "host" || other.get$isHostContext(); + } else + t1 = true; + } else + other = null; + if (t1) + return other.unify$1(A._setArrayType([_this], type$.JSArray_SimpleSelector_2)); + if (B.JSArray_methods.contains$1(compound, _this)) + return compound; + result = A._setArrayType([], type$.JSArray_SimpleSelector_2); + for (t1 = compound.length, addedThis = false, _i = 0; _i < compound.length; compound.length === t1 || (0, A.throwConcurrentModificationError)(compound), ++_i) { + simple = compound[_i]; + if (!addedThis && simple instanceof A.PseudoSelector0) { + result.push(_this); + addedThis = true; + } + result.push(simple); + } + if (!addedThis) + result.push(_this); + return result; + }, + isSuperselector$1(other) { + var list; + if (this.$eq(0, other)) + return true; + if (other instanceof A.PseudoSelector0 && other.isClass) { + list = other.selector; + if (list != null && $._subselectorPseudos0.contains$1(0, other.normalizedName)) + return B.JSArray_methods.every$1(list.components, new A.SimpleSelector_isSuperselector_closure0(this)); + } + return false; + } + }; + A.SimpleSelector_isSuperselector_closure0.prototype = { + call$1(complex) { + var t1 = complex.components; + return t1.length !== 0 && B.JSArray_methods.any$1(B.JSArray_methods.get$last(t1).selector.components, new A.SimpleSelector_isSuperselector__closure0(this.$this)); + }, + $signature: 22 + }; + A.SimpleSelector_isSuperselector__closure0.prototype = { + call$1(simple) { + return this.$this.isSuperselector$1(simple); + }, + $signature: 15 + }; + A.JSSimpleSelectorVisitor.prototype = { + visitSelectorList$1(_) { + return this._simpleSelectorError$0(); + }, + visitComplexSelector$1(_) { + return this._simpleSelectorError$0(); + }, + visitCompoundSelector$1(_) { + return this._simpleSelectorError$0(); + }, + _simpleSelectorError$0() { + return A.throwExpression(A.UnsupportedError$("SimpleSelectorVisitor only supports SimpleSelectors")); + }, + $isInterpolatedSelectorVisitor: 1 + }; + A.JSSimpleSelectorVisitorObject.prototype = {}; + A.SingleUnitSassNumber0.prototype = { + get$numeratorUnits(_) { + return A.List_List$unmodifiable([this._single_unit$_unit], type$.String); + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return true; + }, + get$hasComplexUnits() { + return false; + }, + withValue$1(value) { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, value, null); + }, + withSlash$2(numerator, denominator) { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, this._number1$_value, new A._Record_2(numerator, denominator)); + }, + hasUnit$1(unit) { + return unit === this._single_unit$_unit; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.SingleUnitSassNumber0 && A.conversionFactor0(this._single_unit$_unit, other._single_unit$_unit) != null; + }, + hasPossiblyCompatibleUnits$1(other) { + var t1, knownCompatibilities, otherUnit; + if (!(other instanceof A.SingleUnitSassNumber0)) + return false; + t1 = $.$get$_knownCompatibilitiesByUnit0(); + knownCompatibilities = t1.$index(0, this._single_unit$_unit.toLowerCase()); + if (knownCompatibilities == null) + return true; + otherUnit = other._single_unit$_unit.toLowerCase(); + return knownCompatibilities.contains$1(0, otherUnit) || !t1.containsKey$1(otherUnit); + }, + compatibleWithUnit$1(unit) { + return A.conversionFactor0(this._single_unit$_unit, unit) != null; + }, + coerceToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$coerceToMatch0(other, $name, otherName) : t1; + }, + coerceToMatch$1(other) { + return this.coerceToMatch$3(other, null, null); + }, + coerceValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceValueToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$coerceValueToMatch0(other, $name, otherName) : t1; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$convertToMatch(other, $name, otherName) : t1; + }, + convertValueToMatch$3(other, $name, otherName) { + var t1 = other instanceof A.SingleUnitSassNumber0 ? this._single_unit$_coerceValueToUnit$1(other._single_unit$_unit) : null; + return t1 == null ? this.super$SassNumber$convertValueToMatch0(other, $name, otherName) : t1; + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$3(newNumerators, newDenominators, $name) { + var t1 = J.getInterceptor$asx(newNumerators); + t1 = t1.get$length(newNumerators) === 1 && J.get$isEmpty$asx(newDenominators) ? this._single_unit$_coerceToUnit$1(t1.$index(newNumerators, 0)) : null; + return t1 == null ? this.super$SassNumber$coerce0(newNumerators, newDenominators, $name) : t1; + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + var t1 = J.getInterceptor$asx(newNumerators); + t1 = t1.get$length(newNumerators) === 1 && J.get$isEmpty$asx(newDenominators) ? this._single_unit$_coerceValueToUnit$1(t1.$index(newNumerators, 0)) : null; + return t1 == null ? this.super$SassNumber$coerceValue0(newNumerators, newDenominators, $name) : t1; + }, + coerceValueToUnit$2(unit, $name) { + var t1 = this._single_unit$_coerceValueToUnit$1(unit); + return t1 == null ? this.super$SassNumber$coerceValueToUnit0(unit, $name) : t1; + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + _single_unit$_coerceToUnit$1(unit) { + var t1 = this._single_unit$_unit; + if (t1 === unit) + return this; + return A.NullableExtension_andThen0(A.conversionFactor0(unit, t1), new A.SingleUnitSassNumber__coerceToUnit_closure0(this, unit)); + }, + _single_unit$_coerceValueToUnit$1(unit) { + return A.NullableExtension_andThen0(A.conversionFactor0(unit, this._single_unit$_unit), new A.SingleUnitSassNumber__coerceValueToUnit_closure0(this)); + }, + multiplyUnits$3(value, otherNumerators, otherDenominators) { + var mutableOtherDenominators, t1 = {}; + t1.value = value; + t1.newNumerators = otherNumerators; + mutableOtherDenominators = A._setArrayType(otherDenominators.slice(0), A._arrayInstanceType(otherDenominators)); + A.removeFirstWhere0(mutableOtherDenominators, new A.SingleUnitSassNumber_multiplyUnits_closure1(t1, this), new A.SingleUnitSassNumber_multiplyUnits_closure2(t1, this)); + return A.SassNumber_SassNumber$withUnits0(t1.value, mutableOtherDenominators, t1.newNumerators); + }, + unaryMinus$0() { + return new A.SingleUnitSassNumber0(this._single_unit$_unit, -this._number1$_value, null); + }, + $eq(_, other) { + var factor; + if (other == null) + return false; + if (other instanceof A.SingleUnitSassNumber0) { + factor = A.conversionFactor0(other._single_unit$_unit, this._single_unit$_unit); + return factor != null && A.fuzzyEquals0(this._number1$_value * factor, other._number1$_value); + } else + return false; + }, + get$hashCode(_) { + var _this = this, + t1 = _this.hashCache; + return t1 == null ? _this.hashCache = A.fuzzyHashCode0(_this._number1$_value * _this.canonicalMultiplierForUnit$1(_this._single_unit$_unit)) : t1; + } + }; + A.SingleUnitSassNumber__coerceToUnit_closure0.prototype = { + call$1(factor) { + return new A.SingleUnitSassNumber0(this.unit, this.$this._number1$_value * factor, null); + }, + $signature: 598 + }; + A.SingleUnitSassNumber__coerceValueToUnit_closure0.prototype = { + call$1(factor) { + return this.$this._number1$_value * factor; + }, + $signature: 12 + }; + A.SingleUnitSassNumber_multiplyUnits_closure1.prototype = { + call$1(denominator) { + var factor = A.conversionFactor0(denominator, this.$this._single_unit$_unit); + if (factor == null) + return false; + this._box_0.value *= factor; + return true; + }, + $signature: 4 + }; + A.SingleUnitSassNumber_multiplyUnits_closure2.prototype = { + call$0() { + var t1 = A._setArrayType([this.$this._single_unit$_unit], type$.JSArray_String), + t2 = this._box_0; + B.JSArray_methods.addAll$1(t1, t2.newNumerators); + t2.newNumerators = t1; + }, + $signature: 0 + }; + A.SourceInterpolationVisitor.prototype = { + visitBinaryOperationExpression$1(_, node) { + return this.buffer = null; + }, + visitBooleanExpression$1(_, node) { + return this.buffer = null; + }, + visitColorExpression$1(_, node) { + var t2, + t1 = this.buffer; + if (t1 != null) { + t2 = node.span.get$text(); + t1 = t1._interpolation_buffer0$_text; + t1._contents += t2; + } + return null; + }, + visitFunctionExpression$1(_, node) { + return this.buffer = null; + }, + visitInterpolatedFunctionExpression$1(_, node) { + var t1 = this.buffer; + if (t1 != null) + t1.addInterpolation$1(node.name); + this._visitArguments$1(node.$arguments); + }, + _visitArguments$1($arguments) { + var t2, t3, _this = this, + t1 = $arguments.named; + if (t1.get$isNotEmpty(t1) || $arguments.rest != null) + return; + t1 = $arguments.positional; + if (t1.length === 0) { + t1 = _this.buffer; + if (t1 != null) { + t2 = $arguments.span.get$text(); + t1 = t1._interpolation_buffer0$_text; + t1._contents += t2; + } + return; + } + t2 = _this.buffer; + if (t2 != null) { + t3 = B.JSArray_methods.get$first(t1); + t3 = A.SpanExtensions_before($arguments.span, t3.get$span(t3)); + t3 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t3.file._decodedChars, t3._file$_start, t3._end), 0, null); + t2 = t2._interpolation_buffer0$_text; + t2._contents += t3; + } + _this._writeListAndBetween$2(t1, new A.SourceInterpolationVisitor__visitArguments_closure(_this)); + t2 = _this.buffer; + if (t2 != null) { + t1 = B.JSArray_methods.get$last(t1); + t1 = A.SpanExtensions_after($arguments.span, t1.get$span(t1)); + t1 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); + t2 = t2._interpolation_buffer0$_text; + t2._contents += t1; + } + }, + visitIfExpression$1(_, node) { + var t1, t2, t3, lastSpan, _i, t4, condition, expression, firstSpan, t5, t6, t7, t8, _this = this, _null = null; + for (t1 = node.branches, t2 = t1.length, t3 = node.span, lastSpan = _null, _i = 0; _i < t2; ++_i) { + t4 = t1[_i]; + condition = t4._0; + expression = t4._1; + t4 = condition == null; + firstSpan = t4 ? _null : condition.get$span(condition); + if (firstSpan == null) + firstSpan = expression.get$span(expression); + t5 = _this.buffer; + if (t5 != null) { + t6 = lastSpan == null ? _null : A.SpanExtensions_between(lastSpan, firstSpan); + if (t6 == null) + t6 = A.SpanExtensions_before(t3, firstSpan); + t7 = t6._file$_start; + t8 = t6.file._decodedChars; + t8 = A.String_String$fromCharCodes(new Uint32Array(t8.subarray(t7, A._checkValidRange(t7, t6._end, t8.length))), 0, _null); + t5 = t5._interpolation_buffer0$_text; + t5._contents += t8; + } + if (!t4) { + condition.accept$1(_this); + t4 = _this.buffer; + if (t4 != null) { + t5 = A.SpanExtensions_between(condition.get$span(condition), expression.get$span(expression)); + t6 = t5._file$_start; + t7 = t5.file._decodedChars; + t7 = A.String_String$fromCharCodes(new Uint32Array(t7.subarray(t6, A._checkValidRange(t6, t5._end, t7.length))), 0, _null); + t4 = t4._interpolation_buffer0$_text; + t4._contents += t7; + } + } + expression.accept$1(_this); + lastSpan = expression.get$span(expression); + } + }, + visitIfConditionParenthesized$1(_, node) { + var t2, + t1 = this.buffer; + if (t1 != null) { + t2 = node.expression; + t2 = A.SpanExtensions_before(node.span, t2.get$span(t2)); + t2 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null); + t1 = t1._interpolation_buffer0$_text; + t1._contents += t2; + } + t1 = node.expression; + t1.accept$1(this); + t2 = this.buffer; + if (t2 != null) { + t1 = A.SpanExtensions_after(node.span, t1.get$span(t1)); + t1 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); + t2 = t2._interpolation_buffer0$_text; + t2._contents += t1; + } + }, + visitIfConditionNegation$1(_, node) { + var t2, + t1 = this.buffer; + if (t1 != null) { + t2 = node.expression; + t2 = A.SpanExtensions_before(node.span, t2.get$span(t2)); + t2 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null); + t1 = t1._interpolation_buffer0$_text; + t1._contents += t2; + } + node.expression.accept$1(this); + }, + visitIfConditionOperation$1(_, node) { + this._writeListAndBetween$2(node.expressions, new A.SourceInterpolationVisitor_visitIfConditionOperation_closure(this)); + }, + visitIfConditionFunction$1(_, node) { + var t2, _this = this, + t1 = _this.buffer; + if (t1 != null) + t1.addInterpolation$1(node.name); + t1 = _this.buffer; + if (t1 != null) { + t2 = A.SpanExtensions_between(node.name.span, node.$arguments.span); + t2 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null); + t1 = t1._interpolation_buffer0$_text; + t1._contents += t2; + } + t1 = _this.buffer; + if (t1 != null) + t1.addInterpolation$1(node.$arguments); + t1 = _this.buffer; + if (t1 != null) { + t2 = A.SpanExtensions_after(node.span, node.$arguments.span); + t2 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t2.file._decodedChars, t2._file$_start, t2._end), 0, null); + t1 = t1._interpolation_buffer0$_text; + t1._contents += t2; + } + }, + visitIfConditionSass$1(_, node) { + this.buffer = null; + }, + visitIfConditionRaw$1(_, node) { + var t1 = this.buffer; + if (t1 != null) + t1.addInterpolation$1(node.text); + }, + visitLegacyIfExpression$1(_, node) { + return this.buffer = null; + }, + visitListExpression$1(_, node) { + var t3, t4, _this = this, + t1 = node.contents, + t2 = t1.length; + if (t2 <= 1 && !node.hasBrackets) { + _this.buffer = null; + return; + } + t3 = node.hasBrackets; + if (t3 && t2 === 0) { + t1 = _this.buffer; + if (t1 != null) { + t2 = node.span.get$text(); + t1 = t1._interpolation_buffer0$_text; + t1._contents += t2; + } + return; + } + if (t3) { + t2 = _this.buffer; + if (t2 != null) { + t4 = B.JSArray_methods.get$first(t1); + t4 = A.SpanExtensions_before(node.span, t4.get$span(t4)); + t4 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t4.file._decodedChars, t4._file$_start, t4._end), 0, null); + t2 = t2._interpolation_buffer0$_text; + t2._contents += t4; + } + } + _this._writeListAndBetween$2(t1, new A.SourceInterpolationVisitor_visitListExpression_closure(_this)); + if (t3) { + t2 = _this.buffer; + if (t2 != null) { + t1 = B.JSArray_methods.get$last(t1); + t1 = A.SpanExtensions_after(node.span, t1.get$span(t1)); + t1 = A.String_String$fromCharCodes(B.NativeUint32List_methods.sublist$2(t1.file._decodedChars, t1._file$_start, t1._end), 0, null); + t2 = t2._interpolation_buffer0$_text; + t2._contents += t1; + } + } + }, + visitMapExpression$1(_, node) { + return this.buffer = null; + }, + visitNullExpression$1(_, node) { + return this.buffer = null; + }, + visitNumberExpression$1(_, node) { + var t2, + t1 = this.buffer; + if (t1 != null) { + t2 = node.span.get$text(); + t1 = t1._interpolation_buffer0$_text; + t1._contents += t2; + } + return null; + }, + visitParenthesizedExpression$1(_, node) { + return this.buffer = null; + }, + visitSelectorExpression$1(_, node) { + return this.buffer = null; + }, + visitStringExpression$1(_, node) { + var t2, t3, t4, t5, i, span, _0_0, t6, expression, t7, t8, t9, _this = this, + t1 = node.text; + if (t1.get$asPlain() != null) { + t2 = _this.buffer; + if (t2 != null) { + t1 = t1.span.get$text(); + t2 = t2._interpolation_buffer0$_text; + t2._contents += t1; + } + return; + } + for (t2 = t1.contents, t3 = t2.length, t4 = t3 - 1, t5 = t1.span, i = 0; i < t3; ++i) { + span = t1.spanForElement$1(i); + _0_0 = t2[i]; + t6 = _0_0 instanceof A.Expression0; + expression = t6 ? _0_0 : null; + if (t6) { + if (i === 0) { + t6 = _this.buffer; + if (t6 != null) { + t7 = A.SpanExtensions_before(t5, span); + t8 = t7._file$_start; + t9 = t7.file._decodedChars; + t9 = A.String_String$fromCharCodes(new Uint32Array(t9.subarray(t8, A._checkValidRange(t8, t7._end, t9.length))), 0, null); + t6 = t6._interpolation_buffer0$_text; + t6._contents += t9; + } + } + t6 = _this.buffer; + if (t6 != null) { + t6._interpolation_buffer0$_flushText$0(); + t6._interpolation_buffer0$_contents.push(expression); + t6._interpolation_buffer0$_spans.push(span); + } + if (i === t4) { + t6 = _this.buffer; + if (t6 != null) { + t7 = A.SpanExtensions_after(t5, span); + t8 = t7._file$_start; + t9 = t7.file._decodedChars; + t9 = A.String_String$fromCharCodes(new Uint32Array(t9.subarray(t8, A._checkValidRange(t8, t7._end, t9.length))), 0, null); + t6 = t6._interpolation_buffer0$_text; + t6._contents += t9; + } + } + continue; + } + t6 = _this.buffer; + if (t6 != null) { + t6 = t6._interpolation_buffer0$_text; + t7 = span.toString$0(0); + t6._contents += t7; + } + } + }, + visitSupportsExpression$1(_, node) { + return this.buffer = null; + }, + visitUnaryOperationExpression$1(_, node) { + return this.buffer = null; + }, + visitValueExpression$1(_, node) { + return this.buffer = null; + }, + visitVariableExpression$1(_, node) { + return this.buffer = null; + }, + _writeListAndBetween$1$2(nodes, visit) { + var t1, lastSpan, _i, node, t2, t3, t4, t5; + for (t1 = nodes.length, lastSpan = null, _i = 0; _i < t1; ++_i) { + node = nodes[_i]; + if (lastSpan != null) { + t2 = this.buffer; + if (t2 != null) { + t3 = A.SpanExtensions_between(lastSpan, node.get$span(node)); + t4 = t3._file$_start; + t5 = t3.file._decodedChars; + t5 = A.String_String$fromCharCodes(new Uint32Array(t5.subarray(t4, A._checkValidRange(t4, t3._end, t5.length))), 0, null); + t2 = t2._interpolation_buffer0$_text; + t2._contents += t5; + } + } + visit.call$1(node); + if (this.buffer == null) + return; + lastSpan = node.get$span(node); + } + }, + _writeListAndBetween$2(nodes, visit) { + return this._writeListAndBetween$1$2(nodes, visit, type$.AstNode_2); + }, + $isExpressionVisitor: 1, + $isIfConditionExpressionVisitor: 1 + }; + A.SourceInterpolationVisitor__visitArguments_closure.prototype = { + call$1(node) { + return node.accept$1(this.$this); + }, + $signature: 136 + }; + A.SourceInterpolationVisitor_visitIfConditionOperation_closure.prototype = { + call$1(node) { + return node.accept$1(this.$this); + }, + $signature: 600 + }; + A.SourceInterpolationVisitor_visitListExpression_closure.prototype = { + call$1(node) { + return node.accept$1(this.$this); + }, + $signature: 136 + }; + A.SourceMapBuffer0.prototype = { + get$_source_map_buffer0$_targetLocation() { + var t1 = this._source_map_buffer0$_buffer._contents, + t2 = this._source_map_buffer0$_line; + return A.SourceLocation$(t1.length, this._source_map_buffer0$_column, t2, null); + }, + get$length(_) { + return this._source_map_buffer0$_buffer._contents.length; + }, + forSpan$1$2(span, callback) { + var t1, _this = this, + wasInSpan = _this._source_map_buffer0$_inSpan; + _this._source_map_buffer0$_inSpan = true; + _this._source_map_buffer0$_addEntry$2(span.get$start(span), _this.get$_source_map_buffer0$_targetLocation()); + try { + t1 = callback.call$0(); + return t1; + } finally { + _this._source_map_buffer0$_inSpan = wasInSpan; + } + }, + forSpan$2(span, callback) { + return this.forSpan$1$2(span, callback, type$.dynamic); + }, + _source_map_buffer0$_addEntry$2(source, target) { + var entry, t2, + t1 = this._source_map_buffer0$_entries; + if (t1.length !== 0) { + entry = B.JSArray_methods.get$last(t1); + t2 = entry.source; + if (t2.file.getLine$1(t2.offset) === source.file.getLine$1(source.offset) && entry.target.line === target.line) + return; + if (entry.target.offset === target.offset) + return; + } + t1.push(new A.Entry(source, target, null)); + }, + write$1(_, object) { + var t1, i, + string = J.toString$0$(object); + this._source_map_buffer0$_buffer._contents += string; + for (t1 = string.length, i = 0; i < t1; ++i) + if (string.charCodeAt(i) === 10) + this._source_map_buffer0$_writeLine$0(); + else + ++this._source_map_buffer0$_column; + }, + writeCharCode$1(charCode) { + var t1 = this._source_map_buffer0$_buffer, + t2 = A.Primitives_stringFromCharCode(charCode); + t1._contents += t2; + if (charCode === 10) + this._source_map_buffer0$_writeLine$0(); + else + ++this._source_map_buffer0$_column; + }, + _source_map_buffer0$_writeLine$0() { + var _this = this, + t1 = _this._source_map_buffer0$_entries; + if (B.JSArray_methods.get$last(t1).target.line === _this._source_map_buffer0$_line && B.JSArray_methods.get$last(t1).target.column === _this._source_map_buffer0$_column) + t1.pop(); + ++_this._source_map_buffer0$_line; + _this._source_map_buffer0$_column = 0; + if (_this._source_map_buffer0$_inSpan) + t1.push(new A.Entry(B.JSArray_methods.get$last(t1).source, _this.get$_source_map_buffer0$_targetLocation(), null)); + }, + toString$0(_) { + var t1 = this._source_map_buffer0$_buffer._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + buildSourceMap$1$prefix(prefix) { + var i, t2, prefixColumn, _box_0 = {}, + t1 = prefix.length; + if (t1 === 0) + return A.SingleMapping_SingleMapping$fromEntries(this._source_map_buffer0$_entries); + _box_0.prefixColumn = _box_0.prefixLines = 0; + for (i = 0, t2 = 0; i < t1; ++i) + if (prefix.charCodeAt(i) === 10) { + ++_box_0.prefixLines; + _box_0.prefixColumn = 0; + t2 = 0; + } else { + prefixColumn = t2 + 1; + _box_0.prefixColumn = prefixColumn; + t2 = prefixColumn; + } + t2 = this._source_map_buffer0$_entries; + return A.SingleMapping_SingleMapping$fromEntries(new A.MappedListIterable(t2, new A.SourceMapBuffer_buildSourceMap_closure0(_box_0, t1), A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Entry>"))); + } + }; + A.SourceMapBuffer_buildSourceMap_closure0.prototype = { + call$1(entry) { + var t1 = entry.target, + t2 = t1.line, + t3 = this._box_0, + t4 = t3.prefixLines; + t3 = t2 === 0 ? t3.prefixColumn : 0; + return new A.Entry(entry.source, A.SourceLocation$(t1.offset + this.prefixLength, t1.column + t3, t2 + t4, null), entry.identifierName); + }, + $signature: 164 + }; + A.updateSourceSpanPrototype_closure.prototype = { + call$0() { + return this.span; + }, + $signature: 16 + }; + A.updateSourceSpanPrototype_closure0.prototype = { + call$1(span) { + return span.get$start(span); + }, + $signature: 264 + }; + A.updateSourceSpanPrototype_closure1.prototype = { + call$1(span) { + return span.get$end(span); + }, + $signature: 264 + }; + A.updateSourceSpanPrototype_closure2.prototype = { + call$1(span) { + return A.NullableExtension_andThen0(span.get$sourceUrl(span), new A.updateSourceSpanPrototype__closure()); + }, + $signature: 602 + }; + A.updateSourceSpanPrototype__closure.prototype = { + call$1(url) { + var t1, _null = null; + if (url.get$scheme() === "") { + t1 = $.$get$context(); + t1 = t1.toUri$1(A.absolute(t1.style.pathFromUri$1(A._parseUri(url)), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null)); + } else + t1 = url; + return new self.URL(t1.toString$0(0)); + }, + $signature: 176 + }; + A.updateSourceSpanPrototype_closure3.prototype = { + call$1(span) { + return span.get$text(); + }, + $signature: 265 + }; + A.updateSourceSpanPrototype_closure4.prototype = { + call$1(span) { + return span.get$context(span); + }, + $signature: 265 + }; + A.updateSourceSpanPrototype_closure5.prototype = { + call$1($location) { + return $location.get$line(); + }, + $signature: 266 + }; + A.updateSourceSpanPrototype_closure6.prototype = { + call$1($location) { + return $location.get$column(); + }, + $signature: 266 + }; + A.ColorSpace0.prototype = { + get$isLegacyInternal() { + return false; + }, + get$isPolarInternal() { + return false; + }, + convert$5(dest, channel0, channel1, channel2, alpha) { + return this.convertLinear$5(dest, channel0, channel1, channel2, alpha); + }, + convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var t1, t2, transformedBlue, transformedGreen, transformedRed, linearRed, linearGreen, linearBlue, matrix, _this = this; + $label0$0: { + t1 = B.HslColorSpace_JQ20 !== dest; + if (!t1 || B.HwbColorSpace_guQ0 === dest) { + t2 = B.SrgbColorSpace_thf0; + break $label0$0; + } + if (B.LabColorSpace_2nT0 === dest || B.LchColorSpace_Bpv0 === dest) { + t2 = B.XyzD50ColorSpace_2OB0; + break $label0$0; + } + if (B.OklabColorSpace_5400 === dest || B.OklchColorSpace_9Gj0 === dest) { + t2 = B.LmsColorSpace_Os30; + break $label0$0; + } + t2 = dest; + break $label0$0; + } + if (t2 === _this) { + transformedBlue = blue; + transformedGreen = green; + transformedRed = red; + } else { + linearRed = _this.toLinear$1(red == null ? 0 : red); + linearGreen = _this.toLinear$1(green == null ? 0 : green); + linearBlue = _this.toLinear$1(blue == null ? 0 : blue); + matrix = _this.transformationMatrix$1(t2); + transformedRed = t2.fromLinear$1(matrix[0] * linearRed + matrix[1] * linearGreen + matrix[2] * linearBlue); + transformedGreen = t2.fromLinear$1(matrix[3] * linearRed + matrix[4] * linearGreen + matrix[5] * linearBlue); + transformedBlue = t2.fromLinear$1(matrix[6] * linearRed + matrix[7] * linearGreen + matrix[8] * linearBlue); + } + $label1$1: { + if (!t1 || B.HwbColorSpace_guQ0 === dest) { + t1 = B.SrgbColorSpace_thf0.convert$8$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingChroma, missingHue, missingLightness); + break $label1$1; + } + if (B.LabColorSpace_2nT0 === dest || B.LchColorSpace_Bpv0 === dest) { + t1 = B.XyzD50ColorSpace_2OB0.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + break $label1$1; + } + if (B.OklabColorSpace_5400 === dest || B.OklchColorSpace_9Gj0 === dest) { + t1 = B.LmsColorSpace_Os30.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, transformedRed, transformedGreen, transformedBlue, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + break $label1$1; + } + t1 = red == null ? null : transformedRed; + t2 = green == null ? null : transformedGreen; + t1 = A.SassColor_SassColor$forSpaceInternal0(dest, t1, t2, blue == null ? null : transformedBlue, alpha); + break $label1$1; + } + return t1; + }, + convertLinear$5(dest, red, green, blue, alpha) { + return this.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false, false, false); + }, + toLinear$1(channel) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); + }, + fromLinear$1(channel) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space " + this.toString$0(0) + " doesn't support linear conversions.")); + }, + transformationMatrix$1(dest) { + return A.throwExpression(A.UnimplementedError$("[BUG] Color space conversion from " + this.toString$0(0) + " to " + dest.toString$0(0) + " not implemented.")); + }, + toString$0(_) { + return this.name; + } + }; + A.SrgbColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, missingChroma, missingHue, missingLightness) { + var max, min, delta, hue, lightness, saturation, t1, t2, whiteness, blackness, _null = null; + if (B.HslColorSpace_JQ20 === dest || B.HwbColorSpace_guQ0 === dest) { + if (red == null) + red = 0; + if (green == null) + green = 0; + if (blue == null) + blue = 0; + max = Math.max(Math.max(red, green), blue); + min = Math.min(Math.min(red, green), blue); + delta = max - min; + if (max === min) + hue = 0; + else if (max === red) + hue = 60 * (green - blue) / delta + 360; + else + hue = max === green ? 60 * (blue - red) / delta + 120 : 60 * (red - green) / delta + 240; + if (dest === B.HslColorSpace_JQ20) { + lightness = (min + max) / 2; + saturation = lightness === 0 || lightness === 1 ? 0 : 100 * (max - lightness) / Math.min(lightness, 1 - lightness); + if (saturation < 0) { + hue += 180; + saturation = Math.abs(saturation); + } + t1 = missingHue || A.fuzzyEquals0(saturation, 0) ? _null : B.JSNumber_methods.$mod(hue, 360); + t2 = missingChroma ? _null : saturation; + return A.SassColor_SassColor$forSpaceInternal0(dest, t1, t2, missingLightness ? _null : lightness * 100, alpha); + } else { + whiteness = min * 100; + blackness = 100 - max * 100; + if (!missingHue) { + t1 = whiteness + blackness; + t1 = t1 > 100 || A.fuzzyEquals0(t1, 100); + } else + t1 = true; + return A.SassColor_SassColor$forSpaceInternal0(dest, t1 ? _null : B.JSNumber_methods.$mod(hue, 360), whiteness, blackness, alpha); + } + } + if (B.RgbColorSpace_i0P0 === dest) { + t1 = red == null ? _null : red * 255; + t2 = green == null ? _null : green * 255; + return A.SassColor_SassColor$rgbInternal0(t1, t2, blue == null ? _null : blue * 255, alpha, _null); + } + if (B.SrgbLinearColorSpace_kUj0 === dest) { + t1 = this.get$toLinear(); + return A.SassColor_SassColor$forSpaceInternal0(dest, A.NullableExtension_andThen0(red, t1), A.NullableExtension_andThen0(green, t1), A.NullableExtension_andThen0(blue, t1), alpha); + } + return this.super$ColorSpace$convertLinear0(dest, red, green, blue, alpha, false, false, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, red, green, blue, alpha) { + return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, false, false); + }, + convert$6$missingHue(dest, red, green, blue, alpha, missingHue) { + return this.convert$8$missingChroma$missingHue$missingLightness(dest, red, green, blue, alpha, false, missingHue, false); + }, + toLinear$1(channel) { + return A.srgbAndDisplayP3ToLinear0(channel); + }, + fromLinear$1(channel) { + return A.srgbAndDisplayP3FromLinear0(channel); + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.DisplayP3ColorSpace_MmT0 === dest || B.DisplayP3LinearColorSpace_PrP0 === dest) { + t1 = $.$get$linearSrgbToLinearDisplayP30(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$linearSrgbToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$linearSrgbToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$linearSrgbToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$linearSrgbToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$linearSrgbToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$linearSrgbToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.SrgbLinearColorSpace0.prototype = { + get$isBoundedInternal() { + return true; + }, + convert$5(dest, red, green, blue, alpha) { + var t1; + $label0$0: { + if (B.RgbColorSpace_i0P0 === dest || B.HslColorSpace_JQ20 === dest || B.HwbColorSpace_guQ0 === dest || B.SrgbColorSpace_thf0 === dest) { + t1 = B.SrgbColorSpace_thf0.convert$5(dest, A.NullableExtension_andThen0(red, A.utils2__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen0(green, A.utils2__srgbAndDisplayP3FromLinear$closure()), A.NullableExtension_andThen0(blue, A.utils2__srgbAndDisplayP3FromLinear$closure()), alpha); + break $label0$0; + } + t1 = this.super$ColorSpace$convert0(dest, red, green, blue, alpha); + break $label0$0; + } + return t1; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.DisplayP3ColorSpace_MmT0 === dest || B.DisplayP3LinearColorSpace_PrP0 === dest) { + t1 = $.$get$linearSrgbToLinearDisplayP30(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$linearSrgbToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$linearSrgbToLinearProphotoRgb0(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$linearSrgbToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$linearSrgbToXyzD650(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$linearSrgbToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$linearSrgbToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.Statement0.prototype = {$isAstNode0: 1, $isSassNode: 1}; + A.JSStatementVisitor.prototype = { + visitAtRootRule$1(_, node) { + return J.visitAtRootRule$1$x(this._statement$_inner, node); + }, + visitAtRule$1(_, node) { + return J.visitAtRule$1$x(this._statement$_inner, node); + }, + visitContentBlock$1(_, node) { + return J.visitContentBlock$1$x(this._statement$_inner, node); + }, + visitContentRule$1(_, node) { + return J.visitContentRule$1$x(this._statement$_inner, node); + }, + visitDebugRule$1(_, node) { + return J.visitDebugRule$1$x(this._statement$_inner, node); + }, + visitDeclaration$1(_, node) { + return J.visitDeclaration$1$x(this._statement$_inner, node); + }, + visitEachRule$1(_, node) { + return J.visitEachRule$1$x(this._statement$_inner, node); + }, + visitErrorRule$1(_, node) { + return J.visitErrorRule$1$x(this._statement$_inner, node); + }, + visitExtendRule$1(_, node) { + return J.visitExtendRule$1$x(this._statement$_inner, node); + }, + visitForRule$1(_, node) { + return J.visitForRule$1$x(this._statement$_inner, node); + }, + visitForwardRule$1(_, node) { + return J.visitForwardRule$1$x(this._statement$_inner, node); + }, + visitFunctionRule$1(_, node) { + return J.visitFunctionRule$1$x(this._statement$_inner, node); + }, + visitIfRule$1(_, node) { + return J.visitIfRule$1$x(this._statement$_inner, node); + }, + visitImportRule$1(_, node) { + return J.visitImportRule$1$x(this._statement$_inner, node); + }, + visitIncludeRule$1(_, node) { + return J.visitIncludeRule$1$x(this._statement$_inner, node); + }, + visitLoudComment$1(_, node) { + return J.visitLoudComment$1$x(this._statement$_inner, node); + }, + visitMediaRule$1(_, node) { + return J.visitMediaRule$1$x(this._statement$_inner, node); + }, + visitMixinRule$1(_, node) { + return J.visitMixinRule$1$x(this._statement$_inner, node); + }, + visitReturnRule$1(_, node) { + return J.visitReturnRule$1$x(this._statement$_inner, node); + }, + visitSilentComment$1(_, node) { + return J.visitSilentComment$1$x(this._statement$_inner, node); + }, + visitStyleRule$1(_, node) { + return J.visitStyleRule$1$x(this._statement$_inner, node); + }, + visitStylesheet$1(_, node) { + return J.visitStylesheet$1$x(this._statement$_inner, node); + }, + visitSupportsRule$1(_, node) { + return J.visitSupportsRule$1$x(this._statement$_inner, node); + }, + visitUseRule$1(_, node) { + return J.visitUseRule$1$x(this._statement$_inner, node); + }, + visitVariableDeclaration$1(_, node) { + return J.visitVariableDeclaration$1$x(this._statement$_inner, node); + }, + visitWarnRule$1(_, node) { + return J.visitWarnRule$1$x(this._statement$_inner, node); + }, + visitWhileRule$1(_, node) { + return J.visitWhileRule$1$x(this._statement$_inner, node); + }, + $isStatementVisitor: 1 + }; + A.JSStatementVisitorObject.prototype = {}; + A.StatementSearchVisitor0.prototype = { + visitAtRootRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitAtRule$1(_, node) { + return A.NullableExtension_andThen0(node.children, this.get$visitChildren()); + }, + visitContentBlock$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitContentRule$1(_, node) { + return null; + }, + visitDebugRule$1(_, node) { + return null; + }, + visitDeclaration$1(_, node) { + return A.NullableExtension_andThen0(node.children, this.get$visitChildren()); + }, + visitEachRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitErrorRule$1(_, node) { + return null; + }, + visitExtendRule$1(_, node) { + return null; + }, + visitForRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitForwardRule$1(_, node) { + return null; + }, + visitFunctionRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitIfRule$1(_, node) { + var t1 = A.IterableExtension_search0(node.clauses, new A.StatementSearchVisitor_visitIfRule_closure1(this)); + return t1 == null ? A.NullableExtension_andThen0(node.lastClause, new A.StatementSearchVisitor_visitIfRule_closure2(this)) : t1; + }, + visitImportRule$1(_, node) { + return null; + }, + visitIncludeRule$1(_, node) { + return A.NullableExtension_andThen0(node.content, this.get$visitContentBlock(this)); + }, + visitLoudComment$1(_, node) { + return null; + }, + visitMediaRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitMixinRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitReturnRule$1(_, node) { + return null; + }, + visitSilentComment$1(_, node) { + return null; + }, + visitStyleRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitStylesheet$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitSupportsRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitUseRule$1(_, node) { + return null; + }, + visitVariableDeclaration$1(_, node) { + return null; + }, + visitWarnRule$1(_, node) { + return null; + }, + visitWhileRule$1(_, node) { + return this.visitChildren$1(node.children); + }, + visitChildren$1(children) { + return A.IterableExtension_search0(children, new A.StatementSearchVisitor_visitChildren_closure0(this)); + } + }; + A.StatementSearchVisitor_visitIfRule_closure1.prototype = { + call$1(clause) { + return A.IterableExtension_search0(clause.children, new A.StatementSearchVisitor_visitIfRule__closure2(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(IfClause0)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure2.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StatementSearchVisitor_visitIfRule_closure2.prototype = { + call$1(lastClause) { + return A.IterableExtension_search0(lastClause.children, new A.StatementSearchVisitor_visitIfRule__closure1(this.$this)); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(ElseClause0)"); + } + }; + A.StatementSearchVisitor_visitIfRule__closure1.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StatementSearchVisitor_visitChildren_closure0.prototype = { + call$1(child) { + return child.accept$1(this.$this); + }, + $signature() { + return A._instanceType(this.$this)._eval$1("StatementSearchVisitor0.T?(Statement0)"); + } + }; + A.StaticImport0.prototype = { + toString$0(_) { + var t1 = this.url.toString$0(0), + t2 = this.modifiers; + return t1 + (t2 == null ? "" : " " + t2.toString$0(0)); + }, + $isImport0: 1, + $isAstNode0: 1, + $isSassNode: 1, + get$span(receiver) { + return this.span; + } + }; + A.StderrLogger0.prototype = { + internalWarn$4$deprecation$span$trace(message, deprecation, span, trace) { + var t3, + result = new A.StringBuffer(""), + t1 = deprecation != null, + showDeprecation = t1 && deprecation !== B.Deprecation_dlf, + t2 = this.color; + if (t2) { + t3 = result._contents = "\x1b[33m\x1b[1m"; + t3 = result._contents = (t1 ? result._contents = "\x1b[33m\x1b[1mDeprecation " : t3) + "Warning\x1b[0m"; + if (showDeprecation) { + t1 = t3 + (" [\x1b[34m" + deprecation.toString$0(0) + "\x1b[0m]"); + result._contents = t1; + } else + t1 = t3; + } else { + t3 = result._contents = (t1 ? result._contents = "DEPRECATION " : "") + "WARNING"; + if (showDeprecation) { + t1 = t3 + (" [" + deprecation.toString$0(0) + "]"); + result._contents = t1; + } else + t1 = t3; + } + if (span == null) + t1 = result._contents = t1 + (": " + message + "\n"); + else if (trace != null) { + t1 += ": " + message + "\n\n" + span.highlight$1$color(t2) + "\n"; + result._contents = t1; + } else { + t1 += " on " + span.message$2$color(0, "\n" + message, t2) + "\n"; + result._contents = t1; + } + if (trace != null) + result._contents = t1 + (A.indent0(B.JSString_methods.trimRight$0(trace.toString$0(0)), 4) + "\n"); + A.printError0(result); + }, + debug$2(_, message, span) { + var url, t1, t2; + if (span.get$start(span).file.url == null) + url = "-"; + else { + t1 = span.get$start(span).file.url; + t2 = $.$get$context(); + t1.toString; + url = t2.prettyUri$1(t1); + } + t1 = span.get$start(span); + t1 = t1.file.getLine$1(t1.offset); + t2 = this.color ? "\x1b[1mDebug\x1b[0m" : "DEBUG"; + t2 = url + ":" + (t1 + 1) + " " + t2 + (": " + message); + A.printError0(t2.charCodeAt(0) == 0 ? t2 : t2); + } + }; + A.StringExpression0.prototype = { + get$span(_) { + return this.text.span; + }, + accept$1$1(visitor) { + return visitor.visitStringExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + asInterpolation$1$static($static) { + var t1, t2, quote, t3, t4, t5, buffer, t6, t7, i, value, t8; + if (!this.hasQuotes) + return this.text; + t1 = this.text; + t2 = t1.contents; + quote = A.StringExpression__bestQuote0(new A.WhereTypeIterable(t2, type$.WhereTypeIterable_String)); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer0(t3, t4, t5); + t6 = A.Primitives_stringFromCharCode(quote); + t3._contents += t6; + for (t7 = t2.length, i = 0; i < t7; ++i) { + value = t2[i]; + if (value instanceof A.Expression0) { + t8 = t1.spanForElement$1(i); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(value); + t5.push(t8); + continue; + } + if (typeof value == "string") + A.StringExpression__quoteInnerText0(value, quote, buffer, $static); + } + t3._contents += t6; + return buffer.interpolation$1(t1.span); + }, + asInterpolation$0() { + return this.asInterpolation$1$static(false); + }, + toString$0(_) { + return this.asInterpolation$0().toString$0(0); + } + }; + A.module_closure25.prototype = { + call$1($arguments) { + var limit, t2, chunks, i, lastEnd, match, t3, + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + separator = t1.$index($arguments, 1).assertString$1("separator"); + t1 = t1.$index($arguments, 2).get$realNull(); + limit = t1 == null ? null : t1.assertNumber$1("limit").assertInt$1("limit"); + if (limit != null && limit < 1) + throw A.wrapException(A.SassScriptException$0("$limit: Must be 1 or greater, was " + A.S(limit) + ".", null)); + t1 = string._string0$_text; + if (t1.length === 0) + return B.SassList_oWx0; + else { + t2 = separator._string0$_text; + if (t2.length === 0) + return A.SassList$0(A.MappedIterable_MappedIterable(new A.Runes(t1), new A.module__closure3(string), type$.Runes._eval$1("Iterable.E"), type$.Value_2), B.ListSeparator_z0K0, true); + } + chunks = A._setArrayType([], type$.JSArray_String); + for (t2 = B.JSString_methods.allMatches$1(t2, t1), t2 = new A._StringAllMatchesIterator(t2._input, t2._pattern, t2.__js_helper$_index), i = 0, lastEnd = 0; t2.moveNext$0();) { + match = t2.__js_helper$_current; + t3 = match.start; + chunks.push(B.JSString_methods.substring$2(t1, lastEnd, t3)); + lastEnd = t3 + match.pattern.length; + ++i; + if (i === limit) + break; + } + chunks.push(B.JSString_methods.substring$1(t1, lastEnd)); + return A.SassList$0(new A.MappedListIterable(chunks, new A.module__closure4(string), type$.MappedListIterable_String_Value_2), B.ListSeparator_z0K0, true); + }, + $signature: 27 + }; + A.module__closure3.prototype = { + call$1(rune) { + return new A.SassString0(A.Primitives_stringFromCharCode(rune), this.string._string0$_hasQuotes); + }, + $signature: 606 + }; + A.module__closure4.prototype = { + call$1(chunk) { + return new A.SassString0(chunk, this.string._string0$_hasQuotes); + }, + $signature: 607 + }; + A._unquote_closure0.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (!string._string0$_hasQuotes) + return string; + return new A.SassString0(string._string0$_text, false); + }, + $signature: 18 + }; + A._quote_closure0.prototype = { + call$1($arguments) { + var string = J.$index$asx($arguments, 0).assertString$1("string"); + if (string._string0$_hasQuotes) + return string; + return new A.SassString0(string._string0$_text, true); + }, + $signature: 18 + }; + A._length_closure1.prototype = { + call$1($arguments) { + return A.SassNumber_SassNumber0(J.$index$asx($arguments, 0).assertString$1("string").get$_string0$_sassLength(), null); + }, + $signature: 25 + }; + A._insert_closure0.prototype = { + call$1($arguments) { + var indexInt, codeUnitIndex, _s5_ = "index", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + insert = t1.$index($arguments, 1).assertString$1("insert"), + index = t1.$index($arguments, 2).assertNumber$1(_s5_); + index.assertNoUnits$1(_s5_); + indexInt = index.assertInt$1(_s5_); + if (indexInt < 0) + indexInt = Math.max(string.get$_string0$_sassLength() + indexInt + 2, 0); + t1 = string._string0$_text; + codeUnitIndex = A.codepointIndexToCodeUnitIndex0(t1, A._codepointForIndex0(indexInt, string.get$_string0$_sassLength(), false)); + return new A.SassString0(B.JSString_methods.replaceRange$3(t1, codeUnitIndex, codeUnitIndex, insert._string0$_text), string._string0$_hasQuotes); + }, + $signature: 18 + }; + A._index_closure1.prototype = { + call$1($arguments) { + var t1 = J.getInterceptor$asx($arguments), + t2 = t1.$index($arguments, 0).assertString$1("string")._string0$_text, + codeUnitIndex = B.JSString_methods.indexOf$1(t2, t1.$index($arguments, 1).assertString$1("substring")._string0$_text); + if (codeUnitIndex === -1) + return B.C__SassNull0; + return A.SassNumber_SassNumber0(A.codeUnitIndexToCodepointIndex0(t2, codeUnitIndex) + 1, null); + }, + $signature: 3 + }; + A._slice_closure0.prototype = { + call$1($arguments) { + var lengthInCodepoints, endInt, startCodepoint, endCodepoint, + _s8_ = "start-at", + t1 = J.getInterceptor$asx($arguments), + string = t1.$index($arguments, 0).assertString$1("string"), + start = t1.$index($arguments, 1).assertNumber$1(_s8_), + end = t1.$index($arguments, 2).assertNumber$1("end-at"); + start.assertNoUnits$1(_s8_); + end.assertNoUnits$1("end-at"); + lengthInCodepoints = string.get$_string0$_sassLength(); + endInt = end.assertInt$0(); + if (endInt === 0) + return string._string0$_hasQuotes ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + startCodepoint = A._codepointForIndex0(start.assertInt$0(), lengthInCodepoints, false); + endCodepoint = A._codepointForIndex0(endInt, lengthInCodepoints, true); + if (endCodepoint === lengthInCodepoints) + --endCodepoint; + if (endCodepoint < startCodepoint) + return string._string0$_hasQuotes ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + t1 = string._string0$_text; + return new A.SassString0(B.JSString_methods.substring$2(t1, A.codepointIndexToCodeUnitIndex0(t1, startCodepoint), A.codepointIndexToCodeUnitIndex0(t1, endCodepoint + 1)), string._string0$_hasQuotes); + }, + $signature: 18 + }; + A._toUpperCase_closure0.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string0$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = t1.charCodeAt(i); + t3 += A.Primitives_stringFromCharCode(t4 >= 97 && t4 <= 122 ? t4 & 4294967263 : t4); + } + return new A.SassString0(t3.charCodeAt(0) == 0 ? t3 : t3, string._string0$_hasQuotes); + }, + $signature: 18 + }; + A._toLowerCase_closure0.prototype = { + call$1($arguments) { + var t1, t2, i, t3, t4, + string = J.$index$asx($arguments, 0).assertString$1("string"); + for (t1 = string._string0$_text, t2 = t1.length, i = 0, t3 = ""; i < t2; ++i) { + t4 = t1.charCodeAt(i); + t3 += A.Primitives_stringFromCharCode(t4 >= 65 && t4 <= 90 ? t4 | 32 : t4); + } + return new A.SassString0(t3.charCodeAt(0) == 0 ? t3 : t3, string._string0$_hasQuotes); + }, + $signature: 18 + }; + A._uniqueId_closure0.prototype = { + call$1($arguments) { + var t1 = $.$get$_previousUniqueId0() + ($.$get$_random1().nextInt$1(36) + 1); + $._previousUniqueId0 = t1; + if (t1 > Math.pow(36, 6)) + $._previousUniqueId0 = B.JSInt_methods.$mod($.$get$_previousUniqueId0(), A._asInt(Math.pow(36, 6))); + return new A.SassString0("u" + B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1($.$get$_previousUniqueId0(), 36), 6, "0"), false); + }, + $signature: 18 + }; + A.StringExtension_toCssIdentifier_writeEscape.prototype = { + call$1(character) { + var _0_0, + t1 = this.buffer, + t2 = A.Primitives_stringFromCharCode(92); + t1._contents += t2; + t2 = B.JSInt_methods.toRadixString$1(character, 16); + t1._contents += t2; + _0_0 = this.scanner.peekChar$0(); + if (A._isInt(_0_0) && A.CharacterExtension_get_isHex0(_0_0)) { + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + } + }, + $signature: 267 + }; + A.StringExtension_toCssIdentifier_consumeSurrogatePair.prototype = { + call$1(character) { + var t2, t3, + t1 = this.scanner, + _1_0 = t1.peekChar$1(1); + if (_1_0 == null || _1_0 >>> 10 !== 55) + t1.error$2$length(0, "An individual surrogates can't be represented as a CSS identifier.", 1); + else if (character >>> 7 === 439) + this.writeEscape.call$1(A.combineSurrogates(t1.readChar$0(), t1.readChar$0())); + else { + t2 = this.buffer; + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + t1 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t1; + } + }, + $signature: 267 + }; + A.stringClass_closure.prototype = { + call$0() { + var t2, + t1 = type$.JSClass, + jsClass = t1._as(A.allowInteropCaptureThisNamed("sass.SassString", new A.stringClass__closure())); + A.LinkedHashMap_LinkedHashMap$_literal(["text", new A.stringClass__closure0(), "hasQuotes", new A.stringClass__closure1(), "sassLength", new A.stringClass__closure2()], type$.String, type$.Function).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + J.get$$prototype$x(jsClass).sassIndexToStringIndex = A.allowInteropCaptureThisNamed("sassIndexToStringIndex", new A.stringClass__closure3()); + t2 = $.$get$_emptyQuoted0(); + A.JSClassExtension_injectSuperclass(t1._as(t2.constructor), jsClass); + return jsClass; + }, + $signature: 17 + }; + A.stringClass__closure.prototype = { + call$3($self, textOrOptions, options) { + var t1; + if (typeof textOrOptions == "string") { + t1 = options == null ? null : J.get$quotes$x(options); + t1 = new A.SassString0(textOrOptions, t1 == null ? true : t1); + } else { + type$.nullable__ConstructorOptions_3._as(textOrOptions); + t1 = textOrOptions == null ? null : J.get$quotes$x(textOrOptions); + t1 = (t1 == null ? true : t1) ? $.$get$_emptyQuoted0() : $.$get$_emptyUnquoted0(); + } + return t1; + }, + call$1($self) { + return this.call$3($self, null, null); + }, + call$2($self, textOrOptions) { + return this.call$3($self, textOrOptions, null); + }, + "call*": "call$3", + $requiredArgCount: 1, + $defaultValues() { + return [null, null]; + }, + $signature: 609 + }; + A.stringClass__closure0.prototype = { + call$1($self) { + return $self._string0$_text; + }, + $signature: 610 + }; + A.stringClass__closure1.prototype = { + call$1($self) { + return $self._string0$_hasQuotes; + }, + $signature: 611 + }; + A.stringClass__closure2.prototype = { + call$1($self) { + return $self.get$_string0$_sassLength(); + }, + $signature: 612 + }; + A.stringClass__closure3.prototype = { + call$3($self, sassIndex, $name) { + var t1, + index = sassIndex.assertNumber$1($name).assertInt$1($name); + if (index === 0) + A.throwExpression(A.SassScriptException$0("String index may not be 0.", $name)); + else { + t1 = $self.get$_string0$_sassLength(); + if (Math.abs(index) > t1) + A.throwExpression(A.SassScriptException$0("Invalid index " + sassIndex.toString$0(0) + " for a string with " + t1 + " characters.", $name)); + } + t1 = index < 0 ? $self.get$_string0$_sassLength() + index : index - 1; + return A.codepointIndexToCodeUnitIndex0($self._string0$_text, t1); + }, + call$2($self, sassIndex) { + return this.call$3($self, sassIndex, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 613 + }; + A._ConstructorOptions1.prototype = {}; + A._NodeSassString.prototype = {}; + A.legacyStringClass_closure.prototype = { + call$3(thisArg, value, dartValue) { + var t1; + if (dartValue == null) { + value.toString; + t1 = new A.SassString0(value, false); + } else + t1 = dartValue; + J.set$dartValue$x(thisArg, t1); + }, + call$2(thisArg, value) { + return this.call$3(thisArg, value, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 614 + }; + A.legacyStringClass_closure0.prototype = { + call$1(thisArg) { + return J.get$dartValue$x(thisArg)._string0$_text; + }, + $signature: 615 + }; + A.legacyStringClass_closure1.prototype = { + call$2(thisArg, value) { + J.set$dartValue$x(thisArg, new A.SassString0(value, false)); + }, + $signature: 616 + }; + A.SassString0.prototype = { + get$_string0$_sassLength() { + var result, _this = this, + value = _this._string0$__SassString__sassLength_FI; + if (value === $) { + result = new A.Runes(_this._string0$_text).get$length(0); + _this._string0$__SassString__sassLength_FI !== $ && A.throwUnnamedLateFieldADI(); + _this._string0$__SassString__sassLength_FI = result; + value = result; + } + return value; + }, + get$isSpecialNumber() { + var t1, _2_0, t2, _0_0, _1_0; + if (this._string0$_hasQuotes) + return false; + t1 = this._string0$_text; + if (t1.length < 6) + return false; + _2_0 = t1.charCodeAt(0); + $label0$0: { + t2 = false; + if (97 === _2_0 || 65 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 116 && (t1.charCodeAt(2) | 32) === 116 && (t1.charCodeAt(3) | 32) === 114 && t1.charCodeAt(4) === 40; + break $label0$0; + } + if (99 === _2_0 || 67 === _2_0) { + _0_0 = t1.charCodeAt(1); + $label1$1: { + if (108 === _0_0 || 76 === _0_0) { + t1 = (t1.charCodeAt(2) | 32) === 97 && (t1.charCodeAt(3) | 32) === 109 && (t1.charCodeAt(4) | 32) === 112 && t1.charCodeAt(5) === 40; + break $label1$1; + } + if (97 === _0_0 || 65 === _0_0) { + t1 = (t1.charCodeAt(2) | 32) === 108 && (t1.charCodeAt(3) | 32) === 99 && t1.charCodeAt(4) === 40; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + break $label0$0; + } + if (118 === _2_0 || 86 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; + break $label0$0; + } + if (101 === _2_0 || 69 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 110 && (t1.charCodeAt(2) | 32) === 118 && t1.charCodeAt(3) === 40; + break $label0$0; + } + if (109 === _2_0 || 77 === _2_0) { + _1_0 = t1.charCodeAt(1); + $label2$2: { + if (97 === _1_0 || 65 === _1_0) { + t1 = (t1.charCodeAt(2) | 32) === 120 && t1.charCodeAt(3) === 40; + break $label2$2; + } + if (105 === _1_0 || 73 === _1_0) { + t1 = (t1.charCodeAt(2) | 32) === 110 && t1.charCodeAt(3) === 40; + break $label2$2; + } + t1 = t2; + break $label2$2; + } + break $label0$0; + } + if (105 === _2_0 || 73 === _2_0) { + t1 = (t1.charCodeAt(1) | 32) === 102 && t1.charCodeAt(2) === 40; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + get$isSpecialVariable() { + var t1, _0_0; + if (this._string0$_hasQuotes) + return false; + t1 = this._string0$_text; + if (t1.length < 6) + return false; + _0_0 = t1.charCodeAt(0); + $label0$0: { + if (97 === _0_0 || 65 === _0_0) { + t1 = (t1.charCodeAt(1) | 32) === 116 && (t1.charCodeAt(2) | 32) === 116 && (t1.charCodeAt(3) | 32) === 114 && t1.charCodeAt(4) === 40; + break $label0$0; + } + if (105 === _0_0 || 73 === _0_0) { + t1 = (t1.charCodeAt(1) | 32) === 102 && t1.charCodeAt(2) === 40; + break $label0$0; + } + if (118 === _0_0 || 86 === _0_0) { + t1 = (t1.charCodeAt(1) | 32) === 97 && (t1.charCodeAt(2) | 32) === 114 && t1.charCodeAt(3) === 40; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + get$isBlank() { + return !this._string0$_hasQuotes && this._string0$_text.length === 0; + }, + assertQuoted$1($name) { + if (this._string0$_hasQuotes) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be a quoted string.", $name)); + }, + assertUnquoted$1($name) { + if (!this._string0$_hasQuotes) + return; + throw A.wrapException(A.SassScriptException$0("Expected " + this.toString$0(0) + " to be an unquoted string.", $name)); + }, + assertUnquoted$0() { + return this.assertUnquoted$1(null); + }, + accept$1$1(visitor) { + var t1 = visitor._serialize0$_quote && this._string0$_hasQuotes, + t2 = this._string0$_text; + if (t1) + visitor._serialize0$_visitQuotedString$1(t2); + else + visitor._serialize0$_visitUnquotedString$1(t2); + return null; + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + assertString$1($name) { + return this; + }, + plus$1(other) { + var t1 = this._string0$_text, + t2 = this._string0$_hasQuotes; + return other instanceof A.SassString0 ? new A.SassString0(t1 + other._string0$_text, t2) : new A.SassString0(t1 + A.serializeValue0(other, false, true), t2); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.SassString0 && this._string0$_text === other._string0$_text; + }, + get$hashCode(_) { + var t1 = this._string0$_hashCache; + return t1 == null ? this._string0$_hashCache = B.JSString_methods.get$hashCode(this._string0$_text) : t1; + } + }; + A.ModifiableCssStyleRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStyleRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1; + if (other instanceof A.ModifiableCssStyleRule0) + t1 = B.C_ListEquality.equals$2(0, other._style_rule0$_selector._box0$_inner.value.components, this._style_rule0$_selector._box0$_inner.value.components); + else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + return A.ModifiableCssStyleRule$0(this._style_rule0$_selector, this.span, false, this.originalSelector); + }, + get$span(receiver) { + return this.span; + } + }; + A.StyleRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitStyleRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.selector; + return A.S(t1 == null ? this.parsedSelector : t1) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.CssStylesheet0.prototype = { + get$isGroupEnd() { + return false; + }, + get$isChildless() { + return false; + }, + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + get$children(receiver) { + return this.children; + }, + get$span(receiver) { + return this.span; + } + }; + A.ModifiableCssStylesheet0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssStylesheet$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + return other instanceof A.ModifiableCssStylesheet0; + }, + copyWithoutChildren$0() { + return A.ModifiableCssStylesheet$0(this.span); + }, + $isCssStylesheet0: 1, + get$span(receiver) { + return this.span; + } + }; + A.StylesheetParser0.prototype = { + parse$0(_) { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parse_closure0(this)); + }, + parseParameterList$0() { + return this._stylesheet0$_parseSingleProduction$1$1(new A.StylesheetParser_parseParameterList_closure0(this), type$.ParameterList_2); + }, + _stylesheet0$_parseSingleProduction$1$1(production, $T) { + return this.wrapSpanFormatException$1(new A.StylesheetParser__parseSingleProduction_closure0(this, production, $T)); + }, + parseSignature$1$requireParens(requireParens) { + return this.wrapSpanFormatException$1(new A.StylesheetParser_parseSignature_closure(this, requireParens)); + }, + _stylesheet0$_statement$1$root(root) { + var t2, _this = this, + t1 = _this.scanner, + _0_0 = t1.peekChar$0(); + if (64 === _0_0) + return _this.atRule$2$root(new A.StylesheetParser__statement_closure0(_this), root); + if (43 === _0_0) { + if (!_this.get$indented() || !_this.lookingAtIdentifier$1(1)) + return _this._stylesheet0$_styleRule$0(); + _this._stylesheet0$_isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + return _this._stylesheet0$_includeRule$1(new A._SpanScannerState(t1, t2)); + } + if (61 === _0_0) { + if (!_this.get$indented()) + return _this._stylesheet0$_styleRule$0(); + _this._stylesheet0$_isUseAllowed = false; + t2 = t1._string_scanner$_position; + t1.readChar$0(); + _this.whitespace$1$consumeNewlines(true); + return _this._stylesheet0$_mixinRule$1(new A._SpanScannerState(t1, t2)); + } + if (125 === _0_0) + t1.error$2$length(0, 'unmatched "}".', 1); + return _this._stylesheet0$_inStyleRule || _this._stylesheet0$_inUnknownAtRule || _this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock ? _this._stylesheet0$_declarationOrStyleRule$0() : _this._stylesheet0$_variableDeclarationOrStyleRule$0(); + }, + _stylesheet0$_statement$0() { + return this._stylesheet0$_statement$1$root(false); + }, + variableDeclarationWithoutNamespace$2(namespace, start_) { + var t1, start, $name, t2, value, flagStart, t3, guarded, global, _0_0, declaration, _this = this, + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + if (start_ == null) { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + } else + start = start_; + $name = _this.variableName$0(); + t1 = namespace != null; + if (t1) + _this._stylesheet0$_assertPublic$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure1(_this, start)); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sass_v, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(true); + t2 = _this.scanner; + t2.expectChar$1(58); + _this.whitespace$1$consumeNewlines(true); + value = _this._stylesheet0$_expression$0(); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + for (t3 = _this.warnings, guarded = false, global = false; t2.scanChar$1(33);) { + $label0$0: { + _0_0 = _this.identifier$0(); + if ("default" === _0_0) { + if (guarded) + t3.push(new A._Record_3_deprecation_message_span(B.Deprecation_DVV, string$.x21defau, _this.spanFrom$1(flagStart))); + guarded = true; + break $label0$0; + } + if ("global" === _0_0) { + if (t1) + _this.error$2(0, string$.x21globai, _this.spanFrom$1(flagStart)); + else if (global) + t3.push(new A._Record_3_deprecation_message_span(B.Deprecation_DVV, string$.x21globas, _this.spanFrom$1(flagStart))); + global = true; + break $label0$0; + } + _this.error$2(0, "Invalid flag name.", _this.spanFrom$1(flagStart)); + } + _this.whitespace$1$consumeNewlines(false); + flagStart = new A._SpanScannerState(t2, t2._string_scanner$_position); + } + _this.expectStatementSeparator$1("variable declaration"); + declaration = A.VariableDeclaration$0($name, value, _this.spanFrom$1(start), precedingComment, global, guarded, namespace); + if (global) + _this._stylesheet0$_globalVariables.putIfAbsent$2($name, new A.StylesheetParser_variableDeclarationWithoutNamespace_closure2(declaration)); + return declaration; + }, + variableDeclarationWithoutNamespace$0() { + return this.variableDeclarationWithoutNamespace$2(null, null); + }, + _stylesheet0$_variableDeclarationOrStyleRule$0() { + var t1, t2, variableOrInterpolation, t3, _this = this; + if (_this.get$plainCss()) + return _this._stylesheet0$_styleRule$0(); + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._stylesheet0$_styleRule$0(); + if (!_this.lookingAtIdentifier$0()) + return _this._stylesheet0$_styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + variableOrInterpolation = _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + t1 = variableOrInterpolation; + else { + t3 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t3.addInterpolation$1(type$.Interpolation_2._as(variableOrInterpolation)); + t2 = _this._stylesheet0$_styleRule$2(t3, new A._SpanScannerState(t1, t2)); + t1 = t2; + } + return t1; + }, + _stylesheet0$_declarationOrStyleRule$0() { + var t1, t2, declarationOrBuffer, _this = this; + if (_this.get$indented() && _this.scanner.scanChar$1(92)) + return _this._stylesheet0$_styleRule$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + declarationOrBuffer = _this._stylesheet0$_declarationOrBuffer$0(); + return declarationOrBuffer instanceof A.Statement0 ? declarationOrBuffer : _this._stylesheet0$_styleRule$2(type$.InterpolationBuffer_2._as(declarationOrBuffer), new A._SpanScannerState(t1, t2)); + }, + _stylesheet0$_declarationOrBuffer$0() { + var midBuffer, couldBeSelector, beforeDeclaration, value, additional, t2, t3, variableOrInterpolation, $name, isCustomProperty, t4, postColonWhitespace, _0_0, exception, _1_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + nameBuffer = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + startsWithPunctuation = _this._stylesheet0$_lookingAtPotentialPropertyHack$0(); + if (startsWithPunctuation) { + t2 = t1.readChar$0(); + t3 = nameBuffer._interpolation_buffer0$_text; + t2 = A.Primitives_stringFromCharCode(t2); + t3._contents += t2; + t2 = _this.rawText$1(new A.StylesheetParser__declarationOrBuffer_closure3(_this)); + t3 = nameBuffer._interpolation_buffer0$_text; + t3._contents += t2; + } + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return nameBuffer; + variableOrInterpolation = startsWithPunctuation ? _this.interpolatedIdentifier$0() : _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + return variableOrInterpolation; + else + nameBuffer.addInterpolation$1(type$.Interpolation_2._as(variableOrInterpolation)); + _this._stylesheet0$_isUseAllowed = false; + if (t1.matches$1("/*")) { + t2 = _this.rawText$1(_this.get$loudComment()); + t3 = nameBuffer._interpolation_buffer0$_text; + t3._contents += t2; + } + midBuffer = new A.StringBuffer(""); + t2 = midBuffer; + t3 = _this.rawText$1(new A.StylesheetParser__declarationOrBuffer_closure4(_this)); + t2._contents += t3; + t3 = t1._string_scanner$_position; + if (!t1.scanChar$1(58)) { + if (midBuffer._contents.length !== 0) { + t1 = nameBuffer._interpolation_buffer0$_text; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + } + return nameBuffer; + } + t2 = A.Primitives_stringFromCharCode(58); + midBuffer._contents += t2; + $name = nameBuffer.interpolation$1(_this.spanFrom$2(start, new A._SpanScannerState(t1, t3))); + isCustomProperty = B.JSString_methods.startsWith$1($name.get$initialPlain(), "--"); + if (!isCustomProperty) + if (_this._stylesheet0$_inPlainCssFunction) { + t3 = A.NullableExtension_andThen0($name.get$asPlain(), new A.StylesheetParser__declarationOrBuffer_closure5()); + if (t3 == null) + t3 = false; + } else + t3 = false; + else + t3 = true; + if (t3) { + if (_this.atEndOfStatement$0()) { + t1 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t2 = t1.offset; + t2 = A.Interpolation$0(B.List_empty12, B.List_empty13, A._FileSpan$(t1.file, t2, t2)); + t1 = t2; + } else + t1 = _this._stylesheet0$_interpolatedDeclarationValue$1$silentComments(false); + _this.expectStatementSeparator$1(isCustomProperty ? "custom property" : "@function result"); + return A.Declaration$notSassScript0($name, new A.StringExpression0(t1, false), _this.spanFrom$1(start)); + } + if (t1.scanChar$1(58)) { + t1 = nameBuffer; + t3 = t1._interpolation_buffer0$_text; + t4 = A.S(midBuffer); + t3._contents = (t3._contents += t4) + t2; + return t1; + } else if (_this.get$indented() && _this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + t1 = nameBuffer; + t2 = t1._interpolation_buffer0$_text; + t3 = A.S(midBuffer); + t2._contents += t3; + return t1; + } + postColonWhitespace = _this.rawText$1(new A.StylesheetParser__declarationOrBuffer_closure6(_this)); + _0_0 = _this._stylesheet0$_tryDeclarationChildren$2($name, start); + if (_0_0 != null) + return _0_0; + midBuffer._contents += postColonWhitespace; + couldBeSelector = postColonWhitespace.length === 0 && _this._stylesheet0$_lookingAtInterpolatedIdentifier$0(); + beforeDeclaration = new A._SpanScannerState(t1, t1._string_scanner$_position); + value = null; + try { + value = _this._stylesheet0$_expression$0(); + if (_this.lookingAtChildren$0()) { + if (couldBeSelector) + _this.expectStatementSeparator$0(); + } else if (!_this.atEndOfStatement$0()) + _this.expectStatementSeparator$0(); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + if (!couldBeSelector) + throw exception; + t1.set$state(beforeDeclaration); + additional = _this.almostAnyValue$0(); + if (!_this.get$indented() && t1.peekChar$0() === 59) + throw exception; + t1 = nameBuffer._interpolation_buffer0$_text; + t2 = A.S(midBuffer); + t1._contents += t2; + nameBuffer.addInterpolation$1(additional); + return nameBuffer; + } else + throw exception; + } + _1_0 = _this._stylesheet0$_tryDeclarationChildren$3$value($name, start, value); + if (_1_0 != null) + return _1_0; + else { + _this.expectStatementSeparator$0(); + return A.Declaration$0($name, value, _this.spanFrom$1(start)); + } + }, + _stylesheet0$_variableDeclarationOrInterpolation$0() { + var t1, start, identifier, buffer, _this = this; + if (!_this.lookingAtIdentifier$0()) + return _this.interpolatedIdentifier$0(); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + identifier = _this.identifier$0(); + if (t1.matches$1(".$")) { + t1.readChar$0(); + return _this.variableDeclarationWithoutNamespace$2(identifier, start); + } else { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = identifier; + if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } + }, + _stylesheet0$_styleRule$2(buffer, start_) { + var t1, t2, start, selector, interpolation, _this = this; + _this._stylesheet0$_isUseAllowed = false; + t1 = start_ == null; + if (t1) { + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + } else + start = start_; + if (_this._parseSelectors) { + if (!t1) + _this.scanner.set$state(start); + selector = _this._stylesheet0$_selectorList$0(); + return _this._stylesheet0$_withStyleRuleChildren$1$3(selector, start, new A.StylesheetParser__styleRule_closure0(_this, selector, start), type$.StyleRule_2); + } else { + t1 = {}; + interpolation = t1.interpolation = _this.styleRuleSelector$0(); + if (buffer != null) { + buffer.addInterpolation$1(interpolation); + t2 = t1.interpolation = buffer.interpolation$1(_this.spanFrom$1(start)); + } else + t2 = interpolation; + if (t2.contents.length === 0) + _this.scanner.error$1(0, 'expected "}".'); + return _this._stylesheet0$_withStyleRuleChildren$1$3(t2, start, new A.StylesheetParser__styleRule_closure1(t1, _this, start), type$.StyleRule_2); + } + }, + _stylesheet0$_styleRule$0() { + return this._stylesheet0$_styleRule$2(null, null); + }, + _stylesheet0$_withStyleRuleChildren$1$3(nodeWithSpan, start, create, $T) { + var _this = this, + wasInStyleRule = _this._stylesheet0$_inStyleRule; + _this._stylesheet0$_inStyleRule = true; + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__withStyleRuleChildren_closure0(_this, nodeWithSpan, wasInStyleRule, create, $T)); + }, + _stylesheet0$_propertyOrVariableDeclaration$0() { + var t2, nameBuffer, t3, $name, variableOrInterpolation, _0_0, value, _1_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._stylesheet0$_lookingAtPotentialPropertyHack$0()) { + t2 = new A.StringBuffer(""); + nameBuffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t3 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t3; + t3 = _this.rawText$1(new A.StylesheetParser__propertyOrVariableDeclaration_closure0(_this)); + t2._contents += t3; + nameBuffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + $name = nameBuffer.interpolation$1(_this.spanFrom$1(start)); + } else if (!_this.get$plainCss()) { + variableOrInterpolation = _this._stylesheet0$_variableDeclarationOrInterpolation$0(); + if (variableOrInterpolation instanceof A.VariableDeclaration0) + return variableOrInterpolation; + else + type$.Interpolation_2._as(variableOrInterpolation); + $name = variableOrInterpolation; + } else + $name = _this.interpolatedIdentifier$0(); + _this.whitespace$1$consumeNewlines(false); + t1.expectChar$1(58); + if (B.JSString_methods.startsWith$1($name.get$initialPlain(), "--")) + _this.error$2(0, string$.Declarw, $name.span); + _this.whitespace$1$consumeNewlines(false); + _0_0 = _this._stylesheet0$_tryDeclarationChildren$2($name, start); + if (_0_0 != null) + return _0_0; + value = _this._stylesheet0$_expression$0(); + _1_0 = _this._stylesheet0$_tryDeclarationChildren$3$value($name, start, value); + if (_1_0 != null) + return _1_0; + else { + _this.expectStatementSeparator$0(); + return A.Declaration$0($name, value, _this.spanFrom$1(start)); + } + }, + _stylesheet0$_tryDeclarationChildren$3$value($name, start, value) { + var _this = this; + if (!_this.lookingAtChildren$0()) + return null; + if (_this.get$plainCss()) + _this.scanner.error$1(0, string$.Nested); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_declarationChild(), start, new A.StylesheetParser__tryDeclarationChildren_closure0($name, value)); + }, + _stylesheet0$_tryDeclarationChildren$2($name, start) { + return this._stylesheet0$_tryDeclarationChildren$3$value($name, start, null); + }, + _stylesheet0$_declarationChild$0() { + return this.scanner.peekChar$0() === 64 ? this._stylesheet0$_declarationAtRule$0() : this._stylesheet0$_propertyOrVariableDeclaration$0(); + }, + atRule$2$root(child, root) { + var $name, wasUseAllowed, value, optional, url, namespace, configuration, span, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$2$name(64, "@-rule"); + $name = _this.interpolatedIdentifier$0(); + wasUseAllowed = _this._stylesheet0$_isUseAllowed; + _this._stylesheet0$_isUseAllowed = false; + switch ($name.get$asPlain()) { + case "at-root": + return _this._stylesheet0$_atRootRule$1(start); + case "content": + return _this._stylesheet0$_contentRule$1(start); + case "debug": + return _this._stylesheet0$_debugRule$1(start); + case "each": + return _this._stylesheet0$_eachRule$2(start, child); + case "else": + return _this._stylesheet0$_disallowedAtRule$1(start); + case "error": + return _this._stylesheet0$_errorRule$1(start); + case "extend": + _this.whitespace$1$consumeNewlines(true); + if (!_this._stylesheet0$_inStyleRule && !_this._stylesheet0$_inMixin && !_this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.x40exten, _this.spanFrom$1(start)); + value = _this.almostAnyValue$0(); + optional = t1.scanChar$1(33); + if (optional) { + _this.expectIdentifier$1("optional"); + _this.whitespace$1$consumeNewlines(false); + } + _this.expectStatementSeparator$1("@extend rule"); + return new A.ExtendRule0(value, optional, _this.spanFrom$1(start)); + case "for": + return _this._stylesheet0$_forRule$2(start, child); + case "forward": + _this._stylesheet0$_isUseAllowed = wasUseAllowed; + if (!root) + _this._stylesheet0$_disallowedAtRule$1(start); + return _this._stylesheet0$_forwardRule$1(start); + case "function": + return _this._stylesheet0$_functionRule$2(start, $name); + case "if": + return _this._stylesheet0$_ifRule$2(start, child); + case "import": + return _this._stylesheet0$_importRule$1(start); + case "include": + return _this._stylesheet0$_includeRule$1(start); + case "media": + return _this.mediaRule$1(start); + case "mixin": + return _this._stylesheet0$_mixinRule$1(start); + case "-moz-document": + return _this.mozDocumentRule$2(start, $name); + case "return": + return _this._stylesheet0$_disallowedAtRule$1(start); + case "supports": + return _this.supportsRule$1(start); + case "use": + _this._stylesheet0$_isUseAllowed = wasUseAllowed; + if (!root) + _this._stylesheet0$_disallowedAtRule$1(start); + _this.whitespace$1$consumeNewlines(true); + url = _this._stylesheet0$_urlString$0(); + _this.whitespace$1$consumeNewlines(false); + namespace = _this._stylesheet0$_useNamespace$2(url, start); + _this.whitespace$1$consumeNewlines(false); + configuration = _this._stylesheet0$_configuration$0(); + _this.whitespace$1$consumeNewlines(false); + span = _this.spanFrom$1(start); + if (!_this._stylesheet0$_isUseAllowed) + _this.error$2(0, string$.x40use_r, span); + _this.expectStatementSeparator$1("@use rule"); + t1 = new A.UseRule0(url, namespace, configuration == null ? B.List_empty26 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2), span); + t1.UseRule$4$configuration0(url, namespace, span, configuration); + return t1; + case "warn": + return _this._stylesheet0$_warnRule$1(start); + case "while": + return _this._stylesheet0$_whileRule$2(start, child); + default: + return _this.unknownAtRule$2(start, $name); + } + }, + _stylesheet0$_declarationAtRule$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = _this._stylesheet0$_plainAtRuleName$0(); + $label0$0: { + if ("content" === _0_0) { + t1 = _this._stylesheet0$_contentRule$1(start); + break $label0$0; + } + if ("debug" === _0_0) { + t1 = _this._stylesheet0$_debugRule$1(start); + break $label0$0; + } + if ("each" === _0_0) { + t1 = _this._stylesheet0$_eachRule$2(start, _this.get$_stylesheet0$_declarationChild()); + break $label0$0; + } + if ("else" === _0_0) + _this._stylesheet0$_disallowedAtRule$1(start); + if ("error" === _0_0) { + t1 = _this._stylesheet0$_errorRule$1(start); + break $label0$0; + } + if ("for" === _0_0) { + t1 = _this._stylesheet0$_forRule$2(start, _this.get$_stylesheet0$_declarationChild()); + break $label0$0; + } + if ("if" === _0_0) { + t1 = _this._stylesheet0$_ifRule$2(start, _this.get$_stylesheet0$_declarationChild()); + break $label0$0; + } + if ("include" === _0_0) { + t1 = _this._stylesheet0$_includeRule$1(start); + break $label0$0; + } + if ("warn" === _0_0) { + t1 = _this._stylesheet0$_warnRule$1(start); + break $label0$0; + } + if ("while" === _0_0) { + t1 = _this._stylesheet0$_whileRule$2(start, _this.get$_stylesheet0$_declarationChild()); + break $label0$0; + } + t1 = _this._stylesheet0$_disallowedAtRule$1(start); + } + return t1; + }, + _stylesheet0$_functionChild$0() { + var state, variableDeclarationError, stackTrace, statement, t2, namespace, exception, t3, start, _0_0, value, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() !== 64) { + t2 = t1._string_scanner$_position; + state = new A._SpanScannerState(t1, t2); + try { + namespace = _this.identifier$0(); + t1.expectChar$1(46); + t2 = _this.variableDeclarationWithoutNamespace$2(namespace, new A._SpanScannerState(t1, t2)); + return t2; + } catch (exception) { + t2 = A.unwrapException(exception); + t3 = type$.SourceSpanFormatException; + if (t3._is(t2)) { + variableDeclarationError = t2; + stackTrace = A.getTraceFromException(exception); + t1.set$state(state); + statement = null; + try { + statement = _this._stylesheet0$_declarationOrStyleRule$0(); + } catch (exception) { + if (t3._is(A.unwrapException(exception))) + throw A.wrapException(variableDeclarationError); + else + throw exception; + } + t2 = statement instanceof A.StyleRule0 ? "style rules" : "declarations"; + _this.error$3(0, "@function rules may not contain " + t2 + ".", J.get$span$x(statement), stackTrace); + } else + throw exception; + } + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _0_0 = _this._stylesheet0$_plainAtRuleName$0(); + $label0$0: { + if ("debug" === _0_0) { + t1 = _this._stylesheet0$_debugRule$1(start); + break $label0$0; + } + if ("each" === _0_0) { + t1 = _this._stylesheet0$_eachRule$2(start, _this.get$_stylesheet0$_functionChild()); + break $label0$0; + } + if ("else" === _0_0) + _this._stylesheet0$_disallowedAtRule$1(start); + if ("error" === _0_0) { + t1 = _this._stylesheet0$_errorRule$1(start); + break $label0$0; + } + if ("for" === _0_0) { + t1 = _this._stylesheet0$_forRule$2(start, _this.get$_stylesheet0$_functionChild()); + break $label0$0; + } + if ("if" === _0_0) { + t1 = _this._stylesheet0$_ifRule$2(start, _this.get$_stylesheet0$_functionChild()); + break $label0$0; + } + if ("return" === _0_0) { + _this.whitespace$1$consumeNewlines(true); + value = _this._stylesheet0$_expression$0(); + _this.expectStatementSeparator$1("@return rule"); + t1 = new A.ReturnRule0(value, _this.spanFrom$1(start)); + break $label0$0; + } + if ("warn" === _0_0) { + t1 = _this._stylesheet0$_warnRule$1(start); + break $label0$0; + } + if ("while" === _0_0) { + t1 = _this._stylesheet0$_whileRule$2(start, _this.get$_stylesheet0$_functionChild()); + break $label0$0; + } + t1 = _this._stylesheet0$_disallowedAtRule$1(start); + } + return t1; + }, + _stylesheet0$_plainAtRuleName$0() { + this.scanner.expectChar$2$name(64, "@-rule"); + return this.identifier$0(); + }, + _stylesheet0$_atRootRule$1(start) { + var t1, t2, t3, buffer, t4, _this = this; + _this.whitespace$1$consumeNewlines(false); + t1 = _this.scanner; + if (t1.peekChar$0() === 40) { + t2 = t1._string_scanner$_position; + t3 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1.expectChar$1(40); + t4 = A.Primitives_stringFromCharCode(40); + t3._contents += t4; + _this.whitespace$1$consumeNewlines(true); + _this._stylesheet0$_addOrInject$2(buffer, _this._stylesheet0$_expression$1$consumeNewlines(true)); + if (t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + t4 = A.Primitives_stringFromCharCode(58); + t3._contents += t4; + t4 = A.Primitives_stringFromCharCode(32); + t3._contents += t4; + _this._stylesheet0$_addOrInject$2(buffer, _this._stylesheet0$_expression$1$consumeNewlines(true)); + } + t1.expectChar$1(41); + _this.whitespace$1$consumeNewlines(false); + t4 = A.Primitives_stringFromCharCode(41); + t3._contents += t4; + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__atRootRule_closure1(buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))))); + } else { + if (!_this.lookingAtChildren$0()) + t1 = _this.get$indented() && _this.atEndOfStatement$0(); + else + t1 = true; + if (t1) + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__atRootRule_closure2()); + else + return A.AtRootRule$0(A._setArrayType([_this._stylesheet0$_styleRule$0()], type$.JSArray_Statement_2), _this.spanFrom$1(start), null); + } + }, + _stylesheet0$_contentRule$1(start) { + var t1, beforeWhitespace, $arguments, _this = this; + if (!_this._stylesheet0$_inMixin) + _this.error$2(0, string$.x40conte, _this.spanFrom$1(start)); + t1 = _this.scanner; + beforeWhitespace = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + _this.whitespace$1$consumeNewlines(false); + if (t1.peekChar$0() === 40) { + $arguments = _this._stylesheet0$_argumentInvocation$1$mixin(true); + _this.whitespace$1$consumeNewlines(false); + } else { + t1 = beforeWhitespace.offset; + $arguments = A.ArgumentList$empty0(A._FileSpan$(beforeWhitespace.file, t1, t1)); + } + _this.expectStatementSeparator$1("@content rule"); + return new A.ContentRule0($arguments, _this.spanFrom$1(start)); + }, + _stylesheet0$_debugRule$1(start) { + var value, t1, t2, _this = this; + _this.whitespace$1$consumeNewlines(true); + value = _this._stylesheet0$_expression$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.expectStatementSeparator$1("@debug rule"); + return new A.DebugRule0(value, _this.spanFrom$2(start, new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_eachRule$2(start, child) { + var wasInControlDirective, variables, t1, _this = this; + _this.whitespace$1$consumeNewlines(true); + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + variables = A._setArrayType([_this.variableName$0()], type$.JSArray_String); + _this.whitespace$1$consumeNewlines(true); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(36); + variables.push(_this.identifier$1$normalize(true)); + _this.whitespace$1$consumeNewlines(true); + } + _this.whitespace$1$consumeNewlines(true); + _this.expectIdentifier$1("in"); + _this.whitespace$1$consumeNewlines(true); + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__eachRule_closure0(_this, wasInControlDirective, variables, _this._stylesheet0$_expression$0())); + }, + _stylesheet0$_errorRule$1(start) { + var value, t1, t2, _this = this; + _this.whitespace$1$consumeNewlines(true); + value = _this._stylesheet0$_expression$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.expectStatementSeparator$1("@error rule"); + return new A.ErrorRule0(value, _this.spanFrom$2(start, new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_functionRule$2(start, atRuleName) { + var precedingComment, t1, beforeName, $name, _1_0, parameters, _this = this; + _this.whitespace$1$consumeNewlines(true); + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + t1 = _this.scanner; + beforeName = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (t1.matches$1("--")) + return _this.unknownAtRule$2(start, atRuleName); + $name = _this.identifier$0(); + if (A.equalsIgnoreCase0($name, "type")) + _this.error$2(0, string$.This_n, _this.spanFrom$1(beforeName)); + $label0$0: { + if ("expression" === $name || "url" === $name || "and" === $name || "or" === $name || "not" === $name) { + t1 = true; + break $label0$0; + } + t1 = A.unvendor0($name) === "element"; + break $label0$0; + } + if (t1) + _this.error$2(0, "Invalid function name.", _this.spanFrom$1(beforeName)); + else { + _1_0 = $name.toLowerCase(); + $label1$1: { + if ("expression" === _1_0 || "url" === _1_0) { + t1 = true; + break $label1$1; + } + t1 = A.unvendor0(_1_0) === "element"; + break $label1$1; + } + if (t1) + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_2Ja, string$.Customf, _this.spanFrom$1(beforeName))); + } + _this.whitespace$1$consumeNewlines(true); + parameters = _this._stylesheet0$_parameterList$0(); + if (_this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.Mixinscf, _this.spanFrom$1(start)); + else if (_this._stylesheet0$_inControlDirective) + _this.error$2(0, string$.Functi, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(false); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_functionChild(), start, new A.StylesheetParser__functionRule_closure0($name, parameters, precedingComment)); + }, + _stylesheet0$_forRule$2(start, child) { + var wasInControlDirective, variable, from, _this = this, t1 = {}; + _this.whitespace$1$consumeNewlines(true); + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + variable = _this.variableName$0(); + _this.whitespace$1$consumeNewlines(true); + _this.expectIdentifier$1("from"); + _this.whitespace$1$consumeNewlines(true); + t1.exclusive = null; + from = _this._stylesheet0$_expression$2$consumeNewlines$until(true, new A.StylesheetParser__forRule_closure1(t1, _this)); + if (t1.exclusive == null) + _this.scanner.error$1(0, 'Expected "to" or "through".'); + _this.whitespace$1$consumeNewlines(true); + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__forRule_closure2(t1, _this, wasInControlDirective, variable, from, _this._stylesheet0$_expression$0())); + }, + _stylesheet0$_forwardRule$1(start) { + var url, prefix, hiddenMixinsAndFunctions, hiddenVariables, _0_0, shownMixinsAndFunctions, shownVariables, _1_0, configuration, span, t1, t2, t3, t4, _this = this, _null = null; + _this.whitespace$1$consumeNewlines(true); + url = _this._stylesheet0$_urlString$0(); + _this.whitespace$1$consumeNewlines(false); + if (_this.scanIdentifier$1("as")) { + _this.whitespace$1$consumeNewlines(true); + prefix = _this.identifier$1$normalize(true); + _this.scanner.expectChar$1(42); + _this.whitespace$1$consumeNewlines(false); + } else + prefix = _null; + hiddenMixinsAndFunctions = _null; + hiddenVariables = _null; + if (_this.scanIdentifier$1("show")) { + _this.whitespace$1$consumeNewlines(true); + _0_0 = _this._stylesheet0$_memberList$0(); + shownMixinsAndFunctions = _0_0._0; + shownVariables = _0_0._1; + } else { + if (_this.scanIdentifier$1("hide")) { + _this.whitespace$1$consumeNewlines(true); + _1_0 = _this._stylesheet0$_memberList$0(); + hiddenMixinsAndFunctions = _1_0._0; + hiddenVariables = _1_0._1; + } + shownVariables = _null; + shownMixinsAndFunctions = shownVariables; + } + configuration = _this._stylesheet0$_configuration$1$allowGuarded(true); + _this.whitespace$1$consumeNewlines(false); + _this.expectStatementSeparator$1("@forward rule"); + span = _this.spanFrom$1(start); + if (!_this._stylesheet0$_isUseAllowed) + _this.error$2(0, string$.x40forwa, span); + if (shownMixinsAndFunctions != null) { + shownVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(shownMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(shownVariables, t1); + t4 = configuration == null ? B.List_empty26 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2); + return new A.ForwardRule0(url, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), _null, _null, prefix, t4, span); + } else if (hiddenMixinsAndFunctions != null) { + hiddenVariables.toString; + t1 = type$.String; + t2 = A.LinkedHashSet_LinkedHashSet$of(hiddenMixinsAndFunctions, t1); + t3 = type$.UnmodifiableSetView_String; + t1 = A.LinkedHashSet_LinkedHashSet$of(hiddenVariables, t1); + t4 = configuration == null ? B.List_empty26 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2); + return new A.ForwardRule0(url, _null, _null, new A.UnmodifiableSetView0(t2, t3), new A.UnmodifiableSetView0(t1, t3), prefix, t4, span); + } else + return new A.ForwardRule0(url, _null, _null, _null, _null, prefix, configuration == null ? B.List_empty26 : A.List_List$unmodifiable(configuration, type$.ConfiguredVariable_2), span); + }, + _stylesheet0$_memberList$0() { + var _this = this, + t1 = type$.String, + identifiers = A.LinkedHashSet_LinkedHashSet$_empty(t1), + variables = A.LinkedHashSet_LinkedHashSet$_empty(t1); + t1 = _this.scanner; + do { + _this.whitespace$1$consumeNewlines(true); + _this.withErrorMessage$2(string$.Expectv, new A.StylesheetParser__memberList_closure0(_this, variables, identifiers)); + _this.whitespace$1$consumeNewlines(false); + } while (t1.scanChar$1(44)); + return new A._Record_2(identifiers, variables); + }, + _stylesheet0$_ifRule$2(start, child) { + var ifIndentation, wasInControlDirective, condition, children, clauses, lastClause, span, _this = this; + _this.whitespace$1$consumeNewlines(true); + ifIndentation = _this.get$currentIndentation(); + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + condition = _this._stylesheet0$_expression$0(); + children = _this.children$1(0, child); + _this.whitespaceWithoutComments$1$consumeNewlines(false); + clauses = A._setArrayType([A.IfClause$0(condition, children)], type$.JSArray_IfClause_2); + for (;;) { + if (!_this.scanElse$1(ifIndentation)) { + lastClause = null; + break; + } + _this.whitespace$1$consumeNewlines(false); + if (_this.scanIdentifier$1("if")) { + _this.whitespace$1$consumeNewlines(true); + clauses.push(A.IfClause$0(_this._stylesheet0$_expression$0(), _this.children$1(0, child))); + } else { + lastClause = A.ElseClause$0(_this.children$1(0, child)); + break; + } + } + _this._stylesheet0$_inControlDirective = wasInControlDirective; + span = _this.spanFrom$1(start); + _this.whitespaceWithoutComments$1$consumeNewlines(false); + return new A.IfRule0(A.List_List$unmodifiable(clauses, type$.IfClause_2), lastClause, span); + }, + _stylesheet0$_importRule$1(start) { + var argument, t3, _this = this, + imports = A._setArrayType([], type$.JSArray_Import_2), + t1 = _this.scanner, + t2 = _this.warnings; + do { + _this.whitespace$1$consumeNewlines(false); + argument = _this.importArgument$0(); + t3 = argument instanceof A.DynamicImport0; + if (t3) + t2.push(new A._Record_3_deprecation_message_span(B.Deprecation_L3L, string$.Sass__i, argument.span)); + if ((_this._stylesheet0$_inControlDirective || _this._stylesheet0$_inMixin) && t3) + _this._stylesheet0$_disallowedAtRule$1(start); + imports.push(argument); + _this.whitespace$1$consumeNewlines(false); + } while (t1.scanChar$1(44)); + _this.expectStatementSeparator$1("@import rule"); + t1 = _this.spanFrom$1(start); + return new A.ImportRule0(A.List_List$unmodifiable(imports, type$.Import_2), t1); + }, + importArgument$0() { + var url, urlSpan, innerError, stackTrace, modifiers, exception, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = t1.peekChar$0(); + if (117 === _0_0 || 85 === _0_0) { + url = _this.dynamicUrl$0(); + _this.whitespace$1$consumeNewlines(false); + modifiers = _this.tryImportModifiers$0(); + t1 = url instanceof A.StringExpression0 ? url.text : A.Interpolation$0(A._setArrayType([url], type$.JSArray_Object), A._setArrayType([url.get$span(url)], type$.JSArray_nullable_FileSpan), url.get$span(url)); + return new A.StaticImport0(t1, modifiers, _this.spanFrom$1(start)); + } + url = _this.string$0(); + urlSpan = _this.spanFrom$1(start); + _this.whitespace$1$consumeNewlines(false); + modifiers = _this.tryImportModifiers$0(); + if (_this.isPlainImportUrl$1(url) || modifiers != null) + return new A.StaticImport0(new A.Interpolation0(A.List_List$unmodifiable([urlSpan.get$text()], type$.Object), B.List_null, urlSpan), modifiers, _this.spanFrom$1(start)); + else + try { + t1 = _this.parseImportUrl$1(url); + return new A.DynamicImport0(t1, urlSpan); + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), urlSpan, stackTrace); + } else + throw exception; + } + }, + parseImportUrl$1(url) { + var t1 = $.$get$windows(); + if (t1.style.rootLength$1(url) > 0 && !$.$get$url().style.isRootRelative$1(url)) + return t1.toUri$1(url).toString$0(0); + A.Uri_parse(url); + return url; + }, + isPlainImportUrl$1(url) { + var _0_0, t1; + if (url.length < 5) + return false; + if (B.JSString_methods.endsWith$1(url, ".css")) + return true; + _0_0 = url.charCodeAt(0); + $label0$0: { + if (47 === _0_0) { + t1 = url.charCodeAt(1) === 47; + break $label0$0; + } + if (104 === _0_0) { + t1 = B.JSString_methods.startsWith$1(url, "http://") || B.JSString_methods.startsWith$1(url, "https://"); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + tryImportModifiers$0() { + var t1, start, t2, t3, t4, buffer, t5, identifier, $name, query, t6, _this = this; + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0() && _this.scanner.peekChar$0() !== 40) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t2 = new A.StringBuffer(""); + t3 = A._setArrayType([], type$.JSArray_Object); + t4 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer0(t2, t3, t4); + for (;;) + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + if (!(t3.length === 0 && t2._contents.length === 0)) { + t5 = A.Primitives_stringFromCharCode(32); + t2._contents += t5; + } + identifier = _this.interpolatedIdentifier$0(); + buffer.addInterpolation$1(identifier); + t5 = identifier.get$asPlain(); + $name = t5 == null ? null : t5.toLowerCase(); + if ($name !== "and" && t1.scanChar$1(40)) { + if ($name === "supports") { + query = _this._stylesheet0$_importSupportsQuery$0(); + t5 = !(query instanceof A.SupportsDeclaration0); + if (t5) { + t6 = A.Primitives_stringFromCharCode(40); + t2._contents += t6; + } + t6 = query.get$span(query); + buffer._interpolation_buffer0$_flushText$0(); + t3.push(new A.SupportsExpression0(query)); + t4.push(t6); + if (t5) { + t5 = A.Primitives_stringFromCharCode(41); + t2._contents += t5; + } + } else { + t5 = A.Primitives_stringFromCharCode(40); + t2._contents += t5; + buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true)); + t5 = A.Primitives_stringFromCharCode(41); + t2._contents += t5; + } + t1.expectChar$1(41); + _this.whitespace$1$consumeNewlines(false); + } else { + _this.whitespace$1$consumeNewlines(false); + if (t1.scanChar$1(44)) { + t2._contents += ", "; + buffer.addInterpolation$1(_this._stylesheet0$_mediaQueryList$0()); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } + } + } else if (t1.peekChar$0() === 40) { + if (!(t3.length === 0 && t2._contents.length === 0)) { + t1 = A.Primitives_stringFromCharCode(32); + t2._contents += t1; + } + buffer.addInterpolation$1(_this._stylesheet0$_mediaQueryList$0()); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } else + return buffer.interpolation$1(_this.spanFrom$1(start)); + }, + _stylesheet0$_importSupportsQuery$0() { + var t1, t2, _0_0, $name, _this = this; + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$1$consumeNewlines(true); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + return new A.SupportsNegation0(_this._stylesheet0$_supportsConditionInParens$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + } else { + t1 = _this.scanner; + if (t1.peekChar$0() === 40) + return _this._stylesheet0$_supportsCondition$1$inParentheses(true); + else { + _0_0 = _this._stylesheet0$_tryImportSupportsFunction$0(); + if (_0_0 != null) + return _0_0; + t2 = t1._string_scanner$_position; + $name = _this._stylesheet0$_expression$1$consumeNewlines(true); + t1.expectChar$1(58); + return new A.SupportsDeclaration0($name, _this._stylesheet0$_supportsDeclarationValue$1($name), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + } + }, + _stylesheet0$_tryImportSupportsFunction$0() { + var t1, start, $name, value, _this = this; + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return null; + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + $name = _this.interpolatedIdentifier$0(); + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + value = _this._stylesheet0$_interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true); + t1.expectChar$1(41); + return new A.SupportsFunction0($name, value, _this.spanFrom$1(start)); + }, + _stylesheet0$_includeRule$1(start) { + var $name, t1, name0, namespace, $arguments, t2, t3, contentParameters, contentParameters_, wasInContentBlock, $content, span, _this = this, _null = null; + _this.whitespace$1$consumeNewlines(true); + $name = _this.identifier$0(); + t1 = _this.scanner; + if (t1.scanChar$1(46)) { + name0 = _this._stylesheet0$_publicIdentifier$0(); + namespace = $name; + $name = name0; + } else + namespace = _null; + _this.whitespace$1$consumeNewlines(false); + if (t1.peekChar$0() === 40) + $arguments = _this._stylesheet0$_argumentInvocation$1$mixin(true); + else { + t2 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t3 = t2.offset; + $arguments = A.ArgumentList$empty0(A._FileSpan$(t2.file, t3, t3)); + } + _this.whitespace$1$consumeNewlines(false); + if (_this.scanIdentifier$1("using")) { + _this.whitespace$1$consumeNewlines(true); + contentParameters = _this._stylesheet0$_parameterList$0(); + _this.whitespace$1$consumeNewlines(false); + } else + contentParameters = _null; + t2 = contentParameters == null; + if (!t2 || _this.lookingAtChildren$0()) { + if (t2) { + t1 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t2 = t1.offset; + contentParameters_ = new A.ParameterList0(B.List_empty27, _null, A._FileSpan$(t1.file, t2, t2)); + } else + contentParameters_ = contentParameters; + wasInContentBlock = _this._stylesheet0$_inContentBlock; + _this._stylesheet0$_inContentBlock = true; + $content = _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__includeRule_closure0(contentParameters_)); + _this._stylesheet0$_inContentBlock = wasInContentBlock; + } else { + _this.expectStatementSeparator$0(); + $content = _null; + } + t1 = _this.spanFrom$2(start, start); + t2 = $content == null ? $arguments : $content; + span = t1.expand$1(0, t2.get$span(t2)); + return new A.IncludeRule0(namespace, A.stringReplaceAllUnchecked($name, "_", "-"), $name, $arguments, $content, span); + }, + mediaRule$1(start) { + var _this = this; + _this.whitespace$1$consumeNewlines(false); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_mediaRule_closure0(_this._stylesheet0$_mediaQueryList$0())); + }, + _stylesheet0$_mixinRule$1(start) { + var precedingComment, t1, t2, $name, parameters, _this = this; + _this.whitespace$1$consumeNewlines(true); + precedingComment = _this.lastSilentComment; + _this.lastSilentComment = null; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + $name = _this.identifier$0(); + if (B.JSString_methods.startsWith$1($name, "--")) + _this.error$2(0, string$.Sass__m, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + _this.whitespace$1$consumeNewlines(false); + if (t1.peekChar$0() === 40) + parameters = _this._stylesheet0$_parameterList$0(); + else { + t1 = A.FileLocation$_(t1._sourceFile, t1._string_scanner$_position); + t2 = t1.offset; + parameters = new A.ParameterList0(B.List_empty27, null, A._FileSpan$(t1.file, t2, t2)); + } + if (_this._stylesheet0$_inMixin || _this._stylesheet0$_inContentBlock) + _this.error$2(0, string$.Mixinscm, _this.spanFrom$1(start)); + else if (_this._stylesheet0$_inControlDirective) + _this.error$2(0, string$.Mixinsb, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(false); + _this._stylesheet0$_inMixin = true; + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser__mixinRule_closure0(_this, $name, parameters, precedingComment)); + }, + mozDocumentRule$2(start, $name) { + var t1, t2, t3, t4, t5, buffer, _0_0, identifierStart, identifier, _1_0, argument, t6, trailing, start0, end, _this = this, _box_0 = {}; + _this.whitespace$1$consumeNewlines(false); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer0(t3, t4, t5); + _box_0.needsDeprecationWarning = false; + for (;;) { + if (t1.peekChar$0() === 35) { + _0_0 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + _box_0.needsDeprecationWarning = true; + } else { + identifierStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + identifier = _this.identifier$0(); + $label0$0: { + if ("url" === identifier || "url-prefix" === identifier || "domain" === identifier) { + _1_0 = _this._stylesheet0$_tryUrlContents$2$name(identifierStart, identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(false); + argument = _this.interpolatedStringToken$0(); + t1.expectChar$1(41); + t3._contents += identifier; + t6 = A.Primitives_stringFromCharCode(40); + t3._contents += t6; + buffer.addInterpolation$1(argument); + t6 = A.Primitives_stringFromCharCode(41); + t3._contents += t6; + } + t6 = t3._contents; + trailing = t6.charCodeAt(0) == 0 ? t6 : t6; + if (!B.JSString_methods.endsWith$1(trailing, "url-prefix()") && !B.JSString_methods.endsWith$1(trailing, "url-prefix('')") && !B.JSString_methods.endsWith$1(trailing, 'url-prefix("")')) + _box_0.needsDeprecationWarning = true; + break $label0$0; + } + if ("regexp" === identifier) { + t3._contents += "regexp("; + t1.expectChar$1(40); + buffer.addInterpolation$1(_this.interpolatedStringToken$0()); + t1.expectChar$1(41); + t6 = A.Primitives_stringFromCharCode(41); + t3._contents += t6; + _box_0.needsDeprecationWarning = true; + break $label0$0; + } + _this.error$2(0, "Invalid function name.", _this.spanFrom$1(identifierStart)); + } + } + _this.whitespace$1$consumeNewlines(false); + if (!t1.scanChar$1(44)) + break; + t6 = A.Primitives_stringFromCharCode(44); + t3._contents += t6; + start0 = t1._string_scanner$_position; + new A.StylesheetParser_mozDocumentRule_closure1(_this).call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t1.string, start0, end); + } + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_mozDocumentRule_closure2(_box_0, _this, $name, buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))))); + }, + supportsRule$1(start) { + var condition, _this = this; + _this.whitespace$1$consumeNewlines(false); + condition = _this._stylesheet0$_supportsCondition$0(); + _this.whitespace$1$consumeNewlines(false); + return _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_supportsRule_closure0(condition)); + }, + _stylesheet0$_useNamespace$2(url, start) { + var namespace, basename, dot, t1, exception, _this = this; + if (_this.scanIdentifier$1("as")) { + _this.whitespace$1$consumeNewlines(true); + return _this.scanner.scanChar$1(42) ? null : _this.identifier$0(); + } + basename = url.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(url.get$pathSegments()); + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = B.JSString_methods.startsWith$1(basename, "_") ? 1 : 0; + namespace = B.JSString_methods.substring$2(basename, t1, dot === -1 ? basename.length : dot); + try { + t1 = new A.Parser1(A.SpanScanner$(namespace, null), null)._parser1$_parseIdentifier$0(); + return t1; + } catch (exception) { + if (type$.SassFormatException_2._is(A.unwrapException(exception))) + _this.error$2(0, 'The default namespace "' + A.S(namespace) + string$.x22x20is_n, _this.spanFrom$1(start)); + else + throw exception; + } + }, + _stylesheet0$_configuration$1$allowGuarded(allowGuarded) { + var variableNames, configuration, t1, t2, variableStart, $name, expression, t3, guarded, span, _this = this; + if (!_this.scanIdentifier$1("with")) + return null; + variableNames = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + configuration = A._setArrayType([], type$.JSArray_ConfiguredVariable_2); + _this.whitespace$1$consumeNewlines(true); + t1 = _this.scanner; + t1.expectChar$1(40); + for (t2 = _this.warnings;;) { + _this.whitespace$1$consumeNewlines(true); + variableStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + if (B.JSString_methods.startsWith$1($name, "-")) + t2.push(new A._Record_3_deprecation_message_span(B.Deprecation_lkJ, string$.Config, _this.spanFrom$1(variableStart))); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(58); + _this.whitespace$1$consumeNewlines(true); + expression = _this.expressionUntilComma$0(); + t3 = t1._string_scanner$_position; + if (allowGuarded && t1.scanChar$1(33)) { + guarded = _this.identifier$0() === "default"; + if (guarded) + _this.whitespace$1$consumeNewlines(true); + else + _this.error$2(0, "Invalid flag name.", _this.spanFrom$1(new A._SpanScannerState(t1, t3))); + } else + guarded = false; + span = _this.spanFrom$1(variableStart); + if (variableNames.contains$1(0, $name)) + _this.error$2(0, string$.The_sa, span); + variableNames.add$1(0, $name); + configuration.push(new A.ConfiguredVariable0($name, expression, guarded, span)); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$1$consumeNewlines(true); + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + } + t1.expectChar$1(41); + return configuration; + }, + _stylesheet0$_configuration$0() { + return this._stylesheet0$_configuration$1$allowGuarded(false); + }, + _stylesheet0$_warnRule$1(start) { + var value, t1, t2, _this = this; + _this.whitespace$1$consumeNewlines(true); + value = _this._stylesheet0$_expression$0(); + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.expectStatementSeparator$1("@warn rule"); + return new A.WarnRule0(value, _this.spanFrom$2(start, new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_whileRule$2(start, child) { + var wasInControlDirective, _this = this; + _this.whitespace$1$consumeNewlines(true); + wasInControlDirective = _this._stylesheet0$_inControlDirective; + _this._stylesheet0$_inControlDirective = true; + return _this._stylesheet0$_withChildren$3(child, start, new A.StylesheetParser__whileRule_closure0(_this, wasInControlDirective, _this._stylesheet0$_expression$0())); + }, + unknownAtRule$2(start, $name) { + var wasInPlainCssFunction, t2, _0_0, t3, _this = this, t1 = {}, + wasInUnknownAtRule = _this._stylesheet0$_inUnknownAtRule; + _this._stylesheet0$_inUnknownAtRule = true; + _this.whitespace$1$consumeNewlines(false); + t1.value = null; + t2 = _this.scanner.peekChar$0() !== 33 && !_this.atEndOfStatement$0() ? t1.value = _this._stylesheet0$_interpolatedDeclarationValue$1$allowOpenBrace(false) : null; + wasInPlainCssFunction = _this._stylesheet0$_inPlainCssFunction; + _0_0 = $name.get$asPlain(); + if (_0_0 != null) + t3 = A.equalsIgnoreCase0(_0_0, "function"); + else + t3 = false; + if (t3) + _this._stylesheet0$_inPlainCssFunction = true; + try { + if (_this.lookingAtChildren$0()) { + t1 = _this._stylesheet0$_withChildren$3(_this.get$_stylesheet0$_statement(), start, new A.StylesheetParser_unknownAtRule_closure0(t1, $name)); + return t1; + } else { + _this.expectStatementSeparator$0(); + t1 = A.AtRule$0($name, _this.spanFrom$1(start), null, t2); + return t1; + } + } finally { + _this._stylesheet0$_inUnknownAtRule = wasInUnknownAtRule; + _this._stylesheet0$_inPlainCssFunction = wasInPlainCssFunction; + } + }, + _stylesheet0$_disallowedAtRule$1(start) { + var _this = this; + _this.whitespace$1$consumeNewlines(false); + _this._stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(true, false); + _this.error$2(0, "This at-rule is not allowed here.", _this.spanFrom$1(start)); + }, + _stylesheet0$_parameterList$0() { + var parameters, named, restParameter, t3, $name, defaultValue, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + parameters = A._setArrayType([], type$.JSArray_Parameter_2); + named = A.LinkedHashSet_LinkedHashSet$_empty(type$.String); + while (restParameter = null, t1.peekChar$0() === 36) { + t3 = t1._string_scanner$_position; + t1.expectChar$1(36); + $name = _this.identifier$1$normalize(true); + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + defaultValue = _this.expressionUntilComma$0(); + } else { + if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(44)) + _this.whitespace$1$consumeNewlines(true); + restParameter = $name; + break; + } + defaultValue = null; + } + parameters.push(new A.Parameter0($name, defaultValue, _this.spanFrom$1(new A._SpanScannerState(t1, t3)))); + if (!named.add$1(0, $name)) + _this.error$2(0, "Duplicate parameter.", B.JSArray_methods.get$last(parameters).span); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$1$consumeNewlines(true); + } + t1.expectChar$1(41); + t1 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.ParameterList0(A.List_List$unmodifiable(parameters, type$.Parameter_2), restParameter, t1); + }, + _stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, mixin) { + var positional, t3, named, namedSpans, t4, t5, t6, rest, emittedRestDeprecation, keywordRest, expression, emittedRestDeprecation0, t7, value, t8, result, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + positional = A._setArrayType([], type$.JSArray_Expression_2); + t3 = type$.String; + named = A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.Expression_2); + namedSpans = A.LinkedHashMap_LinkedHashMap$_empty(t3, type$.FileSpan); + for (t4 = !mixin, t5 = _this.warnings, t6 = type$.SourceSpan, rest = null, emittedRestDeprecation = false; keywordRest = null, _this._stylesheet0$_lookingAtExpression$0();) { + expression = _this.expressionUntilComma$1$singleEquals(t4); + _this.whitespace$1$consumeNewlines(true); + emittedRestDeprecation0 = true; + if (expression instanceof A.VariableExpression0 && t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + t7 = expression.name; + if (named.containsKey$1(t7)) + _this.error$2(0, "Duplicate argument.", expression.span); + value = _this.expressionUntilComma$1$singleEquals(t4); + named.$indexSet(0, t7, value); + t8 = expression.span; + namedSpans.$indexSet(0, t7, t8.expand$1(0, value.get$span(value))); + if (rest != null && !emittedRestDeprecation) { + t5.push(new A._Record_3_deprecation_message_span(B.Deprecation_Jgi, string$.Named_, new A.MultiSpan0(_this.spanFromPosition$1(t8.get$start(t8).offset), "named argument", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rest.get$span(rest), "rest argument"], t6, t3), t6, t3)))); + emittedRestDeprecation = emittedRestDeprecation0; + } + } else if (t1.scanChar$1(46)) { + t1.expectChar$1(46); + t1.expectChar$1(46); + if (rest != null) { + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(44)) + _this.whitespace$1$consumeNewlines(true); + keywordRest = expression; + break; + } + rest = expression; + } else if (named.__js_helper$_length !== 0) + _this.error$2(0, string$.Positik, expression.get$span(expression)); + else { + positional.push(expression); + if (rest != null && !emittedRestDeprecation) { + t5.push(new A._Record_3_deprecation_message_span(B.Deprecation_Jgi, string$.Positir, new A.MultiSpan0(expression.get$span(expression), "positional argument", A.ConstantMap_ConstantMap$from(A.LinkedHashMap_LinkedHashMap$_literal([rest.get$span(rest), "rest argument"], t6, t3), t6, t3)))); + emittedRestDeprecation = emittedRestDeprecation0; + } + } + _this.whitespace$1$consumeNewlines(true); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$1$consumeNewlines(true); + if (allowEmptySecondArg && positional.length === 1 && named.__js_helper$_length === 0 && rest == null && t1.peekChar$0() === 41) { + t3 = t1._sourceFile; + t4 = t1._string_scanner$_position; + new A.FileLocation(t3, t4).FileLocation$_$2(t3, t4); + t5 = new A._FileSpan(t3, t4, t4); + t5._FileSpan$3(t3, t4, t4); + result = A.List_List$from([""], false, type$.Object); + result.$flags = 3; + positional.push(new A.StringExpression0(new A.Interpolation0(result, B.List_null, t5), false)); + break; + } + } + t1.expectChar$1(41); + return A.ArgumentList$0(positional, named, namedSpans, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), keywordRest, rest); + }, + _stylesheet0$_argumentInvocation$0() { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(false, false); + }, + _stylesheet0$_argumentInvocation$1$allowEmptySecondArg(allowEmptySecondArg) { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(allowEmptySecondArg, false); + }, + _stylesheet0$_argumentInvocation$1$mixin(mixin) { + return this._stylesheet0$_argumentInvocation$2$allowEmptySecondArg$mixin(false, mixin); + }, + _stylesheet0$_expression$4$bracketList$consumeNewlines$singleEquals$until(bracketList, consumeNewlines, singleEquals, until) { + var t2, beforeBracket, start, wasInExpression, wasInParentheses, resetState, resolveOneOperation, resolveOperations, addSingleExpression, addOperator, resolveSpaceExpressions, t3, t4, _3_0, _1_0, t5, _3_28, _2_0, _3_32, _3_40, commaExpressions, spaceExpressions, singleExpression, _this = this, + _s20_ = "Expected expression.", + _box_0 = {}, + t1 = until != null; + if (t1 && until.call$0()) + _this.scanner.error$1(0, _s20_); + if (bracketList) { + t2 = _this.scanner; + beforeBracket = new A._SpanScannerState(t2, t2._string_scanner$_position); + t2.expectChar$1(91); + _this.whitespace$1$consumeNewlines(true); + if (t2.scanChar$1(93)) { + t1 = A._setArrayType([], type$.JSArray_Expression_2); + t2 = _this.spanFrom$1(beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(t1, type$.Expression_2), B.ListSeparator_undecided_null_3_undecided0, true, t2); + } + } else + beforeBracket = null; + t2 = _this.scanner; + start = new A._SpanScannerState(t2, t2._string_scanner$_position); + wasInExpression = _this._stylesheet0$_inExpression; + wasInParentheses = _this._stylesheet0$_inParentheses; + _this._stylesheet0$_inExpression = true; + _box_0.operands_ = _box_0.operators_ = _box_0.spaceExpressions_ = _box_0.commaExpressions_ = null; + _box_0.allowSlash = true; + _box_0.singleExpression_ = _this._stylesheet0$_singleExpression$0(); + resetState = new A.StylesheetParser__expression_resetState0(_box_0, _this, start); + resolveOneOperation = new A.StylesheetParser__expression_resolveOneOperation0(_box_0, _this); + resolveOperations = new A.StylesheetParser__expression_resolveOperations0(_box_0, resolveOneOperation); + addSingleExpression = new A.StylesheetParser__expression_addSingleExpression0(_box_0, _this, resetState, resolveOperations); + addOperator = new A.StylesheetParser__expression_addOperator0(_box_0, _this, resolveOneOperation, addSingleExpression); + resolveSpaceExpressions = new A.StylesheetParser__expression_resolveSpaceExpressions0(_box_0, _this, resolveOperations); + for (t3 = !consumeNewlines, t4 = type$.JSArray_Expression_2;;) { + _this.whitespace$1$consumeNewlines(!t3 || bracketList); + if (t1 && until.call$0()) + break; + _3_0 = t2.peekChar$0(); + if (_3_0 == null) + break; + if (40 === _3_0) { + addSingleExpression.call$1(_this.parentheses$0()); + continue; + } + if (91 === _3_0) { + addSingleExpression.call$1(_this._stylesheet0$_expression$1$bracketList(true)); + continue; + } + if (36 === _3_0) { + addSingleExpression.call$1(_this._stylesheet0$_variable$0()); + continue; + } + if (38 === _3_0) { + addSingleExpression.call$1(_this._stylesheet0$_selector$0()); + continue; + } + if (39 === _3_0 || 34 === _3_0) { + addSingleExpression.call$1(_this.interpolatedString$0()); + continue; + } + if (35 === _3_0) { + addSingleExpression.call$1(_this._stylesheet0$_hashExpression$0()); + continue; + } + if (61 === _3_0) { + t2.readChar$0(); + if (singleEquals && t2.peekChar$0() !== 61) + addOperator.call$1(B.BinaryOperator_g6F0); + else { + t2.expectChar$1(61); + addOperator.call$1(B.BinaryOperator_K7S0); + } + continue; + } + if (33 === _3_0) { + $label0$1: { + _1_0 = t2.peekChar$1(1); + if (61 === _1_0) { + t2.readChar$0(); + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_Fv20); + break $label0$1; + } + t5 = true; + if (_1_0 != null) + if (105 !== _1_0) + if (73 !== _1_0) + t5 = _1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12; + if (t5) { + addSingleExpression.call$1(_this._stylesheet0$_importantExpression$0()); + break $label0$1; + } + break; + } + continue; + } + if (60 === _3_0) { + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_f2c0 : B.BinaryOperator_CG20); + continue; + } + if (62 === _3_0) { + t2.readChar$0(); + addOperator.call$1(t2.scanChar$1(61) ? B.BinaryOperator_YGt0 : B.BinaryOperator_Tic0); + continue; + } + if (42 === _3_0) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_wkM0); + continue; + } + _3_28 = 43 === _3_0; + if (_3_28 && _box_0.singleExpression_ == null) { + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + continue; + } + if (_3_28) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_jCK0); + continue; + } + if (45 === _3_0) { + _2_0 = t2.peekChar$1(1); + if (A._isInt(_2_0) && _2_0 >= 48 && _2_0 <= 57 || 46 === _2_0) + if (_box_0.singleExpression_ != null) { + t5 = t2.peekChar$1(-1); + t5 = t5 === 32 || t5 === 9 || t5 === 10 || t5 === 13 || t5 === 12; + } else + t5 = true; + else + t5 = false; + if (t5) + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + else if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + addSingleExpression.call$1(_this.identifierLike$0()); + else if (_box_0.singleExpression_ == null) + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + else { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_tDf0); + } + continue; + } + _3_32 = 47 === _3_0; + if (_3_32 && _box_0.singleExpression_ == null) { + addSingleExpression.call$1(_this._stylesheet0$_unaryOperation$0()); + continue; + } + if (_3_32) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_ehp0); + continue; + } + if (37 === _3_0) { + t2.readChar$0(); + addOperator.call$1(B.BinaryOperator_bgA0); + continue; + } + if (_3_0 >= 48 && _3_0 <= 57) { + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + continue; + } + _3_40 = 46 === _3_0; + if (_3_40 && t2.peekChar$1(1) === 46) + break; + if (_3_40) { + addSingleExpression.call$1(_this._stylesheet0$_number$0()); + continue; + } + if (97 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("and")) { + addOperator.call$1(B.BinaryOperator_5vK0); + continue; + } + if (111 === _3_0 && !_this.get$plainCss() && _this.scanIdentifier$1("or")) { + addOperator.call$1(B.BinaryOperator_OOf0); + continue; + } + if ((117 === _3_0 || 85 === _3_0) && t2.peekChar$1(1) === 43) { + addSingleExpression.call$1(_this._stylesheet0$_unicodeRange$0()); + continue; + } + if (!(_3_0 >= 97 && _3_0 <= 122)) + t5 = _3_0 >= 65 && _3_0 <= 90 || 95 === _3_0 || 92 === _3_0 || _3_0 >= 128; + else + t5 = true; + if (t5) { + addSingleExpression.call$1(_this.identifierLike$0()); + continue; + } + if (44 === _3_0) { + if (_this._stylesheet0$_inParentheses) { + _this._stylesheet0$_inParentheses = false; + if (_box_0.allowSlash) { + resetState.call$0(); + continue; + } + } + commaExpressions = _box_0.commaExpressions_; + if (commaExpressions == null) + commaExpressions = _box_0.commaExpressions_ = A._setArrayType([], t4); + if (_box_0.singleExpression_ == null) + t2.error$1(0, _s20_); + resolveSpaceExpressions.call$0(); + t5 = _box_0.singleExpression_; + t5.toString; + commaExpressions.push(t5); + t2.readChar$0(); + _box_0.allowSlash = true; + _box_0.singleExpression_ = null; + continue; + } + break; + } + if (bracketList) + t2.expectChar$1(93); + commaExpressions = _box_0.commaExpressions_; + spaceExpressions = _box_0.spaceExpressions_; + if (commaExpressions != null) { + resolveSpaceExpressions.call$0(); + _this._stylesheet0$_inParentheses = wasInParentheses; + singleExpression = _box_0.singleExpression_; + if (singleExpression != null) + commaExpressions.push(singleExpression); + _this._stylesheet0$_inExpression = wasInExpression; + t1 = _this.spanFrom$1(beforeBracket == null ? start : beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(commaExpressions, type$.Expression_2), B.ListSeparator_z0K0, bracketList, t1); + } else if (bracketList && spaceExpressions != null) { + resolveOperations.call$0(); + _this._stylesheet0$_inExpression = wasInExpression; + t1 = _box_0.singleExpression_; + t1.toString; + spaceExpressions.push(t1); + beforeBracket.toString; + t1 = _this.spanFrom$1(beforeBracket); + return new A.ListExpression0(A.List_List$unmodifiable(spaceExpressions, type$.Expression_2), B.ListSeparator_SrV0, true, t1); + } else { + resolveSpaceExpressions.call$0(); + if (bracketList) { + t1 = _box_0.singleExpression_; + t1.toString; + t4 = A._setArrayType([t1], t4); + beforeBracket.toString; + t1 = _this.spanFrom$1(beforeBracket); + _box_0.singleExpression_ = new A.ListExpression0(A.List_List$unmodifiable(t4, type$.Expression_2), B.ListSeparator_undecided_null_3_undecided0, true, t1); + } + _this._stylesheet0$_inExpression = wasInExpression; + t1 = _box_0.singleExpression_; + t1.toString; + return t1; + } + }, + _stylesheet0$_expression$3$consumeNewlines$singleEquals$until(consumeNewlines, singleEquals, until) { + return this._stylesheet0$_expression$4$bracketList$consumeNewlines$singleEquals$until(false, consumeNewlines, singleEquals, until); + }, + _stylesheet0$_expression$1$bracketList(bracketList) { + return this._stylesheet0$_expression$4$bracketList$consumeNewlines$singleEquals$until(bracketList, false, false, null); + }, + _stylesheet0$_expression$0() { + return this._stylesheet0$_expression$4$bracketList$consumeNewlines$singleEquals$until(false, false, false, null); + }, + _stylesheet0$_expression$1$consumeNewlines(consumeNewlines) { + return this._stylesheet0$_expression$4$bracketList$consumeNewlines$singleEquals$until(false, consumeNewlines, false, null); + }, + _stylesheet0$_expression$2$consumeNewlines$until(consumeNewlines, until) { + return this._stylesheet0$_expression$4$bracketList$consumeNewlines$singleEquals$until(false, consumeNewlines, false, until); + }, + expressionUntilComma$1$singleEquals(singleEquals) { + return this._stylesheet0$_expression$3$consumeNewlines$singleEquals$until(true, singleEquals, new A.StylesheetParser_expressionUntilComma_closure0(this)); + }, + expressionUntilComma$0() { + return this.expressionUntilComma$1$singleEquals(false); + }, + _stylesheet0$_isSlashOperand$1(expression) { + var t1 = true; + if (!(expression instanceof A.NumberExpression0)) + if (!(expression instanceof A.FunctionExpression0)) + t1 = expression instanceof A.BinaryOperationExpression0 && expression.allowsSlash; + return t1; + }, + _stylesheet0$_singleExpression$0() { + var next, t2, _this = this, + _s20_ = "Expected expression.", + t1 = _this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (_0_0 == null) + t1.error$1(0, _s20_); + if (40 === _0_0) { + t1 = _this.parentheses$0(); + break $label0$0; + } + if (47 === _0_0) { + t1 = _this._stylesheet0$_unaryOperation$0(); + break $label0$0; + } + if (46 === _0_0) { + t1 = _this._stylesheet0$_number$0(); + break $label0$0; + } + if (91 === _0_0) { + t1 = _this._stylesheet0$_expression$1$bracketList(true); + break $label0$0; + } + if (36 === _0_0) { + t1 = _this._stylesheet0$_variable$0(); + break $label0$0; + } + if (38 === _0_0) { + t1 = _this._stylesheet0$_selector$0(); + break $label0$0; + } + if (39 === _0_0 || 34 === _0_0) { + t1 = _this.interpolatedString$0(); + break $label0$0; + } + if (35 === _0_0) { + t1 = _this._stylesheet0$_hashExpression$0(); + break $label0$0; + } + if (43 === _0_0) { + next = t1.peekChar$1(1); + t1 = next != null && next >= 48 && next <= 57 || next === 46 ? _this._stylesheet0$_number$0() : _this._stylesheet0$_unaryOperation$0(); + break $label0$0; + } + if (45 === _0_0) { + t1 = _this._stylesheet0$_minusExpression$0(); + break $label0$0; + } + if (33 === _0_0) { + t1 = _this._stylesheet0$_importantExpression$0(); + break $label0$0; + } + if (37 === _0_0) { + t2 = t1._string_scanner$_position; + t1.readChar$0(); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + t2 = new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable(["%"], type$.Object), B.List_null, t2), false); + t1 = t2; + break $label0$0; + } + if ((117 === _0_0 || 85 === _0_0) && t1.peekChar$1(1) === 43) { + t1 = _this._stylesheet0$_unicodeRange$0(); + break $label0$0; + } + if (_0_0 >= 48 && _0_0 <= 57) { + t1 = _this._stylesheet0$_number$0(); + break $label0$0; + } + if (!(_0_0 >= 97 && _0_0 <= 122)) + t2 = _0_0 >= 65 && _0_0 <= 90 || 95 === _0_0 || 92 === _0_0 || _0_0 >= 128; + else + t2 = true; + if (t2) { + t1 = _this.identifierLike$0(); + break $label0$0; + } + t1 = t1.error$1(0, _s20_); + } + return t1; + }, + parentheses$0() { + var start, inside, first, expressions, list, t1, t2, _this = this, + wasInParentheses = _this._stylesheet0$_inParentheses; + _this._stylesheet0$_inParentheses = true; + try { + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + inside = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (!_this._stylesheet0$_lookingAtExpression$0()) { + t1.expectChar$1(41); + t1 = A._setArrayType([], type$.JSArray_Expression_2); + t2 = _this.spanFrom$1(start); + t1 = A.List_List$unmodifiable(t1, type$.Expression_2); + return new A.ListExpression0(t1, B.ListSeparator_undecided_null_3_undecided0, false, t2); + } + first = _this.expressionUntilComma$0(); + if (t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + t1 = _this._stylesheet0$_map$2(first, start); + return t1; + } + if (!t1.scanChar$1(44)) { + t1.expectChar$1(41); + t1 = _this.spanFrom$1(start); + return new A.ParenthesizedExpression0(first, t1); + } + _this.whitespace$1$consumeNewlines(true); + expressions = A._setArrayType([first], type$.JSArray_Expression_2); + for (;;) { + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + J.add$1$ax(expressions, _this.expressionUntilComma$0()); + if (!t1.scanChar$1(44)) + break; + _this.whitespace$1$consumeNewlines(true); + } + t2 = _this.spanFrom$1(inside); + list = new A.ListExpression0(A.List_List$unmodifiable(expressions, type$.Expression_2), B.ListSeparator_z0K0, false, t2); + t1.expectChar$1(41); + t1 = _this.spanFrom$1(start); + return new A.ParenthesizedExpression0(list, t1); + } finally { + _this._stylesheet0$_inParentheses = wasInParentheses; + } + }, + _stylesheet0$_map$2(first, start) { + var t1, key, _this = this, + pairs = A._setArrayType([new A._Record_2(first, _this.expressionUntilComma$0())], type$.JSArray_Record_2_Expression_and_Expression_2); + for (t1 = _this.scanner; t1.scanChar$1(44);) { + _this.whitespace$1$consumeNewlines(true); + if (!_this._stylesheet0$_lookingAtExpression$0()) + break; + key = _this.expressionUntilComma$0(); + t1.expectChar$1(58); + _this.whitespace$1$consumeNewlines(true); + pairs.push(new A._Record_2(key, _this.expressionUntilComma$0())); + } + t1.expectChar$1(41); + t1 = _this.spanFrom$1(start); + return new A.MapExpression0(A.List_List$unmodifiable(pairs, type$.Record_2_Expression_and_Expression_2), t1); + }, + _stylesheet0$_hashExpression$0() { + var start, t2, identifier, buffer, _this = this, + t1 = _this.scanner; + if (t1.peekChar$1(1) === 123) + return _this.identifierLike$0(); + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(35); + t2 = t1.peekChar$0(); + if (t2 == null) + t2 = null; + else + t2 = t2 >= 48 && t2 <= 57; + if (t2 === true) + return new A.ColorExpression0(_this._stylesheet0$_hexColorContents$1(start), _this.spanFrom$1(start)); + t2 = t1._string_scanner$_position; + identifier = _this.interpolatedIdentifier$0(); + if (_this._stylesheet0$_isHexColor$1(identifier)) { + t1.set$state(new A._SpanScannerState(t1, t2)); + return new A.ColorExpression0(_this._stylesheet0$_hexColorContents$1(start), _this.spanFrom$1(start)); + } + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t2 = A.Primitives_stringFromCharCode(35); + t1._contents += t2; + buffer.addInterpolation$1(identifier); + return new A.StringExpression0(buffer.interpolation$1(_this.spanFrom$1(start)), false); + }, + _stylesheet0$_hexColorContents$1(start) { + var red, green, blue, alpha, digit4, t2, t3, t4, _this = this, + digit1 = _this._stylesheet0$_hexDigit$0(), + digit2 = _this._stylesheet0$_hexDigit$0(), + digit3 = _this._stylesheet0$_hexDigit$0(), + t1 = _this.scanner, + $self = t1.peekChar$0(); + if (!($self != null && A.CharacterExtension_get_isHex0($self))) { + red = (digit1 << 4 >>> 0) + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = (digit3 << 4 >>> 0) + digit3; + alpha = null; + } else { + digit4 = _this._stylesheet0$_hexDigit$0(); + $self = t1.peekChar$0(); + t2 = $self != null && A.CharacterExtension_get_isHex0($self); + t3 = digit1 << 4 >>> 0; + t4 = digit3 << 4 >>> 0; + if (!t2) { + red = t3 + digit1; + green = (digit2 << 4 >>> 0) + digit2; + blue = t4 + digit3; + alpha = ((digit4 << 4 >>> 0) + digit4) / 255; + } else { + red = t3 + digit2; + green = t4 + digit4; + blue = (_this._stylesheet0$_hexDigit$0() << 4 >>> 0) + _this._stylesheet0$_hexDigit$0(); + $self = t1.peekChar$0(); + alpha = $self != null && A.CharacterExtension_get_isHex0($self) ? ((_this._stylesheet0$_hexDigit$0() << 4 >>> 0) + _this._stylesheet0$_hexDigit$0()) / 255 : null; + } + } + t1 = alpha == null; + t2 = t1 ? 1 : alpha; + return A.SassColor_SassColor$rgbInternal0(red, green, blue, t2, t1 ? new A.SpanColorFormat0(_this.spanFrom$1(start)) : null); + }, + _stylesheet0$_isHexColor$1(interpolation) { + var _0_2, t1, + plain = interpolation.get$asPlain(); + if (typeof plain == "string") { + _0_2 = plain.length; + t1 = true; + if (3 !== _0_2) + if (4 !== _0_2) + if (6 !== _0_2) + t1 = 8 === _0_2; + } else + t1 = false; + if (t1) { + t1 = new A.CodeUnits(plain); + return t1.every$1(t1, new A.StylesheetParser__isHexColor_closure0()); + } else + return false; + }, + _stylesheet0$_hexDigit$0() { + var t1 = this.scanner, + t2 = t1.peekChar$0(); + t2 = t2 == null ? null : A.CharacterExtension_get_isHex0(t2); + return t2 === true ? A.asHex0(t1.readChar$0()) : t1.error$1(0, "Expected hex digit."); + }, + _stylesheet0$_minusExpression$0() { + var _this = this, + _0_0 = _this.scanner.peekChar$1(1); + if (A._isInt(_0_0) && _0_0 >= 48 && _0_0 <= 57 || 46 === _0_0) + return _this._stylesheet0$_number$0(); + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return _this.identifierLike$0(); + return _this._stylesheet0$_unaryOperation$0(); + }, + _stylesheet0$_importantExpression$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.readChar$0(); + _this.whitespace$1$consumeNewlines(true); + _this.expectIdentifier$1("important"); + t2 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + return new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable(["!important"], type$.Object), B.List_null, t2), false); + }, + _stylesheet0$_unaryOperation$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + operator = _this._stylesheet0$_unaryOperatorFor$1(t1.readChar$0()); + if (operator == null) + t1.error$2$position(0, "Expected unary operator.", t1._string_scanner$_position - 1); + else if (_this.get$plainCss() && operator !== B.UnaryOperator_Y930) + t1.error$3$length$position(0, "Operators aren't allowed in plain CSS.", 1, t1._string_scanner$_position - 1); + _this.whitespace$1$consumeNewlines(true); + return new A.UnaryOperationExpression0(operator, _this._stylesheet0$_singleExpression$0(), _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_unaryOperatorFor$1(character) { + var t1; + $label0$0: { + if (43 === character) { + t1 = B.UnaryOperator_n2K0; + break $label0$0; + } + if (45 === character) { + t1 = B.UnaryOperator_hCO0; + break $label0$0; + } + if (47 === character) { + t1 = B.UnaryOperator_Y930; + break $label0$0; + } + t1 = null; + break $label0$0; + } + return t1; + }, + _stylesheet0$_number$0() { + var number, unit, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + first = t1.peekChar$0(), + t3 = first !== 43; + if (!t3 || first === 45) + t1.readChar$0(); + if (t1.peekChar$0() !== 46) + _this._stylesheet0$_consumeNaturalNumber$0(); + _this._stylesheet0$_tryDecimal$1$allowTrailingDot(t1._string_scanner$_position !== t2 && t3 && first !== 45); + _this._stylesheet0$_tryExponent$0(); + number = A.double_parse(t1.substring$1(0, t2)); + if (t1.scanChar$1(37)) + unit = "%"; + else { + if (_this.lookingAtIdentifier$0()) + t3 = t1.peekChar$0() !== 45 || t1.peekChar$1(1) !== 45; + else + t3 = false; + unit = t3 ? _this.identifier$1$unit(true) : null; + } + return new A.NumberExpression0(number, unit, _this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_consumeNaturalNumber$0() { + var $self, + t1 = this.scanner, + t2 = t1.readChar$0(); + if (!(t2 >= 48 && t2 <= 57)) + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position - 1); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_tryDecimal$1$allowTrailingDot(allowTrailingDot) { + var $self, + t1 = this.scanner; + if (t1.peekChar$0() !== 46) + return; + $self = t1.peekChar$1(1); + if (!($self != null && $self >= 48 && $self <= 57)) { + if (allowTrailingDot) + return; + t1.error$2$position(0, "Expected digit.", t1._string_scanner$_position + 1); + } + t1.readChar$0(); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_tryExponent$0() { + var next, $self, + t1 = this.scanner, + first = t1.peekChar$0(); + if (first !== 101 && first !== 69) + return; + next = t1.peekChar$1(1); + if (!(next != null && next >= 48 && next <= 57) && next !== 45 && next !== 43) + return; + t1.readChar$0(); + if (43 === next || 45 === next) + t1.readChar$0(); + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + t1.error$1(0, "Expected digit."); + for (;;) { + $self = t1.peekChar$0(); + if (!($self != null && $self >= 48 && $self <= 57)) + break; + t1.readChar$0(); + } + }, + _stylesheet0$_unicodeRange$0() { + var firstRangeLength, hasQuestionMark, t3, secondRangeLength, _this = this, + _s26_ = "Expected at most 6 digits.", + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + start = new A._SpanScannerState(t1, t2); + _this.expectIdentChar$1(117); + t1.expectChar$1(43); + for (firstRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure1());) + ++firstRangeLength; + for (hasQuestionMark = false; t1.scanChar$1(63); hasQuestionMark = true) + ++firstRangeLength; + if (firstRangeLength === 0) + t1.error$1(0, 'Expected hex digit or "?".'); + else if (firstRangeLength > 6) + _this.error$2(0, _s26_, _this.spanFrom$1(start)); + else if (hasQuestionMark) { + t1 = t1.substring$1(0, t2); + t2 = _this.spanFrom$1(start); + return new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable([t1], type$.Object), B.List_null, t2), false); + } + if (t1.scanChar$1(45)) { + t3 = t1._string_scanner$_position; + for (secondRangeLength = 0; _this.scanCharIf$1(new A.StylesheetParser__unicodeRange_closure2());) + ++secondRangeLength; + if (secondRangeLength === 0) + t1.error$1(0, "Expected hex digit."); + else if (secondRangeLength > 6) + _this.error$2(0, _s26_, _this.spanFrom$1(new A._SpanScannerState(t1, t3))); + } + if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) + t1.error$1(0, "Expected end of identifier."); + t1 = t1.substring$1(0, t2); + t2 = _this.spanFrom$1(start); + return new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable([t1], type$.Object), B.List_null, t2), false); + }, + _stylesheet0$_variable$0() { + var _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + $name = _this.variableName$0(); + if (_this.get$plainCss()) + _this.error$2(0, string$.Sass_v, _this.spanFrom$1(start)); + return new A.VariableExpression0(null, $name, _this.spanFrom$1(start)); + }, + _stylesheet0$_selector$0() { + var t1, start, _this = this; + if (_this.get$plainCss()) + _this.scanner.error$2$length(0, string$.The_pa, 1); + t1 = _this.scanner; + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(38); + if (t1.scanChar$1(38)) { + _this.warnings.push(new A._Record_3_deprecation_message_span(null, string$.In_Sas, _this.spanFrom$1(start))); + t1.set$position(t1._string_scanner$_position - 1); + } + return new A.SelectorExpression0(_this.spanFrom$1(start)); + }, + interpolatedString$0() { + var t3, t4, t5, buffer, _1_0, second, t6, _0_0, + t1 = this.scanner, + t2 = t1._string_scanner$_position, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t2); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer0(t3, t4, t5); + for (;;) { + _1_0 = t1.peekChar$0(); + if (_1_0 === quote) { + t1.readChar$0(); + break; + } + if (_1_0 == null || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) + t1.error$1(0, "Expected " + A.Primitives_stringFromCharCode(quote) + "."); + if (92 === _1_0) { + second = t1.peekChar$1(1); + if (second === 10 || second === 13 || second === 12) { + t1.readChar$0(); + t1.readChar$0(); + if (second === 13) + t1.scanChar$1(10); + } else { + t6 = A.Primitives_stringFromCharCode(A.consumeEscapedCharacter0(t1)); + t3._contents += t6; + } + continue; + } + if (35 === _1_0 && t1.peekChar$1(1) === 123) { + _0_0 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + continue; + } + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + } + return new A.StringExpression0(buffer.interpolation$1(this.spanFrom$1(new A._SpanScannerState(t1, t2))), true); + }, + interpolatedStringToken$0() { + var t3, t4, t5, buffer, t6, _1_0, second, t7, start, end, _0_0, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + quote = t1.readChar$0(); + if (quote !== 39 && quote !== 34) + t1.error$2$position(0, "Expected string.", t2); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer0(t3, t4, t5); + t6 = A.Primitives_stringFromCharCode(quote); + t3._contents += t6; + for (;;) { + _1_0 = t1.peekChar$0(); + if (_1_0 === quote) { + t4 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t4; + break; + } + if (_1_0 == null || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) + t1.error$1(0, "Expected " + t6 + "."); + if (92 === _1_0) { + second = t1.peekChar$1(1); + if (second === 10 || second === 13 || second === 12) { + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + if (second === 13) + if (t1.scanChar$1(10)) { + t7 = A.Primitives_stringFromCharCode(10); + t3._contents += t7; + } + } else { + start = t1._string_scanner$_position; + new A.StylesheetParser_interpolatedStringToken_closure0(_this).call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t1.string, start, end); + } + continue; + } + if (35 === _1_0 && t1.peekChar$1(1) === 123) { + _0_0 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + continue; + } + t7 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t7; + } + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + identifierLike$0() { + var beforeParen, invocation, expression, t1, _0_0, suggestion, exception, _1_0, t4, _2_0, _3_0, _3_2, _3_4, _this = this, + t2 = _this.scanner, + start = new A._SpanScannerState(t2, t2._string_scanner$_position), + identifier = _this.interpolatedIdentifier$0(), + plain = identifier.get$asPlain(), + lower = A._Cell$(), + t3 = plain != null; + if (t3) { + if (plain === "if" && t2.peekChar$0() === 40) { + beforeParen = new A._SpanScannerState(t2, t2._string_scanner$_position); + try { + invocation = _this._stylesheet0$_argumentInvocation$0(); + expression = new A.LegacyIfExpression0(invocation, identifier.span.expand$1(0, invocation.span)); + t1 = null; + _0_0 = expression.get$modernSuggestion(); + $label0$0: { + suggestion = null; + if (_0_0 != null) { + suggestion = _0_0; + t1 = "Suggestion: " + A.S(suggestion) + "\n\n"; + break $label0$0; + } + t1 = ""; + break $label0$0; + } + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_qka, B.JSString_methods.$add(string$.The_Sa, t1) + string$.More_i, expression.span)); + return expression; + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t2.set$state(beforeParen); + return _this.ifExpression$1(start); + } else + throw exception; + } + } else if (plain.toLowerCase() === "if" && t2.peekChar$0() === 40) + return _this.ifExpression$1(start); + else if (plain === "not") { + _this.whitespace$1$consumeNewlines(true); + expression = _this._stylesheet0$_singleExpression$0(); + return new A.UnaryOperationExpression0(B.UnaryOperator_not_not_3_not0, expression, identifier.span.expand$1(0, expression.get$span(expression))); + } + lower.__late_helper$_value = plain.toLowerCase(); + if (t2.peekChar$0() !== 40) { + switch (plain) { + case "false": + return new A.BooleanExpression0(false, identifier.span); + case "null": + return new A.NullExpression0(identifier.span); + case "true": + return new A.BooleanExpression0(true, identifier.span); + } + _1_0 = $.$get$colorsByName0().$index(0, lower._readLocal$0()); + if (_1_0 != null) { + t1 = B.JSNumber_methods.round$0(_1_0._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "red")); + t2 = B.JSNumber_methods.round$0(_1_0._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "green")); + t3 = B.JSNumber_methods.round$0(_1_0._color0$_legacyChannel$2(B.RgbColorSpace_i0P0, "blue")); + t4 = _1_0.alphaOrNull; + if (t4 == null) + t4 = 0; + return new A.ColorExpression0(A.SassColor_SassColor$rgbInternal0(t1, t2, t3, t4, new A.SpanColorFormat0(identifier.span)), identifier.span); + } + } + _2_0 = _this.trySpecialFunction$2(lower._readLocal$0(), start); + if (_2_0 != null) + return _2_0; + } + _3_0 = t2.peekChar$0(); + _3_2 = 46 === _3_0; + if (_3_2 && t2.peekChar$1(1) === 46) + return new A.StringExpression0(identifier, false); + if (_3_2) { + t2.readChar$0(); + if (t3) + return _this.namespacedExpression$2(plain, start); + _this.error$2(0, string$.Interpn, identifier.span); + } + _3_4 = 40 === _3_0; + if (_3_4 && t3) { + t1 = _this._stylesheet0$_argumentInvocation$1$allowEmptySecondArg(J.$eq$(lower._readLocal$0(), "var")); + t2 = _this.spanFrom$1(start); + return new A.FunctionExpression0(null, A.stringReplaceAllUnchecked(plain, "_", "-"), plain, t1, t2); + } + if (_3_4) + return new A.InterpolatedFunctionExpression0(identifier, _this._stylesheet0$_argumentInvocation$0(), _this.spanFrom$1(start)); + return new A.StringExpression0(identifier, false); + }, + ifExpression$1(start) { + var branches, condition, t2, _this = this, + t1 = _this.scanner; + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + branches = A._setArrayType([], type$.JSArray_Record_2_nullable_IfConditionExpression_and_Expression_2); + while (t1.peekChar$0() !== 41) { + condition = _this.scanIdentifier$1("else") ? null : _this._stylesheet0$_ifConditionExpression$0(); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(58); + _this.whitespace$1$consumeNewlines(true); + branches.push(new A._Record_2(condition, _this._stylesheet0$_expression$1$consumeNewlines(true))); + _this.whitespace$1$consumeNewlines(true); + if (!t1.scanChar$1(59)) + break; + _this.whitespace$1$consumeNewlines(true); + } + t1.expectChar$1(41); + t1 = t1.spanFrom$1(start); + t2 = A.List_List$unmodifiable(branches, type$.Record_2_nullable_IfConditionExpression_and_Expression_2); + if (t2.length === 0) + A.throwExpression(A.ArgumentError$value(t2, "branches", "may not be empty")); + return new A.IfExpression0(t2, t1); + }, + _stylesheet0$_ifConditionExpression$0() { + var groups, op, _0_0, single, result, _2_0, _this = this, + _s44_ = string$.Whitesa, + _s11_ = "expressions", + _s21_ = "must have length >= 2", + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (_this.scanIdentifier$1("not")) { + if (t1.peekChar$0() === 40) + t1.error$1(0, string$.Whitesn); + _this.whitespace$1$consumeNewlines(true); + return new A.IfConditionNegation0(_this._stylesheet0$_ifGroup$0(), t1.spanFrom$1(new A._SpanScannerState(t1, t2))); + } + groups = A._setArrayType([_this._stylesheet0$_ifGroup$0()], type$.JSArray_IfConditionExpression_2); + _this.whitespace$1$consumeNewlines(true); + for (op = null;;) { + if (op !== B.BooleanOperator_10 && _this.scanIdentifier$1("and")) { + if (t1.peekChar$0() === 40) + t1.error$1(0, _s44_); + _this.whitespace$1$consumeNewlines(true); + if (op == null) + op = B.BooleanOperator_00; + groups.push(_this._stylesheet0$_ifGroup$0()); + } else if (op !== B.BooleanOperator_00 && _this.scanIdentifier$1("or")) { + if (t1.peekChar$0() === 40) + t1.error$1(0, _s44_); + _this.whitespace$1$consumeNewlines(true); + if (op == null) + op = B.BooleanOperator_10; + groups.push(_this._stylesheet0$_ifGroup$0()); + } else { + _0_0 = t1.peekChar$0(); + if (_0_0 != null && _0_0 !== 41 && _0_0 !== 58 && B.JSArray_methods.get$last(groups).get$isArbitrarySubstitution()) { + $label0$0: { + if (groups.length === 1) { + single = groups[0]; + t1 = single; + break $label0$0; + } + op.toString; + result = A.List_List$from(groups, false, type$.IfConditionExpression_2); + result.$flags = 3; + t1 = result; + t2 = new A.IfConditionOperation0(t1, op); + if (t1.length < 2) + A.throwExpression(A.ArgumentError$value(t1, _s11_, _s21_)); + t1 = t2; + break $label0$0; + } + return _this._stylesheet0$_ifConditionRaw$2(t1, _this._stylesheet0$_ifGroup$0()); + } else { + _2_0 = _this._stylesheet0$_tryArbitrarySubstitution$0(); + if (_2_0 != null) { + $label1$1: { + if (groups.length === 1) { + single = groups[0]; + t1 = single; + break $label1$1; + } + op.toString; + result = A.List_List$from(groups, false, type$.IfConditionExpression_2); + result.$flags = 3; + t1 = result; + t2 = new A.IfConditionOperation0(t1, op); + if (t1.length < 2) + A.throwExpression(A.ArgumentError$value(t1, _s11_, _s21_)); + t1 = t2; + break $label1$1; + } + return _this._stylesheet0$_ifConditionRaw$2(t1, _2_0); + } else + break; + } + } + _this.whitespace$1$consumeNewlines(true); + } + $label2$3: { + if (groups.length === 1) { + single = groups[0]; + t1 = single; + break $label2$3; + } + op.toString; + t1 = A.IfConditionOperation$0(groups, op); + break $label2$3; + } + return t1; + }, + _stylesheet0$_ifConditionRaw$2(preceding, next) { + var t1, t2, _0_5, _0_6, t3, last, buffer, op, t4, lastGroup, lastGroup0, _1_0, _2_0, _this = this, _null = null; + $label0$0: { + if (preceding.get$isArbitrarySubstitution()) { + t1 = preceding; + break $label0$0; + } + t1 = _null; + t2 = false; + if (preceding instanceof A.IfConditionOperation0) { + _0_5 = preceding.expressions; + _0_6 = _0_5.length; + t3 = _0_6; + if (t3 >= 1) { + last = _0_5[_0_6 - 1]; + t1 = last.get$isArbitrarySubstitution(); + } else { + last = t1; + t1 = t2; + } + } else { + last = t1; + t1 = t2; + } + if (t1) { + t1 = last; + break $label0$0; + } + t1 = next.get$isArbitrarySubstitution(); + if (t1) { + t1 = next; + break $label0$0; + } + t1 = A.throwExpression(A.ArgumentError$("Either " + preceding.toString$0(0) + string$.x20must_e + next.toString$0(0) + " must be one.", _null)); + } + t2 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + buffer.addInterpolation$1(preceding.toInterpolation$1(t1)); + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + buffer.addInterpolation$1(next.toInterpolation$1(t1)); + op = preceding instanceof A.IfConditionOperation0 ? preceding.op : _null; + _this.whitespace$1$consumeNewlines(true); + for (t4 = _this.scanner, lastGroup = next;;) { + if (op !== B.BooleanOperator_10 && _this.scanIdentifier$1("and")) { + if (t4.peekChar$0() === 40) + t4.error$1(0, string$.Whitesa); + _this.whitespace$1$consumeNewlines(true); + if (op == null) + op = B.BooleanOperator_00; + lastGroup0 = _this._stylesheet0$_ifGroup$0(); + t2._contents += " and "; + buffer.addInterpolation$1(lastGroup0.toInterpolation$1(t1)); + } else if (op !== B.BooleanOperator_00 && _this.scanIdentifier$1("or")) { + if (t4.peekChar$0() === 40) + t4.error$1(0, string$.Whiteso); + _this.whitespace$1$consumeNewlines(true); + if (op == null) + op = B.BooleanOperator_10; + lastGroup = _this._stylesheet0$_ifGroup$0(); + _this.whitespace$1$consumeNewlines(true); + t2._contents += " or "; + buffer.addInterpolation$1(lastGroup.toInterpolation$1(t1)); + } else { + _1_0 = t4.peekChar$0(); + if (_1_0 != null && _1_0 !== 41 && _1_0 !== 58 && lastGroup.get$isArbitrarySubstitution()) { + lastGroup = _this._stylesheet0$_ifGroup$0(); + t2._contents += t3; + buffer.addInterpolation$1(lastGroup.toInterpolation$1(t1)); + } else { + _2_0 = _this._stylesheet0$_tryArbitrarySubstitution$0(); + if (_2_0 != null) { + t2._contents += t3; + buffer.addInterpolation$1(_2_0.toInterpolation$1(t1)); + } else + break; + lastGroup = _2_0; + } + } + _this.whitespace$1$consumeNewlines(true); + } + t1 = preceding.get$span(preceding); + t4 = A.FileLocation$_(t4._sourceFile, t4._string_scanner$_position); + t2 = t4.offset; + return new A.IfConditionRaw0(buffer.interpolation$1(t1.expand$1(0, A._FileSpan$(t4.file, t2, t2)))); + }, + _stylesheet0$_ifGroup$0() { + var expression, t2, identifier, _0_1, _0_6, plain, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (40 === t1.peekChar$0()) { + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + expression = _this._stylesheet0$_ifConditionExpression$0(); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(41); + return new A.IfConditionParenthesized0(expression, t1.spanFrom$1(start)); + } + t2 = _this.scanIdentifier$2$caseSensitive("sass", true); + if (t2) { + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + expression = _this._stylesheet0$_expression$0(); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(41); + if (_this.get$plainCss()) + _this.error$2(0, string$.sass__, t1.spanFrom$1(start)); + else + return new A.IfConditionSass0(expression, t1.spanFrom$1(start)); + } + identifier = _this.interpolatedIdentifier$0(); + _0_1 = identifier.contents; + if (_0_1.length === 1) + t2 = _0_1[0] instanceof A.Expression0 && t1.peekChar$0() !== 40; + else + t2 = false; + if (t2) + return new A.IfConditionRaw0(identifier); + _0_6 = identifier.get$asPlain(); + if (_0_6 != null) { + plain = _0_6 == null ? A._asString(_0_6) : _0_6; + t2 = B.Set_6V2Gi.contains$1(0, plain.toLowerCase()) && t1.peekChar$0() === 40; + } else + t2 = false; + if (t2) + t1.error$1(0, 'Whitespace is required between "' + identifier.toString$0(0) + '" and "("'); + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + expression = _this._stylesheet0$_interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true); + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(41); + return new A.IfConditionFunction0(identifier, expression, t1.spanFrom$1(start)); + }, + _stylesheet0$_tryArbitrarySubstitution$0() { + var _0_0, span, start, t2, $arguments, _this = this, + t1 = _this.scanner; + if (t1.peekChar$0() === 35) { + _0_0 = _this.singleInterpolation$0(); + span = _0_0._1; + t1 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1.add$2(0, _0_0._0, span); + return new A.IfConditionRaw0(t1.interpolation$1(span)); + } + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + $label0$0: { + t2 = _this.scanIdentifier$1("if"); + if (t2) { + t2 = t1.spanFrom$1(start); + t2 = new A.Interpolation0(A.List_List$unmodifiable(["if"], type$.Object), B.List_null, t2); + break $label0$0; + } + t2 = _this.scanIdentifier$1("var"); + if (t2) { + t2 = t1.spanFrom$1(start); + t2 = new A.Interpolation0(A.List_List$unmodifiable(["var"], type$.Object), B.List_null, t2); + break $label0$0; + } + t2 = _this.scanIdentifier$1("attr"); + if (t2) { + t2 = t1.spanFrom$1(start); + t2 = new A.Interpolation0(A.List_List$unmodifiable(["attr"], type$.Object), B.List_null, t2); + break $label0$0; + } + t2 = t1.matches$1("--"); + if (t2) { + t2 = _this.interpolatedIdentifier$0(); + break $label0$0; + } + t2 = null; + break $label0$0; + } + if (t2 == null) + return null; + if (!t1.scanChar$1(40)) { + t1.set$state(start); + return null; + } + $arguments = _this._stylesheet0$_interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true); + t1.expectChar$1(41); + return new A.IfConditionFunction0(t2, $arguments, t1.spanFrom$1(start)); + }, + namespacedExpression$2(namespace, start) { + var $name, t1, t2, t3, _this = this; + if (_this.scanner.peekChar$0() === 36) { + $name = _this.variableName$0(); + _this._stylesheet0$_assertPublic$2($name, new A.StylesheetParser_namespacedExpression_closure0(_this, start)); + return new A.VariableExpression0(namespace, $name, _this.spanFrom$1(start)); + } + t1 = _this._stylesheet0$_publicIdentifier$0(); + t2 = _this._stylesheet0$_argumentInvocation$0(); + t3 = _this.spanFrom$1(start); + return new A.FunctionExpression0(namespace, A.stringReplaceAllUnchecked(t1, "_", "-"), t1, t2, t3); + }, + trySpecialFunction$2($name, start) { + var invalidSassScript, nonCssSassScript, argument, t1, buffer, t2, normalized, vendored, _0_2, t3, exception, value, suggestion, next, _this = this; + if ($name === "type" && _this.scanner.scanChar$1(40)) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = $name; + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + } else { + normalized = A.unvendor0($name); + t1 = normalized === $name; + vendored = !t1; + $label0$0: { + _0_2 = "expression" === normalized; + if (_0_2 && vendored && _this.scanner.scanChar$1(40)) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = $name; + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + t2 = _this.scanner; + t3 = t2._string_scanner$_position; + invalidSassScript = false; + nonCssSassScript = false; + try { + argument = _this._stylesheet0$_expression$0(); + nonCssSassScript = !argument.accept$1(new A.IsPlainCssVisitor0(true)); + } catch (exception) { + if (A.unwrapException(exception) instanceof A.StringScannerException) + invalidSassScript = true; + else + throw exception; + } + t2.set$state(new A._SpanScannerState(t2, t3)); + value = _this._stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(true); + buffer.addInterpolation$1(value); + t2.expectChar$1(41); + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + if (invalidSassScript || nonCssSassScript) { + suggestion = new A.StringExpression0(value, true).asInterpolation$0(); + t1 = invalidSassScript ? "be parsed as SassScript. " : "no longer be valid syntax. "; + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_2Ja, "Vendor-prefixed " + normalized + string$.x28__fun + t1 + ("To preserve current behavior:\n\n" + $name + "(#{" + suggestion.toString$0(0) + string$.x7dx29__Mo), _this.spanFrom$1(start))); + } + return new A.StringExpression0(buffer.interpolation$1(_this.spanFrom$1(start)), false); + } + t2 = true; + if (!("calc" === normalized && vendored && _this.scanner.scanChar$1(40))) + if (!(_0_2 && t1 && _this.scanner.scanChar$1(40))) + t1 = "element" === normalized && _this.scanner.scanChar$1(40); + else + t1 = t2; + else + t1 = t2; + if (t1) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = $name; + t2 = A.Primitives_stringFromCharCode(40); + t1._contents += t2; + break $label0$0; + } + if ("progid" === normalized && _this.scanner.scanChar$1(58)) { + t1 = new A.StringBuffer(""); + buffer = new A.InterpolationBuffer0(t1, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t1._contents = $name; + t2 = A.Primitives_stringFromCharCode(58); + t1._contents += t2; + t2 = _this.scanner; + next = t2.peekChar$0(); + for (;;) { + if (next != null) { + if (!(next >= 97 && next <= 122)) + t3 = next >= 65 && next <= 90; + else + t3 = true; + t3 = t3 || next === 46; + } else + t3 = false; + if (!t3) + break; + t3 = A.Primitives_stringFromCharCode(t2.readChar$0()); + t1._contents += t3; + next = t2.peekChar$0(); + } + t2.expectChar$1(40); + t3 = A.Primitives_stringFromCharCode(40); + t1._contents += t3; + buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(true)); + t2.expectChar$1(41); + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + if (vendored) + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_2Ja, string$.Vendorp + new A.StringExpression0(buffer.interpolation$1(_this.spanFrom$1(start)), true).asInterpolation$0().toString$0(0) + string$.x7dx0a_Mor, _this.spanFrom$1(start))); + return new A.StringExpression0(buffer.interpolation$1(_this.spanFrom$1(start)), false); + } + if ("url" === normalized) + return A.NullableExtension_andThen0(_this._stylesheet0$_tryUrlContents$2$vendored(start, vendored), new A.StylesheetParser_trySpecialFunction_closure0()); + return null; + } + } + buffer.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(true)); + _this.scanner.expectChar$1(41); + t1 = buffer._interpolation_buffer0$_text; + t2 = A.Primitives_stringFromCharCode(41); + t1._contents += t2; + return new A.StringExpression0(buffer.interpolation$1(_this.spanFrom$1(start)), false); + }, + _stylesheet0$_tryUrlContents$3$name$vendored(start, $name, vendored) { + var invalidSassScript, t3, exception, t4, t5, buffer, t6, _1_0, _1_6, _0_0, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(40)) + return null; + invalidSassScript = false; + if (vendored) { + t3 = t1._string_scanner$_position; + try { + _this._stylesheet0$_expression$0(); + } catch (exception) { + if (A.unwrapException(exception) instanceof A.StringScannerException) + invalidSassScript = true; + else + throw exception; + } + t1.set$state(new A._SpanScannerState(t1, t3)); + } + _this.whitespaceWithoutComments$1$consumeNewlines(true); + t3 = new A.StringBuffer(""); + t4 = A._setArrayType([], type$.JSArray_Object); + t5 = A._setArrayType([], type$.JSArray_nullable_FileSpan); + buffer = new A.InterpolationBuffer0(t3, t4, t5); + t3._contents = $name == null ? "url" : $name; + t6 = A.Primitives_stringFromCharCode(40); + t3._contents += t6; + for (;;) { + _1_0 = t1.peekChar$0(); + if (_1_0 == null) + break; + if (92 === _1_0) { + t6 = _this.escape$0(); + t3._contents += t6; + continue; + } + _1_6 = 35 === _1_0; + if (_1_6 && t1.peekChar$1(1) === 123) { + _0_0 = _this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t4.push(_0_0._0); + t5.push(_0_0._1); + continue; + } + t6 = true; + if (33 !== _1_0) + if (37 !== _1_0) + if (38 !== _1_0) + if (!_1_6) + t6 = _1_0 >= 42 && _1_0 <= 126 || _1_0 >= 128; + if (t6) { + t6 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t6; + continue; + } + if (_1_0 === 32 || _1_0 === 9 || _1_0 === 10 || _1_0 === 13 || _1_0 === 12) { + _this.whitespaceWithoutComments$1$consumeNewlines(true); + if (t1.peekChar$0() !== 41) + break; + continue; + } + if (41 === _1_0) { + t2 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t2; + if (vendored && invalidSassScript) + _this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_2Ja, string$.Vendoru + A.S($name) + "(#{" + new A.StringExpression0(buffer.interpolation$1(_this.spanFrom$1(start)), true).asInterpolation$0().toString$0(0) + string$.x7dx29__Mo, _this.spanFrom$1(start))); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } + break; + } + t1.set$state(new A._SpanScannerState(t1, t2)); + return null; + }, + _stylesheet0$_tryUrlContents$2$vendored(start, vendored) { + return this._stylesheet0$_tryUrlContents$3$name$vendored(start, null, vendored); + }, + _stylesheet0$_tryUrlContents$2$name(start, $name) { + return this._stylesheet0$_tryUrlContents$3$name$vendored(start, $name, false); + }, + _stylesheet0$_tryUrlContents$1(start) { + return this._stylesheet0$_tryUrlContents$3$name$vendored(start, null, false); + }, + dynamicUrl$0() { + var _0_0, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + _this.expectIdentifier$1("url"); + _0_0 = _this._stylesheet0$_tryUrlContents$1(start); + if (_0_0 != null) + return new A.StringExpression0(_0_0, false); + t1 = _this.spanFrom$1(start); + return new A.InterpolatedFunctionExpression0(new A.Interpolation0(A.List_List$unmodifiable(["url"], type$.Object), B.List_null, t1), _this._stylesheet0$_argumentInvocation$0(), _this.spanFrom$1(start)); + }, + almostAnyValue$1$omitComments(omitComments) { + var t4, t5, t6, t7, _2_0, t8, _0_0, _0_2, start, end, _0_4, identifier, _1_0, bracket, char, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)), + brackets = A._setArrayType([], type$.JSArray_int); + for (t4 = t1.string, t5 = t4.length, t6 = !omitComments, t7 = _this.get$loudComment();;) + $label0$0: { + _2_0 = t1.peekChar$0(); + if (92 === _2_0) { + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + break $label0$0; + } + if (34 === _2_0 || 39 === _2_0) { + buffer.addInterpolation$1(_this.interpolatedStringToken$0()); + break $label0$0; + } + if (47 === _2_0) { + $label1$1: { + _0_0 = t1.peekChar$1(1); + _0_2 = 42 === _0_0; + if (_0_2 && t6) { + start = t1._string_scanner$_position; + t7.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + break $label1$1; + } + if (_0_2) { + _this.loudComment$0(); + break $label1$1; + } + _0_4 = 47 === _0_0; + if (_0_4 && t6) { + t8 = _this.get$silentComment(); + start = t1._string_scanner$_position; + t8.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t4, start, end); + break $label1$1; + } + if (_0_4) { + _this.silentComment$0(); + break $label1$1; + } + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + } + break $label0$0; + } + if (35 === _2_0 && t1.peekChar$1(1) === 123) { + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + break $label0$0; + } + if (13 === _2_0 || 10 === _2_0 || 12 === _2_0) { + if (_this.get$indented() && brackets.length === 0) + break; + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + break $label0$0; + } + if (33 === _2_0 || 59 === _2_0 || 123 === _2_0 || 125 === _2_0) + break; + if (117 === _2_0 || 85 === _2_0) { + t8 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + if (identifier !== "url" && identifier !== "url-prefix") { + t3._contents += identifier; + continue; + } + _1_0 = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t8), identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + if ((t8 === 0 ? 1 / t8 < 0 : t8 < 0) || t8 > t5) + A.throwExpression(A.ArgumentError$("Invalid position " + t8, null)); + t1._string_scanner$_position = t8; + t1._lastMatch = null; + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + } + break $label0$0; + } + if (40 === _2_0 || 91 === _2_0) { + bracket = t1.readChar$0(); + t8 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t8; + brackets.push(A.opposite0(bracket)); + break $label0$0; + } + if (41 === _2_0 || 93 === _2_0) { + t8 = _2_0 != null; + char = t8 ? _2_0 : null; + } else { + char = null; + t8 = false; + } + if (t8) { + if (brackets.length === 0) + t1.error$1(0, 'Unexpected "' + A.Primitives_stringFromCharCode(char) + '".'); + bracket = brackets.pop(); + t1.expectChar$1(bracket); + t8 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t8; + break $label0$0; + } + if (_2_0 == null) + break; + t8 = _this.lookingAtIdentifier$0(); + if (t8) { + t8 = _this.identifier$0(); + t3._contents += t8; + break $label0$0; + } + t8 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t8; + } + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + almostAnyValue$0() { + return this.almostAnyValue$1$omitComments(false); + }, + _stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(allowColon, allowEmpty, allowOpenBrace, allowSemicolon, consumeNewlines, endAfterOf, silentComments) { + var t5, t6, t7, t8, t9, t10, t11, wroteNewline, _2_0, wroteNewline0, t12, _0_0, start, end, _2_12, _2_14_isSet, _2_14, t13, _2_16, _2_18_isSet, _2_20, _2_18, _2_20_isSet, _2_22, bracket, identifier, _1_0, of, _this = this, _null = null, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + t4 = A._setArrayType([], type$.JSArray_Object), + buffer = new A.InterpolationBuffer0(t3, t4, A._setArrayType([], type$.JSArray_nullable_FileSpan)), + brackets = A._setArrayType([], type$.JSArray_int); + for (t5 = !consumeNewlines, t6 = !allowOpenBrace, t7 = t1.string, t8 = t7.length, t9 = !allowColon, t10 = !allowSemicolon, t11 = _this.get$loudComment(), wroteNewline = false;;) + $label0$0: { + _2_0 = t1.peekChar$0(); + wroteNewline0 = false; + if (92 === _2_0) { + t12 = _this.escape$1$identifierStart(true); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (34 === _2_0 || 39 === _2_0) { + buffer.addInterpolation$1(_this.interpolatedStringToken$0()); + wroteNewline = wroteNewline0; + break $label0$0; + } + if (47 === _2_0) { + $label1$1: { + _0_0 = t1.peekChar$1(1); + if (42 === _0_0) { + start = t1._string_scanner$_position; + t11.call$0(); + end = t1._string_scanner$_position; + t3._contents += B.JSString_methods.substring$2(t7, start, end); + break $label1$1; + } + if (47 === _0_0 && silentComments) { + _this.silentComment$0(); + break $label1$1; + } + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + } + wroteNewline = wroteNewline0; + break $label0$0; + } + if (35 === _2_0 && t1.peekChar$1(1) === 123) { + buffer.addInterpolation$1(_this.interpolatedIdentifier$0()); + wroteNewline = wroteNewline0; + break $label0$0; + } + _2_12 = 32 === _2_0; + _2_14_isSet = !_2_12; + if (_2_14_isSet) { + _2_14 = 9 === _2_0; + t12 = _2_14; + } else { + _2_14 = _null; + t12 = true; + } + t13 = false; + if (t12) + if (!wroteNewline) { + t12 = t1.peekChar$1(1); + t12 = t12 === 32 || t12 === 9 || t12 === 10 || t12 === 13 || t12 === 12; + } else + t12 = t13; + else + t12 = t13; + if (t12) { + t1.readChar$0(); + break $label0$0; + } + if (!_2_12) + t12 = _2_14_isSet ? _2_14 : 9 === _2_0; + else + t12 = true; + if (t12) { + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + break $label0$0; + } + _2_16 = 10 === _2_0; + _2_18_isSet = !_2_16; + _2_20 = _null; + t12 = true; + if (_2_18_isSet) { + _2_18 = 13 === _2_0; + _2_20_isSet = !_2_18; + if (_2_20_isSet) { + _2_20 = 12 === _2_0; + t12 = _2_20; + } + } else { + _2_18 = _null; + _2_20_isSet = false; + } + if (t12 && _this.get$indented() && t5 && brackets.length === 0) + break; + t12 = true; + if (!_2_16) + if (!(_2_18_isSet ? _2_18 : 13 === _2_0)) + t12 = _2_20_isSet ? _2_20 : 12 === _2_0; + if (t12) { + t12 = t1.peekChar$1(-1); + if (!(t12 === 10 || t12 === 13 || t12 === 12)) + t3._contents += "\n"; + t1.readChar$0(); + wroteNewline = true; + break $label0$0; + } + _2_22 = 123 === _2_0; + if (_2_22 && t6) + break; + if (40 !== _2_0) + t12 = _2_22 || 91 === _2_0; + else + t12 = true; + if (t12) { + bracket = t1.readChar$0(); + t12 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t12; + brackets.push(A.opposite0(bracket)); + wroteNewline = wroteNewline0; + break $label0$0; + } + if (41 === _2_0 || 125 === _2_0 || 93 === _2_0) { + if (brackets.length === 0) + break; + bracket = brackets.pop(); + t1.expectChar$1(bracket); + t12 = A.Primitives_stringFromCharCode(bracket); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (59 === _2_0) { + if (t10 && brackets.length === 0) + break; + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (58 === _2_0) { + if (t9 && brackets.length === 0) + break; + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (117 === _2_0 || 85 === _2_0) { + t12 = t1._string_scanner$_position; + identifier = _this.identifier$0(); + if (identifier !== "url" && identifier !== "url-prefix") { + t3._contents += identifier; + wroteNewline = wroteNewline0; + continue; + } + _1_0 = _this._stylesheet0$_tryUrlContents$2$name(new A._SpanScannerState(t1, t12), identifier); + if (_1_0 != null) + buffer.addInterpolation$1(_1_0); + else { + if ((t12 === 0 ? 1 / t12 < 0 : t12 < 0) || t12 > t8) + A.throwExpression(A.ArgumentError$("Invalid position " + t12, _null)); + t1._string_scanner$_position = t12; + t1._lastMatch = null; + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + } + wroteNewline = wroteNewline0; + break $label0$0; + } + if (111 === _2_0 || 79 === _2_0) { + if (endAfterOf && brackets.length === 0) { + start = t1._string_scanner$_position; + new A.StylesheetParser__interpolatedDeclarationValue_closure0(_this).call$0(); + end = t1._string_scanner$_position; + of = B.JSString_methods.substring$2(t7, start, end); + if (of !== "") { + t3._contents += of; + break; + } + } + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + if (_2_0 == null) + break; + t12 = _this.lookingAtIdentifier$0(); + if (t12) { + t12 = _this.identifier$0(); + t3._contents += t12; + wroteNewline = wroteNewline0; + break $label0$0; + } + t12 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t3._contents += t12; + wroteNewline = wroteNewline0; + } + if (brackets.length !== 0) + t1.expectChar$1(B.JSArray_methods.get$last(brackets)); + if (!allowEmpty && t4.length === 0 && t3._contents.length === 0) + t1.error$1(0, "Expected token."); + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(allowEmpty) { + return this._stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, allowEmpty, true, false, false, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(allowEmpty, allowSemicolon, consumeNewlines) { + return this._stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, allowEmpty, true, allowSemicolon, consumeNewlines, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$2$consumeNewlines$endAfterOf(consumeNewlines, endAfterOf) { + return this._stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, false, true, false, consumeNewlines, endAfterOf, true); + }, + _stylesheet0$_interpolatedDeclarationValue$4$allowColon$allowEmpty$allowSemicolon$consumeNewlines(allowColon, allowEmpty, allowSemicolon, consumeNewlines) { + return this._stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(allowColon, allowEmpty, true, allowSemicolon, consumeNewlines, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$0() { + return this._stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, false, true, false, false, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$1$allowOpenBrace(allowOpenBrace) { + return this._stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, false, allowOpenBrace, false, false, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$2$allowEmpty$allowOpenBrace(allowEmpty, allowOpenBrace) { + return this._stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, allowEmpty, allowOpenBrace, false, false, false, true); + }, + _stylesheet0$_interpolatedDeclarationValue$1$silentComments(silentComments) { + return this._stylesheet0$_interpolatedDeclarationValue$7$allowColon$allowEmpty$allowOpenBrace$allowSemicolon$consumeNewlines$endAfterOf$silentComments(true, false, true, false, false, false, silentComments); + }, + interpolatedIdentifier$0() { + var t3, _1_0, _0_0, _this = this, + _s20_ = "Expected identifier.", + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + t2 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t2, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + if (t1.scanChar$1(45)) { + t3 = A.Primitives_stringFromCharCode(45); + t2._contents += t3; + if (t1.scanChar$1(45)) { + t2._contents += t3; + _this._stylesheet0$_interpolatedIdentifierBodyHelper$1(buffer); + return buffer.interpolation$1(_this.spanFrom$1(start)); + } + } + $label0$0: { + _1_0 = t1.peekChar$0(); + if (_1_0 == null) + t1.error$1(0, _s20_); + if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128) { + t1 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t1; + break $label0$0; + } + if (92 === _1_0) { + t1 = _this.escape$1$identifierStart(true); + t2._contents += t1; + break $label0$0; + } + if (35 === _1_0 && t1.peekChar$1(1) === 123) { + _0_0 = _this.singleInterpolation$0(); + buffer.add$2(0, _0_0._0, _0_0._1); + break $label0$0; + } + t1.error$1(0, _s20_); + } + _this._stylesheet0$_interpolatedIdentifierBodyHelper$1(buffer); + return buffer.interpolation$1(_this.spanFrom$1(start)); + }, + _stylesheet0$_interpolatedIdentifierBodyHelper$1(buffer) { + var t1, t2, t3, t4, _1_0, t5, _0_0; + for (t1 = buffer._interpolation_buffer0$_contents, t2 = buffer._interpolation_buffer0$_spans, t3 = this.scanner, t4 = buffer._interpolation_buffer0$_text;;) { + _1_0 = t3.peekChar$0(); + if (_1_0 == null) + break; + t5 = true; + if (95 !== _1_0) + if (45 !== _1_0) { + if (!(_1_0 >= 97 && _1_0 <= 122)) + t5 = _1_0 >= 65 && _1_0 <= 90; + else + t5 = true; + if (!t5) + t5 = _1_0 >= 48 && _1_0 <= 57; + else + t5 = true; + t5 = t5 || _1_0 >= 128; + } + if (t5) { + t5 = A.Primitives_stringFromCharCode(t3.readChar$0()); + t4._contents += t5; + continue; + } + if (92 === _1_0) { + t5 = this.escape$0(); + t4._contents += t5; + continue; + } + if (35 === _1_0 && t3.peekChar$1(1) === 123) { + _0_0 = this.singleInterpolation$0(); + buffer._interpolation_buffer0$_flushText$0(); + t1.push(_0_0._0); + t2.push(_0_0._1); + continue; + } + break; + } + }, + singleInterpolation$0() { + var contents, span, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position; + t1.expect$1("#{"); + _this.whitespace$1$consumeNewlines(true); + contents = _this._stylesheet0$_expression$1$consumeNewlines(true); + t1.expectChar$1(125); + span = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (_this.get$plainCss()) + _this.error$2(0, string$.Interpp, span); + return new A._Record_2(contents, span); + }, + _stylesheet0$_selectorList$0() { + var t3, t4, lineBreak, _this = this, + t1 = _this.scanner, + t2 = t1._sourceFile, + previousLine = t2.getLine$1(t1._string_scanner$_position), + components = A._setArrayType([_this._stylesheet0$_complexSelector$0()], type$.JSArray_InterpolatedComplexSelector); + _this.whitespace$1$consumeNewlines(false); + for (t3 = t1.string.length; t1.scanChar$1(44);) { + _this.whitespace$1$consumeNewlines(true); + if (t1.peekChar$0() === 44) + continue; + t4 = t1._string_scanner$_position; + if (t4 === t3) + break; + lineBreak = t2.getLine$1(t4) !== previousLine; + if (lineBreak) + previousLine = t2.getLine$1(t1._string_scanner$_position); + components.push(_this._stylesheet0$_complexSelector$1$lineBreak(lineBreak)); + } + return A.InterpolatedSelectorList$(components); + }, + _stylesheet0$_complexSelector$1$lineBreak(lineBreak) { + var t3, leadingCombinator, combinator, lastCompound, allowCombinator, _0_0, t4, _this = this, _null = null, + _s18_ = "expected selector.", + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + componentStart = new A._SpanScannerState(t1, t2), + components = A._setArrayType([], type$.JSArray_InterpolatedComplexSelectorComponent); + for (t3 = type$.CssValue_Combinator_2, leadingCombinator = _null, combinator = leadingCombinator, lastCompound = combinator;;) { + _this.whitespace$1$consumeNewlines(false); + allowCombinator = combinator == null; + _0_0 = t1.peekChar$0(); + if (43 === _0_0 && allowCombinator) { + t4 = t1._string_scanner$_position; + t1.readChar$0(); + combinator = new A.CssValue0(B.Combinator_sHB0, _this.spanFrom$1(new A._SpanScannerState(t1, t4)), t3); + continue; + } + if (62 === _0_0 && allowCombinator) { + t4 = t1._string_scanner$_position; + t1.readChar$0(); + combinator = new A.CssValue0(B.Combinator_iUF0, _this.spanFrom$1(new A._SpanScannerState(t1, t4)), t3); + continue; + } + if (126 === _0_0 && allowCombinator) { + t4 = t1._string_scanner$_position; + t1.readChar$0(); + combinator = new A.CssValue0(B.Combinator_98W0, _this.spanFrom$1(new A._SpanScannerState(t1, t4)), t3); + continue; + } + if (_0_0 == null) + break; + t4 = true; + if (91 !== _0_0) + if (46 !== _0_0) + if (35 !== _0_0) + if (37 !== _0_0) + if (58 !== _0_0) + if (38 !== _0_0) + if (42 !== _0_0) + if (124 !== _0_0) + t4 = _this._stylesheet0$_lookingAtInterpolatedIdentifier$0(); + if (t4) { + if (lastCompound != null) + components.push(new A.InterpolatedComplexSelectorComponent(lastCompound, combinator, _this.spanFrom$1(componentStart))); + else if (!allowCombinator) { + componentStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + leadingCombinator = combinator; + } + lastCompound = _this._stylesheet0$_compoundSelector$0(); + if (t1.peekChar$0() === 38) + t1.error$1(0, string$.x22x26__ma); + combinator = _null; + continue; + } + break; + } + t3 = combinator != null; + if (t3) + t4 = _this.get$plainCss(); + else + t4 = false; + if (t4) + t1.error$1(0, _s18_); + else if (lastCompound != null) + components.push(new A.InterpolatedComplexSelectorComponent(lastCompound, combinator, _this.spanFrom$1(componentStart))); + else if (t3) + leadingCombinator = combinator; + else + t1.error$1(0, _s18_); + return A.InterpolatedComplexSelector$(components, _this.spanFrom$1(new A._SpanScannerState(t1, t2)), leadingCombinator); + }, + _stylesheet0$_complexSelector$0() { + return this._stylesheet0$_complexSelector$1$lineBreak(false); + }, + _stylesheet0$_compoundSelector$0() { + var t1, _this = this, + components = A._setArrayType([_this._stylesheet0$_simpleSelector$0()], type$.JSArray_InterpolatedSimpleSelector); + for (t1 = _this.scanner; _this._stylesheet0$_isSimpleSelectorStart$1(t1.peekChar$0());) + components.push(_this._stylesheet0$_simpleSelector$1$allowParent(_this.get$plainCss())); + return A.InterpolatedCompoundSelector$(components); + }, + _stylesheet0$_simpleSelector$1$allowParent(allowParent) { + var $name, t2, t3, t4, t5, text, suffix, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + _0_0 = t1.peekChar$0(); + if (91 === _0_0) + return _this._stylesheet0$_attributeSelector$0(); + if (46 === _0_0) { + t1.expectChar$1(46); + return new A.InterpolatedClassSelector(_this.interpolatedIdentifier$0()); + } + if (35 === _0_0 && t1.peekChar$1(1) !== 123) { + t1.expectChar$1(35); + return new A.InterpolatedIDSelector(_this.interpolatedIdentifier$0()); + } + if (37 === _0_0) { + t1.expectChar$1(37); + $name = _this.interpolatedIdentifier$0(); + if (_this.get$plainCss()) + _this.error$2(0, string$.Placeh, _this.spanFrom$1(start)); + return new A.InterpolatedPlaceholderSelector($name); + } + if (58 === _0_0) + return _this._stylesheet0$_pseudoSelector$0(); + if (38 === _0_0) { + t2 = t1._string_scanner$_position; + t1.expectChar$1(38); + if (_this._stylesheet0$_lookingAtInterpolatedIdentifierBody$0()) { + t3 = t1._string_scanner$_position; + t4 = new A.StringBuffer(""); + t5 = A._setArrayType([], type$.JSArray_Object); + text = new A.InterpolationBuffer0(t4, t5, A._setArrayType([], type$.JSArray_nullable_FileSpan)); + _this._stylesheet0$_interpolatedIdentifierBodyHelper$1(text); + if (t5.length === 0 && t4._contents.length === 0) + t1.error$1(0, "Expected identifier body."); + suffix = text.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t3))); + } else + suffix = null; + if (_this.get$plainCss() && suffix != null) + t1.error$3$length$position(0, string$.Parent, t1._string_scanner$_position - t2, t2); + t1 = _this.spanFrom$1(new A._SpanScannerState(t1, t2)); + if (!allowParent) + _this.error$2(0, "Parent selectors aren't allowed here.", _this.spanFrom$1(start)); + return new A.InterpolatedParentSelector(suffix, t1); + } + return _this._stylesheet0$_typeOrUniversalSelector$0(); + }, + _stylesheet0$_simpleSelector$0() { + return this._stylesheet0$_simpleSelector$1$allowParent(true); + }, + _stylesheet0$_attributeSelector$0() { + var $name, operator, next, value, modifier, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(91); + _this.whitespace$1$consumeNewlines(true); + $name = _this._stylesheet0$_attributeName$0(); + _this.whitespace$1$consumeNewlines(true); + if (t1.scanChar$1(93)) + return new A.InterpolatedAttributeSelector($name, _null, _null, _null, _this.spanFrom$1(start)); + operator = _this._stylesheet0$_attributeOperator$0(); + _this.whitespace$1$consumeNewlines(true); + next = t1.peekChar$0(); + value = next === 39 || next === 34 ? _this.interpolatedStringToken$0() : _this.interpolatedIdentifier$0(); + _this.whitespace$1$consumeNewlines(true); + modifier = _this._stylesheet0$_lookingAtInterpolatedIdentifier$0() ? _this.interpolatedIdentifier$0() : _null; + _this.whitespace$1$consumeNewlines(true); + t1.expectChar$1(93); + return new A.InterpolatedAttributeSelector($name, operator, value, modifier, _this.spanFrom$1(start)); + }, + _stylesheet0$_attributeName$0() { + var t2, t3, nameOrNamespace, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (t1.scanChar$1(42)) { + t2 = _this.spanFrom$1(start); + t3 = A.List_List$unmodifiable(["*"], type$.Object); + t1.expectChar$1(124); + return new A.InterpolatedQualifiedName(_this.interpolatedIdentifier$0(), _this.spanFrom$1(start), new A.Interpolation0(t3, B.List_null, t2)); + } + if (t1.scanChar$1(124)) { + t1 = _this.spanFrom$2(start, start); + t2 = A.List_List$unmodifiable([""], type$.Object); + return new A.InterpolatedQualifiedName(_this.interpolatedIdentifier$0(), _this.spanFrom$1(start), new A.Interpolation0(t2, B.List_null, t1)); + } + nameOrNamespace = _this.interpolatedIdentifier$0(); + if (t1.peekChar$0() !== 124 || t1.peekChar$1(1) === 61) + return new A.InterpolatedQualifiedName(nameOrNamespace, _this.spanFrom$1(start), null); + t1.readChar$0(); + return new A.InterpolatedQualifiedName(_this.interpolatedIdentifier$0(), _this.spanFrom$1(start), nameOrNamespace); + }, + _stylesheet0$_attributeOperator$0() { + var op, + t1 = this.scanner, + t2 = t1._string_scanner$_position; + switch (t1.readChar$0()) { + case 61: + op = B.AttributeOperator_jFZ0; + break; + case 126: + t1.expectChar$1(61); + op = B.AttributeOperator_OrK0; + break; + case 124: + t1.expectChar$1(61); + op = B.AttributeOperator_g5B0; + break; + case 94: + t1.expectChar$1(61); + op = B.AttributeOperator_stc0; + break; + case 36: + t1.expectChar$1(61); + op = B.AttributeOperator_xJ90; + break; + case 42: + t1.expectChar$1(61); + op = B.AttributeOperator_h200; + break; + default: + t1.error$2$position(0, 'Expected "]".', t2); + op = null; + } + return new A.CssValue0(op, this.spanFrom$1(new A._SpanScannerState(t1, t2)), type$.CssValue_AttributeOperator); + }, + _stylesheet0$_pseudoSelector$0() { + var element, $name, unvendored, argument, selector, _this = this, _null = null, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + t1.expectChar$1(58); + element = t1.scanChar$1(58); + $name = _this.interpolatedIdentifier$0(); + if (!t1.scanChar$1(40)) + return new A.InterpolatedPseudoSelector($name, !element, _null, _null, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(true); + unvendored = A.NullableExtension_andThen0($name.get$asPlain(), A.utils1__unvendor$closure()); + argument = _null; + selector = _null; + if (element) + if ($.selectorPseudoElements0.contains$1(0, unvendored)) + selector = _this._stylesheet0$_selectorList$0(); + else + argument = _this._stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(true); + else if ($.selectorPseudoClasses0.contains$1(0, unvendored)) + selector = _this._stylesheet0$_selectorList$0(); + else if (unvendored === "nth-child" || unvendored === "nth-last-child") { + argument = _this._stylesheet0$_interpolatedDeclarationValue$2$consumeNewlines$endAfterOf(true, true); + selector = t1.peekChar$0() !== 41 ? _this._stylesheet0$_selectorList$0() : _null; + } else + argument = _this._stylesheet0$_interpolatedDeclarationValue$1$allowEmpty(true); + t1.expectChar$1(41); + return new A.InterpolatedPseudoSelector($name, !element, argument, selector, _this.spanFrom$1(start)); + }, + _stylesheet0$_typeOrUniversalSelector$0() { + var t2, namespace, nameOrNamespace, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (t1.scanChar$1(42)) { + t2 = t1._string_scanner$_position; + if (!t1.scanChar$1(124)) + return new A.InterpolatedUniversalSelector(null, _this.spanFrom$1(start)); + t2 = _this.spanFrom$2(start, new A._SpanScannerState(t1, t2)); + namespace = new A.Interpolation0(A.List_List$unmodifiable(["*"], type$.Object), B.List_null, t2); + return t1.scanChar$1(42) ? new A.InterpolatedUniversalSelector(namespace, _this.spanFrom$1(start)) : new A.InterpolatedTypeSelector(new A.InterpolatedQualifiedName(_this.interpolatedIdentifier$0(), _this.spanFrom$1(start), namespace)); + } else if (t1.scanChar$1(124)) { + t2 = _this.spanFrom$2(start, start); + namespace = new A.Interpolation0(A.List_List$unmodifiable([""], type$.Object), B.List_null, t2); + return t1.scanChar$1(42) ? new A.InterpolatedUniversalSelector(namespace, _this.spanFrom$1(start)) : new A.InterpolatedTypeSelector(new A.InterpolatedQualifiedName(_this.interpolatedIdentifier$0(), _this.spanFrom$1(start), namespace)); + } + nameOrNamespace = _this.interpolatedIdentifier$0(); + if (!t1.scanChar$1(124)) + return new A.InterpolatedTypeSelector(new A.InterpolatedQualifiedName(nameOrNamespace, _this.spanFrom$1(start), null)); + else if (t1.scanChar$1(42)) + return new A.InterpolatedUniversalSelector(nameOrNamespace, _this.spanFrom$1(start)); + else + return new A.InterpolatedTypeSelector(new A.InterpolatedQualifiedName(_this.interpolatedIdentifier$0(), _this.spanFrom$1(start), nameOrNamespace)); + }, + _stylesheet0$_isSimpleSelectorStart$1(character) { + var t1; + $label0$0: { + t1 = true; + if (42 !== character) + if (91 !== character) + if (46 !== character) + if (35 !== character) + if (37 !== character) { + t1 = 58 === character; + !t1; + } + if (t1) { + t1 = true; + break $label0$0; + } + if (38 === character) { + t1 = this.get$plainCss(); + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _stylesheet0$_mediaQueryList$0() { + var t4, _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + t3 = new A.StringBuffer(""), + buffer = new A.InterpolationBuffer0(t3, A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + for (;;) { + _this.whitespace$1$consumeNewlines(false); + _this._stylesheet0$_mediaQuery$1(buffer); + _this.whitespace$1$consumeNewlines(false); + if (!t1.scanChar$1(44)) + break; + t4 = A.Primitives_stringFromCharCode(44); + t3._contents += t4; + t4 = A.Primitives_stringFromCharCode(32); + t3._contents += t4; + } + return buffer.interpolation$1(_this.spanFrom$1(new A._SpanScannerState(t1, t2))); + }, + _stylesheet0$_mediaQuery$1(buffer) { + var identifier1, t1, t2, identifier2, _this = this, _s3_ = "and"; + if (_this.scanner.peekChar$0() === 40) { + _this._stylesheet0$_mediaInParens$1(buffer); + _this.whitespace$1$consumeNewlines(false); + if (_this.scanIdentifier$1(_s3_)) { + buffer._interpolation_buffer0$_text._contents += " and "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaLogicSequence$2(buffer, _s3_); + } else if (_this.scanIdentifier$1("or")) { + buffer._interpolation_buffer0$_text._contents += " or "; + _this.expectWhitespace$0(); + _this._stylesheet0$_mediaLogicSequence$2(buffer, "or"); + } + return; + } + identifier1 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase0(identifier1.get$asPlain(), "not")) { + _this.expectWhitespace$0(); + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + buffer._interpolation_buffer0$_text._contents += "not "; + _this._stylesheet0$_mediaOrInterp$1(buffer); + return; + } + } + _this.whitespace$1$consumeNewlines(false); + buffer.addInterpolation$1(identifier1); + if (!_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) + return; + t1 = buffer._interpolation_buffer0$_text; + t2 = A.Primitives_stringFromCharCode(32); + t1._contents += t2; + identifier2 = _this.interpolatedIdentifier$0(); + if (A.equalsIgnoreCase0(identifier2.get$asPlain(), _s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else { + _this.whitespace$1$consumeNewlines(false); + buffer.addInterpolation$1(identifier2); + if (_this.scanIdentifier$1(_s3_)) { + _this.expectWhitespace$0(); + t1._contents += " and "; + } else + return; + } + if (_this.scanIdentifier$1("not")) { + _this.expectWhitespace$0(); + t1._contents += "not "; + _this._stylesheet0$_mediaOrInterp$1(buffer); + return; + } + _this._stylesheet0$_mediaLogicSequence$2(buffer, _s3_); + return; + }, + _stylesheet0$_mediaLogicSequence$2(buffer, operator) { + var t1, t2, t3, _this = this; + for (t1 = buffer._interpolation_buffer0$_text;;) { + _this._stylesheet0$_mediaOrInterp$1(buffer); + _this.whitespace$1$consumeNewlines(false); + if (!_this.scanIdentifier$1(operator)) + return; + _this.expectWhitespace$1$consumeNewlines(false); + t2 = A.Primitives_stringFromCharCode(32); + t3 = (t1._contents += t2) + operator; + t1._contents = t3; + t1._contents = t3 + t2; + } + }, + _stylesheet0$_mediaOrInterp$1(buffer) { + var _0_0; + if (this.scanner.peekChar$0() === 35) { + _0_0 = this.singleInterpolation$0(); + buffer.add$2(0, _0_0._0, _0_0._1); + } else + this._stylesheet0$_mediaInParens$1(buffer); + }, + _stylesheet0$_mediaInParens$1(buffer) { + var t2, t3, expressionBefore, expressionAfter, next, t4, t5, expressionMiddle, _this = this, + t1 = _this.scanner; + t1.expectChar$2$name(40, "media condition in parentheses"); + t2 = buffer._interpolation_buffer0$_text; + t3 = A.Primitives_stringFromCharCode(40); + t2._contents += t3; + _this.whitespace$1$consumeNewlines(true); + if (t1.peekChar$0() === 40) { + _this._stylesheet0$_mediaInParens$1(buffer); + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1("and")) { + t2._contents += " and "; + _this.expectWhitespace$1$consumeNewlines(true); + _this._stylesheet0$_mediaLogicSequence$2(buffer, "and"); + } else if (_this.scanIdentifier$1("or")) { + t2._contents += " or "; + _this.expectWhitespace$1$consumeNewlines(true); + _this._stylesheet0$_mediaLogicSequence$2(buffer, "or"); + } + } else if (_this.scanIdentifier$1("not")) { + t2._contents += "not "; + _this.expectWhitespace$1$consumeNewlines(true); + _this._stylesheet0$_mediaOrInterp$1(buffer); + } else { + expressionBefore = _this._stylesheet0$_expressionUntilComparison$0(); + buffer.add$2(0, expressionBefore, expressionBefore.get$span(expressionBefore)); + if (t1.scanChar$1(58)) { + _this.whitespace$1$consumeNewlines(true); + t3 = A.Primitives_stringFromCharCode(58); + t2._contents += t3; + t3 = A.Primitives_stringFromCharCode(32); + t2._contents += t3; + expressionAfter = _this._stylesheet0$_expression$1$consumeNewlines(true); + buffer.add$2(0, expressionAfter, expressionAfter.get$span(expressionAfter)); + } else { + next = t1.peekChar$0(); + t3 = 60 !== next; + if (!t3 || 62 === next || 61 === next) { + t4 = A.Primitives_stringFromCharCode(32); + t2._contents += t4; + t5 = A.Primitives_stringFromCharCode(t1.readChar$0()); + t2._contents += t5; + if ((!t3 || 62 === next) && t1.scanChar$1(61)) { + t5 = A.Primitives_stringFromCharCode(61); + t2._contents += t5; + } + t2._contents += t4; + _this.whitespace$1$consumeNewlines(true); + expressionMiddle = _this._stylesheet0$_expressionUntilComparison$0(); + buffer.add$2(0, expressionMiddle, expressionMiddle.get$span(expressionMiddle)); + if (!t3 || 62 === next) { + next.toString; + t3 = t1.scanChar$1(next); + } else + t3 = false; + if (t3) { + t2._contents += t4; + t3 = A.Primitives_stringFromCharCode(next); + t2._contents += t3; + if (t1.scanChar$1(61)) { + t3 = A.Primitives_stringFromCharCode(61); + t2._contents += t3; + } + t2._contents += t4; + _this.whitespace$1$consumeNewlines(true); + expressionAfter = _this._stylesheet0$_expressionUntilComparison$0(); + buffer.add$2(0, expressionAfter, expressionAfter.get$span(expressionAfter)); + } + } + } + } + t1.expectChar$1(41); + _this.whitespace$1$consumeNewlines(false); + t1 = A.Primitives_stringFromCharCode(41); + t2._contents += t1; + }, + _stylesheet0$_expressionUntilComparison$0() { + return this._stylesheet0$_expression$2$consumeNewlines$until(true, new A.StylesheetParser__expressionUntilComparison_closure0(this)); + }, + _stylesheet0$_supportsCondition$1$inParentheses(inParentheses) { + var condition, operator, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$1$consumeNewlines(inParentheses); + return new A.SupportsNegation0(_this._stylesheet0$_supportsConditionInParens$0(), _this.spanFrom$1(start)); + } + condition = _this._stylesheet0$_supportsConditionInParens$0(); + _this.whitespace$1$consumeNewlines(inParentheses); + for (operator = null; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator._name); + else if (_this.scanIdentifier$1("or")) + operator = B.BooleanOperator_10; + else { + _this.expectIdentifier$1("and"); + operator = B.BooleanOperator_00; + } + _this.whitespace$1$consumeNewlines(inParentheses); + condition = new A.SupportsOperation0(condition, _this._stylesheet0$_supportsConditionInParens$0(), operator, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(inParentheses); + } + return condition; + }, + _stylesheet0$_supportsCondition$0() { + return this._stylesheet0$_supportsCondition$1$inParentheses(false); + }, + _stylesheet0$_supportsConditionInParens$0() { + var $name, nameStart, wasInParentheses, identifier, _1_0, operation, contents, identifier0, t2, $arguments, _0_0, _0_4_isSet, _0_4, condition, exception, value, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position); + if (_this._stylesheet0$_lookingAtInterpolatedIdentifier$0()) { + identifier0 = _this.interpolatedIdentifier$0(); + t2 = identifier0.get$asPlain(); + if ((t2 == null ? null : t2.toLowerCase()) === "not") + _this.error$2(0, '"not" is not a valid identifier here.', identifier0.span); + if (t1.scanChar$1(40)) { + $arguments = _this._stylesheet0$_interpolatedDeclarationValue$3$allowEmpty$allowSemicolon$consumeNewlines(true, true, true); + t1.expectChar$1(41); + return new A.SupportsFunction0(identifier0, $arguments, _this.spanFrom$1(start)); + } else { + _0_0 = identifier0.contents; + _0_4_isSet = _0_0.length === 1; + if (_0_4_isSet) { + _0_4 = _0_0[0]; + t2 = _0_4 instanceof A.Expression0; + } else { + _0_4 = null; + t2 = false; + } + if (t2) { + t1 = _0_4_isSet ? _0_4 : _0_0[0]; + return new A.SupportsInterpolation0(type$.Expression_2._as(t1), _this.spanFrom$1(start)); + } else + _this.error$2(0, "Expected @supports condition.", identifier0.span); + } + } + t1.expectChar$1(40); + _this.whitespace$1$consumeNewlines(true); + if (_this.scanIdentifier$1("not")) { + _this.whitespace$1$consumeNewlines(true); + condition = _this._stylesheet0$_supportsConditionInParens$0(); + t1.expectChar$1(41); + return new A.SupportsNegation0(condition, _this.spanFrom$1(start)); + } else if (t1.peekChar$0() === 40) { + condition = _this._stylesheet0$_supportsCondition$1$inParentheses(true); + t1.expectChar$1(41); + return condition.withSpan$1(_this.spanFrom$1(start)); + } + $name = null; + nameStart = new A._SpanScannerState(t1, t1._string_scanner$_position); + wasInParentheses = _this._stylesheet0$_inParentheses; + try { + $name = _this._stylesheet0$_expression$1$consumeNewlines(true); + t1.expectChar$1(58); + } catch (exception) { + if (type$.FormatException._is(A.unwrapException(exception))) { + t1.set$state(nameStart); + _this._stylesheet0$_inParentheses = wasInParentheses; + identifier = _this.interpolatedIdentifier$0(); + _1_0 = _this._stylesheet0$_trySupportsOperation$2(identifier, nameStart); + operation = null; + if (_1_0 != null) { + operation = _1_0; + t1.expectChar$1(41); + t1 = operation; + t2 = _this.spanFrom$1(start); + return new A.SupportsOperation0(t1.left, t1.right, t1.operator, t2); + } + t2 = new A.InterpolationBuffer0(new A.StringBuffer(""), A._setArrayType([], type$.JSArray_Object), A._setArrayType([], type$.JSArray_nullable_FileSpan)); + t2.addInterpolation$1(identifier); + t2.addInterpolation$1(_this._stylesheet0$_interpolatedDeclarationValue$4$allowColon$allowEmpty$allowSemicolon$consumeNewlines(false, true, true, true)); + contents = t2.interpolation$1(_this.spanFrom$1(nameStart)); + if (t1.peekChar$0() === 58) + throw exception; + t1.expectChar$1(41); + return new A.SupportsAnything0(contents, _this.spanFrom$1(start)); + } else + throw exception; + } + value = _this._stylesheet0$_supportsDeclarationValue$1($name); + t1.expectChar$1(41); + return new A.SupportsDeclaration0($name, value, _this.spanFrom$1(start)); + }, + _stylesheet0$_supportsDeclarationValue$1($name) { + var t1 = false; + if ($name instanceof A.StringExpression0) + if (!$name.hasQuotes) + t1 = B.JSString_methods.startsWith$1($name.text.get$initialPlain(), "--"); + if (t1) + return new A.StringExpression0(this._stylesheet0$_interpolatedDeclarationValue$0(), false); + else { + this.whitespace$1$consumeNewlines(true); + return this._stylesheet0$_expression$1$consumeNewlines(true); + } + }, + _stylesheet0$_trySupportsOperation$2(interpolation, start) { + var expression, t2, t3, operator, operation, right, t4, _this = this, _null = null, + t1 = interpolation.contents; + if (t1.length !== 1) + return _null; + expression = B.JSArray_methods.get$first(t1); + if (!(expression instanceof A.Expression0)) + return _null; + t1 = _this.scanner; + t2 = t1._string_scanner$_position; + _this.whitespace$1$consumeNewlines(true); + for (t3 = interpolation.span, operator = _null, operation = operator; _this.lookingAtIdentifier$0();) { + if (operator != null) + _this.expectIdentifier$1(operator._name); + else if (_this.scanIdentifier$1("and")) + operator = B.BooleanOperator_00; + else { + if (!_this.scanIdentifier$1("or")) { + if ((t2 === 0 ? 1 / t2 < 0 : t2 < 0) || t2 > t1.string.length) + A.throwExpression(A.ArgumentError$("Invalid position " + t2, _null)); + t1._string_scanner$_position = t2; + return t1._lastMatch = null; + } + operator = B.BooleanOperator_10; + } + _this.whitespace$1$consumeNewlines(true); + right = _this._stylesheet0$_supportsConditionInParens$0(); + t4 = operation == null ? new A.SupportsInterpolation0(expression, t3) : operation; + operation = new A.SupportsOperation0(t4, right, operator, _this.spanFrom$1(start)); + _this.whitespace$1$consumeNewlines(true); + } + return operation; + }, + _stylesheet0$_lookingAtInterpolatedIdentifier$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + t2 = false; + if (_1_0 == null) { + t1 = t2; + break $label0$0; + } + if (_1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128 || 92 === _1_0) { + t1 = true; + break $label0$0; + } + if (35 === _1_0) { + t1 = t1.peekChar$1(1) === 123; + break $label0$0; + } + if (45 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (_0_0 == null) { + t1 = t2; + break $label1$1; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(2) === 123; + break $label1$1; + } + if (_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128 || 92 === _0_0 || 45 === _0_0) { + t1 = true; + break $label1$1; + } + t1 = t2; + break $label1$1; + } + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + _stylesheet0$_lookingAtPotentialPropertyHack$0() { + var t1 = this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (58 === _0_0 || 42 === _0_0 || 46 === _0_0) { + t1 = true; + break $label0$0; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(1) !== 123; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _stylesheet0$_lookingAtInterpolatedIdentifierBody$0() { + var t2, t3, + t1 = this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + t2 = false; + if (_0_0 == null) { + t1 = t2; + break $label0$0; + } + if (!(_0_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_0_0) || _0_0 >= 128)) + t3 = _0_0 >= 48 && _0_0 <= 57 || _0_0 === 45; + else + t3 = true; + if (t3 || 92 === _0_0) { + t1 = true; + break $label0$0; + } + if (35 === _0_0) { + t1 = t1.peekChar$1(1) === 123; + break $label0$0; + } + t1 = t2; + break $label0$0; + } + return t1; + }, + _stylesheet0$_lookingAtExpression$0() { + var t2, _0_0, + t1 = this.scanner, + _1_0 = t1.peekChar$0(); + $label0$0: { + t2 = true; + if (_1_0 == null) { + t1 = false; + break $label0$0; + } + if (46 === _1_0) { + t1 = t1.peekChar$1(1) !== 46; + break $label0$0; + } + if (33 === _1_0) { + _0_0 = t1.peekChar$1(1); + $label1$1: { + if (_0_0 != null) + if (105 !== _0_0) + if (73 !== _0_0) + t1 = _0_0 === 32 || _0_0 === 9 || _0_0 === 10 || _0_0 === 13 || _0_0 === 12; + else + t1 = t2; + else + t1 = t2; + else + t1 = t2; + break $label1$1; + } + break $label0$0; + } + t1 = true; + if (40 !== _1_0) + if (47 !== _1_0) + if (91 !== _1_0) + if (39 !== _1_0) + if (34 !== _1_0) + if (35 !== _1_0) + if (43 !== _1_0) + if (45 !== _1_0) + if (92 !== _1_0) + if (36 !== _1_0) + if (38 !== _1_0) + if (37 !== _1_0) + if (!(_1_0 === 95 || A.CharacterExtension_get_isAlphabetic0(_1_0) || _1_0 >= 128)) + t1 = _1_0 >= 48 && _1_0 <= 57; + if (t1) { + t1 = t2; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + _stylesheet0$_withChildren$1$3(child, start, create) { + var result = create.call$2(this.children$1(0, child), this.spanFrom$1(start)); + this.whitespaceWithoutComments$1$consumeNewlines(false); + return result; + }, + _stylesheet0$_withChildren$3(child, start, create) { + return this._stylesheet0$_withChildren$1$3(child, start, create, type$.dynamic); + }, + _stylesheet0$_urlString$0() { + var innerError, stackTrace, exception, _this = this, + t1 = _this.scanner, + start = new A._SpanScannerState(t1, t1._string_scanner$_position), + url = _this.string$0(); + try { + t1 = A.Uri_parse(url); + return t1; + } catch (exception) { + t1 = A.unwrapException(exception); + if (type$.FormatException._is(t1)) { + innerError = t1; + stackTrace = A.getTraceFromException(exception); + _this.error$3(0, "Invalid URL: " + J.get$message$x(innerError), _this.spanFrom$1(start), stackTrace); + } else + throw exception; + } + }, + _stylesheet0$_publicIdentifier$0() { + var _this = this, + t1 = _this.scanner, + t2 = t1._string_scanner$_position, + result = _this.identifier$0(); + _this._stylesheet0$_assertPublic$2(result, new A.StylesheetParser__publicIdentifier_closure0(_this, new A._SpanScannerState(t1, t2))); + return result; + }, + _stylesheet0$_assertPublic$2(identifier, span) { + var first = identifier.charCodeAt(0); + if (!(first === 45 || first === 95)) + return; + this.error$2(0, string$.Privat, span.call$0()); + }, + _stylesheet0$_addOrInject$2(buffer, expression) { + if (expression instanceof A.StringExpression0 && !expression.hasQuotes) + buffer.addInterpolation$1(expression.text); + else + buffer.add$2(0, expression, expression.get$span(expression)); + }, + get$plainCss() { + return false; + } + }; + A.StylesheetParser_parse_closure0.prototype = { + call$0() { + var statements, + t1 = this.$this, + t2 = t1.scanner, + t3 = t2._string_scanner$_position; + t2.scanChar$1(65279); + statements = t1.statements$1(new A.StylesheetParser_parse__closure0(t1)); + t2.expectDone$0(); + return A.Stylesheet$internal0(statements, t1.spanFrom$1(new A._SpanScannerState(t2, t3)), t1.warnings, t1._stylesheet0$_globalVariables, t1.get$plainCss()); + }, + $signature: 620 + }; + A.StylesheetParser_parse__closure0.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.scan$1("@charset")) { + t1.whitespace$1$consumeNewlines(false); + t1.string$0(); + return null; + } + return t1._stylesheet0$_statement$1$root(true); + }, + $signature: 621 + }; + A.StylesheetParser_parseParameterList_closure0.prototype = { + call$0() { + var parameters, + t1 = this.$this, + t2 = t1.scanner; + t2.expectChar$2$name(64, "@-rule"); + t1.identifier$0(); + t1.whitespace$1$consumeNewlines(true); + t1.identifier$0(); + parameters = t1._stylesheet0$_parameterList$0(); + t1.whitespace$1$consumeNewlines(true); + t2.expectChar$1(123); + return parameters; + }, + $signature: 622 + }; + A.StylesheetParser__parseSingleProduction_closure0.prototype = { + call$0() { + var result = this.production.call$0(); + this.$this.scanner.expectDone$0(); + return result; + }, + $signature() { + return this.T._eval$1("0()"); + } + }; + A.StylesheetParser_parseSignature_closure.prototype = { + call$0() { + var parameters, t2, t3, + t1 = this.$this, + $name = t1.identifier$0(); + if (this.requireParens || t1.scanner.peekChar$0() === 40) + parameters = t1._stylesheet0$_parameterList$0(); + else { + t2 = t1.scanner; + t2 = A.FileLocation$_(t2._sourceFile, t2._string_scanner$_position); + t3 = t2.offset; + parameters = new A.ParameterList0(B.List_empty27, null, A._FileSpan$(t2.file, t3, t3)); + } + t1.scanner.expectDone$0(); + return new A._Record_2($name, parameters); + }, + $signature: 623 + }; + A.StylesheetParser__statement_closure0.prototype = { + call$0() { + return this.$this._stylesheet0$_statement$0(); + }, + $signature: 137 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure1.prototype = { + call$0() { + return this.$this.spanFrom$1(this.start); + }, + $signature: 16 + }; + A.StylesheetParser_variableDeclarationWithoutNamespace_closure2.prototype = { + call$0() { + return this.declaration.span; + }, + $signature: 16 + }; + A.StylesheetParser__declarationOrBuffer_closure3.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser__declarationOrBuffer_closure4.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser__declarationOrBuffer_closure5.prototype = { + call$1($name) { + return A.equalsIgnoreCase0($name, "result"); + }, + $signature: 4 + }; + A.StylesheetParser__declarationOrBuffer_closure6.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser__styleRule_closure0.prototype = { + call$2(children, span) { + return A.StyleRule$withParsedSelector(this.selector, children, this.$this.spanFrom$1(this.start)); + }, + $signature: 269 + }; + A.StylesheetParser__styleRule_closure1.prototype = { + call$2(children, span) { + return A.StyleRule$0(this._box_0.interpolation, children, this.$this.spanFrom$1(this.start)); + }, + $signature: 269 + }; + A.StylesheetParser__withStyleRuleChildren_closure0.prototype = { + call$2(children, span) { + var t2, _this = this, + t1 = _this.$this; + if (t1.get$indented() && children.length === 0) { + t2 = _this.nodeWithSpan; + t1.warnings.push(new A._Record_3_deprecation_message_span(null, string$.This_s, t2.get$span(t2))); + } + t1._stylesheet0$_inStyleRule = _this.wasInStyleRule; + return _this.create.call$2(children, span); + }, + $signature() { + return this.T._eval$1("0(List,FileSpan)"); + } + }; + A.StylesheetParser__propertyOrVariableDeclaration_closure0.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser__tryDeclarationChildren_closure0.prototype = { + call$2(children, span) { + return A.Declaration$nested0(this.name, children, span, this.value); + }, + $signature: 625 + }; + A.StylesheetParser__atRootRule_closure1.prototype = { + call$2(children, span) { + return A.AtRootRule$0(children, span, this.query); + }, + $signature: 270 + }; + A.StylesheetParser__atRootRule_closure2.prototype = { + call$2(children, span) { + return A.AtRootRule$0(children, span, null); + }, + $signature: 270 + }; + A.StylesheetParser__eachRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet0$_inControlDirective = _this.wasInControlDirective; + return A.EachRule$0(_this.variables, _this.list, children, span); + }, + $signature: 627 + }; + A.StylesheetParser__functionRule_closure0.prototype = { + call$2(children, span) { + return A.FunctionRule$0(this.name, this.parameters, children, span, this.precedingComment); + }, + $signature: 628 + }; + A.StylesheetParser__forRule_closure1.prototype = { + call$0() { + var t1 = this.$this; + if (!t1.lookingAtIdentifier$0()) + return false; + if (t1.scanIdentifier$1("to")) + return this._box_0.exclusive = true; + else if (t1.scanIdentifier$1("through")) { + this._box_0.exclusive = false; + return true; + } else + return false; + }, + $signature: 20 + }; + A.StylesheetParser__forRule_closure2.prototype = { + call$2(children, span) { + var t1, _this = this; + _this.$this._stylesheet0$_inControlDirective = _this.wasInControlDirective; + t1 = _this._box_0.exclusive; + t1.toString; + return A.ForRule$0(_this.variable, _this.from, _this.to, children, span, t1); + }, + $signature: 629 + }; + A.StylesheetParser__memberList_closure0.prototype = { + call$0() { + var t1 = this.$this; + if (t1.scanner.peekChar$0() === 36) + this.variables.add$1(0, t1.variableName$0()); + else + this.identifiers.add$1(0, t1.identifier$1$normalize(true)); + }, + $signature: 1 + }; + A.StylesheetParser__includeRule_closure0.prototype = { + call$2(children, span) { + return A.ContentBlock$0(this.contentParameters_, children, span); + }, + $signature: 630 + }; + A.StylesheetParser_mediaRule_closure0.prototype = { + call$2(children, span) { + return A.MediaRule$0(this.query, children, span); + }, + $signature: 631 + }; + A.StylesheetParser__mixinRule_closure0.prototype = { + call$2(children, span) { + var _this = this; + _this.$this._stylesheet0$_inMixin = false; + return A.MixinRule$0(_this.name, _this.parameters, children, span, _this.precedingComment); + }, + $signature: 632 + }; + A.StylesheetParser_mozDocumentRule_closure1.prototype = { + call$0() { + return this.$this.whitespace$1$consumeNewlines(false); + }, + $signature: 0 + }; + A.StylesheetParser_mozDocumentRule_closure2.prototype = { + call$2(children, span) { + var _this = this; + if (_this._box_0.needsDeprecationWarning) + _this.$this.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_Gmv, string$.x40_moz_, span)); + return A.AtRule$0(_this.name, span, children, _this.value); + }, + $signature: 271 + }; + A.StylesheetParser_supportsRule_closure0.prototype = { + call$2(children, span) { + return A.SupportsRule$0(this.condition, children, span); + }, + $signature: 634 + }; + A.StylesheetParser__whileRule_closure0.prototype = { + call$2(children, span) { + this.$this._stylesheet0$_inControlDirective = this.wasInControlDirective; + return A.WhileRule$0(this.condition, children, span); + }, + $signature: 635 + }; + A.StylesheetParser_unknownAtRule_closure0.prototype = { + call$2(children, span) { + return A.AtRule$0(this.name, span, children, this._box_0.value); + }, + $signature: 271 + }; + A.StylesheetParser__expression_resetState0.prototype = { + call$0() { + var t2, + t1 = this._box_0; + t1.operands_ = t1.operators_ = t1.spaceExpressions_ = t1.commaExpressions_ = null; + t2 = this.$this; + t2.scanner.set$state(this.start); + t1.allowSlash = true; + t1.singleExpression_ = t2._stylesheet0$_singleExpression$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOneOperation0.prototype = { + call$0() { + var t2, t3, t4, t5, t6, t7, _this = this, + t1 = _this._box_0, + operator = t1.operators_.pop(), + left = t1.operands_.pop(), + right = t1.singleExpression_; + if (right == null) { + t2 = _this.$this.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Expected expression.", t3, t2._string_scanner$_position - t3); + } + if (t1.allowSlash) { + t2 = _this.$this; + t2 = !t2._stylesheet0$_inParentheses && operator === B.BinaryOperator_ehp0 && t2._stylesheet0$_isSlashOperand$1(left) && t2._stylesheet0$_isSlashOperand$1(right); + } else + t2 = false; + if (t2) + t1.singleExpression_ = new A.BinaryOperationExpression0(B.BinaryOperator_ehp0, left, right, true); + else { + t1.singleExpression_ = new A.BinaryOperationExpression0(operator, left, right, false); + t2 = t1.allowSlash = false; + if (B.BinaryOperator_jCK0 === operator || B.BinaryOperator_tDf0 === operator) { + t3 = _this.$this; + t4 = t3.scanner.string; + t5 = right.get$span(right); + t5 = t5.get$start(t5); + t6 = right.get$span(right); + t7 = operator.operator; + if (B.JSString_methods.substring$2(t4, t5.offset - 1, t6.get$start(t6).offset) === t7) { + t2 = left.get$span(left); + t2 = t4.charCodeAt(t2.get$end(t2).offset); + t2 = t2 === 32 || t2 === 9 || t2 === 10 || t2 === 13 || t2 === 12; + } + if (t2) { + t2 = left.toString$0(0); + t4 = right.toString$0(0); + t5 = left.toString$0(0); + t6 = right.toString$0(0); + t1 = t1.singleExpression_; + t3.warnings.push(new A._Record_3_deprecation_message_span(B.Deprecation_Kh7, "This operation is parsed as:\n\n " + t2 + " " + t7 + " " + t4 + string$.x0a_but_ + t5 + " (" + t7 + t6 + ")\n\nAdd a space after " + t7 + string$.x20to_cl, t1.get$span(t1))); + } + } + } + }, + $signature: 0 + }; + A.StylesheetParser__expression_resolveOperations0.prototype = { + call$0() { + var t1, + operators = this._box_0.operators_; + if (operators == null) + return; + for (t1 = this.resolveOneOperation; operators.length !== 0;) + t1.call$0(); + }, + $signature: 0 + }; + A.StylesheetParser__expression_addSingleExpression0.prototype = { + call$1(expression) { + var t2, spaceExpressions, _this = this, + t1 = _this._box_0; + if (t1.singleExpression_ != null) { + t2 = _this.$this; + if (t2._stylesheet0$_inParentheses) { + t2._stylesheet0$_inParentheses = false; + if (t1.allowSlash) { + _this.resetState.call$0(); + return; + } + } + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + spaceExpressions = t1.spaceExpressions_ = A._setArrayType([], type$.JSArray_Expression_2); + _this.resolveOperations.call$0(); + t2 = t1.singleExpression_; + t2.toString; + spaceExpressions.push(t2); + t1.allowSlash = true; + } + t1.singleExpression_ = expression; + }, + $signature: 136 + }; + A.StylesheetParser__expression_addOperator0.prototype = { + call$1(operator) { + var t2, t3, operators, operands, t4, singleExpression, operatorEnd, _this = this, + t1 = _this.$this; + if (t1.get$plainCss() && operator !== B.BinaryOperator_g6F0 && operator !== B.BinaryOperator_jCK0 && operator !== B.BinaryOperator_tDf0 && operator !== B.BinaryOperator_wkM0 && operator !== B.BinaryOperator_ehp0) { + t2 = t1.scanner; + t3 = operator.operator.length; + t2.error$3$length$position(0, "Operators aren't allowed in plain CSS.", t3, t2._string_scanner$_position - t3); + } + t2 = _this._box_0; + t2.allowSlash = t2.allowSlash && operator === B.BinaryOperator_ehp0; + operators = t2.operators_; + if (operators == null) + operators = t2.operators_ = A._setArrayType([], type$.JSArray_BinaryOperator_2); + operands = t2.operands_; + if (operands == null) + operands = t2.operands_ = A._setArrayType([], type$.JSArray_Expression_2); + t3 = _this.resolveOneOperation; + t4 = operator.precedence; + for (;;) { + if (!(operators.length !== 0 && B.JSArray_methods.get$last(operators).precedence >= t4)) + break; + t3.call$0(); + } + singleExpression = t2.singleExpression_; + if (singleExpression == null) { + t3 = t1.scanner; + t4 = operator.operator.length; + t3.error$3$length$position(0, "Expected expression.", t4, t3._string_scanner$_position - t4); + } + operatorEnd = t1.scanner._string_scanner$_position; + t1.whitespace$1$consumeNewlines(true); + if (operator === B.BinaryOperator_bgA0 && !t1._stylesheet0$_lookingAtExpression$0()) { + t1 = t1.spanFromPosition$2(operatorEnd - 1, operatorEnd); + _this.addSingleExpression.call$1(new A.StringExpression0(new A.Interpolation0(A.List_List$unmodifiable(["%"], type$.Object), B.List_null, t1), false)); + } else { + operators.push(operator); + operands.push(singleExpression); + t2.singleExpression_ = t1._stylesheet0$_singleExpression$0(); + } + }, + $signature: 636 + }; + A.StylesheetParser__expression_resolveSpaceExpressions0.prototype = { + call$0() { + var t1, spaceExpressions, singleExpression, t2; + this.resolveOperations.call$0(); + t1 = this._box_0; + spaceExpressions = t1.spaceExpressions_; + if (spaceExpressions == null) + return; + singleExpression = t1.singleExpression_; + if (singleExpression == null) + this.$this.scanner.error$1(0, "Expected expression."); + spaceExpressions.push(singleExpression); + t2 = B.JSArray_methods.get$first(spaceExpressions); + t2 = t2.get$span(t2).expand$1(0, singleExpression.get$span(singleExpression)); + t1.singleExpression_ = new A.ListExpression0(A.List_List$unmodifiable(spaceExpressions, type$.Expression_2), B.ListSeparator_SrV0, false, t2); + t1.spaceExpressions_ = null; + }, + $signature: 0 + }; + A.StylesheetParser_expressionUntilComma_closure0.prototype = { + call$0() { + return this.$this.scanner.peekChar$0() === 44; + }, + $signature: 20 + }; + A.StylesheetParser__isHexColor_closure0.prototype = { + call$1(char) { + return A.CharacterExtension_get_isHex0(char); + }, + $signature: 50 + }; + A.StylesheetParser__unicodeRange_closure1.prototype = { + call$1(char) { + return char != null && A.CharacterExtension_get_isHex0(char); + }, + $signature: 31 + }; + A.StylesheetParser__unicodeRange_closure2.prototype = { + call$1(char) { + return char != null && A.CharacterExtension_get_isHex0(char); + }, + $signature: 31 + }; + A.StylesheetParser_interpolatedStringToken_closure0.prototype = { + call$0() { + return A.consumeEscapedCharacter0(this.$this.scanner); + }, + $signature: 0 + }; + A.StylesheetParser_namespacedExpression_closure0.prototype = { + call$0() { + return this.$this.spanFrom$1(this.start); + }, + $signature: 16 + }; + A.StylesheetParser_trySpecialFunction_closure0.prototype = { + call$1(contents) { + return new A.StringExpression0(contents, false); + }, + $signature: 637 + }; + A.StylesheetParser__interpolatedDeclarationValue_closure0.prototype = { + call$0() { + return this.$this.scanIdentifier$2$caseSensitive("of", false); + }, + $signature: 0 + }; + A.StylesheetParser__expressionUntilComparison_closure0.prototype = { + call$0() { + var t1 = this.$this.scanner, + _0_0 = t1.peekChar$0(); + $label0$0: { + if (61 === _0_0) { + t1 = t1.peekChar$1(1) !== 61; + break $label0$0; + } + if (60 === _0_0 || 62 === _0_0) { + t1 = true; + break $label0$0; + } + t1 = false; + break $label0$0; + } + return t1; + }, + $signature: 20 + }; + A.StylesheetParser__publicIdentifier_closure0.prototype = { + call$0() { + return this.$this.spanFrom$1(this.start); + }, + $signature: 16 + }; + A.Stylesheet0.prototype = { + Stylesheet$internal$5$globalVariables$plainCss0(children, span, parseTimeWarnings, globalVariables, plainCss) { + var t1, t2, t3, t4, _i, child; + for (t1 = this.children, t2 = t1.length, t3 = this._stylesheet1$_forwards, t4 = this._stylesheet1$_uses, _i = 0; _i < t2; ++_i) { + child = t1[_i]; + if (child instanceof A.UseRule0) { + t4.push(child); + continue; + } + if (child instanceof A.ForwardRule0) { + t3.push(child); + continue; + } + if (child instanceof A.SilentComment0 || child instanceof A.LoudComment0 || child instanceof A.VariableDeclaration0) + continue; + break; + } + }, + accept$1$1(visitor) { + return visitor.visitStylesheet$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return B.JSArray_methods.join$1(this.children, " "); + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsExpression0.prototype = { + get$span(_) { + var t1 = this.condition; + return t1.get$span(t1); + }, + accept$1$1(visitor) { + return visitor.visitSupportsExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.condition.toString$0(0); + } + }; + A.ModifiableCssSupportsRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitCssSupportsRule$1(this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + equalsIgnoringChildren$1(other) { + var t1, t2; + if (other instanceof A.ModifiableCssSupportsRule0) { + t1 = this.condition; + t2 = other.condition; + t1 = t1.$ti._is(t2) && J.$eq$(t2.value, t1.value); + } else + t1 = false; + return t1; + }, + copyWithoutChildren$0() { + return A.ModifiableCssSupportsRule$0(this.condition, this.span); + }, + get$span(receiver) { + return this.span; + } + }; + A.SupportsRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitSupportsRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@supports " + this.condition.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.JSToDartImporter.prototype = { + canonicalize$1(_, url) { + var t1, + result = A.wrapJSExceptions(new A.JSToDartImporter_canonicalize_closure(this, url)); + if (result == null) + return null; + t1 = self.URL; + if (result instanceof t1) + return A.Uri_parse(J.toString$0$(type$.JSUrl._as(result))); + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The canonicalize() function can't return a Promise for synchronous compile functions.")); + else + A.jsThrow(new self.Error(string$.The_ca)); + }, + load$1(_, url) { + var t1, contents, syntax, t2, + result = A.wrapJSExceptions(new A.JSToDartImporter_load_closure(this, url)); + if (result == null) + return null; + t1 = self.Promise; + if (result instanceof t1) + A.jsThrow(new self.Error("The load() function can't return a Promise for synchronous compile functions.")); + type$.JSImporterResult._as(result); + t1 = J.getInterceptor$x(result); + contents = t1.get$contents(result); + if (A._asString(new self.Function("value", "return typeof value").call$1(contents)) !== "string") + A.jsThrow(new A.ArgumentError(true, contents, "contents", "must be a string but was: " + A.jsType(contents))); + syntax = t1.get$syntax(result); + if (contents == null || syntax == null) + A.jsThrow(new self.Error(string$.The_lo)); + t2 = A.parseSyntax(syntax); + return A.ImporterResult$(contents, A.NullableExtension_andThen0(t1.get$sourceMapUrl(result), A.utils3__jsToDartUrl$closure()), t2); + }, + isNonCanonicalScheme$1(scheme) { + return this._sync$_nonCanonicalSchemes.contains$1(0, scheme); + } + }; + A.JSToDartImporter_canonicalize_closure.prototype = { + call$0() { + return this.$this._sync$_canonicalize.call$2(this.url.toString$0(0), A.canonicalizeContext0()); + }, + $signature: 36 + }; + A.JSToDartImporter_load_closure.prototype = { + call$0() { + return this.$this._sync$_load.call$1(new self.URL(this.url.toString$0(0))); + }, + $signature: 36 + }; + A.Syntax0.prototype = { + _enumToString$0() { + return "Syntax." + this._name; + }, + toString$0(_) { + return this._syntax0$_name; + } + }; + A.InterpolatedTypeSelector.prototype = { + get$span(_) { + return this.name.span; + }, + accept$1$1(visitor) { + return J.visitTypeSelector$1$x(visitor._simple_selector$_inner, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.name.toString$0(0); + } + }; + A.TypeSelector0.prototype = { + get$specificity() { + return 1; + }, + accept$1$1(visitor) { + return visitor.visitTypeSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + addSuffix$1(suffix) { + var t1 = this.name; + return new A.TypeSelector0(new A.QualifiedName0(t1.name + suffix, t1.namespace), this.span); + }, + unify$1(compound) { + var unified, t1, + _0_0 = A.IterableExtensions_get_firstOrNull(compound); + if (_0_0 instanceof A.UniversalSelector0 || _0_0 instanceof A.TypeSelector0) { + unified = A.unifyUniversalAndElement0(this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, A.SubListIterable$(compound, 1, null, A._arrayInstanceType(compound)._precomputed1)); + return t1; + } else { + t1 = A._setArrayType([this], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, compound); + return t1; + } + }, + isSuperselector$1(other) { + var t1, t2, t3; + if (!this.super$SimpleSelector$isSuperselector0(other)) { + t1 = false; + if (other instanceof A.TypeSelector0) { + t2 = this.name; + t3 = other.name; + if (t2.name === t3.name) { + t1 = t2.namespace; + t1 = t1 === "*" || t1 == t3.namespace; + } + } + } else + t1 = true; + return t1; + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.TypeSelector0 && other.name.$eq(0, this.name); + }, + get$hashCode(_) { + var t1 = this.name; + return B.JSString_methods.get$hashCode(t1.name) ^ J.get$hashCode$(t1.namespace); + } + }; + A.Types.prototype = {}; + A.UnaryOperationExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitUnaryOperationExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var operand, + t1 = this.operator, + t2 = t1.operator; + t1 = t1 === B.UnaryOperator_not_not_3_not0 ? t2 + A.Primitives_stringFromCharCode(32) : t2; + operand = this.operand; + $label0$0: { + t2 = true; + if (!(operand instanceof A.BinaryOperationExpression0)) + if (!(operand instanceof A.UnaryOperationExpression0)) + t2 = operand instanceof A.ListExpression0 && !operand.hasBrackets && operand.contents.length >= 2; + break $label0$0; + } + if (t2) + t1 += "40"; + t1 += operand.toString$0(0); + if (t2) + t1 += "41"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.UnaryOperator0.prototype = { + _enumToString$0() { + return "UnaryOperator." + this._name; + }, + toString$0(_) { + return this.name; + } + }; + A.UnitlessSassNumber0.prototype = { + get$numeratorUnits(_) { + return B.List_empty; + }, + get$denominatorUnits(_) { + return B.List_empty; + }, + get$hasUnits() { + return false; + }, + get$hasComplexUnits() { + return false; + }, + withValue$1(value) { + return new A.UnitlessSassNumber0(value, null); + }, + withSlash$2(numerator, denominator) { + return new A.UnitlessSassNumber0(this._number1$_value, new A._Record_2(numerator, denominator)); + }, + hasUnit$1(unit) { + return false; + }, + hasCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber0; + }, + hasPossiblyCompatibleUnits$1(other) { + return other instanceof A.UnitlessSassNumber0; + }, + compatibleWithUnit$1(unit) { + return true; + }, + coerceToMatch$3(other, $name, otherName) { + return other.withValue$1(this._number1$_value); + }, + coerceToMatch$1(other) { + return this.coerceToMatch$3(other, null, null); + }, + coerceValueToMatch$3(other, $name, otherName) { + return this._number1$_value; + }, + coerceValueToMatch$1(other) { + return this.coerceValueToMatch$3(other, null, null); + }, + convertToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertToMatch(other, $name, otherName) : this; + }, + convertValueToMatch$3(other, $name, otherName) { + return other.get$hasUnits() ? this.super$SassNumber$convertValueToMatch0(other, $name, otherName) : this._number1$_value; + }, + convertValueToMatch$1(other) { + return this.convertValueToMatch$3(other, null, null); + }, + coerce$3(newNumerators, newDenominators, $name) { + return A.SassNumber_SassNumber$withUnits0(this._number1$_value, newDenominators, newNumerators); + }, + coerce$2(newNumerators, newDenominators) { + return this.coerce$3(newNumerators, newDenominators, null); + }, + coerceValue$3(newNumerators, newDenominators, $name) { + return this._number1$_value; + }, + coerceValueToUnit$2(unit, $name) { + return this._number1$_value; + }, + coerceValueToUnit$1(unit) { + return this.coerceValueToUnit$2(unit, null); + }, + greaterThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 > t2 && !A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$greaterThan0(other); + }, + greaterThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 > t2 || A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$greaterThanOrEquals0(other); + }, + lessThan$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 < t2 && !A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$lessThan0(other); + }, + lessThanOrEquals$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value; + t2 = other._number1$_value; + return t1 < t2 || A.fuzzyEquals0(t1, t2) ? B.SassBoolean_true0 : B.SassBoolean_false0; + } + return this.super$SassNumber$lessThanOrEquals0(other); + }, + modulo$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(A.moduloLikeSass0(this._number1$_value, other._number1$_value)); + return this.super$SassNumber$modulo0(other); + }, + plus$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value + other._number1$_value); + return this.super$SassNumber$plus0(other); + }, + minus$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value - other._number1$_value); + return this.super$SassNumber$minus0(other); + }, + times$1(other) { + if (other instanceof A.SassNumber0) + return other.withValue$1(this._number1$_value * other._number1$_value); + return this.super$SassNumber$times0(other); + }, + dividedBy$1(other) { + var t1, t2; + if (other instanceof A.SassNumber0) { + t1 = this._number1$_value / other._number1$_value; + if (other.get$hasUnits()) { + t2 = other.get$denominatorUnits(other); + t2 = A.SassNumber_SassNumber$withUnits0(t1, other.get$numeratorUnits(other), t2); + t1 = t2; + } else + t1 = new A.UnitlessSassNumber0(t1, null); + return t1; + } + return this.super$SassNumber$dividedBy0(other); + }, + unaryMinus$0() { + return new A.UnitlessSassNumber0(-this._number1$_value, null); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UnitlessSassNumber0 && A.fuzzyEquals0(this._number1$_value, other._number1$_value); + }, + get$hashCode(_) { + var t1 = this.hashCache; + return t1 == null ? this.hashCache = A.fuzzyHashCode0(this._number1$_value) : t1; + } + }; + A.InterpolatedUniversalSelector.prototype = { + accept$1$1(visitor) { + return J.visitUniversalSelector$1$x(visitor._simple_selector$_inner, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1, + _0_0 = this.namespace; + $label0$0: { + if (_0_0 != null) { + t1 = _0_0.toString$0(0) + "|*"; + break $label0$0; + } + t1 = "*"; + break $label0$0; + } + return t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.UniversalSelector0.prototype = { + get$specificity() { + return 0; + }, + accept$1$1(visitor) { + return visitor.visitUniversalSelector$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + unify$1(compound) { + var _0_4, t1, rest, unified, t2, _this = this, _null = null, + _0_1 = compound.length, + _0_4_isSet = _0_1 >= 1; + if (_0_4_isSet) { + _0_4 = compound[0]; + if (!(_0_4 instanceof A.UniversalSelector0)) + t1 = _0_4 instanceof A.TypeSelector0; + else + t1 = true; + rest = t1 ? B.JSArray_methods.sublist$1(compound, 1) : _null; + } else { + rest = _null; + _0_4 = rest; + t1 = false; + } + if (t1) { + unified = A.unifyUniversalAndElement0(_this, B.JSArray_methods.get$first(compound)); + if (unified == null) + return _null; + t1 = A._setArrayType([unified], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, rest); + return t1; + } + t1 = false; + if (_0_1 === 1) { + if (_0_4_isSet) + t2 = _0_4; + else { + _0_4 = compound[0]; + t2 = _0_4; + _0_4_isSet = true; + } + if (t2 instanceof A.PseudoSelector0) { + t2 = _0_4_isSet ? _0_4 : compound[0]; + type$.PseudoSelector_2._as(t2); + t1 = t2.isClass && t2.name === "host" || t2.get$isHostContext(); + } + } + if (t1) + return _null; + if (_0_1 <= 0) + return A._setArrayType([_this], type$.JSArray_SimpleSelector_2); + t1 = _this.namespace; + if (t1 == null || t1 === "*") + t1 = compound; + else { + t1 = A._setArrayType([_this], type$.JSArray_SimpleSelector_2); + B.JSArray_methods.addAll$1(t1, compound); + } + return t1; + }, + isSuperselector$1(other) { + var t1 = this.namespace; + if (t1 === "*") + return true; + if (other instanceof A.TypeSelector0) + return t1 == other.name.namespace; + if (other instanceof A.UniversalSelector0) + return t1 == other.namespace; + return t1 == null || this.super$SimpleSelector$isSuperselector0(other); + }, + $eq(_, other) { + if (other == null) + return false; + return other instanceof A.UniversalSelector0 && other.namespace == this.namespace; + }, + get$hashCode(_) { + return J.get$hashCode$(this.namespace); + } + }; + A.UnprefixedMapView0.prototype = { + get$keys(_) { + return new A._UnprefixedKeys0(this); + }, + $index(_, key) { + return typeof key == "string" ? this._unprefixed_map_view0$_map.$index(0, this._unprefixed_map_view0$_prefix + key) : null; + }, + containsKey$1(key) { + return typeof key == "string" && this._unprefixed_map_view0$_map.containsKey$1(this._unprefixed_map_view0$_prefix + key); + }, + remove$1(_, key) { + return typeof key == "string" ? this._unprefixed_map_view0$_map.remove$1(0, this._unprefixed_map_view0$_prefix + key) : null; + } + }; + A._UnprefixedKeys0.prototype = { + get$iterator(_) { + var t1 = this._unprefixed_map_view0$_view._unprefixed_map_view0$_map; + t1 = t1.get$keys(t1); + t1 = t1.where$1(t1, new A._UnprefixedKeys_iterator_closure1(this)).map$1$1(0, new A._UnprefixedKeys_iterator_closure2(this), type$.String); + return t1.get$iterator(t1); + }, + contains$1(_, key) { + return this._unprefixed_map_view0$_view.containsKey$1(key); + } + }; + A._UnprefixedKeys_iterator_closure1.prototype = { + call$1(key) { + return B.JSString_methods.startsWith$1(key, this.$this._unprefixed_map_view0$_view._unprefixed_map_view0$_prefix); + }, + $signature: 4 + }; + A._UnprefixedKeys_iterator_closure2.prototype = { + call$1(key) { + return B.JSString_methods.substring$1(key, this.$this._unprefixed_map_view0$_view._unprefixed_map_view0$_prefix.length); + }, + $signature: 6 + }; + A.JSUrl0.prototype = {}; + A.UseRule0.prototype = { + UseRule$4$configuration0(url, namespace, span, configuration) { + var t1, t2, _i, variable; + for (t1 = this.configuration, t2 = t1.length, _i = 0; _i < t2; ++_i) { + variable = t1[_i]; + if (variable.isGuarded) + throw A.wrapException(A.ArgumentError$value(variable, "configured variable", "can't be guarded in a @use rule.")); + } + }, + accept$1$1(visitor) { + return visitor.visitUseRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.url, + t2 = "@use " + A.StringExpression_quoteText0(t1.toString$0(0)), + basename = t1.get$pathSegments().length === 0 ? "" : B.JSArray_methods.get$last(t1.get$pathSegments()), + dot = B.JSString_methods.indexOf$1(basename, "."); + t1 = this.namespace; + if (t1 !== B.JSString_methods.substring$2(basename, 0, dot === -1 ? basename.length : dot)) + t1 = t2 + (" as " + (t1 == null ? "*" : t1)); + else + t1 = t2; + t2 = this.configuration; + t1 = (t2.length !== 0 ? t1 + (" with (" + B.JSArray_methods.join$1(t2, ", ") + ")") : t1) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.UserDefinedCallable0.prototype = { + get$name(_) { + return this.declaration.name; + }, + $isAsyncCallable0: 1, + $isCallable: 1 + }; + A.resolveImportPath_closure1.prototype = { + call$0() { + return A._exactlyOne0(A._tryPath0($.$get$context().withoutExtension$1(this.path) + ".import" + this.extension)); + }, + $signature: 47 + }; + A.resolveImportPath_closure2.prototype = { + call$0() { + return A._exactlyOne0(A._tryPathWithExtensions0(this.path + ".import")); + }, + $signature: 47 + }; + A._tryPathAsDirectory_closure0.prototype = { + call$0() { + return A._exactlyOne0(A._tryPathWithExtensions0(A.join(this.path, "index.import", null))); + }, + $signature: 47 + }; + A._exactlyOne_closure0.prototype = { + call$1(path) { + var t1 = $.$get$context(); + return " " + t1.prettyUri$1(t1.toUri$1(path)); + }, + $signature: 6 + }; + A._PropertyDescriptor0.prototype = {}; + A.futureToPromise_closure0.prototype = { + call$2(resolve, reject) { + this.future.then$1$2$onError(0, new A.futureToPromise__closure0(resolve), new A.futureToPromise__closure1(reject), type$.void); + }, + $signature: 638 + }; + A.futureToPromise__closure0.prototype = { + call$1(result) { + return this.resolve.call$1(result); + }, + $signature: 37 + }; + A.futureToPromise__closure1.prototype = { + call$2(error, stackTrace) { + A.attachTrace0(error, stackTrace); + this.reject.call$1(error); + }, + $signature: 51 + }; + A.objectToMap_closure.prototype = { + call$2(key, value) { + this.map.$indexSet(0, key, value); + return value; + }, + $signature: 126 + }; + A._RequireMain0.prototype = {}; + A.indent_closure0.prototype = { + call$1(line) { + return B.JSString_methods.$mul(" ", this.indentation) + line; + }, + $signature: 6 + }; + A.flattenVertically_closure1.prototype = { + call$1(inner) { + return A.QueueList_QueueList$from(inner, this.T); + }, + $signature() { + return this.T._eval$1("QueueList<0>(Iterable<0>)"); + } + }; + A.flattenVertically_closure2.prototype = { + call$1(queue) { + this.result.push(queue.removeFirst$0()); + return queue.get$length(0) === 0; + }, + $signature() { + return this.T._eval$1("bool(QueueList<0>)"); + } + }; + A.longestCommonSubsequence_backtrack0.prototype = { + call$2(i, j) { + var selection, t1, _this = this; + if (i === -1 || j === -1) + return A._setArrayType([], _this.T._eval$1("JSArray<0>")); + selection = _this.selections[i][j]; + if (selection != null) { + t1 = _this.call$2(i - 1, j - 1); + J.add$1$ax(t1, selection); + return t1; + } + t1 = _this.lengths; + return t1[i + 1][j] > t1[i][j + 1] ? _this.call$2(i, j - 1) : _this.call$2(i - 1, j); + }, + $signature() { + return this.T._eval$1("List<0>(int,int)"); + } + }; + A.mapAddAll2_closure0.prototype = { + call$2(key, inner) { + var t1 = this.destination, + _0_0 = t1.$index(0, key); + if (_0_0 != null) + _0_0.addAll$1(0, inner); + else + t1.$indexSet(0, key, inner); + }, + $signature() { + return this.K1._eval$1("@<0>")._bind$1(this.K2)._bind$1(this.V)._eval$1("~(1,Map<2,3>)"); + } + }; + A.CssValue0.prototype = { + $eq(_, other) { + if (other == null) + return false; + return this.$ti._is(other) && J.$eq$(other.value, this.value); + }, + get$hashCode(_) { + return J.get$hashCode$(this.value); + }, + toString$0(_) { + return J.toString$0$(this.value); + }, + $isAstNode0: 1, + get$span(receiver) { + return this.span; + } + }; + A.ValueExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitValueExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.value.toString$0(0); + }, + get$span(receiver) { + return this.span; + } + }; + A.valueClass_closure.prototype = { + call$0() { + var t2, + t1 = type$.JSClass, + jsClass = t1._as(self.Object.getPrototypeOf(J.get$$prototype$x(t1._as(B.C__SassNull0.constructor))).constructor); + A.JSClassExtension_setCustomInspect(jsClass, new A.valueClass__closure()); + t1 = type$.String; + t2 = type$.Function; + A.LinkedHashMap_LinkedHashMap$_literal(["asList", new A.valueClass__closure0(), "hasBrackets", new A.valueClass__closure1(), "isTruthy", new A.valueClass__closure2(), "realNull", new A.valueClass__closure3(), "separator", new A.valueClass__closure4()], t1, t2).forEach$1(0, A.JSClassExtension_get_defineGetter(jsClass)); + A.LinkedHashMap_LinkedHashMap$_literal(["sassIndexToListIndex", new A.valueClass__closure5(), "get", new A.valueClass__closure6(), "assertBoolean", new A.valueClass__closure7(), "assertCalculation", new A.valueClass__closure8(), "assertColor", new A.valueClass__closure9(), "assertFunction", new A.valueClass__closure10(), "assertMap", new A.valueClass__closure11(), "assertMixin", new A.valueClass__closure12(), "assertNumber", new A.valueClass__closure13(), "assertString", new A.valueClass__closure14(), "tryMap", new A.valueClass__closure15(), "equals", new A.valueClass__closure16(), "hashCode", new A.valueClass__closure17(), "toString", new A.valueClass__closure18()], t1, t2).forEach$1(0, A.JSClassExtension_get_defineMethod(jsClass)); + return jsClass; + }, + $signature: 17 + }; + A.valueClass__closure.prototype = { + call$1($self) { + return J.toString$0$($self); + }, + $signature: 132 + }; + A.valueClass__closure0.prototype = { + call$1($self) { + return new self.immutable.List($self.get$asList()); + }, + $signature: 639 + }; + A.valueClass__closure1.prototype = { + call$1($self) { + return $self.get$hasBrackets(); + }, + $signature: 56 + }; + A.valueClass__closure2.prototype = { + call$1($self) { + return $self.get$isTruthy(); + }, + $signature: 56 + }; + A.valueClass__closure3.prototype = { + call$1($self) { + return $self.get$realNull(); + }, + $signature: 242 + }; + A.valueClass__closure4.prototype = { + call$1($self) { + return $self.get$separator($self).separator; + }, + $signature: 640 + }; + A.valueClass__closure5.prototype = { + call$3($self, sassIndex, $name) { + return $self.sassIndexToListIndex$2(sassIndex, $name); + }, + call$2($self, sassIndex) { + return this.call$3($self, sassIndex, null); + }, + "call*": "call$3", + $requiredArgCount: 2, + $defaultValues() { + return [null]; + }, + $signature: 641 + }; + A.valueClass__closure6.prototype = { + call$2($self, index) { + return index < 1 && index >= -1 ? $self : self.undefined; + }, + $signature: 250 + }; + A.valueClass__closure7.prototype = { + call$2($self, $name) { + return $self.assertBoolean$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 642 + }; + A.valueClass__closure8.prototype = { + call$2($self, $name) { + return $self.assertCalculation$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 643 + }; + A.valueClass__closure9.prototype = { + call$2($self, $name) { + return $self.assertColor$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 644 + }; + A.valueClass__closure10.prototype = { + call$2($self, $name) { + return $self.assertFunction$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 645 + }; + A.valueClass__closure11.prototype = { + call$2($self, $name) { + return $self.assertMap$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 646 + }; + A.valueClass__closure12.prototype = { + call$2($self, $name) { + return $self.assertMixin$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 647 + }; + A.valueClass__closure13.prototype = { + call$2($self, $name) { + return $self.assertNumber$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 648 + }; + A.valueClass__closure14.prototype = { + call$2($self, $name) { + return $self.assertString$1($name); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 649 + }; + A.valueClass__closure15.prototype = { + call$1($self) { + return $self.tryMap$0(); + }, + $signature: 650 + }; + A.valueClass__closure16.prototype = { + call$2($self, other) { + return $self.$eq(0, other); + }, + $signature: 651 + }; + A.valueClass__closure17.prototype = { + call$2($self, _) { + return $self.get$hashCode($self); + }, + call$1($self) { + return this.call$2($self, null); + }, + "call*": "call$2", + $requiredArgCount: 1, + $defaultValues() { + return [null]; + }, + $signature: 652 + }; + A.valueClass__closure18.prototype = { + call$1($self) { + return $self.toString$0(0); + }, + $signature: 228 + }; + A.Value0.prototype = { + get$isTruthy() { + return true; + }, + get$separator(_) { + return B.ListSeparator_undecided_null_3_undecided0; + }, + get$hasBrackets() { + return false; + }, + get$asList() { + return A._setArrayType([this], type$.JSArray_Value_2); + }, + get$lengthAsList() { + return 1; + }, + get$isBlank() { + return false; + }, + get$isSpecialNumber() { + return false; + }, + get$isSpecialVariable() { + return false; + }, + get$realNull() { + return this; + }, + sassIndexToListIndex$2(sassIndex, $name) { + var t1, index, + indexValue = sassIndex.assertNumber$1($name); + if (indexValue.get$hasUnits()) { + t1 = indexValue.get$unitString(); + A.warnForDeprecation0("$" + A.S($name) + ": Passing a number with unit " + t1 + string$.x20is_de + indexValue.unitSuggestion$1($name == null ? "index" : $name) + string$.x0a_Morex3af, B.Deprecation_PHd); + } + index = indexValue.assertInt$1($name); + if (index === 0) + throw A.wrapException(A.SassScriptException$0("List index may not be 0.", $name)); + if (Math.abs(index) > this.get$lengthAsList()) + throw A.wrapException(A.SassScriptException$0("Invalid index " + sassIndex.toString$0(0) + " for a list with " + this.get$lengthAsList() + " elements.", $name)); + return index < 0 ? this.get$lengthAsList() + index : index - 1; + }, + assertBoolean$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a boolean.", $name)); + }, + assertCalculation$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a calculation.", $name)); + }, + assertColor$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a color.", $name)); + }, + assertFunction$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a function reference.", $name)); + }, + assertMixin$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a mixin reference.", $name)); + }, + assertMap$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a map.", $name)); + }, + tryMap$0() { + return null; + }, + assertNumber$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a number.", $name)); + }, + assertNumber$0() { + return this.assertNumber$1(null); + }, + assertString$1($name) { + return A.throwExpression(A.SassScriptException$0(this.toString$0(0) + " is not a string.", $name)); + }, + assertCommonListStyle$2$allowSlash($name, allowSlash) { + var invalidSeparator, buffer, t1, _this = this, + _s8_ = "Expected", + _s23_ = "Expected an unbracketed"; + if (_this.get$separator(_this) !== B.ListSeparator_z0K0) + invalidSeparator = !allowSlash && _this.get$separator(_this) === B.ListSeparator_Lul0; + else + invalidSeparator = true; + if (!invalidSeparator && !_this.get$hasBrackets()) + return _this.get$asList(); + buffer = new A.StringBuffer(_s8_); + if (_this.get$hasBrackets()) { + buffer._contents = _s23_; + t1 = _s23_; + } else + t1 = _s8_; + if (invalidSeparator) { + t1 += _this.get$hasBrackets() ? "," : " a"; + buffer._contents = t1; + t1 = buffer._contents = t1 + " space-"; + t1 = buffer._contents = (allowSlash ? buffer._contents = t1 + " or slash-" : t1) + "separated"; + } + buffer._contents = t1 + (" list, was " + _this.toString$0(0)); + throw A.wrapException(A.SassScriptException$0(buffer.toString$0(0), $name)); + }, + _value$_selectorString$1($name) { + var _0_0 = this._value$_selectorStringOrNull$0(); + if (_0_0 != null) + return _0_0; + throw A.wrapException(A.SassScriptException$0(this.toString$0(0) + string$.x20is_noav, $name)); + }, + _value$_selectorStringOrNull$0() { + var t1, t2, result, _1_0, _i, complex, string, compound, _this = this, _null = null; + if (_this instanceof A.SassString0) + return _this._string0$_text; + if (!(_this instanceof A.SassList0)) + return _null; + t1 = _this._list1$_contents; + t2 = t1.length; + if (t2 === 0) + return _null; + result = A._setArrayType([], type$.JSArray_String); + $label0$1: { + _1_0 = _this._list1$_separator; + if (B.ListSeparator_z0K0 === _1_0) { + for (_i = 0; _i < t2; ++_i) { + complex = t1[_i]; + if (complex instanceof A.SassString0) { + result.push(complex._string0$_text); + continue; + } + if (complex instanceof A.SassList0 && B.ListSeparator_SrV0 === complex._list1$_separator) { + string = complex._value$_selectorStringOrNull$0(); + if (string == null) + return _null; + result.push(string); + continue; + } + return _null; + } + break $label0$1; + } + if (B.ListSeparator_Lul0 === _1_0) + return _null; + for (_i = 0; _i < t2; ++_i) { + compound = t1[_i]; + if (!(compound instanceof A.SassString0)) + return _null; + result.push(compound._string0$_text); + } + } + return B.JSArray_methods.join$1(result, _1_0 === B.ListSeparator_z0K0 ? ", " : " "); + }, + withListContents$2$separator(contents, separator) { + var t1 = separator == null ? this.get$separator(this) : separator, + t2 = this.get$hasBrackets(); + return A.SassList$0(contents, t1, t2); + }, + withListContents$1(contents) { + return this.withListContents$2$separator(contents, null); + }, + greaterThan$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " > " + other.toString$0(0) + '".', null)); + }, + greaterThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " >= " + other.toString$0(0) + '".', null)); + }, + lessThan$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " < " + other.toString$0(0) + '".', null)); + }, + lessThanOrEquals$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " <= " + other.toString$0(0) + '".', null)); + }, + times$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " * " + other.toString$0(0) + '".', null)); + }, + modulo$1(other) { + return A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " % " + other.toString$0(0) + '".', null)); + }, + plus$1(other) { + var t1; + $label0$0: { + if (other instanceof A.SassString0) { + t1 = new A.SassString0(A.serializeValue0(this, false, true) + other._string0$_text, other._string0$_hasQuotes); + break $label0$0; + } + if (other instanceof A.SassCalculation0) + A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " + " + other.toString$0(0) + '".', null)); + t1 = new A.SassString0(A.serializeValue0(this, false, true) + A.serializeValue0(other, false, true), false); + break $label0$0; + } + return t1; + }, + minus$1(other) { + return other instanceof A.SassCalculation0 ? A.throwExpression(A.SassScriptException$0('Undefined operation "' + this.toString$0(0) + " - " + other.toString$0(0) + '".', null)) : new A.SassString0(A.serializeValue0(this, false, true) + "-" + A.serializeValue0(other, false, true), false); + }, + dividedBy$1(other) { + return new A.SassString0(A.serializeValue0(this, false, true) + "/" + A.serializeValue0(other, false, true), false); + }, + unaryPlus$0() { + return new A.SassString0("+" + A.serializeValue0(this, false, true), false); + }, + unaryMinus$0() { + return new A.SassString0("-" + A.serializeValue0(this, false, true), false); + }, + unaryNot$0() { + return B.SassBoolean_false0; + }, + withoutSlash$0() { + return this; + }, + toCssString$1$quote(quote) { + return A.serializeValue0(this, false, quote); + }, + toCssString$0() { + return this.toCssString$1$quote(true); + }, + toString$0(_) { + return A.serializeValue0(this, true, true); + } + }; + A.VariableExpression0.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableExpression$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return this.span.get$text(); + }, + get$span(receiver) { + return this.span; + } + }; + A.VariableDeclaration0.prototype = { + accept$1$1(visitor) { + return visitor.visitVariableDeclaration$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + var t1 = this.namespace; + t1 = t1 != null ? t1 + "." : ""; + t1 += "$" + this.name + ": " + this.expression.toString$0(0) + ";"; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + get$span(receiver) { + return this.span; + } + }; + A.WarnRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitWarnRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@warn " + this.expression.toString$0(0) + ";"; + }, + get$span(receiver) { + return this.span; + } + }; + A.WhileRule0.prototype = { + accept$1$1(visitor) { + return visitor.visitWhileRule$1(0, this); + }, + accept$1(visitor) { + return this.accept$1$1(visitor, type$.dynamic); + }, + toString$0(_) { + return "@while " + this.condition.toString$0(0) + " {" + B.JSArray_methods.join$1(this.children, " ") + "}"; + }, + get$span(receiver) { + return this.span; + } + }; + A.XyzD50ColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness) { + var f0, f1, f2, lightness, a, b, t1, _this = this, _null = null; + if (B.LabColorSpace_2nT0 === dest || B.LchColorSpace_Bpv0 === dest) { + f0 = _this._xyz_d50$_convertComponentToLabF$1((x == null ? 0 : x) / 0.9642956764295677); + f1 = _this._xyz_d50$_convertComponentToLabF$1((y == null ? 0 : y) / 1); + f2 = _this._xyz_d50$_convertComponentToLabF$1((z == null ? 0 : z) / 0.8251046025104602); + lightness = missingLightness ? _null : 116 * f1 - 16; + a = 500 * (f0 - f1); + b = 200 * (f1 - f2); + if (dest === B.LabColorSpace_2nT0) { + t1 = missingA ? _null : a; + t1 = A.SassColor$_forSpace0(B.LabColorSpace_2nT0, lightness, t1, missingB ? _null : b, alpha, _null); + } else + t1 = A.labToLch0(B.LchColorSpace_Bpv0, lightness, a, b, alpha, missingChroma, missingHue); + return t1; + } + return _this.super$ColorSpace$convertLinear0(dest, x, y, z, alpha, missingA, missingB, missingChroma, missingHue, missingLightness); + }, + convert$5(dest, x, y, z, alpha) { + return this.convert$10$missingA$missingB$missingChroma$missingHue$missingLightness(dest, x, y, z, alpha, false, false, false, false, false); + }, + _xyz_d50$_convertComponentToLabF$1(component) { + return component > 0.008856451679035631 ? Math.pow(component, 0.3333333333333333) + 0 : (903.2962962962963 * component + 16) / 116; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj0 === dest || B.SrgbColorSpace_thf0 === dest || B.RgbColorSpace_i0P0 === dest) { + t1 = $.$get$xyzD50ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$xyzD50ToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$xyzD50ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT0 === dest || B.DisplayP3LinearColorSpace_PrP0 === dest) { + t1 = $.$get$xyzD50ToLinearDisplayP30(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$xyzD50ToLinearRec20200(); + break $label0$0; + } + if (B.XyzD65ColorSpace_WiJ0 === dest) { + t1 = $.$get$xyzD50ToXyzD650(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$xyzD50ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + A.XyzD65ColorSpace0.prototype = { + get$isBoundedInternal() { + return false; + }, + toLinear$1(channel) { + return channel; + }, + fromLinear$1(channel) { + return channel; + }, + transformationMatrix$1(dest) { + var t1; + $label0$0: { + if (B.SrgbLinearColorSpace_kUj0 === dest || B.SrgbColorSpace_thf0 === dest || B.RgbColorSpace_i0P0 === dest) { + t1 = $.$get$xyzD65ToLinearSrgb0(); + break $label0$0; + } + if (B.A98RgbColorSpace_lf20 === dest) { + t1 = $.$get$xyzD65ToLinearA98Rgb0(); + break $label0$0; + } + if (B.ProphotoRgbColorSpace_BDz0 === dest) { + t1 = $.$get$xyzD65ToLinearProphotoRgb0(); + break $label0$0; + } + if (B.DisplayP3ColorSpace_MmT0 === dest || B.DisplayP3LinearColorSpace_PrP0 === dest) { + t1 = $.$get$xyzD65ToLinearDisplayP30(); + break $label0$0; + } + if (B.Rec2020ColorSpace_6oo0 === dest) { + t1 = $.$get$xyzD65ToLinearRec20200(); + break $label0$0; + } + if (B.XyzD50ColorSpace_2OB0 === dest) { + t1 = $.$get$xyzD65ToXyzD500(); + break $label0$0; + } + if (B.LmsColorSpace_Os30 === dest) { + t1 = $.$get$xyzD65ToLms0(); + break $label0$0; + } + t1 = this.super$ColorSpace$transformationMatrix0(dest); + break $label0$0; + } + return t1; + } + }; + (function aliases() { + var _ = J.LegacyJavaScriptObject.prototype; + _.super$LegacyJavaScriptObject$toString = _.toString$0; + _ = A.JsLinkedHashMap.prototype; + _.super$JsLinkedHashMap$internalContainsKey = _.internalContainsKey$1; + _.super$JsLinkedHashMap$internalGet = _.internalGet$1; + _.super$JsLinkedHashMap$internalSet = _.internalSet$2; + _.super$JsLinkedHashMap$internalRemove = _.internalRemove$1; + _ = A._BufferingStreamSubscription.prototype; + _.super$_BufferingStreamSubscription$_add = _._async$_add$1; + _.super$_BufferingStreamSubscription$_addError = _._addError$2; + _ = A.ListBase.prototype; + _.super$ListBase$setRange = _.setRange$4; + _ = A.Iterable.prototype; + _.super$Iterable$where = _.where$1; + _.super$Iterable$skipWhile = _.skipWhile$1; + _ = A.ModifiableCssParentNode.prototype; + _.super$ModifiableCssParentNode$addChild = _.addChild$1; + _ = A.SimpleSelector.prototype; + _.super$SimpleSelector$addSuffix = _.addSuffix$1; + _.super$SimpleSelector$unify = _.unify$1; + _.super$SimpleSelector$isSuperselector = _.isSuperselector$1; + _ = A.Parser.prototype; + _.super$Parser$silentComment = _.silentComment$0; + _ = A.StylesheetParser.prototype; + _.super$StylesheetParser$importArgument = _.importArgument$0; + _.super$StylesheetParser$namespacedExpression = _.namespacedExpression$2; + _ = A.Value.prototype; + _.super$Value$assertMap = _.assertMap$1; + _.super$Value$plus = _.plus$1; + _.super$Value$minus = _.minus$1; + _.super$Value$dividedBy = _.dividedBy$1; + _.super$Value$toString = _.toString$0; + _ = A.ColorSpace.prototype; + _.super$ColorSpace$convert = _.convert$5; + _.super$ColorSpace$convertLinear = _.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness; + _.super$ColorSpace$transformationMatrix = _.transformationMatrix$1; + _ = A.SassNumber.prototype; + _.super$SassNumber$convertValueToMatch = _.convertValueToMatch$3; + _.super$SassNumber$coerce = _.coerce$3; + _.super$SassNumber$coerceValue = _.coerceValue$3; + _.super$SassNumber$coerceValueToUnit = _.coerceValueToUnit$2; + _.super$SassNumber$coerceToMatch = _.coerceToMatch$3; + _.super$SassNumber$coerceValueToMatch = _.coerceValueToMatch$3; + _.super$SassNumber$greaterThan = _.greaterThan$1; + _.super$SassNumber$greaterThanOrEquals = _.greaterThanOrEquals$1; + _.super$SassNumber$lessThan = _.lessThan$1; + _.super$SassNumber$lessThanOrEquals = _.lessThanOrEquals$1; + _.super$SassNumber$modulo = _.modulo$1; + _.super$SassNumber$plus = _.plus$1; + _.super$SassNumber$minus = _.minus$1; + _.super$SassNumber$times = _.times$1; + _.super$SassNumber$dividedBy = _.dividedBy$1; + _ = A.AnySelectorVisitor.prototype; + _.super$AnySelectorVisitor$visitComplexSelector = _.visitComplexSelector$1; + _ = A.EveryCssVisitor.prototype; + _.super$EveryCssVisitor$visitCssStyleRule = _.visitCssStyleRule$1; + _ = A.ReplaceExpressionVisitor.prototype; + _.super$ReplaceExpressionVisitor$visitBinaryOperationExpression = _.visitBinaryOperationExpression$1; + _.super$ReplaceExpressionVisitor$visitUnaryOperationExpression = _.visitUnaryOperationExpression$1; + _ = A.SourceSpanMixin.prototype; + _.super$SourceSpanMixin$compareTo = _.compareTo$1; + _.super$SourceSpanMixin$$eq = _.$eq; + _ = A.StringScanner.prototype; + _.super$StringScanner$readChar = _.readChar$0; + _.super$StringScanner$scanChar = _.scanChar$1; + _.super$StringScanner$scan = _.scan$1; + _.super$StringScanner$matches = _.matches$1; + _ = A.AnySelectorVisitor0.prototype; + _.super$AnySelectorVisitor$visitComplexSelector0 = _.visitComplexSelector$1; + _ = A.EveryCssVisitor0.prototype; + _.super$EveryCssVisitor$visitCssStyleRule0 = _.visitCssStyleRule$1; + _ = A.ModifiableCssParentNode0.prototype; + _.super$ModifiableCssParentNode$addChild0 = _.addChild$1; + _ = A.SassNumber0.prototype; + _.super$SassNumber$convertToMatch = _.convertToMatch$3; + _.super$SassNumber$convertValueToMatch0 = _.convertValueToMatch$3; + _.super$SassNumber$coerce0 = _.coerce$3; + _.super$SassNumber$coerceValue0 = _.coerceValue$3; + _.super$SassNumber$coerceValueToUnit0 = _.coerceValueToUnit$2; + _.super$SassNumber$coerceToMatch0 = _.coerceToMatch$3; + _.super$SassNumber$coerceValueToMatch0 = _.coerceValueToMatch$3; + _.super$SassNumber$greaterThan0 = _.greaterThan$1; + _.super$SassNumber$greaterThanOrEquals0 = _.greaterThanOrEquals$1; + _.super$SassNumber$lessThan0 = _.lessThan$1; + _.super$SassNumber$lessThanOrEquals0 = _.lessThanOrEquals$1; + _.super$SassNumber$modulo0 = _.modulo$1; + _.super$SassNumber$plus0 = _.plus$1; + _.super$SassNumber$minus0 = _.minus$1; + _.super$SassNumber$times0 = _.times$1; + _.super$SassNumber$dividedBy0 = _.dividedBy$1; + _ = A.Parser1.prototype; + _.super$Parser$silentComment0 = _.silentComment$0; + _ = A.ReplaceExpressionVisitor0.prototype; + _.super$ReplaceExpressionVisitor$visitBinaryOperationExpression0 = _.visitBinaryOperationExpression$1; + _.super$ReplaceExpressionVisitor$visitUnaryOperationExpression0 = _.visitUnaryOperationExpression$1; + _ = A.SimpleSelector0.prototype; + _.super$SimpleSelector$addSuffix0 = _.addSuffix$1; + _.super$SimpleSelector$unify0 = _.unify$1; + _.super$SimpleSelector$isSuperselector0 = _.isSuperselector$1; + _ = A.ColorSpace0.prototype; + _.super$ColorSpace$convert0 = _.convert$5; + _.super$ColorSpace$convertLinear0 = _.convertLinear$10$missingA$missingB$missingChroma$missingHue$missingLightness; + _.super$ColorSpace$transformationMatrix0 = _.transformationMatrix$1; + _ = A.StylesheetParser0.prototype; + _.super$StylesheetParser$importArgument0 = _.importArgument$0; + _.super$StylesheetParser$namespacedExpression0 = _.namespacedExpression$2; + _ = A.Value0.prototype; + _.super$Value$assertMap0 = _.assertMap$1; + _.super$Value$plus0 = _.plus$1; + _.super$Value$minus0 = _.minus$1; + _.super$Value$dividedBy0 = _.dividedBy$1; + _.super$Value$toString0 = _.toString$0; + })(); + (function installTearOffs() { + var _static_2 = hunkHelpers._static_2, + _instance_1_i = hunkHelpers._instance_1i, + _instance_1_u = hunkHelpers._instance_1u, + _static_1 = hunkHelpers._static_1, + _static_0 = hunkHelpers._static_0, + _static = hunkHelpers.installStaticTearOff, + _instance = hunkHelpers.installInstanceTearOff, + _instance_2_u = hunkHelpers._instance_2u, + _instance_0_i = hunkHelpers._instance_0i, + _instance_0_u = hunkHelpers._instance_0u; + _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 272); + _instance_1_i(J.JSArray.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A._CastIterableBase.prototype, "get$contains", "contains$1", 9); + _instance_1_u(A.CastMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.ConstantStringMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_i(A.ConstantStringSet.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.GeneralConstantSet.prototype, "get$contains", "contains$1", 9); + _instance_1_u(A.JsLinkedHashMap.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 138); + _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 138); + _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 138); + _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); + _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 71); + _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 70); + _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); + _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 655, 0); + _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { + return A._rootRun($self, $parent, zone, f, type$.dynamic); + }], 656, 1); + _static(A, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { + var t1 = type$.dynamic; + return A._rootRunUnary($self, $parent, zone, f, arg, t1, t1); + }], 657, 1); + _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6", "call$6"], ["_rootRunBinary", function($self, $parent, zone, f, arg1, arg2) { + var t1 = type$.dynamic; + return A._rootRunBinary($self, $parent, zone, f, arg1, arg2, t1, t1, t1); + }], 658, 1); + _static(A, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { + return A._rootRegisterCallback($self, $parent, zone, f, type$.dynamic); + }], 659, 0); + _static(A, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { + var t1 = type$.dynamic; + return A._rootRegisterUnaryCallback($self, $parent, zone, f, t1, t1); + }], 660, 0); + _static(A, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { + var t1 = type$.dynamic; + return A._rootRegisterBinaryCallback($self, $parent, zone, f, t1, t1, t1); + }], 661, 0); + _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 662, 0); + _static(A, "async___rootScheduleMicrotask$closure", 4, null, ["call$4"], ["_rootScheduleMicrotask"], 663, 0); + _static(A, "async___rootCreateTimer$closure", 5, null, ["call$5"], ["_rootCreateTimer"], 664, 0); + _static(A, "async___rootCreatePeriodicTimer$closure", 5, null, ["call$5"], ["_rootCreatePeriodicTimer"], 665, 0); + _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 666, 0); + _static_1(A, "async___printToZone$closure", "_printToZone0", 90); + _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 667, 0); + _instance(A._AsyncCompleter.prototype, "get$complete", 0, 0, function() { + return [null]; + }, ["call$1", "call$0"], ["complete$1", "complete$0"], 192, 0, 0); + _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 70); + var _; + _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 37); + _instance(_, "get$addError", 0, 1, function() { + return [null]; + }, ["call$2", "call$1"], ["addError$2", "addError$1"], 268, 0, 0); + _instance_0_i(_, "get$close", "close$0", 445); + _instance_1_u(_, "get$_async$_add", "_async$_add$1", 37); + _instance_2_u(_, "get$_addError", "_addError$2", 70); + _instance_0_u(_, "get$_close", "_close$0", 0); + _instance_0_u(_ = A._ControllerSubscription.prototype, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance(_ = A._BufferingStreamSubscription.prototype, "get$pause", 1, 0, null, ["call$1", "call$0"], ["pause$1", "pause$0"], 584, 0, 0); + _instance_0_i(_, "get$resume", "resume$0", 0); + _instance_0_u(_, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance_1_u(_ = A._StreamIterator.prototype, "get$_onData", "_onData$1", 37); + _instance_2_u(_, "get$_onError", "_onError$2", 70); + _instance_0_u(_, "get$_onDone", "_onDone$0", 0); + _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, "get$_async$_onPause", "_async$_onPause$0", 0); + _instance_0_u(_, "get$_async$_onResume", "_async$_onResume$0", 0); + _instance_1_u(_, "get$_handleData", "_handleData$1", 37); + _instance_2_u(_, "get$_handleError", "_handleError$2", 300); + _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); + _static_2(A, "collection___defaultEquals$closure", "_defaultEquals", 273); + _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 274); + _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 272); + _instance_1_u(A._HashMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A._LinkedCustomHashMap.prototype, "get$containsKey", "containsKey$1", 9); + _instance(_ = A._LinkedHashSet.prototype, "get$_newSimilarSet", 0, 0, null, ["call$1$0", "call$0"], ["_newSimilarSet$1$0", "_newSimilarSet$0"], 151, 0, 0); + _instance_1_i(_, "get$contains", "contains$1", 9); + _instance_1_i(_, "get$add", "add$1", 9); + _instance(A._LinkedIdentityHashSet.prototype, "get$_newSimilarSet", 0, 0, null, ["call$1$0", "call$0"], ["_newSimilarSet$1$0", "_newSimilarSet$0"], 151, 0, 0); + _instance_1_u(A.MapBase.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.MapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_i(A.UnmodifiableSetView.prototype, "get$contains", "contains$1", 9); + _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 108); + _instance_1_u(A._JsonMap.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "core__identityHashCode$closure", "identityHashCode", 274); + _static_2(A, "core__identical$closure", "identical", 273); + _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 6); + _instance_1_i(A.Iterable.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.StringBuffer.prototype, "get$write", "write$1", 37); + _static(A, "math0__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { + return A.max(a, b, type$.num); + }], 670, 1); + _instance_1_u(A.ArgResults.prototype, "get$wasParsed", "wasParsed$1", 4); + _instance_1_u(_ = A.StreamCompleter.prototype, "get$setSourceStream", "setSourceStream$1", 37); + _instance(_, "get$setError", 0, 1, function() { + return [null]; + }, ["call$2", "call$1"], ["setError$2", "setError$1"], 268, 0, 0); + _instance_0_u(_ = A.StreamGroup.prototype, "get$_onListen", "_onListen$0", 0); + _instance_0_u(_, "get$_onPause", "_onPause$0", 0); + _instance_0_u(_, "get$_onResume", "_onResume$0", 0); + _instance_0_u(_, "get$_onCancel", "_onCancel$0", 226); + _instance_0_i(A.ReplAdapter.prototype, "get$exit", "exit$0", 0); + _instance_1_i(A.EmptyUnmodifiableSet.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.UnionSet.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A._DelegatingIterableBase.prototype, "get$contains", "contains$1", 9); + _instance_1_i(A.MapKeySet.prototype, "get$contains", "contains$1", 9); + _static_1(A, "version_Version___parse_tearOff$closure", "Version___parse_tearOff", 235); + _instance_1_u(A.VersionRange.prototype, "get$allows", "allows$1", 489); + _instance_1_u(A._IsInvisibleVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 21); + _instance_1_u(A._IsBogusVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 21); + _instance_1_u(A._IsUselessVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 21); + _instance_1_u(A.SelectorList.prototype, "get$isSuperselector", "isSuperselector$1", 77); + _instance_1_u(A.PseudoSelector.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.SimpleSelector.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.TypeSelector.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.UniversalSelector.prototype, "get$isSuperselector", "isSuperselector$1", 14); + _instance_1_u(A.EmptyExtensionStore.prototype, "get$addExtensions", "addExtensions$1", 210); + _instance_1_u(A.ExtensionStore.prototype, "get$addExtensions", "addExtensions$1", 210); + _static_1(A, "functions___isUnique$closure", "_isUnique", 14); + _instance_2_u(A.NodePackageImporter.prototype, "get$_compareExpansionKeys", "_compareExpansionKeys$2", 145); + _instance_0_u(A.CssParser.prototype, "get$silentComment", "silentComment$0", 20); + _instance_0_u(_ = A.Parser.prototype, "get$silentComment", "silentComment$0", 20); + _instance_0_u(_, "get$loudComment", "loudComment$0", 0); + _instance_0_u(_, "get$string", "string$0", 29); + _instance(_, "get$error", 1, 2, function() { + return [null]; + }, ["call$3", "call$2"], ["error$3", "error$2"], 158, 0, 0); + _instance(_ = A.StylesheetParser.prototype, "get$_statement", 0, 0, null, ["call$1$root", "call$0"], ["_statement$1$root", "_statement$0"], 457, 0, 0); + _instance_0_u(_, "get$_declarationChild", "_declarationChild$0", 125); + _instance_0_u(_, "get$_functionChild", "_functionChild$0", 125); + _instance(_, "get$_expression", 0, 0, null, ["call$4$bracketList$consumeNewlines$singleEquals$until", "call$0", "call$1$consumeNewlines", "call$3$consumeNewlines$singleEquals$until", "call$1$bracketList", "call$2$consumeNewlines$until"], ["_expression$4$bracketList$consumeNewlines$singleEquals$until", "_expression$0", "_expression$1$consumeNewlines", "_expression$3$consumeNewlines$singleEquals$until", "_expression$1$bracketList", "_expression$2$consumeNewlines$until"], 473, 0, 0); + _instance_0_u(_, "get$_number", "_number$0", 474); + _instance(A.LazyFileSpan.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 123, 0, 0); + _instance_1_u(A.LimitedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.MergedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance(A.MultiSpan.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 163, 0, 0); + _instance_1_i(A.NoSourceMapBuffer.prototype, "get$write", "write$1", 37); + _instance_1_u(A.PrefixedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.PublicMemberMapView.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_i(A.SourceMapBuffer.prototype, "get$write", "write$1", 37); + _instance_1_u(A.UnprefixedMapView.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "utils__isPublic$closure", "isPublic", 4); + _static_1(A, "calculation_SassCalculation__simplify$closure", "SassCalculation__simplify", 75); + _instance_1_u(A.ColorChannel.prototype, "get$isAnalogous", "isAnalogous$1", 93); + _instance_1_u(A.DisplayP3ColorSpace.prototype, "get$toLinear", "toLinear$1", 12); + _instance_1_u(A.SrgbColorSpace.prototype, "get$toLinear", "toLinear$1", 12); + _instance_1_u(A.AnySelectorVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 21); + _instance(_ = A._EvaluateVisitor0.prototype, "get$_async_evaluate$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_async_evaluate$_interpolationToValue$3$trim$warnForColor", "_async_evaluate$_interpolationToValue$1", "_async_evaluate$_interpolationToValue$2$warnForColor"], 337, 0, 0); + _instance_1_u(_, "get$_async_evaluate$_expressionNode", "_async_evaluate$_expressionNode$1", 166); + _instance(_ = A._EvaluateVisitor.prototype, "get$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_interpolationToValue$3$trim$warnForColor", "_interpolationToValue$1", "_interpolationToValue$2$warnForColor"], 550, 0, 0); + _instance_1_u(_, "get$_expressionNode", "_expressionNode$1", 166); + _instance_1_i(_ = A.RecursiveStatementVisitor.prototype, "get$visitContentBlock", "visitContentBlock$1", 694); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", 277); + _instance_1_u(_ = A.SelectorSearchVisitor.prototype, "get$visitComplexSelector", "visitComplexSelector$1", "SelectorSearchVisitor.T?(ComplexSelector)"); + _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", "SelectorSearchVisitor.T?(SelectorList)"); + _instance_1_u(_ = A._SerializeVisitor.prototype, "get$_visitMediaQuery", "_visitMediaQuery$1", 281); + _instance_1_u(_, "get$_writeCalculationValue", "_writeCalculationValue$1", 97); + _instance(_, "get$_writeChannel", 0, 1, null, ["call$2", "call$1"], ["_writeChannel$2", "_writeChannel$1"], 195, 0, 0); + _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", 283); + _instance_1_u(_, "get$_requiresSemicolon", "_requiresSemicolon$1", 7); + _instance_1_i(_ = A.StatementSearchVisitor.prototype, "get$visitContentBlock", "visitContentBlock$1", "StatementSearchVisitor.T?(ContentBlock)"); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", "StatementSearchVisitor.T?(List)"); + _instance(A.SourceSpanMixin.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 123, 0, 0); + _static_1(A, "frame_Frame___parseVM_tearOff$closure", "Frame___parseVM_tearOff", 94); + _static_1(A, "frame_Frame___parseV8_tearOff$closure", "Frame___parseV8_tearOff", 94); + _static_1(A, "frame_Frame___parseFirefox_tearOff$closure", "Frame___parseFirefox_tearOff", 94); + _static_1(A, "frame_Frame___parseFriendly_tearOff$closure", "Frame___parseFriendly_tearOff", 94); + _static_1(A, "trace_Trace___parseVM_tearOff$closure", "Trace___parseVM_tearOff", 231); + _static_1(A, "trace_Trace___parseFriendly_tearOff$closure", "Trace___parseFriendly_tearOff", 231); + _static(A, "from_handlers__TransformByHandlers__defaultHandleError$closure", 3, null, ["call$1$3", "call$3"], ["TransformByHandlers__defaultHandleError", function(error, stackTrace, sink) { + return A.TransformByHandlers__defaultHandleError(error, stackTrace, sink, type$.dynamic); + }], 673, 0); + _static(A, "rate_limit___collect$closure", 2, null, ["call$1$2", "call$2"], ["_collect", function($event, soFar) { + return A._collect($event, soFar, type$.dynamic); + }], 674, 0); + _instance_1_u(A.AnySelectorVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 22); + _instance(_ = A._EvaluateVisitor2.prototype, "get$_async_evaluate0$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_async_evaluate0$_interpolationToValue$3$trim$warnForColor", "_async_evaluate0$_interpolationToValue$1", "_async_evaluate0$_interpolationToValue$2$warnForColor"], 322, 0, 0); + _instance_1_u(_, "get$_async_evaluate0$_expressionNode", "_async_evaluate0$_expressionNode$1", 206); + _static_1(A, "calculation1___assertCalculationValue$closure", "_assertCalculationValue", 97); + _static_1(A, "calculation1___isValidClampArg$closure", "_isValidClampArg", 9); + _static_1(A, "calculation0_SassCalculation__simplify$closure", "SassCalculation__simplify0", 75); + _instance_1_u(A.ColorChannel0.prototype, "get$isAnalogous", "isAnalogous$1", 67); + _static(A, "compile__compile$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compile0", function(path) { + return A.compile0(path, null); + }], 675, 0); + _static(A, "compile__compileString$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileString0", function(text) { + return A.compileString0(text, null); + }], 676, 0); + _static(A, "compile__compileAsync$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileAsync1", function(path) { + return A.compileAsync1(path, null); + }], 677, 0); + _static(A, "compile__compileStringAsync$closure", 1, function() { + return [null]; + }, ["call$2", "call$1"], ["compileStringAsync1", function(text) { + return A.compileStringAsync1(text, null); + }], 678, 0); + _static_1(A, "compile___parseImporter$closure", "_parseImporter0", 679); + _static_1(A, "compile___simplifyCalcArg$closure", "_simplifyCalcArg", 75); + _static_0(A, "compiler__initCompiler$closure", "initCompiler", 680); + _static_0(A, "compiler__initAsyncCompiler$closure", "initAsyncCompiler", 681); + _instance_0_u(A.CssParser0.prototype, "get$silentComment", "silentComment$0", 20); + _instance_1_u(A.DisplayP3ColorSpace0.prototype, "get$toLinear", "toLinear$1", 12); + _instance_1_u(A.EmptyExtensionStore0.prototype, "get$addExtensions", "addExtensions$1", 236); + _instance(_ = A._EvaluateVisitor1.prototype, "get$_evaluate0$_interpolationToValue", 0, 1, null, ["call$3$trim$warnForColor", "call$1", "call$2$warnForColor"], ["_evaluate0$_interpolationToValue$3$trim$warnForColor", "_evaluate0$_interpolationToValue$1", "_evaluate0$_interpolationToValue$2$warnForColor"], 455, 0, 0); + _instance_1_u(_, "get$_evaluate0$_expressionNode", "_evaluate0$_expressionNode$1", 206); + _instance_1_u(A.ExtensionStore0.prototype, "get$addExtensions", "addExtensions$1", 236); + _static_1(A, "functions0___isUnique$closure", "_isUnique0", 15); + _static_1(A, "immutable__jsToDartList$closure", "jsToDartList", 682); + _instance(A.LazyFileSpan0.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 123, 0, 0); + _static_2(A, "legacy__render$closure", "render", 683); + _static_1(A, "legacy__renderSync$closure", "renderSync", 684); + _instance_1_u(A.LimitedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.SelectorList0.prototype, "get$isSuperselector", "isSuperselector$1", 68); + _instance_1_u(A.MergedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance(A.MultiSpan0.prototype, "get$message", 1, 1, function() { + return {color: null}; + }, ["call$2$color", "call$1"], ["message$2$color", "message$1"], 163, 0, 0); + _instance_1_i(A.NoSourceMapBuffer0.prototype, "get$write", "write$1", 37); + _instance_2_u(A.NodePackageImporter0.prototype, "get$_node_package$_compareExpansionKeys", "_node_package$_compareExpansionKeys$2", 145); + _static_0(A, "parser0__loadParserExports$closure", "loadParserExports", 685); + _static(A, "parser0___parse$closure", 3, null, ["call$3"], ["_parse"], 686, 0); + _static_1(A, "parser0___parseIdentifier$closure", "_parseIdentifier", 687); + _static_1(A, "parser0___toCssIdentifier$closure", "_toCssIdentifier", 6); + _instance_0_u(_ = A.Parser1.prototype, "get$silentComment", "silentComment$0", 20); + _instance_0_u(_, "get$loudComment", "loudComment$0", 0); + _instance_0_u(_, "get$string", "string$0", 29); + _instance(_, "get$error", 1, 2, function() { + return [null]; + }, ["call$3", "call$2"], ["error$3", "error$2"], 158, 0, 0); + _instance_1_u(A.PrefixedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A.PseudoSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 15); + _instance_1_u(A.PublicMemberMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _instance_1_u(A._IsInvisibleVisitor2.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 22); + _instance_1_u(A._IsBogusVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 22); + _instance_1_u(A._IsUselessVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", 22); + _instance_1_u(_ = A.SelectorSearchVisitor0.prototype, "get$visitComplexSelector", "visitComplexSelector$1", "SelectorSearchVisitor0.T?(ComplexSelector0)"); + _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", "SelectorSearchVisitor0.T?(SelectorList0)"); + _instance_1_u(_ = A._SerializeVisitor0.prototype, "get$_serialize0$_visitMediaQuery", "_serialize0$_visitMediaQuery$1", 595); + _instance_1_u(_, "get$_serialize0$_writeCalculationValue", "_serialize0$_writeCalculationValue$1", 97); + _instance(_, "get$_serialize0$_writeChannel", 0, 1, null, ["call$2", "call$1"], ["_serialize0$_writeChannel$2", "_serialize0$_writeChannel$1"], 195, 0, 0); + _instance_1_u(_, "get$visitSelectorList", "visitSelectorList$1", 596); + _instance_1_u(_, "get$_serialize0$_requiresSemicolon", "_serialize0$_requiresSemicolon$1", 8); + _instance_1_u(A.SimpleSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 15); + _instance_1_i(A.SourceMapBuffer0.prototype, "get$write", "write$1", 37); + _instance_1_u(A.SrgbColorSpace0.prototype, "get$toLinear", "toLinear$1", 12); + _instance_1_i(_ = A.StatementSearchVisitor0.prototype, "get$visitContentBlock", "visitContentBlock$1", "StatementSearchVisitor0.T?(ContentBlock0)"); + _instance_1_u(_, "get$visitChildren", "visitChildren$1", "StatementSearchVisitor0.T?(List)"); + _instance(_ = A.StylesheetParser0.prototype, "get$_stylesheet0$_statement", 0, 0, null, ["call$1$root", "call$0"], ["_stylesheet0$_statement$1$root", "_stylesheet0$_statement$0"], 617, 0, 0); + _instance_0_u(_, "get$_stylesheet0$_declarationChild", "_stylesheet0$_declarationChild$0", 137); + _instance_0_u(_, "get$_stylesheet0$_functionChild", "_stylesheet0$_functionChild$0", 137); + _instance_0_u(_, "get$_stylesheet0$_number", "_stylesheet0$_number$0", 619); + _instance_1_u(A.TypeSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 15); + _instance_1_u(A.UniversalSelector0.prototype, "get$isSuperselector", "isSuperselector$1", 15); + _instance_1_u(A.UnprefixedMapView0.prototype, "get$containsKey", "containsKey$1", 9); + _static_1(A, "utils3__jsToDartUrl$closure", "jsToDartUrl", 688); + _static_1(A, "utils3__dartToJSUrl$closure", "dartToJSUrl", 176); + _static_1(A, "utils3__mapToObject$closure", "mapToObject", 689); + _static_1(A, "utils1__isPublic$closure", "isPublic0", 4); + _static_1(A, "utils1__unvendor$closure", "unvendor0", 6); + _static(A, "path__absolute$closure", 1, function() { + return [null, null, null, null, null, null, null, null, null, null, null, null, null, null]; + }, ["call$15", "call$1", "call$2", "call$3", "call$4", "call$5", "call$6"], ["absolute", function(part1) { + var _null = null; + return A.absolute(part1, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2) { + var _null = null; + return A.absolute(part1, part2, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2, part3) { + var _null = null; + return A.absolute(part1, part2, part3, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2, part3, part4) { + var _null = null; + return A.absolute(part1, part2, part3, part4, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2, part3, part4, part5) { + var _null = null; + return A.absolute(part1, part2, part3, part4, part5, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }, function(part1, part2, part3, part4, part5, part6) { + var _null = null; + return A.absolute(part1, part2, part3, part4, part5, part6, _null, _null, _null, _null, _null, _null, _null, _null, _null); + }], 690, 0); + _static_1(A, "path__toUri$closure", "toUri", 127); + _static_1(A, "path__prettyUri$closure", "prettyUri", 691); + _static_2(A, "number0__fuzzyLessThan$closure", "fuzzyLessThan", 48); + _static_2(A, "number0__fuzzyLessThanOrEquals$closure", "fuzzyLessThanOrEquals", 48); + _static_2(A, "number0__fuzzyGreaterThan$closure", "fuzzyGreaterThan", 48); + _static_2(A, "number0__fuzzyGreaterThanOrEquals$closure", "fuzzyGreaterThanOrEquals", 48); + _static_2(A, "number0__moduloLikeSass$closure", "moduloLikeSass", 57); + _static_1(A, "number0__sqrt$closure", "sqrt", 52); + _static_1(A, "number0__sin$closure", "sin", 52); + _static_1(A, "number0__cos$closure", "cos", 52); + _static_1(A, "number0__tan$closure", "tan", 52); + _static_1(A, "number0__atan$closure", "atan", 52); + _static_1(A, "number0__asin$closure", "asin", 52); + _static_1(A, "number0__acos$closure", "acos", 52); + _static_1(A, "utils0__srgbAndDisplayP3FromLinear$closure", "srgbAndDisplayP3FromLinear", 12); + _static_2(A, "number2__fuzzyLessThan$closure", "fuzzyLessThan0", 48); + _static_2(A, "number2__fuzzyLessThanOrEquals$closure", "fuzzyLessThanOrEquals0", 48); + _static_2(A, "number2__fuzzyGreaterThan$closure", "fuzzyGreaterThan0", 48); + _static_2(A, "number2__fuzzyGreaterThanOrEquals$closure", "fuzzyGreaterThanOrEquals0", 48); + _static_2(A, "number2__moduloLikeSass$closure", "moduloLikeSass0", 57); + _static_1(A, "number2__sqrt$closure", "sqrt0", 53); + _static_1(A, "number2__sin$closure", "sin0", 53); + _static_1(A, "number2__cos$closure", "cos0", 53); + _static_1(A, "number2__tan$closure", "tan0", 53); + _static_1(A, "number2__atan$closure", "atan0", 53); + _static_1(A, "number2__asin$closure", "asin0", 53); + _static_1(A, "number2__acos$closure", "acos0", 53); + _static_1(A, "sass__main$closure", "main1", 511); + _static_1(A, "utils4__validateUrlScheme$closure", "validateUrlScheme", 90); + _static_1(A, "utils2__srgbAndDisplayP3FromLinear$closure", "srgbAndDisplayP3FromLinear0", 12); + _static_1(A, "value0__wrapValue$closure", "wrapValue", 464); + })(); + (function inheritance() { + var _mixin = hunkHelpers.mixin, + _inherit = hunkHelpers.inherit, + _inheritMany = hunkHelpers.inheritMany; + _inherit(A.Object, null); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.SkipWhileIterator, A.EmptyIterator, A.FollowedByIterator, A.WhereTypeIterator, A.NonNullsIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A.Symbol, A._Record, A.MapView, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.SetBase, A.JSInvocationMirror, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A._Required, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A._SyncStarIterator, A.AsyncError, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._AddStreamState, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._StreamIterator, A._ZoneFunction, A._Zone, A._ZoneDelegate, A._ZoneSpecification, A._HashMapKeyIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._MapBaseValueIterator, A._UnmodifiableMapMixin, A._ListQueueIterator, A._UnmodifiableSetMixin, A.Codec, A.Converter, A._Base64Encoder, A.ByteConversionSink, A._JsonStringifier, A.StringConversionSink, A._Utf8Encoder, A._Utf8Decoder, A.DateTime, A.Duration, A._Enum, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.MapEntry, A.Null, A._StringStackTrace, A.RuneIterator, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.Expando, A.NullRejectionException, A._JSRandom, A.ArgParser, A.ArgResults, A.Option, A.OptionType, A.Parser0, A._Usage, A.FutureGroup, A.ErrorResult, A.ValueResult, A.StreamCompleter, A.StreamGroup, A._StreamGroupState, A.StreamQueue, A._NextRequest, A.Repl, A.ReplAdapter, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._MapEntry, A.MapEquality, A._QueueList_Object_ListMixin, A._DelegatingIterableBase, A.UnmodifiableSetMixin, A.Context, A._PathDirection, A._PathRelation, A.Style, A.ParsedPath, A.PathException, A.Version, A.VersionRange, A.CssMediaQuery, A.MediaQuerySuccessfulMergeResult, A.CssNode, A.__IsInvisibleVisitor_Object_EveryCssVisitor, A.CssValue, A._FakeAstNode, A.ArgumentList, A.AtRootQuery, A.ConfiguredVariable, A.Expression, A.IfConditionExpression, A.DynamicImport, A.StaticImport, A.Interpolation, A.Parameter, A.ParameterList, A.Statement, A.IfRuleClause, A.__HasContentVisitor_Object_StatementSearchVisitor, A.SupportsAnything, A.SupportsDeclaration, A.SupportsFunction, A.SupportsInterpolation, A.SupportsNegation, A.SupportsOperation, A.Selector, A.__IsInvisibleVisitor_Object_AnySelectorVisitor, A.__IsBogusVisitor_Object_AnySelectorVisitor, A.__IsUselessVisitor_Object_AnySelectorVisitor, A.__ContainsParentSelectorVisitor_Object_AnySelectorVisitor, A.ComplexSelectorComponent, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor, A.QualifiedName, A.AsyncEnvironment, A._EnvironmentModule0, A.AsyncImportCache, A.AsyncBuiltInCallable, A.BuiltInCallable, A.PlainCssCallable, A.UserDefinedCallable, A.CompileResult, A.Configuration, A.ConfiguredValue, A.Environment, A._EnvironmentModule, A.EvaluationContext, A.LoggerWithDeprecationType, A.SourceSpanException, A.SassScriptException, A.ExecutableOptions, A.UsageException, A._Watcher, A.EmptyExtensionStore, A.Extension, A.Extender, A.ExtensionStore, A.ImportCache, A.AsyncImporter, A.CanonicalizeContext, A.ImporterResult, A.InterpolationBuffer, A.InterpolationMap, A.FileSystemException, A._QuietLogger, A.TrackingLogger, A.BuiltInModule, A.ForwardedModuleView, A.ShadowedModuleView, A.Parser, A.StylesheetGraph, A.StylesheetNode, A.Box, A.ModifiableBox, A.LazyFileSpan, A.MultiDirWatcher, A.MultiSpan, A.NoSourceMapBuffer, A.SourceMapBuffer, A.Value, A.CalculationOperation, A._ColorFormatEnum, A.SpanColorFormat, A.ColorChannel, A.GamutMapMethod, A.InterpolationMethod, A.ColorSpace, A.AnySelectorVisitor, A._EvaluateVisitor0, A._ImportedCssVisitor0, A._CloneCssVisitor, A.Evaluator, A._EvaluateVisitor, A._ImportedCssVisitor, A.EveryCssVisitor, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor, A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor, A.IsCalculationSafeVisitor, A.IsPlainCssVisitor, A.RecursiveStatementVisitor, A.ReplaceExpressionVisitor, A.SelectorSearchVisitor, A._SerializeVisitor, A.StatementSearchVisitor, A.Entry, A.Mapping, A.TargetLineEntry, A.TargetEntry, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.Chain, A.Frame, A.LazyTrace, A.Trace, A.UnparsedFrame, A.StringScanner, A._SpanScannerState, A.AsciiGlyphSet, A.UnicodeGlyphSet, A.WatchEvent, A.ChangeType, A.ColorSpace0, A.AnySelectorVisitor0, A.SupportsAnything0, A.ArgumentList0, A.Value0, A.AsyncImporter0, A.AsyncBuiltInCallable0, A.AsyncEnvironment0, A._EnvironmentModule2, A._EvaluateVisitor2, A._ImportedCssVisitor2, A.EvaluationContext0, A.AsyncImportCache0, A.Parser1, A.AtRootQuery0, A.Statement0, A.CssNode0, A.InterpolatedSelector, A.Selector0, A.Expression0, A.Box0, A.ModifiableBox0, A.BuiltInCallable0, A.BuiltInModule0, A.CalculationOperation0, A.CalculationInterpolation, A.CanonicalizeContext0, A.ColorChannel0, A.GamutMapMethod0, A._CloneCssVisitor0, A._ColorFormatEnum0, A.SpanColorFormat0, A.CompileResult0, A.Compiler, A.InterpolatedComplexSelectorComponent, A.ComplexSelectorComponent0, A.Configuration0, A.ConfiguredValue0, A.ConfiguredVariable0, A.SupportsDeclaration0, A.LoggerWithDeprecationType0, A.DynamicImport0, A.EmptyExtensionStore0, A.Environment0, A._EnvironmentModule1, A._EvaluateVisitor1, A._ImportedCssVisitor1, A.EveryCssVisitor0, A.SassScriptException0, A.JSExpressionVisitor, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0, A.Extension0, A.Extender0, A.ExtensionStore0, A.ForwardedModuleView0, A.SupportsFunction0, A.IfConditionExpression0, A.JSIfConditionExpressionVisitor, A.IfRuleClause0, A.NodeImporter, A.ImportCache0, A.Interpolation0, A.SupportsInterpolation0, A.InterpolationBuffer0, A.InterpolationMap0, A.InterpolationMethod0, A.IsCalculationSafeVisitor0, A.IsPlainCssVisitor0, A.FileSystemException0, A.LazyFileSpan0, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0, A.CssMediaQuery0, A.MediaQuerySuccessfulMergeResult0, A.__HasContentVisitor_Object_StatementSearchVisitor0, A.MultiSpan0, A.SupportsNegation0, A.NoSourceMapBuffer0, A._FakeAstNode0, A.__IsInvisibleVisitor_Object_EveryCssVisitor0, A.SupportsOperation0, A.Parameter0, A.ParameterList0, A.PlainCssCallable0, A.InterpolatedQualifiedName, A.QualifiedName0, A.ReplaceExpressionVisitor0, A.ImporterResult0, A.__IsInvisibleVisitor_Object_AnySelectorVisitor0, A.__IsBogusVisitor_Object_AnySelectorVisitor0, A.__IsUselessVisitor_Object_AnySelectorVisitor0, A.__ContainsParentSelectorVisitor_Object_AnySelectorVisitor0, A.SelectorSearchVisitor0, A._SerializeVisitor0, A.ShadowedModuleView0, A.JSSimpleSelectorVisitor, A.SourceInterpolationVisitor, A.SourceMapBuffer0, A.JSStatementVisitor, A.StatementSearchVisitor0, A.StaticImport0, A.UserDefinedCallable0, A.CssValue0]); + _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]); + _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]); + _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction, A.Stdin, A.Stdout, A.ReadlineModule, A.ReadlineOptions, A.ReadlineInterface, A.BufferModule, A.BufferConstants, A.Buffer, A.ConsoleModule, A.Console, A.EventEmitter, A.FS, A.FSConstants, A.Realpath, A.RealpathSync, A.FSWatcher, A.ReadStream, A.ReadStreamOptions, A.WriteStream, A.WriteStreamOptions, A.FileOptions, A.StatOptions, A.MkdirOptions, A.RmdirOptions, A.WatchOptions, A.WatchFileOptions, A.Stats, A.Promise, A.Date, A.JsError, A.Atomics, A.Modules, A.Module, A.Net, A.Socket, A.NetAddress, A.NetServer, A.NodeJsError, A.Process, A.CPUUsage, A.Release, A.StreamModule, A.Readable, A.Writable, A.Duplex, A.Transform, A.WritableOptions, A.ReadableOptions, A.Immediate, A.Timeout, A.TTY, A.Util, A.JSArray0, A.Chokidar, A.ChokidarOptions, A.ChokidarWatcher, A.JSFunction, A.ImmutableList, A.ImmutableMap, A.NodeImporterResult, A.RenderContext, A.RenderContextOptions, A.RenderContextResult, A.RenderContextResultStats, A.JSModule, A.JSModuleRequire, A.JSClass, A.JSUrl, A._PropertyDescriptor, A._RequireMain, A.JSArray1, A.Chokidar0, A.ChokidarOptions0, A.ChokidarWatcher0, A._Channels, A._ChannelOptions, A._ToGamutOptions, A._InterpolationOptions, A._NodeSassColor, A.CompileOptions, A.NodeCompileResult, A.Deprecation1, A.Exports, A.LoggerNamespace, A.JSExpressionVisitorObject, A.FiberClass, A.Fiber, A.JSFunction0, A.JSIfConditionExpressionVisitorObject, A.ImmutableList0, A.ImmutableMap0, A.JSImporter, A.JSImporterResult, A.NodeImporterResult0, A._ConstructorOptions, A._NodeSassList, A.JSLogger, A.WarnOptions, A.DebugOptions, A._NodeSassMap, A.JSModule0, A.JSModuleRequire0, A._ConstructorOptions0, A._NodeSassNumber, A.ParserExports, A.JSClass0, A.RenderContext0, A.RenderContextOptions0, A.RenderContextResult0, A.RenderContextResultStats0, A.RenderOptions, A.RenderResult, A.RenderResultStats, A._Exports, A.JSSet, A.JSSimpleSelectorVisitorObject, A.JSStatementVisitorObject, A._ConstructorOptions1, A._NodeSassString, A.Types, A.JSUrl0, A._PropertyDescriptor0, A._RequireMain0]); + _inherit(J.JSArraySafeToStringHook, A.SafeToStringHook); + _inherit(J.JSUnmodifiableArray, J.JSArray); + _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); + _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.SkipWhileIterable, A.FollowedByIterable, A.WhereTypeIterable, A.NonNullsIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable, A._SyncStarIterable, A.Runes, A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin, A._PrefixedKeys, A._UnprefixedKeys, A._PrefixedKeys0, A._UnprefixedKeys0]); + _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin, A.CastSet]); + _inherit(A._EfficientLengthCastIterable, A.CastIterable); + _inherit(A._CastListBase, A.__CastListBase__CastIterableBase_ListMixin); + _inheritMany(A.Closure, [A.Closure2Args, A.CastMap_entries_closure, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A.Future_wait_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A.Stream_Stream$fromFuture_closure, A.Stream_length_closure, A._CustomZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallback_closure, A._HashMap_values_closure, A._LinkedCustomHashMap_closure, A.MapBase_entries_closure, A._JsonMap_values_closure, A._Uri__makePath_closure, A.jsify__convert, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.ArgParser__addOption_closure, A._Usage__writeOption_closure, A._Usage__buildAllowedList_closure, A.FutureGroup_add_closure, A.StreamGroup__onListen_closure, A.StreamGroup__onCancel_closure, A.StreamQueue__ensureListening_closure, A.alwaysValid_closure, A.ReplAdapter_runAsync__closure, A.UnionSet__iterable_closure, A.UnionSet_contains_closure, A.MapKeySet_difference_closure, A.promiseToFuture_closure1, A.promiseToFuture_closure2, A.futureToPromise__closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.ParsedPath__splitExtension_closure, A.PathMap__create_closure0, A.PathMap__create_closure1, A.WindowsStyle_absolutePathToUri_closure, A.Version__splitParts_closure, A.ModifiableCssNode_hasFollowingSibling_closure, A.ListExpression_toString_closure, A.Interpolation_toString_closure, A.ParameterList_verify_closure, A.ParameterList_verify_closure0, A.EachRule_toString_closure, A.IfRuleClause$__closure, A.IfRuleClause$___closure, A.ParentStatement_closure, A.ParentStatement__closure, A._IsBogusVisitor_visitComplexSelector_closure, A._IsUselessVisitor_visitComplexSelector_closure, A.ComplexSelectorComponent_toString_closure, A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure, A.IDSelector_unify_closure, A.SelectorList_asSassList_closure, A.SelectorList_nestWithin_closure, A.SelectorList_nestWithin__closure, A.SelectorList_nestWithin__closure0, A.SelectorList__nestWithinCompound_closure, A.SelectorList__nestWithinCompound_closure0, A.SelectorList__nestWithinCompound_closure1, A.SelectorList_withAdditionalCombinators_closure, A.PseudoSelector_specificity__closure, A.PseudoSelector_specificity__closure0, A.PseudoSelector_unify_closure, A.SimpleSelector_isSuperselector_closure, A.SimpleSelector_isSuperselector__closure, A._compileStylesheet_closure0, A.AsyncEnvironment__getVariableFromGlobalModule_closure, A.AsyncEnvironment_setVariable_closure0, A.AsyncEnvironment__getFunctionFromGlobalModule_closure, A.AsyncEnvironment__getMixinFromGlobalModule_closure, A.AsyncEnvironment_toModule_closure, A.AsyncEnvironment_toDummyModule_closure, A._EnvironmentModule__EnvironmentModule_closure5, A._EnvironmentModule__EnvironmentModule_closure6, A._EnvironmentModule__EnvironmentModule_closure7, A._EnvironmentModule__EnvironmentModule_closure8, A._EnvironmentModule__EnvironmentModule_closure9, A._EnvironmentModule__EnvironmentModule_closure10, A._EnvironmentModule_couldHaveBeenConfigured_closure0, A.AsyncImportCache_humanize_closure, A.AsyncImportCache_humanize_closure0, A.AsyncImportCache_humanize_closure1, A.AsyncImportCache_humanize_closure2, A.AsyncBuiltInCallable$mixin_closure, A.AsyncBuiltInCallable_withDeprecationWarning_closure, A.BuiltInCallable$mixin_closure, A.BuiltInCallable_withDeprecationWarning_closure, A._compileStylesheet_closure, A.Deprecation_fromId_closure, A.Environment__getVariableFromGlobalModule_closure, A.Environment_setVariable_closure0, A.Environment__getFunctionFromGlobalModule_closure, A.Environment__getMixinFromGlobalModule_closure, A.Environment_toModule_closure, A.Environment_toDummyModule_closure, A._EnvironmentModule__EnvironmentModule_closure, A._EnvironmentModule__EnvironmentModule_closure0, A._EnvironmentModule__EnvironmentModule_closure1, A._EnvironmentModule__EnvironmentModule_closure2, A._EnvironmentModule__EnvironmentModule_closure3, A._EnvironmentModule__EnvironmentModule_closure4, A._EnvironmentModule_couldHaveBeenConfigured_closure, A._writeSourceMap_closure, A.ExecutableOptions_emitErrorCss_closure, A.repl_warn, A.watch_closure, A._Watcher__debounceEvents_closure, A.ExtensionStore_extensionsWhereTarget_closure, A.ExtensionStore__extendComplex_closure, A.ExtensionStore__extendComplex__closure, A.ExtensionStore__extendCompound_closure, A.ExtensionStore__extendCompound_closure0, A.ExtensionStore__extendCompound_closure1, A.ExtensionStore__extendSimple_withoutPseudo, A.ExtensionStore__extendSimple_closure, A.ExtensionStore__extendSimple_closure0, A.ExtensionStore__extendPseudo_closure, A.ExtensionStore__extendPseudo_closure0, A.ExtensionStore__extendPseudo_closure1, A.ExtensionStore__extendPseudo_closure2, A.ExtensionStore__extendPseudo_closure3, A.ExtensionStore__trim_closure, A.ExtensionStore__trim_closure0, A.unifyComplex_closure, A._weaveParents_closure0, A._weaveParents_closure1, A._weaveParents_closure2, A._mustUnify_closure, A._mustUnify__closure, A.paths__closure, A.paths___closure, A.listIsSuperselector_closure, A.listIsSuperselector__closure, A.complexIsSuperselector_closure, A.complexIsSuperselector_closure0, A._compatibleWithPreviousCombinator_closure, A.compoundIsSuperselector_closure, A._selectorPseudoIsSuperselector_closure, A._selectorPseudoIsSuperselector_closure0, A._selectorPseudoIsSuperselector_closure1, A._selectorPseudoIsSuperselector_closure2, A._selectorPseudoIsSuperselector_closure3, A._selectorPseudoIsSuperselector__closure, A._selectorPseudoIsSuperselector___closure, A._selectorPseudoIsSuperselector___closure0, A._selectorPseudoIsSuperselector_closure4, A._selectorPseudoIsSuperselector_closure5, A._selectorPseudoArgs_closure, A._selectorPseudoArgs_closure0, A.globalFunctions_closure, A.global_closure0, A.global_closure1, A.global_closure2, A.global_closure3, A.global_closure4, A.global_closure5, A.global_closure6, A.global_closure7, A.global_closure8, A.global_closure9, A.global_closure10, A.global_closure11, A.global_closure12, A.global_closure13, A.global_closure14, A.global_closure15, A.global_closure16, A.global_closure17, A.global_closure18, A.global_closure19, A.global_closure20, A.global_closure21, A.global_closure22, A.global_closure23, A.global_closure24, A.global_closure25, A.global_closure26, A.global_closure27, A.global_closure28, A.global_closure29, A.global_closure30, A.global_closure31, A.global_closure32, A.global_closure33, A.global_closure34, A.global_closure35, A.global__closure, A.global_closure36, A.global_closure37, A.global_closure38, A.global_closure39, A.global_closure40, A.global_closure41, A.global_closure42, A.module_closure1, A.module_closure2, A.module_closure3, A.module_closure4, A.module_closure5, A.module_closure6, A.module_closure7, A.module_closure8, A.module_closure9, A.module_closure10, A.module_closure11, A.module_closure12, A.module_closure13, A.module_closure14, A.module__closure2, A.module_closure15, A.module_closure16, A.module_closure17, A.module_closure18, A.module_closure19, A.module_closure20, A.module_closure21, A.module_closure22, A.module__closure1, A.module_closure23, A.module_closure_toXyzNoMissing, A.module_closure24, A._mix_closure, A._complement_closure, A._adjust_closure, A._scale_closure, A._change_closure, A._ieHexStr_closure, A._ieHexStr_closure_hexString, A._updateComponents_closure, A._updateComponents_closure0, A._adjustColor_closure, A._functionString_closure, A._removedColorFunction_closure, A._rgb_closure, A._hsl_closure, A._parseChannels_closure, A._parseChannels_closure0, A._colorFromChannels_closure, A._colorFromChannels_closure0, A._channelFromValue_closure, A._channelFunction_closure, A._suggestScaleAndAdjust_closure, A._length_closure0, A._nth_closure, A._setNth_closure, A._join_closure, A._append_closure0, A._zip_closure, A._zip__closure, A._zip__closure0, A._zip__closure1, A._index_closure0, A._separator_closure, A._isBracketed_closure, A._slash_closure, A._get_closure, A._set_closure, A._set__closure0, A._set_closure0, A._set__closure, A._merge_closure, A._merge_closure0, A._merge__closure, A._deepMerge_closure, A._deepRemove_closure, A._deepRemove__closure, A._remove_closure, A._remove_closure0, A._keys_closure, A._values_closure, A._hasKey_closure, A._modify_modifyNestedMap, A.global_closure, A.module_closure0, A._ceil_closure, A._clamp_closure, A._floor_closure, A._max_closure, A._min_closure, A._round_closure, A._hypot_closure, A._hypot__closure, A._log_closure, A._pow_closure, A._atan2_closure, A._compatible_closure, A._isUnitless_closure, A._unit_closure, A._percentage_closure, A._randomFunction_closure, A._div_closure, A._singleArgumentMathFunc_closure, A._numberFunction_closure, A._shared_closure, A._shared_closure0, A._shared_closure1, A._shared_closure2, A.moduleFunctions_closure, A.moduleFunctions_closure0, A.moduleFunctions__closure, A.moduleFunctions_closure1, A._nest_closure, A._nest__closure, A._append_closure, A._append__closure, A._append___closure, A._extend_closure, A._replace_closure, A._unify_closure, A._isSuperselector_closure, A._simpleSelectors_closure, A._simpleSelectors__closure, A._parse_closure, A.module_closure, A.module__closure, A.module__closure0, A._unquote_closure, A._quote_closure, A._length_closure, A._insert_closure, A._index_closure, A._slice_closure, A._toUpperCase_closure, A._toLowerCase_closure, A._uniqueId_closure, A.ImportCache_humanize_closure, A.ImportCache_humanize_closure0, A.ImportCache_humanize_closure1, A.ImportCache_humanize_closure2, A.FilesystemImporter_canonicalize_closure, A.NodePackageImporter__nodePackageExportsResolve_closure, A.NodePackageImporter__nodePackageExportsResolve_closure0, A.NodePackageImporter__nodePackageExportsResolve_closure1, A.NodePackageImporter__nodePackageExportsResolve_closure2, A.NodePackageImporter__nodePackageExportsResolve__closure, A.NodePackageImporter__nodePackageExportsResolve__closure0, A.NodePackageImporter__getMainExport_closure, A._exactlyOne_closure, A.InterpolationMap_mapException_closure, A._realCasePath_helper, A._realCasePath_helper__closure, A.readStdin_closure, A.readStdin_closure0, A.readStdin_closure1, A.readStdin_closure2, A.listDir__closure, A.listDir__closure0, A.listDir_closure_list, A.listDir__list_closure, A.watchDir_closure1, A.watchDir_closure2, A.watchDir_closure3, A.watchDir_closure4, A.DeprecationProcessingLogger_summarize_closure, A.DeprecationProcessingLogger_summarize_closure0, A._disallowedFunctionNames_closure, A.Parser_escape_closure, A.Parser_scanIdentChar_matches, A.SassParser_styleRuleSelector_closure, A.SassParser__peekIndentation_closure, A.SassParser__peekIndentation_closure0, A.SassParser__tryTrailingSemicolon_closure, A.StylesheetParser__declarationOrBuffer_closure1, A.StylesheetParser__expression_addSingleExpression, A.StylesheetParser__expression_addOperator, A.StylesheetParser__isHexColor_closure, A.StylesheetParser__unicodeRange_closure, A.StylesheetParser__unicodeRange_closure0, A.StylesheetParser_trySpecialFunction_closure, A.StylesheetGraph_modifiedSince_transitiveModificationTime, A.MapExtensions_get_pairs_closure, A._PrefixedKeys_iterator_closure, A.SourceMapBuffer_buildSourceMap_closure, A._UnprefixedKeys_iterator_closure, A._UnprefixedKeys_iterator_closure0, A.indent_closure, A.flattenVertically_closure, A.flattenVertically_closure0, A.SassCalculation__verifyLength_closure, A.SassColor$_forSpace_closure, A.HwbColorSpace_convert_toRgb, A.SassList_isBlank_closure, A.SassNumber__coerceOrConvertValue_closure, A.SassNumber__coerceOrConvertValue_closure1, A.SassNumber_multiplyUnits_closure, A.SassNumber_multiplyUnits_closure1, A.SassNumber__areAnyConvertible_closure, A.SassNumber__canonicalizeUnitList_closure, A.SassNumber_unitSuggestion_closure, A.SassNumber_unitSuggestion_closure0, A.SingleUnitSassNumber__coerceToUnit_closure, A.SingleUnitSassNumber__coerceValueToUnit_closure, A.SingleUnitSassNumber_multiplyUnits_closure, A.AnySelectorVisitor_visitComplexSelector_closure, A.AnySelectorVisitor_visitCompoundSelector_closure, A._EvaluateVisitor_closure12, A._EvaluateVisitor_closure13, A._EvaluateVisitor_closure14, A._EvaluateVisitor_closure15, A._EvaluateVisitor_closure16, A._EvaluateVisitor_closure17, A._EvaluateVisitor_closure18, A._EvaluateVisitor_closure19, A._EvaluateVisitor_closure20, A._EvaluateVisitor_closure21, A._EvaluateVisitor_closure22, A._EvaluateVisitor_closure23, A._EvaluateVisitor_closure24, A._EvaluateVisitor__loadModule__closure1, A._EvaluateVisitor__combineCss_closure1, A._EvaluateVisitor__combineCss_closure2, A._EvaluateVisitor__combineCss_visitModule0, A._EvaluateVisitor__extendModules_closure1, A._EvaluateVisitor__scopeForAtRoot_closure5, A._EvaluateVisitor__scopeForAtRoot_closure6, A._EvaluateVisitor__scopeForAtRoot_closure7, A._EvaluateVisitor__scopeForAtRoot_closure8, A._EvaluateVisitor__scopeForAtRoot_closure9, A._EvaluateVisitor__scopeForAtRoot_closure10, A._EvaluateVisitor_visitEachRule_closure2, A._EvaluateVisitor_visitEachRule_closure3, A._EvaluateVisitor_visitEachRule__closure0, A._EvaluateVisitor_visitEachRule___closure0, A._EvaluateVisitor_visitAtRule_closure3, A._EvaluateVisitor_visitAtRule_closure6, A._EvaluateVisitor_visitForRule__closure0, A._EvaluateVisitor_visitIfRule_closure0, A._EvaluateVisitor_visitIfRule___closure0, A._EvaluateVisitor__visitDynamicImport__closure3, A._EvaluateVisitor__visitDynamicImport__closure4, A._EvaluateVisitor__visitDynamicImport__closure5, A._EvaluateVisitor_visitIncludeRule_closure3, A._EvaluateVisitor_visitMediaRule_closure4, A._EvaluateVisitor_visitMediaRule_closure6, A._EvaluateVisitor_visitStyleRule_closure4, A._EvaluateVisitor_visitStyleRule_closure5, A._EvaluateVisitor__warnForBogusCombinators_closure0, A._EvaluateVisitor_visitSupportsRule_closure4, A._EvaluateVisitor_visitWhileRule__closure0, A._EvaluateVisitor__slash_recommendation0, A._EvaluateVisitor_visitIfExpression_closure0, A._EvaluateVisitor_visitIfConditionOperation_closure0, A._EvaluateVisitor_visitListExpression_closure0, A._EvaluateVisitor_visitFunctionExpression_closure3, A._EvaluateVisitor__visitCalculation_closure0, A._EvaluateVisitor__checkCalculationArguments_check0, A._EvaluateVisitor__visitCalculationExpression__closure0, A._EvaluateVisitor__runUserDefinedCallable____closure0, A._EvaluateVisitor__runBuiltInCallable_closure4, A._EvaluateVisitor__evaluateArguments_closure3, A._EvaluateVisitor__evaluateArguments_closure4, A._EvaluateVisitor__evaluateArguments_closure6, A._EvaluateVisitor__evaluateMacroArguments_closure3, A._EvaluateVisitor__evaluateMacroArguments_closure4, A._EvaluateVisitor__evaluateMacroArguments_closure6, A._EvaluateVisitor_visitCssAtRule_closure4, A._EvaluateVisitor_visitCssKeyframeBlock_closure2, A._EvaluateVisitor_visitCssMediaRule_closure4, A._EvaluateVisitor_visitCssMediaRule_closure6, A._EvaluateVisitor_visitCssStyleRule_closure1, A._EvaluateVisitor_visitCssSupportsRule_closure4, A._EvaluateVisitor__performInterpolationHelper_closure0, A._EvaluateVisitor__withoutSlash_recommendation0, A._EvaluateVisitor__stackFrame_closure0, A._ImportedCssVisitor_visitCssAtRule_closure0, A._ImportedCssVisitor_visitCssMediaRule_closure0, A._ImportedCssVisitor_visitCssStyleRule_closure0, A._ImportedCssVisitor_visitCssSupportsRule_closure0, A._EvaluateVisitor_closure, A._EvaluateVisitor_closure0, A._EvaluateVisitor_closure1, A._EvaluateVisitor_closure2, A._EvaluateVisitor_closure3, A._EvaluateVisitor_closure4, A._EvaluateVisitor_closure5, A._EvaluateVisitor_closure6, A._EvaluateVisitor_closure7, A._EvaluateVisitor_closure8, A._EvaluateVisitor_closure9, A._EvaluateVisitor_closure10, A._EvaluateVisitor_closure11, A._EvaluateVisitor__loadModule__closure, A._EvaluateVisitor__combineCss_closure, A._EvaluateVisitor__combineCss_closure0, A._EvaluateVisitor__combineCss_visitModule, A._EvaluateVisitor__extendModules_closure, A._EvaluateVisitor__scopeForAtRoot_closure, A._EvaluateVisitor__scopeForAtRoot_closure0, A._EvaluateVisitor__scopeForAtRoot_closure1, A._EvaluateVisitor__scopeForAtRoot_closure2, A._EvaluateVisitor__scopeForAtRoot_closure3, A._EvaluateVisitor__scopeForAtRoot_closure4, A._EvaluateVisitor_visitEachRule_closure, A._EvaluateVisitor_visitEachRule_closure0, A._EvaluateVisitor_visitEachRule__closure, A._EvaluateVisitor_visitEachRule___closure, A._EvaluateVisitor_visitAtRule_closure, A._EvaluateVisitor_visitAtRule_closure2, A._EvaluateVisitor_visitForRule__closure, A._EvaluateVisitor_visitIfRule_closure, A._EvaluateVisitor_visitIfRule___closure, A._EvaluateVisitor__visitDynamicImport__closure, A._EvaluateVisitor__visitDynamicImport__closure0, A._EvaluateVisitor__visitDynamicImport__closure1, A._EvaluateVisitor_visitIncludeRule_closure0, A._EvaluateVisitor_visitMediaRule_closure0, A._EvaluateVisitor_visitMediaRule_closure2, A._EvaluateVisitor_visitStyleRule_closure0, A._EvaluateVisitor_visitStyleRule_closure1, A._EvaluateVisitor__warnForBogusCombinators_closure, A._EvaluateVisitor_visitSupportsRule_closure1, A._EvaluateVisitor_visitWhileRule__closure, A._EvaluateVisitor__slash_recommendation, A._EvaluateVisitor_visitIfExpression_closure, A._EvaluateVisitor_visitIfConditionOperation_closure, A._EvaluateVisitor_visitListExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure0, A._EvaluateVisitor__visitCalculation_closure, A._EvaluateVisitor__checkCalculationArguments_check, A._EvaluateVisitor__visitCalculationExpression__closure, A._EvaluateVisitor__runUserDefinedCallable____closure, A._EvaluateVisitor__runBuiltInCallable_closure1, A._EvaluateVisitor__evaluateArguments_closure, A._EvaluateVisitor__evaluateArguments_closure0, A._EvaluateVisitor__evaluateArguments_closure2, A._EvaluateVisitor__evaluateMacroArguments_closure, A._EvaluateVisitor__evaluateMacroArguments_closure0, A._EvaluateVisitor__evaluateMacroArguments_closure2, A._EvaluateVisitor_visitCssAtRule_closure1, A._EvaluateVisitor_visitCssKeyframeBlock_closure0, A._EvaluateVisitor_visitCssMediaRule_closure0, A._EvaluateVisitor_visitCssMediaRule_closure2, A._EvaluateVisitor_visitCssStyleRule_closure, A._EvaluateVisitor_visitCssSupportsRule_closure1, A._EvaluateVisitor__performInterpolationHelper_closure, A._EvaluateVisitor__withoutSlash_recommendation, A._EvaluateVisitor__stackFrame_closure, A._ImportedCssVisitor_visitCssAtRule_closure, A._ImportedCssVisitor_visitCssMediaRule_closure, A._ImportedCssVisitor_visitCssStyleRule_closure, A._ImportedCssVisitor_visitCssSupportsRule_closure, A.EveryCssVisitor_visitCssAtRule_closure, A.EveryCssVisitor_visitCssKeyframeBlock_closure, A.EveryCssVisitor_visitCssMediaRule_closure, A.EveryCssVisitor_visitCssStyleRule_closure, A.EveryCssVisitor_visitCssStylesheet_closure, A.EveryCssVisitor_visitCssSupportsRule_closure, A.IsCalculationSafeVisitor_visitListExpression_closure, A.IsPlainCssVisitor_visitIfExpression_closure, A.IsPlainCssVisitor_visitListExpression_closure, A.IsPlainCssVisitor_visitIfConditionOperation_closure, A.IsPlainCssVisitor__visitArgumentList_closure, A.ReplaceExpressionVisitor_visitListExpression_closure, A.ReplaceExpressionVisitor_visitIfConditionOperation_closure, A.ReplaceExpressionVisitor_visitArgumentList_closure, A.ReplaceExpressionVisitor_visitInterpolation_closure, A.SelectorSearchVisitor_visitComplexSelector_closure, A.SelectorSearchVisitor_visitCompoundSelector_closure, A.serialize_closure, A._SerializeVisitor_visitList_closure, A._SerializeVisitor_visitList_closure0, A._SerializeVisitor_visitList_closure1, A._SerializeVisitor_visitMap_closure, A._SerializeVisitor_visitSelectorList_closure, A.StatementSearchVisitor_visitIfRule_closure, A.StatementSearchVisitor_visitIfRule__closure0, A.StatementSearchVisitor_visitIfRule_closure0, A.StatementSearchVisitor_visitIfRule__closure, A.StatementSearchVisitor_visitChildren_closure, A.SingleMapping_SingleMapping$fromEntries_closure1, A.SingleMapping_toJson_closure, A.Highlighter$__closure, A.Highlighter$___closure, A.Highlighter$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.Chain_Chain$parse_closure, A.Chain_toTrace_closure, A.Chain_toString_closure0, A.Chain_toString__closure0, A.Chain_toString_closure, A.Chain_toString__closure, A.Trace__parseVM_closure, A.Trace$parseV8_closure, A.Trace$parseJSCore_closure, A.Trace$parseFirefox_closure, A.Trace$parseFriendly_closure, A.Trace_terse_closure, A.Trace_foldFrames_closure, A.Trace_foldFrames_closure0, A.Trace_toString_closure0, A.Trace_toString_closure, A.TransformByHandlers_transformByHandlers__closure, A.RateLimit__debounceAggregate_closure0, A.AnySelectorVisitor_visitComplexSelector_closure0, A.AnySelectorVisitor_visitCompoundSelector_closure0, A.argumentListClass__closure, A.argumentListClass__closure0, A.AsyncBuiltInCallable$mixin_closure0, A.AsyncBuiltInCallable_withDeprecationWarning_closure0, A._compileStylesheet_closure2, A.AsyncEnvironment__getVariableFromGlobalModule_closure0, A.AsyncEnvironment_setVariable_closure3, A.AsyncEnvironment__getFunctionFromGlobalModule_closure0, A.AsyncEnvironment__getMixinFromGlobalModule_closure0, A.AsyncEnvironment_toModule_closure0, A.AsyncEnvironment_toDummyModule_closure0, A._EnvironmentModule__EnvironmentModule_closure17, A._EnvironmentModule__EnvironmentModule_closure18, A._EnvironmentModule__EnvironmentModule_closure19, A._EnvironmentModule__EnvironmentModule_closure20, A._EnvironmentModule__EnvironmentModule_closure21, A._EnvironmentModule__EnvironmentModule_closure22, A._EnvironmentModule_couldHaveBeenConfigured_closure2, A._EvaluateVisitor_closure38, A._EvaluateVisitor_closure39, A._EvaluateVisitor_closure40, A._EvaluateVisitor_closure41, A._EvaluateVisitor_closure42, A._EvaluateVisitor_closure43, A._EvaluateVisitor_closure44, A._EvaluateVisitor_closure45, A._EvaluateVisitor_closure46, A._EvaluateVisitor_closure47, A._EvaluateVisitor_closure48, A._EvaluateVisitor_closure49, A._EvaluateVisitor_closure50, A._EvaluateVisitor__loadModule__closure5, A._EvaluateVisitor__combineCss_closure5, A._EvaluateVisitor__combineCss_closure6, A._EvaluateVisitor__combineCss_visitModule2, A._EvaluateVisitor__extendModules_closure5, A._EvaluateVisitor__scopeForAtRoot_closure17, A._EvaluateVisitor__scopeForAtRoot_closure18, A._EvaluateVisitor__scopeForAtRoot_closure19, A._EvaluateVisitor__scopeForAtRoot_closure20, A._EvaluateVisitor__scopeForAtRoot_closure21, A._EvaluateVisitor__scopeForAtRoot_closure22, A._EvaluateVisitor_visitEachRule_closure8, A._EvaluateVisitor_visitEachRule_closure9, A._EvaluateVisitor_visitEachRule__closure2, A._EvaluateVisitor_visitEachRule___closure2, A._EvaluateVisitor_visitAtRule_closure11, A._EvaluateVisitor_visitAtRule_closure14, A._EvaluateVisitor_visitForRule__closure2, A._EvaluateVisitor_visitIfRule_closure2, A._EvaluateVisitor_visitIfRule___closure2, A._EvaluateVisitor__visitDynamicImport__closure11, A._EvaluateVisitor__visitDynamicImport__closure12, A._EvaluateVisitor__visitDynamicImport__closure13, A._EvaluateVisitor_visitIncludeRule_closure9, A._EvaluateVisitor_visitMediaRule_closure12, A._EvaluateVisitor_visitMediaRule_closure14, A._EvaluateVisitor_visitStyleRule_closure12, A._EvaluateVisitor_visitStyleRule_closure13, A._EvaluateVisitor__warnForBogusCombinators_closure2, A._EvaluateVisitor_visitSupportsRule_closure10, A._EvaluateVisitor_visitWhileRule__closure2, A._EvaluateVisitor__slash_recommendation2, A._EvaluateVisitor_visitIfExpression_closure2, A._EvaluateVisitor_visitIfConditionOperation_closure2, A._EvaluateVisitor_visitListExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure9, A._EvaluateVisitor__visitCalculation_closure2, A._EvaluateVisitor__checkCalculationArguments_check2, A._EvaluateVisitor__visitCalculationExpression__closure2, A._EvaluateVisitor__runUserDefinedCallable____closure2, A._EvaluateVisitor__runBuiltInCallable_closure10, A._EvaluateVisitor__evaluateArguments_closure11, A._EvaluateVisitor__evaluateArguments_closure12, A._EvaluateVisitor__evaluateArguments_closure14, A._EvaluateVisitor__evaluateMacroArguments_closure11, A._EvaluateVisitor__evaluateMacroArguments_closure12, A._EvaluateVisitor__evaluateMacroArguments_closure14, A._EvaluateVisitor_visitCssAtRule_closure10, A._EvaluateVisitor_visitCssKeyframeBlock_closure6, A._EvaluateVisitor_visitCssMediaRule_closure12, A._EvaluateVisitor_visitCssMediaRule_closure14, A._EvaluateVisitor_visitCssStyleRule_closure5, A._EvaluateVisitor_visitCssSupportsRule_closure10, A._EvaluateVisitor__performInterpolationHelper_closure2, A._EvaluateVisitor__withoutSlash_recommendation2, A._EvaluateVisitor__stackFrame_closure2, A._ImportedCssVisitor_visitCssAtRule_closure2, A._ImportedCssVisitor_visitCssMediaRule_closure2, A._ImportedCssVisitor_visitCssStyleRule_closure2, A._ImportedCssVisitor_visitCssSupportsRule_closure2, A.AsyncImportCache_humanize_closure3, A.AsyncImportCache_humanize_closure4, A.AsyncImportCache_humanize_closure5, A.AsyncImportCache_humanize_closure6, A.booleanClass__closure, A.legacyBooleanClass__closure, A.legacyBooleanClass__closure0, A.BuiltInCallable$mixin_closure0, A.BuiltInCallable_withDeprecationWarning_closure0, A.calculationClass__closure, A.calculationClass__closure0, A.calculationClass__closure1, A.calculationClass__closure2, A.calculationClass__closure3, A.calculationClass__closure4, A.calculationClass__closure5, A.calculationOperationClass__closure, A.calculationOperationClass___closure, A.calculationOperationClass__closure1, A.calculationOperationClass__closure2, A.calculationOperationClass__closure3, A.calculationOperationClass__closure4, A.calculationInterpolationClass__closure1, A.calculationInterpolationClass__closure2, A.SassCalculation__verifyLength_closure0, A.updateCanonicalizeContextPrototype_closure, A.updateCanonicalizeContextPrototype_closure0, A.global_closure44, A.global_closure45, A.global_closure46, A.global_closure47, A.global_closure48, A.global_closure49, A.global_closure50, A.global_closure51, A.global_closure52, A.global_closure53, A.global_closure54, A.global_closure55, A.global_closure56, A.global_closure57, A.global_closure58, A.global_closure59, A.global_closure60, A.global_closure61, A.global_closure62, A.global_closure63, A.global_closure64, A.global_closure65, A.global_closure66, A.global_closure67, A.global_closure68, A.global_closure69, A.global_closure70, A.global_closure71, A.global_closure72, A.global_closure73, A.global_closure74, A.global_closure75, A.global_closure76, A.global_closure77, A.global_closure78, A.global_closure79, A.global__closure0, A.global_closure80, A.global_closure81, A.global_closure82, A.global_closure83, A.global_closure84, A.global_closure85, A.global_closure86, A.module_closure27, A.module_closure28, A.module_closure29, A.module_closure30, A.module_closure31, A.module_closure32, A.module_closure33, A.module_closure34, A.module_closure35, A.module_closure36, A.module_closure37, A.module_closure38, A.module_closure39, A.module_closure40, A.module__closure6, A.module_closure41, A.module_closure42, A.module_closure43, A.module_closure44, A.module_closure45, A.module_closure46, A.module_closure47, A.module_closure48, A.module__closure5, A.module_closure49, A.module_closure_toXyzNoMissing0, A.module_closure50, A._mix_closure0, A._complement_closure0, A._adjust_closure0, A._scale_closure0, A._change_closure0, A._ieHexStr_closure0, A._ieHexStr_closure_hexString0, A._updateComponents_closure1, A._updateComponents_closure2, A._adjustColor_closure0, A._functionString_closure0, A._removedColorFunction_closure0, A._rgb_closure0, A._hsl_closure0, A._parseChannels_closure1, A._parseChannels_closure2, A._colorFromChannels_closure1, A._colorFromChannels_closure2, A._channelFromValue_closure0, A._channelFunction_closure0, A._suggestScaleAndAdjust_closure0, A.colorClass__closure1, A.colorClass__closure3, A.colorClass__closure5, A.colorClass__closure7, A.colorClass___closure, A.colorClass__closure_changedValue, A.colorClass__closure9, A.colorClass__closure10, A.colorClass__closure11, A.colorClass__closure12, A.colorClass__closure13, A.colorClass__closure14, A.colorClass__closure15, A.colorClass__closure16, A.colorClass__closure17, A.colorClass__closure18, A.colorClass__closure19, A.colorClass__closure20, A.colorClass__closure21, A.colorClass__closure22, A.legacyColorClass_closure, A.legacyColorClass__closure, A.legacyColorClass_closure0, A.legacyColorClass_closure1, A.legacyColorClass_closure2, A.legacyColorClass_closure3, A.SassColor$_forSpace_closure0, A.compileAsync__closure, A.compileStringAsync__closure, A.compileStringAsync__closure0, A._wrapAsyncSassExceptions_closure, A._parseFunctions__closure2, A._parseFunctions__closure3, A.nodePackageImporterClass__closure, A._compileStylesheet_closure1, A.AsyncCompiler_addCompilation_closure, A.compilerClass__closure, A.compilerClass__closure0, A.compilerClass__closure1, A.compilerClass__closure2, A.asyncCompilerClass__closure, A.asyncCompilerClass__closure0, A.asyncCompilerClass__closure1, A.asyncCompilerClass__closure2, A.ComplexSelectorComponent_toString_closure0, A.CompoundSelector_hasComplicatedSuperselectorSemantics_closure0, A._disallowedFunctionNames_closure0, A.Deprecation_fromId_closure0, A.DeprecationProcessingLogger_summarize_closure1, A.DeprecationProcessingLogger_summarize_closure2, A.versionClass__closure, A.versionClass__closure0, A.EachRule_toString_closure0, A.Environment__getVariableFromGlobalModule_closure0, A.Environment_setVariable_closure3, A.Environment__getFunctionFromGlobalModule_closure0, A.Environment__getMixinFromGlobalModule_closure0, A.Environment_toModule_closure0, A.Environment_toDummyModule_closure0, A._EnvironmentModule__EnvironmentModule_closure11, A._EnvironmentModule__EnvironmentModule_closure12, A._EnvironmentModule__EnvironmentModule_closure13, A._EnvironmentModule__EnvironmentModule_closure14, A._EnvironmentModule__EnvironmentModule_closure15, A._EnvironmentModule__EnvironmentModule_closure16, A._EnvironmentModule_couldHaveBeenConfigured_closure1, A._EvaluateVisitor_closure25, A._EvaluateVisitor_closure26, A._EvaluateVisitor_closure27, A._EvaluateVisitor_closure28, A._EvaluateVisitor_closure29, A._EvaluateVisitor_closure30, A._EvaluateVisitor_closure31, A._EvaluateVisitor_closure32, A._EvaluateVisitor_closure33, A._EvaluateVisitor_closure34, A._EvaluateVisitor_closure35, A._EvaluateVisitor_closure36, A._EvaluateVisitor_closure37, A._EvaluateVisitor__loadModule__closure3, A._EvaluateVisitor__combineCss_closure3, A._EvaluateVisitor__combineCss_closure4, A._EvaluateVisitor__combineCss_visitModule1, A._EvaluateVisitor__extendModules_closure3, A._EvaluateVisitor__scopeForAtRoot_closure11, A._EvaluateVisitor__scopeForAtRoot_closure12, A._EvaluateVisitor__scopeForAtRoot_closure13, A._EvaluateVisitor__scopeForAtRoot_closure14, A._EvaluateVisitor__scopeForAtRoot_closure15, A._EvaluateVisitor__scopeForAtRoot_closure16, A._EvaluateVisitor_visitEachRule_closure5, A._EvaluateVisitor_visitEachRule_closure6, A._EvaluateVisitor_visitEachRule__closure1, A._EvaluateVisitor_visitEachRule___closure1, A._EvaluateVisitor_visitAtRule_closure7, A._EvaluateVisitor_visitAtRule_closure10, A._EvaluateVisitor_visitForRule__closure1, A._EvaluateVisitor_visitIfRule_closure1, A._EvaluateVisitor_visitIfRule___closure1, A._EvaluateVisitor__visitDynamicImport__closure7, A._EvaluateVisitor__visitDynamicImport__closure8, A._EvaluateVisitor__visitDynamicImport__closure9, A._EvaluateVisitor_visitIncludeRule_closure6, A._EvaluateVisitor_visitMediaRule_closure8, A._EvaluateVisitor_visitMediaRule_closure10, A._EvaluateVisitor_visitStyleRule_closure8, A._EvaluateVisitor_visitStyleRule_closure9, A._EvaluateVisitor__warnForBogusCombinators_closure1, A._EvaluateVisitor_visitSupportsRule_closure7, A._EvaluateVisitor_visitWhileRule__closure1, A._EvaluateVisitor__slash_recommendation1, A._EvaluateVisitor_visitIfExpression_closure1, A._EvaluateVisitor_visitIfConditionOperation_closure1, A._EvaluateVisitor_visitListExpression_closure1, A._EvaluateVisitor_visitFunctionExpression_closure6, A._EvaluateVisitor__visitCalculation_closure1, A._EvaluateVisitor__checkCalculationArguments_check1, A._EvaluateVisitor__visitCalculationExpression__closure1, A._EvaluateVisitor__runUserDefinedCallable____closure1, A._EvaluateVisitor__runBuiltInCallable_closure7, A._EvaluateVisitor__evaluateArguments_closure7, A._EvaluateVisitor__evaluateArguments_closure8, A._EvaluateVisitor__evaluateArguments_closure10, A._EvaluateVisitor__evaluateMacroArguments_closure7, A._EvaluateVisitor__evaluateMacroArguments_closure8, A._EvaluateVisitor__evaluateMacroArguments_closure10, A._EvaluateVisitor_visitCssAtRule_closure7, A._EvaluateVisitor_visitCssKeyframeBlock_closure4, A._EvaluateVisitor_visitCssMediaRule_closure8, A._EvaluateVisitor_visitCssMediaRule_closure10, A._EvaluateVisitor_visitCssStyleRule_closure3, A._EvaluateVisitor_visitCssSupportsRule_closure7, A._EvaluateVisitor__performInterpolationHelper_closure1, A._EvaluateVisitor__withoutSlash_recommendation1, A._EvaluateVisitor__stackFrame_closure1, A._ImportedCssVisitor_visitCssAtRule_closure1, A._ImportedCssVisitor_visitCssMediaRule_closure1, A._ImportedCssVisitor_visitCssStyleRule_closure1, A._ImportedCssVisitor_visitCssSupportsRule_closure1, A.EveryCssVisitor_visitCssAtRule_closure0, A.EveryCssVisitor_visitCssKeyframeBlock_closure0, A.EveryCssVisitor_visitCssMediaRule_closure0, A.EveryCssVisitor_visitCssStyleRule_closure0, A.EveryCssVisitor_visitCssStylesheet_closure0, A.EveryCssVisitor_visitCssSupportsRule_closure0, A.exceptionClass__closure, A.exceptionClass__closure0, A.exceptionClass__closure1, A.ExtensionStore_extensionsWhereTarget_closure0, A.ExtensionStore__extendComplex_closure0, A.ExtensionStore__extendComplex__closure0, A.ExtensionStore__extendCompound_closure2, A.ExtensionStore__extendCompound_closure3, A.ExtensionStore__extendCompound_closure4, A.ExtensionStore__extendSimple_withoutPseudo0, A.ExtensionStore__extendSimple_closure1, A.ExtensionStore__extendSimple_closure2, A.ExtensionStore__extendPseudo_closure4, A.ExtensionStore__extendPseudo_closure5, A.ExtensionStore__extendPseudo_closure6, A.ExtensionStore__extendPseudo_closure7, A.ExtensionStore__extendPseudo_closure8, A.ExtensionStore__trim_closure1, A.ExtensionStore__trim_closure2, A.FilesystemImporter_canonicalize_closure0, A.functionClass__closure, A.functionClass__closure0, A.unifyComplex_closure0, A._weaveParents_closure4, A._weaveParents_closure5, A._weaveParents_closure6, A._mustUnify_closure0, A._mustUnify__closure0, A.paths__closure0, A.paths___closure0, A.listIsSuperselector_closure0, A.listIsSuperselector__closure0, A.complexIsSuperselector_closure1, A.complexIsSuperselector_closure2, A._compatibleWithPreviousCombinator_closure0, A.compoundIsSuperselector_closure0, A._selectorPseudoIsSuperselector_closure6, A._selectorPseudoIsSuperselector_closure7, A._selectorPseudoIsSuperselector_closure8, A._selectorPseudoIsSuperselector_closure9, A._selectorPseudoIsSuperselector_closure10, A._selectorPseudoIsSuperselector__closure0, A._selectorPseudoIsSuperselector___closure1, A._selectorPseudoIsSuperselector___closure2, A._selectorPseudoIsSuperselector_closure11, A._selectorPseudoIsSuperselector_closure12, A._selectorPseudoArgs_closure1, A._selectorPseudoArgs_closure2, A.globalFunctions_closure0, A.HwbColorSpace_convert_toRgb0, A.IDSelector_unify_closure0, A.IfRuleClause$__closure0, A.IfRuleClause$___closure0, A.immutableMapToDartMap_closure, A.NodeImporter__tryPath_closure0, A.ImportCache_humanize_closure3, A.ImportCache_humanize_closure4, A.ImportCache_humanize_closure5, A.ImportCache_humanize_closure6, A.Interpolation_toString_closure0, A.InterpolationMap_mapException_closure0, A._realCasePath_helper0, A._realCasePath_helper__closure0, A.IsCalculationSafeVisitor_visitListExpression_closure0, A.IsPlainCssVisitor_visitIfExpression_closure0, A.IsPlainCssVisitor_visitListExpression_closure0, A.IsPlainCssVisitor_visitIfConditionOperation_closure0, A.IsPlainCssVisitor__visitArgumentList_closure0, A.listDir__closure1, A.listDir__closure2, A.listDir_closure_list0, A.listDir__list_closure0, A.render_closure0, A._parseFunctions__closure, A._parseFunctions___closure2, A._parseFunctions__closure0, A._parseFunctions__closure1, A._parseFunctions___closure, A._parseImporter_closure, A._parseImporter__closure, A._parseImporter___closure, A.ListExpression_toString_closure0, A._length_closure2, A._nth_closure0, A._setNth_closure0, A._join_closure0, A._append_closure2, A._zip_closure0, A._zip__closure2, A._zip__closure3, A._zip__closure4, A._index_closure2, A._separator_closure0, A._isBracketed_closure0, A._slash_closure0, A.SelectorList_asSassList_closure0, A.SelectorList_nestWithin_closure0, A.SelectorList_nestWithin__closure1, A.SelectorList_nestWithin__closure2, A.SelectorList__nestWithinCompound_closure2, A.SelectorList__nestWithinCompound_closure3, A.SelectorList__nestWithinCompound_closure4, A.SelectorList_withAdditionalCombinators_closure0, A.listClass__closure, A.legacyListClass_closure, A.legacyListClass__closure, A.legacyListClass_closure1, A.legacyListClass_closure2, A.legacyListClass_closure4, A.SassList_isBlank_closure0, A._get_closure0, A._set_closure1, A._set__closure2, A._set_closure2, A._set__closure1, A._merge_closure1, A._merge_closure2, A._merge__closure0, A._deepMerge_closure0, A._deepRemove_closure0, A._deepRemove__closure0, A._remove_closure1, A._remove_closure2, A._keys_closure0, A._values_closure0, A._hasKey_closure0, A._modify_modifyNestedMap0, A.MapExtensions_get_pairs_closure0, A.mapClass__closure, A.mapClass__closure0, A.legacyMapClass_closure, A.legacyMapClass__closure, A.legacyMapClass__closure0, A.legacyMapClass_closure2, A.legacyMapClass_closure3, A.legacyMapClass_closure4, A.global_closure43, A.module_closure26, A._ceil_closure0, A._clamp_closure0, A._floor_closure0, A._max_closure0, A._min_closure0, A._round_closure0, A._hypot_closure0, A._hypot__closure0, A._log_closure0, A._pow_closure0, A._atan2_closure0, A._compatible_closure0, A._isUnitless_closure0, A._unit_closure0, A._percentage_closure0, A._randomFunction_closure0, A._div_closure0, A._singleArgumentMathFunc_closure0, A._numberFunction_closure0, A._shared_closure3, A._shared_closure4, A._shared_closure5, A._shared_closure6, A.moduleFunctions_closure2, A.moduleFunctions_closure3, A.moduleFunctions__closure0, A.moduleFunctions_closure4, A.mixinClass__closure, A.mixinClass__closure0, A.ModifiableCssNode_hasFollowingSibling_closure0, A.NodePackageImporter__nodePackageExportsResolve_closure3, A.NodePackageImporter__nodePackageExportsResolve_closure4, A.NodePackageImporter__nodePackageExportsResolve_closure5, A.NodePackageImporter__nodePackageExportsResolve_closure6, A.NodePackageImporter__nodePackageExportsResolve__closure1, A.NodePackageImporter__nodePackageExportsResolve__closure2, A.NodePackageImporter__getMainExport_closure0, A.legacyNullClass__closure, A.numberClass__closure, A.numberClass__closure0, A.numberClass__closure1, A.numberClass__closure2, A.numberClass__closure3, A.numberClass__closure4, A.numberClass__closure5, A.numberClass__closure6, A.numberClass__closure7, A.numberClass__closure8, A.numberClass__closure9, A.numberClass__closure12, A.numberClass__closure13, A.numberClass__closure14, A.numberClass__closure15, A.numberClass__closure16, A.numberClass__closure17, A.numberClass__closure18, A.numberClass__closure19, A.legacyNumberClass_closure, A.legacyNumberClass_closure0, A.legacyNumberClass_closure2, A._parseNumber_closure, A._parseNumber_closure0, A.SassNumber__coerceOrConvertValue_closure3, A.SassNumber__coerceOrConvertValue_closure5, A.SassNumber_multiplyUnits_closure3, A.SassNumber_multiplyUnits_closure5, A.SassNumber__areAnyConvertible_closure0, A.SassNumber__canonicalizeUnitList_closure0, A.SassNumber_unitSuggestion_closure1, A.SassNumber_unitSuggestion_closure2, A.ParameterList_verify_closure1, A.ParameterList_verify_closure2, A.ParentStatement_closure0, A.ParentStatement__closure0, A.loadParserExports_closure, A.loadParserExports_closure0, A.loadParserExports_closure1, A.loadParserExports_closure2, A.loadParserExports_closure3, A.loadParserExports_closure4, A._updateLazyFileSpanPrototype_closure0, A._updateLazyFileSpanPrototype_closure1, A._updateLazyFileSpanPrototype_closure2, A._updateAstPrototypes_closure, A._updateAstPrototypes_closure0, A._updateAstPrototypes_closure1, A._updateAstPrototypes_closure2, A._updateAstPrototypes_closure7, A._updateAstPrototypes_closure8, A._updateAstPrototypes_closure9, A._updateAstPrototypes_closure10, A._updateAstPrototypes_closure11, A._updateAstPrototypes_closure12, A._updateAstPrototypes_closure13, A._addSupportsConditionToInterpolation_closure, A.Parser_escape_closure0, A.Parser_scanIdentChar_matches0, A._PrefixedKeys_iterator_closure0, A.PseudoSelector_specificity__closure1, A.PseudoSelector_specificity__closure2, A.PseudoSelector_unify_closure0, A.JSClassExtension_setCustomInspect_closure, A.ReplaceExpressionVisitor_visitListExpression_closure0, A.ReplaceExpressionVisitor_visitIfConditionOperation_closure0, A.ReplaceExpressionVisitor_visitArgumentList_closure0, A.ReplaceExpressionVisitor_visitInterpolation_closure0, A.SassParser_styleRuleSelector_closure0, A.SassParser__peekIndentation_closure1, A.SassParser__peekIndentation_closure2, A.SassParser__tryTrailingSemicolon_closure0, A._wrapMain_closure, A._wrapMain_closure0, A._IsBogusVisitor_visitComplexSelector_closure0, A._IsUselessVisitor_visitComplexSelector_closure0, A._nest_closure0, A._nest__closure1, A._append_closure1, A._append__closure1, A._append___closure0, A._extend_closure0, A._replace_closure0, A._unify_closure0, A._isSuperselector_closure0, A._simpleSelectors_closure0, A._simpleSelectors__closure0, A._parse_closure0, A.SelectorSearchVisitor_visitComplexSelector_closure0, A.SelectorSearchVisitor_visitCompoundSelector_closure0, A.serialize_closure0, A._SerializeVisitor_visitList_closure2, A._SerializeVisitor_visitList_closure3, A._SerializeVisitor_visitList_closure4, A._SerializeVisitor_visitMap_closure0, A._SerializeVisitor_visitSelectorList_closure0, A.SimpleSelector_isSuperselector_closure0, A.SimpleSelector_isSuperselector__closure0, A.SingleUnitSassNumber__coerceToUnit_closure0, A.SingleUnitSassNumber__coerceValueToUnit_closure0, A.SingleUnitSassNumber_multiplyUnits_closure1, A.SourceInterpolationVisitor__visitArguments_closure, A.SourceInterpolationVisitor_visitIfConditionOperation_closure, A.SourceInterpolationVisitor_visitListExpression_closure, A.SourceMapBuffer_buildSourceMap_closure0, A.updateSourceSpanPrototype_closure0, A.updateSourceSpanPrototype_closure1, A.updateSourceSpanPrototype_closure2, A.updateSourceSpanPrototype__closure, A.updateSourceSpanPrototype_closure3, A.updateSourceSpanPrototype_closure4, A.updateSourceSpanPrototype_closure5, A.updateSourceSpanPrototype_closure6, A.StatementSearchVisitor_visitIfRule_closure1, A.StatementSearchVisitor_visitIfRule__closure2, A.StatementSearchVisitor_visitIfRule_closure2, A.StatementSearchVisitor_visitIfRule__closure1, A.StatementSearchVisitor_visitChildren_closure0, A.module_closure25, A.module__closure3, A.module__closure4, A._unquote_closure0, A._quote_closure0, A._length_closure1, A._insert_closure0, A._index_closure1, A._slice_closure0, A._toUpperCase_closure0, A._toLowerCase_closure0, A._uniqueId_closure0, A.StringExtension_toCssIdentifier_writeEscape, A.StringExtension_toCssIdentifier_consumeSurrogatePair, A.stringClass__closure, A.stringClass__closure0, A.stringClass__closure1, A.stringClass__closure2, A.stringClass__closure3, A.legacyStringClass_closure, A.legacyStringClass_closure0, A.StylesheetParser__declarationOrBuffer_closure5, A.StylesheetParser__expression_addSingleExpression0, A.StylesheetParser__expression_addOperator0, A.StylesheetParser__isHexColor_closure0, A.StylesheetParser__unicodeRange_closure1, A.StylesheetParser__unicodeRange_closure2, A.StylesheetParser_trySpecialFunction_closure0, A._UnprefixedKeys_iterator_closure1, A._UnprefixedKeys_iterator_closure2, A._exactlyOne_closure0, A.futureToPromise__closure0, A.indent_closure0, A.flattenVertically_closure1, A.flattenVertically_closure2, A.valueClass__closure, A.valueClass__closure0, A.valueClass__closure1, A.valueClass__closure2, A.valueClass__closure3, A.valueClass__closure4, A.valueClass__closure5, A.valueClass__closure7, A.valueClass__closure8, A.valueClass__closure9, A.valueClass__closure10, A.valueClass__closure11, A.valueClass__closure12, A.valueClass__closure13, A.valueClass__closure14, A.valueClass__closure15, A.valueClass__closure17, A.valueClass__closure18]); + _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.Primitives_functionNoSuchMethod_closure, A.JsLinkedHashMap_addAll_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A.Future_wait_handleError, A._Future__propagateToListeners_handleWhenCompleteCallback_closure0, A.Stream_Stream$fromFuture_closure0, A._AddStreamState_makeErrorHandler_closure, A._HashMap_addAll_closure, A.HashMap_HashMap$from_closure, A.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_addAll_closure, A.MapBase_mapToString_closure, A._JsonMap_addAll_closure, A._JsonStringifier_writeMap_closure, A.NoSuchMethodError_toString_closure, A.Uri_parseIPv6Address_error, A.Parser_parse_closure, A.FutureGroup_add_closure0, A.StreamQueue__ensureListening_closure1, A.futureToPromise_closure, A.PathMap__create_closure, A.IfRule_toString_closure, A.ComplexSelector_specificity_closure, A.CompoundSelector_specificity_closure, A.ExtensionStore_clone_closure, A._weaveParents_closure, A.paths_closure, A._nest__closure0, A._append__closure0, A.watchDir_closure0, A.ParcelWatcher_subscribe_closure, A.StylesheetParser__styleRule_closure, A.StylesheetParser__withStyleRuleChildren_closure, A.StylesheetParser__tryDeclarationChildren_closure, A.StylesheetParser__atRootRule_closure, A.StylesheetParser__atRootRule_closure0, A.StylesheetParser__eachRule_closure, A.StylesheetParser__functionRule_closure, A.StylesheetParser__forRule_closure0, A.StylesheetParser__includeRule_closure, A.StylesheetParser_mediaRule_closure, A.StylesheetParser__mixinRule_closure, A.StylesheetParser_mozDocumentRule_closure0, A.StylesheetParser_supportsRule_closure, A.StylesheetParser__whileRule_closure, A.StylesheetParser_unknownAtRule_closure, A.longestCommonSubsequence_backtrack, A.mapAddAll2_closure, A.SassNumber_plus_closure, A.SassNumber_minus_closure, A.SassNumber__canonicalMultiplier_closure, A._EvaluateVisitor__closure3, A._EvaluateVisitor__closure4, A._EvaluateVisitor_visitForwardRule_closure1, A._EvaluateVisitor_visitForwardRule_closure2, A._EvaluateVisitor_visitUseRule_closure0, A._EvaluateVisitor__evaluateArguments_closure5, A._EvaluateVisitor__evaluateMacroArguments_closure5, A._EvaluateVisitor__addRestMap_closure0, A._EvaluateVisitor__closure, A._EvaluateVisitor__closure0, A._EvaluateVisitor_visitForwardRule_closure, A._EvaluateVisitor_visitForwardRule_closure0, A._EvaluateVisitor_visitUseRule_closure, A._EvaluateVisitor__evaluateArguments_closure1, A._EvaluateVisitor__evaluateMacroArguments_closure1, A._EvaluateVisitor__addRestMap_closure, A.SingleMapping_toJson_closure0, A.Highlighter__collateLines_closure0, A.Frame_Frame$parseV8_closure_parseJsLocation, A.TransformByHandlers_transformByHandlers__closure1, A.RateLimit__debounceAggregate_closure, A._EvaluateVisitor__closure11, A._EvaluateVisitor__closure12, A._EvaluateVisitor_visitForwardRule_closure5, A._EvaluateVisitor_visitForwardRule_closure6, A._EvaluateVisitor_visitUseRule_closure2, A._EvaluateVisitor__evaluateArguments_closure13, A._EvaluateVisitor__evaluateMacroArguments_closure13, A._EvaluateVisitor__addRestMap_closure2, A.calculationOperationClass__closure0, A.calculationInterpolationClass__closure, A.calculationInterpolationClass__closure0, A.colorClass__closure, A.colorClass__closure0, A.colorClass__closure2, A.colorClass__closure4, A.colorClass__closure6, A.colorClass__closure8, A.legacyColorClass_closure4, A.legacyColorClass_closure5, A.legacyColorClass_closure6, A.legacyColorClass_closure7, A._parseFunctions_closure0, A.ComplexSelector_specificity_closure0, A.CompoundSelector_specificity_closure0, A._EvaluateVisitor__closure7, A._EvaluateVisitor__closure8, A._EvaluateVisitor_visitForwardRule_closure3, A._EvaluateVisitor_visitForwardRule_closure4, A._EvaluateVisitor_visitUseRule_closure1, A._EvaluateVisitor__evaluateArguments_closure9, A._EvaluateVisitor__evaluateMacroArguments_closure9, A._EvaluateVisitor__addRestMap_closure1, A.ExtensionStore_clone_closure0, A._weaveParents_closure3, A.paths_closure0, A.IfRule_toString_closure0, A.main_closure, A.main_closure0, A.render_closure1, A._parseFunctions_closure, A.listClass__closure0, A.legacyListClass_closure0, A.legacyListClass_closure3, A.mapClass__closure1, A.legacyMapClass_closure0, A.legacyMapClass_closure1, A.numberClass__closure10, A.numberClass__closure11, A.legacyNumberClass_closure1, A.legacyNumberClass_closure3, A.SassNumber_plus_closure0, A.SassNumber_minus_closure0, A.SassNumber__canonicalMultiplier_closure0, A._updateAstPrototypes_closure3, A._updateAstPrototypes_closure4, A._updateAstPrototypes_closure5, A._updateAstPrototypes_closure6, A.JSClassExtension_get_defineStaticMethod_closure, A.JSClassExtension_get_defineMethod_closure, A.JSClassExtension_get_defineGetter_closure, A._nest__closure2, A._append__closure2, A.legacyStringClass_closure1, A.StylesheetParser__styleRule_closure0, A.StylesheetParser__styleRule_closure1, A.StylesheetParser__withStyleRuleChildren_closure0, A.StylesheetParser__tryDeclarationChildren_closure0, A.StylesheetParser__atRootRule_closure1, A.StylesheetParser__atRootRule_closure2, A.StylesheetParser__eachRule_closure0, A.StylesheetParser__functionRule_closure0, A.StylesheetParser__forRule_closure2, A.StylesheetParser__includeRule_closure0, A.StylesheetParser_mediaRule_closure0, A.StylesheetParser__mixinRule_closure0, A.StylesheetParser_mozDocumentRule_closure2, A.StylesheetParser_supportsRule_closure0, A.StylesheetParser__whileRule_closure0, A.StylesheetParser_unknownAtRule_closure0, A.futureToPromise_closure0, A.futureToPromise__closure1, A.objectToMap_closure, A.longestCommonSubsequence_backtrack0, A.mapAddAll2_closure0, A.valueClass__closure6, A.valueClass__closure16]); + _inherit(A.CastList, A._CastListBase); + _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A.UnmodifiableMapBase, A._JsonMap, A.MergedMapView, A.MergedMapView0]); + _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.NoSuchMethodError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError]); + _inherit(A.UnmodifiableListBase, A.ListBase); + _inheritMany(A.UnmodifiableListBase, [A.CodeUnits, A.UnmodifiableListView]); + _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainCoreFuture_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteErrorObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A.Stream_length_closure0, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._AddStreamState_cancel_closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.Parser__setOption_closure, A.StreamGroup_add_closure, A.StreamGroup_add_closure0, A.StreamGroup__listenToStream_closure, A.StreamQueue__ensureListening_closure0, A._isStrictMode_closure, A.ReplAdapter_runAsync_closure, A.ParsedPath__splitExtension_closure0, A.IfConditionOperation_toInterpolation_closure, A.PseudoSelector_specificity_closure, A.AsyncEnvironment_setVariable_closure, A.AsyncEnvironment_setVariable_closure1, A.AsyncImportCache_canonicalize_closure, A.AsyncImportCache__canonicalize_closure, A.AsyncImportCache_importCanonical_closure, A.Environment_setVariable_closure, A.Environment_setVariable_closure1, A.ExecutableOptions__parser_closure, A.ExecutableOptions_interactive_closure, A.ExecutableOptions_fatalDeprecations_closure, A.ExtensionStore__registerSelector_closure, A.ExtensionStore_addExtension_closure, A.ExtensionStore_addExtension_closure0, A.ExtensionStore_addExtension_closure1, A.ExtensionStore__extendExistingExtensions_closure, A.ExtensionStore__extendExistingExtensions_closure0, A.ExtensionStore_addExtensions_closure, A.ExtensionStore_clone__closure, A._changeColor_closure, A.ImportCache_canonicalize_closure, A.ImportCache__canonicalize_closure, A.ImportCache_importCanonical_closure, A.resolveImportPath_closure, A.resolveImportPath_closure0, A._tryPathAsDirectory_closure, A._realCasePath_helper_closure, A._readFile_closure, A.writeFile_closure, A.deleteFile_closure, A.fileExists_closure, A.dirExists_closure, A.linkExists_closure, A.ensureDir_closure, A.listDir_closure, A.realpath_closure, A.modificationTime_closure, A.watchDir_closure, A.watchDir_closure5, A.watchDir__closure, A.AtRootQueryParser_parse_closure, A.KeyframeSelectorParser_parse_closure, A.MediaQueryParser_parse_closure, A.Parser__parseIdentifier_closure, A.Parser_spanFrom_closure, A.Parser_spanFromPosition_closure, A.SassParser_children_closure, A.SelectorParser_parse_closure, A.SelectorParser_parseCompoundSelector_closure, A.StylesheetParser_parse_closure, A.StylesheetParser_parse__closure, A.StylesheetParser_parseParameterList_closure, A.StylesheetParser_parseVariableDeclaration_closure, A.StylesheetParser_parseUseRule_closure, A.StylesheetParser__parseSingleProduction_closure, A.StylesheetParser__statement_closure, A.StylesheetParser_variableDeclarationWithoutNamespace_closure, A.StylesheetParser_variableDeclarationWithoutNamespace_closure0, A.StylesheetParser__declarationOrBuffer_closure, A.StylesheetParser__declarationOrBuffer_closure0, A.StylesheetParser__declarationOrBuffer_closure2, A.StylesheetParser__propertyOrVariableDeclaration_closure, A.StylesheetParser__forRule_closure, A.StylesheetParser__memberList_closure, A.StylesheetParser_mozDocumentRule_closure, A.StylesheetParser__expression_resetState, A.StylesheetParser__expression_resolveOneOperation, A.StylesheetParser__expression_resolveOperations, A.StylesheetParser__expression_resolveSpaceExpressions, A.StylesheetParser_expressionUntilComma_closure, A.StylesheetParser_interpolatedStringToken_closure, A.StylesheetParser_namespacedExpression_closure, A.StylesheetParser__interpolatedDeclarationValue_closure, A.StylesheetParser__expressionUntilComparison_closure, A.StylesheetParser__publicIdentifier_closure, A.StylesheetGraph_modifiedSince_transitiveModificationTime_closure, A.StylesheetGraph__add_closure, A.StylesheetGraph_addCanonical_closure, A.StylesheetGraph_reload_closure, A.StylesheetGraph__nodeFor_closure, A.StylesheetGraph__nodeFor_closure0, A.SassNumber__coerceOrConvertValue_compatibilityException, A.SassNumber__coerceOrConvertValue_closure0, A.SassNumber__coerceOrConvertValue_closure2, A.SassNumber_multiplyUnits_closure0, A.SassNumber_multiplyUnits_closure2, A.SingleUnitSassNumber_multiplyUnits_closure0, A._EvaluateVisitor__closure6, A._EvaluateVisitor__closure5, A._EvaluateVisitor_run_closure0, A._EvaluateVisitor_run__closure0, A._EvaluateVisitor__loadModule_closure1, A._EvaluateVisitor__loadModule_closure2, A._EvaluateVisitor__loadModule__closure2, A._EvaluateVisitor__execute_closure0, A._EvaluateVisitor__extendModules_closure2, A._EvaluateVisitor_visitAtRootRule_closure1, A._EvaluateVisitor_visitAtRootRule_closure2, A._EvaluateVisitor__scopeForAtRoot__closure0, A._EvaluateVisitor_visitContentRule_closure0, A._EvaluateVisitor_visitDeclaration_closure0, A._EvaluateVisitor_visitEachRule_closure4, A._EvaluateVisitor_visitAtRule_closure4, A._EvaluateVisitor_visitAtRule_closure5, A._EvaluateVisitor_visitAtRule__closure0, A._EvaluateVisitor_visitForRule_closure4, A._EvaluateVisitor_visitForRule_closure5, A._EvaluateVisitor_visitForRule_closure6, A._EvaluateVisitor_visitForRule_closure7, A._EvaluateVisitor_visitForRule_closure8, A._EvaluateVisitor__registerCommentsForModule_closure0, A._EvaluateVisitor_visitIfRule__closure0, A._EvaluateVisitor__visitDynamicImport_closure0, A._EvaluateVisitor__visitDynamicImport__closure6, A._EvaluateVisitor__applyMixin_closure1, A._EvaluateVisitor__applyMixin__closure2, A._EvaluateVisitor__applyMixin_closure2, A._EvaluateVisitor__applyMixin__closure1, A._EvaluateVisitor__applyMixin___closure0, A._EvaluateVisitor__applyMixin____closure0, A._EvaluateVisitor_visitIncludeRule_closure2, A._EvaluateVisitor_visitIncludeRule_closure4, A._EvaluateVisitor_visitMediaRule_closure3, A._EvaluateVisitor_visitMediaRule_closure5, A._EvaluateVisitor_visitMediaRule__closure0, A._EvaluateVisitor_visitMediaRule___closure0, A._EvaluateVisitor_visitStyleRule_closure3, A._EvaluateVisitor_visitStyleRule_closure6, A._EvaluateVisitor_visitStyleRule__closure0, A._EvaluateVisitor_visitSupportsRule_closure2, A._EvaluateVisitor_visitSupportsRule_closure3, A._EvaluateVisitor_visitSupportsRule__closure0, A._EvaluateVisitor__visitSupportsCondition_closure0, A._EvaluateVisitor_visitVariableDeclaration_closure2, A._EvaluateVisitor_visitVariableDeclaration_closure3, A._EvaluateVisitor_visitVariableDeclaration_closure4, A._EvaluateVisitor_visitWarnRule_closure0, A._EvaluateVisitor_visitWhileRule_closure0, A._EvaluateVisitor_visitBinaryOperationExpression_closure0, A._EvaluateVisitor_visitVariableExpression_closure0, A._EvaluateVisitor_visitUnaryOperationExpression_closure0, A._EvaluateVisitor_visitFunctionExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure4, A._EvaluateVisitor__visitCalculationExpression_closure0, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure0, A._EvaluateVisitor__runUserDefinedCallable_closure0, A._EvaluateVisitor__runUserDefinedCallable__closure0, A._EvaluateVisitor__runUserDefinedCallable___closure0, A._EvaluateVisitor__runFunctionCallable_closure0, A._EvaluateVisitor__runBuiltInCallable_closure2, A._EvaluateVisitor__runBuiltInCallable_closure3, A._EvaluateVisitor__verifyArguments_closure0, A._EvaluateVisitor_visitCssAtRule_closure2, A._EvaluateVisitor_visitCssAtRule_closure3, A._EvaluateVisitor_visitCssKeyframeBlock_closure1, A._EvaluateVisitor_visitCssMediaRule_closure3, A._EvaluateVisitor_visitCssMediaRule_closure5, A._EvaluateVisitor_visitCssMediaRule__closure0, A._EvaluateVisitor_visitCssMediaRule___closure0, A._EvaluateVisitor_visitCssStyleRule_closure2, A._EvaluateVisitor_visitCssStyleRule__closure0, A._EvaluateVisitor_visitCssSupportsRule_closure2, A._EvaluateVisitor_visitCssSupportsRule_closure3, A._EvaluateVisitor_visitCssSupportsRule__closure0, A._EvaluateVisitor__serialize_closure0, A._EvaluateVisitor__expressionNode_closure0, A._EvaluateVisitor__closure2, A._EvaluateVisitor__closure1, A._EvaluateVisitor_run_closure, A._EvaluateVisitor_run__closure, A._EvaluateVisitor_runExpression_closure, A._EvaluateVisitor_runExpression__closure, A._EvaluateVisitor_runExpression___closure, A._EvaluateVisitor_runStatement_closure, A._EvaluateVisitor_runStatement__closure, A._EvaluateVisitor_runStatement___closure, A._EvaluateVisitor__loadModule_closure, A._EvaluateVisitor__loadModule_closure0, A._EvaluateVisitor__loadModule__closure0, A._EvaluateVisitor__execute_closure, A._EvaluateVisitor__extendModules_closure0, A._EvaluateVisitor_visitAtRootRule_closure, A._EvaluateVisitor_visitAtRootRule_closure0, A._EvaluateVisitor__scopeForAtRoot__closure, A._EvaluateVisitor_visitContentRule_closure, A._EvaluateVisitor_visitDeclaration_closure, A._EvaluateVisitor_visitEachRule_closure1, A._EvaluateVisitor_visitAtRule_closure0, A._EvaluateVisitor_visitAtRule_closure1, A._EvaluateVisitor_visitAtRule__closure, A._EvaluateVisitor_visitForRule_closure, A._EvaluateVisitor_visitForRule_closure0, A._EvaluateVisitor_visitForRule_closure1, A._EvaluateVisitor_visitForRule_closure2, A._EvaluateVisitor_visitForRule_closure3, A._EvaluateVisitor__registerCommentsForModule_closure, A._EvaluateVisitor_visitIfRule__closure, A._EvaluateVisitor__visitDynamicImport_closure, A._EvaluateVisitor__visitDynamicImport__closure2, A._EvaluateVisitor__applyMixin_closure, A._EvaluateVisitor__applyMixin__closure0, A._EvaluateVisitor__applyMixin_closure0, A._EvaluateVisitor__applyMixin__closure, A._EvaluateVisitor__applyMixin___closure, A._EvaluateVisitor__applyMixin____closure, A._EvaluateVisitor_visitIncludeRule_closure, A._EvaluateVisitor_visitIncludeRule_closure1, A._EvaluateVisitor_visitMediaRule_closure, A._EvaluateVisitor_visitMediaRule_closure1, A._EvaluateVisitor_visitMediaRule__closure, A._EvaluateVisitor_visitMediaRule___closure, A._EvaluateVisitor_visitStyleRule_closure, A._EvaluateVisitor_visitStyleRule_closure2, A._EvaluateVisitor_visitStyleRule__closure, A._EvaluateVisitor_visitSupportsRule_closure, A._EvaluateVisitor_visitSupportsRule_closure0, A._EvaluateVisitor_visitSupportsRule__closure, A._EvaluateVisitor__visitSupportsCondition_closure, A._EvaluateVisitor_visitVariableDeclaration_closure, A._EvaluateVisitor_visitVariableDeclaration_closure0, A._EvaluateVisitor_visitVariableDeclaration_closure1, A._EvaluateVisitor_visitWarnRule_closure, A._EvaluateVisitor_visitWhileRule_closure, A._EvaluateVisitor_visitBinaryOperationExpression_closure, A._EvaluateVisitor_visitVariableExpression_closure, A._EvaluateVisitor_visitUnaryOperationExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure, A._EvaluateVisitor_visitFunctionExpression_closure1, A._EvaluateVisitor__visitCalculationExpression_closure, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure, A._EvaluateVisitor__runUserDefinedCallable_closure, A._EvaluateVisitor__runUserDefinedCallable__closure, A._EvaluateVisitor__runUserDefinedCallable___closure, A._EvaluateVisitor__runFunctionCallable_closure, A._EvaluateVisitor__runBuiltInCallable_closure, A._EvaluateVisitor__runBuiltInCallable_closure0, A._EvaluateVisitor__verifyArguments_closure, A._EvaluateVisitor_visitCssAtRule_closure, A._EvaluateVisitor_visitCssAtRule_closure0, A._EvaluateVisitor_visitCssKeyframeBlock_closure, A._EvaluateVisitor_visitCssMediaRule_closure, A._EvaluateVisitor_visitCssMediaRule_closure1, A._EvaluateVisitor_visitCssMediaRule__closure, A._EvaluateVisitor_visitCssMediaRule___closure, A._EvaluateVisitor_visitCssStyleRule_closure0, A._EvaluateVisitor_visitCssStyleRule__closure, A._EvaluateVisitor_visitCssSupportsRule_closure, A._EvaluateVisitor_visitCssSupportsRule_closure0, A._EvaluateVisitor_visitCssSupportsRule__closure, A._EvaluateVisitor__serialize_closure, A._EvaluateVisitor__expressionNode_closure, A._SerializeVisitor_visitCssComment_closure, A._SerializeVisitor_visitCssAtRule_closure, A._SerializeVisitor_visitCssMediaRule_closure, A._SerializeVisitor_visitCssImport_closure, A._SerializeVisitor_visitCssImport__closure, A._SerializeVisitor_visitCssKeyframeBlock_closure, A._SerializeVisitor_visitCssStyleRule_closure, A._SerializeVisitor_visitCssSupportsRule_closure, A._SerializeVisitor_visitCssDeclaration_closure, A._SerializeVisitor_visitCssDeclaration_closure0, A._SerializeVisitor__write_closure, A._SerializeVisitor__visitChildren_closure, A._SerializeVisitor__visitChildren_closure0, A.SingleMapping_SingleMapping$fromEntries_closure, A.SingleMapping_SingleMapping$fromEntries_closure0, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeLabel_closure, A.Highlighter__writeLabel_closure0, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.Frame_Frame$parseVM_closure, A.Frame_Frame$parseV8_closure, A.Frame_Frame$_parseFirefoxEval_closure, A.Frame_Frame$parseFirefox_closure, A.Frame_Frame$parseFriendly_closure, A.LazyTrace_terse_closure, A.Trace_Trace$from_closure, A.TransformByHandlers_transformByHandlers_closure, A.TransformByHandlers_transformByHandlers__closure0, A.TransformByHandlers_transformByHandlers__closure2, A.RateLimit__debounceAggregate_closure_emit, A.RateLimit__debounceAggregate__closure, A.argumentListClass_closure, A.JSToDartAsyncImporter_canonicalize_closure, A.JSToDartAsyncImporter_load_closure, A.AsyncEnvironment_setVariable_closure2, A.AsyncEnvironment_setVariable_closure4, A._EvaluateVisitor__closure14, A._EvaluateVisitor__closure13, A._EvaluateVisitor_run_closure2, A._EvaluateVisitor_run__closure2, A._EvaluateVisitor__loadModule_closure5, A._EvaluateVisitor__loadModule_closure6, A._EvaluateVisitor__loadModule__closure6, A._EvaluateVisitor__execute_closure2, A._EvaluateVisitor__extendModules_closure6, A._EvaluateVisitor_visitAtRootRule_closure5, A._EvaluateVisitor_visitAtRootRule_closure6, A._EvaluateVisitor__scopeForAtRoot__closure2, A._EvaluateVisitor_visitContentRule_closure2, A._EvaluateVisitor_visitDeclaration_closure2, A._EvaluateVisitor_visitEachRule_closure10, A._EvaluateVisitor_visitAtRule_closure12, A._EvaluateVisitor_visitAtRule_closure13, A._EvaluateVisitor_visitAtRule__closure2, A._EvaluateVisitor_visitForRule_closure14, A._EvaluateVisitor_visitForRule_closure15, A._EvaluateVisitor_visitForRule_closure16, A._EvaluateVisitor_visitForRule_closure17, A._EvaluateVisitor_visitForRule_closure18, A._EvaluateVisitor__registerCommentsForModule_closure2, A._EvaluateVisitor_visitIfRule__closure2, A._EvaluateVisitor__visitDynamicImport_closure2, A._EvaluateVisitor__visitDynamicImport__closure14, A._EvaluateVisitor__applyMixin_closure5, A._EvaluateVisitor__applyMixin__closure6, A._EvaluateVisitor__applyMixin_closure6, A._EvaluateVisitor__applyMixin__closure5, A._EvaluateVisitor__applyMixin___closure2, A._EvaluateVisitor__applyMixin____closure2, A._EvaluateVisitor_visitIncludeRule_closure8, A._EvaluateVisitor_visitIncludeRule_closure10, A._EvaluateVisitor_visitMediaRule_closure11, A._EvaluateVisitor_visitMediaRule_closure13, A._EvaluateVisitor_visitMediaRule__closure2, A._EvaluateVisitor_visitMediaRule___closure2, A._EvaluateVisitor_visitStyleRule_closure11, A._EvaluateVisitor_visitStyleRule_closure14, A._EvaluateVisitor_visitStyleRule__closure2, A._EvaluateVisitor_visitSupportsRule_closure8, A._EvaluateVisitor_visitSupportsRule_closure9, A._EvaluateVisitor_visitSupportsRule__closure2, A._EvaluateVisitor__visitSupportsCondition_closure2, A._EvaluateVisitor_visitVariableDeclaration_closure8, A._EvaluateVisitor_visitVariableDeclaration_closure9, A._EvaluateVisitor_visitVariableDeclaration_closure10, A._EvaluateVisitor_visitWarnRule_closure2, A._EvaluateVisitor_visitWhileRule_closure2, A._EvaluateVisitor_visitBinaryOperationExpression_closure2, A._EvaluateVisitor_visitVariableExpression_closure2, A._EvaluateVisitor_visitUnaryOperationExpression_closure2, A._EvaluateVisitor_visitFunctionExpression_closure8, A._EvaluateVisitor_visitFunctionExpression_closure10, A._EvaluateVisitor__visitCalculationExpression_closure2, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure2, A._EvaluateVisitor__runUserDefinedCallable_closure2, A._EvaluateVisitor__runUserDefinedCallable__closure2, A._EvaluateVisitor__runUserDefinedCallable___closure2, A._EvaluateVisitor__runFunctionCallable_closure2, A._EvaluateVisitor__runBuiltInCallable_closure8, A._EvaluateVisitor__runBuiltInCallable_closure9, A._EvaluateVisitor__verifyArguments_closure2, A._EvaluateVisitor_visitCssAtRule_closure8, A._EvaluateVisitor_visitCssAtRule_closure9, A._EvaluateVisitor_visitCssKeyframeBlock_closure5, A._EvaluateVisitor_visitCssMediaRule_closure11, A._EvaluateVisitor_visitCssMediaRule_closure13, A._EvaluateVisitor_visitCssMediaRule__closure2, A._EvaluateVisitor_visitCssMediaRule___closure2, A._EvaluateVisitor_visitCssStyleRule_closure6, A._EvaluateVisitor_visitCssStyleRule__closure2, A._EvaluateVisitor_visitCssSupportsRule_closure8, A._EvaluateVisitor_visitCssSupportsRule_closure9, A._EvaluateVisitor_visitCssSupportsRule__closure2, A._EvaluateVisitor__serialize_closure2, A._EvaluateVisitor__expressionNode_closure2, A.JSToDartAsyncFileImporter_canonicalize_closure, A.AsyncImportCache_canonicalize_closure0, A.AsyncImportCache__canonicalize_closure0, A.AsyncImportCache_importCanonical_closure0, A.AtRootQueryParser_parse_closure0, A.booleanClass_closure, A.legacyBooleanClass_closure, A.calculationClass_closure, A.calculationOperationClass_closure, A.calculationInterpolationClass_closure, A._changeColor_closure0, A.colorClass_closure, A.compileAsync_closure, A.compileStringAsync_closure, A._parseFunctions___closure6, A._parseFunctions___closure5, A.nodePackageImporterClass_closure, A.compilerClass_closure, A.asyncCompilerClass_closure, A.asyncCompilerClass___closure, A.initAsyncCompiler_closure, A.deprecations_closure, A.parseDeprecations_closure, A.versionClass_closure, A.Environment_setVariable_closure2, A.Environment_setVariable_closure4, A._EvaluateVisitor__closure10, A._EvaluateVisitor__closure9, A._EvaluateVisitor_run_closure1, A._EvaluateVisitor_run__closure1, A._EvaluateVisitor__loadModule_closure3, A._EvaluateVisitor__loadModule_closure4, A._EvaluateVisitor__loadModule__closure4, A._EvaluateVisitor__execute_closure1, A._EvaluateVisitor__extendModules_closure4, A._EvaluateVisitor_visitAtRootRule_closure3, A._EvaluateVisitor_visitAtRootRule_closure4, A._EvaluateVisitor__scopeForAtRoot__closure1, A._EvaluateVisitor_visitContentRule_closure1, A._EvaluateVisitor_visitDeclaration_closure1, A._EvaluateVisitor_visitEachRule_closure7, A._EvaluateVisitor_visitAtRule_closure8, A._EvaluateVisitor_visitAtRule_closure9, A._EvaluateVisitor_visitAtRule__closure1, A._EvaluateVisitor_visitForRule_closure9, A._EvaluateVisitor_visitForRule_closure10, A._EvaluateVisitor_visitForRule_closure11, A._EvaluateVisitor_visitForRule_closure12, A._EvaluateVisitor_visitForRule_closure13, A._EvaluateVisitor__registerCommentsForModule_closure1, A._EvaluateVisitor_visitIfRule__closure1, A._EvaluateVisitor__visitDynamicImport_closure1, A._EvaluateVisitor__visitDynamicImport__closure10, A._EvaluateVisitor__applyMixin_closure3, A._EvaluateVisitor__applyMixin__closure4, A._EvaluateVisitor__applyMixin_closure4, A._EvaluateVisitor__applyMixin__closure3, A._EvaluateVisitor__applyMixin___closure1, A._EvaluateVisitor__applyMixin____closure1, A._EvaluateVisitor_visitIncludeRule_closure5, A._EvaluateVisitor_visitIncludeRule_closure7, A._EvaluateVisitor_visitMediaRule_closure7, A._EvaluateVisitor_visitMediaRule_closure9, A._EvaluateVisitor_visitMediaRule__closure1, A._EvaluateVisitor_visitMediaRule___closure1, A._EvaluateVisitor_visitStyleRule_closure7, A._EvaluateVisitor_visitStyleRule_closure10, A._EvaluateVisitor_visitStyleRule__closure1, A._EvaluateVisitor_visitSupportsRule_closure5, A._EvaluateVisitor_visitSupportsRule_closure6, A._EvaluateVisitor_visitSupportsRule__closure1, A._EvaluateVisitor__visitSupportsCondition_closure1, A._EvaluateVisitor_visitVariableDeclaration_closure5, A._EvaluateVisitor_visitVariableDeclaration_closure6, A._EvaluateVisitor_visitVariableDeclaration_closure7, A._EvaluateVisitor_visitWarnRule_closure1, A._EvaluateVisitor_visitWhileRule_closure1, A._EvaluateVisitor_visitBinaryOperationExpression_closure1, A._EvaluateVisitor_visitVariableExpression_closure1, A._EvaluateVisitor_visitUnaryOperationExpression_closure1, A._EvaluateVisitor_visitFunctionExpression_closure5, A._EvaluateVisitor_visitFunctionExpression_closure7, A._EvaluateVisitor__visitCalculationExpression_closure1, A._EvaluateVisitor_visitInterpolatedFunctionExpression_closure1, A._EvaluateVisitor__runUserDefinedCallable_closure1, A._EvaluateVisitor__runUserDefinedCallable__closure1, A._EvaluateVisitor__runUserDefinedCallable___closure1, A._EvaluateVisitor__runFunctionCallable_closure1, A._EvaluateVisitor__runBuiltInCallable_closure5, A._EvaluateVisitor__runBuiltInCallable_closure6, A._EvaluateVisitor__verifyArguments_closure1, A._EvaluateVisitor_visitCssAtRule_closure5, A._EvaluateVisitor_visitCssAtRule_closure6, A._EvaluateVisitor_visitCssKeyframeBlock_closure3, A._EvaluateVisitor_visitCssMediaRule_closure7, A._EvaluateVisitor_visitCssMediaRule_closure9, A._EvaluateVisitor_visitCssMediaRule__closure1, A._EvaluateVisitor_visitCssMediaRule___closure1, A._EvaluateVisitor_visitCssStyleRule_closure4, A._EvaluateVisitor_visitCssStyleRule__closure1, A._EvaluateVisitor_visitCssSupportsRule_closure5, A._EvaluateVisitor_visitCssSupportsRule_closure6, A._EvaluateVisitor_visitCssSupportsRule__closure1, A._EvaluateVisitor__serialize_closure1, A._EvaluateVisitor__expressionNode_closure1, A.exceptionClass_closure, A.ExtensionStore__registerSelector_closure0, A.ExtensionStore_addExtension_closure2, A.ExtensionStore_addExtension_closure3, A.ExtensionStore_addExtension_closure4, A.ExtensionStore__extendExistingExtensions_closure1, A.ExtensionStore__extendExistingExtensions_closure2, A.ExtensionStore_addExtensions_closure0, A.ExtensionStore_clone__closure0, A.JSToDartFileImporter_canonicalize_closure, A.functionClass_closure, A.IfConditionOperation_toInterpolation_closure0, A.NodeImporter_load_closure, A.NodeImporter__tryPath_closure, A.NodeImporter__callImporterAsync_closure, A.ImportCache_canonicalize_closure0, A.ImportCache__canonicalize_closure0, A.ImportCache_importCanonical_closure0, A._realCasePath_helper_closure0, A._readFile_closure0, A.fileExists_closure0, A.dirExists_closure0, A.linkExists_closure0, A.listDir_closure0, A.realpath_closure0, A.JSToDartLogger_internalWarn_closure, A.JSToDartLogger_debug_closure, A.KeyframeSelectorParser_parse_closure0, A.render_closure, A._parseFunctions____closure, A._parseFunctions___closure3, A._parseFunctions___closure4, A._parseFunctions___closure1, A._parseFunctions___closure0, A._parseImporter____closure, A._parseImporter___closure0, A.listClass_closure, A.mapClass_closure, A.MediaQueryParser_parse_closure0, A.mixinClass_closure, A.legacyNullClass_closure, A.numberClass_closure, A.SassNumber__coerceOrConvertValue_compatibilityException0, A.SassNumber__coerceOrConvertValue_closure4, A.SassNumber__coerceOrConvertValue_closure6, A.SassNumber_multiplyUnits_closure4, A.SassNumber_multiplyUnits_closure6, A._updateLazyFileSpanPrototype_closure, A.Parser__parseIdentifier_closure0, A.Parser_spanFrom_closure0, A.Parser_spanFromPosition_closure0, A.PseudoSelector_specificity_closure0, A.SassParser_children_closure0, A.SelectorParser_parse_closure0, A.SelectorParser_parseCompoundSelector_closure0, A._SerializeVisitor_visitCssComment_closure0, A._SerializeVisitor_visitCssAtRule_closure0, A._SerializeVisitor_visitCssMediaRule_closure0, A._SerializeVisitor_visitCssImport_closure0, A._SerializeVisitor_visitCssImport__closure0, A._SerializeVisitor_visitCssKeyframeBlock_closure0, A._SerializeVisitor_visitCssStyleRule_closure0, A._SerializeVisitor_visitCssSupportsRule_closure0, A._SerializeVisitor_visitCssDeclaration_closure1, A._SerializeVisitor_visitCssDeclaration_closure2, A._SerializeVisitor__write_closure0, A._SerializeVisitor__visitChildren_closure1, A._SerializeVisitor__visitChildren_closure2, A.SingleUnitSassNumber_multiplyUnits_closure2, A.updateSourceSpanPrototype_closure, A.stringClass_closure, A.StylesheetParser_parse_closure0, A.StylesheetParser_parse__closure0, A.StylesheetParser_parseParameterList_closure0, A.StylesheetParser__parseSingleProduction_closure0, A.StylesheetParser_parseSignature_closure, A.StylesheetParser__statement_closure0, A.StylesheetParser_variableDeclarationWithoutNamespace_closure1, A.StylesheetParser_variableDeclarationWithoutNamespace_closure2, A.StylesheetParser__declarationOrBuffer_closure3, A.StylesheetParser__declarationOrBuffer_closure4, A.StylesheetParser__declarationOrBuffer_closure6, A.StylesheetParser__propertyOrVariableDeclaration_closure0, A.StylesheetParser__forRule_closure1, A.StylesheetParser__memberList_closure0, A.StylesheetParser_mozDocumentRule_closure1, A.StylesheetParser__expression_resetState0, A.StylesheetParser__expression_resolveOneOperation0, A.StylesheetParser__expression_resolveOperations0, A.StylesheetParser__expression_resolveSpaceExpressions0, A.StylesheetParser_expressionUntilComma_closure0, A.StylesheetParser_interpolatedStringToken_closure0, A.StylesheetParser_namespacedExpression_closure0, A.StylesheetParser__interpolatedDeclarationValue_closure0, A.StylesheetParser__expressionUntilComparison_closure0, A.StylesheetParser__publicIdentifier_closure0, A.JSToDartImporter_canonicalize_closure, A.JSToDartImporter_load_closure, A.resolveImportPath_closure1, A.resolveImportPath_closure2, A._tryPathAsDirectory_closure0, A.valueClass_closure]); + _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.EmptyIterable, A.LinkedHashMapKeysIterable, A.LinkedHashMapValuesIterable, A.LinkedHashMapEntriesIterable, A._HashMapKeyIterable, A._MapBaseValueIterable]); + _inheritMany(A.ListIterable, [A.SubListIterable, A.MappedListIterable, A.ReversedListIterable, A.ListQueue, A._JsonMapKeyIterable, A._GeneratorIterable]); + _inherit(A.EfficientLengthMappedIterable, A.MappedIterable); + _inherit(A.EfficientLengthTakeIterable, A.TakeIterable); + _inherit(A.EfficientLengthSkipIterable, A.SkipIterable); + _inherit(A.EfficientLengthFollowedByIterable, A.FollowedByIterable); + _inheritMany(A._Record, [A._Record1, A._Record2, A._Record3, A._RecordN]); + _inherit(A._Record_1, A._Record1); + _inheritMany(A._Record2, [A._Record_2, A._Record_2_forImport, A._Record_2_imports_modules, A._Record_2_loadedUrls_stylesheet, A._Record_2_sourceMap]); + _inheritMany(A._Record3, [A._Record_3, A._Record_3_deprecation_message_span, A._Record_3_forImport, A._Record_3_importer_isDependency, A._Record_3_originalUrl]); + _inherit(A._Record_5_named_namedNodes_positional_positionalNodes_separator, A._RecordN); + _inheritMany(A.MapView, [A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A.PathMap]); + _inherit(A.UnmodifiableMapView, A._UnmodifiableMapView_MapView__UnmodifiableMapMixin); + _inherit(A.ConstantMapView, A.UnmodifiableMapView); + _inherit(A.ConstantStringMap, A.ConstantMap); + _inheritMany(A.SetBase, [A.ConstantSet, A._SetBase, A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin, A._UnionSet_SetBase_UnmodifiableSetMixin]); + _inheritMany(A.ConstantSet, [A.ConstantStringSet, A.GeneralConstantSet]); + _inherit(A.Instantiation1, A.Instantiation); + _inherit(A.NullError, A.TypeError); + _inheritMany(A.TearOffClosure, [A.StaticClosure, A.BoundClosure]); + _inheritMany(A.JsLinkedHashMap, [A.JsIdentityLinkedHashMap, A.JsConstantLinkedHashMap, A._LinkedCustomHashMap]); + _inheritMany(A.NativeTypedData, [A.NativeByteData, A.NativeTypedArray]); + _inheritMany(A.NativeTypedArray, [A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]); + _inherit(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfDouble, A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inherit(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin); + _inherit(A.NativeTypedArrayOfInt, A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin); + _inheritMany(A.NativeTypedArrayOfDouble, [A.NativeFloat32List, A.NativeFloat64List]); + _inheritMany(A.NativeTypedArrayOfInt, [A.NativeInt16List, A.NativeInt32List, A.NativeInt8List, A.NativeUint16List, A.NativeUint32List, A.NativeUint8ClampedList, A.NativeUint8List]); + _inherit(A._TypeError, A._Error); + _inheritMany(A._Completer, [A._AsyncCompleter, A._SyncCompleter]); + _inheritMany(A._StreamController, [A._AsyncStreamController, A._SyncStreamController]); + _inheritMany(A.Stream, [A._StreamImpl, A._ForwardingStream, A._CompleterStream]); + _inherit(A._ControllerStream, A._StreamImpl); + _inheritMany(A._BufferingStreamSubscription, [A._ControllerSubscription, A._ForwardingStreamSubscription]); + _inherit(A._StreamControllerAddStreamState, A._AddStreamState); + _inheritMany(A._DelayedEvent, [A._DelayedData, A._DelayedError]); + _inherit(A._MapStream, A._ForwardingStream); + _inheritMany(A._Zone, [A._CustomZone, A._RootZone]); + _inherit(A._IdentityHashMap, A._HashMap); + _inherit(A._LinkedHashSet, A._SetBase); + _inherit(A._LinkedIdentityHashSet, A._LinkedHashSet); + _inherit(A.UnmodifiableSetView, A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin); + _inheritMany(A.Codec, [A.Encoding, A.Base64Codec, A.JsonCodec]); + _inheritMany(A.Encoding, [A.AsciiCodec, A.Utf8Codec]); + _inheritMany(A.Converter, [A._UnicodeSubsetEncoder, A.Base64Encoder, A.JsonEncoder, A.JsonDecoder, A.Utf8Encoder, A.Utf8Decoder]); + _inherit(A.AsciiEncoder, A._UnicodeSubsetEncoder); + _inheritMany(A.ByteConversionSink, [A._Base64EncoderSink, A._Utf8StringSinkAdapter]); + _inherit(A._Utf8Base64EncoderSink, A._Base64EncoderSink); + _inherit(A.JsonCyclicError, A.JsonUnsupportedObjectError); + _inherit(A._JsonStringStringifier, A._JsonStringifier); + _inherit(A._StringSinkConversionSink, A.StringConversionSink); + _inherit(A._StringCallbackSink, A._StringSinkConversionSink); + _inheritMany(A.ArgumentError, [A.RangeError, A.IndexError]); + _inherit(A._DataUri, A._Uri); + _inherit(A.ArgParserException, A.FormatException); + _inherit(A.EmptyUnmodifiableSet, A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin); + _inherit(A.QueueList, A._QueueList_Object_ListMixin); + _inherit(A._CastQueueList, A.QueueList); + _inherit(A.UnionSet, A._UnionSet_SetBase_UnmodifiableSetMixin); + _inheritMany(A._DelegatingIterableBase, [A.DelegatingSet, A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin]); + _inherit(A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin, A.DelegatingSet); + _inherit(A.UnmodifiableSetView0, A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin); + _inherit(A.MapKeySet, A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin); + _inheritMany(A.NodeJsError, [A.JsAssertionError, A.JsRangeError, A.JsReferenceError, A.JsSyntaxError, A.JsTypeError, A.JsSystemError]); + _inheritMany(A.Socket, [A.TTYReadStream, A.TTYWriteStream]); + _inherit(A.InternalStyle, A.Style); + _inheritMany(A.InternalStyle, [A.PosixStyle, A.UrlStyle, A.WindowsStyle]); + _inheritMany(A._Enum, [A._SingletonCssMediaQueryMergeResult, A.BooleanOperator, A.BinaryOperator, A.UnaryOperator, A.AttributeOperator, A.Combinator, A.Deprecation, A.ExtendMode, A.Syntax, A.CalculationOperator, A.HueInterpolationMethod, A.ListSeparator, A.OutputStyle, A.LineFeed, A.AttributeOperator0, A.BinaryOperator0, A.BooleanOperator0, A.CalculationOperator0, A.Combinator0, A.Deprecation0, A.HueInterpolationMethod0, A.ListSeparator0, A._SingletonCssMediaQueryMergeResult0, A.ExtendMode0, A.OutputStyle0, A.LineFeed0, A.Syntax0, A.UnaryOperator0]); + _inheritMany(A.CssNode, [A.ModifiableCssNode, A.CssParentNode]); + _inheritMany(A.ModifiableCssNode, [A.ModifiableCssParentNode, A.ModifiableCssComment, A.ModifiableCssDeclaration, A.ModifiableCssImport]); + _inheritMany(A.ModifiableCssParentNode, [A.ModifiableCssAtRule, A.ModifiableCssKeyframeBlock, A.ModifiableCssMediaRule, A.ModifiableCssStyleRule, A.ModifiableCssStylesheet, A.ModifiableCssSupportsRule]); + _inherit(A._IsInvisibleVisitor, A.__IsInvisibleVisitor_Object_EveryCssVisitor); + _inherit(A.CssStylesheet, A.CssParentNode); + _inheritMany(A.Expression, [A.BinaryOperationExpression, A.BooleanExpression, A.ColorExpression, A.FunctionExpression, A.IfExpression, A.InterpolatedFunctionExpression, A.LegacyIfExpression, A.ListExpression, A.MapExpression, A.NullExpression, A.NumberExpression, A.ParenthesizedExpression, A.SelectorExpression, A.StringExpression, A.SupportsExpression, A.UnaryOperationExpression, A.ValueExpression, A.VariableExpression]); + _inheritMany(A.IfConditionExpression, [A.IfConditionParenthesized, A.IfConditionNegation, A.IfConditionOperation, A.IfConditionFunction, A.IfConditionSass, A.IfConditionRaw]); + _inheritMany(A.Statement, [A.ParentStatement, A.ContentRule, A.DebugRule, A.ErrorRule, A.ExtendRule, A.ForwardRule, A.IfRule, A.ImportRule, A.IncludeRule, A.LoudComment, A.ReturnRule, A.SilentComment, A.UseRule, A.VariableDeclaration, A.WarnRule]); + _inheritMany(A.ParentStatement, [A.AtRootRule, A.AtRule, A.CallableDeclaration, A.Declaration, A.EachRule, A.ForRule, A.MediaRule, A.StyleRule, A.Stylesheet, A.SupportsRule, A.WhileRule]); + _inheritMany(A.CallableDeclaration, [A.ContentBlock, A.FunctionRule, A.MixinRule]); + _inheritMany(A.IfRuleClause, [A.IfClause, A.ElseClause]); + _inherit(A._HasContentVisitor, A.__HasContentVisitor_Object_StatementSearchVisitor); + _inherit(A._IsInvisibleVisitor0, A.__IsInvisibleVisitor_Object_AnySelectorVisitor); + _inherit(A._IsBogusVisitor, A.__IsBogusVisitor_Object_AnySelectorVisitor); + _inherit(A._IsUselessVisitor, A.__IsUselessVisitor_Object_AnySelectorVisitor); + _inherit(A._ContainsParentSelectorVisitor, A.__ContainsParentSelectorVisitor_Object_AnySelectorVisitor); + _inheritMany(A.Selector, [A.SimpleSelector, A.ComplexSelector, A.CompoundSelector, A.SelectorList]); + _inheritMany(A.SimpleSelector, [A.AttributeSelector, A.ClassSelector, A.IDSelector, A.ParentSelector, A.PlaceholderSelector, A.PseudoSelector, A.TypeSelector, A.UniversalSelector]); + _inherit(A._ParentSelectorVisitor, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor); + _inherit(A.ExplicitConfiguration, A.Configuration); + _inheritMany(A.LoggerWithDeprecationType, [A._EvaluationContextLogger, A.DefaultLogger, A.DeprecationProcessingLogger, A.StderrLogger]); + _inheritMany(A.SourceSpanException, [A.SassException, A.SourceSpanFormatException, A.MultiSourceSpanException, A.SassException0]); + _inheritMany(A.SassException, [A.MultiSpanSassException, A.SassRuntimeException, A.SassFormatException]); + _inheritMany(A.MultiSpanSassException, [A.MultiSpanSassRuntimeException, A.MultiSpanSassFormatException]); + _inherit(A.MultiSpanSassScriptException, A.SassScriptException); + _inherit(A.MergedExtension, A.Extension); + _inherit(A.Importer, A.AsyncImporter); + _inheritMany(A.Importer, [A.FilesystemImporter, A.NoOpImporter, A.NodePackageImporter]); + _inheritMany(A.Parser, [A.AtRootQueryParser, A.StylesheetParser, A.KeyframeSelectorParser, A.MediaQueryParser, A.SelectorParser]); + _inheritMany(A.StylesheetParser, [A.ScssParser, A.SassParser]); + _inherit(A.CssParser, A.ScssParser); + _inheritMany(A.UnmodifiableMapBase, [A.LimitedMapView, A.PrefixedMapView, A.PublicMemberMapView, A.UnprefixedMapView, A.LimitedMapView0, A.PrefixedMapView0, A.PublicMemberMapView0, A.UnprefixedMapView0]); + _inheritMany(A.Value, [A.SassList, A.SassBoolean, A.SassCalculation, A.SassColor, A.SassFunction, A.SassMap, A.SassMixin, A._SassNull, A.SassNumber, A.SassString]); + _inherit(A.SassArgumentList, A.SassList); + _inherit(A.LinearChannel, A.ColorChannel); + _inheritMany(A.GamutMapMethod, [A.ClipGamutMap, A.LocalMindeGamutMap]); + _inheritMany(A.ColorSpace, [A.A98RgbColorSpace, A.DisplayP3ColorSpace, A.DisplayP3LinearColorSpace, A.HslColorSpace, A.HwbColorSpace, A.LabColorSpace, A.LchColorSpace, A.LmsColorSpace, A.OklabColorSpace, A.OklchColorSpace, A.ProphotoRgbColorSpace, A.Rec2020ColorSpace, A.RgbColorSpace, A.SrgbColorSpace, A.SrgbLinearColorSpace, A.XyzD50ColorSpace, A.XyzD65ColorSpace]); + _inheritMany(A.SassNumber, [A.ComplexSassNumber, A.SingleUnitSassNumber, A.UnitlessSassNumber]); + _inheritMany(A.EvaluationContext, [A._EvaluationContext0, A._EvaluationContext]); + _inherit(A._MakeExpressionCalculationSafe, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor); + _inherit(A._FindDependenciesVisitor, A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor); + _inherit(A.SingleMapping, A.Mapping); + _inherit(A.FileLocation, A.SourceLocationMixin); + _inheritMany(A.SourceSpanMixin, [A._FileSpan, A.SourceSpanBase]); + _inherit(A.MultiSourceSpanFormatException, A.MultiSourceSpanException); + _inherit(A.SourceSpanWithContext, A.SourceSpanBase); + _inherit(A.StringScannerException, A.SourceSpanFormatException); + _inheritMany(A.StringScanner, [A.LineScanner, A.SpanScanner]); + _inheritMany(A.ColorSpace0, [A.A98RgbColorSpace0, A.DisplayP3ColorSpace0, A.DisplayP3LinearColorSpace0, A.HslColorSpace0, A.HwbColorSpace0, A.LabColorSpace0, A.LchColorSpace0, A.LmsColorSpace0, A.OklabColorSpace0, A.OklchColorSpace0, A.ProphotoRgbColorSpace0, A.Rec2020ColorSpace0, A.RgbColorSpace0, A.SrgbColorSpace0, A.SrgbLinearColorSpace0, A.XyzD50ColorSpace0, A.XyzD65ColorSpace0]); + _inheritMany(A.Value0, [A.SassList0, A.SassBoolean0, A.SassCalculation0, A.SassColor0, A.SassNumber0, A.SassFunction0, A.SassMap0, A.SassMixin0, A._SassNull0, A.SassString0]); + _inherit(A.SassArgumentList0, A.SassList0); + _inheritMany(A.AsyncImporter0, [A.JSToDartAsyncImporter, A.JSToDartAsyncFileImporter, A.Importer0]); + _inheritMany(A.EvaluationContext0, [A._EvaluationContext2, A._EvaluationContext1]); + _inheritMany(A.Parser1, [A.AtRootQueryParser0, A.StylesheetParser0, A.KeyframeSelectorParser0, A.MediaQueryParser0, A.SelectorParser0]); + _inheritMany(A.Statement0, [A.ParentStatement0, A.ContentRule0, A.DebugRule0, A.ErrorRule0, A.ExtendRule0, A.ForwardRule0, A.IfRule0, A.ImportRule0, A.IncludeRule0, A.LoudComment0, A.ReturnRule0, A.SilentComment0, A.UseRule0, A.VariableDeclaration0, A.WarnRule0]); + _inheritMany(A.ParentStatement0, [A.AtRootRule0, A.AtRule0, A.CallableDeclaration0, A.Declaration0, A.EachRule0, A.ForRule0, A.MediaRule0, A.StyleRule0, A.Stylesheet0, A.SupportsRule0, A.WhileRule0]); + _inheritMany(A.CssNode0, [A.ModifiableCssNode0, A.CssParentNode0]); + _inheritMany(A.ModifiableCssNode0, [A.ModifiableCssParentNode0, A.ModifiableCssComment0, A.ModifiableCssDeclaration0, A.ModifiableCssImport0]); + _inheritMany(A.ModifiableCssParentNode0, [A.ModifiableCssAtRule0, A.ModifiableCssKeyframeBlock0, A.ModifiableCssMediaRule0, A.ModifiableCssStyleRule0, A.ModifiableCssStylesheet0, A.ModifiableCssSupportsRule0]); + _inheritMany(A.InterpolatedSelector, [A.InterpolatedSimpleSelector, A.InterpolatedComplexSelector, A.InterpolatedCompoundSelector, A.InterpolatedSelectorList]); + _inheritMany(A.InterpolatedSimpleSelector, [A.InterpolatedAttributeSelector, A.InterpolatedClassSelector, A.InterpolatedIDSelector, A.InterpolatedParentSelector, A.InterpolatedPlaceholderSelector, A.InterpolatedPseudoSelector, A.InterpolatedTypeSelector, A.InterpolatedUniversalSelector]); + _inheritMany(A.Selector0, [A.SimpleSelector0, A.ComplexSelector0, A.CompoundSelector0, A.SelectorList0]); + _inheritMany(A.SimpleSelector0, [A.AttributeSelector0, A.ClassSelector0, A.IDSelector0, A.ParentSelector0, A.PlaceholderSelector0, A.PseudoSelector0, A.TypeSelector0, A.UniversalSelector0]); + _inheritMany(A.Expression0, [A.BinaryOperationExpression0, A.BooleanExpression0, A.ColorExpression0, A.FunctionExpression0, A.IfExpression0, A.InterpolatedFunctionExpression0, A.LegacyIfExpression0, A.ListExpression0, A.MapExpression0, A.NullExpression0, A.NumberExpression0, A.ParenthesizedExpression0, A.SelectorExpression0, A.StringExpression0, A.SupportsExpression0, A.UnaryOperationExpression0, A.ValueExpression0, A.VariableExpression0]); + _inherit(A.LinearChannel0, A.ColorChannel0); + _inheritMany(A.GamutMapMethod0, [A.ClipGamutMap0, A.LocalMindeGamutMap0]); + _inherit(A._ConstructionOptions, A._Channels); + _inherit(A.CompileStringOptions, A.CompileOptions); + _inherit(A.AsyncCompiler, A.Compiler); + _inheritMany(A.SassNumber0, [A.ComplexSassNumber0, A.SingleUnitSassNumber0, A.UnitlessSassNumber0]); + _inherit(A.ExplicitConfiguration0, A.Configuration0); + _inheritMany(A.CallableDeclaration0, [A.ContentBlock0, A.FunctionRule0, A.MixinRule0]); + _inheritMany(A.StylesheetParser0, [A.ScssParser0, A.SassParser0]); + _inherit(A.CssParser0, A.ScssParser0); + _inheritMany(A.LoggerWithDeprecationType0, [A.DefaultLogger0, A.DeprecationProcessingLogger0, A._EvaluationContextLogger0, A.JSToDartLogger, A.StderrLogger0]); + _inherit(A._NodeException, A.JsError); + _inheritMany(A.SassException0, [A.MultiSpanSassException0, A.SassRuntimeException0, A.SassFormatException0]); + _inheritMany(A.MultiSpanSassException0, [A.MultiSpanSassRuntimeException0, A.MultiSpanSassFormatException0]); + _inherit(A.MultiSpanSassScriptException0, A.SassScriptException0); + _inherit(A._MakeExpressionCalculationSafe0, A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0); + _inheritMany(A.Importer0, [A.JSToDartFileImporter, A.FilesystemImporter0, A.NoOpImporter0, A.NodePackageImporter0, A.JSToDartImporter]); + _inheritMany(A.IfConditionExpression0, [A.IfConditionParenthesized0, A.IfConditionNegation0, A.IfConditionOperation0, A.IfConditionFunction0, A.IfConditionSass0, A.IfConditionRaw0]); + _inheritMany(A.IfRuleClause0, [A.IfClause0, A.ElseClause0]); + _inherit(A._ParentSelectorVisitor0, A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0); + _inherit(A.MergedExtension0, A.Extension0); + _inherit(A._HasContentVisitor0, A.__HasContentVisitor_Object_StatementSearchVisitor0); + _inherit(A._IsInvisibleVisitor1, A.__IsInvisibleVisitor_Object_EveryCssVisitor0); + _inherit(A._IsInvisibleVisitor2, A.__IsInvisibleVisitor_Object_AnySelectorVisitor0); + _inherit(A._IsBogusVisitor0, A.__IsBogusVisitor_Object_AnySelectorVisitor0); + _inherit(A._IsUselessVisitor0, A.__IsUselessVisitor_Object_AnySelectorVisitor0); + _inherit(A._ContainsParentSelectorVisitor0, A.__ContainsParentSelectorVisitor_Object_AnySelectorVisitor0); + _inherit(A.CssStylesheet0, A.CssParentNode0); + _mixin(A.UnmodifiableListBase, A.UnmodifiableListMixin); + _mixin(A.__CastListBase__CastIterableBase_ListMixin, A.ListBase); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListBase); + _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, A.ListBase); + _mixin(A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, A.FixedLengthListMixin); + _mixin(A._AsyncStreamController, A._AsyncStreamControllerDispatch); + _mixin(A._SyncStreamController, A._SyncStreamControllerDispatch); + _mixin(A.UnmodifiableMapBase, A._UnmodifiableMapMixin); + _mixin(A._UnmodifiableMapView_MapView__UnmodifiableMapMixin, A._UnmodifiableMapMixin); + _mixin(A._UnmodifiableSetView_SetBase__UnmodifiableSetMixin, A._UnmodifiableSetMixin); + _mixin(A._EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A._QueueList_Object_ListMixin, A.ListBase); + _mixin(A._UnionSet_SetBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A._UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A._MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin, A.UnmodifiableSetMixin); + _mixin(A.__IsInvisibleVisitor_Object_EveryCssVisitor, A.EveryCssVisitor); + _mixin(A.__HasContentVisitor_Object_StatementSearchVisitor, A.StatementSearchVisitor); + _mixin(A.__ContainsParentSelectorVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__IsBogusVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__IsInvisibleVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__IsUselessVisitor_Object_AnySelectorVisitor, A.AnySelectorVisitor); + _mixin(A.__ParentSelectorVisitor_Object_SelectorSearchVisitor, A.SelectorSearchVisitor); + _mixin(A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor, A.ReplaceExpressionVisitor); + _mixin(A.__FindDependenciesVisitor_Object_RecursiveStatementVisitor, A.RecursiveStatementVisitor); + _mixin(A.__MakeExpressionCalculationSafe_Object_ReplaceExpressionVisitor0, A.ReplaceExpressionVisitor0); + _mixin(A.__ParentSelectorVisitor_Object_SelectorSearchVisitor0, A.SelectorSearchVisitor0); + _mixin(A.__HasContentVisitor_Object_StatementSearchVisitor0, A.StatementSearchVisitor0); + _mixin(A.__IsInvisibleVisitor_Object_EveryCssVisitor0, A.EveryCssVisitor0); + _mixin(A.__ContainsParentSelectorVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + _mixin(A.__IsBogusVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + _mixin(A.__IsInvisibleVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + _mixin(A.__IsUselessVisitor_Object_AnySelectorVisitor0, A.AnySelectorVisitor0); + })(); + var init = { + G: typeof self != "undefined" ? self : globalThis, + typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, + mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List", Object: "Object", Map: "Map", JSObject: "JSObject"}, + mangledNames: {}, + types: ["~()", "Null()", "Future()", "Value0(List)", "bool(String)", "Value(List)", "String(String)", "bool(CssNode)", "bool(CssNode0)", "bool(Object?)", "int()", "SassBoolean(List)", "double(double)", "SassBoolean0(List)", "bool(SimpleSelector)", "bool(SimpleSelector0)", "FileSpan()", "JSClass0()", "SassString0(List)", "SassString(List)", "bool()", "bool(ComplexSelector)", "bool(ComplexSelector0)", "SassColor(List)", "SassNumber(List)", "SassNumber0(List)", "SassColor0(List)", "SassList0(List)", "SassList(List)", "String()", "double(SassColor0)", "bool(int?)", "Future<~>()", "Value()", "SassMap0(List)", "Null(~())", "Object?()", "~(Object?)", "SassMap(List)", "int(SassColor0)", "Future(Future<~>())", "Value0(Value0)", "Value0?()", "Value(Value)", "Value?()", "double(SassColor)", "Value0()", "String?()", "bool(num,num)", "Uri(Uri)", "bool(int)", "Null(Object,StackTrace)", "SassNumber(SassNumber)", "SassNumber0(SassNumber0)", "bool(ComplexSelectorComponent)", "bool(ComplexSelectorComponent0)", "bool(Value0)", "double(double,double)", "~(Value)", "ComplexSelector0(ComplexSelector0)", "ValueExpression(Value)", "ComplexSelector(ComplexSelector)", "Null(@)", "~(Value0)", "@()", "ValueExpression0(Value0)", "int(SassColor)", "bool(ColorChannel0)", "bool(SelectorList0)", "Future()", "~(Object,StackTrace)", "~(@)", "Future()", "bool(Object)", "bool(Expression)", "Object(Object)", "Frame()", "bool(SelectorList)", "Future()", "bool(Value)", "Future()", "bool(Expression0)", "~([int?])", "Object()", "Null([Object?])", "bool(Module1)", "Stylesheet?()", "Future(Statement)", "Callable?()", "List?(List)", "~(String)", "~(Module1,bool)", "Future(List)", "bool(ColorChannel)", "Frame(String)", "bool(Module0)", "AsyncCallable0?()", "~(Object)", "SassRuntimeException0(AstNode0)", "~(Value,Value)", "double(SassNumber0)", "Future(Statement0)", "bool(Module0)", "AsyncCallable?()", "List?(List)", "~(String[Deprecation?])", "Null(_NodeSassColor,num)", "int(Uri)", "@(@)", "~(String,Value)", "~(String[Deprecation0?])", "SassRuntimeException(AstNode)", "~(String,Value0)", "Callable0?()", "~(Module0,bool)", "Value0?(Statement0)", "Value?(Statement)", "~(Value0,Value0)", "bool(Module1)", "SassCalculation0(Object)", "String(Expression0)", "Null(Module1,bool)", "bool(_Highlight)", "String(String{color:Object?})", "int(_NodeSassColor)", "Statement()", "~(String,Object?)", "Uri(String)", "+originalUrl(Importer,Uri,Uri)?()", "double(SassNumber)", "Map()", "Map()", "String(Object)", "String(Expression)", "String(@)", "~(String,Function)", "~(Expression0)", "Statement0()", "~(~())", "List()", "~(String,@)", "Null(Module0,bool)", "bool(UseRule0)", "InterpolationMap(List)", "Uri?()", "int(String,String)", "String?(String?)", "String?(Object)", "bool(Statement)", "String(String[String?])", "bool(Import)", "Set<0^>()", "Iterable()", "Iterable(String)", "Iterable(@)", "DateTime()", "~(String[~])", "int(int)", "0&(String,FileSpan[StackTrace?])", "~(@,@)", "AtRootRule(List,FileSpan)", "AtRule(List,FileSpan)", "~(Object?,Object?)", "String(String{color:@})", "Entry(Entry)", "double(double,String)", "AstNode(AstNode)", "SassFunction(List)", "SassMixin(List)", "Future<~>(List)", "List()", "int(ComplexSelector)", "bool(ModifiableCssParentNode)", "AsyncCallable?(Module0)", "MapKeySet>(Map,AstNode>)", "Future()", "JSUrl0(Uri)", "List()", "bool(UseRule)", "bool(ForwardRule)", "Map(Module0)", "Future()", "Uri?/()", "String(+(String,Value))", "String(+(IfConditionExpression,String))", "Future()", "@(String)", "SelectorList(Value)", "AstNode?()", "String(SassNumber)", "Future(List)", "~(List)", "~([Object?])", "SassNumber()", "Expression(Expression)", "~(double?[String?])", "int(Frame)", "String(Frame)", "Callable0?(Module0)", "Trace()", "bool(Frame)", "MapKeySet>(Map,AstNode>)", "Map(Module0)", "AsyncCallable0?(Module1)", "MapKeySet>(Map,AstNode0>)", "Map(Module1)", "AstNode0(AstNode0)", "SassFunction0(List)", "SassMixin0(List)", "Future<~>(List)", "~(Iterable)", "List()", "bool(ModifiableCssParentNode0)", "List()", "Future()", "List()", "bool(ForwardRule0)", "String(+(String,Value0))", "String(+(IfConditionExpression0,String))", "bool(Queue>)", "InterpolationMap0(List)", "AstNode0?()", "String(SassNumber0)", "0&(Object[Object?])", "0&(@[@])", "Object(CalculationOperation0)", "Future<~>?()", "bool(String?)", "String(Value0)", "double(Value0)", "ImmutableList0(SassColor0)", "Trace(String)", "Future()", "AsyncImporter0(Object?)", "Set<0&>(Object)", "Version(String)", "~(Iterable)", "Callable?(Module1)", "MapKeySet>(Map,AstNode0>)", "Map(Module1)", "double()", "~(List)", "Value0?(Value0)", "SassNumber0()", "String(_NodeException)", "double(Value)", "List()", "bool(Queue>)", "bool(Statement0)", "bool(Import0)", "Value0?(Value0,num)", "Value0(int)", "Object(_NodeSassMap,int)", "Null(_NodeSassMap,int,Object)", "bool(SassNumber0)", "ImmutableList0(SassNumber0)", "bool(SassNumber0,String)", "SassNumber0(SassNumber0,Object,Object[String?])", "SassNumber0(SassNumber0,SassNumber0[String?,String?])", "double(SassNumber0,Object,Object[String?])", "double(SassNumber0,SassNumber0[String?,String?])", "int(ComplexSelector0)", "Expression0(Expression0)", "SelectorList0(Value0)", "FileLocation(FileSpan)", "String(FileSpan)", "int(SourceLocation)", "~(int)", "~(Object[StackTrace?])", "StyleRule0(List,FileSpan)", "AtRootRule0(List,FileSpan)", "AtRule0(List,FileSpan)", "int(@,@)", "bool(Object?,Object?)", "int(Object?)", "String(double)", "List(List)", "~(List)", "ForRule(List,FileSpan)", "IfConditionExpression(IfConditionExpression)", "Value?(Module0)", "~(CssMediaQuery)", "ContentBlock(List,FileSpan)", "~(SelectorList)", "~(MapEntry)", "SourceFile()", "SourceFile?(int)", "String?(SourceFile?)", "int(_Line)", "Module0?(Module0)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "SourceSpanWithContext()", "List(Trace)", "int(Trace)", "MediaRule(List,FileSpan)", "String(Trace)", "MixinRule(List,FileSpan)", "~(@,StackTrace)", "Frame(String,String)", "SupportsRule(List,FileSpan)", "WhileRule(List,FileSpan)", "Frame(Frame)", "~(Expression)", "Map(Module0)", "Map(Module0)", "~(BinaryOperator)", "SassArgumentList0(Object,Object,Object[String?])", "ImmutableMap0(SassArgumentList0)", "~(String,Option)", "ArgParser()", "Value0/(List)", "Value0?(Module1)", "Module1?(Module1)", "StringExpression(Interpolation)", "DateTime(StylesheetNode)", "Map(Module1)", "Map(Module1)", "bool(+originalUrl(Importer,Uri,Uri))", "Set()", "Future>(Interpolation0{trim:bool,warnForColor:bool})", "Uri(+originalUrl(Importer,Uri,Uri))", "~(+deprecation,message,span(Deprecation?,String,FileSpan))", "Future<~>(String)", "String(Parameter)", "SelectorList(SelectorList?,SelectorList)", "SassScriptException()", "SassList(ComplexSelector)", "SassString(SimpleSelector)", "~(Module1,bool)", "Future<+loadedUrls,stylesheet(Set,CssStylesheet0)>()", "Future>()", "bool(Extension)", "~(Module1)", "SingleUnitSassNumber(double)", "Future>(Interpolation{trim:bool,warnForColor:bool})", "Set>()", "@(@,String)", "Future(Value0)", "SassString(int)", "Future>(Interpolation0)", "Iterable(List)", "~(Object?,List)", "List(Extender)", "Iterable(ComplexSelector)", "Future(IfRuleClause0)", "Future>(Interpolation)", "SassString(String)", "UserDefinedCallable0(ContentBlock0)", "List?(SimpleSelector)", "List(PseudoSelector)", "List>(List)", "List(ComplexSelector)", "PseudoSelector(ComplexSelector)", "int(int,ComplexSelectorComponent)", "~(int,@)", "Future(Expression0)", "~(SimpleSelector,Set>)", "ModifiableBox()", "Value0/()", "List?(List,List)", "~(Module0,bool)", "bool(List>)", "Future<+loadedUrls,stylesheet(Set,CssStylesheet)>()", "Future>()", "SimpleSelector(SimpleSelector)", "Future<+originalUrl(AsyncImporter0,Uri,Uri)?>()", "Future()", "bool(+originalUrl(AsyncImporter0,Uri,Uri))", "Uri(+originalUrl(AsyncImporter0,Uri,Uri))", "AtRootQuery0()", "~(Symbol0,@)", "~(Module0)", "bool(PseudoSelector)", "SelectorList?(PseudoSelector)", "SassCalculation0(Object[Object?,Object?])", "SassCalculation0(SassCalculation0[String?])", "ImmutableList(SassCalculation0)", "Object(Object,String,Object,Object)", "bool(CalculationOperator0)", "bool(CalculationOperation0,Object)", "int(CalculationOperation0)", "String(CalculationOperation0)", "Null(JSObject?,JSArray)", "CalculationInterpolation(Object,String)", "bool(CalculationInterpolation,Object)", "int(CalculationInterpolation)", "String(CalculationInterpolation)", "bool(CanonicalizeContext0)", "JSUrl0?(CanonicalizeContext0)", "Null(@,@)", "String(CssValue)", "Null(@,StackTrace)", "Null(Function,Function)", "String(String?)", "String(int,IfClause)", "bool(String?,String?)", "SassColor0(SassColor0)", "SassColor0(ColorSpace0)", "Value?(Module0)", "0&(List)", "Module0?(Module0)", "int(String?)", "SassColor0(Object,_ConstructionOptions)", "bool(SassColor0,Object)", "SassColor0(SassColor0,String)", "bool(SassColor0[String?])", "SassColor0(SassColor0,_ToGamutOptions)", "double(SassColor0,String[_ChannelOptions?])", "bool(SassColor0,String)", "bool(SassColor0,String[_ChannelOptions?])", "SassColor0(SassColor0,_ConstructionOptions)", "double?(String)", "SassColor0(SassColor0,SassColor0[_InterpolationOptions?])", "String(SassColor0)", "bool(SassColor0)", "Future(Value)", "Null(_NodeSassColor,num?[num?,num?,num?,SassColor0?])", "double(num)", "SassColor(SassColor)", "double(_NodeSassColor)", "AtRootQuery()", "String(BuiltInCallable)", "Map(Module0)", "AsyncImporter0(JSImporter)", "0&(@)", "SassColor(ColorSpace)", "NodePackageImporter0(Object[String?])", "List()", "NodeCompileResult(Compiler,String[CompileOptions?])", "NodeCompileResult(Compiler,String[CompileStringOptions?])", "Null(Compiler)", "Promise(AsyncCompiler,String[CompileOptions?])", "Promise(AsyncCompiler,String[CompileStringOptions?])", "Promise(AsyncCompiler)", "Future()", "int(int,ComplexSelectorComponent0)", "String(CssValue0)", "int(int,SimpleSelector0)", "String(BuiltInCallable0)", "bool(Deprecation0)", "Iterable()", "Version(Object,int,int,int)", "Future<@>()", "int(int,SimpleSelector)", "Value0?(Module1)", "Module1?(Module1)", "Future(IfRuleClause)", "SelectorList()", "Map(Module1)", "Map(Module1)", "CompoundSelector()", "UserDefinedCallable(ContentBlock)", "CssValue0(Interpolation0{trim:bool,warnForColor:bool})", "bool(@)", "Statement({root:bool})", "String(Value)", "+loadedUrls,stylesheet(Set,CssStylesheet0)()", "Module1()", "~(Module1)", "SelectorList(SelectorList,SelectorList)", "0&(List)", "Object(Value0)", "0&(String,int?)", "Value0?(IfRuleClause0)", "UserDefinedCallable0(ContentBlock0)", "Value0(Expression0)", "Future<+originalUrl(AsyncImporter,Uri,Uri)?>()", "FileSpan(_NodeException)", "bool(Extension0)", "Set>()", "Expression({bracketList:bool,consumeNewlines:bool,singleEquals:bool,until:bool()?})", "NumberExpression()", "Iterable(List)", "Object(String)", "List(Extender0)", "List?(SimpleSelector0)", "List(PseudoSelector0)", "List>(List)", "List(ComplexSelector0)", "PseudoSelector0(ComplexSelector0)", "~(SimpleSelector0,Set>)", "ModifiableBox0()", "SassFunction0(Object,String,Value0(List))", "List?(List,List)", "Stylesheet()", "bool(List>)", "bool(Version)", "bool(PseudoSelector0)", "SelectorList0?(PseudoSelector0)", "String(int,IfClause0)", "Future(Expression)", "Future()", "~(Object?,Object,Object?)", "+(String,String)(String)", "+originalUrl(Importer0,Uri,Uri)?()", "Stylesheet0?()", "bool(+originalUrl(Importer0,Uri,Uri))", "Uri(+originalUrl(Importer0,Uri,Uri))", "bool(+(IfConditionExpression0?,Expression0))", "bool(IfConditionExpression0)", "~(String,WarnOptions)", "~(String,DebugOptions)", "Null(RenderResult)", "JSFunction0(JSFunction0)", "Object?(Object,String,String[Object?])", "Null(Object)", "List(Value)", "List(Value0)", "Future<~>(List)", "SassList0(ComplexSelector0)", "Iterable(ComplexSelector0)", "SimpleSelector0(SimpleSelector0)", "SassList0(Object[Object?,_ConstructorOptions?])", "bool(+originalUrl(AsyncImporter,Uri,Uri))", "Null(_NodeSassList,int?[bool?,SassList0?])", "Uri(+originalUrl(AsyncImporter,Uri,Uri))", "Object(_NodeSassList,int)", "Null(_NodeSassList,int,Object)", "bool(_NodeSassList)", "Null(_NodeSassList,bool)", "int(_NodeSassList)", "SassMap0(Value0)", "SassMap0(SassMap0)", "SassMap0(Object[ImmutableMap0?])", "ImmutableMap0(SassMap0)", "Value0?(SassMap0,Object)", "Null(_NodeSassMap,int?[SassMap0?])", "SassNumber0(int)", "Statement?()", "int(_NodeSassMap)", "Value/()", "SassNumber0(Value0)", "List()", "Value0(Object)", "0&(Object)", "bool(ModifiableCssNode0)", "SassNumber0(Object,num[Object?])", "ParameterList()", "int?(SassNumber0)", "Object?(Object?)", "int(SassNumber0[String?])", "double(SassNumber0,num,num[String?])", "SassNumber0(SassNumber0[String?])", "SassNumber0(SassNumber0,String[String?])", "VariableDeclaration()", "UseRule()", "StyleRule(List,FileSpan)", "CssValue(Interpolation{trim:bool,warnForColor:bool})", "Declaration(List,FileSpan)", "Null(_NodeSassNumber,num?[String?,SassNumber0?])", "double(_NodeSassNumber)", "Null(_NodeSassNumber,num)", "String(_NodeSassNumber)", "Null(_NodeSassNumber,String)", "SassScriptException0()", "String(Parameter0)", "JSExpressionVisitor(JSExpressionVisitorObject)", "JSIfConditionExpressionVisitor(JSIfConditionExpressionVisitorObject)", "JSStatementVisitor(JSStatementVisitorObject)", "JSSimpleSelectorVisitor(JSSimpleSelectorVisitorObject)", "SourceFile(String)", "JSSet(Set)", "SourceFile(LazyFileSpan0)", "int(LazyFileSpan0)", "Uri?(LazyFileSpan0)", "String(SourceFile,int[int?])", "FileSpan(SourceFile,int[int?])", "List(SourceFile)", "String?(Interpolation0)", "Object?(Statement0,StatementVisitor)", "Object?(Expression0,ExpressionVisitor)", "Object?(InterpolatedSelector,InterpolatedSelectorVisitor)", "Object?(IfConditionExpression0,IfConditionExpressionVisitor)", "ArgumentList0(IncludeRule0)", "ArgumentList0(ContentRule0)", "ArgumentList0(FunctionExpression0)", "ArgumentList0(LegacyIfExpression0)", "ArgumentList0(InterpolatedFunctionExpression0)", "Interpolation0(IfConditionFunction0)", "FileSpan(AstNode0)", "Interpolation0(SupportsCondition)", "~([Future<~>?])", "String(Object,@,@[@])", "bool(List)", "Value/(List)", "IfConditionExpression0(IfConditionExpression0)", "+loadedUrls,stylesheet(Set,CssStylesheet)()", "SelectorList0(SelectorList0?,SelectorList0)", "SelectorList0(SelectorList0,SelectorList0)", "SassString0(SimpleSelector0)", "SelectorList0()", "CompoundSelector0()", "~(CssMediaQuery0)", "~(SelectorList0)", "~(MapEntry)", "SingleUnitSassNumber0(double)", "bool(ModifiableCssNode)", "~(IfConditionExpression0)", "Module0()", "JSUrl0?(FileSpan)", "bool(List)", "~(Module0)", "Value?(Value)", "SassString0(int)", "SassString0(String)", "EachRule(List,FileSpan)", "SassString0(Object[Object?,_ConstructorOptions1?])", "String(SassString0)", "bool(SassString0)", "int(SassString0)", "int(SassString0,Value0[String?])", "Null(_NodeSassString,String?[SassString0?])", "String(_NodeSassString)", "Null(_NodeSassString,String)", "Statement0({root:bool})", "CssValue(Interpolation)", "NumberExpression0()", "Stylesheet0()", "Statement0?()", "ParameterList0()", "+(String,ParameterList0)()", "FunctionRule(List,FileSpan)", "Declaration0(List,FileSpan)", "Value?(IfRuleClause)", "EachRule0(List,FileSpan)", "FunctionRule0(List,FileSpan)", "ForRule0(List,FileSpan)", "ContentBlock0(List,FileSpan)", "MediaRule0(List,FileSpan)", "MixinRule0(List,FileSpan)", "UserDefinedCallable(ContentBlock)", "SupportsRule0(List,FileSpan)", "WhileRule0(List,FileSpan)", "~(BinaryOperator0)", "StringExpression0(Interpolation0)", "Null(~(Object?),~(Object?))", "ImmutableList0(Value0)", "String?(Value0)", "int(Value0,Value0[String?])", "SassBoolean0(Value0[String?])", "SassCalculation0(Value0[String?])", "SassColor0(Value0[String?])", "SassFunction0(Value0[String?])", "SassMap0(Value0[String?])", "SassMixin0(Value0[String?])", "SassNumber0(Value0[String?])", "SassString0(Value0[String?])", "SassMap0?(Value0)", "bool(Value0,Object?)", "int(Value0[Object?])", "Value(Expression)", "SassMap(Value)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "bool(Deprecation)", "bool(+(IfConditionExpression?,Expression))", "0^(0^,0^)", "SassMap(SassMap)", "bool(IfConditionExpression)", "~(Object,StackTrace,EventSink<0^>)", "List<0^>(0^,List<0^>?)", "NodeCompileResult(String[CompileOptions?])", "NodeCompileResult(String[CompileStringOptions?])", "Promise(String[CompileOptions?])", "Promise(String[CompileStringOptions?])", "Importer0(Object?)", "Compiler()", "Promise()", "List(Object?)", "~(RenderOptions,~(Object?,RenderResult?))", "RenderResult(RenderOptions)", "ParserExports()", "Stylesheet0(String,String,String?)", "String?(String)", "Uri(JSUrl0)", "Object(Map)", "String(String[String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?,String?])", "String(Object?)", "SassNumber(Value)", "Value(Object)", "~(ContentBlock)", "Map(Module0)", "CssValue0(Interpolation0)"], + interceptorsByTag: null, + leafTags: null, + arrayRti: Symbol("$ti"), + rttc: { + "1;": t1 => o => o instanceof A._Record_1 && t1._is(o._0), + "2;": (t1, t2) => o => o instanceof A._Record_2 && t1._is(o._0) && t2._is(o._1), + "2;forImport": (t1, t2) => o => o instanceof A._Record_2_forImport && t1._is(o._0) && t2._is(o._1), + "2;sourceMap": (t1, t2) => o => o instanceof A._Record_2_sourceMap && t1._is(o._0) && t2._is(o._1), + "2;imports,modules": (t1, t2) => o => o instanceof A._Record_2_imports_modules && t1._is(o._0) && t2._is(o._1), + "2;loadedUrls,stylesheet": (t1, t2) => o => o instanceof A._Record_2_loadedUrls_stylesheet && t1._is(o._0) && t2._is(o._1), + "3;": (t1, t2, t3) => o => o instanceof A._Record_3 && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "3;forImport": (t1, t2, t3) => o => o instanceof A._Record_3_forImport && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "3;originalUrl": (t1, t2, t3) => o => o instanceof A._Record_3_originalUrl && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "3;importer,isDependency": (t1, t2, t3) => o => o instanceof A._Record_3_importer_isDependency && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "3;deprecation,message,span": (t1, t2, t3) => o => o instanceof A._Record_3_deprecation_message_span && t1._is(o._0) && t2._is(o._1) && t3._is(o._2), + "5;named,namedNodes,positional,positionalNodes,separator": types => o => o instanceof A._Record_5_named_namedNodes_positional_positionalNodes_separator && A.pairwiseIsTest(types, o._values) + } + }; + A._Universe_addRules(init.typeUniverse, JSON.parse('{"PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptFunction":"LegacyJavaScriptObject","Stdin":"LegacyJavaScriptObject","Stdout":"LegacyJavaScriptObject","ReadlineModule":"LegacyJavaScriptObject","ReadlineOptions":"LegacyJavaScriptObject","ReadlineInterface":"LegacyJavaScriptObject","BufferModule":"LegacyJavaScriptObject","BufferConstants":"LegacyJavaScriptObject","Buffer":"LegacyJavaScriptObject","ConsoleModule":"LegacyJavaScriptObject","Console":"LegacyJavaScriptObject","EventEmitter":"LegacyJavaScriptObject","FS":"LegacyJavaScriptObject","FSConstants":"LegacyJavaScriptObject","Realpath":"LegacyJavaScriptObject","RealpathSync":"LegacyJavaScriptObject","FSWatcher":"LegacyJavaScriptObject","ReadStream":"LegacyJavaScriptObject","ReadStreamOptions":"LegacyJavaScriptObject","WriteStream":"LegacyJavaScriptObject","WriteStreamOptions":"LegacyJavaScriptObject","FileOptions":"LegacyJavaScriptObject","StatOptions":"LegacyJavaScriptObject","MkdirOptions":"LegacyJavaScriptObject","RmdirOptions":"LegacyJavaScriptObject","WatchOptions":"LegacyJavaScriptObject","WatchFileOptions":"LegacyJavaScriptObject","Stats":"LegacyJavaScriptObject","Promise":"LegacyJavaScriptObject","Date":"LegacyJavaScriptObject","JsError":"LegacyJavaScriptObject","Atomics":"LegacyJavaScriptObject","Modules":"LegacyJavaScriptObject","Module":"LegacyJavaScriptObject","Net":"LegacyJavaScriptObject","Socket":"LegacyJavaScriptObject","NetAddress":"LegacyJavaScriptObject","NetServer":"LegacyJavaScriptObject","NodeJsError":"LegacyJavaScriptObject","JsAssertionError":"LegacyJavaScriptObject","JsRangeError":"LegacyJavaScriptObject","JsReferenceError":"LegacyJavaScriptObject","JsSyntaxError":"LegacyJavaScriptObject","JsTypeError":"LegacyJavaScriptObject","JsSystemError":"LegacyJavaScriptObject","Process":"LegacyJavaScriptObject","CPUUsage":"LegacyJavaScriptObject","Release":"LegacyJavaScriptObject","StreamModule":"LegacyJavaScriptObject","Readable":"LegacyJavaScriptObject","Writable":"LegacyJavaScriptObject","Duplex":"LegacyJavaScriptObject","Transform":"LegacyJavaScriptObject","WritableOptions":"LegacyJavaScriptObject","ReadableOptions":"LegacyJavaScriptObject","Immediate":"LegacyJavaScriptObject","Timeout":"LegacyJavaScriptObject","TTY":"LegacyJavaScriptObject","TTYReadStream":"LegacyJavaScriptObject","TTYWriteStream":"LegacyJavaScriptObject","Util":"LegacyJavaScriptObject","JSArray0":"LegacyJavaScriptObject","Chokidar":"LegacyJavaScriptObject","ChokidarOptions":"LegacyJavaScriptObject","ChokidarWatcher":"LegacyJavaScriptObject","JSFunction":"LegacyJavaScriptObject","ImmutableList":"LegacyJavaScriptObject","ImmutableMap":"LegacyJavaScriptObject","NodeImporterResult":"LegacyJavaScriptObject","RenderContext":"LegacyJavaScriptObject","RenderContextOptions":"LegacyJavaScriptObject","RenderContextResult":"LegacyJavaScriptObject","RenderContextResultStats":"LegacyJavaScriptObject","JSModule":"LegacyJavaScriptObject","JSModuleRequire":"LegacyJavaScriptObject","JSClass":"LegacyJavaScriptObject","JSUrl":"LegacyJavaScriptObject","_PropertyDescriptor":"LegacyJavaScriptObject","_RequireMain":"LegacyJavaScriptObject","JSArray1":"LegacyJavaScriptObject","Chokidar0":"LegacyJavaScriptObject","ChokidarOptions0":"LegacyJavaScriptObject","ChokidarWatcher0":"LegacyJavaScriptObject","_ConstructionOptions":"LegacyJavaScriptObject","_ChannelOptions":"LegacyJavaScriptObject","_ToGamutOptions":"LegacyJavaScriptObject","_InterpolationOptions":"LegacyJavaScriptObject","_Channels":"LegacyJavaScriptObject","_NodeSassColor":"LegacyJavaScriptObject","CompileOptions":"LegacyJavaScriptObject","CompileStringOptions":"LegacyJavaScriptObject","NodeCompileResult":"LegacyJavaScriptObject","Deprecation1":"LegacyJavaScriptObject","_NodeException":"LegacyJavaScriptObject","Exports":"LegacyJavaScriptObject","LoggerNamespace":"LegacyJavaScriptObject","JSExpressionVisitorObject":"LegacyJavaScriptObject","Fiber":"LegacyJavaScriptObject","FiberClass":"LegacyJavaScriptObject","JSFunction0":"LegacyJavaScriptObject","JSIfConditionExpressionVisitorObject":"LegacyJavaScriptObject","ImmutableList0":"LegacyJavaScriptObject","ImmutableMap0":"LegacyJavaScriptObject","JSImporter":"LegacyJavaScriptObject","JSImporterResult":"LegacyJavaScriptObject","NodeImporterResult0":"LegacyJavaScriptObject","_ConstructorOptions":"LegacyJavaScriptObject","_NodeSassList":"LegacyJavaScriptObject","WarnOptions":"LegacyJavaScriptObject","DebugOptions":"LegacyJavaScriptObject","JSLogger":"LegacyJavaScriptObject","_NodeSassMap":"LegacyJavaScriptObject","JSModule0":"LegacyJavaScriptObject","JSModuleRequire0":"LegacyJavaScriptObject","_ConstructorOptions0":"LegacyJavaScriptObject","_NodeSassNumber":"LegacyJavaScriptObject","ParserExports":"LegacyJavaScriptObject","JSClass0":"LegacyJavaScriptObject","RenderContext0":"LegacyJavaScriptObject","RenderContextOptions0":"LegacyJavaScriptObject","RenderContextResult0":"LegacyJavaScriptObject","RenderContextResultStats0":"LegacyJavaScriptObject","RenderOptions":"LegacyJavaScriptObject","RenderResult":"LegacyJavaScriptObject","RenderResultStats":"LegacyJavaScriptObject","_Exports":"LegacyJavaScriptObject","JSSet":"LegacyJavaScriptObject","JSSimpleSelectorVisitorObject":"LegacyJavaScriptObject","JSStatementVisitorObject":"LegacyJavaScriptObject","_ConstructorOptions1":"LegacyJavaScriptObject","_NodeSassString":"LegacyJavaScriptObject","Types":"LegacyJavaScriptObject","JSUrl0":"LegacyJavaScriptObject","_PropertyDescriptor0":"LegacyJavaScriptObject","_RequireMain0":"LegacyJavaScriptObject","NativeArrayBuffer":"NativeByteBuffer","JSArray":{"List":["1"],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"]},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"JavaScriptObject":{"JSObject":[]},"LegacyJavaScriptObject":{"JSObject":[],"Promise":[],"JsSystemError":[],"ImmutableList":[],"_ConstructionOptions":[],"_ChannelOptions":[],"_ToGamutOptions":[],"_InterpolationOptions":[],"_NodeSassColor":[],"CompileOptions":[],"CompileStringOptions":[],"NodeCompileResult":[],"Deprecation1":[],"_NodeException":[],"JSExpressionVisitorObject":[],"Fiber":[],"JSFunction0":[],"JSIfConditionExpressionVisitorObject":[],"ImmutableList0":[],"ImmutableMap0":[],"JSImporter":[],"JSImporterResult":[],"NodeImporterResult0":[],"_ConstructorOptions":[],"_NodeSassList":[],"WarnOptions":[],"DebugOptions":[],"_NodeSassMap":[],"_ConstructorOptions0":[],"_NodeSassNumber":[],"ParserExports":[],"JSClass0":[],"RenderContextOptions0":[],"RenderOptions":[],"RenderResult":[],"JSSet":[],"JSSimpleSelectorVisitorObject":[],"JSStatementVisitorObject":[],"_ConstructorOptions1":[],"_NodeSassString":[],"JSUrl0":[]},"JSArraySafeToStringHook":{"SafeToStringHook":[]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastSet":{"Set":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.K":"3","MapBase.V":"4"},"LateError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipWhileIterable":{"Iterable":["1"],"Iterable.E":"1"},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"FollowedByIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthFollowedByIterable":{"FollowedByIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"NonNullsIterable":{"Iterable":["1"],"Iterable.E":"1"},"UnmodifiableListBase":{"ListBase":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"ConstantSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ConstantStringSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"GeneralConstantSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"Instantiation":{"Function":[]},"Instantiation1":{"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Function":[]},"Closure2Args":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeysIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapValuesIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapEntriesIterable":{"EfficientLengthIterable":["MapEntry<1,2>"],"Iterable":["MapEntry<1,2>"],"Iterable.E":"MapEntry<1,2>"},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"JsConstantLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"NativeByteBuffer":{"JSObject":[],"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JSObject":[]},"NativeByteData":{"ByteData":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JSObject":[]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"JSObject":[],"Iterable":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"]},"NativeFloat32List":{"NativeTypedArrayOfDouble":[],"Float32List":[],"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"JSObject":[],"Iterable":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeFloat64List":{"NativeTypedArrayOfDouble":[],"Float64List":[],"ListBase":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"EfficientLengthIterable":["double"],"JSObject":[],"Iterable":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"EfficientLengthIterable":["int"],"JSObject":[],"Iterable":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int"},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_SyncStarIterable":{"Iterable":["1"],"Iterable.E":"1"},"_AsyncCompleter":{"_Completer":["1"]},"_SyncCompleter":{"_Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"EventSink":["1"]},"_AsyncStreamController":{"_StreamController":["1"],"EventSink":["1"]},"_SyncStreamController":{"_StreamController":["1"],"EventSink":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_BufferingStreamSubscription.T":"1"},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_BufferingStreamSubscription.T":"2"},"_MapStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_Zone":{"Zone":[]},"_CustomZone":{"Zone":[]},"_RootZone":{"Zone":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_ZoneSpecification":{"ZoneSpecification":[]},"Queue":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"_HashMap":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_LinkedIdentityHashSet":{"_LinkedHashSet":["1"],"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableListView":{"ListBase":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"UnmodifiableMapBase":{"MapBase":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"_MapBaseValueIterable":{"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableSetView":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Codec":["String","List"]},"_UnicodeSubsetEncoder":{"Converter":["String","List"]},"AsciiEncoder":{"Converter":["String","List"]},"Base64Codec":{"Codec":["List","String"]},"Base64Encoder":{"Converter":["List","String"]},"Encoding":{"Codec":["String","List"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"]},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"Utf8Codec":{"Codec":["String","List"]},"Utf8Encoder":{"Converter":["String","List"]},"Utf8Decoder":{"Converter":["List","String"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"RangeError":[],"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"_GeneratorIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_StringStackTrace":{"StackTrace":[]},"Runes":{"Iterable":["int"],"Iterable.E":"int"},"_Uri":{"_PlatformUri":[],"Uri":[]},"_SimpleUri":{"_PlatformUri":[],"Uri":[]},"_DataUri":{"_PlatformUri":[],"Uri":[]},"NullRejectionException":{"Exception":[]},"ArgParserException":{"FormatException":[],"Exception":[]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_CompleterStream":{"Stream":["1"],"Stream.T":"1"},"_NextRequest":{"_EventRequest":["1"]},"EmptyUnmodifiableSet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2"},"UnionSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"UnmodifiableSetView0":{"DelegatingSet":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapKeySet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_DelegatingIterableBase":{"Iterable":["1"]},"DelegatingSet":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"PathException":{"Exception":[]},"PathMap":{"MapView":["String?","1"],"Map":["String?","1"]},"Version":{"VersionRange":[],"Comparable":["VersionRange"]},"VersionRange":{"Comparable":["VersionRange"]},"ModifiableCssAtRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssComment":{"ModifiableCssNode":[],"CssComment":[],"CssNode":[],"AstNode":[]},"ModifiableCssDeclaration":{"ModifiableCssNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssImport":{"ModifiableCssNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssKeyframeBlock":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssMediaRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssNode":{"CssNode":[],"AstNode":[]},"ModifiableCssParentNode":{"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssStyleRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssStylesheet":{"ModifiableCssParentNode":[],"CssStylesheet":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"ModifiableCssSupportsRule":{"ModifiableCssParentNode":[],"ModifiableCssNode":[],"CssParentNode":[],"CssNode":[],"AstNode":[]},"CssNode":{"AstNode":[]},"CssParentNode":{"CssNode":[],"AstNode":[]},"CssStylesheet":{"CssParentNode":[],"CssNode":[],"AstNode":[]},"CssValue":{"AstNode":[]},"_FakeAstNode":{"AstNode":[]},"ArgumentList":{"AstNode":[]},"ConfiguredVariable":{"AstNode":[]},"Expression":{"AstNode":[]},"BinaryOperationExpression":{"Expression":[],"AstNode":[]},"BooleanExpression":{"Expression":[],"AstNode":[]},"ColorExpression":{"Expression":[],"AstNode":[]},"FunctionExpression":{"Expression":[],"AstNode":[]},"IfConditionExpression":{"AstNode":[]},"IfExpression":{"Expression":[],"AstNode":[]},"IfConditionParenthesized":{"IfConditionExpression":[],"AstNode":[]},"IfConditionNegation":{"IfConditionExpression":[],"AstNode":[]},"IfConditionOperation":{"IfConditionExpression":[],"AstNode":[]},"IfConditionFunction":{"IfConditionExpression":[],"AstNode":[]},"IfConditionSass":{"IfConditionExpression":[],"AstNode":[]},"IfConditionRaw":{"IfConditionExpression":[],"AstNode":[]},"InterpolatedFunctionExpression":{"Expression":[],"AstNode":[]},"LegacyIfExpression":{"Expression":[],"AstNode":[]},"ListExpression":{"Expression":[],"AstNode":[]},"MapExpression":{"Expression":[],"AstNode":[]},"NullExpression":{"Expression":[],"AstNode":[]},"NumberExpression":{"Expression":[],"AstNode":[]},"ParenthesizedExpression":{"Expression":[],"AstNode":[]},"SelectorExpression":{"Expression":[],"AstNode":[]},"StringExpression":{"Expression":[],"AstNode":[]},"SupportsExpression":{"Expression":[],"AstNode":[]},"UnaryOperationExpression":{"Expression":[],"AstNode":[]},"ValueExpression":{"Expression":[],"AstNode":[]},"VariableExpression":{"Expression":[],"AstNode":[]},"DynamicImport":{"Import":[],"AstNode":[]},"StaticImport":{"Import":[],"AstNode":[]},"Interpolation":{"AstNode":[]},"Parameter":{"AstNode":[]},"ParameterList":{"AstNode":[]},"Statement":{"AstNode":[]},"AtRootRule":{"Statement":[],"AstNode":[]},"AtRule":{"Statement":[],"AstNode":[]},"CallableDeclaration":{"Statement":[],"AstNode":[]},"ContentBlock":{"Statement":[],"AstNode":[]},"ContentRule":{"Statement":[],"AstNode":[]},"DebugRule":{"Statement":[],"AstNode":[]},"Declaration":{"Statement":[],"AstNode":[]},"EachRule":{"Statement":[],"AstNode":[]},"ErrorRule":{"Statement":[],"AstNode":[]},"ExtendRule":{"Statement":[],"AstNode":[]},"ForRule":{"Statement":[],"AstNode":[]},"ForwardRule":{"Statement":[],"AstNode":[]},"FunctionRule":{"Statement":[],"AstNode":[]},"IfClause":{"IfRuleClause":[]},"ElseClause":{"IfRuleClause":[]},"IfRule":{"Statement":[],"AstNode":[]},"ImportRule":{"Statement":[],"AstNode":[]},"IncludeRule":{"Statement":[],"AstNode":[]},"LoudComment":{"Statement":[],"AstNode":[]},"MediaRule":{"Statement":[],"AstNode":[]},"MixinRule":{"Statement":[],"AstNode":[]},"_HasContentVisitor":{"StatementSearchVisitor":["bool"],"StatementSearchVisitor.T":"bool"},"ParentStatement":{"Statement":[],"AstNode":[]},"ReturnRule":{"Statement":[],"AstNode":[]},"SilentComment":{"Statement":[],"AstNode":[]},"StyleRule":{"Statement":[],"AstNode":[]},"Stylesheet":{"Statement":[],"AstNode":[]},"SupportsRule":{"Statement":[],"AstNode":[]},"UseRule":{"Statement":[],"AstNode":[]},"VariableDeclaration":{"Statement":[],"AstNode":[]},"WarnRule":{"Statement":[],"AstNode":[]},"WhileRule":{"Statement":[],"AstNode":[]},"SupportsAnything":{"AstNode":[]},"SupportsDeclaration":{"AstNode":[]},"SupportsFunction":{"AstNode":[]},"SupportsInterpolation":{"AstNode":[]},"SupportsNegation":{"AstNode":[]},"SupportsOperation":{"AstNode":[]},"Selector":{"AstNode":[]},"AttributeSelector":{"SimpleSelector":[],"AstNode":[]},"ClassSelector":{"SimpleSelector":[],"AstNode":[]},"ComplexSelector":{"AstNode":[]},"CompoundSelector":{"AstNode":[]},"IDSelector":{"SimpleSelector":[],"AstNode":[]},"SelectorList":{"AstNode":[]},"_ParentSelectorVisitor":{"SelectorSearchVisitor":["ParentSelector"],"SelectorSearchVisitor.T":"ParentSelector"},"ParentSelector":{"SimpleSelector":[],"AstNode":[]},"PlaceholderSelector":{"SimpleSelector":[],"AstNode":[]},"PseudoSelector":{"SimpleSelector":[],"AstNode":[]},"SimpleSelector":{"AstNode":[]},"TypeSelector":{"SimpleSelector":[],"AstNode":[]},"UniversalSelector":{"SimpleSelector":[],"AstNode":[]},"_EnvironmentModule0":{"Module0":["AsyncCallable"]},"AsyncBuiltInCallable":{"AsyncCallable":[]},"BuiltInCallable":{"Callable0":[],"AsyncBuiltInCallable":[],"AsyncCallable":[]},"PlainCssCallable":{"Callable0":[],"AsyncCallable":[]},"UserDefinedCallable":{"Callable0":[],"AsyncCallable":[]},"ExplicitConfiguration":{"Configuration":[]},"_EnvironmentModule":{"Module0":["Callable0"]},"SassRuntimeException":{"Exception":[]},"SassException":{"Exception":[]},"MultiSpanSassException":{"Exception":[]},"MultiSpanSassRuntimeException":{"SassRuntimeException":[],"Exception":[]},"SassFormatException":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"MultiSpanSassFormatException":{"MultiSourceSpanFormatException":[],"SassFormatException":[],"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"UsageException":{"Exception":[]},"EmptyExtensionStore":{"ExtensionStore":[]},"MergedExtension":{"Extension":[]},"Importer":{"AsyncImporter":[]},"FilesystemImporter":{"Importer":[],"AsyncImporter":[]},"NodePackageImporter":{"Importer":[],"AsyncImporter":[]},"BuiltInModule":{"Module0":["1"]},"ForwardedModuleView":{"Module0":["1"]},"ShadowedModuleView":{"Module0":["1"]},"LazyFileSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"LimitedMapView":{"MapBase":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"MergedMapView":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"MultiSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"PrefixedMapView":{"MapBase":["String","1"],"_UnmodifiableMapMixin":["String","1"],"Map":["String","1"],"MapBase.K":"String","MapBase.V":"1"},"_PrefixedKeys":{"Iterable":["String"],"Iterable.E":"String"},"PublicMemberMapView":{"MapBase":["String","1"],"_UnmodifiableMapMixin":["String","1"],"Map":["String","1"],"MapBase.K":"String","MapBase.V":"1"},"UnprefixedMapView":{"MapBase":["String","1"],"_UnmodifiableMapMixin":["String","1"],"Map":["String","1"],"MapBase.K":"String","MapBase.V":"1"},"_UnprefixedKeys":{"Iterable":["String"],"Iterable.E":"String"},"SassArgumentList":{"SassList":[],"Value":[]},"SassBoolean":{"Value":[]},"SassCalculation":{"Value":[]},"SassColor":{"Value":[]},"LinearChannel":{"ColorChannel":[]},"A98RgbColorSpace":{"ColorSpace":[]},"DisplayP3ColorSpace":{"ColorSpace":[]},"DisplayP3LinearColorSpace":{"ColorSpace":[]},"HslColorSpace":{"ColorSpace":[]},"HwbColorSpace":{"ColorSpace":[]},"LabColorSpace":{"ColorSpace":[]},"LchColorSpace":{"ColorSpace":[]},"LmsColorSpace":{"ColorSpace":[]},"OklabColorSpace":{"ColorSpace":[]},"OklchColorSpace":{"ColorSpace":[]},"ProphotoRgbColorSpace":{"ColorSpace":[]},"Rec2020ColorSpace":{"ColorSpace":[]},"RgbColorSpace":{"ColorSpace":[]},"SrgbColorSpace":{"ColorSpace":[]},"SrgbLinearColorSpace":{"ColorSpace":[]},"XyzD50ColorSpace":{"ColorSpace":[]},"XyzD65ColorSpace":{"ColorSpace":[]},"SassFunction":{"Value":[]},"SassList":{"Value":[]},"SassMap":{"Value":[]},"SassMixin":{"Value":[]},"_SassNull":{"Value":[]},"SassNumber":{"Value":[]},"ComplexSassNumber":{"SassNumber":[],"Value":[]},"SingleUnitSassNumber":{"SassNumber":[],"Value":[]},"UnitlessSassNumber":{"SassNumber":[],"Value":[]},"SassString":{"Value":[]},"Entry":{"Comparable":["Entry"]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"_FileSpan":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"MultiSourceSpanException":{"Exception":[]},"MultiSourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"Chain":{"StackTrace":[]},"LazyTrace":{"Trace":[],"StackTrace":[]},"Trace":{"StackTrace":[]},"UnparsedFrame":{"Frame":[]},"StringScannerException":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"A98RgbColorSpace0":{"ColorSpace0":[]},"SupportsAnything0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"ArgumentList0":{"SassNode":[],"AstNode0":[]},"SassArgumentList0":{"SassList0":[],"Value0":[]},"JSToDartAsyncImporter":{"AsyncImporter0":[]},"AsyncBuiltInCallable0":{"AsyncCallable0":[]},"_EnvironmentModule2":{"Module1":["AsyncCallable0"]},"_EvaluateVisitor2":{"StatementVisitor":["Future"],"ExpressionVisitor":["Future"],"IfConditionExpressionVisitor":["Future"]},"JSToDartAsyncFileImporter":{"AsyncImporter0":[]},"AtRootRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssAtRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"AtRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"InterpolatedAttributeSelector":{"InterpolatedSimpleSelector":[],"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"AttributeSelector0":{"SimpleSelector0":[],"AstNode0":[]},"BinaryOperationExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"BooleanExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassBoolean0":{"Value0":[]},"BuiltInCallable0":{"Callable":[],"AsyncBuiltInCallable0":[],"AsyncCallable0":[]},"BuiltInModule0":{"Module1":["1"]},"SassCalculation0":{"Value0":[]},"CallableDeclaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"LinearChannel0":{"ColorChannel0":[]},"InterpolatedClassSelector":{"InterpolatedSimpleSelector":[],"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"ClassSelector0":{"SimpleSelector0":[],"AstNode0":[]},"ColorExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassColor0":{"Value0":[]},"ModifiableCssComment0":{"ModifiableCssNode0":[],"CssComment0":[],"CssNode0":[],"AstNode0":[]},"AsyncCompiler":{"Compiler":[]},"InterpolatedComplexSelector":{"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"ComplexSassNumber0":{"SassNumber0":[],"Value0":[]},"ComplexSelector0":{"AstNode0":[]},"InterpolatedComplexSelectorComponent":{"SassNode":[],"AstNode0":[]},"InterpolatedCompoundSelector":{"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"CompoundSelector0":{"AstNode0":[]},"ExplicitConfiguration0":{"Configuration0":[]},"ConfiguredVariable0":{"SassNode":[],"AstNode0":[]},"ContentBlock0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ContentRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"DebugRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssDeclaration0":{"ModifiableCssNode0":[],"CssNode0":[],"AstNode0":[]},"Declaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"SupportsDeclaration0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"DisplayP3ColorSpace0":{"ColorSpace0":[]},"DisplayP3LinearColorSpace0":{"ColorSpace0":[]},"DynamicImport0":{"Import0":[],"SassNode":[],"AstNode0":[]},"EachRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"EmptyExtensionStore0":{"ExtensionStore0":[]},"_EnvironmentModule1":{"Module1":["Callable"]},"ErrorRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"_EvaluateVisitor1":{"StatementVisitor":["Value0?"],"ExpressionVisitor":["Value0"],"IfConditionExpressionVisitor":["Object"]},"SassRuntimeException0":{"Exception":[]},"SassException0":{"Exception":[]},"MultiSpanSassException0":{"Exception":[]},"MultiSpanSassRuntimeException0":{"SassRuntimeException0":[],"Exception":[]},"SassFormatException0":{"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"MultiSpanSassFormatException0":{"MultiSourceSpanFormatException":[],"SassFormatException0":[],"SourceSpanFormatException":[],"FormatException":[],"Exception":[]},"Expression0":{"SassNode":[],"AstNode0":[]},"JSExpressionVisitor":{"ExpressionVisitor":["Object?"]},"_MakeExpressionCalculationSafe0":{"ExpressionVisitor":["Expression0"],"IfConditionExpressionVisitor":["IfConditionExpression0"]},"ExtendRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"JSToDartFileImporter":{"Importer0":[],"AsyncImporter0":[]},"FilesystemImporter0":{"Importer0":[],"AsyncImporter0":[]},"ForRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ForwardRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ForwardedModuleView0":{"Module1":["1"]},"FunctionExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SupportsFunction0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"SassFunction0":{"Value0":[]},"FunctionRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"HslColorSpace0":{"ColorSpace0":[]},"HwbColorSpace0":{"ColorSpace0":[]},"InterpolatedIDSelector":{"InterpolatedSimpleSelector":[],"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"IDSelector0":{"SimpleSelector0":[],"AstNode0":[]},"IfConditionExpression0":{"SassNode":[],"AstNode0":[]},"IfConditionFunction0":{"IfConditionExpression0":[],"SassNode":[],"AstNode0":[]},"IfExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"IfConditionParenthesized0":{"IfConditionExpression0":[],"SassNode":[],"AstNode0":[]},"IfConditionNegation0":{"IfConditionExpression0":[],"SassNode":[],"AstNode0":[]},"IfConditionOperation0":{"IfConditionExpression0":[],"SassNode":[],"AstNode0":[]},"IfConditionSass0":{"IfConditionExpression0":[],"SassNode":[],"AstNode0":[]},"IfConditionRaw0":{"IfConditionExpression0":[],"SassNode":[],"AstNode0":[]},"JSIfConditionExpressionVisitor":{"IfConditionExpressionVisitor":["Object?"]},"IfClause0":{"IfRuleClause0":[]},"ElseClause0":{"IfRuleClause0":[]},"IfRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssImport0":{"ModifiableCssNode0":[],"CssNode0":[],"AstNode0":[]},"ImportRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"Importer0":{"AsyncImporter0":[]},"IncludeRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"InterpolatedFunctionExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"InterpolatedSelector":{"SassNode":[],"AstNode0":[]},"Interpolation0":{"SassNode":[],"AstNode0":[]},"SupportsInterpolation0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"IsCalculationSafeVisitor0":{"ExpressionVisitor":["bool"]},"IsPlainCssVisitor0":{"ExpressionVisitor":["bool"],"IfConditionExpressionVisitor":["bool"]},"ModifiableCssKeyframeBlock0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"LabColorSpace0":{"ColorSpace0":[]},"LazyFileSpan0":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"LchColorSpace0":{"ColorSpace0":[]},"LegacyIfExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"LimitedMapView0":{"MapBase":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"ListExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"InterpolatedSelectorList":{"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"SelectorList0":{"AstNode0":[]},"_ParentSelectorVisitor0":{"SelectorSearchVisitor0":["ParentSelector0"],"SelectorSearchVisitor0.T":"ParentSelector0"},"SassList0":{"Value0":[]},"LmsColorSpace0":{"ColorSpace0":[]},"LoudComment0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"MapExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassMap0":{"Value0":[]},"ModifiableCssMediaRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"MediaRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"MergedExtension0":{"Extension0":[]},"MergedMapView0":{"MapBase":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"SassMixin0":{"Value0":[]},"MixinRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"_HasContentVisitor0":{"StatementSearchVisitor0":["bool"],"StatementVisitor":["bool?"],"StatementSearchVisitor0.T":"bool"},"MultiSpan0":{"FileSpan":[],"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SupportsNegation0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"NoOpImporter0":{"Importer0":[],"AsyncImporter0":[]},"_FakeAstNode0":{"AstNode0":[]},"CssNode0":{"AstNode0":[]},"CssParentNode0":{"CssNode0":[],"AstNode0":[]},"ModifiableCssNode0":{"CssNode0":[],"AstNode0":[]},"ModifiableCssParentNode0":{"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"NodePackageImporter0":{"Importer0":[],"AsyncImporter0":[]},"NullExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"_SassNull0":{"Value0":[]},"NumberExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassNumber0":{"Value0":[]},"OklabColorSpace0":{"ColorSpace0":[]},"OklchColorSpace0":{"ColorSpace0":[]},"SupportsOperation0":{"SupportsCondition":[],"SassNode":[],"AstNode0":[]},"Parameter0":{"SassNode":[],"AstNode0":[]},"ParameterList0":{"SassNode":[],"AstNode0":[]},"InterpolatedParentSelector":{"InterpolatedSimpleSelector":[],"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"ParentSelector0":{"SimpleSelector0":[],"AstNode0":[]},"ParentStatement0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"ParenthesizedExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"InterpolatedPlaceholderSelector":{"InterpolatedSimpleSelector":[],"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"PlaceholderSelector0":{"SimpleSelector0":[],"AstNode0":[]},"PlainCssCallable0":{"Callable":[],"AsyncCallable0":[]},"PrefixedMapView0":{"MapBase":["String","1"],"_UnmodifiableMapMixin":["String","1"],"Map":["String","1"],"MapBase.K":"String","MapBase.V":"1"},"_PrefixedKeys0":{"Iterable":["String"],"Iterable.E":"String"},"ProphotoRgbColorSpace0":{"ColorSpace0":[]},"InterpolatedPseudoSelector":{"InterpolatedSimpleSelector":[],"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"PseudoSelector0":{"SimpleSelector0":[],"AstNode0":[]},"PublicMemberMapView0":{"MapBase":["String","1"],"_UnmodifiableMapMixin":["String","1"],"Map":["String","1"],"MapBase.K":"String","MapBase.V":"1"},"InterpolatedQualifiedName":{"SassNode":[],"AstNode0":[]},"Rec2020ColorSpace0":{"ColorSpace0":[]},"ReturnRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"RgbColorSpace0":{"ColorSpace0":[]},"Selector0":{"AstNode0":[]},"SelectorExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"ShadowedModuleView0":{"Module1":["1"]},"SilentComment0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"InterpolatedSimpleSelector":{"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"SimpleSelector0":{"AstNode0":[]},"JSSimpleSelectorVisitor":{"InterpolatedSelectorVisitor":["Object?"]},"SingleUnitSassNumber0":{"SassNumber0":[],"Value0":[]},"SourceInterpolationVisitor":{"ExpressionVisitor":["~"],"IfConditionExpressionVisitor":["~"]},"SrgbColorSpace0":{"ColorSpace0":[]},"SrgbLinearColorSpace0":{"ColorSpace0":[]},"Statement0":{"SassNode":[],"AstNode0":[]},"JSStatementVisitor":{"StatementVisitor":["Object?"]},"StaticImport0":{"Import0":[],"SassNode":[],"AstNode0":[]},"StringExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"SassString0":{"Value0":[]},"ModifiableCssStyleRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"StyleRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"CssStylesheet0":{"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"ModifiableCssStylesheet0":{"ModifiableCssParentNode0":[],"CssStylesheet0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"Stylesheet0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"SupportsExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"ModifiableCssSupportsRule0":{"ModifiableCssParentNode0":[],"ModifiableCssNode0":[],"CssParentNode0":[],"CssNode0":[],"AstNode0":[]},"SupportsRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"JSToDartImporter":{"Importer0":[],"AsyncImporter0":[]},"InterpolatedTypeSelector":{"InterpolatedSimpleSelector":[],"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"TypeSelector0":{"SimpleSelector0":[],"AstNode0":[]},"UnaryOperationExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"UnitlessSassNumber0":{"SassNumber0":[],"Value0":[]},"InterpolatedUniversalSelector":{"InterpolatedSimpleSelector":[],"InterpolatedSelector":[],"SassNode":[],"AstNode0":[]},"UniversalSelector0":{"SimpleSelector0":[],"AstNode0":[]},"UnprefixedMapView0":{"MapBase":["String","1"],"_UnmodifiableMapMixin":["String","1"],"Map":["String","1"],"MapBase.K":"String","MapBase.V":"1"},"_UnprefixedKeys0":{"Iterable":["String"],"Iterable.E":"String"},"UseRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"UserDefinedCallable0":{"Callable":[],"AsyncCallable0":[]},"CssValue0":{"AstNode0":[]},"ValueExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"VariableExpression0":{"Expression0":[],"SassNode":[],"AstNode0":[]},"VariableDeclaration0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"WarnRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"WhileRule0":{"Statement0":[],"SassNode":[],"AstNode0":[]},"XyzD50ColorSpace0":{"ColorSpace0":[]},"XyzD65ColorSpace0":{"ColorSpace0":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"CssComment":{"CssNode":[],"AstNode":[]},"Import":{"AstNode":[]},"Callable0":{"AsyncCallable":[]},"Callable":{"AsyncCallable0":[]},"CssComment0":{"CssNode0":[],"AstNode0":[]},"Import0":{"SassNode":[],"AstNode0":[]},"SassNode":{"AstNode0":[]},"SupportsCondition":{"SassNode":[],"AstNode0":[]}}')); + A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"WhereIterator":1,"SkipIterator":1,"SkipWhileIterator":1,"EmptyIterator":1,"FollowedByIterator":1,"NonNullsIterator":1,"FixedLengthListMixin":1,"UnmodifiableListMixin":1,"UnmodifiableListBase":1,"__CastListBase__CastIterableBase_ListMixin":2,"ConstantSet":1,"LinkedHashMapKeyIterator":1,"LinkedHashMapValueIterator":1,"NativeTypedArray":1,"EventSink":1,"_SyncStarIterator":1,"_SyncStreamControllerDispatch":1,"_AsyncStreamControllerDispatch":1,"_AddStreamState":1,"_StreamControllerAddStreamState":1,"_DelayedEvent":1,"_DelayedData":1,"_PendingEvents":1,"_StreamIterator":1,"_ZoneFunction":1,"Queue":1,"UnmodifiableMapBase":2,"_UnmodifiableSetMixin":1,"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":2,"_UnmodifiableSetView_SetBase__UnmodifiableSetMixin":1,"_StringSinkConversionSink":1,"Expando":1,"_EventRequest":1,"_EmptyUnmodifiableSet_IterableBase_UnmodifiableSetMixin":1,"DefaultEquality":1,"IterableEquality":1,"ListEquality":1,"_QueueList_Object_ListMixin":1,"_UnionSet_SetBase_UnmodifiableSetMixin":1,"UnmodifiableSetMixin":1,"_UnmodifiableSetView_DelegatingSet_UnmodifiableSetMixin":1,"_DelegatingIterableBase":1,"_MapKeySet__DelegatingIterableBase_UnmodifiableSetMixin":1,"ParentStatement":1,"ParentStatement0":1,"ExpressionVisitor":1,"IfConditionExpressionVisitor":1,"InterpolatedSelectorVisitor":1}')); + var string$ = { + x00_____: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u03f6\x00\u0404\u03f4 \u03f4\u03f6\u01f6\u01f6\u03f6\u03fc\u01f4\u03ff\u03ff\u0584\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u05d4\u01f4\x00\u01f4\x00\u0504\u05c4\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u0400\x00\u0400\u0200\u03f7\u0200\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u0200\u0200\u0200\u03f7\x00", + x0a_BUG_: "\n\nBUG: This should include a source span!", + x0a_Morex20: "\n\nMore info and automated migrator: https://sass-lang.com/d/slash-div", + x0a_Morex3aa: "\n\nMore info: https://sass-lang.com/d/adjacent-compounds", + x0a_Morex3ac: "\n\nMore info: https://sass-lang.com/d/color-functions", + x0a_Morex3af: "\n\nMore info: https://sass-lang.com/d/function-units", + x0a_See_: "\n\nSee https://sass-lang.com/d/function-units", + x0a_This: "\n\nThis is only an error because you've set the ", + x0a_To_p: "\n\nTo preserve current behavior: math.random(math.div($limit, 1", + x0a_but_: "\n\nbut you may have intended it to mean:\n\n ", + x0aRun_i: "\nRun in verbose mode to see all warnings.", + x0aThis_: "\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x0aYou_m: "\nYou may not @extend the same selector from within different media queries.", + x20It_wi: " It will be omitted from the generated CSS.", + x20be_an: " be an extender.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x20can_n: " can not have both conditions and paths at the same level.\nFound ", + x20deprex20ix2c: " deprecation is obsolete, so does not need to be made fatal.", + x20deprex20ix2e: " deprecation is obsolete. If you were previously silencing it, your code may now behave in unexpected ways.", + x20deprex20t: " deprecation to be fatal.\nRemove this setting if you need to keep using this feature.", + x20deprex2c: " deprecation, since it has also been made fatal.", + x20hue__: ' hue" may not be set for rectangular color space ', + x20in_in: " in interpolation here.\nIt may end up represented as ", + x20inste: " instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", + x20is_as: " is asynchronous.\nThis is probably caused by a bug in a Sass plugin.", + x20is_av: " is available from multiple global modules.", + x20is_de: " is deprecated.\n\nTo preserve current behavior: ", + x20is_noaf: " is not a future deprecation, so it does not need to be explicitly enabled.", + x20is_noav: " is not a valid selector: it must be a string,\na list of strings, or a list of lists of strings.", + x20is_nov: " is not valid CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators", + x20must_b: " must be either nearest, up, down or to-zero.", + x20must_e: " must end with an arbitrary substitution or ", + x20must_n: " must not be greater than the number of characters in the file, ", + x20repet: " repetitive deprecation warnings omitted.", + x20to_be: " to be in the legacy RGB, HSL, or HWB color space.", + x20to_be_: " to be in the legacy RGB, HSL, or HWB color space.\n\nRecommendation: color.change(", + x20to_cl: " to clarify that it's meant to be a binary operation, or wrap\nit in parentheses to make it a unary operation. This will be an error in future\nversions of Sass.\n\nMore info and automated migrator: https://sass-lang.com/d/strict-unary", + x20to_co: " to color.opacity() is deprecated.\n\nRecommendation: ", + x20was_a: ' was already loaded, so it can\'t be configured using "with".', + x20was_n: " was not declared with !default in the @used module.", + x20was_p: " was passed both by position and by name.", + x21defau: "!default should only be written once for each variable.\nThis will be an error in Dart Sass 2.0.0.", + x21globai: "!global isn't allowed for variables in other modules.", + x21globas: "!global should only be written once for each variable.\nThis will be an error in Dart Sass 2.0.0.", + x22x20can_: "\" can't be used as a parent in a compound selector.", + x22x20is_ix0a: '" is invalid CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators', + x22x20is_ix20: '" is invalid CSS. It will be omitted from the generated CSS.\nThis will be an error in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/bogus-combinators', + x22x20is_n: '" is not a valid Sass identifier.\n\nRecommendation: add an "as" clause to define an explicit namespace.', + x22x20is_o: "\" is only valid for nesting and shouldn't\nhave children other than style rules.", + x22x26__ma: '"&" may only used at the beginning of a compound selector.', + x22x29__If: "\").\nIf you really want to use the color value here, use '", + x22x2b__an: '"+" and "-" must be surrounded by whitespace in calculations.', + x22packa: '"package:" URLs aren\'t supported on this platform.', + x24color: "$color1, $color2, $weight: 50%, $method: null", + x24css_a: "$css and $module may not both be passed at once.", + x24list1: "$list1, $list2, $separator: auto, $bracketed: auto", + x24selec: "$selectors: At least one selector must be passed.", + x24separ: '$separator: Must be "space", "comma", "slash", or "auto".', + x27x20must: "' must be a path relative to the package root at '", + x27x2c_whi: "', which is not a '.scss', '.sass', or '.css' file.", + x28__cal: "() calculation. This doesn't allow unitless numbers to be mixed with numbers with units. If you want to use the Sass function, call math.", + x28__fun: "() functions will no longer have special parsing in a future release of Dart Sass. Once that happens, this argument will ", + x28__ins: "() instead.\n\nSee https://sass-lang.com/d/import", + x28__is_d: '() is deprecated. Suggestion:\n\ncolor.channel($color, "', + x28__is_oa: "() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + x28__is_oc: "() is only supported for legacy colors. Please use color.channel() instead with an explicit $space argument.", + x28__isn: "() isn't in the sass:color module.\n\nRecommendation: color.adjust(", + x29x0a_Mor_: ")\n\nMore info: https://sass-lang.com/d/color-functions", + x29x0a_Moro: ")\n\nMore info: https://sass-lang.com/documentation/functions/color#", + x29x20in_a: ") in a future release.\n\nRecommendation: math.random(math.div($limit, 1", + x29x20is_d_: ") is deprecated.\n\nTo preserve current behavior: ", + x29x20is_dT: ") is deprecated.\nThis will be an error in Dart Sass 2.0.0.", + x29x20to_clg: ") to color.grayscale() is deprecated.\n\nRecommendation: ", + x29x20to_cli: ") to color.invert() is deprecated.\n\nRecommendation: ", + x29x20to_cm: ") to compileString() or related functions is deprecated and will be an error in Dart Sass 2.0.0.", + x29x29__Mo: "))\n\nMore info: https://sass-lang.com/d/function-units", + x2c_whicu: ", which uses a scheme declared as non-canonical.", + x2c_whicw: ', which will likely produce invalid CSS.\nAlways quote color names when using them as strings or map keys (for example, "', + x2e_Rela: ".\nRelative canonical URLs are deprecated and will eventually be disallowed.", + x3d_____: "===== asynchronous gap ===========================\n", + x40_moz_: "@-moz-document is deprecated and support will be removed in Dart Sass 2.0.0.\n\nFor details, see https://sass-lang.com/d/moz-document.", + x40conte: "@content is only allowed within mixin declarations.", + x40elsei: "@elseif is deprecated and will not be supported in future Sass versions.\n\nRecommendation: @else if", + x40exten: "@extend may only be used within style rules.", + x40forwa: "@forward rules must be written before any other rules.", + x40funct: "@function if($condition, $if-true, $if-false) {", + x40use_r: "@use rules must be written before any other rules.", + A_list: "A list with more than one element must have an explicit separator.", + A_pkg_h: "A pkg: URL must not have a host, port, username or password.", + A_pkg_q: "A pkg: URL must not have a query or fragment.", + A_top_: "A top-level selector may not contain a parent selector with a suffix.", + ABCDEF: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + Adjace: "Adjacent compound selectors must be separated by whitespace. This will be an error in Dart Sass 2.0.0. Suggestion:\n\n", + An_impa: "An importer may not have a findFileUrl method as well as canonicalize and load methods.", + An_impu: "An importer must have either canonicalize and load methods, or a findFileUrl method.", + As_of_R: "As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.\n\nRecommendation: add `", + As_of_S: "As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.\n\nSince this assignment is at the root of the stylesheet, the !global flag is\nunnecessary and can safely be removed.", + At_rul: "At-rules may not be used within nested declarations.", + Becaus: "Because the CSS working group is still deciding on the best behavior, Sass doesn't currently support modifying missing channels (color: ", + Cannotff: "Cannot extract a file path from a URI with a fragment component", + Cannotfq: "Cannot extract a file path from a URI with a query component", + Cannotn: "Cannot extract a non-Windows file path from a file URI with an authority", + Comple: "ComplexSassNumber.hasPossiblyCompatibleUnits is not implemented.", + Config: "Configuring private variables is deprecated.\nThis will be an error in Dart Sass 2.0.0.", + Could_: 'Could not find an option with short name "-', + CssNod: "CssNodes must have a CssStylesheet transitive parent node.", + Customf: "Custom functions with this name are deprecated and will be removed in a future\nrelease. Please choose a different name.\nMore info: https://sass-lang.com/d/function-name", + Customi: "Custom importers are required to load stylesheets when compiling in the browser.", + Declarm: "Declarations may only be used within style rules.", + Declarp: "Declarations parsed as raw CSS may not be nested.", + Declarw: 'Declarations whose names begin with "--" may not be nested.', + Either: "Either options.data or options.file must be set.", + Entrie: "Entries may not be removed from MergedMapView.", + Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type", + Evalua: "Evaluation handles @include and its content block together.", + Expecta: "Expected a color interpolation method, got an empty list.", + Expectu: 'Expected unquoted string "hue" at the end of ', + Expectv: "Expected variable, mixin, or function name", + Functi: "Functions may not be declared in control directives.", + Global: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse ", + Globalcad: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.adjust instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", + Globalcal: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.alpha instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", + Globalcg: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.grayscale instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", + Globalci: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.invert instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", + Globalco: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse color.opacity instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", + Globalm: "Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\nUse math.abs instead.\n\nMore info and automated migrator: https://sass-lang.com/d/import", + Hue_in: "Hue interpolation method may not be set for rectangular color space ", + If_con: "If conditions is longer than one element, conjunction may not be null.", + If_par: "If parsedAsSassScript is false, value must contain a SassString (was `", + If_str: "If strategy is not null, step is required.", + In_Sas: 'In Sass, "&&" means two copies of the parent selector. You probably want to use "and" instead.', + In_fut: "In future versions of Sass, round() will be interpreted as a CSS round() calculation. This requires an explicit modulus when rounding numbers with units. If you want to use the Sass function, call math.round() instead.\n\nSee https://sass-lang.com/d/import", + Indent: "Indenting at the beginning of the document is illegal.", + Interpn: "Interpolation isn't allowed in namespaces.", + Interpp: "Interpolation isn't allowed in plain CSS.", + Invali: 'Invalid return value for custom function "', + It_s_n: "It's not clear which file to import. Found:\n", + Keywor: "Keyword arguments can't be used with calculations.", + May_no: "May not have a value for string elements (at index ", + Media_: "Media rules may not be used within nested declarations.", + Mixinsb: "Mixins may not be declared in control directives.", + Mixinscf: "Mixins may not contain function declarations.", + Mixinscm: "Mixins may not contain mixin declarations.", + Modulel: "Module loop: this module is already being loaded.", + Modulen: "Module namespaces aren't allowed in plain CSS.", + More_i: "More info: https://sass-lang.com/d/if-function", + Must_n: "Must not have a value for expression elements (at index ", + Named_: "Named arguments must come before rest arguments.\nThis will be an error in Dart Sass 2.0.0.", + Nested: "Nested declarations aren't allowed in plain CSS.", + New_en: "New entries may not be added to MergedMapView.", + No_Sasc: "No Sass callable is currently being evaluated.", + No_Sass: "No Sass stylesheet is currently being evaluated.", + NoSour: "NoSourceMapBuffer.buildSourceMap() is not supported.", + Number: "Number to round and step arguments are required.", + Only_2: "Only 2 slash-separated elements allowed, but ", + Only_oa: "Only one argument may be passed to the plain-CSS invert() function.", + Only_op: "Only one positional argument is allowed. All other arguments must be passed by name.", + Other_: "Other modules' members can't be defined with !global.", + Parent: "Parent selectors can't have suffixes in plain CSS.", + Passin_: "Passing `alpha: null` without setting `space` is deprecated.\nMore info: https://sass-lang.com/d/null-alpha", + Passina: "Passing a string to call() is deprecated and will be illegal in Dart Sass 2.0.0.\n\nRecommendation: call(get-function(", + Passinp: "Passing percentage units to the global abs() function is deprecated.\nIn the future, this will emit a CSS abs() function to be resolved by the browser.\nTo preserve current behavior: math.abs(", + Placeh: "Placeholder selectors aren't allowed in plain CSS.", + Plain_: "Plain CSS functions don't support keyword arguments.", + Positik: "Positional arguments must come before keyword arguments.", + Positir: "Positional arguments must come before rest arguments.\nThis will be an error in Dart Sass 2.0.0.", + Privat: "Private members can't be accessed from outside their modules.", + Rest_a: "Rest arguments can't be used with calculations.", + Sass__i: "Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\nMore info and automated migrator: https://sass-lang.com/d/import", + Sass__m: "Sass @mixin names beginning with -- are forbidden for forward-compatibility with plain CSS mixins.\n\nFor details, see https://sass-lang.com/d/css-function-mixin", + Sass_v: "Sass variables aren't allowed in plain CSS.", + Silent: "Silent comments aren't allowed in plain CSS.", + Style_k: "Style rules may not be used within keyframe blocks.", + Style_n: "Style rules may not be used within nested declarations.", + Suppor: "Supports rules may not be used within nested declarations.", + The_Ex: "The ExtensionStore and CssStylesheet passed to cloneCssStylesheet() must come from the same compilation.", + The_No: "The Node package importer cannot be used without a filesystem.", + The_Sa: "The Sass if() syntax is deprecated in favor of the modern CSS syntax.\n\n", + The_ca: "The canonicalize() method must return a URL.", + The_co: "The color() function doesn't support the color space ", + The_fe: "The feature-exists() function is deprecated.\n\nMore info: https://sass-lang.com/d/feature-exists", + The_fie: "The findFileUrl() method must return a URL.", + The_fiu: 'The findFileUrl() must return a URL with scheme file://, was "', + The_le: "The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.\n\nMore info: https://sass-lang.com/d/legacy-js-api", + The_lo: "The load() function must return an object with contents and syntax fields.", + The_pa: "The parent selector isn't allowed in plain CSS.", + The_sa: "The same variable may only be configured once.", + The_ta: 'The target selector was not found.\nUse "@extend ', + There_: "There's already a module with namespace \"", + This_d: 'This declaration has no parameter named "$', + This_e: "This expression can't be used in a calculation.", + This_f: "This function isn't allowed in plain CSS.", + This_ma: 'This module and the new module both define a variable named "$', + This_mw: 'This module was already loaded, so it can\'t be configured using "with".', + This_n: "This name is reserved for the plain-CSS function.", + This_o: "This operation can't be used in a calculation.", + This_s: "This selector doesn't have any properties and won't be rendered.", + This_v: "This variable was not declared with !default in the @used module.", + To_usei: "To use color.invert() with non-legacy color ", + To_usem: "To use color.mix() with non-legacy color ", + Top_le: "Top-level leading combinators aren't allowed in plain CSS.", + Unable: "Unable to determine which of multiple potential resolutions found for ", + Unexpe: "Unexpected Zone.current[#_canonicalizeContext] value ", + User_a: "User-authored deprecations should not be silenced.", + Using__i: "Using / for division is deprecated and will be removed in Dart Sass 2.0.0.\n\nRecommendation: ", + Using__o: "Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.\n\nRecommendation: ", + Using_c: "Using color.alpha() for a Microsoft filter is deprecated.\n\nRecommendation: ", + Using_t: "Using the current working directory as an implicit load path is deprecated. Either add it as an explicit load path or importer, or load this stylesheet from a different URL.", + Variab_: "Variable keyword argument map must have string keys.\n", + Variabs: "Variable keyword arguments must be a map (was ", + Vendorp: "Vendor-prefixed progid:...() functions will no longer be supported in a future release of Dart Sass. To preserve current behavior:\n\n#{", + Vendoru: "Vendor-prefixed url() functions will no longer have special parsing in a future release of Dart Sass. Once that happens, this argument will be parsed as SassScript. To preserve current behavior:\n\n", + Whitesa: 'Whitespace is required between "and" and "("', + Whitesn: 'Whitespace is required between "not" and "("', + Whiteso: 'Whitespace is required between "or" and "("', + You_ma: "You may not @extend selectors across media queries.", + You_pr: "You probably don't mean to use the color value ", + x60_inst: "` instead.\nSee https://sass-lang.com/d/extend-compound for details.\n", + addExt_: "addExtension() can't be called for a const ExtensionStore.", + addExts: "addExtensions() can't be called for a const ExtensionStore.", + addSel: "addSelector() can't be called for a const ExtensionStore.", + adjustd: "adjust-hue() is deprecated. Suggestion:\n\ncolor.adjust($color, $hue: ", + adjusto: "adjust-hue() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + alpha_: "alpha() is only supported for legacy colors. Please use color.channel() instead.", + canoni: "canonicalizeContext may only be accessed within a call to canonicalize().", + color_a: "color.alpha() is only supported for legacy colors. Please use color.channel() instead.", + color_c: "color.changeHsl() is only supported for legacy colors. Please use color.changeChannels() instead with an explicit $space argument.", + color_t: "color.to-gamut() requires a $method argument for forwards-compatibility with changes in the CSS spec. Suggestion:\n\n$method: local-minde", + compou: "compound selectors may no longer be extended.\nConsider `@extend ", + conten: "content-exists() may only be called within a mixin.", + darken: "darken() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + desatu: "desaturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + fileEx: "fileExists() is only supported on Node.js", + if___c: "if() conditions with arbitrary substitutions may not contain sass() expressions.", + leadin: "leadingCombinators and components may not both be empty.", + lighte: "lighten() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + linkEx: "linkExists() is only supported on Node.js", + math_d: "math.div() will only support number arguments in a future release.\nUse list.slash() instead for a slash separator.", + math_r: "math.random() will no longer ignore $limit units (", + multip: "multiple statements on one line are not supported in the indented syntax.", + must_b: "must be a UniversalSelector or a TypeSelector", + sass__: "sass() conditions aren't allowed in plain CSS", + satura: "saturate() is only supported for legacy colors. Please use color.adjust() instead with an explicit $space argument.", + throug: "through() must return false for at least one parent of ", + x7dx0a_Mor: "}\n\nMore info: https://sass-lang.com/d/function-name", + x7dx29__Mo: "})\n\nMore info: https://sass-lang.com/d/function-name", + x7dx29_Mor: "})\nMore info: https://sass-lang.com/d/abs-percent" + }; + var type$ = (function rtii() { + var findType = A.findType; + return { + $env_1_1_String: findType("@"), + ArgParser: findType("ArgParser"), + AstNode: findType("AstNode"), + AstNode_2: findType("AstNode0"), + AsyncBuiltInCallable: findType("AsyncBuiltInCallable"), + AsyncBuiltInCallable_2: findType("AsyncBuiltInCallable0"), + AsyncCallable: findType("AsyncCallable"), + AsyncCallable_2: findType("AsyncCallable0"), + AsyncCompiler: findType("AsyncCompiler"), + AsyncImporter: findType("AsyncImporter0"), + Box_SelectorList: findType("Box"), + Box_SelectorList_2: findType("Box0"), + BuiltInCallable: findType("BuiltInCallable"), + BuiltInCallable_2: findType("BuiltInCallable0"), + BuiltInModule_AsyncCallable: findType("BuiltInModule"), + BuiltInModule_AsyncCallable_2: findType("BuiltInModule0"), + BuiltInModule_Callable: findType("BuiltInModule"), + BuiltInModule_Callable_2: findType("BuiltInModule0"), + ByteBuffer: findType("ByteBuffer"), + ByteData: findType("ByteData"), + Callable: findType("Callable0"), + Callable_2: findType("Callable"), + ChangeType: findType("ChangeType"), + CodeUnits: findType("CodeUnits"), + Combinator: findType("Combinator"), + Combinator_2: findType("Combinator0"), + Comparable_dynamic: findType("Comparable<@>"), + Comparable_nullable_Object: findType("Comparable"), + CompileResult: findType("CompileResult"), + CompileResult_2: findType("CompileResult0"), + ComplexSelector: findType("ComplexSelector"), + ComplexSelectorComponent: findType("ComplexSelectorComponent"), + ComplexSelectorComponent_2: findType("ComplexSelectorComponent0"), + ComplexSelector_2: findType("ComplexSelector0"), + Configuration: findType("Configuration"), + Configuration_2: findType("Configuration0"), + ConfiguredValue: findType("ConfiguredValue"), + ConfiguredValue_2: findType("ConfiguredValue0"), + ConfiguredVariable: findType("ConfiguredVariable"), + ConfiguredVariable_2: findType("ConfiguredVariable0"), + ConstantMapView_Symbol_dynamic: findType("ConstantMapView"), + ConstantStringMap_String_double: findType("ConstantStringMap"), + ConstantStringSet_String: findType("ConstantStringSet"), + CssComment: findType("CssComment"), + CssComment_2: findType("CssComment0"), + CssMediaQuery: findType("CssMediaQuery"), + CssMediaQuery_2: findType("CssMediaQuery0"), + CssParentNode: findType("CssParentNode"), + CssParentNode_2: findType("CssParentNode0"), + CssStylesheet: findType("CssStylesheet"), + CssStylesheet_2: findType("CssStylesheet0"), + CssValue_AttributeOperator: findType("CssValue0"), + CssValue_Combinator: findType("CssValue"), + CssValue_Combinator_2: findType("CssValue0"), + CssValue_List_String: findType("CssValue>"), + CssValue_List_String_2: findType("CssValue0>"), + CssValue_String: findType("CssValue"), + CssValue_String_2: findType("CssValue0"), + CssValue_Value: findType("CssValue"), + CssValue_Value_2: findType("CssValue0"), + DateTime: findType("DateTime"), + Deprecation: findType("Deprecation"), + Deprecation_2: findType("Deprecation1"), + Deprecation_3: findType("Deprecation0"), + EfficientLengthIterable_dynamic: findType("EfficientLengthIterable<@>"), + Error: findType("Error"), + Exception: findType("Exception"), + Expression: findType("Expression"), + Expression_2: findType("Expression0"), + Extender: findType("Extender"), + Extender_2: findType("Extender0"), + Extension: findType("Extension"), + Extension_2: findType("Extension0"), + FileLocation: findType("FileLocation"), + FileSpan: findType("FileSpan"), + Float32List: findType("Float32List"), + Float64List: findType("Float64List"), + FormatException: findType("FormatException"), + Frame: findType("Frame"), + Function: findType("Function"), + FutureGroup_void: findType("FutureGroup<~>"), + FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("+loadedUrls,stylesheet(Set,CssStylesheet)/"), + FutureOr_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("+loadedUrls,stylesheet(Set,CssStylesheet0)/"), + FutureOr_nullable_Uri: findType("Uri?/"), + Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("Future<+loadedUrls,stylesheet(Set,CssStylesheet)>"), + Future_Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("Future<+loadedUrls,stylesheet(Set,CssStylesheet0)>"), + Future_Value: findType("Future"), + Future_Value_2: findType("Future"), + Future_nullable_CssValue_String: findType("Future?>"), + Future_nullable_CssValue_String_2: findType("Future?>"), + Future_nullable_ImporterResult: findType("Future"), + Future_nullable_Uri: findType("Future"), + Future_nullable_Value: findType("Future"), + Future_nullable_Value_2: findType("Future"), + IfClause: findType("IfClause"), + IfClause_2: findType("IfClause0"), + IfConditionExpression: findType("IfConditionExpression"), + IfConditionExpression_2: findType("IfConditionExpression0"), + ImmutableList: findType("ImmutableList0"), + ImmutableList_2: findType("ImmutableList"), + ImmutableMap: findType("ImmutableMap0"), + Import: findType("Import"), + Import_2: findType("Import0"), + Importer: findType("Importer0"), + ImporterResult: findType("ImporterResult"), + ImporterResult_2: findType("ImporterResult0"), + Importer_2: findType("Importer"), + Int16List: findType("Int16List"), + Int32List: findType("Int32List"), + Int8List: findType("Int8List"), + InterpolatedComplexSelector: findType("InterpolatedComplexSelector"), + InterpolatedComplexSelectorComponent: findType("InterpolatedComplexSelectorComponent"), + InterpolatedSimpleSelector: findType("InterpolatedSimpleSelector"), + Interpolation: findType("Interpolation"), + InterpolationBuffer: findType("InterpolationBuffer"), + InterpolationBuffer_2: findType("InterpolationBuffer0"), + InterpolationMap: findType("InterpolationMap"), + InterpolationMap_2: findType("InterpolationMap0"), + Interpolation_2: findType("Interpolation0"), + Iterable_ComplexSelectorComponent: findType("Iterable"), + Iterable_ComplexSelectorComponent_2: findType("Iterable"), + Iterable_dynamic: findType("Iterable<@>"), + JSArray_AstNode: findType("JSArray"), + JSArray_AstNode_2: findType("JSArray"), + JSArray_AsyncBuiltInCallable: findType("JSArray"), + JSArray_AsyncBuiltInCallable_2: findType("JSArray"), + JSArray_AsyncCallable: findType("JSArray"), + JSArray_AsyncCallable_2: findType("JSArray"), + JSArray_AsyncImporter: findType("JSArray"), + JSArray_AsyncImporter_2: findType("JSArray"), + JSArray_BinaryOperator: findType("JSArray"), + JSArray_BinaryOperator_2: findType("JSArray"), + JSArray_BuiltInCallable: findType("JSArray"), + JSArray_BuiltInCallable_2: findType("JSArray"), + JSArray_Callable: findType("JSArray"), + JSArray_Callable_2: findType("JSArray"), + JSArray_ColorChannel: findType("JSArray"), + JSArray_ColorChannel_2: findType("JSArray"), + JSArray_ComplexSelector: findType("JSArray"), + JSArray_ComplexSelectorComponent: findType("JSArray"), + JSArray_ComplexSelectorComponent_2: findType("JSArray"), + JSArray_ComplexSelector_2: findType("JSArray"), + JSArray_ConfiguredVariable: findType("JSArray"), + JSArray_ConfiguredVariable_2: findType("JSArray"), + JSArray_CssComment: findType("JSArray"), + JSArray_CssComment_2: findType("JSArray"), + JSArray_CssMediaQuery: findType("JSArray"), + JSArray_CssMediaQuery_2: findType("JSArray"), + JSArray_CssNode: findType("JSArray"), + JSArray_CssNode_2: findType("JSArray"), + JSArray_CssValue_Combinator: findType("JSArray>"), + JSArray_CssValue_Combinator_2: findType("JSArray>"), + JSArray_Entry: findType("JSArray"), + JSArray_Expression: findType("JSArray"), + JSArray_Expression_2: findType("JSArray"), + JSArray_Extender: findType("JSArray"), + JSArray_Extender_2: findType("JSArray"), + JSArray_Extension: findType("JSArray"), + JSArray_ExtensionStore: findType("JSArray"), + JSArray_ExtensionStore_2: findType("JSArray"), + JSArray_Extension_2: findType("JSArray"), + JSArray_ForwardRule: findType("JSArray"), + JSArray_ForwardRule_2: findType("JSArray"), + JSArray_Frame: findType("JSArray"), + JSArray_Future_nullable_Record_3_int_and_String_and_nullable_String: findType("JSArray>"), + JSArray_IfClause: findType("JSArray"), + JSArray_IfClause_2: findType("JSArray"), + JSArray_IfConditionExpression: findType("JSArray"), + JSArray_IfConditionExpression_2: findType("JSArray"), + JSArray_Import: findType("JSArray"), + JSArray_Import_2: findType("JSArray"), + JSArray_Importer: findType("JSArray"), + JSArray_Importer_2: findType("JSArray"), + JSArray_InterpolatedComplexSelector: findType("JSArray"), + JSArray_InterpolatedComplexSelectorComponent: findType("JSArray"), + JSArray_InterpolatedSimpleSelector: findType("JSArray"), + JSArray_Iterable_ComplexSelectorComponent: findType("JSArray>"), + JSArray_Iterable_ComplexSelectorComponent_2: findType("JSArray>"), + JSArray_JSFunction: findType("JSArray"), + JSArray_LinearChannel: findType("JSArray"), + JSArray_LinearChannel_2: findType("JSArray"), + JSArray_List_ComplexSelector: findType("JSArray>"), + JSArray_List_ComplexSelectorComponent: findType("JSArray>"), + JSArray_List_ComplexSelectorComponent_2: findType("JSArray>"), + JSArray_List_ComplexSelector_2: findType("JSArray>"), + JSArray_List_Extender: findType("JSArray>"), + JSArray_List_Extender_2: findType("JSArray>"), + JSArray_List_Iterable_ComplexSelectorComponent: findType("JSArray>>"), + JSArray_List_Iterable_ComplexSelectorComponent_2: findType("JSArray>>"), + JSArray_Map_String_AstNode: findType("JSArray>"), + JSArray_Map_String_AstNode_2: findType("JSArray>"), + JSArray_Map_String_AsyncCallable: findType("JSArray>"), + JSArray_Map_String_AsyncCallable_2: findType("JSArray>"), + JSArray_Map_String_Callable: findType("JSArray>"), + JSArray_Map_String_Callable_2: findType("JSArray>"), + JSArray_Map_String_Value: findType("JSArray>"), + JSArray_Map_String_Value_2: findType("JSArray>"), + JSArray_ModifiableCssImport: findType("JSArray"), + JSArray_ModifiableCssImport_2: findType("JSArray"), + JSArray_ModifiableCssNode: findType("JSArray"), + JSArray_ModifiableCssNode_2: findType("JSArray"), + JSArray_ModifiableCssParentNode: findType("JSArray"), + JSArray_ModifiableCssParentNode_2: findType("JSArray"), + JSArray_Module_AsyncCallable: findType("JSArray>"), + JSArray_Module_AsyncCallable_2: findType("JSArray>"), + JSArray_Module_Callable: findType("JSArray>"), + JSArray_Module_Callable_2: findType("JSArray>"), + JSArray_Object: findType("JSArray"), + JSArray_Parameter: findType("JSArray"), + JSArray_Parameter_2: findType("JSArray"), + JSArray_PseudoSelector: findType("JSArray"), + JSArray_PseudoSelector_2: findType("JSArray"), + JSArray_Record_2_Expression_and_Expression: findType("JSArray<+(Expression,Expression)>"), + JSArray_Record_2_Expression_and_Expression_2: findType("JSArray<+(Expression0,Expression0)>"), + JSArray_Record_2_IfConditionExpression_and_String: findType("JSArray<+(IfConditionExpression,String)>"), + JSArray_Record_2_IfConditionExpression_and_String_2: findType("JSArray<+(IfConditionExpression0,String)>"), + JSArray_Record_2_ParameterList_and_Value_Function_List_Value: findType("JSArray<+(ParameterList,Value(List))>"), + JSArray_Record_2_ParameterList_and_Value_Function_List_Value_2: findType("JSArray<+(ParameterList0,Value0(List))>"), + JSArray_Record_2_String_and_AstNode: findType("JSArray<+(String,AstNode)>"), + JSArray_Record_2_String_and_AstNode_2: findType("JSArray<+(String,AstNode0)>"), + JSArray_Record_2_String_and_Value: findType("JSArray<+(String,Value)>"), + JSArray_Record_2_String_and_Value_2: findType("JSArray<+(String,Value0)>"), + JSArray_Record_2_nullable_IfConditionExpression_and_Expression: findType("JSArray<+(IfConditionExpression?,Expression)>"), + JSArray_Record_2_nullable_IfConditionExpression_and_Expression_2: findType("JSArray<+(IfConditionExpression0?,Expression0)>"), + JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span: findType("JSArray<+deprecation,message,span(Deprecation?,String,FileSpan)>"), + JSArray_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2: findType("JSArray<+deprecation,message,span(Deprecation0?,String,FileSpan)>"), + JSArray_SassList: findType("JSArray"), + JSArray_SassList_2: findType("JSArray"), + JSArray_SimpleSelector: findType("JSArray"), + JSArray_SimpleSelector_2: findType("JSArray"), + JSArray_Statement: findType("JSArray"), + JSArray_Statement_2: findType("JSArray"), + JSArray_String: findType("JSArray"), + JSArray_StylesheetNode: findType("JSArray"), + JSArray_TargetEntry: findType("JSArray"), + JSArray_TargetLineEntry: findType("JSArray"), + JSArray_Trace: findType("JSArray"), + JSArray_UseRule: findType("JSArray"), + JSArray_UseRule_2: findType("JSArray"), + JSArray_Value: findType("JSArray"), + JSArray_Value_2: findType("JSArray"), + JSArray_WatchEvent: findType("JSArray"), + JSArray__Highlight: findType("JSArray<_Highlight>"), + JSArray__Line: findType("JSArray<_Line>"), + JSArray_double: findType("JSArray"), + JSArray_dynamic: findType("JSArray<@>"), + JSArray_int: findType("JSArray"), + JSArray_nullable_FileSpan: findType("JSArray"), + JSArray_nullable_Record_3_int_and_String_and_nullable_String: findType("JSArray<+(int,String,String?)?>"), + JSArray_nullable_SassNumber: findType("JSArray"), + JSArray_nullable_SassNumber_2: findType("JSArray"), + JSArray_nullable_String: findType("JSArray"), + JSClass: findType("JSClass0"), + JSFunction: findType("JSFunction0"), + JSImporter: findType("JSImporter"), + JSImporterResult: findType("JSImporterResult"), + JSNull: findType("JSNull"), + JSObject: findType("JSObject"), + JSUrl: findType("JSUrl0"), + JavaScriptFunction: findType("JavaScriptFunction"), + JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"), + JsIdentityLinkedHashMap_SimpleSelector_int: findType("JsIdentityLinkedHashMap"), + JsIdentityLinkedHashMap_SimpleSelector_int_2: findType("JsIdentityLinkedHashMap"), + JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList: findType("JsIdentityLinkedHashMap>"), + JsIdentityLinkedHashMap_of_SelectorList_and_Box_SelectorList_2: findType("JsIdentityLinkedHashMap>"), + JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap"), + JsSystemError: findType("JsSystemError"), + LimitedMapView_String_ConfiguredValue: findType("LimitedMapView"), + LimitedMapView_String_ConfiguredValue_2: findType("LimitedMapView0"), + LinearChannel: findType("LinearChannel"), + LinearChannel_2: findType("LinearChannel0"), + List_ComplexSelectorComponent: findType("List"), + List_ComplexSelectorComponent_2: findType("List"), + List_CssComment: findType("List"), + List_CssComment_2: findType("List"), + List_CssMediaQuery: findType("List"), + List_CssMediaQuery_2: findType("List"), + List_Extension: findType("List"), + List_ExtensionStore: findType("List"), + List_ExtensionStore_2: findType("List"), + List_Extension_2: findType("List"), + List_JSObject: findType("List"), + List_List_ComplexSelectorComponent: findType("List>"), + List_List_ComplexSelectorComponent_2: findType("List>"), + List_Module_AsyncCallable: findType("List>"), + List_Module_AsyncCallable_2: findType("List>"), + List_Module_Callable: findType("List>"), + List_Module_Callable_2: findType("List>"), + List_String: findType("List"), + List_WatchEvent: findType("List"), + List_dynamic: findType("List<@>"), + List_int: findType("List"), + MapKeySet_Module_AsyncCallable: findType("MapKeySet>"), + MapKeySet_Module_AsyncCallable_2: findType("MapKeySet>"), + MapKeySet_Module_Callable: findType("MapKeySet>"), + MapKeySet_Module_Callable_2: findType("MapKeySet>"), + MapKeySet_SimpleSelector: findType("MapKeySet"), + MapKeySet_SimpleSelector_2: findType("MapKeySet"), + MapKeySet_String: findType("MapKeySet"), + MapKeySet_nullable_Object: findType("MapKeySet"), + Map_ComplexSelector_Extension: findType("Map"), + Map_ComplexSelector_Extension_2: findType("Map"), + Map_String_AstNode: findType("Map"), + Map_String_AstNode_2: findType("Map"), + Map_String_AsyncCallable: findType("Map"), + Map_String_AsyncCallable_2: findType("Map"), + Map_String_Callable: findType("Map"), + Map_String_Callable_2: findType("Map"), + Map_String_Value: findType("Map"), + Map_String_Value_2: findType("Map"), + Map_String_dynamic: findType("Map"), + Map_dynamic_dynamic: findType("Map<@,@>"), + MappedIterable_String_Frame: findType("MappedIterable"), + MappedListIterable_Frame_Frame: findType("MappedListIterable"), + MappedListIterable_String_Object: findType("MappedListIterable"), + MappedListIterable_String_String: findType("MappedListIterable"), + MappedListIterable_String_Trace: findType("MappedListIterable"), + MappedListIterable_String_Value: findType("MappedListIterable"), + MappedListIterable_String_Value_2: findType("MappedListIterable"), + MappedListIterable_String_dynamic: findType("MappedListIterable"), + MixinRule: findType("MixinRule"), + MixinRule_2: findType("MixinRule0"), + ModifiableBox_SelectorList: findType("ModifiableBox"), + ModifiableBox_SelectorList_2: findType("ModifiableBox0"), + ModifiableCssAtRule: findType("ModifiableCssAtRule"), + ModifiableCssAtRule_2: findType("ModifiableCssAtRule0"), + ModifiableCssKeyframeBlock: findType("ModifiableCssKeyframeBlock"), + ModifiableCssKeyframeBlock_2: findType("ModifiableCssKeyframeBlock0"), + ModifiableCssMediaRule: findType("ModifiableCssMediaRule"), + ModifiableCssMediaRule_2: findType("ModifiableCssMediaRule0"), + ModifiableCssNode: findType("ModifiableCssNode"), + ModifiableCssNode_2: findType("ModifiableCssNode0"), + ModifiableCssParentNode: findType("ModifiableCssParentNode"), + ModifiableCssParentNode_2: findType("ModifiableCssParentNode0"), + ModifiableCssStyleRule: findType("ModifiableCssStyleRule"), + ModifiableCssStyleRule_2: findType("ModifiableCssStyleRule0"), + ModifiableCssSupportsRule: findType("ModifiableCssSupportsRule"), + ModifiableCssSupportsRule_2: findType("ModifiableCssSupportsRule0"), + Module_AsyncCallable: findType("Module0"), + Module_AsyncCallable_2: findType("Module1"), + Module_Callable: findType("Module0"), + Module_Callable_2: findType("Module1"), + MultiSourceSpanFormatException: findType("MultiSourceSpanFormatException"), + NativeTypedArrayOfDouble: findType("NativeTypedArrayOfDouble"), + NativeTypedArrayOfInt: findType("NativeTypedArrayOfInt"), + NativeUint8List: findType("NativeUint8List"), + Never: findType("0&"), + NodeCompileResult: findType("NodeCompileResult"), + NodeImporterResult: findType("NodeImporterResult0"), + NonNullsIterable_Future_void: findType("NonNullsIterable>"), + NonNullsIterable_Object: findType("NonNullsIterable"), + NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("NonNullsIterable<+originalUrl(AsyncImporter,Uri,Uri)>"), + NonNullsIterable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("NonNullsIterable<+originalUrl(AsyncImporter0,Uri,Uri)>"), + NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("NonNullsIterable<+originalUrl(Importer,Uri,Uri)>"), + NonNullsIterable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("NonNullsIterable<+originalUrl(Importer0,Uri,Uri)>"), + NonNullsIterable_SelectorList: findType("NonNullsIterable"), + NonNullsIterable_SelectorList_2: findType("NonNullsIterable"), + NonNullsIterable_String: findType("NonNullsIterable"), + Null: findType("Null"), + NumberExpression: findType("NumberExpression"), + NumberExpression_2: findType("NumberExpression0"), + Object: findType("Object"), + Option: findType("Option"), + Parameter: findType("Parameter"), + ParameterList: findType("ParameterList"), + ParameterList_2: findType("ParameterList0"), + Parameter_2: findType("Parameter0"), + PathMap_ChangeType: findType("PathMap"), + PathMap_Stream_WatchEvent: findType("PathMap>"), + PathMap_String: findType("PathMap"), + PathMap_nullable_String: findType("PathMap"), + Promise: findType("Promise"), + PseudoSelector: findType("PseudoSelector"), + PseudoSelector_2: findType("PseudoSelector0"), + RangeError: findType("RangeError"), + Record: findType("Record"), + Record_0: findType("+()"), + Record_1_nullable_Object: findType("+(Object?)"), + Record_2_Expression_and_Expression: findType("+(Expression,Expression)"), + Record_2_Expression_and_Expression_2: findType("+(Expression0,Expression0)"), + Record_2_List_Expression_and_Map_String_Expression: findType("+(List,Map)"), + Record_2_List_Expression_and_Map_String_Expression_2: findType("+(List,Map)"), + Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet: findType("+loadedUrls,stylesheet(Set,CssStylesheet)"), + Record_2_Set_Uri_loadedUrls_and_CssStylesheet_stylesheet_2: findType("+loadedUrls,stylesheet(Set,CssStylesheet0)"), + Record_2_String_and_InterpolationMap: findType("+(String,InterpolationMap)"), + Record_2_String_and_InterpolationMap_2: findType("+(String,InterpolationMap0)"), + Record_2_String_and_SourceSpan: findType("+(String,SourceSpan)"), + Record_2_String_and_nullable_InterpolationMap: findType("+(String,InterpolationMap?)"), + Record_2_String_and_nullable_InterpolationMap_2: findType("+(String,InterpolationMap0?)"), + Record_2_Uri_and_bool_forImport: findType("+forImport(Uri,bool)"), + Record_2_nullable_IfConditionExpression_and_Expression: findType("+(IfConditionExpression?,Expression)"), + Record_2_nullable_IfConditionExpression_and_Expression_2: findType("+(IfConditionExpression0?,Expression0)"), + Record_2_nullable_Object_and_nullable_Object: findType("+(Object?,Object?)"), + Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool: findType("+(+originalUrl(AsyncImporter,Uri,Uri)?,bool)"), + Record_2_nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_and_bool_2: findType("+(+originalUrl(AsyncImporter0,Uri,Uri)?,bool)"), + Record_2_nullable_String_and_nullable_String: findType("+(String?,String?)"), + Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("+originalUrl(AsyncImporter,Uri,Uri)"), + Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(AsyncImporter0,Uri,Uri)"), + Record_3_AsyncImporter_and_Uri_and_bool_forImport: findType("+forImport(AsyncImporter,Uri,bool)"), + Record_3_AsyncImporter_and_Uri_and_bool_forImport_2: findType("+forImport(AsyncImporter0,Uri,bool)"), + Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("+originalUrl(Importer,Uri,Uri)"), + Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(Importer0,Uri,Uri)"), + Record_3_Importer_and_Uri_and_bool_forImport: findType("+forImport(Importer,Uri,bool)"), + Record_3_Importer_and_Uri_and_bool_forImport_2: findType("+forImport(Importer0,Uri,bool)"), + Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency: findType("+importer,isDependency(Stylesheet,AsyncImporter?,bool)"), + Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency_2: findType("+importer,isDependency(Stylesheet0,AsyncImporter0?,bool)"), + Record_3_nullable_Object_and_nullable_Object_and_nullable_Object_originalUrl: findType("+originalUrl(Object?,Object?,Object?)"), + Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator: findType("+named,namedNodes,positional,positionalNodes,separator(Map,Map,List,List,ListSeparator)"), + Record_5_Map_String_Value_named_and_Map_String_AstNode_namedNodes_and_List_Value_positional_and_List_AstNode_positionalNodes_and_ListSeparator_separator_2: findType("+named,namedNodes,positional,positionalNodes,separator(Map,Map,List,List,ListSeparator0)"), + RegExpMatch: findType("RegExpMatch"), + RenderContextOptions: findType("RenderContextOptions0"), + RenderResult: findType("RenderResult"), + Result_String: findType("Result"), + ReversedListIterable_Frame: findType("ReversedListIterable"), + Runes: findType("Runes"), + SassArgumentList: findType("SassArgumentList"), + SassArgumentList_2: findType("SassArgumentList0"), + SassBoolean: findType("SassBoolean"), + SassBoolean_2: findType("SassBoolean0"), + SassColor: findType("SassColor"), + SassColor_2: findType("SassColor0"), + SassFormatException: findType("SassFormatException"), + SassFormatException_2: findType("SassFormatException0"), + SassList: findType("SassList"), + SassList_2: findType("SassList0"), + SassMap: findType("SassMap"), + SassMap_2: findType("SassMap0"), + SassNumber: findType("SassNumber"), + SassNumber_2: findType("SassNumber0"), + SassRuntimeException: findType("SassRuntimeException"), + SassRuntimeException_2: findType("SassRuntimeException0"), + SassString: findType("SassString"), + SassString_2: findType("SassString0"), + SelectorList: findType("SelectorList"), + SelectorList_2: findType("SelectorList0"), + Set_ModifiableBox_SelectorList: findType("Set>"), + Set_ModifiableBox_SelectorList_2: findType("Set>"), + Set_Uri: findType("Set"), + SimpleSelector: findType("SimpleSelector"), + SimpleSelector_2: findType("SimpleSelector0"), + SourceFile: findType("SourceFile"), + SourceLocation: findType("SourceLocation"), + SourceSpan: findType("SourceSpan"), + SourceSpanFormatException: findType("SourceSpanFormatException"), + SourceSpanWithContext: findType("SourceSpanWithContext"), + StackTrace: findType("StackTrace"), + Statement: findType("Statement"), + Statement_2: findType("Statement0"), + StaticImport: findType("StaticImport"), + StaticImport_2: findType("StaticImport0"), + StreamCompleter_WatchEvent: findType("StreamCompleter"), + StreamGroup_WatchEvent: findType("StreamGroup"), + StreamQueue_String: findType("StreamQueue"), + Stream_WatchEvent: findType("Stream"), + String: findType("String"), + StringExpression: findType("StringExpression"), + StringExpression_2: findType("StringExpression0"), + StyleRule: findType("StyleRule"), + StyleRule_2: findType("StyleRule0"), + StylesheetNode: findType("StylesheetNode"), + Timer: findType("Timer"), + Trace: findType("Trace"), + TrustedGetRuntimeType: findType("TrustedGetRuntimeType"), + TypeError: findType("TypeError"), + TypeSelector: findType("TypeSelector"), + TypeSelector_2: findType("TypeSelector0"), + Uint16List: findType("Uint16List"), + Uint32List: findType("Uint32List"), + Uint8ClampedList: findType("Uint8ClampedList"), + Uint8List: findType("Uint8List"), + UnionSet_Uri: findType("UnionSet"), + UnknownJavaScriptObject: findType("UnknownJavaScriptObject"), + UnmodifiableListView_CssComment: findType("UnmodifiableListView"), + UnmodifiableListView_CssComment_2: findType("UnmodifiableListView"), + UnmodifiableListView_CssNode: findType("UnmodifiableListView"), + UnmodifiableListView_CssNode_2: findType("UnmodifiableListView"), + UnmodifiableListView_ForwardRule: findType("UnmodifiableListView"), + UnmodifiableListView_ForwardRule_2: findType("UnmodifiableListView"), + UnmodifiableListView_ModifiableCssNode: findType("UnmodifiableListView"), + UnmodifiableListView_ModifiableCssNode_2: findType("UnmodifiableListView"), + UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span: findType("UnmodifiableListView<+deprecation,message,span(Deprecation?,String,FileSpan)>"), + UnmodifiableListView_Record_3_nullable_Deprecation_deprecation_and_String_message_and_FileSpan_span_2: findType("UnmodifiableListView<+deprecation,message,span(Deprecation0?,String,FileSpan)>"), + UnmodifiableListView_String: findType("UnmodifiableListView"), + UnmodifiableListView_UseRule: findType("UnmodifiableListView"), + UnmodifiableListView_UseRule_2: findType("UnmodifiableListView"), + UnmodifiableMapView_String_ArgParser: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_ConfiguredValue: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_ConfiguredValue_2: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Option: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Value: findType("UnmodifiableMapView"), + UnmodifiableMapView_String_Value_2: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_Uri_and_nullable_StylesheetNode: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_nullable_String_and_String: findType("UnmodifiableMapView"), + UnmodifiableMapView_of_nullable_String_and_nullable_String: findType("UnmodifiableMapView"), + UnmodifiableSetView_String: findType("UnmodifiableSetView0"), + UnmodifiableSetView_StylesheetNode: findType("UnmodifiableSetView0"), + UnmodifiableSetView_Uri: findType("UnmodifiableSetView0"), + UnprefixedMapView_ConfiguredValue: findType("UnprefixedMapView"), + UnprefixedMapView_ConfiguredValue_2: findType("UnprefixedMapView0"), + Uri: findType("Uri"), + UseRule: findType("UseRule"), + UserDefinedCallable_AsyncEnvironment: findType("UserDefinedCallable"), + UserDefinedCallable_AsyncEnvironment_2: findType("UserDefinedCallable0"), + UserDefinedCallable_Environment: findType("UserDefinedCallable"), + UserDefinedCallable_Environment_2: findType("UserDefinedCallable0"), + Value: findType("Value"), + Value_2: findType("Value0"), + Value_Function_List_Value: findType("Value(List)"), + Value_Function_List_Value_2: findType("Value0(List)"), + VariableDeclaration: findType("VariableDeclaration"), + VersionRange: findType("VersionRange"), + WatchEvent: findType("WatchEvent"), + WhereIterable_List_Iterable_ComplexSelectorComponent: findType("WhereIterable>>"), + WhereIterable_List_Iterable_ComplexSelectorComponent_2: findType("WhereIterable>>"), + WhereIterable_String: findType("WhereIterable"), + WhereTypeIterable_PseudoSelector: findType("WhereTypeIterable"), + WhereTypeIterable_PseudoSelector_2: findType("WhereTypeIterable"), + WhereTypeIterable_String: findType("WhereTypeIterable"), + _AsyncCompleter_List_void: findType("_AsyncCompleter>"), + _AsyncCompleter_Object: findType("_AsyncCompleter"), + _AsyncCompleter_Stream_WatchEvent: findType("_AsyncCompleter>"), + _AsyncCompleter_String: findType("_AsyncCompleter"), + _AsyncCompleter_nullable_Object: findType("_AsyncCompleter"), + _CompleterStream_WatchEvent: findType("_CompleterStream"), + _EventRequest_dynamic: findType("_EventRequest<@>"), + _Future_List_void: findType("_Future>"), + _Future_Object: findType("_Future"), + _Future_Stream_WatchEvent: findType("_Future>"), + _Future_String: findType("_Future"), + _Future_Value: findType("_Future"), + _Future_Value_2: findType("_Future"), + _Future_bool: findType("_Future"), + _Future_dynamic: findType("_Future<@>"), + _Future_int: findType("_Future"), + _Future_nullable_Object: findType("_Future"), + _Future_void: findType("_Future<~>"), + _Highlight: findType("_Highlight"), + _IdentityHashMap_of_nullable_Object_and_nullable_Object: findType("_IdentityHashMap"), + _LinkedIdentityHashSet_ComplexSelector: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_ComplexSelector_2: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_Extension: findType("_LinkedIdentityHashSet"), + _LinkedIdentityHashSet_Extension_2: findType("_LinkedIdentityHashSet"), + _MapEntry: findType("_MapEntry"), + _NodeException: findType("_NodeException"), + _PlatformUri: findType("_PlatformUri"), + _SyncStarIterable_Deprecation: findType("_SyncStarIterable"), + _SyncStarIterable_Extension: findType("_SyncStarIterable"), + _SyncStarIterable_Extension_2: findType("_SyncStarIterable"), + _SyncStarIterable_SimpleSelector: findType("_SyncStarIterable"), + _SyncStarIterable_SimpleSelector_2: findType("_SyncStarIterable"), + _SyncStarIterable_String: findType("_SyncStarIterable"), + bool: findType("bool"), + double: findType("double"), + dynamic: findType("@"), + dynamic_Function: findType("@()"), + dynamic_Function_Object: findType("@(Object)"), + dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"), + int: findType("int"), + nullable_AstNode: findType("AstNode?"), + nullable_AstNode_2: findType("AstNode0?"), + nullable_CanonicalizeContext: findType("CanonicalizeContext?"), + nullable_CanonicalizeContext_2: findType("CanonicalizeContext0?"), + nullable_CssValue_String: findType("CssValue?"), + nullable_CssValue_String_2: findType("CssValue0?"), + nullable_FileSpan: findType("FileSpan?"), + nullable_Future_Null: findType("Future?"), + nullable_Future_void: findType("Future<~>?"), + nullable_ImporterResult: findType("ImporterResult?"), + nullable_ImporterResult_2: findType("ImporterResult0?"), + nullable_JSObject: findType("JSObject?"), + nullable_Object: findType("Object?"), + nullable_Record_2_String_and_String: findType("+(String,String)?"), + nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl: findType("+originalUrl(AsyncImporter,Uri,Uri)?"), + nullable_Record_3_AsyncImporter_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(AsyncImporter0,Uri,Uri)?"), + nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl: findType("+originalUrl(Importer,Uri,Uri)?"), + nullable_Record_3_Importer_and_Uri_and_Uri_originalUrl_2: findType("+originalUrl(Importer0,Uri,Uri)?"), + nullable_Record_3_Stylesheet_and_nullable_AsyncImporter_importer_and_bool_isDependency: findType("+importer,isDependency(Stylesheet0,AsyncImporter0?,bool)?"), + nullable_Record_3_int_and_String_and_nullable_String: findType("+(int,String,String?)?"), + nullable_SourceFile: findType("SourceFile?"), + nullable_StreamSubscription_WatchEvent: findType("StreamSubscription?"), + nullable_String: findType("String?"), + nullable_Stylesheet: findType("Stylesheet?"), + nullable_StylesheetNode: findType("StylesheetNode?"), + nullable_Stylesheet_2: findType("Stylesheet0?"), + nullable_Uri: findType("Uri?"), + nullable_Value: findType("Value?"), + nullable_Value_2: findType("Value0?"), + nullable__ConstructorOptions: findType("_ConstructorOptions?"), + nullable__ConstructorOptions_2: findType("_ConstructorOptions0?"), + nullable__ConstructorOptions_3: findType("_ConstructorOptions1?"), + nullable__Highlight: findType("_Highlight?"), + nullable_bool: findType("bool?"), + nullable_double: findType("double?"), + nullable_int: findType("int?"), + nullable_num: findType("num?"), + num: findType("num"), + void: findType("~"), + void_Function_Object: findType("~(Object)"), + void_Function_Object_StackTrace: findType("~(Object,StackTrace)") + }; + })(); + (function constants() { + var makeConstList = hunkHelpers.makeConstList; + B.Interceptor_methods = J.Interceptor.prototype; + B.JSArray_methods = J.JSArray.prototype; + B.JSBool_methods = J.JSBool.prototype; + B.JSInt_methods = J.JSInt.prototype; + B.JSNull_methods = J.JSNull.prototype; + B.JSNumber_methods = J.JSNumber.prototype; + B.JSString_methods = J.JSString.prototype; + B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; + B.JavaScriptObject_methods = J.JavaScriptObject.prototype; + B.NativeUint32List_methods = A.NativeUint32List.prototype; + B.NativeUint8List_methods = A.NativeUint8List.prototype; + B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; + B.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; + B.LinearChannel_Y0V = new A.LinearChannel(0, 1, false, false, false, "red", false, null); + B.LinearChannel_cPl = new A.LinearChannel(0, 1, false, false, false, "green", false, null); + B.LinearChannel_ABN = new A.LinearChannel(0, 1, false, false, false, "blue", false, null); + B.List_U47 = makeConstList([B.LinearChannel_Y0V, B.LinearChannel_cPl, B.LinearChannel_ABN], type$.JSArray_LinearChannel); + B.A98RgbColorSpace_lf2 = new A.A98RgbColorSpace("a98-rgb", B.List_U47); + B.LinearChannel_Y0V0 = new A.LinearChannel0(0, 1, false, false, false, "red", false, null); + B.LinearChannel_cPl0 = new A.LinearChannel0(0, 1, false, false, false, "green", false, null); + B.LinearChannel_ABN0 = new A.LinearChannel0(0, 1, false, false, false, "blue", false, null); + B.List_U470 = makeConstList([B.LinearChannel_Y0V0, B.LinearChannel_cPl0, B.LinearChannel_ABN0], type$.JSArray_LinearChannel_2); + B.A98RgbColorSpace_lf20 = new A.A98RgbColorSpace0("a98-rgb", B.List_U470); + B.AsciiEncoder_127 = new A.AsciiEncoder(127); + B.C_EmptyUnmodifiableSet1 = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.AtRootQuery_bfj = new A.AtRootQuery(false, B.C_EmptyUnmodifiableSet1, false, true); + B.AtRootQuery_bfj0 = new A.AtRootQuery0(false, B.C_EmptyUnmodifiableSet1, false, true); + B.AttributeOperator_OrK = new A.AttributeOperator("~=", 1, "include"); + B.AttributeOperator_OrK0 = new A.AttributeOperator0("~=", 1, "include"); + B.AttributeOperator_g5B = new A.AttributeOperator("|=", 2, "dash"); + B.AttributeOperator_g5B0 = new A.AttributeOperator0("|=", 2, "dash"); + B.AttributeOperator_h20 = new A.AttributeOperator("*=", 5, "substring"); + B.AttributeOperator_h200 = new A.AttributeOperator0("*=", 5, "substring"); + B.AttributeOperator_jFZ = new A.AttributeOperator("=", 0, "equal"); + B.AttributeOperator_jFZ0 = new A.AttributeOperator0("=", 0, "equal"); + B.AttributeOperator_stc = new A.AttributeOperator("^=", 3, "prefix"); + B.AttributeOperator_stc0 = new A.AttributeOperator0("^=", 3, "prefix"); + B.AttributeOperator_xJ9 = new A.AttributeOperator("$=", 4, "suffix"); + B.AttributeOperator_xJ90 = new A.AttributeOperator0("$=", 4, "suffix"); + B.BinaryOperator_5vK = new A.BinaryOperator("and", "and", 2, true, 2, "and"); + B.BinaryOperator_5vK0 = new A.BinaryOperator0("and", "and", 2, true, 2, "and"); + B.BinaryOperator_CG2 = new A.BinaryOperator("less than", "<", 4, false, 7, "lessThan"); + B.BinaryOperator_CG20 = new A.BinaryOperator0("less than", "<", 4, false, 7, "lessThan"); + B.BinaryOperator_Fv2 = new A.BinaryOperator("not equals", "!=", 3, false, 4, "notEquals"); + B.BinaryOperator_Fv20 = new A.BinaryOperator0("not equals", "!=", 3, false, 4, "notEquals"); + B.BinaryOperator_K7S = new A.BinaryOperator("equals", "==", 3, false, 3, "equals"); + B.BinaryOperator_K7S0 = new A.BinaryOperator0("equals", "==", 3, false, 3, "equals"); + B.BinaryOperator_OOf = new A.BinaryOperator("or", "or", 1, true, 1, "or"); + B.BinaryOperator_OOf0 = new A.BinaryOperator0("or", "or", 1, true, 1, "or"); + B.BinaryOperator_Tic = new A.BinaryOperator("greater than", ">", 4, false, 5, "greaterThan"); + B.BinaryOperator_Tic0 = new A.BinaryOperator0("greater than", ">", 4, false, 5, "greaterThan"); + B.BinaryOperator_YGt = new A.BinaryOperator("greater than or equals", ">=", 4, false, 6, "greaterThanOrEquals"); + B.BinaryOperator_YGt0 = new A.BinaryOperator0("greater than or equals", ">=", 4, false, 6, "greaterThanOrEquals"); + B.BinaryOperator_bgA = new A.BinaryOperator("modulo", "%", 6, false, 13, "modulo"); + B.BinaryOperator_bgA0 = new A.BinaryOperator0("modulo", "%", 6, false, 13, "modulo"); + B.BinaryOperator_ehp = new A.BinaryOperator("divided by", "/", 6, false, 12, "dividedBy"); + B.BinaryOperator_ehp0 = new A.BinaryOperator0("divided by", "/", 6, false, 12, "dividedBy"); + B.BinaryOperator_f2c = new A.BinaryOperator("less than or equals", "<=", 4, false, 8, "lessThanOrEquals"); + B.BinaryOperator_f2c0 = new A.BinaryOperator0("less than or equals", "<=", 4, false, 8, "lessThanOrEquals"); + B.BinaryOperator_g6F = new A.BinaryOperator("single equals", "=", 0, false, 0, "singleEquals"); + B.BinaryOperator_g6F0 = new A.BinaryOperator0("single equals", "=", 0, false, 0, "singleEquals"); + B.BinaryOperator_jCK = new A.BinaryOperator("plus", "+", 5, true, 9, "plus"); + B.BinaryOperator_jCK0 = new A.BinaryOperator0("plus", "+", 5, true, 9, "plus"); + B.BinaryOperator_tDf = new A.BinaryOperator("minus", "-", 5, false, 10, "minus"); + B.BinaryOperator_tDf0 = new A.BinaryOperator0("minus", "-", 5, false, 10, "minus"); + B.BinaryOperator_wkM = new A.BinaryOperator("times", "*", 6, true, 11, "times"); + B.BinaryOperator_wkM0 = new A.BinaryOperator0("times", "*", 6, true, 11, "times"); + B.BooleanOperator_0 = new A.BooleanOperator(0, "and"); + B.BooleanOperator_00 = new A.BooleanOperator0(0, "and"); + B.BooleanOperator_1 = new A.BooleanOperator(1, "or"); + B.BooleanOperator_10 = new A.BooleanOperator0(1, "or"); + B.CONSTANT = new A.Instantiation1(A.math0__max$closure(), A.findType("Instantiation1")); + B.C_AsciiCodec = new A.AsciiCodec(); + B.C_AsciiGlyphSet = new A.AsciiGlyphSet(); + B.C_Base64Encoder = new A.Base64Encoder(); + B.C_Base64Codec = new A.Base64Codec(); + B.C_DefaultEquality = new A.DefaultEquality(); + B.C_DefaultLogger = new A.DefaultLogger(); + B.C_DefaultLogger0 = new A.DefaultLogger0(); + B.C_EmptyExtensionStore = new A.EmptyExtensionStore(); + B.C_EmptyExtensionStore0 = new A.EmptyExtensionStore0(); + B.C_EmptyIterator = new A.EmptyIterator(); + B.C_EmptyUnmodifiableSet = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.C_EmptyUnmodifiableSet0 = new A.EmptyUnmodifiableSet(A.findType("EmptyUnmodifiableSet")); + B.C_IsCalculationSafeVisitor = new A.IsCalculationSafeVisitor(); + B.C_IsCalculationSafeVisitor0 = new A.IsCalculationSafeVisitor0(); + B.C_IterableEquality = new A.IterableEquality(); + B.C_JS_CONST = function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); +}; + B.C_JS_CONST0 = function() { + var toStringFunction = Object.prototype.toString; + function getTag(o) { + var s = toStringFunction.call(o); + return s.substring(8, s.length - 1); + } + function getUnknownTag(object, tag) { + if (/^HTML[A-Z].*Element$/.test(tag)) { + var name = toStringFunction.call(object); + if (name == "[object Object]") return null; + return "HTMLElement"; + } + } + function getUnknownTagGenericBrowser(object, tag) { + if (object instanceof HTMLElement) return "HTMLElement"; + return getUnknownTag(object, tag); + } + function prototypeForTag(tag) { + if (typeof window == "undefined") return null; + if (typeof window[tag] == "undefined") return null; + var constructor = window[tag]; + if (typeof constructor != "function") return null; + return constructor.prototype; + } + function discriminator(tag) { return null; } + var isBrowser = typeof HTMLElement == "function"; + return { + getTag: getTag, + getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, + prototypeForTag: prototypeForTag, + discriminator: discriminator }; +}; + B.C_JS_CONST6 = function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; + if (userAgent.indexOf("DumpRenderTree") >= 0) return hooks; + if (userAgent.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; +}; + B.C_JS_CONST1 = function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); +}; + B.C_JS_CONST5 = function(hooks) { + if (typeof navigator != "object") return hooks; + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; +}; + B.C_JS_CONST4 = function(hooks) { + if (typeof navigator != "object") return hooks; + var userAgent = navigator.userAgent; + if (typeof userAgent != "string") return hooks; + if (userAgent.indexOf("Trident/") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "HTMLDDElement": "HTMLElement", + "HTMLDTElement": "HTMLElement", + "HTMLPhraseElement": "HTMLElement", + "Position": "Geoposition" + }; + function getTagIE(o) { + var tag = getTag(o); + var newTag = quickMap[tag]; + if (newTag) return newTag; + if (tag == "Object") { + if (window.DataView && (o instanceof window.DataView)) return "DataView"; + } + return tag; + } + function prototypeForTagIE(tag) { + var constructor = window[tag]; + if (constructor == null) return null; + return constructor.prototype; + } + hooks.getTag = getTagIE; + hooks.prototypeForTag = prototypeForTagIE; +}; + B.C_JS_CONST2 = function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; +}; + B.C_JS_CONST3 = function(hooks) { return hooks; } +; + B.C_JsonCodec = new A.JsonCodec(); + B.C_ListEquality0 = new A.ListEquality(); + B.C_ListEquality = new A.ListEquality(); + B.C_MapEquality = new A.MapEquality(A.findType("MapEquality")); + B.C_OutOfMemoryError = new A.OutOfMemoryError(); + B.C_SentinelValue = new A.SentinelValue(); + B.C_UnicodeGlyphSet = new A.UnicodeGlyphSet(); + B.C_Utf8Codec = new A.Utf8Codec(); + B.C_Utf8Encoder = new A.Utf8Encoder(); + B.C__ColorFormatEnum = new A._ColorFormatEnum(); + B.C__ColorFormatEnum0 = new A._ColorFormatEnum0(); + B.C__ContainsParentSelectorVisitor = new A._ContainsParentSelectorVisitor(); + B.C__ContainsParentSelectorVisitor0 = new A._ContainsParentSelectorVisitor0(); + B.C__DelayedDone = new A._DelayedDone(); + B.C__HasContentVisitor = new A._HasContentVisitor(); + B.C__HasContentVisitor0 = new A._HasContentVisitor0(); + B.C__IsUselessVisitor = new A._IsUselessVisitor(); + B.C__IsUselessVisitor0 = new A._IsUselessVisitor0(); + B.C__JSRandom = new A._JSRandom(); + B.C__MakeExpressionCalculationSafe = new A._MakeExpressionCalculationSafe(); + B.C__MakeExpressionCalculationSafe0 = new A._MakeExpressionCalculationSafe0(); + B.C__ParentSelectorVisitor = new A._ParentSelectorVisitor(); + B.C__ParentSelectorVisitor0 = new A._ParentSelectorVisitor0(); + B.C__Required = new A._Required(); + B.C__RootZone = new A._RootZone(); + B.C__SassNull = new A._SassNull(); + B.C__SassNull0 = new A._SassNull0(); + B.CalculationOperator_KrC = new A.CalculationOperator("minus", "-", 1, 1, "minus"); + B.CalculationOperator_KrC0 = new A.CalculationOperator0("minus", "-", 1, 1, "minus"); + B.CalculationOperator_LPB = new A.CalculationOperator("times", "*", 2, 2, "times"); + B.CalculationOperator_LPB0 = new A.CalculationOperator0("times", "*", 2, 2, "times"); + B.CalculationOperator_dpX = new A.CalculationOperator("plus", "+", 1, 0, "plus"); + B.CalculationOperator_dpX0 = new A.CalculationOperator0("plus", "+", 1, 0, "plus"); + B.CalculationOperator_wFL = new A.CalculationOperator("divided by", "/", 2, 3, "dividedBy"); + B.CalculationOperator_wFL0 = new A.CalculationOperator0("divided by", "/", 2, 3, "dividedBy"); + B.ChangeType_add = new A.ChangeType("add"); + B.ChangeType_modify = new A.ChangeType("modify"); + B.ChangeType_remove = new A.ChangeType("remove"); + B.ClipGamutMap_clip = new A.ClipGamutMap("clip"); + B.ClipGamutMap_clip0 = new A.ClipGamutMap0("clip"); + B.Combinator_98W = new A.Combinator("~", 2, "followingSibling"); + B.Combinator_98W0 = new A.Combinator0("~", 2, "followingSibling"); + B.Combinator_iUF = new A.Combinator(">", 1, "child"); + B.Combinator_iUF0 = new A.Combinator0(">", 1, "child"); + B.Combinator_sHB = new A.Combinator("+", 0, "nextSibling"); + B.Combinator_sHB0 = new A.Combinator0("+", 0, "nextSibling"); + B.Object_empty = {}; + B.Map_empty18 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Configuration_Map_empty_null = new A.Configuration(B.Map_empty18, null); + B.Map_empty19 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Configuration_Map_empty_null0 = new A.Configuration0(B.Map_empty19, null); + B.Deprecation_0rM = new A.Deprecation("bogus-combinators", "1.54.0", null, 7, "bogusCombinators"); + B.Deprecation_2Ja = new A.Deprecation0("function-name", "1.98.0", "Uppercase reserved function names.", null, 27, "functionName"); + B.Deprecation_2PR = new A.Deprecation0("bogus-combinators", "1.54.0", "Leading, trailing, and repeated combinators.", null, 7, "bogusCombinators"); + B.Deprecation_6BW = new A.Deprecation("import", "1.80.0", null, 20, "import"); + B.Deprecation_7Bn = new A.Deprecation("color-module-compat", "1.23.0", null, 5, "colorModuleCompat"); + B.Deprecation_7TE = new A.Deprecation("function-units", "1.56.0", null, 9, "functionUnits"); + B.Deprecation_8Zg = new A.Deprecation("misplaced-rest", "1.91.0", null, 24, "misplacedRest"); + B.Deprecation_DVV = new A.Deprecation0("duplicate-var-flags", "1.62.0", "Using !default or !global multiple times for one variable.", null, 10, "duplicateVarFlags"); + B.Deprecation_Gmv = new A.Deprecation0("moz-document", "1.7.2", "@-moz-document.", null, 2, "mozDocument"); + B.Deprecation_H4k = new A.Deprecation("function-name", "1.98.0", null, 27, "functionName"); + B.Deprecation_HUu = new A.Deprecation("elseif", "1.3.2", null, 1, "elseif"); + B.Deprecation_IqB = new A.Deprecation("relative-canonical", "1.14.2", null, 3, "relativeCanonical"); + B.Deprecation_Jgi = new A.Deprecation0("misplaced-rest", "1.91.0", "A rest parameter before a positional or named parameter.", null, 24, "misplacedRest"); + B.Deprecation_K9u = new A.Deprecation("strict-unary", "1.55.0", null, 8, "strictUnary"); + B.Deprecation_Kh7 = new A.Deprecation0("strict-unary", "1.55.0", "Ambiguous + and - operators.", null, 8, "strictUnary"); + B.Deprecation_L3L = new A.Deprecation0("import", "1.80.0", "@import rules.", null, 20, "import"); + B.Deprecation_LIY = new A.Deprecation0("call-string", "0.0.0", "Passing a string directly to meta.call().", null, 0, "callString"); + B.Deprecation_LUk = new A.Deprecation0("fs-importer-cwd", "1.73.0", "Using the current working directory as an implicit load path.", null, 13, "fsImporterCwd"); + B.Deprecation_PGp = new A.Deprecation0("legacy-js-api", "1.79.0", "Legacy JS API.", null, 19, "legacyJsApi"); + B.Deprecation_PHd = new A.Deprecation0("function-units", "1.56.0", "Passing invalid units to built-in functions.", null, 9, "functionUnits"); + B.Deprecation_PY0 = new A.Deprecation("feature-exists", "1.78.0", null, 16, "featureExists"); + B.Deprecation_PmQ = new A.Deprecation("moz-document", "1.7.2", null, 2, "mozDocument"); + B.Deprecation_SGB = new A.Deprecation0("global-builtin", "1.80.0", "Global built-in functions that are available in sass: modules.", null, 21, "globalBuiltin"); + B.Deprecation_Szt = new A.Deprecation0("calc-interp", null, null, null, 30, "calcInterp"); + B.Deprecation_Usi = new A.Deprecation("abs-percent", "1.65.0", null, 12, "absPercent"); + B.Deprecation_V8h = new A.Deprecation("adjacent-compounds", "1.100.0", null, 28, "adjacentCompounds"); + B.Deprecation_VUl = new A.Deprecation0("elseif", "1.3.2", "@elseif.", null, 1, "elseif"); + B.Deprecation_Vc9 = new A.Deprecation0("relative-canonical", "1.14.2", "Imports using relative canonical URLs.", null, 3, "relativeCanonical"); + B.Deprecation_WW3 = new A.Deprecation("global-builtin", "1.80.0", null, 21, "globalBuiltin"); + B.Deprecation_alT = new A.Deprecation0("color-4-api", "1.79.0", "Certain uses of built-in sass:color functions.", null, 17, "color4Api"); + B.Deprecation_c4i = new A.Deprecation("call-string", "0.0.0", null, 0, "callString"); + B.Deprecation_dlf = new A.Deprecation0("user-authored", null, null, null, 29, "userAuthored"); + B.Deprecation_gGh = new A.Deprecation("user-authored", null, null, 29, "userAuthored"); + B.Deprecation_hJG = new A.Deprecation0("color-functions", "1.79.0", "Using global color functions instead of sass:color.", null, 18, "colorFunctions"); + B.Deprecation_jGw = new A.Deprecation("new-global", "1.17.2", null, 4, "newGlobal"); + B.Deprecation_ldS = new A.Deprecation0("adjacent-compounds", "1.100.0", "Adjacent compound selectors like `[class]a`.", null, 28, "adjacentCompounds"); + B.Deprecation_lkJ = new A.Deprecation0("with-private", "1.92.0", "Configuring private variables in @use, @forward, or load-css().", null, 25, "withPrivate"); + B.Deprecation_mXO = new A.Deprecation("with-private", "1.92.0", null, 25, "withPrivate"); + B.Deprecation_mqF = new A.Deprecation0("color-module-compat", "1.23.0", "Using color module functions in place of plain CSS functions.", null, 5, "colorModuleCompat"); + B.Deprecation_nRC = new A.Deprecation("duplicate-var-flags", "1.62.0", null, 10, "duplicateVarFlags"); + B.Deprecation_ox0 = new A.Deprecation0("null-alpha", "1.62.3", "Passing null as alpha in the JS API.", null, 11, "nullAlpha"); + B.Deprecation_p2t = new A.Deprecation0("feature-exists", "1.78.0", "meta.feature-exists", null, 16, "featureExists"); + B.Deprecation_pwd = new A.Deprecation0("new-global", "1.17.2", "Declaring new variables with !global.", null, 4, "newGlobal"); + B.Deprecation_qPD = new A.Deprecation("if-function", "1.95.0", null, 26, "ifFunction"); + B.Deprecation_qZ1 = new A.Deprecation("slash-div", "1.33.0", null, 6, "slashDiv"); + B.Deprecation_qka = new A.Deprecation0("if-function", "1.95.0", "The Sass if($condition, $if-true, $if-false) function.", null, 26, "ifFunction"); + B.Deprecation_r8S = new A.Deprecation("compile-string-relative-url", "1.88.0", null, 23, "compileStringRelativeUrl"); + B.Deprecation_uJ0 = new A.Deprecation("fs-importer-cwd", "1.73.0", null, 13, "fsImporterCwd"); + B.Deprecation_v81 = new A.Deprecation0("slash-div", "1.33.0", "/ operator for division.", null, 6, "slashDiv"); + B.Deprecation_w3M = new A.Deprecation0("abs-percent", "1.65.0", "Passing percentages to the Sass abs() function.", null, 12, "absPercent"); + B.Deprecation_y9Y = new A.Deprecation0("compile-string-relative-url", "1.88.0", "Passing a relative url to compileString().", null, 23, "compileStringRelativeUrl"); + B.Deprecation_zUK = new A.Deprecation("color-functions", "1.79.0", null, 18, "colorFunctions"); + B.DisplayP3ColorSpace_MmT = new A.DisplayP3ColorSpace("display-p3", B.List_U47); + B.DisplayP3ColorSpace_MmT0 = new A.DisplayP3ColorSpace0("display-p3", B.List_U470); + B.DisplayP3LinearColorSpace_PrP = new A.DisplayP3LinearColorSpace("display-p3-linear", B.List_U47); + B.DisplayP3LinearColorSpace_PrP0 = new A.DisplayP3LinearColorSpace0("display-p3-linear", B.List_U470); + B.Duration_0 = new A.Duration(0); + B.ExtendMode_allTargets_2_allTargets = new A.ExtendMode("allTargets", 2, "allTargets"); + B.ExtendMode_allTargets_2_allTargets0 = new A.ExtendMode0("allTargets", 2, "allTargets"); + B.ExtendMode_normal_0_normal = new A.ExtendMode("normal", 0, "normal"); + B.ExtendMode_normal_0_normal0 = new A.ExtendMode0("normal", 0, "normal"); + B.ExtendMode_replace_1_replace = new A.ExtendMode("replace", 1, "replace"); + B.ExtendMode_replace_1_replace0 = new A.ExtendMode0("replace", 1, "replace"); + B.ColorChannel_hue_true_deg = new A.ColorChannel("hue", true, "deg"); + B.LinearChannel_Cal = new A.LinearChannel(0, 100, true, true, false, "saturation", false, "%"); + B.LinearChannel_w1m = new A.LinearChannel(0, 100, true, false, false, "lightness", false, "%"); + B.List_oAL = makeConstList([B.ColorChannel_hue_true_deg, B.LinearChannel_Cal, B.LinearChannel_w1m], type$.JSArray_ColorChannel); + B.HslColorSpace_JQ2 = new A.HslColorSpace("hsl", B.List_oAL); + B.ColorChannel_hue_true_deg0 = new A.ColorChannel0("hue", true, "deg"); + B.LinearChannel_Cal0 = new A.LinearChannel0(0, 100, true, true, false, "saturation", false, "%"); + B.LinearChannel_w1m0 = new A.LinearChannel0(0, 100, true, false, false, "lightness", false, "%"); + B.List_oAL0 = makeConstList([B.ColorChannel_hue_true_deg0, B.LinearChannel_Cal0, B.LinearChannel_w1m0], type$.JSArray_ColorChannel_2); + B.HslColorSpace_JQ20 = new A.HslColorSpace0("hsl", B.List_oAL0); + B.HueInterpolationMethod_0 = new A.HueInterpolationMethod(0, "shorter"); + B.HueInterpolationMethod_00 = new A.HueInterpolationMethod0(0, "shorter"); + B.HueInterpolationMethod_1 = new A.HueInterpolationMethod(1, "longer"); + B.HueInterpolationMethod_10 = new A.HueInterpolationMethod0(1, "longer"); + B.HueInterpolationMethod_2 = new A.HueInterpolationMethod(2, "increasing"); + B.HueInterpolationMethod_20 = new A.HueInterpolationMethod0(2, "increasing"); + B.HueInterpolationMethod_3 = new A.HueInterpolationMethod(3, "decreasing"); + B.HueInterpolationMethod_30 = new A.HueInterpolationMethod0(3, "decreasing"); + B.LinearChannel_mPM = new A.LinearChannel(0, 100, true, false, false, "whiteness", false, "%"); + B.LinearChannel_NBP = new A.LinearChannel(0, 100, true, false, false, "blackness", false, "%"); + B.List_Ar1 = makeConstList([B.ColorChannel_hue_true_deg, B.LinearChannel_mPM, B.LinearChannel_NBP], type$.JSArray_ColorChannel); + B.HwbColorSpace_guQ = new A.HwbColorSpace("hwb", B.List_Ar1); + B.LinearChannel_mPM0 = new A.LinearChannel0(0, 100, true, false, false, "whiteness", false, "%"); + B.LinearChannel_NBP0 = new A.LinearChannel0(0, 100, true, false, false, "blackness", false, "%"); + B.List_Ar10 = makeConstList([B.ColorChannel_hue_true_deg0, B.LinearChannel_mPM0, B.LinearChannel_NBP0], type$.JSArray_ColorChannel_2); + B.HwbColorSpace_guQ0 = new A.HwbColorSpace0("hwb", B.List_Ar10); + B.JsonDecoder_null = new A.JsonDecoder(null); + B.JsonEncoder_null = new A.JsonEncoder(null); + B.LinearChannel_rY5 = new A.LinearChannel(0, 100, false, true, true, "lightness", false, "%"); + B.LinearChannel_vtc = new A.LinearChannel(-125, 125, false, false, false, "a", false, null); + B.LinearChannel_r83 = new A.LinearChannel(-125, 125, false, false, false, "b", false, null); + B.List_KEo = makeConstList([B.LinearChannel_rY5, B.LinearChannel_vtc, B.LinearChannel_r83], type$.JSArray_ColorChannel); + B.LabColorSpace_2nT = new A.LabColorSpace("lab", B.List_KEo); + B.LinearChannel_rY50 = new A.LinearChannel0(0, 100, false, true, true, "lightness", false, "%"); + B.LinearChannel_vtc0 = new A.LinearChannel0(-125, 125, false, false, false, "a", false, null); + B.LinearChannel_r830 = new A.LinearChannel0(-125, 125, false, false, false, "b", false, null); + B.List_KEo0 = makeConstList([B.LinearChannel_rY50, B.LinearChannel_vtc0, B.LinearChannel_r830], type$.JSArray_ColorChannel_2); + B.LabColorSpace_2nT0 = new A.LabColorSpace0("lab", B.List_KEo0); + B.LinearChannel_JUs = new A.LinearChannel(0, 150, false, true, false, "chroma", false, null); + B.List_grF = makeConstList([B.LinearChannel_rY5, B.LinearChannel_JUs, B.ColorChannel_hue_true_deg], type$.JSArray_ColorChannel); + B.LchColorSpace_Bpv = new A.LchColorSpace("lch", B.List_grF); + B.LinearChannel_JUs0 = new A.LinearChannel0(0, 150, false, true, false, "chroma", false, null); + B.List_grF0 = makeConstList([B.LinearChannel_rY50, B.LinearChannel_JUs0, B.ColorChannel_hue_true_deg0], type$.JSArray_ColorChannel_2); + B.LchColorSpace_Bpv0 = new A.LchColorSpace0("lch", B.List_grF0); + B.LineFeed_2_lf = new A.LineFeed(2, "lf"); + B.LineFeed_3HY = new A.LineFeed0("cr", "\r", 0, "cr"); + B.LineFeed_Kui = new A.LineFeed0("lfcr", "\n\r", 3, "lfcr"); + B.LineFeed_aqi = new A.LineFeed0("crlf", "\r\n", 1, "crlf"); + B.LineFeed_oJz = new A.LineFeed0("lf", "\n", 2, "lf"); + B.LinearChannel_XL8 = new A.LinearChannel(0, 1, false, false, false, "alpha", false, null); + B.LinearChannel_XL80 = new A.LinearChannel0(0, 1, false, false, false, "alpha", false, null); + B.LinearChannel_Z5r = new A.LinearChannel(0, 255, false, true, true, "green", false, null); + B.LinearChannel_Z5r0 = new A.LinearChannel0(0, 255, false, true, true, "green", false, null); + B.LinearChannel_qXC = new A.LinearChannel(0, 255, false, true, true, "red", false, null); + B.LinearChannel_qXC0 = new A.LinearChannel0(0, 255, false, true, true, "red", false, null); + B.LinearChannel_vJ3 = new A.LinearChannel(0, 255, false, true, true, "blue", false, null); + B.LinearChannel_vJ30 = new A.LinearChannel0(0, 255, false, true, true, "blue", false, null); + B.ListSeparator_Lul = new A.ListSeparator("slash", "/", 2, "slash"); + B.ListSeparator_Lul0 = new A.ListSeparator0("slash", "/", 2, "slash"); + B.ListSeparator_SrV = new A.ListSeparator("space", " ", 0, "space"); + B.ListSeparator_SrV0 = new A.ListSeparator0("space", " ", 0, "space"); + B.ListSeparator_undecided_null_3_undecided = new A.ListSeparator("undecided", null, 3, "undecided"); + B.ListSeparator_undecided_null_3_undecided0 = new A.ListSeparator0("undecided", null, 3, "undecided"); + B.ListSeparator_z0K = new A.ListSeparator("comma", ",", 1, "comma"); + B.ListSeparator_z0K0 = new A.ListSeparator0("comma", ",", 1, "comma"); + B.Object_84Z = {em: 0, rem: 1, ex: 2, rex: 3, cap: 4, rcap: 5, ch: 6, rch: 7, ic: 8, ric: 9, lh: 10, rlh: 11, vw: 12, lvw: 13, svw: 14, dvw: 15, vh: 16, lvh: 17, svh: 18, dvh: 19, vi: 20, lvi: 21, svi: 22, dvi: 23, vb: 24, lvb: 25, svb: 26, dvb: 27, vmin: 28, lvmin: 29, svmin: 30, dvmin: 31, vmax: 32, lvmax: 33, svmax: 34, dvmax: 35, cqw: 36, cqh: 37, cqi: 38, cqb: 39, cqmin: 40, cqmax: 41, cm: 42, mm: 43, q: 44, in: 45, pt: 46, pc: 47, px: 48}; + B.Set_V30th = new A.ConstantStringSet(B.Object_84Z, 49, type$.ConstantStringSet_String); + B.Object_a6W = {deg: 0, grad: 1, rad: 2, turn: 3}; + B.Set_5FBBb = new A.ConstantStringSet(B.Object_a6W, 4, type$.ConstantStringSet_String); + B.Object_s_0_ms_1 = {s: 0, ms: 1}; + B.Set_cXesm = new A.ConstantStringSet(B.Object_s_0_ms_1, 2, type$.ConstantStringSet_String); + B.Object_hz_0_khz_1 = {hz: 0, khz: 1}; + B.Set_1Tayw = new A.ConstantStringSet(B.Object_hz_0_khz_1, 2, type$.ConstantStringSet_String); + B.Object_CHz = {dpi: 0, dpcm: 1, dppx: 2}; + B.Set_w2NC6 = new A.ConstantStringSet(B.Object_CHz, 3, type$.ConstantStringSet_String); + B.List_BFg = makeConstList([B.Set_V30th, B.Set_5FBBb, B.Set_cXesm, B.Set_1Tayw, B.Set_w2NC6], A.findType("JSArray>")); + B.Deprecation_uqF = new A.Deprecation0("css-function-mixin", "1.76.0", "Function and mixin names beginning with --.", "1.94.0", 14, "cssFunctionMixin"); + B.Deprecation_Fpx = new A.Deprecation0("mixed-decls", "1.77.7", "Declarations after or between nested rules.", "1.92.0", 15, "mixedDecls"); + B.Deprecation_Byo = new A.Deprecation0("type-function", "1.86.0", 'Functions named "type".', "1.92.0", 22, "typeFunction"); + B.List_JA2 = makeConstList([B.Deprecation_LIY, B.Deprecation_VUl, B.Deprecation_Gmv, B.Deprecation_Vc9, B.Deprecation_pwd, B.Deprecation_mqF, B.Deprecation_v81, B.Deprecation_2PR, B.Deprecation_Kh7, B.Deprecation_PHd, B.Deprecation_DVV, B.Deprecation_ox0, B.Deprecation_w3M, B.Deprecation_LUk, B.Deprecation_uqF, B.Deprecation_Fpx, B.Deprecation_p2t, B.Deprecation_alT, B.Deprecation_hJG, B.Deprecation_PGp, B.Deprecation_L3L, B.Deprecation_SGB, B.Deprecation_Byo, B.Deprecation_y9Y, B.Deprecation_Jgi, B.Deprecation_lkJ, B.Deprecation_qka, B.Deprecation_2Ja, B.Deprecation_ldS, B.Deprecation_dlf, B.Deprecation_Szt], A.findType("JSArray")); + B.List_UqK = makeConstList([B.CalculationOperator_dpX0, B.CalculationOperator_KrC0, B.CalculationOperator_LPB0, B.CalculationOperator_wFL0], A.findType("JSArray")); + B.Deprecation_NNd = new A.Deprecation("null-alpha", "1.62.3", null, 11, "nullAlpha"); + B.Deprecation_ov6 = new A.Deprecation("css-function-mixin", "1.76.0", "1.94.0", 14, "cssFunctionMixin"); + B.Deprecation_Uqa = new A.Deprecation("mixed-decls", "1.77.7", "1.92.0", 15, "mixedDecls"); + B.Deprecation_mme = new A.Deprecation("color-4-api", "1.79.0", null, 17, "color4Api"); + B.Deprecation_cfK = new A.Deprecation("legacy-js-api", "1.79.0", null, 19, "legacyJsApi"); + B.Deprecation_ST9 = new A.Deprecation("type-function", "1.86.0", "1.92.0", 22, "typeFunction"); + B.Deprecation_qDQ = new A.Deprecation("calc-interp", null, null, 30, "calcInterp"); + B.List_bLL = makeConstList([B.Deprecation_c4i, B.Deprecation_HUu, B.Deprecation_PmQ, B.Deprecation_IqB, B.Deprecation_jGw, B.Deprecation_7Bn, B.Deprecation_qZ1, B.Deprecation_0rM, B.Deprecation_K9u, B.Deprecation_7TE, B.Deprecation_nRC, B.Deprecation_NNd, B.Deprecation_Usi, B.Deprecation_uJ0, B.Deprecation_ov6, B.Deprecation_Uqa, B.Deprecation_PY0, B.Deprecation_mme, B.Deprecation_zUK, B.Deprecation_cfK, B.Deprecation_6BW, B.Deprecation_WW3, B.Deprecation_ST9, B.Deprecation_r8S, B.Deprecation_8Zg, B.Deprecation_mXO, B.Deprecation_qPD, B.Deprecation_H4k, B.Deprecation_V8h, B.Deprecation_gGh, B.Deprecation_qDQ], A.findType("JSArray")); + B.List_empty29 = makeConstList([], type$.JSArray_AsyncCallable_2); + B.List_empty31 = makeConstList([], type$.JSArray_AsyncImporter); + B.List_empty1 = makeConstList([], type$.JSArray_ComplexSelector); + B.List_empty18 = makeConstList([], type$.JSArray_ComplexSelector_2); + B.List_empty2 = makeConstList([], type$.JSArray_ComplexSelectorComponent); + B.List_empty19 = makeConstList([], type$.JSArray_ComplexSelectorComponent_2); + B.List_empty11 = makeConstList([], type$.JSArray_ConfiguredVariable); + B.List_empty26 = makeConstList([], type$.JSArray_ConfiguredVariable_2); + B.List_empty3 = makeConstList([], type$.JSArray_CssNode); + B.List_empty20 = makeConstList([], type$.JSArray_CssNode_2); + B.List_empty0 = makeConstList([], type$.JSArray_CssValue_Combinator); + B.List_empty17 = makeConstList([], type$.JSArray_CssValue_Combinator_2); + B.List_empty9 = makeConstList([], type$.JSArray_Expression); + B.List_empty24 = makeConstList([], type$.JSArray_Expression_2); + B.List_empty5 = makeConstList([], type$.JSArray_Extension); + B.List_empty21 = makeConstList([], type$.JSArray_Extension_2); + B.List_empty28 = makeConstList([], type$.JSArray_Importer_2); + B.List_empty15 = makeConstList([], type$.JSArray_Module_AsyncCallable); + B.List_empty10 = makeConstList([], type$.JSArray_Module_Callable); + B.List_empty7 = makeConstList([], A.findType("JSArray>")); + B.List_empty30 = makeConstList([], type$.JSArray_Module_AsyncCallable_2); + B.List_empty25 = makeConstList([], type$.JSArray_Module_Callable_2); + B.List_empty22 = makeConstList([], A.findType("JSArray>")); + B.List_empty12 = makeConstList([], type$.JSArray_Object); + B.List_empty14 = makeConstList([], type$.JSArray_Parameter); + B.List_empty27 = makeConstList([], type$.JSArray_Parameter_2); + B.List_empty16 = makeConstList([], type$.JSArray_Statement); + B.List_empty = makeConstList([], type$.JSArray_String); + B.List_empty8 = makeConstList([], type$.JSArray_Value); + B.List_empty23 = makeConstList([], type$.JSArray_Value_2); + B.List_empty4 = makeConstList([], type$.JSArray_int); + B.List_empty6 = makeConstList([], type$.JSArray_dynamic); + B.List_empty13 = makeConstList([], type$.JSArray_nullable_FileSpan); + B.List_mRc = makeConstList([B.HueInterpolationMethod_00, B.HueInterpolationMethod_10, B.HueInterpolationMethod_20, B.HueInterpolationMethod_30], A.findType("JSArray")); + B.List_null = makeConstList([null], type$.JSArray_nullable_FileSpan); + B.LinearChannel_n2W = new A.LinearChannel(0, 1, false, false, false, "long", false, null); + B.LinearChannel_ZmQ = new A.LinearChannel(0, 1, false, false, false, "medium", false, null); + B.LinearChannel_yJH = new A.LinearChannel(0, 1, false, false, false, "short", false, null); + B.List_wOx = makeConstList([B.LinearChannel_n2W, B.LinearChannel_ZmQ, B.LinearChannel_yJH], type$.JSArray_ColorChannel); + B.LmsColorSpace_Os3 = new A.LmsColorSpace("lms", B.List_wOx); + B.LinearChannel_n2W0 = new A.LinearChannel0(0, 1, false, false, false, "long", false, null); + B.LinearChannel_ZmQ0 = new A.LinearChannel0(0, 1, false, false, false, "medium", false, null); + B.LinearChannel_yJH0 = new A.LinearChannel0(0, 1, false, false, false, "short", false, null); + B.List_wOx0 = makeConstList([B.LinearChannel_n2W0, B.LinearChannel_ZmQ0, B.LinearChannel_yJH0], type$.JSArray_ColorChannel_2); + B.LmsColorSpace_Os30 = new A.LmsColorSpace0("lms", B.List_wOx0); + B.LocalMindeGamutMap_A2x = new A.LocalMindeGamutMap("local-minde"); + B.LocalMindeGamutMap_A2x0 = new A.LocalMindeGamutMap0("local-minde"); + B.Object_CSf = {in: 0, cm: 1, pc: 2, mm: 3, q: 4, pt: 5, px: 6, deg: 7, grad: 8, rad: 9, turn: 10, s: 11, ms: 12, Hz: 13, kHz: 14, dpi: 15, dpcm: 16, dppx: 17}; + B.Object_R4j = {in: 0, cm: 1, pc: 2, mm: 3, q: 4, pt: 5, px: 6}; + B.Map_LdTcR = new A.ConstantStringMap(B.Object_R4j, [1, 0.39370078740157477, 0.16666666666666666, 0.03937007874015748, 0.00984251968503937, 0.013888888888888888, 0.010416666666666666], type$.ConstantStringMap_String_double); + B.Map_LdCjQ = new A.ConstantStringMap(B.Object_R4j, [2.54, 1, 0.42333333333333334, 0.1, 0.025, 0.035277777777777776, 0.026458333333333334], type$.ConstantStringMap_String_double); + B.Map_Ldr6M = new A.ConstantStringMap(B.Object_R4j, [6, 2.3622047244094486, 1, 0.2362204724409449, 0.05905511811023623, 0.08333333333333333, 0.0625], type$.ConstantStringMap_String_double); + B.Map_LdTyG = new A.ConstantStringMap(B.Object_R4j, [25.4, 10, 4.233333333333333, 1, 0.25, 0.35277777777777775, 0.26458333333333334], type$.ConstantStringMap_String_double); + B.Map_Ld577 = new A.ConstantStringMap(B.Object_R4j, [101.6, 40, 16.933333333333334, 4, 1, 1.411111111111111, 1.0583333333333333], type$.ConstantStringMap_String_double); + B.Map_LdIVT = new A.ConstantStringMap(B.Object_R4j, [72, 28.346456692913385, 12, 2.834645669291339, 0.7086614173228347, 1, 0.75], type$.ConstantStringMap_String_double); + B.Map_Ld6L5 = new A.ConstantStringMap(B.Object_R4j, [96, 37.79527559055118, 16, 3.7795275590551185, 0.9448818897637796, 1.3333333333333333, 1], type$.ConstantStringMap_String_double); + B.Map_LjNxM = new A.ConstantStringMap(B.Object_a6W, [1, 0.9, 57.29577951308232, 360], type$.ConstantStringMap_String_double); + B.Map_Lj8V1 = new A.ConstantStringMap(B.Object_a6W, [1.1111111111111112, 1, 63.66197723675813, 400], type$.ConstantStringMap_String_double); + B.Map_LjePw = new A.ConstantStringMap(B.Object_a6W, [0.017453292519943295, 0.015707963267948967, 1, 6.283185307179586], type$.ConstantStringMap_String_double); + B.Map_LjtMd = new A.ConstantStringMap(B.Object_a6W, [0.002777777777777778, 0.0025, 0.15915494309189535, 1], type$.ConstantStringMap_String_double); + B.Map_Aezv1 = new A.ConstantStringMap(B.Object_s_0_ms_1, [1, 0.001], type$.ConstantStringMap_String_double); + B.Map_AeI7g = new A.ConstantStringMap(B.Object_s_0_ms_1, [1000, 1], type$.ConstantStringMap_String_double); + B.Object_Hz_0_kHz_1 = {Hz: 0, kHz: 1}; + B.Map_kdDCg = new A.ConstantStringMap(B.Object_Hz_0_kHz_1, [1, 1000], type$.ConstantStringMap_String_double); + B.Map_kdBEM = new A.ConstantStringMap(B.Object_Hz_0_kHz_1, [0.001, 1], type$.ConstantStringMap_String_double); + B.Map_vIkFS = new A.ConstantStringMap(B.Object_CHz, [1, 2.54, 96], type$.ConstantStringMap_String_double); + B.Map_vIY7E = new A.ConstantStringMap(B.Object_CHz, [0.39370078740157477, 1, 37.79527559055118], type$.ConstantStringMap_String_double); + B.Map_vIcSC = new A.ConstantStringMap(B.Object_CHz, [0.010416666666666666, 0.026458333333333334, 1], type$.ConstantStringMap_String_double); + B.Map_NtHoP = new A.ConstantStringMap(B.Object_CSf, [B.Map_LdTcR, B.Map_LdCjQ, B.Map_Ldr6M, B.Map_LdTyG, B.Map_Ld577, B.Map_LdIVT, B.Map_Ld6L5, B.Map_LjNxM, B.Map_Lj8V1, B.Map_LjePw, B.Map_LjtMd, B.Map_Aezv1, B.Map_AeI7g, B.Map_kdDCg, B.Map_kdBEM, B.Map_vIkFS, B.Map_vIY7E, B.Map_vIcSC], A.findType("ConstantStringMap>")); + B.Object_J3y = {length: 0, angle: 1, time: 2, frequency: 3, "pixel density": 4}; + B.List_Ldp = makeConstList(["in", "cm", "pc", "mm", "q", "pt", "px"], type$.JSArray_String); + B.List_deg_grad_rad_turn = makeConstList(["deg", "grad", "rad", "turn"], type$.JSArray_String); + B.List_s_ms = makeConstList(["s", "ms"], type$.JSArray_String); + B.List_Hz_kHz = makeConstList(["Hz", "kHz"], type$.JSArray_String); + B.List_dpi_dpcm_dppx = makeConstList(["dpi", "dpcm", "dppx"], type$.JSArray_String); + B.Map_Sr65K = new A.ConstantStringMap(B.Object_J3y, [B.List_Ldp, B.List_deg_grad_rad_turn, B.List_s_ms, B.List_Hz_kHz, B.List_dpi_dpcm_dppx], A.findType("ConstantStringMap>")); + B.Map_empty7 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty1 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty16 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty10 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty12 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap,List>")); + B.Map_empty3 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty13 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty4 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty14 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty5 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty8 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Map_empty0 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Map_empty17 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Map_empty11 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Map_empty6 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty15 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty2 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.Map_empty9 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.LinearChannel_fS8 = new A.LinearChannel(0, 1, false, true, true, "lightness", false, "%"); + B.LinearChannel_ffI = new A.LinearChannel(-0.4, 0.4, false, false, false, "a", false, null); + B.LinearChannel_Y6D = new A.LinearChannel(-0.4, 0.4, false, false, false, "b", false, null); + B.List_ZWr = makeConstList([B.LinearChannel_fS8, B.LinearChannel_ffI, B.LinearChannel_Y6D], type$.JSArray_ColorChannel); + B.OklabColorSpace_540 = new A.OklabColorSpace("oklab", B.List_ZWr); + B.LinearChannel_fS80 = new A.LinearChannel0(0, 1, false, true, true, "lightness", false, "%"); + B.LinearChannel_ffI0 = new A.LinearChannel0(-0.4, 0.4, false, false, false, "a", false, null); + B.LinearChannel_Y6D0 = new A.LinearChannel0(-0.4, 0.4, false, false, false, "b", false, null); + B.List_ZWr0 = makeConstList([B.LinearChannel_fS80, B.LinearChannel_ffI0, B.LinearChannel_Y6D0], type$.JSArray_ColorChannel_2); + B.OklabColorSpace_5400 = new A.OklabColorSpace0("oklab", B.List_ZWr0); + B.LinearChannel_HTj = new A.LinearChannel(0, 0.4, false, true, false, "chroma", false, null); + B.List_g5j = makeConstList([B.LinearChannel_fS8, B.LinearChannel_HTj, B.ColorChannel_hue_true_deg], type$.JSArray_ColorChannel); + B.OklchColorSpace_9Gj = new A.OklchColorSpace("oklch", B.List_g5j); + B.LinearChannel_HTj0 = new A.LinearChannel0(0, 0.4, false, true, false, "chroma", false, null); + B.List_g5j0 = makeConstList([B.LinearChannel_fS80, B.LinearChannel_HTj0, B.ColorChannel_hue_true_deg0], type$.JSArray_ColorChannel_2); + B.OklchColorSpace_9Gj0 = new A.OklchColorSpace0("oklch", B.List_g5j0); + B.OptionType_1Ol = new A.OptionType("OptionType.multiple"); + B.OptionType_tI9 = new A.OptionType("OptionType.flag"); + B.OptionType_zZK = new A.OptionType("OptionType.single"); + B.OutputStyle_0 = new A.OutputStyle(0, "expanded"); + B.OutputStyle_00 = new A.OutputStyle0(0, "expanded"); + B.OutputStyle_1 = new A.OutputStyle(1, "compressed"); + B.OutputStyle_10 = new A.OutputStyle0(1, "compressed"); + B.ProphotoRgbColorSpace_BDz = new A.ProphotoRgbColorSpace("prophoto-rgb", B.List_U47); + B.ProphotoRgbColorSpace_BDz0 = new A.ProphotoRgbColorSpace0("prophoto-rgb", B.List_U470); + B.Rec2020ColorSpace_6oo = new A.Rec2020ColorSpace("rec2020", B.List_U47); + B.Rec2020ColorSpace_6oo0 = new A.Rec2020ColorSpace0("rec2020", B.List_U470); + B.Map_empty20 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Record2_EmptyExtensionStore_Map_empty = new A._Record_2(B.C_EmptyExtensionStore, B.Map_empty20); + B.Map_empty21 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap>")); + B.Record2_EmptyExtensionStore_Map_empty0 = new A._Record_2(B.C_EmptyExtensionStore0, B.Map_empty21); + B.List_Ds2 = makeConstList([B.LinearChannel_qXC, B.LinearChannel_Z5r, B.LinearChannel_vJ3], type$.JSArray_ColorChannel); + B.RgbColorSpace_i0P = new A.RgbColorSpace("rgb", B.List_Ds2); + B.List_Ds20 = makeConstList([B.LinearChannel_qXC0, B.LinearChannel_Z5r0, B.LinearChannel_vJ30], type$.JSArray_ColorChannel_2); + B.RgbColorSpace_i0P0 = new A.RgbColorSpace0("rgb", B.List_Ds20); + B.SassBoolean_false = new A.SassBoolean(false); + B.SassBoolean_false0 = new A.SassBoolean0(false); + B.SassBoolean_true = new A.SassBoolean(true); + B.SassBoolean_true0 = new A.SassBoolean0(true); + B.SassList_9ua = new A.SassList0(B.List_empty23, B.ListSeparator_undecided_null_3_undecided0, false); + B.SassList_oH0 = new A.SassList(B.List_empty8, B.ListSeparator_z0K, false); + B.SassList_oH00 = new A.SassList0(B.List_empty23, B.ListSeparator_z0K0, false); + B.SassList_oWx = new A.SassList(B.List_empty8, B.ListSeparator_z0K, true); + B.SassList_oWx0 = new A.SassList0(B.List_empty23, B.ListSeparator_z0K0, true); + B.Map_empty22 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.SassMap_Map_empty = new A.SassMap(B.Map_empty22); + B.Map_empty23 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); + B.SassMap_Map_empty0 = new A.SassMap0(B.Map_empty23); + B.Object_Tro = {is: 0, matches: 1, where: 2}; + B.Set_0egh6 = new A.ConstantStringSet(B.Object_Tro, 3, type$.ConstantStringSet_String); + B.Object_SWZ = {and: 0, or: 1, not: 2}; + B.Set_6V2Gi = new A.ConstantStringSet(B.Object_SWZ, 3, type$.ConstantStringSet_String); + B.Object_ssn = {sass: 0, style: 1, default: 2}; + B.Set_8229z = new A.ConstantStringSet(B.Object_ssn, 3, type$.ConstantStringSet_String); + B.Set_9FDyj = new A.GeneralConstantSet([B.RgbColorSpace_i0P, B.HslColorSpace_JQ2], A.findType("GeneralConstantSet")); + B.Set_9FDyj0 = new A.GeneralConstantSet([B.RgbColorSpace_i0P0, B.HslColorSpace_JQ20], A.findType("GeneralConstantSet")); + B.Object_BKa = {".scss": 0, ".sass": 1, ".css": 2}; + B.Set_FTDN4 = new A.ConstantStringSet(B.Object_BKa, 3, type$.ConstantStringSet_String); + B.Object_GR4 = {calc: 0, clamp: 1, hypot: 2, sin: 3, cos: 4, tan: 5, asin: 6, acos: 7, atan: 8, sqrt: 9, exp: 10, sign: 11, mod: 12, rem: 13, atan2: 14, pow: 15, log: 16, "calc-size": 17}; + B.Set_Pr3yj = new A.ConstantStringSet(B.Object_GR4, 18, type$.ConstantStringSet_String); + B.Set_empty2 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); + B.Set_empty6 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); + B.Set_empty3 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); + B.Set_empty0 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); + B.Set_empty7 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); + B.Set_empty5 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet>")); + B.Set_empty1 = new A.ConstantStringSet(B.Object_empty, 0, type$.ConstantStringSet_String); + B.Set_empty4 = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); + B.Set_empty = new A.ConstantStringSet(B.Object_empty, 0, A.findType("ConstantStringSet")); + B.Set_xkEMv = new A.GeneralConstantSet([B.BinaryOperator_wkM, B.BinaryOperator_ehp, B.BinaryOperator_jCK, B.BinaryOperator_tDf], A.findType("GeneralConstantSet")); + B.Set_xkEMv0 = new A.GeneralConstantSet([B.BinaryOperator_wkM0, B.BinaryOperator_ehp0, B.BinaryOperator_jCK0, B.BinaryOperator_tDf0], A.findType("GeneralConstantSet")); + B.SrgbColorSpace_thf = new A.SrgbColorSpace("srgb", B.List_U47); + B.SrgbColorSpace_thf0 = new A.SrgbColorSpace0("srgb", B.List_U470); + B.SrgbLinearColorSpace_kUj = new A.SrgbLinearColorSpace("srgb-linear", B.List_U47); + B.SrgbLinearColorSpace_kUj0 = new A.SrgbLinearColorSpace0("srgb-linear", B.List_U470); + B.Symbol__canonicalizeContext = new A.Symbol("_canonicalizeContext"); + B.Symbol__evaluationContext = new A.Symbol("_evaluationContext"); + B.Symbol__extensions = new A.Symbol("_extensions"); + B.Symbol__sourceSpecificity = new A.Symbol("_sourceSpecificity"); + B.Symbol_call = new A.Symbol("call"); + B.Syntax_CSS_2_css = new A.Syntax("CSS", 2, "css"); + B.Syntax_CSS_2_css0 = new A.Syntax0("CSS", 2, "css"); + B.Syntax_SCSS_0_scss = new A.Syntax("SCSS", 0, "scss"); + B.Syntax_SCSS_0_scss0 = new A.Syntax0("SCSS", 0, "scss"); + B.Syntax_Sass_1_sass = new A.Syntax("Sass", 1, "sass"); + B.Syntax_Sass_1_sass0 = new A.Syntax0("Sass", 1, "sass"); + B.Type_ByteBuffer_rqD = A.typeLiteral("ByteBuffer"); + B.Type_ByteData_9dB = A.typeLiteral("ByteData"); + B.Type_Float32List_9Kz = A.typeLiteral("Float32List"); + B.Type_Float64List_9Kz = A.typeLiteral("Float64List"); + B.Type_Int16List_s5h = A.typeLiteral("Int16List"); + B.Type_Int32List_O8Z = A.typeLiteral("Int32List"); + B.Type_Int8List_rFV = A.typeLiteral("Int8List"); + B.Type_Object_A4p = A.typeLiteral("Object"); + B.Type_Uint16List_kmP = A.typeLiteral("Uint16List"); + B.Type_Uint32List_kmP = A.typeLiteral("Uint32List"); + B.Type_Uint8ClampedList_04U = A.typeLiteral("Uint8ClampedList"); + B.Type_Uint8List_8Eb = A.typeLiteral("Uint8List"); + B.UnaryOperator_Y93 = new A.UnaryOperator("divide", "/", 2, "divide"); + B.UnaryOperator_Y930 = new A.UnaryOperator0("divide", "/", 2, "divide"); + B.UnaryOperator_hCO = new A.UnaryOperator("minus", "-", 1, "minus"); + B.UnaryOperator_hCO0 = new A.UnaryOperator0("minus", "-", 1, "minus"); + B.UnaryOperator_n2K = new A.UnaryOperator("plus", "+", 0, "plus"); + B.UnaryOperator_n2K0 = new A.UnaryOperator0("plus", "+", 0, "plus"); + B.UnaryOperator_not_not_3_not = new A.UnaryOperator("not", "not", 3, "not"); + B.UnaryOperator_not_not_3_not0 = new A.UnaryOperator0("not", "not", 3, "not"); + B.Utf8Decoder_false = new A.Utf8Decoder(false); + B.LinearChannel_LYw = new A.LinearChannel(0, 1, false, false, false, "x", false, null); + B.LinearChannel_eR7 = new A.LinearChannel(0, 1, false, false, false, "y", false, null); + B.LinearChannel_gZl = new A.LinearChannel(0, 1, false, false, false, "z", false, null); + B.List_QRs = makeConstList([B.LinearChannel_LYw, B.LinearChannel_eR7, B.LinearChannel_gZl], type$.JSArray_LinearChannel); + B.XyzD50ColorSpace_2OB = new A.XyzD50ColorSpace("xyz-d50", B.List_QRs); + B.LinearChannel_LYw0 = new A.LinearChannel0(0, 1, false, false, false, "x", false, null); + B.LinearChannel_eR70 = new A.LinearChannel0(0, 1, false, false, false, "y", false, null); + B.LinearChannel_gZl0 = new A.LinearChannel0(0, 1, false, false, false, "z", false, null); + B.List_QRs0 = makeConstList([B.LinearChannel_LYw0, B.LinearChannel_eR70, B.LinearChannel_gZl0], type$.JSArray_LinearChannel_2); + B.XyzD50ColorSpace_2OB0 = new A.XyzD50ColorSpace0("xyz-d50", B.List_QRs0); + B.XyzD65ColorSpace_WiJ = new A.XyzD65ColorSpace("xyz", B.List_QRs); + B.XyzD65ColorSpace_WiJ0 = new A.XyzD65ColorSpace0("xyz", B.List_QRs0); + B._IsBogusVisitor_false = new A._IsBogusVisitor(false); + B._IsBogusVisitor_false0 = new A._IsBogusVisitor0(false); + B._IsBogusVisitor_true = new A._IsBogusVisitor(true); + B._IsBogusVisitor_true0 = new A._IsBogusVisitor0(true); + B._IsInvisibleVisitor_false = new A._IsInvisibleVisitor0(false); + B._IsInvisibleVisitor_false0 = new A._IsInvisibleVisitor2(false); + B._IsInvisibleVisitor_false_false = new A._IsInvisibleVisitor(false, false); + B._IsInvisibleVisitor_false_false0 = new A._IsInvisibleVisitor1(false, false); + B._IsInvisibleVisitor_true = new A._IsInvisibleVisitor0(true); + B._IsInvisibleVisitor_true0 = new A._IsInvisibleVisitor2(true); + B._IsInvisibleVisitor_true_false = new A._IsInvisibleVisitor(true, false); + B._IsInvisibleVisitor_true_false0 = new A._IsInvisibleVisitor1(true, false); + B._IsInvisibleVisitor_true_true = new A._IsInvisibleVisitor(true, true); + B._IsInvisibleVisitor_true_true0 = new A._IsInvisibleVisitor1(true, true); + B._PathDirection_6kc = new A._PathDirection("reaches root"); + B._PathDirection_Wme = new A._PathDirection("below root"); + B._PathDirection_dMN = new A._PathDirection("at root"); + B._PathDirection_vgO = new A._PathDirection("above root"); + B._PathRelation_different = new A._PathRelation("different"); + B._PathRelation_equal = new A._PathRelation("equal"); + B._PathRelation_inconclusive = new A._PathRelation("inconclusive"); + B._PathRelation_within = new A._PathRelation("within"); + B._SingletonCssMediaQueryMergeResult_0 = new A._SingletonCssMediaQueryMergeResult(0, "empty"); + B._SingletonCssMediaQueryMergeResult_00 = new A._SingletonCssMediaQueryMergeResult0(0, "empty"); + B._SingletonCssMediaQueryMergeResult_1 = new A._SingletonCssMediaQueryMergeResult(1, "unrepresentable"); + B._SingletonCssMediaQueryMergeResult_10 = new A._SingletonCssMediaQueryMergeResult0(1, "unrepresentable"); + B._StreamGroupState_canceled = new A._StreamGroupState("canceled"); + B._StreamGroupState_dormant = new A._StreamGroupState("dormant"); + B._StreamGroupState_listening = new A._StreamGroupState("listening"); + B._StreamGroupState_paused = new A._StreamGroupState("paused"); + B._StringStackTrace_OdL = new A._StringStackTrace(""); + B._ZoneFunction_KjJ = new A._ZoneFunction(B.C__RootZone, A.async___rootHandleUncaughtError$closure()); + B._ZoneFunction_PAY = new A._ZoneFunction(B.C__RootZone, A.async___rootCreatePeriodicTimer$closure()); + B._ZoneFunction_Xkh = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterUnaryCallback$closure()); + B._ZoneFunction__RootZone__rootCreateTimer = new A._ZoneFunction(B.C__RootZone, A.async___rootCreateTimer$closure()); + B._ZoneFunction__RootZone__rootErrorCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootErrorCallback$closure()); + B._ZoneFunction__RootZone__rootFork = new A._ZoneFunction(B.C__RootZone, A.async___rootFork$closure()); + B._ZoneFunction__RootZone__rootPrint = new A._ZoneFunction(B.C__RootZone, A.async___rootPrint$closure()); + B._ZoneFunction__RootZone__rootRegisterCallback = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterCallback$closure()); + B._ZoneFunction__RootZone__rootRun = new A._ZoneFunction(B.C__RootZone, A.async___rootRun$closure()); + B._ZoneFunction__RootZone__rootRunBinary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunBinary$closure()); + B._ZoneFunction__RootZone__rootRunUnary = new A._ZoneFunction(B.C__RootZone, A.async___rootRunUnary$closure()); + B._ZoneFunction__RootZone__rootScheduleMicrotask = new A._ZoneFunction(B.C__RootZone, A.async___rootScheduleMicrotask$closure()); + B._ZoneFunction_e9o = new A._ZoneFunction(B.C__RootZone, A.async___rootRegisterBinaryCallback$closure()); + B._ZoneSpecification_Ipa = new A._ZoneSpecification(null, null, null, null, null, null, null, null, null, null, null, null, null); + })(); + (function staticFields() { + $._JS_INTEROP_INTERCEPTOR_TAG = null; + $._toStringVisiting = A._setArrayType([], type$.JSArray_Object); + $._printToZone = null; + $.Primitives__identityHashCodeProperty = null; + $.BoundClosure__receiverFieldNameCache = null; + $.BoundClosure__interceptorFieldNameCache = null; + $.getTagFunction = null; + $.alternateTagFunction = null; + $.prototypeForTagFunction = null; + $.dispatchRecordsForInstanceTags = null; + $.interceptorsForUncacheableTags = null; + $.initNativeDispatchFlag = null; + $._Record__computedFieldKeys = A._setArrayType([], A.findType("JSArray?>")); + $._nextCallback = null; + $._lastCallback = null; + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + $.Zone__current = B.C__RootZone; + $._RootZone__rootDelegate = null; + $.Uri__cachedBaseString = ""; + $.Uri__cachedBaseUri = null; + $._fs = null; + $._currentUriBase = null; + $._current = null; + $._subselectorPseudos = A.LinkedHashSet_LinkedHashSet$_literal(["is", "matches", "where", "any", "nth-child", "nth-last-child"], type$.String); + $._rootishPseudoClasses = A.LinkedHashSet_LinkedHashSet$_literal(["root", "scope", "host", "host-context"], type$.String); + $._features = A.LinkedHashSet_LinkedHashSet$_literal(["global-variable-shadowing", "extend-selector-pseudoclass", "units-level-3", "at-error", "custom-property"], type$.String); + $._realCaseCache = function() { + var t1 = type$.String; + return A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + }(); + $._default = null; + $.selectorPseudoClasses = A.LinkedHashSet_LinkedHashSet$_literal(["not", "is", "matches", "where", "current", "any", "has", "host", "host-context"], type$.String); + $.selectorPseudoElements = A.LinkedHashSet_LinkedHashSet$_literal(["slotted"], type$.String); + $._glyphs = B.C_UnicodeGlyphSet; + $._default0 = null; + $._rootishPseudoClasses0 = A.LinkedHashSet_LinkedHashSet$_literal(["root", "scope", "host", "host-context"], type$.String); + $._realCaseCache0 = function() { + var t1 = type$.String; + return A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + }(); + $._features0 = A.LinkedHashSet_LinkedHashSet$_literal(["global-variable-shadowing", "extend-selector-pseudoclass", "units-level-3", "at-error", "custom-property"], type$.String); + $.selectorPseudoClasses0 = A.LinkedHashSet_LinkedHashSet$_literal(["not", "is", "matches", "where", "current", "any", "has", "host", "host-context"], type$.String); + $.selectorPseudoElements0 = A.LinkedHashSet_LinkedHashSet$_literal(["slotted"], type$.String); + $._subselectorPseudos0 = A.LinkedHashSet_LinkedHashSet$_literal(["is", "matches", "where", "any", "nth-child", "nth-last-child"], type$.String); + })(); + (function lazyInitializers() { + var _lazyFinal = hunkHelpers.lazyFinal, + _lazy = hunkHelpers.lazy; + _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", () => A.getIsolateAffinityTag("_$dart_dartClosure")); + _lazyFinal($, "DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME", "$get$DART_CLOSURE_DART_JSINTEROP_PROPERTY_NAME", () => A.getIsolateAffinityTag("_$dart_dartClosure_dartJSInterop")); + _lazyFinal($, "nullFuture", "$get$nullFuture", () => B.C__RootZone.run$1$1(0, new A.nullFuture_closure(), A.findType("Future<~>"))); + _lazyFinal($, "_safeToStringHooks", "$get$_safeToStringHooks", () => A._setArrayType([new J.JSArraySafeToStringHook()], A.findType("JSArray"))); + _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({ + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({$method$: null, + toString: function() { + return "$receiver$"; + } + }))); + _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + null.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", () => A.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = "$arguments$"; + try { + (void 0).$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(null))); + _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + null.$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokePropertyErrorOn(void 0))); + _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", () => A.TypeErrorDecoder_extractPattern(function() { + try { + (void 0).$method$; + } catch (e) { + return e.message; + } + }())); + _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", () => A._AsyncRun__initializeScheduleImmediate()); + _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", () => $.$get$nullFuture()); + _lazyFinal($, "Future__falseFuture", "$get$Future__falseFuture", () => A._Future$zoneValue(false, B.C__RootZone, type$.bool)); + _lazyFinal($, "_RootZone__rootMap", "$get$_RootZone__rootMap", () => { + var t1 = type$.dynamic; + return A.HashMap_HashMap(t1, t1); + }); + _lazyFinal($, "_Utf8Decoder__reusableBuffer", "$get$_Utf8Decoder__reusableBuffer", () => A.NativeUint8List_NativeUint8List(4096)); + _lazyFinal($, "_Utf8Decoder__decoder", "$get$_Utf8Decoder__decoder", () => new A._Utf8Decoder__decoder_closure().call$0()); + _lazyFinal($, "_Utf8Decoder__decoderNonfatal", "$get$_Utf8Decoder__decoderNonfatal", () => new A._Utf8Decoder__decoderNonfatal_closure().call$0()); + _lazyFinal($, "_Base64Decoder__inverseAlphabet", "$get$_Base64Decoder__inverseAlphabet", () => A.NativeInt8List__create1(A._ensureNativeList(A._setArrayType([-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, 62, -2, 62, -2, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -1, -2, -2, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, 63, -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2], type$.JSArray_int)))); + _lazyFinal($, "_Uri__isWindowsCached", "$get$_Uri__isWindowsCached", () => { + var t1 = typeof process != "undefined" && Object.prototype.toString.call(process) == "[object process]" && process.platform == "win32"; + return t1; + }); + _lazyFinal($, "_Uri__needsNoEncoding", "$get$_Uri__needsNoEncoding", () => A.RegExp_RegExp("^[\\-\\.0-9A-Z_a-z~]*$", false)); + _lazyFinal($, "_hashSeed", "$get$_hashSeed", () => A.objectHashCode(B.Type_Object_A4p)); + _lazyFinal($, "Option__invalidChars", "$get$Option__invalidChars", () => A.RegExp_RegExp("[ \\t\\r\\n\"'\\\\/]", false)); + _lazyFinal($, "_isStrictMode", "$get$_isStrictMode", () => new A._isStrictMode_closure().call$0()); + _lazyFinal($, "alwaysValid", "$get$alwaysValid", () => new A.alwaysValid_closure()); + _lazyFinal($, "readline", "$get$readline", () => self.readline); + _lazyFinal($, "windows", "$get$windows", () => A.Context_Context($.$get$Style_windows())); + _lazyFinal($, "url", "$get$url", () => A.Context_Context($.$get$Style_url())); + _lazyFinal($, "context", "$get$context", () => new A.Context($.$get$Style_platform(), null)); + _lazyFinal($, "Style_posix", "$get$Style_posix", () => new A.PosixStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("[^/]$", false), A.RegExp_RegExp("^/", false))); + _lazyFinal($, "Style_windows", "$get$Style_windows", () => new A.WindowsStyle(A.RegExp_RegExp("[/\\\\]", false), A.RegExp_RegExp("[^/\\\\]$", false), A.RegExp_RegExp("^(\\\\\\\\[^\\\\]+\\\\[^\\\\/]+|[a-zA-Z]:[/\\\\])", false), A.RegExp_RegExp("^[/\\\\](?![/\\\\])", false))); + _lazyFinal($, "Style_url", "$get$Style_url", () => new A.UrlStyle(A.RegExp_RegExp("/", false), A.RegExp_RegExp("(^[a-zA-Z][-+.a-zA-Z\\d]*://|[^/])$", false), A.RegExp_RegExp("[a-zA-Z][-+.a-zA-Z\\d]*://[^/]*", false), A.RegExp_RegExp("^/", false))); + _lazyFinal($, "Style_platform", "$get$Style_platform", () => A.Style__getPlatformStyle()); + _lazyFinal($, "startVersion", "$get$startVersion", () => A.RegExp_RegExp("^(\\d+)\\.(\\d+)\\.(\\d+)(-([0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*))?(\\+([0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*))?", false)); + _lazyFinal($, "completeVersion", "$get$completeVersion", () => A.RegExp_RegExp($.$get$startVersion().pattern + "$", false)); + _lazyFinal($, "LegacyIfExpression_declaration", "$get$LegacyIfExpression_declaration", () => A.ParameterList_ParameterList$parse(string$.x40funct, null)); + _lazyFinal($, "colorsByName", "$get$colorsByName", () => A.LinkedHashMap_LinkedHashMap$_literal(["yellowgreen", A.SassColor_SassColor$rgb(154, 205, 50, 1), "yellow", A.SassColor_SassColor$rgb(255, 255, 0, 1), "whitesmoke", A.SassColor_SassColor$rgb(245, 245, 245, 1), "white", A.SassColor_SassColor$rgb(255, 255, 255, 1), "wheat", A.SassColor_SassColor$rgb(245, 222, 179, 1), "violet", A.SassColor_SassColor$rgb(238, 130, 238, 1), "turquoise", A.SassColor_SassColor$rgb(64, 224, 208, 1), "transparent", A.SassColor_SassColor$rgb(0, 0, 0, 0), "tomato", A.SassColor_SassColor$rgb(255, 99, 71, 1), "thistle", A.SassColor_SassColor$rgb(216, 191, 216, 1), "teal", A.SassColor_SassColor$rgb(0, 128, 128, 1), "tan", A.SassColor_SassColor$rgb(210, 180, 140, 1), "steelblue", A.SassColor_SassColor$rgb(70, 130, 180, 1), "springgreen", A.SassColor_SassColor$rgb(0, 255, 127, 1), "snow", A.SassColor_SassColor$rgb(255, 250, 250, 1), "slategrey", A.SassColor_SassColor$rgb(112, 128, 144, 1), "slategray", A.SassColor_SassColor$rgb(112, 128, 144, 1), "slateblue", A.SassColor_SassColor$rgb(106, 90, 205, 1), "skyblue", A.SassColor_SassColor$rgb(135, 206, 235, 1), "silver", A.SassColor_SassColor$rgb(192, 192, 192, 1), "sienna", A.SassColor_SassColor$rgb(160, 82, 45, 1), "seashell", A.SassColor_SassColor$rgb(255, 245, 238, 1), "seagreen", A.SassColor_SassColor$rgb(46, 139, 87, 1), "sandybrown", A.SassColor_SassColor$rgb(244, 164, 96, 1), "salmon", A.SassColor_SassColor$rgb(250, 128, 114, 1), "saddlebrown", A.SassColor_SassColor$rgb(139, 69, 19, 1), "royalblue", A.SassColor_SassColor$rgb(65, 105, 225, 1), "rosybrown", A.SassColor_SassColor$rgb(188, 143, 143, 1), "red", A.SassColor_SassColor$rgb(255, 0, 0, 1), "rebeccapurple", A.SassColor_SassColor$rgb(102, 51, 153, 1), "purple", A.SassColor_SassColor$rgb(128, 0, 128, 1), "powderblue", A.SassColor_SassColor$rgb(176, 224, 230, 1), "plum", A.SassColor_SassColor$rgb(221, 160, 221, 1), "pink", A.SassColor_SassColor$rgb(255, 192, 203, 1), "peru", A.SassColor_SassColor$rgb(205, 133, 63, 1), "peachpuff", A.SassColor_SassColor$rgb(255, 218, 185, 1), "papayawhip", A.SassColor_SassColor$rgb(255, 239, 213, 1), "palevioletred", A.SassColor_SassColor$rgb(219, 112, 147, 1), "paleturquoise", A.SassColor_SassColor$rgb(175, 238, 238, 1), "palegreen", A.SassColor_SassColor$rgb(152, 251, 152, 1), "palegoldenrod", A.SassColor_SassColor$rgb(238, 232, 170, 1), "orchid", A.SassColor_SassColor$rgb(218, 112, 214, 1), "orangered", A.SassColor_SassColor$rgb(255, 69, 0, 1), "orange", A.SassColor_SassColor$rgb(255, 165, 0, 1), "olivedrab", A.SassColor_SassColor$rgb(107, 142, 35, 1), "olive", A.SassColor_SassColor$rgb(128, 128, 0, 1), "oldlace", A.SassColor_SassColor$rgb(253, 245, 230, 1), "navy", A.SassColor_SassColor$rgb(0, 0, 128, 1), "navajowhite", A.SassColor_SassColor$rgb(255, 222, 173, 1), "moccasin", A.SassColor_SassColor$rgb(255, 228, 181, 1), "mistyrose", A.SassColor_SassColor$rgb(255, 228, 225, 1), "mintcream", A.SassColor_SassColor$rgb(245, 255, 250, 1), "midnightblue", A.SassColor_SassColor$rgb(25, 25, 112, 1), "mediumvioletred", A.SassColor_SassColor$rgb(199, 21, 133, 1), "mediumturquoise", A.SassColor_SassColor$rgb(72, 209, 204, 1), "mediumspringgreen", A.SassColor_SassColor$rgb(0, 250, 154, 1), "mediumslateblue", A.SassColor_SassColor$rgb(123, 104, 238, 1), "mediumseagreen", A.SassColor_SassColor$rgb(60, 179, 113, 1), "mediumpurple", A.SassColor_SassColor$rgb(147, 112, 219, 1), "mediumorchid", A.SassColor_SassColor$rgb(186, 85, 211, 1), "mediumblue", A.SassColor_SassColor$rgb(0, 0, 205, 1), "mediumaquamarine", A.SassColor_SassColor$rgb(102, 205, 170, 1), "maroon", A.SassColor_SassColor$rgb(128, 0, 0, 1), "magenta", A.SassColor_SassColor$rgb(255, 0, 255, 1), "linen", A.SassColor_SassColor$rgb(250, 240, 230, 1), "limegreen", A.SassColor_SassColor$rgb(50, 205, 50, 1), "lime", A.SassColor_SassColor$rgb(0, 255, 0, 1), "lightyellow", A.SassColor_SassColor$rgb(255, 255, 224, 1), "lightsteelblue", A.SassColor_SassColor$rgb(176, 196, 222, 1), "lightslategrey", A.SassColor_SassColor$rgb(119, 136, 153, 1), "lightslategray", A.SassColor_SassColor$rgb(119, 136, 153, 1), "lightskyblue", A.SassColor_SassColor$rgb(135, 206, 250, 1), "lightseagreen", A.SassColor_SassColor$rgb(32, 178, 170, 1), "lightsalmon", A.SassColor_SassColor$rgb(255, 160, 122, 1), "lightpink", A.SassColor_SassColor$rgb(255, 182, 193, 1), "lightgrey", A.SassColor_SassColor$rgb(211, 211, 211, 1), "lightgreen", A.SassColor_SassColor$rgb(144, 238, 144, 1), "lightgray", A.SassColor_SassColor$rgb(211, 211, 211, 1), "lightgoldenrodyellow", A.SassColor_SassColor$rgb(250, 250, 210, 1), "lightcyan", A.SassColor_SassColor$rgb(224, 255, 255, 1), "lightcoral", A.SassColor_SassColor$rgb(240, 128, 128, 1), "lightblue", A.SassColor_SassColor$rgb(173, 216, 230, 1), "lemonchiffon", A.SassColor_SassColor$rgb(255, 250, 205, 1), "lawngreen", A.SassColor_SassColor$rgb(124, 252, 0, 1), "lavenderblush", A.SassColor_SassColor$rgb(255, 240, 245, 1), "lavender", A.SassColor_SassColor$rgb(230, 230, 250, 1), "khaki", A.SassColor_SassColor$rgb(240, 230, 140, 1), "ivory", A.SassColor_SassColor$rgb(255, 255, 240, 1), "indigo", A.SassColor_SassColor$rgb(75, 0, 130, 1), "indianred", A.SassColor_SassColor$rgb(205, 92, 92, 1), "hotpink", A.SassColor_SassColor$rgb(255, 105, 180, 1), "honeydew", A.SassColor_SassColor$rgb(240, 255, 240, 1), "grey", A.SassColor_SassColor$rgb(128, 128, 128, 1), "greenyellow", A.SassColor_SassColor$rgb(173, 255, 47, 1), "green", A.SassColor_SassColor$rgb(0, 128, 0, 1), "gray", A.SassColor_SassColor$rgb(128, 128, 128, 1), "goldenrod", A.SassColor_SassColor$rgb(218, 165, 32, 1), "gold", A.SassColor_SassColor$rgb(255, 215, 0, 1), "ghostwhite", A.SassColor_SassColor$rgb(248, 248, 255, 1), "gainsboro", A.SassColor_SassColor$rgb(220, 220, 220, 1), "fuchsia", A.SassColor_SassColor$rgb(255, 0, 255, 1), "forestgreen", A.SassColor_SassColor$rgb(34, 139, 34, 1), "floralwhite", A.SassColor_SassColor$rgb(255, 250, 240, 1), "firebrick", A.SassColor_SassColor$rgb(178, 34, 34, 1), "dodgerblue", A.SassColor_SassColor$rgb(30, 144, 255, 1), "dimgrey", A.SassColor_SassColor$rgb(105, 105, 105, 1), "dimgray", A.SassColor_SassColor$rgb(105, 105, 105, 1), "deepskyblue", A.SassColor_SassColor$rgb(0, 191, 255, 1), "deeppink", A.SassColor_SassColor$rgb(255, 20, 147, 1), "darkviolet", A.SassColor_SassColor$rgb(148, 0, 211, 1), "darkturquoise", A.SassColor_SassColor$rgb(0, 206, 209, 1), "darkslategrey", A.SassColor_SassColor$rgb(47, 79, 79, 1), "darkslategray", A.SassColor_SassColor$rgb(47, 79, 79, 1), "darkslateblue", A.SassColor_SassColor$rgb(72, 61, 139, 1), "darkseagreen", A.SassColor_SassColor$rgb(143, 188, 143, 1), "darksalmon", A.SassColor_SassColor$rgb(233, 150, 122, 1), "darkred", A.SassColor_SassColor$rgb(139, 0, 0, 1), "darkorchid", A.SassColor_SassColor$rgb(153, 50, 204, 1), "darkorange", A.SassColor_SassColor$rgb(255, 140, 0, 1), "darkolivegreen", A.SassColor_SassColor$rgb(85, 107, 47, 1), "darkmagenta", A.SassColor_SassColor$rgb(139, 0, 139, 1), "darkkhaki", A.SassColor_SassColor$rgb(189, 183, 107, 1), "darkgrey", A.SassColor_SassColor$rgb(169, 169, 169, 1), "darkgreen", A.SassColor_SassColor$rgb(0, 100, 0, 1), "darkgray", A.SassColor_SassColor$rgb(169, 169, 169, 1), "darkgoldenrod", A.SassColor_SassColor$rgb(184, 134, 11, 1), "darkcyan", A.SassColor_SassColor$rgb(0, 139, 139, 1), "darkblue", A.SassColor_SassColor$rgb(0, 0, 139, 1), "cyan", A.SassColor_SassColor$rgb(0, 255, 255, 1), "crimson", A.SassColor_SassColor$rgb(220, 20, 60, 1), "cornsilk", A.SassColor_SassColor$rgb(255, 248, 220, 1), "cornflowerblue", A.SassColor_SassColor$rgb(100, 149, 237, 1), "coral", A.SassColor_SassColor$rgb(255, 127, 80, 1), "chocolate", A.SassColor_SassColor$rgb(210, 105, 30, 1), "chartreuse", A.SassColor_SassColor$rgb(127, 255, 0, 1), "cadetblue", A.SassColor_SassColor$rgb(95, 158, 160, 1), "burlywood", A.SassColor_SassColor$rgb(222, 184, 135, 1), "brown", A.SassColor_SassColor$rgb(165, 42, 42, 1), "blueviolet", A.SassColor_SassColor$rgb(138, 43, 226, 1), "blue", A.SassColor_SassColor$rgb(0, 0, 255, 1), "blanchedalmond", A.SassColor_SassColor$rgb(255, 235, 205, 1), "black", A.SassColor_SassColor$rgb(0, 0, 0, 1), "bisque", A.SassColor_SassColor$rgb(255, 228, 196, 1), "beige", A.SassColor_SassColor$rgb(245, 245, 220, 1), "azure", A.SassColor_SassColor$rgb(240, 255, 255, 1), "aquamarine", A.SassColor_SassColor$rgb(127, 255, 212, 1), "aqua", A.SassColor_SassColor$rgb(0, 255, 255, 1), "antiquewhite", A.SassColor_SassColor$rgb(250, 235, 215, 1), "aliceblue", A.SassColor_SassColor$rgb(240, 248, 255, 1)], type$.String, type$.SassColor)); + _lazyFinal($, "namesByColor", "$get$namesByColor", () => { + var $name, + t1 = type$.SassColor, + t2 = type$.String, + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs($.$get$colorsByName(), t2, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + $name = t2._0; + t3.$indexSet(0, t2._1, $name); + } + return t3; + }); + _lazyFinal($, "ExecutableOptions__separatorBar", "$get$ExecutableOptions__separatorBar", () => A.isWindows() ? "=" : "\u2501"); + _lazyFinal($, "ExecutableOptions__parser", "$get$ExecutableOptions__parser", () => new A.ExecutableOptions__parser_closure().call$0()); + _lazyFinal($, "globalFunctions", "$get$globalFunctions", () => { + var t1 = type$.BuiltInCallable, + t2 = A.List_List$of($.$get$global(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$global0()); + B.JSArray_methods.addAll$1(t2, $.$get$global1()); + B.JSArray_methods.addAll$1(t2, $.$get$global2()); + B.JSArray_methods.addAll$1(t2, $.$get$global3()); + B.JSArray_methods.addAll$1(t2, $.$get$global4()); + B.JSArray_methods.addAll$1(t2, $.$get$global5()); + t2.push(A.BuiltInCallable$function("if", "$condition, $if-true, $if-false", new A.globalFunctions_closure(), null)); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "coreModules", "$get$coreModules", () => A.UnmodifiableListView$(A._setArrayType([$.$get$module(), $.$get$module0(), $.$get$module1(), $.$get$module2(), $.$get$module3(), $.$get$module4()], A.findType("JSArray>")), type$.BuiltInModule_Callable)); + _lazyFinal($, "_microsoftFilterStart", "$get$_microsoftFilterStart", () => A.RegExp_RegExp("^[a-zA-Z]+\\s*=", false)); + _lazyFinal($, "global", "$get$global", () => { + var _s5_ = "color", + _s27_ = "$red, $green, $blue, $alpha", + _s19_ = "$red, $green, $blue", + _s9_ = "$channels", + _s37_ = "$hue, $saturation, $lightness, $alpha", + _s29_ = "$hue, $saturation, $lightness", + _s17_ = "$hue, $saturation", + _s6_ = "adjust", + _s15_ = "$color, $amount", + t1 = type$.String, + t2 = type$.Value_Function_List_Value; + return A.UnmodifiableListView$(A._setArrayType([A._channelFunction("red", B.RgbColorSpace_i0P, new A.global_closure0(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction("green", B.RgbColorSpace_i0P, new A.global_closure1(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction("blue", B.RgbColorSpace_i0P, new A.global_closure2(), true, null).withDeprecationWarning$1(_s5_), $.$get$_mix().withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction("rgb", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure3(), _s19_, new A.global_closure4(), "$color, $alpha", new A.global_closure5(), "$channels", new A.global_closure6()], t1, t2)), A.BuiltInCallable$overloadedFunction("rgba", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure7(), _s19_, new A.global_closure8(), "$color, $alpha", new A.global_closure9(), "$channels", new A.global_closure10()], t1, t2)), A._function5("invert", "$color, $weight: 100%, $space: null", new A.global_closure11()), A._channelFunction("hue", B.HslColorSpace_JQ2, new A.global_closure12(), true, "deg").withDeprecationWarning$1(_s5_), A._channelFunction("saturation", B.HslColorSpace_JQ2, new A.global_closure13(), true, "%").withDeprecationWarning$1(_s5_), A._channelFunction("lightness", B.HslColorSpace_JQ2, new A.global_closure14(), true, "%").withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction("hsl", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure15(), _s29_, new A.global_closure16(), _s17_, new A.global_closure17(), "$channels", new A.global_closure18()], t1, t2)), A.BuiltInCallable$overloadedFunction("hsla", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure19(), _s29_, new A.global_closure20(), _s17_, new A.global_closure21(), "$channels", new A.global_closure22()], t1, t2)), A._function5("grayscale", "$color", new A.global_closure23()), A._function5("adjust-hue", "$color, $degrees", new A.global_closure24()).withDeprecationWarning$2(_s5_, _s6_), A._function5("lighten", _s15_, new A.global_closure25()).withDeprecationWarning$2(_s5_, _s6_), A._function5("darken", _s15_, new A.global_closure26()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction("saturate", A.LinkedHashMap_LinkedHashMap$_literal(["$amount", new A.global_closure27(), "$color, $amount", new A.global_closure28()], t1, t2)), A._function5("desaturate", _s15_, new A.global_closure29()).withDeprecationWarning$2(_s5_, _s6_), A._function5("opacify", _s15_, new A.global_closure30()).withDeprecationWarning$2(_s5_, _s6_), A._function5("fade-in", _s15_, new A.global_closure31()).withDeprecationWarning$2(_s5_, _s6_), A._function5("transparentize", _s15_, new A.global_closure32()).withDeprecationWarning$2(_s5_, _s6_), A._function5("fade-out", _s15_, new A.global_closure33()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction("alpha", A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.global_closure34(), "$args...", new A.global_closure35()], t1, t2)), A._function5("opacity", "$color", new A.global_closure36()), A._function5(_s5_, "$description", new A.global_closure37()), A._function5("hwb", _s9_, new A.global_closure38()), A._function5("lab", _s9_, new A.global_closure39()), A._function5("lch", _s9_, new A.global_closure40()), A._function5("oklab", _s9_, new A.global_closure41()), A._function5("oklch", _s9_, new A.global_closure42()), $.$get$_complement().withDeprecationWarning$1(_s5_), $.$get$_ieHexStr(), $.$get$_adjust().withDeprecationWarning$1(_s5_).withName$1("adjust-color"), $.$get$_scale().withDeprecationWarning$1(_s5_).withName$1("scale-color"), $.$get$_change().withDeprecationWarning$1(_s5_).withName$1("change-color")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module", "$get$module", () => { + var _null = null, + _s10_ = "saturation", + _s9_ = "lightness", + _s6_ = "$color", _s5_ = "alpha", + _s30_ = "$color, $channel, $space: null", + t1 = type$.String, + t2 = type$.Value_Function_List_Value; + return A.BuiltInModule$("color", A._setArrayType([A._channelFunction("red", B.RgbColorSpace_i0P, new A.module_closure1(), false, _null), A._channelFunction("green", B.RgbColorSpace_i0P, new A.module_closure2(), false, _null), A._channelFunction("blue", B.RgbColorSpace_i0P, new A.module_closure3(), false, _null), $.$get$_mix(), A._function5("invert", "$color, $weight: 100%, $space: null", new A.module_closure4()), A._channelFunction("hue", B.HslColorSpace_JQ2, new A.module_closure5(), false, "deg"), A._channelFunction(_s10_, B.HslColorSpace_JQ2, new A.module_closure6(), false, "%"), A._channelFunction(_s9_, B.HslColorSpace_JQ2, new A.module_closure7(), false, "%"), A._removedColorFunction("adjust-hue", "hue", false), A._removedColorFunction("lighten", _s9_, false), A._removedColorFunction("darken", _s9_, true), A._removedColorFunction("saturate", _s10_, false), A._removedColorFunction("desaturate", _s10_, true), A._function5("grayscale", _s6_, new A.module_closure8()), A.BuiltInCallable$overloadedFunction("hwb", A.LinkedHashMap_LinkedHashMap$_literal(["$hue, $whiteness, $blackness, $alpha: 1", new A.module_closure9(), "$channels", new A.module_closure10()], t1, t2)), A._channelFunction("whiteness", B.HwbColorSpace_guQ, new A.module_closure11(), false, "%"), A._channelFunction("blackness", B.HwbColorSpace_guQ, new A.module_closure12(), false, "%"), A._removedColorFunction("opacify", _s5_, false), A._removedColorFunction("fade-in", _s5_, false), A._removedColorFunction("transparentize", _s5_, true), A._removedColorFunction("fade-out", _s5_, true), A.BuiltInCallable$overloadedFunction(_s5_, A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.module_closure13(), "$args...", new A.module_closure14()], t1, t2)), A._function5("opacity", _s6_, new A.module_closure15()), A._function5("space", _s6_, new A.module_closure16()), A._function5("to-space", "$color, $space", new A.module_closure17()), A._function5("is-legacy", _s6_, new A.module_closure18()), A._function5("is-missing", "$color, $channel", new A.module_closure19()), A._function5("is-in-gamut", "$color, $space: null", new A.module_closure20()), A._function5("to-gamut", "$color, $space: null, $method: null", new A.module_closure21()), A._function5("channel", _s30_, new A.module_closure22()), A._function5("same", "$color1, $color2", new A.module_closure23()), A._function5("is-powerless", _s30_, new A.module_closure24()), $.$get$_complement(), $.$get$_adjust(), $.$get$_scale(), $.$get$_change(), $.$get$_ieHexStr()], type$.JSArray_Callable), _null, _null, type$.Callable); + }); + _lazyFinal($, "_mix", "$get$_mix", () => A._function5("mix", string$.x24color, new A._mix_closure())); + _lazyFinal($, "_complement", "$get$_complement", () => A._function5("complement", "$color, $space: null", new A._complement_closure())); + _lazyFinal($, "_adjust", "$get$_adjust", () => A._function5("adjust", "$color, $kwargs...", new A._adjust_closure())); + _lazyFinal($, "_scale", "$get$_scale", () => A._function5("scale", "$color, $kwargs...", new A._scale_closure())); + _lazyFinal($, "_change", "$get$_change", () => A._function5("change", "$color, $kwargs...", new A._change_closure())); + _lazyFinal($, "_ieHexStr", "$get$_ieHexStr", () => A._function5("ie-hex-str", "$color", new A._ieHexStr_closure())); + _lazyFinal($, "global0", "$get$global0", () => { + var _s4_ = "list"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_length0().withDeprecationWarning$1(_s4_), $.$get$_nth().withDeprecationWarning$1(_s4_), $.$get$_setNth().withDeprecationWarning$1(_s4_), $.$get$_join().withDeprecationWarning$1(_s4_), $.$get$_append0().withDeprecationWarning$1(_s4_), $.$get$_zip().withDeprecationWarning$1(_s4_), $.$get$_index0().withDeprecationWarning$1(_s4_), $.$get$_isBracketed().withDeprecationWarning$1(_s4_), $.$get$_separator().withDeprecationWarning$1(_s4_).withName$1("list-separator")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module0", "$get$module0", () => A.BuiltInModule$("list", A._setArrayType([$.$get$_length0(), $.$get$_nth(), $.$get$_setNth(), $.$get$_join(), $.$get$_append0(), $.$get$_zip(), $.$get$_index0(), $.$get$_isBracketed(), $.$get$_separator(), $.$get$_slash()], type$.JSArray_Callable), null, null, type$.Callable)); + _lazyFinal($, "_length", "$get$_length0", () => A._function4("length", "$list", new A._length_closure0())); + _lazyFinal($, "_nth", "$get$_nth", () => A._function4("nth", "$list, $n", new A._nth_closure())); + _lazyFinal($, "_setNth", "$get$_setNth", () => A._function4("set-nth", "$list, $n, $value", new A._setNth_closure())); + _lazyFinal($, "_join", "$get$_join", () => A._function4("join", string$.x24list1, new A._join_closure())); + _lazyFinal($, "_append", "$get$_append0", () => A._function4("append", "$list, $val, $separator: auto", new A._append_closure0())); + _lazyFinal($, "_zip", "$get$_zip", () => A._function4("zip", "$lists...", new A._zip_closure())); + _lazyFinal($, "_index", "$get$_index0", () => A._function4("index", "$list, $value", new A._index_closure0())); + _lazyFinal($, "_separator", "$get$_separator", () => A._function4("separator", "$list", new A._separator_closure())); + _lazyFinal($, "_isBracketed", "$get$_isBracketed", () => A._function4("is-bracketed", "$list", new A._isBracketed_closure())); + _lazyFinal($, "_slash", "$get$_slash", () => A._function4("slash", "$elements...", new A._slash_closure())); + _lazyFinal($, "global1", "$get$global1", () => { + var _s3_ = "map"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_get().withDeprecationWarning$1(_s3_).withName$1("map-get"), $.$get$_merge().withDeprecationWarning$1(_s3_).withName$1("map-merge"), $.$get$_remove().withDeprecationWarning$1(_s3_).withName$1("map-remove"), $.$get$_keys().withDeprecationWarning$1(_s3_).withName$1("map-keys"), $.$get$_values().withDeprecationWarning$1(_s3_).withName$1("map-values"), $.$get$_hasKey().withDeprecationWarning$1(_s3_).withName$1("map-has-key")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module1", "$get$module1", () => A.BuiltInModule$("map", A._setArrayType([$.$get$_get(), $.$get$_set(), $.$get$_merge(), $.$get$_remove(), $.$get$_keys(), $.$get$_values(), $.$get$_hasKey(), $.$get$_deepMerge(), $.$get$_deepRemove()], type$.JSArray_Callable), null, null, type$.Callable)); + _lazyFinal($, "_get", "$get$_get", () => A._function3("get", "$map, $key, $keys...", new A._get_closure())); + _lazyFinal($, "_set", "$get$_set", () => A.BuiltInCallable$overloadedFunction("set", A.LinkedHashMap_LinkedHashMap$_literal(["$map, $key, $value", new A._set_closure(), "$map, $args...", new A._set_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_merge", "$get$_merge", () => A.BuiltInCallable$overloadedFunction("merge", A.LinkedHashMap_LinkedHashMap$_literal(["$map1, $map2", new A._merge_closure(), "$map1, $args...", new A._merge_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_deepMerge", "$get$_deepMerge", () => A._function3("deep-merge", "$map1, $map2", new A._deepMerge_closure())); + _lazyFinal($, "_deepRemove", "$get$_deepRemove", () => A._function3("deep-remove", "$map, $key, $keys...", new A._deepRemove_closure())); + _lazyFinal($, "_remove", "$get$_remove", () => A.BuiltInCallable$overloadedFunction("remove", A.LinkedHashMap_LinkedHashMap$_literal(["$map", new A._remove_closure(), "$map, $key, $keys...", new A._remove_closure0()], type$.String, type$.Value_Function_List_Value))); + _lazyFinal($, "_keys", "$get$_keys", () => A._function3("keys", "$map", new A._keys_closure())); + _lazyFinal($, "_values", "$get$_values", () => A._function3("values", "$map", new A._values_closure())); + _lazyFinal($, "_hasKey", "$get$_hasKey", () => A._function3("has-key", "$map, $key, $keys...", new A._hasKey_closure())); + _lazyFinal($, "global2", "$get$global2", () => { + var _s4_ = "math"; + return A.UnmodifiableListView$(A._setArrayType([A._function2("abs", "$number", new A.global_closure()), $.$get$_ceil().withDeprecationWarning$1(_s4_), $.$get$_floor().withDeprecationWarning$1(_s4_), $.$get$_max().withDeprecationWarning$1(_s4_), $.$get$_min().withDeprecationWarning$1(_s4_), $.$get$_percentage().withDeprecationWarning$1(_s4_), $.$get$_randomFunction().withDeprecationWarning$1(_s4_), $.$get$_round().withDeprecationWarning$1(_s4_), $.$get$_unit().withDeprecationWarning$1(_s4_), $.$get$_compatible().withDeprecationWarning$1(_s4_).withName$1("comparable"), $.$get$_isUnitless().withDeprecationWarning$1(_s4_).withName$1("unitless")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module2", "$get$module2", () => { + var _null = null; + return A.BuiltInModule$("math", A._setArrayType([A._numberFunction("abs", new A.module_closure0()), $.$get$_acos(), $.$get$_asin(), $.$get$_atan(), $.$get$_atan2(), $.$get$_ceil(), $.$get$_clamp(), $.$get$_cos(), $.$get$_compatible(), $.$get$_floor(), $.$get$_hypot(), $.$get$_isUnitless(), $.$get$_log(), $.$get$_max(), $.$get$_min(), $.$get$_percentage(), $.$get$_pow(), $.$get$_randomFunction(), $.$get$_round(), $.$get$_sin(), $.$get$_sqrt(), $.$get$_tan(), $.$get$_unit(), $.$get$_div()], type$.JSArray_Callable), _null, A.LinkedHashMap_LinkedHashMap$_literal(["e", A.SassNumber_SassNumber(2.718281828459045, _null), "pi", A.SassNumber_SassNumber(3.141592653589793, _null), "epsilon", A.SassNumber_SassNumber(2220446049250313e-31, _null), "max-safe-integer", A.SassNumber_SassNumber(9007199254740991, _null), "min-safe-integer", A.SassNumber_SassNumber(-9007199254740991, _null), "max-number", A.SassNumber_SassNumber(17976931348623157e292, _null), "min-number", A.SassNumber_SassNumber(5e-324, _null)], type$.String, type$.Value), type$.Callable); + }); + _lazyFinal($, "_ceil", "$get$_ceil", () => A._numberFunction("ceil", new A._ceil_closure())); + _lazyFinal($, "_clamp", "$get$_clamp", () => A._function2("clamp", "$min, $number, $max", new A._clamp_closure())); + _lazyFinal($, "_floor", "$get$_floor", () => A._numberFunction("floor", new A._floor_closure())); + _lazyFinal($, "_max", "$get$_max", () => A._function2("max", "$numbers...", new A._max_closure())); + _lazyFinal($, "_min", "$get$_min", () => A._function2("min", "$numbers...", new A._min_closure())); + _lazyFinal($, "_round", "$get$_round", () => A._numberFunction("round", new A._round_closure())); + _lazyFinal($, "_hypot", "$get$_hypot", () => A._function2("hypot", "$numbers...", new A._hypot_closure())); + _lazyFinal($, "_log", "$get$_log", () => A._function2("log", "$number, $base: null", new A._log_closure())); + _lazyFinal($, "_pow", "$get$_pow", () => A._function2("pow", "$base, $exponent", new A._pow_closure())); + _lazyFinal($, "_sqrt", "$get$_sqrt", () => A._singleArgumentMathFunc("sqrt", A.number0__sqrt$closure())); + _lazyFinal($, "_acos", "$get$_acos", () => A._singleArgumentMathFunc("acos", A.number0__acos$closure())); + _lazyFinal($, "_asin", "$get$_asin", () => A._singleArgumentMathFunc("asin", A.number0__asin$closure())); + _lazyFinal($, "_atan", "$get$_atan", () => A._singleArgumentMathFunc("atan", A.number0__atan$closure())); + _lazyFinal($, "_atan2", "$get$_atan2", () => A._function2("atan2", "$y, $x", new A._atan2_closure())); + _lazyFinal($, "_cos", "$get$_cos", () => A._singleArgumentMathFunc("cos", A.number0__cos$closure())); + _lazyFinal($, "_sin", "$get$_sin", () => A._singleArgumentMathFunc("sin", A.number0__sin$closure())); + _lazyFinal($, "_tan", "$get$_tan", () => A._singleArgumentMathFunc("tan", A.number0__tan$closure())); + _lazyFinal($, "_compatible", "$get$_compatible", () => A._function2("compatible", "$number1, $number2", new A._compatible_closure())); + _lazyFinal($, "_isUnitless", "$get$_isUnitless", () => A._function2("is-unitless", "$number", new A._isUnitless_closure())); + _lazyFinal($, "_unit", "$get$_unit", () => A._function2("unit", "$number", new A._unit_closure())); + _lazyFinal($, "_percentage", "$get$_percentage", () => A._function2("percentage", "$number", new A._percentage_closure())); + _lazyFinal($, "_random", "$get$_random0", () => A.Random_Random()); + _lazyFinal($, "_randomFunction", "$get$_randomFunction", () => A._function2("random", "$limit: null", new A._randomFunction_closure())); + _lazyFinal($, "_div", "$get$_div", () => A._function2("div", "$number1, $number2", new A._div_closure())); + _lazyFinal($, "_shared", "$get$_shared", () => A.UnmodifiableListView$(A._setArrayType([A._function("feature-exists", "$feature", new A._shared_closure()), A._function("inspect", "$value", new A._shared_closure0()), A._function("type-of", "$value", new A._shared_closure1()), A._function("keywords", "$args", new A._shared_closure2())], type$.JSArray_BuiltInCallable), type$.BuiltInCallable)); + _lazyFinal($, "global3", "$get$global5", () => { + var t2, + t1 = A._setArrayType([], type$.JSArray_BuiltInCallable); + for (t2 = $.$get$_shared(), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(0).withDeprecationWarning$1("meta")); + return A.UnmodifiableListView$(t1, type$.BuiltInCallable); + }); + _lazyFinal($, "moduleFunctions", "$get$moduleFunctions", () => { + var t1 = type$.BuiltInCallable, + t2 = A.List_List$of($.$get$_shared(), true, t1); + t2.push(A._function("calc-name", "$calc", new A.moduleFunctions_closure())); + t2.push(A._function("calc-args", "$calc", new A.moduleFunctions_closure0())); + t2.push(A._function("accepts-content", "$mixin", new A.moduleFunctions_closure1())); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "global4", "$get$global3", () => { + var _s8_ = "selector"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_isSuperselector().withDeprecationWarning$1(_s8_), $.$get$_simpleSelectors().withDeprecationWarning$1(_s8_), $.$get$_parse().withDeprecationWarning$1(_s8_).withName$1("selector-parse"), $.$get$_nest().withDeprecationWarning$1(_s8_).withName$1("selector-nest"), $.$get$_append().withDeprecationWarning$1(_s8_).withName$1("selector-append"), $.$get$_extend().withDeprecationWarning$1(_s8_).withName$1("selector-extend"), $.$get$_replace().withDeprecationWarning$1(_s8_).withName$1("selector-replace"), $.$get$_unify().withDeprecationWarning$1(_s8_).withName$1("selector-unify")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module3", "$get$module3", () => A.BuiltInModule$("selector", A._setArrayType([$.$get$_isSuperselector(), $.$get$_simpleSelectors(), $.$get$_parse(), $.$get$_nest(), $.$get$_append(), $.$get$_extend(), $.$get$_replace(), $.$get$_unify()], type$.JSArray_Callable), null, null, type$.Callable)); + _lazyFinal($, "_nest", "$get$_nest", () => A._function1("nest", "$selectors...", new A._nest_closure())); + _lazyFinal($, "_append0", "$get$_append", () => A._function1("append", "$selectors...", new A._append_closure())); + _lazyFinal($, "_extend", "$get$_extend", () => A._function1("extend", "$selector, $extendee, $extender", new A._extend_closure())); + _lazyFinal($, "_replace", "$get$_replace", () => A._function1("replace", "$selector, $original, $replacement", new A._replace_closure())); + _lazyFinal($, "_unify", "$get$_unify", () => A._function1("unify", "$selector1, $selector2", new A._unify_closure())); + _lazyFinal($, "_isSuperselector", "$get$_isSuperselector", () => A._function1("is-superselector", "$super, $sub", new A._isSuperselector_closure())); + _lazyFinal($, "_simpleSelectors", "$get$_simpleSelectors", () => A._function1("simple-selectors", "$selector", new A._simpleSelectors_closure())); + _lazyFinal($, "_parse0", "$get$_parse", () => A._function1("parse", "$selector", new A._parse_closure())); + _lazyFinal($, "_random0", "$get$_random", () => A.Random_Random()); + _lazy($, "_previousUniqueId", "$get$_previousUniqueId", () => $.$get$_random().nextInt$1(A._asInt(A.pow(36, 6)))); + _lazyFinal($, "global5", "$get$global4", () => { + var _s6_ = "string"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_unquote().withDeprecationWarning$1(_s6_), $.$get$_quote().withDeprecationWarning$1(_s6_), $.$get$_toUpperCase().withDeprecationWarning$1(_s6_), $.$get$_toLowerCase().withDeprecationWarning$1(_s6_), $.$get$_uniqueId().withDeprecationWarning$1(_s6_), $.$get$_length().withDeprecationWarning$1(_s6_).withName$1("str-length"), $.$get$_insert().withDeprecationWarning$1(_s6_).withName$1("str-insert"), $.$get$_index().withDeprecationWarning$1(_s6_).withName$1("str-index"), $.$get$_slice().withDeprecationWarning$1(_s6_).withName$1("str-slice")], type$.JSArray_BuiltInCallable), type$.BuiltInCallable); + }); + _lazyFinal($, "module4", "$get$module4", () => A.BuiltInModule$("string", A._setArrayType([$.$get$_unquote(), $.$get$_quote(), $.$get$_toUpperCase(), $.$get$_toLowerCase(), $.$get$_length(), $.$get$_insert(), $.$get$_index(), $.$get$_slice(), $.$get$_uniqueId(), A._function0("split", "$string, $separator, $limit: null", new A.module_closure())], type$.JSArray_Callable), null, null, type$.Callable)); + _lazyFinal($, "_unquote", "$get$_unquote", () => A._function0("unquote", "$string", new A._unquote_closure())); + _lazyFinal($, "_quote", "$get$_quote", () => A._function0("quote", "$string", new A._quote_closure())); + _lazyFinal($, "_length0", "$get$_length", () => A._function0("length", "$string", new A._length_closure())); + _lazyFinal($, "_insert", "$get$_insert", () => A._function0("insert", "$string, $insert, $index", new A._insert_closure())); + _lazyFinal($, "_index0", "$get$_index", () => A._function0("index", "$string, $substring", new A._index_closure())); + _lazyFinal($, "_slice", "$get$_slice", () => A._function0("slice", "$string, $start-at, $end-at: -1", new A._slice_closure())); + _lazyFinal($, "_toUpperCase", "$get$_toUpperCase", () => A._function0("to-upper-case", "$string", new A._toUpperCase_closure())); + _lazyFinal($, "_toLowerCase", "$get$_toLowerCase", () => A._function0("to-lower-case", "$string", new A._toLowerCase_closure())); + _lazyFinal($, "_uniqueId", "$get$_uniqueId", () => A._function0("unique-id", "", new A._uniqueId_closure())); + _lazyFinal($, "FilesystemImporter_cwd", "$get$FilesystemImporter_cwd", () => { + var _null = null; + return new A.FilesystemImporter(A.absolute(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), true); + }); + _lazyFinal($, "FilesystemImporter_noLoadPath", "$get$FilesystemImporter_noLoadPath", () => new A.FilesystemImporter(null, false)); + _lazyFinal($, "_jsThrow", "$get$_jsThrow0", () => new self.Function("error", "throw error;")); + _lazyFinal($, "Logger_quiet", "$get$Logger_quiet", () => new A._QuietLogger()); + _lazyFinal($, "_disallowedFunctionNames", "$get$_disallowedFunctionNames", () => { + var t1 = $.$get$globalFunctions(); + t1 = t1.map$1$1(t1, new A._disallowedFunctionNames_closure(), type$.String).toSet$0(0); + t1.remove$1(0, "abs"); + t1.remove$1(0, "alpha"); + t1.remove$1(0, "color"); + t1.remove$1(0, "grayscale"); + t1.remove$1(0, "hsl"); + t1.remove$1(0, "hsla"); + t1.remove$1(0, "hwb"); + t1.remove$1(0, "invert"); + t1.remove$1(0, "lab"); + t1.remove$1(0, "lch"); + t1.remove$1(0, "max"); + t1.remove$1(0, "min"); + t1.remove$1(0, "oklab"); + t1.remove$1(0, "oklch"); + t1.remove$1(0, "opacity"); + t1.remove$1(0, "rgb"); + t1.remove$1(0, "rgba"); + t1.remove$1(0, "round"); + t1.remove$1(0, "saturate"); + return t1; + }); + _lazyFinal($, "_epsilon", "$get$_epsilon", () => A.pow(10, -11)); + _lazyFinal($, "_inverseEpsilon", "$get$_inverseEpsilon", () => A.pow(10, 11)); + _lazyFinal($, "bogusSpan", "$get$bogusSpan", () => A.SourceFile$decoded(A._setArrayType([], type$.JSArray_int), null).span$1(0, 0)); + _lazyFinal($, "_noSourceUrl", "$get$_noSourceUrl", () => A.Uri_parse("-")); + _lazyFinal($, "_traces", "$get$_traces", () => A.Expando$()); + _lazyFinal($, "lmsToOklab", "$get$lmsToOklab", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.210454268309314, 0.7936177747023054, -0.0040720430116193, 1.9779985324311684, -2.42859224204858, 0.450593709617411, 0.0259040424655478, 0.7827717124575296, -0.8086757549230774], type$.JSArray_double))); + _lazyFinal($, "oklabToLms", "$get$oklabToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0000000000000002, 0.3963377773761749, 0.2158037573099136, 0.9999999999999998, -0.10556134581565854, -0.06385417282581334, 0.9999999999999999, -0.0894841775298118, -1.2914855480194094], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearDisplayP3", "$get$linearSrgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8224619687143623, 0.17753803128563775, 0, 0.03319419885096161, 0.9668058011490384, 0, 0.01708263072112003, 0.07239744066396346, 0.9105199286149165], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearSrgb", "$get$linearDisplayP3ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2249401762805598, -0.22494017628055996, 0, -0.04205695470968816, 1.042056954709688, 0, -0.01963755459033443, -0.07863604555063188, 1.0982736001409663], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearA98Rgb", "$get$linearSrgbToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7151256068556247, 0.28487439314437535, 0, 0, 1, 0, 0, 0.04116194845011846, 0.9588380515498816], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearSrgb", "$get$linearA98RgbToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3983557439607783, -0.3983557439607783, 0, 0, 1, 0, 0, -0.04292898929447326, 1.0429289892944733], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearRec2020", "$get$linearSrgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.627403895934699, 0.3292830383778837, 0.04331306568741722, 0.06909728935823208, 0.9195403950754587, 0.01136231556630917, 0.01639143887515027, 0.08801330787722575, 0.895595253247624], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearSrgb", "$get$linearRec2020ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6604910021084345, -0.5876411387885495, -0.07284986331988487, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0181507633549053, -0.10057889800800737, 1.1187296613629127], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToXyzD65", "$get$linearSrgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.4123907992659595, 0.35758433938387796, 0.1804807884018343, 0.21263900587151036, 0.7151686787677559, 0.07219231536073371, 0.01933081871559185, 0.11919477979462598, 0.9505321522496606], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearSrgb", "$get$xyzD65ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.2409699419045213, -1.5373831775700935, -0.4986107602930033, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.0556300796969936, -0.20397695888897657, 1.0569715142428786], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLms", "$get$linearSrgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.412221469470763, 0.5363325372617348, 0.0514459932675022, 0.2119034958178252, 0.6806995506452342, 0.1073969535369405, 0.08830245919005641, 0.2817188391361215, 0.6299787016738221], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearSrgb", "$get$lmsToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([4.076741636075958, -3.307711539258062, 0.23096990318210417, -1.268437973285032, 2.609757349287689, -0.3413193760026571, -0.00419607613867551, -0.7034186179359363, 1.707614694074612], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearProphotoRgb", "$get$linearSrgbToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5292769776226116, 0.33015450197849283, 0.14056852039889556, 0.09836585954044917, 0.8734707129069618, 0.028163427552589, 0.01687534092138684, 0.11765941425612084, 0.8654652448224923], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearSrgb", "$get$linearProphotoRgbToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.034380849516996, -0.7276357899341342, -0.3067450595828618, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.00855882878391742, -0.1532667021380372, 1.1618255309219547], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToXyzD50", "$get$linearSrgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.43606574687426936, 0.3851515095901596, 0.14307841996513868, 0.22249317711056518, 0.7168870130944824, 0.06061980979495235, 0.01392392146316939, 0.09708132423141015, 0.7140993568158807], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearSrgb", "$get$xyzD50ToLinearSrgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1341358529001178, -1.617385998018042, -0.49066221791109754, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.07195539255794733, -0.228976759815182, 1.4053860351131182], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearA98Rgb", "$get$linearDisplayP3ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8640051374740484, 0.13599486252595164, 0, -0.04205695470968816, 1.042056954709688, 0, -0.02056038078232985, -0.03250613804550798, 1.0530665188278379], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearDisplayP3", "$get$linearA98RgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1500944181410184, -0.15009441814101834, 0, 0.04641729862941844, 0.9535827013705815, 0, 0.02388759479083904, 0.02650477632633013, 0.9496076288828308], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearRec2020", "$get$linearDisplayP3ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7538330343617218, 0.1985973690526163, 0.04756959658566187, 0.04574384896535833, 0.9417772198116935, 0.01247893122294812, -0.00121034035451832, 0.01760171730108989, 0.9836086230534284], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearDisplayP3", "$get$linearRec2020ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.343578252584332, -0.2821796705261357, -0.06139858205819628, -0.06529745278911953, 1.0757879158485746, -0.01049046305945495, 0.00282178726170095, -0.01959849452449406, 1.0167767072627931], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToXyzD65", "$get$linearDisplayP3ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48657094864821626, 0.26566769316909294, 0.1982172852343625, 0.22897456406974884, 0.6917385218365062, 0.079286914093745, 0, 0.04511338185890257, 1.0439443689009757], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearDisplayP3", "$get$xyzD65ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4934969119414245, -0.9313836179191236, -0.40271078445071684, -0.8294889695615749, 1.7626640603183468, 0.02362468584194359, 0.03584583024378433, -0.0761723892680417, 0.9568845240076873], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLms", "$get$linearDisplayP3ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48137985274995443, 0.46211837101131803, 0.05650177623872756, 0.22883194181124472, 0.6532168193835676, 0.11795123880518774, 0.08394575232299319, 0.22416527097756642, 0.6918889766994404], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearDisplayP3", "$get$lmsToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1277689713618737, -2.2571357625916386, 0.12936679122976494, -1.0910090184377979, 2.4133317103069225, -0.32232269186912466, -0.02601080193857045, -0.508041331704167, 1.5340521336427373], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearProphotoRgb", "$get$linearDisplayP3ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6316869193403589, 0.21393038569465722, 0.1543826949649839, 0.08320371426648458, 0.8858651367630243, 0.03093114897049121, -0.00127273456473881, 0.05075510433665735, 0.9505176302280814], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearDisplayP3", "$get$linearProphotoRgbToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6325756087069179, -0.3797716184825984, -0.2528039902243195, -0.15370040233755072, 1.1667025472425014, -0.01300214490495082, 0.01039319529676572, -0.0628073126495944, 1.0524141173528287], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToXyzD50", "$get$linearDisplayP3ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.515146442968116, 0.2920099820638577, 0.15713925139759397, 0.2412003221252552, 0.6922225411313818, 0.06657713674336294, -0.00105013914714014, 0.0418782701890746, 0.7842764714685257], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearDisplayP3", "$get$xyzD50ToLinearDisplayP3", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4039341218554973, -0.9900304424955931, -0.39761363181465614, -0.8422700161454688, 1.7989580161067082, 0.01604562477090472, 0.04819381686413303, -0.09738519815446048, 1.2736713693321273], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearRec2020", "$get$linearA98RgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8773338416636568, 0.07749370651571998, 0.04517245182062317, 0.09662259146620378, 0.8915273202441805, 0.01185008828961569, 0.02292106270284839, 0.04303668501067932, 0.9340422522864723], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearA98Rgb", "$get$linearRec2020ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1519783947159163, -0.0975030553024086, -0.05447533941350766, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0225303827810559, -0.04980650742838876, 1.0723368902094446], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToXyzD65", "$get$linearA98RgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5766690429101308, 0.18555823790654627, 0.18822864623499472, 0.29734497525053616, 0.627363566255466, 0.07529145849399789, 0.02703136138641237, 0.07068885253582714, 0.9913375368376389], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearA98Rgb", "$get$xyzD65ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.041587903810746, -0.5650069742788596, -0.3447313507783295, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.01344428063203102, -0.11836239223101823, 1.0151749943912054], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLms", "$get$linearA98RgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5764322596183941, 0.36991322261987963, 0.05365451776172635, 0.29631647054222465, 0.5916761332521885, 0.11200739620558686, 0.1234782510142776, 0.21949869837199862, 0.6570230506137238], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearA98Rgb", "$get$lmsToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.5540368386115566, -1.6219761806828699, 0.06793934207131327, -1.268437973285032, 2.609757349287689, -0.3413193760026571, -0.05623473593749381, -0.5670418395669061, 1.6232765755043999], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearProphotoRgb", "$get$linearA98RgbToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7401175018047792, 0.11327951328898105, 0.1466029849062397, 0.1375504646980262, 0.833077080269484, 0.02937245503248977, 0.02359772990871766, 0.07378347703906656, 0.9026187930522158], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearA98Rgb", "$get$linearProphotoRgbToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.38965124815152, -0.16945907691487766, -0.22019217123664242, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.01762544368426068, -0.09625702306122665, 1.1138824667454874], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToXyzD50", "$get$linearA98RgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6097750418861814, 0.20530000261929401, 0.14922063192409227, 0.31112461220464155, 0.6256532308346856, 0.06322215696067286, 0.01947059555648168, 0.06087908649415867, 0.7447549204598198], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearA98Rgb", "$get$xyzD50ToLinearA98Rgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.9624670363768806, -0.6107423404815073, -0.3413580980827154, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.02870443944957101, -0.1406748663317068, 1.3489141814137937], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToXyzD65", "$get$linearRec2020ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6369580483012913, 0.14461690358620838, 0.16888097516417205, 0.26270021201126703, 0.677998071518871, 0.05930171646986194, 0, 0.0280726930490875, 1.0609850577107909], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearRec2020", "$get$xyzD65ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7166511879712676, -0.3556707837763924, -0.2533662813736598, -0.666684351832489, 1.616481236634939, 0.01576854581391113, 0.01763985744531091, -0.04277061325780865, 0.942103121235474], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLms", "$get$linearRec2020ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6167557848654444, 0.36019840122646335, 0.02304581390809228, 0.2651330593926367, 0.6358393720678491, 0.09902756853951408, 0.10010262952034828, 0.20390652261661452, 0.6959908478630372], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearRec2020", "$get$lmsToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.1399067304346513, -1.246389493760618, 0.10648276332596668, -0.8847358357577674, 2.1632309383612007, -0.2784951026034334, -0.04857374640044396, -0.4545031497140964, 1.5030768961145404], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearProphotoRgb", "$get$linearRec2020ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8351873331297235, 0.04886884858605698, 0.11594381828421951, 0.05403324519953363, 0.9289184085692044, 0.01704834623126199, -0.00234203897072539, 0.03633215316169465, 0.9660098858090307], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearRec2020", "$get$linearProphotoRgbToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.200659329517408, -0.05756805370122346, -0.14309127581618444, -0.06994154955888504, 1.080617897597214, -0.01067634803832895, 0.00554147334294746, -0.04078219298657951, 1.035240719643632], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToXyzD50", "$get$linearRec2020ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.673515463188276, 0.16569726370390453, 0.12508294953738705, 0.2790590051411206, 0.6753180057491098, 0.04562298910976962, -0.00193242713400438, 0.02997782679282923, 0.7970592028516355], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearRec2020", "$get$xyzD50ToLinearRec2020", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.647184904671766, -0.3936818981316471, -0.23595963848828266, -0.6826641074173818, 1.6477146127444076, 0.01281708338512084, 0.02966887665275675, -0.0629258964297003, 1.2535578201865771], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLms", "$get$xyzD65ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.819022437996703, 0.36190626005289034, -0.12887378152098788, 0.03298365393238846, 0.9292868615863433, 0.03614466635064235, 0.0481771893596242, 0.2642395317527308, 0.6335478284694308], type$.JSArray_double))); + _lazyFinal($, "lmsToXyzD65", "$get$lmsToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2268798758459243, -0.5578149944602171, 0.2813910456659646, -0.04057574521480084, 1.1122868032803173, -0.07171105806551635, -0.07637293667466007, -0.42149333240224324, 1.5869240198367818], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearProphotoRgb", "$get$xyzD65ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.4031904633774979, -0.22301514479051668, -0.1016066850741379, -0.5262384021633072, 1.4816319629234644, 0.01701879027252688, -0.0112022652862215, 0.01824640347962099, 0.9112472274915048], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToXyzD65", "$get$linearProphotoRgbToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.755590742296921, 0.11271984265940525, 0.0821453420953454, 0.2683218435785719, 0.7151152566617912, 0.01656289975963685, 0.0039159727624258, -0.01293344283684181, 1.0980752208342945], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToXyzD50", "$get$xyzD65ToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0479297925449966, 0.02294687060160952, -0.05019226628920519, 0.02962780877005567, 0.99043442675388, -0.01707379906341879, -0.00924304064620452, 0.01505519149029816, 0.751874281428137], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToXyzD65", "$get$xyzD50ToXyzD65", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.9554734214880752, -0.02309845494876452, 0.06325924320057065, -0.02836970933386358, 1.0099953980813041, 0.0210414411919173, 0.01231401486448199, -0.02050764929889898, 1.330365926242124], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearProphotoRgb", "$get$lmsToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7383551481157207, -0.9879509427514458, 0.24959579463572504, -0.7070494015329266, 1.9343700444401382, -0.2273206429072115, -0.08407882206239634, -0.35754060521141334, 1.4416194272738097], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLms", "$get$linearProphotoRgbToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7154484605655534, 0.35279155007721186, -0.0682400106427653, 0.2744116490015671, 0.6677976498412367, 0.05779070115719616, 0.10978443261622942, 0.18619829115002018, 0.7040172762337504], type$.JSArray_double))); + _lazyFinal($, "lmsToXyzD50", "$get$lmsToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.288586218172706, -0.5378717444973745, 0.2135812027542364, -0.00253387643187372, 1.0923167988719165, -0.08978292244004273, -0.06937382305734124, -0.29500839894431263, 1.1894868245121142], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLms", "$get$xyzD50ToLms", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7707000420431172, 0.34924840261939616, -0.11202351884164681, 0.00559649248368848, 0.9370723401136769, 0.06972568836252771, 0.04633714262191069, 0.25277531574310524, 0.851458076746796], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToXyzD50", "$get$linearProphotoRgbToXyzD50", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7977666449006423, 0.13518129740053308, 0.0313477341283922, 0.2880748288194013, 0.711835234241873, 0.00008993693872564, 0, 0, 0.8251046025104602], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearProphotoRgb", "$get$xyzD50ToLinearProphotoRgb", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3457868816471583, -0.25557208737979464, -0.05110186497554526, -0.5446307051249019, 1.5082477428451468, 0.02052744743642139, 0, 0, 1.2119675456389452], type$.JSArray_double))); + _lazyFinal($, "_typesByUnit", "$get$_typesByUnit", () => { + var t3, type, + t1 = type$.String, + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t1 = A.MapExtensions_get_pairs(B.Map_Sr65K, t1, type$.List_String), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + type = t3._0; + for (t3 = J.get$iterator$ax(t3._1); t3.moveNext$0();) + t2.$indexSet(0, t3.get$current(t3), type); + } + return t2; + }); + _lazyFinal($, "_knownCompatibilitiesByUnit", "$get$_knownCompatibilitiesByUnit", () => { + var _i, set, t2, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Set")); + for (_i = 0; _i < 5; ++_i) { + set = B.List_BFg[_i]; + for (t2 = set.get$iterator(set); t2.moveNext$0();) + t1.$indexSet(0, t2.get$current(0), set); + } + return t1; + }); + _lazyFinal($, "_emptyQuoted", "$get$_emptyQuoted", () => A.SassString$("", true)); + _lazyFinal($, "_emptyUnquoted", "$get$_emptyUnquoted", () => A.SassString$("", false)); + _lazyFinal($, "maxInt32", "$get$maxInt32", () => A._asInt(A.pow(2, 31)) - 1); + _lazyFinal($, "minInt32", "$get$minInt32", () => -A._asInt(A.pow(2, 31))); + _lazyFinal($, "_vmFrame", "$get$_vmFrame", () => A.RegExp_RegExp("^#\\d+\\s+(\\S.*) \\((.+?)((?::\\d+){0,2})\\)$", false)); + _lazyFinal($, "_v8JsFrame", "$get$_v8JsFrame", () => A.RegExp_RegExp("^\\s*at (?:(\\S.*?)(?: \\[as [^\\]]+\\])? \\((.*)\\)|(.*))$", false)); + _lazyFinal($, "_v8JsUrlLocation", "$get$_v8JsUrlLocation", () => A.RegExp_RegExp("^(.*?):(\\d+)(?::(\\d+))?$|native$", false)); + _lazyFinal($, "_v8WasmFrame", "$get$_v8WasmFrame", () => A.RegExp_RegExp("^\\s*at (?:(?.+) )?(?:\\(?(?:(?\\S+):wasm-function\\[(?\\d+)\\]\\:0x(?[0-9a-fA-F]+))\\)?)$", false)); + _lazyFinal($, "_v8EvalLocation", "$get$_v8EvalLocation", () => A.RegExp_RegExp("^eval at (?:\\S.*?) \\((.*)\\)(?:, .*?:\\d+:\\d+)?$", false)); + _lazyFinal($, "_firefoxEvalLocation", "$get$_firefoxEvalLocation", () => A.RegExp_RegExp("(\\S+)@(\\S+) line (\\d+) >.* (Function|eval):\\d+:\\d+", false)); + _lazyFinal($, "_firefoxSafariJSFrame", "$get$_firefoxSafariJSFrame", () => A.RegExp_RegExp("^(?:([^@(/]*)(?:\\(.*\\))?((?:/[^/]*)*)(?:\\(.*\\))?@)?(.*?):(\\d*)(?::(\\d*))?$", false)); + _lazyFinal($, "_firefoxWasmFrame", "$get$_firefoxWasmFrame", () => A.RegExp_RegExp("^(?.*?)@(?:(?\\S+).*?:wasm-function\\[(?\\d+)\\]:0x(?[0-9a-fA-F]+))$", false)); + _lazyFinal($, "_safariWasmFrame", "$get$_safariWasmFrame", () => A.RegExp_RegExp("^.*?wasm-function\\[(?.*)\\]@\\[wasm code\\]$", false)); + _lazyFinal($, "_friendlyFrame", "$get$_friendlyFrame", () => A.RegExp_RegExp("^(\\S+)(?: (\\d+)(?::(\\d+))?)?\\s+([^\\d].*)$", false)); + _lazyFinal($, "_asyncBody", "$get$_asyncBody", () => A.RegExp_RegExp("<(|[^>]+)_async_body>", false)); + _lazyFinal($, "_initialDot", "$get$_initialDot", () => A.RegExp_RegExp("^\\.", false)); + _lazyFinal($, "Frame__uriRegExp", "$get$Frame__uriRegExp", () => A.RegExp_RegExp("^[a-zA-Z][-+.a-zA-Z\\d]*://", false)); + _lazyFinal($, "Frame__windowsRegExp", "$get$Frame__windowsRegExp", () => A.RegExp_RegExp("^([a-zA-Z]:[\\\\/]|\\\\\\\\)", false)); + _lazyFinal($, "_terseRegExp", "$get$_terseRegExp", () => A.RegExp_RegExp("(-patch)?([/\\\\].*)?$", false)); + _lazyFinal($, "_v8Trace", "$get$_v8Trace", () => A.RegExp_RegExp("\\n ?at ", false)); + _lazyFinal($, "_v8TraceLine", "$get$_v8TraceLine", () => A.RegExp_RegExp(" ?at ", false)); + _lazyFinal($, "_firefoxEvalTrace", "$get$_firefoxEvalTrace", () => A.RegExp_RegExp("@\\S+ line \\d+ >.* (Function|eval):\\d+:\\d+", false)); + _lazyFinal($, "_firefoxSafariTrace", "$get$_firefoxSafariTrace", () => A.RegExp_RegExp("^(([.0-9A-Za-z_$/<]|\\(.*\\))*@)?[^\\s]*:\\d*$", true)); + _lazyFinal($, "_friendlyTrace", "$get$_friendlyTrace", () => A.RegExp_RegExp("^[^\\s<][^\\s]*( \\d+(:\\d+)?)?[ \\t]+[^\\s]+$", true)); + _lazyFinal($, "vmChainGap", "$get$vmChainGap", () => A.RegExp_RegExp("^\\n?$", true)); + _lazyFinal($, "_newlineRegExp", "$get$_newlineRegExp", () => A.RegExp_RegExp("\\n|\\r\\n|\\r(?!\\n)", false)); + _lazyFinal($, "argumentListClass", "$get$argumentListClass", () => new A.argumentListClass_closure().call$0()); + _lazyFinal($, "booleanClass", "$get$booleanClass", () => new A.booleanClass_closure().call$0()); + _lazyFinal($, "legacyBooleanClass", "$get$legacyBooleanClass", () => new A.legacyBooleanClass_closure().call$0()); + _lazyFinal($, "calculationClass", "$get$calculationClass", () => new A.calculationClass_closure().call$0()); + _lazyFinal($, "calculationOperationClass", "$get$calculationOperationClass", () => new A.calculationOperationClass_closure().call$0()); + _lazyFinal($, "calculationInterpolationClass", "$get$calculationInterpolationClass", () => new A.calculationInterpolationClass_closure().call$0()); + _lazyFinal($, "_microsoftFilterStart0", "$get$_microsoftFilterStart0", () => A.RegExp_RegExp("^[a-zA-Z]+\\s*=", false)); + _lazyFinal($, "global6", "$get$global6", () => { + var _s5_ = "color", + _s27_ = "$red, $green, $blue, $alpha", + _s19_ = "$red, $green, $blue", + _s9_ = "$channels", + _s37_ = "$hue, $saturation, $lightness, $alpha", + _s29_ = "$hue, $saturation, $lightness", + _s17_ = "$hue, $saturation", + _s6_ = "adjust", + _s15_ = "$color, $amount", + t1 = type$.String, + t2 = type$.Value_Function_List_Value_2; + return A.UnmodifiableListView$(A._setArrayType([A._channelFunction0("red", B.RgbColorSpace_i0P0, new A.global_closure44(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction0("green", B.RgbColorSpace_i0P0, new A.global_closure45(), true, null).withDeprecationWarning$1(_s5_), A._channelFunction0("blue", B.RgbColorSpace_i0P0, new A.global_closure46(), true, null).withDeprecationWarning$1(_s5_), $.$get$_mix0().withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction0("rgb", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure47(), _s19_, new A.global_closure48(), "$color, $alpha", new A.global_closure49(), "$channels", new A.global_closure50()], t1, t2)), A.BuiltInCallable$overloadedFunction0("rgba", A.LinkedHashMap_LinkedHashMap$_literal([_s27_, new A.global_closure51(), _s19_, new A.global_closure52(), "$color, $alpha", new A.global_closure53(), "$channels", new A.global_closure54()], t1, t2)), A._function12("invert", "$color, $weight: 100%, $space: null", new A.global_closure55()), A._channelFunction0("hue", B.HslColorSpace_JQ20, new A.global_closure56(), true, "deg").withDeprecationWarning$1(_s5_), A._channelFunction0("saturation", B.HslColorSpace_JQ20, new A.global_closure57(), true, "%").withDeprecationWarning$1(_s5_), A._channelFunction0("lightness", B.HslColorSpace_JQ20, new A.global_closure58(), true, "%").withDeprecationWarning$1(_s5_), A.BuiltInCallable$overloadedFunction0("hsl", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure59(), _s29_, new A.global_closure60(), _s17_, new A.global_closure61(), "$channels", new A.global_closure62()], t1, t2)), A.BuiltInCallable$overloadedFunction0("hsla", A.LinkedHashMap_LinkedHashMap$_literal([_s37_, new A.global_closure63(), _s29_, new A.global_closure64(), _s17_, new A.global_closure65(), "$channels", new A.global_closure66()], t1, t2)), A._function12("grayscale", "$color", new A.global_closure67()), A._function12("adjust-hue", "$color, $degrees", new A.global_closure68()).withDeprecationWarning$2(_s5_, _s6_), A._function12("lighten", _s15_, new A.global_closure69()).withDeprecationWarning$2(_s5_, _s6_), A._function12("darken", _s15_, new A.global_closure70()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction0("saturate", A.LinkedHashMap_LinkedHashMap$_literal(["$amount", new A.global_closure71(), "$color, $amount", new A.global_closure72()], t1, t2)), A._function12("desaturate", _s15_, new A.global_closure73()).withDeprecationWarning$2(_s5_, _s6_), A._function12("opacify", _s15_, new A.global_closure74()).withDeprecationWarning$2(_s5_, _s6_), A._function12("fade-in", _s15_, new A.global_closure75()).withDeprecationWarning$2(_s5_, _s6_), A._function12("transparentize", _s15_, new A.global_closure76()).withDeprecationWarning$2(_s5_, _s6_), A._function12("fade-out", _s15_, new A.global_closure77()).withDeprecationWarning$2(_s5_, _s6_), A.BuiltInCallable$overloadedFunction0("alpha", A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.global_closure78(), "$args...", new A.global_closure79()], t1, t2)), A._function12("opacity", "$color", new A.global_closure80()), A._function12(_s5_, "$description", new A.global_closure81()), A._function12("hwb", _s9_, new A.global_closure82()), A._function12("lab", _s9_, new A.global_closure83()), A._function12("lch", _s9_, new A.global_closure84()), A._function12("oklab", _s9_, new A.global_closure85()), A._function12("oklch", _s9_, new A.global_closure86()), $.$get$_complement0().withDeprecationWarning$1(_s5_), $.$get$_ieHexStr0(), $.$get$_adjust0().withDeprecationWarning$1(_s5_).withName$1("adjust-color"), $.$get$_scale0().withDeprecationWarning$1(_s5_).withName$1("scale-color"), $.$get$_change0().withDeprecationWarning$1(_s5_).withName$1("change-color")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module5", "$get$module5", () => { + var _null = null, + _s10_ = "saturation", + _s9_ = "lightness", + _s6_ = "$color", _s5_ = "alpha", + _s30_ = "$color, $channel, $space: null", + t1 = type$.String, + t2 = type$.Value_Function_List_Value_2; + return A.BuiltInModule$0("color", A._setArrayType([A._channelFunction0("red", B.RgbColorSpace_i0P0, new A.module_closure27(), false, _null), A._channelFunction0("green", B.RgbColorSpace_i0P0, new A.module_closure28(), false, _null), A._channelFunction0("blue", B.RgbColorSpace_i0P0, new A.module_closure29(), false, _null), $.$get$_mix0(), A._function12("invert", "$color, $weight: 100%, $space: null", new A.module_closure30()), A._channelFunction0("hue", B.HslColorSpace_JQ20, new A.module_closure31(), false, "deg"), A._channelFunction0(_s10_, B.HslColorSpace_JQ20, new A.module_closure32(), false, "%"), A._channelFunction0(_s9_, B.HslColorSpace_JQ20, new A.module_closure33(), false, "%"), A._removedColorFunction0("adjust-hue", "hue", false), A._removedColorFunction0("lighten", _s9_, false), A._removedColorFunction0("darken", _s9_, true), A._removedColorFunction0("saturate", _s10_, false), A._removedColorFunction0("desaturate", _s10_, true), A._function12("grayscale", _s6_, new A.module_closure34()), A.BuiltInCallable$overloadedFunction0("hwb", A.LinkedHashMap_LinkedHashMap$_literal(["$hue, $whiteness, $blackness, $alpha: 1", new A.module_closure35(), "$channels", new A.module_closure36()], t1, t2)), A._channelFunction0("whiteness", B.HwbColorSpace_guQ0, new A.module_closure37(), false, "%"), A._channelFunction0("blackness", B.HwbColorSpace_guQ0, new A.module_closure38(), false, "%"), A._removedColorFunction0("opacify", _s5_, false), A._removedColorFunction0("fade-in", _s5_, false), A._removedColorFunction0("transparentize", _s5_, true), A._removedColorFunction0("fade-out", _s5_, true), A.BuiltInCallable$overloadedFunction0(_s5_, A.LinkedHashMap_LinkedHashMap$_literal(["$color", new A.module_closure39(), "$args...", new A.module_closure40()], t1, t2)), A._function12("opacity", _s6_, new A.module_closure41()), A._function12("space", _s6_, new A.module_closure42()), A._function12("to-space", "$color, $space", new A.module_closure43()), A._function12("is-legacy", _s6_, new A.module_closure44()), A._function12("is-missing", "$color, $channel", new A.module_closure45()), A._function12("is-in-gamut", "$color, $space: null", new A.module_closure46()), A._function12("to-gamut", "$color, $space: null, $method: null", new A.module_closure47()), A._function12("channel", _s30_, new A.module_closure48()), A._function12("same", "$color1, $color2", new A.module_closure49()), A._function12("is-powerless", _s30_, new A.module_closure50()), $.$get$_complement0(), $.$get$_adjust0(), $.$get$_scale0(), $.$get$_change0(), $.$get$_ieHexStr0()], type$.JSArray_Callable_2), _null, _null, type$.Callable_2); + }); + _lazyFinal($, "_mix0", "$get$_mix0", () => A._function12("mix", string$.x24color, new A._mix_closure0())); + _lazyFinal($, "_complement0", "$get$_complement0", () => A._function12("complement", "$color, $space: null", new A._complement_closure0())); + _lazyFinal($, "_adjust0", "$get$_adjust0", () => A._function12("adjust", "$color, $kwargs...", new A._adjust_closure0())); + _lazyFinal($, "_scale0", "$get$_scale0", () => A._function12("scale", "$color, $kwargs...", new A._scale_closure0())); + _lazyFinal($, "_change0", "$get$_change0", () => A._function12("change", "$color, $kwargs...", new A._change_closure0())); + _lazyFinal($, "_ieHexStr0", "$get$_ieHexStr0", () => A._function12("ie-hex-str", "$color", new A._ieHexStr_closure0())); + _lazyFinal($, "colorClass", "$get$colorClass", () => new A.colorClass_closure().call$0()); + _lazyFinal($, "legacyColorClass", "$get$legacyColorClass", () => { + var t1 = A.createJSClass("sass.types.Color", new A.legacyColorClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getR", new A.legacyColorClass_closure0(), "getG", new A.legacyColorClass_closure1(), "getB", new A.legacyColorClass_closure2(), "getA", new A.legacyColorClass_closure3(), "setR", new A.legacyColorClass_closure4(), "setG", new A.legacyColorClass_closure5(), "setB", new A.legacyColorClass_closure6(), "setA", new A.legacyColorClass_closure7()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "colorsByName0", "$get$colorsByName0", () => A.LinkedHashMap_LinkedHashMap$_literal(["yellowgreen", A.SassColor_SassColor$rgb0(154, 205, 50, 1), "yellow", A.SassColor_SassColor$rgb0(255, 255, 0, 1), "whitesmoke", A.SassColor_SassColor$rgb0(245, 245, 245, 1), "white", A.SassColor_SassColor$rgb0(255, 255, 255, 1), "wheat", A.SassColor_SassColor$rgb0(245, 222, 179, 1), "violet", A.SassColor_SassColor$rgb0(238, 130, 238, 1), "turquoise", A.SassColor_SassColor$rgb0(64, 224, 208, 1), "transparent", A.SassColor_SassColor$rgb0(0, 0, 0, 0), "tomato", A.SassColor_SassColor$rgb0(255, 99, 71, 1), "thistle", A.SassColor_SassColor$rgb0(216, 191, 216, 1), "teal", A.SassColor_SassColor$rgb0(0, 128, 128, 1), "tan", A.SassColor_SassColor$rgb0(210, 180, 140, 1), "steelblue", A.SassColor_SassColor$rgb0(70, 130, 180, 1), "springgreen", A.SassColor_SassColor$rgb0(0, 255, 127, 1), "snow", A.SassColor_SassColor$rgb0(255, 250, 250, 1), "slategrey", A.SassColor_SassColor$rgb0(112, 128, 144, 1), "slategray", A.SassColor_SassColor$rgb0(112, 128, 144, 1), "slateblue", A.SassColor_SassColor$rgb0(106, 90, 205, 1), "skyblue", A.SassColor_SassColor$rgb0(135, 206, 235, 1), "silver", A.SassColor_SassColor$rgb0(192, 192, 192, 1), "sienna", A.SassColor_SassColor$rgb0(160, 82, 45, 1), "seashell", A.SassColor_SassColor$rgb0(255, 245, 238, 1), "seagreen", A.SassColor_SassColor$rgb0(46, 139, 87, 1), "sandybrown", A.SassColor_SassColor$rgb0(244, 164, 96, 1), "salmon", A.SassColor_SassColor$rgb0(250, 128, 114, 1), "saddlebrown", A.SassColor_SassColor$rgb0(139, 69, 19, 1), "royalblue", A.SassColor_SassColor$rgb0(65, 105, 225, 1), "rosybrown", A.SassColor_SassColor$rgb0(188, 143, 143, 1), "red", A.SassColor_SassColor$rgb0(255, 0, 0, 1), "rebeccapurple", A.SassColor_SassColor$rgb0(102, 51, 153, 1), "purple", A.SassColor_SassColor$rgb0(128, 0, 128, 1), "powderblue", A.SassColor_SassColor$rgb0(176, 224, 230, 1), "plum", A.SassColor_SassColor$rgb0(221, 160, 221, 1), "pink", A.SassColor_SassColor$rgb0(255, 192, 203, 1), "peru", A.SassColor_SassColor$rgb0(205, 133, 63, 1), "peachpuff", A.SassColor_SassColor$rgb0(255, 218, 185, 1), "papayawhip", A.SassColor_SassColor$rgb0(255, 239, 213, 1), "palevioletred", A.SassColor_SassColor$rgb0(219, 112, 147, 1), "paleturquoise", A.SassColor_SassColor$rgb0(175, 238, 238, 1), "palegreen", A.SassColor_SassColor$rgb0(152, 251, 152, 1), "palegoldenrod", A.SassColor_SassColor$rgb0(238, 232, 170, 1), "orchid", A.SassColor_SassColor$rgb0(218, 112, 214, 1), "orangered", A.SassColor_SassColor$rgb0(255, 69, 0, 1), "orange", A.SassColor_SassColor$rgb0(255, 165, 0, 1), "olivedrab", A.SassColor_SassColor$rgb0(107, 142, 35, 1), "olive", A.SassColor_SassColor$rgb0(128, 128, 0, 1), "oldlace", A.SassColor_SassColor$rgb0(253, 245, 230, 1), "navy", A.SassColor_SassColor$rgb0(0, 0, 128, 1), "navajowhite", A.SassColor_SassColor$rgb0(255, 222, 173, 1), "moccasin", A.SassColor_SassColor$rgb0(255, 228, 181, 1), "mistyrose", A.SassColor_SassColor$rgb0(255, 228, 225, 1), "mintcream", A.SassColor_SassColor$rgb0(245, 255, 250, 1), "midnightblue", A.SassColor_SassColor$rgb0(25, 25, 112, 1), "mediumvioletred", A.SassColor_SassColor$rgb0(199, 21, 133, 1), "mediumturquoise", A.SassColor_SassColor$rgb0(72, 209, 204, 1), "mediumspringgreen", A.SassColor_SassColor$rgb0(0, 250, 154, 1), "mediumslateblue", A.SassColor_SassColor$rgb0(123, 104, 238, 1), "mediumseagreen", A.SassColor_SassColor$rgb0(60, 179, 113, 1), "mediumpurple", A.SassColor_SassColor$rgb0(147, 112, 219, 1), "mediumorchid", A.SassColor_SassColor$rgb0(186, 85, 211, 1), "mediumblue", A.SassColor_SassColor$rgb0(0, 0, 205, 1), "mediumaquamarine", A.SassColor_SassColor$rgb0(102, 205, 170, 1), "maroon", A.SassColor_SassColor$rgb0(128, 0, 0, 1), "magenta", A.SassColor_SassColor$rgb0(255, 0, 255, 1), "linen", A.SassColor_SassColor$rgb0(250, 240, 230, 1), "limegreen", A.SassColor_SassColor$rgb0(50, 205, 50, 1), "lime", A.SassColor_SassColor$rgb0(0, 255, 0, 1), "lightyellow", A.SassColor_SassColor$rgb0(255, 255, 224, 1), "lightsteelblue", A.SassColor_SassColor$rgb0(176, 196, 222, 1), "lightslategrey", A.SassColor_SassColor$rgb0(119, 136, 153, 1), "lightslategray", A.SassColor_SassColor$rgb0(119, 136, 153, 1), "lightskyblue", A.SassColor_SassColor$rgb0(135, 206, 250, 1), "lightseagreen", A.SassColor_SassColor$rgb0(32, 178, 170, 1), "lightsalmon", A.SassColor_SassColor$rgb0(255, 160, 122, 1), "lightpink", A.SassColor_SassColor$rgb0(255, 182, 193, 1), "lightgrey", A.SassColor_SassColor$rgb0(211, 211, 211, 1), "lightgreen", A.SassColor_SassColor$rgb0(144, 238, 144, 1), "lightgray", A.SassColor_SassColor$rgb0(211, 211, 211, 1), "lightgoldenrodyellow", A.SassColor_SassColor$rgb0(250, 250, 210, 1), "lightcyan", A.SassColor_SassColor$rgb0(224, 255, 255, 1), "lightcoral", A.SassColor_SassColor$rgb0(240, 128, 128, 1), "lightblue", A.SassColor_SassColor$rgb0(173, 216, 230, 1), "lemonchiffon", A.SassColor_SassColor$rgb0(255, 250, 205, 1), "lawngreen", A.SassColor_SassColor$rgb0(124, 252, 0, 1), "lavenderblush", A.SassColor_SassColor$rgb0(255, 240, 245, 1), "lavender", A.SassColor_SassColor$rgb0(230, 230, 250, 1), "khaki", A.SassColor_SassColor$rgb0(240, 230, 140, 1), "ivory", A.SassColor_SassColor$rgb0(255, 255, 240, 1), "indigo", A.SassColor_SassColor$rgb0(75, 0, 130, 1), "indianred", A.SassColor_SassColor$rgb0(205, 92, 92, 1), "hotpink", A.SassColor_SassColor$rgb0(255, 105, 180, 1), "honeydew", A.SassColor_SassColor$rgb0(240, 255, 240, 1), "grey", A.SassColor_SassColor$rgb0(128, 128, 128, 1), "greenyellow", A.SassColor_SassColor$rgb0(173, 255, 47, 1), "green", A.SassColor_SassColor$rgb0(0, 128, 0, 1), "gray", A.SassColor_SassColor$rgb0(128, 128, 128, 1), "goldenrod", A.SassColor_SassColor$rgb0(218, 165, 32, 1), "gold", A.SassColor_SassColor$rgb0(255, 215, 0, 1), "ghostwhite", A.SassColor_SassColor$rgb0(248, 248, 255, 1), "gainsboro", A.SassColor_SassColor$rgb0(220, 220, 220, 1), "fuchsia", A.SassColor_SassColor$rgb0(255, 0, 255, 1), "forestgreen", A.SassColor_SassColor$rgb0(34, 139, 34, 1), "floralwhite", A.SassColor_SassColor$rgb0(255, 250, 240, 1), "firebrick", A.SassColor_SassColor$rgb0(178, 34, 34, 1), "dodgerblue", A.SassColor_SassColor$rgb0(30, 144, 255, 1), "dimgrey", A.SassColor_SassColor$rgb0(105, 105, 105, 1), "dimgray", A.SassColor_SassColor$rgb0(105, 105, 105, 1), "deepskyblue", A.SassColor_SassColor$rgb0(0, 191, 255, 1), "deeppink", A.SassColor_SassColor$rgb0(255, 20, 147, 1), "darkviolet", A.SassColor_SassColor$rgb0(148, 0, 211, 1), "darkturquoise", A.SassColor_SassColor$rgb0(0, 206, 209, 1), "darkslategrey", A.SassColor_SassColor$rgb0(47, 79, 79, 1), "darkslategray", A.SassColor_SassColor$rgb0(47, 79, 79, 1), "darkslateblue", A.SassColor_SassColor$rgb0(72, 61, 139, 1), "darkseagreen", A.SassColor_SassColor$rgb0(143, 188, 143, 1), "darksalmon", A.SassColor_SassColor$rgb0(233, 150, 122, 1), "darkred", A.SassColor_SassColor$rgb0(139, 0, 0, 1), "darkorchid", A.SassColor_SassColor$rgb0(153, 50, 204, 1), "darkorange", A.SassColor_SassColor$rgb0(255, 140, 0, 1), "darkolivegreen", A.SassColor_SassColor$rgb0(85, 107, 47, 1), "darkmagenta", A.SassColor_SassColor$rgb0(139, 0, 139, 1), "darkkhaki", A.SassColor_SassColor$rgb0(189, 183, 107, 1), "darkgrey", A.SassColor_SassColor$rgb0(169, 169, 169, 1), "darkgreen", A.SassColor_SassColor$rgb0(0, 100, 0, 1), "darkgray", A.SassColor_SassColor$rgb0(169, 169, 169, 1), "darkgoldenrod", A.SassColor_SassColor$rgb0(184, 134, 11, 1), "darkcyan", A.SassColor_SassColor$rgb0(0, 139, 139, 1), "darkblue", A.SassColor_SassColor$rgb0(0, 0, 139, 1), "cyan", A.SassColor_SassColor$rgb0(0, 255, 255, 1), "crimson", A.SassColor_SassColor$rgb0(220, 20, 60, 1), "cornsilk", A.SassColor_SassColor$rgb0(255, 248, 220, 1), "cornflowerblue", A.SassColor_SassColor$rgb0(100, 149, 237, 1), "coral", A.SassColor_SassColor$rgb0(255, 127, 80, 1), "chocolate", A.SassColor_SassColor$rgb0(210, 105, 30, 1), "chartreuse", A.SassColor_SassColor$rgb0(127, 255, 0, 1), "cadetblue", A.SassColor_SassColor$rgb0(95, 158, 160, 1), "burlywood", A.SassColor_SassColor$rgb0(222, 184, 135, 1), "brown", A.SassColor_SassColor$rgb0(165, 42, 42, 1), "blueviolet", A.SassColor_SassColor$rgb0(138, 43, 226, 1), "blue", A.SassColor_SassColor$rgb0(0, 0, 255, 1), "blanchedalmond", A.SassColor_SassColor$rgb0(255, 235, 205, 1), "black", A.SassColor_SassColor$rgb0(0, 0, 0, 1), "bisque", A.SassColor_SassColor$rgb0(255, 228, 196, 1), "beige", A.SassColor_SassColor$rgb0(245, 245, 220, 1), "azure", A.SassColor_SassColor$rgb0(240, 255, 255, 1), "aquamarine", A.SassColor_SassColor$rgb0(127, 255, 212, 1), "aqua", A.SassColor_SassColor$rgb0(0, 255, 255, 1), "antiquewhite", A.SassColor_SassColor$rgb0(250, 235, 215, 1), "aliceblue", A.SassColor_SassColor$rgb0(240, 248, 255, 1)], type$.String, type$.SassColor_2)); + _lazyFinal($, "namesByColor0", "$get$namesByColor0", () => { + var $name, + t1 = type$.SassColor_2, + t2 = type$.String, + t3 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t2); + for (t1 = A.MapExtensions_get_pairs0($.$get$colorsByName0(), t2, t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t2 = t1.get$current(t1); + $name = t2._0; + t3.$indexSet(0, t2._1, $name); + } + return t3; + }); + _lazyFinal($, "nodePackageImporterClass", "$get$nodePackageImporterClass", () => new A.nodePackageImporterClass_closure().call$0()); + _lazyFinal($, "compilerClass", "$get$compilerClass", () => new A.compilerClass_closure().call$0()); + _lazyFinal($, "asyncCompilerClass", "$get$asyncCompilerClass", () => new A.asyncCompilerClass_closure().call$0()); + _lazyFinal($, "lmsToOklab0", "$get$lmsToOklab0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.210454268309314, 0.7936177747023054, -0.0040720430116193, 1.9779985324311684, -2.42859224204858, 0.450593709617411, 0.0259040424655478, 0.7827717124575296, -0.8086757549230774], type$.JSArray_double))); + _lazyFinal($, "oklabToLms0", "$get$oklabToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0000000000000002, 0.3963377773761749, 0.2158037573099136, 0.9999999999999998, -0.10556134581565854, -0.06385417282581334, 0.9999999999999999, -0.0894841775298118, -1.2914855480194094], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearDisplayP30", "$get$linearSrgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8224619687143623, 0.17753803128563775, 0, 0.03319419885096161, 0.9668058011490384, 0, 0.01708263072112003, 0.07239744066396346, 0.9105199286149165], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearSrgb0", "$get$linearDisplayP3ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2249401762805598, -0.22494017628055996, 0, -0.04205695470968816, 1.042056954709688, 0, -0.01963755459033443, -0.07863604555063188, 1.0982736001409663], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearA98Rgb0", "$get$linearSrgbToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7151256068556247, 0.28487439314437535, 0, 0, 1, 0, 0, 0.04116194845011846, 0.9588380515498816], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearSrgb0", "$get$linearA98RgbToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3983557439607783, -0.3983557439607783, 0, 0, 1, 0, 0, -0.04292898929447326, 1.0429289892944733], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearRec20200", "$get$linearSrgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.627403895934699, 0.3292830383778837, 0.04331306568741722, 0.06909728935823208, 0.9195403950754587, 0.01136231556630917, 0.01639143887515027, 0.08801330787722575, 0.895595253247624], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearSrgb0", "$get$linearRec2020ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6604910021084345, -0.5876411387885495, -0.07284986331988487, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0181507633549053, -0.10057889800800737, 1.1187296613629127], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToXyzD650", "$get$linearSrgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.4123907992659595, 0.35758433938387796, 0.1804807884018343, 0.21263900587151036, 0.7151686787677559, 0.07219231536073371, 0.01933081871559185, 0.11919477979462598, 0.9505321522496606], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearSrgb0", "$get$xyzD65ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.2409699419045213, -1.5373831775700935, -0.4986107602930033, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.0556300796969936, -0.20397695888897657, 1.0569715142428786], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLms0", "$get$linearSrgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.412221469470763, 0.5363325372617348, 0.0514459932675022, 0.2119034958178252, 0.6806995506452342, 0.1073969535369405, 0.08830245919005641, 0.2817188391361215, 0.6299787016738221], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearSrgb0", "$get$lmsToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([4.076741636075958, -3.307711539258062, 0.23096990318210417, -1.268437973285032, 2.609757349287689, -0.3413193760026571, -0.00419607613867551, -0.7034186179359363, 1.707614694074612], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToLinearProphotoRgb0", "$get$linearSrgbToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5292769776226116, 0.33015450197849283, 0.14056852039889556, 0.09836585954044917, 0.8734707129069618, 0.028163427552589, 0.01687534092138684, 0.11765941425612084, 0.8654652448224923], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearSrgb0", "$get$linearProphotoRgbToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.034380849516996, -0.7276357899341342, -0.3067450595828618, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.00855882878391742, -0.1532667021380372, 1.1618255309219547], type$.JSArray_double))); + _lazyFinal($, "linearSrgbToXyzD500", "$get$linearSrgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.43606574687426936, 0.3851515095901596, 0.14307841996513868, 0.22249317711056518, 0.7168870130944824, 0.06061980979495235, 0.01392392146316939, 0.09708132423141015, 0.7140993568158807], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearSrgb0", "$get$xyzD50ToLinearSrgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1341358529001178, -1.617385998018042, -0.49066221791109754, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.07195539255794733, -0.228976759815182, 1.4053860351131182], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearA98Rgb0", "$get$linearDisplayP3ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8640051374740484, 0.13599486252595164, 0, -0.04205695470968816, 1.042056954709688, 0, -0.02056038078232985, -0.03250613804550798, 1.0530665188278379], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearDisplayP30", "$get$linearA98RgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1500944181410184, -0.15009441814101834, 0, 0.04641729862941844, 0.9535827013705815, 0, 0.02388759479083904, 0.02650477632633013, 0.9496076288828308], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearRec20200", "$get$linearDisplayP3ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7538330343617218, 0.1985973690526163, 0.04756959658566187, 0.04574384896535833, 0.9417772198116935, 0.01247893122294812, -0.00121034035451832, 0.01760171730108989, 0.9836086230534284], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearDisplayP30", "$get$linearRec2020ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.343578252584332, -0.2821796705261357, -0.06139858205819628, -0.06529745278911953, 1.0757879158485746, -0.01049046305945495, 0.00282178726170095, -0.01959849452449406, 1.0167767072627931], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToXyzD650", "$get$linearDisplayP3ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48657094864821626, 0.26566769316909294, 0.1982172852343625, 0.22897456406974884, 0.6917385218365062, 0.079286914093745, 0, 0.04511338185890257, 1.0439443689009757], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearDisplayP30", "$get$xyzD65ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4934969119414245, -0.9313836179191236, -0.40271078445071684, -0.8294889695615749, 1.7626640603183468, 0.02362468584194359, 0.03584583024378433, -0.0761723892680417, 0.9568845240076873], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLms0", "$get$linearDisplayP3ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.48137985274995443, 0.46211837101131803, 0.05650177623872756, 0.22883194181124472, 0.6532168193835676, 0.11795123880518774, 0.08394575232299319, 0.22416527097756642, 0.6918889766994404], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearDisplayP30", "$get$lmsToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([3.1277689713618737, -2.2571357625916386, 0.12936679122976494, -1.0910090184377979, 2.4133317103069225, -0.32232269186912466, -0.02601080193857045, -0.508041331704167, 1.5340521336427373], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToLinearProphotoRgb0", "$get$linearDisplayP3ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6316869193403589, 0.21393038569465722, 0.1543826949649839, 0.08320371426648458, 0.8858651367630243, 0.03093114897049121, -0.00127273456473881, 0.05075510433665735, 0.9505176302280814], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearDisplayP30", "$get$linearProphotoRgbToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.6325756087069179, -0.3797716184825984, -0.2528039902243195, -0.15370040233755072, 1.1667025472425014, -0.01300214490495082, 0.01039319529676572, -0.0628073126495944, 1.0524141173528287], type$.JSArray_double))); + _lazyFinal($, "linearDisplayP3ToXyzD500", "$get$linearDisplayP3ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.515146442968116, 0.2920099820638577, 0.15713925139759397, 0.2412003221252552, 0.6922225411313818, 0.06657713674336294, -0.00105013914714014, 0.0418782701890746, 0.7842764714685257], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearDisplayP30", "$get$xyzD50ToLinearDisplayP30", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.4039341218554973, -0.9900304424955931, -0.39761363181465614, -0.8422700161454688, 1.7989580161067082, 0.01604562477090472, 0.04819381686413303, -0.09738519815446048, 1.2736713693321273], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearRec20200", "$get$linearA98RgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8773338416636568, 0.07749370651571998, 0.04517245182062317, 0.09662259146620378, 0.8915273202441805, 0.01185008828961569, 0.02292106270284839, 0.04303668501067932, 0.9340422522864723], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearA98Rgb0", "$get$linearRec2020ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.1519783947159163, -0.0975030553024086, -0.05447533941350766, -0.12455047452159074, 1.1328998971259603, -0.00834942260436947, -0.0225303827810559, -0.04980650742838876, 1.0723368902094446], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToXyzD650", "$get$linearA98RgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5766690429101308, 0.18555823790654627, 0.18822864623499472, 0.29734497525053616, 0.627363566255466, 0.07529145849399789, 0.02703136138641237, 0.07068885253582714, 0.9913375368376389], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearA98Rgb0", "$get$xyzD65ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.041587903810746, -0.5650069742788596, -0.3447313507783295, -0.9692436362808798, 1.8759675015077206, 0.04155505740717561, 0.01344428063203102, -0.11836239223101823, 1.0151749943912054], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLms0", "$get$linearA98RgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.5764322596183941, 0.36991322261987963, 0.05365451776172635, 0.29631647054222465, 0.5916761332521885, 0.11200739620558686, 0.1234782510142776, 0.21949869837199862, 0.6570230506137238], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearA98Rgb0", "$get$lmsToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.5540368386115566, -1.6219761806828699, 0.06793934207131327, -1.268437973285032, 2.609757349287689, -0.3413193760026571, -0.05623473593749381, -0.5670418395669061, 1.6232765755043999], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToLinearProphotoRgb0", "$get$linearA98RgbToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7401175018047792, 0.11327951328898105, 0.1466029849062397, 0.1375504646980262, 0.833077080269484, 0.02937245503248977, 0.02359772990871766, 0.07378347703906656, 0.9026187930522158], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearA98Rgb0", "$get$linearProphotoRgbToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.38965124815152, -0.16945907691487766, -0.22019217123664242, -0.22882573163305037, 1.2317425411901048, -0.00291680955705449, -0.01762544368426068, -0.09625702306122665, 1.1138824667454874], type$.JSArray_double))); + _lazyFinal($, "linearA98RgbToXyzD500", "$get$linearA98RgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6097750418861814, 0.20530000261929401, 0.14922063192409227, 0.31112461220464155, 0.6256532308346856, 0.06322215696067286, 0.01947059555648168, 0.06087908649415867, 0.7447549204598198], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearA98Rgb0", "$get$xyzD50ToLinearA98Rgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.9624670363768806, -0.6107423404815073, -0.3413580980827154, -0.9787954765557777, 1.9162543773959884, 0.03344287339036693, 0.02870443944957101, -0.1406748663317068, 1.3489141814137937], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToXyzD650", "$get$linearRec2020ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6369580483012913, 0.14461690358620838, 0.16888097516417205, 0.26270021201126703, 0.677998071518871, 0.05930171646986194, 0, 0.0280726930490875, 1.0609850577107909], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearRec20200", "$get$xyzD65ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7166511879712676, -0.3556707837763924, -0.2533662813736598, -0.666684351832489, 1.616481236634939, 0.01576854581391113, 0.01763985744531091, -0.04277061325780865, 0.942103121235474], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLms0", "$get$linearRec2020ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.6167557848654444, 0.36019840122646335, 0.02304581390809228, 0.2651330593926367, 0.6358393720678491, 0.09902756853951408, 0.10010262952034828, 0.20390652261661452, 0.6959908478630372], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearRec20200", "$get$lmsToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([2.1399067304346513, -1.246389493760618, 0.10648276332596668, -0.8847358357577674, 2.1632309383612007, -0.2784951026034334, -0.04857374640044396, -0.4545031497140964, 1.5030768961145404], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToLinearProphotoRgb0", "$get$linearRec2020ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.8351873331297235, 0.04886884858605698, 0.11594381828421951, 0.05403324519953363, 0.9289184085692044, 0.01704834623126199, -0.00234203897072539, 0.03633215316169465, 0.9660098858090307], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLinearRec20200", "$get$linearProphotoRgbToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.200659329517408, -0.05756805370122346, -0.14309127581618444, -0.06994154955888504, 1.080617897597214, -0.01067634803832895, 0.00554147334294746, -0.04078219298657951, 1.035240719643632], type$.JSArray_double))); + _lazyFinal($, "linearRec2020ToXyzD500", "$get$linearRec2020ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.673515463188276, 0.16569726370390453, 0.12508294953738705, 0.2790590051411206, 0.6753180057491098, 0.04562298910976962, -0.00193242713400438, 0.02997782679282923, 0.7970592028516355], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearRec20200", "$get$xyzD50ToLinearRec20200", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.647184904671766, -0.3936818981316471, -0.23595963848828266, -0.6826641074173818, 1.6477146127444076, 0.01281708338512084, 0.02966887665275675, -0.0629258964297003, 1.2535578201865771], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLms0", "$get$xyzD65ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.819022437996703, 0.36190626005289034, -0.12887378152098788, 0.03298365393238846, 0.9292868615863433, 0.03614466635064235, 0.0481771893596242, 0.2642395317527308, 0.6335478284694308], type$.JSArray_double))); + _lazyFinal($, "lmsToXyzD650", "$get$lmsToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.2268798758459243, -0.5578149944602171, 0.2813910456659646, -0.04057574521480084, 1.1122868032803173, -0.07171105806551635, -0.07637293667466007, -0.42149333240224324, 1.5869240198367818], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToLinearProphotoRgb0", "$get$xyzD65ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.4031904633774979, -0.22301514479051668, -0.1016066850741379, -0.5262384021633072, 1.4816319629234644, 0.01701879027252688, -0.0112022652862215, 0.01824640347962099, 0.9112472274915048], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToXyzD650", "$get$linearProphotoRgbToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.755590742296921, 0.11271984265940525, 0.0821453420953454, 0.2683218435785719, 0.7151152566617912, 0.01656289975963685, 0.0039159727624258, -0.01293344283684181, 1.0980752208342945], type$.JSArray_double))); + _lazyFinal($, "xyzD65ToXyzD500", "$get$xyzD65ToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.0479297925449966, 0.02294687060160952, -0.05019226628920519, 0.02962780877005567, 0.99043442675388, -0.01707379906341879, -0.00924304064620452, 0.01505519149029816, 0.751874281428137], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToXyzD650", "$get$xyzD50ToXyzD650", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.9554734214880752, -0.02309845494876452, 0.06325924320057065, -0.02836970933386358, 1.0099953980813041, 0.0210414411919173, 0.01231401486448199, -0.02050764929889898, 1.330365926242124], type$.JSArray_double))); + _lazyFinal($, "lmsToLinearProphotoRgb0", "$get$lmsToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.7383551481157207, -0.9879509427514458, 0.24959579463572504, -0.7070494015329266, 1.9343700444401382, -0.2273206429072115, -0.08407882206239634, -0.35754060521141334, 1.4416194272738097], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToLms0", "$get$linearProphotoRgbToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7154484605655534, 0.35279155007721186, -0.0682400106427653, 0.2744116490015671, 0.6677976498412367, 0.05779070115719616, 0.10978443261622942, 0.18619829115002018, 0.7040172762337504], type$.JSArray_double))); + _lazyFinal($, "lmsToXyzD500", "$get$lmsToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.288586218172706, -0.5378717444973745, 0.2135812027542364, -0.00253387643187372, 1.0923167988719165, -0.08978292244004273, -0.06937382305734124, -0.29500839894431263, 1.1894868245121142], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLms0", "$get$xyzD50ToLms0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7707000420431172, 0.34924840261939616, -0.11202351884164681, 0.00559649248368848, 0.9370723401136769, 0.06972568836252771, 0.04633714262191069, 0.25277531574310524, 0.851458076746796], type$.JSArray_double))); + _lazyFinal($, "linearProphotoRgbToXyzD500", "$get$linearProphotoRgbToXyzD500", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([0.7977666449006423, 0.13518129740053308, 0.0313477341283922, 0.2880748288194013, 0.711835234241873, 0.00008993693872564, 0, 0, 0.8251046025104602], type$.JSArray_double))); + _lazyFinal($, "xyzD50ToLinearProphotoRgb0", "$get$xyzD50ToLinearProphotoRgb0", () => A.NativeFloat64List_NativeFloat64List$fromList(A._setArrayType([1.3457868816471583, -0.25557208737979464, -0.05110186497554526, -0.5446307051249019, 1.5082477428451468, 0.02052744743642139, 0, 0, 1.2119675456389452], type$.JSArray_double))); + _lazyFinal($, "_disallowedFunctionNames0", "$get$_disallowedFunctionNames0", () => { + var t1 = $.$get$globalFunctions0(); + t1 = t1.map$1$1(t1, new A._disallowedFunctionNames_closure0(), type$.String).toSet$0(0); + t1.remove$1(0, "abs"); + t1.remove$1(0, "alpha"); + t1.remove$1(0, "color"); + t1.remove$1(0, "grayscale"); + t1.remove$1(0, "hsl"); + t1.remove$1(0, "hsla"); + t1.remove$1(0, "hwb"); + t1.remove$1(0, "invert"); + t1.remove$1(0, "lab"); + t1.remove$1(0, "lch"); + t1.remove$1(0, "max"); + t1.remove$1(0, "min"); + t1.remove$1(0, "oklab"); + t1.remove$1(0, "oklch"); + t1.remove$1(0, "opacity"); + t1.remove$1(0, "rgb"); + t1.remove$1(0, "rgba"); + t1.remove$1(0, "round"); + t1.remove$1(0, "saturate"); + return t1; + }); + _lazyFinal($, "deprecations", "$get$deprecations", () => { + var _i, deprecation, t2, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Deprecation1?")); + for (_i = 0; _i < 31; ++_i) { + deprecation = B.List_JA2[_i]; + if (deprecation !== B.Deprecation_Szt) { + t2 = deprecation.id; + t1.$indexSet(0, t2, {id: t2, status: new A.deprecations_closure(deprecation).call$0(), description: deprecation.description, deprecatedIn: deprecation.get$deprecatedIn(0), obsoleteIn: deprecation.get$obsoleteIn(0)}); + } + } + return t1; + }); + _lazyFinal($, "versionClass", "$get$versionClass", () => new A.versionClass_closure().call$0()); + _lazyFinal($, "exceptionClass", "$get$exceptionClass", () => new A.exceptionClass_closure().call$0()); + _lazyFinal($, "FilesystemImporter_cwd0", "$get$FilesystemImporter_cwd0", () => { + var _null = null; + return new A.FilesystemImporter0(A.absolute(".", _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), true); + }); + _lazyFinal($, "functionClass", "$get$functionClass", () => new A.functionClass_closure().call$0()); + _lazyFinal($, "globalFunctions0", "$get$globalFunctions0", () => { + var t1 = type$.BuiltInCallable_2, + t2 = A.List_List$of($.$get$global6(), true, t1); + B.JSArray_methods.addAll$1(t2, $.$get$global7()); + B.JSArray_methods.addAll$1(t2, $.$get$global8()); + B.JSArray_methods.addAll$1(t2, $.$get$global9()); + B.JSArray_methods.addAll$1(t2, $.$get$global10()); + B.JSArray_methods.addAll$1(t2, $.$get$global11()); + B.JSArray_methods.addAll$1(t2, $.$get$global12()); + t2.push(A.BuiltInCallable$function0("if", "$condition, $if-true, $if-false", new A.globalFunctions_closure0(), null)); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "coreModules0", "$get$coreModules0", () => A.UnmodifiableListView$(A._setArrayType([$.$get$module5(), $.$get$module6(), $.$get$module7(), $.$get$module8(), $.$get$module9(), $.$get$module10()], A.findType("JSArray>")), type$.BuiltInModule_Callable_2)); + _lazyFinal($, "LegacyIfExpression_declaration0", "$get$LegacyIfExpression_declaration0", () => A.ParameterList_ParameterList$parse0(string$.x40funct, null)); + _lazyFinal($, "global7", "$get$global7", () => { + var _s4_ = "list"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_length2().withDeprecationWarning$1(_s4_), $.$get$_nth0().withDeprecationWarning$1(_s4_), $.$get$_setNth0().withDeprecationWarning$1(_s4_), $.$get$_join0().withDeprecationWarning$1(_s4_), $.$get$_append2().withDeprecationWarning$1(_s4_), $.$get$_zip0().withDeprecationWarning$1(_s4_), $.$get$_index2().withDeprecationWarning$1(_s4_), $.$get$_isBracketed0().withDeprecationWarning$1(_s4_), $.$get$_separator0().withDeprecationWarning$1(_s4_).withName$1("list-separator")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module6", "$get$module6", () => A.BuiltInModule$0("list", A._setArrayType([$.$get$_length2(), $.$get$_nth0(), $.$get$_setNth0(), $.$get$_join0(), $.$get$_append2(), $.$get$_zip0(), $.$get$_index2(), $.$get$_isBracketed0(), $.$get$_separator0(), $.$get$_slash0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); + _lazyFinal($, "_length1", "$get$_length2", () => A._function11("length", "$list", new A._length_closure2())); + _lazyFinal($, "_nth0", "$get$_nth0", () => A._function11("nth", "$list, $n", new A._nth_closure0())); + _lazyFinal($, "_setNth0", "$get$_setNth0", () => A._function11("set-nth", "$list, $n, $value", new A._setNth_closure0())); + _lazyFinal($, "_join0", "$get$_join0", () => A._function11("join", string$.x24list1, new A._join_closure0())); + _lazyFinal($, "_append1", "$get$_append2", () => A._function11("append", "$list, $val, $separator: auto", new A._append_closure2())); + _lazyFinal($, "_zip0", "$get$_zip0", () => A._function11("zip", "$lists...", new A._zip_closure0())); + _lazyFinal($, "_index1", "$get$_index2", () => A._function11("index", "$list, $value", new A._index_closure2())); + _lazyFinal($, "_separator0", "$get$_separator0", () => A._function11("separator", "$list", new A._separator_closure0())); + _lazyFinal($, "_isBracketed0", "$get$_isBracketed0", () => A._function11("is-bracketed", "$list", new A._isBracketed_closure0())); + _lazyFinal($, "_slash0", "$get$_slash0", () => A._function11("slash", "$elements...", new A._slash_closure0())); + _lazyFinal($, "listClass", "$get$listClass", () => new A.listClass_closure().call$0()); + _lazyFinal($, "legacyListClass", "$get$legacyListClass", () => { + var t1 = A.createJSClass("sass.types.List", new A.legacyListClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyListClass_closure0(), "setValue", new A.legacyListClass_closure1(), "getSeparator", new A.legacyListClass_closure2(), "setSeparator", new A.legacyListClass_closure3(), "getLength", new A.legacyListClass_closure4()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "global8", "$get$global8", () => { + var _s3_ = "map"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_get0().withDeprecationWarning$1(_s3_).withName$1("map-get"), $.$get$_merge0().withDeprecationWarning$1(_s3_).withName$1("map-merge"), $.$get$_remove0().withDeprecationWarning$1(_s3_).withName$1("map-remove"), $.$get$_keys0().withDeprecationWarning$1(_s3_).withName$1("map-keys"), $.$get$_values0().withDeprecationWarning$1(_s3_).withName$1("map-values"), $.$get$_hasKey0().withDeprecationWarning$1(_s3_).withName$1("map-has-key")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module7", "$get$module7", () => A.BuiltInModule$0("map", A._setArrayType([$.$get$_get0(), $.$get$_set0(), $.$get$_merge0(), $.$get$_remove0(), $.$get$_keys0(), $.$get$_values0(), $.$get$_hasKey0(), $.$get$_deepMerge0(), $.$get$_deepRemove0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); + _lazyFinal($, "_get0", "$get$_get0", () => A._function10("get", "$map, $key, $keys...", new A._get_closure0())); + _lazyFinal($, "_set0", "$get$_set0", () => A.BuiltInCallable$overloadedFunction0("set", A.LinkedHashMap_LinkedHashMap$_literal(["$map, $key, $value", new A._set_closure1(), "$map, $args...", new A._set_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_merge0", "$get$_merge0", () => A.BuiltInCallable$overloadedFunction0("merge", A.LinkedHashMap_LinkedHashMap$_literal(["$map1, $map2", new A._merge_closure1(), "$map1, $args...", new A._merge_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_deepMerge0", "$get$_deepMerge0", () => A._function10("deep-merge", "$map1, $map2", new A._deepMerge_closure0())); + _lazyFinal($, "_deepRemove0", "$get$_deepRemove0", () => A._function10("deep-remove", "$map, $key, $keys...", new A._deepRemove_closure0())); + _lazyFinal($, "_remove0", "$get$_remove0", () => A.BuiltInCallable$overloadedFunction0("remove", A.LinkedHashMap_LinkedHashMap$_literal(["$map", new A._remove_closure1(), "$map, $key, $keys...", new A._remove_closure2()], type$.String, type$.Value_Function_List_Value_2))); + _lazyFinal($, "_keys0", "$get$_keys0", () => A._function10("keys", "$map", new A._keys_closure0())); + _lazyFinal($, "_values0", "$get$_values0", () => A._function10("values", "$map", new A._values_closure0())); + _lazyFinal($, "_hasKey0", "$get$_hasKey0", () => A._function10("has-key", "$map, $key, $keys...", new A._hasKey_closure0())); + _lazyFinal($, "mapClass", "$get$mapClass", () => new A.mapClass_closure().call$0()); + _lazyFinal($, "legacyMapClass", "$get$legacyMapClass", () => { + var t1 = A.createJSClass("sass.types.Map", new A.legacyMapClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getKey", new A.legacyMapClass_closure0(), "getValue", new A.legacyMapClass_closure1(), "getLength", new A.legacyMapClass_closure2(), "setKey", new A.legacyMapClass_closure3(), "setValue", new A.legacyMapClass_closure4()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "global9", "$get$global9", () => { + var _s4_ = "math"; + return A.UnmodifiableListView$(A._setArrayType([A._function9("abs", "$number", new A.global_closure43()), $.$get$_ceil0().withDeprecationWarning$1(_s4_), $.$get$_floor0().withDeprecationWarning$1(_s4_), $.$get$_max0().withDeprecationWarning$1(_s4_), $.$get$_min0().withDeprecationWarning$1(_s4_), $.$get$_percentage0().withDeprecationWarning$1(_s4_), $.$get$_randomFunction0().withDeprecationWarning$1(_s4_), $.$get$_round0().withDeprecationWarning$1(_s4_), $.$get$_unit0().withDeprecationWarning$1(_s4_), $.$get$_compatible0().withDeprecationWarning$1(_s4_).withName$1("comparable"), $.$get$_isUnitless0().withDeprecationWarning$1(_s4_).withName$1("unitless")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module8", "$get$module8", () => { + var _null = null; + return A.BuiltInModule$0("math", A._setArrayType([A._numberFunction0("abs", new A.module_closure26()), $.$get$_acos0(), $.$get$_asin0(), $.$get$_atan0(), $.$get$_atan20(), $.$get$_ceil0(), $.$get$_clamp0(), $.$get$_cos0(), $.$get$_compatible0(), $.$get$_floor0(), $.$get$_hypot0(), $.$get$_isUnitless0(), $.$get$_log0(), $.$get$_max0(), $.$get$_min0(), $.$get$_percentage0(), $.$get$_pow0(), $.$get$_randomFunction0(), $.$get$_round0(), $.$get$_sin0(), $.$get$_sqrt0(), $.$get$_tan0(), $.$get$_unit0(), $.$get$_div0()], type$.JSArray_Callable_2), _null, A.LinkedHashMap_LinkedHashMap$_literal(["e", A.SassNumber_SassNumber0(2.718281828459045, _null), "pi", A.SassNumber_SassNumber0(3.141592653589793, _null), "epsilon", A.SassNumber_SassNumber0(2220446049250313e-31, _null), "max-safe-integer", A.SassNumber_SassNumber0(9007199254740991, _null), "min-safe-integer", A.SassNumber_SassNumber0(-9007199254740991, _null), "max-number", A.SassNumber_SassNumber0(17976931348623157e292, _null), "min-number", A.SassNumber_SassNumber0(5e-324, _null)], type$.String, type$.Value_2), type$.Callable_2); + }); + _lazyFinal($, "_ceil0", "$get$_ceil0", () => A._numberFunction0("ceil", new A._ceil_closure0())); + _lazyFinal($, "_clamp0", "$get$_clamp0", () => A._function9("clamp", "$min, $number, $max", new A._clamp_closure0())); + _lazyFinal($, "_floor0", "$get$_floor0", () => A._numberFunction0("floor", new A._floor_closure0())); + _lazyFinal($, "_max0", "$get$_max0", () => A._function9("max", "$numbers...", new A._max_closure0())); + _lazyFinal($, "_min0", "$get$_min0", () => A._function9("min", "$numbers...", new A._min_closure0())); + _lazyFinal($, "_round0", "$get$_round0", () => A._numberFunction0("round", new A._round_closure0())); + _lazyFinal($, "_hypot0", "$get$_hypot0", () => A._function9("hypot", "$numbers...", new A._hypot_closure0())); + _lazyFinal($, "_log0", "$get$_log0", () => A._function9("log", "$number, $base: null", new A._log_closure0())); + _lazyFinal($, "_pow0", "$get$_pow0", () => A._function9("pow", "$base, $exponent", new A._pow_closure0())); + _lazyFinal($, "_sqrt0", "$get$_sqrt0", () => A._singleArgumentMathFunc0("sqrt", A.number2__sqrt$closure())); + _lazyFinal($, "_acos0", "$get$_acos0", () => A._singleArgumentMathFunc0("acos", A.number2__acos$closure())); + _lazyFinal($, "_asin0", "$get$_asin0", () => A._singleArgumentMathFunc0("asin", A.number2__asin$closure())); + _lazyFinal($, "_atan0", "$get$_atan0", () => A._singleArgumentMathFunc0("atan", A.number2__atan$closure())); + _lazyFinal($, "_atan20", "$get$_atan20", () => A._function9("atan2", "$y, $x", new A._atan2_closure0())); + _lazyFinal($, "_cos0", "$get$_cos0", () => A._singleArgumentMathFunc0("cos", A.number2__cos$closure())); + _lazyFinal($, "_sin0", "$get$_sin0", () => A._singleArgumentMathFunc0("sin", A.number2__sin$closure())); + _lazyFinal($, "_tan0", "$get$_tan0", () => A._singleArgumentMathFunc0("tan", A.number2__tan$closure())); + _lazyFinal($, "_compatible0", "$get$_compatible0", () => A._function9("compatible", "$number1, $number2", new A._compatible_closure0())); + _lazyFinal($, "_isUnitless0", "$get$_isUnitless0", () => A._function9("is-unitless", "$number", new A._isUnitless_closure0())); + _lazyFinal($, "_unit0", "$get$_unit0", () => A._function9("unit", "$number", new A._unit_closure0())); + _lazyFinal($, "_percentage0", "$get$_percentage0", () => A._function9("percentage", "$number", new A._percentage_closure0())); + _lazyFinal($, "_random1", "$get$_random2", () => A.Random_Random()); + _lazyFinal($, "_randomFunction0", "$get$_randomFunction0", () => A._function9("random", "$limit: null", new A._randomFunction_closure0())); + _lazyFinal($, "_div0", "$get$_div0", () => A._function9("div", "$number1, $number2", new A._div_closure0())); + _lazyFinal($, "_shared0", "$get$_shared0", () => A.UnmodifiableListView$(A._setArrayType([A._function6("feature-exists", "$feature", new A._shared_closure3()), A._function6("inspect", "$value", new A._shared_closure4()), A._function6("type-of", "$value", new A._shared_closure5()), A._function6("keywords", "$args", new A._shared_closure6())], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2)); + _lazyFinal($, "global10", "$get$global12", () => { + var t2, + t1 = A._setArrayType([], type$.JSArray_BuiltInCallable_2); + for (t2 = $.$get$_shared0(), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t1.push(t2.get$current(0).withDeprecationWarning$1("meta")); + return A.UnmodifiableListView$(t1, type$.BuiltInCallable_2); + }); + _lazyFinal($, "moduleFunctions0", "$get$moduleFunctions0", () => { + var t1 = type$.BuiltInCallable_2, + t2 = A.List_List$of($.$get$_shared0(), true, t1); + t2.push(A._function6("calc-name", "$calc", new A.moduleFunctions_closure2())); + t2.push(A._function6("calc-args", "$calc", new A.moduleFunctions_closure3())); + t2.push(A._function6("accepts-content", "$mixin", new A.moduleFunctions_closure4())); + return A.UnmodifiableListView$(t2, t1); + }); + _lazyFinal($, "mixinClass", "$get$mixinClass", () => new A.mixinClass_closure().call$0()); + _lazyFinal($, "legacyNullClass", "$get$legacyNullClass", () => new A.legacyNullClass_closure().call$0()); + _lazyFinal($, "_epsilon0", "$get$_epsilon0", () => A.pow(10, -11)); + _lazyFinal($, "_inverseEpsilon0", "$get$_inverseEpsilon0", () => A.pow(10, 11)); + _lazyFinal($, "numberClass", "$get$numberClass", () => new A.numberClass_closure().call$0()); + _lazyFinal($, "legacyNumberClass", "$get$legacyNumberClass", () => { + var t1 = A.createJSClass("sass.types.Number", new A.legacyNumberClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyNumberClass_closure0(), "setValue", new A.legacyNumberClass_closure1(), "getUnit", new A.legacyNumberClass_closure2(), "setUnit", new A.legacyNumberClass_closure3()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "_typesByUnit0", "$get$_typesByUnit0", () => { + var t3, type, + t1 = type$.String, + t2 = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + for (t1 = A.MapExtensions_get_pairs0(B.Map_Sr65K, t1, type$.List_String), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + t3 = t1.get$current(t1); + type = t3._0; + for (t3 = J.get$iterator$ax(t3._1); t3.moveNext$0();) + t2.$indexSet(0, t3.get$current(t3), type); + } + return t2; + }); + _lazyFinal($, "_interpolation", "$get$_interpolation", () => A.Interpolation$0(B.List_empty12, B.List_empty13, $.$get$bogusSpan0())); + _lazyFinal($, "_expression", "$get$_expression", () => A.NullExpression$($.$get$bogusSpan0())); + _lazyFinal($, "global11", "$get$global10", () => { + var _s8_ = "selector"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_isSuperselector0().withDeprecationWarning$1(_s8_), $.$get$_simpleSelectors0().withDeprecationWarning$1(_s8_), $.$get$_parse0().withDeprecationWarning$1(_s8_).withName$1("selector-parse"), $.$get$_nest0().withDeprecationWarning$1(_s8_).withName$1("selector-nest"), $.$get$_append1().withDeprecationWarning$1(_s8_).withName$1("selector-append"), $.$get$_extend0().withDeprecationWarning$1(_s8_).withName$1("selector-extend"), $.$get$_replace0().withDeprecationWarning$1(_s8_).withName$1("selector-replace"), $.$get$_unify0().withDeprecationWarning$1(_s8_).withName$1("selector-unify")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module9", "$get$module9", () => A.BuiltInModule$0("selector", A._setArrayType([$.$get$_isSuperselector0(), $.$get$_simpleSelectors0(), $.$get$_parse0(), $.$get$_nest0(), $.$get$_append1(), $.$get$_extend0(), $.$get$_replace0(), $.$get$_unify0()], type$.JSArray_Callable_2), null, null, type$.Callable_2)); + _lazyFinal($, "_nest0", "$get$_nest0", () => A._function8("nest", "$selectors...", new A._nest_closure0())); + _lazyFinal($, "_append2", "$get$_append1", () => A._function8("append", "$selectors...", new A._append_closure1())); + _lazyFinal($, "_extend0", "$get$_extend0", () => A._function8("extend", "$selector, $extendee, $extender", new A._extend_closure0())); + _lazyFinal($, "_replace0", "$get$_replace0", () => A._function8("replace", "$selector, $original, $replacement", new A._replace_closure0())); + _lazyFinal($, "_unify0", "$get$_unify0", () => A._function8("unify", "$selector1, $selector2", new A._unify_closure0())); + _lazyFinal($, "_isSuperselector0", "$get$_isSuperselector0", () => A._function8("is-superselector", "$super, $sub", new A._isSuperselector_closure0())); + _lazyFinal($, "_simpleSelectors0", "$get$_simpleSelectors0", () => A._function8("simple-selectors", "$selector", new A._simpleSelectors_closure0())); + _lazyFinal($, "_parse1", "$get$_parse0", () => A._function8("parse", "$selector", new A._parse_closure0())); + _lazyFinal($, "_knownCompatibilitiesByUnit0", "$get$_knownCompatibilitiesByUnit0", () => { + var _i, set, t2, + t1 = A.LinkedHashMap_LinkedHashMap$_empty(type$.String, A.findType("Set")); + for (_i = 0; _i < 5; ++_i) { + set = B.List_BFg[_i]; + for (t2 = set.get$iterator(set); t2.moveNext$0();) + t1.$indexSet(0, t2.get$current(0), set); + } + return t1; + }); + _lazyFinal($, "bogusSpan0", "$get$bogusSpan0", () => A.SourceFile$decoded(A._setArrayType([], type$.JSArray_int), null).span$1(0, 0)); + _lazyFinal($, "_random2", "$get$_random1", () => A.Random_Random()); + _lazy($, "_previousUniqueId0", "$get$_previousUniqueId0", () => $.$get$_random1().nextInt$1(A._asInt(A.pow(36, 6)))); + _lazyFinal($, "global12", "$get$global11", () => { + var _s6_ = "string"; + return A.UnmodifiableListView$(A._setArrayType([$.$get$_unquote0().withDeprecationWarning$1(_s6_), $.$get$_quote0().withDeprecationWarning$1(_s6_), $.$get$_toUpperCase0().withDeprecationWarning$1(_s6_), $.$get$_toLowerCase0().withDeprecationWarning$1(_s6_), $.$get$_uniqueId0().withDeprecationWarning$1(_s6_), $.$get$_length1().withDeprecationWarning$1(_s6_).withName$1("str-length"), $.$get$_insert0().withDeprecationWarning$1(_s6_).withName$1("str-insert"), $.$get$_index1().withDeprecationWarning$1(_s6_).withName$1("str-index"), $.$get$_slice0().withDeprecationWarning$1(_s6_).withName$1("str-slice")], type$.JSArray_BuiltInCallable_2), type$.BuiltInCallable_2); + }); + _lazyFinal($, "module10", "$get$module10", () => A.BuiltInModule$0("string", A._setArrayType([$.$get$_unquote0(), $.$get$_quote0(), $.$get$_toUpperCase0(), $.$get$_toLowerCase0(), $.$get$_length1(), $.$get$_insert0(), $.$get$_index1(), $.$get$_slice0(), $.$get$_uniqueId0(), A._function7("split", "$string, $separator, $limit: null", new A.module_closure25())], type$.JSArray_Callable_2), null, null, type$.Callable_2)); + _lazyFinal($, "_unquote0", "$get$_unquote0", () => A._function7("unquote", "$string", new A._unquote_closure0())); + _lazyFinal($, "_quote0", "$get$_quote0", () => A._function7("quote", "$string", new A._quote_closure0())); + _lazyFinal($, "_length2", "$get$_length1", () => A._function7("length", "$string", new A._length_closure1())); + _lazyFinal($, "_insert0", "$get$_insert0", () => A._function7("insert", "$string, $insert, $index", new A._insert_closure0())); + _lazyFinal($, "_index2", "$get$_index1", () => A._function7("index", "$string, $substring", new A._index_closure1())); + _lazyFinal($, "_slice0", "$get$_slice0", () => A._function7("slice", "$string, $start-at, $end-at: -1", new A._slice_closure0())); + _lazyFinal($, "_toUpperCase0", "$get$_toUpperCase0", () => A._function7("to-upper-case", "$string", new A._toUpperCase_closure0())); + _lazyFinal($, "_toLowerCase0", "$get$_toLowerCase0", () => A._function7("to-lower-case", "$string", new A._toLowerCase_closure0())); + _lazyFinal($, "_uniqueId0", "$get$_uniqueId0", () => A._function7("unique-id", "", new A._uniqueId_closure0())); + _lazyFinal($, "stringClass", "$get$stringClass", () => new A.stringClass_closure().call$0()); + _lazyFinal($, "legacyStringClass", "$get$legacyStringClass", () => { + var t1 = A.createJSClass("sass.types.String", new A.legacyStringClass_closure()); + A.JSClassExtension_defineMethods(t1, A.LinkedHashMap_LinkedHashMap$_literal(["getValue", new A.legacyStringClass_closure0(), "setValue", new A.legacyStringClass_closure1()], type$.String, type$.Function)); + return t1; + }); + _lazyFinal($, "_emptyQuoted0", "$get$_emptyQuoted0", () => A.SassString$0("", true)); + _lazyFinal($, "_emptyUnquoted0", "$get$_emptyUnquoted0", () => A.SassString$0("", false)); + _lazyFinal($, "_urlSchemeRegExp", "$get$_urlSchemeRegExp", () => A.RegExp_RegExp("^[a-z0-9+.-]+$", false)); + _lazyFinal($, "_jsThrow0", "$get$_jsThrow", () => new self.Function("error", "throw error;")); + _lazyFinal($, "_isUndefined", "$get$_isUndefined", () => new self.Function("value", "return value === undefined;")); + _lazyFinal($, "_isNull", "$get$_isNull", () => new self.Function("value", "return value === null;")); + _lazyFinal($, "_noSourceUrl0", "$get$_noSourceUrl0", () => A.Uri_parse("-")); + _lazyFinal($, "_traces0", "$get$_traces0", () => A.Expando$()); + _lazyFinal($, "valueClass", "$get$valueClass", () => new A.valueClass_closure().call$0()); + })(); + (function nativeSupport() { + !function() { + var intern = function(s) { + var o = {}; + o[s] = 1; + return Object.keys(hunkHelpers.convertToFastObject(o))[0]; + }; + init.getIsolateTag = function(name) { + return intern("___dart_" + name + init.isolateTag); + }; + var tableProperty = "___dart_isolate_tags_"; + var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.create(null)); + var rootProperty = "_ZxYxX"; + for (var i = 0;; i++) { + var property = intern(rootProperty + "_" + i + "_"); + if (!(property in usedProperties)) { + usedProperties[property] = 1; + init.isolateTag = property; + break; + } + } + init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); + }(); + hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: A.NativeByteBuffer, SharedArrayBuffer: A.NativeByteBuffer, ArrayBufferView: A.NativeTypedData, DataView: A.NativeByteData, Float32Array: A.NativeFloat32List, Float64Array: A.NativeFloat64List, Int16Array: A.NativeInt16List, Int32Array: A.NativeInt32List, Int8Array: A.NativeInt8List, Uint16Array: A.NativeUint16List, Uint32Array: A.NativeUint32List, Uint8ClampedArray: A.NativeUint8ClampedList, CanvasPixelArray: A.NativeUint8ClampedList, Uint8Array: A.NativeUint8List}); + hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, SharedArrayBuffer: true, ArrayBufferView: false, DataView: true, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false}); + A.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView"; + A.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView"; + })(); + Function.prototype.call$0 = function() { + return this(); + }; + Function.prototype.call$1 = function(a) { + return this(a); + }; + Function.prototype.call$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$3$1 = function(a) { + return this(a); + }; + Function.prototype.call$2$1 = function(a) { + return this(a); + }; + Function.prototype.call$1$1 = function(a) { + return this(a); + }; + Function.prototype.call$3 = function(a, b, c) { + return this(a, b, c); + }; + Function.prototype.call$4 = function(a, b, c, d) { + return this(a, b, c, d); + }; + Function.prototype.call$3$3 = function(a, b, c) { + return this(a, b, c); + }; + Function.prototype.call$2$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$5 = function(a, b, c, d, e) { + return this(a, b, c, d, e); + }; + Function.prototype.call$6 = function(a, b, c, d, e, f) { + return this(a, b, c, d, e, f); + }; + Function.prototype.call$2$0 = function() { + return this(); + }; + Function.prototype.call$1$0 = function() { + return this(); + }; + Function.prototype.call$1$2 = function(a, b) { + return this(a, b); + }; + Function.prototype.call$2$3 = function(a, b, c) { + return this(a, b, c); + }; + convertAllToFastObject(holders); + convertToFastObject($); + (function(callback) { + if (typeof document === "undefined") { + callback(null); + return; + } + if (typeof document.currentScript != "undefined") { + callback(document.currentScript); + return; + } + var scripts = document.scripts; + function onLoad(event) { + for (var i = 0; i < scripts.length; ++i) { + scripts[i].removeEventListener("load", onLoad, false); + } + callback(event.target); + } + for (var i = 0; i < scripts.length; ++i) { + scripts[i].addEventListener("load", onLoad, false); + } + })(function(currentScript) { + init.currentScript = currentScript; + var callMain = A.main2; + if (typeof dartMainRunner === "function") { + dartMainRunner(callMain, []); + } else { + callMain([]); + } + }); +})(); +} diff --git a/tools/ui/node_modules/sass/sass.default.cjs b/tools/ui/node_modules/sass/sass.default.cjs new file mode 100644 index 0000000000000000000000000000000000000000..94d102ae9de1cf82e76a48acd198b38f00bb5696 --- /dev/null +++ b/tools/ui/node_modules/sass/sass.default.cjs @@ -0,0 +1,8 @@ +require('./sass.dart.js'); +const library = globalThis._cliPkgExports.pop(); +if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; +library.load({ + immutable: require("immutable"), +}); + +module.exports = library; diff --git a/tools/ui/node_modules/sass/sass.default.js b/tools/ui/node_modules/sass/sass.default.js new file mode 100644 index 0000000000000000000000000000000000000000..4a0540a612563544718df4965c8c66a99b5ed794 --- /dev/null +++ b/tools/ui/node_modules/sass/sass.default.js @@ -0,0 +1,48 @@ +import * as immutable from "immutable" +import "./sass.dart.js"; + +const _cliPkgLibrary = globalThis._cliPkgExports.pop(); +if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; +const _cliPkgExports = {}; +_cliPkgLibrary.load({immutable}, _cliPkgExports); + +export const compile = _cliPkgExports.compile; +export const compileAsync = _cliPkgExports.compileAsync; +export const compileString = _cliPkgExports.compileString; +export const compileStringAsync = _cliPkgExports.compileStringAsync; +export const initCompiler = _cliPkgExports.initCompiler; +export const initAsyncCompiler = _cliPkgExports.initAsyncCompiler; +export const Compiler = _cliPkgExports.Compiler; +export const AsyncCompiler = _cliPkgExports.AsyncCompiler; +export const Logger = _cliPkgExports.Logger; +export const SassArgumentList = _cliPkgExports.SassArgumentList; +export const SassBoolean = _cliPkgExports.SassBoolean; +export const SassCalculation = _cliPkgExports.SassCalculation; +export const CalculationOperation = _cliPkgExports.CalculationOperation; +export const CalculationInterpolation = _cliPkgExports.CalculationInterpolation; +export const SassColor = _cliPkgExports.SassColor; +export const SassFunction = _cliPkgExports.SassFunction; +export const SassList = _cliPkgExports.SassList; +export const SassMap = _cliPkgExports.SassMap; +export const SassMixin = _cliPkgExports.SassMixin; +export const SassNumber = _cliPkgExports.SassNumber; +export const SassString = _cliPkgExports.SassString; +export const Value = _cliPkgExports.Value; +export const CustomFunction = _cliPkgExports.CustomFunction; +export const ListSeparator = _cliPkgExports.ListSeparator; +export const sassFalse = _cliPkgExports.sassFalse; +export const sassNull = _cliPkgExports.sassNull; +export const sassTrue = _cliPkgExports.sassTrue; +export const Exception = _cliPkgExports.Exception; +export const PromiseOr = _cliPkgExports.PromiseOr; +export const info = _cliPkgExports.info; +export const render = _cliPkgExports.render; +export const renderSync = _cliPkgExports.renderSync; +export const TRUE = _cliPkgExports.TRUE; +export const FALSE = _cliPkgExports.FALSE; +export const NULL = _cliPkgExports.NULL; +export const types = _cliPkgExports.types; +export const NodePackageImporter = _cliPkgExports.NodePackageImporter; +export const deprecations = _cliPkgExports.deprecations; +export const Version = _cliPkgExports.Version; +export const parser_ = _cliPkgExports.parser_; diff --git a/tools/ui/node_modules/sass/sass.js b/tools/ui/node_modules/sass/sass.js new file mode 100644 index 0000000000000000000000000000000000000000..df287fc4709baf2e5d7e182f74147acbf9f45d98 --- /dev/null +++ b/tools/ui/node_modules/sass/sass.js @@ -0,0 +1,18 @@ +#!/usr/bin/env node + +require('./sass.dart.js'); +var library = globalThis._cliPkgExports.pop(); +if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; + +library.load({ + readline: require("readline"), + chokidar: require("chokidar"), + parcel_watcher: (function(i){let r;return function parcel_watcher(){if(void 0!==r)return r;try{r=require(i)}catch(e){if('MODULE_NOT_FOUND'!==e.code)console.error(e);r=null}return r}})("@parcel/watcher"), + util: require("util"), + stream: require("stream"), + nodeModule: require("module"), + fs: require("fs"), + immutable: require("immutable"), +}); + +library.cli_pkg_main_0_(process.argv.slice(2)); diff --git a/tools/ui/node_modules/sass/sass.node.js b/tools/ui/node_modules/sass/sass.node.js new file mode 100644 index 0000000000000000000000000000000000000000..204ae2c410e48db65ac4a02b1aed89da1da4dd36 --- /dev/null +++ b/tools/ui/node_modules/sass/sass.node.js @@ -0,0 +1,12 @@ +require('./sass.dart.js'); +const library = globalThis._cliPkgExports.pop(); +if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; +library.load({ + util: require("util"), + stream: require("stream"), + nodeModule: require("module"), + fs: require("fs"), + immutable: require("immutable"), +}); + +module.exports = library; diff --git a/tools/ui/node_modules/sass/sass.node.mjs b/tools/ui/node_modules/sass/sass.node.mjs new file mode 100644 index 0000000000000000000000000000000000000000..dfeadc4bcfa64cd1a00fab046fb00e88637f5629 --- /dev/null +++ b/tools/ui/node_modules/sass/sass.node.mjs @@ -0,0 +1,214 @@ +import cjs from "./sass.node.js"; + +export const compile = cjs.compile; +export const compileAsync = cjs.compileAsync; +export const compileString = cjs.compileString; +export const compileStringAsync = cjs.compileStringAsync; +export const initCompiler = cjs.initCompiler; +export const initAsyncCompiler = cjs.initAsyncCompiler; +export const Compiler = cjs.Compiler; +export const AsyncCompiler = cjs.AsyncCompiler; +export const Logger = cjs.Logger; +export const SassArgumentList = cjs.SassArgumentList; +export const SassBoolean = cjs.SassBoolean; +export const SassCalculation = cjs.SassCalculation; +export const CalculationOperation = cjs.CalculationOperation; +export const CalculationInterpolation = cjs.CalculationInterpolation; +export const SassColor = cjs.SassColor; +export const SassFunction = cjs.SassFunction; +export const SassList = cjs.SassList; +export const SassMap = cjs.SassMap; +export const SassMixin = cjs.SassMixin; +export const SassNumber = cjs.SassNumber; +export const SassString = cjs.SassString; +export const Value = cjs.Value; +export const CustomFunction = cjs.CustomFunction; +export const ListSeparator = cjs.ListSeparator; +export const sassFalse = cjs.sassFalse; +export const sassNull = cjs.sassNull; +export const sassTrue = cjs.sassTrue; +export const Exception = cjs.Exception; +export const PromiseOr = cjs.PromiseOr; +export const info = cjs.info; +export const render = cjs.render; +export const renderSync = cjs.renderSync; +export const TRUE = cjs.TRUE; +export const FALSE = cjs.FALSE; +export const NULL = cjs.NULL; +export const types = cjs.types; +export const NodePackageImporter = cjs.NodePackageImporter; +export const deprecations = cjs.deprecations; +export const Version = cjs.Version; +export const parser_ = cjs.parser_; + +let printedDefaultExportDeprecation = false; +function defaultExportDeprecation() { + if (printedDefaultExportDeprecation) return; + printedDefaultExportDeprecation = true; + console.error( + "`import sass from 'sass'` is deprecated.\n" + + "Please use `import * as sass from 'sass'` instead."); +} + +export default { + get compile() { + defaultExportDeprecation(); + return cjs.compile; + }, + get compileAsync() { + defaultExportDeprecation(); + return cjs.compileAsync; + }, + get compileString() { + defaultExportDeprecation(); + return cjs.compileString; + }, + get compileStringAsync() { + defaultExportDeprecation(); + return cjs.compileStringAsync; + }, + get initCompiler() { + defaultExportDeprecation(); + return cjs.initCompiler; + }, + get initAsyncCompiler() { + defaultExportDeprecation(); + return cjs.initAsyncCompiler; + }, + get Compiler() { + defaultExportDeprecation(); + return cjs.Compiler; + }, + get AsyncCompiler() { + defaultExportDeprecation(); + return cjs.AsyncCompiler; + }, + get Logger() { + defaultExportDeprecation(); + return cjs.Logger; + }, + get SassArgumentList() { + defaultExportDeprecation(); + return cjs.SassArgumentList; + }, + get SassBoolean() { + defaultExportDeprecation(); + return cjs.SassBoolean; + }, + get SassCalculation() { + defaultExportDeprecation(); + return cjs.SassCalculation; + }, + get CalculationOperation() { + defaultExportDeprecation(); + return cjs.CalculationOperation; + }, + get CalculationInterpolation() { + defaultExportDeprecation(); + return cjs.CalculationInterpolation; + }, + get SassColor() { + defaultExportDeprecation(); + return cjs.SassColor; + }, + get SassFunction() { + defaultExportDeprecation(); + return cjs.SassFunction; + }, + get SassList() { + defaultExportDeprecation(); + return cjs.SassList; + }, + get SassMap() { + defaultExportDeprecation(); + return cjs.SassMap; + }, + get SassMixin() { + defaultExportDeprecation(); + return cjs.SassMixin; + }, + get SassNumber() { + defaultExportDeprecation(); + return cjs.SassNumber; + }, + get SassString() { + defaultExportDeprecation(); + return cjs.SassString; + }, + get Value() { + defaultExportDeprecation(); + return cjs.Value; + }, + get CustomFunction() { + defaultExportDeprecation(); + return cjs.CustomFunction; + }, + get ListSeparator() { + defaultExportDeprecation(); + return cjs.ListSeparator; + }, + get sassFalse() { + defaultExportDeprecation(); + return cjs.sassFalse; + }, + get sassNull() { + defaultExportDeprecation(); + return cjs.sassNull; + }, + get sassTrue() { + defaultExportDeprecation(); + return cjs.sassTrue; + }, + get Exception() { + defaultExportDeprecation(); + return cjs.Exception; + }, + get PromiseOr() { + defaultExportDeprecation(); + return cjs.PromiseOr; + }, + get info() { + defaultExportDeprecation(); + return cjs.info; + }, + get render() { + defaultExportDeprecation(); + return cjs.render; + }, + get renderSync() { + defaultExportDeprecation(); + return cjs.renderSync; + }, + get TRUE() { + defaultExportDeprecation(); + return cjs.TRUE; + }, + get FALSE() { + defaultExportDeprecation(); + return cjs.FALSE; + }, + get NULL() { + defaultExportDeprecation(); + return cjs.NULL; + }, + get types() { + defaultExportDeprecation(); + return cjs.types; + }, + get NodePackageImporter() { + defaultExportDeprecation(); + return cjs.NodePackageImporter; + }, + get deprecations() { + defaultExportDeprecation(); + return cjs.deprecations; + }, + get Version() { + defaultExportDeprecation(); + return cjs.Version; + }, + get parser_() { + defaultExportDeprecation(); + return cjs.parser_; + }, +}; diff --git a/tools/ui/node_modules/sass/types/compile.d.ts b/tools/ui/node_modules/sass/types/compile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..872754c22f1c623e508d6556d4da455c3ea773d5 --- /dev/null +++ b/tools/ui/node_modules/sass/types/compile.d.ts @@ -0,0 +1,342 @@ +import {RawSourceMap} from 'source-map-js'; + +import {Options, StringOptions} from './options'; + +/** + * The result of compiling Sass to CSS. Returned by {@link compile}, {@link + * compileAsync}, {@link compileString}, and {@link compileStringAsync}. + * + * @category Compile + */ +export interface CompileResult { + /** + * The generated CSS. + * + * Note that this *never* includes a `sourceMapUrl` comment—it's up to the + * caller to determine where to save the source map and how to link to it from + * the stylesheet. + */ + css: string; + + /** + * The canonical URLs of all the stylesheets that were loaded during the + * Sass compilation. The order of these URLs is not guaranteed. + */ + loadedUrls: URL[]; + + /** + * The object representation of the source map that maps locations in the + * generated CSS back to locations in the Sass source code. + * + * This typically uses absolute `file:` URLs to refer to Sass files, although + * this can be controlled by having a custom {@link Importer} return {@link + * ImporterResult.sourceMapUrl}. + * + * This is set if and only if {@link Options.sourceMap} is `true`. + */ + sourceMap?: RawSourceMap; +} + +/** + * The result of creating a synchronous compiler. Returned by + * {@link initCompiler}. + * + * @category Compile + */ +export class Compiler { + /** + * Throws an error if constructed directly, instead of via + * {@link initCompiler}. + */ + private constructor(); + + /** + * The {@link compile} method exposed through a Compiler instance while it is + * active. If this is called after {@link dispose} on the Compiler + * instance, an error will be thrown. + * + * During the Compiler instance's lifespan, given the same input, this will + * return an identical result to the {@link compile} method exposed at the + * module root. + */ + compile(path: string, options?: Options<'sync'>): CompileResult; + + /** + * The {@link compileString} method exposed through a Compiler instance while + * it is active. If this is called after {@link dispose} on the Compiler + * instance, an error will be thrown. + * + * During the Compiler instance's lifespan, given the same input, this will + * return an identical result to the {@link compileString} method exposed at + * the module root. + */ + compileString(source: string, options?: StringOptions<'sync'>): CompileResult; + + /** + * Ends the lifespan of this Compiler instance. After this is invoked, all + * calls to the Compiler instance's {@link compile} or {@link compileString} + * methods will result in an error. + */ + dispose(): void; +} + +/** + * The result of creating an asynchronous compiler. Returned by + * {@link initAsyncCompiler}. + * + * @category Compile + */ +export class AsyncCompiler { + /** + * Throws an error if constructed directly, instead of via + * {@link initAsyncCompiler}. + */ + private constructor(); + + /** + * The {@link compileAsync} method exposed through an Async Compiler instance + * while it is active. If this is called after {@link dispose} on the Async + * Compiler instance, an error will be thrown. + * + * During the Async Compiler instance's lifespan, given the same input, this + * will return an identical result to the {@link compileAsync} method exposed + * at the module root. + */ + compileAsync( + path: string, + options?: Options<'async'> + ): Promise; + + /** + * The {@link compileStringAsync} method exposed through an Async Compiler + * instance while it is active. If this is called after {@link dispose} on the + * Async Compiler instance, an error will be thrown. + * + * During the Async Compiler instance's lifespan, given the same input, this + * will return an identical result to the {@link compileStringAsync} method + * exposed at the module root. + */ + compileStringAsync( + source: string, + options?: StringOptions<'async'> + ): Promise; + + /** + * Ends the lifespan of this Async Compiler instance. After this is invoked, + * all subsequent calls to the Compiler instance's `compileAsync` or + * `compileStringAsync` methods will result in an error. + * + * Any compilations that are submitted before `dispose` will not be cancelled, + * and will be allowed to settle. + * + * After all compilations have been settled and Sass completes any internal + * task cleanup, `dispose` will resolve its promise. + */ + dispose(): Promise; +} + +/** + * Synchronously compiles the Sass file at `path` to CSS. If it succeeds it + * returns a {@link CompileResult}, and if it fails it throws an {@link + * Exception}. + * + * This only allows synchronous {@link Importer}s and {@link CustomFunction}s. + * + * **Heads up!** When using the [sass-embedded] npm package for single + * compilations, **{@link compileAsync} is almost always faster than + * {@link compile}**, due to the overhead of emulating synchronous messaging + * with worker threads and concurrent compilations being blocked on main thread. + * + * If you are running multiple compilations with the [sass-embedded] npm + * package, using a {@link Compiler} will provide some speed improvements over + * the module-level methods, and an {@link AsyncCompiler} will be much faster. + * + * [sass-embedded]: https://www.npmjs.com/package/sass-embedded + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.compile("style.scss"); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compile(path: string, options?: Options<'sync'>): CompileResult; + +/** + * Asynchronously compiles the Sass file at `path` to CSS. Returns a promise + * that resolves with a {@link CompileResult} if it succeeds and rejects with an + * {@link Exception} if it fails. + * + * This only allows synchronous or asynchronous {@link Importer}s and + * {@link CustomFunction}s. + * + * **Heads up!** When using the `sass` npm package, **{@link compile} is almost + * twice as fast as {@link compileAsync}**, due to the overhead of making the + * entire evaluation process asynchronous. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = await sass.compileAsync("style.scss"); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileAsync( + path: string, + options?: Options<'async'> +): Promise; + +/** + * Synchronously compiles a stylesheet whose contents is `source` to CSS. If it + * succeeds it returns a {@link CompileResult}, and if it fails it throws an + * {@link Exception}. + * + * This only allows synchronous {@link Importer}s and {@link CustomFunction}s. + * + * **Heads up!** When using the [sass-embedded] npm package for single + * compilations, **{@link compileStringAsync} is almost always faster than + * {@link compileString}**, due to the overhead of emulating synchronous + * messaging with worker threads and concurrent compilations being blocked on + * main thread. + * + * If you are running multiple compilations with the [sass-embedded] npm + * package, using a {@link Compiler} will provide some speed improvements over + * the module-level methods, and an {@link AsyncCompiler} will be much faster. + * + * [sass-embedded]: https://www.npmjs.com/package/sass-embedded + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.compileString(` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileString( + source: string, + options?: StringOptions<'sync'> +): CompileResult; + +/** + * Asynchronously compiles a stylesheet whose contents is `source` to CSS. + * Returns a promise that resolves with a {@link CompileResult} if it succeeds + * and rejects with an {@link Exception} if it fails. + * + * This only allows synchronous or asynchronous {@link Importer}s and {@link + * CustomFunction}s. + * + * **Heads up!** When using the `sass` npm package, **{@link compileString} is + * almost twice as fast as {@link compileStringAsync}**, due to the overhead + * of making the entire evaluation process asynchronous. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = await sass.compileStringAsync(` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`); + * console.log(result.css); + * ``` + * + * @category Compile + * @compatibility dart: "1.45.0", node: false + */ +export function compileStringAsync( + source: string, + options?: StringOptions<'async'> +): Promise; + +/** + * Creates a synchronous {@link Compiler}. Each compiler instance exposes the + * {@link compile} and {@link compileString} methods within the lifespan of the + * Compiler. Given identical input, these methods will return results identical + * to their counterparts exposed at the module root. To use asynchronous + * compilation, use {@link initAsyncCompiler}. + * + * When calling the compile functions multiple times, using a compiler instance + * with the [sass-embedded] npm package is much faster than using the top-level + * compilation methods or the [sass] npm package. + * + * [sass-embedded]: https://www.npmjs.com/package/sass-embedded + * + * [sass]: https://www.npmjs.com/package/sass + * + * @example + * + * ```js + * const sass = require('sass'); + * function setup() { + * const compiler = sass.initCompiler(); + * const result1 = compiler.compileString('a {b: c}').css; + * const result2 = compiler.compileString('a {b: c}').css; + * compiler.dispose(); + * + * // throws error + * const result3 = sass.compileString('a {b: c}').css; + * } + * ``` + * @category Compile + * @compatibility dart: "1.70.0", node: false + */ +export function initCompiler(): Compiler; + +/** + * Creates an asynchronous {@link AsyncCompiler}. Each compiler + * instance exposes the {@link compileAsync} and {@link compileStringAsync} + * methods within the lifespan of the Compiler. Given identical input, these + * methods will return results identical to their counterparts exposed at the + * module root. To use synchronous compilation, use {@link initCompiler}; + * + * When calling the compile functions multiple times, using a compiler instance + * with the [sass-embedded] npm package is much faster than using the top-level + * compilation methods or the [sass] npm package. + * + * [sass-embedded]: https://www.npmjs.com/package/sass-embedded + * + * [sass]: https://www.npmjs.com/package/sass + * + * @example + * + * ```js + * const sass = require('sass'); + * async function setup() { + * const compiler = await sass.initAsyncCompiler(); + * const result1 = await compiler.compileStringAsync('a {b: c}').css; + * const result2 = await compiler.compileStringAsync('a {b: c}').css; + * await compiler.dispose(); + * + * // throws error + * const result3 = await sass.compileStringAsync('a {b: c}').css; + * } + * ``` + * @category Compile + * @compatibility dart: "1.70.0", node: false + */ +export function initAsyncCompiler(): Promise; diff --git a/tools/ui/node_modules/sass/types/deprecations.d.ts b/tools/ui/node_modules/sass/types/deprecations.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2c73377248470a54d0c61b4cfe52583ab8e77d0a --- /dev/null +++ b/tools/ui/node_modules/sass/types/deprecations.d.ts @@ -0,0 +1,312 @@ +/** + * All of the deprecation types currently used by Sass. + * + * Any of these IDs or the deprecation objects they point to can be passed to + * `fatalDeprecations`, `futureDeprecations`, or `silenceDeprecations`. + */ +export interface Deprecations { + // START AUTOGENERATED LIST + // Checksum: 1e05e728d95255e2e9fadbe9696baf751fc7ef66 + + /** + * Deprecation for passing a string directly to meta.call(). + * + * This deprecation was active in the first version of Dart Sass. + */ + 'call-string': Deprecation<'call-string'>; + + /** + * Deprecation for @elseif. + * + * This deprecation became active in Dart Sass 1.3.2. + */ + elseif: Deprecation<'elseif'>; + + /** + * Deprecation for @-moz-document. + * + * This deprecation became active in Dart Sass 1.7.2. + */ + 'moz-document': Deprecation<'moz-document'>; + + /** + * Deprecation for imports using relative canonical URLs. + * + * This deprecation became active in Dart Sass 1.14.2. + */ + 'relative-canonical': Deprecation<'relative-canonical'>; + + /** + * Deprecation for declaring new variables with !global. + * + * This deprecation became active in Dart Sass 1.17.2. + */ + 'new-global': Deprecation<'new-global'>; + + /** + * Deprecation for using color module functions in place of plain CSS functions. + * + * This deprecation became active in Dart Sass 1.23.0. + */ + 'color-module-compat': Deprecation<'color-module-compat'>; + + /** + * Deprecation for / operator for division. + * + * This deprecation became active in Dart Sass 1.33.0. + */ + 'slash-div': Deprecation<'slash-div'>; + + /** + * Deprecation for leading, trailing, and repeated combinators. + * + * This deprecation became active in Dart Sass 1.54.0. + */ + 'bogus-combinators': Deprecation<'bogus-combinators'>; + + /** + * Deprecation for ambiguous + and - operators. + * + * This deprecation became active in Dart Sass 1.55.0. + */ + 'strict-unary': Deprecation<'strict-unary'>; + + /** + * Deprecation for passing invalid units to built-in functions. + * + * This deprecation became active in Dart Sass 1.56.0. + */ + 'function-units': Deprecation<'function-units'>; + + /** + * Deprecation for using !default or !global multiple times for one variable. + * + * This deprecation became active in Dart Sass 1.62.0. + */ + 'duplicate-var-flags': Deprecation<'duplicate-var-flags'>; + + /** + * Deprecation for passing null as alpha in the JS API. + * + * This deprecation became active in Dart Sass 1.62.3. + */ + 'null-alpha': Deprecation<'null-alpha'>; + + /** + * Deprecation for passing percentages to the Sass abs() function. + * + * This deprecation became active in Dart Sass 1.65.0. + */ + 'abs-percent': Deprecation<'abs-percent'>; + + /** + * Deprecation for using the current working directory as an implicit load path. + * + * This deprecation became active in Dart Sass 1.73.0. + */ + 'fs-importer-cwd': Deprecation<'fs-importer-cwd'>; + + /** + * Deprecation for function and mixin names beginning with --. + * + * This deprecation became active in Dart Sass 1.76.0. + * It became obsolete in Dart Sass 1.94.0. + */ + 'css-function-mixin': Deprecation<'css-function-mixin'>; + + /** + * Deprecation for declarations after or between nested rules. + * + * This deprecation became active in Dart Sass 1.77.7. + * It became obsolete in Dart Sass 1.92.0. + */ + 'mixed-decls': Deprecation<'mixed-decls'>; + + /** + * Deprecation for meta.feature-exists + * + * This deprecation became active in Dart Sass 1.78.0. + */ + 'feature-exists': Deprecation<'feature-exists'>; + + /** + * Deprecation for certain uses of built-in sass:color functions. + * + * This deprecation became active in Dart Sass 1.79.0. + */ + 'color-4-api': Deprecation<'color-4-api'>; + + /** + * Deprecation for using global color functions instead of sass:color. + * + * This deprecation became active in Dart Sass 1.79.0. + */ + 'color-functions': Deprecation<'color-functions'>; + + /** + * Deprecation for legacy JS API. + * + * This deprecation became active in Dart Sass 1.79.0. + */ + 'legacy-js-api': Deprecation<'legacy-js-api'>; + + /** + * Deprecation for @import rules. + * + * This deprecation became active in Dart Sass 1.80.0. + */ + import: Deprecation<'import'>; + + /** + * Deprecation for global built-in functions that are available in sass: modules. + * + * This deprecation became active in Dart Sass 1.80.0. + */ + 'global-builtin': Deprecation<'global-builtin'>; + + /** + * Deprecation for functions named "type". + * + * This deprecation became active in Dart Sass 1.86.0. + * It became obsolete in Dart Sass 1.92.0. + */ + 'type-function': Deprecation<'type-function'>; + + /** + * Deprecation for passing a relative url to compileString(). + * + * This deprecation became active in Dart Sass 1.88.0. + */ + 'compile-string-relative-url': Deprecation<'compile-string-relative-url'>; + + /** + * Deprecation for a rest parameter before a positional or named parameter. + * + * This deprecation became active in Dart Sass 1.91.0. + */ + 'misplaced-rest': Deprecation<'misplaced-rest'>; + + /** + * Deprecation for configuring private variables in @use, @forward, or load-css(). + * + * This deprecation became active in Dart Sass 1.92.0. + */ + 'with-private': Deprecation<'with-private'>; + + /** + * Deprecation for the Sass if($condition, $if-true, $if-false) function. + * + * This deprecation became active in Dart Sass 1.95.0. + */ + 'if-function': Deprecation<'if-function'>; + + /** + * Deprecation for uppercase reserved function names. + * + * This deprecation became active in Dart Sass 1.98.0. + */ + 'function-name': Deprecation<'function-name'>; + + /** + * Deprecation for adjacent compound selectors like `[class]a`. + * + * This deprecation became active in Dart Sass 1.100.0. + */ + 'adjacent-compounds': Deprecation<'adjacent-compounds'>; + + // END AUTOGENERATED LIST + + /** + * Used for any user-emitted deprecation warnings. + */ + 'user-authored': Deprecation<'user-authored', 'user'>; +} + +/** + * Either a deprecation or its ID, either of which can be passed to any of + * the relevant compiler options. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export type DeprecationOrId = Deprecation | keyof Deprecations; + +/** + * The possible statuses that each deprecation can have. + * + * "active" deprecations are currently emitting deprecation warnings. + * "future" deprecations are not yet active, but will be in the future. + * "obsolete" deprecations were once active, but no longer are. + * + * The only "user" deprecation is "user-authored", which is used for deprecation + * warnings coming from user code. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export type DeprecationStatus = 'active' | 'user' | 'future' | 'obsolete'; + +/** + * A deprecated feature in the language. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export interface Deprecation< + id extends keyof Deprecations = keyof Deprecations, + status extends DeprecationStatus = DeprecationStatus +> { + /** The unique ID of this deprecation. */ + id: id; + + /** The current status of this deprecation. */ + status: status; + + /** A human-readable description of this deprecation. */ + description?: string; + + /** The version this deprecation first became active in. */ + deprecatedIn: status extends 'future' | 'user' ? null : Version; + + /** The version this deprecation became obsolete in. */ + obsoleteIn: status extends 'obsolete' ? Version : null; +} + +/** + * A semantic version of the compiler. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export class Version { + /** + * Constructs a new version. + * + * All components must be non-negative integers. + * + * @param major - The major version. + * @param minor - The minor version. + * @param patch - The patch version. + */ + constructor(major: number, minor: number, patch: number); + readonly major: number; + readonly minor: number; + readonly patch: number; + + /** + * Parses a version from a string. + * + * This throws an error if a valid version can't be parsed. + * + * @param version - A string in the form "major.minor.patch". + */ + static parse(version: string): Version; +} + +/** + * An object containing all deprecation types. + * + * @category Messages + * @compatibility dart: "1.74.0", node: false + */ +export const deprecations: Deprecations; diff --git a/tools/ui/node_modules/sass/types/exception.d.ts b/tools/ui/node_modules/sass/types/exception.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..616d652cba5210012848dded0f4dc1a7bbbc9520 --- /dev/null +++ b/tools/ui/node_modules/sass/types/exception.d.ts @@ -0,0 +1,41 @@ +import {SourceSpan} from './logger'; + +/** + * An exception thrown because a Sass compilation failed. + * + * @category Other + */ +export class Exception extends Error { + private constructor(); + + /** + * A human-friendly representation of the exception. + * + * Because many tools simply print `Error.message` directly, this includes not + * only the textual description of what went wrong (the {@link sassMessage}) + * but also an indication of where in the Sass stylesheet the error occurred + * (the {@link span}) and the Sass stack trace at the point of error (the + * {@link sassStack}). + */ + message: string; + + /** + * A textual description of what went wrong. + * + * Unlike {@link message}, this does *not* include representations of {@link + * span} or {@link sassStack}. + */ + readonly sassMessage: string; + + /** + * A human-friendly representation of the Sass stack trace at the point of + * error. + */ + readonly sassStack: string; + + /** The location the error occurred in the Sass file that triggered it. */ + readonly span: SourceSpan; + + /** Returns the same string as {@link message}. */ + toString(): string; +} diff --git a/tools/ui/node_modules/sass/types/importer.d.ts b/tools/ui/node_modules/sass/types/importer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..32aec2e053cbb3edcee52d2950929c678c7cd596 --- /dev/null +++ b/tools/ui/node_modules/sass/types/importer.d.ts @@ -0,0 +1,471 @@ +import {Syntax} from './options'; +import {PromiseOr} from './util/promise_or'; + +/** + * Contextual information passed to {@link Importer.canonicalize} and {@link + * FileImporter.findFileUrl}. Not all importers will need this information to + * resolve loads, but some may find it useful. + */ +export interface CanonicalizeContext { + /** + * Whether this is being invoked because of a Sass + * `@import` rule, as opposed to a `@use` or `@forward` rule. + * + * This should *only* be used for determining whether or not to load + * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). + */ + fromImport: boolean; + + /** + * The canonical URL of the file that contains the load, if that information + * is available. + * + * For an {@link Importer}, this is only passed when the `url` parameter is a + * relative URL _or_ when its [URL scheme] is included in {@link + * Importer.nonCanonicalScheme}. This ensures that canonical URLs are always + * resolved the same way regardless of context. + * + * [URL scheme]: https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#scheme + * + * For a {@link FileImporter}, this is always available as long as Sass knows + * the canonical URL of the containing file. + */ + containingUrl: URL | null; +} + +/** + * A special type of importer that redirects all loads to existing files on + * disk. Although this is less powerful than a full {@link Importer}, it + * automatically takes care of Sass features like resolving partials and file + * extensions and of loading the file from disk. + * + * Like all importers, this implements custom Sass loading logic for [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed + * to {@link Options.importers} or {@link StringOptions.importer}. + * + * @typeParam sync - A `FileImporter<'sync'>`'s {@link findFileUrl} must return + * synchronously, but in return it can be passed to {@link compile} and {@link + * compileString} in addition to {@link compileAsync} and {@link + * compileStringAsync}. + * + * A `FileImporter<'async'>`'s {@link findFileUrl} may either return + * synchronously or asynchronously, but it can only be used with {@link + * compileAsync} and {@link compileStringAsync}. + * + * @example + * + * ```js + * const {pathToFileURL} = require('url'); + * + * sass.compile('style.scss', { + * importers: [{ + * // An importer that redirects relative URLs starting with "~" to + * // `node_modules`. + * findFileUrl(url) { + * if (!url.startsWith('~')) return null; + * return new URL(url.substring(1), pathToFileURL('node_modules')); + * } + * }] + * }); + * ``` + * + * @category Importer + */ +export interface FileImporter< + sync extends 'sync' | 'async' = 'sync' | 'async' +> { + /** + * A callback that's called to partially resolve a load (such as + * [`@use`](https://sass-lang.com/documentation/at-rules/use) or + * [`@import`](https://sass-lang.com/documentation/at-rules/import)) to a file + * on disk. + * + * Unlike an {@link Importer}, the compiler will automatically handle relative + * loads for a {@link FileImporter}. See {@link Options.importers} for more + * details on the way loads are resolved. + * + * @param url - The loaded URL. Since this might be relative, it's represented + * as a string rather than a {@link URL} object. + * + * @returns An absolute `file:` URL if this importer recognizes the `url`. + * This may be only partially resolved: the compiler will automatically look + * for [partials](https://sass-lang.com/documentation/at-rules/use#partials), + * [index files](https://sass-lang.com/documentation/at-rules/use#index-files), + * and file extensions based on the returned URL. An importer may also return + * a fully resolved URL if it so chooses. + * + * If this importer doesn't recognize the URL, it should return `null` instead + * to allow other importers or {@link Options.loadPaths | load paths} to + * handle it. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link + * compile} or {@link compileString}. + * + * @throws any - If this importer recognizes `url` but determines that it's + * invalid, it may throw an exception that will be wrapped by Sass. If the + * exception object has a `message` property, it will be used as the wrapped + * exception's message; otherwise, the exception object's `toString()` will be + * used. This means it's safe for importers to throw plain strings. + */ + findFileUrl( + url: string, + context: CanonicalizeContext + ): PromiseOr; + + /** @hidden */ + canonicalize?: never; +} + +/** + * An object that implements custom Sass loading logic for [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed + * to {@link Options.importers} or {@link StringOptions.importer}. + * + * Importers that simply redirect to files on disk are encouraged to use the + * {@link FileImporter} interface instead. + * + * ### Resolving a Load + * + * This is the process of resolving a load using a custom importer: + * + * - The compiler encounters `@use "db:foo/bar/baz"`. + * - It calls {@link canonicalize} with `"db:foo/bar/baz"`. + * - {@link canonicalize} returns `new URL("db:foo/bar/baz/_index.scss")`. + * - If the compiler has already loaded a stylesheet with this canonical URL, it + * re-uses the existing module. + * - Otherwise, it calls {@link load} with `new + * URL("db:foo/bar/baz/_index.scss")`. + * - {@link load} returns an {@link ImporterResult} that the compiler uses as + * the contents of the module. + * + * See {@link Options.importers} for more details on the way loads are resolved + * using multiple importers and load paths. + * + * @typeParam sync - An `Importer<'sync'>`'s {@link canonicalize} and {@link + * load} must return synchronously, but in return it can be passed to {@link + * compile} and {@link compileString} in addition to {@link compileAsync} and + * {@link compileStringAsync}. + * + * An `Importer<'async'>`'s {@link canonicalize} and {@link load} may either + * return synchronously or asynchronously, but it can only be used with {@link + * compileAsync} and {@link compileStringAsync}. + * + * @example + * + * ```js + * sass.compile('style.scss', { + * // An importer for URLs like `bgcolor:orange` that generates a + * // stylesheet with the given background color. + * importers: [{ + * canonicalize(url) { + * if (!url.startsWith('bgcolor:')) return null; + * return new URL(url); + * }, + * load(canonicalUrl) { + * return { + * contents: `body {background-color: ${canonicalUrl.pathname}}`, + * syntax: 'scss' + * }; + * } + * }] + * }); + * ``` + * + * @category Importer + */ +export interface Importer { + /** + * If `url` is recognized by this importer, returns its canonical format. + * + * If Sass has already loaded a stylesheet with the returned canonical URL, it + * re-uses the existing parse tree (and the loaded module for `@use`). This + * means that importers **must ensure** that the same canonical URL always + * refers to the same stylesheet, *even across different importers*. As such, + * importers are encouraged to use unique URL schemes to disambiguate between + * one another. + * + * As much as possible, custom importers should canonicalize URLs the same way + * as the built-in filesystem importer: + * + * - The importer should look for stylesheets by adding the prefix `_` to the + * URL's basename, and by adding the extensions `.sass` and `.scss` if the + * URL doesn't already have one of those extensions. For example, if the + * URL was `foo/bar/baz`, the importer would look for: + * - `foo/bar/baz.sass` + * - `foo/bar/baz.scss` + * - `foo/bar/_baz.sass` + * - `foo/bar/_baz.scss` + * + * If the URL was `foo/bar/baz.scss`, the importer would just look for: + * - `foo/bar/baz.scss` + * - `foo/bar/_baz.scss` + * + * If the importer finds a stylesheet at more than one of these URLs, it + * should throw an exception indicating that the URL is ambiguous. Note that + * if the extension is explicitly specified, a stylesheet with the opposite + * extension is allowed to exist. + * + * - If none of the possible paths is valid, the importer should perform the + * same resolution on the URL followed by `/index`. In the example above, + * it would look for: + * - `foo/bar/baz/index.sass` + * - `foo/bar/baz/index.scss` + * - `foo/bar/baz/_index.sass` + * - `foo/bar/baz/_index.scss` + * + * As above, if the importer finds a stylesheet at more than one of these + * URLs, it should throw an exception indicating that the import is + * ambiguous. + * + * If no stylesheets are found, the importer should return `null`. + * + * Calling {@link canonicalize} multiple times with the same URL must return + * the same result. Calling {@link canonicalize} with a URL returned by a + * previous call to {@link canonicalize} must return that URL. + * + * #### Relative URLs + * + * Relative loads in stylesheets loaded from an importer are first resolved + * relative to the canonical URL of the stylesheet that contains it and passed + * back to the {@link canonicalize} method for the local importer that loaded + * that stylesheet. For example, suppose the "Resolving a Load" example {@link + * Importer | above} returned a stylesheet that contained `@use "mixins"`: + * + * - The compiler resolves the URL `mixins` relative to the current + * stylesheet's canonical URL `db:foo/bar/baz/_index.scss` to get + * `db:foo/bar/baz/mixins`. + * - It calls {@link canonicalize} with `"db:foo/bar/baz/mixins"`. + * - {@link canonicalize} returns `new URL("db:foo/bar/baz/_mixins.scss")`. + * + * Because of this, {@link canonicalize} must return a meaningful result when + * called with a URL relative to one returned by an earlier call to {@link + * canonicalize}. + * + * If the local importer's `canonicalize` method returns `null`, the relative + * URL is then passed to each of {@link Options.importers}' `canonicalize()` + * methods in turn until one returns a canonical URL. If none of them do, the + * load fails. + * + * @param url - The loaded URL. Since this might be relative, it's represented + * as a string rather than a {@link URL} object. + * + * @returns An absolute URL if this importer recognizes the `url`, or `null` + * if it doesn't. If this returns `null`, other importers or {@link + * Options.loadPaths | load paths} may handle the load. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link + * compile} or {@link compileString}. + * + * @throws any - If this importer recognizes `url` but determines that it's + * invalid, it may throw an exception that will be wrapped by Sass. If the + * exception object has a `message` property, it will be used as the wrapped + * exception's message; otherwise, the exception object's `toString()` will be + * used. This means it's safe for importers to throw plain strings. + */ + canonicalize( + url: string, + context: CanonicalizeContext + ): PromiseOr; + + /** + * Loads the Sass text for the given `canonicalUrl`, or returns `null` if this + * importer can't find the stylesheet it refers to. + * + * @param canonicalUrl - The canonical URL of the stylesheet to load. This is + * guaranteed to come from a call to {@link canonicalize}, although not every + * call to {@link canonicalize} will result in a call to {@link load}. + * + * @returns The contents of the stylesheet at `canonicalUrl` if it can be + * loaded, or `null` if it can't. + * + * This may also return a `Promise`, but if it does the importer may only be + * passed to {@link compileAsync} and {@link compileStringAsync}, not {@link + * compile} or {@link compileString}. + * + * @throws any - If this importer finds a stylesheet at `url` but it fails to + * load for some reason, or if `url` is uniquely associated with this importer + * but doesn't refer to a real stylesheet, the importer may throw an exception + * that will be wrapped by Sass. If the exception object has a `message` + * property, it will be used as the wrapped exception's message; otherwise, + * the exception object's `toString()` will be used. This means it's safe for + * importers to throw plain strings. + */ + load(canonicalUrl: URL): PromiseOr; + + /** @hidden */ + findFileUrl?: never; + + /** + * A URL scheme or set of schemes (without the `:`) that this importer + * promises never to use for URLs returned by {@link canonicalize}. If it does + * return a URL with one of these schemes, that's an error. + * + * If this is set, any call to canonicalize for a URL with a non-canonical + * scheme will be passed {@link CanonicalizeContext.containingUrl} if it's + * known. + * + * These schemes may only contain lowercase ASCII letters, ASCII numerals, + * `+`, `-`, and `.`. They may not be empty. + */ + nonCanonicalScheme?: string | string[]; +} + +declare const nodePackageImporterKey: unique symbol; + +/** + * The built-in Node.js package importer. This loads pkg: URLs from node_modules + * according to the standard Node.js resolution algorithm. + * + * A Node.js package importer is exposed as a class that can be added to the + * `importers` option. + * + *```js + * const sass = require('sass'); + * sass.compileString('@use "pkg:vuetify', { + * importers: [new sass.NodePackageImporter()] + * }); + *``` + * + * ## Writing Sass packages + * + * Package authors can control what is exposed to their users through their + * `package.json` manifest. The recommended method is to add a `sass` + * conditional export to `package.json`. + * + * ```json + * // node_modules/uicomponents/package.json + * { + * "exports": { + * ".": { + * "sass": "./src/scss/index.scss", + * "import": "./dist/js/index.mjs", + * "default": "./dist/js/index.js" + * } + * } + * } + * ``` + * + * This allows a package user to write `@use "pkg:uicomponents"` to load the + * file at `node_modules/uicomponents/src/scss/index.scss`. + * + * The Node.js package importer supports the variety of formats supported by + * Node.js [package entry points], allowing authors to expose multiple subpaths. + * + * [package entry points]: + * https://nodejs.org/api/packages.html#package-entry-points + * + * ```json + * // node_modules/uicomponents/package.json + * { + * "exports": { + * ".": { + * "sass": "./src/scss/index.scss", + * }, + * "./colors.scss": { + * "sass": "./src/scss/_colors.scss", + * }, + * "./theme/*.scss": { + * "sass": "./src/scss/theme/*.scss", + * }, + * } + * } + * ``` + * + * This allows a package user to write: + * + * - `@use "pkg:uicomponents";` to import the root export. + * - `@use "pkg:uicomponents/colors";` to import the colors partial. + * - `@use "pkg:uicomponents/theme/purple";` to import a purple theme. + * + * Note that while library users can rely on the importer to resolve + * [partials](https://sass-lang.com/documentation/at-rules/use#partials), [index + * files](https://sass-lang.com/documentation/at-rules/use#index-files), and + * extensions, library authors must specify the entire file path in `exports`. + * + * In addition to the `sass` condition, the `style` condition is also + * acceptable. Sass will match the `default` condition if it's a relevant file + * type, but authors are discouraged from relying on this. Notably, the key + * order matters, and the importer will resolve to the first value with a key + * that is `sass`, `style`, or `default`, so you should always put `default` + * last. + * + * To help package authors who haven't transitioned to package entry points + * using the `exports` field, the Node.js package importer provides several + * fallback options. If the `pkg:` URL does not have a subpath, the Node.js + * package importer will look for a `sass` or `style` key at the root of + * `package.json`. + * + * ```json + * // node_modules/uicomponents/package.json + * { + * "sass": "./src/scss/index.scss", + * } + * ``` + * + * This allows a user to write `@use "pkg:uicomponents";` to import the + * `index.scss` file. + * + * Finally, the Node.js package importer will look for an `index` file at the + * package root, resolving partials and extensions. For example, if the file + * `_index.scss` exists in the package root of `uicomponents`, a user can import + * that with `@use "pkg:uicomponents";`. + * + * If a `pkg:` URL includes a subpath that doesn't have a match in package entry + * points, the Node.js importer will attempt to find that file relative to the + * package root, resolving for file extensions, partials and index files. For + * example, if the file `src/sass/_colors.scss` exists in the `uicomponents` + * package, a user can import that file using `@use + * "pkg:uicomponents/src/sass/colors";`. + * + * @compatibility dart: "1.71.0", node: false + * @category Importer + */ +export class NodePackageImporter { + /** Used to distinguish this type from any arbitrary object. */ + private readonly [nodePackageImporterKey]: true; + + /** + * The NodePackageImporter has an optional `entryPointDirectory` option, which + * is the directory where the Node Package Importer should start when + * resolving `pkg:` URLs in sources other than files on disk. This will be + * used as the `parentURL` in the [Node Module + * Resolution](https://nodejs.org/api/esm.html#resolution-algorithm-specification) + * algorithm. + * + * In order to be found by the Node Package Importer, a package will need to + * be inside a node_modules folder located in the `entryPointDirectory`, or + * one of its parent directories, up to the filesystem root. + * + * Relative paths will be resolved relative to the current working directory. + * If a path is not provided, this defaults to the parent directory of the + * Node.js entrypoint. If that's not available, this will throw an error. + */ + constructor(entryPointDirectory?: string); +} + +/** + * The result of successfully loading a stylesheet with an {@link Importer}. + * + * @category Importer + */ +export interface ImporterResult { + /** The contents of the stylesheet. */ + contents: string; + + /** The syntax with which to parse {@link contents}. */ + syntax: Syntax; + + /** + * The URL to use to link to the loaded stylesheet's source code in source + * maps. A `file:` URL is ideal because it's accessible to both browsers and + * other build tools, but an `http:` URL is also acceptable. + * + * If this isn't set, it defaults to a `data:` URL that contains the contents + * of the loaded stylesheet. + */ + sourceMapUrl?: URL; +} diff --git a/tools/ui/node_modules/sass/types/index.d.ts b/tools/ui/node_modules/sass/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3520dda81bc5655fe6ec69d465a02073da5fbd88 --- /dev/null +++ b/tools/ui/node_modules/sass/types/index.d.ts @@ -0,0 +1,122 @@ +// This is a mirror of the JS API definitions in `spec/js-api`, but with comments +// written to provide user-facing documentation rather than to specify behavior for +// implementations. + +export { + AsyncCompiler, + CompileResult, + Compiler, + compile, + compileAsync, + compileString, + compileStringAsync, + initCompiler, + initAsyncCompiler, +} from './compile'; +export { + deprecations, + Deprecation, + Deprecations, + DeprecationOrId, + DeprecationStatus, + Version, +} from './deprecations'; +export {Exception} from './exception'; +export { + CanonicalizeContext, + FileImporter, + Importer, + ImporterResult, + NodePackageImporter, +} from './importer'; +export {Logger, LoggerWarnOptions, SourceSpan, SourceLocation} from './logger'; +export { + CustomFunction, + Options, + OutputStyle, + StringOptions, + StringOptionsWithImporter, + StringOptionsWithoutImporter, + Syntax, +} from './options'; +export {PromiseOr} from './util/promise_or'; +export { + CalculationInterpolation, + CalculationOperation, + CalculationOperator, + CalculationValue, + ChannelName, + ChannelNameHsl, + ChannelNameHwb, + ChannelNameLch, + ChannelNameLab, + ChannelNameRgb, + ChannelNameXyz, + ColorSpaceHsl, + ColorSpaceHwb, + ColorSpaceLch, + ColorSpaceLab, + ColorSpaceRgb, + ColorSpaceXyz, + GamutMapMethod, + HueInterpolationMethod, + KnownColorSpace, + ListSeparator, + PolarColorSpace, + RectangularColorSpace, + SassArgumentList, + SassBoolean, + SassCalculation, + SassColor, + SassFunction, + SassList, + SassMap, + SassMixin, + SassNumber, + SassString, + Value, + sassFalse, + sassNull, + sassTrue, +} from './value'; + +// Legacy APIs +export {LegacyException} from './legacy/exception'; +export { + FALSE, + LegacyAsyncFunction, + LegacyAsyncFunctionDone, + LegacyFunction, + LegacySyncFunction, + LegacyValue, + NULL, + TRUE, + types, +} from './legacy/function'; +export { + LegacyAsyncImporter, + LegacyImporter, + LegacyImporterResult, + LegacyImporterThis, + LegacySyncImporter, +} from './legacy/importer'; +export { + LegacySharedOptions, + LegacyFileOptions, + LegacyStringOptions, + LegacyOptions, +} from './legacy/options'; +export {LegacyPluginThis} from './legacy/plugin_this'; +export {LegacyResult, render, renderSync} from './legacy/render'; + +/** + * Information about the Sass implementation. This always begins with a unique + * identifier for the Sass implementation, followed by U+0009 TAB, followed by + * its npm package version. Some implementations include additional information + * as well, but not in any standardized format. + * + * * For Dart Sass, the implementation name is `dart-sass`. + * * For Node Sass, the implementation name is `node-sass`. + * * For the embedded host, the implementation name is `sass-embedded`. + */ +export const info: string; diff --git a/tools/ui/node_modules/sass/types/legacy/exception.d.ts b/tools/ui/node_modules/sass/types/legacy/exception.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..29d3a54b1bc8e990e40564bef148eeff03ed89b5 --- /dev/null +++ b/tools/ui/node_modules/sass/types/legacy/exception.d.ts @@ -0,0 +1,55 @@ +/** + * The exception type thrown by {@link renderSync} and passed as the error to + * {@link render}'s callback. + * + * @category Legacy + * @deprecated This is only thrown by the legacy {@link render} and {@link + * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link + * compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacyException extends Error { + /** + * The error message. For Dart Sass, when possible this includes a highlighted + * indication of where in the source file the error occurred as well as the + * Sass stack trace. + */ + message: string; + + /** + * The error message. For Dart Sass, this is the same as the result of calling + * {@link toString}, which is itself the same as {@link message} but with the + * prefix "Error:". + */ + formatted: string; + + /** + * The (1-based) line number on which the error occurred, if this exception is + * associated with a specific Sass file location. + */ + line?: number; + + /** + * The (1-based) column number within {@link line} at which the error + * occurred, if this exception is associated with a specific Sass file + * location. + */ + column?: number; + + /** + * Analogous to the exit code for an executable. `1` for an error caused by a + * Sass file, `3` for any other type of error. + */ + status: number; + + /** + * If this exception was caused by an error in a Sass file, this will + * represent the Sass file's location. It can be in one of three formats: + * + * * If the Sass file was loaded from disk, this is the path to that file. + * * If the Sass file was generated by an importer, this is its canonical URL. + * * If the Sass file was passed as {@link LegacyStringOptions.data} without a + * corresponding {@link LegacyStringOptions.file}, this is the special + * string `"stdin"`. + */ + file?: string; +} diff --git a/tools/ui/node_modules/sass/types/legacy/function.d.ts b/tools/ui/node_modules/sass/types/legacy/function.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7c27eb83ad9cf204938a935276bdb0cbd832d921 --- /dev/null +++ b/tools/ui/node_modules/sass/types/legacy/function.d.ts @@ -0,0 +1,757 @@ +import {LegacyPluginThis} from './plugin_this'; + +/** + * A synchronous callback that implements a custom Sass function. This can be + * passed to {@link LegacySharedOptions.functions} for either {@link render} or + * {@link renderSync}. + * + * If this throws an error, Sass will treat that as the function failing with + * that error message. + * + * ```js + * const result = sass.renderSync({ + * file: 'style.scss', + * functions: { + * "sum($arg1, $arg2)": (arg1, arg2) => { + * if (!(arg1 instanceof sass.types.Number)) { + * throw new Error("$arg1: Expected a number"); + * } else if (!(arg2 instanceof sass.types.Number)) { + * throw new Error("$arg2: Expected a number"); + * } + * return new sass.types.Number(arg1.getValue() + arg2.getValue()); + * } + * } + * }); + * ``` + * + * @param args - One argument for each argument that's declared in the signature + * that's passed to {@link LegacySharedOptions.functions}. If the signature + * [takes arbitrary + * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * they're passed as a single argument list in the last argument. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacySyncFunction = ( + this: LegacyPluginThis, + ...args: LegacyValue[] +) => LegacyValue; + +/** + * An asynchronous callback that implements a custom Sass function. This can be + * passed to {@link LegacySharedOptions.functions}, but only for {@link render}. + * + * An asynchronous function must return `undefined`. Its final argument will + * always be a callback, which it should call with the result of the function + * once it's done running. + * + * If this throws an error, Sass will treat that as the function failing with + * that error message. + * + * ```js + * sass.render({ + * file: 'style.scss', + * functions: { + * "sum($arg1, $arg2)": (arg1, arg2, done) => { + * if (!(arg1 instanceof sass.types.Number)) { + * throw new Error("$arg1: Expected a number"); + * } else if (!(arg2 instanceof sass.types.Number)) { + * throw new Error("$arg2: Expected a number"); + * } + * done(new sass.types.Number(arg1.getValue() + arg2.getValue())); + * } + * } + * }, (result, error) => { + * // ... + * }); + * ``` + * + * This is passed one argument for each argument that's declared in the + * signature that's passed to {@link LegacySharedOptions.functions}. If the + * signature [takes arbitrary + * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * they're passed as a single argument list in the last argument before the + * callback. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyAsyncFunction = + | ((this: LegacyPluginThis, done: (result: LegacyValue) => void) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + arg5: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + arg1: LegacyValue, + arg2: LegacyValue, + arg3: LegacyValue, + arg4: LegacyValue, + arg5: LegacyValue, + arg6: LegacyValue, + done: LegacyAsyncFunctionDone + ) => void) + | (( + this: LegacyPluginThis, + ...args: [...LegacyValue[], LegacyAsyncFunctionDone] + ) => void); + +/** + * The function called by a {@link LegacyAsyncFunction} to indicate that it's + * finished. + * + * @param result - If this is a {@link LegacyValue}, that indicates that the + * function call completed successfully. If it's a {@link types.Error}, that + * indicates that the function call failed. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyAsyncFunctionDone = ( + result: LegacyValue | types.Error +) => void; + +/** + * A callback that implements a custom Sass function. For {@link renderSync}, + * this must be a {@link LegacySyncFunction} which returns its result directly; + * for {@link render}, it may be either a {@link LegacySyncFunction} or a {@link + * LegacyAsyncFunction} which calls a callback with its result. + * + * See {@link LegacySharedOptions.functions} for more details. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyFunction = sync extends 'async' + ? LegacySyncFunction | LegacyAsyncFunction + : LegacySyncFunction; + +/** + * A type representing all the possible values that may be passed to or returned + * from a {@link LegacyFunction}. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Value} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyValue = + | types.Null + | types.Number + | types.String + | types.Boolean + | types.Color + | types.List + | types.Map; + +/** + * A shorthand for `sass.types.Boolean.TRUE`. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link sassTrue} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export const TRUE: types.Boolean; + +/** + * A shorthand for `sass.types.Boolean.FALSE`. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link sassFalse} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export const FALSE: types.Boolean; + +/** + * A shorthand for `sass.types.Null.NULL`. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link sassNull} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export const NULL: types.Null; + +/** + * The namespace for value types used in the legacy function API. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Value} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export namespace types { + /** + * The class for Sass's singleton [`null` + * value](https://sass-lang.com/documentation/values/null). The value itself + * can be accessed through the {@link NULL} field. + */ + export class Null { + /** Sass's singleton `null` value. */ + static readonly NULL: Null; + } + + /** + * Sass's [number type](https://sass-lang.com/documentation/values/numbers). + */ + export class Number { + /** + * @param value - The numeric value of the number. + * + * @param unit - If passed, the number's unit. + * + * Complex units can be represented as + * `**.../**...`, with numerator units on the + * left-hand side of the `/` and denominator units on the right. A number + * with only numerator units may omit the `/` and the units after it, and a + * number with only denominator units may be represented + * with no units before the `/`. + * + * @example + * + * ```scss + * new sass.types.Number(0.5); // == 0.5 + * new sass.types.Number(10, "px"); // == 10px + * new sass.types.Number(10, "px*px"); // == 10px * 1px + * new sass.types.Number(10, "px/s"); // == math.div(10px, 1s) + * new sass.types.Number(10, "px*px/s*s"); // == 10px * math.div(math.div(1px, 1s), 1s) + * ``` + */ + constructor(value: number, unit?: string); + + /** + * Returns the value of the number, ignoring units. + * + * **Heads up!** This means that `96px` and `1in` will return different + * values, even though they represent the same length. + * + * @example + * + * ```js + * const number = new sass.types.Number(10, "px"); + * number.getValue(); // 10 + * ``` + */ + getValue(): number; + + /** + * Destructively modifies this number by setting its numeric value to + * `value`, independent of its units. + * + * @deprecated Use {@link constructor} instead. + */ + setValue(value: number): void; + + /** + * Returns a string representation of this number's units. Complex units are + * returned in the same format that {@link constructor} accepts them. + * + * @example + * + * ```js + * // number is `10px`. + * number.getUnit(); // "px" + * + * // number is `math.div(10px, 1s)`. + * number.getUnit(); // "px/s" + * ``` + */ + getUnit(): string; + + /** + * Destructively modifies this number by setting its units to `unit`, + * independent of its numeric value. Complex units are specified in the same + * format as {@link constructor}. + * + * @deprecated Use {@link constructor} instead. + */ + setUnit(unit: string): void; + } + + /** + * Sass's [string type](https://sass-lang.com/documentation/values/strings). + * + * **Heads up!** This API currently provides no way of distinguishing between + * a [quoted](https://sass-lang.com/documentation/values/strings#quoted) and + * [unquoted](https://sass-lang.com/documentation/values/strings#unquoted) + * string. + */ + export class String { + /** + * Creates an unquoted string with the given contents. + * + * **Heads up!** This API currently provides no way of creating a + * [quoted](https://sass-lang.com/documentation/values/strings#quoted) + * string. + */ + constructor(value: string); + + /** + * Returns the contents of the string. If the string contains escapes, + * those escapes are included literally if it’s + * [unquoted](https://sass-lang.com/documentation/values/strings#unquoted), + * while the values of the escapes are included if it’s + * [quoted](https://sass-lang.com/documentation/values/strings#quoted). + * + * @example + * + * ``` + * // string is `Arial`. + * string.getValue(); // "Arial" + * + * // string is `"Helvetica Neue"`. + * string.getValue(); // "Helvetica Neue" + * + * // string is `\1F46D`. + * string.getValue(); // "\\1F46D" + * + * // string is `"\1F46D"`. + * string.getValue(); // "👭" + * ``` + */ + getValue(): string; + + /** + * Destructively modifies this string by setting its numeric value to + * `value`. + * + * **Heads up!** Even if the string was originally quoted, this will cause + * it to become unquoted. + * + * @deprecated Use {@link constructor} instead. + */ + setValue(value: string): void; + } + + /** + * Sass's [boolean type](https://sass-lang.com/documentation/values/booleans). + * + * Custom functions should respect Sass’s notion of + * [truthiness](https://sass-lang.com/documentation/at-rules/control/if#truthiness-and-falsiness) + * by treating `false` and `null` as falsey and everything else as truthy. + * + * **Heads up!** Boolean values can't be constructed, they can only be + * accessed through the {@link TRUE} and {@link FALSE} constants. + */ + export class Boolean { + /** + * Returns `true` if this is Sass's `true` value and `false` if this is + * Sass's `false` value. + * + * @example + * + * ```js + * // boolean is `true`. + * boolean.getValue(); // true + * boolean === sass.types.Boolean.TRUE; // true + * + * // boolean is `false`. + * boolean.getValue(); // false + * boolean === sass.types.Boolean.FALSE; // true + * ``` + */ + getValue(): T; + + /** Sass's `true` value. */ + static readonly TRUE: Boolean; + + /** Sass's `false` value. */ + static readonly FALSE: Boolean; + } + + /** + * Sass's [color type](https://sass-lang.com/documentation/values/colors). + */ + export class Color { + /** + * Creates a new Sass color with the given red, green, blue, and alpha + * channels. The red, green, and blue channels must be integers between 0 + * and 255 (inclusive), and alpha must be between 0 and 1 (inclusive). + * + * @example + * + * ```js + * new sass.types.Color(107, 113, 127); // #6b717f + * new sass.types.Color(0, 0, 0, 0); // rgba(0, 0, 0, 0) + * ``` + */ + constructor(r: number, g: number, b: number, a?: number); + + /** + * Creates a new Sass color with alpha, red, green, and blue channels taken + * from respective two-byte chunks of a hexidecimal number. + * + * @example + * + * ```js + * new sass.types.Color(0xff6b717f); // #6b717f + * new sass.types.Color(0x00000000); // rgba(0, 0, 0, 0) + * ``` + */ + constructor(argb: number); + + /** + * Returns the red channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getR(); // 107 + * + * // color is `#b37399`. + * color.getR(); // 179 + * ``` + */ + getR(): number; + + /** + * Sets the red channel of the color. The value must be an integer between 0 + * and 255 (inclusive). + * + * @deprecated Use {@link constructor} instead. + */ + setR(value: number): void; + + /** + * Returns the green channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getG(); // 113 + * + * // color is `#b37399`. + * color.getG(); // 115 + * ``` + */ + getG(): number; + + /** + * Sets the green channel of the color. The value must be an integer between + * 0 and 255 (inclusive). + * + * @deprecated Use {@link constructor} instead. + */ + setG(value: number): void; + + /** + * Returns the blue channel of the color as an integer from 0 to 255. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getB(); // 127 + * + * // color is `#b37399`. + * color.getB(); // 153 + * ``` + */ + getB(): number; + + /** + * Sets the blue channel of the color. The value must be an integer between + * 0 and 255 (inclusive). + * + * @deprecated Use {@link constructor} instead. + */ + setB(value: number): void; + + /** + * Returns the alpha channel of the color as a number from 0 to 1. + * + * @example + * + * ```js + * // color is `#6b717f`. + * color.getA(); // 1 + * + * // color is `transparent`. + * color.getA(); // 0 + * ``` + */ + getA(): number; + + /** + * Sets the alpha channel of the color. The value must be between 0 and 1 + * (inclusive). + * + * @deprecated Use {@link constructor} instead. + */ + setA(value: number): void; + } + + /** + * Sass's [list type](https://sass-lang.com/documentation/values/lists). + * + * **Heads up!** This list type’s methods use 0-based indexing, even though + * within Sass lists use 1-based indexing. These methods also don’t support + * using negative numbers to index backwards from the end of the list. + */ + export class List { + /** + * Creates a new Sass list. + * + * **Heads up!** The initial values of the list elements are undefined. + * These elements must be set using {@link setValue} before accessing them + * or passing the list back to Sass. + * + * @example + * + * ```js + * const list = new sass.types.List(3); + * list.setValue(0, new sass.types.Number(10, "px")); + * list.setValue(1, new sass.types.Number(15, "px")); + * list.setValue(2, new sass.types.Number(32, "px")); + * list; // 10px, 15px, 32px + * ``` + * + * @param length - The number of (initially undefined) elements in the list. + * @param commaSeparator - If `true`, the list is comma-separated; otherwise, + * it's space-separated. Defaults to `true`. + */ + constructor(length: number, commaSeparator?: boolean); + + /** + * Returns the element at `index`, or `undefined` if that value hasn't yet + * been set. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getValue(0); // 10px + * list.getValue(2); // 32px + * ``` + * + * @param index - A (0-based) index into this list. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of elements in this list. + */ + getValue(index: number): LegacyValue | undefined; + + /** + * Sets the element at `index` to `value`. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.setValue(1, new sass.types.Number(18, "px")); + * list; // 10px, 18px, 32px + * ``` + * + * @param index - A (0-based) index into this list. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of elements in this list. + */ + setValue(index: number, value: LegacyValue): void; + + /** + * Returns `true` if this list is comma-separated and `false` otherwise. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getSeparator(); // true + * + * // list is `1px solid` + * list.getSeparator(); // false + * ``` + */ + getSeparator(): boolean; + + /** + * Sets whether the list is comma-separated. + * + * @param isComma - `true` to make the list comma-separated, `false` otherwise. + */ + setSeparator(isComma: boolean): void; + + /** + * Returns the number of elements in the list. + * + * @example + * + * ```js + * // list is `10px, 15px, 32px` + * list.getLength(); // 3 + * + * // list is `1px solid` + * list.getLength(); // 2 + * ``` + */ + getLength(): number; + } + + /** + * Sass's [map type](https://sass-lang.com/documentation/values/maps). + * + * **Heads up!** This map type is represented as a list of key-value pairs + * rather than a mapping from keys to values. The only way to find the value + * associated with a given key is to iterate through the map checking for that + * key. Maps created through this API are still forbidden from having duplicate + * keys. + */ + export class Map { + /** + * Creates a new Sass map. + * + * **Heads up!** The initial keys and values of the map are undefined. They + * must be set using {@link setKey} and {@link setValue} before accessing + * them or passing the map back to Sass. + * + * @example + * + * ```js + * const map = new sass.types.Map(2); + * map.setKey(0, new sass.types.String("width")); + * map.setValue(0, new sass.types.Number(300, "px")); + * map.setKey(1, new sass.types.String("height")); + * map.setValue(1, new sass.types.Number(100, "px")); + * map; // (width: 300px, height: 100px) + * ``` + * + * @param length - The number of (initially undefined) key/value pairs in the map. + */ + constructor(length: number); + + /** + * Returns the value in the key/value pair at `index`. + * + * @example + * + * ```js + * // map is `(width: 300px, height: 100px)` + * map.getValue(0); // 300px + * map.getValue(1); // 100px + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + getValue(index: number): LegacyValue; + + /** + * Sets the value in the key/value pair at `index` to `value`. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.setValue(1, new sass.types.Number(300)); + * map; // ("light": 200, "medium": 300, "bold": 600) + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + setValue(index: number, value: LegacyValue): void; + + /** + * Returns the key in the key/value pair at `index`. + * + * @example + * + * ```js + * // map is `(width: 300px, height: 100px)` + * map.getKey(0); // width + * map.getKey(1); // height + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + getKey(index: number): LegacyValue; + + /** + * Sets the value in the key/value pair at `index` to `value`. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.setValue(1, new sass.types.String("lighter")); + * map; // ("lighter": 200, "medium": 300, "bold": 600) + * ``` + * + * @param index - A (0-based) index of a key/value pair in this map. + * @throws `Error` if `index` is less than 0 or greater than or equal to the + * number of pairs in this map. + */ + setKey(index: number, key: LegacyValue): void; + + /** + * Returns the number of key/value pairs in this map. + * + * @example + * + * ```js + * // map is `("light": 200, "medium": 400, "bold": 600)` + * map.getLength(); // 3 + * + * // map is `(width: 300px, height: 100px)` + * map.getLength(); // 2 + * ``` + */ + getLength(): number; + } + + /** + * An error that can be returned from a Sass function to signal that it + * encountered an error. This is the only way to signal an error + * asynchronously from a {@link LegacyAsyncFunction}. + */ + export class Error { + constructor(message: string); + } +} diff --git a/tools/ui/node_modules/sass/types/legacy/importer.d.ts b/tools/ui/node_modules/sass/types/legacy/importer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4b7777a3b13ffcd7667ddd02158fd644f3ace930 --- /dev/null +++ b/tools/ui/node_modules/sass/types/legacy/importer.d.ts @@ -0,0 +1,169 @@ +import {LegacyPluginThis} from './plugin_this'; + +/** + * The value of `this` in the context of a {@link LegacyImporter} function. + * + * @category Legacy + * @deprecated This is only used by the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +interface LegacyImporterThis extends LegacyPluginThis { + /** + * Whether the importer is being invoked because of a Sass `@import` rule, as + * opposed to a `@use` or `@forward` rule. + * + * This should *only* be used for determining whether or not to load + * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files). + * + * @compatibility dart: "1.33.0", node: false + */ + fromImport: boolean; +} + +/** + * The result of running a {@link LegacyImporter}. It must be one of the + * following types: + * + * * An object with the key `contents` whose value is the contents of a stylesheet + * (in SCSS syntax). This causes Sass to load that stylesheet’s contents. + * + * * An object with the key `file` whose value is a path on disk. This causes Sass + * to load that file as though it had been imported directly. + * + * * `null`, which indicates that it doesn’t recognize the URL and another + * importer should be tried instead. + * + * * An [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) + * object, indicating that importing failed. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link ImporterResult} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyImporterResult = + | {file: string} + | {contents: string} + | Error + | null; + +/** + * A synchronous callback that implements custom Sass loading logic for + * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and + * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be + * passed to {@link LegacySharedOptions.importer} for either {@link render} or + * {@link renderSync}. + * + * See {@link LegacySharedOptions.importer} for more detailed documentation. + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * importer: [ + * function(url, prev) { + * if (url != "big-headers") return null; + * + * return { + * contents: 'h1 { font-size: 40px; }' + * }; + * } + * ] + * }); + * ``` + * + * @param url - The `@use` or `@import` rule’s URL as a string, exactly as it + * appears in the stylesheet. + * + * @param prev - A string identifying the stylesheet that contained the `@use` + * or `@import`. This string’s format depends on how that stylesheet was loaded: + * + * * If the stylesheet was loaded from the filesystem, it’s the absolute path of + * its file. + * * If the stylesheet was loaded from an importer that returned its contents, + * it’s the URL of the `@use` or `@import` rule that loaded it. + * * If the stylesheet came from the data option, it’s the string "stdin". + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +type LegacySyncImporter = ( + this: LegacyImporterThis, + url: string, + prev: string +) => LegacyImporterResult; + +/** + * An asynchronous callback that implements custom Sass loading logic for + * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and + * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be + * passed to {@link LegacySharedOptions.importer} for either {@link render} or + * {@link renderSync}. + * + * An asynchronous importer must return `undefined`, and then call `done` with + * the result of its {@link LegacyImporterResult} once it's done running. + * + * See {@link LegacySharedOptions.importer} for more detailed documentation. + * + * ```js + * sass.render({ + * file: "style.scss", + * importer: [ + * function(url, prev, done) { + * if (url != "big-headers") done(null); + * + * done({ + * contents: 'h1 { font-size: 40px; }' + * }); + * } + * ] + * }); + * ``` + * + * @param url - The `@use` or `@import` rule’s URL as a string, exactly as it + * appears in the stylesheet. + * + * @param prev - A string identifying the stylesheet that contained the `@use` + * or `@import`. This string’s format depends on how that stylesheet was loaded: + * + * * If the stylesheet was loaded from the filesystem, it’s the absolute path of + * its file. + * * If the stylesheet was loaded from an importer that returned its contents, + * it’s the URL of the `@use` or `@import` rule that loaded it. + * * If the stylesheet came from the data option, it’s the string "stdin". + * + * @param done - The callback to call once the importer has finished running. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +type LegacyAsyncImporter = ( + this: LegacyImporterThis, + url: string, + prev: string, + done: (result: LegacyImporterResult) => void +) => void; + +/** + * A callback that implements custom Sass loading logic for [`@import` + * rules](https://sass-lang.com/documentation/at-rules/import) and [`@use` + * rules](https://sass-lang.com/documentation/at-rules/use). For {@link + * renderSync}, this must be a {@link LegacySyncImporter} which returns its + * result directly; for {@link render}, it may be either a {@link + * LegacySyncImporter} or a {@link LegacyAsyncImporter} which calls a callback + * with its result. + * + * See {@link LegacySharedOptions.importer} for more details. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyImporter = sync extends 'async' + ? LegacySyncImporter | LegacyAsyncImporter + : LegacySyncImporter; diff --git a/tools/ui/node_modules/sass/types/legacy/options.d.ts b/tools/ui/node_modules/sass/types/legacy/options.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..922fd5df33cbbebcf810df15e4e8cacf4e19048f --- /dev/null +++ b/tools/ui/node_modules/sass/types/legacy/options.d.ts @@ -0,0 +1,700 @@ +import {DeprecationOrId, Version} from '../deprecations'; +import {Logger} from '../logger'; +import {LegacyImporter} from './importer'; +import {LegacyFunction} from './function'; +import {NodePackageImporter} from '../importer'; + +/** + * Options for {@link render} and {@link renderSync} that are shared between + * {@link LegacyFileOptions} and {@link LegacyStringOptions}. + * + * @typeParam sync - This lets the TypeScript checker verify that {@link + * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to + * {@link renderSync}. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Options} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacySharedOptions { + /** + * This array of strings option provides [load + * paths](https://sass-lang.com/documentation/at-rules/import#load-paths) for + * Sass to look for stylesheets. Earlier load paths will take precedence over + * later ones. + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * includePaths: ["node_modules/bootstrap/dist/css"] + * }); + * ``` + * + * Load paths are also loaded from the `SASS_PATH` environment variable, if + * it’s set. This variable should be a list of paths separated by `;` (on + * Windows) or `:` (on other operating systems). Load paths from the + * `includePaths` option take precedence over load paths from `SASS_PATH`. + * + * ```sh + * $ SASS_PATH=node_modules/bootstrap/dist/css sass style.scss style.css + * ``` + * + * @category Input + * @compatibility feature: "SASS_PATH", dart: "1.15.0", node: "3.9.0" + * + * Earlier versions of Dart Sass and Node Sass didn’t support the `SASS_PATH` + * environment variable. + */ + includePaths?: string[]; + + /** + * Whether the generated CSS should use spaces or tabs for indentation. + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * indentType: "tab", + * indentWidth: 1 + * }); + * + * result.css.toString(); + * // "h1 {\n\tfont-size: 40px;\n}\n" + * ``` + * + * @defaultValue `'space'` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + indentType?: 'space' | 'tab'; + + /** + * How many spaces or tabs (depending on {@link indentType}) should be used + * per indentation level in the generated CSS. It must be between 0 and 10 + * (inclusive). + * + * @defaultValue `2` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + indentWidth?: number; + + /** + * Which character sequence to use at the end of each line in the generated + * CSS. It can have the following values: + * + * * `'lf'` uses U+000A LINE FEED. + * * `'lfcr'` uses U+000A LINE FEED followed by U+000D CARRIAGE RETURN. + * * `'cr'` uses U+000D CARRIAGE RETURN. + * * `'crlf'` uses U+000D CARRIAGE RETURN followed by U+000A LINE FEED. + * + * @defaultValue `'lf'` + * @category Output + * @compatibility dart: true, node: "3.0.0" + */ + linefeed?: 'cr' | 'crlf' | 'lf' | 'lfcr'; + + /** + * If `true`, Sass won't add a link from the generated CSS to the source map. + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * omitSourceMapUrl: true + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + omitSourceMapUrl?: boolean; + + /** + * The location that Sass expects the generated CSS to be saved to. It’s used + * to determine the URL used to link from the generated CSS to the source map, + * and from the source map to the Sass source files. + * + * **Heads up!** Despite the name, Sass does *not* write the CSS output to + * this file. The caller must do that themselves. + * + * ```js + * result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "out.css" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.css.map * / + * ``` + * + * @category Source Maps + */ + outFile?: string; + + /** + * The output style of the compiled CSS. There are four possible output styles: + * + * * `"expanded"` (the default for Dart Sass) writes each selector and + * declaration on its own line. + * + * * `"compressed"` removes as many extra characters as possible, and writes + * the entire stylesheet on a single line. + * + * * `"nested"` (the default for Node Sass, not supported by Dart Sass) + * indents CSS rules to match the nesting of the Sass source. + * + * * `"compact"` (not supported by Dart Sass) puts each CSS rule on its own single line. + * + * @example + * + * ```js + * const source = ` + * h1 { + * font-size: 40px; + * code { + * font-face: Roboto Mono; + * } + * }`; + * + * let result = sass.renderSync({ + * data: source, + * outputStyle: "expanded" + * }); + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // h1 code { + * // font-face: Roboto Mono; + * // } + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "compressed" + * }); + * console.log(result.css.toString()); + * // h1{font-size:40px}h1 code{font-face:Roboto Mono} + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "nested" + * }); + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; } + * // h1 code { + * // font-face: Roboto Mono; } + * + * result = sass.renderSync({ + * data: source, + * outputStyle: "compact" + * }); + * console.log(result.css.toString()); + * // h1 { font-size: 40px; } + * // h1 code { font-face: Roboto Mono; } + * ``` + * + * @category Output + */ + outputStyle?: 'compressed' | 'expanded' | 'nested' | 'compact'; + + /** + * Whether or not Sass should generate a source map. If it does, the source + * map will be available as {@link LegacyResult.map} (unless {@link + * sourceMapEmbed} is `true`). + * + * If this option is a string, it’s the path that the source map is expected + * to be written to, which is used to link to the source map from the + * generated CSS and to link *from* the source map to the Sass source files. + * Note that if `sourceMap` is a string and {@link outFile} isn’t passed, Sass + * assumes that the CSS will be written to the same directory as the file + * option if it’s passed. + * + * If this option is `true`, the path is assumed to be {@link outFile} with + * `.map` added to the end. If it’s `true` and {@link outFile} isn’t passed, + * it has no effect. + * + * @example + * + * ```js + * let result = sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.map * / + * + * result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "out.css" + * }) + * console.log(result.css.toString()); + * // h1 { + * // font-size: 40px; + * // } + * // /*# sourceMappingURL=out.css.map * / + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMap?: boolean | string; + + /** + * Whether to embed the entire contents of the Sass files that contributed to + * the generated CSS in the source map. This may produce very large source + * maps, but it guarantees that the source will be available on any computer + * no matter how the CSS is served. + * + * @example + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * sourceMapContents: true + * }) + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMapContents?: boolean; + + /** + * Whether to embed the contents of the source map file in the generated CSS, + * rather than creating a separate file and linking to it from the CSS. + * + * @example + * + * ```js + * sass.renderSync({ + * file: "style.scss", + * sourceMap: "out.map", + * sourceMapEmbed: true + * }); + * ``` + * + * @defaultValue `false` + * @category Source Maps + */ + sourceMapEmbed?: boolean; + + /** + * If this is passed, it's prepended to all the links from the source map to + * the Sass source files. + * + * @category Source Maps + */ + sourceMapRoot?: string; + + /** + * Additional handler(s) for loading files when a [`@use` + * rule](https://sass-lang.com/documentation/at-rules/use) or an [`@import` + * rule](https://sass-lang.com/documentation/at-rules/import) is encountered. + * It can either be a single {@link LegacyImporter} function, or an array of + * {@link LegacyImporter}s. + * + * Importers take the URL of the `@import` or `@use` rule and return a {@link + * LegacyImporterResult} indicating how to handle that rule. For more details, + * see {@link LegacySyncImporter} and {@link LegacyAsyncImporter}. + * + * Loads are resolved by trying, in order: + * + * * Loading a file from disk relative to the file in which the `@use` or + * `@import` appeared. + * + * * Each custom importer. + * + * * Loading a file relative to the current working directory. + * + * * Each load path in {@link includePaths}. + * + * * Each load path specified in the `SASS_PATH` environment variable, which + * should be semicolon-separated on Windows and colon-separated elsewhere. + * + * @example + * + * ```js + * sass.render({ + * file: "style.scss", + * importer: [ + * // This importer uses the synchronous API, and can be passed to either + * // renderSync() or render(). + * function(url, prev) { + * // This generates a stylesheet from scratch for `@use "big-headers"`. + * if (url != "big-headers") return null; + * + * return { + * contents: ` + * h1 { + * font-size: 40px; + * }` + * }; + * }, + * + * // This importer uses the asynchronous API, and can only be passed to + * // render(). + * function(url, prev, done) { + * // Convert `@use "foo/bar"` to "node_modules/foo/sass/bar". + * const components = url.split('/'); + * const innerPath = components.slice(1).join('/'); + * done({ + * file: `node_modules/${components.first}/sass/${innerPath}` + * }); + * } + * ] + * }, function(err, result) { + * // ... + * }); + * ``` + * + * @category Plugins + * @compatibility dart: true, node: "3.0.0" + * + * Versions of Node Sass before 3.0.0 don’t support arrays of importers, nor + * do they support importers that return `Error` objects. + * + * Versions of Node Sass before 2.0.0 don’t support the `importer` option at + * all. + * + * @compatibility feature: "Import order", dart: "1.20.2", node: false + * + * Versions of Dart Sass before 1.20.2 preferred resolving imports using + * {@link includePaths} before resolving them using custom importers. + * + * All versions of Node Sass currently pass imports to importers before + * loading them relative to the file in which the `@import` appears. This + * behavior is considered incorrect and should not be relied on because it + * violates the principle of *locality*, which says that it should be possible + * to reason about a stylesheet without knowing everything about how the + * entire system is set up. If a user tries to import a stylesheet relative to + * another stylesheet, that import should *always* work. It shouldn’t be + * possible for some configuration somewhere else to break it. + */ + importer?: LegacyImporter | LegacyImporter[]; + + /** + * Additional built-in Sass functions that are available in all stylesheets. + * This option takes an object whose keys are Sass function signatures and + * whose values are {@link LegacyFunction}s. Each function should take the + * same arguments as its signature. + * + * Functions are passed subclasses of {@link LegacyValue}, and must return the + * same. + * + * **Heads up!** When writing custom functions, it’s important to ensure that + * all the arguments are the types you expect. Otherwise, users’ stylesheets + * could crash in hard-to-debug ways or, worse, compile to meaningless CSS. + * + * @example + * + * ```js + * sass.render({ + * data: ` + * h1 { + * font-size: pow(2, 5) * 1px; + * }`, + * functions: { + * // This function uses the synchronous API, and can be passed to either + * // renderSync() or render(). + * 'pow($base, $exponent)': function(base, exponent) { + * if (!(base instanceof sass.types.Number)) { + * throw "$base: Expected a number."; + * } else if (base.getUnit()) { + * throw "$base: Expected a unitless number."; + * } + * + * if (!(exponent instanceof sass.types.Number)) { + * throw "$exponent: Expected a number."; + * } else if (exponent.getUnit()) { + * throw "$exponent: Expected a unitless number."; + * } + * + * return new sass.types.Number( + * Math.pow(base.getValue(), exponent.getValue())); + * }, + * + * // This function uses the asynchronous API, and can only be passed to + * // render(). + * 'sqrt($number)': function(number, done) { + * if (!(number instanceof sass.types.Number)) { + * throw "$number: Expected a number."; + * } else if (number.getUnit()) { + * throw "$number: Expected a unitless number."; + * } + * + * done(new sass.types.Number(Math.sqrt(number.getValue()))); + * } + * } + * }, function(err, result) { + * console.log(result.css.toString()); + * // h1 { + * // font-size: 32px; + * // } + * }); + * ``` + * + * @category Plugins + */ + functions?: {[key: string]: LegacyFunction}; + + /** + * By default, if the CSS document contains non-ASCII characters, Sass adds a + * `@charset` declaration (in expanded output mode) or a byte-order mark (in + * compressed mode) to indicate its encoding to browsers or other consumers. + * If `charset` is `false`, these annotations are omitted. + * + * @category Output + * @compatibility dart: "1.39.0", node: false + */ + charset?: boolean; + + /** + * If this option is set to `true`, Sass won’t print warnings that are caused + * by dependencies. A “dependency” is defined as any file that’s loaded + * through {@link includePaths} or {@link importer}. Stylesheets that are + * imported relative to the entrypoint are not considered dependencies. + * + * This is useful for silencing deprecation warnings that you can’t fix on + * your own. However, please also notify your dependencies of the deprecations + * so that they can get fixed as soon as possible! + * + * **Heads up!** If {@link render} or {@link renderSync} is called without + * {@link LegacyFileOptions.file} or {@link LegacyStringOptions.file}, + * all stylesheets it loads will be considered dependencies. Since it + * doesn’t have a path of its own, everything it loads is coming from a load + * path rather than a relative import. + * + * @defaultValue `false` + * @category Messages + * @compatibility dart: "1.35.0", node: false + */ + quietDeps?: boolean; + + /** + * A set of deprecations to treat as fatal. + * + * If a deprecation warning of any provided type is encountered during + * compilation, the compiler will error instead. + * + * If a `Version` is provided, then all deprecations that were active in that + * compiler version will be treated as fatal. + * + * @category Messages + * @compatiblity dart: "1.78.0", node: false + */ + fatalDeprecations?: (DeprecationOrId | Version)[]; + + /** + * A set of future deprecations to opt into early. + * + * Future deprecations passed here will be treated as active by the compiler, + * emitting warnings as necessary. + * + * @category Messages + * @compatiblity dart: "1.78.0", node: false + */ + futureDeprecations?: DeprecationOrId[]; + + /** + * A set of active deprecations to ignore. + * + * If a deprecation warning of any provided type is encountered during + * compilation, the compiler will ignore it instead. + * + * **Heads up!** The deprecated functionality you're depending on will + * eventually break. + * + * @category Messages + * @compatiblity dart: "1.78.0", node: false + */ + silenceDeprecations?: DeprecationOrId[]; + + /** + * By default, Dart Sass will print only five instances of the same + * deprecation warning per compilation to avoid deluging users in console + * noise. If you set `verbose` to `true`, it will instead print every + * deprecation warning it encounters. + * + * @defaultValue `false` + * @category Messages + * @compatibility dart: "1.35.0", node: false + */ + verbose?: boolean; + + /** + * An object to use to handle warnings and/or debug messages from Sass. + * + * By default, Sass emits warnings and debug messages to standard error, but + * if {@link Logger.warn} or {@link Logger.debug} is set, this will invoke + * them instead. + * + * The special value {@link Logger.silent} can be used to easily silence all + * messages. + * + * @category Messages + * @compatibility dart: "1.43.0", node: false + */ + logger?: Logger; + + /** + * If this option is set to an instance of `NodePackageImporter`, Sass will + * use the built-in Node.js package importer to resolve Sass files with a + * `pkg:` URL scheme. Details for library authors and users can be found in + * the {@link NodePackageImporter} documentation. + * + * @example + * ```js + * sass.renderSync({ + * data: '@use "pkg:vuetify";', + * pkgImporter: new sass.NodePackageImporter() + * }); + * ``` + * @category Plugins + * @compatibility dart: "2.0", node: false + */ + pkgImporter?: NodePackageImporter; +} + +/** + * If {@link file} is passed without {@link data}, Sass will load the stylesheet + * at {@link file} and compile it to CSS. + * + * @typeParam sync - This lets the TypeScript checker verify that {@link + * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to + * {@link renderSync}. + */ +export interface LegacyFileOptions + extends LegacySharedOptions { + /** + * The path to the file for Sass to load and compile. If the file’s extension + * is `.scss`, it will be parsed as SCSS; if it’s `.sass`, it will be parsed + * as the indented syntax; and if it’s `.css`, it will be parsed as plain CSS. + * If it has no extension, it will be parsed as SCSS. + * + * @example + * + * ```js + * sass.renderSync({file: "style.scss"}); + * ``` + * + * @category Input + * @compatibility feature: "Plain CSS files", dart: "1.11.0", node: "partial" + * + * Node Sass and older versions of Dart Sass support loading files with the + * extension `.css`, but contrary to the specification they’re treated as SCSS + * files rather than being parsed as CSS. This behavior has been deprecated + * and should not be relied on. Any files that use Sass features should use + * the `.scss` extension. + * + * All versions of Node Sass and Dart Sass otherwise support the file option + * as described below. + */ + file: string; + + /** + * See {@link LegacyStringOptions.file} for documentation of passing {@link + * file} along with {@link data}. + * + * @category Input + */ + data?: never; +} + +/** + * If {@link data} is passed, Sass will use it as the contents of the stylesheet + * to compile. + * + * @typeParam sync - This lets the TypeScript checker verify that {@link + * LegacyAsyncImporter}s and {@link LegacyAsyncFunction}s aren't passed to + * {@link renderSync}. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link StringOptions} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacyStringOptions + extends LegacySharedOptions { + /** + * The contents of the stylesheet to compile. Unless {@link file} is passed as + * well, the stylesheet’s URL is set to `"stdin"`. + * + * By default, this stylesheet is parsed as SCSS. This can be controlled using + * {@link indentedSyntax}. + * + * @example + * + * ```js + * sass.renderSync({ + * data: ` + * h1 { + * font-size: 40px; + * }` + * }); + * ``` + * + * @category Input + */ + data: string; + + /** + * If `file` and {@link data} are both passed, `file` is used as the path of + * the stylesheet for error reporting, but {@link data} is used as the + * contents of the stylesheet. In this case, `file`’s extension is not used to + * determine the syntax of the stylesheet. + * + * @category Input + */ + file?: string; + + /** + * This flag controls whether {@link data} is parsed as the indented syntax or + * not. + * + * @example + * + * ```js + * sass.renderSync({ + * data: ` + * h1 + * font-size: 40px`, + * indentedSyntax: true + * }); + * ``` + * + * @defaultValue `false` + * @category Input + */ + indentedSyntax?: boolean; +} + +/** + * Options for {@link render} and {@link renderSync}. This can either be {@link + * LegacyFileOptions} to load a file from disk, or {@link LegacyStringOptions} + * to compile a string of Sass code. + * + * See {@link LegacySharedOptions} for options that are shared across both file + * and string inputs. + * + * @category Legacy + * @deprecated This only works with the legacy {@link render} and {@link + * renderSync} APIs. Use {@link Options} with {@link compile}, {@link + * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead. + */ +export type LegacyOptions = + | LegacyFileOptions + | LegacyStringOptions; diff --git a/tools/ui/node_modules/sass/types/legacy/plugin_this.d.ts b/tools/ui/node_modules/sass/types/legacy/plugin_this.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ccffa76af59288e3fbcfd482344bb80429ef75e --- /dev/null +++ b/tools/ui/node_modules/sass/types/legacy/plugin_this.d.ts @@ -0,0 +1,74 @@ +/** + * The value of `this` in the context of a {@link LegacyImporter} or {@link + * LegacyFunction} callback. + * + * @category Legacy + * @deprecated This is only used by the legacy {@link render} and {@link + * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link + * compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacyPluginThis { + /** + * A partial representation of the options passed to {@link render} or {@link + * renderSync}. + */ + options: { + /** The same {@link LegacyPluginThis} instance that contains this object. */ + context: LegacyPluginThis; + + /** + * The value passed to {@link LegacyFileOptions.file} or {@link + * LegacyStringOptions.file}. + */ + file?: string; + + /** The value passed to {@link LegacyStringOptions.data}. */ + data?: string; + + /** + * The value passed to {@link LegacySharedOptions.includePaths} separated by + * `";"` on Windows or `":"` on other operating systems. This always + * includes the current working directory as the first entry. + */ + includePaths: string; + + /** Always the number 10. */ + precision: 10; + + /** Always the number 1. */ + style: 1; + + /** 1 if {@link LegacySharedOptions.indentType} was `"tab"`, 0 otherwise. */ + indentType: 1 | 0; + + /** + * The value passed to {@link LegacySharedOptions.indentWidth}, or `2` + * otherwise. + */ + indentWidth: number; + + /** + * The value passed to {@link LegacySharedOptions.linefeed}, or `"\n"` + * otherwise. + */ + linefeed: '\r' | '\r\n' | '\n' | '\n\r'; + + /** A partially-constructed {@link LegacyResult} object. */ + result: { + /** Partial information about the compilation in progress. */ + stats: { + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and + * the time at which Sass compilation began. + */ + start: number; + + /** + * {@link LegacyFileOptions.file} if it was passed, otherwise the string + * `"data"`. + */ + entry: string; + }; + }; + }; +} diff --git a/tools/ui/node_modules/sass/types/legacy/render.d.ts b/tools/ui/node_modules/sass/types/legacy/render.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f78816fce09319484a9dfb8913977c781e4b9ea --- /dev/null +++ b/tools/ui/node_modules/sass/types/legacy/render.d.ts @@ -0,0 +1,144 @@ +import {LegacyException} from './exception'; +import {LegacyOptions} from './options'; + +/** + * The object returned by {@link render} and {@link renderSync} after a + * successful compilation. + * + * @category Legacy + * @deprecated This is only used by the legacy {@link render} and {@link + * renderSync} APIs. Use {@link compile}, {@link compileString}, {@link + * compileAsync}, and {@link compileStringAsync} instead. + */ +export interface LegacyResult { + /** + * The compiled CSS. This can be converted to a string by calling + * [Buffer.toString](https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end). + * + * @example + * + * ```js + * const result = sass.renderSync({file: "style.scss"}); + * + * console.log(result.css.toString()); + * ``` + */ + css: Buffer; + + /** + * The source map that maps the compiled CSS to the source files from which it + * was generated. This can be converted to a string by calling + * [Buffer.toString](https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end). + * + * This is `undefined` unless either + * + * * {@link LegacySharedOptions.sourceMap} is a string; or + * * {@link LegacySharedOptions.sourceMap} is `true` and + * {@link LegacySharedOptions.outFile} is set. + * + * The source map uses absolute [`file:` + * URLs](https://en.wikipedia.org/wiki/File_URI_scheme) to link to the Sass + * source files, except if the source file comes from {@link + * LegacyStringOptions.data} in which case it lists its URL as `"stdin"`. + * + * @example + * + * ```js + * const result = sass.renderSync({ + * file: "style.scss", + * sourceMap: true, + * outFile: "style.css" + * }) + * + * console.log(result.map.toString()); + * ``` + */ + map?: Buffer; + + /** Additional information about the compilation. */ + stats: { + /** + * The absolute path of {@link LegacyFileOptions.file} or {@link + * LegacyStringOptions.file}, or `"data"` if {@link + * LegacyStringOptions.file} wasn't set. + */ + entry: string; + + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the + * time at which Sass compilation began. + */ + start: number; + + /** + * The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the + * time at which Sass compilation ended. + */ + end: number; + + /** + * The number of milliseconds it took to compile the Sass file. This is + * always equal to `start` minus `end`. + */ + duration: number; + + /** + * An array of the absolute paths of all Sass files loaded during + * compilation. If a stylesheet was loaded from a {@link LegacyImporter} + * that returned the stylesheet’s contents, the raw string of the `@use` or + * `@import` that loaded that stylesheet included in this array. + */ + includedFiles: string[]; + }; +} + +/** + * This function synchronously compiles a Sass file to CSS. If it succeeds, it + * returns the result, and if it fails it throws an error. + * + * **Heads up!** When using the `sass-embedded` npm package, **{@link render} + * is almost always faster than {@link renderSync}**, due to the overhead of + * emulating synchronous messaging with worker threads and concurrent + * compilations being blocked on main thread. + * + * @example + * + * ```js + * const sass = require('sass'); // or require('node-sass'); + * + * const result = sass.renderSync({file: "style.scss"}); + * // ... + * ``` + * + * @category Legacy + * @deprecated Use {@link compile} or {@link compileString} instead. + */ +export function renderSync(options: LegacyOptions<'sync'>): LegacyResult; + +/** + + * This function asynchronously compiles a Sass file to CSS, and calls + * `callback` with a {@link LegacyResult} if compilation succeeds or {@link + * LegacyException} if it fails. + * + * **Heads up!** When using the `sass` npm package, **{@link renderSync} is + * almost twice as fast as {@link render}** by default, due to the overhead of + * making the entire evaluation process asynchronous. + * + * ```js + * const sass = require('sass'); // or require('node-sass'); + * + * sass.render({ + * file: "style.scss" + * }, function(err, result) { + * // ... + * }); + * ``` + * + * @category Legacy + * @deprecated Use {@link compileAsync} or {@link compileStringAsync} instead. + */ +export function render( + options: LegacyOptions<'async'>, + callback: (exception?: LegacyException, result?: LegacyResult) => void +): void; diff --git a/tools/ui/node_modules/sass/types/logger/index.d.ts b/tools/ui/node_modules/sass/types/logger/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..84ee9c2b387750ad5df4ad2132eda79a8b4a86ff --- /dev/null +++ b/tools/ui/node_modules/sass/types/logger/index.d.ts @@ -0,0 +1,115 @@ +import {Deprecation} from '../deprecations'; +import {SourceSpan} from './source_span'; + +export {SourceLocation} from './source_location'; +export {SourceSpan} from './source_span'; + +/** + * The options passed to {@link Logger.warn}. + * + * * `deprecation`: Whether this is a deprecation warning. + * + * * `deprecationType`: The type of deprecation. Only set if `deprecation` is + * true. + * + * * `span`: The location in the Sass source code that generated this warning. + * This may be unset if the warning didn't come from Sass source, for + * example if it's from a deprecated JavaScript option. + * + * * `stack`: The Sass stack trace at the point the warning was issued. This may + * be unset if the warning didn't come from Sass source, for example if it's + * from a deprecated JavaScript option. + * + * @category Logger + */ +export type LoggerWarnOptions = ( + | { + deprecation: true; + deprecationType: Deprecation; + } + | {deprecation: false} +) & { + span?: SourceSpan; + stack?: string; +}; + +/** + * An object that can be passed to {@link LegacySharedOptions.logger} to control + * how Sass emits warnings and debug messages. + * + * @example + * + * ```js + * const fs = require('fs'); + * const sass = require('sass'); + * + * let log = ""; + * sass.renderSync({ + * file: 'input.scss', + * logger: { + * warn(message, options) { + * if (options.span) { + * log += `${span.url}:${span.start.line}:${span.start.column}: ` + + * `${message}\n`; + * } else { + * log += `::: ${message}\n`; + * } + * } + * } + * }); + * + * fs.writeFileSync('log.txt', log); + * ``` + * + * @category Logger + */ +export interface Logger { + /** + * This method is called when Sass emits a warning, whether due to a [`@warn` + * rule](https://sass-lang.com/documentation/at-rules/warn) or a warning + * generated by the Sass compiler. + * + * If this is `undefined`, Sass will print warnings to standard error. + * + * `options` may contain the following fields: + * + * @param message - The warning message. + */ + warn?(message: string, options: LoggerWarnOptions): void; + + /** + * This method is called when Sass emits a debug message due to a [`@debug` + * rule](https://sass-lang.com/documentation/at-rules/debug). + * + * If this is `undefined`, Sass will print debug messages to standard error. + * + * @param message - The debug message. + * @param options.span - The location in the Sass source code that generated this + * debug message. + */ + debug?(message: string, options: {span: SourceSpan}): void; +} + +/** + * A namespace for built-in {@link Logger}s. + * + * @category Logger + * @compatibility dart: "1.43.0", node: false + */ +export namespace Logger { + /** + * A {@link Logger} that silently ignores all warnings and debug messages. + * + * @example + * + * ```js + * const sass = require('sass'); + * + * const result = sass.renderSync({ + * file: 'input.scss', + * logger: sass.Logger.silent, + * }); + * ``` + */ + export const silent: Logger; +} diff --git a/tools/ui/node_modules/sass/types/logger/source_location.d.ts b/tools/ui/node_modules/sass/types/logger/source_location.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..719271486c5e065134d6c178d38ab347f89e451c --- /dev/null +++ b/tools/ui/node_modules/sass/types/logger/source_location.d.ts @@ -0,0 +1,21 @@ +/** + * A specific location within a source file. + * + * This is always associated with a {@link SourceSpan} which indicates *which* + * file it refers to. + * + * @category Logger + */ +export interface SourceLocation { + /** + * The 0-based index of this location within its source file, in terms of + * UTF-16 code units. + */ + offset: number; + + /** The 0-based line number of this location. */ + line: number; + + /** The 0-based column number of this location. */ + column: number; +} diff --git a/tools/ui/node_modules/sass/types/logger/source_span.d.ts b/tools/ui/node_modules/sass/types/logger/source_span.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..88eb47f3705668d571df8e9e7548e70bcbf7948c --- /dev/null +++ b/tools/ui/node_modules/sass/types/logger/source_span.d.ts @@ -0,0 +1,34 @@ +import {SourceLocation} from './source_location'; + +/** + * A span of text within a source file. + * + * @category Logger + */ +export interface SourceSpan { + /** The beginning of this span, inclusive. */ + start: SourceLocation; + + /** + * The end of this span, exclusive. + * + * If {@link start} and {@link end} refer to the same location, the span has + * zero length and refers to the point immediately after {@link start} and + * before the next character. + */ + end: SourceLocation; + + /** The canonical URL of the file this span refers to. */ + url?: URL; + + /** The text covered by the span. */ + text: string; + + /** + * Text surrounding the span. + * + * If this is set, it must include only whole lines, and it must include at + * least all line(s) which are partially covered by this span. + */ + context?: string; +} diff --git a/tools/ui/node_modules/sass/types/options.d.ts b/tools/ui/node_modules/sass/types/options.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5b4ffb114622da95d098122463a6ea918c4e879f --- /dev/null +++ b/tools/ui/node_modules/sass/types/options.d.ts @@ -0,0 +1,468 @@ +import {DeprecationOrId, Version} from './deprecations'; +import {FileImporter, Importer, NodePackageImporter} from './importer'; +import {Logger} from './logger'; +import {Value} from './value'; +import {PromiseOr} from './util/promise_or'; + +/** + * Syntaxes supported by Sass: + * + * - `'scss'` is the [SCSS + * syntax](https://sass-lang.com/documentation/syntax#scss). + * - `'indented'` is the [indented + * syntax](https://sass-lang.com/documentation/syntax#the-indented-syntax) + * - `'css'` is plain CSS, which is parsed like SCSS but forbids the use of any + * special Sass features. + * + * @category Options + */ +export type Syntax = 'scss' | 'indented' | 'css'; + +/** + * Possible output styles for the compiled CSS: + * + * - `"expanded"` (the default for Dart Sass) writes each selector and + * declaration on its own line. + * + * - `"compressed"` removes as many extra characters as possible, and writes + * the entire stylesheet on a single line. + * + * @category Options + */ +export type OutputStyle = 'expanded' | 'compressed'; + +/** + * A callback that implements a custom Sass function. This can be passed to + * {@link Options.functions}. + * + * ```js + * const result = sass.compile('style.scss', { + * functions: { + * "sum($arg1, $arg2)": (args) => { + * const arg1 = args[0].assertNumber('arg1'); + * const value1 = arg1.value; + * const value2 = args[1].assertNumber('arg2') + * .convertValueToMatch(arg1, 'arg2', 'arg1'); + * return new sass.SassNumber(value1 + value2).coerceToMatch(arg1); + * } + * } + * }); + * ``` + * + * @typeParam sync - A `CustomFunction<'sync'>` must return synchronously, but + * in return it can be passed to {@link compile} and {@link compileString} in + * addition to {@link compileAsync} and {@link compileStringAsync}. + * + * A `CustomFunction<'async'>` may either return synchronously or + * asynchronously, but it can only be used with {@link compileAsync} and {@link + * compileStringAsync}. + * + * @param args - An array of arguments passed by the function's caller. If the + * function takes [arbitrary + * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments), + * the last element will be a {@link SassArgumentList}. + * + * @returns The function's result. This may be in the form of a `Promise`, but + * if it is the function may only be passed to {@link compileAsync} and {@link + * compileStringAsync}, not {@link compile} or {@link compileString}. + * + * @throws any - This function may throw an error, which the Sass compiler will + * treat as the function call failing. If the exception object has a `message` + * property, it will be used as the wrapped exception's message; otherwise, the + * exception object's `toString()` will be used. This means it's safe for custom + * functions to throw plain strings. + * + * @category Custom Function + */ +export type CustomFunction = ( + args: Value[] +) => PromiseOr; + +/** + * Options that can be passed to {@link compile}, {@link compileAsync}, {@link + * compileString}, or {@link compileStringAsync}. + * + * @typeParam sync - This lets the TypeScript checker verify that asynchronous + * {@link Importer}s, {@link FileImporter}s, and {@link CustomFunction}s aren't + * passed to {@link compile} or {@link compileString}. + * + * @category Options + */ +export interface Options { + /** + * If this is `true`, the compiler will exclusively use ASCII characters in + * its error and warning messages. Otherwise, it may use non-ASCII Unicode + * characters as well. + * + * @defaultValue `false` + * @category Messages + */ + alertAscii?: boolean; + + /** + * If this is `true`, the compiler will use ANSI color escape codes in its + * error and warning messages. If it's `false`, it won't use these. If it's + * undefined, the compiler will determine whether or not to use colors + * depending on whether the user is using an interactive terminal. + * + * @category Messages + */ + alertColor?: boolean; + + /** + * If `true`, the compiler may prepend `@charset "UTF-8";` or U+FEFF + * (byte-order marker) if it outputs non-ASCII CSS. + * + * If `false`, the compiler never emits these byte sequences. This is ideal + * when concatenating or embedding in HTML ` + + diff --git a/tools/ui/node_modules/storybook/assets/server/openBrowser.applescript b/tools/ui/node_modules/storybook/assets/server/openBrowser.applescript new file mode 100644 index 0000000000000000000000000000000000000000..5b1390749e3ada541f57aa8647f5819a484678a9 --- /dev/null +++ b/tools/ui/node_modules/storybook/assets/server/openBrowser.applescript @@ -0,0 +1,94 @@ +(* +Copyright (c) 2015-present, Facebook, Inc. +This source code is licensed under the MIT license found in the +LICENSE file in the root directory of this source tree. +*) + +property targetTab: null +property targetTabIndex: -1 +property targetWindow: null +property theProgram: "Google Chrome" + +on run argv + set theURL to item 1 of argv + set matchURL to item 2 of argv + + -- Allow requested program to be optional, + -- default to Google Chrome + if (count of argv) > 2 then + set theProgram to item 3 of argv + end if + + using terms from application "Google Chrome" + tell application theProgram + + if (count every window) = 0 then + make new window + end if + + -- 1: Looking for tab running debugger + -- then, Reload debugging tab if found + -- then return + set found to my lookupTabWithUrl(matchURL) + if found then + set targetWindow's active tab index to targetTabIndex + tell targetTab to reload + tell targetWindow to activate + set index of targetWindow to 1 + return + end if + + -- 2: Looking for Empty tab + -- In case debugging tab was not found + -- We try to find an empty tab instead + set found to my lookupTabWithUrl("chrome://newtab/") + if found then + set targetWindow's active tab index to targetTabIndex + set URL of targetTab to theURL + tell targetWindow to activate + return + end if + + -- 3: Create new tab + -- both debugging and empty tab were not found + -- make a new tab with url + tell window 1 + activate + make new tab with properties {URL:theURL} + end tell + end tell + end using terms from +end run + +-- Function: +-- Lookup tab with given url +-- if found, store tab, index, and window in properties +-- (properties were declared on top of file) +on lookupTabWithUrl(lookupUrl) + using terms from application "Google Chrome" + tell application theProgram + -- Find a tab with the given url + set found to false + set theTabIndex to -1 + repeat with theWindow in every window + set theTabIndex to 0 + repeat with theTab in every tab of theWindow + set theTabIndex to theTabIndex + 1 + if (theTab's URL as string) contains lookupUrl then + -- assign tab, tab index, and window to properties + set targetTab to theTab + set targetTabIndex to theTabIndex + set targetWindow to theWindow + set found to true + exit repeat + end if + end repeat + + if found then + exit repeat + end if + end repeat + end tell + end using terms from + return found +end lookupTabWithUrl \ No newline at end of file diff --git a/tools/ui/node_modules/storybook/assets/server/template.ejs b/tools/ui/node_modules/storybook/assets/server/template.ejs new file mode 100644 index 0000000000000000000000000000000000000000..0054c8ac503d5bcc0634930487153515df1b9186 --- /dev/null +++ b/tools/ui/node_modules/storybook/assets/server/template.ejs @@ -0,0 +1,87 @@ + + + + + + <%= typeof title !== 'undefined'? title : 'Storybook'%> + + + <% if (favicon.endsWith('.svg')) {%> + + <% } else if (favicon.endsWith('.ico')) { %> + + <% } %> + + + + + <% files.js.forEach(file => { %> + + <% }); %> <% if (typeof head !== 'undefined') { %> <%- head %> <% } %> + + + + <% files.css.forEach(file => { %> + + <% }); %> + + +
+ + <% if (typeof globals !== 'undefined' && Object.keys(globals).length) { %> + + <% } %> + + + + diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/Color-BT4BG5DT.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/Color-BT4BG5DT.js new file mode 100644 index 0000000000000000000000000000000000000000..73f9787226169721dfe16891f0075678ff2ab57b --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/Color-BT4BG5DT.js @@ -0,0 +1,1109 @@ +import { + getControlId +} from "./chunk-YPBWNTGF.js"; +import "./chunk-NZMVUW5T.js"; +import { + __commonJS, + __toESM +} from "./chunk-IMSF75WX.js"; + +// ../../node_modules/color-name/index.js +var require_color_name = __commonJS({ + "../../node_modules/color-name/index.js"(exports, module) { + "use strict"; + module.exports = { + aliceblue: [240, 248, 255], + antiquewhite: [250, 235, 215], + aqua: [0, 255, 255], + aquamarine: [127, 255, 212], + azure: [240, 255, 255], + beige: [245, 245, 220], + bisque: [255, 228, 196], + black: [0, 0, 0], + blanchedalmond: [255, 235, 205], + blue: [0, 0, 255], + blueviolet: [138, 43, 226], + brown: [165, 42, 42], + burlywood: [222, 184, 135], + cadetblue: [95, 158, 160], + chartreuse: [127, 255, 0], + chocolate: [210, 105, 30], + coral: [255, 127, 80], + cornflowerblue: [100, 149, 237], + cornsilk: [255, 248, 220], + crimson: [220, 20, 60], + cyan: [0, 255, 255], + darkblue: [0, 0, 139], + darkcyan: [0, 139, 139], + darkgoldenrod: [184, 134, 11], + darkgray: [169, 169, 169], + darkgreen: [0, 100, 0], + darkgrey: [169, 169, 169], + darkkhaki: [189, 183, 107], + darkmagenta: [139, 0, 139], + darkolivegreen: [85, 107, 47], + darkorange: [255, 140, 0], + darkorchid: [153, 50, 204], + darkred: [139, 0, 0], + darksalmon: [233, 150, 122], + darkseagreen: [143, 188, 143], + darkslateblue: [72, 61, 139], + darkslategray: [47, 79, 79], + darkslategrey: [47, 79, 79], + darkturquoise: [0, 206, 209], + darkviolet: [148, 0, 211], + deeppink: [255, 20, 147], + deepskyblue: [0, 191, 255], + dimgray: [105, 105, 105], + dimgrey: [105, 105, 105], + dodgerblue: [30, 144, 255], + firebrick: [178, 34, 34], + floralwhite: [255, 250, 240], + forestgreen: [34, 139, 34], + fuchsia: [255, 0, 255], + gainsboro: [220, 220, 220], + ghostwhite: [248, 248, 255], + gold: [255, 215, 0], + goldenrod: [218, 165, 32], + gray: [128, 128, 128], + green: [0, 128, 0], + greenyellow: [173, 255, 47], + grey: [128, 128, 128], + honeydew: [240, 255, 240], + hotpink: [255, 105, 180], + indianred: [205, 92, 92], + indigo: [75, 0, 130], + ivory: [255, 255, 240], + khaki: [240, 230, 140], + lavender: [230, 230, 250], + lavenderblush: [255, 240, 245], + lawngreen: [124, 252, 0], + lemonchiffon: [255, 250, 205], + lightblue: [173, 216, 230], + lightcoral: [240, 128, 128], + lightcyan: [224, 255, 255], + lightgoldenrodyellow: [250, 250, 210], + lightgray: [211, 211, 211], + lightgreen: [144, 238, 144], + lightgrey: [211, 211, 211], + lightpink: [255, 182, 193], + lightsalmon: [255, 160, 122], + lightseagreen: [32, 178, 170], + lightskyblue: [135, 206, 250], + lightslategray: [119, 136, 153], + lightslategrey: [119, 136, 153], + lightsteelblue: [176, 196, 222], + lightyellow: [255, 255, 224], + lime: [0, 255, 0], + limegreen: [50, 205, 50], + linen: [250, 240, 230], + magenta: [255, 0, 255], + maroon: [128, 0, 0], + mediumaquamarine: [102, 205, 170], + mediumblue: [0, 0, 205], + mediumorchid: [186, 85, 211], + mediumpurple: [147, 112, 219], + mediumseagreen: [60, 179, 113], + mediumslateblue: [123, 104, 238], + mediumspringgreen: [0, 250, 154], + mediumturquoise: [72, 209, 204], + mediumvioletred: [199, 21, 133], + midnightblue: [25, 25, 112], + mintcream: [245, 255, 250], + mistyrose: [255, 228, 225], + moccasin: [255, 228, 181], + navajowhite: [255, 222, 173], + navy: [0, 0, 128], + oldlace: [253, 245, 230], + olive: [128, 128, 0], + olivedrab: [107, 142, 35], + orange: [255, 165, 0], + orangered: [255, 69, 0], + orchid: [218, 112, 214], + palegoldenrod: [238, 232, 170], + palegreen: [152, 251, 152], + paleturquoise: [175, 238, 238], + palevioletred: [219, 112, 147], + papayawhip: [255, 239, 213], + peachpuff: [255, 218, 185], + peru: [205, 133, 63], + pink: [255, 192, 203], + plum: [221, 160, 221], + powderblue: [176, 224, 230], + purple: [128, 0, 128], + rebeccapurple: [102, 51, 153], + red: [255, 0, 0], + rosybrown: [188, 143, 143], + royalblue: [65, 105, 225], + saddlebrown: [139, 69, 19], + salmon: [250, 128, 114], + sandybrown: [244, 164, 96], + seagreen: [46, 139, 87], + seashell: [255, 245, 238], + sienna: [160, 82, 45], + silver: [192, 192, 192], + skyblue: [135, 206, 235], + slateblue: [106, 90, 205], + slategray: [112, 128, 144], + slategrey: [112, 128, 144], + snow: [255, 250, 250], + springgreen: [0, 255, 127], + steelblue: [70, 130, 180], + tan: [210, 180, 140], + teal: [0, 128, 128], + thistle: [216, 191, 216], + tomato: [255, 99, 71], + turquoise: [64, 224, 208], + violet: [238, 130, 238], + wheat: [245, 222, 179], + white: [255, 255, 255], + whitesmoke: [245, 245, 245], + yellow: [255, 255, 0], + yellowgreen: [154, 205, 50] + }; + } +}); + +// ../../node_modules/color-convert/conversions.js +var require_conversions = __commonJS({ + "../../node_modules/color-convert/conversions.js"(exports, module) { + var cssKeywords = require_color_name(), reverseKeywords = {}; + for (let key of Object.keys(cssKeywords)) + reverseKeywords[cssKeywords[key]] = key; + var convert2 = { + rgb: { channels: 3, labels: "rgb" }, + hsl: { channels: 3, labels: "hsl" }, + hsv: { channels: 3, labels: "hsv" }, + hwb: { channels: 3, labels: "hwb" }, + cmyk: { channels: 4, labels: "cmyk" }, + xyz: { channels: 3, labels: "xyz" }, + lab: { channels: 3, labels: "lab" }, + lch: { channels: 3, labels: "lch" }, + hex: { channels: 1, labels: ["hex"] }, + keyword: { channels: 1, labels: ["keyword"] }, + ansi16: { channels: 1, labels: ["ansi16"] }, + ansi256: { channels: 1, labels: ["ansi256"] }, + hcg: { channels: 3, labels: ["h", "c", "g"] }, + apple: { channels: 3, labels: ["r16", "g16", "b16"] }, + gray: { channels: 1, labels: ["gray"] } + }; + module.exports = convert2; + for (let model of Object.keys(convert2)) { + if (!("channels" in convert2[model])) + throw new Error("missing channels property: " + model); + if (!("labels" in convert2[model])) + throw new Error("missing channel labels property: " + model); + if (convert2[model].labels.length !== convert2[model].channels) + throw new Error("channel and label counts mismatch: " + model); + let { channels, labels } = convert2[model]; + delete convert2[model].channels, delete convert2[model].labels, Object.defineProperty(convert2[model], "channels", { value: channels }), Object.defineProperty(convert2[model], "labels", { value: labels }); + } + convert2.rgb.hsl = function(rgb) { + let r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255, min = Math.min(r2, g2, b2), max = Math.max(r2, g2, b2), delta = max - min, h2, s2; + max === min ? h2 = 0 : r2 === max ? h2 = (g2 - b2) / delta : g2 === max ? h2 = 2 + (b2 - r2) / delta : b2 === max && (h2 = 4 + (r2 - g2) / delta), h2 = Math.min(h2 * 60, 360), h2 < 0 && (h2 += 360); + let l2 = (min + max) / 2; + return max === min ? s2 = 0 : l2 <= 0.5 ? s2 = delta / (max + min) : s2 = delta / (2 - max - min), [h2, s2 * 100, l2 * 100]; + }; + convert2.rgb.hsv = function(rgb) { + let rdif, gdif, bdif, h2, s2, r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255, v2 = Math.max(r2, g2, b2), diff = v2 - Math.min(r2, g2, b2), diffc = function(c2) { + return (v2 - c2) / 6 / diff + 1 / 2; + }; + return diff === 0 ? (h2 = 0, s2 = 0) : (s2 = diff / v2, rdif = diffc(r2), gdif = diffc(g2), bdif = diffc(b2), r2 === v2 ? h2 = bdif - gdif : g2 === v2 ? h2 = 1 / 3 + rdif - bdif : b2 === v2 && (h2 = 2 / 3 + gdif - rdif), h2 < 0 ? h2 += 1 : h2 > 1 && (h2 -= 1)), [ + h2 * 360, + s2 * 100, + v2 * 100 + ]; + }; + convert2.rgb.hwb = function(rgb) { + let r2 = rgb[0], g2 = rgb[1], b2 = rgb[2], h2 = convert2.rgb.hsl(rgb)[0], w2 = 1 / 255 * Math.min(r2, Math.min(g2, b2)); + return b2 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b2)), [h2, w2 * 100, b2 * 100]; + }; + convert2.rgb.cmyk = function(rgb) { + let r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255, k2 = Math.min(1 - r2, 1 - g2, 1 - b2), c2 = (1 - r2 - k2) / (1 - k2) || 0, m2 = (1 - g2 - k2) / (1 - k2) || 0, y2 = (1 - b2 - k2) / (1 - k2) || 0; + return [c2 * 100, m2 * 100, y2 * 100, k2 * 100]; + }; + function comparativeDistance(x2, y2) { + return (x2[0] - y2[0]) ** 2 + (x2[1] - y2[1]) ** 2 + (x2[2] - y2[2]) ** 2; + } + convert2.rgb.keyword = function(rgb) { + let reversed = reverseKeywords[rgb]; + if (reversed) + return reversed; + let currentClosestDistance = 1 / 0, currentClosestKeyword; + for (let keyword of Object.keys(cssKeywords)) { + let value = cssKeywords[keyword], distance = comparativeDistance(rgb, value); + distance < currentClosestDistance && (currentClosestDistance = distance, currentClosestKeyword = keyword); + } + return currentClosestKeyword; + }; + convert2.keyword.rgb = function(keyword) { + return cssKeywords[keyword]; + }; + convert2.rgb.xyz = function(rgb) { + let r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255; + r2 = r2 > 0.04045 ? ((r2 + 0.055) / 1.055) ** 2.4 : r2 / 12.92, g2 = g2 > 0.04045 ? ((g2 + 0.055) / 1.055) ** 2.4 : g2 / 12.92, b2 = b2 > 0.04045 ? ((b2 + 0.055) / 1.055) ** 2.4 : b2 / 12.92; + let x2 = r2 * 0.4124 + g2 * 0.3576 + b2 * 0.1805, y2 = r2 * 0.2126 + g2 * 0.7152 + b2 * 0.0722, z2 = r2 * 0.0193 + g2 * 0.1192 + b2 * 0.9505; + return [x2 * 100, y2 * 100, z2 * 100]; + }; + convert2.rgb.lab = function(rgb) { + let xyz = convert2.rgb.xyz(rgb), x2 = xyz[0], y2 = xyz[1], z2 = xyz[2]; + x2 /= 95.047, y2 /= 100, z2 /= 108.883, x2 = x2 > 8856e-6 ? x2 ** (1 / 3) : 7.787 * x2 + 16 / 116, y2 = y2 > 8856e-6 ? y2 ** (1 / 3) : 7.787 * y2 + 16 / 116, z2 = z2 > 8856e-6 ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116; + let l2 = 116 * y2 - 16, a2 = 500 * (x2 - y2), b2 = 200 * (y2 - z2); + return [l2, a2, b2]; + }; + convert2.hsl.rgb = function(hsl) { + let h2 = hsl[0] / 360, s2 = hsl[1] / 100, l2 = hsl[2] / 100, t2, t3, val; + if (s2 === 0) + return val = l2 * 255, [val, val, val]; + l2 < 0.5 ? t2 = l2 * (1 + s2) : t2 = l2 + s2 - l2 * s2; + let t1 = 2 * l2 - t2, rgb = [0, 0, 0]; + for (let i2 = 0; i2 < 3; i2++) + t3 = h2 + 1 / 3 * -(i2 - 1), t3 < 0 && t3++, t3 > 1 && t3--, 6 * t3 < 1 ? val = t1 + (t2 - t1) * 6 * t3 : 2 * t3 < 1 ? val = t2 : 3 * t3 < 2 ? val = t1 + (t2 - t1) * (2 / 3 - t3) * 6 : val = t1, rgb[i2] = val * 255; + return rgb; + }; + convert2.hsl.hsv = function(hsl) { + let h2 = hsl[0], s2 = hsl[1] / 100, l2 = hsl[2] / 100, smin = s2, lmin = Math.max(l2, 0.01); + l2 *= 2, s2 *= l2 <= 1 ? l2 : 2 - l2, smin *= lmin <= 1 ? lmin : 2 - lmin; + let v2 = (l2 + s2) / 2, sv = l2 === 0 ? 2 * smin / (lmin + smin) : 2 * s2 / (l2 + s2); + return [h2, sv * 100, v2 * 100]; + }; + convert2.hsv.rgb = function(hsv) { + let h2 = hsv[0] / 60, s2 = hsv[1] / 100, v2 = hsv[2] / 100, hi = Math.floor(h2) % 6, f2 = h2 - Math.floor(h2), p2 = 255 * v2 * (1 - s2), q2 = 255 * v2 * (1 - s2 * f2), t2 = 255 * v2 * (1 - s2 * (1 - f2)); + switch (v2 *= 255, hi) { + case 0: + return [v2, t2, p2]; + case 1: + return [q2, v2, p2]; + case 2: + return [p2, v2, t2]; + case 3: + return [p2, q2, v2]; + case 4: + return [t2, p2, v2]; + case 5: + return [v2, p2, q2]; + } + }; + convert2.hsv.hsl = function(hsv) { + let h2 = hsv[0], s2 = hsv[1] / 100, v2 = hsv[2] / 100, vmin = Math.max(v2, 0.01), sl, l2; + l2 = (2 - s2) * v2; + let lmin = (2 - s2) * vmin; + return sl = s2 * vmin, sl /= lmin <= 1 ? lmin : 2 - lmin, sl = sl || 0, l2 /= 2, [h2, sl * 100, l2 * 100]; + }; + convert2.hwb.rgb = function(hwb) { + let h2 = hwb[0] / 360, wh = hwb[1] / 100, bl = hwb[2] / 100, ratio = wh + bl, f2; + ratio > 1 && (wh /= ratio, bl /= ratio); + let i2 = Math.floor(6 * h2), v2 = 1 - bl; + f2 = 6 * h2 - i2, (i2 & 1) !== 0 && (f2 = 1 - f2); + let n2 = wh + f2 * (v2 - wh), r2, g2, b2; + switch (i2) { + default: + case 6: + case 0: + r2 = v2, g2 = n2, b2 = wh; + break; + case 1: + r2 = n2, g2 = v2, b2 = wh; + break; + case 2: + r2 = wh, g2 = v2, b2 = n2; + break; + case 3: + r2 = wh, g2 = n2, b2 = v2; + break; + case 4: + r2 = n2, g2 = wh, b2 = v2; + break; + case 5: + r2 = v2, g2 = wh, b2 = n2; + break; + } + return [r2 * 255, g2 * 255, b2 * 255]; + }; + convert2.cmyk.rgb = function(cmyk) { + let c2 = cmyk[0] / 100, m2 = cmyk[1] / 100, y2 = cmyk[2] / 100, k2 = cmyk[3] / 100, r2 = 1 - Math.min(1, c2 * (1 - k2) + k2), g2 = 1 - Math.min(1, m2 * (1 - k2) + k2), b2 = 1 - Math.min(1, y2 * (1 - k2) + k2); + return [r2 * 255, g2 * 255, b2 * 255]; + }; + convert2.xyz.rgb = function(xyz) { + let x2 = xyz[0] / 100, y2 = xyz[1] / 100, z2 = xyz[2] / 100, r2, g2, b2; + return r2 = x2 * 3.2406 + y2 * -1.5372 + z2 * -0.4986, g2 = x2 * -0.9689 + y2 * 1.8758 + z2 * 0.0415, b2 = x2 * 0.0557 + y2 * -0.204 + z2 * 1.057, r2 = r2 > 31308e-7 ? 1.055 * r2 ** (1 / 2.4) - 0.055 : r2 * 12.92, g2 = g2 > 31308e-7 ? 1.055 * g2 ** (1 / 2.4) - 0.055 : g2 * 12.92, b2 = b2 > 31308e-7 ? 1.055 * b2 ** (1 / 2.4) - 0.055 : b2 * 12.92, r2 = Math.min(Math.max(0, r2), 1), g2 = Math.min(Math.max(0, g2), 1), b2 = Math.min(Math.max(0, b2), 1), [r2 * 255, g2 * 255, b2 * 255]; + }; + convert2.xyz.lab = function(xyz) { + let x2 = xyz[0], y2 = xyz[1], z2 = xyz[2]; + x2 /= 95.047, y2 /= 100, z2 /= 108.883, x2 = x2 > 8856e-6 ? x2 ** (1 / 3) : 7.787 * x2 + 16 / 116, y2 = y2 > 8856e-6 ? y2 ** (1 / 3) : 7.787 * y2 + 16 / 116, z2 = z2 > 8856e-6 ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116; + let l2 = 116 * y2 - 16, a2 = 500 * (x2 - y2), b2 = 200 * (y2 - z2); + return [l2, a2, b2]; + }; + convert2.lab.xyz = function(lab) { + let l2 = lab[0], a2 = lab[1], b2 = lab[2], x2, y2, z2; + y2 = (l2 + 16) / 116, x2 = a2 / 500 + y2, z2 = y2 - b2 / 200; + let y22 = y2 ** 3, x22 = x2 ** 3, z22 = z2 ** 3; + return y2 = y22 > 8856e-6 ? y22 : (y2 - 16 / 116) / 7.787, x2 = x22 > 8856e-6 ? x22 : (x2 - 16 / 116) / 7.787, z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787, x2 *= 95.047, y2 *= 100, z2 *= 108.883, [x2, y2, z2]; + }; + convert2.lab.lch = function(lab) { + let l2 = lab[0], a2 = lab[1], b2 = lab[2], h2; + h2 = Math.atan2(b2, a2) * 360 / 2 / Math.PI, h2 < 0 && (h2 += 360); + let c2 = Math.sqrt(a2 * a2 + b2 * b2); + return [l2, c2, h2]; + }; + convert2.lch.lab = function(lch) { + let l2 = lch[0], c2 = lch[1], hr = lch[2] / 360 * 2 * Math.PI, a2 = c2 * Math.cos(hr), b2 = c2 * Math.sin(hr); + return [l2, a2, b2]; + }; + convert2.rgb.ansi16 = function(args, saturation = null) { + let [r2, g2, b2] = args, value = saturation === null ? convert2.rgb.hsv(args)[2] : saturation; + if (value = Math.round(value / 50), value === 0) + return 30; + let ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255)); + return value === 2 && (ansi += 60), ansi; + }; + convert2.hsv.ansi16 = function(args) { + return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]); + }; + convert2.rgb.ansi256 = function(args) { + let r2 = args[0], g2 = args[1], b2 = args[2]; + return r2 === g2 && g2 === b2 ? r2 < 8 ? 16 : r2 > 248 ? 231 : Math.round((r2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b2 / 255 * 5); + }; + convert2.ansi16.rgb = function(args) { + let color = args % 10; + if (color === 0 || color === 7) + return args > 50 && (color += 3.5), color = color / 10.5 * 255, [color, color, color]; + let mult = (~~(args > 50) + 1) * 0.5, r2 = (color & 1) * mult * 255, g2 = (color >> 1 & 1) * mult * 255, b2 = (color >> 2 & 1) * mult * 255; + return [r2, g2, b2]; + }; + convert2.ansi256.rgb = function(args) { + if (args >= 232) { + let c2 = (args - 232) * 10 + 8; + return [c2, c2, c2]; + } + args -= 16; + let rem, r2 = Math.floor(args / 36) / 5 * 255, g2 = Math.floor((rem = args % 36) / 6) / 5 * 255, b2 = rem % 6 / 5 * 255; + return [r2, g2, b2]; + }; + convert2.rgb.hex = function(args) { + let string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert2.hex.rgb = function(args) { + let match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) + return [0, 0, 0]; + let colorString = match[0]; + match[0].length === 3 && (colorString = colorString.split("").map((char) => char + char).join("")); + let integer = parseInt(colorString, 16), r2 = integer >> 16 & 255, g2 = integer >> 8 & 255, b2 = integer & 255; + return [r2, g2, b2]; + }; + convert2.rgb.hcg = function(rgb) { + let r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255, max = Math.max(Math.max(r2, g2), b2), min = Math.min(Math.min(r2, g2), b2), chroma = max - min, grayscale, hue; + return chroma < 1 ? grayscale = min / (1 - chroma) : grayscale = 0, chroma <= 0 ? hue = 0 : max === r2 ? hue = (g2 - b2) / chroma % 6 : max === g2 ? hue = 2 + (b2 - r2) / chroma : hue = 4 + (r2 - g2) / chroma, hue /= 6, hue %= 1, [hue * 360, chroma * 100, grayscale * 100]; + }; + convert2.hsl.hcg = function(hsl) { + let s2 = hsl[1] / 100, l2 = hsl[2] / 100, c2 = l2 < 0.5 ? 2 * s2 * l2 : 2 * s2 * (1 - l2), f2 = 0; + return c2 < 1 && (f2 = (l2 - 0.5 * c2) / (1 - c2)), [hsl[0], c2 * 100, f2 * 100]; + }; + convert2.hsv.hcg = function(hsv) { + let s2 = hsv[1] / 100, v2 = hsv[2] / 100, c2 = s2 * v2, f2 = 0; + return c2 < 1 && (f2 = (v2 - c2) / (1 - c2)), [hsv[0], c2 * 100, f2 * 100]; + }; + convert2.hcg.rgb = function(hcg) { + let h2 = hcg[0] / 360, c2 = hcg[1] / 100, g2 = hcg[2] / 100; + if (c2 === 0) + return [g2 * 255, g2 * 255, g2 * 255]; + let pure = [0, 0, 0], hi = h2 % 1 * 6, v2 = hi % 1, w2 = 1 - v2, mg = 0; + switch (Math.floor(hi)) { + case 0: + pure[0] = 1, pure[1] = v2, pure[2] = 0; + break; + case 1: + pure[0] = w2, pure[1] = 1, pure[2] = 0; + break; + case 2: + pure[0] = 0, pure[1] = 1, pure[2] = v2; + break; + case 3: + pure[0] = 0, pure[1] = w2, pure[2] = 1; + break; + case 4: + pure[0] = v2, pure[1] = 0, pure[2] = 1; + break; + default: + pure[0] = 1, pure[1] = 0, pure[2] = w2; + } + return mg = (1 - c2) * g2, [ + (c2 * pure[0] + mg) * 255, + (c2 * pure[1] + mg) * 255, + (c2 * pure[2] + mg) * 255 + ]; + }; + convert2.hcg.hsv = function(hcg) { + let c2 = hcg[1] / 100, g2 = hcg[2] / 100, v2 = c2 + g2 * (1 - c2), f2 = 0; + return v2 > 0 && (f2 = c2 / v2), [hcg[0], f2 * 100, v2 * 100]; + }; + convert2.hcg.hsl = function(hcg) { + let c2 = hcg[1] / 100, l2 = hcg[2] / 100 * (1 - c2) + 0.5 * c2, s2 = 0; + return l2 > 0 && l2 < 0.5 ? s2 = c2 / (2 * l2) : l2 >= 0.5 && l2 < 1 && (s2 = c2 / (2 * (1 - l2))), [hcg[0], s2 * 100, l2 * 100]; + }; + convert2.hcg.hwb = function(hcg) { + let c2 = hcg[1] / 100, g2 = hcg[2] / 100, v2 = c2 + g2 * (1 - c2); + return [hcg[0], (v2 - c2) * 100, (1 - v2) * 100]; + }; + convert2.hwb.hcg = function(hwb) { + let w2 = hwb[1] / 100, v2 = 1 - hwb[2] / 100, c2 = v2 - w2, g2 = 0; + return c2 < 1 && (g2 = (v2 - c2) / (1 - c2)), [hwb[0], c2 * 100, g2 * 100]; + }; + convert2.apple.rgb = function(apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + convert2.rgb.apple = function(rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + convert2.gray.rgb = function(args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; + }; + convert2.gray.hsl = function(args) { + return [0, 0, args[0]]; + }; + convert2.gray.hsv = convert2.gray.hsl; + convert2.gray.hwb = function(gray) { + return [0, 100, gray[0]]; + }; + convert2.gray.cmyk = function(gray) { + return [0, 0, 0, gray[0]]; + }; + convert2.gray.lab = function(gray) { + return [gray[0], 0, 0]; + }; + convert2.gray.hex = function(gray) { + let val = Math.round(gray[0] / 100 * 255) & 255, string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert2.rgb.gray = function(rgb) { + return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100]; + }; + } +}); + +// ../../node_modules/color-convert/route.js +var require_route = __commonJS({ + "../../node_modules/color-convert/route.js"(exports, module) { + var conversions = require_conversions(); + function buildGraph() { + let graph = {}, models = Object.keys(conversions); + for (let len = models.length, i2 = 0; i2 < len; i2++) + graph[models[i2]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + return graph; + } + function deriveBFS(fromModel) { + let graph = buildGraph(), queue = [fromModel]; + for (graph[fromModel].distance = 0; queue.length; ) { + let current = queue.pop(), adjacents = Object.keys(conversions[current]); + for (let len = adjacents.length, i2 = 0; i2 < len; i2++) { + let adjacent = adjacents[i2], node = graph[adjacent]; + node.distance === -1 && (node.distance = graph[current].distance + 1, node.parent = current, queue.unshift(adjacent)); + } + } + return graph; + } + function link(from, to) { + return function(args) { + return to(from(args)); + }; + } + function wrapConversion(toModel, graph) { + let path = [graph[toModel].parent, toModel], fn = conversions[graph[toModel].parent][toModel], cur = graph[toModel].parent; + for (; graph[cur].parent; ) + path.unshift(graph[cur].parent), fn = link(conversions[graph[cur].parent][cur], fn), cur = graph[cur].parent; + return fn.conversion = path, fn; + } + module.exports = function(fromModel) { + let graph = deriveBFS(fromModel), conversion = {}, models = Object.keys(graph); + for (let len = models.length, i2 = 0; i2 < len; i2++) { + let toModel = models[i2]; + graph[toModel].parent !== null && (conversion[toModel] = wrapConversion(toModel, graph)); + } + return conversion; + }; + } +}); + +// ../../node_modules/color-convert/index.js +var require_color_convert = __commonJS({ + "../../node_modules/color-convert/index.js"(exports, module) { + var conversions = require_conversions(), route = require_route(), convert2 = {}, models = Object.keys(conversions); + function wrapRaw(fn) { + let wrappedFn = function(...args) { + let arg0 = args[0]; + return arg0 == null ? arg0 : (arg0.length > 1 && (args = arg0), fn(args)); + }; + return "conversion" in fn && (wrappedFn.conversion = fn.conversion), wrappedFn; + } + function wrapRounded(fn) { + let wrappedFn = function(...args) { + let arg0 = args[0]; + if (arg0 == null) + return arg0; + arg0.length > 1 && (args = arg0); + let result = fn(args); + if (typeof result == "object") + for (let len = result.length, i2 = 0; i2 < len; i2++) + result[i2] = Math.round(result[i2]); + return result; + }; + return "conversion" in fn && (wrappedFn.conversion = fn.conversion), wrappedFn; + } + models.forEach((fromModel) => { + convert2[fromModel] = {}, Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels }), Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels }); + let routes = route(fromModel); + Object.keys(routes).forEach((toModel) => { + let fn = routes[toModel]; + convert2[fromModel][toModel] = wrapRounded(fn), convert2[fromModel][toModel].raw = wrapRaw(fn); + }); + }); + module.exports = convert2; + } +}); + +// ../addons/docs/src/blocks/controls/Color.tsx +var import_color_convert = __toESM(require_color_convert(), 1); +import React, { useCallback, useEffect, useMemo, useState } from "react"; +import { Button, Form, PopoverProvider } from "storybook/internal/components"; +import { MarkupIcon } from "@storybook/icons"; + +// ../../node_modules/es-toolkit/dist/function/debounce.mjs +function debounce(func, debounceMs, { signal, edges } = {}) { + let pendingThis, pendingArgs = null, leading = edges != null && edges.includes("leading"), trailing = edges == null || edges.includes("trailing"), invoke = () => { + pendingArgs !== null && (func.apply(pendingThis, pendingArgs), pendingThis = void 0, pendingArgs = null); + }, onTimerEnd = () => { + trailing && invoke(), cancel(); + }, timeoutId = null, schedule = () => { + timeoutId != null && clearTimeout(timeoutId), timeoutId = setTimeout(() => { + timeoutId = null, onTimerEnd(); + }, debounceMs); + }, cancelTimer = () => { + timeoutId !== null && (clearTimeout(timeoutId), timeoutId = null); + }, cancel = () => { + cancelTimer(), pendingThis = void 0, pendingArgs = null; + }, flush = () => { + invoke(); + }, debounced = function(...args) { + if (signal?.aborted) + return; + pendingThis = this, pendingArgs = args; + let isFirstCall = timeoutId == null; + schedule(), leading && isFirstCall && invoke(); + }; + return debounced.schedule = schedule, debounced.cancel = cancel, debounced.flush = flush, signal?.addEventListener("abort", cancel, { once: !0 }), debounced; +} + +// ../../node_modules/es-toolkit/dist/function/partial.mjs +function partial(func, ...partialArgs) { + return partialImpl(func, placeholderSymbol, ...partialArgs); +} +function partialImpl(func, placeholder, ...partialArgs) { + let partialed = function(...providedArgs) { + let providedArgsIndex = 0, substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg), remainingArgs = providedArgs.slice(providedArgsIndex); + return func.apply(this, substitutedArgs.concat(remainingArgs)); + }; + return func.prototype && (partialed.prototype = Object.create(func.prototype)), partialed; +} +var placeholderSymbol = /* @__PURE__ */ Symbol("partial.placeholder"); +partial.placeholder = placeholderSymbol; + +// ../../node_modules/es-toolkit/dist/function/partialRight.mjs +function partialRight(func, ...partialArgs) { + return partialRightImpl(func, placeholderSymbol2, ...partialArgs); +} +function partialRightImpl(func, placeholder, ...partialArgs) { + let partialedRight = function(...providedArgs) { + let placeholderLength = partialArgs.filter((arg) => arg === placeholder).length, rangeLength = Math.max(providedArgs.length - placeholderLength, 0), remainingArgs = providedArgs.slice(0, rangeLength), providedArgsIndex = rangeLength, substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg); + return func.apply(this, remainingArgs.concat(substitutedArgs)); + }; + return func.prototype && (partialedRight.prototype = Object.create(func.prototype)), partialedRight; +} +var placeholderSymbol2 = /* @__PURE__ */ Symbol("partialRight.placeholder"); +partialRight.placeholder = placeholderSymbol2; + +// ../../node_modules/es-toolkit/dist/function/retry.mjs +var DEFAULT_RETRIES = Number.POSITIVE_INFINITY; + +// ../../node_modules/react-colorful/dist/index.mjs +import e, { useRef as r, useMemo as t, useEffect as n, useState as o, useCallback as a, useLayoutEffect as l } from "react"; +function u() { + return (u = Object.assign || function(e2) { + for (var r2 = 1; r2 < arguments.length; r2++) { + var t2 = arguments[r2]; + for (var n2 in t2) Object.prototype.hasOwnProperty.call(t2, n2) && (e2[n2] = t2[n2]); + } + return e2; + }).apply(this, arguments); +} +function c(e2, r2) { + if (e2 == null) return {}; + var t2, n2, o2 = {}, a2 = Object.keys(e2); + for (n2 = 0; n2 < a2.length; n2++) r2.indexOf(t2 = a2[n2]) >= 0 || (o2[t2] = e2[t2]); + return o2; +} +function i(e2) { + var t2 = r(e2), n2 = r(function(e3) { + t2.current && t2.current(e3); + }); + return t2.current = e2, n2.current; +} +var s = function(e2, r2, t2) { + return r2 === void 0 && (r2 = 0), t2 === void 0 && (t2 = 1), e2 > t2 ? t2 : e2 < r2 ? r2 : e2; +}, f = function(e2) { + return "touches" in e2; +}, v = function(e2) { + return e2 && e2.ownerDocument.defaultView || self; +}, d = function(e2, r2, t2) { + var n2 = e2.getBoundingClientRect(), o2 = f(r2) ? (function(e3, r3) { + for (var t3 = 0; t3 < e3.length; t3++) if (e3[t3].identifier === r3) return e3[t3]; + return e3[0]; + })(r2.touches, t2) : r2; + return { left: s((o2.pageX - (n2.left + v(e2).pageXOffset)) / n2.width), top: s((o2.pageY - (n2.top + v(e2).pageYOffset)) / n2.height) }; +}, h = function(e2) { + !f(e2) && e2.preventDefault(); +}, m = e.memo(function(o2) { + var a2 = o2.onMove, l2 = o2.onKey, s2 = c(o2, ["onMove", "onKey"]), m2 = r(null), g2 = i(a2), p2 = i(l2), b2 = r(null), _2 = r(!1), x2 = t(function() { + var e2 = function(e3) { + h(e3), (f(e3) ? e3.touches.length > 0 : e3.buttons > 0) && m2.current ? g2(d(m2.current, e3, b2.current)) : t2(!1); + }, r2 = function() { + return t2(!1); + }; + function t2(t3) { + var n2 = _2.current, o3 = v(m2.current), a3 = t3 ? o3.addEventListener : o3.removeEventListener; + a3(n2 ? "touchmove" : "mousemove", e2), a3(n2 ? "touchend" : "mouseup", r2); + } + return [function(e3) { + var r3 = e3.nativeEvent, n2 = m2.current; + if (n2 && (h(r3), !(function(e4, r4) { + return r4 && !f(e4); + })(r3, _2.current) && n2)) { + if (f(r3)) { + _2.current = !0; + var o3 = r3.changedTouches || []; + o3.length && (b2.current = o3[0].identifier); + } + n2.focus(), g2(d(n2, r3, b2.current)), t2(!0); + } + }, function(e3) { + var r3 = e3.which || e3.keyCode; + r3 < 37 || r3 > 40 || (e3.preventDefault(), p2({ left: r3 === 39 ? 0.05 : r3 === 37 ? -0.05 : 0, top: r3 === 40 ? 0.05 : r3 === 38 ? -0.05 : 0 })); + }, t2]; + }, [p2, g2]), C2 = x2[0], E2 = x2[1], H2 = x2[2]; + return n(function() { + return H2; + }, [H2]), e.createElement("div", u({}, s2, { onTouchStart: C2, onMouseDown: C2, className: "react-colorful__interactive", ref: m2, onKeyDown: E2, tabIndex: 0, role: "slider" })); +}), g = function(e2) { + return e2.filter(Boolean).join(" "); +}, p = function(r2) { + var t2 = r2.color, n2 = r2.left, o2 = r2.top, a2 = o2 === void 0 ? 0.5 : o2, l2 = g(["react-colorful__pointer", r2.className]); + return e.createElement("div", { className: l2, style: { top: 100 * a2 + "%", left: 100 * n2 + "%" } }, e.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: t2 } })); +}, b = function(e2, r2, t2) { + return r2 === void 0 && (r2 = 0), t2 === void 0 && (t2 = Math.pow(10, r2)), Math.round(t2 * e2) / t2; +}, _ = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, x = function(e2) { + return L(C(e2)); +}, C = function(e2) { + return e2[0] === "#" && (e2 = e2.substring(1)), e2.length < 6 ? { r: parseInt(e2[0] + e2[0], 16), g: parseInt(e2[1] + e2[1], 16), b: parseInt(e2[2] + e2[2], 16), a: e2.length === 4 ? b(parseInt(e2[3] + e2[3], 16) / 255, 2) : 1 } : { r: parseInt(e2.substring(0, 2), 16), g: parseInt(e2.substring(2, 4), 16), b: parseInt(e2.substring(4, 6), 16), a: e2.length === 8 ? b(parseInt(e2.substring(6, 8), 16) / 255, 2) : 1 }; +}, E = function(e2, r2) { + return r2 === void 0 && (r2 = "deg"), Number(e2) * (_[r2] || 1); +}, H = function(e2) { + var r2 = /hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e2); + return r2 ? N({ h: E(r2[1], r2[2]), s: Number(r2[3]), l: Number(r2[4]), a: r2[5] === void 0 ? 1 : Number(r2[5]) / (r2[6] ? 100 : 1) }) : { h: 0, s: 0, v: 0, a: 1 }; +}; +var N = function(e2) { + var r2 = e2.s, t2 = e2.l; + return { h: e2.h, s: (r2 *= (t2 < 50 ? t2 : 100 - t2) / 100) > 0 ? 2 * r2 / (t2 + r2) * 100 : 0, v: t2 + r2, a: e2.a }; +}, w = function(e2) { + return K(I(e2)); +}, y = function(e2) { + var r2 = e2.s, t2 = e2.v, n2 = e2.a, o2 = (200 - r2) * t2 / 100; + return { h: b(e2.h), s: b(o2 > 0 && o2 < 200 ? r2 * t2 / 100 / (o2 <= 100 ? o2 : 200 - o2) * 100 : 0), l: b(o2 / 2), a: b(n2, 2) }; +}, q = function(e2) { + var r2 = y(e2); + return "hsl(" + r2.h + ", " + r2.s + "%, " + r2.l + "%)"; +}, k = function(e2) { + var r2 = y(e2); + return "hsla(" + r2.h + ", " + r2.s + "%, " + r2.l + "%, " + r2.a + ")"; +}, I = function(e2) { + var r2 = e2.h, t2 = e2.s, n2 = e2.v, o2 = e2.a; + r2 = r2 / 360 * 6, t2 /= 100, n2 /= 100; + var a2 = Math.floor(r2), l2 = n2 * (1 - t2), u2 = n2 * (1 - (r2 - a2) * t2), c2 = n2 * (1 - (1 - r2 + a2) * t2), i2 = a2 % 6; + return { r: b(255 * [n2, u2, l2, l2, c2, n2][i2]), g: b(255 * [c2, n2, n2, u2, l2, l2][i2]), b: b(255 * [l2, l2, c2, n2, n2, u2][i2]), a: b(o2, 2) }; +}; +var z = function(e2) { + var r2 = /rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e2); + return r2 ? L({ r: Number(r2[1]) / (r2[2] ? 100 / 255 : 1), g: Number(r2[3]) / (r2[4] ? 100 / 255 : 1), b: Number(r2[5]) / (r2[6] ? 100 / 255 : 1), a: r2[7] === void 0 ? 1 : Number(r2[7]) / (r2[8] ? 100 : 1) }) : { h: 0, s: 0, v: 0, a: 1 }; +}; +var D = function(e2) { + var r2 = e2.toString(16); + return r2.length < 2 ? "0" + r2 : r2; +}, K = function(e2) { + var r2 = e2.r, t2 = e2.g, n2 = e2.b, o2 = e2.a, a2 = o2 < 1 ? D(b(255 * o2)) : ""; + return "#" + D(r2) + D(t2) + D(n2) + a2; +}, L = function(e2) { + var r2 = e2.r, t2 = e2.g, n2 = e2.b, o2 = e2.a, a2 = Math.max(r2, t2, n2), l2 = a2 - Math.min(r2, t2, n2), u2 = l2 ? a2 === r2 ? (t2 - n2) / l2 : a2 === t2 ? 2 + (n2 - r2) / l2 : 4 + (r2 - t2) / l2 : 0; + return { h: b(60 * (u2 < 0 ? u2 + 6 : u2)), s: b(a2 ? l2 / a2 * 100 : 0), v: b(a2 / 255 * 100), a: o2 }; +}; +var S = e.memo(function(r2) { + var t2 = r2.hue, n2 = r2.onChange, o2 = g(["react-colorful__hue", r2.className]); + return e.createElement("div", { className: o2 }, e.createElement(m, { onMove: function(e2) { + n2({ h: 360 * e2.left }); + }, onKey: function(e2) { + n2({ h: s(t2 + 360 * e2.left, 0, 360) }); + }, "aria-label": "Hue", "aria-valuenow": b(t2), "aria-valuemax": "360", "aria-valuemin": "0" }, e.createElement(p, { className: "react-colorful__hue-pointer", left: t2 / 360, color: q({ h: t2, s: 100, v: 100, a: 1 }) }))); +}), T = e.memo(function(r2) { + var t2 = r2.hsva, n2 = r2.onChange, o2 = { backgroundColor: q({ h: t2.h, s: 100, v: 100, a: 1 }) }; + return e.createElement("div", { className: "react-colorful__saturation", style: o2 }, e.createElement(m, { onMove: function(e2) { + n2({ s: 100 * e2.left, v: 100 - 100 * e2.top }); + }, onKey: function(e2) { + n2({ s: s(t2.s + 100 * e2.left, 0, 100), v: s(t2.v - 100 * e2.top, 0, 100) }); + }, "aria-label": "Color", "aria-valuetext": "Saturation " + b(t2.s) + "%, Brightness " + b(t2.v) + "%" }, e.createElement(p, { className: "react-colorful__saturation-pointer", top: 1 - t2.v / 100, left: t2.s / 100, color: q(t2) }))); +}), F = function(e2, r2) { + if (e2 === r2) return !0; + for (var t2 in e2) if (e2[t2] !== r2[t2]) return !1; + return !0; +}, P = function(e2, r2) { + return e2.replace(/\s/g, "") === r2.replace(/\s/g, ""); +}, X = function(e2, r2) { + return e2.toLowerCase() === r2.toLowerCase() || F(C(e2), C(r2)); +}; +function Y(e2, t2, l2) { + var u2 = i(l2), c2 = o(function() { + return e2.toHsva(t2); + }), s2 = c2[0], f2 = c2[1], v2 = r({ color: t2, hsva: s2 }); + n(function() { + if (!e2.equal(t2, v2.current.color)) { + var r2 = e2.toHsva(t2); + v2.current = { hsva: r2, color: t2 }, f2(r2); + } + }, [t2, e2]), n(function() { + var r2; + F(s2, v2.current.hsva) || e2.equal(r2 = e2.fromHsva(s2), v2.current.color) || (v2.current = { hsva: s2, color: r2 }, u2(r2)); + }, [s2, e2, u2]); + var d2 = a(function(e3) { + f2(function(r2) { + return Object.assign({}, r2, e3); + }); + }, []); + return [s2, d2]; +} +var R, V = typeof window < "u" ? l : n, $ = function() { + return R || (typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0); +}; +var J = /* @__PURE__ */ new Map(), Q = function(e2) { + V(function() { + var r2 = e2.current ? e2.current.ownerDocument : document; + if (r2 !== void 0 && !J.has(r2)) { + var t2 = r2.createElement("style"); + t2.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, J.set(r2, t2); + var n2 = $(); + n2 && t2.setAttribute("nonce", n2), r2.head.appendChild(t2); + } + }, []); +}, U = function(t2) { + var n2 = t2.className, o2 = t2.colorModel, a2 = t2.color, l2 = a2 === void 0 ? o2.defaultColor : a2, i2 = t2.onChange, s2 = c(t2, ["className", "colorModel", "color", "onChange"]), f2 = r(null); + Q(f2); + var v2 = Y(o2, l2, i2), d2 = v2[0], h2 = v2[1], m2 = g(["react-colorful", n2]); + return e.createElement("div", u({}, s2, { ref: f2, className: m2 }), e.createElement(T, { hsva: d2, onChange: h2 }), e.createElement(S, { hue: d2.h, onChange: h2, className: "react-colorful__last-control" })); +}, W = { defaultColor: "000", toHsva: x, fromHsva: function(e2) { + return w({ h: e2.h, s: e2.s, v: e2.v, a: 1 }); +}, equal: X }, Z = function(r2) { + return e.createElement(U, u({}, r2, { colorModel: W })); +}, ee = function(r2) { + var t2 = r2.className, n2 = r2.hsva, o2 = r2.onChange, a2 = { backgroundImage: "linear-gradient(90deg, " + k(Object.assign({}, n2, { a: 0 })) + ", " + k(Object.assign({}, n2, { a: 1 })) + ")" }, l2 = g(["react-colorful__alpha", t2]), u2 = b(100 * n2.a); + return e.createElement("div", { className: l2 }, e.createElement("div", { className: "react-colorful__alpha-gradient", style: a2 }), e.createElement(m, { onMove: function(e2) { + o2({ a: e2.left }); + }, onKey: function(e2) { + o2({ a: s(n2.a + e2.left) }); + }, "aria-label": "Alpha", "aria-valuetext": u2 + "%", "aria-valuenow": u2, "aria-valuemin": "0", "aria-valuemax": "100" }, e.createElement(p, { className: "react-colorful__alpha-pointer", left: n2.a, color: k(n2) }))); +}, re = function(t2) { + var n2 = t2.className, o2 = t2.colorModel, a2 = t2.color, l2 = a2 === void 0 ? o2.defaultColor : a2, i2 = t2.onChange, s2 = c(t2, ["className", "colorModel", "color", "onChange"]), f2 = r(null); + Q(f2); + var v2 = Y(o2, l2, i2), d2 = v2[0], h2 = v2[1], m2 = g(["react-colorful", n2]); + return e.createElement("div", u({}, s2, { ref: f2, className: m2 }), e.createElement(T, { hsva: d2, onChange: h2 }), e.createElement(S, { hue: d2.h, onChange: h2 }), e.createElement(ee, { hsva: d2, onChange: h2, className: "react-colorful__last-control" })); +}; +var le = { defaultColor: "hsla(0, 0%, 0%, 1)", toHsva: H, fromHsva: k, equal: P }, ue = function(r2) { + return e.createElement(re, u({}, r2, { colorModel: le })); +}; +var Ee = { defaultColor: "rgba(0, 0, 0, 1)", toHsva: z, fromHsva: function(e2) { + var r2 = I(e2); + return "rgba(" + r2.r + ", " + r2.g + ", " + r2.b + ", " + r2.a + ")"; +}, equal: P }, He = function(r2) { + return e.createElement(re, u({}, r2, { colorModel: Ee })); +}; + +// ../addons/docs/src/blocks/controls/Color.tsx +import { styled } from "storybook/theming"; +var Wrapper = styled.div({ + position: "relative", + maxWidth: 250 +}), TooltipContent = styled.div({ + width: 200, + margin: 5, + ".react-colorful__saturation": { + borderRadius: "4px 4px 0 0" + }, + ".react-colorful__hue": { + boxShadow: "inset 0 0 0 1px rgb(0 0 0 / 5%)" + }, + ".react-colorful__last-control": { + borderRadius: "0 0 4px 4px" + } +}), Swatches = styled.div({ + display: "grid", + gridTemplateColumns: "repeat(9, 16px)", + gap: 6, + padding: 3, + marginTop: 5, + width: 200 +}), swatchBackground = (isDark) => `url('data:image/svg+xml;charset=utf-8,')`, SwatchColor = styled(Button)( + ({ value, selected, theme }) => ({ + width: 16, + height: 16, + boxShadow: selected ? `${theme.appBorderColor} 0 0 0 1px inset, ${theme.textMutedColor}50 0 0 0 4px` : `${theme.appBorderColor} 0 0 0 1px inset`, + border: "none", + borderRadius: theme.appBorderRadius, + "&, &:hover": { + background: "unset", + backgroundColor: "unset", + backgroundImage: `linear-gradient(${value}, ${value}), ${swatchBackground(theme.base === "dark")}` + } + }) +), Input = styled(Form.Input)(({ theme }) => ({ + width: "100%", + paddingLeft: 30, + paddingRight: 30, + boxSizing: "border-box", + fontFamily: theme.typography.fonts.base, + '[aria-readonly="true"] > &': { + background: theme.base === "light" ? theme.color.lighter : "transparent" + } +})), PopoverTrigger = styled(SwatchColor)(({ disabled }) => ({ + position: "absolute", + top: 4, + left: 4, + zIndex: 1, + cursor: disabled ? "not-allowed" : "pointer" +})), CycleColorSpaceButton = styled(Button)(({ theme }) => ({ + position: "absolute", + zIndex: 1, + top: 6, + right: 7, + width: 20, + height: 20, + padding: 4, + boxSizing: "border-box", + cursor: "pointer", + color: theme.input.color +})), ColorSpace = /* @__PURE__ */ ((ColorSpace2) => (ColorSpace2.RGB = "rgb", ColorSpace2.HSL = "hsl", ColorSpace2.HEX = "hex", ColorSpace2))(ColorSpace || {}), COLOR_SPACES = Object.values(ColorSpace), COLOR_REGEXP = /\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/, RGB_REGEXP = /^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i, HSL_REGEXP = /^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i, HEX_REGEXP = /^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i, SHORTHEX_REGEXP = /^\s*#?([0-9a-f]{3})\s*$/i, ColorPicker = { + hex: Z, + rgb: He, + hsl: ue +}, fallbackColor = { + hex: "transparent", + rgb: "rgba(0, 0, 0, 0)", + hsl: "hsla(0, 0%, 0%, 0)" +}, stringToArgs = (value) => { + let match = value?.match(COLOR_REGEXP); + if (!match) + return [0, 0, 0, 1]; + let [, x2, y2, z2, a2 = 1] = match; + return [x2, y2, z2, a2].map(Number); +}, parseRgb = (value) => { + let [r2, g2, b2, a2] = stringToArgs(value), [h2, s2, l2] = import_color_convert.default.rgb.hsl([r2, g2, b2]) || [0, 0, 0]; + return { + valid: !0, + value, + keyword: import_color_convert.default.rgb.keyword([r2, g2, b2]), + colorSpace: "rgb" /* RGB */, + rgb: value, + hsl: `hsla(${h2}, ${s2}%, ${l2}%, ${a2})`, + hex: `#${import_color_convert.default.rgb.hex([r2, g2, b2]).toLowerCase()}` + }; +}, parseHsl = (value) => { + let [h2, s2, l2, a2] = stringToArgs(value), [r2, g2, b2] = import_color_convert.default.hsl.rgb([h2, s2, l2]) || [0, 0, 0]; + return { + valid: !0, + value, + keyword: import_color_convert.default.hsl.keyword([h2, s2, l2]), + colorSpace: "hsl" /* HSL */, + rgb: `rgba(${r2}, ${g2}, ${b2}, ${a2})`, + hsl: value, + hex: `#${import_color_convert.default.hsl.hex([h2, s2, l2]).toLowerCase()}` + }; +}, parseHexOrKeyword = (value) => { + let plain = value.replace("#", ""), rgb = import_color_convert.default.keyword.rgb(plain) || import_color_convert.default.hex.rgb(plain), hsl = import_color_convert.default.rgb.hsl(rgb), mapped = value; + /[^#a-f0-9]/i.test(value) ? mapped = plain : HEX_REGEXP.test(value) && (mapped = `#${plain}`); + let valid = !0; + if (mapped.startsWith("#")) + valid = HEX_REGEXP.test(mapped); + else + try { + import_color_convert.default.keyword.hex(mapped); + } catch { + valid = !1; + } + return { + valid, + value: mapped, + keyword: import_color_convert.default.rgb.keyword(rgb), + colorSpace: "hex" /* HEX */, + rgb: `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 1)`, + hsl: `hsla(${hsl[0]}, ${hsl[1]}%, ${hsl[2]}%, 1)`, + hex: mapped + }; +}, parseValue = (value) => { + if (value) + return RGB_REGEXP.test(value) ? parseRgb(value) : HSL_REGEXP.test(value) ? parseHsl(value) : parseHexOrKeyword(value); +}, getRealValue = (value, color, colorSpace) => { + if (!value || !color?.valid) + return fallbackColor[colorSpace]; + if (colorSpace !== "hex" /* HEX */) + return color?.[colorSpace] || fallbackColor[colorSpace]; + if (!color.hex.startsWith("#")) + try { + return `#${import_color_convert.default.keyword.hex(color.hex)}`; + } catch { + return fallbackColor.hex; + } + let short = color.hex.match(SHORTHEX_REGEXP); + if (!short) + return HEX_REGEXP.test(color.hex) ? color.hex : fallbackColor.hex; + let [r2, g2, b2] = short[1].split(""); + return `#${r2}${r2}${g2}${g2}${b2}${b2}`; +}, useColorInput = (initialValue, onChange) => { + let [value, setValue] = useState(initialValue || ""), [color, setColor] = useState(() => parseValue(value)), [colorSpace, setColorSpace] = useState(color?.colorSpace || "hex" /* HEX */); + useEffect(() => { + let nextValue = initialValue || "", nextColor = parseValue(nextValue); + setValue(nextValue), setColor(nextColor), setColorSpace(nextColor?.colorSpace || "hex" /* HEX */); + }, [initialValue]); + let realValue = useMemo( + () => getRealValue(value, color, colorSpace).toLowerCase(), + [value, color, colorSpace] + ), updateValue = useCallback( + (update) => { + let parsed = parseValue(update), v2 = parsed?.value || update || ""; + setValue(v2), v2 === "" && (setColor(void 0), onChange(void 0)), parsed && (setColor(parsed), setColorSpace(parsed.colorSpace), onChange(parsed.value)); + }, + [onChange] + ), cycleColorSpace = useCallback(() => { + let nextIndex = (COLOR_SPACES.indexOf(colorSpace) + 1) % COLOR_SPACES.length, nextSpace = COLOR_SPACES[nextIndex]; + setColorSpace(nextSpace); + let updatedValue = color?.[nextSpace] || ""; + setValue(updatedValue), onChange(updatedValue); + }, [color, colorSpace, onChange]); + return { value, realValue, updateValue, color, colorSpace, cycleColorSpace }; +}, id = (value) => value.replace(/\s*/, "").toLowerCase(), usePresets = (presetColors, currentColor, colorSpace, maxPresetColors = 27) => { + let [selectedColors, setSelectedColors] = useState(currentColor?.valid ? [currentColor] : []); + useEffect(() => { + currentColor === void 0 && setSelectedColors([]); + }, [currentColor]); + let presets = useMemo(() => { + let combined = (presetColors || []).map((preset) => typeof preset == "string" ? parseValue(preset) : preset.title ? { ...parseValue(preset.color), keyword: preset.title } : parseValue(preset.color)).concat(selectedColors).filter(Boolean); + if (maxPresetColors === 0 || maxPresetColors === 1 / 0) + return combined; + let limit = Number.isInteger(maxPresetColors) && maxPresetColors > 0 ? maxPresetColors : 27; + return combined.slice(-limit); + }, [presetColors, selectedColors, maxPresetColors]), addPreset = useCallback( + (color) => { + color?.valid && (presets.some( + (preset) => preset && preset[colorSpace] && id(preset[colorSpace] || "") === id(color[colorSpace] || "") + ) || setSelectedColors((arr) => arr.concat(color))); + }, + [colorSpace, presets] + ); + return { presets, addPreset }; +}, ColorControl = ({ + name, + storyId, + controlsId, + value: initialValue, + onChange, + onFocus, + onBlur, + presetColors, + maxPresetColors, + startOpen = !1, + argType, + required +}) => { + let debouncedOnChange = useCallback(debounce(onChange, 200), [onChange]), { value, realValue, updateValue, color, colorSpace, cycleColorSpace } = useColorInput( + initialValue, + debouncedOnChange + ), { presets, addPreset } = usePresets(presetColors ?? [], color, colorSpace, maxPresetColors), Picker = ColorPicker[colorSpace], readOnly = !!argType?.table?.readonly, controlId = getControlId(name, storyId, controlsId); + return React.createElement(Wrapper, null, React.createElement("label", { htmlFor: controlId, className: "sb-sr-only" }, name), React.createElement( + Input, + { + id: controlId, + value, + onChange: (e2) => updateValue(e2.target.value), + onFocus: (e2) => e2.target.select(), + readOnly, + "aria-required": required || void 0, + placeholder: "Choose color..." + } + ), React.createElement( + PopoverProvider, + { + ariaLabel: "Color picker", + defaultVisible: startOpen, + visible: readOnly ? !1 : void 0, + onVisibleChange: () => color && addPreset(color), + popover: React.createElement(TooltipContent, null, React.createElement( + Picker, + { + color: realValue === "transparent" ? "#000000" : realValue, + onChange: updateValue, + onFocus, + onBlur + } + ), presets.length > 0 && React.createElement(Swatches, null, presets.map((preset, index) => React.createElement( + SwatchColor, + { + key: `${preset?.value || index}-${index}`, + variant: "ghost", + padding: "small", + size: "small", + ariaLabel: "Pick this color", + tooltip: preset?.keyword || preset?.value || "", + value: preset?.value || "", + selected: !!(color && preset && preset[colorSpace] && id(preset[colorSpace] || "") === id(color[colorSpace])), + onClick: () => preset && updateValue(preset.value || "") + } + )))) + }, + React.createElement( + PopoverTrigger, + { + variant: "ghost", + padding: "small", + size: "small", + ariaLabel: "Open color picker", + value: realValue, + style: { margin: 4 }, + disabled: readOnly + } + ) + ), value ? React.createElement( + CycleColorSpaceButton, + { + variant: "ghost", + padding: "small", + size: "small", + ariaLabel: "Cycle through color spaces", + disabled: readOnly, + onClick: readOnly ? void 0 : cycleColorSpace + }, + React.createElement(MarkupIcon, null) + ) : null); +}, Color_default = ColorControl; +export { + ColorControl, + Color_default as default +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/WithTooltip-7X4HQR7L.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/WithTooltip-7X4HQR7L.js new file mode 100644 index 0000000000000000000000000000000000000000..7f4509794bd0cf55b028a5dba1d192170bc18adc --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/WithTooltip-7X4HQR7L.js @@ -0,0 +1,1651 @@ +import { + _objectWithoutPropertiesLoose +} from "./chunk-242VQQM5.js"; +import { + _extends +} from "./chunk-LE2LTDW3.js"; +import { + require_memoizerific +} from "./chunk-DRQKCCAG.js"; +import { + __commonJS, + __toESM +} from "./chunk-IMSF75WX.js"; + +// ../../node_modules/react-fast-compare/index.js +var require_react_fast_compare = __commonJS({ + "../../node_modules/react-fast-compare/index.js"(exports, module) { + var hasElementType = typeof Element < "u", hasMap = typeof Map == "function", hasSet = typeof Set == "function", hasArrayBuffer = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView; + function equal(a, b) { + if (a === b) return !0; + if (a && b && typeof a == "object" && typeof b == "object") { + if (a.constructor !== b.constructor) return !1; + var length, i, keys; + if (Array.isArray(a)) { + if (length = a.length, length != b.length) return !1; + for (i = length; i-- !== 0; ) + if (!equal(a[i], b[i])) return !1; + return !0; + } + var it; + if (hasMap && a instanceof Map && b instanceof Map) { + if (a.size !== b.size) return !1; + for (it = a.entries(); !(i = it.next()).done; ) + if (!b.has(i.value[0])) return !1; + for (it = a.entries(); !(i = it.next()).done; ) + if (!equal(i.value[1], b.get(i.value[0]))) return !1; + return !0; + } + if (hasSet && a instanceof Set && b instanceof Set) { + if (a.size !== b.size) return !1; + for (it = a.entries(); !(i = it.next()).done; ) + if (!b.has(i.value[0])) return !1; + return !0; + } + if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { + if (length = a.length, length != b.length) return !1; + for (i = length; i-- !== 0; ) + if (a[i] !== b[i]) return !1; + return !0; + } + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf == "function" && typeof b.valueOf == "function") return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString && typeof a.toString == "function" && typeof b.toString == "function") return a.toString() === b.toString(); + if (keys = Object.keys(a), length = keys.length, length !== Object.keys(b).length) return !1; + for (i = length; i-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return !1; + if (hasElementType && a instanceof Element) return !1; + for (i = length; i-- !== 0; ) + if (!((keys[i] === "_owner" || keys[i] === "__v" || keys[i] === "__o") && a.$$typeof) && !equal(a[keys[i]], b[keys[i]])) + return !1; + return !0; + } + return a !== a && b !== b; + } + module.exports = function(a, b) { + try { + return equal(a, b); + } catch (error) { + if ((error.message || "").match(/stack|recursion/i)) + return console.warn("react-fast-compare cannot handle circular refs"), !1; + throw error; + } + }; + } +}); + +// ../../node_modules/warning/warning.js +var require_warning = __commonJS({ + "../../node_modules/warning/warning.js"(exports, module) { + "use strict"; + var __DEV__ = process.env.NODE_ENV !== "production", warning2 = function() { + }; + __DEV__ && (printWarning = function(format, args) { + var len = arguments.length; + args = new Array(len > 1 ? len - 1 : 0); + for (var key = 1; key < len; key++) + args[key - 1] = arguments[key]; + var argIndex = 0, message = "Warning: " + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + typeof console < "u" && console.error(message); + try { + throw new Error(message); + } catch { + } + }, warning2 = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) + args[key - 2] = arguments[key]; + if (format === void 0) + throw new Error( + "`warning(condition, format, ...args)` requires a warning message argument" + ); + condition || printWarning.apply(null, [format].concat(args)); + }); + var printWarning; + module.exports = warning2; + } +}); + +// src/components/components/tooltip/WithTooltip.tsx +var import_memoizerific = __toESM(require_memoizerific(), 1); +import React7, { useCallback as useCallback4, useEffect as useEffect6, useState as useState5 } from "react"; +import ReactDOM2 from "react-dom"; +import { deprecate } from "storybook/internal/client-logger"; +import { global } from "@storybook/global"; + +// ../../node_modules/react-popper-tooltip/dist/esm/react-popper-tooltip.js +import * as React6 from "react"; + +// ../../node_modules/react-popper/lib/esm/Popper.js +import * as React4 from "react"; + +// ../../node_modules/react-popper/lib/esm/Manager.js +import * as React from "react"; +var ManagerReferenceNodeContext = React.createContext(), ManagerReferenceNodeSetterContext = React.createContext(); + +// ../../node_modules/react-popper/lib/esm/utils.js +import * as React2 from "react"; +var fromEntries = function(entries) { + return entries.reduce(function(acc, _ref) { + var key = _ref[0], value = _ref[1]; + return acc[key] = value, acc; + }, {}); +}, useIsomorphicLayoutEffect = typeof window < "u" && window.document && window.document.createElement ? React2.useLayoutEffect : React2.useEffect; + +// ../../node_modules/react-popper/lib/esm/usePopper.js +import * as React3 from "react"; +import * as ReactDOM from "react-dom"; + +// ../../node_modules/@popperjs/core/lib/enums.js +var top = "top", bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [top, bottom, right, left], start = "start", end = "end", clippingParents = "clippingParents", viewport = "viewport", popper = "popper", reference = "reference", variationPlacements = basePlacements.reduce(function(acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); +}, []), placements = [].concat(basePlacements, [auto]).reduce(function(acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); +}, []), beforeRead = "beforeRead", read = "read", afterRead = "afterRead", beforeMain = "beforeMain", main = "main", afterMain = "afterMain", beforeWrite = "beforeWrite", write = "write", afterWrite = "afterWrite", modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; + +// ../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +function getNodeName(element) { + return element ? (element.nodeName || "").toLowerCase() : null; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js +function getWindow(node) { + if (node == null) + return window; + if (node.toString() !== "[object Window]") { + var ownerDocument = node.ownerDocument; + return ownerDocument && ownerDocument.defaultView || window; + } + return node; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +function isElement(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; +} +function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; +} +function isShadowRoot(node) { + if (typeof ShadowRoot > "u") + return !1; + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; +} + +// ../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js +function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function(name) { + var style = state.styles[name] || {}, attributes = state.attributes[name] || {}, element = state.elements[name]; + !isHTMLElement(element) || !getNodeName(element) || (Object.assign(element.style, style), Object.keys(attributes).forEach(function(name2) { + var value = attributes[name2]; + value === !1 ? element.removeAttribute(name2) : element.setAttribute(name2, value === !0 ? "" : value); + })); + }); +} +function effect(_ref2) { + var state = _ref2.state, initialStyles = { + popper: { + position: state.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + return Object.assign(state.elements.popper.style, initialStyles.popper), state.styles = initialStyles, state.elements.arrow && Object.assign(state.elements.arrow.style, initialStyles.arrow), function() { + Object.keys(state.elements).forEach(function(name) { + var element = state.elements[name], attributes = state.attributes[name] || {}, styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]), style = styleProperties.reduce(function(style2, property) { + return style2[property] = "", style2; + }, {}); + !isHTMLElement(element) || !getNodeName(element) || (Object.assign(element.style, style), Object.keys(attributes).forEach(function(attribute) { + element.removeAttribute(attribute); + })); + }); + }; +} +var applyStyles_default = { + name: "applyStyles", + enabled: !0, + phase: "write", + fn: applyStyles, + effect, + requires: ["computeStyles"] +}; + +// ../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js +function getBasePlacement(placement) { + return placement.split("-")[0]; +} + +// ../../node_modules/@popperjs/core/lib/utils/math.js +var max = Math.max, min = Math.min, round = Math.round; + +// ../../node_modules/@popperjs/core/lib/utils/userAgent.js +function getUAString() { + var uaData = navigator.userAgentData; + return uaData != null && uaData.brands && Array.isArray(uaData.brands) ? uaData.brands.map(function(item) { + return item.brand + "/" + item.version; + }).join(" ") : navigator.userAgent; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()); +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +function getBoundingClientRect(element, includeScale, isFixedStrategy) { + includeScale === void 0 && (includeScale = !1), isFixedStrategy === void 0 && (isFixedStrategy = !1); + var clientRect = element.getBoundingClientRect(), scaleX = 1, scaleY = 1; + includeScale && isHTMLElement(element) && (scaleX = element.offsetWidth > 0 && round(clientRect.width) / element.offsetWidth || 1, scaleY = element.offsetHeight > 0 && round(clientRect.height) / element.offsetHeight || 1); + var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport, addVisualOffsets = !isLayoutViewport() && isFixedStrategy, x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX, y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY, width = clientRect.width / scaleX, height = clientRect.height / scaleY; + return { + width, + height, + top: y, + right: x + width, + bottom: y + height, + left: x, + x, + y + }; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element), width = element.offsetWidth, height = element.offsetHeight; + return Math.abs(clientRect.width - width) <= 1 && (width = clientRect.width), Math.abs(clientRect.height - height) <= 1 && (height = clientRect.height), { + x: element.offsetLeft, + y: element.offsetTop, + width, + height + }; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/contains.js +function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); + if (parent.contains(child)) + return !0; + if (rootNode && isShadowRoot(rootNode)) { + var next = child; + do { + if (next && parent.isSameNode(next)) + return !0; + next = next.parentNode || next.host; + } while (next); + } + return !1; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +function getComputedStyle(element) { + return getWindow(element).getComputedStyle(element); +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +function isTableElement(element) { + return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +function getDocumentElement(element) { + return ((isElement(element) ? element.ownerDocument : ( + // $FlowFixMe[prop-missing] + element.document + )) || window.document).documentElement; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +function getParentNode(element) { + return getNodeName(element) === "html" ? element : ( + // this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || // DOM Element detected + (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) + ); +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +function getTrueOffsetParent(element) { + return !isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle(element).position === "fixed" ? null : element.offsetParent; +} +function getContainingBlock(element) { + var isFirefox = /firefox/i.test(getUAString()), isIE = /Trident/i.test(getUAString()); + if (isIE && isHTMLElement(element)) { + var elementCss = getComputedStyle(element); + if (elementCss.position === "fixed") + return null; + } + var currentNode = getParentNode(element); + for (isShadowRoot(currentNode) && (currentNode = currentNode.host); isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0; ) { + var css = getComputedStyle(currentNode); + if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") + return currentNode; + currentNode = currentNode.parentNode; + } + return null; +} +function getOffsetParent(element) { + for (var window2 = getWindow(element), offsetParent = getTrueOffsetParent(element); offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static"; ) + offsetParent = getTrueOffsetParent(offsetParent); + return offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static") ? window2 : offsetParent || getContainingBlock(element) || window2; +} + +// ../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; +} + +// ../../node_modules/@popperjs/core/lib/utils/within.js +function within(min2, value, max2) { + return max(min2, min(value, max2)); +} +function withinMaxClamp(min2, value, max2) { + var v = within(min2, value, max2); + return v > max2 ? max2 : v; +} + +// ../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} + +// ../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); +} + +// ../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js +function expandToHashMap(value, keys) { + return keys.reduce(function(hashMap, key) { + return hashMap[key] = value, hashMap; + }, {}); +} + +// ../../node_modules/@popperjs/core/lib/modifiers/arrow.js +var toPaddingObject = function(padding, state) { + return padding = typeof padding == "function" ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding, mergePaddingObject(typeof padding != "number" ? padding : expandToHashMap(padding, basePlacements)); +}; +function arrow(_ref) { + var _state$modifiersData$, state = _ref.state, name = _ref.name, options = _ref.options, arrowElement = state.elements.arrow, popperOffsets2 = state.modifiersData.popperOffsets, basePlacement = getBasePlacement(state.placement), axis = getMainAxisFromPlacement(basePlacement), isVertical = [left, right].indexOf(basePlacement) >= 0, len = isVertical ? "height" : "width"; + if (!(!arrowElement || !popperOffsets2)) { + var paddingObject = toPaddingObject(options.padding, state), arrowRect = getLayoutRect(arrowElement), minProp = axis === "y" ? top : left, maxProp = axis === "y" ? bottom : right, endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len], startDiff = popperOffsets2[axis] - state.rects.reference[axis], arrowOffsetParent = getOffsetParent(arrowElement), clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0, centerToReference = endDiff / 2 - startDiff / 2, min2 = paddingObject[minProp], max2 = clientSize - arrowRect[len] - paddingObject[maxProp], center = clientSize / 2 - arrowRect[len] / 2 + centerToReference, offset2 = within(min2, center, max2), axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); + } +} +function effect2(_ref2) { + var state = _ref2.state, options = _ref2.options, _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; + arrowElement != null && (typeof arrowElement == "string" && (arrowElement = state.elements.popper.querySelector(arrowElement), !arrowElement) || contains(state.elements.popper, arrowElement) && (state.elements.arrow = arrowElement)); +} +var arrow_default = { + name: "arrow", + enabled: !0, + phase: "main", + fn: arrow, + effect: effect2, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"] +}; + +// ../../node_modules/@popperjs/core/lib/utils/getVariation.js +function getVariation(placement) { + return placement.split("-")[1]; +} + +// ../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js +var unsetSides = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" +}; +function roundOffsetsByDPR(_ref, win) { + var x = _ref.x, y = _ref.y, dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; +} +function mapToStyles(_ref2) { + var _Object$assign2, popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed, _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y, _ref3 = typeof roundOffsets == "function" ? roundOffsets({ + x, + y + }) : { + x, + y + }; + x = _ref3.x, y = _ref3.y; + var hasX = offsets.hasOwnProperty("x"), hasY = offsets.hasOwnProperty("y"), sideX = left, sideY = top, win = window; + if (adaptive) { + var offsetParent = getOffsetParent(popper2), heightProp = "clientHeight", widthProp = "clientWidth"; + if (offsetParent === getWindow(popper2) && (offsetParent = getDocumentElement(popper2), getComputedStyle(offsetParent).position !== "static" && position === "absolute" && (heightProp = "scrollHeight", widthProp = "scrollWidth")), offsetParent = offsetParent, placement === top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : ( + // $FlowFixMe[prop-missing] + offsetParent[heightProp] + ); + y -= offsetY - popperRect.height, y *= gpuAcceleration ? 1 : -1; + } + if (placement === left || (placement === top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : ( + // $FlowFixMe[prop-missing] + offsetParent[widthProp] + ); + x -= offsetX - popperRect.width, x *= gpuAcceleration ? 1 : -1; + } + } + var commonStyles = Object.assign({ + position + }, adaptive && unsetSides), _ref4 = roundOffsets === !0 ? roundOffsetsByDPR({ + x, + y + }, getWindow(popper2)) : { + x, + y + }; + if (x = _ref4.x, y = _ref4.y, gpuAcceleration) { + var _Object$assign; + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); +} +function computeStyles(_ref5) { + var state = _ref5.state, options = _ref5.options, _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? !0 : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? !0 : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? !0 : _options$roundOffsets, commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration, + isFixed: state.options.strategy === "fixed" + }; + state.modifiersData.popperOffsets != null && (state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive, + roundOffsets + })))), state.modifiersData.arrow != null && (state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: "absolute", + adaptive: !1, + roundOffsets + })))), state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-placement": state.placement + }); +} +var computeStyles_default = { + name: "computeStyles", + enabled: !0, + phase: "beforeWrite", + fn: computeStyles, + data: {} +}; + +// ../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js +var passive = { + passive: !0 +}; +function effect3(_ref) { + var state = _ref.state, instance = _ref.instance, options = _ref.options, _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? !0 : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? !0 : _options$resize, window2 = getWindow(state.elements.popper), scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + return scroll && scrollParents.forEach(function(scrollParent) { + scrollParent.addEventListener("scroll", instance.update, passive); + }), resize && window2.addEventListener("resize", instance.update, passive), function() { + scroll && scrollParents.forEach(function(scrollParent) { + scrollParent.removeEventListener("scroll", instance.update, passive); + }), resize && window2.removeEventListener("resize", instance.update, passive); + }; +} +var eventListeners_default = { + name: "eventListeners", + enabled: !0, + phase: "write", + fn: function() { + }, + effect: effect3, + data: {} +}; + +// ../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +var hash = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" +}; +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function(matched) { + return hash[matched]; + }); +} + +// ../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +var hash2 = { + start: "end", + end: "start" +}; +function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function(matched) { + return hash2[matched]; + }); +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +function getWindowScroll(node) { + var win = getWindow(node), scrollLeft = win.pageXOffset, scrollTop = win.pageYOffset; + return { + scrollLeft, + scrollTop + }; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +function getViewportRect(element, strategy) { + var win = getWindow(element), html = getDocumentElement(element), visualViewport = win.visualViewport, width = html.clientWidth, height = html.clientHeight, x = 0, y = 0; + if (visualViewport) { + width = visualViewport.width, height = visualViewport.height; + var layoutViewport = isLayoutViewport(); + (layoutViewport || !layoutViewport && strategy === "fixed") && (x = visualViewport.offsetLeft, y = visualViewport.offsetTop); + } + return { + width, + height, + x: x + getWindowScrollBarX(element), + y + }; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +function getDocumentRect(element) { + var _element$ownerDocumen, html = getDocumentElement(element), winScroll = getWindowScroll(element), body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body, width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0), height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0), x = -winScroll.scrollLeft + getWindowScrollBarX(element), y = -winScroll.scrollTop; + return getComputedStyle(body || html).direction === "rtl" && (x += max(html.clientWidth, body ? body.clientWidth : 0) - width), { + width, + height, + x, + y + }; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +function isScrollParent(element) { + var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +function getScrollParent(node) { + return ["html", "body", "#document"].indexOf(getNodeName(node)) >= 0 ? node.ownerDocument.body : isHTMLElement(node) && isScrollParent(node) ? node : getScrollParent(getParentNode(node)); +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +function listScrollParents(element, list) { + var _element$ownerDocumen; + list === void 0 && (list = []); + var scrollParent = getScrollParent(element), isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body), win = getWindow(scrollParent), target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent, updatedList = list.concat(target); + return isBody ? updatedList : ( + // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))) + ); +} + +// ../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js +function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +function getInnerBoundingClientRect(element, strategy) { + var rect = getBoundingClientRect(element, !1, strategy === "fixed"); + return rect.top = rect.top + element.clientTop, rect.left = rect.left + element.clientLeft, rect.bottom = rect.top + element.clientHeight, rect.right = rect.left + element.clientWidth, rect.width = element.clientWidth, rect.height = element.clientHeight, rect.x = rect.left, rect.y = rect.top, rect; +} +function getClientRectFromMixedType(element, clippingParent, strategy) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); +} +function getClippingParents(element) { + var clippingParents2 = listScrollParents(getParentNode(element)), canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle(element).position) >= 0, clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + return isElement(clipperElement) ? clippingParents2.filter(function(clippingParent) { + return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body"; + }) : []; +} +function getClippingRect(element, boundary, rootBoundary, strategy) { + var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary), clippingParents2 = [].concat(mainClippingParents, [rootBoundary]), firstClippingParent = clippingParents2[0], clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent, strategy); + return accRect.top = max(rect.top, accRect.top), accRect.right = min(rect.right, accRect.right), accRect.bottom = min(rect.bottom, accRect.bottom), accRect.left = max(rect.left, accRect.left), accRect; + }, getClientRectFromMixedType(element, firstClippingParent, strategy)); + return clippingRect.width = clippingRect.right - clippingRect.left, clippingRect.height = clippingRect.bottom - clippingRect.top, clippingRect.x = clippingRect.left, clippingRect.y = clippingRect.top, clippingRect; +} + +// ../../node_modules/@popperjs/core/lib/utils/computeOffsets.js +function computeOffsets(_ref) { + var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement, basePlacement = placement ? getBasePlacement(placement) : null, variation = placement ? getVariation(placement) : null, commonX = reference2.x + reference2.width / 2 - element.width / 2, commonY = reference2.y + reference2.height / 2 - element.height / 2, offsets; + switch (basePlacement) { + case top: + offsets = { + x: commonX, + y: reference2.y - element.height + }; + break; + case bottom: + offsets = { + x: commonX, + y: reference2.y + reference2.height + }; + break; + case right: + offsets = { + x: reference2.x + reference2.width, + y: commonY + }; + break; + case left: + offsets = { + x: reference2.x - element.width, + y: commonY + }; + break; + default: + offsets = { + x: reference2.x, + y: reference2.y + }; + } + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + if (mainAxis != null) { + var len = mainAxis === "y" ? "height" : "width"; + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); + break; + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); + break; + default: + } + } + return offsets; +} + +// ../../node_modules/@popperjs/core/lib/utils/detectOverflow.js +function detectOverflow(state, options) { + options === void 0 && (options = {}); + var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? !1 : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding, paddingObject = mergePaddingObject(typeof padding != "number" ? padding : expandToHashMap(padding, basePlacements)), altContext = elementContext === popper ? reference : popper, popperRect = state.rects.popper, element = state.elements[altBoundary ? altContext : elementContext], clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy), referenceClientRect = getBoundingClientRect(state.elements.reference), popperOffsets2 = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: "absolute", + placement + }), popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)), elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect, overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }, offsetData = state.modifiersData.offset; + if (elementContext === popper && offsetData) { + var offset2 = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function(key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1, axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; + overflowOffsets[key] += offset2[axis] * multiply; + }); + } + return overflowOffsets; +} + +// ../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +function computeAutoPlacement(state, options) { + options === void 0 && (options = {}); + var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP, variation = getVariation(placement), placements2 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { + return getVariation(placement2) === variation; + }) : basePlacements, allowedPlacements = placements2.filter(function(placement2) { + return allowedAutoPlacements.indexOf(placement2) >= 0; + }); + allowedPlacements.length === 0 && (allowedPlacements = placements2); + var overflows = allowedPlacements.reduce(function(acc, placement2) { + return acc[placement2] = detectOverflow(state, { + placement: placement2, + boundary, + rootBoundary, + padding + })[getBasePlacement(placement2)], acc; + }, {}); + return Object.keys(overflows).sort(function(a, b) { + return overflows[a] - overflows[b]; + }); +} + +// ../../node_modules/@popperjs/core/lib/modifiers/flip.js +function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) + return []; + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; +} +function flip(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + if (!state.modifiersData[name]._skip) { + for (var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? !0 : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? !0 : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? !0 : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements, preferredPlacement = state.options.placement, basePlacement = getBasePlacement(preferredPlacement), isBasePlacement = basePlacement === preferredPlacement, fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)), placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { + return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { + placement: placement2, + boundary, + rootBoundary, + padding, + flipVariations, + allowedAutoPlacements + }) : placement2); + }, []), referenceRect = state.rects.reference, popperRect = state.rects.popper, checksMap = /* @__PURE__ */ new Map(), makeFallbackChecks = !0, firstFittingPlacement = placements2[0], i = 0; i < placements2.length; i++) { + var placement = placements2[i], _basePlacement = getBasePlacement(placement), isStartVariation = getVariation(placement) === start, isVertical = [top, bottom].indexOf(_basePlacement) >= 0, len = isVertical ? "width" : "height", overflow = detectOverflow(state, { + placement, + boundary, + rootBoundary, + altBoundary, + padding + }), mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + referenceRect[len] > popperRect[len] && (mainVariationSide = getOppositePlacement(mainVariationSide)); + var altVariationSide = getOppositePlacement(mainVariationSide), checks = []; + if (checkMainAxis && checks.push(overflow[_basePlacement] <= 0), checkAltAxis && checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0), checks.every(function(check) { + return check; + })) { + firstFittingPlacement = placement, makeFallbackChecks = !1; + break; + } + checksMap.set(placement, checks); + } + if (makeFallbackChecks) + for (var numberOfChecks = flipVariations ? 3 : 1, _loop = function(_i2) { + var fittingPlacement = placements2.find(function(placement2) { + var checks2 = checksMap.get(placement2); + if (checks2) + return checks2.slice(0, _i2).every(function(check) { + return check; + }); + }); + if (fittingPlacement) + return firstFittingPlacement = fittingPlacement, "break"; + }, _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + if (_ret === "break") break; + } + state.placement !== firstFittingPlacement && (state.modifiersData[name]._skip = !0, state.placement = firstFittingPlacement, state.reset = !0); + } +} +var flip_default = { + name: "flip", + enabled: !0, + phase: "main", + fn: flip, + requiresIfExists: ["offset"], + data: { + _skip: !1 + } +}; + +// ../../node_modules/@popperjs/core/lib/modifiers/hide.js +function getSideOffsets(overflow, rect, preventedOffsets) { + return preventedOffsets === void 0 && (preventedOffsets = { + x: 0, + y: 0 + }), { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; +} +function isAnySideFullyClipped(overflow) { + return [top, right, bottom, left].some(function(side) { + return overflow[side] >= 0; + }); +} +function hide(_ref) { + var state = _ref.state, name = _ref.name, referenceRect = state.rects.reference, popperRect = state.rects.popper, preventedOffsets = state.modifiersData.preventOverflow, referenceOverflow = detectOverflow(state, { + elementContext: "reference" + }), popperAltOverflow = detectOverflow(state, { + altBoundary: !0 + }), referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect), popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets), isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets), hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets, + popperEscapeOffsets, + isReferenceHidden, + hasPopperEscaped + }, state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-reference-hidden": isReferenceHidden, + "data-popper-escaped": hasPopperEscaped + }); +} +var hide_default = { + name: "hide", + enabled: !0, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: hide +}; + +// ../../node_modules/@popperjs/core/lib/modifiers/offset.js +function distanceAndSkiddingToXY(placement, rects, offset2) { + var basePlacement = getBasePlacement(placement), invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1, _ref = typeof offset2 == "function" ? offset2(Object.assign({}, rects, { + placement + })) : offset2, skidding = _ref[0], distance = _ref[1]; + return skidding = skidding || 0, distance = (distance || 0) * invertDistance, [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; +} +function offset(_ref2) { + var state = _ref2.state, options = _ref2.options, name = _ref2.name, _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset, data = placements.reduce(function(acc, placement) { + return acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2), acc; + }, {}), _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; + state.modifiersData.popperOffsets != null && (state.modifiersData.popperOffsets.x += x, state.modifiersData.popperOffsets.y += y), state.modifiersData[name] = data; +} +var offset_default = { + name: "offset", + enabled: !0, + phase: "main", + requires: ["popperOffsets"], + fn: offset +}; + +// ../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +function popperOffsets(_ref) { + var state = _ref.state, name = _ref.name; + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: "absolute", + placement: state.placement + }); +} +var popperOffsets_default = { + name: "popperOffsets", + enabled: !0, + phase: "read", + fn: popperOffsets, + data: {} +}; + +// ../../node_modules/@popperjs/core/lib/utils/getAltAxis.js +function getAltAxis(axis) { + return axis === "x" ? "y" : "x"; +} + +// ../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +function preventOverflow(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name, _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? !0 : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? !1 : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? !0 : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset, overflow = detectOverflow(state, { + boundary, + rootBoundary, + padding, + altBoundary + }), basePlacement = getBasePlacement(state.placement), variation = getVariation(state.placement), isBasePlacement = !variation, mainAxis = getMainAxisFromPlacement(basePlacement), altAxis = getAltAxis(mainAxis), popperOffsets2 = state.modifiersData.popperOffsets, referenceRect = state.rects.reference, popperRect = state.rects.popper, tetherOffsetValue = typeof tetherOffset == "function" ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset, normalizedTetherOffsetValue = typeof tetherOffsetValue == "number" ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue), offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null, data = { + x: 0, + y: 0 + }; + if (popperOffsets2) { + if (checkMainAxis) { + var _offsetModifierState$, mainSide = mainAxis === "y" ? top : left, altSide = mainAxis === "y" ? bottom : right, len = mainAxis === "y" ? "height" : "width", offset2 = popperOffsets2[mainAxis], min2 = offset2 + overflow[mainSide], max2 = offset2 - overflow[altSide], additive = tether ? -popperRect[len] / 2 : 0, minLen = variation === start ? referenceRect[len] : popperRect[len], maxLen = variation === start ? -popperRect[len] : -referenceRect[len], arrowElement = state.elements.arrow, arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }, arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(), arrowPaddingMin = arrowPaddingObject[mainSide], arrowPaddingMax = arrowPaddingObject[altSide], arrowLen = within(0, referenceRect[len], arrowRect[len]), minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis, maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis, arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow), clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0, offsetModifierValue = (_offsetModifierState$ = offsetModifierState?.[mainAxis]) != null ? _offsetModifierState$ : 0, tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset, tetherMax = offset2 + maxOffset - offsetModifierValue, preventedOffset = within(tether ? min(min2, tetherMin) : min2, offset2, tether ? max(max2, tetherMax) : max2); + popperOffsets2[mainAxis] = preventedOffset, data[mainAxis] = preventedOffset - offset2; + } + if (checkAltAxis) { + var _offsetModifierState$2, _mainSide = mainAxis === "x" ? top : left, _altSide = mainAxis === "x" ? bottom : right, _offset = popperOffsets2[altAxis], _len = altAxis === "y" ? "height" : "width", _min = _offset + overflow[_mainSide], _max = _offset - overflow[_altSide], isOriginSide = [top, left].indexOf(basePlacement) !== -1, _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState?.[altAxis]) != null ? _offsetModifierState$2 : 0, _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis, _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max, _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + popperOffsets2[altAxis] = _preventedOffset, data[altAxis] = _preventedOffset - _offset; + } + state.modifiersData[name] = data; + } +} +var preventOverflow_default = { + name: "preventOverflow", + enabled: !0, + phase: "main", + fn: preventOverflow, + requiresIfExists: ["offset"] +}; + +// ../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +function getNodeScroll(node) { + return node === getWindow(node) || !isHTMLElement(node) ? getWindowScroll(node) : getHTMLElementScroll(node); +} + +// ../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +function isElementScaled(element) { + var rect = element.getBoundingClientRect(), scaleX = round(rect.width) / element.offsetWidth || 1, scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; +} +function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + isFixed === void 0 && (isFixed = !1); + var isOffsetParentAnElement = isHTMLElement(offsetParent), offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent), documentElement = getDocumentElement(offsetParent), rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed), scroll = { + scrollLeft: 0, + scrollTop: 0 + }, offsets = { + x: 0, + y: 0 + }; + return (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) && ((getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) && (scroll = getNodeScroll(offsetParent)), isHTMLElement(offsetParent) ? (offsets = getBoundingClientRect(offsetParent, !0), offsets.x += offsetParent.clientLeft, offsets.y += offsetParent.clientTop) : documentElement && (offsets.x = getWindowScrollBarX(documentElement))), { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; +} + +// ../../node_modules/@popperjs/core/lib/utils/orderModifiers.js +function order(modifiers) { + var map = /* @__PURE__ */ new Map(), visited = /* @__PURE__ */ new Set(), result = []; + modifiers.forEach(function(modifier) { + map.set(modifier.name, modifier); + }); + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function(dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + depModifier && sort(depModifier); + } + }), result.push(modifier); + } + return modifiers.forEach(function(modifier) { + visited.has(modifier.name) || sort(modifier); + }), result; +} +function orderModifiers(modifiers) { + var orderedModifiers = order(modifiers); + return modifierPhases.reduce(function(acc, phase) { + return acc.concat(orderedModifiers.filter(function(modifier) { + return modifier.phase === phase; + })); + }, []); +} + +// ../../node_modules/@popperjs/core/lib/utils/debounce.js +function debounce(fn2) { + var pending; + return function() { + return pending || (pending = new Promise(function(resolve) { + Promise.resolve().then(function() { + pending = void 0, resolve(fn2()); + }); + })), pending; + }; +} + +// ../../node_modules/@popperjs/core/lib/utils/mergeByName.js +function mergeByName(modifiers) { + var merged = modifiers.reduce(function(merged2, current) { + var existing = merged2[current.name]; + return merged2[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current, merged2; + }, {}); + return Object.keys(merged).map(function(key) { + return merged[key]; + }); +} + +// ../../node_modules/@popperjs/core/lib/createPopper.js +var DEFAULT_OPTIONS = { + placement: "bottom", + modifiers: [], + strategy: "absolute" +}; +function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) + args[_key] = arguments[_key]; + return !args.some(function(element) { + return !(element && typeof element.getBoundingClientRect == "function"); + }); +} +function popperGenerator(generatorOptions) { + generatorOptions === void 0 && (generatorOptions = {}); + var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers3 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function(reference2, popper2, options) { + options === void 0 && (options = defaultOptions); + var state = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference2, + popper: popper2 + }, + attributes: {}, + styles: {} + }, effectCleanupFns = [], isDestroyed = !1, instance = { + state, + setOptions: function(setOptionsAction) { + var options2 = typeof setOptionsAction == "function" ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(), state.options = Object.assign({}, defaultOptions, state.options, options2), state.scrollParents = { + reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], + popper: listScrollParents(popper2) + }; + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers3, state.options.modifiers))); + return state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; + }), runModifierEffects(), instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function() { + if (!isDestroyed) { + var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; + if (areValidElements(reference3, popper3)) { + state.rects = { + reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), + popper: getLayoutRect(popper3) + }, state.reset = !1, state.placement = state.options.placement, state.orderedModifiers.forEach(function(modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (state.reset === !0) { + state.reset = !1, index = -1; + continue; + } + var _state$orderedModifie = state.orderedModifiers[index], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + typeof fn2 == "function" && (state = fn2({ + state, + options: _options, + name, + instance + }) || state); + } + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function() { + return new Promise(function(resolve) { + instance.forceUpdate(), resolve(state); + }); + }), + destroy: function() { + cleanupModifierEffects(), isDestroyed = !0; + } + }; + if (!areValidElements(reference2, popper2)) + return instance; + instance.setOptions(options).then(function(state2) { + !isDestroyed && options.onFirstUpdate && options.onFirstUpdate(state2); + }); + function runModifierEffects() { + state.orderedModifiers.forEach(function(_ref) { + var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref.effect; + if (typeof effect4 == "function") { + var cleanupFn = effect4({ + state, + name, + instance, + options: options2 + }), noopFn = function() { + }; + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + function cleanupModifierEffects() { + effectCleanupFns.forEach(function(fn2) { + return fn2(); + }), effectCleanupFns = []; + } + return instance; + }; +} +var createPopper = popperGenerator(); + +// ../../node_modules/@popperjs/core/lib/popper-lite.js +var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default], createPopper2 = popperGenerator({ + defaultModifiers +}); + +// ../../node_modules/@popperjs/core/lib/popper.js +var defaultModifiers2 = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default, offset_default, flip_default, preventOverflow_default, arrow_default, hide_default], createPopper3 = popperGenerator({ + defaultModifiers: defaultModifiers2 +}); + +// ../../node_modules/react-popper/lib/esm/usePopper.js +var import_react_fast_compare = __toESM(require_react_fast_compare()); +var EMPTY_MODIFIERS = [], usePopper = function(referenceElement, popperElement, options) { + options === void 0 && (options = {}); + var prevOptions = React3.useRef(null), optionsWithDefaults = { + onFirstUpdate: options.onFirstUpdate, + placement: options.placement || "bottom", + strategy: options.strategy || "absolute", + modifiers: options.modifiers || EMPTY_MODIFIERS + }, _React$useState = React3.useState({ + styles: { + popper: { + position: optionsWithDefaults.strategy, + left: "0", + top: "0" + }, + arrow: { + position: "absolute" + } + }, + attributes: {} + }), state = _React$useState[0], setState = _React$useState[1], updateStateModifier = React3.useMemo(function() { + return { + name: "updateState", + enabled: !0, + phase: "write", + fn: function(_ref) { + var state2 = _ref.state, elements = Object.keys(state2.elements); + ReactDOM.flushSync(function() { + setState({ + styles: fromEntries(elements.map(function(element) { + return [element, state2.styles[element] || {}]; + })), + attributes: fromEntries(elements.map(function(element) { + return [element, state2.attributes[element]]; + })) + }); + }); + }, + requires: ["computeStyles"] + }; + }, []), popperOptions = React3.useMemo(function() { + var newOptions = { + onFirstUpdate: optionsWithDefaults.onFirstUpdate, + placement: optionsWithDefaults.placement, + strategy: optionsWithDefaults.strategy, + modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, { + name: "applyStyles", + enabled: !1 + }]) + }; + return (0, import_react_fast_compare.default)(prevOptions.current, newOptions) ? prevOptions.current || newOptions : (prevOptions.current = newOptions, newOptions); + }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]), popperInstanceRef = React3.useRef(); + return useIsomorphicLayoutEffect(function() { + popperInstanceRef.current && popperInstanceRef.current.setOptions(popperOptions); + }, [popperOptions]), useIsomorphicLayoutEffect(function() { + if (!(referenceElement == null || popperElement == null)) { + var createPopper4 = options.createPopper || createPopper3, popperInstance = createPopper4(referenceElement, popperElement, popperOptions); + return popperInstanceRef.current = popperInstance, function() { + popperInstance.destroy(), popperInstanceRef.current = null; + }; + } + }, [referenceElement, popperElement, options.createPopper]), { + state: popperInstanceRef.current ? popperInstanceRef.current.state : null, + styles: state.styles, + attributes: state.attributes, + update: popperInstanceRef.current ? popperInstanceRef.current.update : null, + forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null + }; +}; + +// ../../node_modules/react-popper/lib/esm/Reference.js +var import_warning = __toESM(require_warning()); +import * as React5 from "react"; + +// ../../node_modules/react-popper-tooltip/dist/esm/react-popper-tooltip.js +function useGetLatest(val) { + var ref = React6.useRef(val); + return ref.current = val, React6.useCallback(function() { + return ref.current; + }, []); +} +var noop = function() { +}; +function useControlledState(_ref) { + var initial = _ref.initial, value = _ref.value, _ref$onChange = _ref.onChange, onChange = _ref$onChange === void 0 ? noop : _ref$onChange; + if (initial === void 0 && value === void 0) + throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined'); + var _React$useState = React6.useState(initial), state = _React$useState[0], setState = _React$useState[1], getLatest = useGetLatest(state), set = React6.useCallback(function(updater) { + var state2 = getLatest(), updatedState = typeof updater == "function" ? updater(state2) : updater; + typeof updatedState.persist == "function" && updatedState.persist(), setState(updatedState), typeof onChange == "function" && onChange(updatedState); + }, [getLatest, onChange]), isControlled = value !== void 0; + return [isControlled ? value : state, isControlled ? onChange : set]; +} +function generateBoundingClientRect(x, y) { + return x === void 0 && (x = 0), y === void 0 && (y = 0), function() { + return { + width: 0, + height: 0, + top: y, + right: x, + bottom: y, + left: x, + x: 0, + y: 0, + toJSON: function() { + return null; + } + }; + }; +} +var _excluded = ["styles", "attributes"], virtualElement = { + getBoundingClientRect: generateBoundingClientRect() +}, defaultConfig = { + closeOnOutsideClick: !0, + closeOnTriggerHidden: !1, + defaultVisible: !1, + delayHide: 0, + delayShow: 0, + followCursor: !1, + interactive: !1, + mutationObserverOptions: { + attributes: !0, + childList: !0, + subtree: !0 + }, + offset: [0, 6], + trigger: "hover" +}; +function usePopperTooltip(config, popperOptions) { + var _popperProps$state, _popperProps$state$mo, _popperProps$state$mo2; + config === void 0 && (config = {}), popperOptions === void 0 && (popperOptions = {}); + var finalConfig = Object.keys(defaultConfig).reduce(function(config2, key) { + var _extends2; + return _extends({}, config2, (_extends2 = {}, _extends2[key] = config2[key] !== void 0 ? config2[key] : defaultConfig[key], _extends2)); + }, config), defaultModifiers3 = React6.useMemo( + function() { + return [{ + name: "offset", + options: { + offset: finalConfig.offset + } + }]; + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + Array.isArray(finalConfig.offset) ? finalConfig.offset : [] + ), finalPopperOptions = _extends({}, popperOptions, { + placement: popperOptions.placement || finalConfig.placement, + modifiers: popperOptions.modifiers || defaultModifiers3 + }), _React$useState = React6.useState(null), triggerRef = _React$useState[0], setTriggerRef = _React$useState[1], _React$useState2 = React6.useState(null), tooltipRef = _React$useState2[0], setTooltipRef = _React$useState2[1], _useControlledState = useControlledState({ + initial: finalConfig.defaultVisible, + value: finalConfig.visible, + onChange: finalConfig.onVisibleChange + }), visible = _useControlledState[0], setVisible = _useControlledState[1], timer = React6.useRef(); + React6.useEffect(function() { + return function() { + return clearTimeout(timer.current); + }; + }, []); + var _usePopper = usePopper(finalConfig.followCursor ? virtualElement : triggerRef, tooltipRef, finalPopperOptions), styles = _usePopper.styles, attributes = _usePopper.attributes, popperProps = _objectWithoutPropertiesLoose(_usePopper, _excluded), update = popperProps.update, getLatest = useGetLatest({ + visible, + triggerRef, + tooltipRef, + finalConfig + }), isTriggeredBy = React6.useCallback( + function(trigger) { + return Array.isArray(finalConfig.trigger) ? finalConfig.trigger.includes(trigger) : finalConfig.trigger === trigger; + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + Array.isArray(finalConfig.trigger) ? finalConfig.trigger : [finalConfig.trigger] + ), hideTooltip = React6.useCallback(function() { + clearTimeout(timer.current), timer.current = window.setTimeout(function() { + return setVisible(!1); + }, finalConfig.delayHide); + }, [finalConfig.delayHide, setVisible]), showTooltip = React6.useCallback(function() { + clearTimeout(timer.current), timer.current = window.setTimeout(function() { + return setVisible(!0); + }, finalConfig.delayShow); + }, [finalConfig.delayShow, setVisible]), toggleTooltip = React6.useCallback(function() { + getLatest().visible ? hideTooltip() : showTooltip(); + }, [getLatest, hideTooltip, showTooltip]); + React6.useEffect(function() { + if (getLatest().finalConfig.closeOnOutsideClick) { + var handleClickOutside = function(event) { + var _event$composedPath, _getLatest = getLatest(), tooltipRef2 = _getLatest.tooltipRef, triggerRef2 = _getLatest.triggerRef, target = (event.composedPath == null || (_event$composedPath = event.composedPath()) == null ? void 0 : _event$composedPath[0]) || event.target; + target instanceof Node && tooltipRef2 != null && triggerRef2 != null && !tooltipRef2.contains(target) && !triggerRef2.contains(target) && hideTooltip(); + }; + return document.addEventListener("mousedown", handleClickOutside), function() { + return document.removeEventListener("mousedown", handleClickOutside); + }; + } + }, [getLatest, hideTooltip]), React6.useEffect(function() { + if (!(triggerRef == null || !isTriggeredBy("click"))) + return triggerRef.addEventListener("click", toggleTooltip), function() { + return triggerRef.removeEventListener("click", toggleTooltip); + }; + }, [triggerRef, isTriggeredBy, toggleTooltip]), React6.useEffect(function() { + if (!(triggerRef == null || !isTriggeredBy("double-click"))) + return triggerRef.addEventListener("dblclick", toggleTooltip), function() { + return triggerRef.removeEventListener("dblclick", toggleTooltip); + }; + }, [triggerRef, isTriggeredBy, toggleTooltip]), React6.useEffect(function() { + if (!(triggerRef == null || !isTriggeredBy("right-click"))) { + var preventDefaultAndToggle = function(event) { + event.preventDefault(), toggleTooltip(); + }; + return triggerRef.addEventListener("contextmenu", preventDefaultAndToggle), function() { + return triggerRef.removeEventListener("contextmenu", preventDefaultAndToggle); + }; + } + }, [triggerRef, isTriggeredBy, toggleTooltip]), React6.useEffect(function() { + if (!(triggerRef == null || !isTriggeredBy("focus"))) + return triggerRef.addEventListener("focus", showTooltip), triggerRef.addEventListener("blur", hideTooltip), function() { + triggerRef.removeEventListener("focus", showTooltip), triggerRef.removeEventListener("blur", hideTooltip); + }; + }, [triggerRef, isTriggeredBy, showTooltip, hideTooltip]), React6.useEffect(function() { + if (!(triggerRef == null || !isTriggeredBy("hover"))) + return triggerRef.addEventListener("mouseenter", showTooltip), triggerRef.addEventListener("mouseleave", hideTooltip), function() { + triggerRef.removeEventListener("mouseenter", showTooltip), triggerRef.removeEventListener("mouseleave", hideTooltip); + }; + }, [triggerRef, isTriggeredBy, showTooltip, hideTooltip]), React6.useEffect(function() { + if (!(tooltipRef == null || !isTriggeredBy("hover") || !getLatest().finalConfig.interactive)) + return tooltipRef.addEventListener("mouseenter", showTooltip), tooltipRef.addEventListener("mouseleave", hideTooltip), function() { + tooltipRef.removeEventListener("mouseenter", showTooltip), tooltipRef.removeEventListener("mouseleave", hideTooltip); + }; + }, [tooltipRef, isTriggeredBy, showTooltip, hideTooltip, getLatest]); + var isReferenceHidden = popperProps == null || (_popperProps$state = popperProps.state) == null || (_popperProps$state$mo = _popperProps$state.modifiersData) == null || (_popperProps$state$mo2 = _popperProps$state$mo.hide) == null ? void 0 : _popperProps$state$mo2.isReferenceHidden; + React6.useEffect(function() { + finalConfig.closeOnTriggerHidden && isReferenceHidden && hideTooltip(); + }, [finalConfig.closeOnTriggerHidden, hideTooltip, isReferenceHidden]), React6.useEffect(function() { + if (!finalConfig.followCursor || triggerRef == null) return; + function setMousePosition(_ref) { + var clientX = _ref.clientX, clientY = _ref.clientY; + virtualElement.getBoundingClientRect = generateBoundingClientRect(clientX, clientY), update?.(); + } + return triggerRef.addEventListener("mousemove", setMousePosition), function() { + return triggerRef.removeEventListener("mousemove", setMousePosition); + }; + }, [finalConfig.followCursor, triggerRef, update]), React6.useEffect(function() { + if (!(tooltipRef == null || update == null || finalConfig.mutationObserverOptions == null)) { + var observer = new MutationObserver(update); + return observer.observe(tooltipRef, finalConfig.mutationObserverOptions), function() { + return observer.disconnect(); + }; + } + }, [finalConfig.mutationObserverOptions, tooltipRef, update]); + var getTooltipProps = function(args) { + return args === void 0 && (args = {}), _extends({}, args, { + style: _extends({}, args.style, styles.popper) + }, attributes.popper, { + "data-popper-interactive": finalConfig.interactive + }); + }, getArrowProps = function(args) { + return args === void 0 && (args = {}), _extends({}, args, attributes.arrow, { + style: _extends({}, args.style, styles.arrow), + "data-popper-arrow": !0 + }); + }; + return _extends({ + getArrowProps, + getTooltipProps, + setTooltipRef, + setTriggerRef, + tooltipRef, + triggerRef, + visible + }, popperProps); +} + +// src/components/components/tooltip/WithTooltip.tsx +import { lighten, styled } from "storybook/theming"; +var { document: document2 } = global, match = (0, import_memoizerific.default)(1e3)( + (requests, actual, value, fallback = 0) => actual.split("-")[0] === requests ? value : fallback +), ArrowSpacing = 8, Arrow = styled.div( + { + position: "absolute", + borderStyle: "solid" + }, + ({ placement }) => { + let x = 0, y = 0; + switch (!0) { + case (placement.startsWith("left") || placement.startsWith("right")): { + y = 8; + break; + } + case (placement.startsWith("top") || placement.startsWith("bottom")): { + x = 8; + break; + } + default: + } + return { transform: `translate3d(${x}px, ${y}px, 0px)` }; + }, + ({ theme, color, placement }) => ({ + bottom: `${match("top", placement, `${ArrowSpacing * -1}px`, "auto")}`, + top: `${match("bottom", placement, `${ArrowSpacing * -1}px`, "auto")}`, + right: `${match("left", placement, `${ArrowSpacing * -1}px`, "auto")}`, + left: `${match("right", placement, `${ArrowSpacing * -1}px`, "auto")}`, + borderBottomWidth: `${match("top", placement, "0", ArrowSpacing)}px`, + borderTopWidth: `${match("bottom", placement, "0", ArrowSpacing)}px`, + borderRightWidth: `${match("left", placement, "0", ArrowSpacing)}px`, + borderLeftWidth: `${match("right", placement, "0", ArrowSpacing)}px`, + borderTopColor: match( + "top", + placement, + theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app, + "transparent" + ), + borderBottomColor: match( + "bottom", + placement, + theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app, + "transparent" + ), + borderLeftColor: match( + "left", + placement, + theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app, + "transparent" + ), + borderRightColor: match( + "right", + placement, + theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app, + "transparent" + ) + }) +), Wrapper = styled.div( + ({ hidden }) => ({ + display: hidden ? "none" : "inline-block", + zIndex: 2147483647, + colorScheme: "light dark" + }), + ({ theme, color, hasChrome }) => hasChrome ? { + background: color && theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app, + filter: ` + drop-shadow(0px 5px 5px rgba(0,0,0,0.05)) + drop-shadow(0 1px 3px rgba(0,0,0,0.1)) + `, + borderRadius: theme.appBorderRadius + 2, + fontSize: theme.typography.size.s1 + } : {} +), Tooltip = React7.forwardRef( + ({ + placement = "top", + hasChrome = !0, + children, + arrowProps = {}, + tooltipRef, + color, + withArrows, + ...props + }, ref) => React7.createElement(Wrapper, { "data-testid": "tooltip", hasChrome, ref, ...props, color }, hasChrome && withArrows && React7.createElement(Arrow, { placement, ...arrowProps, color }), children) +); +Tooltip.displayName = "Tooltip"; +var TargetContainer = styled.div` + display: inline-block; + cursor: ${(props) => props.trigger === "hover" || props.trigger?.includes("hover") ? "default" : "pointer"}; +`, TargetSvgContainer = styled.g` + cursor: ${(props) => props.trigger === "hover" || props.trigger?.includes("hover") ? "default" : "pointer"}; +`, WithTooltipPure = ({ + svg = !1, + trigger = "click", + closeOnOutsideClick = !1, + placement = "top", + modifiers = [ + { + name: "preventOverflow", + options: { + padding: 8 + } + }, + { + name: "offset", + options: { + offset: [8, 8] + } + }, + { + name: "arrow", + options: { + padding: 8 + } + } + ], + hasChrome = !0, + defaultVisible = !1, + withArrows, + offset: offset2, + tooltip, + children, + closeOnTriggerHidden, + mutationObserverOptions, + delayHide = trigger === "hover" ? 200 : 0, + visible, + interactive, + delayShow = trigger === "hover" ? 400 : 0, + strategy, + followCursor, + onVisibleChange, + portalContainer, + ...props +}) => { + let Container = svg ? TargetSvgContainer : TargetContainer, { + getArrowProps, + getTooltipProps, + setTooltipRef, + setTriggerRef, + visible: isVisible, + state + } = usePopperTooltip( + { + trigger, + placement, + defaultVisible, + delayHide, + interactive, + closeOnOutsideClick, + closeOnTriggerHidden, + onVisibleChange, + delayShow, + followCursor, + mutationObserverOptions, + visible, + offset: offset2 + }, + { + modifiers, + strategy + } + ), portalTarget = (typeof portalContainer == "string" ? document2.querySelector(portalContainer) : portalContainer) || document2.body, tooltipComponent = isVisible ? React7.createElement( + Tooltip, + { + placement: state?.placement, + ref: setTooltipRef, + hasChrome, + arrowProps: getArrowProps(), + withArrows, + ...getTooltipProps() + }, + typeof tooltip == "function" ? tooltip({ onHide: () => onVisibleChange(!1) }) : tooltip + ) : null; + return React7.createElement(React7.Fragment, null, React7.createElement(Container, { trigger, ref: setTriggerRef, ...props }, children), isVisible && ReactDOM2.createPortal(tooltipComponent, portalTarget)); +}, WithToolTipState = ({ + startOpen = !1, + onVisibleChange: onChange, + ...rest +}) => { + let [tooltipShown, setTooltipShown] = useState5(startOpen), onVisibilityChange = useCallback4( + (visibility) => { + onChange && onChange(visibility) === !1 || setTooltipShown(visibility); + }, + [onChange] + ); + return useEffect6(() => { + let hide2 = () => onVisibilityChange(!1), handleKeyDown = (e) => { + e.key === "Escape" && hide2(); + }; + document2.addEventListener("keydown", handleKeyDown, !1); + let iframes = Array.from(document2.getElementsByTagName("iframe")), unbinders = []; + return iframes.forEach((iframe) => { + let bind = () => { + try { + iframe.contentWindow.document && (iframe.contentWindow.document.addEventListener("click", hide2), unbinders.push(() => { + try { + iframe.contentWindow.document.removeEventListener("click", hide2); + } catch { + } + })); + } catch { + } + }; + bind(), iframe.addEventListener("load", bind), unbinders.push(() => { + iframe.removeEventListener("load", bind); + }); + }), () => { + document2.removeEventListener("keydown", handleKeyDown), unbinders.forEach((unbind) => { + unbind(); + }); + }; + }), React7.createElement(WithTooltipPure, { ...rest, visible: tooltipShown, onVisibleChange: onVisibilityChange }); +}, DeprecatedPure = (props) => (deprecate( + "WithTooltipPure is deprecated and will be removed in Storybook 11. Please use WithTooltip instead." +), React7.createElement(WithTooltipPure, { "data-deprecated": "WithTooltipPure", ...props })), DeprecatedState = (props) => (deprecate( + "WithToolTipState is deprecated and will be removed in Storybook 11. Please use WithTooltip instead." +), React7.createElement(WithToolTipState, { "data-deprecated": "WithToolTipState", ...props })); +export { + Tooltip, + DeprecatedState as WithToolTipState, + WithToolTipState as WithTooltip, + DeprecatedPure as WithTooltipPure +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-242VQQM5.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-242VQQM5.js new file mode 100644 index 0000000000000000000000000000000000000000..c6f13a558ba54b6bef0470f708cc71b28c56039a --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-242VQQM5.js @@ -0,0 +1,14 @@ +// ../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +function _objectWithoutPropertiesLoose(r, e) { + if (r == null) return {}; + var t = {}; + for (var n in r) if ({}.hasOwnProperty.call(r, n)) { + if (e.indexOf(n) !== -1) continue; + t[n] = r[n]; + } + return t; +} + +export { + _objectWithoutPropertiesLoose +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-2HVKLHKJ.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-2HVKLHKJ.js new file mode 100644 index 0000000000000000000000000000000000000000..fad00785eddc67e6579872434b923faa4b2f5ce5 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-2HVKLHKJ.js @@ -0,0 +1,88 @@ +// src/storybook-error.ts +function parseErrorCode({ + code, + category +}) { + let paddedCode = String(code).padStart(4, "0"); + return `SB_${category}_${paddedCode}`; +} +function appendErrorRef(url) { + if (/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(url)) + return url; + try { + let urlObj = new URL(url); + return urlObj.searchParams.set("ref", "error"), urlObj.toString(); + } catch { + return url; + } +} +var StorybookError = class _StorybookError extends Error { + constructor(props) { + super( + _StorybookError.getFullMessage(props), + props.cause === void 0 ? void 0 : { cause: props.cause } + ); + /** + * Data associated with the error. Used to provide additional information in the error message or + * to be passed to telemetry. + */ + this.data = {}; + /** Flag used to easily determine if the error originates from Storybook. */ + this.fromStorybook = !0; + /** + * Flag used to determine if the error is handled by us and should therefore not be shown to the + * user. + */ + this.isHandledError = !1; + /** + * A collection of sub errors which relate to a parent error. + * + * Sub-errors are used to represent multiple related errors that occurred together. When a + * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error + * are sent as separate telemetry events. This allows for better error tracking and debugging. + * + * @example + * + * ```ts + * const error1 = new SomeError(); + * const error2 = new AnotherError(); + * const parentError = new ParentError({ + * // ... other props + * subErrors: [error1, error2], + * }); + * ``` + */ + this.subErrors = []; + this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name, this.subErrors = props.subErrors ?? []; + } + get fullErrorCode() { + return parseErrorCode({ code: this.code, category: this.category }); + } + /** Overrides the default `Error.name` property in the format: SB__. */ + get name() { + let errorName = this._name || this.constructor.name; + return `${this.fullErrorCode} (${errorName})`; + } + set name(name) { + this._name = name; + } + /** Generates the error message along with additional documentation link (if applicable). */ + static getFullMessage({ + documentation, + code, + category, + message + }) { + let page; + return documentation === !0 ? page = `https://storybook.js.org/error/${parseErrorCode({ code, category })}?ref=error` : typeof documentation == "string" ? page = appendErrorRef(documentation) : Array.isArray(documentation) && (page = ` +${documentation.map((doc) => ` - ${appendErrorRef(doc)}`).join(` +`)}`), `${message}${page != null ? ` + +More info: ${page} +` : ""}`; + } +}; + +export { + StorybookError +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-3LY4VQVK.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-3LY4VQVK.js new file mode 100644 index 0000000000000000000000000000000000000000..57274f54f804fab54b1dc0df8cee832533d4d43a --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-3LY4VQVK.js @@ -0,0 +1,37 @@ +// ../../node_modules/ts-dedent/esm/index.js +function dedent(templ) { + for (var values = [], _i = 1; _i < arguments.length; _i++) + values[_i - 1] = arguments[_i]; + var strings = Array.from(typeof templ == "string" ? [templ] : templ); + strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, ""); + var indentLengths = strings.reduce(function(arr, str) { + var matches = str.match(/\n([\t ]+|(?!\s).)/g); + return matches ? arr.concat(matches.map(function(match) { + var _a, _b; + return (_b = (_a = match.match(/[\t ]/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; + })) : arr; + }, []); + if (indentLengths.length) { + var pattern_1 = new RegExp(` +[ ]{` + Math.min.apply(Math, indentLengths) + "}", "g"); + strings = strings.map(function(str) { + return str.replace(pattern_1, ` +`); + }); + } + strings[0] = strings[0].replace(/^\r?\n/, ""); + var string = strings[0]; + return values.forEach(function(value, i) { + var endentations = string.match(/(?:^|\n)( *)$/), endentation = endentations ? endentations[1] : "", indentedValue = value; + typeof value == "string" && value.includes(` +`) && (indentedValue = String(value).split(` +`).map(function(str, i2) { + return i2 === 0 ? str : "" + endentation + str; + }).join(` +`)), string += indentedValue + strings[i + 1]; + }), string; +} + +export { + dedent +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-4PUEAVR7.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-4PUEAVR7.js new file mode 100644 index 0000000000000000000000000000000000000000..6d2decdda554d3f54089e215905b10c01691e1ec --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-4PUEAVR7.js @@ -0,0 +1,155 @@ +import { + StatusTypeIdMismatchError as StatusTypeIdMismatchError3 +} from "./chunk-MFQQ5L5I.js"; +import { + StatusTypeIdMismatchError +} from "./chunk-KUHYVZJN.js"; +import { + StatusTypeIdMismatchError as StatusTypeIdMismatchError2 +} from "./chunk-IUGBVGDA.js"; + +// src/shared/status-store/index.ts +var STATUS_VALUE_PREFIX = "status-value:", STATUS_VALUES = [ + "status-value:pending", + "status-value:success", + "status-value:new", + "status-value:modified", + "status-value:affected", + "status-value:reviewing", + "status-value:warning", + "status-value:error", + "status-value:unknown" +], toStatusValue = (shortName) => { + if (shortName === "related") return "status-value:affected"; + let candidate = `${STATUS_VALUE_PREFIX}${shortName}`; + return STATUS_VALUES.includes(candidate) ? candidate : void 0; +}, statusValueShortName = (value) => value === "status-value:affected" ? "related" : value.slice(STATUS_VALUE_PREFIX.length); +var CHANGE_DETECTION_STATUS_TYPE_ID = "storybook/change-detection", REVIEW_STATUS_TYPE_ID = "storybook/review", NON_AGGREGATED_STATUS_TYPE_IDS = [ + CHANGE_DETECTION_STATUS_TYPE_ID, + REVIEW_STATUS_TYPE_ID +], UNIVERSAL_STATUS_STORE_OPTIONS = { + id: "storybook/status", + leader: !0, + initialState: {} +}, StatusStoreEventType = { + SELECT: "select" +}; +function countStatusesByValue(allStatuses) { + let counts = {}; + for (let statusByTypeId of Object.values(allStatuses)) + for (let status of Object.values(statusByTypeId)) + counts[status.value] = (counts[status.value] ?? 0) + 1; + return counts; +} +function createStatusStore({ + universalStatusStore, + useUniversalStore, + environment +}) { + let fullStatusStore = { + getAll() { + return universalStatusStore.getState(); + }, + set(statuses) { + universalStatusStore.setState((state) => { + let newState = { ...state }; + for (let status of statuses) { + let { storyId, typeId } = status; + newState[storyId] = { ...newState[storyId] ?? {}, [typeId]: status }; + } + return newState; + }); + }, + onAllStatusChange(listener) { + return universalStatusStore.onStateChange((state, prevState) => { + listener(state, prevState); + }); + }, + onSelect(listener) { + return universalStatusStore.subscribe(StatusStoreEventType.SELECT, (event) => { + listener(event.payload); + }); + }, + selectStatuses: (statuses) => { + universalStatusStore.send({ type: StatusStoreEventType.SELECT, payload: statuses }); + }, + unset(storyIds) { + if (!storyIds) { + universalStatusStore.setState({}); + return; + } + universalStatusStore.setState((state) => { + let newState = { ...state }; + for (let storyId of storyIds) + delete newState[storyId]; + return newState; + }); + }, + typeId: void 0 + }, getStatusStoreByTypeId = (typeId) => ({ + getAll: fullStatusStore.getAll, + set(statuses) { + universalStatusStore.setState((state) => { + let newState = { ...state }; + for (let status of statuses) { + let { storyId } = status; + if (status.typeId !== typeId) + switch (environment) { + case "server": + throw new StatusTypeIdMismatchError({ + status, + typeId + }); + case "manager": + throw new StatusTypeIdMismatchError2({ + status, + typeId + }); + default: + throw new StatusTypeIdMismatchError3({ + status, + typeId + }); + } + newState[storyId] = { ...newState[storyId] ?? {}, [typeId]: status }; + } + return newState; + }); + }, + onAllStatusChange: fullStatusStore.onAllStatusChange, + onSelect(listener) { + return universalStatusStore.subscribe(StatusStoreEventType.SELECT, (event) => { + event.payload.some((status) => status.typeId === typeId) && listener(event.payload); + }); + }, + unset(storyIds) { + universalStatusStore.setState((state) => { + let newState = { ...state }; + for (let storyId in newState) + if (newState[storyId]?.[typeId] && (!storyIds || storyIds?.includes(storyId))) { + let { [typeId]: omittedStatus, ...storyStatusesWithoutTypeId } = newState[storyId]; + newState[storyId] = storyStatusesWithoutTypeId; + } + return newState; + }); + }, + typeId + }); + return useUniversalStore ? { + getStatusStoreByTypeId, + fullStatusStore, + universalStatusStore, + useStatusStore: (selector) => useUniversalStore(universalStatusStore, selector)[0] + } : { getStatusStoreByTypeId, fullStatusStore, universalStatusStore }; +} + +export { + toStatusValue, + statusValueShortName, + CHANGE_DETECTION_STATUS_TYPE_ID, + REVIEW_STATUS_TYPE_ID, + NON_AGGREGATED_STATUS_TYPE_IDS, + UNIVERSAL_STATUS_STORE_OPTIONS, + countStatusesByValue, + createStatusStore +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-5FAQJLSD.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-5FAQJLSD.js new file mode 100644 index 0000000000000000000000000000000000000000..22427c2480e19f969ce5c662e73404d8d8f35609 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-5FAQJLSD.js @@ -0,0 +1,101 @@ +import { + array, + custom, + looseObject, + object, + optional, + record, + string, + undefined_, + void_ +} from "./chunk-W6Y3UHOT.js"; + +// src/measure/constants.ts +var ADDON_ID = "storybook/measure-addon", TOOL_ID = `${ADDON_ID}/tool`, PARAM_KEY = "measureEnabled", EVENTS = { + RESULT: `${ADDON_ID}/result`, + REQUEST: `${ADDON_ID}/request`, + CLEAR: `${ADDON_ID}/clear` +}; + +// src/outline/constants.ts +var ADDON_ID2 = "storybook/outline", PARAM_KEY2 = "outline"; + +// src/shared/open-service/services/docgen/definition.ts +import { defineService } from "storybook/open-service"; + +// src/shared/open-service/services/docgen/paths.ts +function docgenQueryStaticPath(id) { + return `${id}.json`; +} + +// src/shared/open-service/services/docgen/definition.ts +var docgenInputSchema = object({ id: string() }), argTypesSchema = custom( + (value) => typeof value == "object" && value !== null && !Array.isArray(value) +), docgenErrorSchema = object({ + name: string(), + message: string() +}), docgenJsDocTagsSchema = record(string(), array(string())), docgenComponentFields = { + name: string(), + path: string(), + description: optional(string()), + summary: optional(string()), + jsDocTags: docgenJsDocTagsSchema, + argTypes: optional(argTypesSchema), + error: optional(docgenErrorSchema) +}, docgenSubcomponentFields = { + ...docgenComponentFields, + import: optional(string()) +}, docgenSubcomponentSchema = looseObject(docgenSubcomponentFields), docgenPayloadSchema = looseObject({ + id: string(), + ...docgenComponentFields, + subcomponents: optional(record(string(), docgenSubcomponentSchema)) +}), docgenOutputSchema = optional(docgenPayloadSchema), docgenServiceDef = defineService({ + id: "core/docgen", + description: "Component documentation (name, description, props, JSDoc tags) keyed by component id.", + initialState: { components: {} }, + queries: { + docgen: { + description: "Returns the docgen payload for one component id, or undefined when not loaded.", + input: docgenInputSchema, + output: docgenOutputSchema, + handler: (input, ctx) => ctx.self.state.components[input.id], + load: async (input, ctx) => { + await ctx.self.commands.extractDocgen(input); + }, + staticPath: (input) => docgenQueryStaticPath(input.id) + }, + docgenForAllComponents: { + description: "Returns docgen payloads for every component in the story index.", + input: void_(), + output: record(string(), docgenPayloadSchema), + handler: (_input, ctx) => ctx.self.state.components, + load: async (_input, ctx) => { + await ctx.self.commands.extractAllDocgen(void 0); + } + } + }, + commands: { + extractDocgen: { + description: "Resolves the story entry for a component id, runs the registered provider chain, writes the result into state, and returns it (or undefined when no provider produced docgen).", + input: docgenInputSchema, + output: docgenOutputSchema + // Handler is supplied at registration time so it can close over the story index and the + // composed experimental_docgenProvider chain. + }, + extractAllDocgen: { + description: "Extracts docgen for every component id in the story index by invoking `extractDocgen` for each.", + input: undefined_(), + output: void_() + // Handler is supplied at registration time so it can close over the story index. + } + } +}); + +export { + ADDON_ID, + TOOL_ID, + PARAM_KEY, + ADDON_ID2, + PARAM_KEY2, + docgenServiceDef +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-5GYAEUAU.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-5GYAEUAU.js new file mode 100644 index 0000000000000000000000000000000000000000..d74950e142f466e0d86913034b42960ca417bc72 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-5GYAEUAU.js @@ -0,0 +1,263 @@ +import { + argumentsTag, + arrayBufferTag, + arrayTag, + booleanTag, + dataViewTag, + dateTag, + float32ArrayTag, + float64ArrayTag, + getSymbols, + getTag, + int16ArrayTag, + int32ArrayTag, + int8ArrayTag, + isPlainObject, + isPrimitive, + isTypedArray, + mapTag, + numberTag, + objectTag, + regexpTag, + setTag, + stringTag, + symbolTag, + uint16ArrayTag, + uint32ArrayTag, + uint8ArrayTag, + uint8ClampedArrayTag +} from "./chunk-Z3B64JMR.js"; + +// ../../node_modules/es-toolkit/dist/object/mapValues.mjs +function mapValues(object, getNewValue) { + let result = {}, keys = Object.keys(object); + for (let i = 0; i < keys.length; i++) { + let key = keys[i], value = object[key]; + result[key] = getNewValue(value, key, object); + } + return result; +} + +// ../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs +function isUnsafeProperty(key) { + return key === "__proto__"; +} + +// ../../node_modules/es-toolkit/dist/object/mergeWith.mjs +function mergeWith(target, source, merge2) { + let sourceKeys = Object.keys(source); + for (let i = 0; i < sourceKeys.length; i++) { + let key = sourceKeys[i]; + if (isUnsafeProperty(key)) + continue; + let sourceValue = source[key], targetValue = target[key], merged = merge2(targetValue, sourceValue, key, target, source); + merged !== void 0 ? target[key] = merged : Array.isArray(sourceValue) ? Array.isArray(targetValue) ? target[key] = mergeWith(targetValue, sourceValue, merge2) : target[key] = mergeWith([], sourceValue, merge2) : isPlainObject(sourceValue) ? isPlainObject(targetValue) ? target[key] = mergeWith(targetValue, sourceValue, merge2) : target[key] = mergeWith({}, sourceValue, merge2) : (targetValue === void 0 || sourceValue !== void 0) && (target[key] = sourceValue); + } + return target; +} + +// ../../node_modules/es-toolkit/dist/object/pick.mjs +function pick(obj, keys) { + let result = {}; + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; + Object.hasOwn(obj, key) && (result[key] = obj[key]); + } + return result; +} + +// ../../node_modules/es-toolkit/dist/object/pickBy.mjs +function pickBy(obj, shouldPick) { + let result = {}, keys = Object.keys(obj); + for (let i = 0; i < keys.length; i++) { + let key = keys[i], value = obj[key]; + shouldPick(value, key) && (result[key] = value); + } + return result; +} + +// ../../node_modules/es-toolkit/dist/object/clone.mjs +function clone(obj) { + if (isPrimitive(obj)) + return obj; + if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && obj instanceof SharedArrayBuffer) + return obj.slice(0); + let prototype = Object.getPrototypeOf(obj), Constructor = prototype.constructor; + if (obj instanceof Date || obj instanceof Map || obj instanceof Set) + return new Constructor(obj); + if (obj instanceof RegExp) { + let newRegExp = new Constructor(obj); + return newRegExp.lastIndex = obj.lastIndex, newRegExp; + } + if (obj instanceof DataView) + return new Constructor(obj.buffer.slice(0)); + if (obj instanceof Error) { + let newError = new Constructor(obj.message); + return newError.stack = obj.stack, newError.name = obj.name, newError.cause = obj.cause, newError; + } + if (typeof File < "u" && obj instanceof File) + return new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified }); + if (typeof obj == "object") { + let newObject = Object.create(prototype); + return Object.assign(newObject, obj); + } + return obj; +} + +// ../../node_modules/es-toolkit/dist/object/cloneDeepWith.mjs +function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) { + let cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack); + if (cloned !== void 0) + return cloned; + if (isPrimitive(valueToClone)) + return valueToClone; + if (stack.has(valueToClone)) + return stack.get(valueToClone); + if (Array.isArray(valueToClone)) { + let result = new Array(valueToClone.length); + stack.set(valueToClone, result); + for (let i = 0; i < valueToClone.length; i++) + result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue); + return Object.hasOwn(valueToClone, "index") && (result.index = valueToClone.index), Object.hasOwn(valueToClone, "input") && (result.input = valueToClone.input), result; + } + if (valueToClone instanceof Date) + return new Date(valueToClone.getTime()); + if (valueToClone instanceof RegExp) { + let result = new RegExp(valueToClone.source, valueToClone.flags); + return result.lastIndex = valueToClone.lastIndex, result; + } + if (valueToClone instanceof Map) { + let result = /* @__PURE__ */ new Map(); + stack.set(valueToClone, result); + for (let [key, value] of valueToClone) + result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue)); + return result; + } + if (valueToClone instanceof Set) { + let result = /* @__PURE__ */ new Set(); + stack.set(valueToClone, result); + for (let value of valueToClone) + result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue)); + return result; + } + if (typeof Buffer < "u" && Buffer.isBuffer(valueToClone)) + return valueToClone.subarray(); + if (isTypedArray(valueToClone)) { + let result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length); + stack.set(valueToClone, result); + for (let i = 0; i < valueToClone.length; i++) + result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue); + return result; + } + if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && valueToClone instanceof SharedArrayBuffer) + return valueToClone.slice(0); + if (valueToClone instanceof DataView) { + let result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength); + return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result; + } + if (typeof File < "u" && valueToClone instanceof File) { + let result = new File([valueToClone], valueToClone.name, { + type: valueToClone.type + }); + return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result; + } + if (typeof Blob < "u" && valueToClone instanceof Blob) { + let result = new Blob([valueToClone], { type: valueToClone.type }); + return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result; + } + if (valueToClone instanceof Error) { + let result = new valueToClone.constructor(); + return stack.set(valueToClone, result), result.message = valueToClone.message, result.name = valueToClone.name, result.stack = valueToClone.stack, result.cause = valueToClone.cause, copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result; + } + if (valueToClone instanceof Boolean) { + let result = new Boolean(valueToClone.valueOf()); + return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result; + } + if (valueToClone instanceof Number) { + let result = new Number(valueToClone.valueOf()); + return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result; + } + if (valueToClone instanceof String) { + let result = new String(valueToClone.valueOf()); + return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result; + } + if (typeof valueToClone == "object" && isCloneableObject(valueToClone)) { + let result = Object.create(Object.getPrototypeOf(valueToClone)); + return stack.set(valueToClone, result), copyProperties(result, valueToClone, objectToClone, stack, cloneValue), result; + } + return valueToClone; +} +function copyProperties(target, source, objectToClone = target, stack, cloneValue) { + let keys = [...Object.keys(source), ...getSymbols(source)]; + for (let i = 0; i < keys.length; i++) { + let key = keys[i], descriptor = Object.getOwnPropertyDescriptor(target, key); + (descriptor == null || descriptor.writable) && (target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue)); + } +} +function isCloneableObject(object) { + switch (getTag(object)) { + case argumentsTag: + case arrayTag: + case arrayBufferTag: + case dataViewTag: + case booleanTag: + case dateTag: + case float32ArrayTag: + case float64ArrayTag: + case int8ArrayTag: + case int16ArrayTag: + case int32ArrayTag: + case mapTag: + case numberTag: + case objectTag: + case regexpTag: + case setTag: + case stringTag: + case symbolTag: + case uint8ArrayTag: + case uint8ClampedArrayTag: + case uint16ArrayTag: + case uint32ArrayTag: + return !0; + default: + return !1; + } +} + +// ../../node_modules/es-toolkit/dist/object/cloneDeep.mjs +function cloneDeep(obj) { + return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0); +} + +// ../../node_modules/es-toolkit/dist/object/omit.mjs +function omit(obj, keys) { + let result = { ...obj }; + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; + delete result[key]; + } + return result; +} + +// ../../node_modules/es-toolkit/dist/string/words.mjs +var CASE_SPLIT_PATTERN = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu"); + +// ../../node_modules/es-toolkit/dist/object/toMerged.mjs +function toMerged(target, source) { + return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) { + if (Array.isArray(sourceValue)) + return Array.isArray(targetValue) ? mergeWith(clone(targetValue), sourceValue, mergeRecursively) : mergeWith([], sourceValue, mergeRecursively); + if (isPlainObject(sourceValue)) + return isPlainObject(targetValue) ? mergeWith(clone(targetValue), sourceValue, mergeRecursively) : mergeWith({}, sourceValue, mergeRecursively); + }); +} + +export { + cloneDeep, + mapValues, + mergeWith, + omit, + pick, + pickBy, + toMerged +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-6XWLIJQL.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-6XWLIJQL.js new file mode 100644 index 0000000000000000000000000000000000000000..aad9ff743ec646f394aa1d5cdee9d7219d585efb --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-6XWLIJQL.js @@ -0,0 +1,11 @@ +// src/actions/constants.ts +var PARAM_KEY = "actions", ADDON_ID = "storybook/actions", PANEL_ID = `${ADDON_ID}/panel`, EVENT_ID = `${ADDON_ID}/action-event`, CLEAR_ID = `${ADDON_ID}/action-clear`, CYCLIC_KEY = "$___storybook.isCyclic"; + +export { + PARAM_KEY, + ADDON_ID, + PANEL_ID, + EVENT_ID, + CLEAR_ID, + CYCLIC_KEY +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-6YDLG6WW.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-6YDLG6WW.js new file mode 100644 index 0000000000000000000000000000000000000000..51b1ab83c668f64602f6e59d357e6c03a95e2cab --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-6YDLG6WW.js @@ -0,0 +1,18 @@ +// src/backgrounds/constants.ts +var ADDON_ID = "storybook/background", PARAM_KEY = "backgrounds", GRID_PARAM_KEY = "grid", EVENTS = { + UPDATE: `${ADDON_ID}/update` +}; + +// src/backgrounds/defaults.ts +var DEFAULT_BACKGROUNDS = { + light: { name: "light", value: "#F8F8F8" }, + dark: { name: "dark", value: "#333" } +}; + +export { + ADDON_ID, + PARAM_KEY, + GRID_PARAM_KEY, + EVENTS, + DEFAULT_BACKGROUNDS +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-A26ZOLVJ.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-A26ZOLVJ.js new file mode 100644 index 0000000000000000000000000000000000000000..2ad69b67e6b8257a4aa4d43e1f0ad3de5e211287 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-A26ZOLVJ.js @@ -0,0 +1,43 @@ +import { + Channel +} from "./chunk-KK3JJ3E4.js"; + +// src/channels/mock-channel.ts +function mockChannel() { + return new Channel({ + transport: { setHandler: () => { + }, send: () => { + } } + }); +} + +// src/shared/constants/tags.ts +var Tag = { + /** Indicates that autodocs should be generated for this component */ + AUTODOCS: "autodocs", + /** MDX documentation attached to a component's stories file */ + ATTACHED_MDX: "attached-mdx", + /** Standalone MDX documentation not attached to stories */ + UNATTACHED_MDX: "unattached-mdx", + /** Story has a play function */ + PLAY_FN: "play-fn", + /** Story has a test function */ + TEST_FN: "test-fn", + /** Development environment tag */ + DEV: "dev", + /** Test environment tag */ + TEST: "test", + /** Manifest generation tag */ + MANIFEST: "manifest" +}, BUILT_IN_FILTERS = { + _docs: (entry, excluded) => excluded ? entry.type !== "docs" : entry.type === "docs", + _play: (entry, excluded) => excluded ? entry.type !== "story" || !entry.tags?.includes(Tag.PLAY_FN) : entry.type === "story" && !!entry.tags?.includes(Tag.PLAY_FN), + _test: (entry, excluded) => excluded ? entry.type !== "story" || entry.subtype !== "test" : entry.type === "story" && entry.subtype === "test" +}, USER_TAG_FILTER = (tag) => (entry, excluded) => excluded ? !entry.tags?.includes(tag) : !!entry.tags?.includes(tag); + +export { + mockChannel, + Tag, + BUILT_IN_FILTERS, + USER_TAG_FILTER +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-DFGA7I22.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-DFGA7I22.js new file mode 100644 index 0000000000000000000000000000000000000000..b73562e82fbb7d98b484600670a5bbed5c155925 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-DFGA7I22.js @@ -0,0 +1,136 @@ +import { + createBrowserStaticLoader, + getService, + registerService +} from "./chunk-W6Y3UHOT.js"; +import { + seedQueryState +} from "./chunk-QC4HFS6K.js"; +import { + isEqual +} from "./chunk-Z3B64JMR.js"; + +// src/shared/open-service/use-service-command.ts +import * as React from "react"; +function useServiceCommand(service, commandName) { + return React.useMemo( + () => service.commands[commandName], + [service, commandName] + ); +} + +// src/shared/open-service/use-service-query.ts +import * as React2 from "react"; +function useServiceQuery(query, input, selector) { + let subscriptionKeyRef = React2.useRef(null), snapshotRef = React2.useRef(void 0); + (subscriptionKeyRef.current === null || subscriptionKeyRef.current.query !== query || !isEqual(subscriptionKeyRef.current.input, input) || subscriptionKeyRef.current.selector !== selector) && (subscriptionKeyRef.current = { query, input, selector }, snapshotRef.current = selector ? seedQueryState(query, input, selector) : seedQueryState(query, input)); + let subscriptionKey = subscriptionKeyRef.current, subscribe = React2.useCallback( + (listener) => { + let { query: q, input: i, selector: s } = subscriptionKey, onQueryState = (queryState) => { + snapshotRef.current = queryState, listener(); + }; + return s ? q.subscribe(i, s, onQueryState) : q.subscribe(i, onQueryState); + }, + [subscriptionKey] + ), getSnapshot = React2.useCallback(() => snapshotRef.current, []); + return React2.useSyncExternalStore(subscribe, getSnapshot); +} + +// src/shared/open-service/manager.ts +var getService2 = getService; +function registerService2(definition, registration) { + return registerService(definition, registration, { + relay: !0, + staticLoader: createBrowserStaticLoader() + }); +} + +// ../../node_modules/dequal/dist/index.mjs +var has = Object.prototype.hasOwnProperty; +function find(iter, tar, key) { + for (key of iter.keys()) + if (dequal(key, tar)) return key; +} +function dequal(foo, bar) { + var ctor, len, tmp; + if (foo === bar) return !0; + if (foo && bar && (ctor = foo.constructor) === bar.constructor) { + if (ctor === Date) return foo.getTime() === bar.getTime(); + if (ctor === RegExp) return foo.toString() === bar.toString(); + if (ctor === Array) { + if ((len = foo.length) === bar.length) + for (; len-- && dequal(foo[len], bar[len]); ) ; + return len === -1; + } + if (ctor === Set) { + if (foo.size !== bar.size) + return !1; + for (len of foo) + if (tmp = len, tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !bar.has(tmp)) return !1; + return !0; + } + if (ctor === Map) { + if (foo.size !== bar.size) + return !1; + for (len of foo) + if (tmp = len[0], tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !dequal(len[1], bar.get(tmp))) + return !1; + return !0; + } + if (ctor === ArrayBuffer) + foo = new Uint8Array(foo), bar = new Uint8Array(bar); + else if (ctor === DataView) { + if ((len = foo.byteLength) === bar.byteLength) + for (; len-- && foo.getInt8(len) === bar.getInt8(len); ) ; + return len === -1; + } + if (ArrayBuffer.isView(foo)) { + if ((len = foo.byteLength) === bar.byteLength) + for (; len-- && foo[len] === bar[len]; ) ; + return len === -1; + } + if (!ctor || typeof foo == "object") { + len = 0; + for (ctor in foo) + if (has.call(foo, ctor) && ++len && !has.call(bar, ctor) || !(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return !1; + return Object.keys(bar).length === len; + } + } + return foo !== foo && bar !== bar; +} + +// ../../node_modules/es-toolkit/dist/array/partition.mjs +function partition(arr, isInTruthy) { + let truthy = [], falsy = []; + for (let i = 0; i < arr.length; i++) { + let item = arr[i]; + isInTruthy(item) ? truthy.push(item) : falsy.push(item); + } + return [truthy, falsy]; +} + +// ../../node_modules/es-toolkit/dist/array/countBy.mjs +function countBy(arr, mapper) { + let result = {}; + for (let i = 0; i < arr.length; i++) { + let item = arr[i], key = mapper(item); + result[key] = (result[key] ?? 0) + 1; + } + return result; +} + +// ../../node_modules/es-toolkit/dist/array/uniq.mjs +function uniq(arr) { + return [...new Set(arr)]; +} + +export { + useServiceCommand, + useServiceQuery, + getService2 as getService, + registerService2 as registerService, + dequal, + countBy, + partition, + uniq +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-DRQKCCAG.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-DRQKCCAG.js new file mode 100644 index 0000000000000000000000000000000000000000..6bed58b37334e1ca4ee69fd068274e997ff7805b --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-DRQKCCAG.js @@ -0,0 +1,136 @@ +import { + __commonJS, + __require +} from "./chunk-IMSF75WX.js"; + +// ../../node_modules/memoizerific/memoizerific.js +var require_memoizerific = __commonJS({ + "../../node_modules/memoizerific/memoizerific.js"(exports, module) { + (function(f) { + if (typeof exports == "object" && typeof module < "u") + module.exports = f(); + else if (typeof define == "function" && define.amd) + define([], f); + else { + var g; + typeof window < "u" ? g = window : typeof global < "u" ? g = global : typeof self < "u" ? g = self : g = this, g.memoizerific = f(); + } + })(function() { + var define2, module2, exports2; + return (function e(t, n, r) { + function s(o2, u) { + if (!n[o2]) { + if (!t[o2]) { + var a = typeof __require == "function" && __require; + if (!u && a) return a(o2, !0); + if (i) return i(o2, !0); + var f = new Error("Cannot find module '" + o2 + "'"); + throw f.code = "MODULE_NOT_FOUND", f; + } + var l = n[o2] = { exports: {} }; + t[o2][0].call(l.exports, function(e2) { + var n2 = t[o2][1][e2]; + return s(n2 || e2); + }, l, l.exports, e, t, n, r); + } + return n[o2].exports; + } + for (var i = typeof __require == "function" && __require, o = 0; o < r.length; o++) s(r[o]); + return s; + })({ 1: [function(_dereq_, module3, exports3) { + module3.exports = function(forceSimilar) { + if (typeof Map != "function" || forceSimilar) { + var Similar = _dereq_("./similar"); + return new Similar(); + } else + return /* @__PURE__ */ new Map(); + }; + }, { "./similar": 2 }], 2: [function(_dereq_, module3, exports3) { + function Similar() { + return this.list = [], this.lastItem = void 0, this.size = 0, this; + } + Similar.prototype.get = function(key) { + var index; + if (this.lastItem && this.isEqual(this.lastItem.key, key)) + return this.lastItem.val; + if (index = this.indexOf(key), index >= 0) + return this.lastItem = this.list[index], this.list[index].val; + }, Similar.prototype.set = function(key, val) { + var index; + return this.lastItem && this.isEqual(this.lastItem.key, key) ? (this.lastItem.val = val, this) : (index = this.indexOf(key), index >= 0 ? (this.lastItem = this.list[index], this.list[index].val = val, this) : (this.lastItem = { key, val }, this.list.push(this.lastItem), this.size++, this)); + }, Similar.prototype.delete = function(key) { + var index; + if (this.lastItem && this.isEqual(this.lastItem.key, key) && (this.lastItem = void 0), index = this.indexOf(key), index >= 0) + return this.size--, this.list.splice(index, 1)[0]; + }, Similar.prototype.has = function(key) { + var index; + return this.lastItem && this.isEqual(this.lastItem.key, key) ? !0 : (index = this.indexOf(key), index >= 0 ? (this.lastItem = this.list[index], !0) : !1); + }, Similar.prototype.forEach = function(callback, thisArg) { + var i; + for (i = 0; i < this.size; i++) + callback.call(thisArg || this, this.list[i].val, this.list[i].key, this); + }, Similar.prototype.indexOf = function(key) { + var i; + for (i = 0; i < this.size; i++) + if (this.isEqual(this.list[i].key, key)) + return i; + return -1; + }, Similar.prototype.isEqual = function(val1, val2) { + return val1 === val2 || val1 !== val1 && val2 !== val2; + }, module3.exports = Similar; + }, {}], 3: [function(_dereq_, module3, exports3) { + var MapOrSimilar = _dereq_("map-or-similar"); + module3.exports = function(limit) { + var cache = new MapOrSimilar(!1), lru = []; + return function(fn) { + var memoizerific = function() { + var currentCache = cache, newMap, fnResult, argsLengthMinusOne = arguments.length - 1, lruPath = Array(argsLengthMinusOne + 1), isMemoized = !0, i; + if ((memoizerific.numArgs || memoizerific.numArgs === 0) && memoizerific.numArgs !== argsLengthMinusOne + 1) + throw new Error("Memoizerific functions should always be called with the same number of arguments"); + for (i = 0; i < argsLengthMinusOne; i++) { + if (lruPath[i] = { + cacheItem: currentCache, + arg: arguments[i] + }, currentCache.has(arguments[i])) { + currentCache = currentCache.get(arguments[i]); + continue; + } + isMemoized = !1, newMap = new MapOrSimilar(!1), currentCache.set(arguments[i], newMap), currentCache = newMap; + } + return isMemoized && (currentCache.has(arguments[argsLengthMinusOne]) ? fnResult = currentCache.get(arguments[argsLengthMinusOne]) : isMemoized = !1), isMemoized || (fnResult = fn.apply(null, arguments), currentCache.set(arguments[argsLengthMinusOne], fnResult)), limit > 0 && (lruPath[argsLengthMinusOne] = { + cacheItem: currentCache, + arg: arguments[argsLengthMinusOne] + }, isMemoized ? moveToMostRecentLru(lru, lruPath) : lru.push(lruPath), lru.length > limit && removeCachedResult(lru.shift())), memoizerific.wasMemoized = isMemoized, memoizerific.numArgs = argsLengthMinusOne + 1, fnResult; + }; + return memoizerific.limit = limit, memoizerific.wasMemoized = !1, memoizerific.cache = cache, memoizerific.lru = lru, memoizerific; + }; + }; + function moveToMostRecentLru(lru, lruPath) { + var lruLen = lru.length, lruPathLen = lruPath.length, isMatch, i, ii; + for (i = 0; i < lruLen; i++) { + for (isMatch = !0, ii = 0; ii < lruPathLen; ii++) + if (!isEqual(lru[i][ii].arg, lruPath[ii].arg)) { + isMatch = !1; + break; + } + if (isMatch) + break; + } + lru.push(lru.splice(i, 1)[0]); + } + function removeCachedResult(removedLru) { + var removedLruLen = removedLru.length, currentLru = removedLru[removedLruLen - 1], tmp, i; + for (currentLru.cacheItem.delete(currentLru.arg), i = removedLruLen - 2; i >= 0 && (currentLru = removedLru[i], tmp = currentLru.cacheItem.get(currentLru.arg), !tmp || !tmp.size); i--) + currentLru.cacheItem.delete(currentLru.arg); + } + function isEqual(val1, val2) { + return val1 === val2 || val1 !== val1 && val2 !== val2; + } + }, { "map-or-similar": 1 }] }, {}, [3])(3); + }); + } +}); + +export { + require_memoizerific +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-ECQ75MKQ.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-ECQ75MKQ.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-EUVGDK4H.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-EUVGDK4H.js new file mode 100644 index 0000000000000000000000000000000000000000..821cbf494e82674decc8e02c5496667ba2fc2d91 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-EUVGDK4H.js @@ -0,0 +1,93 @@ +import { + EVENT_ID +} from "./chunk-6XWLIJQL.js"; + +// src/actions/runtime/configureActions.ts +var config = { + depth: 10, + clearOnStoryChange: !0, + limit: 50 +}, configureActions = (options = {}) => { + Object.assign(config, options); +}; + +// src/actions/runtime/action.ts +import { ImplicitActionsDuringRendering } from "storybook/internal/preview-errors"; +import { global } from "@storybook/global"; +import { addons } from "storybook/preview-api"; +var findProto = (obj, callback) => { + let proto = Object.getPrototypeOf(obj); + return !proto || callback(proto) ? proto : findProto(proto, callback); +}, isReactSyntheticEvent = (e) => !!(typeof e == "object" && e && findProto(e, (proto) => /^Synthetic(?:Base)?Event$/.test(proto.constructor.name)) && typeof e.persist == "function"), serializeArg = (a) => { + if (isReactSyntheticEvent(a)) { + let e = Object.create( + a.constructor.prototype, + Object.getOwnPropertyDescriptors(a) + ); + e.persist(); + let viewDescriptor = Object.getOwnPropertyDescriptor(e, "view"), view = viewDescriptor?.value; + return typeof view == "object" && view?.constructor.name === "Window" && Object.defineProperty(e, "view", { + ...viewDescriptor, + value: Object.create(view.constructor.prototype) + }), e; + } + return a; +}; +function action(name, options = {}) { + let actionOptions = { + ...config, + ...options + }, handler = function(...args) { + if (options.implicit) { + let storyRenderer = ("__STORYBOOK_PREVIEW__" in global ? global.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find( + (render) => render.phase === "playing" || render.phase === "rendering" + ); + if (storyRenderer) { + let deprecated = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, error = new ImplicitActionsDuringRendering({ + phase: storyRenderer.phase, + name, + deprecated + }); + if (deprecated) + console.warn(error); + else + throw error; + } + } + let channel = addons.getChannel(), id = Date.now().toString(36) + Math.random().toString(36).substring(2), minDepth = 5, serializedArgs = args.map(serializeArg), normalizedArgs = args.length > 1 ? serializedArgs : serializedArgs[0], actionDisplayToEmit = { + id, + count: 0, + data: { name, args: normalizedArgs }, + options: { + ...actionOptions, + maxDepth: minDepth + (actionOptions.depth || 3) + } + }; + channel.emit(EVENT_ID, actionDisplayToEmit); + }; + return handler.isAction = !0, handler.implicit = options.implicit, handler; +} + +// src/actions/runtime/actions.ts +var actions = (...args) => { + let options = config, names = args; + names.length === 1 && Array.isArray(names[0]) && ([names] = names), names.length !== 1 && typeof names[names.length - 1] != "string" && (options = { + ...config, + ...names.pop() + }); + let namesObject = names[0]; + (names.length !== 1 || typeof namesObject == "string") && (namesObject = {}, names.forEach((name) => { + namesObject[name] = name; + })); + let actionsObject = {}; + return Object.keys(namesObject).forEach((name) => { + actionsObject[name] = action(namesObject[name], options); + }), actionsObject; +}; + +export { + config, + configureActions, + action, + actions +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-FLUL445Z.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-FLUL445Z.js new file mode 100644 index 0000000000000000000000000000000000000000..8b2f56c084cac9c3cd5f4ea68f39cef6f20e48b2 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-FLUL445Z.js @@ -0,0 +1,159 @@ +import { + mapValues, + pickBy +} from "./chunk-5GYAEUAU.js"; +import { + isPlainObject +} from "./chunk-Z3B64JMR.js"; +import { + dedent +} from "./chunk-3LY4VQVK.js"; + +// src/preview-api/modules/store/parameters.ts +var combineParameters = (...parameterSets) => { + let mergeKeys = {}, definedParametersSets = parameterSets.filter(Boolean), combined = definedParametersSets.reduce((acc, parameters) => (Object.entries(parameters).forEach(([key, value]) => { + let existing = acc[key]; + Array.isArray(value) || typeof existing > "u" ? acc[key] = value : isPlainObject(value) && isPlainObject(existing) ? mergeKeys[key] = !0 : typeof value < "u" && (acc[key] = value); + }), acc), {}); + return Object.keys(mergeKeys).forEach((key) => { + let mergeValues = definedParametersSets.filter(Boolean).map((p) => p[key]).filter((value) => typeof value < "u"); + mergeValues.every((value) => isPlainObject(value)) ? combined[key] = combineParameters(...mergeValues) : combined[key] = mergeValues[mergeValues.length - 1]; + }), combined; +}; + +// src/preview-api/modules/store/filterArgTypes.ts +var matches = (name, descriptor) => Array.isArray(descriptor) ? descriptor.includes(name) : name.match(descriptor), filterArgTypes = (argTypes, include, exclude) => !include && !exclude ? argTypes : argTypes && pickBy(argTypes, (argType, key) => { + let name = argType.name || key.toString(); + return !!(!include || matches(name, include)) && (!exclude || !matches(name, exclude)); +}); + +// src/preview-api/modules/store/inferControls.ts +import { logger } from "storybook/internal/client-logger"; +var inferControl = (argType, name, matchers) => { + let { type, options } = argType; + if (type) { + if (matchers.color && matchers.color.test(name)) { + let controlType = type.name; + if (controlType === "string") + return { control: { type: "color" } }; + controlType !== "enum" && logger.warn( + `Addon controls: Control of type color only supports string, received "${controlType}" instead` + ); + } + if (matchers.date && matchers.date.test(name)) + return { control: { type: "date" } }; + switch (type.name) { + case "array": + return { control: { type: "object" } }; + case "boolean": + return { control: { type: "boolean" } }; + case "string": + return { control: { type: "text" } }; + case "number": + return { control: { type: "number" } }; + case "enum": { + let { value } = type; + return { control: { type: value?.length <= 5 ? "radio" : "select" }, options: value }; + } + case "function": + case "symbol": + return null; + default: + return { control: { type: options ? "select" : "object" } }; + } + } +}, inferControls = (context) => { + let { + argTypes, + parameters: { __isArgsStory, controls: { include = null, exclude = null, matchers = {} } = {} } + } = context; + if (!__isArgsStory) + return argTypes; + let filteredArgTypes = filterArgTypes(argTypes, include, exclude), withControls = mapValues(filteredArgTypes, (argType, name) => argType?.type && inferControl(argType, name.toString(), matchers)); + return combineParameters(withControls, filteredArgTypes); +}; +inferControls.secondPass = !0; + +// src/preview-api/modules/store/inferArgTypes.ts +import { logger as logger2 } from "storybook/internal/client-logger"; +var inferType = (value, name, visited, cache) => { + let type = typeof value; + switch (type) { + case "boolean": + case "string": + case "number": + case "function": + case "symbol": + return { name: type }; + default: + break; + } + if (value) { + if (cache.has(value)) + return cache.get(value); + if (visited.has(value)) + return logger2.warn(dedent` + We've detected a cycle in arg '${name}'. Args should be JSON-serializable. + + Consider using the mapping feature or fully custom args: + - Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values + - Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args + `), { name: "other", value: "cyclic object" }; + visited.add(value); + let result; + return Array.isArray(value) ? result = { name: "array", value: value.length > 0 ? inferType(value[0], name, visited, cache) : { name: "other", value: "unknown" } } : result = { name: "object", value: mapValues(value, (field) => inferType(field, name, visited, cache)) }, visited.delete(value), cache.set(value, result), result; + } + return { name: "object", value: {} }; +}, inferArgTypes = (context) => { + let { id, argTypes: userArgTypes = {}, initialArgs = {} } = context, cache = /* @__PURE__ */ new Map(), argTypes = Object.fromEntries( + Object.entries(initialArgs).filter(([key]) => !userArgTypes[key]?.type).map(([key, arg]) => [ + key, + { + name: key, + type: inferType(arg, `${id}.${key}`, /* @__PURE__ */ new Set(), cache) + } + ]) + ), userArgTypesNames = mapValues(userArgTypes, (argType, key) => ({ + name: key + })); + return combineParameters(argTypes, userArgTypesNames, userArgTypes); +}; +inferArgTypes.secondPass = !0; + +// src/docs-tools/argTypes/docgenServiceArgTypes.ts +function mergeServiceArgTypes({ + payload, + storyId, + parameters, + initialArgs, + customArgTypes +}) { + let merged = combineParameters(payload.argTypes ?? {}, customArgTypes ?? {}), withInferredTypes = inferArgTypes({ + id: storyId, + argTypes: merged, + initialArgs: initialArgs ?? {} + }); + return inferControls({ + argTypes: withInferredTypes, + // The manager can render this before the preview reports `storyPrepared`, so `parameters` may be + // undefined; `inferControls` reads `parameters.__isArgsStory` and would throw. An empty object + // makes it a no-op until prepared parameters arrive and trigger a re-render. + parameters: parameters ?? {} + }); +} +function getServiceSubcomponentArgTypes(payload) { + return Object.fromEntries( + Object.entries(payload.subcomponents ?? {}).flatMap( + ([name, subcomponent]) => subcomponent.argTypes ? [[name, subcomponent.argTypes]] : [] + ) + ); +} + +export { + combineParameters, + inferArgTypes, + filterArgTypes, + inferControls, + mergeServiceArgTypes, + getServiceSubcomponentArgTypes +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GLOGC42D.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GLOGC42D.js new file mode 100644 index 0000000000000000000000000000000000000000..94013cadc4513b901b879e9dc95cd399d071cec1 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GLOGC42D.js @@ -0,0 +1,299 @@ +import { + curriedDarken$1, + curriedLighten$1, + rgba +} from "./chunk-S6TK43XQ.js"; + +// src/theming/base.ts +var color = { + // Official color palette + primary: "#FF4785", + // coral + secondary: "#006DEB", + // ocean + tertiary: "#FAFBFC", + ancillary: "#22a699", + // Complimentary + orange: "#FC521F", + gold: "#FFAE00", + green: "#66BF3C", + seafoam: "#37D5D3", + purple: "#6F2CAC", + ultraviolet: "#2A0481", + // Monochrome + lightest: "#FFFFFF", + lighter: "#F6F9FC", + light: "#EEF2F6", + mediumlight: "#ECF2F9", + medium: "#D9E5F2", + mediumdark: "#737F8C", + dark: "#5C6570", + darker: "#454C54", + darkest: "#2E3338", + // For borders + border: "hsl(212 50% 30% / 0.15)", + // Status + positive: "#66BF3C", + warning: "#E69D00", + negative: "#FF4400", + critical: "#FFFFFF", + // Text + defaultText: "#2E3338", + inverseText: "#FFFFFF", + positiveText: "#427C27", + warningText: "#955B1E", + negativeText: "#C23400" +}, background = { + app: "#F6F9FC", + bar: color.lightest, + content: color.lightest, + preview: color.lightest, + gridCellSize: 10, + hoverable: "#DBECFF", + // Notification, error, and warning backgrounds + positive: "#F1FFEB", + warning: "#FFF9EB", + negative: "#FFF0EB", + critical: "#D13800" +}, typography = { + fonts: { + base: [ + '"Nunito Sans"', + "-apple-system", + '".SFNSText-Regular"', + '"San Francisco"', + "BlinkMacSystemFont", + '"Segoe UI"', + '"Helvetica Neue"', + "Helvetica", + "Arial", + "sans-serif" + ].join(", "), + mono: [ + "ui-monospace", + "Menlo", + "Monaco", + '"Roboto Mono"', + '"Oxygen Mono"', + '"Ubuntu Monospace"', + '"Source Code Pro"', + '"Droid Sans Mono"', + '"Courier New"', + "monospace" + ].join(", ") + }, + weight: { + regular: 400, + bold: 700 + }, + size: { + s1: 12, + s2: 14, + s3: 16, + m1: 20, + m2: 24, + m3: 28, + l1: 32, + l2: 40, + l3: 48, + code: 90 + } +}, tokens = { + light: { + fgColor: { + default: color.darkest, + muted: color.dark, + accent: color.secondary, + inverse: color.lightest, + // TODO: add 'disabled' + positive: "#427C27", + warning: "#7A4100", + negative: "#C23400", + critical: "#FFFFFF", + agentic: "#723aa6" + }, + bgColor: { + default: color.lightest, + muted: background.app, + // TODO: add 'accent'? white or blue? + positive: "#F1FFEB", + warning: "#FFF7EB", + negative: "#FFF0EB", + critical: "#D13800", + agentic: "#f5f0fa" + }, + borderColor: { + default: color.border, + muted: "hsl(0 0% 0% / 0.1)", + inverse: "hsl(0 0% 100% / 0.1)", + positive: "#BFE7AC", + warning: "#FFCE85", + negative: "#FFC3AD", + critical: "hsl(16 100% 100% / 0)", + agentic: "#e1d2ef" + } + }, + dark: { + fgColor: { + default: "#C9CCCF", + muted: "#95999D", + accent: "#479DFF", + inverse: "#1B1C1D", + // TODO: add 'disabled' + positive: "#86CE64", + warning: "#FFAD33", + negative: "#FF6933", + critical: "#FF6933", + agentic: "#b07fdc" + }, + bgColor: { + default: "#222325", + muted: "#1B1C1D", + // TODO: add 'accent'? white or blue? + positive: "hsl(101 100% 100% / 0)", + warning: "hsl(101 100% 100% / 0)", + negative: "hsl(101 100% 100% / 0)", + critical: "hsl(101 100% 100% / 0)", + agentic: "rgba(114,58,166,0.15)" + }, + borderColor: { + default: "hsl(0 0% 100% / 0.1)", + muted: "hsl(0 0% 100% / 0.5)", + inverse: "hsl(0 0% 0% / 0.1)", + positive: "hsl(101 52% 64% / 0.15)", + warning: "hsl(36 100% 64% / 0.15)", + negative: "hsl(16 100% 64% / 0.15)", + critical: "#FF6933", + agentic: "rgba(114,58,166,0.35)" + } + } +}; + +// src/theming/themes/dark.ts +var theme = { + base: "dark", + // Storybook-specific color palette + colorPrimary: "#FF4785", + // coral + colorSecondary: "#479DFF", + // UI + appBg: "#1B1C1D", + appContentBg: "#222325", + appHoverBg: "#233952", + appPreviewBg: color.lightest, + appBorderColor: "hsl(0 0% 100% / 0.1)", + appBorderRadius: 4, + // Fonts + fontBase: typography.fonts.base, + fontCode: typography.fonts.mono, + // Text colors + textColor: "#C9CCCF", + textInverseColor: "#1B1C1D", + textMutedColor: "#95999D", + // Toolbar default and active colors + barTextColor: "#95999D", + barHoverColor: "#70B3FF", + barSelectedColor: "#479DFF", + barBg: "#222325", + // Form colors + buttonBg: "#1B1C1D", + buttonBorder: "hsl(0 0% 100% / 0.1)", + booleanBg: "#1B1C1D", + booleanSelectedBg: "#292B2E", + inputBg: "#1B1C1D", + inputBorder: "hsl(0 0% 100% / 0.1)", + inputTextColor: "#C9CCCF", + inputBorderRadius: 4 +}, dark_default = theme; + +// src/theming/themes/light.ts +var theme2 = { + base: "light", + // Storybook-specific color palette + colorPrimary: color.primary, + colorSecondary: color.secondary, + // UI + appBg: background.app, + appContentBg: color.lightest, + appHoverBg: "#DBECFF", + appPreviewBg: color.lightest, + appBorderColor: color.border, + appBorderRadius: 4, + // Fonts + fontBase: typography.fonts.base, + fontCode: typography.fonts.mono, + // Text colors + textColor: color.darkest, + textInverseColor: color.lightest, + textMutedColor: color.dark, + // Toolbar default and active colors + barTextColor: color.dark, + barHoverColor: "#005CC7", + barSelectedColor: "#0063D6", + barBg: color.lightest, + // Form colors + buttonBg: background.app, + buttonBorder: color.medium, + booleanBg: color.mediumlight, + booleanSelectedBg: color.lightest, + inputBg: color.lightest, + inputBorder: color.border, + inputTextColor: color.darkest, + inputBorderRadius: 4 +}, light_default = theme2; + +// src/theming/utils.ts +import { logger } from "storybook/internal/client-logger"; +import { global } from "@storybook/global"; +var { window: globalWindow } = global, mkColor = (color2) => ({ color: color2 }), isColorString = (color2) => typeof color2 != "string" ? (logger.warn( + `Color passed to theme object should be a string. Instead ${color2}(${typeof color2}) was passed.` +), !1) : !0, isValidColorForPolished = (color2) => !/(gradient|var|calc)/.test(color2), applyPolished = (type, color2) => type === "darken" ? rgba(`${curriedDarken$1(1, color2)}`, 0.95) : type === "lighten" ? rgba(`${curriedLighten$1(1, color2)}`, 0.95) : color2, colorFactory = (type) => (color2) => { + if (!isColorString(color2) || !isValidColorForPolished(color2)) + return color2; + try { + return applyPolished(type, color2); + } catch { + return color2; + } +}, lightenColor = colorFactory("lighten"), darkenColor = colorFactory("darken"), getPreferredColorScheme = () => !globalWindow || !globalWindow.matchMedia ? "light" : globalWindow.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; + +// src/theming/create.ts +var themesBase = { + light: light_default, + dark: dark_default +}, preferredColorScheme = getPreferredColorScheme(), themes = { + ...themesBase, + normal: themesBase[preferredColorScheme] +}, create = (vars = { + base: preferredColorScheme +}, rest) => { + let inherit = { + // We always inherit the preferred color scheme. + ...themes[preferredColorScheme], + // And then the declared theme base if it exists. + ...themes[vars.base] || {}, + // And then the actual theme content. + ...vars, + // If no theme base was declared, we declare the preferred color scheme as the base. + base: themes[vars.base] ? vars.base : preferredColorScheme + }; + return { + ...rest, + ...inherit, + barSelectedColor: vars.barSelectedColor || inherit.colorSecondary + }; +}; + +export { + color, + background, + typography, + tokens, + light_default, + mkColor, + lightenColor, + darkenColor, + getPreferredColorScheme, + themes, + create +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GPBLMYGI.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GPBLMYGI.js new file mode 100644 index 0000000000000000000000000000000000000000..dac49721d1578ad39f4f31524c47de515f9fb1de --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GPBLMYGI.js @@ -0,0 +1,1479 @@ +import { + UniversalStoreFollowerTimeoutError +} from "./chunk-IUGBVGDA.js"; +import { + dedent +} from "./chunk-3LY4VQVK.js"; + +// src/shared/universal-store/instances.ts +var instances = /* @__PURE__ */ new Map(); + +// src/shared/universal-store/index.ts +var CHANNEL_EVENT_PREFIX = "UNIVERSAL_STORE:", ProgressState = { + PENDING: "PENDING", + RESOLVED: "RESOLVED", + REJECTED: "REJECTED" +}, _UniversalStore = class _UniversalStore { + constructor(options, environmentOverrides) { + /** Enable debug logs for this store */ + this.debugging = !1; + // TODO: narrow type of listeners based on event type + this.listeners = /* @__PURE__ */ new Map([["*", /* @__PURE__ */ new Set()]]); + /** Gets the current state */ + this.getState = () => (this.debug("getState", { state: this.state }), this.state); + /** + * Subscribes to store events + * + * @returns A function to unsubscribe + */ + this.subscribe = (eventTypeOrListener, maybeListener) => { + let subscribesToAllEvents = typeof eventTypeOrListener == "function", eventType = subscribesToAllEvents ? "*" : eventTypeOrListener, listener = subscribesToAllEvents ? eventTypeOrListener : maybeListener; + if (this.debug("subscribe", { eventType, listener }), !listener) + throw new TypeError( + `Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'` + ); + return this.listeners.has(eventType) || this.listeners.set(eventType, /* @__PURE__ */ new Set()), this.listeners.get(eventType).add(listener), () => { + this.debug("unsubscribe", { eventType, listener }), this.listeners.has(eventType) && (this.listeners.get(eventType).delete(listener), this.listeners.get(eventType)?.size === 0 && this.listeners.delete(eventType)); + }; + }; + /** Sends a custom event to the other stores */ + this.send = (event) => { + if (this.debug("send", { event }), this.status !== _UniversalStore.Status.READY) + throw new TypeError( + dedent`Cannot send event before store is ready. You can get the current status with store.status, + or await store.readyPromise to wait for the store to be ready before sending events. + ${JSON.stringify( + { + event, + id: this.id, + actor: this.actor, + environment: this.environment + }, + null, + 2 + )}` + ); + this.emitToListeners(event, { actor: this.actor }), this.emitToChannel(event, { actor: this.actor }); + }; + if (this.debugging = options.debug ?? !1, !_UniversalStore.isInternalConstructing) + throw new TypeError( + "UniversalStore is not constructable - use UniversalStore.create() instead" + ); + if (_UniversalStore.isInternalConstructing = !1, this.id = options.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.actorType = options.leader ? _UniversalStore.ActorType.LEADER : _UniversalStore.ActorType.FOLLOWER, this.state = options.initialState, this.channelEventName = `${CHANNEL_EVENT_PREFIX}${this.id}`, this.debug("constructor", { + options, + environmentOverrides, + channelEventName: this.channelEventName + }), this.actor.type === _UniversalStore.ActorType.LEADER) + this.syncing = { + state: ProgressState.RESOLVED, + promise: Promise.resolve() + }; + else { + let syncingResolve, syncingReject, syncingPromise = new Promise((resolve, reject) => { + syncingResolve = () => { + this.syncing.state === ProgressState.PENDING && (this.syncing.state = ProgressState.RESOLVED, resolve()); + }, syncingReject = (reason) => { + this.syncing.state === ProgressState.PENDING && (this.syncing.state = ProgressState.REJECTED, reject(reason)); + }; + }); + this.syncing = { + state: ProgressState.PENDING, + promise: syncingPromise, + resolve: syncingResolve, + reject: syncingReject + }; + } + this.getState = this.getState.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), this.onStateChange = this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(this), this.debug = this.debug.bind(this), this.channel = environmentOverrides?.channel ?? _UniversalStore.preparation.channel, this.environment = environmentOverrides?.environment ?? _UniversalStore.preparation.environment, this.channel && this.environment ? (environmentOverrides || _UniversalStore.preparation.resolve({ + channel: this.channel, + environment: this.environment + }), this.prepareThis({ channel: this.channel, environment: this.environment })) : _UniversalStore.preparation.promise.then(this.prepareThis); + } + static setupPreparationPromise() { + let resolveRef, rejectRef, promise = new Promise( + (resolve, reject) => { + resolveRef = (args) => { + resolve(args); + }, rejectRef = (...args) => { + reject(args); + }; + } + ); + _UniversalStore.preparation = { + resolve: resolveRef, + reject: rejectRef, + promise + }; + } + /** The actor object representing the store instance with a unique ID and a type */ + get actor() { + return Object.freeze({ + id: this.actorId, + type: this.actorType, + environment: this.environment ?? _UniversalStore.Environment.UNKNOWN + }); + } + /** + * The current state of the store, that signals both if the store is prepared by Storybook and + * also - in the case of a follower - if the state has been synced with the leader's state. + */ + get status() { + if (!this.channel || !this.environment) + return _UniversalStore.Status.UNPREPARED; + switch (this.syncing?.state) { + case ProgressState.PENDING: + case void 0: + return _UniversalStore.Status.SYNCING; + case ProgressState.REJECTED: + return _UniversalStore.Status.ERROR; + case ProgressState.RESOLVED: + default: + return _UniversalStore.Status.READY; + } + } + /** + * A promise that resolves when the store is fully ready. A leader will be ready when the store + * has been prepared by Storybook, which is almost instantly. + * + * A follower will be ready when the state has been synced with the leader's state, within a few + * hundred milliseconds. + */ + untilReady() { + let preparation = this.channel && this.environment ? Promise.resolve() : _UniversalStore.preparation.promise; + return Promise.all([preparation, this.syncing?.promise]); + } + /** Creates a new instance of UniversalStore */ + static create(options) { + if (!options || typeof options?.id != "string") + throw new TypeError("id is required and must be a string, when creating a UniversalStore"); + options.debug && console.debug( + dedent`[UniversalStore] + create`, + { options } + ); + let existing = instances.get(options.id); + if (existing) + return console.warn(dedent`UniversalStore with id "${options.id}" already exists in this environment, re-using existing. + You should reuse the existing instance instead of trying to create a new one.`), existing; + _UniversalStore.isInternalConstructing = !0; + let store = new _UniversalStore(options); + return instances.set(options.id, store), store; + } + /** + * Used by Storybook to set the channel for all instances of UniversalStore in the given + * environment. + * + * @internal + */ + static __prepare(channel, environment) { + _UniversalStore.preparation.channel = channel, _UniversalStore.preparation.environment = environment, _UniversalStore.preparation.resolve({ channel, environment }); + } + /** + * Updates the store's state + * + * Either a new state or a state updater function can be passed to the method. + */ + setState(updater) { + let previousState = this.state, newState = typeof updater == "function" ? updater(previousState) : updater; + if (this.debug("setState", { newState, previousState, updater }), this.status !== _UniversalStore.Status.READY) + throw new TypeError( + dedent`Cannot set state before store is ready. You can get the current status with store.status, + or await store.readyPromise to wait for the store to be ready before sending events. + ${JSON.stringify( + { + newState, + id: this.id, + actor: this.actor, + environment: this.environment + }, + null, + 2 + )}` + ); + this.state = newState; + let event = { + type: _UniversalStore.InternalEventType.SET_STATE, + payload: { + state: newState, + previousState + } + }; + this.emitToChannel(event, { actor: this.actor }), this.emitToListeners(event, { actor: this.actor }); + } + /** + * Subscribes to state changes + * + * @returns Unsubscribe function + */ + onStateChange(listener) { + return this.debug("onStateChange", { listener }), this.subscribe( + _UniversalStore.InternalEventType.SET_STATE, + ({ payload }, eventInfo) => { + listener(payload.state, payload.previousState, eventInfo); + } + ); + } + emitToChannel(event, eventInfo) { + this.debug("emitToChannel", { event, eventInfo, channel: !!this.channel }), this.channel?.emit(this.channelEventName, { + event, + eventInfo + }); + } + prepareThis({ + channel, + environment + }) { + this.channel = channel, this.environment = environment, this.debug("prepared", { channel: !!channel, environment }), this.channel.on(this.channelEventName, this.handleChannelEvents), this.actor.type === _UniversalStore.ActorType.LEADER ? this.emitToChannel( + { type: _UniversalStore.InternalEventType.LEADER_CREATED }, + { actor: this.actor } + ) : (this.emitToChannel( + { type: _UniversalStore.InternalEventType.FOLLOWER_CREATED }, + { actor: this.actor } + ), this.emitToChannel( + { type: _UniversalStore.InternalEventType.EXISTING_STATE_REQUEST }, + { actor: this.actor } + ), setTimeout(() => { + this.syncing.reject(new UniversalStoreFollowerTimeoutError(this.id)); + }, 1e3)); + } + emitToListeners(event, eventInfo) { + let eventTypeListeners = this.listeners.get(event.type), everythingListeners = this.listeners.get("*"); + this.debug("emitToListeners", { + event, + eventInfo, + eventTypeListeners, + everythingListeners + }), [...eventTypeListeners ?? [], ...everythingListeners ?? []].forEach( + (listener) => listener(event, eventInfo) + ); + } + handleChannelEvents(channelEvent) { + let { event, eventInfo } = channelEvent; + if ([eventInfo.actor.id, eventInfo.forwardingActor?.id].includes(this.actor.id)) { + this.debug("handleChannelEvents: Ignoring event from self", { channelEvent }); + return; + } else if (this.syncing?.state === ProgressState.PENDING && event.type !== _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE) { + this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent }); + return; + } + if (this.debug("handleChannelEvents", { channelEvent }), this.actor.type === _UniversalStore.ActorType.LEADER) { + let shouldForwardEvent = !0; + switch (event.type) { + case _UniversalStore.InternalEventType.EXISTING_STATE_REQUEST: + shouldForwardEvent = !1; + let responseEvent = { + type: _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE, + payload: this.state + }; + this.debug("handleChannelEvents: responding to existing state request", { + responseEvent + }), this.emitToChannel(responseEvent, { actor: this.actor }), this.emitToListeners(responseEvent, { actor: this.actor }); + break; + case _UniversalStore.InternalEventType.LEADER_CREATED: + shouldForwardEvent = !1, this.syncing.state = ProgressState.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", { + event + }), console.error( + dedent`Detected multiple UniversalStore leaders created with the same id "${this.id}". + Only one leader can exists at a time, your stores are now in an invalid state. + Leaders detected: + this: ${JSON.stringify(this.actor, null, 2)} + other: ${JSON.stringify(eventInfo.actor, null, 2)}` + ); + break; + } + shouldForwardEvent && (this.debug("handleChannelEvents: forwarding event", { channelEvent }), this.emitToChannel(event, { actor: eventInfo.actor, forwardingActor: this.actor })); + } + if (this.actor.type === _UniversalStore.ActorType.FOLLOWER) + switch (event.type) { + case _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE: + if (this.debug("handleChannelEvents: Setting state from leader's existing state response", { + event + }), this.syncing?.state !== ProgressState.PENDING) + break; + this.syncing.resolve?.(); + let setStateEvent = { + type: _UniversalStore.InternalEventType.SET_STATE, + payload: { + state: event.payload, + previousState: this.state + } + }; + this.state = event.payload, this.emitToListeners(setStateEvent, eventInfo); + break; + } + event.type === _UniversalStore.InternalEventType.SET_STATE && (this.debug("handleChannelEvents: Setting state", { event }), this.state = event.payload.state), this.emitToListeners(event, { actor: eventInfo.actor }); + } + debug(message, data) { + this.debugging && console.debug( + dedent`[UniversalStore::${this.id}::${this.environment ?? _UniversalStore.Environment.UNKNOWN}] + ${message}`, + JSON.stringify( + { + data, + actor: this.actor, + state: this.state, + status: this.status + }, + null, + 2 + ) + ); + } + /** + * Used to reset the static fields of the UniversalStore class when cleaning up tests + * + * @internal + */ + static __reset() { + _UniversalStore.preparation.reject(new Error("reset")), _UniversalStore.setupPreparationPromise(), _UniversalStore.isInternalConstructing = !1; + } +}; +/** + * Defines the possible actor types in the store system + * + * @readonly + */ +_UniversalStore.ActorType = { + LEADER: "LEADER", + FOLLOWER: "FOLLOWER" +}, /** + * Defines the possible environments the store can run in + * + * @readonly + */ +_UniversalStore.Environment = { + SERVER: "SERVER", + MANAGER: "MANAGER", + PREVIEW: "PREVIEW", + UNKNOWN: "UNKNOWN", + MOCK: "MOCK" +}, /** + * Internal event types used for store synchronization + * + * @readonly + */ +_UniversalStore.InternalEventType = { + EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST", + EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE", + SET_STATE: "__SET_STATE", + LEADER_CREATED: "__LEADER_CREATED", + FOLLOWER_CREATED: "__FOLLOWER_CREATED" +}, _UniversalStore.Status = { + UNPREPARED: "UNPREPARED", + SYNCING: "SYNCING", + READY: "READY", + ERROR: "ERROR" +}, // This is used to check if constructor was called from the static factory create() +_UniversalStore.isInternalConstructing = !1, _UniversalStore.setupPreparationPromise(); +var UniversalStore = _UniversalStore; + +// ../../node_modules/telejson/dist/chunk-EAFQLD22.mjs +var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}, __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}, __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)), eventProperties = [ + "bubbles", + "cancelBubble", + "cancelable", + "composed", + "currentTarget", + "defaultPrevented", + "eventPhase", + "isTrusted", + "returnValue", + "srcElement", + "target", + "timeStamp", + "type" +], customEventSpecificProperties = ["detail"]; +function extractEventHiddenProperties(event) { + let rebuildEvent = eventProperties.filter((value) => event[value] !== void 0).reduce((acc, value) => (acc[value] = event[value], acc), {}); + if (event instanceof CustomEvent) + for (let value of customEventSpecificProperties.filter( + (value2) => event[value2] !== void 0 + )) + rebuildEvent[value] = event[value]; + return rebuildEvent; +} + +// ../../node_modules/telejson/dist/index.mjs +var require_es_object_atoms = __commonJS({ + "node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(exports, module) { + "use strict"; + module.exports = Object; + } +}), require_es_errors = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports, module) { + "use strict"; + module.exports = Error; + } +}), require_eval = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports, module) { + "use strict"; + module.exports = EvalError; + } +}), require_range = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports, module) { + "use strict"; + module.exports = RangeError; + } +}), require_ref = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports, module) { + "use strict"; + module.exports = ReferenceError; + } +}), require_syntax = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports, module) { + "use strict"; + module.exports = SyntaxError; + } +}), require_type = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports, module) { + "use strict"; + module.exports = TypeError; + } +}), require_uri = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports, module) { + "use strict"; + module.exports = URIError; + } +}), require_abs = __commonJS({ + "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(exports, module) { + "use strict"; + module.exports = Math.abs; + } +}), require_floor = __commonJS({ + "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(exports, module) { + "use strict"; + module.exports = Math.floor; + } +}), require_max = __commonJS({ + "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(exports, module) { + "use strict"; + module.exports = Math.max; + } +}), require_min = __commonJS({ + "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(exports, module) { + "use strict"; + module.exports = Math.min; + } +}), require_pow = __commonJS({ + "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(exports, module) { + "use strict"; + module.exports = Math.pow; + } +}), require_round = __commonJS({ + "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(exports, module) { + "use strict"; + module.exports = Math.round; + } +}), require_isNaN = __commonJS({ + "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(exports, module) { + "use strict"; + module.exports = Number.isNaN || function(a) { + return a !== a; + }; + } +}), require_sign = __commonJS({ + "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(exports, module) { + "use strict"; + var $isNaN = require_isNaN(); + module.exports = function(number) { + return $isNaN(number) || number === 0 ? number : number < 0 ? -1 : 1; + }; + } +}), require_gOPD = __commonJS({ + "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(exports, module) { + "use strict"; + module.exports = Object.getOwnPropertyDescriptor; + } +}), require_gopd = __commonJS({ + "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(exports, module) { + "use strict"; + var $gOPD = require_gOPD(); + if ($gOPD) + try { + $gOPD([], "length"); + } catch { + $gOPD = null; + } + module.exports = $gOPD; + } +}), require_es_define_property = __commonJS({ + "node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(exports, module) { + "use strict"; + var $defineProperty = Object.defineProperty || !1; + if ($defineProperty) + try { + $defineProperty({}, "a", { value: 1 }); + } catch { + $defineProperty = !1; + } + module.exports = $defineProperty; + } +}), require_shams = __commonJS({ + "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(exports, module) { + "use strict"; + module.exports = function() { + if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") + return !1; + if (typeof Symbol.iterator == "symbol") + return !0; + var obj = {}, sym = /* @__PURE__ */ Symbol("test"), symObj = Object(sym); + if (typeof sym == "string" || Object.prototype.toString.call(sym) !== "[object Symbol]" || Object.prototype.toString.call(symObj) !== "[object Symbol]") + return !1; + var symVal = 42; + obj[sym] = symVal; + for (var _ in obj) + return !1; + if (typeof Object.keys == "function" && Object.keys(obj).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(obj).length !== 0) + return !1; + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym || !Object.prototype.propertyIsEnumerable.call(obj, sym)) + return !1; + if (typeof Object.getOwnPropertyDescriptor == "function") { + var descriptor = ( + /** @type {PropertyDescriptor} */ + Object.getOwnPropertyDescriptor(obj, sym) + ); + if (descriptor.value !== symVal || descriptor.enumerable !== !0) + return !1; + } + return !0; + }; + } +}), require_has_symbols = __commonJS({ + "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(exports, module) { + "use strict"; + var origSymbol = typeof Symbol < "u" && Symbol, hasSymbolSham = require_shams(); + module.exports = function() { + return typeof origSymbol != "function" || typeof Symbol != "function" || typeof origSymbol("foo") != "symbol" || typeof /* @__PURE__ */ Symbol("bar") != "symbol" ? !1 : hasSymbolSham(); + }; + } +}), require_Reflect_getPrototypeOf = __commonJS({ + "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module) { + "use strict"; + module.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null; + } +}), require_Object_getPrototypeOf = __commonJS({ + "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(exports, module) { + "use strict"; + var $Object = require_es_object_atoms(); + module.exports = $Object.getPrototypeOf || null; + } +}), require_implementation = __commonJS({ + "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module) { + "use strict"; + var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ", toStr = Object.prototype.toString, max = Math.max, funcType = "[object Function]", concatty = function(a, b) { + for (var arr = [], i = 0; i < a.length; i += 1) + arr[i] = a[i]; + for (var j = 0; j < b.length; j += 1) + arr[j + a.length] = b[j]; + return arr; + }, slicy = function(arrLike, offset) { + for (var arr = [], i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) + arr[j] = arrLike[i]; + return arr; + }, joiny = function(arr, joiner) { + for (var str = "", i = 0; i < arr.length; i += 1) + str += arr[i], i + 1 < arr.length && (str += joiner); + return str; + }; + module.exports = function(that) { + var target = this; + if (typeof target != "function" || toStr.apply(target) !== funcType) + throw new TypeError(ERROR_MESSAGE + target); + for (var args = slicy(arguments, 1), bound, binder = function() { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + return Object(result) === result ? result : this; + } + return target.apply( + that, + concatty(args, arguments) + ); + }, boundLength = max(0, target.length - args.length), boundArgs = [], i = 0; i < boundLength; i++) + boundArgs[i] = "$" + i; + if (bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder), target.prototype) { + var Empty = function() { + }; + Empty.prototype = target.prototype, bound.prototype = new Empty(), Empty.prototype = null; + } + return bound; + }; + } +}), require_function_bind = __commonJS({ + "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module) { + "use strict"; + var implementation = require_implementation(); + module.exports = Function.prototype.bind || implementation; + } +}), require_functionCall = __commonJS({ + "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(exports, module) { + "use strict"; + module.exports = Function.prototype.call; + } +}), require_functionApply = __commonJS({ + "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(exports, module) { + "use strict"; + module.exports = Function.prototype.apply; + } +}), require_reflectApply = __commonJS({ + "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module) { + "use strict"; + module.exports = typeof Reflect < "u" && Reflect && Reflect.apply; + } +}), require_actualApply = __commonJS({ + "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(exports, module) { + "use strict"; + var bind = require_function_bind(), $apply = require_functionApply(), $call = require_functionCall(), $reflectApply = require_reflectApply(); + module.exports = $reflectApply || bind.call($call, $apply); + } +}), require_call_bind_apply_helpers = __commonJS({ + "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(exports, module) { + "use strict"; + var bind = require_function_bind(), $TypeError = require_type(), $call = require_functionCall(), $actualApply = require_actualApply(); + module.exports = function(args) { + if (args.length < 1 || typeof args[0] != "function") + throw new $TypeError("a function is required"); + return $actualApply(bind, $call, args); + }; + } +}), require_get = __commonJS({ + "node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(exports, module) { + "use strict"; + var callBind = require_call_bind_apply_helpers(), gOPD = require_gopd(), hasProtoAccessor; + try { + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ + [].__proto__ === Array.prototype; + } catch (e) { + if (!e || typeof e != "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") + throw e; + } + var desc = !!hasProtoAccessor && gOPD && gOPD( + Object.prototype, + /** @type {keyof typeof Object.prototype} */ + "__proto__" + ), $Object = Object, $getPrototypeOf = $Object.getPrototypeOf; + module.exports = desc && typeof desc.get == "function" ? callBind([desc.get]) : typeof $getPrototypeOf == "function" ? ( + /** @type {import('./get')} */ + (function(value) { + return $getPrototypeOf(value == null ? value : $Object(value)); + }) + ) : !1; + } +}), require_get_proto = __commonJS({ + "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(exports, module) { + "use strict"; + var reflectGetProto = require_Reflect_getPrototypeOf(), originalGetProto = require_Object_getPrototypeOf(), getDunderProto = require_get(); + module.exports = reflectGetProto ? function(O) { + return reflectGetProto(O); + } : originalGetProto ? function(O) { + if (!O || typeof O != "object" && typeof O != "function") + throw new TypeError("getProto: not an object"); + return originalGetProto(O); + } : getDunderProto ? function(O) { + return getDunderProto(O); + } : null; + } +}), require_hasown = __commonJS({ + "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module) { + "use strict"; + var call = Function.prototype.call, $hasOwn = Object.prototype.hasOwnProperty, bind = require_function_bind(); + module.exports = bind.call(call, $hasOwn); + } +}), require_get_intrinsic = __commonJS({ + "node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(exports, module) { + "use strict"; + var undefined2, $Object = require_es_object_atoms(), $Error = require_es_errors(), $EvalError = require_eval(), $RangeError = require_range(), $ReferenceError = require_ref(), $SyntaxError = require_syntax(), $TypeError = require_type(), $URIError = require_uri(), abs = require_abs(), floor = require_floor(), max = require_max(), min = require_min(), pow = require_pow(), round = require_round(), sign = require_sign(), $Function = Function, getEvalledConstructor = function(expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); + } catch { + } + }, $gOPD = require_gopd(), $defineProperty = require_es_define_property(), throwTypeError = function() { + throw new $TypeError(); + }, ThrowTypeError = $gOPD ? (function() { + try { + return arguments.callee, throwTypeError; + } catch { + try { + return $gOPD(arguments, "callee").get; + } catch { + return throwTypeError; + } + } + })() : throwTypeError, hasSymbols = require_has_symbols()(), getProto = require_get_proto(), $ObjectGPO = require_Object_getPrototypeOf(), $ReflectGPO = require_Reflect_getPrototypeOf(), $apply = require_functionApply(), $call = require_functionCall(), needsEval = {}, TypedArray = typeof Uint8Array > "u" || !getProto ? undefined2 : getProto(Uint8Array), INTRINSICS = { + __proto__: null, + "%AggregateError%": typeof AggregateError > "u" ? undefined2 : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": typeof ArrayBuffer > "u" ? undefined2 : ArrayBuffer, + "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2, + "%AsyncFromSyncIteratorPrototype%": undefined2, + "%AsyncFunction%": needsEval, + "%AsyncGenerator%": needsEval, + "%AsyncGeneratorFunction%": needsEval, + "%AsyncIteratorPrototype%": needsEval, + "%Atomics%": typeof Atomics > "u" ? undefined2 : Atomics, + "%BigInt%": typeof BigInt > "u" ? undefined2 : BigInt, + "%BigInt64Array%": typeof BigInt64Array > "u" ? undefined2 : BigInt64Array, + "%BigUint64Array%": typeof BigUint64Array > "u" ? undefined2 : BigUint64Array, + "%Boolean%": Boolean, + "%DataView%": typeof DataView > "u" ? undefined2 : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": $Error, + "%eval%": eval, + // eslint-disable-line no-eval + "%EvalError%": $EvalError, + "%Float16Array%": typeof Float16Array > "u" ? undefined2 : Float16Array, + "%Float32Array%": typeof Float32Array > "u" ? undefined2 : Float32Array, + "%Float64Array%": typeof Float64Array > "u" ? undefined2 : Float64Array, + "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? undefined2 : FinalizationRegistry, + "%Function%": $Function, + "%GeneratorFunction%": needsEval, + "%Int8Array%": typeof Int8Array > "u" ? undefined2 : Int8Array, + "%Int16Array%": typeof Int16Array > "u" ? undefined2 : Int16Array, + "%Int32Array%": typeof Int32Array > "u" ? undefined2 : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%JSON%": typeof JSON == "object" ? JSON : undefined2, + "%Map%": typeof Map > "u" ? undefined2 : Map, + "%MapIteratorPrototype%": typeof Map > "u" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), + "%Math%": Math, + "%Number%": Number, + "%Object%": $Object, + "%Object.getOwnPropertyDescriptor%": $gOPD, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": typeof Promise > "u" ? undefined2 : Promise, + "%Proxy%": typeof Proxy > "u" ? undefined2 : Proxy, + "%RangeError%": $RangeError, + "%ReferenceError%": $ReferenceError, + "%Reflect%": typeof Reflect > "u" ? undefined2 : Reflect, + "%RegExp%": RegExp, + "%Set%": typeof Set > "u" ? undefined2 : Set, + "%SetIteratorPrototype%": typeof Set > "u" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), + "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? undefined2 : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2, + "%Symbol%": hasSymbols ? Symbol : undefined2, + "%SyntaxError%": $SyntaxError, + "%ThrowTypeError%": ThrowTypeError, + "%TypedArray%": TypedArray, + "%TypeError%": $TypeError, + "%Uint8Array%": typeof Uint8Array > "u" ? undefined2 : Uint8Array, + "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? undefined2 : Uint8ClampedArray, + "%Uint16Array%": typeof Uint16Array > "u" ? undefined2 : Uint16Array, + "%Uint32Array%": typeof Uint32Array > "u" ? undefined2 : Uint32Array, + "%URIError%": $URIError, + "%WeakMap%": typeof WeakMap > "u" ? undefined2 : WeakMap, + "%WeakRef%": typeof WeakRef > "u" ? undefined2 : WeakRef, + "%WeakSet%": typeof WeakSet > "u" ? undefined2 : WeakSet, + "%Function.prototype.call%": $call, + "%Function.prototype.apply%": $apply, + "%Object.defineProperty%": $defineProperty, + "%Object.getPrototypeOf%": $ObjectGPO, + "%Math.abs%": abs, + "%Math.floor%": floor, + "%Math.max%": max, + "%Math.min%": min, + "%Math.pow%": pow, + "%Math.round%": round, + "%Math.sign%": sign, + "%Reflect.getPrototypeOf%": $ReflectGPO + }; + if (getProto) + try { + null.error; + } catch (e) { + errorProto = getProto(getProto(e)), INTRINSICS["%Error.prototype%"] = errorProto; + } + var errorProto, doEval = function doEval2(name) { + var value; + if (name === "%AsyncFunction%") + value = getEvalledConstructor("async function () {}"); + else if (name === "%GeneratorFunction%") + value = getEvalledConstructor("function* () {}"); + else if (name === "%AsyncGeneratorFunction%") + value = getEvalledConstructor("async function* () {}"); + else if (name === "%AsyncGenerator%") { + var fn = doEval2("%AsyncGeneratorFunction%"); + fn && (value = fn.prototype); + } else if (name === "%AsyncIteratorPrototype%") { + var gen = doEval2("%AsyncGenerator%"); + gen && getProto && (value = getProto(gen.prototype)); + } + return INTRINSICS[name] = value, value; + }, LEGACY_ALIASES = { + __proto__: null, + "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], + "%ArrayPrototype%": ["Array", "prototype"], + "%ArrayProto_entries%": ["Array", "prototype", "entries"], + "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], + "%ArrayProto_keys%": ["Array", "prototype", "keys"], + "%ArrayProto_values%": ["Array", "prototype", "values"], + "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], + "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], + "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], + "%BooleanPrototype%": ["Boolean", "prototype"], + "%DataViewPrototype%": ["DataView", "prototype"], + "%DatePrototype%": ["Date", "prototype"], + "%ErrorPrototype%": ["Error", "prototype"], + "%EvalErrorPrototype%": ["EvalError", "prototype"], + "%Float32ArrayPrototype%": ["Float32Array", "prototype"], + "%Float64ArrayPrototype%": ["Float64Array", "prototype"], + "%FunctionPrototype%": ["Function", "prototype"], + "%Generator%": ["GeneratorFunction", "prototype"], + "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], + "%Int8ArrayPrototype%": ["Int8Array", "prototype"], + "%Int16ArrayPrototype%": ["Int16Array", "prototype"], + "%Int32ArrayPrototype%": ["Int32Array", "prototype"], + "%JSONParse%": ["JSON", "parse"], + "%JSONStringify%": ["JSON", "stringify"], + "%MapPrototype%": ["Map", "prototype"], + "%NumberPrototype%": ["Number", "prototype"], + "%ObjectPrototype%": ["Object", "prototype"], + "%ObjProto_toString%": ["Object", "prototype", "toString"], + "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], + "%PromisePrototype%": ["Promise", "prototype"], + "%PromiseProto_then%": ["Promise", "prototype", "then"], + "%Promise_all%": ["Promise", "all"], + "%Promise_reject%": ["Promise", "reject"], + "%Promise_resolve%": ["Promise", "resolve"], + "%RangeErrorPrototype%": ["RangeError", "prototype"], + "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], + "%RegExpPrototype%": ["RegExp", "prototype"], + "%SetPrototype%": ["Set", "prototype"], + "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], + "%StringPrototype%": ["String", "prototype"], + "%SymbolPrototype%": ["Symbol", "prototype"], + "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], + "%TypedArrayPrototype%": ["TypedArray", "prototype"], + "%TypeErrorPrototype%": ["TypeError", "prototype"], + "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], + "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], + "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], + "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], + "%URIErrorPrototype%": ["URIError", "prototype"], + "%WeakMapPrototype%": ["WeakMap", "prototype"], + "%WeakSetPrototype%": ["WeakSet", "prototype"] + }, bind = require_function_bind(), hasOwn = require_hasown(), $concat = bind.call($call, Array.prototype.concat), $spliceApply = bind.call($apply, Array.prototype.splice), $replace = bind.call($call, String.prototype.replace), $strSlice = bind.call($call, String.prototype.slice), $exec = bind.call($call, RegExp.prototype.exec), rePropName2 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, reEscapeChar2 = /\\(\\)?/g, stringToPath2 = function(string) { + var first = $strSlice(string, 0, 1), last = $strSlice(string, -1); + if (first === "%" && last !== "%") + throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); + if (last === "%" && first !== "%") + throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); + var result = []; + return $replace(string, rePropName2, function(match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar2, "$1") : number || match; + }), result; + }, getBaseIntrinsic = function(name, allowMissing) { + var intrinsicName = name, alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName) && (alias = LEGACY_ALIASES[intrinsicName], intrinsicName = "%" + alias[0] + "%"), hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval && (value = doEval(intrinsicName)), typeof value > "u" && !allowMissing) + throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + return { + alias, + name: intrinsicName, + value + }; + } + throw new $SyntaxError("intrinsic " + name + " does not exist!"); + }; + module.exports = function(name, allowMissing) { + if (typeof name != "string" || name.length === 0) + throw new $TypeError("intrinsic name must be a non-empty string"); + if (arguments.length > 1 && typeof allowMissing != "boolean") + throw new $TypeError('"allowMissing" argument must be a boolean'); + if ($exec(/^%?[^%]*%?$/, name) === null) + throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); + var parts = stringToPath2(name), intrinsicBaseName = parts.length > 0 ? parts[0] : "", intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing), intrinsicRealName = intrinsic.name, value = intrinsic.value, skipFurtherCaching = !1, alias = intrinsic.alias; + alias && (intrinsicBaseName = alias[0], $spliceApply(parts, $concat([0, 1], alias))); + for (var i = 1, isOwn = !0; i < parts.length; i += 1) { + var part = parts[i], first = $strSlice(part, 0, 1), last = $strSlice(part, -1); + if ((first === '"' || first === "'" || first === "`" || last === '"' || last === "'" || last === "`") && first !== last) + throw new $SyntaxError("property names with quotes must have matching quotes"); + if ((part === "constructor" || !isOwn) && (skipFurtherCaching = !0), intrinsicBaseName += "." + part, intrinsicRealName = "%" + intrinsicBaseName + "%", hasOwn(INTRINSICS, intrinsicRealName)) + value = INTRINSICS[intrinsicRealName]; + else if (value != null) { + if (!(part in value)) { + if (!allowMissing) + throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); + return; + } + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc, isOwn && "get" in desc && !("originalValue" in desc.get) ? value = desc.get : value = value[part]; + } else + isOwn = hasOwn(value, part), value = value[part]; + isOwn && !skipFurtherCaching && (INTRINSICS[intrinsicRealName] = value); + } + } + return value; + }; + } +}), require_call_bound = __commonJS({ + "node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(exports, module) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(), callBindBasic = require_call_bind_apply_helpers(), $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]); + module.exports = function(name, allowMissing) { + var intrinsic = ( + /** @type {(this: unknown, ...args: unknown[]) => unknown} */ + GetIntrinsic(name, !!allowMissing) + ); + return typeof intrinsic == "function" && $indexOf(name, ".prototype.") > -1 ? callBindBasic( + /** @type {const} */ + [intrinsic] + ) : intrinsic; + }; + } +}), require_shams2 = __commonJS({ + "node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(exports, module) { + "use strict"; + var hasSymbols = require_shams(); + module.exports = function() { + return hasSymbols() && !!Symbol.toStringTag; + }; + } +}), require_is_regex = __commonJS({ + "node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(exports, module) { + "use strict"; + var callBound = require_call_bound(), hasToStringTag = require_shams2()(), hasOwn = require_hasown(), gOPD = require_gopd(), fn; + hasToStringTag ? ($exec = callBound("RegExp.prototype.exec"), isRegexMarker = {}, throwRegexMarker = function() { + throw isRegexMarker; + }, badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }, typeof Symbol.toPrimitive == "symbol" && (badStringifier[Symbol.toPrimitive] = throwRegexMarker), fn = function(value) { + if (!value || typeof value != "object") + return !1; + var descriptor = ( + /** @type {NonNullable} */ + gOPD( + /** @type {{ lastIndex?: unknown }} */ + value, + "lastIndex" + ) + ), hasLastIndexDataProperty = descriptor && hasOwn(descriptor, "value"); + if (!hasLastIndexDataProperty) + return !1; + try { + $exec( + value, + /** @type {string} */ + /** @type {unknown} */ + badStringifier + ); + } catch (e) { + return e === isRegexMarker; + } + }) : ($toString = callBound("Object.prototype.toString"), regexClass = "[object RegExp]", fn = function(value) { + return !value || typeof value != "object" && typeof value != "function" ? !1 : $toString(value) === regexClass; + }); + var $exec, isRegexMarker, throwRegexMarker, badStringifier, $toString, regexClass; + module.exports = fn; + } +}), require_is_function = __commonJS({ + "node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(exports, module) { + module.exports = isFunction3; + var toString2 = Object.prototype.toString; + function isFunction3(fn) { + if (!fn) + return !1; + var string = toString2.call(fn); + return string === "[object Function]" || typeof fn == "function" && string !== "[object RegExp]" || typeof window < "u" && // IE8 and below + (fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt); + } + } +}), require_safe_regex_test = __commonJS({ + "node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(exports, module) { + "use strict"; + var callBound = require_call_bound(), isRegex = require_is_regex(), $exec = callBound("RegExp.prototype.exec"), $TypeError = require_type(); + module.exports = function(regex) { + if (!isRegex(regex)) + throw new $TypeError("`regex` must be a RegExp"); + return function(s) { + return $exec(regex, s) !== null; + }; + }; + } +}), require_is_symbol = __commonJS({ + "node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(exports, module) { + "use strict"; + var callBound = require_call_bound(), $toString = callBound("Object.prototype.toString"), hasSymbols = require_has_symbols()(), safeRegexTest = require_safe_regex_test(); + hasSymbols ? ($symToStr = callBound("Symbol.prototype.toString"), isSymString = safeRegexTest(/^Symbol\(.*\)$/), isSymbolObject = function(value) { + return typeof value.valueOf() != "symbol" ? !1 : isSymString($symToStr(value)); + }, module.exports = function(value) { + if (typeof value == "symbol") + return !0; + if (!value || typeof value != "object" || $toString(value) !== "[object Symbol]") + return !1; + try { + return isSymbolObject(value); + } catch { + return !1; + } + }) : module.exports = function(value) { + return !1; + }; + var $symToStr, isSymString, isSymbolObject; + } +}), import_is_regex = __toESM(require_is_regex()), import_is_function = __toESM(require_is_function()), import_is_symbol = __toESM(require_is_symbol()); +function isObject(val) { + return val != null && typeof val == "object" && Array.isArray(val) === !1; +} +var freeGlobal = typeof global == "object" && global && global.Object === Object && global, freeGlobal_default = freeGlobal, freeSelf = typeof self == "object" && self && self.Object === Object && self, root = freeGlobal_default || freeSelf || Function("return this")(), root_default = root, Symbol2 = root_default.Symbol, Symbol_default = Symbol2, objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, nativeObjectToString = objectProto.toString, symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0; +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = !0; + } catch { + } + var result = nativeObjectToString.call(value); + return unmasked && (isOwn ? value[symToStringTag] = tag : delete value[symToStringTag]), result; +} +var getRawTag_default = getRawTag, objectProto2 = Object.prototype, nativeObjectToString2 = objectProto2.toString; +function objectToString(value) { + return nativeObjectToString2.call(value); +} +var objectToString_default = objectToString, nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0; +function baseGetTag(value) { + return value == null ? value === void 0 ? undefinedTag : nullTag : symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value); +} +var baseGetTag_default = baseGetTag; +function isObjectLike(value) { + return value != null && typeof value == "object"; +} +var isObjectLike_default = isObjectLike, symbolTag = "[object Symbol]"; +function isSymbol(value) { + return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag; +} +var isSymbol_default = isSymbol; +function arrayMap(array, iteratee) { + for (var index = -1, length = array == null ? 0 : array.length, result = Array(length); ++index < length; ) + result[index] = iteratee(array[index], index, array); + return result; +} +var arrayMap_default = arrayMap, isArray = Array.isArray, isArray_default = isArray, INFINITY = 1 / 0, symbolProto = Symbol_default ? Symbol_default.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0; +function baseToString(value) { + if (typeof value == "string") + return value; + if (isArray_default(value)) + return arrayMap_default(value, baseToString) + ""; + if (isSymbol_default(value)) + return symbolToString ? symbolToString.call(value) : ""; + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; +} +var baseToString_default = baseToString; +function isObject2(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); +} +var isObject_default = isObject2, asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; +function isFunction(value) { + if (!isObject_default(value)) + return !1; + var tag = baseGetTag_default(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} +var isFunction_default = isFunction, coreJsData = root_default["__core-js_shared__"], coreJsData_default = coreJsData, maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; +})(); +function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; +} +var isMasked_default = isMasked, funcProto = Function.prototype, funcToString = funcProto.toString; +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch { + } + try { + return func + ""; + } catch { + } + } + return ""; +} +var toSource_default = toSource, reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor = /^\[object .+?Constructor\]$/, funcProto2 = Function.prototype, objectProto3 = Object.prototype, funcToString2 = funcProto2.toString, hasOwnProperty2 = objectProto3.hasOwnProperty, reIsNative = RegExp( + "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" +); +function baseIsNative(value) { + if (!isObject_default(value) || isMasked_default(value)) + return !1; + var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource_default(value)); +} +var baseIsNative_default = baseIsNative; +function getValue(object, key) { + return object?.[key]; +} +var getValue_default = getValue; +function getNative(object, key) { + var value = getValue_default(object, key); + return baseIsNative_default(value) ? value : void 0; +} +var getNative_default = getNative; +function eq(value, other) { + return value === other || value !== value && other !== other; +} +var eq_default = eq, reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; +function isKey(value, object) { + if (isArray_default(value)) + return !1; + var type = typeof value; + return type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_default(value) ? !0 : reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); +} +var isKey_default = isKey, nativeCreate = getNative_default(Object, "create"), nativeCreate_default = nativeCreate; +function hashClear() { + this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {}, this.size = 0; +} +var hashClear_default = hashClear; +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + return this.size -= result ? 1 : 0, result; +} +var hashDelete_default = hashDelete, HASH_UNDEFINED = "__lodash_hash_undefined__", objectProto4 = Object.prototype, hasOwnProperty3 = objectProto4.hasOwnProperty; +function hashGet(key) { + var data = this.__data__; + if (nativeCreate_default) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty3.call(data, key) ? data[key] : void 0; +} +var hashGet_default = hashGet, objectProto5 = Object.prototype, hasOwnProperty4 = objectProto5.hasOwnProperty; +function hashHas(key) { + var data = this.__data__; + return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty4.call(data, key); +} +var hashHas_default = hashHas, HASH_UNDEFINED2 = "__lodash_hash_undefined__"; +function hashSet(key, value) { + var data = this.__data__; + return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value, this; +} +var hashSet_default = hashSet; +function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + for (this.clear(); ++index < length; ) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} +Hash.prototype.clear = hashClear_default; +Hash.prototype.delete = hashDelete_default; +Hash.prototype.get = hashGet_default; +Hash.prototype.has = hashHas_default; +Hash.prototype.set = hashSet_default; +var Hash_default = Hash; +function listCacheClear() { + this.__data__ = [], this.size = 0; +} +var listCacheClear_default = listCacheClear; +function assocIndexOf(array, key) { + for (var length = array.length; length--; ) + if (eq_default(array[length][0], key)) + return length; + return -1; +} +var assocIndexOf_default = assocIndexOf, arrayProto = Array.prototype, splice = arrayProto.splice; +function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf_default(data, key); + if (index < 0) + return !1; + var lastIndex = data.length - 1; + return index == lastIndex ? data.pop() : splice.call(data, index, 1), --this.size, !0; +} +var listCacheDelete_default = listCacheDelete; +function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf_default(data, key); + return index < 0 ? void 0 : data[index][1]; +} +var listCacheGet_default = listCacheGet; +function listCacheHas(key) { + return assocIndexOf_default(this.__data__, key) > -1; +} +var listCacheHas_default = listCacheHas; +function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf_default(data, key); + return index < 0 ? (++this.size, data.push([key, value])) : data[index][1] = value, this; +} +var listCacheSet_default = listCacheSet; +function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + for (this.clear(); ++index < length; ) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} +ListCache.prototype.clear = listCacheClear_default; +ListCache.prototype.delete = listCacheDelete_default; +ListCache.prototype.get = listCacheGet_default; +ListCache.prototype.has = listCacheHas_default; +ListCache.prototype.set = listCacheSet_default; +var ListCache_default = ListCache, Map2 = getNative_default(root_default, "Map"), Map_default = Map2; +function mapCacheClear() { + this.size = 0, this.__data__ = { + hash: new Hash_default(), + map: new (Map_default || ListCache_default)(), + string: new Hash_default() + }; +} +var mapCacheClear_default = mapCacheClear; +function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; +} +var isKeyable_default = isKeyable; +function getMapData(map, key) { + var data = map.__data__; + return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; +} +var getMapData_default = getMapData; +function mapCacheDelete(key) { + var result = getMapData_default(this, key).delete(key); + return this.size -= result ? 1 : 0, result; +} +var mapCacheDelete_default = mapCacheDelete; +function mapCacheGet(key) { + return getMapData_default(this, key).get(key); +} +var mapCacheGet_default = mapCacheGet; +function mapCacheHas(key) { + return getMapData_default(this, key).has(key); +} +var mapCacheHas_default = mapCacheHas; +function mapCacheSet(key, value) { + var data = getMapData_default(this, key), size = data.size; + return data.set(key, value), this.size += data.size == size ? 0 : 1, this; +} +var mapCacheSet_default = mapCacheSet; +function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + for (this.clear(); ++index < length; ) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} +MapCache.prototype.clear = mapCacheClear_default; +MapCache.prototype.delete = mapCacheDelete_default; +MapCache.prototype.get = mapCacheGet_default; +MapCache.prototype.has = mapCacheHas_default; +MapCache.prototype.set = mapCacheSet_default; +var MapCache_default = MapCache, FUNC_ERROR_TEXT = "Expected a function"; +function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") + throw new TypeError(FUNC_ERROR_TEXT); + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) + return cache.get(key); + var result = func.apply(this, args); + return memoized.cache = cache.set(key, result) || cache, result; + }; + return memoized.cache = new (memoize.Cache || MapCache_default)(), memoized; +} +memoize.Cache = MapCache_default; +var memoize_default = memoize, MAX_MEMOIZE_SIZE = 500; +function memoizeCapped(func) { + var result = memoize_default(func, function(key) { + return cache.size === MAX_MEMOIZE_SIZE && cache.clear(), key; + }), cache = result.cache; + return result; +} +var memoizeCapped_default = memoizeCapped, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reEscapeChar = /\\(\\)?/g, stringToPath = memoizeCapped_default(function(string) { + var result = []; + return string.charCodeAt(0) === 46 && result.push(""), string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }), result; +}), stringToPath_default = stringToPath; +function toString(value) { + return value == null ? "" : baseToString_default(value); +} +var toString_default = toString; +function castPath(value, object) { + return isArray_default(value) ? value : isKey_default(value, object) ? [value] : stringToPath_default(toString_default(value)); +} +var castPath_default = castPath, INFINITY2 = 1 / 0; +function toKey(value) { + if (typeof value == "string" || isSymbol_default(value)) + return value; + var result = value + ""; + return result == "0" && 1 / value == -INFINITY2 ? "-0" : result; +} +var toKey_default = toKey; +function baseGet(object, path) { + path = castPath_default(path, object); + for (var index = 0, length = path.length; object != null && index < length; ) + object = object[toKey_default(path[index++])]; + return index && index == length ? object : void 0; +} +var baseGet_default = baseGet; +function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet_default(object, path); + return result === void 0 ? defaultValue : result; +} +var get_default = get, isObject3 = isObject, dateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, isJSON = (input) => input.match(/^[\[\{\"\}].*[\]\}\"]$/); +function convertUnconventionalData(data) { + if (!isObject3(data)) + return data; + let result = data, wasMutated = !1; + return typeof Event < "u" && data instanceof Event && (result = extractEventHiddenProperties(result), wasMutated = !0), result = Object.keys(result).reduce((acc, key) => { + try { + result[key] && result[key].toJSON, acc[key] = result[key]; + } catch { + wasMutated = !0; + } + return acc; + }, {}), wasMutated ? result : data; +} +var replacer = function(options) { + let objects, map, stack, keys; + return function(key, value) { + try { + if (key === "") + return keys = [], objects = /* @__PURE__ */ new Map([[value, "[]"]]), map = /* @__PURE__ */ new Map(), stack = [], value; + let origin = map.get(this) || this; + for (; stack.length && origin !== stack[0]; ) + stack.shift(), keys.pop(); + if (typeof value == "boolean") + return value; + if (value === void 0) + return options.allowUndefined ? "_undefined_" : void 0; + if (value === null) + return null; + if (typeof value == "number") + return value === Number.NEGATIVE_INFINITY ? "_-Infinity_" : value === Number.POSITIVE_INFINITY ? "_Infinity_" : Number.isNaN(value) ? "_NaN_" : value; + if (typeof value == "bigint") + return `_bigint_${value.toString()}`; + if (typeof value == "string") + return dateFormat.test(value) ? options.allowDate ? `_date_${value}` : void 0 : value; + if ((0, import_is_regex.default)(value)) + return options.allowRegExp ? `_regexp_${value.flags}|${value.source}` : void 0; + if ((0, import_is_function.default)(value)) + return; + if ((0, import_is_symbol.default)(value)) { + if (!options.allowSymbol) + return; + let globalRegistryKey = Symbol.keyFor(value); + return globalRegistryKey !== void 0 ? `_gsymbol_${globalRegistryKey}` : `_symbol_${value.toString().slice(7, -1)}`; + } + if (stack.length >= options.maxDepth) + return Array.isArray(value) ? `[Array(${value.length})]` : "[Object]"; + if (value === this) + return `_duplicate_${JSON.stringify(keys)}`; + if (value instanceof Error && options.allowError) + return { + __isConvertedError__: !0, + errorProperties: { + // @ts-expect-error cause is not defined in the current tsconfig target(es2020) + ...value.cause ? { cause: value.cause } : {}, + ...value, + name: value.name, + message: value.message, + stack: value.stack, + "_constructor-name_": value.constructor.name + } + }; + if (value?.constructor?.name && value.constructor.name !== "Object" && !Array.isArray(value)) { + let found2 = objects.get(value); + if (!found2) { + let plainObject = { + __isClassInstance__: !0, + __className__: value.constructor.name, + ...Object.getOwnPropertyNames(value).reduce( + (acc, prop) => { + try { + acc[prop] = value[prop]; + } catch { + } + return acc; + }, + {} + ) + }; + return keys.push(key), stack.unshift(plainObject), objects.set(value, JSON.stringify(keys)), value !== plainObject && map.set(value, plainObject), plainObject; + } + return `_duplicate_${found2}`; + } + let found = objects.get(value); + if (!found) { + let converted = Array.isArray(value) ? value : convertUnconventionalData(value); + return keys.push(key), stack.unshift(converted), objects.set(value, JSON.stringify(keys)), value !== converted && map.set(value, converted), converted; + } + return `_duplicate_${found}`; + } catch { + return; + } + }; +}, reviver = function(options) { + let refs = [], root2; + return function(key, value) { + if (key === "" && (root2 = value, refs.forEach(({ target, container, replacement }) => { + let replacementArr = isJSON(replacement) ? JSON.parse(replacement) : replacement.split("."); + replacementArr.length === 0 ? container[target] = root2 : container[target] = get_default(root2, replacementArr); + })), key === "_constructor-name_") + return value; + if (isObject3(value) && value.__isConvertedError__) { + let { message, ...properties } = value.errorProperties, error = new Error(message); + return Object.assign(error, properties), error; + } + if (typeof value == "string" && value.startsWith("_regexp_") && options.allowRegExp) { + let [, flags, source] = value.match(/_regexp_([^|]*)\|(.*)/) || []; + return new RegExp(source, flags); + } + return typeof value == "string" && value.startsWith("_date_") && options.allowDate ? new Date(value.replace("_date_", "")) : typeof value == "string" && value.startsWith("_duplicate_") ? (refs.push({ target: key, container: this, replacement: value.replace(/^_duplicate_/, "") }), null) : typeof value == "string" && value.startsWith("_symbol_") && options.allowSymbol ? Symbol(value.replace("_symbol_", "")) : typeof value == "string" && value.startsWith("_gsymbol_") && options.allowSymbol ? Symbol.for(value.replace("_gsymbol_", "")) : typeof value == "string" && value === "_-Infinity_" ? Number.NEGATIVE_INFINITY : typeof value == "string" && value === "_Infinity_" ? Number.POSITIVE_INFINITY : typeof value == "string" && value === "_NaN_" ? Number.NaN : typeof value == "string" && value.startsWith("_bigint_") && typeof BigInt == "function" ? BigInt(value.replace("_bigint_", "")) : value; + }; +}, defaultOptions = { + maxDepth: 10, + space: void 0, + allowRegExp: !0, + allowDate: !0, + allowError: !0, + allowUndefined: !0, + allowSymbol: !0 +}, stringify = (data, options = {}) => { + let mergedOptions = { ...defaultOptions, ...options }; + return JSON.stringify(convertUnconventionalData(data), replacer(mergedOptions), options.space); +}, mutator = () => { + let mutated = /* @__PURE__ */ new Map(); + return function mutateUndefined(value) { + isObject3(value) && Object.entries(value).forEach(([k, v]) => { + v === "_undefined_" ? value[k] = void 0 : mutated.get(v) || (mutated.set(v, !0), mutateUndefined(v)); + }), Array.isArray(value) && value.forEach((v, index) => { + v === "_undefined_" ? (mutated.set(v, !0), value[index] = void 0) : mutated.get(v) || (mutated.set(v, !0), mutateUndefined(v)); + }); + }; +}, parse = (data, options = {}) => { + let mergedOptions = { ...defaultOptions, ...options }, result = JSON.parse(data, reviver(mergedOptions)); + return mutator()(result), result; +}; + +export { + UniversalStore, + isJSON, + stringify, + parse +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GWNTJ7C3.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GWNTJ7C3.js new file mode 100644 index 0000000000000000000000000000000000000000..d7ac87cb85a28fc6a3ad38803204da5839053a60 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-GWNTJ7C3.js @@ -0,0 +1,21 @@ +// src/shared/open-service/services/story-docs/snippet.ts +function prependImportToSnippet(importBlock, snippet) { + let trimmedImport = importBlock?.trim(); + return trimmedImport ? `${trimmedImport} + +${snippet}` : snippet; +} +function selectStoryDoc(payload, storyId) { + return payload?.stories[storyId]; +} +function selectSnippetForStory(payload, storyId) { + let story = payload?.stories[storyId]; + if (story?.snippet !== void 0) + return prependImportToSnippet(payload?.import, story.snippet); +} + +export { + prependImportToSnippet, + selectStoryDoc, + selectSnippetForStory +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IMSF75WX.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IMSF75WX.js new file mode 100644 index 0000000000000000000000000000000000000000..785f5a6a7e8e2769f7b721d962a723b080aa2c11 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IMSF75WX.js @@ -0,0 +1,42 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x, { + get: (a, b) => (typeof require < "u" ? require : a)[b] +}) : x)(function(x) { + if (typeof require < "u") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x + '" is not supported'); +}); +var __commonJS = (cb, mod) => function() { + try { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + } catch (e) { + throw mod = 0, e; + } +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: !0 }); +}, __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); + +export { + __require, + __commonJS, + __export, + __toESM +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IUGBVGDA.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IUGBVGDA.js new file mode 100644 index 0000000000000000000000000000000000000000..80234f0e405700d5c7ed2e76cacd8828bd9e783a --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IUGBVGDA.js @@ -0,0 +1,80 @@ +import { + StorybookError +} from "./chunk-2HVKLHKJ.js"; + +// src/manager-errors.ts +var Category = /* @__PURE__ */ ((Category2) => (Category2.MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT", Category2.MANAGER_UI = "MANAGER_UI", Category2.MANAGER_API = "MANAGER_API", Category2.MANAGER_CLIENT_LOGGER = "MANAGER_CLIENT-LOGGER", Category2.MANAGER_CHANNELS = "MANAGER_CHANNELS", Category2.MANAGER_CORE_EVENTS = "MANAGER_CORE-EVENTS", Category2.MANAGER_ROUTER = "MANAGER_ROUTER", Category2.MANAGER_THEMING = "MANAGER_THEMING", Category2.MANAGER_UNIVERSAL_STORE = "MANAGER_UNIVERSAL-STORE", Category2.MANAGER_OPEN_SERVICE = "MANAGER_OPEN-SERVICE", Category2))(Category || {}), ProviderDoesNotExtendBaseProviderError = class extends StorybookError { + constructor() { + super({ + name: "ProviderDoesNotExtendBaseProviderError", + category: "MANAGER_UI" /* MANAGER_UI */, + code: 1, + message: "The Provider passed into Storybook's UI is not extended from the base Provider. Please check your Provider implementation." + }); + } +}, UncaughtManagerError = class extends StorybookError { + constructor(data) { + super({ + name: "UncaughtManagerError", + category: "MANAGER_UNCAUGHT" /* MANAGER_UNCAUGHT */, + code: 1, + message: data.error.message + }); + this.data = data; + this.stack = data.error.stack; + } +}, StatusTypeIdMismatchError = class extends StorybookError { + constructor(data) { + super({ + name: "StatusTypeIdMismatchError", + category: "MANAGER_API" /* MANAGER_API */, + code: 1, + message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify( + data.status, + null, + 2 + )}` + }); + this.data = data; + } +}, UniversalStoreFollowerTimeoutError = class extends StorybookError { + constructor(followerId) { + super({ + name: "UniversalStoreFollowerTimeoutError", + category: "MANAGER_UNIVERSAL-STORE" /* MANAGER_UNIVERSAL_STORE */, + code: 1, + message: `Timed out waiting for leader state for UniversalStore follower with id: '${followerId}'. Ensure a leader with the same id exists and is reachable before creating a follower.` + }); + } +}, OpenServiceStaticSnapshotLoadError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceStaticSnapshotLoadError", + category: "MANAGER_OPEN-SERVICE" /* MANAGER_OPEN_SERVICE */, + code: 1, + message: `Failed to load open-service static snapshot "${data.logicalPath}" from "${data.url}" for "${data.serviceId}.${data.queryName}".`, + cause: data.cause + }); + this.data = data; + } +}, OpenServiceStaticSnapshotInvalidError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceStaticSnapshotInvalidError", + category: "MANAGER_OPEN-SERVICE" /* MANAGER_OPEN_SERVICE */, + code: 2, + message: `Open-service static snapshot "${data.logicalPath}" from "${data.url}" for "${data.serviceId}.${data.queryName}" must be a plain object.` + }); + this.data = data; + } +}; + +export { + Category, + ProviderDoesNotExtendBaseProviderError, + UncaughtManagerError, + StatusTypeIdMismatchError, + UniversalStoreFollowerTimeoutError, + OpenServiceStaticSnapshotLoadError, + OpenServiceStaticSnapshotInvalidError +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IWQGIXJS.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IWQGIXJS.js new file mode 100644 index 0000000000000000000000000000000000000000..176a1ab8f56e01c9610c4d9d48e380434d9b9cef --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-IWQGIXJS.js @@ -0,0 +1,14 @@ +// ../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js +var isProduction = process.env.NODE_ENV === "production", prefix = "Invariant failed"; +function invariant(condition, message) { + if (!condition) { + if (isProduction) + throw new Error(prefix); + var provided = typeof message == "function" ? message() : message, value = provided ? "".concat(prefix, ": ").concat(provided) : prefix; + throw new Error(value); + } +} + +export { + invariant +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KJHJLCBK.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KJHJLCBK.js new file mode 100644 index 0000000000000000000000000000000000000000..3bddf5e6615609b16bea8da5c75198dd36b39cb1 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KJHJLCBK.js @@ -0,0 +1,11 @@ +// src/highlight/constants.ts +var ADDON_ID = "storybook/highlight", HIGHLIGHT = `${ADDON_ID}/add`, REMOVE_HIGHLIGHT = `${ADDON_ID}/remove`, RESET_HIGHLIGHT = `${ADDON_ID}/reset`, SCROLL_INTO_VIEW = `${ADDON_ID}/scroll-into-view`, MAX_Z_INDEX = 2147483647, MIN_TOUCH_AREA_SIZE = 28; + +export { + HIGHLIGHT, + REMOVE_HIGHLIGHT, + RESET_HIGHLIGHT, + SCROLL_INTO_VIEW, + MAX_Z_INDEX, + MIN_TOUCH_AREA_SIZE +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KK3JJ3E4.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KK3JJ3E4.js new file mode 100644 index 0000000000000000000000000000000000000000..c431bef5fa3e9b4415e4bc6d703262db272c08d6 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KK3JJ3E4.js @@ -0,0 +1,111 @@ +// src/channels/main.ts +var isMulti = (args) => args.transports !== void 0, generateRandomId = () => Math.random().toString(16).slice(2), Channel = class { + constructor(input = {}) { + this.sender = generateRandomId(); + this.events = {}; + this.data = {}; + this.transports = []; + this.isAsync = input.async || !1, isMulti(input) ? (this.transports = input.transports || [], this.transports.forEach((t) => { + t.setHandler((event) => this.handleEvent(event)); + })) : this.transports = input.transport ? [input.transport] : [], this.transports.forEach((t) => { + t.setHandler((event) => this.handleEvent(event)); + }); + } + get hasTransport() { + return this.transports.length > 0; + } + addListener(eventName, listener) { + this.events[eventName] = this.events[eventName] || [], this.events[eventName].push(listener); + } + emit(eventName, ...args) { + let event = { type: eventName, args, from: this.sender }, options = {}; + args.length >= 1 && args[0] && args[0].options && (options = args[0].options); + let handler = () => { + this.transports.forEach((t) => { + t.send(event, options); + }), this.handleEvent(event); + }; + this.isAsync ? setImmediate(handler) : handler(); + } + last(eventName) { + return this.data[eventName]; + } + eventNames() { + return Object.keys(this.events); + } + listenerCount(eventName) { + let listeners = this.listeners(eventName); + return listeners ? listeners.length : 0; + } + listeners(eventName) { + return this.events[eventName] || void 0; + } + once(eventName, listener) { + let onceListener = this.onceListener(eventName, listener); + this.addListener(eventName, onceListener); + } + removeAllListeners(eventName) { + eventName ? this.events[eventName] && delete this.events[eventName] : this.events = {}; + } + removeListener(eventName, listener) { + let listeners = this.listeners(eventName); + listeners && (this.events[eventName] = listeners.filter((l) => l !== listener)); + } + on(eventName, listener) { + this.addListener(eventName, listener); + } + off(eventName, listener) { + this.removeListener(eventName, listener); + } + handleEvent(event) { + let listeners = this.listeners(event.type); + listeners && listeners.length && listeners.forEach((fn) => { + fn.apply(event, event.args); + }), this.data[event.type] = event.args; + } + onceListener(eventName, listener) { + let onceListener = (...args) => (this.removeListener(eventName, onceListener), listener(...args)); + return onceListener; + } +}; + +// src/channels/channel-slot.ts +var channel; +function syncGlobalSlot(next) { + globalThis.__STORYBOOK_ADDONS_CHANNEL__ = next; +} +function getChannel() { + let fromGlobal = globalThis.__STORYBOOK_ADDONS_CHANNEL__; + return fromGlobal && (channel = fromGlobal), channel ?? null; +} +function requireChannel() { + let installed = getChannel(); + if (!installed) + throw new Error( + "Storybook addons channel is not installed in this runtime. Install it via setChannel() or addons.setChannel() at the runtime entry point before registering services or emitting events." + ); + return installed; +} +function setChannel(next) { + channel = next ?? void 0, syncGlobalSlot(channel); +} +function clearChannel() { + setChannel(null); +} +function installNoopChannel() { + setChannel(new Channel({})); +} +function ensureChannel() { + getChannel() || installNoopChannel(); +} +typeof window > "u" && ensureChannel(); + +export { + Channel, + getChannel, + requireChannel, + setChannel, + clearChannel, + installNoopChannel, + ensureChannel +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KUHYVZJN.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KUHYVZJN.js new file mode 100644 index 0000000000000000000000000000000000000000..11644737e0cce25b9193a723da2d1879261f9016 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-KUHYVZJN.js @@ -0,0 +1,153 @@ +import { + StorybookError +} from "./chunk-2HVKLHKJ.js"; +import { + require_picocolors_browser +} from "./chunk-SC67XZST.js"; +import { + __toESM +} from "./chunk-IMSF75WX.js"; + +// src/server-errors.ts +var import_picocolors = __toESM(require_picocolors_browser(), 1); + +// src/shared/open-service/errors.ts +function formatIssuePath(path) { + return path?.length ? path.map((segment) => { + let key = typeof segment == "object" && segment !== null && "key" in segment ? segment.key : segment; + return typeof key == "number" ? `[${key}]` : `.${String(key)}`; + }).join("").replace(/^\./, "") : ""; +} +function formatIssues(issues) { + return issues.map((issue) => { + let path = formatIssuePath(issue.path); + return path === "" ? issue.message : `${path}: ${issue.message}`; + }).join(` +`); +} + +// src/server-errors.ts +var OpenServiceValidationError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceValidationError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 5, + message: `Invalid ${data.phase} for ${data.kind} "${data.serviceId}.${data.name}": +${formatIssues( + data.issues + )}` + }); + this.data = data; + } +}; +var OpenServiceMissingServiceError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceMissingServiceError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 7, + message: `No registered service with id "${data.serviceId}" exists in this environment.` + }); + this.data = data; + } +}, OpenServiceUnimplementedOperationError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceUnimplementedOperationError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 8, + message: `${data.kind[0].toUpperCase()}${data.kind.slice(1)} "${data.serviceId}.${data.name}" is not implemented for this environment.` + }); + this.data = data; + } +}, OpenServiceInvalidStaticPathError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceInvalidStaticPathError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 10, + message: `Invalid static path "${data.path}" for query "${data.serviceId}.${data.name}": use a relative path with forward slashes and no ".." segments.` + }); + this.data = data; + } +}, OpenServiceAsyncSchemaError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceAsyncSchemaError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 9, + message: `Async schema for ${data.kind} "${data.serviceId}.${data.name}" (${data.phase}): query input and output schemas must validate synchronously.` + }); + this.data = data; + } +}, OpenServiceLoadedDrainExceededError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceLoadedDrainExceededError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 11, + message: `Query "${data.serviceId}.${data.name}".loaded(...) did not settle after ${data.iterations} drain iterations. Check for handlers that keep discovering new dependencies after every state change.` + }); + this.data = data; + } +}; +var OpenServiceMissingChannelError = class extends StorybookError { + constructor(data = {}) { + super({ + name: "OpenServiceMissingChannelError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 13, + message: data.serviceId ? `Cannot register service "${data.serviceId}": the Storybook addons channel is not installed in this runtime.` : "The Storybook addons channel is not installed in this runtime." + }); + this.data = data; + } +}, OpenServiceRemoteCommandDisconnectedError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceRemoteCommandDisconnectedError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 14, + message: `Service "${data.serviceId}" was unregistered before a remote command resolved.` + }); + this.data = data; + } +}, OpenServiceRemoteCommandUnhandledError = class extends StorybookError { + constructor(data) { + super({ + name: "OpenServiceRemoteCommandUnhandledError", + category: "CORE-COMMON" /* CORE_COMMON */, + code: 15, + message: `No runtime acknowledged remote command "${data.serviceId}.${data.commandName}"; its handler is not implemented in any connected runtime.` + }); + this.data = data; + } +}; +var StatusTypeIdMismatchError = class extends StorybookError { + constructor(data) { + super({ + name: "StatusTypeIdMismatchError", + category: "CORE-SERVER" /* CORE_SERVER */, + code: 16, + message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify( + data.status, + null, + 2 + )}` + }); + this.data = data; + } +}; + +export { + OpenServiceValidationError, + OpenServiceMissingServiceError, + OpenServiceUnimplementedOperationError, + OpenServiceInvalidStaticPathError, + OpenServiceAsyncSchemaError, + OpenServiceLoadedDrainExceededError, + OpenServiceMissingChannelError, + OpenServiceRemoteCommandDisconnectedError, + OpenServiceRemoteCommandUnhandledError, + StatusTypeIdMismatchError +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-LE2LTDW3.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-LE2LTDW3.js new file mode 100644 index 0000000000000000000000000000000000000000..cad3d0097c3f8618ef812bd0e2cf93db67d63c8b --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-LE2LTDW3.js @@ -0,0 +1,14 @@ +// ../../node_modules/@babel/runtime/helpers/esm/extends.js +function _extends() { + return _extends = Object.assign ? Object.assign.bind() : function(n) { + for (var e = 1; e < arguments.length; e++) { + var t = arguments[e]; + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); + } + return n; + }, _extends.apply(null, arguments); +} + +export { + _extends +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-LITCR56V.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-LITCR56V.js new file mode 100644 index 0000000000000000000000000000000000000000..5bd6c928bdb80940fbf0b340b650a32832958d44 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-LITCR56V.js @@ -0,0 +1,53 @@ +// ../../node_modules/@react-aria/live-announcer/dist/LiveAnnouncer.mjs +var $319e236875307eab$var$liveAnnouncer = null; +function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = "assertive", timeout = 7e3) { + $319e236875307eab$var$liveAnnouncer ? $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout) : ($319e236875307eab$var$liveAnnouncer = new $319e236875307eab$var$LiveAnnouncer(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout) : setTimeout(() => { + $319e236875307eab$var$liveAnnouncer?.isAttached() && $319e236875307eab$var$liveAnnouncer?.announce(message, assertiveness, timeout); + }, 100)); +} +function $319e236875307eab$export$d10ae4f68404609a(assertiveness) { + $319e236875307eab$var$liveAnnouncer && $319e236875307eab$var$liveAnnouncer.clear(assertiveness); +} +var $319e236875307eab$var$LiveAnnouncer = class { + isAttached() { + var _this_node; + return (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.isConnected; + } + createLog(ariaLive) { + let node = document.createElement("div"); + return node.setAttribute("role", "log"), node.setAttribute("aria-live", ariaLive), node.setAttribute("aria-relevant", "additions"), node; + } + destroy() { + this.node && (document.body.removeChild(this.node), this.node = null); + } + announce(message, assertiveness = "assertive", timeout = 7e3) { + var _this_assertiveLog, _this_politeLog; + if (!this.node) return; + let node = document.createElement("div"); + typeof message == "object" ? (node.setAttribute("role", "img"), node.setAttribute("aria-labelledby", message["aria-labelledby"])) : node.textContent = message, assertiveness === "assertive" ? (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === void 0 || _this_assertiveLog.appendChild(node) : (_this_politeLog = this.politeLog) === null || _this_politeLog === void 0 || _this_politeLog.appendChild(node), message !== "" && setTimeout(() => { + node.remove(); + }, timeout); + } + clear(assertiveness) { + this.node && ((!assertiveness || assertiveness === "assertive") && this.assertiveLog && (this.assertiveLog.innerHTML = ""), (!assertiveness || assertiveness === "polite") && this.politeLog && (this.politeLog.innerHTML = "")); + } + constructor() { + this.node = null, this.assertiveLog = null, this.politeLog = null, typeof document < "u" && (this.node = document.createElement("div"), this.node.dataset.liveAnnouncer = "true", Object.assign(this.node.style, { + border: 0, + clip: "rect(0 0 0 0)", + clipPath: "inset(50%)", + height: "1px", + margin: "-1px", + overflow: "hidden", + padding: 0, + position: "absolute", + width: "1px", + whiteSpace: "nowrap" + }), this.assertiveLog = this.createLog("assertive"), this.node.appendChild(this.assertiveLog), this.politeLog = this.createLog("polite"), this.node.appendChild(this.politeLog), document.body.prepend(this.node)); + } +}; + +export { + $319e236875307eab$export$a9b970dcc4ae71a9, + $319e236875307eab$export$d10ae4f68404609a +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-MEXTPDJG.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-MEXTPDJG.js new file mode 100644 index 0000000000000000000000000000000000000000..4f4fe6bbe208b6b50f8fc29f76bd7d7a7cee513c --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-MEXTPDJG.js @@ -0,0 +1,71 @@ +// src/preview-api/modules/preview-web/render/animation-utils.ts +function isTestEnvironment() { + try { + return ( + // @ts-expect-error This property exists in Vitest browser mode + !!globalThis.__vitest_browser__ || !!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/) + ); + } catch { + return !1; + } +} +function pauseAnimations(atEnd = !0) { + if (!("document" in globalThis && "createElement" in globalThis.document)) + return () => { + }; + let disableStyle = document.createElement("style"); + disableStyle.textContent = `*, *:before, *:after { + animation: none !important; + }`, document.head.appendChild(disableStyle); + let pauseStyle = document.createElement("style"); + return pauseStyle.textContent = `*, *:before, *:after { + animation-delay: 0s !important; + animation-direction: ${atEnd ? "reverse" : "normal"} !important; + animation-play-state: paused !important; + transition: none !important; + }`, document.head.appendChild(pauseStyle), document.body.clientHeight, document.head.removeChild(disableStyle), () => { + pauseStyle.parentNode?.removeChild(pauseStyle); + }; +} +async function waitForAnimations(signal) { + if (!("document" in globalThis && "getAnimations" in globalThis.document && "querySelectorAll" in globalThis.document)) + return; + let timedOut = !1; + await Promise.race([ + // After 50ms, retrieve any running animations and wait for them to finish + // If new animations are created while waiting, we'll wait for them too + new Promise((resolve) => { + setTimeout(() => { + let animationRoots = [globalThis.document, ...getShadowRoots(globalThis.document)], checkAnimationsFinished = async () => { + if (timedOut || signal?.aborted) + return; + let runningAnimations = animationRoots.flatMap((el) => el?.getAnimations?.() || []).filter((a) => a.playState === "running" && !isInfiniteAnimation(a)); + runningAnimations.length > 0 && (await Promise.allSettled(runningAnimations.map(async (a) => a.finished)), await checkAnimationsFinished()); + }; + checkAnimationsFinished().then(resolve); + }, 100); + }), + // If animations don't finish within the timeout, continue without waiting + new Promise( + (resolve) => setTimeout(() => { + timedOut = !0, resolve(void 0); + }, 5e3) + ) + ]); +} +function getShadowRoots(doc) { + return [doc, ...doc.querySelectorAll("*")].reduce((acc, el) => ("shadowRoot" in el && el.shadowRoot && acc.push(el.shadowRoot, ...getShadowRoots(el.shadowRoot)), acc), []); +} +function isInfiniteAnimation(anim) { + if (anim instanceof CSSAnimation && anim.effect instanceof KeyframeEffect && anim.effect.target) { + let style = getComputedStyle(anim.effect.target, anim.effect.pseudoElement), index = style.animationName?.split(", ").indexOf(anim.animationName); + return style.animationIterationCount.split(", ")[index] === "infinite"; + } + return !1; +} + +export { + isTestEnvironment, + pauseAnimations, + waitForAnimations +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-MFQQ5L5I.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-MFQQ5L5I.js new file mode 100644 index 0000000000000000000000000000000000000000..e538af86dcc1c5ba34d9e8cd32f5d148968b73cf --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-MFQQ5L5I.js @@ -0,0 +1,367 @@ +import { + StorybookError +} from "./chunk-2HVKLHKJ.js"; +import { + dedent +} from "./chunk-3LY4VQVK.js"; + +// src/preview-errors.ts +var Category = /* @__PURE__ */ ((Category2) => (Category2.BLOCKS = "BLOCKS", Category2.DOCS_TOOLS = "DOCS-TOOLS", Category2.PREVIEW_CLIENT_LOGGER = "PREVIEW_CLIENT-LOGGER", Category2.PREVIEW_CHANNELS = "PREVIEW_CHANNELS", Category2.PREVIEW_CORE_EVENTS = "PREVIEW_CORE-EVENTS", Category2.PREVIEW_INSTRUMENTER = "PREVIEW_INSTRUMENTER", Category2.PREVIEW_API = "PREVIEW_API", Category2.PREVIEW_REACT_DOM_SHIM = "PREVIEW_REACT-DOM-SHIM", Category2.PREVIEW_ROUTER = "PREVIEW_ROUTER", Category2.PREVIEW_THEMING = "PREVIEW_THEMING", Category2.RENDERER_HTML = "RENDERER_HTML", Category2.RENDERER_PREACT = "RENDERER_PREACT", Category2.RENDERER_REACT = "RENDERER_REACT", Category2.RENDERER_SERVER = "RENDERER_SERVER", Category2.RENDERER_SVELTE = "RENDERER_SVELTE", Category2.RENDERER_VUE = "RENDERER_VUE", Category2.RENDERER_VUE3 = "RENDERER_VUE3", Category2.RENDERER_WEB_COMPONENTS = "RENDERER_WEB-COMPONENTS", Category2.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", Category2.ADDON_VITEST = "ADDON_VITEST", Category2.ADDON_A11Y = "ADDON_A11Y", Category2))(Category || {}), MissingStoryAfterHmrError = class extends StorybookError { + constructor(data) { + super({ + name: "MissingStoryAfterHmrError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 1, + message: dedent` + Couldn't find story matching id '${data.storyId}' after HMR. + - Did you just rename a story? + - Did you remove it from your CSF file? + - Are you sure a story with the id '${data.storyId}' exists? + - Please check the values in the stories field of your main.js config and see if they would match your CSF File. + - Also check the browser console and terminal for potential error messages.` + }); + this.data = data; + } +}, ImplicitActionsDuringRendering = class extends StorybookError { + constructor(data) { + super({ + name: "ImplicitActionsDuringRendering", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 2, + documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-for-example-in-the-play-function", + message: dedent` + We detected that you use an implicit action arg while ${data.phase} of your story. + ${data.deprecated ? ` +This is deprecated and won't work in Storybook 8 anymore. +` : ""} + Please provide an explicit spy to your args like this: + import { fn } from 'storybook/test'; + ... + args: { + ${data.name}: fn() + }` + }); + this.data = data; + } +}, CalledExtractOnStoreError = class extends StorybookError { + constructor() { + super({ + name: "CalledExtractOnStoreError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 3, + message: dedent` + Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first. + + You probably meant to call \`await preview.extract()\` which does the above for you.` + }); + } +}, MissingRenderToCanvasError = class extends StorybookError { + constructor() { + super({ + name: "MissingRenderToCanvasError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 4, + message: dedent` + Expected your framework's preset to export a \`renderToCanvas\` field. + + Perhaps it needs to be upgraded for Storybook 7.0?`, + documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field" + }); + } +}, CalledPreviewMethodBeforeInitializationError = class extends StorybookError { + constructor(data) { + super({ + name: "CalledPreviewMethodBeforeInitializationError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 5, + message: dedent` + Called \`Preview.${data.methodName}()\` before initialization. + + The preview needs to load the story index before most methods can be called. If you want + to call \`${data.methodName}\`, try \`await preview.initializationPromise;\` first. + + If you didn't call the above code, then likely it was called by an addon that needs to + do the above.` + }); + this.data = data; + } +}, StoryIndexFetchError = class extends StorybookError { + constructor(data) { + super({ + name: "StoryIndexFetchError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 6, + message: dedent` + Error fetching \`/index.json\`: + + ${data.text} + + If you are in development, this likely indicates a problem with your Storybook process, + check the terminal for errors. + + If you are in a deployed Storybook, there may have been an issue deploying the full Storybook + build.` + }); + this.data = data; + } +}, MdxFileWithNoCsfReferencesError = class extends StorybookError { + constructor(data) { + super({ + name: "MdxFileWithNoCsfReferencesError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 7, + message: dedent` + Tried to render docs entry ${data.storyId} but it is a MDX file that has no CSF + references, or autodocs for a CSF file that some doesn't refer to itself. + + This likely is an internal error in Storybook's indexing, or you've attached the + \`attached-mdx\` tag to an MDX file that is not attached.` + }); + this.data = data; + } +}, EmptyIndexError = class extends StorybookError { + constructor() { + super({ + name: "EmptyIndexError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 8, + message: dedent` + Couldn't find any stories in your Storybook. + + - Please check your stories field of your main.js config: does it match correctly? + - Also check the browser console and terminal for error messages.` + }); + } +}, NoStoryMatchError = class extends StorybookError { + constructor(data) { + super({ + name: "NoStoryMatchError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 9, + message: dedent` + Couldn't find story matching '${data.storySpecifier}'. + + - Are you sure a story with that id exists? + - Please check your stories field of your main.js config. + - Also check the browser console and terminal for error messages.` + }); + this.data = data; + } +}, MissingStoryFromCsfFileError = class extends StorybookError { + constructor(data) { + super({ + name: "MissingStoryFromCsfFileError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 10, + message: dedent` + Couldn't find story matching id '${data.storyId}' after importing a CSF file. + + The file was indexed as if the story was there, but then after importing the file in the browser + we didn't find the story. Possible reasons: + - You are using a custom story indexer that is misbehaving. + - You have a custom file loader that is removing or renaming exports. + + Please check your browser console and terminal for errors that may explain the issue.` + }); + this.data = data; + } +}, StoryStoreAccessedBeforeInitializationError = class extends StorybookError { + constructor() { + super({ + name: "StoryStoreAccessedBeforeInitializationError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 11, + message: dedent` + Cannot access the Story Store until the index is ready. + + It is not recommended to use methods directly on the Story Store anyway, in Storybook 9 we will + remove access to the store entirely` + }); + } +}, MountMustBeDestructuredError = class extends StorybookError { + // name: 'MountMustBeDestructuredError'; + constructor(data) { + super({ + name: "MountMustBeDestructuredError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 12, + message: dedent` + Incorrect use of mount in the play function. + + To use mount in the play function, you must satisfy the following two requirements: + + 1. You *must* destructure the mount property from the \`context\` (the argument passed to your play function). + This makes sure that Storybook does not start rendering the story before the play function begins. + + 2. Your Storybook framework or builder must be configured to transpile to ES2017 or newer. + This is because destructuring statements and async/await usages are otherwise transpiled away, + which prevents Storybook from recognizing your usage of \`mount\`. + + Note that Angular is not supported. As async/await is transpiled to support the zone.js polyfill. + + More info: https://storybook.js.org/docs/writing-tests/interaction-testing?ref=error#run-code-before-the-component-gets-rendered + + Received the following play function: + ${data.playFunction}` + }); + this.data = data; + } +}, NoRenderFunctionError = class extends StorybookError { + constructor(data) { + super({ + name: "NoRenderFunctionError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 14, + message: dedent` + No render function available for storyId '${data.id}' + ` + }); + this.data = data; + } +}, NoStoryMountedError = class extends StorybookError { + constructor() { + super({ + name: "NoStoryMountedError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 15, + message: dedent` + No component is mounted in your story. + + This usually occurs when you destructure mount in the play function, but forget to call it. + + For example: + + async play({ mount, canvasElement }) { + // 👈 mount should be called: await mount(); + const canvas = within(canvasElement); + const button = await canvas.findByRole('button'); + await userEvent.click(button); + }; + + Make sure to either remove it or call mount in your play function. + ` + }); + } +}, StatusTypeIdMismatchError = class extends StorybookError { + constructor(data) { + super({ + name: "StatusTypeIdMismatchError", + category: "PREVIEW_API" /* PREVIEW_API */, + code: 16, + message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify( + data.status, + null, + 2 + )}` + }); + this.data = data; + } +}, NextJsSharpError = class extends StorybookError { + constructor() { + super({ + name: "NextJsSharpError", + category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */, + code: 1, + documentation: "https://storybook.js.org/docs/get-started/frameworks/nextjs#error-you-are-importing-avif-images-but-you-dont-have-sharp-installed-you-have-to-install-sharp-in-order-to-use-image-optimization-features-in-nextjs", + message: dedent` + You are importing avif images, but you don't have sharp installed. + + You have to install sharp in order to use image optimization features in Next.js. + ` + }); + } +}, NextjsRouterMocksNotAvailable = class extends StorybookError { + constructor(data) { + super({ + name: "NextjsRouterMocksNotAvailable", + category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */, + code: 2, + message: dedent` + Tried to access router mocks from "${data.importType}" but they were not created yet. You might be running code in an unsupported environment. + ` + }); + this.data = data; + } +}, UnknownArgTypesError = class extends StorybookError { + constructor(data) { + super({ + name: "UnknownArgTypesError", + category: "DOCS-TOOLS" /* DOCS_TOOLS */, + code: 1, + documentation: "https://github.com/storybookjs/storybook/issues/26606", + message: dedent` + There was a failure when generating detailed ArgTypes in ${data.language} for: + ${JSON.stringify(data.type, null, 2)} + + Storybook will fall back to use a generic type description instead. + + This type is either not supported or it is a bug in the docgen generation in Storybook. + If you think this is a bug, please detail it as much as possible in the Github issue. + ` + }); + this.data = data; + } +}, InvalidBlockOfPropError = class extends StorybookError { + constructor() { + super({ + name: "InvalidBlockOfPropError", + category: "BLOCKS" /* BLOCKS */, + code: 1, + message: "Unexpected `of={undefined}`, did you mistype a CSF file reference?" + }); + } +}, UnsupportedViewportDimensionError = class extends StorybookError { + constructor(data) { + super({ + name: "UnsupportedViewportDimensionError", + category: "ADDON_VITEST" /* ADDON_VITEST */, + code: 1, + // TODO: Add documentation about viewports support + // documentation: '', + message: dedent` + Encountered an unsupported value "${data.value}" when setting the viewport ${data.dimension} dimension. + + The Storybook plugin only supports values in the following units: + - px, vh, vw, em, rem and %. + + You can either change the viewport for this story to use one of the supported units or skip the test by adding '!test' to the story's tags per https://storybook.js.org/docs/writing-stories/tags + ` + }); + this.data = data; + } +}, ElementA11yParameterError = class extends StorybookError { + constructor() { + super({ + name: "ElementA11yParameterError", + category: "ADDON_A11Y" /* ADDON_A11Y */, + code: 1, + documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#a11y-addon-replace-element-parameter-with-context-parameter", + message: 'The "element" parameter in parameters.a11y has been removed. Use "context" instead.' + }); + } +}; + +export { + Category, + MissingStoryAfterHmrError, + ImplicitActionsDuringRendering, + CalledExtractOnStoreError, + MissingRenderToCanvasError, + CalledPreviewMethodBeforeInitializationError, + StoryIndexFetchError, + MdxFileWithNoCsfReferencesError, + EmptyIndexError, + NoStoryMatchError, + MissingStoryFromCsfFileError, + StoryStoreAccessedBeforeInitializationError, + MountMustBeDestructuredError, + NoRenderFunctionError, + NoStoryMountedError, + StatusTypeIdMismatchError, + NextJsSharpError, + NextjsRouterMocksNotAvailable, + UnknownArgTypesError, + InvalidBlockOfPropError, + UnsupportedViewportDimensionError, + ElementA11yParameterError +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-NQ3W4AUJ.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-NQ3W4AUJ.js new file mode 100644 index 0000000000000000000000000000000000000000..2f0fb139a4819b41324ba3ff2f69e2797c76bdcc --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-NQ3W4AUJ.js @@ -0,0 +1,274 @@ +// src/viewport/constants.ts +var ADDON_ID = "storybook/viewport", PARAM_KEY = "viewport", PANEL_ID = `${ADDON_ID}/panel`, TOOL_ID = `${ADDON_ID}/tool`, RESPONSIVE_VIEWPORT_VALUE = "100pct-100pct"; + +// src/viewport/defaults.ts +var INITIAL_VIEWPORTS = { + iphone5: { + name: "iPhone 5", + styles: { + height: "568px", + width: "320px" + }, + type: "mobile" + }, + iphone6: { + name: "iPhone 6", + styles: { + height: "667px", + width: "375px" + }, + type: "mobile" + }, + iphone6p: { + name: "iPhone 6 Plus", + styles: { + height: "736px", + width: "414px" + }, + type: "mobile" + }, + iphone8p: { + name: "iPhone 8 Plus", + styles: { + height: "736px", + width: "414px" + }, + type: "mobile" + }, + iphonex: { + name: "iPhone X", + styles: { + height: "812px", + width: "375px" + }, + type: "mobile" + }, + iphonexr: { + name: "iPhone XR", + styles: { + height: "896px", + width: "414px" + }, + type: "mobile" + }, + iphonexsmax: { + name: "iPhone XS Max", + styles: { + height: "896px", + width: "414px" + }, + type: "mobile" + }, + iphonese2: { + name: "iPhone SE (2nd generation)", + styles: { + height: "667px", + width: "375px" + }, + type: "mobile" + }, + iphone12mini: { + name: "iPhone 12 mini", + styles: { + height: "812px", + width: "375px" + }, + type: "mobile" + }, + iphone12: { + name: "iPhone 12", + styles: { + height: "844px", + width: "390px" + }, + type: "mobile" + }, + iphone12promax: { + name: "iPhone 12 Pro Max", + styles: { + height: "926px", + width: "428px" + }, + type: "mobile" + }, + iphoneSE3: { + name: "iPhone SE 3rd generation", + styles: { + height: "667px", + width: "375px" + }, + type: "mobile" + }, + iphone13: { + name: "iPhone 13", + styles: { + height: "844px", + width: "390px" + }, + type: "mobile" + }, + iphone13pro: { + name: "iPhone 13 Pro", + styles: { + height: "844px", + width: "390px" + }, + type: "mobile" + }, + iphone13promax: { + name: "iPhone 13 Pro Max", + styles: { + height: "926px", + width: "428px" + }, + type: "mobile" + }, + iphone14: { + name: "iPhone 14", + styles: { + height: "844px", + width: "390px" + }, + type: "mobile" + }, + iphone14pro: { + name: "iPhone 14 Pro", + styles: { + height: "852px", + width: "393px" + }, + type: "mobile" + }, + iphone14promax: { + name: "iPhone 14 Pro Max", + styles: { + height: "932px", + width: "430px" + }, + type: "mobile" + }, + ipad: { + name: "iPad", + styles: { + height: "1024px", + width: "768px" + }, + type: "tablet" + }, + ipad10p: { + name: "iPad Pro 10.5-in", + styles: { + height: "1112px", + width: "834px" + }, + type: "tablet" + }, + ipad11p: { + name: "iPad Pro 11-in", + styles: { + height: "1194px", + width: "834px" + }, + type: "tablet" + }, + ipad12p: { + name: "iPad Pro 12.9-in", + styles: { + height: "1366px", + width: "1024px" + }, + type: "tablet" + }, + galaxys5: { + name: "Galaxy S5", + styles: { + height: "640px", + width: "360px" + }, + type: "mobile" + }, + galaxys9: { + name: "Galaxy S9", + styles: { + height: "740px", + width: "360px" + }, + type: "mobile" + }, + nexus5x: { + name: "Nexus 5X", + styles: { + height: "660px", + width: "412px" + }, + type: "mobile" + }, + nexus6p: { + name: "Nexus 6P", + styles: { + height: "732px", + width: "412px" + }, + type: "mobile" + }, + pixel: { + name: "Pixel", + styles: { + height: "960px", + width: "540px" + }, + type: "mobile" + }, + pixelxl: { + name: "Pixel XL", + styles: { + height: "1280px", + width: "720px" + }, + type: "mobile" + } +}, DEFAULT_VIEWPORT = "responsive", MINIMAL_VIEWPORTS = { + mobile1: { + name: "Small mobile", + styles: { + height: "568px", + width: "320px" + }, + type: "mobile" + }, + mobile2: { + name: "Large mobile", + styles: { + height: "896px", + width: "414px" + }, + type: "mobile" + }, + tablet: { + name: "Tablet", + styles: { + height: "1112px", + width: "834px" + }, + type: "tablet" + }, + desktop: { + name: "Desktop", + styles: { + height: "1024px", + width: "1280px" + }, + type: "desktop" + } +}; + +export { + ADDON_ID, + PARAM_KEY, + PANEL_ID, + TOOL_ID, + RESPONSIVE_VIEWPORT_VALUE, + INITIAL_VIEWPORTS, + DEFAULT_VIEWPORT, + MINIMAL_VIEWPORTS +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-NZMVUW5T.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-NZMVUW5T.js new file mode 100644 index 0000000000000000000000000000000000000000..8a901ed95f5f09ef553f5e3fce1d376cec42ffd4 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-NZMVUW5T.js @@ -0,0 +1,7 @@ +// ../../node_modules/es-toolkit/dist/function/noop.mjs +function noop() { +} + +export { + noop +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-OA6XKWIN.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-OA6XKWIN.js new file mode 100644 index 0000000000000000000000000000000000000000..9dbe58be3b4f94ca6cb44243b077761a7d51f96c --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-OA6XKWIN.js @@ -0,0 +1,2852 @@ +import { + combineParameters +} from "./chunk-FLUL445Z.js"; +import { + mapValues +} from "./chunk-5GYAEUAU.js"; +import { + __commonJS, + __toESM +} from "./chunk-IMSF75WX.js"; + +// ../../node_modules/jsdoc-type-pratt-parser/dist/index.js +var require_dist = __commonJS({ + "../../node_modules/jsdoc-type-pratt-parser/dist/index.js"(exports, module) { + (function(global, factory) { + typeof exports == "object" && typeof module < "u" ? factory(exports) : typeof define == "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis < "u" ? globalThis : global || self, factory(global.jtpp = {})); + })(exports, (function(exports2) { + "use strict"; + function tokenToString(token) { + return token.text !== void 0 && token.text !== "" ? `'${token.type}' with value '${token.text}'` : `'${token.type}'`; + } + class NoParsletFoundError extends Error { + constructor(token) { + super(`No parslet found for token: ${tokenToString(token)}`), this.token = token, Object.setPrototypeOf(this, NoParsletFoundError.prototype); + } + getToken() { + return this.token; + } + } + class EarlyEndOfParseError extends Error { + constructor(token) { + super(`The parsing ended early. The next token was: ${tokenToString(token)}`), this.token = token, Object.setPrototypeOf(this, EarlyEndOfParseError.prototype); + } + getToken() { + return this.token; + } + } + class UnexpectedTypeError extends Error { + constructor(result, message) { + let error = `Unexpected type: '${result.type}'.`; + message !== void 0 && (error += ` Message: ${message}`), super(error), Object.setPrototypeOf(this, UnexpectedTypeError.prototype); + } + } + function makePunctuationRule(type) { + return (text) => text.startsWith(type) ? { type, text: type } : null; + } + function getQuoted(text) { + let position = 0, char, mark = text[0], escaped = !1; + if (mark !== "'" && mark !== '"') + return null; + for (; position < text.length; ) { + if (position++, char = text[position], !escaped && char === mark) { + position++; + break; + } + escaped = !escaped && char === "\\"; + } + if (char !== mark) + throw new Error("Unterminated String"); + return text.slice(0, position); + } + let identifierStartRegex = new RegExp("[$_\\p{ID_Start}]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}", "u"), identifierContinueRegex = new RegExp("[$\\-\\p{ID_Continue}\\u200C\\u200D]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}", "u"); + function getIdentifier(text) { + let char = text[0]; + if (!identifierStartRegex.test(char)) + return null; + let position = 1; + do { + if (char = text[position], !identifierContinueRegex.test(char)) + break; + position++; + } while (position < text.length); + return text.slice(0, position); + } + let numberRegex = /^(NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity))/; + function getNumber(text) { + var _a, _b; + return (_b = (_a = numberRegex.exec(text)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null; + } + let identifierRule = (text) => { + let value = getIdentifier(text); + return value == null ? null : { + type: "Identifier", + text: value + }; + }; + function makeKeyWordRule(type) { + return (text) => { + if (!text.startsWith(type)) + return null; + let prepends = text[type.length]; + return prepends !== void 0 && identifierContinueRegex.test(prepends) ? null : { + type, + text: type + }; + }; + } + let stringValueRule = (text) => { + let value = getQuoted(text); + return value == null ? null : { + type: "StringValue", + text: value + }; + }, eofRule = (text) => text.length > 0 ? null : { + type: "EOF", + text: "" + }, numberRule = (text) => { + let value = getNumber(text); + return value === null ? null : { + type: "Number", + text: value + }; + }, rules = [ + eofRule, + makePunctuationRule("=>"), + makePunctuationRule("("), + makePunctuationRule(")"), + makePunctuationRule("{"), + makePunctuationRule("}"), + makePunctuationRule("["), + makePunctuationRule("]"), + makePunctuationRule("|"), + makePunctuationRule("&"), + makePunctuationRule("<"), + makePunctuationRule(">"), + makePunctuationRule(","), + makePunctuationRule(";"), + makePunctuationRule("*"), + makePunctuationRule("?"), + makePunctuationRule("!"), + makePunctuationRule("="), + makePunctuationRule(":"), + makePunctuationRule("..."), + makePunctuationRule("."), + makePunctuationRule("#"), + makePunctuationRule("~"), + makePunctuationRule("/"), + makePunctuationRule("@"), + makeKeyWordRule("undefined"), + makeKeyWordRule("null"), + makeKeyWordRule("function"), + makeKeyWordRule("this"), + makeKeyWordRule("new"), + makeKeyWordRule("module"), + makeKeyWordRule("event"), + makeKeyWordRule("extends"), + makeKeyWordRule("external"), + makeKeyWordRule("infer"), + makeKeyWordRule("typeof"), + makeKeyWordRule("keyof"), + makeKeyWordRule("readonly"), + makeKeyWordRule("import"), + makeKeyWordRule("is"), + makeKeyWordRule("in"), + makeKeyWordRule("asserts"), + numberRule, + identifierRule, + stringValueRule + ], breakingWhitespaceRegex = /^\s*\n\s*/; + class Lexer { + static create(text) { + let current = this.read(text); + text = current.text; + let next = this.read(text); + return text = next.text, new Lexer(text, void 0, current.token, next.token); + } + constructor(text, previous, current, next) { + this.text = "", this.text = text, this.previous = previous, this.current = current, this.next = next; + } + static read(text, startOfLine = !1) { + startOfLine = startOfLine || breakingWhitespaceRegex.test(text), text = text.trim(); + for (let rule of rules) { + let partial = rule(text); + if (partial !== null) { + let token = Object.assign(Object.assign({}, partial), { startOfLine }); + return text = text.slice(token.text.length), { text, token }; + } + } + throw new Error("Unexpected Token " + text); + } + advance() { + let next = Lexer.read(this.text); + return new Lexer(next.text, this.current, this.next, next.token); + } + } + function assertRootResult(result) { + if (result === void 0) + throw new Error("Unexpected undefined"); + if (result.type === "JsdocTypeKeyValue" || result.type === "JsdocTypeParameterList" || result.type === "JsdocTypeProperty" || result.type === "JsdocTypeReadonlyProperty" || result.type === "JsdocTypeObjectField" || result.type === "JsdocTypeJsdocObjectField" || result.type === "JsdocTypeIndexSignature" || result.type === "JsdocTypeMappedType" || result.type === "JsdocTypeTypeParameter") + throw new UnexpectedTypeError(result); + return result; + } + function assertPlainKeyValueOrRootResult(result) { + return result.type === "JsdocTypeKeyValue" ? assertPlainKeyValueResult(result) : assertRootResult(result); + } + function assertPlainKeyValueOrNameResult(result) { + return result.type === "JsdocTypeName" ? result : assertPlainKeyValueResult(result); + } + function assertPlainKeyValueResult(result) { + if (result.type !== "JsdocTypeKeyValue") + throw new UnexpectedTypeError(result); + return result; + } + function assertNumberOrVariadicNameResult(result) { + var _a; + if (result.type === "JsdocTypeVariadic") { + if (((_a = result.element) === null || _a === void 0 ? void 0 : _a.type) === "JsdocTypeName") + return result; + throw new UnexpectedTypeError(result); + } + if (result.type !== "JsdocTypeNumber" && result.type !== "JsdocTypeName") + throw new UnexpectedTypeError(result); + return result; + } + function assertArrayOrTupleResult(result) { + if (result.type === "JsdocTypeTuple" || result.type === "JsdocTypeGeneric" && result.meta.brackets === "square") + return result; + throw new UnexpectedTypeError(result); + } + function isSquaredProperty(result) { + return result.type === "JsdocTypeIndexSignature" || result.type === "JsdocTypeMappedType"; + } + var Precedence; + (function(Precedence2) { + Precedence2[Precedence2.ALL = 0] = "ALL", Precedence2[Precedence2.PARAMETER_LIST = 1] = "PARAMETER_LIST", Precedence2[Precedence2.OBJECT = 2] = "OBJECT", Precedence2[Precedence2.KEY_VALUE = 3] = "KEY_VALUE", Precedence2[Precedence2.INDEX_BRACKETS = 4] = "INDEX_BRACKETS", Precedence2[Precedence2.UNION = 5] = "UNION", Precedence2[Precedence2.INTERSECTION = 6] = "INTERSECTION", Precedence2[Precedence2.PREFIX = 7] = "PREFIX", Precedence2[Precedence2.INFIX = 8] = "INFIX", Precedence2[Precedence2.TUPLE = 9] = "TUPLE", Precedence2[Precedence2.SYMBOL = 10] = "SYMBOL", Precedence2[Precedence2.OPTIONAL = 11] = "OPTIONAL", Precedence2[Precedence2.NULLABLE = 12] = "NULLABLE", Precedence2[Precedence2.KEY_OF_TYPE_OF = 13] = "KEY_OF_TYPE_OF", Precedence2[Precedence2.FUNCTION = 14] = "FUNCTION", Precedence2[Precedence2.ARROW = 15] = "ARROW", Precedence2[Precedence2.ARRAY_BRACKETS = 16] = "ARRAY_BRACKETS", Precedence2[Precedence2.GENERIC = 17] = "GENERIC", Precedence2[Precedence2.NAME_PATH = 18] = "NAME_PATH", Precedence2[Precedence2.PARENTHESIS = 19] = "PARENTHESIS", Precedence2[Precedence2.SPECIAL_TYPES = 20] = "SPECIAL_TYPES"; + })(Precedence || (Precedence = {})); + class Parser { + constructor(grammar, textOrLexer, baseParser) { + this.grammar = grammar, typeof textOrLexer == "string" ? this._lexer = Lexer.create(textOrLexer) : this._lexer = textOrLexer, this.baseParser = baseParser; + } + get lexer() { + return this._lexer; + } + /** + * Parses a given string and throws an error if the parse ended before the end of the string. + */ + parse() { + let result = this.parseType(Precedence.ALL); + if (this.lexer.current.type !== "EOF") + throw new EarlyEndOfParseError(this.lexer.current); + return result; + } + /** + * Parses with the current lexer and asserts that the result is a {@link RootResult}. + */ + parseType(precedence) { + return assertRootResult(this.parseIntermediateType(precedence)); + } + /** + * The main parsing function. First it tries to parse the current state in the prefix step, and then it continues + * to parse the state in the infix step. + */ + parseIntermediateType(precedence) { + let result = this.tryParslets(null, precedence); + if (result === null) + throw new NoParsletFoundError(this.lexer.current); + return this.parseInfixIntermediateType(result, precedence); + } + /** + * In the infix parsing step the parser continues to parse the current state with all parslets until none returns + * a result. + */ + parseInfixIntermediateType(left, precedence) { + let result = this.tryParslets(left, precedence); + for (; result !== null; ) + left = result, result = this.tryParslets(left, precedence); + return left; + } + /** + * Tries to parse the current state with all parslets in the grammar and returns the first non null result. + */ + tryParslets(left, precedence) { + for (let parslet of this.grammar) { + let result = parslet(this, precedence, left); + if (result !== null) + return result; + } + return null; + } + /** + * If the given type equals the current type of the {@link Lexer} advance the lexer. Return true if the lexer was + * advanced. + */ + consume(types) { + return Array.isArray(types) || (types = [types]), types.includes(this.lexer.current.type) ? (this._lexer = this.lexer.advance(), !0) : !1; + } + acceptLexerState(parser) { + this._lexer = parser.lexer; + } + } + function isQuestionMarkUnknownType(next) { + return next === "}" || next === "EOF" || next === "|" || next === "," || next === ")" || next === ">"; + } + let nullableParslet = (parser, precedence, left) => { + let type = parser.lexer.current.type, next = parser.lexer.next.type; + return left == null && type === "?" && !isQuestionMarkUnknownType(next) || left != null && type === "?" ? (parser.consume("?"), left == null ? { + type: "JsdocTypeNullable", + element: parser.parseType(Precedence.NULLABLE), + meta: { + position: "prefix" + } + } : { + type: "JsdocTypeNullable", + element: assertRootResult(left), + meta: { + position: "suffix" + } + }) : null; + }; + function composeParslet(options) { + let parslet = (parser, curPrecedence, left) => { + let type = parser.lexer.current.type, next = parser.lexer.next.type; + if (left === null) { + if ("parsePrefix" in options && options.accept(type, next)) + return options.parsePrefix(parser); + } else if ("parseInfix" in options && options.precedence > curPrecedence && options.accept(type, next)) + return options.parseInfix(parser, left); + return null; + }; + return Object.defineProperty(parslet, "name", { + value: options.name + }), parslet; + } + let optionalParslet = composeParslet({ + name: "optionalParslet", + accept: (type) => type === "=", + precedence: Precedence.OPTIONAL, + parsePrefix: (parser) => (parser.consume("="), { + type: "JsdocTypeOptional", + element: parser.parseType(Precedence.OPTIONAL), + meta: { + position: "prefix" + } + }), + parseInfix: (parser, left) => (parser.consume("="), { + type: "JsdocTypeOptional", + element: assertRootResult(left), + meta: { + position: "suffix" + } + }) + }), numberParslet = composeParslet({ + name: "numberParslet", + accept: (type) => type === "Number", + parsePrefix: (parser) => { + let value = parseFloat(parser.lexer.current.text); + return parser.consume("Number"), { + type: "JsdocTypeNumber", + value + }; + } + }), parenthesisParslet = composeParslet({ + name: "parenthesisParslet", + accept: (type) => type === "(", + parsePrefix: (parser) => { + if (parser.consume("("), parser.consume(")")) + return { + type: "JsdocTypeParameterList", + elements: [] + }; + let result = parser.parseIntermediateType(Precedence.ALL); + if (!parser.consume(")")) + throw new Error("Unterminated parenthesis"); + return result.type === "JsdocTypeParameterList" ? result : result.type === "JsdocTypeKeyValue" ? { + type: "JsdocTypeParameterList", + elements: [result] + } : { + type: "JsdocTypeParenthesis", + element: assertRootResult(result) + }; + } + }), specialTypesParslet = composeParslet({ + name: "specialTypesParslet", + accept: (type, next) => type === "?" && isQuestionMarkUnknownType(next) || type === "null" || type === "undefined" || type === "*", + parsePrefix: (parser) => { + if (parser.consume("null")) + return { + type: "JsdocTypeNull" + }; + if (parser.consume("undefined")) + return { + type: "JsdocTypeUndefined" + }; + if (parser.consume("*")) + return { + type: "JsdocTypeAny" + }; + if (parser.consume("?")) + return { + type: "JsdocTypeUnknown" + }; + throw new Error("Unacceptable token: " + parser.lexer.current.text); + } + }), notNullableParslet = composeParslet({ + name: "notNullableParslet", + accept: (type) => type === "!", + precedence: Precedence.NULLABLE, + parsePrefix: (parser) => (parser.consume("!"), { + type: "JsdocTypeNotNullable", + element: parser.parseType(Precedence.NULLABLE), + meta: { + position: "prefix" + } + }), + parseInfix: (parser, left) => (parser.consume("!"), { + type: "JsdocTypeNotNullable", + element: assertRootResult(left), + meta: { + position: "suffix" + } + }) + }); + function createParameterListParslet({ allowTrailingComma }) { + return composeParslet({ + name: "parameterListParslet", + accept: (type) => type === ",", + precedence: Precedence.PARAMETER_LIST, + parseInfix: (parser, left) => { + let elements = [ + assertPlainKeyValueOrRootResult(left) + ]; + parser.consume(","); + do + try { + let next = parser.parseIntermediateType(Precedence.PARAMETER_LIST); + elements.push(assertPlainKeyValueOrRootResult(next)); + } catch (e) { + if (e instanceof NoParsletFoundError) + break; + throw e; + } + while (parser.consume(",")); + if (elements.length > 0 && elements.slice(0, -1).some((e) => e.type === "JsdocTypeVariadic")) + throw new Error("Only the last parameter may be a rest parameter"); + return { + type: "JsdocTypeParameterList", + elements + }; + } + }); + } + let genericParslet = composeParslet({ + name: "genericParslet", + accept: (type, next) => type === "<" || type === "." && next === "<", + precedence: Precedence.GENERIC, + parseInfix: (parser, left) => { + let dot = parser.consume("."); + parser.consume("<"); + let objects = [], infer = !1; + if (parser.consume("infer")) { + infer = !0; + let left2 = parser.parseIntermediateType(Precedence.SYMBOL); + if (left2.type !== "JsdocTypeName") + throw new UnexpectedTypeError(left2, "A typescript asserts always has to have a name on the left side."); + objects.push(left2); + } else + do + objects.push(parser.parseType(Precedence.PARAMETER_LIST)); + while (parser.consume(",")); + if (!parser.consume(">")) + throw new Error("Unterminated generic parameter list"); + return Object.assign(Object.assign({ type: "JsdocTypeGeneric", left: assertRootResult(left), elements: objects }, infer ? { infer: !0 } : {}), { meta: { + brackets: "angle", + dot + } }); + } + }), unionParslet = composeParslet({ + name: "unionParslet", + accept: (type) => type === "|", + precedence: Precedence.UNION, + parseInfix: (parser, left) => { + parser.consume("|"); + let elements = []; + do + elements.push(parser.parseType(Precedence.UNION)); + while (parser.consume("|")); + return { + type: "JsdocTypeUnion", + elements: [assertRootResult(left), ...elements] + }; + } + }), baseGrammar = [ + nullableParslet, + optionalParslet, + numberParslet, + parenthesisParslet, + specialTypesParslet, + notNullableParslet, + createParameterListParslet({ + allowTrailingComma: !0 + }), + genericParslet, + unionParslet, + optionalParslet + ]; + function createNamePathParslet({ allowSquareBracketsOnAnyType, allowJsdocNamePaths, pathGrammar: pathGrammar2 }) { + return function(parser, precedence, left) { + if (left == null || precedence >= Precedence.NAME_PATH) + return null; + let type = parser.lexer.current.type, next = parser.lexer.next.type; + if (!(type === "." && next !== "<" || type === "[" && (allowSquareBracketsOnAnyType || left.type === "JsdocTypeName") || allowJsdocNamePaths && (type === "~" || type === "#"))) + return null; + let pathType, brackets = !1; + parser.consume(".") ? pathType = "property" : parser.consume("[") ? (pathType = "property-brackets", brackets = !0) : parser.consume("~") ? pathType = "inner" : (parser.consume("#"), pathType = "instance"); + let pathParser = pathGrammar2 !== null ? new Parser(pathGrammar2, parser.lexer, parser) : parser, parsed = pathParser.parseIntermediateType(Precedence.NAME_PATH); + parser.acceptLexerState(pathParser); + let right; + switch (parsed.type) { + case "JsdocTypeName": + right = { + type: "JsdocTypeProperty", + value: parsed.value, + meta: { + quote: void 0 + } + }; + break; + case "JsdocTypeNumber": + right = { + type: "JsdocTypeProperty", + value: parsed.value.toString(10), + meta: { + quote: void 0 + } + }; + break; + case "JsdocTypeStringValue": + right = { + type: "JsdocTypeProperty", + value: parsed.value, + meta: { + quote: parsed.meta.quote + } + }; + break; + case "JsdocTypeSpecialNamePath": + if (parsed.specialType === "event") + right = parsed; + else + throw new UnexpectedTypeError(parsed, "Type 'JsdocTypeSpecialNamePath' is only allowed with specialType 'event'"); + break; + default: + throw new UnexpectedTypeError(parsed, "Expecting 'JsdocTypeName', 'JsdocTypeNumber', 'JsdocStringValue' or 'JsdocTypeSpecialNamePath'"); + } + if (brackets && !parser.consume("]")) { + let token = parser.lexer.current; + throw new Error(`Unterminated square brackets. Next token is '${token.type}' with text '${token.text}'`); + } + return { + type: "JsdocTypeNamePath", + left: assertRootResult(left), + right, + pathType + }; + }; + } + function createNameParslet({ allowedAdditionalTokens }) { + return composeParslet({ + name: "nameParslet", + accept: (type) => type === "Identifier" || type === "this" || type === "new" || allowedAdditionalTokens.includes(type), + parsePrefix: (parser) => { + let { type, text } = parser.lexer.current; + return parser.consume(type), { + type: "JsdocTypeName", + value: text + }; + } + }); + } + let stringValueParslet = composeParslet({ + name: "stringValueParslet", + accept: (type) => type === "StringValue", + parsePrefix: (parser) => { + let text = parser.lexer.current.text; + return parser.consume("StringValue"), { + type: "JsdocTypeStringValue", + value: text.slice(1, -1), + meta: { + quote: text[0] === "'" ? "single" : "double" + } + }; + } + }); + function createSpecialNamePathParslet({ pathGrammar: pathGrammar2, allowedTypes }) { + return composeParslet({ + name: "specialNamePathParslet", + accept: (type) => allowedTypes.includes(type), + parsePrefix: (parser) => { + let type = parser.lexer.current.type; + if (parser.consume(type), !parser.consume(":")) + return { + type: "JsdocTypeName", + value: type + }; + let result, token = parser.lexer.current; + if (parser.consume("StringValue")) + result = { + type: "JsdocTypeSpecialNamePath", + value: token.text.slice(1, -1), + specialType: type, + meta: { + quote: token.text[0] === "'" ? "single" : "double" + } + }; + else { + let value = "", allowed = ["Identifier", "@", "/"]; + for (; allowed.some((type2) => parser.consume(type2)); ) + value += token.text, token = parser.lexer.current; + result = { + type: "JsdocTypeSpecialNamePath", + value, + specialType: type, + meta: { + quote: void 0 + } + }; + } + let moduleParser = new Parser(pathGrammar2, parser.lexer, parser), moduleResult = moduleParser.parseInfixIntermediateType(result, Precedence.ALL); + return parser.acceptLexerState(moduleParser), assertRootResult(moduleResult); + } + }); + } + let basePathGrammar = [ + createNameParslet({ + allowedAdditionalTokens: ["external", "module"] + }), + stringValueParslet, + numberParslet, + createNamePathParslet({ + allowSquareBracketsOnAnyType: !1, + allowJsdocNamePaths: !0, + pathGrammar: null + }) + ], pathGrammar = [ + ...basePathGrammar, + createSpecialNamePathParslet({ + allowedTypes: ["event"], + pathGrammar: basePathGrammar + }) + ]; + function getParameters(value) { + let parameters; + if (value.type === "JsdocTypeParameterList") + parameters = value.elements; + else if (value.type === "JsdocTypeParenthesis") + parameters = [value.element]; + else + throw new UnexpectedTypeError(value); + return parameters.map((p) => assertPlainKeyValueOrRootResult(p)); + } + function getUnnamedParameters(value) { + let parameters = getParameters(value); + if (parameters.some((p) => p.type === "JsdocTypeKeyValue")) + throw new Error("No parameter should be named"); + return parameters; + } + function createFunctionParslet({ allowNamedParameters, allowNoReturnType, allowWithoutParenthesis, allowNewAsFunctionKeyword }) { + return composeParslet({ + name: "functionParslet", + accept: (type, next) => type === "function" || allowNewAsFunctionKeyword && type === "new" && next === "(", + parsePrefix: (parser) => { + let newKeyword = parser.consume("new"); + parser.consume("function"); + let hasParenthesis = parser.lexer.current.type === "("; + if (!hasParenthesis) { + if (!allowWithoutParenthesis) + throw new Error("function is missing parameter list"); + return { + type: "JsdocTypeName", + value: "function" + }; + } + let result = { + type: "JsdocTypeFunction", + parameters: [], + arrow: !1, + constructor: newKeyword, + parenthesis: hasParenthesis + }, value = parser.parseIntermediateType(Precedence.FUNCTION); + if (allowNamedParameters === void 0) + result.parameters = getUnnamedParameters(value); + else { + if (newKeyword && value.type === "JsdocTypeFunction" && value.arrow) + return result = value, result.constructor = !0, result; + result.parameters = getParameters(value); + for (let p of result.parameters) + if (p.type === "JsdocTypeKeyValue" && !allowNamedParameters.includes(p.key)) + throw new Error(`only allowed named parameters are ${allowNamedParameters.join(", ")} but got ${p.type}`); + } + if (parser.consume(":")) + result.returnType = parser.parseType(Precedence.PREFIX); + else if (!allowNoReturnType) + throw new Error("function is missing return type"); + return result; + } + }); + } + function createVariadicParslet({ allowPostfix, allowEnclosingBrackets }) { + return composeParslet({ + name: "variadicParslet", + accept: (type) => type === "...", + precedence: Precedence.PREFIX, + parsePrefix: (parser) => { + parser.consume("..."); + let brackets = allowEnclosingBrackets && parser.consume("["); + try { + let element = parser.parseType(Precedence.PREFIX); + if (brackets && !parser.consume("]")) + throw new Error("Unterminated variadic type. Missing ']'"); + return { + type: "JsdocTypeVariadic", + element: assertRootResult(element), + meta: { + position: "prefix", + squareBrackets: brackets + } + }; + } catch (e) { + if (e instanceof NoParsletFoundError) { + if (brackets) + throw new Error("Empty square brackets for variadic are not allowed."); + return { + type: "JsdocTypeVariadic", + meta: { + position: void 0, + squareBrackets: !1 + } + }; + } else + throw e; + } + }, + parseInfix: allowPostfix ? (parser, left) => (parser.consume("..."), { + type: "JsdocTypeVariadic", + element: assertRootResult(left), + meta: { + position: "suffix", + squareBrackets: !1 + } + }) : void 0 + }); + } + let symbolParslet = composeParslet({ + name: "symbolParslet", + accept: (type) => type === "(", + precedence: Precedence.SYMBOL, + parseInfix: (parser, left) => { + if (left.type !== "JsdocTypeName") + throw new Error("Symbol expects a name on the left side. (Reacting on '(')"); + parser.consume("("); + let result = { + type: "JsdocTypeSymbol", + value: left.value + }; + if (!parser.consume(")")) { + let next = parser.parseIntermediateType(Precedence.SYMBOL); + if (result.element = assertNumberOrVariadicNameResult(next), !parser.consume(")")) + throw new Error("Symbol does not end after value"); + } + return result; + } + }), arrayBracketsParslet = composeParslet({ + name: "arrayBracketsParslet", + precedence: Precedence.ARRAY_BRACKETS, + accept: (type, next) => type === "[" && next === "]", + parseInfix: (parser, left) => (parser.consume("["), parser.consume("]"), { + type: "JsdocTypeGeneric", + left: { + type: "JsdocTypeName", + value: "Array" + }, + elements: [ + assertRootResult(left) + ], + meta: { + brackets: "square", + dot: !1 + } + }) + }); + function createObjectParslet({ objectFieldGrammar: objectFieldGrammar2, allowKeyTypes }) { + return composeParslet({ + name: "objectParslet", + accept: (type) => type === "{", + parsePrefix: (parser) => { + parser.consume("{"); + let result = { + type: "JsdocTypeObject", + meta: { + separator: "comma" + }, + elements: [] + }; + if (!parser.consume("}")) { + let separator, fieldParser = new Parser(objectFieldGrammar2, parser.lexer, parser); + for (; ; ) { + fieldParser.acceptLexerState(parser); + let field = fieldParser.parseIntermediateType(Precedence.OBJECT); + parser.acceptLexerState(fieldParser), field === void 0 && allowKeyTypes && (field = parser.parseIntermediateType(Precedence.OBJECT)); + let optional = !1; + if (field.type === "JsdocTypeNullable" && (optional = !0, field = field.element), field.type === "JsdocTypeNumber" || field.type === "JsdocTypeName" || field.type === "JsdocTypeStringValue") { + let quote2; + field.type === "JsdocTypeStringValue" && (quote2 = field.meta.quote), result.elements.push({ + type: "JsdocTypeObjectField", + key: field.value.toString(), + right: void 0, + optional, + readonly: !1, + meta: { + quote: quote2 + } + }); + } else if (field.type === "JsdocTypeObjectField" || field.type === "JsdocTypeJsdocObjectField") + result.elements.push(field); + else + throw new UnexpectedTypeError(field); + if (parser.lexer.current.startOfLine) + separator = "linebreak", parser.consume(",") || parser.consume(";"); + else if (parser.consume(",")) + separator = "comma"; + else if (parser.consume(";")) + separator = "semicolon"; + else + break; + if (parser.lexer.current.type === "}") + break; + } + if (result.meta.separator = separator ?? "comma", separator === "linebreak" && (result.meta.propertyIndent = " "), !parser.consume("}")) + throw new Error("Unterminated record type. Missing '}'"); + } + return result; + } + }); + } + function createObjectFieldParslet({ allowSquaredProperties, allowKeyTypes, allowReadonly, allowOptional }) { + return composeParslet({ + name: "objectFieldParslet", + precedence: Precedence.KEY_VALUE, + accept: (type) => type === ":", + parseInfix: (parser, left) => { + var _a; + let optional = !1, readonlyProperty = !1; + allowOptional && left.type === "JsdocTypeNullable" && (optional = !0, left = left.element), allowReadonly && left.type === "JsdocTypeReadonlyProperty" && (readonlyProperty = !0, left = left.element); + let parentParser = (_a = parser.baseParser) !== null && _a !== void 0 ? _a : parser; + if (parentParser.acceptLexerState(parser), left.type === "JsdocTypeNumber" || left.type === "JsdocTypeName" || left.type === "JsdocTypeStringValue" || isSquaredProperty(left)) { + if (isSquaredProperty(left) && !allowSquaredProperties) + throw new UnexpectedTypeError(left); + parentParser.consume(":"); + let quote2; + left.type === "JsdocTypeStringValue" && (quote2 = left.meta.quote); + let right = parentParser.parseType(Precedence.KEY_VALUE); + return parser.acceptLexerState(parentParser), { + type: "JsdocTypeObjectField", + key: isSquaredProperty(left) ? left : left.value.toString(), + right, + optional, + readonly: readonlyProperty, + meta: { + quote: quote2 + } + }; + } else { + if (!allowKeyTypes) + throw new UnexpectedTypeError(left); + parentParser.consume(":"); + let right = parentParser.parseType(Precedence.KEY_VALUE); + return parser.acceptLexerState(parentParser), { + type: "JsdocTypeJsdocObjectField", + left: assertRootResult(left), + right + }; + } + } + }); + } + function createKeyValueParslet({ allowOptional, allowVariadic }) { + return composeParslet({ + name: "keyValueParslet", + precedence: Precedence.KEY_VALUE, + accept: (type) => type === ":", + parseInfix: (parser, left) => { + let optional = !1, variadic = !1; + if (allowOptional && left.type === "JsdocTypeNullable" && (optional = !0, left = left.element), allowVariadic && left.type === "JsdocTypeVariadic" && left.element !== void 0 && (variadic = !0, left = left.element), left.type !== "JsdocTypeName") + throw new UnexpectedTypeError(left); + parser.consume(":"); + let right = parser.parseType(Precedence.KEY_VALUE); + return { + type: "JsdocTypeKeyValue", + key: left.value, + right, + optional, + variadic + }; + } + }); + } + let jsdocBaseGrammar = [ + ...baseGrammar, + createFunctionParslet({ + allowWithoutParenthesis: !0, + allowNamedParameters: ["this", "new"], + allowNoReturnType: !0, + allowNewAsFunctionKeyword: !1 + }), + stringValueParslet, + createSpecialNamePathParslet({ + allowedTypes: ["module", "external", "event"], + pathGrammar + }), + createVariadicParslet({ + allowEnclosingBrackets: !0, + allowPostfix: !0 + }), + createNameParslet({ + allowedAdditionalTokens: ["keyof"] + }), + symbolParslet, + arrayBracketsParslet, + createNamePathParslet({ + allowSquareBracketsOnAnyType: !1, + allowJsdocNamePaths: !0, + pathGrammar + }) + ], jsdocGrammar = [ + ...jsdocBaseGrammar, + createObjectParslet({ + // jsdoc syntax allows full types as keys, so we need to pull in the full grammar here + // we leave out the object type deliberately + objectFieldGrammar: [ + createNameParslet({ + allowedAdditionalTokens: ["typeof", "module", "in"] + }), + createObjectFieldParslet({ + allowSquaredProperties: !1, + allowKeyTypes: !0, + allowOptional: !1, + allowReadonly: !1 + }), + ...jsdocBaseGrammar + ], + allowKeyTypes: !0 + }), + createKeyValueParslet({ + allowOptional: !0, + allowVariadic: !0 + }) + ], typeOfParslet = composeParslet({ + name: "typeOfParslet", + accept: (type) => type === "typeof", + parsePrefix: (parser) => (parser.consume("typeof"), { + type: "JsdocTypeTypeof", + element: parser.parseType(Precedence.KEY_OF_TYPE_OF) + }) + }), objectFieldGrammar$1 = [ + createNameParslet({ + allowedAdditionalTokens: ["typeof", "module", "keyof", "event", "external", "in"] + }), + nullableParslet, + optionalParslet, + stringValueParslet, + numberParslet, + createObjectFieldParslet({ + allowSquaredProperties: !1, + allowKeyTypes: !1, + allowOptional: !1, + allowReadonly: !1 + }) + ], closureGrammar = [ + ...baseGrammar, + createObjectParslet({ + allowKeyTypes: !1, + objectFieldGrammar: objectFieldGrammar$1 + }), + createNameParslet({ + allowedAdditionalTokens: ["event", "external", "in"] + }), + typeOfParslet, + createFunctionParslet({ + allowWithoutParenthesis: !1, + allowNamedParameters: ["this", "new"], + allowNoReturnType: !0, + allowNewAsFunctionKeyword: !1 + }), + createVariadicParslet({ + allowEnclosingBrackets: !1, + allowPostfix: !1 + }), + // additional name parslet is needed for some special cases + createNameParslet({ + allowedAdditionalTokens: ["keyof"] + }), + createSpecialNamePathParslet({ + allowedTypes: ["module"], + pathGrammar + }), + createNamePathParslet({ + allowSquareBracketsOnAnyType: !1, + allowJsdocNamePaths: !0, + pathGrammar + }), + createKeyValueParslet({ + allowOptional: !1, + allowVariadic: !1 + }), + symbolParslet + ], assertsParslet = composeParslet({ + name: "assertsParslet", + accept: (type) => type === "asserts", + parsePrefix: (parser) => { + parser.consume("asserts"); + let left = parser.parseIntermediateType(Precedence.SYMBOL); + if (left.type !== "JsdocTypeName") + throw new UnexpectedTypeError(left, "A typescript asserts always has to have a name on the left side."); + return parser.consume("is") ? { + type: "JsdocTypeAsserts", + left, + right: assertRootResult(parser.parseIntermediateType(Precedence.INFIX)) + } : { + type: "JsdocTypeAssertsPlain", + element: left + }; + } + }); + function createTupleParslet({ allowQuestionMark }) { + return composeParslet({ + name: "tupleParslet", + accept: (type) => type === "[", + parsePrefix: (parser) => { + parser.consume("["); + let result = { + type: "JsdocTypeTuple", + elements: [] + }; + if (parser.consume("]")) + return result; + let typeList = parser.parseIntermediateType(Precedence.ALL); + if (typeList.type === "JsdocTypeParameterList" ? typeList.elements[0].type === "JsdocTypeKeyValue" ? result.elements = typeList.elements.map(assertPlainKeyValueResult) : result.elements = typeList.elements.map(assertRootResult) : typeList.type === "JsdocTypeKeyValue" ? result.elements = [assertPlainKeyValueResult(typeList)] : result.elements = [assertRootResult(typeList)], !parser.consume("]")) + throw new Error("Unterminated '['"); + if (result.elements.some((e) => e.type === "JsdocTypeUnknown")) + throw new Error("Question mark in tuple not allowed"); + return result; + } + }); + } + let keyOfParslet = composeParslet({ + name: "keyOfParslet", + accept: (type) => type === "keyof", + parsePrefix: (parser) => (parser.consume("keyof"), { + type: "JsdocTypeKeyof", + element: assertRootResult(parser.parseType(Precedence.KEY_OF_TYPE_OF)) + }) + }), importParslet = composeParslet({ + name: "importParslet", + accept: (type) => type === "import", + parsePrefix: (parser) => { + if (parser.consume("import"), !parser.consume("(")) + throw new Error("Missing parenthesis after import keyword"); + let path = parser.parseType(Precedence.PREFIX); + if (path.type !== "JsdocTypeStringValue") + throw new Error("Only string values are allowed as paths for imports"); + if (!parser.consume(")")) + throw new Error("Missing closing parenthesis after import keyword"); + return { + type: "JsdocTypeImport", + element: path + }; + } + }), readonlyPropertyParslet = composeParslet({ + name: "readonlyPropertyParslet", + accept: (type) => type === "readonly", + parsePrefix: (parser) => (parser.consume("readonly"), { + type: "JsdocTypeReadonlyProperty", + element: parser.parseIntermediateType(Precedence.KEY_VALUE) + }) + }), arrowFunctionParslet = composeParslet({ + name: "arrowFunctionParslet", + precedence: Precedence.ARROW, + accept: (type) => type === "=>", + parseInfix: (parser, left) => (parser.consume("=>"), { + type: "JsdocTypeFunction", + parameters: getParameters(left).map(assertPlainKeyValueOrNameResult), + arrow: !0, + constructor: !1, + parenthesis: !0, + returnType: parser.parseType(Precedence.OBJECT) + }) + }), genericArrowFunctionParslet = composeParslet({ + name: "genericArrowFunctionParslet", + accept: (type) => type === "<", + parsePrefix: (parser) => { + let typeParameters = []; + parser.consume("<"); + do { + let defaultValue, name = parser.parseIntermediateType(Precedence.SYMBOL); + if (name.type === "JsdocTypeOptional" && (name = name.element, defaultValue = parser.parseType(Precedence.SYMBOL)), name.type !== "JsdocTypeName") + throw new UnexpectedTypeError(name); + let constraint; + parser.consume("extends") && (constraint = parser.parseType(Precedence.SYMBOL), constraint.type === "JsdocTypeOptional" && (constraint = constraint.element, defaultValue = parser.parseType(Precedence.SYMBOL))); + let typeParameter = { + type: "JsdocTypeTypeParameter", + name + }; + if (constraint !== void 0 && (typeParameter.constraint = constraint), defaultValue !== void 0 && (typeParameter.defaultValue = defaultValue), typeParameters.push(typeParameter), parser.consume(">")) + break; + } while (parser.consume(",")); + let functionBase = parser.parseIntermediateType(Precedence.SYMBOL); + return functionBase.typeParameters = typeParameters, functionBase; + } + }), intersectionParslet = composeParslet({ + name: "intersectionParslet", + accept: (type) => type === "&", + precedence: Precedence.INTERSECTION, + parseInfix: (parser, left) => { + parser.consume("&"); + let elements = []; + do + elements.push(parser.parseType(Precedence.INTERSECTION)); + while (parser.consume("&")); + return { + type: "JsdocTypeIntersection", + elements: [assertRootResult(left), ...elements] + }; + } + }), predicateParslet = composeParslet({ + name: "predicateParslet", + precedence: Precedence.INFIX, + accept: (type) => type === "is", + parseInfix: (parser, left) => { + if (left.type !== "JsdocTypeName") + throw new UnexpectedTypeError(left, "A typescript predicate always has to have a name on the left side."); + return parser.consume("is"), { + type: "JsdocTypePredicate", + left, + right: assertRootResult(parser.parseIntermediateType(Precedence.INFIX)) + }; + } + }), objectSquaredPropertyParslet = composeParslet({ + name: "objectSquareBracketPropertyParslet", + accept: (type) => type === "[", + parsePrefix: (parser) => { + if (parser.baseParser === void 0) + throw new Error("Only allowed inside object grammar"); + parser.consume("["); + let key = parser.lexer.current.text; + parser.consume("Identifier"); + let result; + if (parser.consume(":")) { + let parentParser = parser.baseParser; + parentParser.acceptLexerState(parser), result = { + type: "JsdocTypeIndexSignature", + key, + right: parentParser.parseType(Precedence.INDEX_BRACKETS) + }, parser.acceptLexerState(parentParser); + } else if (parser.consume("in")) { + let parentParser = parser.baseParser; + parentParser.acceptLexerState(parser), result = { + type: "JsdocTypeMappedType", + key, + right: parentParser.parseType(Precedence.ARRAY_BRACKETS) + }, parser.acceptLexerState(parentParser); + } else + throw new Error("Missing ':' or 'in' inside square bracketed property."); + if (!parser.consume("]")) + throw new Error("Unterminated square brackets"); + return result; + } + }), readonlyArrayParslet = composeParslet({ + name: "readonlyArrayParslet", + accept: (type) => type === "readonly", + parsePrefix: (parser) => (parser.consume("readonly"), { + type: "JsdocTypeReadonlyArray", + element: assertArrayOrTupleResult(parser.parseIntermediateType(Precedence.ALL)) + }) + }), conditionalParslet = composeParslet({ + name: "conditionalParslet", + precedence: Precedence.INFIX, + accept: (type) => type === "extends", + parseInfix: (parser, left) => { + parser.consume("extends"); + let extendsType = parser.parseType(Precedence.KEY_OF_TYPE_OF).element, trueType = parser.parseType(Precedence.INFIX); + return parser.consume(":"), { + type: "JsdocTypeConditional", + checksType: assertRootResult(left), + extendsType, + trueType, + falseType: parser.parseType(Precedence.INFIX) + }; + } + }), objectFieldGrammar = [ + readonlyPropertyParslet, + createNameParslet({ + allowedAdditionalTokens: ["typeof", "module", "keyof", "event", "external", "in"] + }), + nullableParslet, + optionalParslet, + stringValueParslet, + numberParslet, + createObjectFieldParslet({ + allowSquaredProperties: !0, + allowKeyTypes: !1, + allowOptional: !0, + allowReadonly: !0 + }), + objectSquaredPropertyParslet + ], typescriptGrammar = [ + ...baseGrammar, + createObjectParslet({ + allowKeyTypes: !1, + objectFieldGrammar + }), + readonlyArrayParslet, + typeOfParslet, + keyOfParslet, + importParslet, + stringValueParslet, + createFunctionParslet({ + allowWithoutParenthesis: !0, + allowNoReturnType: !1, + allowNamedParameters: ["this", "new", "args"], + allowNewAsFunctionKeyword: !0 + }), + createTupleParslet({ + allowQuestionMark: !1 + }), + createVariadicParslet({ + allowEnclosingBrackets: !1, + allowPostfix: !1 + }), + assertsParslet, + conditionalParslet, + createNameParslet({ + allowedAdditionalTokens: ["event", "external", "in"] + }), + createSpecialNamePathParslet({ + allowedTypes: ["module"], + pathGrammar + }), + arrayBracketsParslet, + arrowFunctionParslet, + genericArrowFunctionParslet, + createNamePathParslet({ + allowSquareBracketsOnAnyType: !0, + allowJsdocNamePaths: !1, + pathGrammar + }), + intersectionParslet, + predicateParslet, + createKeyValueParslet({ + allowVariadic: !0, + allowOptional: !0 + }) + ]; + function parse3(expression, mode) { + switch (mode) { + case "closure": + return new Parser(closureGrammar, expression).parse(); + case "jsdoc": + return new Parser(jsdocGrammar, expression).parse(); + case "typescript": + return new Parser(typescriptGrammar, expression).parse(); + } + } + function tryParse(expression, modes = ["typescript", "closure", "jsdoc"]) { + let error; + for (let mode of modes) + try { + return parse3(expression, mode); + } catch (e) { + error = e; + } + throw error; + } + function transform(rules2, parseResult) { + let rule = rules2[parseResult.type]; + if (rule === void 0) + throw new Error(`In this set of transform rules exists no rule for type ${parseResult.type}.`); + return rule(parseResult, (aParseResult) => transform(rules2, aParseResult)); + } + function notAvailableTransform(parseResult) { + throw new Error("This transform is not available. Are you trying the correct parsing mode?"); + } + function extractSpecialParams(source) { + let result = { + params: [] + }; + for (let param of source.parameters) + param.type === "JsdocTypeKeyValue" ? param.key === "this" ? result.this = param.right : param.key === "new" ? result.new = param.right : result.params.push(param) : result.params.push(param); + return result; + } + function applyPosition(position, target, value) { + return position === "prefix" ? value + target : target + value; + } + function quote(value, quote2) { + switch (quote2) { + case "double": + return `"${value}"`; + case "single": + return `'${value}'`; + case void 0: + return value; + } + } + function stringifyRules2() { + return { + JsdocTypeParenthesis: (result, transform2) => `(${result.element !== void 0 ? transform2(result.element) : ""})`, + JsdocTypeKeyof: (result, transform2) => `keyof ${transform2(result.element)}`, + JsdocTypeFunction: (result, transform2) => { + var _a; + if (result.arrow) { + if (result.returnType === void 0) + throw new Error("Arrow function needs a return type."); + let stringified = `${result.typeParameters !== void 0 ? `<${(_a = result.typeParameters.map(transform2).join(", ")) !== null && _a !== void 0 ? _a : ""}>` : ""}(${result.parameters.map(transform2).join(", ")}) => ${transform2(result.returnType)}`; + return result.constructor && (stringified = "new " + stringified), stringified; + } else { + let stringified = result.constructor ? "new" : "function"; + return result.parenthesis && (stringified += `(${result.parameters.map(transform2).join(", ")})`, result.returnType !== void 0 && (stringified += `: ${transform2(result.returnType)}`)), stringified; + } + }, + JsdocTypeName: (result) => result.value, + JsdocTypeTuple: (result, transform2) => `[${result.elements.map(transform2).join(", ")}]`, + JsdocTypeVariadic: (result, transform2) => result.meta.position === void 0 ? "..." : applyPosition(result.meta.position, transform2(result.element), "..."), + JsdocTypeNamePath: (result, transform2) => { + let left = transform2(result.left), right = transform2(result.right); + switch (result.pathType) { + case "inner": + return `${left}~${right}`; + case "instance": + return `${left}#${right}`; + case "property": + return `${left}.${right}`; + case "property-brackets": + return `${left}[${right}]`; + } + }, + JsdocTypeStringValue: (result) => quote(result.value, result.meta.quote), + JsdocTypeAny: () => "*", + JsdocTypeGeneric: (result, transform2) => { + if (result.meta.brackets === "square") { + let element = result.elements[0], transformed = transform2(element); + return element.type === "JsdocTypeUnion" || element.type === "JsdocTypeIntersection" ? `(${transformed})[]` : `${transformed}[]`; + } else + return `${transform2(result.left)}${result.meta.dot ? "." : ""}<${result.infer === !0 ? "infer " : ""}${result.elements.map(transform2).join(", ")}>`; + }, + JsdocTypeImport: (result, transform2) => `import(${transform2(result.element)})`, + JsdocTypeObjectField: (result, transform2) => { + let text = ""; + return result.readonly && (text += "readonly "), typeof result.key == "string" ? text += quote(result.key, result.meta.quote) : text += transform2(result.key), result.optional && (text += "?"), result.right === void 0 ? text : text + `: ${transform2(result.right)}`; + }, + JsdocTypeJsdocObjectField: (result, transform2) => `${transform2(result.left)}: ${transform2(result.right)}`, + JsdocTypeKeyValue: (result, transform2) => { + let text = result.key; + return result.optional && (text += "?"), result.variadic && (text = "..." + text), result.right === void 0 ? text : text + `: ${transform2(result.right)}`; + }, + JsdocTypeSpecialNamePath: (result) => `${result.specialType}:${quote(result.value, result.meta.quote)}`, + JsdocTypeNotNullable: (result, transform2) => applyPosition(result.meta.position, transform2(result.element), "!"), + JsdocTypeNull: () => "null", + JsdocTypeNullable: (result, transform2) => applyPosition(result.meta.position, transform2(result.element), "?"), + JsdocTypeNumber: (result) => result.value.toString(), + JsdocTypeObject: (result, transform2) => { + var _a, _b; + return `{${(result.meta.separator === "linebreak" && result.elements.length > 1 ? ` +` + ((_a = result.meta.propertyIndent) !== null && _a !== void 0 ? _a : "") : "") + result.elements.map(transform2).join(result.meta.separator === "comma" ? ", " : result.meta.separator === "linebreak" ? ` +` + ((_b = result.meta.propertyIndent) !== null && _b !== void 0 ? _b : "") : "; ") + (result.meta.separator === "linebreak" && result.elements.length > 1 ? ` +` : "")}}`; + }, + JsdocTypeOptional: (result, transform2) => applyPosition(result.meta.position, transform2(result.element), "="), + JsdocTypeSymbol: (result, transform2) => `${result.value}(${result.element !== void 0 ? transform2(result.element) : ""})`, + JsdocTypeTypeof: (result, transform2) => `typeof ${transform2(result.element)}`, + JsdocTypeUndefined: () => "undefined", + JsdocTypeUnion: (result, transform2) => result.elements.map(transform2).join(" | "), + JsdocTypeUnknown: () => "?", + JsdocTypeIntersection: (result, transform2) => result.elements.map(transform2).join(" & "), + JsdocTypeProperty: (result) => quote(result.value, result.meta.quote), + JsdocTypePredicate: (result, transform2) => `${transform2(result.left)} is ${transform2(result.right)}`, + JsdocTypeIndexSignature: (result, transform2) => `[${result.key}: ${transform2(result.right)}]`, + JsdocTypeMappedType: (result, transform2) => `[${result.key} in ${transform2(result.right)}]`, + JsdocTypeAsserts: (result, transform2) => `asserts ${transform2(result.left)} is ${transform2(result.right)}`, + JsdocTypeReadonlyArray: (result, transform2) => `readonly ${transform2(result.element)}`, + JsdocTypeAssertsPlain: (result, transform2) => `asserts ${transform2(result.element)}`, + JsdocTypeConditional: (result, transform2) => `${transform2(result.checksType)} extends ${transform2(result.extendsType)} ? ${transform2(result.trueType)} : ${transform2(result.falseType)}`, + JsdocTypeTypeParameter: (result, transform2) => `${transform2(result.name)}${result.constraint !== void 0 ? ` extends ${transform2(result.constraint)}` : ""}${result.defaultValue !== void 0 ? ` = ${transform2(result.defaultValue)}` : ""}` + }; + } + let storedStringifyRules = stringifyRules2(); + function stringify2(result) { + return transform(storedStringifyRules, result); + } + let reservedWords = [ + "null", + "true", + "false", + "break", + "case", + "catch", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "export", + "extends", + "finally", + "for", + "function", + "if", + "import", + "in", + "instanceof", + "new", + "return", + "super", + "switch", + "this", + "throw", + "try", + "typeof", + "var", + "void", + "while", + "with", + "yield" + ]; + function makeName(value) { + let result = { + type: "NameExpression", + name: value + }; + return reservedWords.includes(value) && (result.reservedWord = !0), result; + } + let catharsisTransformRules = { + JsdocTypeOptional: (result, transform2) => { + let transformed = transform2(result.element); + return transformed.optional = !0, transformed; + }, + JsdocTypeNullable: (result, transform2) => { + let transformed = transform2(result.element); + return transformed.nullable = !0, transformed; + }, + JsdocTypeNotNullable: (result, transform2) => { + let transformed = transform2(result.element); + return transformed.nullable = !1, transformed; + }, + JsdocTypeVariadic: (result, transform2) => { + if (result.element === void 0) + throw new Error("dots without value are not allowed in catharsis mode"); + let transformed = transform2(result.element); + return transformed.repeatable = !0, transformed; + }, + JsdocTypeAny: () => ({ + type: "AllLiteral" + }), + JsdocTypeNull: () => ({ + type: "NullLiteral" + }), + JsdocTypeStringValue: (result) => makeName(quote(result.value, result.meta.quote)), + JsdocTypeUndefined: () => ({ + type: "UndefinedLiteral" + }), + JsdocTypeUnknown: () => ({ + type: "UnknownLiteral" + }), + JsdocTypeFunction: (result, transform2) => { + let params = extractSpecialParams(result), transformed = { + type: "FunctionType", + params: params.params.map(transform2) + }; + return params.this !== void 0 && (transformed.this = transform2(params.this)), params.new !== void 0 && (transformed.new = transform2(params.new)), result.returnType !== void 0 && (transformed.result = transform2(result.returnType)), transformed; + }, + JsdocTypeGeneric: (result, transform2) => ({ + type: "TypeApplication", + applications: result.elements.map((o) => transform2(o)), + expression: transform2(result.left) + }), + JsdocTypeSpecialNamePath: (result) => makeName(result.specialType + ":" + quote(result.value, result.meta.quote)), + JsdocTypeName: (result) => result.value !== "function" ? makeName(result.value) : { + type: "FunctionType", + params: [] + }, + JsdocTypeNumber: (result) => makeName(result.value.toString()), + JsdocTypeObject: (result, transform2) => { + let transformed = { + type: "RecordType", + fields: [] + }; + for (let field of result.elements) + field.type !== "JsdocTypeObjectField" && field.type !== "JsdocTypeJsdocObjectField" ? transformed.fields.push({ + type: "FieldType", + key: transform2(field), + value: void 0 + }) : transformed.fields.push(transform2(field)); + return transformed; + }, + JsdocTypeObjectField: (result, transform2) => { + if (typeof result.key != "string") + throw new Error("Index signatures and mapped types are not supported"); + return { + type: "FieldType", + key: makeName(quote(result.key, result.meta.quote)), + value: result.right === void 0 ? void 0 : transform2(result.right) + }; + }, + JsdocTypeJsdocObjectField: (result, transform2) => ({ + type: "FieldType", + key: transform2(result.left), + value: transform2(result.right) + }), + JsdocTypeUnion: (result, transform2) => ({ + type: "TypeUnion", + elements: result.elements.map((e) => transform2(e)) + }), + JsdocTypeKeyValue: (result, transform2) => ({ + type: "FieldType", + key: makeName(result.key), + value: result.right === void 0 ? void 0 : transform2(result.right) + }), + JsdocTypeNamePath: (result, transform2) => { + let leftResult = transform2(result.left), rightValue; + result.right.type === "JsdocTypeSpecialNamePath" ? rightValue = transform2(result.right).name : rightValue = quote(result.right.value, result.right.meta.quote); + let joiner = result.pathType === "inner" ? "~" : result.pathType === "instance" ? "#" : "."; + return makeName(`${leftResult.name}${joiner}${rightValue}`); + }, + JsdocTypeSymbol: (result) => { + let value = "", element = result.element, trailingDots = !1; + return element?.type === "JsdocTypeVariadic" && (element.meta.position === "prefix" ? value = "..." : trailingDots = !0, element = element.element), element?.type === "JsdocTypeName" ? value += element.value : element?.type === "JsdocTypeNumber" && (value += element.value.toString()), trailingDots && (value += "..."), makeName(`${result.value}(${value})`); + }, + JsdocTypeParenthesis: (result, transform2) => transform2(assertRootResult(result.element)), + JsdocTypeMappedType: notAvailableTransform, + JsdocTypeIndexSignature: notAvailableTransform, + JsdocTypeImport: notAvailableTransform, + JsdocTypeKeyof: notAvailableTransform, + JsdocTypeTuple: notAvailableTransform, + JsdocTypeTypeof: notAvailableTransform, + JsdocTypeIntersection: notAvailableTransform, + JsdocTypeProperty: notAvailableTransform, + JsdocTypePredicate: notAvailableTransform, + JsdocTypeAsserts: notAvailableTransform, + JsdocTypeReadonlyArray: notAvailableTransform, + JsdocTypeAssertsPlain: notAvailableTransform, + JsdocTypeConditional: notAvailableTransform, + JsdocTypeTypeParameter: notAvailableTransform + }; + function catharsisTransform(result) { + return transform(catharsisTransformRules, result); + } + function getQuoteStyle(quote2) { + switch (quote2) { + case void 0: + return "none"; + case "single": + return "single"; + case "double": + return "double"; + } + } + function getMemberType(type) { + switch (type) { + case "inner": + return "INNER_MEMBER"; + case "instance": + return "INSTANCE_MEMBER"; + case "property": + return "MEMBER"; + case "property-brackets": + return "MEMBER"; + } + } + function nestResults(type, results) { + return results.length === 2 ? { + type, + left: results[0], + right: results[1] + } : { + type, + left: results[0], + right: nestResults(type, results.slice(1)) + }; + } + let jtpRules = { + JsdocTypeOptional: (result, transform2) => ({ + type: "OPTIONAL", + value: transform2(result.element), + meta: { + syntax: result.meta.position === "prefix" ? "PREFIX_EQUAL_SIGN" : "SUFFIX_EQUALS_SIGN" + } + }), + JsdocTypeNullable: (result, transform2) => ({ + type: "NULLABLE", + value: transform2(result.element), + meta: { + syntax: result.meta.position === "prefix" ? "PREFIX_QUESTION_MARK" : "SUFFIX_QUESTION_MARK" + } + }), + JsdocTypeNotNullable: (result, transform2) => ({ + type: "NOT_NULLABLE", + value: transform2(result.element), + meta: { + syntax: result.meta.position === "prefix" ? "PREFIX_BANG" : "SUFFIX_BANG" + } + }), + JsdocTypeVariadic: (result, transform2) => { + let transformed = { + type: "VARIADIC", + meta: { + syntax: result.meta.position === "prefix" ? "PREFIX_DOTS" : result.meta.position === "suffix" ? "SUFFIX_DOTS" : "ONLY_DOTS" + } + }; + return result.element !== void 0 && (transformed.value = transform2(result.element)), transformed; + }, + JsdocTypeName: (result) => ({ + type: "NAME", + name: result.value + }), + JsdocTypeTypeof: (result, transform2) => ({ + type: "TYPE_QUERY", + name: transform2(result.element) + }), + JsdocTypeTuple: (result, transform2) => ({ + type: "TUPLE", + entries: result.elements.map(transform2) + }), + JsdocTypeKeyof: (result, transform2) => ({ + type: "KEY_QUERY", + value: transform2(result.element) + }), + JsdocTypeImport: (result) => ({ + type: "IMPORT", + path: { + type: "STRING_VALUE", + quoteStyle: getQuoteStyle(result.element.meta.quote), + string: result.element.value + } + }), + JsdocTypeUndefined: () => ({ + type: "NAME", + name: "undefined" + }), + JsdocTypeAny: () => ({ + type: "ANY" + }), + JsdocTypeFunction: (result, transform2) => { + let specialParams = extractSpecialParams(result), transformed = { + type: result.arrow ? "ARROW" : "FUNCTION", + params: specialParams.params.map((param) => { + if (param.type === "JsdocTypeKeyValue") { + if (param.right === void 0) + throw new Error("Function parameter without ':' is not expected to be 'KEY_VALUE'"); + return { + type: "NAMED_PARAMETER", + name: param.key, + typeName: transform2(param.right) + }; + } else + return transform2(param); + }), + new: null, + returns: null + }; + return specialParams.this !== void 0 ? transformed.this = transform2(specialParams.this) : result.arrow || (transformed.this = null), specialParams.new !== void 0 && (transformed.new = transform2(specialParams.new)), result.returnType !== void 0 && (transformed.returns = transform2(result.returnType)), transformed; + }, + JsdocTypeGeneric: (result, transform2) => { + let transformed = { + type: "GENERIC", + subject: transform2(result.left), + objects: result.elements.map(transform2), + meta: { + syntax: result.meta.brackets === "square" ? "SQUARE_BRACKET" : result.meta.dot ? "ANGLE_BRACKET_WITH_DOT" : "ANGLE_BRACKET" + } + }; + return result.meta.brackets === "square" && result.elements[0].type === "JsdocTypeFunction" && !result.elements[0].parenthesis && (transformed.objects[0] = { + type: "NAME", + name: "function" + }), transformed; + }, + JsdocTypeObjectField: (result, transform2) => { + if (typeof result.key != "string") + throw new Error("Index signatures and mapped types are not supported"); + if (result.right === void 0) + return { + type: "RECORD_ENTRY", + key: result.key, + quoteStyle: getQuoteStyle(result.meta.quote), + value: null, + readonly: !1 + }; + let right = transform2(result.right); + return result.optional && (right = { + type: "OPTIONAL", + value: right, + meta: { + syntax: "SUFFIX_KEY_QUESTION_MARK" + } + }), { + type: "RECORD_ENTRY", + key: result.key.toString(), + quoteStyle: getQuoteStyle(result.meta.quote), + value: right, + readonly: !1 + }; + }, + JsdocTypeJsdocObjectField: () => { + throw new Error("Keys may not be typed in jsdoctypeparser."); + }, + JsdocTypeKeyValue: (result, transform2) => { + if (result.right === void 0) + return { + type: "RECORD_ENTRY", + key: result.key, + quoteStyle: "none", + value: null, + readonly: !1 + }; + let right = transform2(result.right); + return result.optional && (right = { + type: "OPTIONAL", + value: right, + meta: { + syntax: "SUFFIX_KEY_QUESTION_MARK" + } + }), { + type: "RECORD_ENTRY", + key: result.key, + quoteStyle: "none", + value: right, + readonly: !1 + }; + }, + JsdocTypeObject: (result, transform2) => { + let entries = []; + for (let field of result.elements) + (field.type === "JsdocTypeObjectField" || field.type === "JsdocTypeJsdocObjectField") && entries.push(transform2(field)); + return { + type: "RECORD", + entries + }; + }, + JsdocTypeSpecialNamePath: (result) => { + if (result.specialType !== "module") + throw new Error(`jsdoctypeparser does not support type ${result.specialType} at this point.`); + return { + type: "MODULE", + value: { + type: "FILE_PATH", + quoteStyle: getQuoteStyle(result.meta.quote), + path: result.value + } + }; + }, + JsdocTypeNamePath: (result, transform2) => { + let hasEventPrefix = !1, name, quoteStyle; + result.right.type === "JsdocTypeSpecialNamePath" && result.right.specialType === "event" ? (hasEventPrefix = !0, name = result.right.value, quoteStyle = getQuoteStyle(result.right.meta.quote)) : (name = result.right.value, quoteStyle = getQuoteStyle(result.right.meta.quote)); + let transformed = { + type: getMemberType(result.pathType), + owner: transform2(result.left), + name, + quoteStyle, + hasEventPrefix + }; + if (transformed.owner.type === "MODULE") { + let tModule = transformed.owner; + return transformed.owner = transformed.owner.value, tModule.value = transformed, tModule; + } else + return transformed; + }, + JsdocTypeUnion: (result, transform2) => nestResults("UNION", result.elements.map(transform2)), + JsdocTypeParenthesis: (result, transform2) => ({ + type: "PARENTHESIS", + value: transform2(assertRootResult(result.element)) + }), + JsdocTypeNull: () => ({ + type: "NAME", + name: "null" + }), + JsdocTypeUnknown: () => ({ + type: "UNKNOWN" + }), + JsdocTypeStringValue: (result) => ({ + type: "STRING_VALUE", + quoteStyle: getQuoteStyle(result.meta.quote), + string: result.value + }), + JsdocTypeIntersection: (result, transform2) => nestResults("INTERSECTION", result.elements.map(transform2)), + JsdocTypeNumber: (result) => ({ + type: "NUMBER_VALUE", + number: result.value.toString() + }), + JsdocTypeSymbol: notAvailableTransform, + JsdocTypeProperty: notAvailableTransform, + JsdocTypePredicate: notAvailableTransform, + JsdocTypeMappedType: notAvailableTransform, + JsdocTypeIndexSignature: notAvailableTransform, + JsdocTypeAsserts: notAvailableTransform, + JsdocTypeReadonlyArray: notAvailableTransform, + JsdocTypeAssertsPlain: notAvailableTransform, + JsdocTypeConditional: notAvailableTransform, + JsdocTypeTypeParameter: notAvailableTransform + }; + function jtpTransform(result) { + return transform(jtpRules, result); + } + function identityTransformRules() { + return { + JsdocTypeIntersection: (result, transform2) => ({ + type: "JsdocTypeIntersection", + elements: result.elements.map(transform2) + }), + JsdocTypeGeneric: (result, transform2) => ({ + type: "JsdocTypeGeneric", + left: transform2(result.left), + elements: result.elements.map(transform2), + meta: { + dot: result.meta.dot, + brackets: result.meta.brackets + } + }), + JsdocTypeNullable: (result) => result, + JsdocTypeUnion: (result, transform2) => ({ + type: "JsdocTypeUnion", + elements: result.elements.map(transform2) + }), + JsdocTypeUnknown: (result) => result, + JsdocTypeUndefined: (result) => result, + JsdocTypeTypeof: (result, transform2) => ({ + type: "JsdocTypeTypeof", + element: transform2(result.element) + }), + JsdocTypeSymbol: (result, transform2) => { + let transformed = { + type: "JsdocTypeSymbol", + value: result.value + }; + return result.element !== void 0 && (transformed.element = transform2(result.element)), transformed; + }, + JsdocTypeOptional: (result, transform2) => ({ + type: "JsdocTypeOptional", + element: transform2(result.element), + meta: { + position: result.meta.position + } + }), + JsdocTypeObject: (result, transform2) => ({ + type: "JsdocTypeObject", + meta: { + separator: "comma" + }, + elements: result.elements.map(transform2) + }), + JsdocTypeNumber: (result) => result, + JsdocTypeNull: (result) => result, + JsdocTypeNotNullable: (result, transform2) => ({ + type: "JsdocTypeNotNullable", + element: transform2(result.element), + meta: { + position: result.meta.position + } + }), + JsdocTypeSpecialNamePath: (result) => result, + JsdocTypeObjectField: (result, transform2) => ({ + type: "JsdocTypeObjectField", + key: result.key, + right: result.right === void 0 ? void 0 : transform2(result.right), + optional: result.optional, + readonly: result.readonly, + meta: result.meta + }), + JsdocTypeJsdocObjectField: (result, transform2) => ({ + type: "JsdocTypeJsdocObjectField", + left: transform2(result.left), + right: transform2(result.right) + }), + JsdocTypeKeyValue: (result, transform2) => ({ + type: "JsdocTypeKeyValue", + key: result.key, + right: result.right === void 0 ? void 0 : transform2(result.right), + optional: result.optional, + variadic: result.variadic + }), + JsdocTypeImport: (result, transform2) => ({ + type: "JsdocTypeImport", + element: transform2(result.element) + }), + JsdocTypeAny: (result) => result, + JsdocTypeStringValue: (result) => result, + JsdocTypeNamePath: (result) => result, + JsdocTypeVariadic: (result, transform2) => { + let transformed = { + type: "JsdocTypeVariadic", + meta: { + position: result.meta.position, + squareBrackets: result.meta.squareBrackets + } + }; + return result.element !== void 0 && (transformed.element = transform2(result.element)), transformed; + }, + JsdocTypeTuple: (result, transform2) => ({ + type: "JsdocTypeTuple", + elements: result.elements.map(transform2) + }), + JsdocTypeName: (result) => result, + JsdocTypeFunction: (result, transform2) => { + let transformed = { + type: "JsdocTypeFunction", + arrow: result.arrow, + parameters: result.parameters.map(transform2), + constructor: result.constructor, + parenthesis: result.parenthesis + }; + return result.returnType !== void 0 && (transformed.returnType = transform2(result.returnType)), transformed; + }, + JsdocTypeKeyof: (result, transform2) => ({ + type: "JsdocTypeKeyof", + element: transform2(result.element) + }), + JsdocTypeParenthesis: (result, transform2) => ({ + type: "JsdocTypeParenthesis", + element: transform2(result.element) + }), + JsdocTypeProperty: (result) => result, + JsdocTypePredicate: (result, transform2) => ({ + type: "JsdocTypePredicate", + left: transform2(result.left), + right: transform2(result.right) + }), + JsdocTypeIndexSignature: (result, transform2) => ({ + type: "JsdocTypeIndexSignature", + key: result.key, + right: transform2(result.right) + }), + JsdocTypeMappedType: (result, transform2) => ({ + type: "JsdocTypeMappedType", + key: result.key, + right: transform2(result.right) + }), + JsdocTypeAsserts: (result, transform2) => ({ + type: "JsdocTypeAsserts", + left: transform2(result.left), + right: transform2(result.right) + }), + JsdocTypeReadonlyArray: (result, transform2) => ({ + type: "JsdocTypeReadonlyArray", + element: transform2(result.element) + }), + JsdocTypeAssertsPlain: (result, transform2) => ({ + type: "JsdocTypeAssertsPlain", + element: transform2(result.element) + }), + JsdocTypeConditional: (result, transform2) => ({ + type: "JsdocTypeConditional", + checksType: transform2(result.checksType), + extendsType: transform2(result.extendsType), + trueType: transform2(result.trueType), + falseType: transform2(result.falseType) + }), + JsdocTypeTypeParameter: (result, transform2) => ({ + type: "JsdocTypeTypeParameter", + name: transform2(result.name), + constraint: result.constraint !== void 0 ? transform2(result.constraint) : void 0, + defaultValue: result.defaultValue !== void 0 ? transform2(result.defaultValue) : void 0 + }) + }; + } + let visitorKeys = { + JsdocTypeAny: [], + JsdocTypeFunction: ["parameters", "returnType"], + JsdocTypeGeneric: ["left", "elements"], + JsdocTypeImport: [], + JsdocTypeIndexSignature: ["right"], + JsdocTypeIntersection: ["elements"], + JsdocTypeKeyof: ["element"], + JsdocTypeKeyValue: ["right"], + JsdocTypeMappedType: ["right"], + JsdocTypeName: [], + JsdocTypeNamePath: ["left", "right"], + JsdocTypeNotNullable: ["element"], + JsdocTypeNull: [], + JsdocTypeNullable: ["element"], + JsdocTypeNumber: [], + JsdocTypeObject: ["elements"], + JsdocTypeObjectField: ["right"], + JsdocTypeJsdocObjectField: ["left", "right"], + JsdocTypeOptional: ["element"], + JsdocTypeParenthesis: ["element"], + JsdocTypeSpecialNamePath: [], + JsdocTypeStringValue: [], + JsdocTypeSymbol: ["element"], + JsdocTypeTuple: ["elements"], + JsdocTypeTypeof: ["element"], + JsdocTypeUndefined: [], + JsdocTypeUnion: ["elements"], + JsdocTypeUnknown: [], + JsdocTypeVariadic: ["element"], + JsdocTypeProperty: [], + JsdocTypePredicate: ["left", "right"], + JsdocTypeAsserts: ["left", "right"], + JsdocTypeReadonlyArray: ["element"], + JsdocTypeAssertsPlain: ["element"], + JsdocTypeConditional: ["checksType", "extendsType", "trueType", "falseType"], + JsdocTypeTypeParameter: ["name", "constraint", "defaultValue"] + }; + function _traverse(node, parentNode, property, onEnter, onLeave) { + onEnter?.(node, parentNode, property); + let keysToVisit = visitorKeys[node.type]; + for (let key of keysToVisit) { + let value = node[key]; + if (value !== void 0) + if (Array.isArray(value)) + for (let element of value) + _traverse(element, node, key, onEnter, onLeave); + else + _traverse(value, node, key, onEnter, onLeave); + } + onLeave?.(node, parentNode, property); + } + function traverse(node, onEnter, onLeave) { + _traverse(node, void 0, void 0, onEnter, onLeave); + } + exports2.catharsisTransform = catharsisTransform, exports2.identityTransformRules = identityTransformRules, exports2.jtpTransform = jtpTransform, exports2.parse = parse3, exports2.stringify = stringify2, exports2.stringifyRules = stringifyRules2, exports2.transform = transform, exports2.traverse = traverse, exports2.tryParse = tryParse, exports2.visitorKeys = visitorKeys; + })); + } +}); + +// src/docs-tools/argTypes/convert/flow/convert.ts +import { UnknownArgTypesError } from "storybook/internal/preview-errors"; +var isLiteral = (type) => type.name === "literal", toEnumOption = (element) => element.value.replace(/['|"]/g, ""), convertSig = (type) => { + switch (type.type) { + case "function": + return { name: "function" }; + case "object": + let values = {}; + return type.signature.properties.forEach((prop) => { + values[prop.key] = convert(prop.value); + }), { + name: "object", + value: values + }; + default: + throw new UnknownArgTypesError({ type, language: "Flow" }); + } +}, convert = (type) => { + let { name, raw } = type, base = {}; + switch (typeof raw < "u" && (base.raw = raw), type.name) { + case "literal": + return { ...base, name: "other", value: type.value }; + case "string": + case "number": + case "symbol": + case "boolean": + return { ...base, name }; + case "Array": + return { ...base, name: "array", value: type.elements.map(convert) }; + case "signature": + return { ...base, ...convertSig(type) }; + case "union": + return type.elements?.every(isLiteral) ? { ...base, name: "enum", value: type.elements?.map(toEnumOption) } : { ...base, name, value: type.elements?.map(convert) }; + case "intersection": + return { ...base, name, value: type.elements?.map(convert) }; + default: + return { ...base, name: "other", value: name }; + } +}; + +// src/docs-tools/argTypes/convert/utils.ts +var QUOTE_REGEX = /^['"]|['"]$/g, trimQuotes = (str2) => str2.replace(QUOTE_REGEX, ""), includesQuotes = (str2) => QUOTE_REGEX.test(str2), parseLiteral = (str2) => { + let trimmedValue = trimQuotes(str2); + return includesQuotes(str2) || Number.isNaN(Number(trimmedValue)) ? trimmedValue : Number(trimmedValue); +}; + +// src/docs-tools/argTypes/convert/proptypes/convert.ts +var SIGNATURE_REGEXP = /^\(.*\) => /, convert2 = (type) => { + let { name, raw, computed, value } = type, base = {}; + switch (typeof raw < "u" && (base.raw = raw), name) { + case "enum": { + let values2 = computed ? value : value.map((v) => parseLiteral(v.value)); + return { ...base, name, value: values2 }; + } + case "string": + case "number": + case "symbol": + return { ...base, name }; + case "func": + return { ...base, name: "function" }; + case "bool": + case "boolean": + return { ...base, name: "boolean" }; + case "arrayOf": + case "array": + return { ...base, name: "array", value: value && convert2(value) }; + case "object": + return { ...base, name }; + case "objectOf": + return { ...base, name, value: convert2(value) }; + case "shape": + case "exact": + let values = mapValues(value, (field) => convert2(field)); + return { ...base, name: "object", value: values }; + case "union": + return { ...base, name: "union", value: value.map((v) => convert2(v)) }; + default: { + if (name?.indexOf("|") > 0) + try { + let literalValues = name.split("|").map((v) => JSON.parse(v)); + return { ...base, name: "enum", value: literalValues }; + } catch { + } + let otherVal = value ? `${name}(${value})` : name, otherName = SIGNATURE_REGEXP.test(name) ? "function" : "other"; + return { ...base, name: otherName, value: otherVal }; + } + } +}; + +// src/docs-tools/argTypes/convert/typescript/convert.ts +import { UnknownArgTypesError as UnknownArgTypesError2 } from "storybook/internal/preview-errors"; +var isLiteral2 = (type) => type.name === "literal", isUndefined = (type) => type.name === "undefined", convertSig2 = (type) => { + switch (type.type) { + case "function": + return { name: "function" }; + case "object": + let values = {}; + return type.signature.properties.forEach((prop) => { + values[prop.key] = convert3(prop.value); + }), { + name: "object", + value: values + }; + default: + throw new UnknownArgTypesError2({ type, language: "Typescript" }); + } +}, convert3 = (type) => { + let { name, raw } = type, base = {}; + switch (typeof raw < "u" && (base.raw = raw), type.name) { + case "string": + case "number": + case "symbol": + case "boolean": + return { ...base, name }; + case "Array": + return { ...base, name: "array", value: type.elements.map(convert3) }; + case "signature": + return { ...base, ...convertSig2(type) }; + case "union": { + let nonUndefinedElements = type.elements.filter((element) => !isUndefined(element)); + if (nonUndefinedElements.length > 0 && nonUndefinedElements.every(isLiteral2)) { + let literalElements = nonUndefinedElements.filter(isLiteral2); + return { + ...base, + name: "enum", + value: literalElements.map((element) => parseLiteral(element.value)) + }; + } + return { ...base, name, value: type.elements.map(convert3) }; + } + case "intersection": + return { ...base, name, value: type.elements.map(convert3) }; + default: + return { ...base, name: "other", value: name }; + } +}; + +// src/docs-tools/argTypes/convert/index.ts +var convert4 = (docgenInfo) => { + let { type, tsType, flowType } = docgenInfo; + try { + if (type != null) + return convert2(type); + if (tsType != null) + return convert3(tsType); + if (flowType != null) + return convert(flowType); + } catch (err) { + console.error(err); + } + return null; +}; + +// src/docs-tools/argTypes/docgen/types.ts +var TypeSystem = /* @__PURE__ */ ((TypeSystem2) => (TypeSystem2.JAVASCRIPT = "JavaScript", TypeSystem2.FLOW = "Flow", TypeSystem2.TYPESCRIPT = "TypeScript", TypeSystem2.UNKNOWN = "Unknown", TypeSystem2))(TypeSystem || {}); + +// src/docs-tools/argTypes/docgen/utils/defaultValue.ts +var BLACKLIST = ["null", "undefined"]; +function isDefaultValueBlacklisted(value) { + return BLACKLIST.some((x) => x === value); +} + +// src/docs-tools/argTypes/docgen/utils/string.ts +var str = (obj) => { + if (!obj) + return ""; + if (typeof obj == "string") + return obj; + throw new Error(`Description: expected string, got: ${JSON.stringify(obj)}`); +}; + +// src/docs-tools/argTypes/docgen/utils/docgenInfo.ts +function hasDocgen(component) { + return !!component.__docgenInfo; +} +function isValidDocgenSection(docgenSection) { + return docgenSection != null && Object.keys(docgenSection).length > 0; +} +function getDocgenSection(component, section) { + return hasDocgen(component) ? component.__docgenInfo[section] : null; +} +function getDocgenDescription(component) { + return hasDocgen(component) ? str(component.__docgenInfo.description) : ""; +} + +// ../../node_modules/comment-parser/es6/primitives.js +var Markers; +(function(Markers2) { + Markers2.start = "/**", Markers2.nostart = "/***", Markers2.delim = "*", Markers2.end = "*/"; +})(Markers = Markers || (Markers = {})); + +// ../../node_modules/comment-parser/es6/util.js +function isSpace(source) { + return /^\s+$/.test(source); +} +function splitCR(source) { + let matches = source.match(/\r+$/); + return matches == null ? ["", source] : [source.slice(-matches[0].length), source.slice(0, -matches[0].length)]; +} +function splitSpace(source) { + let matches = source.match(/^\s+/); + return matches == null ? ["", source] : [source.slice(0, matches[0].length), source.slice(matches[0].length)]; +} +function splitLines(source) { + return source.split(/\n/); +} +function seedSpec(spec = {}) { + return Object.assign({ tag: "", name: "", type: "", optional: !1, description: "", problems: [], source: [] }, spec); +} +function seedTokens(tokens = {}) { + return Object.assign({ start: "", delimiter: "", postDelimiter: "", tag: "", postTag: "", name: "", postName: "", type: "", postType: "", description: "", end: "", lineEnd: "" }, tokens); +} + +// ../../node_modules/comment-parser/es6/parser/block-parser.js +var reTag = /^@\S+/; +function getParser({ fence = "```" } = {}) { + let fencer = getFencer(fence), toggleFence = (source, isFenced) => fencer(source) ? !isFenced : isFenced; + return function(source) { + let sections = [[]], isFenced = !1; + for (let line of source) + reTag.test(line.tokens.description) && !isFenced ? sections.push([line]) : sections[sections.length - 1].push(line), isFenced = toggleFence(line.tokens.description, isFenced); + return sections; + }; +} +function getFencer(fence) { + return typeof fence == "string" ? (source) => source.split(fence).length % 2 === 0 : fence; +} + +// ../../node_modules/comment-parser/es6/parser/source-parser.js +function getParser2({ startLine = 0, markers = Markers } = {}) { + let block = null, num = startLine; + return function(source) { + let rest = source, tokens = seedTokens(); + if ([tokens.lineEnd, rest] = splitCR(rest), [tokens.start, rest] = splitSpace(rest), block === null && rest.startsWith(markers.start) && !rest.startsWith(markers.nostart) && (block = [], tokens.delimiter = rest.slice(0, markers.start.length), rest = rest.slice(markers.start.length), [tokens.postDelimiter, rest] = splitSpace(rest)), block === null) + return num++, null; + let isClosed = rest.trimRight().endsWith(markers.end); + if (tokens.delimiter === "" && rest.startsWith(markers.delim) && !rest.startsWith(markers.end) && (tokens.delimiter = markers.delim, rest = rest.slice(markers.delim.length), [tokens.postDelimiter, rest] = splitSpace(rest)), isClosed) { + let trimmed = rest.trimRight(); + tokens.end = rest.slice(trimmed.length - markers.end.length), rest = trimmed.slice(0, -markers.end.length); + } + if (tokens.description = rest, block.push({ number: num, source, tokens }), num++, isClosed) { + let result = block.slice(); + return block = null, result; + } + return null; + }; +} + +// ../../node_modules/comment-parser/es6/parser/spec-parser.js +function getParser3({ tokenizers }) { + return function(source) { + var _a; + let spec = seedSpec({ source }); + for (let tokenize of tokenizers) + if (spec = tokenize(spec), !((_a = spec.problems[spec.problems.length - 1]) === null || _a === void 0) && _a.critical) + break; + return spec; + }; +} + +// ../../node_modules/comment-parser/es6/parser/tokenizers/tag.js +function tagTokenizer() { + return (spec) => { + let { tokens } = spec.source[0], match = tokens.description.match(/\s*(@(\S+))(\s*)/); + return match === null ? (spec.problems.push({ + code: "spec:tag:prefix", + message: 'tag should start with "@" symbol', + line: spec.source[0].number, + critical: !0 + }), spec) : (tokens.tag = match[1], tokens.postTag = match[3], tokens.description = tokens.description.slice(match[0].length), spec.tag = match[2], spec); + }; +} + +// ../../node_modules/comment-parser/es6/parser/tokenizers/type.js +function typeTokenizer(spacing = "compact") { + let join2 = getJoiner(spacing); + return (spec) => { + let curlies = 0, lines = []; + for (let [i, { tokens }] of spec.source.entries()) { + let type = ""; + if (i === 0 && tokens.description[0] !== "{") + return spec; + for (let ch of tokens.description) + if (ch === "{" && curlies++, ch === "}" && curlies--, type += ch, curlies === 0) + break; + if (lines.push([tokens, type]), curlies === 0) + break; + } + if (curlies !== 0) + return spec.problems.push({ + code: "spec:type:unpaired-curlies", + message: "unpaired curlies", + line: spec.source[0].number, + critical: !0 + }), spec; + let parts = [], offset = lines[0][0].postDelimiter.length; + for (let [i, [tokens, type]] of lines.entries()) + tokens.type = type, i > 0 && (tokens.type = tokens.postDelimiter.slice(offset) + type, tokens.postDelimiter = tokens.postDelimiter.slice(0, offset)), [tokens.postType, tokens.description] = splitSpace(tokens.description.slice(type.length)), parts.push(tokens.type); + return parts[0] = parts[0].slice(1), parts[parts.length - 1] = parts[parts.length - 1].slice(0, -1), spec.type = join2(parts), spec; + }; +} +var trim = (x) => x.trim(); +function getJoiner(spacing) { + return spacing === "compact" ? (t) => t.map(trim).join("") : spacing === "preserve" ? (t) => t.join(` +`) : spacing; +} + +// ../../node_modules/comment-parser/es6/parser/tokenizers/name.js +var isQuoted = (s) => s && s.startsWith('"') && s.endsWith('"'); +function nameTokenizer() { + let typeEnd = (num, { tokens }, i) => tokens.type === "" ? num : i; + return (spec) => { + let { tokens } = spec.source[spec.source.reduce(typeEnd, 0)], source = tokens.description.trimLeft(), quotedGroups = source.split('"'); + if (quotedGroups.length > 1 && quotedGroups[0] === "" && quotedGroups.length % 2 === 1) + return spec.name = quotedGroups[1], tokens.name = `"${quotedGroups[1]}"`, [tokens.postName, tokens.description] = splitSpace(source.slice(tokens.name.length)), spec; + let brackets = 0, name = "", optional = !1, defaultValue; + for (let ch of source) { + if (brackets === 0 && isSpace(ch)) + break; + ch === "[" && brackets++, ch === "]" && brackets--, name += ch; + } + if (brackets !== 0) + return spec.problems.push({ + code: "spec:name:unpaired-brackets", + message: "unpaired brackets", + line: spec.source[0].number, + critical: !0 + }), spec; + let nameToken = name; + if (name[0] === "[" && name[name.length - 1] === "]") { + optional = !0, name = name.slice(1, -1); + let parts = name.split("="); + if (name = parts[0].trim(), parts[1] !== void 0 && (defaultValue = parts.slice(1).join("=").trim()), name === "") + return spec.problems.push({ + code: "spec:name:empty-name", + message: "empty name", + line: spec.source[0].number, + critical: !0 + }), spec; + if (defaultValue === "") + return spec.problems.push({ + code: "spec:name:empty-default", + message: "empty default value", + line: spec.source[0].number, + critical: !0 + }), spec; + if (!isQuoted(defaultValue) && /=(?!>)/.test(defaultValue)) + return spec.problems.push({ + code: "spec:name:invalid-default", + message: "invalid default value syntax", + line: spec.source[0].number, + critical: !0 + }), spec; + } + return spec.optional = optional, spec.name = name, tokens.name = nameToken, defaultValue !== void 0 && (spec.default = defaultValue), [tokens.postName, tokens.description] = splitSpace(source.slice(tokens.name.length)), spec; + }; +} + +// ../../node_modules/comment-parser/es6/parser/tokenizers/description.js +function descriptionTokenizer(spacing = "compact", markers = Markers) { + let join2 = getJoiner2(spacing); + return (spec) => (spec.description = join2(spec.source, markers), spec); +} +function getJoiner2(spacing) { + return spacing === "compact" ? compactJoiner : spacing === "preserve" ? preserveJoiner : spacing; +} +function compactJoiner(lines, markers = Markers) { + return lines.map(({ tokens: { description } }) => description.trim()).filter((description) => description !== "").join(" "); +} +var lineNo = (num, { tokens }, i) => tokens.type === "" ? num : i, getDescription = ({ tokens }) => (tokens.delimiter === "" ? tokens.start : tokens.postDelimiter.slice(1)) + tokens.description; +function preserveJoiner(lines, markers = Markers) { + if (lines.length === 0) + return ""; + lines[0].tokens.description === "" && lines[0].tokens.delimiter === markers.start && (lines = lines.slice(1)); + let lastLine = lines[lines.length - 1]; + return lastLine !== void 0 && lastLine.tokens.description === "" && lastLine.tokens.end.endsWith(markers.end) && (lines = lines.slice(0, -1)), lines = lines.slice(lines.reduce(lineNo, 0)), lines.map(getDescription).join(` +`); +} + +// ../../node_modules/comment-parser/es6/parser/index.js +function getParser4({ startLine = 0, fence = "```", spacing = "compact", markers = Markers, tokenizers = [ + tagTokenizer(), + typeTokenizer(spacing), + nameTokenizer(), + descriptionTokenizer(spacing) +] } = {}) { + if (startLine < 0 || startLine % 1 > 0) + throw new Error("Invalid startLine"); + let parseSource = getParser2({ startLine, markers }), parseBlock = getParser({ fence }), parseSpec = getParser3({ tokenizers }), joinDescription = getJoiner2(spacing); + return function(source) { + let blocks = []; + for (let line of splitLines(source)) { + let lines = parseSource(line); + if (lines === null) + continue; + let sections = parseBlock(lines), specs = sections.slice(1).map(parseSpec); + blocks.push({ + description: joinDescription(sections[0], markers), + tags: specs, + source: lines, + problems: specs.reduce((acc, spec) => acc.concat(spec.problems), []) + }); + } + return blocks; + }; +} + +// ../../node_modules/comment-parser/es6/stringifier/index.js +function join(tokens) { + return tokens.start + tokens.delimiter + tokens.postDelimiter + tokens.tag + tokens.postTag + tokens.type + tokens.postType + tokens.name + tokens.postName + tokens.description + tokens.end + tokens.lineEnd; +} +function getStringifier() { + return (block) => block.source.map(({ tokens }) => join(tokens)).join(` +`); +} + +// ../../node_modules/comment-parser/es6/stringifier/inspect.js +var zeroWidth = { + line: 0, + start: 0, + delimiter: 0, + postDelimiter: 0, + tag: 0, + postTag: 0, + name: 0, + postName: 0, + type: 0, + postType: 0, + description: 0, + end: 0, + lineEnd: 0 +}; +var fields = Object.keys(zeroWidth); + +// ../../node_modules/comment-parser/es6/index.js +function parse(source, options = {}) { + return getParser4(options)(source); +} +var stringify = getStringifier(); + +// src/docs-tools/argTypes/jsdocParser.ts +var import_jsdoc_type_pratt_parser = __toESM(require_dist(), 1); +function containsJsDoc(value) { + return value != null && value.includes("@"); +} +function parse2(content) { + let normalisedContent = `/** +` + (content ?? "").split(` +`).map((line) => ` * ${line}`).join(` +`) + ` +*/`, ast = parse(normalisedContent, { + spacing: "preserve" + }); + if (!ast || ast.length === 0) + throw new Error("Cannot parse JSDoc tags."); + return ast[0]; +} +var DEFAULT_OPTIONS = { + tags: ["param", "arg", "argument", "returns", "ignore", "deprecated"] +}, parseJsDoc = (value, options = DEFAULT_OPTIONS) => { + if (!containsJsDoc(value)) + return { + includesJsDoc: !1, + ignore: !1 + }; + let jsDocAst = parse2(value), extractedTags = extractJsDocTags(jsDocAst, options.tags); + return extractedTags.ignore ? { + includesJsDoc: !0, + ignore: !0 + } : { + includesJsDoc: !0, + ignore: !1, + // Always use the parsed description to ensure JSDoc is removed from the description. + description: jsDocAst.description.trim(), + extractedTags + }; +}; +function extractJsDocTags(ast, tags) { + let extractedTags = { + params: null, + deprecated: null, + returns: null, + ignore: !1 + }; + for (let tagSpec of ast.tags) + if (!(tags !== void 0 && !tags.includes(tagSpec.tag))) + if (tagSpec.tag === "ignore") { + extractedTags.ignore = !0; + break; + } else + switch (tagSpec.tag) { + // arg & argument are aliases for param. + case "param": + case "arg": + case "argument": { + let paramTag = extractParam(tagSpec); + paramTag != null && (extractedTags.params == null && (extractedTags.params = []), extractedTags.params.push(paramTag)); + break; + } + case "deprecated": { + let deprecatedTag = extractDeprecated(tagSpec); + deprecatedTag != null && (extractedTags.deprecated = deprecatedTag); + break; + } + case "returns": { + let returnsTag = extractReturns(tagSpec); + returnsTag != null && (extractedTags.returns = returnsTag); + break; + } + default: + break; + } + return extractedTags; +} +function normaliseParamName(name) { + return name.replace(/[\.-]$/, ""); +} +function extractParam(tag) { + if (!tag.name || tag.name === "-") + return null; + let type = extractType(tag.type); + return { + name: tag.name, + type, + description: normaliseDescription(tag.description), + getPrettyName: () => normaliseParamName(tag.name), + getTypeName: () => type ? extractTypeName(type) : null + }; +} +function extractDeprecated(tag) { + return tag.name ? joinNameAndDescription(tag.name, tag.description) : null; +} +function joinNameAndDescription(name, desc) { + let joined = name === "" ? desc : `${name} ${desc}`; + return normaliseDescription(joined); +} +function normaliseDescription(text) { + let normalised = text.replace(/^- /g, "").trim(); + return normalised === "" ? null : normalised; +} +function extractReturns(tag) { + let type = extractType(tag.type); + return type ? { + type, + description: joinNameAndDescription(tag.name, tag.description), + getTypeName: () => extractTypeName(type) + } : null; +} +var jsdocStringifyRules = (0, import_jsdoc_type_pratt_parser.stringifyRules)(), originalJsdocStringifyObject = jsdocStringifyRules.JsdocTypeObject; +jsdocStringifyRules.JsdocTypeAny = () => "any"; +jsdocStringifyRules.JsdocTypeObject = (result, transform) => `(${originalJsdocStringifyObject(result, transform)})`; +jsdocStringifyRules.JsdocTypeOptional = (result, transform) => transform(result.element); +jsdocStringifyRules.JsdocTypeNullable = (result, transform) => transform(result.element); +jsdocStringifyRules.JsdocTypeNotNullable = (result, transform) => transform(result.element); +jsdocStringifyRules.JsdocTypeUnion = (result, transform) => result.elements.map(transform).join("|"); +function extractType(typeString) { + try { + return (0, import_jsdoc_type_pratt_parser.parse)(typeString, "typescript"); + } catch { + return null; + } +} +function extractTypeName(type) { + return (0, import_jsdoc_type_pratt_parser.transform)(jsdocStringifyRules, type); +} + +// src/docs-tools/argTypes/utils.ts +var MAX_TYPE_SUMMARY_LENGTH = 90, MAX_DEFAULT_VALUE_SUMMARY_LENGTH = 50; +function isTooLongForTypeSummary(value) { + return value.length > 90; +} +function isTooLongForDefaultValueSummary(value) { + return value.length > 50; +} +function createSummaryValue(summary, detail) { + return summary === detail ? { summary } : { summary, detail }; +} +var normalizeNewlines = (string) => string.replace(/\\r\\n/g, "\\n"); + +// src/docs-tools/argTypes/docgen/flow/createDefaultValue.ts +function createDefaultValue(defaultValue, type) { + if (defaultValue != null) { + let { value } = defaultValue; + if (!isDefaultValueBlacklisted(value)) + return isTooLongForDefaultValueSummary(value) ? createSummaryValue(type?.name, value) : createSummaryValue(value); + } + return null; +} + +// src/docs-tools/argTypes/docgen/flow/createType.ts +function generateUnionElement({ name, value, elements, raw }) { + return value ?? (elements != null ? elements.map(generateUnionElement).join(" | ") : raw ?? name); +} +function generateUnion({ name, raw, elements }) { + return elements != null ? createSummaryValue(elements.map(generateUnionElement).join(" | ")) : raw != null ? createSummaryValue(raw.replace(/^\|\s*/, "")) : createSummaryValue(name); +} +function generateFuncSignature({ type, raw }) { + return raw != null ? createSummaryValue(raw) : createSummaryValue(type); +} +function generateObjectSignature({ type, raw }) { + return raw != null ? isTooLongForTypeSummary(raw) ? createSummaryValue(type, raw) : createSummaryValue(raw) : createSummaryValue(type); +} +function generateSignature(flowType) { + let { type } = flowType; + return type === "object" ? generateObjectSignature(flowType) : generateFuncSignature(flowType); +} +function generateDefault({ name, raw }) { + return raw != null ? isTooLongForTypeSummary(raw) ? createSummaryValue(name, raw) : createSummaryValue(raw) : createSummaryValue(name); +} +function createType(type) { + if (type == null) + return null; + switch (type.name) { + case "union" /* UNION */: + return generateUnion(type); + case "signature" /* SIGNATURE */: + return generateSignature(type); + default: + return generateDefault(type); + } +} + +// src/docs-tools/argTypes/docgen/flow/createPropDef.ts +var createFlowPropDef = (propName, docgenInfo) => { + let { flowType, description, required, defaultValue } = docgenInfo; + return { + name: propName, + type: createType(flowType), + required, + description, + defaultValue: createDefaultValue(defaultValue ?? null, flowType ?? null) + }; +}; + +// src/docs-tools/argTypes/docgen/typeScript/createDefaultValue.ts +function createDefaultValue2({ defaultValue }) { + if (defaultValue != null) { + let { value } = defaultValue; + if (!isDefaultValueBlacklisted(value)) + return createSummaryValue(value); + } + return null; +} + +// src/docs-tools/argTypes/docgen/typeScript/createType.ts +function createType2({ tsType, required }) { + if (tsType == null) + return null; + let typeName = tsType.name; + return required || (typeName = typeName.replace(" | undefined", "")), createSummaryValue( + ["Array", "Record", "signature"].includes(tsType.name) ? tsType.raw : typeName + ); +} + +// src/docs-tools/argTypes/docgen/typeScript/createPropDef.ts +var createTsPropDef = (propName, docgenInfo) => { + let { description, required } = docgenInfo; + return { + name: propName, + type: createType2(docgenInfo), + required, + description, + defaultValue: createDefaultValue2(docgenInfo) + }; +}; + +// src/docs-tools/argTypes/docgen/createPropDef.ts +function createType3(type) { + return type != null ? createSummaryValue(type.name) : null; +} +function isReactDocgenTypescript(defaultValue) { + let { computed, func } = defaultValue; + return typeof computed > "u" && typeof func > "u"; +} +function isStringValued(type) { + return type ? type.name === "string" ? !0 : type.name === "enum" ? Array.isArray(type.value) && type.value.every( + ({ value: tv }) => typeof tv == "string" && tv[0] === '"' && tv[tv.length - 1] === '"' + ) : !1 : !1; +} +function createDefaultValue3(defaultValue, type) { + if (defaultValue != null) { + let { value } = defaultValue; + if (!isDefaultValueBlacklisted(value)) + return isReactDocgenTypescript(defaultValue) && isStringValued(type) ? createSummaryValue(JSON.stringify(value)) : createSummaryValue(value); + } + return null; +} +function createBasicPropDef(name, type, docgenInfo) { + let { description, required, defaultValue } = docgenInfo; + return { + name, + type: createType3(type), + required, + description, + defaultValue: createDefaultValue3(defaultValue, type) + }; +} +function applyJsDocResult(propDef, jsDocParsingResult) { + if (jsDocParsingResult?.includesJsDoc) { + let { description, extractedTags } = jsDocParsingResult; + description != null && (propDef.description = jsDocParsingResult.description); + let value = { + ...extractedTags, + params: extractedTags?.params?.map( + (x) => ({ + name: x.getPrettyName(), + description: x.description + }) + ) + }; + Object.values(value).filter(Boolean).length > 0 && (propDef.jsDocTags = value); + } + return propDef; +} +var javaScriptFactory = (propName, docgenInfo, jsDocParsingResult) => { + let propDef = createBasicPropDef(propName, docgenInfo.type, docgenInfo); + return propDef.sbType = convert4(docgenInfo), applyJsDocResult(propDef, jsDocParsingResult); +}, tsFactory = (propName, docgenInfo, jsDocParsingResult) => { + let propDef = createTsPropDef(propName, docgenInfo); + return propDef.sbType = convert4(docgenInfo), applyJsDocResult(propDef, jsDocParsingResult); +}, flowFactory = (propName, docgenInfo, jsDocParsingResult) => { + let propDef = createFlowPropDef(propName, docgenInfo); + return propDef.sbType = convert4(docgenInfo), applyJsDocResult(propDef, jsDocParsingResult); +}, unknownFactory = (propName, docgenInfo, jsDocParsingResult) => { + let propDef = createBasicPropDef(propName, { name: "unknown" }, docgenInfo); + return applyJsDocResult(propDef, jsDocParsingResult); +}, getPropDefFactory = (typeSystem) => { + switch (typeSystem) { + case "JavaScript" /* JAVASCRIPT */: + return javaScriptFactory; + case "TypeScript" /* TYPESCRIPT */: + return tsFactory; + case "Flow" /* FLOW */: + return flowFactory; + default: + return unknownFactory; + } +}; + +// src/docs-tools/argTypes/docgen/extractDocgenProps.ts +var getTypeSystem = (docgenInfo) => docgenInfo.type != null ? "JavaScript" /* JAVASCRIPT */ : docgenInfo.flowType != null ? "Flow" /* FLOW */ : docgenInfo.tsType != null ? "TypeScript" /* TYPESCRIPT */ : "Unknown" /* UNKNOWN */, extractComponentSectionArray = (docgenSection) => { + let typeSystem = getTypeSystem(docgenSection[0]), createPropDef = getPropDefFactory(typeSystem); + return docgenSection.map((item) => { + let sanitizedItem = item; + return item.type?.elements && (sanitizedItem = { + ...item, + type: { + ...item.type, + value: item.type.elements + } + }), extractProp(sanitizedItem.name, sanitizedItem, typeSystem, createPropDef); + }); +}, extractComponentSectionObject = (docgenSection) => { + let docgenPropsKeys = Object.keys(docgenSection), typeSystem = getTypeSystem(docgenSection[docgenPropsKeys[0]]), createPropDef = getPropDefFactory(typeSystem); + return docgenPropsKeys.map((propName) => { + let docgenInfo = docgenSection[propName]; + return docgenInfo != null ? extractProp(propName, docgenInfo, typeSystem, createPropDef) : null; + }).filter(Boolean); +}, extractComponentProps = (component, section) => { + let docgenSection = getDocgenSection(component, section); + return isValidDocgenSection(docgenSection) ? Array.isArray(docgenSection) ? extractComponentSectionArray(docgenSection) : extractComponentSectionObject(docgenSection) : []; +}; +function extractProp(propName, docgenInfo, typeSystem, createPropDef) { + let jsDocParsingResult = parseJsDoc(docgenInfo.description); + return jsDocParsingResult.includesJsDoc && jsDocParsingResult.ignore ? null : { + propDef: createPropDef(propName, docgenInfo, jsDocParsingResult), + jsDocTags: jsDocParsingResult.extractedTags, + docgenInfo, + typeSystem + }; +} +function extractComponentDescription(component) { + return component != null ? getDocgenDescription(component) : ""; +} + +// src/docs-tools/argTypes/enhanceArgTypes.ts +var enhanceArgTypes = (context) => { + let { + component, + argTypes: userArgTypes, + parameters: { docs = {} } + } = context, { extractArgTypes } = docs; + if (!extractArgTypes || !component) + return userArgTypes; + let extractedArgTypes = extractArgTypes(component); + return extractedArgTypes ? combineParameters(extractedArgTypes, userArgTypes) : userArgTypes; +}; + +// src/docs-tools/shared.ts +var ADDON_ID = "storybook/docs", PANEL_ID = `${ADDON_ID}/panel`, PARAM_KEY = "docs", SNIPPET_RENDERED = `${ADDON_ID}/snippet-rendered`, SourceType = /* @__PURE__ */ ((SourceType2) => (SourceType2.AUTO = "auto", SourceType2.CODE = "code", SourceType2.DYNAMIC = "dynamic", SourceType2))(SourceType || {}); + +// src/docs-tools/storyDocsCodePanel.ts +function shouldSkipStoryDocsEmit(parameters) { + let sourceParams = parameters?.docs?.source, isArgsStory = parameters?.__isArgsStory; + return parameters?.__isPortableStory ? !0 : sourceParams?.type === "dynamic" /* DYNAMIC */ ? !1 : !isArgsStory || sourceParams?.code !== void 0 || sourceParams?.type === "code" /* CODE */; +} +function shouldWaitForServiceSnippet(parameters, storyPrepared) { + return globalThis.FEATURES?.experimentalDocgenServer ? !storyPrepared || !shouldSkipStoryDocsEmit(parameters) : !1; +} + +export { + convert4 as convert, + TypeSystem, + isDefaultValueBlacklisted, + str, + hasDocgen, + isValidDocgenSection, + getDocgenSection, + getDocgenDescription, + parseJsDoc, + MAX_TYPE_SUMMARY_LENGTH, + MAX_DEFAULT_VALUE_SUMMARY_LENGTH, + isTooLongForTypeSummary, + isTooLongForDefaultValueSummary, + createSummaryValue, + normalizeNewlines, + extractComponentSectionArray, + extractComponentSectionObject, + extractComponentProps, + extractComponentDescription, + enhanceArgTypes, + ADDON_ID, + PANEL_ID, + PARAM_KEY, + SNIPPET_RENDERED, + SourceType, + shouldSkipStoryDocsEmit, + shouldWaitForServiceSnippet +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-QC4HFS6K.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-QC4HFS6K.js new file mode 100644 index 0000000000000000000000000000000000000000..a5f3ecaa8dbb4fb8ad94fd44f8d3e49376ab2d38 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-QC4HFS6K.js @@ -0,0 +1,41 @@ +// src/shared/open-service/query-state.ts +function buildQueryState(data, lifecycle) { + let isPending = lifecycle.status === "pending", isLoading = lifecycle.loadStatus === "loading"; + return { + data, + error: lifecycle.error, + status: lifecycle.status, + loadStatus: lifecycle.loadStatus, + isPending, + isSuccess: lifecycle.status === "success", + isError: lifecycle.status === "error", + isLoading, + isInitialLoading: isPending && isLoading && data === void 0, + isRefreshing: isLoading && !isPending + }; +} +function toError(value) { + return value instanceof Error ? value : new Error(String(value)); +} +function seedQueryState(query, input, selector) { + try { + let output = query.get(input); + return buildQueryState(selector ? selector(output) : output, { + status: "pending", + error: void 0, + loadStatus: "loading" + }); + } catch (error) { + return buildQueryState(void 0, { + status: "error", + error: toError(error), + loadStatus: "idle" + }); + } +} + +export { + buildQueryState, + toError, + seedQueryState +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-QGGIYUMM.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-QGGIYUMM.js new file mode 100644 index 0000000000000000000000000000000000000000..e6c044410187222d0b610735fffefb021cf5d917 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-QGGIYUMM.js @@ -0,0 +1,2499 @@ +// ../../node_modules/@vitest/utils/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +var f = { + reset: [0, 0], + bold: [1, 22, "\x1B[22m\x1B[1m"], + dim: [2, 22, "\x1B[22m\x1B[2m"], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29], + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39], + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] +}, h = Object.entries(f); +function a(n) { + return String(n); +} +a.open = ""; +a.close = ""; +var B = h.reduce( + (n, [e]) => (n[e] = a, n), + { isColorSupported: !1 } +); +function C(n = !1) { + let e = typeof process < "u" ? process : void 0, i = e?.env || {}, g = e?.argv || []; + return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || e?.platform === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window < "u" && !!window.chrome; +} +function p(n = !1) { + let e = C(n), i = (r, t, c, o) => { + let l = "", s2 = 0; + do + l += r.substring(s2, o) + c, s2 = o + t.length, o = r.indexOf(t, s2); + while (~o); + return l + r.substring(s2); + }, g = (r, t, c = r) => { + let o = (l) => { + let s2 = String(l), b = s2.indexOf(t, r.length); + return ~b ? r + i(s2, t, c, b) + t : r + s2 + t; + }; + return o.open = r, o.close = t, o; + }, u = { + isColorSupported: e + }, d = (r) => `\x1B[${r}m`; + for (let [r, t] of h) + u[r] = e ? g( + d(t[0]), + d(t[1]), + t[2] + ) : a; + return u; +} + +// ../../node_modules/@vitest/utils/node_modules/tinyrainbow/dist/browser.js +var s = p(); + +// ../../node_modules/@vitest/utils/node_modules/@vitest/pretty-format/dist/index.js +function _mergeNamespaces(n, m2) { + return m2.forEach(function(e) { + e && typeof e != "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) { + if (k !== "default" && !(k in n)) { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: !0, + get: function() { + return e[k]; + } + }); + } + }); + }), Object.freeze(n); +} +function getKeysOfEnumerableProperties(object, compareKeys) { + let rawKeys = Object.keys(object), keys = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys); + if (Object.getOwnPropertySymbols) + for (let symbol of Object.getOwnPropertySymbols(object)) + Object.getOwnPropertyDescriptor(object, symbol).enumerable && keys.push(symbol); + return keys; +} +function printIteratorEntries(iterator, config, indentation, depth, refs, printer2, separator = ": ") { + let result = "", width = 0, current = iterator.next(); + if (!current.done) { + result += config.spacingOuter; + let indentationNext = indentation + config.indent; + for (; !current.done; ) { + if (result += indentationNext, width++ === config.maxWidth) { + result += "\u2026"; + break; + } + let name = printer2(current.value[0], config, indentationNext, depth, refs), value = printer2(current.value[1], config, indentationNext, depth, refs); + result += name + separator + value, current = iterator.next(), current.done ? config.min || (result += ",") : result += `,${config.spacingInner}`; + } + result += config.spacingOuter + indentation; + } + return result; +} +function printIteratorValues(iterator, config, indentation, depth, refs, printer2) { + let result = "", width = 0, current = iterator.next(); + if (!current.done) { + result += config.spacingOuter; + let indentationNext = indentation + config.indent; + for (; !current.done; ) { + if (result += indentationNext, width++ === config.maxWidth) { + result += "\u2026"; + break; + } + result += printer2(current.value, config, indentationNext, depth, refs), current = iterator.next(), current.done ? config.min || (result += ",") : result += `,${config.spacingInner}`; + } + result += config.spacingOuter + indentation; + } + return result; +} +function printListItems(list, config, indentation, depth, refs, printer2) { + let result = ""; + list = list instanceof ArrayBuffer ? new DataView(list) : list; + let isDataView = (l) => l instanceof DataView, length = isDataView(list) ? list.byteLength : list.length; + if (length > 0) { + result += config.spacingOuter; + let indentationNext = indentation + config.indent; + for (let i = 0; i < length; i++) { + if (result += indentationNext, i === config.maxWidth) { + result += "\u2026"; + break; + } + (isDataView(list) || i in list) && (result += printer2(isDataView(list) ? list.getInt8(i) : list[i], config, indentationNext, depth, refs)), i < length - 1 ? result += `,${config.spacingInner}` : config.min || (result += ","); + } + result += config.spacingOuter + indentation; + } + return result; +} +function printObjectProperties(val, config, indentation, depth, refs, printer2) { + let result = "", keys = getKeysOfEnumerableProperties(val, config.compareKeys); + if (keys.length > 0) { + result += config.spacingOuter; + let indentationNext = indentation + config.indent; + for (let i = 0; i < keys.length; i++) { + let key = keys[i], name = printer2(key, config, indentationNext, depth, refs), value = printer2(val[key], config, indentationNext, depth, refs); + result += `${indentationNext + name}: ${value}`, i < keys.length - 1 ? result += `,${config.spacingInner}` : config.min || (result += ","); + } + result += config.spacingOuter + indentation; + } + return result; +} +var asymmetricMatcher = typeof Symbol == "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("jest.asymmetricMatcher") : 1267621, SPACE$2 = " ", serialize$5 = (val, config, indentation, depth, refs, printer2) => { + let stringedValue = val.toString(); + if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") + return ++depth > config.maxDepth ? `[${stringedValue}]` : `${stringedValue + SPACE$2}[${printListItems(val.sample, config, indentation, depth, refs, printer2)}]`; + if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") + return ++depth > config.maxDepth ? `[${stringedValue}]` : `${stringedValue + SPACE$2}{${printObjectProperties(val.sample, config, indentation, depth, refs, printer2)}}`; + if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching" || stringedValue === "StringContaining" || stringedValue === "StringNotContaining") + return stringedValue + SPACE$2 + printer2(val.sample, config, indentation, depth, refs); + if (typeof val.toAsymmetricMatcher != "function") + throw new TypeError(`Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`); + return val.toAsymmetricMatcher(); +}, test$5 = (val) => val && val.$$typeof === asymmetricMatcher, plugin$5 = { + serialize: serialize$5, + test: test$5 +}, SPACE$1 = " ", OBJECT_NAMES = /* @__PURE__ */ new Set(["DOMStringMap", "NamedNodeMap"]), ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/; +function testName(name) { + return OBJECT_NAMES.has(name) || ARRAY_REGEXP.test(name); +} +var test$4 = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name); +function isNamedNodeMap(collection) { + return collection.constructor.name === "NamedNodeMap"; +} +var serialize$4 = (collection, config, indentation, depth, refs, printer2) => { + let name = collection.constructor.name; + return ++depth > config.maxDepth ? `[${name}]` : (config.min ? "" : name + SPACE$1) + (OBJECT_NAMES.has(name) ? `{${printObjectProperties(isNamedNodeMap(collection) ? [...collection].reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}) : { ...collection }, config, indentation, depth, refs, printer2)}}` : `[${printListItems([...collection], config, indentation, depth, refs, printer2)}]`); +}, plugin$4 = { + serialize: serialize$4, + test: test$4 +}; +function escapeHTML(str) { + return str.replaceAll("<", "<").replaceAll(">", ">"); +} +function printProps(keys, props, config, indentation, depth, refs, printer2) { + let indentationNext = indentation + config.indent, colors = config.colors; + return keys.map((key) => { + let value = props[key], printed = printer2(value, config, indentationNext, depth, refs); + return typeof value != "string" && (printed.includes(` +`) && (printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation), printed = `{${printed}}`), `${config.spacingInner + indentation + colors.prop.open + key + colors.prop.close}=${colors.value.open}${printed}${colors.value.close}`; + }).join(""); +} +function printChildren(children, config, indentation, depth, refs, printer2) { + return children.map((child) => config.spacingOuter + indentation + (typeof child == "string" ? printText(child, config) : printer2(child, config, indentation, depth, refs))).join(""); +} +function printText(text, config) { + let contentColor = config.colors.content; + return contentColor.open + escapeHTML(text) + contentColor.close; +} +function printComment(comment, config) { + let commentColor = config.colors.comment; + return `${commentColor.open}${commentColor.close}`; +} +function printElement(type, printedProps, printedChildren, config, indentation) { + let tagColor = config.colors.tag; + return `${tagColor.open}<${type}${printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open}${printedChildren ? `>${tagColor.close}${printedChildren}${config.spacingOuter}${indentation}${tagColor.open}${tagColor.close}`; +} +function printElementAsLeaf(type, config) { + let tagColor = config.colors.tag; + return `${tagColor.open}<${type}${tagColor.close} \u2026${tagColor.open} />${tagColor.close}`; +} +var ELEMENT_NODE = 1, TEXT_NODE = 3, COMMENT_NODE = 8, FRAGMENT_NODE = 11, ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/; +function testHasAttribute(val) { + try { + return typeof val.hasAttribute == "function" && val.hasAttribute("is"); + } catch { + return !1; + } +} +function testNode(val) { + let constructorName = val.constructor.name, { nodeType, tagName } = val, isCustomElement = typeof tagName == "string" && tagName.includes("-") || testHasAttribute(val); + return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment"; +} +var test$3 = (val) => { + var _val$constructor; + return (val == null || (_val$constructor = val.constructor) === null || _val$constructor === void 0 ? void 0 : _val$constructor.name) && testNode(val); +}; +function nodeIsText(node) { + return node.nodeType === TEXT_NODE; +} +function nodeIsComment(node) { + return node.nodeType === COMMENT_NODE; +} +function nodeIsFragment(node) { + return node.nodeType === FRAGMENT_NODE; +} +var serialize$3 = (node, config, indentation, depth, refs, printer2) => { + if (nodeIsText(node)) + return printText(node.data, config); + if (nodeIsComment(node)) + return printComment(node.data, config); + let type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase(); + return ++depth > config.maxDepth ? printElementAsLeaf(type, config) : printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes, (attr) => attr.name).sort(), nodeIsFragment(node) ? {} : [...node.attributes].reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}), config, indentation + config.indent, depth, refs, printer2), printChildren(Array.prototype.slice.call(node.childNodes || node.children), config, indentation + config.indent, depth, refs, printer2), config, indentation); +}, plugin$3 = { + serialize: serialize$3, + test: test$3 +}, IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@", IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@", IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@", IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@", IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@", IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@", IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@", IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@", IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@", getImmutableName = (name) => `Immutable.${name}`, printAsLeaf = (name) => `[${name}]`, SPACE = " ", LAZY = "\u2026"; +function printImmutableEntries(val, config, indentation, depth, refs, printer2, type) { + return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}{${printIteratorEntries(val.entries(), config, indentation, depth, refs, printer2)}}`; +} +function getRecordEntries(val) { + let i = 0; + return { next() { + if (i < val._keys.length) { + let key = val._keys[i++]; + return { + done: !1, + value: [key, val.get(key)] + }; + } + return { + done: !0, + value: void 0 + }; + } }; +} +function printImmutableRecord(val, config, indentation, depth, refs, printer2) { + let name = getImmutableName(val._name || "Record"); + return ++depth > config.maxDepth ? printAsLeaf(name) : `${name + SPACE}{${printIteratorEntries(getRecordEntries(val), config, indentation, depth, refs, printer2)}}`; +} +function printImmutableSeq(val, config, indentation, depth, refs, printer2) { + let name = getImmutableName("Seq"); + return ++depth > config.maxDepth ? printAsLeaf(name) : val[IS_KEYED_SENTINEL] ? `${name + SPACE}{${val._iter || val._object ? printIteratorEntries(val.entries(), config, indentation, depth, refs, printer2) : LAZY}}` : `${name + SPACE}[${val._iter || val._array || val._collection || val._iterable ? printIteratorValues(val.values(), config, indentation, depth, refs, printer2) : LAZY}]`; +} +function printImmutableValues(val, config, indentation, depth, refs, printer2, type) { + return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}[${printIteratorValues(val.values(), config, indentation, depth, refs, printer2)}]`; +} +var serialize$2 = (val, config, indentation, depth, refs, printer2) => val[IS_MAP_SENTINEL] ? printImmutableEntries(val, config, indentation, depth, refs, printer2, val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map") : val[IS_LIST_SENTINEL] ? printImmutableValues(val, config, indentation, depth, refs, printer2, "List") : val[IS_SET_SENTINEL] ? printImmutableValues(val, config, indentation, depth, refs, printer2, val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set") : val[IS_STACK_SENTINEL] ? printImmutableValues(val, config, indentation, depth, refs, printer2, "Stack") : val[IS_SEQ_SENTINEL] ? printImmutableSeq(val, config, indentation, depth, refs, printer2) : printImmutableRecord(val, config, indentation, depth, refs, printer2), test$2 = (val) => val && (val[IS_ITERABLE_SENTINEL] === !0 || val[IS_RECORD_SENTINEL] === !0), plugin$2 = { + serialize: serialize$2, + test: test$2 +}; +function getDefaultExportFromCjs(x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x; +} +var reactIs$1 = { exports: {} }, reactIs_production = {}; +var hasRequiredReactIs_production; +function requireReactIs_production() { + if (hasRequiredReactIs_production) return reactIs_production; + hasRequiredReactIs_production = 1; + var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"); + function typeOf(object) { + if (typeof object == "object" && object !== null) { + var $$typeof = object.$$typeof; + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + switch (object = object.type, object) { + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + case REACT_SUSPENSE_LIST_TYPE: + case REACT_VIEW_TRANSITION_TYPE: + return object; + default: + switch (object = object && object.$$typeof, object) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + return object; + case REACT_CONSUMER_TYPE: + return object; + default: + return $$typeof; + } + } + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + } + return reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE, reactIs_production.ContextProvider = REACT_CONTEXT_TYPE, reactIs_production.Element = REACT_ELEMENT_TYPE, reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE, reactIs_production.Fragment = REACT_FRAGMENT_TYPE, reactIs_production.Lazy = REACT_LAZY_TYPE, reactIs_production.Memo = REACT_MEMO_TYPE, reactIs_production.Portal = REACT_PORTAL_TYPE, reactIs_production.Profiler = REACT_PROFILER_TYPE, reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE, reactIs_production.Suspense = REACT_SUSPENSE_TYPE, reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE, reactIs_production.isContextConsumer = function(object) { + return typeOf(object) === REACT_CONSUMER_TYPE; + }, reactIs_production.isContextProvider = function(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + }, reactIs_production.isElement = function(object) { + return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + }, reactIs_production.isForwardRef = function(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + }, reactIs_production.isFragment = function(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + }, reactIs_production.isLazy = function(object) { + return typeOf(object) === REACT_LAZY_TYPE; + }, reactIs_production.isMemo = function(object) { + return typeOf(object) === REACT_MEMO_TYPE; + }, reactIs_production.isPortal = function(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + }, reactIs_production.isProfiler = function(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + }, reactIs_production.isStrictMode = function(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + }, reactIs_production.isSuspense = function(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + }, reactIs_production.isSuspenseList = function(object) { + return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; + }, reactIs_production.isValidElementType = function(type) { + return typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0); + }, reactIs_production.typeOf = typeOf, reactIs_production; +} +var reactIs_development$1 = {}; +var hasRequiredReactIs_development$1; +function requireReactIs_development$1() { + return hasRequiredReactIs_development$1 || (hasRequiredReactIs_development$1 = 1, process.env.NODE_ENV !== "production" && (function() { + function typeOf(object) { + if (typeof object == "object" && object !== null) { + var $$typeof = object.$$typeof; + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + switch (object = object.type, object) { + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + case REACT_SUSPENSE_LIST_TYPE: + case REACT_VIEW_TRANSITION_TYPE: + return object; + default: + switch (object = object && object.$$typeof, object) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + return object; + case REACT_CONSUMER_TYPE: + return object; + default: + return $$typeof; + } + } + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + } + var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"); + reactIs_development$1.ContextConsumer = REACT_CONSUMER_TYPE, reactIs_development$1.ContextProvider = REACT_CONTEXT_TYPE, reactIs_development$1.Element = REACT_ELEMENT_TYPE, reactIs_development$1.ForwardRef = REACT_FORWARD_REF_TYPE, reactIs_development$1.Fragment = REACT_FRAGMENT_TYPE, reactIs_development$1.Lazy = REACT_LAZY_TYPE, reactIs_development$1.Memo = REACT_MEMO_TYPE, reactIs_development$1.Portal = REACT_PORTAL_TYPE, reactIs_development$1.Profiler = REACT_PROFILER_TYPE, reactIs_development$1.StrictMode = REACT_STRICT_MODE_TYPE, reactIs_development$1.Suspense = REACT_SUSPENSE_TYPE, reactIs_development$1.SuspenseList = REACT_SUSPENSE_LIST_TYPE, reactIs_development$1.isContextConsumer = function(object) { + return typeOf(object) === REACT_CONSUMER_TYPE; + }, reactIs_development$1.isContextProvider = function(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + }, reactIs_development$1.isElement = function(object) { + return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + }, reactIs_development$1.isForwardRef = function(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + }, reactIs_development$1.isFragment = function(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + }, reactIs_development$1.isLazy = function(object) { + return typeOf(object) === REACT_LAZY_TYPE; + }, reactIs_development$1.isMemo = function(object) { + return typeOf(object) === REACT_MEMO_TYPE; + }, reactIs_development$1.isPortal = function(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + }, reactIs_development$1.isProfiler = function(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + }, reactIs_development$1.isStrictMode = function(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + }, reactIs_development$1.isSuspense = function(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + }, reactIs_development$1.isSuspenseList = function(object) { + return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; + }, reactIs_development$1.isValidElementType = function(type) { + return typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0); + }, reactIs_development$1.typeOf = typeOf; + })()), reactIs_development$1; +} +var hasRequiredReactIs$1; +function requireReactIs$1() { + return hasRequiredReactIs$1 || (hasRequiredReactIs$1 = 1, process.env.NODE_ENV === "production" ? reactIs$1.exports = requireReactIs_production() : reactIs$1.exports = requireReactIs_development$1()), reactIs$1.exports; +} +var reactIsExports$1 = requireReactIs$1(), index$1 = getDefaultExportFromCjs(reactIsExports$1), ReactIs19 = _mergeNamespaces({ + __proto__: null, + default: index$1 +}, [reactIsExports$1]), reactIs = { exports: {} }, reactIs_production_min = {}; +var hasRequiredReactIs_production_min; +function requireReactIs_production_min() { + if (hasRequiredReactIs_production_min) return reactIs_production_min; + hasRequiredReactIs_production_min = 1; + var b = /* @__PURE__ */ Symbol.for("react.element"), c = /* @__PURE__ */ Symbol.for("react.portal"), d = /* @__PURE__ */ Symbol.for("react.fragment"), e = /* @__PURE__ */ Symbol.for("react.strict_mode"), f2 = /* @__PURE__ */ Symbol.for("react.profiler"), g = /* @__PURE__ */ Symbol.for("react.provider"), h2 = /* @__PURE__ */ Symbol.for("react.context"), k = /* @__PURE__ */ Symbol.for("react.server_context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), m2 = /* @__PURE__ */ Symbol.for("react.suspense"), n = /* @__PURE__ */ Symbol.for("react.suspense_list"), p2 = /* @__PURE__ */ Symbol.for("react.memo"), q = /* @__PURE__ */ Symbol.for("react.lazy"), t = /* @__PURE__ */ Symbol.for("react.offscreen"), u; + u = /* @__PURE__ */ Symbol.for("react.module.reference"); + function v(a2) { + if (typeof a2 == "object" && a2 !== null) { + var r = a2.$$typeof; + switch (r) { + case b: + switch (a2 = a2.type, a2) { + case d: + case f2: + case e: + case m2: + case n: + return a2; + default: + switch (a2 = a2 && a2.$$typeof, a2) { + case k: + case h2: + case l: + case q: + case p2: + case g: + return a2; + default: + return r; + } + } + case c: + return r; + } + } + } + return reactIs_production_min.ContextConsumer = h2, reactIs_production_min.ContextProvider = g, reactIs_production_min.Element = b, reactIs_production_min.ForwardRef = l, reactIs_production_min.Fragment = d, reactIs_production_min.Lazy = q, reactIs_production_min.Memo = p2, reactIs_production_min.Portal = c, reactIs_production_min.Profiler = f2, reactIs_production_min.StrictMode = e, reactIs_production_min.Suspense = m2, reactIs_production_min.SuspenseList = n, reactIs_production_min.isAsyncMode = function() { + return !1; + }, reactIs_production_min.isConcurrentMode = function() { + return !1; + }, reactIs_production_min.isContextConsumer = function(a2) { + return v(a2) === h2; + }, reactIs_production_min.isContextProvider = function(a2) { + return v(a2) === g; + }, reactIs_production_min.isElement = function(a2) { + return typeof a2 == "object" && a2 !== null && a2.$$typeof === b; + }, reactIs_production_min.isForwardRef = function(a2) { + return v(a2) === l; + }, reactIs_production_min.isFragment = function(a2) { + return v(a2) === d; + }, reactIs_production_min.isLazy = function(a2) { + return v(a2) === q; + }, reactIs_production_min.isMemo = function(a2) { + return v(a2) === p2; + }, reactIs_production_min.isPortal = function(a2) { + return v(a2) === c; + }, reactIs_production_min.isProfiler = function(a2) { + return v(a2) === f2; + }, reactIs_production_min.isStrictMode = function(a2) { + return v(a2) === e; + }, reactIs_production_min.isSuspense = function(a2) { + return v(a2) === m2; + }, reactIs_production_min.isSuspenseList = function(a2) { + return v(a2) === n; + }, reactIs_production_min.isValidElementType = function(a2) { + return typeof a2 == "string" || typeof a2 == "function" || a2 === d || a2 === f2 || a2 === e || a2 === m2 || a2 === n || a2 === t || typeof a2 == "object" && a2 !== null && (a2.$$typeof === q || a2.$$typeof === p2 || a2.$$typeof === g || a2.$$typeof === h2 || a2.$$typeof === l || a2.$$typeof === u || a2.getModuleId !== void 0); + }, reactIs_production_min.typeOf = v, reactIs_production_min; +} +var reactIs_development = {}; +var hasRequiredReactIs_development; +function requireReactIs_development() { + return hasRequiredReactIs_development || (hasRequiredReactIs_development = 1, process.env.NODE_ENV !== "production" && (function() { + var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_SERVER_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.server_context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen"), enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, REACT_MODULE_REFERENCE; + REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference"); + function isValidElementType(type) { + return !!(typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0)); + } + function typeOf(object) { + if (typeof object == "object" && object !== null) { + var $$typeof = object.$$typeof; + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + switch (type) { + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + case REACT_SUSPENSE_LIST_TYPE: + return type; + default: + var $$typeofType = type && type.$$typeof; + switch ($$typeofType) { + case REACT_SERVER_CONTEXT_TYPE: + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + default: + return $$typeof; + } + } + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + } + var ContextConsumer = REACT_CONTEXT_TYPE, ContextProvider = REACT_PROVIDER_TYPE, Element2 = REACT_ELEMENT_TYPE, ForwardRef = REACT_FORWARD_REF_TYPE, Fragment = REACT_FRAGMENT_TYPE, Lazy = REACT_LAZY_TYPE, Memo = REACT_MEMO_TYPE, Portal = REACT_PORTAL_TYPE, Profiler = REACT_PROFILER_TYPE, StrictMode = REACT_STRICT_MODE_TYPE, Suspense = REACT_SUSPENSE_TYPE, SuspenseList = REACT_SUSPENSE_LIST_TYPE, hasWarnedAboutDeprecatedIsAsyncMode = !1, hasWarnedAboutDeprecatedIsConcurrentMode = !1; + function isAsyncMode(object) { + return hasWarnedAboutDeprecatedIsAsyncMode || (hasWarnedAboutDeprecatedIsAsyncMode = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1; + } + function isConcurrentMode(object) { + return hasWarnedAboutDeprecatedIsConcurrentMode || (hasWarnedAboutDeprecatedIsConcurrentMode = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1; + } + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + function isElement(object) { + return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + function isSuspenseList(object) { + return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; + } + reactIs_development.ContextConsumer = ContextConsumer, reactIs_development.ContextProvider = ContextProvider, reactIs_development.Element = Element2, reactIs_development.ForwardRef = ForwardRef, reactIs_development.Fragment = Fragment, reactIs_development.Lazy = Lazy, reactIs_development.Memo = Memo, reactIs_development.Portal = Portal, reactIs_development.Profiler = Profiler, reactIs_development.StrictMode = StrictMode, reactIs_development.Suspense = Suspense, reactIs_development.SuspenseList = SuspenseList, reactIs_development.isAsyncMode = isAsyncMode, reactIs_development.isConcurrentMode = isConcurrentMode, reactIs_development.isContextConsumer = isContextConsumer, reactIs_development.isContextProvider = isContextProvider, reactIs_development.isElement = isElement, reactIs_development.isForwardRef = isForwardRef, reactIs_development.isFragment = isFragment, reactIs_development.isLazy = isLazy, reactIs_development.isMemo = isMemo, reactIs_development.isPortal = isPortal, reactIs_development.isProfiler = isProfiler, reactIs_development.isStrictMode = isStrictMode, reactIs_development.isSuspense = isSuspense, reactIs_development.isSuspenseList = isSuspenseList, reactIs_development.isValidElementType = isValidElementType, reactIs_development.typeOf = typeOf; + })()), reactIs_development; +} +var hasRequiredReactIs; +function requireReactIs() { + return hasRequiredReactIs || (hasRequiredReactIs = 1, process.env.NODE_ENV === "production" ? reactIs.exports = requireReactIs_production_min() : reactIs.exports = requireReactIs_development()), reactIs.exports; +} +var reactIsExports = requireReactIs(), index = getDefaultExportFromCjs(reactIsExports), ReactIs18 = _mergeNamespaces({ + __proto__: null, + default: index +}, [reactIsExports]), reactIsMethods = [ + "isAsyncMode", + "isConcurrentMode", + "isContextConsumer", + "isContextProvider", + "isElement", + "isForwardRef", + "isFragment", + "isLazy", + "isMemo", + "isPortal", + "isProfiler", + "isStrictMode", + "isSuspense", + "isSuspenseList", + "isValidElementType" +], ReactIs = Object.fromEntries(reactIsMethods.map((m2) => [m2, (v) => ReactIs18[m2](v) || ReactIs19[m2](v)])); +function getChildren(arg, children = []) { + if (Array.isArray(arg)) + for (let item of arg) + getChildren(item, children); + else arg != null && arg !== !1 && arg !== "" && children.push(arg); + return children; +} +function getType(element) { + let type = element.type; + if (typeof type == "string") + return type; + if (typeof type == "function") + return type.displayName || type.name || "Unknown"; + if (ReactIs.isFragment(element)) + return "React.Fragment"; + if (ReactIs.isSuspense(element)) + return "React.Suspense"; + if (typeof type == "object" && type !== null) { + if (ReactIs.isContextProvider(element)) + return "Context.Provider"; + if (ReactIs.isContextConsumer(element)) + return "Context.Consumer"; + if (ReactIs.isForwardRef(element)) { + if (type.displayName) + return type.displayName; + let functionName = type.render.displayName || type.render.name || ""; + return functionName === "" ? "ForwardRef" : `ForwardRef(${functionName})`; + } + if (ReactIs.isMemo(element)) { + let functionName = type.displayName || type.type.displayName || type.type.name || ""; + return functionName === "" ? "Memo" : `Memo(${functionName})`; + } + } + return "UNDEFINED"; +} +function getPropKeys$1(element) { + let { props } = element; + return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort(); +} +var serialize$1 = (element, config, indentation, depth, refs, printer2) => ++depth > config.maxDepth ? printElementAsLeaf(getType(element), config) : printElement(getType(element), printProps(getPropKeys$1(element), element.props, config, indentation + config.indent, depth, refs, printer2), printChildren(getChildren(element.props.children), config, indentation + config.indent, depth, refs, printer2), config, indentation), test$1 = (val) => val != null && ReactIs.isElement(val), plugin$1 = { + serialize: serialize$1, + test: test$1 +}, testSymbol = typeof Symbol == "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("react.test.json") : 245830487; +function getPropKeys(object) { + let { props } = object; + return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : []; +} +var serialize = (object, config, indentation, depth, refs, printer2) => ++depth > config.maxDepth ? printElementAsLeaf(object.type, config) : printElement(object.type, object.props ? printProps(getPropKeys(object), object.props, config, indentation + config.indent, depth, refs, printer2) : "", object.children ? printChildren(object.children, config, indentation + config.indent, depth, refs, printer2) : "", config, indentation), test = (val) => val && val.$$typeof === testSymbol, plugin = { + serialize, + test +}, toString = Object.prototype.toString, toISOString = Date.prototype.toISOString, errorToString = Error.prototype.toString, regExpToString = RegExp.prototype.toString; +function getConstructorName(val) { + return typeof val.constructor == "function" && val.constructor.name || "Object"; +} +function isWindow(val) { + return typeof window < "u" && val === window; +} +var SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/, NEWLINE_REGEXP = /\n/g, PrettyFormatPluginError = class extends Error { + constructor(message, stack) { + super(message), this.stack = stack, this.name = this.constructor.name; + } +}; +function isToStringedArrayType(toStringed) { + return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]"; +} +function printNumber(val) { + return Object.is(val, -0) ? "-0" : String(val); +} +function printBigInt(val) { + return `${val}n`; +} +function printFunction(val, printFunctionName) { + return printFunctionName ? `[Function ${val.name || "anonymous"}]` : "[Function]"; +} +function printSymbol(val) { + return String(val).replace(SYMBOL_REGEXP, "Symbol($1)"); +} +function printError(val) { + return `[${errorToString.call(val)}]`; +} +function printBasicValue(val, printFunctionName, escapeRegex, escapeString) { + if (val === !0 || val === !1) + return `${val}`; + if (val === void 0) + return "undefined"; + if (val === null) + return "null"; + let typeOf = typeof val; + if (typeOf === "number") + return printNumber(val); + if (typeOf === "bigint") + return printBigInt(val); + if (typeOf === "string") + return escapeString ? `"${val.replaceAll(/"|\\/g, "\\$&")}"` : `"${val}"`; + if (typeOf === "function") + return printFunction(val, printFunctionName); + if (typeOf === "symbol") + return printSymbol(val); + let toStringed = toString.call(val); + return toStringed === "[object WeakMap]" ? "WeakMap {}" : toStringed === "[object WeakSet]" ? "WeakSet {}" : toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]" ? printFunction(val, printFunctionName) : toStringed === "[object Symbol]" ? printSymbol(val) : toStringed === "[object Date]" ? Number.isNaN(+val) ? "Date { NaN }" : toISOString.call(val) : toStringed === "[object Error]" ? printError(val) : toStringed === "[object RegExp]" ? escapeRegex ? regExpToString.call(val).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&") : regExpToString.call(val) : val instanceof Error ? printError(val) : null; +} +function printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) { + if (refs.includes(val)) + return "[Circular]"; + refs = [...refs], refs.push(val); + let hitMaxDepth = ++depth > config.maxDepth, min = config.min; + if (config.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON == "function" && !hasCalledToJSON) + return printer(val.toJSON(), config, indentation, depth, refs, !0); + let toStringed = toString.call(val); + return toStringed === "[object Arguments]" ? hitMaxDepth ? "[Arguments]" : `${min ? "" : "Arguments "}[${printListItems(val, config, indentation, depth, refs, printer)}]` : isToStringedArrayType(toStringed) ? hitMaxDepth ? `[${val.constructor.name}]` : `${min || !config.printBasicPrototype && val.constructor.name === "Array" ? "" : `${val.constructor.name} `}[${printListItems(val, config, indentation, depth, refs, printer)}]` : toStringed === "[object Map]" ? hitMaxDepth ? "[Map]" : `Map {${printIteratorEntries(val.entries(), config, indentation, depth, refs, printer, " => ")}}` : toStringed === "[object Set]" ? hitMaxDepth ? "[Set]" : `Set {${printIteratorValues(val.values(), config, indentation, depth, refs, printer)}}` : hitMaxDepth || isWindow(val) ? `[${getConstructorName(val)}]` : `${min || !config.printBasicPrototype && getConstructorName(val) === "Object" ? "" : `${getConstructorName(val)} `}{${printObjectProperties(val, config, indentation, depth, refs, printer)}}`; +} +var ErrorPlugin = { + test: (val) => val && val instanceof Error, + serialize(val, config, indentation, depth, refs, printer2) { + if (refs.includes(val)) + return "[Circular]"; + refs = [...refs, val]; + let hitMaxDepth = ++depth > config.maxDepth, { message, cause, ...rest } = val, entries = { + message, + ...typeof cause < "u" ? { cause } : {}, + ...val instanceof AggregateError ? { errors: val.errors } : {}, + ...rest + }, name = val.name !== "Error" ? val.name : getConstructorName(val); + return hitMaxDepth ? `[${name}]` : `${name} {${printIteratorEntries(Object.entries(entries).values(), config, indentation, depth, refs, printer2)}}`; + } +}; +function isNewPlugin(plugin2) { + return plugin2.serialize != null; +} +function printPlugin(plugin2, val, config, indentation, depth, refs) { + let printed; + try { + printed = isNewPlugin(plugin2) ? plugin2.serialize(val, config, indentation, depth, refs, printer) : plugin2.print(val, (valChild) => printer(valChild, config, indentation, depth, refs), (str) => { + let indentationNext = indentation + config.indent; + return indentationNext + str.replaceAll(NEWLINE_REGEXP, ` +${indentationNext}`); + }, { + edgeSpacing: config.spacingOuter, + min: config.min, + spacing: config.spacingInner + }, config.colors); + } catch (error) { + throw new PrettyFormatPluginError(error.message, error.stack); + } + if (typeof printed != "string") + throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`); + return printed; +} +function findPlugin(plugins2, val) { + for (let plugin2 of plugins2) + try { + if (plugin2.test(val)) + return plugin2; + } catch (error) { + throw new PrettyFormatPluginError(error.message, error.stack); + } + return null; +} +function printer(val, config, indentation, depth, refs, hasCalledToJSON) { + let plugin2 = findPlugin(config.plugins, val); + if (plugin2 !== null) + return printPlugin(plugin2, val, config, indentation, depth, refs); + let basicResult = printBasicValue(val, config.printFunctionName, config.escapeRegex, config.escapeString); + return basicResult !== null ? basicResult : printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON); +} +var DEFAULT_THEME = { + comment: "gray", + content: "reset", + prop: "yellow", + tag: "cyan", + value: "green" +}, DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME), DEFAULT_OPTIONS = { + callToJSON: !0, + compareKeys: void 0, + escapeRegex: !1, + escapeString: !0, + highlight: !1, + indent: 2, + maxDepth: Number.POSITIVE_INFINITY, + maxWidth: Number.POSITIVE_INFINITY, + min: !1, + plugins: [], + printBasicPrototype: !0, + printFunctionName: !0, + theme: DEFAULT_THEME +}; +function validateOptions(options) { + for (let key of Object.keys(options)) + if (!Object.prototype.hasOwnProperty.call(DEFAULT_OPTIONS, key)) + throw new Error(`pretty-format: Unknown option "${key}".`); + if (options.min && options.indent !== void 0 && options.indent !== 0) + throw new Error('pretty-format: Options "min" and "indent" cannot be used together.'); +} +function getColorsHighlight() { + return DEFAULT_THEME_KEYS.reduce((colors, key) => { + let value = DEFAULT_THEME[key], color = value && s[value]; + if (color && typeof color.close == "string" && typeof color.open == "string") + colors[key] = color; + else + throw new Error(`pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`); + return colors; + }, /* @__PURE__ */ Object.create(null)); +} +function getColorsEmpty() { + return DEFAULT_THEME_KEYS.reduce((colors, key) => (colors[key] = { + close: "", + open: "" + }, colors), /* @__PURE__ */ Object.create(null)); +} +function getPrintFunctionName(options) { + return options?.printFunctionName ?? DEFAULT_OPTIONS.printFunctionName; +} +function getEscapeRegex(options) { + return options?.escapeRegex ?? DEFAULT_OPTIONS.escapeRegex; +} +function getEscapeString(options) { + return options?.escapeString ?? DEFAULT_OPTIONS.escapeString; +} +function getConfig(options) { + return { + callToJSON: options?.callToJSON ?? DEFAULT_OPTIONS.callToJSON, + colors: options?.highlight ? getColorsHighlight() : getColorsEmpty(), + compareKeys: typeof options?.compareKeys == "function" || options?.compareKeys === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys, + escapeRegex: getEscapeRegex(options), + escapeString: getEscapeString(options), + indent: options?.min ? "" : createIndent(options?.indent ?? DEFAULT_OPTIONS.indent), + maxDepth: options?.maxDepth ?? DEFAULT_OPTIONS.maxDepth, + maxWidth: options?.maxWidth ?? DEFAULT_OPTIONS.maxWidth, + min: options?.min ?? DEFAULT_OPTIONS.min, + plugins: options?.plugins ?? DEFAULT_OPTIONS.plugins, + printBasicPrototype: options?.printBasicPrototype ?? !0, + printFunctionName: getPrintFunctionName(options), + spacingInner: options?.min ? " " : ` +`, + spacingOuter: options?.min ? "" : ` +` + }; +} +function createIndent(indent) { + return Array.from({ length: indent + 1 }).join(" "); +} +function format(val, options) { + if (options && (validateOptions(options), options.plugins)) { + let plugin2 = findPlugin(options.plugins, val); + if (plugin2 !== null) + return printPlugin(plugin2, val, getConfig(options), "", 0, []); + } + let basicResult = printBasicValue(val, getPrintFunctionName(options), getEscapeRegex(options), getEscapeString(options)); + return basicResult !== null ? basicResult : printComplexValue(val, getConfig(options), "", 0, []); +} +var plugins = { + AsymmetricMatcher: plugin$5, + DOMCollection: plugin$4, + DOMElement: plugin$3, + Immutable: plugin$2, + ReactElement: plugin$1, + ReactTestComponent: plugin, + Error: ErrorPlugin +}; + +// ../../node_modules/loupe/lib/helpers.js +var ansiColors = { + bold: ["1", "22"], + dim: ["2", "22"], + italic: ["3", "23"], + underline: ["4", "24"], + // 5 & 6 are blinking + inverse: ["7", "27"], + hidden: ["8", "28"], + strike: ["9", "29"], + // 10-20 are fonts + // 21-29 are resets for 1-9 + black: ["30", "39"], + red: ["31", "39"], + green: ["32", "39"], + yellow: ["33", "39"], + blue: ["34", "39"], + magenta: ["35", "39"], + cyan: ["36", "39"], + white: ["37", "39"], + brightblack: ["30;1", "39"], + brightred: ["31;1", "39"], + brightgreen: ["32;1", "39"], + brightyellow: ["33;1", "39"], + brightblue: ["34;1", "39"], + brightmagenta: ["35;1", "39"], + brightcyan: ["36;1", "39"], + brightwhite: ["37;1", "39"], + grey: ["90", "39"] +}, styles = { + special: "cyan", + number: "yellow", + bigint: "yellow", + boolean: "yellow", + undefined: "grey", + null: "bold", + string: "green", + symbol: "green", + date: "magenta", + regexp: "red" +}, truncator = "\u2026"; +function colorise(value, styleType) { + let color = ansiColors[styles[styleType]] || ansiColors[styleType] || ""; + return color ? `\x1B[${color[0]}m${String(value)}\x1B[${color[1]}m` : String(value); +} +function normaliseOptions({ + showHidden = !1, + depth = 2, + colors = !1, + customInspect = !0, + showProxy = !1, + maxArrayLength = 1 / 0, + breakLength = 1 / 0, + seen = [], + // eslint-disable-next-line no-shadow + truncate: truncate2 = 1 / 0, + stylize = String +} = {}, inspect3) { + let options = { + showHidden: !!showHidden, + depth: Number(depth), + colors: !!colors, + customInspect: !!customInspect, + showProxy: !!showProxy, + maxArrayLength: Number(maxArrayLength), + breakLength: Number(breakLength), + truncate: Number(truncate2), + seen, + inspect: inspect3, + stylize + }; + return options.colors && (options.stylize = colorise), options; +} +function isHighSurrogate(char) { + return char >= "\uD800" && char <= "\uDBFF"; +} +function truncate(string, length, tail = truncator) { + string = String(string); + let tailLength = tail.length, stringLength = string.length; + if (tailLength > length && stringLength > tailLength) + return tail; + if (stringLength > length && stringLength > tailLength) { + let end = length - tailLength; + return end > 0 && isHighSurrogate(string[end - 1]) && (end = end - 1), `${string.slice(0, end)}${tail}`; + } + return string; +} +function inspectList(list, options, inspectItem, separator = ", ") { + inspectItem = inspectItem || options.inspect; + let size = list.length; + if (size === 0) + return ""; + let originalLength = options.truncate, output = "", peek = "", truncated = ""; + for (let i = 0; i < size; i += 1) { + let last = i + 1 === list.length, secondToLast = i + 2 === list.length; + truncated = `${truncator}(${list.length - i})`; + let value = list[i]; + options.truncate = originalLength - output.length - (last ? 0 : separator.length); + let string = peek || inspectItem(value, options) + (last ? "" : separator), nextLength = output.length + string.length, truncatedLength = nextLength + truncated.length; + if (last && nextLength > originalLength && output.length + truncated.length <= originalLength || !last && !secondToLast && truncatedLength > originalLength || (peek = last ? "" : inspectItem(list[i + 1], options) + (secondToLast ? "" : separator), !last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength)) + break; + if (output += string, !last && !secondToLast && nextLength + peek.length >= originalLength) { + truncated = `${truncator}(${list.length - i - 1})`; + break; + } + truncated = ""; + } + return `${output}${truncated}`; +} +function quoteComplexKey(key) { + return key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/) ? key : JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"); +} +function inspectProperty([key, value], options) { + return options.truncate -= 2, typeof key == "string" ? key = quoteComplexKey(key) : typeof key != "number" && (key = `[${options.inspect(key, options)}]`), options.truncate -= key.length, value = options.inspect(value, options), `${key}: ${value}`; +} + +// ../../node_modules/loupe/lib/array.js +function inspectArray(array, options) { + let nonIndexProperties = Object.keys(array).slice(array.length); + if (!array.length && !nonIndexProperties.length) + return "[]"; + options.truncate -= 4; + let listContents = inspectList(array, options); + options.truncate -= listContents.length; + let propertyContents = ""; + return nonIndexProperties.length && (propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty)), `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ""} ]`; +} + +// ../../node_modules/loupe/lib/typedarray.js +var getArrayName = (array) => typeof Buffer == "function" && array instanceof Buffer ? "Buffer" : array[Symbol.toStringTag] ? array[Symbol.toStringTag] : array.constructor.name; +function inspectTypedArray(array, options) { + let name = getArrayName(array); + options.truncate -= name.length + 4; + let nonIndexProperties = Object.keys(array).slice(array.length); + if (!array.length && !nonIndexProperties.length) + return `${name}[]`; + let output = ""; + for (let i = 0; i < array.length; i++) { + let string = `${options.stylize(truncate(array[i], options.truncate), "number")}${i === array.length - 1 ? "" : ", "}`; + if (options.truncate -= string.length, array[i] !== array.length && options.truncate <= 3) { + output += `${truncator}(${array.length - array[i] + 1})`; + break; + } + output += string; + } + let propertyContents = ""; + return nonIndexProperties.length && (propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty)), `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`; +} + +// ../../node_modules/loupe/lib/date.js +function inspectDate(dateObject, options) { + let stringRepresentation = dateObject.toJSON(); + if (stringRepresentation === null) + return "Invalid Date"; + let split = stringRepresentation.split("T"), date = split[0]; + return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date"); +} + +// ../../node_modules/loupe/lib/function.js +function inspectFunction(func, options) { + let functionType = func[Symbol.toStringTag] || "Function", name = func.name; + return name ? options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, "special") : options.stylize(`[${functionType}]`, "special"); +} + +// ../../node_modules/loupe/lib/map.js +function inspectMapEntry([key, value], options) { + return options.truncate -= 4, key = options.inspect(key, options), options.truncate -= key.length, value = options.inspect(value, options), `${key} => ${value}`; +} +function mapToEntries(map) { + let entries = []; + return map.forEach((value, key) => { + entries.push([key, value]); + }), entries; +} +function inspectMap(map, options) { + return map.size === 0 ? "Map{}" : (options.truncate -= 7, `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`); +} + +// ../../node_modules/loupe/lib/number.js +var isNaN = Number.isNaN || ((i) => i !== i); +function inspectNumber(number, options) { + return isNaN(number) ? options.stylize("NaN", "number") : number === 1 / 0 ? options.stylize("Infinity", "number") : number === -1 / 0 ? options.stylize("-Infinity", "number") : number === 0 ? options.stylize(1 / number === 1 / 0 ? "+0" : "-0", "number") : options.stylize(truncate(String(number), options.truncate), "number"); +} + +// ../../node_modules/loupe/lib/bigint.js +function inspectBigInt(number, options) { + let nums = truncate(number.toString(), options.truncate - 1); + return nums !== truncator && (nums += "n"), options.stylize(nums, "bigint"); +} + +// ../../node_modules/loupe/lib/regexp.js +function inspectRegExp(value, options) { + let flags = value.toString().split("/")[2], sourceLength = options.truncate - (2 + flags.length), source = value.source; + return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp"); +} + +// ../../node_modules/loupe/lib/set.js +function arrayFromSet(set) { + let values = []; + return set.forEach((value) => { + values.push(value); + }), values; +} +function inspectSet(set, options) { + return set.size === 0 ? "Set{}" : (options.truncate -= 7, `Set{ ${inspectList(arrayFromSet(set), options)} }`); +} + +// ../../node_modules/loupe/lib/string.js +var stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g"), escapeCharacters = { + "\b": "\\b", + " ": "\\t", + "\n": "\\n", + "\f": "\\f", + "\r": "\\r", + "'": "\\'", + "\\": "\\\\" +}, hex = 16, unicodeLength = 4; +function escape(char) { + return escapeCharacters[char] || `\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`; +} +function inspectString(string, options) { + return stringEscapeChars.test(string) && (string = string.replace(stringEscapeChars, escape)), options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string"); +} + +// ../../node_modules/loupe/lib/symbol.js +function inspectSymbol(value) { + return "description" in Symbol.prototype ? value.description ? `Symbol(${value.description})` : "Symbol()" : value.toString(); +} + +// ../../node_modules/loupe/lib/promise.js +var getPromiseValue = () => "Promise{\u2026}"; +try { + let { getPromiseDetails, kPending, kRejected } = process.binding("util"); + Array.isArray(getPromiseDetails(Promise.resolve())) && (getPromiseValue = (value, options) => { + let [state, innerValue] = getPromiseDetails(value); + return state === kPending ? "Promise{}" : `Promise${state === kRejected ? "!" : ""}{${options.inspect(innerValue, options)}}`; + }); +} catch { +} +var promise_default = getPromiseValue; + +// ../../node_modules/loupe/lib/object.js +function inspectObject(object, options) { + let properties = Object.getOwnPropertyNames(object), symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : []; + if (properties.length === 0 && symbols.length === 0) + return "{}"; + if (options.truncate -= 4, options.seen = options.seen || [], options.seen.includes(object)) + return "[Circular]"; + options.seen.push(object); + let propertyContents = inspectList(properties.map((key) => [key, object[key]]), options, inspectProperty), symbolContents = inspectList(symbols.map((key) => [key, object[key]]), options, inspectProperty); + options.seen.pop(); + let sep = ""; + return propertyContents && symbolContents && (sep = ", "), `{ ${propertyContents}${sep}${symbolContents} }`; +} + +// ../../node_modules/loupe/lib/class.js +var toStringTag = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1; +function inspectClass(value, options) { + let name = ""; + return toStringTag && toStringTag in value && (name = value[toStringTag]), name = name || value.constructor.name, (!name || name === "_class") && (name = ""), options.truncate -= name.length, `${name}${inspectObject(value, options)}`; +} + +// ../../node_modules/loupe/lib/arguments.js +function inspectArguments(args, options) { + return args.length === 0 ? "Arguments[]" : (options.truncate -= 13, `Arguments[ ${inspectList(args, options)} ]`); +} + +// ../../node_modules/loupe/lib/error.js +var errorKeys = [ + "stack", + "line", + "column", + "name", + "message", + "fileName", + "lineNumber", + "columnNumber", + "number", + "description", + "cause" +]; +function inspectObject2(error, options) { + let properties = Object.getOwnPropertyNames(error).filter((key) => errorKeys.indexOf(key) === -1), name = error.name; + options.truncate -= name.length; + let message = ""; + if (typeof error.message == "string" ? message = truncate(error.message, options.truncate) : properties.unshift("message"), message = message ? `: ${message}` : "", options.truncate -= message.length + 5, options.seen = options.seen || [], options.seen.includes(error)) + return "[Circular]"; + options.seen.push(error); + let propertyContents = inspectList(properties.map((key) => [key, error[key]]), options, inspectProperty); + return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ""}`; +} + +// ../../node_modules/loupe/lib/html.js +function inspectAttribute([key, value], options) { + return options.truncate -= 3, value ? `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}` : `${options.stylize(String(key), "yellow")}`; +} +function inspectNodeCollection(collection, options) { + return inspectList(collection, options, inspectNode, ` +`); +} +function inspectNode(node, options) { + switch (node.nodeType) { + case 1: + return inspectHTML(node, options); + case 3: + return options.inspect(node.data, options); + default: + return options.inspect(node, options); + } +} +function inspectHTML(element, options) { + let properties = element.getAttributeNames(), name = element.tagName.toLowerCase(), head = options.stylize(`<${name}`, "special"), headClose = options.stylize(">", "special"), tail = options.stylize(``, "special"); + options.truncate -= name.length * 2 + 5; + let propertyContents = ""; + properties.length > 0 && (propertyContents += " ", propertyContents += inspectList(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute, " ")), options.truncate -= propertyContents.length; + let truncate2 = options.truncate, children = inspectNodeCollection(element.children, options); + return children && children.length > truncate2 && (children = `${truncator}(${element.children.length})`), `${head}${propertyContents}${headClose}${children}${tail}`; +} + +// ../../node_modules/loupe/lib/index.js +var symbolsSupported = typeof Symbol == "function" && typeof Symbol.for == "function", chaiInspect = symbolsSupported ? /* @__PURE__ */ Symbol.for("chai/inspect") : "@@chai/inspect", nodeInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"), constructorMap = /* @__PURE__ */ new WeakMap(), stringTagMap = {}, baseTypesMap = { + undefined: (value, options) => options.stylize("undefined", "undefined"), + null: (value, options) => options.stylize("null", "null"), + boolean: (value, options) => options.stylize(String(value), "boolean"), + Boolean: (value, options) => options.stylize(String(value), "boolean"), + number: inspectNumber, + Number: inspectNumber, + bigint: inspectBigInt, + BigInt: inspectBigInt, + string: inspectString, + String: inspectString, + function: inspectFunction, + Function: inspectFunction, + symbol: inspectSymbol, + // A Symbol polyfill will return `Symbol` not `symbol` from typedetect + Symbol: inspectSymbol, + Array: inspectArray, + Date: inspectDate, + Map: inspectMap, + Set: inspectSet, + RegExp: inspectRegExp, + Promise: promise_default, + // WeakSet, WeakMap are totally opaque to us + WeakSet: (value, options) => options.stylize("WeakSet{\u2026}", "special"), + WeakMap: (value, options) => options.stylize("WeakMap{\u2026}", "special"), + Arguments: inspectArguments, + Int8Array: inspectTypedArray, + Uint8Array: inspectTypedArray, + Uint8ClampedArray: inspectTypedArray, + Int16Array: inspectTypedArray, + Uint16Array: inspectTypedArray, + Int32Array: inspectTypedArray, + Uint32Array: inspectTypedArray, + Float32Array: inspectTypedArray, + Float64Array: inspectTypedArray, + Generator: () => "", + DataView: () => "", + ArrayBuffer: () => "", + Error: inspectObject2, + HTMLCollection: inspectNodeCollection, + NodeList: inspectNodeCollection +}, inspectCustom = (value, options, type) => chaiInspect in value && typeof value[chaiInspect] == "function" ? value[chaiInspect](options) : nodeInspect in value && typeof value[nodeInspect] == "function" ? value[nodeInspect](options.depth, options) : "inspect" in value && typeof value.inspect == "function" ? value.inspect(options.depth, options) : "constructor" in value && constructorMap.has(value.constructor) ? constructorMap.get(value.constructor)(value, options) : stringTagMap[type] ? stringTagMap[type](value, options) : "", toString2 = Object.prototype.toString; +function inspect(value, opts = {}) { + let options = normaliseOptions(opts, inspect), { customInspect } = options, type = value === null ? "null" : typeof value; + if (type === "object" && (type = toString2.call(value).slice(8, -1)), type in baseTypesMap) + return baseTypesMap[type](value, options); + if (customInspect && value) { + let output = inspectCustom(value, options, type); + if (output) + return typeof output == "string" ? output : inspect(output, options); + } + let proto = value ? Object.getPrototypeOf(value) : !1; + return proto === Object.prototype || proto === null ? inspectObject(value, options) : value && typeof HTMLElement == "function" && value instanceof HTMLElement ? inspectHTML(value, options) : "constructor" in value ? value.constructor !== Object ? inspectClass(value, options) : inspectObject(value, options) : value === Object(value) ? inspectObject(value, options) : options.stylize(String(value), type); +} + +// ../../node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +var { AsymmetricMatcher, DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent } = plugins, PLUGINS = [ + ReactTestComponent, + ReactElement, + DOMElement, + DOMCollection, + Immutable, + AsymmetricMatcher +]; +function stringify(object, maxDepth = 10, { maxLength, ...options } = {}) { + let MAX_LENGTH = maxLength ?? 1e4, result; + try { + result = format(object, { + maxDepth, + escapeString: !1, + plugins: PLUGINS, + ...options + }); + } catch { + result = format(object, { + callToJSON: !1, + maxDepth, + escapeString: !1, + plugins: PLUGINS, + ...options + }); + } + return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(Math.min(maxDepth, Number.MAX_SAFE_INTEGER) / 2), { + maxLength, + ...options + }) : result; +} +var formatRegExp = /%[sdjifoOc%]/g; +function format2(...args) { + if (typeof args[0] != "string") { + let objects = []; + for (let i2 = 0; i2 < args.length; i2++) + objects.push(inspect2(args[i2], { + depth: 0, + colors: !1 + })); + return objects.join(" "); + } + let len = args.length, i = 1, template = args[0], str = String(template).replace(formatRegExp, (x) => { + if (x === "%%") + return "%"; + if (i >= len) + return x; + switch (x) { + case "%s": { + let value = args[i++]; + return typeof value == "bigint" ? `${value.toString()}n` : typeof value == "number" && value === 0 && 1 / value < 0 ? "-0" : typeof value == "object" && value !== null ? typeof value.toString == "function" && value.toString !== Object.prototype.toString ? value.toString() : inspect2(value, { + depth: 0, + colors: !1 + }) : String(value); + } + case "%d": { + let value = args[i++]; + return typeof value == "bigint" ? `${value.toString()}n` : Number(value).toString(); + } + case "%i": { + let value = args[i++]; + return typeof value == "bigint" ? `${value.toString()}n` : Number.parseInt(String(value)).toString(); + } + case "%f": + return Number.parseFloat(String(args[i++])).toString(); + case "%o": + return inspect2(args[i++], { + showHidden: !0, + showProxy: !0 + }); + case "%O": + return inspect2(args[i++]); + case "%c": + return i++, ""; + case "%j": + try { + return JSON.stringify(args[i++]); + } catch (err) { + let m2 = err.message; + if (m2.includes("circular structure") || m2.includes("cyclic structures") || m2.includes("cyclic object")) + return "[Circular]"; + throw err; + } + default: + return x; + } + }); + for (let x = args[i]; i < len; x = args[++i]) + x === null || typeof x != "object" ? str += ` ${x}` : str += ` ${inspect2(x)}`; + return str; +} +function inspect2(obj, options = {}) { + return options.truncate === 0 && (options.truncate = Number.POSITIVE_INFINITY), inspect(obj, options); +} +function getDefaultExportFromCjs2(x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x; +} + +// ../../node_modules/@vitest/utils/dist/helpers.js +function assertTypes(value, name, types) { + let receivedType = typeof value; + if (!types.includes(receivedType)) + throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`); +} +function isObject(item) { + return item != null && typeof item == "object" && !Array.isArray(item); +} +function isFinalObj(obj) { + return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype; +} +function getType2(value) { + return Object.prototype.toString.apply(value).slice(8, -1); +} +function collectOwnProperties(obj, collector) { + let collect = typeof collector == "function" ? collector : (key) => collector.add(key); + Object.getOwnPropertyNames(obj).forEach(collect), Object.getOwnPropertySymbols(obj).forEach(collect); +} +function getOwnProperties(obj) { + let ownProps = /* @__PURE__ */ new Set(); + return isFinalObj(obj) ? [] : (collectOwnProperties(obj, ownProps), Array.from(ownProps)); +} +var defaultCloneOptions = { forceWritable: !1 }; +function deepClone(val, options = defaultCloneOptions) { + return clone(val, /* @__PURE__ */ new WeakMap(), options); +} +function clone(val, seen, options = defaultCloneOptions) { + let k, out; + if (seen.has(val)) + return seen.get(val); + if (Array.isArray(val)) { + for (out = Array.from({ length: k = val.length }), seen.set(val, out); k--; ) + out[k] = clone(val[k], seen, options); + return out; + } + if (Object.prototype.toString.call(val) === "[object Object]") { + out = Object.create(Object.getPrototypeOf(val)), seen.set(val, out); + let props = getOwnProperties(val); + for (let k2 of props) { + let descriptor = Object.getOwnPropertyDescriptor(val, k2); + if (!descriptor) + continue; + let cloned = clone(val[k2], seen, options); + options.forceWritable ? Object.defineProperty(out, k2, { + enumerable: descriptor.enumerable, + configurable: !0, + writable: !0, + value: cloned + }) : "get" in descriptor ? Object.defineProperty(out, k2, { + ...descriptor, + get() { + return cloned; + } + }) : Object.defineProperty(out, k2, { + ...descriptor, + value: cloned + }); + } + return out; + } + return val; +} +function noop() { +} + +// ../../node_modules/@vitest/utils/dist/diff.js +var DIFF_DELETE = -1, DIFF_INSERT = 1, DIFF_EQUAL = 0, Diff = class { + 0; + 1; + constructor(op, text) { + this[0] = op, this[1] = text; + } +}; +function diff_commonPrefix(text1, text2) { + if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) + return 0; + let pointermin = 0, pointermax = Math.min(text1.length, text2.length), pointermid = pointermax, pointerstart = 0; + for (; pointermin < pointermid; ) + text1.substring(pointerstart, pointermid) === text2.substring(pointerstart, pointermid) ? (pointermin = pointermid, pointerstart = pointermin) : pointermax = pointermid, pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); + return pointermid; +} +function diff_commonSuffix(text1, text2) { + if (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) + return 0; + let pointermin = 0, pointermax = Math.min(text1.length, text2.length), pointermid = pointermax, pointerend = 0; + for (; pointermin < pointermid; ) + text1.substring(text1.length - pointermid, text1.length - pointerend) === text2.substring(text2.length - pointermid, text2.length - pointerend) ? (pointermin = pointermid, pointerend = pointermin) : pointermax = pointermid, pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); + return pointermid; +} +function diff_commonOverlap_(text1, text2) { + let text1_length = text1.length, text2_length = text2.length; + if (text1_length === 0 || text2_length === 0) + return 0; + text1_length > text2_length ? text1 = text1.substring(text1_length - text2_length) : text1_length < text2_length && (text2 = text2.substring(0, text1_length)); + let text_length = Math.min(text1_length, text2_length); + if (text1 === text2) + return text_length; + let best = 0, length = 1; + for (; ; ) { + let pattern = text1.substring(text_length - length), found = text2.indexOf(pattern); + if (found === -1) + return best; + length += found, (found === 0 || text1.substring(text_length - length) === text2.substring(0, length)) && (best = length, length++); + } +} +function diff_cleanupSemantic(diffs) { + let changes = !1, equalities = [], equalitiesLength = 0, lastEquality = null, pointer = 0, length_insertions1 = 0, length_deletions1 = 0, length_insertions2 = 0, length_deletions2 = 0; + for (; pointer < diffs.length; ) + diffs[pointer][0] === DIFF_EQUAL ? (equalities[equalitiesLength++] = pointer, length_insertions1 = length_insertions2, length_deletions1 = length_deletions2, length_insertions2 = 0, length_deletions2 = 0, lastEquality = diffs[pointer][1]) : (diffs[pointer][0] === DIFF_INSERT ? length_insertions2 += diffs[pointer][1].length : length_deletions2 += diffs[pointer][1].length, lastEquality && lastEquality.length <= Math.max(length_insertions1, length_deletions1) && lastEquality.length <= Math.max(length_insertions2, length_deletions2) && (diffs.splice(equalities[equalitiesLength - 1], 0, new Diff(DIFF_DELETE, lastEquality)), diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT, equalitiesLength--, equalitiesLength--, pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1, length_insertions1 = 0, length_deletions1 = 0, length_insertions2 = 0, length_deletions2 = 0, lastEquality = null, changes = !0)), pointer++; + for (changes && diff_cleanupMerge(diffs), diff_cleanupSemanticLossless(diffs), pointer = 1; pointer < diffs.length; ) { + if (diffs[pointer - 1][0] === DIFF_DELETE && diffs[pointer][0] === DIFF_INSERT) { + let deletion = diffs[pointer - 1][1], insertion = diffs[pointer][1], overlap_length1 = diff_commonOverlap_(deletion, insertion), overlap_length2 = diff_commonOverlap_(insertion, deletion); + overlap_length1 >= overlap_length2 ? (overlap_length1 >= deletion.length / 2 || overlap_length1 >= insertion.length / 2) && (diffs.splice(pointer, 0, new Diff(DIFF_EQUAL, insertion.substring(0, overlap_length1))), diffs[pointer - 1][1] = deletion.substring(0, deletion.length - overlap_length1), diffs[pointer + 1][1] = insertion.substring(overlap_length1), pointer++) : (overlap_length2 >= deletion.length / 2 || overlap_length2 >= insertion.length / 2) && (diffs.splice(pointer, 0, new Diff(DIFF_EQUAL, deletion.substring(0, overlap_length2))), diffs[pointer - 1][0] = DIFF_INSERT, diffs[pointer - 1][1] = insertion.substring(0, insertion.length - overlap_length2), diffs[pointer + 1][0] = DIFF_DELETE, diffs[pointer + 1][1] = deletion.substring(overlap_length2), pointer++), pointer++; + } + pointer++; + } +} +var nonAlphaNumericRegex_ = /[^a-z0-9]/i, whitespaceRegex_ = /\s/, linebreakRegex_ = /[\r\n]/, blanklineEndRegex_ = /\n\r?\n$/, blanklineStartRegex_ = /^\r?\n\r?\n/; +function diff_cleanupSemanticLossless(diffs) { + let pointer = 1; + for (; pointer < diffs.length - 1; ) { + if (diffs[pointer - 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL) { + let equality1 = diffs[pointer - 1][1], edit = diffs[pointer][1], equality2 = diffs[pointer + 1][1], commonOffset = diff_commonSuffix(equality1, edit); + if (commonOffset) { + let commonString = edit.substring(edit.length - commonOffset); + equality1 = equality1.substring(0, equality1.length - commonOffset), edit = commonString + edit.substring(0, edit.length - commonOffset), equality2 = commonString + equality2; + } + let bestEquality1 = equality1, bestEdit = edit, bestEquality2 = equality2, bestScore = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit, equality2); + for (; edit.charAt(0) === equality2.charAt(0); ) { + equality1 += edit.charAt(0), edit = edit.substring(1) + equality2.charAt(0), equality2 = equality2.substring(1); + let score = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit, equality2); + score >= bestScore && (bestScore = score, bestEquality1 = equality1, bestEdit = edit, bestEquality2 = equality2); + } + diffs[pointer - 1][1] !== bestEquality1 && (bestEquality1 ? diffs[pointer - 1][1] = bestEquality1 : (diffs.splice(pointer - 1, 1), pointer--), diffs[pointer][1] = bestEdit, bestEquality2 ? diffs[pointer + 1][1] = bestEquality2 : (diffs.splice(pointer + 1, 1), pointer--)); + } + pointer++; + } +} +function diff_cleanupMerge(diffs) { + diffs.push(new Diff(DIFF_EQUAL, "")); + let pointer = 0, count_delete = 0, count_insert = 0, text_delete = "", text_insert = "", commonlength; + for (; pointer < diffs.length; ) + switch (diffs[pointer][0]) { + case DIFF_INSERT: + count_insert++, text_insert += diffs[pointer][1], pointer++; + break; + case DIFF_DELETE: + count_delete++, text_delete += diffs[pointer][1], pointer++; + break; + case DIFF_EQUAL: + count_delete + count_insert > 1 ? (count_delete !== 0 && count_insert !== 0 && (commonlength = diff_commonPrefix(text_insert, text_delete), commonlength !== 0 && (pointer - count_delete - count_insert > 0 && diffs[pointer - count_delete - count_insert - 1][0] === DIFF_EQUAL ? diffs[pointer - count_delete - count_insert - 1][1] += text_insert.substring(0, commonlength) : (diffs.splice(0, 0, new Diff(DIFF_EQUAL, text_insert.substring(0, commonlength))), pointer++), text_insert = text_insert.substring(commonlength), text_delete = text_delete.substring(commonlength)), commonlength = diff_commonSuffix(text_insert, text_delete), commonlength !== 0 && (diffs[pointer][1] = text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1], text_insert = text_insert.substring(0, text_insert.length - commonlength), text_delete = text_delete.substring(0, text_delete.length - commonlength))), pointer -= count_delete + count_insert, diffs.splice(pointer, count_delete + count_insert), text_delete.length && (diffs.splice(pointer, 0, new Diff(DIFF_DELETE, text_delete)), pointer++), text_insert.length && (diffs.splice(pointer, 0, new Diff(DIFF_INSERT, text_insert)), pointer++), pointer++) : pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL ? (diffs[pointer - 1][1] += diffs[pointer][1], diffs.splice(pointer, 1)) : pointer++, count_insert = 0, count_delete = 0, text_delete = "", text_insert = ""; + break; + } + diffs[diffs.length - 1][1] === "" && diffs.pop(); + let changes = !1; + for (pointer = 1; pointer < diffs.length - 1; ) + diffs[pointer - 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL && (diffs[pointer][1].substring(diffs[pointer][1].length - diffs[pointer - 1][1].length) === diffs[pointer - 1][1] ? (diffs[pointer][1] = diffs[pointer - 1][1] + diffs[pointer][1].substring(0, diffs[pointer][1].length - diffs[pointer - 1][1].length), diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1], diffs.splice(pointer - 1, 1), changes = !0) : diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) === diffs[pointer + 1][1] && (diffs[pointer - 1][1] += diffs[pointer + 1][1], diffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer + 1][1].length) + diffs[pointer + 1][1], diffs.splice(pointer + 1, 1), changes = !0)), pointer++; + changes && diff_cleanupMerge(diffs); +} +function diff_cleanupSemanticScore_(one, two) { + if (!one || !two) + return 6; + let char1 = one.charAt(one.length - 1), char2 = two.charAt(0), nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_), nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_), whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_), whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_), lineBreak1 = whitespace1 && char1.match(linebreakRegex_), lineBreak2 = whitespace2 && char2.match(linebreakRegex_), blankLine1 = lineBreak1 && one.match(blanklineEndRegex_), blankLine2 = lineBreak2 && two.match(blanklineStartRegex_); + return blankLine1 || blankLine2 ? 5 : lineBreak1 || lineBreak2 ? 4 : nonAlphaNumeric1 && !whitespace1 && whitespace2 ? 3 : whitespace1 || whitespace2 ? 2 : nonAlphaNumeric1 || nonAlphaNumeric2 ? 1 : 0; +} +var NO_DIFF_MESSAGE = "Compared values have no visual difference.", SIMILAR_MESSAGE = "Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.", build = {}, hasRequiredBuild; +function requireBuild() { + if (hasRequiredBuild) return build; + hasRequiredBuild = 1, Object.defineProperty(build, "__esModule", { + value: !0 + }), build.default = diffSequence; + let pkg = "diff-sequences", NOT_YET_SET = 0, countCommonItemsF = (aIndex, aEnd, bIndex, bEnd, isCommon) => { + let nCommon = 0; + for (; aIndex < aEnd && bIndex < bEnd && isCommon(aIndex, bIndex); ) + aIndex += 1, bIndex += 1, nCommon += 1; + return nCommon; + }, countCommonItemsR = (aStart, aIndex, bStart, bIndex, isCommon) => { + let nCommon = 0; + for (; aStart <= aIndex && bStart <= bIndex && isCommon(aIndex, bIndex); ) + aIndex -= 1, bIndex -= 1, nCommon += 1; + return nCommon; + }, extendPathsF = (d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF) => { + let iF = 0, kF = -d, aFirst = aIndexesF[iF], aIndexPrev1 = aFirst; + aIndexesF[iF] += countCommonItemsF( + aFirst + 1, + aEnd, + bF + aFirst - kF + 1, + bEnd, + isCommon + ); + let nF = d < iMaxF ? d : iMaxF; + for (iF += 1, kF += 2; iF <= nF; iF += 1, kF += 2) { + if (iF !== d && aIndexPrev1 < aIndexesF[iF]) + aFirst = aIndexesF[iF]; + else if (aFirst = aIndexPrev1 + 1, aEnd <= aFirst) + return iF - 1; + aIndexPrev1 = aIndexesF[iF], aIndexesF[iF] = aFirst + countCommonItemsF(aFirst + 1, aEnd, bF + aFirst - kF + 1, bEnd, isCommon); + } + return iMaxF; + }, extendPathsR = (d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR) => { + let iR = 0, kR = d, aFirst = aIndexesR[iR], aIndexPrev1 = aFirst; + aIndexesR[iR] -= countCommonItemsR( + aStart, + aFirst - 1, + bStart, + bR + aFirst - kR - 1, + isCommon + ); + let nR = d < iMaxR ? d : iMaxR; + for (iR += 1, kR -= 2; iR <= nR; iR += 1, kR -= 2) { + if (iR !== d && aIndexesR[iR] < aIndexPrev1) + aFirst = aIndexesR[iR]; + else if (aFirst = aIndexPrev1 - 1, aFirst < aStart) + return iR - 1; + aIndexPrev1 = aIndexesR[iR], aIndexesR[iR] = aFirst - countCommonItemsR( + aStart, + aFirst - 1, + bStart, + bR + aFirst - kR - 1, + isCommon + ); + } + return iMaxR; + }, extendOverlappablePathsF = (d, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, iMaxF, aIndexesR, iMaxR, division) => { + let bF = bStart - aStart, aLength = aEnd - aStart, baDeltaLength = bEnd - bStart - aLength, kMinOverlapF = -baDeltaLength - (d - 1), kMaxOverlapF = -baDeltaLength + (d - 1), aIndexPrev1 = NOT_YET_SET, nF = d < iMaxF ? d : iMaxF; + for (let iF = 0, kF = -d; iF <= nF; iF += 1, kF += 2) { + let insert = iF === 0 || iF !== d && aIndexPrev1 < aIndexesF[iF], aLastPrev = insert ? aIndexesF[iF] : aIndexPrev1, aFirst = insert ? aLastPrev : aLastPrev + 1, bFirst = bF + aFirst - kF, nCommonF = countCommonItemsF( + aFirst + 1, + aEnd, + bFirst + 1, + bEnd, + isCommon + ), aLast = aFirst + nCommonF; + if (aIndexPrev1 = aIndexesF[iF], aIndexesF[iF] = aLast, kMinOverlapF <= kF && kF <= kMaxOverlapF) { + let iR = (d - 1 - (kF + baDeltaLength)) / 2; + if (iR <= iMaxR && aIndexesR[iR] - 1 <= aLast) { + let bLastPrev = bF + aLastPrev - (insert ? kF + 1 : kF - 1), nCommonR = countCommonItemsR( + aStart, + aLastPrev, + bStart, + bLastPrev, + isCommon + ), aIndexPrevFirst = aLastPrev - nCommonR, bIndexPrevFirst = bLastPrev - nCommonR, aEndPreceding = aIndexPrevFirst + 1, bEndPreceding = bIndexPrevFirst + 1; + division.nChangePreceding = d - 1, d - 1 === aEndPreceding + bEndPreceding - aStart - bStart ? (division.aEndPreceding = aStart, division.bEndPreceding = bStart) : (division.aEndPreceding = aEndPreceding, division.bEndPreceding = bEndPreceding), division.nCommonPreceding = nCommonR, nCommonR !== 0 && (division.aCommonPreceding = aEndPreceding, division.bCommonPreceding = bEndPreceding), division.nCommonFollowing = nCommonF, nCommonF !== 0 && (division.aCommonFollowing = aFirst + 1, division.bCommonFollowing = bFirst + 1); + let aStartFollowing = aLast + 1, bStartFollowing = bFirst + nCommonF + 1; + return division.nChangeFollowing = d - 1, d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing ? (division.aStartFollowing = aEnd, division.bStartFollowing = bEnd) : (division.aStartFollowing = aStartFollowing, division.bStartFollowing = bStartFollowing), !0; + } + } + } + return !1; + }, extendOverlappablePathsR = (d, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, iMaxF, aIndexesR, iMaxR, division) => { + let bR = bEnd - aEnd, aLength = aEnd - aStart, baDeltaLength = bEnd - bStart - aLength, kMinOverlapR = baDeltaLength - d, kMaxOverlapR = baDeltaLength + d, aIndexPrev1 = NOT_YET_SET, nR = d < iMaxR ? d : iMaxR; + for (let iR = 0, kR = d; iR <= nR; iR += 1, kR -= 2) { + let insert = iR === 0 || iR !== d && aIndexesR[iR] < aIndexPrev1, aLastPrev = insert ? aIndexesR[iR] : aIndexPrev1, aFirst = insert ? aLastPrev : aLastPrev - 1, bFirst = bR + aFirst - kR, nCommonR = countCommonItemsR( + aStart, + aFirst - 1, + bStart, + bFirst - 1, + isCommon + ), aLast = aFirst - nCommonR; + if (aIndexPrev1 = aIndexesR[iR], aIndexesR[iR] = aLast, kMinOverlapR <= kR && kR <= kMaxOverlapR) { + let iF = (d + (kR - baDeltaLength)) / 2; + if (iF <= iMaxF && aLast - 1 <= aIndexesF[iF]) { + let bLast = bFirst - nCommonR; + if (division.nChangePreceding = d, d === aLast + bLast - aStart - bStart ? (division.aEndPreceding = aStart, division.bEndPreceding = bStart) : (division.aEndPreceding = aLast, division.bEndPreceding = bLast), division.nCommonPreceding = nCommonR, nCommonR !== 0 && (division.aCommonPreceding = aLast, division.bCommonPreceding = bLast), division.nChangeFollowing = d - 1, d === 1) + division.nCommonFollowing = 0, division.aStartFollowing = aEnd, division.bStartFollowing = bEnd; + else { + let bLastPrev = bR + aLastPrev - (insert ? kR - 1 : kR + 1), nCommonF = countCommonItemsF( + aLastPrev, + aEnd, + bLastPrev, + bEnd, + isCommon + ); + division.nCommonFollowing = nCommonF, nCommonF !== 0 && (division.aCommonFollowing = aLastPrev, division.bCommonFollowing = bLastPrev); + let aStartFollowing = aLastPrev + nCommonF, bStartFollowing = bLastPrev + nCommonF; + d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing ? (division.aStartFollowing = aEnd, division.bStartFollowing = bEnd) : (division.aStartFollowing = aStartFollowing, division.bStartFollowing = bStartFollowing); + } + return !0; + } + } + } + return !1; + }, divide = (nChange, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, aIndexesR, division) => { + let bF = bStart - aStart, bR = bEnd - aEnd, aLength = aEnd - aStart, bLength = bEnd - bStart, baDeltaLength = bLength - aLength, iMaxF = aLength, iMaxR = aLength; + if (aIndexesF[0] = aStart - 1, aIndexesR[0] = aEnd, baDeltaLength % 2 === 0) { + let dMin = (nChange || baDeltaLength) / 2, dMax = (aLength + bLength) / 2; + for (let d = 1; d <= dMax; d += 1) + if (iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF), d < dMin) + iMaxR = extendPathsR(d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR); + else if ( + // If a reverse path overlaps a forward path in the same diagonal, + // return a division of the index intervals at the middle change. + extendOverlappablePathsR( + d, + aStart, + aEnd, + bStart, + bEnd, + isCommon, + aIndexesF, + iMaxF, + aIndexesR, + iMaxR, + division + ) + ) + return; + } else { + let dMin = ((nChange || baDeltaLength) + 1) / 2, dMax = (aLength + bLength + 1) / 2, d = 1; + for (iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF), d += 1; d <= dMax; d += 1) + if (iMaxR = extendPathsR( + d - 1, + aStart, + bStart, + bR, + isCommon, + aIndexesR, + iMaxR + ), d < dMin) + iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF); + else if ( + // If a forward path overlaps a reverse path in the same diagonal, + // return a division of the index intervals at the middle change. + extendOverlappablePathsF( + d, + aStart, + aEnd, + bStart, + bEnd, + isCommon, + aIndexesF, + iMaxF, + aIndexesR, + iMaxR, + division + ) + ) + return; + } + throw new Error( + `${pkg}: no overlap aStart=${aStart} aEnd=${aEnd} bStart=${bStart} bEnd=${bEnd}` + ); + }, findSubsequences = (nChange, aStart, aEnd, bStart, bEnd, transposed, callbacks, aIndexesF, aIndexesR, division) => { + if (bEnd - bStart < aEnd - aStart) { + if (transposed = !transposed, transposed && callbacks.length === 1) { + let { foundSubsequence: foundSubsequence2, isCommon: isCommon2 } = callbacks[0]; + callbacks[1] = { + foundSubsequence: (nCommon, bCommon, aCommon) => { + foundSubsequence2(nCommon, aCommon, bCommon); + }, + isCommon: (bIndex, aIndex) => isCommon2(aIndex, bIndex) + }; + } + let tStart = aStart, tEnd = aEnd; + aStart = bStart, aEnd = bEnd, bStart = tStart, bEnd = tEnd; + } + let { foundSubsequence, isCommon } = callbacks[transposed ? 1 : 0]; + divide( + nChange, + aStart, + aEnd, + bStart, + bEnd, + isCommon, + aIndexesF, + aIndexesR, + division + ); + let { + nChangePreceding, + aEndPreceding, + bEndPreceding, + nCommonPreceding, + aCommonPreceding, + bCommonPreceding, + nCommonFollowing, + aCommonFollowing, + bCommonFollowing, + nChangeFollowing, + aStartFollowing, + bStartFollowing + } = division; + aStart < aEndPreceding && bStart < bEndPreceding && findSubsequences( + nChangePreceding, + aStart, + aEndPreceding, + bStart, + bEndPreceding, + transposed, + callbacks, + aIndexesF, + aIndexesR, + division + ), nCommonPreceding !== 0 && foundSubsequence(nCommonPreceding, aCommonPreceding, bCommonPreceding), nCommonFollowing !== 0 && foundSubsequence(nCommonFollowing, aCommonFollowing, bCommonFollowing), aStartFollowing < aEnd && bStartFollowing < bEnd && findSubsequences( + nChangeFollowing, + aStartFollowing, + aEnd, + bStartFollowing, + bEnd, + transposed, + callbacks, + aIndexesF, + aIndexesR, + division + ); + }, validateLength = (name, arg) => { + if (typeof arg != "number") + throw new TypeError(`${pkg}: ${name} typeof ${typeof arg} is not a number`); + if (!Number.isSafeInteger(arg)) + throw new RangeError(`${pkg}: ${name} value ${arg} is not a safe integer`); + if (arg < 0) + throw new RangeError(`${pkg}: ${name} value ${arg} is a negative integer`); + }, validateCallback = (name, arg) => { + let type = typeof arg; + if (type !== "function") + throw new TypeError(`${pkg}: ${name} typeof ${type} is not a function`); + }; + function diffSequence(aLength, bLength, isCommon, foundSubsequence) { + validateLength("aLength", aLength), validateLength("bLength", bLength), validateCallback("isCommon", isCommon), validateCallback("foundSubsequence", foundSubsequence); + let nCommonF = countCommonItemsF(0, aLength, 0, bLength, isCommon); + if (nCommonF !== 0 && foundSubsequence(nCommonF, 0, 0), aLength !== nCommonF || bLength !== nCommonF) { + let aStart = nCommonF, bStart = nCommonF, nCommonR = countCommonItemsR( + aStart, + aLength - 1, + bStart, + bLength - 1, + isCommon + ), aEnd = aLength - nCommonR, bEnd = bLength - nCommonR, nCommonFR = nCommonF + nCommonR; + aLength !== nCommonFR && bLength !== nCommonFR && findSubsequences( + 0, + aStart, + aEnd, + bStart, + bEnd, + !1, + [ + { + foundSubsequence, + isCommon + } + ], + [NOT_YET_SET], + [NOT_YET_SET], + { + aCommonFollowing: NOT_YET_SET, + aCommonPreceding: NOT_YET_SET, + aEndPreceding: NOT_YET_SET, + aStartFollowing: NOT_YET_SET, + bCommonFollowing: NOT_YET_SET, + bCommonPreceding: NOT_YET_SET, + bEndPreceding: NOT_YET_SET, + bStartFollowing: NOT_YET_SET, + nChangeFollowing: NOT_YET_SET, + nChangePreceding: NOT_YET_SET, + nCommonFollowing: NOT_YET_SET, + nCommonPreceding: NOT_YET_SET + } + ), nCommonR !== 0 && foundSubsequence(nCommonR, aEnd, bEnd); + } + } + return build; +} +var buildExports = requireBuild(), diffSequences = getDefaultExportFromCjs2(buildExports); +function formatTrailingSpaces(line, trailingSpaceFormatter) { + return line.replace(/\s+$/, (match) => trailingSpaceFormatter(match)); +} +function printDiffLine(line, isFirstOrLast, color, indicator, trailingSpaceFormatter, emptyFirstOrLastLinePlaceholder) { + return line.length !== 0 ? color(`${indicator} ${formatTrailingSpaces(line, trailingSpaceFormatter)}`) : indicator !== " " ? color(indicator) : isFirstOrLast && emptyFirstOrLastLinePlaceholder.length !== 0 ? color(`${indicator} ${emptyFirstOrLastLinePlaceholder}`) : ""; +} +function printDeleteLine(line, isFirstOrLast, { aColor, aIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder }) { + return printDiffLine(line, isFirstOrLast, aColor, aIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder); +} +function printInsertLine(line, isFirstOrLast, { bColor, bIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder }) { + return printDiffLine(line, isFirstOrLast, bColor, bIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder); +} +function printCommonLine(line, isFirstOrLast, { commonColor, commonIndicator, commonLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder }) { + return printDiffLine(line, isFirstOrLast, commonColor, commonIndicator, commonLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder); +} +function createPatchMark(aStart, aEnd, bStart, bEnd, { patchColor }) { + return patchColor(`@@ -${aStart + 1},${aEnd - aStart} +${bStart + 1},${bEnd - bStart} @@`); +} +function joinAlignedDiffsNoExpand(diffs, options) { + let iLength = diffs.length, nContextLines = options.contextLines, nContextLines2 = nContextLines + nContextLines, jLength = iLength, hasExcessAtStartOrEnd = !1, nExcessesBetweenChanges = 0, i = 0; + for (; i !== iLength; ) { + let iStart = i; + for (; i !== iLength && diffs[i][0] === DIFF_EQUAL; ) + i += 1; + if (iStart !== i) + if (iStart === 0) + i > nContextLines && (jLength -= i - nContextLines, hasExcessAtStartOrEnd = !0); + else if (i === iLength) { + let n = i - iStart; + n > nContextLines && (jLength -= n - nContextLines, hasExcessAtStartOrEnd = !0); + } else { + let n = i - iStart; + n > nContextLines2 && (jLength -= n - nContextLines2, nExcessesBetweenChanges += 1); + } + for (; i !== iLength && diffs[i][0] !== DIFF_EQUAL; ) + i += 1; + } + let hasPatch = nExcessesBetweenChanges !== 0 || hasExcessAtStartOrEnd; + nExcessesBetweenChanges !== 0 ? jLength += nExcessesBetweenChanges + 1 : hasExcessAtStartOrEnd && (jLength += 1); + let jLast = jLength - 1, lines = [], jPatchMark = 0; + hasPatch && lines.push(""); + let aStart = 0, bStart = 0, aEnd = 0, bEnd = 0, pushCommonLine = (line) => { + let j = lines.length; + lines.push(printCommonLine(line, j === 0 || j === jLast, options)), aEnd += 1, bEnd += 1; + }, pushDeleteLine = (line) => { + let j = lines.length; + lines.push(printDeleteLine(line, j === 0 || j === jLast, options)), aEnd += 1; + }, pushInsertLine = (line) => { + let j = lines.length; + lines.push(printInsertLine(line, j === 0 || j === jLast, options)), bEnd += 1; + }; + for (i = 0; i !== iLength; ) { + let iStart = i; + for (; i !== iLength && diffs[i][0] === DIFF_EQUAL; ) + i += 1; + if (iStart !== i) + if (iStart === 0) { + i > nContextLines && (iStart = i - nContextLines, aStart = iStart, bStart = iStart, aEnd = aStart, bEnd = bStart); + for (let iCommon = iStart; iCommon !== i; iCommon += 1) + pushCommonLine(diffs[iCommon][1]); + } else if (i === iLength) { + let iEnd = i - iStart > nContextLines ? iStart + nContextLines : i; + for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1) + pushCommonLine(diffs[iCommon][1]); + } else { + let nCommon = i - iStart; + if (nCommon > nContextLines2) { + let iEnd = iStart + nContextLines; + for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1) + pushCommonLine(diffs[iCommon][1]); + lines[jPatchMark] = createPatchMark(aStart, aEnd, bStart, bEnd, options), jPatchMark = lines.length, lines.push(""); + let nOmit = nCommon - nContextLines2; + aStart = aEnd + nOmit, bStart = bEnd + nOmit, aEnd = aStart, bEnd = bStart; + for (let iCommon = i - nContextLines; iCommon !== i; iCommon += 1) + pushCommonLine(diffs[iCommon][1]); + } else + for (let iCommon = iStart; iCommon !== i; iCommon += 1) + pushCommonLine(diffs[iCommon][1]); + } + for (; i !== iLength && diffs[i][0] === DIFF_DELETE; ) + pushDeleteLine(diffs[i][1]), i += 1; + for (; i !== iLength && diffs[i][0] === DIFF_INSERT; ) + pushInsertLine(diffs[i][1]), i += 1; + } + return hasPatch && (lines[jPatchMark] = createPatchMark(aStart, aEnd, bStart, bEnd, options)), lines.join(` +`); +} +function joinAlignedDiffsExpand(diffs, options) { + return diffs.map((diff2, i, diffs2) => { + let line = diff2[1], isFirstOrLast = i === 0 || i === diffs2.length - 1; + switch (diff2[0]) { + case DIFF_DELETE: + return printDeleteLine(line, isFirstOrLast, options); + case DIFF_INSERT: + return printInsertLine(line, isFirstOrLast, options); + default: + return printCommonLine(line, isFirstOrLast, options); + } + }).join(` +`); +} +var noColor = (string) => string, DIFF_CONTEXT_DEFAULT = 5, DIFF_TRUNCATE_THRESHOLD_DEFAULT = 0; +function getDefaultOptions() { + return { + aAnnotation: "Expected", + aColor: s.green, + aIndicator: "-", + bAnnotation: "Received", + bColor: s.red, + bIndicator: "+", + changeColor: s.inverse, + changeLineTrailingSpaceColor: noColor, + commonColor: s.dim, + commonIndicator: " ", + commonLineTrailingSpaceColor: noColor, + compareKeys: void 0, + contextLines: DIFF_CONTEXT_DEFAULT, + emptyFirstOrLastLinePlaceholder: "", + expand: !1, + includeChangeCounts: !1, + omitAnnotationLines: !1, + patchColor: s.yellow, + printBasicPrototype: !1, + truncateThreshold: DIFF_TRUNCATE_THRESHOLD_DEFAULT, + truncateAnnotation: "... Diff result is truncated", + truncateAnnotationColor: noColor + }; +} +function getCompareKeys(compareKeys) { + return compareKeys && typeof compareKeys == "function" ? compareKeys : void 0; +} +function getContextLines(contextLines) { + return typeof contextLines == "number" && Number.isSafeInteger(contextLines) && contextLines >= 0 ? contextLines : DIFF_CONTEXT_DEFAULT; +} +function normalizeDiffOptions(options = {}) { + return { + ...getDefaultOptions(), + ...options, + compareKeys: getCompareKeys(options.compareKeys), + contextLines: getContextLines(options.contextLines) + }; +} +function isEmptyString(lines) { + return lines.length === 1 && lines[0].length === 0; +} +function countChanges(diffs) { + let a2 = 0, b = 0; + return diffs.forEach((diff2) => { + switch (diff2[0]) { + case DIFF_DELETE: + a2 += 1; + break; + case DIFF_INSERT: + b += 1; + break; + } + }), { + a: a2, + b + }; +} +function printAnnotation({ aAnnotation, aColor, aIndicator, bAnnotation, bColor, bIndicator, includeChangeCounts, omitAnnotationLines }, changeCounts) { + if (omitAnnotationLines) + return ""; + let aRest = "", bRest = ""; + if (includeChangeCounts) { + let aCount = String(changeCounts.a), bCount = String(changeCounts.b), baAnnotationLengthDiff = bAnnotation.length - aAnnotation.length, aAnnotationPadding = " ".repeat(Math.max(0, baAnnotationLengthDiff)), bAnnotationPadding = " ".repeat(Math.max(0, -baAnnotationLengthDiff)), baCountLengthDiff = bCount.length - aCount.length, aCountPadding = " ".repeat(Math.max(0, baCountLengthDiff)), bCountPadding = " ".repeat(Math.max(0, -baCountLengthDiff)); + aRest = `${aAnnotationPadding} ${aIndicator} ${aCountPadding}${aCount}`, bRest = `${bAnnotationPadding} ${bIndicator} ${bCountPadding}${bCount}`; + } + let a2 = `${aIndicator} ${aAnnotation}${aRest}`, b = `${bIndicator} ${bAnnotation}${bRest}`; + return `${aColor(a2)} +${bColor(b)} + +`; +} +function printDiffLines(diffs, truncated, options) { + return printAnnotation(options, countChanges(diffs)) + (options.expand ? joinAlignedDiffsExpand(diffs, options) : joinAlignedDiffsNoExpand(diffs, options)) + (truncated ? options.truncateAnnotationColor(` +${options.truncateAnnotation}`) : ""); +} +function diffLinesUnified(aLines, bLines, options) { + let normalizedOptions = normalizeDiffOptions(options), [diffs, truncated] = diffLinesRaw(isEmptyString(aLines) ? [] : aLines, isEmptyString(bLines) ? [] : bLines, normalizedOptions); + return printDiffLines(diffs, truncated, normalizedOptions); +} +function diffLinesUnified2(aLinesDisplay, bLinesDisplay, aLinesCompare, bLinesCompare, options) { + if (isEmptyString(aLinesDisplay) && isEmptyString(aLinesCompare) && (aLinesDisplay = [], aLinesCompare = []), isEmptyString(bLinesDisplay) && isEmptyString(bLinesCompare) && (bLinesDisplay = [], bLinesCompare = []), aLinesDisplay.length !== aLinesCompare.length || bLinesDisplay.length !== bLinesCompare.length) + return diffLinesUnified(aLinesDisplay, bLinesDisplay, options); + let [diffs, truncated] = diffLinesRaw(aLinesCompare, bLinesCompare, options), aIndex = 0, bIndex = 0; + return diffs.forEach((diff2) => { + switch (diff2[0]) { + case DIFF_DELETE: + diff2[1] = aLinesDisplay[aIndex], aIndex += 1; + break; + case DIFF_INSERT: + diff2[1] = bLinesDisplay[bIndex], bIndex += 1; + break; + default: + diff2[1] = bLinesDisplay[bIndex], aIndex += 1, bIndex += 1; + } + }), printDiffLines(diffs, truncated, normalizeDiffOptions(options)); +} +function diffLinesRaw(aLines, bLines, options) { + let truncate2 = options?.truncateThreshold ?? !1, truncateThreshold = Math.max(Math.floor(options?.truncateThreshold ?? 0), 0), aLength = truncate2 ? Math.min(aLines.length, truncateThreshold) : aLines.length, bLength = truncate2 ? Math.min(bLines.length, truncateThreshold) : bLines.length, truncated = aLength !== aLines.length || bLength !== bLines.length, isCommon = (aIndex2, bIndex2) => aLines[aIndex2] === bLines[bIndex2], diffs = [], aIndex = 0, bIndex = 0; + for (diffSequences(aLength, bLength, isCommon, (nCommon, aCommon, bCommon) => { + for (; aIndex !== aCommon; aIndex += 1) + diffs.push(new Diff(DIFF_DELETE, aLines[aIndex])); + for (; bIndex !== bCommon; bIndex += 1) + diffs.push(new Diff(DIFF_INSERT, bLines[bIndex])); + for (; nCommon !== 0; nCommon -= 1, aIndex += 1, bIndex += 1) + diffs.push(new Diff(DIFF_EQUAL, bLines[bIndex])); + }); aIndex !== aLength; aIndex += 1) + diffs.push(new Diff(DIFF_DELETE, aLines[aIndex])); + for (; bIndex !== bLength; bIndex += 1) + diffs.push(new Diff(DIFF_INSERT, bLines[bIndex])); + return [diffs, truncated]; +} +function getType3(value) { + if (value === void 0) + return "undefined"; + if (value === null) + return "null"; + if (Array.isArray(value)) + return "array"; + if (typeof value == "boolean") + return "boolean"; + if (typeof value == "function") + return "function"; + if (typeof value == "number") + return "number"; + if (typeof value == "string") + return "string"; + if (typeof value == "bigint") + return "bigint"; + if (typeof value == "object") { + if (value != null) { + if (value.constructor === RegExp) + return "regexp"; + if (value.constructor === Map) + return "map"; + if (value.constructor === Set) + return "set"; + if (value.constructor === Date) + return "date"; + } + return "object"; + } else if (typeof value == "symbol") + return "symbol"; + throw new Error(`value of unknown type: ${value}`); +} +function getNewLineSymbol(string) { + return string.includes(`\r +`) ? `\r +` : ` +`; +} +function diffStrings(a2, b, options) { + let truncate2 = options?.truncateThreshold ?? !1, truncateThreshold = Math.max(Math.floor(options?.truncateThreshold ?? 0), 0), aLength = a2.length, bLength = b.length; + if (truncate2) { + let aMultipleLines = a2.includes(` +`), bMultipleLines = b.includes(` +`), aNewLineSymbol = getNewLineSymbol(a2), bNewLineSymbol = getNewLineSymbol(b), _a = aMultipleLines ? `${a2.split(aNewLineSymbol, truncateThreshold).join(aNewLineSymbol)} +` : a2, _b = bMultipleLines ? `${b.split(bNewLineSymbol, truncateThreshold).join(bNewLineSymbol)} +` : b; + aLength = _a.length, bLength = _b.length; + } + let truncated = aLength !== a2.length || bLength !== b.length, isCommon = (aIndex2, bIndex2) => a2[aIndex2] === b[bIndex2], aIndex = 0, bIndex = 0, diffs = []; + return diffSequences(aLength, bLength, isCommon, (nCommon, aCommon, bCommon) => { + aIndex !== aCommon && diffs.push(new Diff(DIFF_DELETE, a2.slice(aIndex, aCommon))), bIndex !== bCommon && diffs.push(new Diff(DIFF_INSERT, b.slice(bIndex, bCommon))), aIndex = aCommon + nCommon, bIndex = bCommon + nCommon, diffs.push(new Diff(DIFF_EQUAL, b.slice(bCommon, bIndex))); + }), aIndex !== aLength && diffs.push(new Diff(DIFF_DELETE, a2.slice(aIndex))), bIndex !== bLength && diffs.push(new Diff(DIFF_INSERT, b.slice(bIndex))), [diffs, truncated]; +} +function concatenateRelevantDiffs(op, diffs, changeColor) { + return diffs.reduce((reduced, diff2) => reduced + (diff2[0] === DIFF_EQUAL ? diff2[1] : diff2[0] === op && diff2[1].length !== 0 ? changeColor(diff2[1]) : ""), ""); +} +var ChangeBuffer = class { + op; + line; + lines; + changeColor; + constructor(op, changeColor) { + this.op = op, this.line = [], this.lines = [], this.changeColor = changeColor; + } + pushSubstring(substring) { + this.pushDiff(new Diff(this.op, substring)); + } + pushLine() { + this.lines.push(this.line.length !== 1 ? new Diff(this.op, concatenateRelevantDiffs(this.op, this.line, this.changeColor)) : this.line[0][0] === this.op ? this.line[0] : new Diff(this.op, this.line[0][1])), this.line.length = 0; + } + isLineEmpty() { + return this.line.length === 0; + } + // Minor input to buffer. + pushDiff(diff2) { + this.line.push(diff2); + } + // Main input to buffer. + align(diff2) { + let string = diff2[1]; + if (string.includes(` +`)) { + let substrings = string.split(` +`), iLast = substrings.length - 1; + substrings.forEach((substring, i) => { + i < iLast ? (this.pushSubstring(substring), this.pushLine()) : substring.length !== 0 && this.pushSubstring(substring); + }); + } else + this.pushDiff(diff2); + } + // Output from buffer. + moveLinesTo(lines) { + this.isLineEmpty() || this.pushLine(), lines.push(...this.lines), this.lines.length = 0; + } +}, CommonBuffer = class { + deleteBuffer; + insertBuffer; + lines; + constructor(deleteBuffer, insertBuffer) { + this.deleteBuffer = deleteBuffer, this.insertBuffer = insertBuffer, this.lines = []; + } + pushDiffCommonLine(diff2) { + this.lines.push(diff2); + } + pushDiffChangeLines(diff2) { + let isDiffEmpty = diff2[1].length === 0; + (!isDiffEmpty || this.deleteBuffer.isLineEmpty()) && this.deleteBuffer.pushDiff(diff2), (!isDiffEmpty || this.insertBuffer.isLineEmpty()) && this.insertBuffer.pushDiff(diff2); + } + flushChangeLines() { + this.deleteBuffer.moveLinesTo(this.lines), this.insertBuffer.moveLinesTo(this.lines); + } + // Input to buffer. + align(diff2) { + let op = diff2[0], string = diff2[1]; + if (string.includes(` +`)) { + let substrings = string.split(` +`), iLast = substrings.length - 1; + substrings.forEach((substring, i) => { + if (i === 0) { + let subdiff = new Diff(op, substring); + this.deleteBuffer.isLineEmpty() && this.insertBuffer.isLineEmpty() ? (this.flushChangeLines(), this.pushDiffCommonLine(subdiff)) : (this.pushDiffChangeLines(subdiff), this.flushChangeLines()); + } else i < iLast ? this.pushDiffCommonLine(new Diff(op, substring)) : substring.length !== 0 && this.pushDiffChangeLines(new Diff(op, substring)); + }); + } else + this.pushDiffChangeLines(diff2); + } + // Output from buffer. + getLines() { + return this.flushChangeLines(), this.lines; + } +}; +function getAlignedDiffs(diffs, changeColor) { + let deleteBuffer = new ChangeBuffer(DIFF_DELETE, changeColor), insertBuffer = new ChangeBuffer(DIFF_INSERT, changeColor), commonBuffer = new CommonBuffer(deleteBuffer, insertBuffer); + return diffs.forEach((diff2) => { + switch (diff2[0]) { + case DIFF_DELETE: + deleteBuffer.align(diff2); + break; + case DIFF_INSERT: + insertBuffer.align(diff2); + break; + default: + commonBuffer.align(diff2); + } + }), commonBuffer.getLines(); +} +function hasCommonDiff(diffs, isMultiline) { + if (isMultiline) { + let iLast = diffs.length - 1; + return diffs.some((diff2, i) => diff2[0] === DIFF_EQUAL && (i !== iLast || diff2[1] !== ` +`)); + } + return diffs.some((diff2) => diff2[0] === DIFF_EQUAL); +} +function diffStringsUnified(a2, b, options) { + if (a2 !== b && a2.length !== 0 && b.length !== 0) { + let isMultiline = a2.includes(` +`) || b.includes(` +`), [diffs, truncated] = diffStringsRaw(isMultiline ? `${a2} +` : a2, isMultiline ? `${b} +` : b, !0, options); + if (hasCommonDiff(diffs, isMultiline)) { + let optionsNormalized = normalizeDiffOptions(options), lines = getAlignedDiffs(diffs, optionsNormalized.changeColor); + return printDiffLines(lines, truncated, optionsNormalized); + } + } + return diffLinesUnified(a2.split(` +`), b.split(` +`), options); +} +function diffStringsRaw(a2, b, cleanup, options) { + let [diffs, truncated] = diffStrings(a2, b, options); + return cleanup && diff_cleanupSemantic(diffs), [diffs, truncated]; +} +function getCommonMessage(message, options) { + let { commonColor } = normalizeDiffOptions(options); + return commonColor(message); +} +var { AsymmetricMatcher: AsymmetricMatcher2, DOMCollection: DOMCollection2, DOMElement: DOMElement2, Immutable: Immutable2, ReactElement: ReactElement2, ReactTestComponent: ReactTestComponent2 } = plugins, PLUGINS2 = [ + ReactTestComponent2, + ReactElement2, + DOMElement2, + DOMCollection2, + Immutable2, + AsymmetricMatcher2, + plugins.Error +], FORMAT_OPTIONS = { + maxDepth: 20, + plugins: PLUGINS2 +}, FALLBACK_FORMAT_OPTIONS = { + callToJSON: !1, + maxDepth: 8, + plugins: PLUGINS2 +}; +function diff(a2, b, options) { + if (Object.is(a2, b)) + return ""; + let aType = getType3(a2), expectedType = aType, omitDifference = !1; + if (aType === "object" && typeof a2.asymmetricMatch == "function") { + if (a2.$$typeof !== /* @__PURE__ */ Symbol.for("jest.asymmetricMatcher") || typeof a2.getExpectedType != "function") + return; + expectedType = a2.getExpectedType(), omitDifference = expectedType === "string"; + } + if (expectedType !== getType3(b)) { + let truncate2 = function(s2) { + return s2.length <= MAX_LENGTH ? s2 : `${s2.slice(0, MAX_LENGTH)}...`; + }, { aAnnotation, aColor, aIndicator, bAnnotation, bColor, bIndicator } = normalizeDiffOptions(options), formatOptions = getFormatOptions(FALLBACK_FORMAT_OPTIONS, options), aDisplay = format(a2, formatOptions), bDisplay = format(b, formatOptions), MAX_LENGTH = 1e5; + aDisplay = truncate2(aDisplay), bDisplay = truncate2(bDisplay); + let aDiff = `${aColor(`${aIndicator} ${aAnnotation}:`)} +${aDisplay}`, bDiff = `${bColor(`${bIndicator} ${bAnnotation}:`)} +${bDisplay}`; + return `${aDiff} + +${bDiff}`; + } + if (!omitDifference) + switch (aType) { + case "string": + return diffLinesUnified(a2.split(` +`), b.split(` +`), options); + case "boolean": + case "number": + return comparePrimitive(a2, b, options); + case "map": + return compareObjects(sortMap(a2), sortMap(b), options); + case "set": + return compareObjects(sortSet(a2), sortSet(b), options); + default: + return compareObjects(a2, b, options); + } +} +function comparePrimitive(a2, b, options) { + let aFormat = format(a2, FORMAT_OPTIONS), bFormat = format(b, FORMAT_OPTIONS); + return aFormat === bFormat ? "" : diffLinesUnified(aFormat.split(` +`), bFormat.split(` +`), options); +} +function sortMap(map) { + return new Map(Array.from(map.entries()).sort()); +} +function sortSet(set) { + return new Set(Array.from(set.values()).sort()); +} +function compareObjects(a2, b, options) { + let difference, hasThrown = !1; + try { + let formatOptions = getFormatOptions(FORMAT_OPTIONS, options); + difference = getObjectsDifference(a2, b, formatOptions, options); + } catch { + hasThrown = !0; + } + let noDiffMessage = getCommonMessage(NO_DIFF_MESSAGE, options); + if (difference === void 0 || difference === noDiffMessage) { + let formatOptions = getFormatOptions(FALLBACK_FORMAT_OPTIONS, options); + difference = getObjectsDifference(a2, b, formatOptions, options), difference !== noDiffMessage && !hasThrown && (difference = `${getCommonMessage(SIMILAR_MESSAGE, options)} + +${difference}`); + } + return difference; +} +function getFormatOptions(formatOptions, options) { + let { compareKeys, printBasicPrototype, maxDepth } = normalizeDiffOptions(options); + return { + ...formatOptions, + compareKeys, + printBasicPrototype, + maxDepth: maxDepth ?? formatOptions.maxDepth + }; +} +function getObjectsDifference(a2, b, formatOptions, options) { + let formatOptionsZeroIndent = { + ...formatOptions, + indent: 0 + }, aCompare = format(a2, formatOptionsZeroIndent), bCompare = format(b, formatOptionsZeroIndent); + if (aCompare === bCompare) + return getCommonMessage(NO_DIFF_MESSAGE, options); + { + let aDisplay = format(a2, formatOptions), bDisplay = format(b, formatOptions); + return diffLinesUnified2(aDisplay.split(` +`), bDisplay.split(` +`), aCompare.split(` +`), bCompare.split(` +`), options); + } +} +var MAX_DIFF_STRING_LENGTH = 2e4; +function isAsymmetricMatcher(data) { + return getType2(data) === "Object" && typeof data.asymmetricMatch == "function"; +} +function isReplaceable(obj1, obj2) { + let obj1Type = getType2(obj1), obj2Type = getType2(obj2); + return obj1Type === obj2Type && (obj1Type === "Object" || obj1Type === "Array"); +} +function printDiffOrStringify(received, expected, options) { + let { aAnnotation, bAnnotation } = normalizeDiffOptions(options); + if (typeof expected == "string" && typeof received == "string" && expected.length > 0 && received.length > 0 && expected.length <= MAX_DIFF_STRING_LENGTH && received.length <= MAX_DIFF_STRING_LENGTH && expected !== received) { + if (expected.includes(` +`) || received.includes(` +`)) + return diffStringsUnified(expected, received, options); + let [diffs] = diffStringsRaw(expected, received, !0), hasCommonDiff2 = diffs.some((diff2) => diff2[0] === DIFF_EQUAL), printLabel = getLabelPrinter(aAnnotation, bAnnotation), expectedLine = printLabel(aAnnotation) + printExpected(getCommonAndChangedSubstrings(diffs, DIFF_DELETE, hasCommonDiff2)), receivedLine = printLabel(bAnnotation) + printReceived(getCommonAndChangedSubstrings(diffs, DIFF_INSERT, hasCommonDiff2)); + return `${expectedLine} +${receivedLine}`; + } + let clonedExpected = deepClone(expected, { forceWritable: !0 }), clonedReceived = deepClone(received, { forceWritable: !0 }), { replacedExpected, replacedActual } = replaceAsymmetricMatcher(clonedReceived, clonedExpected); + return diff(replacedExpected, replacedActual, options); +} +function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE__ */ new WeakSet(), expectedReplaced = /* @__PURE__ */ new WeakSet()) { + return actual instanceof Error && expected instanceof Error && typeof actual.cause < "u" && typeof expected.cause > "u" ? (delete actual.cause, { + replacedActual: actual, + replacedExpected: expected + }) : isReplaceable(actual, expected) ? actualReplaced.has(actual) || expectedReplaced.has(expected) ? { + replacedActual: actual, + replacedExpected: expected + } : (actualReplaced.add(actual), expectedReplaced.add(expected), getOwnProperties(expected).forEach((key) => { + let expectedValue = expected[key], actualValue = actual[key]; + if (isAsymmetricMatcher(expectedValue)) + expectedValue.asymmetricMatch(actualValue) && (actual[key] = expectedValue); + else if (isAsymmetricMatcher(actualValue)) + actualValue.asymmetricMatch(expectedValue) && (expected[key] = actualValue); + else if (isReplaceable(actualValue, expectedValue)) { + let replaced = replaceAsymmetricMatcher(actualValue, expectedValue, actualReplaced, expectedReplaced); + actual[key] = replaced.replacedActual, expected[key] = replaced.replacedExpected; + } + }), { + replacedActual: actual, + replacedExpected: expected + }) : { + replacedActual: actual, + replacedExpected: expected + }; +} +function getLabelPrinter(...strings) { + let maxLength = strings.reduce((max, string) => string.length > max ? string.length : max, 0); + return (string) => `${string}: ${" ".repeat(maxLength - string.length)}`; +} +var SPACE_SYMBOL = "\xB7"; +function replaceTrailingSpaces(text) { + return text.replace(/\s+$/gm, (spaces) => SPACE_SYMBOL.repeat(spaces.length)); +} +function printReceived(object) { + return s.red(replaceTrailingSpaces(stringify(object))); +} +function printExpected(value) { + return s.green(replaceTrailingSpaces(stringify(value))); +} +function getCommonAndChangedSubstrings(diffs, op, hasCommonDiff2) { + return diffs.reduce((reduced, diff2) => reduced + (diff2[0] === DIFF_EQUAL ? diff2[1] : diff2[0] === op ? hasCommonDiff2 ? s.inverse(diff2[1]) : diff2[1] : ""), ""); +} + +// ../../node_modules/@vitest/utils/dist/error.js +var IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@", IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@"; +function isImmutable(v) { + return v && (v[IS_COLLECTION_SYMBOL] || v[IS_RECORD_SYMBOL]); +} +var OBJECT_PROTO = Object.getPrototypeOf({}); +function getUnserializableMessage(err) { + return err instanceof Error ? `: ${err.message}` : typeof err == "string" ? `: ${err}` : ""; +} +function serializeValue(val, seen = /* @__PURE__ */ new WeakMap()) { + if (!val || typeof val == "string") + return val; + if (val instanceof Error && "toJSON" in val && typeof val.toJSON == "function") { + let jsonValue = val.toJSON(); + return jsonValue && jsonValue !== val && typeof jsonValue == "object" && (typeof val.message == "string" && safe(() => jsonValue.message ?? (jsonValue.message = val.message)), typeof val.stack == "string" && safe(() => jsonValue.stack ?? (jsonValue.stack = val.stack)), typeof val.name == "string" && safe(() => jsonValue.name ?? (jsonValue.name = val.name)), val.cause != null && safe(() => jsonValue.cause ?? (jsonValue.cause = serializeValue(val.cause, seen)))), serializeValue(jsonValue, seen); + } + if (typeof val == "function") + return `Function<${val.name || "anonymous"}>`; + if (typeof val == "symbol") + return val.toString(); + if (typeof val != "object") + return val; + if (typeof Buffer < "u" && val instanceof Buffer) + return ``; + if (typeof Uint8Array < "u" && val instanceof Uint8Array) + return ``; + if (isImmutable(val)) + return serializeValue(val.toJSON(), seen); + if (val instanceof Promise || val.constructor && val.constructor.prototype === "AsyncFunction") + return "Promise"; + if (typeof Element < "u" && val instanceof Element) + return val.tagName; + if (typeof val.asymmetricMatch == "function") + return `${val.toString()} ${format2(val.sample)}`; + if (typeof val.toJSON == "function") + return serializeValue(val.toJSON(), seen); + if (seen.has(val)) + return seen.get(val); + if (Array.isArray(val)) { + let clone2 = new Array(val.length); + return seen.set(val, clone2), val.forEach((e, i) => { + try { + clone2[i] = serializeValue(e, seen); + } catch (err) { + clone2[i] = getUnserializableMessage(err); + } + }), clone2; + } else { + let clone2 = /* @__PURE__ */ Object.create(null); + seen.set(val, clone2); + let obj = val; + for (; obj && obj !== OBJECT_PROTO; ) + Object.getOwnPropertyNames(obj).forEach((key) => { + if (!(key in clone2)) + try { + clone2[key] = serializeValue(val[key], seen); + } catch (err) { + delete clone2[key], clone2[key] = getUnserializableMessage(err); + } + }), obj = Object.getPrototypeOf(obj); + return clone2; + } +} +function safe(fn) { + try { + return fn(); + } catch { + } +} +function normalizeErrorMessage(message) { + return message.replace(/__(vite_ssr_import|vi_import)_\d+__\./g, ""); +} +function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) { + if (!_err || typeof _err != "object") + return { message: String(_err) }; + let err = _err; + (err.showDiff || err.showDiff === void 0 && err.expected !== void 0 && err.actual !== void 0) && (err.diff = printDiffOrStringify(err.actual, err.expected, { + ...diffOptions, + ...err.diffOptions + })), "expected" in err && typeof err.expected != "string" && (err.expected = stringify(err.expected, 10)), "actual" in err && typeof err.actual != "string" && (err.actual = stringify(err.actual, 10)); + try { + typeof err.message == "string" && (err.message = normalizeErrorMessage(err.message)); + } catch { + } + try { + !seen.has(err) && typeof err.cause == "object" && (seen.add(err), err.cause = processError(err.cause, diffOptions, seen)); + } catch { + } + try { + return serializeValue(err); + } catch (e) { + return serializeValue(new Error(`Failed to fully serialize error: ${e?.message} +Inner error message: ${err?.message}`)); + } +} + +export { + stringify, + getDefaultExportFromCjs2 as getDefaultExportFromCjs, + assertTypes, + isObject, + getType2 as getType, + noop, + diff, + printDiffOrStringify, + processError +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-S6TK43XQ.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-S6TK43XQ.js new file mode 100644 index 0000000000000000000000000000000000000000..3df855c617b3829e47301cec45d71d26cc819333 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-S6TK43XQ.js @@ -0,0 +1,836 @@ +import { + _extends +} from "./chunk-LE2LTDW3.js"; + +// ../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +function _assertThisInitialized(e) { + if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} + +// ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) { + return t2.__proto__ = e2, t2; + }, _setPrototypeOf(t, e); +} + +// ../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +function _inheritsLoose(t, o) { + t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); +} + +// ../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t2) { + return t2.__proto__ || Object.getPrototypeOf(t2); + }, _getPrototypeOf(t); +} + +// ../../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +function _isNativeFunction(t) { + try { + return Function.toString.call(t).indexOf("[native code]") !== -1; + } catch { + return typeof t == "function"; + } +} + +// ../../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch { + } + return (_isNativeReflectConstruct = function() { + return !!t; + })(); +} + +// ../../node_modules/@babel/runtime/helpers/esm/construct.js +function _construct(t, e, r) { + if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); + var o = [null]; + o.push.apply(o, e); + var p = new (t.bind.apply(t, o))(); + return r && _setPrototypeOf(p, r.prototype), p; +} + +// ../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +function _wrapNativeSuper(t) { + var r = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; + return _wrapNativeSuper = function(t2) { + if (t2 === null || !_isNativeFunction(t2)) return t2; + if (typeof t2 != "function") throw new TypeError("Super expression must either be null or a function"); + if (r !== void 0) { + if (r.has(t2)) return r.get(t2); + r.set(t2, Wrapper); + } + function Wrapper() { + return _construct(t2, arguments, _getPrototypeOf(this).constructor); + } + return Wrapper.prototype = Object.create(t2.prototype, { + constructor: { + value: Wrapper, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), _setPrototypeOf(Wrapper, t2); + }, _wrapNativeSuper(t); +} + +// ../../node_modules/polished/dist/polished.esm.js +var ERRORS = { + 1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). + +`, + 2: `Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }). + +`, + 3: `Passed an incorrect argument to a color function, please pass a string representation of a color. + +`, + 4: `Couldn't generate valid rgb string from %s, it returned %s. + +`, + 5: `Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation. + +`, + 6: `Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }). + +`, + 7: `Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }). + +`, + 8: `Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object. + +`, + 9: `Please provide a number of steps to the modularScale helper. + +`, + 10: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio. + +`, + 11: `Invalid value passed as base to modularScale, expected number or em string but got "%s" + +`, + 12: `Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead. + +`, + 13: `Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead. + +`, + 14: `Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12. + +`, + 15: `Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12. + +`, + 16: `You must provide a template to this method. + +`, + 17: `You passed an unsupported selector state to this method. + +`, + 18: `minScreen and maxScreen must be provided as stringified numbers with the same units. + +`, + 19: `fromSize and toSize must be provided as stringified numbers with the same units. + +`, + 20: `expects either an array of objects or a single object with the properties prop, fromSize, and toSize. + +`, + 21: "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n", + 22: "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n", + 23: `fontFace expects a name of a font-family. + +`, + 24: `fontFace expects either the path to the font file(s) or a name of a local copy. + +`, + 25: `fontFace expects localFonts to be an array. + +`, + 26: `fontFace expects fileFormats to be an array. + +`, + 27: `radialGradient requries at least 2 color-stops to properly render. + +`, + 28: `Please supply a filename to retinaImage() as the first argument. + +`, + 29: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'. + +`, + 30: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n", + 31: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation + +`, + 32: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s']) +To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s') + +`, + 33: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation + +`, + 34: `borderRadius expects a radius value as a string or number as the second argument. + +`, + 35: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument. + +`, + 36: `Property must be a string value. + +`, + 37: `Syntax Error at %s. + +`, + 38: `Formula contains a function that needs parentheses at %s. + +`, + 39: `Formula is missing closing parenthesis at %s. + +`, + 40: `Formula has too many closing parentheses at %s. + +`, + 41: `All values in a formula must have the same unit or be unitless. + +`, + 42: `Please provide a number of steps to the modularScale helper. + +`, + 43: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio. + +`, + 44: `Invalid value passed as base to modularScale, expected number or em/rem string but got %s. + +`, + 45: `Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object. + +`, + 46: `Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object. + +`, + 47: `minScreen and maxScreen must be provided as stringified numbers with the same units. + +`, + 48: `fromSize and toSize must be provided as stringified numbers with the same units. + +`, + 49: `Expects either an array of objects or a single object with the properties prop, fromSize, and toSize. + +`, + 50: `Expects the objects in the first argument array to have the properties prop, fromSize, and toSize. + +`, + 51: `Expects the first argument object to have the properties prop, fromSize, and toSize. + +`, + 52: `fontFace expects either the path to the font file(s) or a name of a local copy. + +`, + 53: `fontFace expects localFonts to be an array. + +`, + 54: `fontFace expects fileFormats to be an array. + +`, + 55: `fontFace expects a name of a font-family. + +`, + 56: `linearGradient requries at least 2 color-stops to properly render. + +`, + 57: `radialGradient requries at least 2 color-stops to properly render. + +`, + 58: `Please supply a filename to retinaImage() as the first argument. + +`, + 59: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'. + +`, + 60: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n", + 61: `Property must be a string value. + +`, + 62: `borderRadius expects a radius value as a string or number as the second argument. + +`, + 63: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument. + +`, + 64: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation. + +`, + 65: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s'). + +`, + 66: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation. + +`, + 67: `You must provide a template to this method. + +`, + 68: `You passed an unsupported selector state to this method. + +`, + 69: `Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead. + +`, + 70: `Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead. + +`, + 71: `Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12. + +`, + 72: `Passed invalid base value %s to %s(), please pass a value like "12px" or 12. + +`, + 73: `Please provide a valid CSS variable. + +`, + 74: `CSS variable not found and no default was provided. + +`, + 75: `important requires a valid style object, got a %s instead. + +`, + 76: `fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen. + +`, + 77: `remToPx expects a value in "rem" but you provided it in "%s". + +`, + 78: `base must be set in "px" or "%" but you set it in "%s". +` +}; +function format() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) + args[_key] = arguments[_key]; + var a = args[0], b = [], c; + for (c = 1; c < args.length; c += 1) + b.push(args[c]); + return b.forEach(function(d) { + a = a.replace(/%[a-z]/, d); + }), a; +} +var PolishedError = (function(_Error) { + _inheritsLoose(PolishedError2, _Error); + function PolishedError2(code) { + var _this; + if (process.env.NODE_ENV === "production") + _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this; + else { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) + args[_key2 - 1] = arguments[_key2]; + _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this; + } + return _assertThisInitialized(_this); + } + return PolishedError2; +})(_wrapNativeSuper(Error)); +function endsWith(string, suffix) { + return string.substr(-suffix.length) === suffix; +} +var cssRegex$1 = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/; +function stripUnit(value) { + if (typeof value != "string") return value; + var matchedValue = value.match(cssRegex$1); + return matchedValue ? parseFloat(value) : value; +} +var pxtoFactory = function(to) { + return function(pxval, base) { + base === void 0 && (base = "16px"); + var newPxval = pxval, newBase = base; + if (typeof pxval == "string") { + if (!endsWith(pxval, "px")) + throw new PolishedError(69, to, pxval); + newPxval = stripUnit(pxval); + } + if (typeof base == "string") { + if (!endsWith(base, "px")) + throw new PolishedError(70, to, base); + newBase = stripUnit(base); + } + if (typeof newPxval == "string") + throw new PolishedError(71, pxval, to); + if (typeof newBase == "string") + throw new PolishedError(72, base, to); + return "" + newPxval / newBase + to; + }; +}, pixelsto = pxtoFactory, em = pixelsto("em"); +var rem = pixelsto("rem"); +function colorToInt(color) { + return Math.round(color * 255); +} +function convertToInt(red, green, blue) { + return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue); +} +function hslToRgb(hue, saturation, lightness, convert) { + if (convert === void 0 && (convert = convertToInt), saturation === 0) + return convert(lightness, lightness, lightness); + var huePrime = (hue % 360 + 360) % 360 / 60, chroma = (1 - Math.abs(2 * lightness - 1)) * saturation, secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1)), red = 0, green = 0, blue = 0; + huePrime >= 0 && huePrime < 1 ? (red = chroma, green = secondComponent) : huePrime >= 1 && huePrime < 2 ? (red = secondComponent, green = chroma) : huePrime >= 2 && huePrime < 3 ? (green = chroma, blue = secondComponent) : huePrime >= 3 && huePrime < 4 ? (green = secondComponent, blue = chroma) : huePrime >= 4 && huePrime < 5 ? (red = secondComponent, blue = chroma) : huePrime >= 5 && huePrime < 6 && (red = chroma, blue = secondComponent); + var lightnessModification = lightness - chroma / 2, finalRed = red + lightnessModification, finalGreen = green + lightnessModification, finalBlue = blue + lightnessModification; + return convert(finalRed, finalGreen, finalBlue); +} +var namedColorMap = { + aliceblue: "f0f8ff", + antiquewhite: "faebd7", + aqua: "00ffff", + aquamarine: "7fffd4", + azure: "f0ffff", + beige: "f5f5dc", + bisque: "ffe4c4", + black: "000", + blanchedalmond: "ffebcd", + blue: "0000ff", + blueviolet: "8a2be2", + brown: "a52a2a", + burlywood: "deb887", + cadetblue: "5f9ea0", + chartreuse: "7fff00", + chocolate: "d2691e", + coral: "ff7f50", + cornflowerblue: "6495ed", + cornsilk: "fff8dc", + crimson: "dc143c", + cyan: "00ffff", + darkblue: "00008b", + darkcyan: "008b8b", + darkgoldenrod: "b8860b", + darkgray: "a9a9a9", + darkgreen: "006400", + darkgrey: "a9a9a9", + darkkhaki: "bdb76b", + darkmagenta: "8b008b", + darkolivegreen: "556b2f", + darkorange: "ff8c00", + darkorchid: "9932cc", + darkred: "8b0000", + darksalmon: "e9967a", + darkseagreen: "8fbc8f", + darkslateblue: "483d8b", + darkslategray: "2f4f4f", + darkslategrey: "2f4f4f", + darkturquoise: "00ced1", + darkviolet: "9400d3", + deeppink: "ff1493", + deepskyblue: "00bfff", + dimgray: "696969", + dimgrey: "696969", + dodgerblue: "1e90ff", + firebrick: "b22222", + floralwhite: "fffaf0", + forestgreen: "228b22", + fuchsia: "ff00ff", + gainsboro: "dcdcdc", + ghostwhite: "f8f8ff", + gold: "ffd700", + goldenrod: "daa520", + gray: "808080", + green: "008000", + greenyellow: "adff2f", + grey: "808080", + honeydew: "f0fff0", + hotpink: "ff69b4", + indianred: "cd5c5c", + indigo: "4b0082", + ivory: "fffff0", + khaki: "f0e68c", + lavender: "e6e6fa", + lavenderblush: "fff0f5", + lawngreen: "7cfc00", + lemonchiffon: "fffacd", + lightblue: "add8e6", + lightcoral: "f08080", + lightcyan: "e0ffff", + lightgoldenrodyellow: "fafad2", + lightgray: "d3d3d3", + lightgreen: "90ee90", + lightgrey: "d3d3d3", + lightpink: "ffb6c1", + lightsalmon: "ffa07a", + lightseagreen: "20b2aa", + lightskyblue: "87cefa", + lightslategray: "789", + lightslategrey: "789", + lightsteelblue: "b0c4de", + lightyellow: "ffffe0", + lime: "0f0", + limegreen: "32cd32", + linen: "faf0e6", + magenta: "f0f", + maroon: "800000", + mediumaquamarine: "66cdaa", + mediumblue: "0000cd", + mediumorchid: "ba55d3", + mediumpurple: "9370db", + mediumseagreen: "3cb371", + mediumslateblue: "7b68ee", + mediumspringgreen: "00fa9a", + mediumturquoise: "48d1cc", + mediumvioletred: "c71585", + midnightblue: "191970", + mintcream: "f5fffa", + mistyrose: "ffe4e1", + moccasin: "ffe4b5", + navajowhite: "ffdead", + navy: "000080", + oldlace: "fdf5e6", + olive: "808000", + olivedrab: "6b8e23", + orange: "ffa500", + orangered: "ff4500", + orchid: "da70d6", + palegoldenrod: "eee8aa", + palegreen: "98fb98", + paleturquoise: "afeeee", + palevioletred: "db7093", + papayawhip: "ffefd5", + peachpuff: "ffdab9", + peru: "cd853f", + pink: "ffc0cb", + plum: "dda0dd", + powderblue: "b0e0e6", + purple: "800080", + rebeccapurple: "639", + red: "f00", + rosybrown: "bc8f8f", + royalblue: "4169e1", + saddlebrown: "8b4513", + salmon: "fa8072", + sandybrown: "f4a460", + seagreen: "2e8b57", + seashell: "fff5ee", + sienna: "a0522d", + silver: "c0c0c0", + skyblue: "87ceeb", + slateblue: "6a5acd", + slategray: "708090", + slategrey: "708090", + snow: "fffafa", + springgreen: "00ff7f", + steelblue: "4682b4", + tan: "d2b48c", + teal: "008080", + thistle: "d8bfd8", + tomato: "ff6347", + turquoise: "40e0d0", + violet: "ee82ee", + wheat: "f5deb3", + white: "fff", + whitesmoke: "f5f5f5", + yellow: "ff0", + yellowgreen: "9acd32" +}; +function nameToHex(color) { + if (typeof color != "string") return color; + var normalizedColorName = color.toLowerCase(); + return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color; +} +var hexRegex = /^#[a-fA-F0-9]{6}$/, hexRgbaRegex = /^#[a-fA-F0-9]{8}$/, reducedHexRegex = /^#[a-fA-F0-9]{3}$/, reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/, rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i; +function parseToRgb(color) { + if (typeof color != "string") + throw new PolishedError(3); + var normalizedColor = nameToHex(color); + if (normalizedColor.match(hexRegex)) + return { + red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16), + green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16), + blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16) + }; + if (normalizedColor.match(hexRgbaRegex)) { + var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2)); + return { + red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16), + green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16), + blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16), + alpha + }; + } + if (normalizedColor.match(reducedHexRegex)) + return { + red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16), + green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16), + blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16) + }; + if (normalizedColor.match(reducedRgbaHexRegex)) { + var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2)); + return { + red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16), + green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16), + blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16), + alpha: _alpha + }; + } + var rgbMatched = rgbRegex.exec(normalizedColor); + if (rgbMatched) + return { + red: parseInt("" + rgbMatched[1], 10), + green: parseInt("" + rgbMatched[2], 10), + blue: parseInt("" + rgbMatched[3], 10) + }; + var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50)); + if (rgbaMatched) + return { + red: parseInt("" + rgbaMatched[1], 10), + green: parseInt("" + rgbaMatched[2], 10), + blue: parseInt("" + rgbaMatched[3], 10), + alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4]) + }; + var hslMatched = hslRegex.exec(normalizedColor); + if (hslMatched) { + var hue = parseInt("" + hslMatched[1], 10), saturation = parseInt("" + hslMatched[2], 10) / 100, lightness = parseInt("" + hslMatched[3], 10) / 100, rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")", hslRgbMatched = rgbRegex.exec(rgbColorString); + if (!hslRgbMatched) + throw new PolishedError(4, normalizedColor, rgbColorString); + return { + red: parseInt("" + hslRgbMatched[1], 10), + green: parseInt("" + hslRgbMatched[2], 10), + blue: parseInt("" + hslRgbMatched[3], 10) + }; + } + var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50)); + if (hslaMatched) { + var _hue = parseInt("" + hslaMatched[1], 10), _saturation = parseInt("" + hslaMatched[2], 10) / 100, _lightness = parseInt("" + hslaMatched[3], 10) / 100, _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")", _hslRgbMatched = rgbRegex.exec(_rgbColorString); + if (!_hslRgbMatched) + throw new PolishedError(4, normalizedColor, _rgbColorString); + return { + red: parseInt("" + _hslRgbMatched[1], 10), + green: parseInt("" + _hslRgbMatched[2], 10), + blue: parseInt("" + _hslRgbMatched[3], 10), + alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4]) + }; + } + throw new PolishedError(5); +} +function rgbToHsl(color) { + var red = color.red / 255, green = color.green / 255, blue = color.blue / 255, max = Math.max(red, green, blue), min = Math.min(red, green, blue), lightness = (max + min) / 2; + if (max === min) + return color.alpha !== void 0 ? { + hue: 0, + saturation: 0, + lightness, + alpha: color.alpha + } : { + hue: 0, + saturation: 0, + lightness + }; + var hue, delta = max - min, saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min); + switch (max) { + case red: + hue = (green - blue) / delta + (green < blue ? 6 : 0); + break; + case green: + hue = (blue - red) / delta + 2; + break; + default: + hue = (red - green) / delta + 4; + break; + } + return hue *= 60, color.alpha !== void 0 ? { + hue, + saturation, + lightness, + alpha: color.alpha + } : { + hue, + saturation, + lightness + }; +} +function parseToHsl(color) { + return rgbToHsl(parseToRgb(color)); +} +var reduceHexValue = function(value) { + return value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6] ? "#" + value[1] + value[3] + value[5] : value; +}, reduceHexValue$1 = reduceHexValue; +function numberToHex(value) { + var hex = value.toString(16); + return hex.length === 1 ? "0" + hex : hex; +} +function colorToHex(color) { + return numberToHex(Math.round(color * 255)); +} +function convertToHex(red, green, blue) { + return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue)); +} +function hslToHex(hue, saturation, lightness) { + return hslToRgb(hue, saturation, lightness, convertToHex); +} +function hsl(value, saturation, lightness) { + if (typeof value == "number" && typeof saturation == "number" && typeof lightness == "number") + return hslToHex(value, saturation, lightness); + if (typeof value == "object" && saturation === void 0 && lightness === void 0) + return hslToHex(value.hue, value.saturation, value.lightness); + throw new PolishedError(1); +} +function hsla(value, saturation, lightness, alpha) { + if (typeof value == "number" && typeof saturation == "number" && typeof lightness == "number" && typeof alpha == "number") + return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")"; + if (typeof value == "object" && saturation === void 0 && lightness === void 0 && alpha === void 0) + return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")"; + throw new PolishedError(2); +} +function rgb(value, green, blue) { + if (typeof value == "number" && typeof green == "number" && typeof blue == "number") + return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue)); + if (typeof value == "object" && green === void 0 && blue === void 0) + return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue)); + throw new PolishedError(6); +} +function rgba(firstValue, secondValue, thirdValue, fourthValue) { + if (typeof firstValue == "string" && typeof secondValue == "number") { + var rgbValue = parseToRgb(firstValue); + return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")"; + } else { + if (typeof firstValue == "number" && typeof secondValue == "number" && typeof thirdValue == "number" && typeof fourthValue == "number") + return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")"; + if (typeof firstValue == "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) + return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")"; + } + throw new PolishedError(7); +} +var isRgb = function(color) { + return typeof color.red == "number" && typeof color.green == "number" && typeof color.blue == "number" && (typeof color.alpha != "number" || typeof color.alpha > "u"); +}, isRgba = function(color) { + return typeof color.red == "number" && typeof color.green == "number" && typeof color.blue == "number" && typeof color.alpha == "number"; +}, isHsl = function(color) { + return typeof color.hue == "number" && typeof color.saturation == "number" && typeof color.lightness == "number" && (typeof color.alpha != "number" || typeof color.alpha > "u"); +}, isHsla = function(color) { + return typeof color.hue == "number" && typeof color.saturation == "number" && typeof color.lightness == "number" && typeof color.alpha == "number"; +}; +function toColorString(color) { + if (typeof color != "object") throw new PolishedError(8); + if (isRgba(color)) return rgba(color); + if (isRgb(color)) return rgb(color); + if (isHsla(color)) return hsla(color); + if (isHsl(color)) return hsl(color); + throw new PolishedError(8); +} +function curried(f, length, acc) { + return function() { + var combined = acc.concat(Array.prototype.slice.call(arguments)); + return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined); + }; +} +function curry(f) { + return curried(f, f.length, []); +} +function adjustHue(degree, color) { + if (color === "transparent") return color; + var hslColor = parseToHsl(color); + return toColorString(_extends({}, hslColor, { + hue: hslColor.hue + parseFloat(degree) + })); +} +var curriedAdjustHue = curry(adjustHue); +function guard(lowerBoundary, upperBoundary, value) { + return Math.max(lowerBoundary, Math.min(upperBoundary, value)); +} +function darken(amount, color) { + if (color === "transparent") return color; + var hslColor = parseToHsl(color); + return toColorString(_extends({}, hslColor, { + lightness: guard(0, 1, hslColor.lightness - parseFloat(amount)) + })); +} +var curriedDarken = curry(darken), curriedDarken$1 = curriedDarken; +function desaturate(amount, color) { + if (color === "transparent") return color; + var hslColor = parseToHsl(color); + return toColorString(_extends({}, hslColor, { + saturation: guard(0, 1, hslColor.saturation - parseFloat(amount)) + })); +} +var curriedDesaturate = curry(desaturate); +function lighten(amount, color) { + if (color === "transparent") return color; + var hslColor = parseToHsl(color); + return toColorString(_extends({}, hslColor, { + lightness: guard(0, 1, hslColor.lightness + parseFloat(amount)) + })); +} +var curriedLighten = curry(lighten), curriedLighten$1 = curriedLighten; +function mix(weight, color, otherColor) { + if (color === "transparent") return otherColor; + if (otherColor === "transparent") return color; + if (weight === 0) return otherColor; + var parsedColor1 = parseToRgb(color), color1 = _extends({}, parsedColor1, { + alpha: typeof parsedColor1.alpha == "number" ? parsedColor1.alpha : 1 + }), parsedColor2 = parseToRgb(otherColor), color2 = _extends({}, parsedColor2, { + alpha: typeof parsedColor2.alpha == "number" ? parsedColor2.alpha : 1 + }), alphaDelta = color1.alpha - color2.alpha, x = parseFloat(weight) * 2 - 1, y = x * alphaDelta === -1 ? x : x + alphaDelta, z = 1 + x * alphaDelta, weight1 = (y / z + 1) / 2, weight2 = 1 - weight1, mixedColor = { + red: Math.floor(color1.red * weight1 + color2.red * weight2), + green: Math.floor(color1.green * weight1 + color2.green * weight2), + blue: Math.floor(color1.blue * weight1 + color2.blue * weight2), + alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight)) + }; + return rgba(mixedColor); +} +var curriedMix = curry(mix), mix$1 = curriedMix; +function opacify(amount, color) { + if (color === "transparent") return color; + var parsedColor = parseToRgb(color), alpha = typeof parsedColor.alpha == "number" ? parsedColor.alpha : 1, colorWithAlpha = _extends({}, parsedColor, { + alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100) + }); + return rgba(colorWithAlpha); +} +var curriedOpacify = curry(opacify), curriedOpacify$1 = curriedOpacify; +function saturate(amount, color) { + if (color === "transparent") return color; + var hslColor = parseToHsl(color); + return toColorString(_extends({}, hslColor, { + saturation: guard(0, 1, hslColor.saturation + parseFloat(amount)) + })); +} +var curriedSaturate = curry(saturate); +function setHue(hue, color) { + return color === "transparent" ? color : toColorString(_extends({}, parseToHsl(color), { + hue: parseFloat(hue) + })); +} +var curriedSetHue = curry(setHue); +function setLightness(lightness, color) { + return color === "transparent" ? color : toColorString(_extends({}, parseToHsl(color), { + lightness: parseFloat(lightness) + })); +} +var curriedSetLightness = curry(setLightness); +function setSaturation(saturation, color) { + return color === "transparent" ? color : toColorString(_extends({}, parseToHsl(color), { + saturation: parseFloat(saturation) + })); +} +var curriedSetSaturation = curry(setSaturation); +function shade(percentage, color) { + return color === "transparent" ? color : mix$1(parseFloat(percentage), "rgb(0, 0, 0)", color); +} +var curriedShade = curry(shade); +function tint(percentage, color) { + return color === "transparent" ? color : mix$1(parseFloat(percentage), "rgb(255, 255, 255)", color); +} +var curriedTint = curry(tint); +function transparentize(amount, color) { + if (color === "transparent") return color; + var parsedColor = parseToRgb(color), alpha = typeof parsedColor.alpha == "number" ? parsedColor.alpha : 1, colorWithAlpha = _extends({}, parsedColor, { + alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100) + }); + return rgba(colorWithAlpha); +} +var curriedTransparentize = curry(transparentize), curriedTransparentize$1 = curriedTransparentize; + +export { + rgba, + curriedDarken$1, + curriedLighten$1, + curriedOpacify$1, + curriedTransparentize$1 +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SC67XZST.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SC67XZST.js new file mode 100644 index 0000000000000000000000000000000000000000..0a12b539ec6238f90dff2c97cd2bc3ef235e96ca --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SC67XZST.js @@ -0,0 +1,18 @@ +import { + __commonJS +} from "./chunk-IMSF75WX.js"; + +// ../../node_modules/picocolors/picocolors.browser.js +var require_picocolors_browser = __commonJS({ + "../../node_modules/picocolors/picocolors.browser.js"(exports, module) { + var x = String, create = function() { + return { isColorSupported: !1, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x, blackBright: x, redBright: x, greenBright: x, yellowBright: x, blueBright: x, magentaBright: x, cyanBright: x, whiteBright: x, bgBlackBright: x, bgRedBright: x, bgGreenBright: x, bgYellowBright: x, bgBlueBright: x, bgMagentaBright: x, bgCyanBright: x, bgWhiteBright: x }; + }; + module.exports = create(); + module.exports.createColors = create; + } +}); + +export { + require_picocolors_browser +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SFVA4SBT.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SFVA4SBT.js new file mode 100644 index 0000000000000000000000000000000000000000..99ec9a9e5814418b3c279bc1dac7e07f7634a7e4 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SFVA4SBT.js @@ -0,0 +1,683 @@ +// ../../node_modules/picoquery/lib/string-util.js +var hexTable = Array.from({ length: 256 }, (_, i) => "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()), noEscape = new Int8Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0 +]); +function encodeString(str) { + let len = str.length; + if (len === 0) + return ""; + let out = "", lastPos = 0, i = 0; + outer: for (; i < len; i++) { + let c = str.charCodeAt(i); + for (; c < 128; ) { + if (noEscape[c] !== 1 && (lastPos < i && (out += str.slice(lastPos, i)), lastPos = i + 1, out += hexTable[c]), ++i === len) + break outer; + c = str.charCodeAt(i); + } + if (lastPos < i && (out += str.slice(lastPos, i)), c < 2048) { + lastPos = i + 1, out += hexTable[192 | c >> 6] + hexTable[128 | c & 63]; + continue; + } + if (c < 55296 || c >= 57344) { + lastPos = i + 1, out += hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + continue; + } + if (++i, i >= len) + throw new Error("URI malformed"); + let c2 = str.charCodeAt(i) & 1023; + lastPos = i + 1, c = 65536 + ((c & 1023) << 10 | c2), out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + } + return lastPos === 0 ? str : lastPos < len ? out + str.slice(lastPos) : out; +} + +// ../../node_modules/picoquery/lib/shared.js +var defaultValueSerializer = (value) => { + switch (typeof value) { + case "string": + return encodeString(value); + case "bigint": + case "boolean": + return "" + value; + case "number": + if (Number.isFinite(value)) + return value < 1e21 ? "" + value : encodeString("" + value); + break; + } + return value instanceof Date ? encodeString(value.toISOString()) : ""; +}, defaultShouldSerializeObject = (val) => val instanceof Date, identityFunc = (v) => v, defaultOptions = { + nesting: !0, + nestingSyntax: "dot", + arrayRepeat: !1, + arrayRepeatSyntax: "repeat", + delimiter: 38, + valueDeserializer: identityFunc, + valueSerializer: defaultValueSerializer, + keyDeserializer: identityFunc, + shouldSerializeObject: defaultShouldSerializeObject +}; + +// ../../node_modules/picoquery/lib/object-util.js +function isPrototypeKey(value) { + return value === "__proto__" || value === "constructor" || value === "prototype"; +} +function getDeepObject(obj, key, nextKey, forceObject, forceArray) { + if (isPrototypeKey(key)) + return obj; + let currObj = obj[key]; + return typeof currObj == "object" && currObj !== null ? currObj : !forceObject && (forceArray || typeof nextKey == "number" || typeof nextKey == "string" && nextKey * 0 === 0 && nextKey.indexOf(".") === -1) ? obj[key] = [] : obj[key] = {}; +} +var MAX_DEPTH = 20, strBracketPair = "[]", strBracketLeft = "[", strBracketRight = "]", strDot = "."; +function stringifyObject(obj, options, depth = 0, parentKey, isProbableArray) { + let { nestingSyntax = defaultOptions.nestingSyntax, arrayRepeat = defaultOptions.arrayRepeat, arrayRepeatSyntax = defaultOptions.arrayRepeatSyntax, nesting = defaultOptions.nesting, delimiter = defaultOptions.delimiter, valueSerializer = defaultOptions.valueSerializer, shouldSerializeObject = defaultOptions.shouldSerializeObject } = options, strDelimiter = typeof delimiter == "number" ? String.fromCharCode(delimiter) : delimiter, useArrayRepeatKey = isProbableArray === !0 && arrayRepeat, shouldUseDot = nestingSyntax === "dot" || nestingSyntax === "js" && !isProbableArray; + if (depth > MAX_DEPTH) + return ""; + let result = "", firstKey = !0, valueIsProbableArray = !1; + for (let key in obj) { + let value = obj[key]; + if (value === void 0) + continue; + let path; + parentKey ? (path = parentKey, useArrayRepeatKey ? arrayRepeatSyntax === "bracket" && (path += strBracketPair) : shouldUseDot ? (path += strDot, path += key) : (path += strBracketLeft, path += key, path += strBracketRight)) : path = key, firstKey || (result += strDelimiter), typeof value == "object" && value !== null && !shouldSerializeObject(value) ? (valueIsProbableArray = value.pop !== void 0, (nesting || arrayRepeat && valueIsProbableArray) && (result += stringifyObject(value, options, depth + 1, path, valueIsProbableArray))) : (result += encodeString(path), result += "=", result += valueSerializer(value, key)), firstKey && (firstKey = !1); + } + return result; +} + +// ../../node_modules/picoquery/lib/decode-uri-component.js +var UTF8_DATA = [ + // The first part of the table maps bytes to character to a transition. + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 4, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 6, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 8, + 7, + 7, + 10, + 9, + 9, + 9, + 11, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + // The second part of the table maps a state to a new state when adding a + // transition. + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 12, + 0, + 0, + 0, + 0, + 24, + 36, + 48, + 60, + 72, + 84, + 96, + 0, + 12, + 12, + 12, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 24, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 48, + 48, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 48, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 48, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // The third part maps the current transition to a mask that needs to apply + // to the byte. + 127, + 63, + 63, + 63, + 0, + 31, + 15, + 15, + 15, + 7, + 7, + 7 +]; +function decodeURIComponent(uri) { + let percentPosition = uri.indexOf("%"); + if (percentPosition === -1) + return uri; + let length = uri.length, decoded = "", last = 0, codepoint = 0, startOfOctets = percentPosition, state = 12; + for (; percentPosition > -1 && percentPosition < length; ) { + let high = hexCodeToInt(uri[percentPosition + 1], 4), low = hexCodeToInt(uri[percentPosition + 2], 0), byte = high | low, type = UTF8_DATA[byte]; + if (state = UTF8_DATA[256 + state + type], codepoint = codepoint << 6 | byte & UTF8_DATA[364 + type], state === 12) + decoded += uri.slice(last, startOfOctets), decoded += codepoint <= 65535 ? String.fromCharCode(codepoint) : String.fromCharCode(55232 + (codepoint >> 10), 56320 + (codepoint & 1023)), codepoint = 0, last = percentPosition + 3, percentPosition = startOfOctets = uri.indexOf("%", last); + else { + if (state === 0) + return null; + if (percentPosition += 3, percentPosition < length && uri.charCodeAt(percentPosition) === 37) + continue; + return null; + } + } + return decoded + uri.slice(last); +} +var HEX = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + a: 10, + A: 10, + b: 11, + B: 11, + c: 12, + C: 12, + d: 13, + D: 13, + e: 14, + E: 14, + f: 15, + F: 15 +}; +function hexCodeToInt(c, shift) { + let i = HEX[c]; + return i === void 0 ? 255 : i << shift; +} + +// ../../node_modules/picoquery/lib/parse.js +var regexPlus = /\+/g, Empty = function() { +}; +Empty.prototype = /* @__PURE__ */ Object.create(null); +function computeKeySlice(input, startIndex, endIndex, keyHasPlus, shouldDecodeKey) { + let chunk = input.substring(startIndex, endIndex); + return keyHasPlus && (chunk = chunk.replace(regexPlus, " ")), shouldDecodeKey && (chunk = decodeURIComponent(chunk) || chunk), chunk; +} +function parse(input, options) { + let { valueDeserializer = defaultOptions.valueDeserializer, keyDeserializer = defaultOptions.keyDeserializer, arrayRepeatSyntax = defaultOptions.arrayRepeatSyntax, nesting = defaultOptions.nesting, arrayRepeat = defaultOptions.arrayRepeat, nestingSyntax = defaultOptions.nestingSyntax, delimiter = defaultOptions.delimiter } = options ?? {}, charDelimiter = typeof delimiter == "string" ? delimiter.charCodeAt(0) : delimiter, isJsNestingSyntax = nestingSyntax === "js", result = new Empty(); + if (typeof input != "string") + return result; + let inputLength = input.length, value = "", startingIndex = -1, equalityIndex = -1, keySeparatorIndex = -1, currentObj = result, lastKey, currentKey = "", keyChunk = "", shouldDecodeKey = !1, shouldDecodeValue = !1, keyHasPlus = !1, valueHasPlus = !1, keyIsDot = !1, hasBothKeyValuePair = !1, c = 0, arrayRepeatBracketIndex = -1, prevIndex = -1, prevChar = -1; + for (let i = 0; i < inputLength + 1; i++) { + if (c = i !== inputLength ? input.charCodeAt(i) : charDelimiter, c === charDelimiter) { + if (hasBothKeyValuePair = equalityIndex > startingIndex, hasBothKeyValuePair || (equalityIndex = i), keySeparatorIndex !== equalityIndex - 1 && (keyChunk = computeKeySlice(input, keySeparatorIndex + 1, arrayRepeatBracketIndex > -1 ? arrayRepeatBracketIndex : equalityIndex, keyHasPlus, shouldDecodeKey), currentKey = keyDeserializer(keyChunk), lastKey !== void 0 && (currentObj = getDeepObject(currentObj, lastKey, currentKey, isJsNestingSyntax && keyIsDot, void 0))), hasBothKeyValuePair || currentKey !== "") { + hasBothKeyValuePair && (value = input.slice(equalityIndex + 1, i), valueHasPlus && (value = value.replace(regexPlus, " ")), shouldDecodeValue && (value = decodeURIComponent(value) || value)); + let newValue = valueDeserializer(value, currentKey); + if (arrayRepeat) { + let currentValue = currentObj[currentKey]; + currentValue === void 0 ? arrayRepeatBracketIndex > -1 ? currentObj[currentKey] = [newValue] : currentObj[currentKey] = newValue : currentValue.pop ? currentValue.push(newValue) : currentObj[currentKey] = [currentValue, newValue]; + } else + currentObj[currentKey] = newValue; + } + value = "", startingIndex = i, equalityIndex = i, shouldDecodeKey = !1, shouldDecodeValue = !1, keyHasPlus = !1, valueHasPlus = !1, keyIsDot = !1, arrayRepeatBracketIndex = -1, keySeparatorIndex = i, currentObj = result, lastKey = void 0, currentKey = ""; + } else c === 93 ? (arrayRepeat && arrayRepeatSyntax === "bracket" && prevChar === 91 && (arrayRepeatBracketIndex = prevIndex), nesting && (nestingSyntax === "index" || isJsNestingSyntax) && equalityIndex <= startingIndex && (keySeparatorIndex !== prevIndex && (keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey), currentKey = keyDeserializer(keyChunk), lastKey !== void 0 && (currentObj = getDeepObject(currentObj, lastKey, currentKey, void 0, void 0)), lastKey = currentKey, keyHasPlus = !1, shouldDecodeKey = !1), keySeparatorIndex = i, keyIsDot = !1)) : c === 46 ? nesting && (nestingSyntax === "dot" || isJsNestingSyntax) && equalityIndex <= startingIndex && (keySeparatorIndex !== prevIndex && (keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey), currentKey = keyDeserializer(keyChunk), lastKey !== void 0 && (currentObj = getDeepObject(currentObj, lastKey, currentKey, isJsNestingSyntax)), lastKey = currentKey, keyHasPlus = !1, shouldDecodeKey = !1), keyIsDot = !0, keySeparatorIndex = i) : c === 91 ? nesting && (nestingSyntax === "index" || isJsNestingSyntax) && equalityIndex <= startingIndex && (keySeparatorIndex !== prevIndex && (keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey), currentKey = keyDeserializer(keyChunk), isJsNestingSyntax && lastKey !== void 0 && (currentObj = getDeepObject(currentObj, lastKey, currentKey, isJsNestingSyntax)), lastKey = currentKey, keyHasPlus = !1, shouldDecodeKey = !1, keyIsDot = !1), keySeparatorIndex = i) : c === 61 ? equalityIndex <= startingIndex ? equalityIndex = i : shouldDecodeValue = !0 : c === 43 ? equalityIndex > startingIndex ? valueHasPlus = !0 : keyHasPlus = !0 : c === 37 && (equalityIndex > startingIndex ? shouldDecodeValue = !0 : shouldDecodeKey = !0); + prevIndex = i, prevChar = c; + } + return result; +} + +// ../../node_modules/picoquery/lib/stringify.js +function stringify(input, options) { + return input === null || typeof input != "object" ? "" : stringifyObject(input, options ?? {}); +} + +export { + parse, + stringify +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SNLGT2ZI.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SNLGT2ZI.js new file mode 100644 index 0000000000000000000000000000000000000000..4dfd0fee2423bbc048fde0782c4fed2e1320afc8 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-SNLGT2ZI.js @@ -0,0 +1,3388 @@ +import { + isTestEnvironment, + pauseAnimations, + waitForAnimations +} from "./chunk-MEXTPDJG.js"; +import { + Tag, + mockChannel +} from "./chunk-A26ZOLVJ.js"; +import { + parse, + stringify +} from "./chunk-SFVA4SBT.js"; +import { + require_memoizerific +} from "./chunk-DRQKCCAG.js"; +import { + SNIPPET_RENDERED +} from "./chunk-OA6XKWIN.js"; +import { + invariant +} from "./chunk-IWQGIXJS.js"; +import { + require_ansi_to_html, + resolveViewport, + toResolvedViewportDimensions +} from "./chunk-X5VVFFFE.js"; +import { + createBrowserStaticLoader, + getService, + registerService +} from "./chunk-W6Y3UHOT.js"; +import { + combineParameters, + inferArgTypes, + inferControls +} from "./chunk-FLUL445Z.js"; +import { + mapValues +} from "./chunk-5GYAEUAU.js"; +import { + isEqual, + isPlainObject +} from "./chunk-Z3B64JMR.js"; +import { + MINIMAL_VIEWPORTS, + PARAM_KEY +} from "./chunk-NQ3W4AUJ.js"; +import { + dedent +} from "./chunk-3LY4VQVK.js"; +import { + __toESM +} from "./chunk-IMSF75WX.js"; + +// src/preview-api/modules/addons/main.ts +import { + getChannel as readInstalledChannel, + setChannel as installStorybookChannel +} from "storybook/internal/channels"; +var AddonStore = class { + constructor() { + this.getChannel = () => { + if (this.channel) + return this.channel; + let installed = readInstalledChannel(); + return installed ? (this.channel = installed, this.resolve(), this.channel) : mockChannel(); + }; + this.ready = () => this.promise; + this.hasChannel = () => !!this.channel || !!readInstalledChannel(); + this.setChannel = (channel) => { + this.channel = channel, installStorybookChannel(channel), this.resolve(); + }; + this.promise = new Promise((res) => { + this.resolve = () => res(this.getChannel()); + }); + } +}, KEY = "__STORYBOOK_ADDONS_PREVIEW"; +function getAddonsStore() { + return globalThis[KEY] || (globalThis[KEY] = new AddonStore()), globalThis[KEY]; +} +var addons = getAddonsStore(); + +// src/preview-api/modules/addons/hooks.ts +import { logger } from "storybook/internal/client-logger"; +import { + FORCE_RE_RENDER, + RESET_STORY_ARGS, + STORY_RENDERED, + UPDATE_GLOBALS, + UPDATE_STORY_ARGS +} from "storybook/internal/core-events"; +import { global } from "@storybook/global"; +var HooksContext = class { + constructor() { + this.hookListsMap = void 0; + this.mountedDecorators = void 0; + this.prevMountedDecorators = void 0; + this.currentHooks = void 0; + this.nextHookIndex = void 0; + this.currentPhase = void 0; + this.currentEffects = void 0; + this.prevEffects = void 0; + this.currentDecoratorName = void 0; + this.hasUpdates = void 0; + this.currentContext = void 0; + this.renderListener = (storyId) => { + storyId === this.currentContext?.id && (this.triggerEffects(), this.currentContext = null, this.removeRenderListeners()); + }; + this.init(); + } + init() { + this.hookListsMap = /* @__PURE__ */ new WeakMap(), this.mountedDecorators = /* @__PURE__ */ new Set(), this.prevMountedDecorators = /* @__PURE__ */ new Set(), this.currentHooks = [], this.nextHookIndex = 0, this.currentPhase = "NONE", this.currentEffects = [], this.prevEffects = [], this.currentDecoratorName = null, this.hasUpdates = !1, this.currentContext = null; + } + clean() { + this.prevEffects.forEach((effect) => { + effect.destroy && effect.destroy(); + }), this.init(), this.removeRenderListeners(); + } + getNextHook() { + let hook = this.currentHooks[this.nextHookIndex]; + return this.nextHookIndex += 1, hook; + } + triggerEffects() { + this.prevEffects.forEach((effect) => { + !this.currentEffects.includes(effect) && effect.destroy && effect.destroy(); + }), this.currentEffects.forEach((effect) => { + this.prevEffects.includes(effect) || (effect.destroy = effect.create()); + }), this.prevEffects = this.currentEffects, this.currentEffects = []; + } + addRenderListeners() { + this.removeRenderListeners(), addons.getChannel().on(STORY_RENDERED, this.renderListener); + } + removeRenderListeners() { + addons.getChannel().removeListener(STORY_RENDERED, this.renderListener); + } +}; +function hookify(fn) { + let hookified = (...args) => { + let { hooks } = typeof args[0] == "function" ? args[1] : args[0], prevPhase = hooks.currentPhase, prevHooks = hooks.currentHooks, prevNextHookIndex = hooks.nextHookIndex, prevDecoratorName = hooks.currentDecoratorName; + hooks.currentDecoratorName = fn.name, hooks.prevMountedDecorators.has(fn) ? (hooks.currentPhase = "UPDATE", hooks.currentHooks = hooks.hookListsMap.get(fn) || []) : (hooks.currentPhase = "MOUNT", hooks.currentHooks = [], hooks.hookListsMap.set(fn, hooks.currentHooks), hooks.prevMountedDecorators.add(fn)), hooks.nextHookIndex = 0; + let prevContext = global.STORYBOOK_HOOKS_CONTEXT; + global.STORYBOOK_HOOKS_CONTEXT = hooks; + let result = fn(...args); + if (global.STORYBOOK_HOOKS_CONTEXT = prevContext, hooks.currentPhase === "UPDATE" && hooks.getNextHook() != null) + throw new Error( + "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." + ); + return hooks.currentPhase = prevPhase, hooks.currentHooks = prevHooks, hooks.nextHookIndex = prevNextHookIndex, hooks.currentDecoratorName = prevDecoratorName, result; + }; + return hookified.originalFn = fn, hookified; +} +var numberOfRenders = 0, RENDER_LIMIT = 25, applyHooks = (applyDecorators) => (storyFn, decorators) => { + let decorated = applyDecorators( + hookify(storyFn), + decorators.map((decorator) => hookify(decorator)) + ); + return (context) => { + let { hooks } = context; + hooks.prevMountedDecorators ??= /* @__PURE__ */ new Set(), hooks.mountedDecorators = /* @__PURE__ */ new Set([storyFn, ...decorators]), hooks.currentContext = context, hooks.hasUpdates = !1; + let result = decorated(context); + for (numberOfRenders = 1; hooks.hasUpdates; ) + if (hooks.hasUpdates = !1, hooks.currentEffects = [], result = decorated(context), numberOfRenders += 1, numberOfRenders > RENDER_LIMIT) + throw new Error( + "Too many re-renders. Storybook limits the number of renders to prevent an infinite loop." + ); + return hooks.addRenderListeners(), result; + }; +}, areDepsEqual = (deps, nextDeps) => deps.length === nextDeps.length && deps.every((dep, i) => dep === nextDeps[i]), invalidHooksError = () => new Error( + `Storybook preview hooks can only be called inside decorators and story functions. + +When combining Storybook hooks (e.g. useArgs) with framework hooks (e.g. React's useState, useEffect, useRef) in the same render function, use Storybook's equivalents from 'storybook/preview-api' instead: useState, useEffect, useRef, useMemo, useCallback, useReducer.` +); +function getHooksContextOrNull() { + return global.STORYBOOK_HOOKS_CONTEXT || null; +} +function getHooksContextOrThrow() { + let hooks = getHooksContextOrNull(); + if (hooks == null) + throw invalidHooksError(); + return hooks; +} +function useHook(name, callback, deps) { + let hooks = getHooksContextOrThrow(); + if (hooks.currentPhase === "MOUNT") { + deps != null && !Array.isArray(deps) && logger.warn( + `${name} received a final argument that is not an array (instead, received ${deps}). When specified, the final argument must be an array.` + ); + let hook = { name, deps }; + return hooks.currentHooks.push(hook), callback(hook), hook; + } + if (hooks.currentPhase === "UPDATE") { + let hook = hooks.getNextHook(); + if (hook == null) + throw new Error("Rendered more hooks than during the previous render."); + return hook.name !== name && logger.warn( + `Storybook has detected a change in the order of Hooks${hooks.currentDecoratorName ? ` called by ${hooks.currentDecoratorName}` : ""}. This will lead to bugs and errors if not fixed.` + ), deps != null && hook.deps == null && logger.warn( + `${name} received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.` + ), deps != null && hook.deps != null && deps.length !== hook.deps.length && logger.warn(`The final argument passed to ${name} changed size between renders. The order and size of this array must remain constant. +Previous: ${hook.deps} +Incoming: ${deps}`), (deps == null || hook.deps == null || !areDepsEqual(deps, hook.deps)) && (callback(hook), hook.deps = deps), hook; + } + throw invalidHooksError(); +} +function useMemoLike(name, nextCreate, deps) { + let { memoizedState } = useHook( + name, + (hook) => { + hook.memoizedState = nextCreate(); + }, + deps + ); + return memoizedState; +} +function useMemo(nextCreate, deps) { + return useMemoLike("useMemo", nextCreate, deps); +} +function useCallback(callback, deps) { + return useMemoLike("useCallback", () => callback, deps); +} +function useRefLike(name, initialValue) { + return useMemoLike(name, () => ({ current: initialValue }), []); +} +function useRef(initialValue) { + return useRefLike("useRef", initialValue); +} +function triggerUpdate() { + let hooks = getHooksContextOrNull(); + if (hooks != null && hooks.currentPhase !== "NONE") + hooks.hasUpdates = !0; + else + try { + addons.getChannel().emit(FORCE_RE_RENDER); + } catch { + logger.warn("State updates of Storybook preview hooks work only in browser"); + } +} +function useStateLike(name, initialState) { + let stateRef = useRefLike( + name, + // @ts-expect-error S type should never be function, but there's no way to tell that to TypeScript + typeof initialState == "function" ? initialState() : initialState + ), setState = (update) => { + stateRef.current = typeof update == "function" ? update(stateRef.current) : update, triggerUpdate(); + }; + return [stateRef.current, setState]; +} +function useState(initialState) { + return useStateLike("useState", initialState); +} +function useReducer(reducer, initialArg, init) { + let initialState = init != null ? () => init(initialArg) : initialArg, [state, setState] = useStateLike("useReducer", initialState); + return [state, (action) => setState((prevState) => reducer(prevState, action))]; +} +function useEffect(create, deps) { + let hooks = getHooksContextOrThrow(), effect = useMemoLike("useEffect", () => ({ create }), deps); + hooks.currentEffects.includes(effect) || hooks.currentEffects.push(effect); +} +function useChannel(eventMap, deps = []) { + let channel = addons.getChannel(); + return useEffect(() => (Object.entries(eventMap).forEach(([type, listener]) => channel.on(type, listener)), () => { + Object.entries(eventMap).forEach( + ([type, listener]) => channel.removeListener(type, listener) + ); + }), [...Object.keys(eventMap), ...deps]), useCallback(channel.emit.bind(channel), [channel]); +} +function useStoryContext() { + let { currentContext } = getHooksContextOrThrow(); + if (currentContext == null) + throw invalidHooksError(); + return currentContext; +} +function useParameter(parameterKey, defaultValue) { + let { parameters } = useStoryContext(); + if (parameterKey) + return parameters[parameterKey] ?? defaultValue; +} +function useArgs() { + let channel = addons.getChannel(), { id: storyId, args } = useStoryContext(), updateArgs = useCallback( + (updatedArgs) => channel.emit(UPDATE_STORY_ARGS, { storyId, updatedArgs }), + [channel, storyId] + ), resetArgs = useCallback( + (argNames) => channel.emit(RESET_STORY_ARGS, { storyId, argNames }), + [channel, storyId] + ); + return [args, updateArgs, resetArgs]; +} +function useGlobals() { + let channel = addons.getChannel(), { globals } = useStoryContext(), updateGlobals = useCallback( + (newGlobals) => channel.emit(UPDATE_GLOBALS, { globals: newGlobals }), + [channel] + ); + return [globals, updateGlobals]; +} + +// src/preview-api/modules/addons/make-decorator.ts +var makeDecorator = ({ + name, + parameterName, + wrapper, + skipIfNoParametersOrOptions = !1 +}) => { + let decorator = (options) => (storyFn, context) => { + let parameters = context.parameters && context.parameters[parameterName]; + return parameters && parameters.disable || skipIfNoParametersOrOptions && !options && !parameters ? storyFn(context) : wrapper(storyFn, context, { + options, + parameters + }); + }; + return (...args) => typeof args[0] == "function" ? decorator()(...args) : (...innerArgs) => { + if (innerArgs.length > 1) + return args.length > 1 ? decorator(args)(...innerArgs) : decorator(...args)(...innerArgs); + throw new Error( + `Passing stories directly into ${name}() is not allowed, + instead use addDecorator(${name}) and pass options with the '${parameterName}' parameter` + ); + }; +}; + +// src/preview-api/modules/store/StoryStore.ts +import { + CalledExtractOnStoreError, + MissingStoryFromCsfFileError +} from "storybook/internal/preview-errors"; +var import_memoizerific2 = __toESM(require_memoizerific(), 1); + +// src/preview-api/modules/store/args.ts +import { once } from "storybook/internal/client-logger"; +var INCOMPATIBLE = /* @__PURE__ */ Symbol("incompatible"), map = (arg, argType) => { + let type = argType.type; + if (arg == null || !type || argType.mapping) + return arg; + switch (type.name) { + case "string": + return String(arg); + case "enum": + return arg; + case "number": + return Number(arg); + case "boolean": + return String(arg) === "true"; + case "array": + return !type.value || !Array.isArray(arg) ? INCOMPATIBLE : arg.reduce((acc, item, index) => { + let mapped = map(item, { type: type.value }); + return mapped !== INCOMPATIBLE && (acc[index] = mapped), acc; + }, new Array(arg.length)); + case "object": + return typeof arg == "string" || typeof arg == "number" ? arg : !type.value || typeof arg != "object" ? INCOMPATIBLE : Object.entries(arg).reduce((acc, [key, val]) => { + let mapped = map(val, { type: type.value[key] }); + return mapped === INCOMPATIBLE ? acc : Object.assign(acc, { [key]: mapped }); + }, {}); + case "other": + return typeof arg == "string" || typeof arg == "number" || typeof arg == "boolean" ? arg : INCOMPATIBLE; + default: + return INCOMPATIBLE; + } +}, mapArgsToTypes = (args, argTypes) => Object.entries(args).reduce((acc, [key, value]) => { + if (!argTypes[key]) + return acc; + let mapped = map(value, argTypes[key]); + return mapped === INCOMPATIBLE ? acc : Object.assign(acc, { [key]: mapped }); +}, {}), combineArgs = (value, update) => Array.isArray(value) && Array.isArray(update) ? update.reduce( + (acc, upd, index) => (acc[index] = combineArgs(value[index], update[index]), acc), + [...value] +).filter((v) => v !== void 0) : !isPlainObject(value) || !isPlainObject(update) ? update : Object.keys({ ...value, ...update }).reduce((acc, key) => { + if (key in update) { + let combined = combineArgs(value[key], update[key]); + combined !== void 0 && (acc[key] = combined); + } else + acc[key] = value[key]; + return acc; +}, {}), validateOptions = (args, argTypes) => Object.entries(argTypes).reduce((acc, [key, { options }]) => { + function allowArg() { + return key in args && (acc[key] = args[key]), acc; + } + if (!options) + return allowArg(); + if (!Array.isArray(options)) + return once.error(dedent` + Invalid argType: '${key}.options' should be an array. + + More info: https://storybook.js.org/docs/api/arg-types?ref=error + `), allowArg(); + if (options.some((opt) => opt && ["object", "function"].includes(typeof opt))) + return once.error(dedent` + Invalid argType: '${key}.options' should only contain primitives. Use a 'mapping' for complex values. + + More info: https://storybook.js.org/docs/writing-stories/args?ref=error#mapping-to-complex-arg-values + `), allowArg(); + let isArray = Array.isArray(args[key]), invalidIndex = isArray && args[key].findIndex((val) => !options.includes(val)), isValidArray = isArray && invalidIndex === -1; + if (args[key] === void 0 || options.includes(args[key]) || isValidArray) + return allowArg(); + let field = isArray ? `${key}[${invalidIndex}]` : key, supportedOptions = options.map((opt) => typeof opt == "string" ? `'${opt}'` : String(opt)).join(", "); + return once.warn(`Received illegal value for '${field}'. Supported options: ${supportedOptions}`), acc; +}, {}), DEEPLY_EQUAL = /* @__PURE__ */ Symbol("Deeply equal"), deepDiff = (value, update) => { + if (typeof value != typeof update) + return update; + if (isEqual(value, update)) + return DEEPLY_EQUAL; + if (Array.isArray(value) && Array.isArray(update)) { + let res = update.reduce((acc, upd, index) => { + let diff = deepDiff(value[index], upd); + return diff !== DEEPLY_EQUAL && (acc[index] = diff), acc; + }, new Array(update.length)); + return update.length >= value.length ? res : res.concat(new Array(value.length - update.length).fill(void 0)); + } + return isPlainObject(value) && isPlainObject(update) ? Object.keys({ ...value, ...update }).reduce((acc, key) => { + let diff = deepDiff(value?.[key], update?.[key]); + return diff === DEEPLY_EQUAL ? acc : Object.assign(acc, { [key]: diff }); + }, {}) : update; +}, UNTARGETED = "UNTARGETED"; +function groupArgsByTarget({ + args, + argTypes +}) { + let groupedArgs = {}; + return Object.entries(args).forEach(([name, value]) => { + let { target = UNTARGETED } = argTypes[name] || {}; + groupedArgs[target] = groupedArgs[target] || {}, groupedArgs[target][name] = value; + }), groupedArgs; +} + +// src/preview-api/modules/store/ArgsStore.ts +function deleteUndefined(obj) { + return Object.keys(obj).forEach((key) => obj[key] === void 0 && delete obj[key]), obj; +} +var ArgsStore = class { + constructor() { + this.initialArgsByStoryId = {}; + this.argsByStoryId = {}; + } + get(storyId) { + if (!(storyId in this.argsByStoryId)) + throw new Error(`No args known for ${storyId} -- has it been rendered yet?`); + return this.argsByStoryId[storyId]; + } + setInitial(story) { + if (!this.initialArgsByStoryId[story.id]) + this.initialArgsByStoryId[story.id] = story.initialArgs, this.argsByStoryId[story.id] = story.initialArgs; + else if (this.initialArgsByStoryId[story.id] !== story.initialArgs) { + let delta = deepDiff(this.initialArgsByStoryId[story.id], this.argsByStoryId[story.id]); + this.initialArgsByStoryId[story.id] = story.initialArgs, this.argsByStoryId[story.id] = story.initialArgs, delta !== DEEPLY_EQUAL && this.updateFromDelta(story, delta); + } + } + updateFromDelta(story, delta) { + let validatedDelta = validateOptions(delta, story.argTypes); + this.argsByStoryId[story.id] = combineArgs(this.argsByStoryId[story.id], validatedDelta); + } + updateFromPersisted(story, persisted) { + let mappedPersisted = mapArgsToTypes(persisted, story.argTypes); + return this.updateFromDelta(story, mappedPersisted); + } + update(storyId, argsUpdate) { + if (!(storyId in this.argsByStoryId)) + throw new Error(`No args known for ${storyId} -- has it been rendered yet?`); + this.argsByStoryId[storyId] = deleteUndefined({ + ...this.argsByStoryId[storyId], + ...argsUpdate + }); + } +}; + +// src/preview-api/modules/store/GlobalsStore.ts +import { logger as logger2 } from "storybook/internal/client-logger"; + +// src/preview-api/modules/store/csf/getValuesFromGlobalTypes.ts +var getValuesFromGlobalTypes = (globalTypes = {}) => Object.entries(globalTypes).reduce((acc, [arg, { defaultValue }]) => (typeof defaultValue < "u" && (acc[arg] = defaultValue), acc), {}); + +// src/preview-api/modules/store/GlobalsStore.ts +var GlobalsStore = class { + constructor({ + globals = {}, + globalTypes = {} + }) { + this.set({ globals, globalTypes }); + } + set({ globals = {}, globalTypes = {} }) { + let delta = this.initialGlobals && deepDiff(this.initialGlobals, this.globals); + this.allowedGlobalNames = /* @__PURE__ */ new Set([...Object.keys(globals), ...Object.keys(globalTypes)]); + let defaultGlobals = getValuesFromGlobalTypes(globalTypes); + this.initialGlobals = { ...defaultGlobals, ...globals }, this.globals = this.initialGlobals, delta && delta !== DEEPLY_EQUAL && this.updateFromPersisted(delta); + } + filterAllowedGlobals(globals) { + return Object.entries(globals).reduce((acc, [key, value]) => (this.allowedGlobalNames.has(key) ? acc[key] = value : logger2.warn( + `Attempted to set a global (${key}) that is not defined in initial globals or globalTypes` + ), acc), {}); + } + updateFromPersisted(persisted) { + let allowedUrlGlobals = this.filterAllowedGlobals(persisted); + this.globals = { ...this.globals, ...allowedUrlGlobals }; + } + get() { + return this.globals; + } + update(newGlobals) { + this.globals = { ...this.globals, ...this.filterAllowedGlobals(newGlobals) }; + for (let key in newGlobals) + newGlobals[key] === void 0 && (this.globals[key] = this.initialGlobals[key]); + } +}; + +// src/preview-api/modules/store/StoryIndexStore.ts +var import_memoizerific = __toESM(require_memoizerific(), 1); +import { MissingStoryAfterHmrError } from "storybook/internal/preview-errors"; +var getImportPathMap = (0, import_memoizerific.default)(1)( + (entries) => Object.values(entries).reduce( + (acc, entry) => (acc[entry.importPath] = acc[entry.importPath] || entry, acc), + {} + ) +), StoryIndexStore = class { + constructor({ entries } = { v: 5, entries: {} }) { + this.entries = entries; + } + entryFromSpecifier(specifier) { + let entries = Object.values(this.entries); + if (specifier === "*") + return entries[0]; + if (typeof specifier == "string") + return this.entries[specifier] ? this.entries[specifier] : entries.find((entry) => entry.id.startsWith(specifier)); + let { name, title } = specifier; + return entries.find((entry) => entry.name === name && entry.title === title); + } + storyIdToEntry(storyId) { + let storyEntry = this.entries[storyId]; + if (!storyEntry) + throw new MissingStoryAfterHmrError({ storyId }); + return storyEntry; + } + importPathToEntry(importPath) { + return getImportPathMap(this.entries)[importPath]; + } +}; + +// src/preview-api/modules/store/csf/normalizeInputTypes.ts +var normalizeType = (type) => typeof type == "string" ? { name: type } : type, normalizeControl = (control) => typeof control == "string" ? { type: control, disable: !1 } : control && typeof control == "object" && "type" in control && !("disable" in control) ? { ...control, disable: !1 } : control, normalizeInputType = (inputType, key) => { + let { type, control, ...rest } = inputType, normalized = { + name: key, + ...rest + }; + return type && (normalized.type = normalizeType(type)), control ? normalized.control = normalizeControl(control) : control === !1 && (normalized.control = { disable: !0 }), normalized; +}, normalizeInputTypes = (inputTypes) => mapValues(inputTypes, normalizeInputType); + +// src/preview-api/modules/store/csf/normalizeStory.ts +import { deprecate, logger as logger3 } from "storybook/internal/client-logger"; +import { storyNameFromExport, toId } from "storybook/internal/csf"; + +// src/preview-api/modules/store/csf/normalizeArrays.ts +var normalizeArrays = (array) => Array.isArray(array) ? array : array ? [array] : []; + +// src/preview-api/modules/store/csf/normalizeStory.ts +var deprecatedStoryAnnotation = dedent` +CSF .story annotations deprecated; annotate story functions directly: +- StoryFn.story.name => StoryFn.storyName +- StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators) +See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod. +`; +function normalizeStory(key, storyAnnotations, meta) { + let storyObject = storyAnnotations, userStoryFn = typeof storyAnnotations == "function" ? storyAnnotations : null, { story } = storyObject; + story && (logger3.debug("deprecated story", story), deprecate(deprecatedStoryAnnotation)); + let exportName = storyNameFromExport(key), name = typeof storyObject != "function" && storyObject.name || storyObject.storyName || story?.name || exportName, decorators = [ + ...normalizeArrays(storyObject.decorators), + ...normalizeArrays(story?.decorators) + ], parameters = { ...story?.parameters, ...storyObject.parameters }, args = { ...story?.args, ...storyObject.args }, argTypes = { ...story?.argTypes, ...storyObject.argTypes }, loaders = [...normalizeArrays(storyObject.loaders), ...normalizeArrays(story?.loaders)], beforeEach = [ + ...normalizeArrays(storyObject.beforeEach), + ...normalizeArrays(story?.beforeEach) + ], afterEach = [ + ...normalizeArrays(storyObject.afterEach), + ...normalizeArrays(story?.afterEach) + ], { render, play, tags = [], globals = {} } = storyObject, id = parameters.__id || toId(meta.id, exportName); + return { + moduleExport: storyAnnotations, + id, + name, + tags, + decorators, + parameters, + args, + argTypes: normalizeInputTypes(argTypes), + loaders, + beforeEach, + afterEach, + globals, + ...render && { render }, + ...userStoryFn && { userStoryFn }, + ...play && { play } + }; +} + +// src/preview-api/modules/store/csf/processCSFFile.ts +import { logger as logger4 } from "storybook/internal/client-logger"; +import { getStoryChildren, isExportStory, isStory, toTestId } from "storybook/internal/csf"; + +// src/preview-api/modules/store/csf/normalizeComponentAnnotations.ts +import { sanitize } from "storybook/internal/csf"; +function normalizeComponentAnnotations(defaultExport, title = defaultExport.title, importPath) { + let { id, argTypes } = defaultExport; + return { + id: sanitize(id || title), + ...defaultExport, + title, + ...argTypes && { argTypes: normalizeInputTypes(argTypes) }, + parameters: { + fileName: importPath, + ...defaultExport.parameters + } + }; +} + +// src/preview-api/modules/store/csf/processCSFFile.ts +var checkGlobals = (parameters) => { + let { globals, globalTypes } = parameters; + (globals || globalTypes) && logger4.error( + "Global args/argTypes can only be set globally", + JSON.stringify({ + globals, + globalTypes + }) + ); +}, checkStorySort = (parameters) => { + let { options } = parameters; + options?.storySort && logger4.error("The storySort option parameter can only be set globally"); +}, checkDisallowedParameters = (parameters) => { + parameters && (checkGlobals(parameters), checkStorySort(parameters)); +}; +function processCSFFile(moduleExports, importPath, title) { + let { default: defaultExport, __namedExportsOrder, ...namedExports } = moduleExports, factoryStory = Object.values(namedExports).find((it) => isStory(it)); + if (factoryStory) { + let meta2 = normalizeComponentAnnotations(factoryStory.meta.input, title, importPath); + checkDisallowedParameters(meta2.parameters); + let csfFile2 = { meta: meta2, stories: {}, moduleExports }; + return Object.keys(namedExports).forEach((key) => { + if (isExportStory(key, meta2) && isStory(namedExports[key])) { + let story = namedExports[key], storyMeta = normalizeStory(key, story.input, meta2); + checkDisallowedParameters(storyMeta.parameters), csfFile2.stories[storyMeta.id] = storyMeta, getStoryChildren(story).forEach((child) => { + let name = child.input.name, childId = toTestId(storyMeta.id, name); + child.input.parameters ??= {}, child.input.parameters.__id = childId, csfFile2.stories[childId] = normalizeStory(name, child.input, meta2); + }); + } + }), csfFile2.projectAnnotations = factoryStory.meta.preview.composed, csfFile2; + } + let meta = normalizeComponentAnnotations( + defaultExport, + title, + importPath + ); + checkDisallowedParameters(meta.parameters); + let csfFile = { meta, stories: {}, moduleExports }; + return Object.keys(namedExports).forEach((key) => { + if (isExportStory(key, meta)) { + let storyMeta = normalizeStory(key, namedExports[key], meta); + checkDisallowedParameters(storyMeta.parameters), csfFile.stories[storyMeta.id] = storyMeta; + } + }), csfFile; +} + +// src/preview-api/modules/store/csf/prepareStory.ts +import { combineTags, includeConditionalArg } from "storybook/internal/csf"; +import { NoRenderFunctionError } from "storybook/internal/preview-errors"; +import { global as global2 } from "@storybook/global"; +import { global as globalThis2 } from "@storybook/global"; + +// src/preview-api/modules/preview-web/render/mount-utils.ts +function mountDestructured(playFunction) { + return playFunction != null && getUsedProps(playFunction).includes("mount"); +} +function getUsedProps(fn) { + let [, args, body] = fn.toString().match(/[^(]*\(([^)]+)\)(?:.*{([^]+)})?/) || []; + if (!args) + return []; + let [firstArg] = splitByComma(args); + if (!firstArg) + return []; + let [, destructuredProps] = firstArg.match(/^{([^]+)}$/) || []; + if (destructuredProps) + return splitByComma(stripComments(destructuredProps)).map( + (prop) => prop.replace(/:.*|=.*/g, "").trim() + ); + if (!firstArg.match(/^[a-z_$][0-9a-z_$]*$/i)) + return []; + let escapedArg = firstArg.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), [, destructuredArg] = body?.trim()?.match(new RegExp(`^(?:const|let|var)\\s*{([^}]+)}\\s*=\\s*${escapedArg};`)) || []; + return destructuredArg ? splitByComma(stripComments(destructuredArg)).map( + (prop) => prop.replace(/:.*|=.*/g, "").trim() + ) : []; +} +function stripComments(s) { + return s = s.replace(/\/\/.*$/gm, ""), s = s.replace(/\/\*[\s\S]*?\*\//g, ""), s; +} +function splitByComma(s) { + let result = [], stack = [], start = 0; + for (let i = 0; i < s.length; i++) + if (s[i] === "{" || s[i] === "[") + stack.push(s[i] === "{" ? "}" : "]"); + else if (s[i] === stack[stack.length - 1]) + stack.pop(); + else if (!stack.length && s[i] === ",") { + let token = s.substring(start, i).trim(); + token && result.push(token), start = i + 1; + } + let lastToken = s.substring(start).trim(); + return lastToken && result.push(lastToken), result; +} + +// src/preview-api/modules/store/decorators.ts +function decorateStory(storyFn, decorator, bindWithContext) { + let boundStoryFunction = bindWithContext(storyFn); + return (context) => decorator(boundStoryFunction, context); +} +function sanitizeStoryContextUpdate({ + componentId, + title, + kind, + id, + name, + story, + parameters, + initialArgs, + argTypes, + ...update +} = {}) { + return update; +} +function defaultDecorateStory(storyFn, decorators) { + let contextStore = {}, bindWithContext = (decoratedStoryFn) => (update) => { + if (!contextStore.value) + throw new Error("Decorated function called without init"); + return contextStore.value = { + ...contextStore.value, + ...sanitizeStoryContextUpdate(update) + }, decoratedStoryFn(contextStore.value); + }, decoratedWithContextStore = decorators.reduce( + (story, decorator) => decorateStory(story, decorator, bindWithContext), + storyFn + ); + return (context) => (contextStore.value = context, decoratedWithContextStore(context)); +} + +// src/preview-api/modules/store/csf/prepareStory.ts +function prepareStory(storyAnnotations, componentAnnotations, projectAnnotations) { + let { moduleExport, id, name } = storyAnnotations || {}, partialAnnotations = preparePartialAnnotations( + storyAnnotations, + componentAnnotations, + projectAnnotations + ), applyLoaders = async (context) => { + let loaded = {}; + for (let loaders of [ + normalizeArrays(projectAnnotations.loaders), + normalizeArrays(componentAnnotations.loaders), + normalizeArrays(storyAnnotations.loaders) + ]) { + if (context.abortSignal.aborted) + return loaded; + let loadResults = await Promise.all(loaders.map((loader) => loader(context))); + Object.assign(loaded, ...loadResults); + } + return loaded; + }, applyBeforeEach = async (context) => { + let cleanupCallbacks = new Array(); + for (let beforeEach of [ + ...normalizeArrays(projectAnnotations.beforeEach), + ...normalizeArrays(componentAnnotations.beforeEach), + ...normalizeArrays(storyAnnotations.beforeEach) + ]) { + if (context.abortSignal.aborted) + return cleanupCallbacks; + let cleanup = await beforeEach(context); + cleanup && cleanupCallbacks.push(cleanup); + } + return cleanupCallbacks; + }, applyAfterEach = async (context) => { + let reversedFinalizers = [ + ...normalizeArrays(projectAnnotations.afterEach), + ...normalizeArrays(componentAnnotations.afterEach), + ...normalizeArrays(storyAnnotations.afterEach) + ].reverse(); + for (let finalizer of reversedFinalizers) { + if (context.abortSignal.aborted) + return; + await finalizer(context); + } + }, undecoratedStoryFn = (context) => context.originalStoryFn(context.args, context), { applyDecorators = defaultDecorateStory, runStep } = projectAnnotations, decorators = [ + ...normalizeArrays(storyAnnotations?.decorators), + ...normalizeArrays(componentAnnotations?.decorators), + ...normalizeArrays(projectAnnotations?.decorators) + ], render = storyAnnotations?.userStoryFn || storyAnnotations?.render || componentAnnotations.render || projectAnnotations.render, decoratedStoryFn = applyHooks(applyDecorators)(undecoratedStoryFn, decorators), unboundStoryFn = (context) => decoratedStoryFn(context), playFunction = storyAnnotations?.play ?? componentAnnotations?.play, usesMount = mountDestructured(playFunction); + if (!render && !usesMount) + throw new NoRenderFunctionError({ id }); + let defaultMount = (context) => async () => (await context.renderToCanvas(), context.canvas), mount = storyAnnotations.mount ?? componentAnnotations.mount ?? projectAnnotations.mount ?? defaultMount, testingLibraryRender = projectAnnotations.testingLibraryRender; + return { + storyGlobals: {}, + ...partialAnnotations, + moduleExport, + id, + name, + story: name, + originalStoryFn: render, + undecoratedStoryFn, + unboundStoryFn, + applyLoaders, + applyBeforeEach, + applyAfterEach, + playFunction, + runStep, + mount, + testingLibraryRender, + renderToCanvas: projectAnnotations.renderToCanvas, + usesMount + }; +} +function prepareMeta(componentAnnotations, projectAnnotations, moduleExport) { + return { + ...preparePartialAnnotations(void 0, componentAnnotations, projectAnnotations), + moduleExport + }; +} +function preparePartialAnnotations(storyAnnotations, componentAnnotations, projectAnnotations) { + let defaultTags = [Tag.DEV, Tag.TEST], extraTags = globalThis2.DOCS_OPTIONS?.autodocs === !0 ? [Tag.AUTODOCS] : [], overrideTags = storyAnnotations?.tags?.includes(Tag.TEST_FN) ? [`!${Tag.AUTODOCS}`] : [], tags = combineTags( + ...defaultTags, + ...extraTags, + ...projectAnnotations.tags ?? [], + ...componentAnnotations.tags ?? [], + ...overrideTags, + ...storyAnnotations?.tags ?? [] + ), parameters = combineParameters( + projectAnnotations.parameters, + componentAnnotations.parameters, + storyAnnotations?.parameters + ), { argTypesEnhancers = [], argsEnhancers = [] } = projectAnnotations, passedArgTypes = combineParameters( + projectAnnotations.argTypes, + componentAnnotations.argTypes, + storyAnnotations?.argTypes + ); + if (storyAnnotations) { + let render = storyAnnotations?.userStoryFn || storyAnnotations?.render || componentAnnotations.render || projectAnnotations.render; + parameters.__isArgsStory = render && render.length > 0; + } + let passedArgs = { + ...projectAnnotations.args, + ...componentAnnotations.args, + ...storyAnnotations?.args + }, storyGlobals = { + ...componentAnnotations.globals, + ...storyAnnotations?.globals + }, contextForEnhancers = { + componentId: componentAnnotations.id, + title: componentAnnotations.title, + kind: componentAnnotations.title, + // Back compat + id: storyAnnotations?.id || componentAnnotations.id, + // if there's no story name, we create a fake one since enhancers expect a name + name: storyAnnotations?.name || "__meta", + story: storyAnnotations?.name || "__meta", + // Back compat + component: componentAnnotations.component, + subcomponents: componentAnnotations.subcomponents, + tags, + parameters, + initialArgs: passedArgs, + argTypes: passedArgTypes, + storyGlobals + }; + contextForEnhancers.argTypes = argTypesEnhancers.filter((enhancer) => !(global2.FEATURES?.experimentalDocgenServer && enhancer.secondPass)).reduce( + (accumulatedArgTypes, enhancer) => enhancer({ ...contextForEnhancers, argTypes: accumulatedArgTypes }), + contextForEnhancers.argTypes + ); + let initialArgsBeforeEnhancers = { ...passedArgs }; + contextForEnhancers.initialArgs = [...argsEnhancers].reduce( + (accumulatedArgs, enhancer) => ({ + ...accumulatedArgs, + ...enhancer({ + ...contextForEnhancers, + initialArgs: accumulatedArgs + }) + }), + initialArgsBeforeEnhancers + ); + let { name, story, ...withoutStoryIdentifiers } = contextForEnhancers; + return withoutStoryIdentifiers; +} +function prepareContext(context) { + let { args: unmappedArgs } = context, targetedContext = { + ...context, + allArgs: void 0, + argsByTarget: void 0 + }; + if (global2.FEATURES?.argTypeTargetsV7) { + let argsByTarget = groupArgsByTarget(context); + targetedContext = { + ...context, + allArgs: context.args, + argsByTarget, + args: argsByTarget[UNTARGETED] || {} + }; + } + let mappedArgs = Object.entries(targetedContext.args).reduce((acc, [key, val]) => { + if (!targetedContext.argTypes[key]?.mapping) + return acc[key] = val, acc; + let mappingFn = (originalValue) => { + let mapping = targetedContext.argTypes[key].mapping; + return mapping && originalValue in mapping ? mapping[originalValue] : originalValue; + }; + return acc[key] = Array.isArray(val) ? val.map(mappingFn) : mappingFn(val), acc; + }, {}), includedArgs = Object.entries(mappedArgs).reduce((acc, [key, val]) => { + let argType = targetedContext.argTypes[key] || {}; + return includeConditionalArg(argType, mappedArgs, targetedContext.globals) && (acc[key] = val), acc; + }, {}); + return { ...targetedContext, unmappedArgs, args: includedArgs }; +} + +// src/preview-api/modules/store/csf/normalizeProjectAnnotations.ts +function normalizeProjectAnnotations({ + argTypes, + argTypesEnhancers, + decorators, + loaders, + beforeEach, + afterEach, + initialGlobals, + ...annotations +}) { + return { + ...argTypes && { argTypes: normalizeInputTypes(argTypes) }, + decorators: normalizeArrays(decorators), + loaders: normalizeArrays(loaders), + beforeEach: normalizeArrays(beforeEach), + afterEach: normalizeArrays(afterEach), + argTypesEnhancers: [ + ...argTypesEnhancers || [], + inferArgTypes, + // There's an architectural decision to be made regarding embedded addons in core: + // + // Option 1: Keep embedded addons but ensure consistency by moving addon-specific code + // (like inferControls) to live alongside the addon code itself. This maintains the + // concept of core addons while improving code organization. + // + // Option 2: Fully integrate these addons into core, potentially moving UI components + // into the manager and treating them as core features rather than addons. This is a + // bigger architectural change requiring careful consideration. + // + // For now, we're keeping inferControls here as we need time to properly evaluate + // these options and their implications. Some features (like Angular's cleanArgsDecorator) + // currently rely on this behavior. + // + // TODO: Make an architectural decision on the handling of core addons + inferControls + ], + initialGlobals, + ...annotations + }; +} + +// src/preview-api/modules/store/csf/composeConfigs.ts +import { global as global3 } from "@storybook/global"; + +// src/preview-api/modules/store/csf/beforeAll.ts +var composeBeforeAllHooks = (hooks) => async () => { + let cleanups2 = []; + for (let hook of hooks) { + let cleanup = await hook(); + cleanup && cleanups2.unshift(cleanup); + } + return async () => { + for (let cleanup of cleanups2) + await cleanup(); + }; +}; + +// src/preview-api/modules/store/csf/stepRunners.ts +function composeStepRunners(stepRunners) { + return async (label, play, playContext) => { + await stepRunners.reduceRight( + (innerPlay, stepRunner) => async () => stepRunner(label, innerPlay, playContext), + async () => play(playContext) + )(); + }; +} + +// src/preview-api/modules/store/csf/composeConfigs.ts +function getField(moduleExportList, field) { + return moduleExportList.map((xs) => xs.default?.[field] ?? xs[field]).filter(Boolean); +} +function getArrayField(moduleExportList, field, options = {}) { + return getField(moduleExportList, field).reduce((prev, cur) => { + let normalized = normalizeArrays(cur); + return options.reverseFileOrder ? [...normalized, ...prev] : [...prev, ...normalized]; + }, []); +} +function getObjectField(moduleExportList, field) { + return Object.assign({}, ...getField(moduleExportList, field)); +} +function getSingletonField(moduleExportList, field) { + return getField(moduleExportList, field).pop(); +} +function composeConfigs(moduleExportList) { + let allArgTypeEnhancers = getArrayField(moduleExportList, "argTypesEnhancers"), stepRunners = getField(moduleExportList, "runStep"), beforeAllHooks = getArrayField(moduleExportList, "beforeAll"); + return { + parameters: combineParameters(...getField(moduleExportList, "parameters")), + decorators: getArrayField(moduleExportList, "decorators", { + reverseFileOrder: !(global3.FEATURES?.legacyDecoratorFileOrder ?? !1) + }), + args: getObjectField(moduleExportList, "args"), + argsEnhancers: getArrayField(moduleExportList, "argsEnhancers"), + argTypes: getObjectField(moduleExportList, "argTypes"), + argTypesEnhancers: [ + ...allArgTypeEnhancers.filter((e) => !e.secondPass), + ...allArgTypeEnhancers.filter((e) => e.secondPass) + ], + initialGlobals: getObjectField(moduleExportList, "initialGlobals"), + globalTypes: getObjectField(moduleExportList, "globalTypes"), + loaders: getArrayField(moduleExportList, "loaders"), + beforeAll: composeBeforeAllHooks(beforeAllHooks), + beforeEach: getArrayField(moduleExportList, "beforeEach"), + afterEach: getArrayField(moduleExportList, "afterEach"), + render: getSingletonField(moduleExportList, "render"), + renderToCanvas: getSingletonField(moduleExportList, "renderToCanvas"), + applyDecorators: getSingletonField(moduleExportList, "applyDecorators"), + runStep: composeStepRunners(stepRunners), + tags: getArrayField(moduleExportList, "tags"), + mount: getSingletonField(moduleExportList, "mount"), + testingLibraryRender: getSingletonField(moduleExportList, "testingLibraryRender") + }; +} + +// src/preview-api/modules/store/csf/composeProjectAnnotationsWithCore.ts +import { + getCoreAnnotations, + hasCoreAnnotations, + markAsComposedWithCoreAnnotations +} from "storybook/internal/csf"; +function composeProjectAnnotationsWithCore(annotations) { + let definedAnnotations = annotations.filter(Boolean), alreadyComposedWithCore = definedAnnotations.some( + (annotation) => hasCoreAnnotations(annotation) + ); + return markAsComposedWithCoreAnnotations( + composeConfigs( + alreadyComposedWithCore ? definedAnnotations : [...getCoreAnnotations(), ...definedAnnotations] + ) + ); +} + +// src/preview-api/modules/store/csf/portable-stories.ts +import { isExportStory as isExportStory2 } from "storybook/internal/csf"; +import { MountMustBeDestructuredError } from "storybook/internal/preview-errors"; + +// src/preview-api/modules/store/reporter-api.ts +var ReporterAPI = class { + constructor() { + this.reports = []; + } + async addReport(report) { + this.reports.push(report); + } +}; + +// src/preview-api/modules/store/csf/csf-factory-utils.ts +import { isMeta, isStory as isStory2 } from "storybook/internal/csf"; +function getCsfFactoryAnnotations(story, meta, projectAnnotations) { + return isStory2(story) ? { + story: story.input, + meta: story.meta.input, + preview: story.meta.preview.composed + } : { story, meta: isMeta(meta) ? meta.input : meta, preview: projectAnnotations }; +} + +// src/preview-api/modules/store/csf/portable-stories.ts +function setDefaultProjectAnnotations(_defaultProjectAnnotations) { + globalThis.defaultProjectAnnotations = _defaultProjectAnnotations; +} +var DEFAULT_STORY_TITLE = "ComposedStory", DEFAULT_STORY_NAME = "Unnamed Story"; +function setProjectAnnotations(projectAnnotations) { + let annotations = Array.isArray(projectAnnotations) ? projectAnnotations : [projectAnnotations]; + return globalThis.globalProjectAnnotations = composeProjectAnnotationsWithCore([ + globalThis.defaultProjectAnnotations ?? {}, + ...annotations + ]), globalThis.globalProjectAnnotations ?? {}; +} +var cleanups = []; +function composeStory(storyAnnotations, componentAnnotations, projectAnnotations, defaultConfig, exportsName) { + if (storyAnnotations === void 0) + throw new Error("Expected a story but received undefined."); + componentAnnotations.title = componentAnnotations.title ?? DEFAULT_STORY_TITLE; + let normalizedComponentAnnotations = normalizeComponentAnnotations(componentAnnotations), storyName = exportsName || storyAnnotations.storyName || storyAnnotations.story?.name || storyAnnotations.name || DEFAULT_STORY_NAME, normalizedStory = normalizeStory( + storyName, + storyAnnotations, + normalizedComponentAnnotations + ), normalizedProjectAnnotations = normalizeProjectAnnotations( + composeConfigs([ + defaultConfig ?? globalThis.globalProjectAnnotations ?? {}, + projectAnnotations ?? {} + ]) + ), story = prepareStory( + normalizedStory, + normalizedComponentAnnotations, + normalizedProjectAnnotations + ), globals = { + ...getValuesFromGlobalTypes(normalizedProjectAnnotations.globalTypes), + ...normalizedProjectAnnotations.initialGlobals, + ...story.storyGlobals + }, reporting = new ReporterAPI(), initializeContext = () => { + let context = prepareContext({ + hooks: new HooksContext(), + globals, + args: { ...story.initialArgs }, + viewMode: "story", + reporting, + loaded: {}, + abortSignal: new AbortController().signal, + step: (label, play2) => story.runStep(label, play2, context), + canvasElement: null, + canvas: {}, + userEvent: {}, + globalTypes: normalizedProjectAnnotations.globalTypes, + ...story, + context: null, + mount: null + }); + return context.parameters.__isPortableStory = !0, context.context = context, story.renderToCanvas && (context.renderToCanvas = async () => { + let unmount = await story.renderToCanvas?.( + { + componentId: story.componentId, + title: story.title, + id: story.id, + name: story.name, + tags: story.tags, + showMain: () => { + }, + showError: (error) => { + throw new Error(`${error.title} +${error.description}`); + }, + showException: (error) => { + throw error; + }, + forceRemount: !0, + storyContext: context, + storyFn: () => story.unboundStoryFn(context), + unboundStoryFn: story.unboundStoryFn + }, + context.canvasElement + ); + unmount && cleanups.push(unmount); + let hooks = context.hooks; + cleanups.push(() => hooks.clean()), hooks.renderListener(context.id); + }), context.mount = story.mount(context), context; + }, loadedContext, play = async (extraContext) => { + let context = initializeContext(); + return context.canvasElement ??= globalThis?.document?.body, loadedContext && (context.loaded = loadedContext.loaded), Object.assign(context, extraContext), story.playFunction(context); + }, run = (extraContext) => { + let context = initializeContext(); + return Object.assign(context, extraContext), runStory(story, context); + }, playFunction = story.playFunction ? play : void 0; + return Object.assign( + function(extraArgs) { + let context = initializeContext(); + return loadedContext && (context.loaded = loadedContext.loaded), context.args = { + ...context.initialArgs, + ...extraArgs + }, story.unboundStoryFn(context); + }, + { + id: story.id, + storyName, + load: async () => { + for (let callback of [...cleanups].reverse()) + await callback(); + cleanups.length = 0; + let context = initializeContext(); + context.loaded = await story.applyLoaders(context), cleanups.push(...(await story.applyBeforeEach(context)).filter(Boolean)), loadedContext = context; + }, + globals, + args: story.initialArgs, + parameters: story.parameters, + argTypes: story.argTypes, + play: playFunction, + run, + reporting, + tags: story.tags + } + ); +} +var defaultComposeStory = (story, component, project, exportsName) => composeStory(story, component, project, {}, exportsName); +function composeStories(storiesImport, globalConfig, composeStoryFn = defaultComposeStory) { + let { default: metaExport, __esModule, __namedExportsOrder, ...stories } = storiesImport, meta = metaExport; + return Object.entries(stories).reduce( + (storiesMap, [exportsName, story]) => { + let { story: storyAnnotations, meta: componentAnnotations } = getCsfFactoryAnnotations(story); + return !meta && componentAnnotations && (meta = componentAnnotations), isExportStory2(exportsName, meta) ? Object.assign(storiesMap, { + [exportsName]: composeStoryFn(storyAnnotations, meta, globalConfig, exportsName) + }) : storiesMap; + }, + {} + ); +} +function createPlaywrightTest(baseTest) { + return baseTest.extend({ + mount: async ({ mount, page }, use) => { + await use(async (storyRef, ...restArgs) => { + if (!("__pw_type" in storyRef) || "__pw_type" in storyRef && storyRef.__pw_type !== "jsx") + throw new Error(dedent` + Portable stories in Playwright CT only work when referencing JSX elements. + Please use JSX format for your components such as: + + instead of: + await mount(MyComponent, { props: { foo: 'bar' } }) + + do: + await mount() + + More info: https://storybook.js.org/docs/api/portable-stories/portable-stories-playwright?ref=error + `); + let { props, ...storyRefWithoutProps } = storyRef; + await page.evaluate(async (wrappedStoryRef) => { + let unwrappedStoryRef = await globalThis.__pwUnwrapObject?.(wrappedStoryRef); + return ("__pw_type" in unwrappedStoryRef ? unwrappedStoryRef.type : unwrappedStoryRef)?.load?.(); + }, storyRefWithoutProps); + let mountResult = await mount(storyRef, ...restArgs); + return await page.evaluate(async (wrappedStoryRef) => { + let unwrappedStoryRef = await globalThis.__pwUnwrapObject?.(wrappedStoryRef), story = "__pw_type" in unwrappedStoryRef ? unwrappedStoryRef.type : unwrappedStoryRef, canvasElement = document.querySelector("#root"); + return story?.play?.({ canvasElement }); + }, storyRefWithoutProps), mountResult; + }); + } + }); +} +async function runStory(story, context) { + for (let callback of [...cleanups].reverse()) + await callback(); + if (cleanups.length = 0, !context.canvasElement) { + let container = document.createElement("div"); + globalThis?.document?.body?.appendChild(container), context.canvasElement = container, cleanups.push(() => { + globalThis?.document?.body?.contains(container) && globalThis?.document?.body?.removeChild(container); + }); + } + if (context.loaded = await story.applyLoaders(context), context.abortSignal.aborted) + return; + cleanups.push(...(await story.applyBeforeEach(context)).filter(Boolean)); + let playFunction = story.playFunction, isMountDestructured = story.usesMount; + if (isMountDestructured || await context.mount(), context.abortSignal.aborted) + return; + playFunction && (isMountDestructured || (context.mount = async () => { + throw new MountMustBeDestructuredError({ playFunction: playFunction.toString() }); + }), await playFunction(context)); + let cleanUp; + isTestEnvironment() ? cleanUp = pauseAnimations() : await waitForAnimations(context.abortSignal), await story.applyAfterEach(context), await cleanUp?.(); +} + +// src/preview-api/modules/store/StoryStore.ts +function composeProjectAnnotations(projectAnnotations) { + return normalizeProjectAnnotations(composeProjectAnnotationsWithCore([projectAnnotations])); +} +var CSF_CACHE_SIZE = 1e3, STORY_CACHE_SIZE = 1e4, StoryStore = class { + constructor(storyIndex, importFn, projectAnnotations) { + this.importFn = importFn; + this.storyIndex = new StoryIndexStore(storyIndex), this.projectAnnotations = composeProjectAnnotations(projectAnnotations); + let { initialGlobals, globalTypes } = this.projectAnnotations; + this.args = new ArgsStore(), this.userGlobals = new GlobalsStore({ globals: initialGlobals, globalTypes }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache = (0, import_memoizerific2.default)(CSF_CACHE_SIZE)(processCSFFile), this.prepareMetaWithCache = (0, import_memoizerific2.default)(CSF_CACHE_SIZE)(prepareMeta), this.prepareStoryWithCache = (0, import_memoizerific2.default)(STORY_CACHE_SIZE)(prepareStory); + } + setProjectAnnotations(projectAnnotations) { + this.projectAnnotations = normalizeProjectAnnotations(projectAnnotations); + let { initialGlobals, globalTypes } = projectAnnotations; + this.userGlobals.set({ globals: initialGlobals, globalTypes }); + } + // This means that one of the CSF files has changed. + // If the `importFn` has changed, we will invalidate both caches. + // If the `storyIndex` data has changed, we may or may not invalidate the caches, depending + // on whether we've loaded the relevant files yet. + async onStoriesChanged({ + importFn, + storyIndex + }) { + importFn && (this.importFn = importFn), storyIndex && (this.storyIndex.entries = storyIndex.entries), this.cachedCSFFiles && await this.cacheAllCSFFiles(); + } + // Get an entry from the index, waiting on initialization if necessary + async storyIdToEntry(storyId) { + return this.storyIndex.storyIdToEntry(storyId); + } + // To load a single CSF file to service a story we need to look up the importPath in the index + async loadCSFFileByStoryId(storyId) { + let { importPath, title } = this.storyIndex.storyIdToEntry(storyId), moduleExports = await this.importFn(importPath); + return this.processCSFFileWithCache(moduleExports, importPath, title); + } + async loadAllCSFFiles() { + let importPaths = {}; + return Object.entries(this.storyIndex.entries).forEach(([storyId, { importPath }]) => { + importPaths[importPath] = storyId; + }), (await Promise.all( + Object.entries(importPaths).map(async ([importPath, storyId]) => ({ + importPath, + csfFile: await this.loadCSFFileByStoryId(storyId) + })) + )).reduce( + (acc, { importPath, csfFile }) => (acc[importPath] = csfFile, acc), + {} + ); + } + async cacheAllCSFFiles() { + this.cachedCSFFiles = await this.loadAllCSFFiles(); + } + preparedMetaFromCSFFile({ csfFile }) { + let componentAnnotations = csfFile.meta; + return this.prepareMetaWithCache( + componentAnnotations, + this.projectAnnotations, + csfFile.moduleExports.default + ); + } + // Load the CSF file for a story and prepare the story from it and the project annotations. + async loadStory({ storyId }) { + let csfFile = await this.loadCSFFileByStoryId(storyId); + return this.storyFromCSFFile({ storyId, csfFile }); + } + // This function is synchronous for convenience -- often times if you have a CSF file already + // it is easier not to have to await `loadStory`. + storyFromCSFFile({ + storyId, + csfFile + }) { + let storyAnnotations = csfFile.stories[storyId]; + if (!storyAnnotations) + throw new MissingStoryFromCsfFileError({ storyId }); + let componentAnnotations = csfFile.meta, story = this.prepareStoryWithCache( + storyAnnotations, + componentAnnotations, + csfFile.projectAnnotations ?? this.projectAnnotations + ); + return this.args.setInitial(story), this.hooks[story.id] = this.hooks[story.id] || new HooksContext(), story; + } + // If we have a CSF file we can get all the stories from it synchronously + componentStoriesFromCSFFile({ + csfFile + }) { + return Object.keys(this.storyIndex.entries).filter((storyId) => !!csfFile.stories[storyId]).map((storyId) => this.storyFromCSFFile({ storyId, csfFile })); + } + async loadEntry(id) { + let entry = await this.storyIdToEntry(id), storyImports = entry.type === "docs" ? entry.storiesImports : [], [entryExports, ...csfFiles] = await Promise.all([ + this.importFn(entry.importPath), + ...storyImports.map((storyImportPath) => { + let firstStoryEntry = this.storyIndex.importPathToEntry(storyImportPath); + return this.loadCSFFileByStoryId(firstStoryEntry.id); + }) + ]); + return { entryExports, csfFiles }; + } + // A prepared story does not include args, globals or hooks. These are stored in the story store + // and updated separately to the (immutable) story. + getStoryContext(story, { forceInitialArgs = !1 } = {}) { + let userGlobals = this.userGlobals.get(), { initialGlobals } = this.userGlobals, reporting = new ReporterAPI(); + return prepareContext({ + ...story, + args: forceInitialArgs ? story.initialArgs : this.args.get(story.id), + initialGlobals, + globalTypes: this.projectAnnotations.globalTypes, + userGlobals, + reporting, + globals: { + ...userGlobals, + ...story.storyGlobals + }, + hooks: this.hooks[story.id] + }); + } + addCleanupCallbacks(story, ...callbacks) { + this.cleanupCallbacks[story.id] = (this.cleanupCallbacks[story.id] || []).concat(callbacks); + } + async cleanupStory(story) { + this.hooks[story.id].clean(); + let callbacks = this.cleanupCallbacks[story.id]; + if (callbacks) + for (let callback of [...callbacks].reverse()) + await callback(); + delete this.cleanupCallbacks[story.id]; + } + extract(options = { includeDocsOnly: !1 }) { + let { cachedCSFFiles } = this; + if (console.log("extract: extracting stories", cachedCSFFiles), !cachedCSFFiles) + throw new CalledExtractOnStoreError(); + let stories = Object.entries(this.storyIndex.entries).reduce( + (acc, [storyId, entry]) => { + if (entry.type === "docs") + return acc; + let csfFile = cachedCSFFiles[entry.importPath], story = this.storyFromCSFFile({ storyId, csfFile }); + return !options.includeDocsOnly && story.parameters.docsOnly || (acc[storyId] = Object.entries(story).reduce( + (storyAcc, [key, value]) => key === "story" && entry.subtype === "test" ? { ...storyAcc, story: entry.parentName } : key === "moduleExport" || typeof value == "function" ? storyAcc : Array.isArray(value) ? Object.assign(storyAcc, { [key]: value.slice().sort() }) : Object.assign(storyAcc, { [key]: value }), + { + args: story.initialArgs, + globals: { + ...this.userGlobals.initialGlobals, + ...this.userGlobals.globals, + ...story.storyGlobals + }, + storyId: entry.parent ? entry.parent : storyId + } + )), acc; + }, + {} + ); + return console.log("extract: stories", stories), stories; + } +}; + +// src/preview-api/modules/store/autoTitle.ts +import { once as once2 } from "storybook/internal/client-logger"; + +// ../../node_modules/slash/index.js +function slash(path) { + return path.startsWith("\\\\?\\") ? path : path.replace(/\\/g, "/"); +} + +// src/preview-api/modules/store/autoTitle.ts +var sanitize2 = (parts) => { + if (parts.length === 0) + return parts; + let last = parts[parts.length - 1], lastStripped = last?.replace(/(?:[.](?:story|stories))?([.][^.]+)$/i, ""); + if (parts.length === 1) + return [lastStripped]; + let nextToLast = parts[parts.length - 2]; + return lastStripped && nextToLast && lastStripped.toLowerCase() === nextToLast.toLowerCase() ? [...parts.slice(0, -2), lastStripped] : lastStripped && (/^(story|stories)([.][^.]+)$/i.test(last) || /^index$/i.test(lastStripped)) ? parts.slice(0, -1) : [...parts.slice(0, -1), lastStripped]; +}; +function pathJoin(paths) { + return paths.flatMap((p) => p.split("/")).filter(Boolean).join("/"); +} +var userOrAutoTitleFromSpecifier = (fileName, entry, userTitle) => { + let { directory, importPathMatcher, titlePrefix = "" } = entry || {}; + typeof fileName == "number" && once2.warn(dedent` + CSF Auto-title received a numeric fileName. This typically happens when + webpack is mis-configured in production mode. To force webpack to produce + filenames, set optimization.moduleIds = "named" in your webpack config. + `); + let normalizedFileName = slash(String(fileName)); + if (importPathMatcher.exec(normalizedFileName)) { + if (!userTitle) { + let suffix = normalizedFileName.replace(directory, ""), parts = pathJoin([titlePrefix, suffix]).split("/"); + return parts = sanitize2(parts), parts.join("/"); + } + return titlePrefix ? pathJoin([titlePrefix, userTitle]) : userTitle; + } +}, userOrAutoTitle = (fileName, storiesEntries, userTitle) => { + for (let i = 0; i < storiesEntries.length; i += 1) { + let title = userOrAutoTitleFromSpecifier(fileName, storiesEntries[i], userTitle); + if (title) + return title; + } + return userTitle || void 0; +}; + +// src/preview-api/modules/store/storySort.ts +var STORY_KIND_PATH_SEPARATOR = /\s*\/\s*/, storySort = (options = {}) => (a, b) => { + if (a.title === b.title && !options.includeNames) + return 0; + let method = options.method || "configure", order = options.order || [], storyTitleA = a.title.trim().split(STORY_KIND_PATH_SEPARATOR), storyTitleB = b.title.trim().split(STORY_KIND_PATH_SEPARATOR); + options.includeNames && (storyTitleA.push(a.name), storyTitleB.push(b.name)); + let depth = 0; + for (; storyTitleA[depth] || storyTitleB[depth]; ) { + if (!storyTitleA[depth]) + return -1; + if (!storyTitleB[depth]) + return 1; + let nameA = storyTitleA[depth], nameB = storyTitleB[depth]; + if (nameA !== nameB) { + let indexA = order.indexOf(nameA), indexB = order.indexOf(nameB), indexWildcard = order.indexOf("*"); + return indexA !== -1 || indexB !== -1 ? (indexA === -1 && (indexWildcard !== -1 ? indexA = indexWildcard : indexA = order.length), indexB === -1 && (indexWildcard !== -1 ? indexB = indexWildcard : indexB = order.length), indexA - indexB) : method === "configure" ? 0 : nameA.localeCompare(nameB, options.locales ? options.locales : void 0, { + numeric: !0, + sensitivity: "accent" + }); + } + let index = order.indexOf(nameA); + index === -1 && (index = order.indexOf("*")), order = index !== -1 && Array.isArray(order[index + 1]) ? order[index + 1] : [], depth += 1; + } + return 0; +}; + +// src/preview-api/modules/store/sortStories.ts +var sortStoriesCommon = (stories, storySortParameter, fileNameOrder) => { + if (storySortParameter) { + let sortFn; + typeof storySortParameter == "function" ? sortFn = storySortParameter : sortFn = storySort(storySortParameter), stories.sort(sortFn); + } else + stories.sort( + (s1, s2) => fileNameOrder.indexOf(s1.importPath) - fileNameOrder.indexOf(s2.importPath) + ); + return stories; +}, sortStoriesV7 = (stories, storySortParameter, fileNameOrder) => { + try { + return sortStoriesCommon(stories, storySortParameter, fileNameOrder); + } catch (err) { + throw new Error(dedent` + Error sorting stories with sort parameter ${storySortParameter}: + + > ${err.message} + + Are you using a V6-style sort function in V7 mode? + + More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort + `); + } +}; + +// src/preview-api/modules/preview-web/Preview.tsx +import { deprecate as deprecate2, logger as logger5 } from "storybook/internal/client-logger"; +import { + ARGTYPES_INFO_REQUEST, + ARGTYPES_INFO_RESPONSE, + CONFIG_ERROR, + FORCE_REMOUNT, + FORCE_RE_RENDER as FORCE_RE_RENDER2, + GLOBALS_UPDATED, + PREVIEW_INITIALIZED, + RESET_STORY_ARGS as RESET_STORY_ARGS2, + SET_GLOBALS, + STORY_ARGS_UPDATED, + STORY_HOT_UPDATED, + STORY_INDEX_INVALIDATED, + UPDATE_GLOBALS as UPDATE_GLOBALS2, + UPDATE_STORY_ARGS as UPDATE_STORY_ARGS2 +} from "storybook/internal/core-events"; +import { + CalledPreviewMethodBeforeInitializationError, + MissingRenderToCanvasError, + StoryIndexFetchError, + StoryStoreAccessedBeforeInitializationError +} from "storybook/internal/preview-errors"; +import { global as global4 } from "@storybook/global"; + +// src/preview-api/modules/preview-web/render/StoryRender.ts +import { + PLAY_FUNCTION_THREW_EXCEPTION, + STORY_FINISHED, + STORY_RENDERED as STORY_RENDERED2, + STORY_RENDER_PHASE_CHANGED, + UNHANDLED_ERRORS_WHILE_PLAYING +} from "storybook/internal/core-events"; +import { + MountMustBeDestructuredError as MountMustBeDestructuredError2, + NoStoryMountedError +} from "storybook/internal/preview-errors"; + +// src/preview-api/modules/preview-web/render/Render.ts +var PREPARE_ABORTED = new Error("prepareAborted"); + +// src/preview-api/modules/preview-web/render/StoryRender.ts +var { AbortController: AbortController2 } = globalThis; +function serializeError(error) { + try { + let { name = "Error", message = String(error), stack } = error; + return { name, message, stack }; + } catch { + return { name: "Error", message: String(error) }; + } +} +var StoryRender = class { + constructor(channel, store, renderToScreen, callbacks, id, viewMode, renderOptions = { autoplay: !0, forceInitialArgs: !1 }, story) { + this.channel = channel; + this.store = store; + this.renderToScreen = renderToScreen; + this.callbacks = callbacks; + this.id = id; + this.viewMode = viewMode; + this.renderOptions = renderOptions; + this.type = "story"; + this.notYetRendered = !0; + this.rerenderEnqueued = !1; + this.disableKeyListeners = !1; + this.teardownRender = () => { + }; + this.torndown = !1; + this.abortController = new AbortController2(), this.renderId = Date.now(), story && (this.story = story, this.phase = "preparing"); + } + async runPhase(signal, phase, phaseFn) { + this.phase = phase, this.channel.emit(STORY_RENDER_PHASE_CHANGED, { + newPhase: this.phase, + renderId: this.renderId, + storyId: this.id + }), phaseFn && (await phaseFn(), this.checkIfAborted(signal)); + } + checkIfAborted(signal) { + return signal.aborted && !["finished", "aborted", "errored"].includes(this.phase) && (this.phase = "aborted", this.channel.emit(STORY_RENDER_PHASE_CHANGED, { + newPhase: this.phase, + renderId: this.renderId, + storyId: this.id + })), signal.aborted; + } + async prepare() { + if (await this.runPhase(this.abortController.signal, "preparing", async () => { + this.story = await this.store.loadStory({ storyId: this.id }); + }), this.abortController.signal.aborted) + throw await this.store.cleanupStory(this.story), PREPARE_ABORTED; + } + // The two story "renders" are equal and have both loaded the same story + isEqual(other) { + return !!(this.id === other.id && this.story && this.story === other.story); + } + isPreparing() { + return ["preparing"].includes(this.phase); + } + isPending() { + return ["loading", "beforeEach", "rendering", "playing", "afterEach"].includes( + this.phase + ); + } + async renderToElement(canvasElement) { + return this.canvasElement = canvasElement, this.render({ initial: !0, forceRemount: !0 }); + } + storyContext() { + if (!this.story) + throw new Error("Cannot call storyContext before preparing"); + let { forceInitialArgs } = this.renderOptions; + return this.store.getStoryContext(this.story, { forceInitialArgs }); + } + async render({ + initial = !1, + forceRemount = !1 + } = {}) { + let { canvasElement } = this; + if (!this.story) + throw new Error("cannot render when not prepared"); + let story = this.story; + if (!canvasElement) + throw new Error("cannot render when canvasElement is unset"); + let { + id, + componentId, + title, + name, + tags, + applyLoaders, + applyBeforeEach, + applyAfterEach, + unboundStoryFn, + playFunction, + runStep + } = story; + forceRemount && !initial && (this.cancelRender(), this.abortController = new AbortController2()); + let abortSignal = this.abortController.signal, mounted = !1, isMountDestructured = story.usesMount; + try { + let context = { + ...this.storyContext(), + viewMode: this.viewMode, + abortSignal, + canvasElement, + loaded: {}, + step: (label, play) => runStep(label, play, context), + context: null, + canvas: {}, + userEvent: {}, + renderToCanvas: async () => { + let teardown = await this.renderToScreen(renderContext, canvasElement); + this.teardownRender = teardown || (() => { + }), mounted = !0; + }, + // The story provides (set in a renderer) a mount function that is a higher order function + // (context) => (...args) => Canvas + // + // Before assigning it to the context, we resolve the context dependency, + // so that a user can just call it as await mount(...args) in their play function. + mount: async (...args) => { + this.callbacks.showStoryDuringRender?.(); + let mountReturn = null; + return await this.runPhase(abortSignal, "rendering", async () => { + mountReturn = await story.mount(context)(...args); + }), isMountDestructured && await this.runPhase(abortSignal, "playing"), mountReturn; + } + }; + context.context = context; + let renderContext = { + componentId, + title, + kind: title, + id, + name, + story: name, + tags, + ...this.callbacks, + showError: (error) => (this.phase = "errored", this.callbacks.showError(error)), + showException: (error) => (this.phase = "errored", this.callbacks.showException(error)), + forceRemount: forceRemount || this.notYetRendered, + storyContext: context, + storyFn: () => unboundStoryFn(context), + unboundStoryFn + }; + if (await this.runPhase(abortSignal, "loading", async () => { + context.loaded = await applyLoaders(context); + }), abortSignal.aborted) + return; + let cleanupCallbacks = await applyBeforeEach(context); + if (this.store.addCleanupCallbacks(story, ...cleanupCallbacks), this.checkIfAborted(abortSignal) || (!mounted && !isMountDestructured && await context.mount(), this.notYetRendered = !1, abortSignal.aborted)) + return; + let ignoreUnhandledErrors = this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors === !0, unhandledErrors = /* @__PURE__ */ new Set(), onError = (event) => { + event.error && unhandledErrors.add(event.error); + }, onUnhandledRejection = (event) => { + event.reason && unhandledErrors.add(event.reason); + }; + if (this.renderOptions.autoplay && forceRemount && playFunction && this.phase !== "errored") { + window?.addEventListener?.("error", onError), window?.addEventListener?.("unhandledrejection", onUnhandledRejection), this.disableKeyListeners = !0; + try { + if (isMountDestructured ? await playFunction(context) : (context.mount = async () => { + throw new MountMustBeDestructuredError2({ playFunction: playFunction.toString() }); + }, await this.runPhase(abortSignal, "playing", async () => playFunction(context))), !mounted) + throw new NoStoryMountedError(); + this.checkIfAborted(abortSignal), !ignoreUnhandledErrors && unhandledErrors.size > 0 ? await this.runPhase(abortSignal, "errored") : await this.runPhase(abortSignal, "played"); + } catch (error) { + if (this.callbacks.showStoryDuringRender?.(), await this.runPhase(abortSignal, "errored", async () => { + this.channel.emit(PLAY_FUNCTION_THREW_EXCEPTION, serializeError(error)); + }), this.story.parameters.throwPlayFunctionExceptions !== !1) + throw error; + console.error(error); + } + if (!ignoreUnhandledErrors && unhandledErrors.size > 0 && this.channel.emit( + UNHANDLED_ERRORS_WHILE_PLAYING, + Array.from(unhandledErrors).map(serializeError) + ), this.disableKeyListeners = !1, window?.removeEventListener?.("unhandledrejection", onUnhandledRejection), window?.removeEventListener?.("error", onError), abortSignal.aborted) + return; + } + await this.runPhase(abortSignal, "completing", async () => { + isTestEnvironment() ? this.store.addCleanupCallbacks(story, pauseAnimations()) : await waitForAnimations(abortSignal); + }), await this.runPhase(abortSignal, "completed", async () => { + this.channel.emit(STORY_RENDERED2, id); + }), this.phase !== "errored" && await this.runPhase(abortSignal, "afterEach", async () => { + await applyAfterEach(context); + }); + let hasUnhandledErrors = !ignoreUnhandledErrors && unhandledErrors.size > 0, hasSomeReportsFailed = context.reporting.reports.some( + (report) => report.status === "failed" + ), hasStoryErrored = hasUnhandledErrors || hasSomeReportsFailed; + await this.runPhase( + abortSignal, + "finished", + async () => this.channel.emit(STORY_FINISHED, { + storyId: id, + status: hasStoryErrored ? "error" : "success", + reporters: context.reporting.reports + }) + ); + } catch (err) { + this.phase = "errored", this.callbacks.showException(err), await this.runPhase( + abortSignal, + "finished", + async () => this.channel.emit(STORY_FINISHED, { + storyId: id, + status: "error", + reporters: [] + }) + ); + } + this.rerenderEnqueued && (this.rerenderEnqueued = !1, this.render()); + } + /** + * Rerender the story. If the story is currently pending (loading/rendering), the rerender will be + * enqueued, and will be executed after the current render is completed. Rerendering while playing + * will not be enqueued, and will be executed immediately, to support rendering args changes while + * playing. + */ + async rerender() { + if (this.isPending() && this.phase !== "playing") + this.rerenderEnqueued = !0; + else + return this.render(); + } + async remount() { + return await this.teardown(), this.render({ forceRemount: !0 }); + } + // If the story is torn down (either a new story is rendered or the docs page removes it) + // we need to consider the fact that the initial render may not be finished + // (possibly the loaders or the play function are still running). We use the controller + // as a method to abort them, ASAP, but this is not foolproof as we cannot control what + // happens inside the user's code. + cancelRender() { + this.abortController.abort(); + } + cancelPlayFunction() { + this.phase === "playing" && (this.abortController.abort(), this.runPhase(this.abortController.signal, "aborted")); + } + async teardown() { + this.torndown = !0, this.cancelRender(), this.story && await this.store.cleanupStory(this.story); + for (let i = 0; i < 3; i += 1) { + if (!this.isPending()) { + await this.teardownRender(); + return; + } + await new Promise((resolve) => setTimeout(resolve, 0)); + } + window?.location?.reload?.(), await new Promise(() => { + }); + } +}; + +// src/preview-api/modules/preview-web/Preview.tsx +var { fetch } = global4, STORY_INDEX_PATH = "./index.json", Preview = class { + constructor(importFn, getProjectAnnotations, channel = addons.getChannel(), shouldInitialize = !0) { + this.importFn = importFn; + this.getProjectAnnotations = getProjectAnnotations; + this.channel = channel; + this.storyRenders = []; + this.storeInitializationPromise = new Promise((resolve, reject) => { + this.resolveStoreInitializationPromise = resolve, this.rejectStoreInitializationPromise = reject; + }), shouldInitialize && this.initialize(); + } + // Create a proxy object for `__STORYBOOK_STORY_STORE__` and `__STORYBOOK_PREVIEW__.storyStore` + // That proxies through to the store once ready, and errors beforehand. This means we can set + // `__STORYBOOK_STORY_STORE__ = __STORYBOOK_PREVIEW__.storyStore` without having to wait, and + // similarly integrators can access the `storyStore` on the preview at any time, although + // it is considered deprecated and we will no longer allow access in 9.0 + get storyStore() { + return new Proxy( + {}, + { + get: (_, method) => { + if (this.storyStoreValue) + return deprecate2("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[method]; + throw new StoryStoreAccessedBeforeInitializationError(); + } + } + ); + } + // INITIALIZATION + async initialize() { + this.setupListeners(); + try { + let projectAnnotations = await this.getProjectAnnotationsOrRenderError(); + await this.runBeforeAllHook(projectAnnotations), await this.initializeWithProjectAnnotations(projectAnnotations); + let userAgent = globalThis?.navigator?.userAgent; + await this.channel.emit(PREVIEW_INITIALIZED, { userAgent }); + } catch (err) { + this.rejectStoreInitializationPromise(err); + } + } + ready() { + return this.storeInitializationPromise; + } + setupListeners() { + this.channel.on(STORY_INDEX_INVALIDATED, this.onStoryIndexChanged.bind(this)), this.channel.on(UPDATE_GLOBALS2, this.onUpdateGlobals.bind(this)), this.channel.on(UPDATE_STORY_ARGS2, this.onUpdateArgs.bind(this)), this.channel.on(ARGTYPES_INFO_REQUEST, this.onRequestArgTypesInfo.bind(this)), this.channel.on(RESET_STORY_ARGS2, this.onResetArgs.bind(this)), this.channel.on(FORCE_RE_RENDER2, this.onForceReRender.bind(this)), this.channel.on(FORCE_REMOUNT, this.onForceRemount.bind(this)), this.channel.on(STORY_HOT_UPDATED, this.onStoryHotUpdated.bind(this)); + } + async getProjectAnnotationsOrRenderError() { + try { + let projectAnnotations = composeProjectAnnotationsWithCore([ + await this.getProjectAnnotations() + ]); + if (this.renderToCanvas = projectAnnotations.renderToCanvas, !this.renderToCanvas) + throw new MissingRenderToCanvasError(); + return projectAnnotations; + } catch (err) { + throw this.renderPreviewEntryError("Error reading preview.js:", err), err; + } + } + // If initialization gets as far as project annotations, this function runs. + async initializeWithProjectAnnotations(projectAnnotations) { + this.projectAnnotationsBeforeInitialization = projectAnnotations; + try { + let storyIndex = await this.getStoryIndexFromServer(); + return this.initializeWithStoryIndex(storyIndex); + } catch (err) { + throw this.renderPreviewEntryError("Error loading story index:", err), err; + } + } + async runBeforeAllHook(projectAnnotations) { + try { + await this.beforeAllCleanup?.(), this.beforeAllCleanup = await projectAnnotations.beforeAll?.(); + } catch (err) { + throw this.renderPreviewEntryError("Error in beforeAll hook:", err), err; + } + } + async getStoryIndexFromServer() { + let result = await fetch(STORY_INDEX_PATH); + if (result.status === 200) + return result.json(); + throw new StoryIndexFetchError({ text: await result.text() }); + } + // If initialization gets as far as the story index, this function runs. + initializeWithStoryIndex(storyIndex) { + if (!this.projectAnnotationsBeforeInitialization) + throw new Error("Cannot call initializeWithStoryIndex until project annotations resolve"); + this.storyStoreValue = new StoryStore( + storyIndex, + this.importFn, + this.projectAnnotationsBeforeInitialization + ), delete this.projectAnnotationsBeforeInitialization, this.setInitialGlobals(), this.resolveStoreInitializationPromise(); + } + async setInitialGlobals() { + this.emitGlobals(); + } + emitGlobals() { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ methodName: "emitGlobals" }); + let payload = { + globals: this.storyStoreValue.userGlobals.get() || {}, + globalTypes: this.storyStoreValue.projectAnnotations.globalTypes || {} + }; + this.channel.emit(SET_GLOBALS, payload); + } + // EVENT HANDLERS + // This happens when a config file gets reloaded + async onGetProjectAnnotationsChanged({ + getProjectAnnotations + }) { + delete this.previewEntryError, this.getProjectAnnotations = getProjectAnnotations; + let projectAnnotations = await this.getProjectAnnotationsOrRenderError(); + if (await this.runBeforeAllHook(projectAnnotations), !this.storyStoreValue) { + await this.initializeWithProjectAnnotations(projectAnnotations); + return; + } + this.storyStoreValue.setProjectAnnotations(projectAnnotations), this.emitGlobals(); + } + async onStoryIndexChanged() { + if (delete this.previewEntryError, !(!this.storyStoreValue && !this.projectAnnotationsBeforeInitialization)) + try { + let storyIndex = await this.getStoryIndexFromServer(); + if (this.projectAnnotationsBeforeInitialization) { + this.initializeWithStoryIndex(storyIndex); + return; + } + await this.onStoriesChanged({ storyIndex }); + } catch (err) { + throw this.renderPreviewEntryError("Error loading story index:", err), err; + } + } + // This happens when a glob gets HMR-ed + async onStoriesChanged({ + importFn, + storyIndex + }) { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ methodName: "onStoriesChanged" }); + await this.storyStoreValue.onStoriesChanged({ importFn, storyIndex }); + } + async onUpdateGlobals({ + globals: updatedGlobals, + currentStory + }) { + if (this.storyStoreValue || await this.storeInitializationPromise, !this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ methodName: "onUpdateGlobals" }); + if (this.storyStoreValue.userGlobals.update(updatedGlobals), currentStory) { + let { initialGlobals, storyGlobals, userGlobals, globals } = this.storyStoreValue.getStoryContext(currentStory); + this.channel.emit(GLOBALS_UPDATED, { + initialGlobals, + userGlobals, + storyGlobals, + globals + }); + } else { + let { initialGlobals, globals } = this.storyStoreValue.userGlobals; + this.channel.emit(GLOBALS_UPDATED, { + initialGlobals, + userGlobals: globals, + storyGlobals: {}, + globals + }); + } + await Promise.all(this.storyRenders.map((r) => r.rerender())); + } + async onUpdateArgs({ storyId, updatedArgs }) { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ methodName: "onUpdateArgs" }); + this.storyStoreValue.args.update(storyId, updatedArgs), await Promise.all( + this.storyRenders.filter((r) => r.id === storyId && !r.renderOptions.forceInitialArgs).map( + (r) => ( + // We only run the play function, with in a force remount. + // But when mount is destructured, the rendering happens inside of the play function. + r.story && r.story.usesMount ? r.remount() : r.rerender() + ) + ) + ), this.channel.emit(STORY_ARGS_UPDATED, { + storyId, + args: this.storyStoreValue.args.get(storyId) + }); + } + async onRequestArgTypesInfo({ id, payload }) { + try { + await this.storeInitializationPromise; + let story = await this.storyStoreValue?.loadStory(payload); + this.channel.emit(ARGTYPES_INFO_RESPONSE, { + id, + success: !0, + payload: { argTypes: story?.argTypes || {} }, + error: null + }); + } catch (e) { + this.channel.emit(ARGTYPES_INFO_RESPONSE, { + id, + success: !1, + error: e?.message + }); + } + } + async onResetArgs({ storyId, argNames }) { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ methodName: "onResetArgs" }); + let story = this.storyRenders.find((r) => r.id === storyId)?.story || await this.storyStoreValue.loadStory({ storyId }), updatedArgs = (argNames || [ + .../* @__PURE__ */ new Set([ + ...Object.keys(story.initialArgs), + ...Object.keys(this.storyStoreValue.args.get(storyId)) + ]) + ]).reduce((acc, argName) => (acc[argName] = story.initialArgs[argName], acc), {}); + await this.onUpdateArgs({ storyId, updatedArgs }); + } + // ForceReRender does not include a story id, so we simply must + // re-render all stories in case they are relevant + async onForceReRender() { + await Promise.all(this.storyRenders.map((r) => r.rerender())); + } + async onForceRemount({ storyId }) { + await Promise.all(this.storyRenders.filter((r) => r.id === storyId).map((r) => r.remount())); + } + async onStoryHotUpdated() { + await Promise.all(this.storyRenders.map((r) => r.cancelPlayFunction())); + } + // Used by docs to render a story to a given element + // Note this short-circuits the `prepare()` phase of the StoryRender, + // main to be consistent with the previous behaviour. In the future, + // we will change it to go ahead and load the story, which will end up being + // "instant", although async. + renderStoryToElement(story, element, callbacks, options) { + if (!this.renderToCanvas || !this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ + methodName: "renderStoryToElement" + }); + let render = new StoryRender( + this.channel, + this.storyStoreValue, + this.renderToCanvas, + callbacks, + story.id, + "docs", + options, + story + ); + return render.renderToElement(element), this.storyRenders.push(render), async () => { + await this.teardownRender(render); + }; + } + async teardownRender(render, { viewModeChanged } = {}) { + this.storyRenders = this.storyRenders.filter((r) => r !== render), await render?.teardown?.({ viewModeChanged }); + } + // API + async loadStory({ storyId }) { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ methodName: "loadStory" }); + return this.storyStoreValue.loadStory({ storyId }); + } + getStoryContext(story, { forceInitialArgs = !1 } = {}) { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ methodName: "getStoryContext" }); + return this.storyStoreValue.getStoryContext(story, { forceInitialArgs }); + } + async extract(options) { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError({ methodName: "extract" }); + if (this.previewEntryError) + throw this.previewEntryError; + return await this.storyStoreValue.cacheAllCSFFiles(), this.storyStoreValue.extract(options); + } + // UTILITIES + renderPreviewEntryError(reason, err) { + this.previewEntryError = err, logger5.error(reason), logger5.error(err), this.channel.emit(CONFIG_ERROR, err); + } +}; + +// src/preview-api/modules/preview-web/PreviewWeb.tsx +import { global as global9 } from "@storybook/global"; + +// src/preview-api/modules/preview-web/PreviewWithSelection.tsx +import { logger as logger6 } from "storybook/internal/client-logger"; +import { + CURRENT_STORY_WAS_SET, + DOCS_PREPARED, + GLOBALS_UPDATED as GLOBALS_UPDATED2, + PRELOAD_ENTRIES, + PREVIEW_KEYDOWN, + SET_CURRENT_STORY, + STORY_CHANGED, + STORY_ERRORED, + STORY_MISSING, + STORY_PREPARED, + STORY_RENDER_PHASE_CHANGED as STORY_RENDER_PHASE_CHANGED3, + STORY_SPECIFIED, + STORY_THREW_EXCEPTION, + STORY_UNCHANGED, + UPDATE_QUERY_PARAMS +} from "storybook/internal/core-events"; +import { + CalledPreviewMethodBeforeInitializationError as CalledPreviewMethodBeforeInitializationError2, + EmptyIndexError, + MdxFileWithNoCsfReferencesError, + NoStoryMatchError +} from "storybook/internal/preview-errors"; + +// src/shared/utils/story-index-filters.ts +function isMdxEntry({ tags }) { + return tags?.includes(Tag.UNATTACHED_MDX) || tags?.includes(Tag.ATTACHED_MDX); +} + +// src/preview-api/modules/preview-web/embedMode.ts +var shouldEmbed = ({ search }) => new URLSearchParams(search).get("embed") === "true", shouldAutoplay = ({ search }) => !shouldEmbed({ search }); + +// src/preview-api/modules/preview-web/getEmbedResizeViewport.ts +var getEmbedResizeViewport = (storyStore, render, reference) => { + if (!storyStore || !render?.story) + return; + let { globals, storyGlobals, userGlobals, parameters } = storyStore.getStoryContext( + render.story + ), viewportParameters = parameters[PARAM_KEY]; + return toResolvedViewportDimensions( + resolveViewport({ + globals, + storyGlobals, + userGlobals, + options: viewportParameters?.options ?? MINIMAL_VIEWPORTS, + disable: viewportParameters?.disable ?? !1, + viewMode: "story" + }), + reference + ); +}; + +// src/preview-api/modules/preview-web/render/CsfDocsRender.ts +import { DOCS_RENDERED } from "storybook/internal/core-events"; + +// src/preview-api/modules/preview-web/docs-context/DocsContext.ts +import { isStory as isStory3 } from "storybook/internal/csf"; +var DocsContext = class { + constructor(channel, store, renderStoryToElement, csfFiles) { + this.channel = channel; + this.store = store; + this.renderStoryToElement = renderStoryToElement; + this.storyIdByName = (storyName) => { + let storyId = this.nameToStoryId.get(storyName); + if (storyId) + return storyId; + throw new Error(`No story found with that name: ${storyName}`); + }; + this.componentStories = () => this.componentStoriesValue; + this.getComponentId = (component) => { + for (let csfFile of new Set(this.exportsToCSFFile.values())) + if (csfFile.meta.component === component) + return csfFile.meta.id; + }; + this.componentStoriesFromCSFFile = (csfFile) => this.store.componentStoriesFromCSFFile({ csfFile }); + this.storyById = (storyId) => { + if (!storyId) { + if (!this.primaryStory) + throw new Error( + "No primary story defined for docs entry. Did you forget to use ``?" + ); + return this.primaryStory; + } + let csfFile = this.storyIdToCSFFile.get(storyId); + if (!csfFile) + throw new Error(`Called \`storyById\` for story that was never loaded: ${storyId}`); + return this.store.storyFromCSFFile({ storyId, csfFile }); + }; + this.getStoryContext = (story) => ({ + ...this.store.getStoryContext(story), + loaded: {}, + viewMode: "docs" + }); + this.loadStory = (id) => this.store.loadStory({ storyId: id }); + this.componentStoriesValue = [], this.storyIdToCSFFile = /* @__PURE__ */ new Map(), this.exportToStory = /* @__PURE__ */ new Map(), this.exportsToCSFFile = /* @__PURE__ */ new Map(), this.nameToStoryId = /* @__PURE__ */ new Map(), this.attachedCSFFiles = /* @__PURE__ */ new Set(), csfFiles.forEach((csfFile, index) => { + this.referenceCSFFile(csfFile); + }); + } + // This docs entry references this CSF file and can synchronously load the stories, as well + // as reference them by module export. If the CSF is part of the "component" stories, they + // can also be referenced by name and are in the componentStories list. + referenceCSFFile(csfFile) { + this.exportsToCSFFile.set(csfFile.moduleExports, csfFile), "default" in csfFile.moduleExports && this.exportsToCSFFile.set(csfFile.moduleExports.default, csfFile), this.store.componentStoriesFromCSFFile({ csfFile }).forEach((story) => { + let annotation = csfFile.stories[story.id]; + this.storyIdToCSFFile.set(annotation.id, csfFile), this.exportToStory.set(annotation.moduleExport, story); + }); + } + attachCSFFile(csfFile) { + if (!this.exportsToCSFFile.has(csfFile.moduleExports)) + throw new Error("Cannot attach a CSF file that has not been referenced"); + if (this.attachedCSFFiles.has(csfFile)) + return; + this.attachedCSFFiles.add(csfFile), this.store.componentStoriesFromCSFFile({ csfFile }).forEach((story) => { + this.nameToStoryId.set(story.name, story.id), this.componentStoriesValue.push(story), this.primaryStory || (this.primaryStory = story); + }); + } + referenceMeta(metaExports, attach) { + let resolved = this.resolveModuleExport(metaExports); + if (resolved.type !== "meta") + throw new Error( + " must reference a CSF file module export or meta export. Did you mistakenly reference your component instead of your CSF file?" + ); + attach && this.attachCSFFile(resolved.csfFile); + } + get projectAnnotations() { + let { projectAnnotations } = this.store; + if (!projectAnnotations) + throw new Error("Can't get projectAnnotations from DocsContext before they are initialized"); + return projectAnnotations; + } + resolveAttachedModuleExportType(moduleExportType) { + if (moduleExportType === "story") { + if (!this.primaryStory) + throw new Error( + "No primary story attached to this docs file, did you forget to use ?" + ); + return { type: "story", story: this.primaryStory }; + } + if (this.attachedCSFFiles.size === 0) + throw new Error( + "No CSF file attached to this docs file, did you forget to use ?" + ); + let firstAttachedCSFFile = Array.from(this.attachedCSFFiles)[0]; + if (moduleExportType === "meta") + return { type: "meta", csfFile: firstAttachedCSFFile }; + let { component } = firstAttachedCSFFile.meta; + if (!component) + throw new Error( + "Attached CSF file does not defined a component, did you forget to export one?" + ); + return { type: "component", component }; + } + resolveModuleExport(moduleExportOrType) { + let csfFile = this.exportsToCSFFile.get(moduleExportOrType); + if (!csfFile && moduleExportOrType && typeof moduleExportOrType == "object" && "default" in moduleExportOrType && (csfFile = this.exportsToCSFFile.get(moduleExportOrType.default)), !csfFile && moduleExportOrType && typeof moduleExportOrType == "object" && !isStory3(moduleExportOrType)) { + let matchedCSFFile; + for (let exportValue of Object.values(moduleExportOrType)) { + let story2 = this.exportToStory.get( + isStory3(exportValue) ? exportValue.input : exportValue + ); + if (!story2) + continue; + let storyCSFFile = this.storyIdToCSFFile.get(story2.id); + if (storyCSFFile) { + if (!matchedCSFFile) + matchedCSFFile = storyCSFFile; + else if (matchedCSFFile !== storyCSFFile) { + matchedCSFFile = void 0; + break; + } + } + } + csfFile = matchedCSFFile; + } + if (csfFile) + return { type: "meta", csfFile }; + let story = this.exportToStory.get( + isStory3(moduleExportOrType) ? moduleExportOrType.input : moduleExportOrType + ); + return story ? { type: "story", story } : { type: "component", component: moduleExportOrType }; + } + resolveOf(moduleExportOrType, validTypes = []) { + let resolved; + if (["component", "meta", "story"].includes(moduleExportOrType)) { + let type = moduleExportOrType; + resolved = this.resolveAttachedModuleExportType(type); + } else + resolved = this.resolveModuleExport(moduleExportOrType); + if (validTypes.length && !validTypes.includes(resolved.type)) { + let prettyType = resolved.type === "component" ? "component or unknown" : resolved.type; + throw new Error(dedent`Invalid value passed to the 'of' prop. The value was resolved to a '${prettyType}' type but the only types for this block are: ${validTypes.join( + ", " + )}. + - Did you pass a component to the 'of' prop when the block only supports a story or a meta? + - ... or vice versa? + - Did you pass a story, CSF file or meta to the 'of' prop that is not indexed, ie. is not targeted by the 'stories' globs in the main configuration?`); + } + switch (resolved.type) { + case "component": + return { + ...resolved, + projectAnnotations: this.projectAnnotations + }; + case "meta": + return { + ...resolved, + preparedMeta: this.store.preparedMetaFromCSFFile({ csfFile: resolved.csfFile }) + }; + default: + return resolved; + } + } +}; + +// src/preview-api/modules/preview-web/render/CsfDocsRender.ts +var CsfDocsRender = class { + constructor(channel, store, entry, callbacks) { + this.channel = channel; + this.store = store; + this.entry = entry; + this.callbacks = callbacks; + this.type = "docs"; + this.subtype = "csf"; + this.torndown = !1; + this.disableKeyListeners = !1; + this.preparing = !1; + this.id = entry.id, this.renderId = Date.now(); + } + isPreparing() { + return this.preparing; + } + async prepare() { + this.preparing = !0; + let { entryExports, csfFiles = [] } = await this.store.loadEntry(this.id); + if (this.torndown) + throw PREPARE_ABORTED; + let { importPath, title } = this.entry, primaryCsfFile = this.store.processCSFFileWithCache( + entryExports, + importPath, + title + ), primaryStoryId = Object.keys(primaryCsfFile.stories)[0]; + this.story = this.store.storyFromCSFFile({ storyId: primaryStoryId, csfFile: primaryCsfFile }), this.csfFiles = [primaryCsfFile, ...csfFiles], this.preparing = !1; + } + isEqual(other) { + return !!(this.id === other.id && this.story && this.story === other.story); + } + docsContext(renderStoryToElement) { + if (!this.csfFiles) + throw new Error("Cannot render docs before preparing"); + let docsContext = new DocsContext( + this.channel, + this.store, + renderStoryToElement, + this.csfFiles + ); + return this.csfFiles.forEach((csfFile) => docsContext.attachCSFFile(csfFile)), docsContext.filterByAutodocs = !isMdxEntry(this.entry), docsContext; + } + async renderToElement(canvasElement, renderStoryToElement) { + if (!this.story || !this.csfFiles) + throw new Error("Cannot render docs before preparing"); + let docsContext = this.docsContext(renderStoryToElement), { docs: docsParameter } = this.story.parameters || {}; + if (!docsParameter) + throw new Error( + "Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed" + ); + let renderer = await docsParameter.renderer(), { render } = renderer, renderDocs = async () => { + try { + await render(docsContext, docsParameter, canvasElement), this.channel.emit(DOCS_RENDERED, this.id); + } catch (err) { + this.callbacks.showException(err); + } + }; + return this.rerender = async () => renderDocs(), this.teardownRender = async ({ viewModeChanged }) => { + !viewModeChanged || !canvasElement || renderer.unmount(canvasElement); + }, renderDocs(); + } + async teardown({ viewModeChanged } = {}) { + this.teardownRender?.({ viewModeChanged }), this.torndown = !0; + } +}; + +// src/preview-api/modules/preview-web/render/MdxDocsRender.ts +import { DOCS_RENDERED as DOCS_RENDERED2 } from "storybook/internal/core-events"; +var MdxDocsRender = class { + constructor(channel, store, entry, callbacks) { + this.channel = channel; + this.store = store; + this.entry = entry; + this.callbacks = callbacks; + this.type = "docs"; + this.subtype = "mdx"; + this.torndown = !1; + this.disableKeyListeners = !1; + this.preparing = !1; + this.id = entry.id, this.renderId = Date.now(); + } + isPreparing() { + return this.preparing; + } + async prepare() { + this.preparing = !0; + let { entryExports, csfFiles = [] } = await this.store.loadEntry(this.id); + if (this.torndown) + throw PREPARE_ABORTED; + if (this.csfFiles = csfFiles, this.exports = entryExports, this.attachedCsfFile = void 0, this.attachedStory = void 0, this.entry.tags?.includes(Tag.ATTACHED_MDX)) { + this.attachedCsfFile = csfFiles[0]; + let primaryStoryId = this.attachedCsfFile && Object.keys(this.attachedCsfFile.stories)[0]; + this.attachedCsfFile && primaryStoryId && (this.attachedStory = this.store.storyFromCSFFile({ + storyId: primaryStoryId, + csfFile: this.attachedCsfFile + })); + } + this.preparing = !1; + } + isEqual(other) { + return !!(this.id === other.id && this.exports && this.exports === other.exports); + } + docsContext(renderStoryToElement) { + if (!this.csfFiles) + throw new Error("Cannot render docs before preparing"); + let docsContext = new DocsContext( + this.channel, + this.store, + renderStoryToElement, + this.csfFiles + ); + return this.attachedCsfFile && docsContext.attachCSFFile(this.attachedCsfFile), docsContext.filterByAutodocs = !isMdxEntry(this.entry), docsContext; + } + async renderToElement(canvasElement, renderStoryToElement) { + if (!this.exports || !this.csfFiles || !this.store.projectAnnotations) + throw new Error("Cannot render docs before preparing"); + let docsContext = this.docsContext(renderStoryToElement), { docs } = this.store.projectAnnotations.parameters ?? {}, baseDocsParameter = this.attachedStory?.parameters?.docs ?? docs; + if (!baseDocsParameter) + throw new Error( + "Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed" + ); + let docsParameter = { ...baseDocsParameter, page: this.exports.default }, renderer = await baseDocsParameter.renderer(), { render } = renderer, renderDocs = async () => { + try { + await render(docsContext, docsParameter, canvasElement), this.channel.emit(DOCS_RENDERED2, this.id); + } catch (err) { + this.callbacks.showException(err); + } + }; + return this.rerender = async () => renderDocs(), this.teardownRender = async ({ viewModeChanged } = {}) => { + !viewModeChanged || !canvasElement || (renderer.unmount(canvasElement), this.torndown = !0); + }, renderDocs(); + } + async teardown({ viewModeChanged } = {}) { + this.teardownRender?.({ viewModeChanged }), this.torndown = !0; + } +}; + +// src/preview-api/modules/preview-web/setupContentResizeBroadcast.ts +import { global as global6 } from "@storybook/global"; + +// src/shared/constants/iframe-resize.ts +var IFRAME_RESIZE_CONTEXT = "iframe.resize", IFRAME_RESIZE_REQUEST_CONTEXT = "iframe.resize.request"; +var iframeResizeViewportsEqual = (left, right) => left === right ? !0 : !left || !right ? !left && !right : left.name === right.name && left.value === right.value && left.width === right.width && left.height === right.height; + +// src/preview-api/modules/preview-web/setupStoryFreezer.ts +import { STORY_HOT_UPDATED as STORY_HOT_UPDATED2, STORY_RENDER_PHASE_CHANGED as STORY_RENDER_PHASE_CHANGED2 } from "storybook/internal/core-events"; +import { global as global5 } from "@storybook/global"; +var FREEZE_STYLE_ID = "storybook-freeze-after-finished", PRE_FREEZE_STYLE_ID = "storybook-freeze-end-frame-preload", tryReplaceProperty = (target, key, value) => { + try { + let descriptor = Object.getOwnPropertyDescriptor(target, key); + if (descriptor?.configurable === !1) { + descriptor.writable && Reflect.set(target, key, value); + return; + } + Object.defineProperty(target, key, { configurable: !0, writable: !0, value }); + } catch { + } +}, getQueryParam = (search, key) => new URLSearchParams(search).get(key), shouldFreeze = ({ search }) => { + let freeze = getQueryParam(search, "freeze"), viewMode = getQueryParam(search, "viewMode") ?? "story"; + return freeze === "finished" && viewMode === "story"; +}, stripScriptElements = (documentRef) => { + Array.from(documentRef.querySelectorAll("script")).forEach((script) => { + script.remove(); + }); +}, stripInlineEventHandlers = (documentRef) => { + Array.from(documentRef.querySelectorAll("*")).forEach((element) => { + Array.from(element.attributes).filter((attr) => attr.name.toLowerCase().startsWith("on")).forEach((attr) => { + element.removeAttribute(attr.name); + }); + }); +}, addFreezeStyles = (documentRef) => { + if (documentRef.getElementById(FREEZE_STYLE_ID)) + return; + let style = documentRef.createElement("style"); + style.id = FREEZE_STYLE_ID, style.textContent = ` + *, *::before, *::after { + animation-play-state: paused !important; + transition: none !important; + caret-color: transparent !important; + } + `, documentRef.head?.appendChild(style); +}, addPreFreezeStyles = (documentRef) => { + if (documentRef.getElementById(PRE_FREEZE_STYLE_ID)) + return; + let style = documentRef.createElement("style"); + style.id = PRE_FREEZE_STYLE_ID, style.textContent = ` + *, *::before, *::after { + animation-delay: 0s !important; + animation-direction: reverse !important; + animation-play-state: paused !important; + transition: none !important; + caret-color: transparent !important; + } + `, documentRef.head?.appendChild(style); +}, finishAndPauseAnimations = (documentRef) => { + if (typeof documentRef.getAnimations != "function") + return; + documentRef.getAnimations().forEach((animation) => { + try { + animation.finish(); + } catch { + } + try { + animation.pause(); + } catch { + } + }); +}, blockInteractions = (documentRef) => { + let blockedEvents = [ + "click", + "dblclick", + "mousedown", + "mouseup", + "pointerdown", + "pointerup", + "touchstart", + "touchend", + "keydown", + "keyup", + "keypress", + "input", + "change", + "submit" + ], stopEvent = (event) => { + event.stopImmediatePropagation(), event.stopPropagation(), event.cancelable && event.preventDefault(); + }; + blockedEvents.forEach((eventName) => { + documentRef.addEventListener(eventName, stopEvent, { capture: !0 }); + }); +}, createStoryFreezer = (windowRef, documentRef) => { + let frozen = !1, freezing = !1, trackedTimeouts = /* @__PURE__ */ new Set(), trackedIntervals = /* @__PURE__ */ new Set(), trackedRafs = /* @__PURE__ */ new Set(), originalSetTimeout = windowRef.setTimeout.bind(windowRef), originalClearTimeout = windowRef.clearTimeout.bind(windowRef), originalSetInterval = windowRef.setInterval.bind(windowRef), originalClearInterval = windowRef.clearInterval.bind(windowRef), originalRequestAnimationFrame = windowRef.requestAnimationFrame.bind(windowRef), originalCancelAnimationFrame = windowRef.cancelAnimationFrame.bind(windowRef), originalQueueMicrotask = typeof windowRef.queueMicrotask == "function" ? windowRef.queueMicrotask.bind(windowRef) : (callback) => { + originalSetTimeout(callback, 0); + }, setTimeoutWrapper = ((handler, timeout, ...args) => { + if (frozen || freezing) + return -1; + let timerId = originalSetTimeout(handler, timeout, ...args); + return trackedTimeouts.add(timerId), timerId; + }), clearTimeoutWrapper = ((id) => (id !== void 0 && trackedTimeouts.delete(id), originalClearTimeout(id))), setIntervalWrapper = ((handler, timeout, ...args) => { + if (frozen || freezing) + return -1; + let timerId = originalSetInterval(handler, timeout, ...args); + return trackedIntervals.add(timerId), timerId; + }), clearIntervalWrapper = ((id) => (id !== void 0 && trackedIntervals.delete(id), originalClearInterval(id))), requestAnimationFrameWrapper = ((callback) => { + if (frozen || freezing) + return -1; + let rafId = originalRequestAnimationFrame(callback); + return trackedRafs.add(rafId), rafId; + }), cancelAnimationFrameWrapper = ((id) => (trackedRafs.delete(id), originalCancelAnimationFrame(id))), queueMicrotaskWrapper = ((callback) => { + frozen || freezing || originalQueueMicrotask(callback); + }); + return tryReplaceProperty(windowRef, "setTimeout", setTimeoutWrapper), tryReplaceProperty(windowRef, "clearTimeout", clearTimeoutWrapper), tryReplaceProperty(windowRef, "setInterval", setIntervalWrapper), tryReplaceProperty(windowRef, "clearInterval", clearIntervalWrapper), tryReplaceProperty(windowRef, "requestAnimationFrame", requestAnimationFrameWrapper), tryReplaceProperty(windowRef, "cancelAnimationFrame", cancelAnimationFrameWrapper), tryReplaceProperty(windowRef, "queueMicrotask", queueMicrotaskWrapper), { freeze: () => { + if (!(frozen || freezing)) { + freezing = !0; + try { + trackedTimeouts.forEach((timerId) => { + originalClearTimeout(timerId); + }), trackedIntervals.forEach((intervalId) => { + originalClearInterval(intervalId); + }), trackedRafs.forEach((rafId) => { + originalCancelAnimationFrame(rafId); + }), trackedTimeouts.clear(), trackedIntervals.clear(), trackedRafs.clear(), finishAndPauseAnimations(documentRef), stripScriptElements(documentRef), addFreezeStyles(documentRef), stripInlineEventHandlers(documentRef), blockInteractions(documentRef); + } finally { + frozen = !0; + } + } + } }; +}, setupStoryFreezer = (channel, options = {}) => { + let windowRef = global5.window, documentRef = global5.document; + if (!windowRef || !documentRef || !shouldFreeze({ search: documentRef.location.search })) + return !1; + addPreFreezeStyles(documentRef); + let freezer = createStoryFreezer(windowRef, documentRef), notifiedFrozen = !1; + return channel.on(STORY_RENDER_PHASE_CHANGED2, ({ newPhase }) => { + if (newPhase === "finished") { + let runFreeze = () => { + notifiedFrozen || (freezer.freeze(), notifiedFrozen = !0, options.onFrozen?.()); + }; + typeof windowRef.queueMicrotask == "function" ? windowRef.queueMicrotask(runFreeze) : windowRef.setTimeout(runFreeze, 0); + } + }), channel.on(STORY_HOT_UPDATED2, () => { + windowRef.location.reload(); + }), !0; +}; + +// src/preview-api/modules/preview-web/setupContentResizeBroadcast.ts +var EMBED_STYLE_ID = "storybook-embed-sizing", EMBED_UI_STYLE_ID = "storybook-embed-ui", IGNORE_TAGS = /* @__PURE__ */ new Set([ + "area", + "base", + "body", + "head", + "link", + "map", + "meta", + "nobr", + "optgroup", + "option", + "script", + "style", + "template", + "title", + "track", + "wbr" +]), REPLACED_OR_CONTROL_TAGS = /* @__PURE__ */ new Set([ + "button", + "canvas", + "embed", + "iframe", + "img", + "input", + "object", + "select", + "svg", + "textarea", + "video" +]), BLOCK_LEVEL_TAGS = [ + "address", + "article", + "aside", + "blockquote", + "details", + "dialog", + "div", + "dl", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hr", + "li", + "main", + "nav", + "ol", + "p", + "pre", + "section", + "table", + "ul" +], descendantSelector = `* ${Array.from(IGNORE_TAGS).map((tag) => `:not(${tag})`).join("")}`, isTransparentColor = (color) => { + if (!color || color === "transparent") + return !0; + let match = color.match(/rgba?\(\s*[\d.]+\s*,\s*[\d.]+\s*,\s*[\d.]+\s*(?:,\s*([\d.]+)\s*)?\)/); + return match ? (match[1] !== void 0 ? parseFloat(match[1]) : 1) === 0 : !1; +}, hasVisibleDecoration = (style) => { + if (style.backgroundImage && style.backgroundImage !== "none" || !isTransparentColor(style.backgroundColor)) + return !0; + for (let property of [ + "borderTopWidth", + "borderRightWidth", + "borderBottomWidth", + "borderLeftWidth" + ]) + if (parseFloat(style[property]) > 0) + return !0; + for (let property of ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"]) + if (parseFloat(style[property]) > 0) + return !0; + return style.boxShadow && style.boxShadow !== "none" ? !0 : parseFloat(style.outlineWidth) > 0; +}, isReplacedOrControl = (element) => REPLACED_OR_CONTROL_TAGS.has(element.tagName.toLowerCase()), hasDirectText = (element) => { + for (let node of element.childNodes) + if (node.nodeType === Node.TEXT_NODE && node.textContent?.trim()) + return !0; + return !1; +}, isStretchedToParent = (element) => { + let parent = element.parentElement; + if (!parent) + return !1; + let elementRect = element.getBoundingClientRect(), parentRect = parent.getBoundingClientRect(); + return elementRect.width > 0 && Math.abs(elementRect.width - parentRect.width) < 1; +}, hasExplicitWidth = (style) => { + let { width } = style; + return !width || width === "auto" ? !1 : width !== "fit-content" && width !== "max-content" && width !== "min-content"; +}, coversViewport = (element) => { + let rect = element.getBoundingClientRect(); + return rect.width >= window.innerWidth - 1 && rect.height >= window.innerHeight - 1 && rect.top <= 1 && rect.left <= 1; +}, isViewportOverlayUnderlay = (element) => { + let style = window.getComputedStyle(element); + return style.position !== "fixed" && style.position !== "absolute" || hasVisibleDecoration(style) || isReplacedOrControl(element) || hasDirectText(element) ? !1 : coversViewport(element); +}, isPassThroughContainer = (element) => { + let style = window.getComputedStyle(element); + return style.display === "contents" ? !0 : hasVisibleDecoration(style) || isReplacedOrControl(element) || hasDirectText(element) || hasExplicitWidth(style) ? !1 : isStretchedToParent(element); +}, shouldExcludeFromMeasurement = (element) => isPassThroughContainer(element) || isViewportOverlayUnderlay(element), getMeasurableElements = (elements) => { + let all = [...elements], measurable = all.filter((element) => !shouldExcludeFromMeasurement(element)); + return measurable.length > 0 ? measurable : all; +}, getBodyPadding = (documentRef) => { + let style = window.getComputedStyle(documentRef.body); + return { + top: parseFloat(style.paddingTop) || 0, + right: parseFloat(style.paddingRight) || 0, + bottom: parseFloat(style.paddingBottom) || 0, + left: parseFloat(style.paddingLeft) || 0 + }; +}, getDimensions = (elements, documentRef) => { + let minTop = 1 / 0, minLeft = 1 / 0, maxBottom = 0, maxRight = 0; + for (let element of getMeasurableElements(elements)) { + let rect = element.getBoundingClientRect(), computedStyle = window.getComputedStyle(element), marginTop = parseFloat(computedStyle.marginTop) || 0, marginLeft = parseFloat(computedStyle.marginLeft) || 0, marginBottom = parseFloat(computedStyle.marginBottom) || 0, marginRight = parseFloat(computedStyle.marginRight) || 0; + minTop = Math.min(minTop, rect.top - marginTop), minLeft = Math.min(minLeft, rect.left - marginLeft), maxBottom = Math.max(maxBottom, rect.bottom + marginBottom), maxRight = Math.max(maxRight, rect.right + marginRight); + } + let padding = getBodyPadding(documentRef), contentWidth = maxRight - minLeft, contentHeight = maxBottom - minTop; + return { + width: Math.ceil(contentWidth + padding.left + padding.right), + height: Math.ceil(contentHeight + padding.top + padding.bottom) + }; +}, getTrackedElements = () => { + let elements = /* @__PURE__ */ new Set(), nodes = [ + ...Array.from(document.getElementById("storybook-root")?.children || []), + ...Array.from(document.body.children).filter((child) => !child.id.startsWith("storybook-")) + ]; + for (let node of nodes) + if (node instanceof Element && !IGNORE_TAGS.has(node.tagName.toLowerCase())) { + elements.add(node); + for (let descendant of Array.from(node.querySelectorAll(descendantSelector))) + elements.add(descendant); + } + return elements; +}, injectEmbedSizingStyles = (documentRef) => { + if (documentRef.getElementById(EMBED_STYLE_ID)) + return; + let style = documentRef.createElement("style"); + style.id = EMBED_STYLE_ID, style.textContent = `${`:where(#storybook-root > :is(${BLOCK_LEVEL_TAGS.join(", ")}))`} { + width: fit-content; + max-width: 100%; + }`, documentRef.head.appendChild(style); +}, removeEmbedSizingStyles = (documentRef) => { + documentRef.getElementById(EMBED_STYLE_ID)?.remove(); +}, injectEmbedUiStyles = (documentRef) => { + if (documentRef.getElementById(EMBED_UI_STYLE_ID)) + return; + let style = documentRef.createElement("style"); + style.id = EMBED_UI_STYLE_ID, style.textContent = ` + .sb-preparing-story, + .sb-preparing-docs { + display: none !important; + } + `, documentRef.head.appendChild(style); +}, lastDimensions = null, sendResizeMessage = (elements, windowRef, documentRef, getViewport) => { + if (!elements.size) + return; + injectEmbedSizingStyles(documentRef); + let dimensions = getDimensions(elements, documentRef); + removeEmbedSizingStyles(documentRef); + let viewport = getViewport?.(); + if (dimensions.width === lastDimensions?.width && dimensions.height === lastDimensions?.height && iframeResizeViewportsEqual(viewport, lastDimensions?.viewport)) + return; + let message = JSON.stringify({ + src: windowRef.location.toString(), + context: IFRAME_RESIZE_CONTEXT, + width: dimensions.width, + height: dimensions.height, + ...viewport ? { viewport } : {} + }); + lastDimensions = { ...dimensions, viewport }; + try { + windowRef.parent !== windowRef && windowRef.parent.postMessage(message, "*"); + } catch { + } +}, debounce = (callback) => { + let rafId = null, debounced = () => { + rafId !== null && cancelAnimationFrame(rafId), rafId = requestAnimationFrame(() => { + callback(), rafId = null; + }); + }; + return debounced.cancel = () => { + rafId !== null && (cancelAnimationFrame(rafId), rafId = null); + }, debounced; +}, setupContentResizeBroadcast = (options = {}) => { + let { getViewport } = options, windowRef = global6.window, documentRef = global6.document; + if (!windowRef || !documentRef) + return {}; + if (!shouldEmbed({ search: documentRef.location.search })) + return {}; + lastDimensions = null; + let freezing = shouldFreeze({ search: documentRef.location.search }); + freezing && injectEmbedUiStyles(documentRef); + let contentFrozen = !1, measureAndSend = () => { + let elements = getTrackedElements(); + sendResizeMessage(elements, windowRef, documentRef, getViewport); + }, onParentMessage = (event) => { + if (event.source === windowRef.parent) + try { + if ((typeof event.data == "string" ? JSON.parse(event.data) : event.data)?.context === IFRAME_RESIZE_REQUEST_CONTEXT) { + if (freezing && !contentFrozen) + return; + lastDimensions = null, measureAndSend(); + } + } catch { + } + }; + windowRef.addEventListener("message", onParentMessage); + let cleanups2 = [ + () => windowRef.removeEventListener("message", onParentMessage) + ]; + if (freezing) + return { + onContentFrozen: () => { + contentFrozen = !0, measureAndSend(); + }, + cleanup: () => cleanups2.forEach((fn) => fn()) + }; + let trackedElements = getTrackedElements(), debouncedUpdate = debounce(() => sendResizeMessage(trackedElements, windowRef, documentRef, getViewport)), resizeObserver = new ResizeObserver(debouncedUpdate); + for (let element of trackedElements) + resizeObserver.observe(element); + let mutationObserver = new MutationObserver(() => { + debouncedUpdate(); + let updatedElements = getTrackedElements(); + for (let element of updatedElements) + trackedElements.has(element) || (resizeObserver.observe(element), trackedElements.add(element)); + for (let element of trackedElements) + updatedElements.has(element) || (resizeObserver.unobserve(element), trackedElements.delete(element)); + }); + return mutationObserver.observe(documentRef.body, { + childList: !0, + subtree: !0 + }), windowRef.addEventListener("resize", debouncedUpdate), cleanups2.push( + () => debouncedUpdate.cancel(), + () => resizeObserver.disconnect(), + () => mutationObserver.disconnect(), + () => windowRef.removeEventListener("resize", debouncedUpdate) + ), measureAndSend(), { cleanup: () => cleanups2.forEach((fn) => fn()) }; +}; + +// src/preview-api/modules/preview-web/PreviewWithSelection.tsx +var globalWindow = globalThis; +function focusInInput(event) { + let target = event.composedPath && event.composedPath()[0] || event.target; + return /input|textarea/i.test(target.tagName) || target.getAttribute("contenteditable") !== null; +} +function isStoryRender(r) { + return r.type === "story"; +} +function isDocsRender(r) { + return r.type === "docs"; +} +function isCsfDocsRender(r) { + return isDocsRender(r) && r.subtype === "csf"; +} +var PreviewWithSelection = class extends Preview { + constructor(importFn, getProjectAnnotations, selectionStore, view) { + super(importFn, getProjectAnnotations, void 0, !1); + this.importFn = importFn; + this.getProjectAnnotations = getProjectAnnotations; + this.selectionStore = selectionStore; + this.view = view; + this.initialize(); + } + setupListeners() { + super.setupListeners(), globalWindow.onkeydown = this.onKeydown.bind(this); + let { onContentFrozen } = setupContentResizeBroadcast({ + getViewport: () => { + let render = this.currentRender; + if (!(!render || !isStoryRender(render))) + return getEmbedResizeViewport(this.storyStoreValue, render, { + width: globalWindow.innerWidth, + height: globalWindow.innerHeight + }); + } + }); + setupStoryFreezer(this.channel, { onFrozen: onContentFrozen }), this.channel.on(SET_CURRENT_STORY, this.onSetCurrentStory.bind(this)), this.channel.on(UPDATE_QUERY_PARAMS, this.onUpdateQueryParams.bind(this)), this.channel.on(PRELOAD_ENTRIES, this.onPreloadStories.bind(this)); + } + async setInitialGlobals() { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError2({ methodName: "setInitialGlobals" }); + let { globals } = this.selectionStore.selectionSpecifier || {}; + globals && this.storyStoreValue.userGlobals.updateFromPersisted(globals), this.emitGlobals(); + } + // If initialization gets as far as the story index, this function runs. + async initializeWithStoryIndex(storyIndex) { + return await super.initializeWithStoryIndex(storyIndex), this.selectSpecifiedStory(); + } + // Use the selection specifier to choose a story, then render it + async selectSpecifiedStory() { + if (!this.storyStoreValue) + throw new CalledPreviewMethodBeforeInitializationError2({ + methodName: "selectSpecifiedStory" + }); + if (this.selectionStore.selection) { + await this.renderSelection(); + return; + } + if (!this.selectionStore.selectionSpecifier) { + this.renderMissingStory(); + return; + } + let { storySpecifier, args } = this.selectionStore.selectionSpecifier, entry = this.storyStoreValue.storyIndex.entryFromSpecifier(storySpecifier); + if (!entry) { + storySpecifier === "*" ? this.renderStoryLoadingException(storySpecifier, new EmptyIndexError()) : this.renderStoryLoadingException( + storySpecifier, + new NoStoryMatchError({ storySpecifier: storySpecifier.toString() }) + ); + return; + } + let { id: storyId, type: viewMode } = entry; + this.selectionStore.setSelection({ storyId, viewMode }), this.channel.emit(STORY_SPECIFIED, this.selectionStore.selection), this.channel.emit(CURRENT_STORY_WAS_SET, this.selectionStore.selection), await this.renderSelection({ persistedArgs: args }); + } + // EVENT HANDLERS + // This happens when a config file gets reloaded + async onGetProjectAnnotationsChanged({ + getProjectAnnotations + }) { + await super.onGetProjectAnnotationsChanged({ getProjectAnnotations }), this.selectionStore.selection && this.renderSelection(); + } + // This happens when a glob gets HMR-ed + async onStoriesChanged({ + importFn, + storyIndex + }) { + await super.onStoriesChanged({ importFn, storyIndex }), this.selectionStore.selection ? await this.renderSelection() : await this.selectSpecifiedStory(); + } + onKeydown(event) { + if (!this.storyRenders.find((r) => r.disableKeyListeners) && !focusInInput(event)) { + let { altKey, ctrlKey, metaKey, shiftKey, key, code, keyCode } = event; + this.channel.emit(PREVIEW_KEYDOWN, { + event: { altKey, ctrlKey, metaKey, shiftKey, key, code, keyCode } + }); + } + } + async onSetCurrentStory(selection) { + this.selectionStore.setSelection({ viewMode: "story", ...selection }), await this.storeInitializationPromise, this.channel.emit(CURRENT_STORY_WAS_SET, this.selectionStore.selection), this.renderSelection(); + } + onUpdateQueryParams(queryParams) { + this.selectionStore.setQueryParams(queryParams); + } + async onUpdateGlobals({ globals }) { + let currentStory = this.currentRender instanceof StoryRender && this.currentRender.story || void 0; + super.onUpdateGlobals({ globals, currentStory }), (this.currentRender instanceof MdxDocsRender || this.currentRender instanceof CsfDocsRender) && await this.currentRender.rerender?.(); + } + async onUpdateArgs({ storyId, updatedArgs }) { + super.onUpdateArgs({ storyId, updatedArgs }); + } + async onPreloadStories({ ids }) { + await this.storeInitializationPromise, this.storyStoreValue && await Promise.allSettled(ids.map((id) => this.storyStoreValue?.loadEntry(id))); + } + // RENDERING + // We can either have: + // - a story selected in "story" viewMode, + // in which case we render it to the root element, OR + // - a story selected in "docs" viewMode, + // in which case we render the docsPage for that story + async renderSelection({ persistedArgs } = {}) { + let { renderToCanvas } = this; + if (!this.storyStoreValue || !renderToCanvas) + throw new CalledPreviewMethodBeforeInitializationError2({ methodName: "renderSelection" }); + let { selection } = this.selectionStore; + if (!selection) + throw new Error("Cannot call renderSelection as no selection was made"); + let { storyId } = selection, entry; + try { + entry = await this.storyStoreValue.storyIdToEntry(storyId); + } catch (err) { + this.currentRender && await this.teardownRender(this.currentRender), this.renderStoryLoadingException(storyId, err); + return; + } + let storyIdChanged = this.currentSelection?.storyId !== storyId, viewModeChanged = this.currentRender?.type !== entry.type; + entry.type === "story" ? this.view.showPreparingStory({ immediate: viewModeChanged }) : this.view.showPreparingDocs({ immediate: viewModeChanged }), this.currentRender?.isPreparing() && await this.teardownRender(this.currentRender); + let render; + entry.type === "story" ? render = new StoryRender( + this.channel, + this.storyStoreValue, + renderToCanvas, + this.mainStoryCallbacks(storyId), + storyId, + "story", + { autoplay: shouldAutoplay({ search: globalWindow.location?.search ?? "" }) } + ) : isMdxEntry(entry) ? render = new MdxDocsRender( + this.channel, + this.storyStoreValue, + entry, + this.mainStoryCallbacks(storyId) + ) : render = new CsfDocsRender( + this.channel, + this.storyStoreValue, + entry, + this.mainStoryCallbacks(storyId) + ); + let lastSelection = this.currentSelection; + this.currentSelection = selection; + let lastRender = this.currentRender; + this.currentRender = render; + try { + await render.prepare(); + } catch (err) { + lastRender && await this.teardownRender(lastRender), err !== PREPARE_ABORTED && this.renderStoryLoadingException(storyId, err); + return; + } + let implementationChanged = !storyIdChanged && lastRender && !render.isEqual(lastRender); + if (persistedArgs && isStoryRender(render) && (invariant(!!render.story), this.storyStoreValue.args.updateFromPersisted(render.story, persistedArgs)), lastRender && !lastRender.torndown && !storyIdChanged && !implementationChanged && !viewModeChanged) { + this.currentRender = lastRender, this.channel.emit(STORY_UNCHANGED, storyId), this.view.showMain(); + return; + } + if (lastRender && await this.teardownRender(lastRender, { viewModeChanged }), lastSelection && (storyIdChanged || viewModeChanged) && this.channel.emit(STORY_CHANGED, storyId), isStoryRender(render)) { + invariant(!!render.story); + let { + parameters, + initialArgs, + argTypes, + unmappedArgs, + initialGlobals, + userGlobals, + storyGlobals, + globals + } = this.storyStoreValue.getStoryContext(render.story); + this.channel.emit(STORY_PREPARED, { + id: storyId, + parameters, + initialArgs, + argTypes, + args: unmappedArgs + }), this.channel.emit(GLOBALS_UPDATED2, { userGlobals, storyGlobals, globals, initialGlobals }); + } else { + let { parameters } = this.storyStoreValue.projectAnnotations, { initialGlobals, globals } = this.storyStoreValue.userGlobals; + if (this.channel.emit(GLOBALS_UPDATED2, { + globals, + initialGlobals, + storyGlobals: {}, + userGlobals: globals + }), isCsfDocsRender(render) || render.entry.tags?.includes(Tag.ATTACHED_MDX)) { + if (!render.csfFiles) + throw new MdxFileWithNoCsfReferencesError({ storyId }); + ({ parameters } = this.storyStoreValue.preparedMetaFromCSFFile({ + csfFile: render.csfFiles[0] + })); + } + this.channel.emit(DOCS_PREPARED, { + id: storyId, + parameters + }); + } + isStoryRender(render) ? (invariant(!!render.story), this.storyRenders.push(render), this.currentRender.renderToElement( + this.view.prepareForStory(render.story) + )) : this.currentRender.renderToElement( + this.view.prepareForDocs({ scrollReset: storyIdChanged || viewModeChanged }), + // This argument is used for docs, which is currently only compatible with HTMLElements + this.renderStoryToElement.bind(this) + ); + } + async teardownRender(render, { viewModeChanged = !1 } = {}) { + this.storyRenders = this.storyRenders.filter((r) => r !== render), await render?.teardown?.({ viewModeChanged }); + } + // UTILITIES + mainStoryCallbacks(storyId) { + return { + showStoryDuringRender: () => this.view.showStoryDuringRender(), + showMain: () => this.view.showMain(), + showError: (err) => this.renderError(storyId, err), + showException: (err) => this.renderException(storyId, err) + }; + } + renderPreviewEntryError(reason, err) { + super.renderPreviewEntryError(reason, err), this.view.showErrorDisplay(err); + } + renderMissingStory() { + this.view.showNoPreview(), this.channel.emit(STORY_MISSING); + } + renderStoryLoadingException(storySpecifier, err) { + logger6.error(err), this.view.showErrorDisplay(err), this.channel.emit(STORY_MISSING, storySpecifier); + } + // renderException is used if we fail to render the story and it is uncaught by the app layer + renderException(storyId, error) { + let { name = "Error", message = String(error), stack } = error, renderId = this.currentRender?.renderId; + this.channel.emit(STORY_THREW_EXCEPTION, { name, message, stack }), this.channel.emit(STORY_RENDER_PHASE_CHANGED3, { newPhase: "errored", renderId, storyId }), this.view.showErrorDisplay(error), logger6.error(`Error rendering story '${storyId}':`), logger6.error(error); + } + // renderError is used by the various app layers to inform the user they have done something + // wrong -- for instance returned the wrong thing from a story + renderError(storyId, { title, description }) { + let renderId = this.currentRender?.renderId; + this.channel.emit(STORY_ERRORED, { title, description }), this.channel.emit(STORY_RENDER_PHASE_CHANGED3, { newPhase: "errored", renderId, storyId }), this.view.showErrorDisplay({ message: title, stack: description }), logger6.error(`Error rendering story ${title}: ${description}`); + } +}; + +// src/preview-api/modules/preview-web/UrlStore.ts +import { global as global7 } from "@storybook/global"; + +// src/preview-api/modules/preview-web/parseArgsParam.ts +import { once as once3 } from "storybook/internal/client-logger"; +var VALIDATION_REGEXP = /^[a-zA-Z0-9 _-]*$/, NUMBER_REGEXP = /^-?[0-9]+(\.[0-9]+)?$/, HEX_REGEXP = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, COLOR_REGEXP = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i, validateArgs = (key = "", value) => key === null || key === "" || !VALIDATION_REGEXP.test(key) ? !1 : value == null || value instanceof Date || typeof value == "number" || typeof value == "boolean" ? !0 : typeof value == "string" ? VALIDATION_REGEXP.test(value) || NUMBER_REGEXP.test(value) || HEX_REGEXP.test(value) || COLOR_REGEXP.test(value) : Array.isArray(value) ? value.every((v) => validateArgs(key, v)) : isPlainObject(value) ? Object.entries(value).every(([k, v]) => validateArgs(k, v)) : !1, QUERY_OPTIONS = { + delimiter: ";", + // we're parsing a single query param + nesting: !0, + arrayRepeat: !0, + arrayRepeatSyntax: "bracket", + nestingSyntax: "js", + // objects are encoded using dot notation + valueDeserializer(str) { + if (str.startsWith("!")) { + if (str === "!undefined") + return; + if (str === "!null") + return null; + if (str === "!true") + return !0; + if (str === "!false") + return !1; + if (str.startsWith("!date(") && str.endsWith(")")) + return new Date(str.replaceAll(" ", "+").slice(6, -1)); + if (str.startsWith("!hex(") && str.endsWith(")")) + return `#${str.slice(5, -1)}`; + let color = str.slice(1).match(COLOR_REGEXP); + if (color) + return str.startsWith("!rgba") || str.startsWith("!RGBA") ? `${color[1]}(${color[2]}, ${color[3]}, ${color[4]}, ${color[5]})` : str.startsWith("!hsla") || str.startsWith("!HSLA") ? `${color[1]}(${color[2]}, ${color[3]}%, ${color[4]}%, ${color[5]})` : str.startsWith("!rgb") || str.startsWith("!RGB") ? `${color[1]}(${color[2]}, ${color[3]}, ${color[4]})` : `${color[1]}(${color[2]}, ${color[3]}%, ${color[4]}%)`; + } + return NUMBER_REGEXP.test(str) ? Number(str) : str; + } +}, parseArgsParam = (argsString) => { + let parts = argsString.split(";").map((part) => part.replace("=", "~").replace(":", "=")); + return Object.entries(parse(parts.join(";"), QUERY_OPTIONS)).reduce((acc, [key, value]) => validateArgs(key, value) ? Object.assign(acc, { [key]: value }) : (once3.warn(dedent` + Omitted potentially unsafe URL args. + + More info: https://storybook.js.org/docs/writing-stories/args?ref=error#setting-args-through-the-url + `), acc), {}); +}; + +// src/preview-api/modules/preview-web/UrlStore.ts +var { history, document: document2 } = global7; +function pathToId(path) { + let match = (path || "").match(/^\/story\/(.+)/); + if (!match) + throw new Error(`Invalid path '${path}', must start with '/story/'`); + return match[1]; +} +var getQueryString = ({ + selection, + extraParams +}) => { + let search = document2?.location.search.slice(1), { path, selectedKind, selectedStory, ...rest } = parse(search); + return `?${stringify({ + ...rest, + ...extraParams, + ...selection && { id: selection.storyId, viewMode: selection.viewMode } + })}`; +}, setPath = (selection) => { + if (!selection) + return; + let query = getQueryString({ selection }), { hash = "" } = document2.location; + document2.title = selection.storyId, history.replaceState({}, "", `${document2.location.pathname}${query}${hash}`); +}, isObject = (val) => val != null && typeof val == "object" && Array.isArray(val) === !1, getFirstString = (v) => { + if (v !== void 0) { + if (typeof v == "string") + return v; + if (Array.isArray(v)) + return getFirstString(v[0]); + if (isObject(v)) + return getFirstString( + Object.values(v).filter(Boolean) + ); + } +}, getSelectionSpecifierFromPath = () => { + if (typeof document2 < "u") { + let queryStr = document2.location.search.slice(1), query = parse(queryStr), args = typeof query.args == "string" ? parseArgsParam(query.args) : void 0, globals = typeof query.globals == "string" ? parseArgsParam(query.globals) : void 0, viewMode = getFirstString(query.viewMode); + if (typeof viewMode != "string" || !viewMode) + viewMode = "story"; + else if (!viewMode.match(/docs|story/)) + return null; + let path = getFirstString(query.path), storyId = path ? pathToId(path) : getFirstString(query.id); + if (storyId) + return { storySpecifier: storyId, args, globals, viewMode }; + } + return null; +}, UrlStore = class { + constructor() { + this.selectionSpecifier = getSelectionSpecifierFromPath(); + } + setSelection(selection) { + this.selection = selection, setPath(this.selection); + } + setQueryParams(queryParams) { + let query = getQueryString({ extraParams: queryParams }), { hash = "" } = document2.location; + history.replaceState({}, "", `${document2.location.pathname}${query}${hash}`); + } +}; + +// src/preview-api/modules/preview-web/WebView.ts +var import_ansi_to_html = __toESM(require_ansi_to_html(), 1); +import { logger as logger7 } from "storybook/internal/client-logger"; +import { global as global8 } from "@storybook/global"; +var { document: document3 } = global8, PREPARING_DELAY = 100, Mode = /* @__PURE__ */ ((Mode2) => (Mode2.MAIN = "MAIN", Mode2.NOPREVIEW = "NOPREVIEW", Mode2.PREPARING_STORY = "PREPARING_STORY", Mode2.PREPARING_DOCS = "PREPARING_DOCS", Mode2.ERROR = "ERROR", Mode2))(Mode || {}), classes = { + PREPARING_STORY: "sb-show-preparing-story", + PREPARING_DOCS: "sb-show-preparing-docs", + MAIN: "sb-show-main", + NOPREVIEW: "sb-show-nopreview", + ERROR: "sb-show-errordisplay" +}, layoutClassMap = { + centered: "sb-main-centered", + fullscreen: "sb-main-fullscreen", + padded: "sb-main-padded" +}, ansiConverter = new import_ansi_to_html.default({ + escapeXML: !0 +}), WebView = class { + constructor() { + this.testing = !1; + if (typeof document3 < "u") { + let { __SPECIAL_TEST_PARAMETER__ } = parse(document3.location.search.slice(1)); + switch (__SPECIAL_TEST_PARAMETER__) { + case "preparing-story": { + this.showPreparingStory(), this.testing = !0; + break; + } + case "preparing-docs": { + this.showPreparingDocs(), this.testing = !0; + break; + } + default: + } + } + } + // Get ready to render a story, returning the element to render to + prepareForStory(story) { + this.showStory(), this.applyLayout(story.parameters.layout), document3.documentElement.scrollTop = 0, document3.documentElement.scrollLeft = 0; + let storyRoot = this.storyRoot(); + return this.applyHtmlLang(storyRoot, story.parameters.htmlLang), storyRoot; + } + storyRoot() { + return document3.getElementById("storybook-root"); + } + prepareForDocs({ scrollReset = !0 } = {}) { + return this.showMain(), this.showDocs(), this.applyLayout("fullscreen"), scrollReset && (document3.documentElement.scrollTop = 0, document3.documentElement.scrollLeft = 0), this.docsRoot(); + } + docsRoot() { + return document3.getElementById("storybook-docs"); + } + applyLayout(layout = "padded") { + if (layout === "none") { + document3.body.classList.remove(this.currentLayoutClass), this.currentLayoutClass = null; + return; + } + this.checkIfLayoutExists(layout); + let layoutClass = layoutClassMap[layout]; + document3.body.classList.remove(this.currentLayoutClass), document3.body.classList.add(layoutClass), this.currentLayoutClass = layoutClass; + } + /** + * Injects a BCP-47 lang attribute to the story root, or removes it if `lang` is null. + */ + applyHtmlLang(element, lang) { + lang ? element.setAttribute("lang", lang) : element.removeAttribute("lang"); + } + checkIfLayoutExists(layout) { + layoutClassMap[layout] || logger7.warn( + dedent` + The desired layout: ${layout} is not a valid option. + The possible options are: ${Object.keys(layoutClassMap).join(", ")}, none. + ` + ); + } + showMode(mode) { + clearTimeout(this.preparingTimeout), Object.keys(Mode).forEach((otherMode) => { + otherMode === mode ? document3.body.classList.add(classes[otherMode]) : document3.body.classList.remove(classes[otherMode]); + }); + } + showErrorDisplay({ message = "", stack = "" }) { + let header = message, detail = stack, parts = message.split(` +`); + parts.length > 1 && ([header] = parts, detail = parts.slice(1).join(` +`).replace(/^\n/, "")), document3.getElementById("error-message").innerHTML = ansiConverter.toHtml(header), document3.getElementById("error-stack").innerHTML = ansiConverter.toHtml(detail), this.showMode("ERROR" /* ERROR */); + } + showNoPreview() { + this.testing || (this.showMode("NOPREVIEW" /* NOPREVIEW */), this.storyRoot()?.setAttribute("hidden", "true"), this.docsRoot()?.setAttribute("hidden", "true")); + } + showPreparingStory({ immediate = !1 } = {}) { + clearTimeout(this.preparingTimeout), immediate ? this.showMode("PREPARING_STORY" /* PREPARING_STORY */) : this.preparingTimeout = setTimeout( + () => this.showMode("PREPARING_STORY" /* PREPARING_STORY */), + PREPARING_DELAY + ); + } + showPreparingDocs({ immediate = !1 } = {}) { + clearTimeout(this.preparingTimeout), immediate ? this.showMode("PREPARING_DOCS" /* PREPARING_DOCS */) : this.preparingTimeout = setTimeout(() => this.showMode("PREPARING_DOCS" /* PREPARING_DOCS */), PREPARING_DELAY); + } + showMain() { + this.showMode("MAIN" /* MAIN */); + } + showDocs() { + this.storyRoot().setAttribute("hidden", "true"), this.docsRoot().removeAttribute("hidden"); + } + showStory() { + this.docsRoot().setAttribute("hidden", "true"), this.storyRoot().removeAttribute("hidden"); + } + showStoryDuringRender() { + document3.body.classList.add(classes.MAIN); + } +}; + +// src/preview-api/modules/preview-web/PreviewWeb.tsx +var PreviewWeb = class extends PreviewWithSelection { + constructor(importFn, getProjectAnnotations) { + super(importFn, getProjectAnnotations, new UrlStore(), new WebView()); + this.importFn = importFn; + this.getProjectAnnotations = getProjectAnnotations; + global9.__STORYBOOK_PREVIEW__ = this; + } +}; + +// src/preview-api/modules/preview-web/simulate-pageload.ts +import { global as global10 } from "@storybook/global"; +var { document: document4 } = global10, runScriptTypes = [ + "application/javascript", + "application/ecmascript", + "application/x-ecmascript", + "application/x-javascript", + "text/ecmascript", + "text/javascript", + "text/javascript1.0", + "text/javascript1.1", + "text/javascript1.2", + "text/javascript1.3", + "text/javascript1.4", + "text/javascript1.5", + "text/jscript", + "text/livescript", + "text/x-ecmascript", + "text/x-javascript", + // Support modern javascript + "module" +], SCRIPT = "script", SCRIPTS_ROOT_ID = "scripts-root"; +function simulateDOMContentLoaded() { + let DOMContentLoadedEvent = document4.createEvent("Event"); + DOMContentLoadedEvent.initEvent("DOMContentLoaded", !0, !0), document4.dispatchEvent(DOMContentLoadedEvent); +} +function insertScript($script, callback, $scriptRoot) { + let scriptEl = document4.createElement("script"); + scriptEl.type = $script.type === "module" ? "module" : "text/javascript", $script.src ? (scriptEl.onload = callback, scriptEl.onerror = callback, scriptEl.src = $script.src) : scriptEl.textContent = $script.innerText, $scriptRoot ? $scriptRoot.appendChild(scriptEl) : document4.head.appendChild(scriptEl), $script.parentNode.removeChild($script), $script.src || callback(); +} +function insertScriptsSequentially(scriptsToExecute, callback, index = 0) { + scriptsToExecute[index](() => { + index++, index === scriptsToExecute.length ? callback() : insertScriptsSequentially(scriptsToExecute, callback, index); + }); +} +function simulatePageLoad($container) { + let $scriptsRoot = document4.getElementById(SCRIPTS_ROOT_ID); + $scriptsRoot ? $scriptsRoot.innerHTML = "" : ($scriptsRoot = document4.createElement("div"), $scriptsRoot.id = SCRIPTS_ROOT_ID, document4.body.appendChild($scriptsRoot)); + let $scripts = Array.from($container.querySelectorAll(SCRIPT)); + if ($scripts.length) { + let scriptsToExecute = []; + $scripts.forEach(($script) => { + let typeAttr = $script.getAttribute("type"); + (!typeAttr || runScriptTypes.includes(typeAttr)) && scriptsToExecute.push((callback) => insertScript($script, callback, $scriptsRoot)); + }), scriptsToExecute.length && insertScriptsSequentially(scriptsToExecute, simulateDOMContentLoaded, void 0); + } else + simulateDOMContentLoaded(); +} + +// src/preview-api/modules/preview-web/emitTransformCode.ts +async function emitTransformCode(source, context) { + let transform = context.parameters?.docs?.source?.transform, { id, unmappedArgs } = context, transformed = transform && source ? transform?.(source, context) : source, result = transformed ? await transformed : void 0; + addons.getChannel().emit(SNIPPET_RENDERED, { + id, + source: result, + args: unmappedArgs + }); +} + +// src/shared/open-service/preview.ts +var getService2 = getService; +function registerService2(definition, registration) { + return registerService(definition, registration, { + staticLoader: createBrowserStaticLoader() + }); +} + +export { + addons, + HooksContext, + applyHooks, + useMemo, + useCallback, + useRef, + useState, + useReducer, + useEffect, + useChannel, + useStoryContext, + useParameter, + useArgs, + useGlobals, + makeDecorator, + combineArgs, + normalizeArrays, + normalizeStory, + mountDestructured, + decorateStory, + sanitizeStoryContextUpdate, + defaultDecorateStory, + prepareStory, + prepareMeta, + normalizeProjectAnnotations, + composeStepRunners, + composeConfigs, + ReporterAPI, + getCsfFactoryAnnotations, + setDefaultProjectAnnotations, + setProjectAnnotations, + composeStory, + composeStories, + createPlaywrightTest, + StoryStore, + userOrAutoTitleFromSpecifier, + userOrAutoTitle, + sortStoriesV7, + Preview, + DocsContext, + PreviewWithSelection, + UrlStore, + WebView, + PreviewWeb, + simulateDOMContentLoaded, + simulatePageLoad, + emitTransformCode, + getService2 as getService, + registerService2 as registerService +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-UAYGIC3L.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-UAYGIC3L.js new file mode 100644 index 0000000000000000000000000000000000000000..8467dcd3f356f52212537535b7a42ef3eb2e33c6 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-UAYGIC3L.js @@ -0,0 +1,57 @@ +import { + _objectWithoutPropertiesLoose +} from "./chunk-242VQQM5.js"; + +// ../../node_modules/@babel/runtime/helpers/esm/typeof.js +function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && typeof Symbol == "function" && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); +} + +// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js +function toPrimitive(t, r) { + if (_typeof(t) != "object" || !t) return t; + var e = t[Symbol.toPrimitive]; + if (e !== void 0) { + var i = e.call(t, r || "default"); + if (_typeof(i) != "object") return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (r === "string" ? String : Number)(t); +} + +// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +function toPropertyKey(t) { + var i = toPrimitive(t, "string"); + return _typeof(i) == "symbol" ? i : i + ""; +} + +// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js +function _defineProperty(e, r, t) { + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; +} + +// ../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +function _objectWithoutProperties(e, t) { + if (e == null) return {}; + var o, r, i = _objectWithoutPropertiesLoose(e, t); + if (Object.getOwnPropertySymbols) { + var n = Object.getOwnPropertySymbols(e); + for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) === -1 && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); + } + return i; +} + +export { + _objectWithoutProperties, + _defineProperty +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-W22LQPXL.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-W22LQPXL.js new file mode 100644 index 0000000000000000000000000000000000000000..bb65aa1780aefe6f48c2cfca3ecb396cf396ecef --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-W22LQPXL.js @@ -0,0 +1,1022 @@ +import { + $319e236875307eab$export$a9b970dcc4ae71a9, + $319e236875307eab$export$d10ae4f68404609a +} from "./chunk-LITCR56V.js"; + +// src/components/components/ActionBar/ActionBar.tsx +import React from "react"; +import { styled } from "storybook/theming"; +var Container = styled.div(({ theme, $flexLayout = !1 }) => [ + { + background: theme.background.content + }, + $flexLayout ? { + display: "inline-flex", + marginInlineStart: "auto", + alignSelf: "flex-end" + } : { + position: "absolute", + bottom: 0, + right: 0, + maxWidth: "100%", + display: "flex", + zIndex: 1 + } +]), ActionButton = styled.button( + ({ theme }) => ({ + margin: 0, + border: "0 none", + padding: "4px 10px", + cursor: "pointer", + display: "flex", + alignItems: "center", + color: theme.color.defaultText, + background: theme.background.content, + fontSize: 12, + lineHeight: "16px", + fontFamily: theme.typography.fonts.base, + fontWeight: theme.typography.weight.bold, + borderTop: `1px solid ${theme.appBorderColor}`, + borderLeft: `1px solid ${theme.appBorderColor}`, + marginLeft: -1, + borderRadius: "4px 0 0 0", + "&:not(:last-child)": { borderRight: `1px solid ${theme.appBorderColor}` }, + "& + *": { + borderLeft: `1px solid ${theme.appBorderColor}`, + borderRadius: 0 + }, + "&:focus": { + boxShadow: `${theme.color.secondary} 0 -3px 0 0 inset`, + outline: "0 none", + "@media (forced-colors: active)": { + outline: "2px solid ButtonBorder", + outlineOffset: "2px" + } + } + }), + ({ disabled }) => disabled && { + cursor: "not-allowed", + opacity: 0.5 + } +); +ActionButton.displayName = "ActionButton"; +var ActionBar = ({ actionItems, flexLayout = !1, ...props }) => React.createElement(Container, { ...props, $flexLayout: flexLayout }, actionItems.map(({ title, ariaLabel, className, onClick, disabled }, index) => React.createElement( + ActionButton, + { + key: index, + "aria-label": ariaLabel, + className, + onClick, + disabled: !!disabled + }, + title +))); + +// src/components/components/ScrollArea/ScrollArea.tsx +import React11, { forwardRef as forwardRef4 } from "react"; + +// ../../node_modules/@radix-ui/react-scroll-area/dist/index.mjs +import * as React23 from "react"; + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-primitive/dist/index.mjs +import * as React4 from "react"; +import * as ReactDOM from "react-dom"; + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot/dist/index.mjs +import * as React3 from "react"; + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +import * as React2 from "react"; +function setRef(ref, value) { + typeof ref == "function" ? ref(value) : ref != null && (ref.current = value); +} +function composeRefs(...refs) { + return (node) => refs.forEach((ref) => setRef(ref, node)); +} +function useComposedRefs(...refs) { + return React2.useCallback(composeRefs(...refs), refs); +} + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot/dist/index.mjs +import { Fragment, jsx } from "react/jsx-runtime"; +var Slot = React3.forwardRef((props, forwardedRef) => { + let { children, ...slotProps } = props, childrenArray = React3.Children.toArray(children), slottable = childrenArray.find(isSlottable); + if (slottable) { + let newElement = slottable.props.children, newChildren = childrenArray.map((child) => child === slottable ? React3.Children.count(newElement) > 1 ? React3.Children.only(null) : React3.isValidElement(newElement) ? newElement.props.children : null : child); + return jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null }); + } + return jsx(SlotClone, { ...slotProps, ref: forwardedRef, children }); +}); +Slot.displayName = "Slot"; +var SlotClone = React3.forwardRef((props, forwardedRef) => { + let { children, ...slotProps } = props; + if (React3.isValidElement(children)) { + let childrenRef = getElementRef(children); + return React3.cloneElement(children, { + ...mergeProps(slotProps, children.props), + // @ts-ignore + ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef + }); + } + return React3.Children.count(children) > 1 ? React3.Children.only(null) : null; +}); +SlotClone.displayName = "SlotClone"; +var Slottable = ({ children }) => jsx(Fragment, { children }); +function isSlottable(child) { + return React3.isValidElement(child) && child.type === Slottable; +} +function mergeProps(slotProps, childProps) { + let overrideProps = { ...childProps }; + for (let propName in childProps) { + let slotPropValue = slotProps[propName], childPropValue = childProps[propName]; + /^on[A-Z]/.test(propName) ? slotPropValue && childPropValue ? overrideProps[propName] = (...args) => { + childPropValue(...args), slotPropValue(...args); + } : slotPropValue && (overrideProps[propName] = slotPropValue) : propName === "style" ? overrideProps[propName] = { ...slotPropValue, ...childPropValue } : propName === "className" && (overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ")); + } + return { ...slotProps, ...overrideProps }; +} +function getElementRef(element) { + let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; + return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref); +} + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-primitive/dist/index.mjs +import { jsx as jsx2 } from "react/jsx-runtime"; +var NODES = [ + "a", + "button", + "div", + "form", + "h2", + "h3", + "img", + "input", + "label", + "li", + "nav", + "ol", + "p", + "span", + "svg", + "ul" +], Primitive = NODES.reduce((primitive, node) => { + let Node = React4.forwardRef((props, forwardedRef) => { + let { asChild, ...primitiveProps } = props, Comp = asChild ? Slot : node; + return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), jsx2(Comp, { ...primitiveProps, ref: forwardedRef }); + }); + return Node.displayName = `Primitive.${node}`, { ...primitive, [node]: Node }; +}, {}); + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs +import * as React22 from "react"; +import * as ReactDOM2 from "react-dom"; + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +import * as React5 from "react"; +var useLayoutEffect2 = globalThis?.document ? React5.useLayoutEffect : () => { +}; + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs +import * as React6 from "react"; +function useStateMachine(initialState, machine) { + return React6.useReducer((state, event) => machine[state][event] ?? state, initialState); +} +var Presence = (props) => { + let { present, children } = props, presence = usePresence(present), child = typeof children == "function" ? children({ present: presence.isPresent }) : React22.Children.only(children), ref = useComposedRefs(presence.ref, getElementRef2(child)); + return typeof children == "function" || presence.isPresent ? React22.cloneElement(child, { ref }) : null; +}; +Presence.displayName = "Presence"; +function usePresence(present) { + let [node, setNode] = React22.useState(), stylesRef = React22.useRef({}), prevPresentRef = React22.useRef(present), prevAnimationNameRef = React22.useRef("none"), initialState = present ? "mounted" : "unmounted", [state, send] = useStateMachine(initialState, { + mounted: { + UNMOUNT: "unmounted", + ANIMATION_OUT: "unmountSuspended" + }, + unmountSuspended: { + MOUNT: "mounted", + ANIMATION_END: "unmounted" + }, + unmounted: { + MOUNT: "mounted" + } + }); + return React22.useEffect(() => { + let currentAnimationName = getAnimationName(stylesRef.current); + prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none"; + }, [state]), useLayoutEffect2(() => { + let styles = stylesRef.current, wasPresent = prevPresentRef.current; + if (wasPresent !== present) { + let prevAnimationName = prevAnimationNameRef.current, currentAnimationName = getAnimationName(styles); + present ? send("MOUNT") : currentAnimationName === "none" || styles?.display === "none" ? send("UNMOUNT") : send(wasPresent && prevAnimationName !== currentAnimationName ? "ANIMATION_OUT" : "UNMOUNT"), prevPresentRef.current = present; + } + }, [present, send]), useLayoutEffect2(() => { + if (node) { + let handleAnimationEnd = (event) => { + let isCurrentAnimation = getAnimationName(stylesRef.current).includes(event.animationName); + event.target === node && isCurrentAnimation && ReactDOM2.flushSync(() => send("ANIMATION_END")); + }, handleAnimationStart = (event) => { + event.target === node && (prevAnimationNameRef.current = getAnimationName(stylesRef.current)); + }; + return node.addEventListener("animationstart", handleAnimationStart), node.addEventListener("animationcancel", handleAnimationEnd), node.addEventListener("animationend", handleAnimationEnd), () => { + node.removeEventListener("animationstart", handleAnimationStart), node.removeEventListener("animationcancel", handleAnimationEnd), node.removeEventListener("animationend", handleAnimationEnd); + }; + } else + send("ANIMATION_END"); + }, [node, send]), { + isPresent: ["mounted", "unmountSuspended"].includes(state), + ref: React22.useCallback((node2) => { + node2 && (stylesRef.current = getComputedStyle(node2)), setNode(node2); + }, []) + }; +} +function getAnimationName(styles) { + return styles?.animationName || "none"; +} +function getElementRef2(element) { + let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; + return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref); +} + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs +import * as React7 from "react"; +import { jsx as jsx3 } from "react/jsx-runtime"; +function createContextScope(scopeName, createContextScopeDeps = []) { + let defaultContexts = []; + function createContext3(rootComponentName, defaultContext) { + let BaseContext = React7.createContext(defaultContext), index = defaultContexts.length; + defaultContexts = [...defaultContexts, defaultContext]; + function Provider(props) { + let { scope, children, ...context } = props, Context = scope?.[scopeName][index] || BaseContext, value = React7.useMemo(() => context, Object.values(context)); + return jsx3(Context.Provider, { value, children }); + } + function useContext22(consumerName, scope) { + let Context = scope?.[scopeName][index] || BaseContext, context = React7.useContext(Context); + if (context) return context; + if (defaultContext !== void 0) return defaultContext; + throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); + } + return Provider.displayName = rootComponentName + "Provider", [Provider, useContext22]; + } + let createScope = () => { + let scopeContexts = defaultContexts.map((defaultContext) => React7.createContext(defaultContext)); + return function(scope) { + let contexts = scope?.[scopeName] || scopeContexts; + return React7.useMemo( + () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), + [scope, contexts] + ); + }; + }; + return createScope.scopeName = scopeName, [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)]; +} +function composeContextScopes(...scopes) { + let baseScope = scopes[0]; + if (scopes.length === 1) return baseScope; + let createScope = () => { + let scopeHooks = scopes.map((createScope2) => ({ + useScope: createScope2(), + scopeName: createScope2.scopeName + })); + return function(overrideScopes) { + let nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => { + let currentScope = useScope(overrideScopes)[`__scope${scopeName}`]; + return { ...nextScopes2, ...currentScope }; + }, {}); + return React7.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]); + }; + }; + return createScope.scopeName = baseScope.scopeName, createScope; +} + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +import * as React8 from "react"; +function useCallbackRef(callback) { + let callbackRef = React8.useRef(callback); + return React8.useEffect(() => { + callbackRef.current = callback; + }), React8.useMemo(() => (...args) => callbackRef.current?.(...args), []); +} + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-direction/dist/index.mjs +import * as React9 from "react"; +import { jsx as jsx4 } from "react/jsx-runtime"; +var DirectionContext = React9.createContext(void 0); +function useDirection(localDir) { + let globalDir = React9.useContext(DirectionContext); + return localDir || globalDir || "ltr"; +} + +// ../../node_modules/@radix-ui/number/dist/index.mjs +function clamp(value, [min, max]) { + return Math.min(max, Math.max(min, value)); +} + +// ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/primitive/dist/index.mjs +function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = !0 } = {}) { + return function(event) { + if (originalEventHandler?.(event), checkForDefaultPrevented === !1 || !event.defaultPrevented) + return ourEventHandler?.(event); + }; +} + +// ../../node_modules/@radix-ui/react-scroll-area/dist/index.mjs +import * as React10 from "react"; +import { Fragment as Fragment2, jsx as jsx5, jsxs } from "react/jsx-runtime"; +function useStateMachine2(initialState, machine) { + return React10.useReducer((state, event) => machine[state][event] ?? state, initialState); +} +var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME), [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME), ScrollArea = React23.forwardRef( + (props, forwardedRef) => { + let { + __scopeScrollArea, + type = "hover", + dir, + scrollHideDelay = 600, + ...scrollAreaProps + } = props, [scrollArea, setScrollArea] = React23.useState(null), [viewport, setViewport] = React23.useState(null), [content, setContent] = React23.useState(null), [scrollbarX, setScrollbarX] = React23.useState(null), [scrollbarY, setScrollbarY] = React23.useState(null), [cornerWidth, setCornerWidth] = React23.useState(0), [cornerHeight, setCornerHeight] = React23.useState(0), [scrollbarXEnabled, setScrollbarXEnabled] = React23.useState(!1), [scrollbarYEnabled, setScrollbarYEnabled] = React23.useState(!1), composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node)), direction = useDirection(dir); + return jsx5( + ScrollAreaProvider, + { + scope: __scopeScrollArea, + type, + dir: direction, + scrollHideDelay, + scrollArea, + viewport, + onViewportChange: setViewport, + content, + onContentChange: setContent, + scrollbarX, + onScrollbarXChange: setScrollbarX, + scrollbarXEnabled, + onScrollbarXEnabledChange: setScrollbarXEnabled, + scrollbarY, + onScrollbarYChange: setScrollbarY, + scrollbarYEnabled, + onScrollbarYEnabledChange: setScrollbarYEnabled, + onCornerWidthChange: setCornerWidth, + onCornerHeightChange: setCornerHeight, + children: jsx5( + Primitive.div, + { + dir: direction, + ...scrollAreaProps, + ref: composedRefs, + style: { + position: "relative", + // Pass corner sizes as CSS vars to reduce re-renders of context consumers + "--radix-scroll-area-corner-width": cornerWidth + "px", + "--radix-scroll-area-corner-height": cornerHeight + "px", + ...props.style + } + } + ) + } + ); + } +); +ScrollArea.displayName = SCROLL_AREA_NAME; +var VIEWPORT_NAME = "ScrollAreaViewport", ScrollAreaViewport = React23.forwardRef( + (props, forwardedRef) => { + let { __scopeScrollArea, children, asChild, nonce, ...viewportProps } = props, context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea), ref = React23.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange); + return jsxs(Fragment2, { children: [ + jsx5( + "style", + { + dangerouslySetInnerHTML: { + __html: ` +[data-radix-scroll-area-viewport] { + scrollbar-width: none; + -ms-overflow-style: none; + -webkit-overflow-scrolling: touch; +} +[data-radix-scroll-area-viewport]::-webkit-scrollbar { + display: none; +} +:where([data-radix-scroll-area-viewport]) { + display: flex; + flex-direction: column; + align-items: stretch; +} +:where([data-radix-scroll-area-content]) { + flex-grow: 1; +} +` + }, + nonce + } + ), + jsx5( + Primitive.div, + { + "data-radix-scroll-area-viewport": "", + ...viewportProps, + asChild, + ref: composedRefs, + style: { + /** + * We don't support `visible` because the intention is to have at least one scrollbar + * if this component is used and `visible` will behave like `auto` in that case + * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description + * + * We don't handle `auto` because the intention is for the native implementation + * to be hidden if using this component. We just want to ensure the node is scrollable + * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent + * the browser from having to work out whether to render native scrollbars or not, + * we tell it to with the intention of hiding them in CSS. + */ + overflowX: context.scrollbarXEnabled ? "scroll" : "hidden", + overflowY: context.scrollbarYEnabled ? "scroll" : "hidden", + ...props.style + }, + children: getSubtree({ asChild, children }, (children2) => jsx5( + "div", + { + "data-radix-scroll-area-content": "", + ref: context.onContentChange, + style: { minWidth: context.scrollbarXEnabled ? "fit-content" : void 0 }, + children: children2 + } + )) + } + ) + ] }); + } +); +ScrollAreaViewport.displayName = VIEWPORT_NAME; +var SCROLLBAR_NAME = "ScrollAreaScrollbar", ScrollAreaScrollbar = React23.forwardRef( + (props, forwardedRef) => { + let { forceMount, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context, isHorizontal = props.orientation === "horizontal"; + return React23.useEffect(() => (isHorizontal ? onScrollbarXEnabledChange(!0) : onScrollbarYEnabledChange(!0), () => { + isHorizontal ? onScrollbarXEnabledChange(!1) : onScrollbarYEnabledChange(!1); + }), [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]), context.type === "hover" ? jsx5(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? jsx5(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? jsx5(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? jsx5(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null; + } +); +ScrollAreaScrollbar.displayName = SCROLLBAR_NAME; +var ScrollAreaScrollbarHover = React23.forwardRef((props, forwardedRef) => { + let { forceMount, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), [visible, setVisible] = React23.useState(!1); + return React23.useEffect(() => { + let scrollArea = context.scrollArea, hideTimer = 0; + if (scrollArea) { + let handlePointerEnter = () => { + window.clearTimeout(hideTimer), setVisible(!0); + }, handlePointerLeave = () => { + hideTimer = window.setTimeout(() => setVisible(!1), context.scrollHideDelay); + }; + return scrollArea.addEventListener("pointerenter", handlePointerEnter), scrollArea.addEventListener("pointerleave", handlePointerLeave), () => { + window.clearTimeout(hideTimer), scrollArea.removeEventListener("pointerenter", handlePointerEnter), scrollArea.removeEventListener("pointerleave", handlePointerLeave); + }; + } + }, [context.scrollArea, context.scrollHideDelay]), jsx5(Presence, { present: forceMount || visible, children: jsx5( + ScrollAreaScrollbarAuto, + { + "data-state": visible ? "visible" : "hidden", + ...scrollbarProps, + ref: forwardedRef + } + ) }); +}), ScrollAreaScrollbarScroll = React23.forwardRef((props, forwardedRef) => { + let { forceMount, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), isHorizontal = props.orientation === "horizontal", debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100), [state, send] = useStateMachine2("hidden", { + hidden: { + SCROLL: "scrolling" + }, + scrolling: { + SCROLL_END: "idle", + POINTER_ENTER: "interacting" + }, + interacting: { + SCROLL: "interacting", + POINTER_LEAVE: "idle" + }, + idle: { + HIDE: "hidden", + SCROLL: "scrolling", + POINTER_ENTER: "interacting" + } + }); + return React23.useEffect(() => { + if (state === "idle") { + let hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay); + return () => window.clearTimeout(hideTimer); + } + }, [state, context.scrollHideDelay, send]), React23.useEffect(() => { + let viewport = context.viewport, scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop"; + if (viewport) { + let prevScrollPos = viewport[scrollDirection], handleScroll = () => { + let scrollPos = viewport[scrollDirection]; + prevScrollPos !== scrollPos && (send("SCROLL"), debounceScrollEnd()), prevScrollPos = scrollPos; + }; + return viewport.addEventListener("scroll", handleScroll), () => viewport.removeEventListener("scroll", handleScroll); + } + }, [context.viewport, isHorizontal, send, debounceScrollEnd]), jsx5(Presence, { present: forceMount || state !== "hidden", children: jsx5( + ScrollAreaScrollbarVisible, + { + "data-state": state === "hidden" ? "hidden" : "visible", + ...scrollbarProps, + ref: forwardedRef, + onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")), + onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE")) + } + ) }); +}), ScrollAreaScrollbarAuto = React23.forwardRef((props, forwardedRef) => { + let context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), { forceMount, ...scrollbarProps } = props, [visible, setVisible] = React23.useState(!1), isHorizontal = props.orientation === "horizontal", handleResize = useDebounceCallback(() => { + if (context.viewport) { + let isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth, isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight; + setVisible(isHorizontal ? isOverflowX : isOverflowY); + } + }, 10); + return useResizeObserver(context.viewport, handleResize), useResizeObserver(context.content, handleResize), jsx5(Presence, { present: forceMount || visible, children: jsx5( + ScrollAreaScrollbarVisible, + { + "data-state": visible ? "visible" : "hidden", + ...scrollbarProps, + ref: forwardedRef + } + ) }); +}), ScrollAreaScrollbarVisible = React23.forwardRef((props, forwardedRef) => { + let { orientation = "vertical", ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), thumbRef = React23.useRef(null), pointerOffsetRef = React23.useRef(0), [sizes, setSizes] = React23.useState({ + content: 0, + viewport: 0, + scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 } + }), thumbRatio = getThumbRatio(sizes.viewport, sizes.content), commonProps = { + ...scrollbarProps, + sizes, + onSizesChange: setSizes, + hasThumb: thumbRatio > 0 && thumbRatio < 1, + onThumbChange: (thumb) => thumbRef.current = thumb, + onThumbPointerUp: () => pointerOffsetRef.current = 0, + onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos + }; + function getScrollPosition(pointerPos, dir) { + return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir); + } + return orientation === "horizontal" ? jsx5( + ScrollAreaScrollbarX, + { + ...commonProps, + ref: forwardedRef, + onThumbPositionChange: () => { + if (context.viewport && thumbRef.current) { + let scrollPos = context.viewport.scrollLeft, offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir); + thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`; + } + }, + onWheelScroll: (scrollPos) => { + context.viewport && (context.viewport.scrollLeft = scrollPos); + }, + onDragScroll: (pointerPos) => { + context.viewport && (context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir)); + } + } + ) : orientation === "vertical" ? jsx5( + ScrollAreaScrollbarY, + { + ...commonProps, + ref: forwardedRef, + onThumbPositionChange: () => { + if (context.viewport && thumbRef.current) { + let scrollPos = context.viewport.scrollTop, offset = getThumbOffsetFromScroll(scrollPos, sizes); + thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`; + } + }, + onWheelScroll: (scrollPos) => { + context.viewport && (context.viewport.scrollTop = scrollPos); + }, + onDragScroll: (pointerPos) => { + context.viewport && (context.viewport.scrollTop = getScrollPosition(pointerPos)); + } + } + ) : null; +}), ScrollAreaScrollbarX = React23.forwardRef((props, forwardedRef) => { + let { sizes, onSizesChange, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), [computedStyle, setComputedStyle] = React23.useState(), ref = React23.useRef(null), composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange); + return React23.useEffect(() => { + ref.current && setComputedStyle(getComputedStyle(ref.current)); + }, [ref]), jsx5( + ScrollAreaScrollbarImpl, + { + "data-orientation": "horizontal", + ...scrollbarProps, + ref: composeRefs2, + sizes, + style: { + bottom: 0, + left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0, + right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0, + "--radix-scroll-area-thumb-width": getThumbSize(sizes) + "px", + ...props.style + }, + onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x), + onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x), + onWheelScroll: (event, maxScrollPos) => { + if (context.viewport) { + let scrollPos = context.viewport.scrollLeft + event.deltaX; + props.onWheelScroll(scrollPos), isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) && event.preventDefault(); + } + }, + onResize: () => { + ref.current && context.viewport && computedStyle && onSizesChange({ + content: context.viewport.scrollWidth, + viewport: context.viewport.offsetWidth, + scrollbar: { + size: ref.current.clientWidth, + paddingStart: toInt(computedStyle.paddingLeft), + paddingEnd: toInt(computedStyle.paddingRight) + } + }); + } + } + ); +}), ScrollAreaScrollbarY = React23.forwardRef((props, forwardedRef) => { + let { sizes, onSizesChange, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), [computedStyle, setComputedStyle] = React23.useState(), ref = React23.useRef(null), composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange); + return React23.useEffect(() => { + ref.current && setComputedStyle(getComputedStyle(ref.current)); + }, [ref]), jsx5( + ScrollAreaScrollbarImpl, + { + "data-orientation": "vertical", + ...scrollbarProps, + ref: composeRefs2, + sizes, + style: { + top: 0, + right: context.dir === "ltr" ? 0 : void 0, + left: context.dir === "rtl" ? 0 : void 0, + bottom: "var(--radix-scroll-area-corner-height)", + "--radix-scroll-area-thumb-height": getThumbSize(sizes) + "px", + ...props.style + }, + onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y), + onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y), + onWheelScroll: (event, maxScrollPos) => { + if (context.viewport) { + let scrollPos = context.viewport.scrollTop + event.deltaY; + props.onWheelScroll(scrollPos), isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) && event.preventDefault(); + } + }, + onResize: () => { + ref.current && context.viewport && computedStyle && onSizesChange({ + content: context.viewport.scrollHeight, + viewport: context.viewport.offsetHeight, + scrollbar: { + size: ref.current.clientHeight, + paddingStart: toInt(computedStyle.paddingTop), + paddingEnd: toInt(computedStyle.paddingBottom) + } + }); + } + } + ); +}), [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME), ScrollAreaScrollbarImpl = React23.forwardRef((props, forwardedRef) => { + let { + __scopeScrollArea, + sizes, + hasThumb, + onThumbChange, + onThumbPointerUp, + onThumbPointerDown, + onThumbPositionChange, + onDragScroll, + onWheelScroll, + onResize, + ...scrollbarProps + } = props, context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea), [scrollbar, setScrollbar] = React23.useState(null), composeRefs2 = useComposedRefs(forwardedRef, (node) => setScrollbar(node)), rectRef = React23.useRef(null), prevWebkitUserSelectRef = React23.useRef(""), viewport = context.viewport, maxScrollPos = sizes.content - sizes.viewport, handleWheelScroll = useCallbackRef(onWheelScroll), handleThumbPositionChange = useCallbackRef(onThumbPositionChange), handleResize = useDebounceCallback(onResize, 10); + function handleDragScroll(event) { + if (rectRef.current) { + let x = event.clientX - rectRef.current.left, y = event.clientY - rectRef.current.top; + onDragScroll({ x, y }); + } + } + return React23.useEffect(() => { + let handleWheel = (event) => { + let element = event.target; + scrollbar?.contains(element) && handleWheelScroll(event, maxScrollPos); + }; + return document.addEventListener("wheel", handleWheel, { passive: !1 }), () => document.removeEventListener("wheel", handleWheel, { passive: !1 }); + }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]), React23.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]), useResizeObserver(scrollbar, handleResize), useResizeObserver(context.content, handleResize), jsx5( + ScrollbarProvider, + { + scope: __scopeScrollArea, + scrollbar, + hasThumb, + onThumbChange: useCallbackRef(onThumbChange), + onThumbPointerUp: useCallbackRef(onThumbPointerUp), + onThumbPositionChange: handleThumbPositionChange, + onThumbPointerDown: useCallbackRef(onThumbPointerDown), + children: jsx5( + Primitive.div, + { + ...scrollbarProps, + ref: composeRefs2, + style: { position: "absolute", ...scrollbarProps.style }, + onPointerDown: composeEventHandlers(props.onPointerDown, (event) => { + event.button === 0 && (event.target.setPointerCapture(event.pointerId), rectRef.current = scrollbar.getBoundingClientRect(), prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", context.viewport && (context.viewport.style.scrollBehavior = "auto"), handleDragScroll(event)); + }), + onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll), + onPointerUp: composeEventHandlers(props.onPointerUp, (event) => { + let element = event.target; + element.hasPointerCapture(event.pointerId) && element.releasePointerCapture(event.pointerId), document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current, context.viewport && (context.viewport.style.scrollBehavior = ""), rectRef.current = null; + }) + } + ) + } + ); +}), THUMB_NAME = "ScrollAreaThumb", ScrollAreaThumb = React23.forwardRef( + (props, forwardedRef) => { + let { forceMount, ...thumbProps } = props, scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea); + return jsx5(Presence, { present: forceMount || scrollbarContext.hasThumb, children: jsx5(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) }); + } +), ScrollAreaThumbImpl = React23.forwardRef( + (props, forwardedRef) => { + let { __scopeScrollArea, style, ...thumbProps } = props, scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea), scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea), { onThumbPositionChange } = scrollbarContext, composedRef = useComposedRefs( + forwardedRef, + (node) => scrollbarContext.onThumbChange(node) + ), removeUnlinkedScrollListenerRef = React23.useRef(), debounceScrollEnd = useDebounceCallback(() => { + removeUnlinkedScrollListenerRef.current && (removeUnlinkedScrollListenerRef.current(), removeUnlinkedScrollListenerRef.current = void 0); + }, 100); + return React23.useEffect(() => { + let viewport = scrollAreaContext.viewport; + if (viewport) { + let handleScroll = () => { + if (debounceScrollEnd(), !removeUnlinkedScrollListenerRef.current) { + let listener = addUnlinkedScrollListener(viewport, onThumbPositionChange); + removeUnlinkedScrollListenerRef.current = listener, onThumbPositionChange(); + } + }; + return onThumbPositionChange(), viewport.addEventListener("scroll", handleScroll), () => viewport.removeEventListener("scroll", handleScroll); + } + }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]), jsx5( + Primitive.div, + { + "data-state": scrollbarContext.hasThumb ? "visible" : "hidden", + ...thumbProps, + ref: composedRef, + style: { + width: "var(--radix-scroll-area-thumb-width)", + height: "var(--radix-scroll-area-thumb-height)", + ...style + }, + onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => { + let thumbRect = event.target.getBoundingClientRect(), x = event.clientX - thumbRect.left, y = event.clientY - thumbRect.top; + scrollbarContext.onThumbPointerDown({ x, y }); + }), + onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp) + } + ); + } +); +ScrollAreaThumb.displayName = THUMB_NAME; +var CORNER_NAME = "ScrollAreaCorner", ScrollAreaCorner = React23.forwardRef( + (props, forwardedRef) => { + let context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea), hasBothScrollbarsVisible = !!(context.scrollbarX && context.scrollbarY); + return context.type !== "scroll" && hasBothScrollbarsVisible ? jsx5(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null; + } +); +ScrollAreaCorner.displayName = CORNER_NAME; +var ScrollAreaCornerImpl = React23.forwardRef((props, forwardedRef) => { + let { __scopeScrollArea, ...cornerProps } = props, context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea), [width, setWidth] = React23.useState(0), [height, setHeight] = React23.useState(0), hasSize = !!(width && height); + return useResizeObserver(context.scrollbarX, () => { + let height2 = context.scrollbarX?.offsetHeight || 0; + context.onCornerHeightChange(height2), setHeight(height2); + }), useResizeObserver(context.scrollbarY, () => { + let width2 = context.scrollbarY?.offsetWidth || 0; + context.onCornerWidthChange(width2), setWidth(width2); + }), hasSize ? jsx5( + Primitive.div, + { + ...cornerProps, + ref: forwardedRef, + style: { + width, + height, + position: "absolute", + right: context.dir === "ltr" ? 0 : void 0, + left: context.dir === "rtl" ? 0 : void 0, + bottom: 0, + ...props.style + } + } + ) : null; +}); +function toInt(value) { + return value ? parseInt(value, 10) : 0; +} +function getThumbRatio(viewportSize, contentSize) { + let ratio = viewportSize / contentSize; + return isNaN(ratio) ? 0 : ratio; +} +function getThumbSize(sizes) { + let ratio = getThumbRatio(sizes.viewport, sizes.content), scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd, thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio; + return Math.max(thumbSize, 18); +} +function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") { + let thumbSizePx = getThumbSize(sizes), thumbCenter = thumbSizePx / 2, offset = pointerOffset || thumbCenter, thumbOffsetFromEnd = thumbSizePx - offset, minPointerPos = sizes.scrollbar.paddingStart + offset, maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd, maxScrollPos = sizes.content - sizes.viewport, scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0]; + return linearScale([minPointerPos, maxPointerPos], scrollRange)(pointerPos); +} +function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") { + let thumbSizePx = getThumbSize(sizes), scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd, scrollbar = sizes.scrollbar.size - scrollbarPadding, maxScrollPos = sizes.content - sizes.viewport, maxThumbPos = scrollbar - thumbSizePx, scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0], scrollWithoutMomentum = clamp(scrollPos, scrollClampRange); + return linearScale([0, maxScrollPos], [0, maxThumbPos])(scrollWithoutMomentum); +} +function linearScale(input, output) { + return (value) => { + if (input[0] === input[1] || output[0] === output[1]) return output[0]; + let ratio = (output[1] - output[0]) / (input[1] - input[0]); + return output[0] + ratio * (value - input[0]); + }; +} +function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) { + return scrollPos > 0 && scrollPos < maxScrollPos; +} +var addUnlinkedScrollListener = (node, handler = () => { +}) => { + let prevPosition = { left: node.scrollLeft, top: node.scrollTop }, rAF = 0; + return (function loop() { + let position = { left: node.scrollLeft, top: node.scrollTop }, isHorizontalScroll = prevPosition.left !== position.left, isVerticalScroll = prevPosition.top !== position.top; + (isHorizontalScroll || isVerticalScroll) && handler(), prevPosition = position, rAF = window.requestAnimationFrame(loop); + })(), () => window.cancelAnimationFrame(rAF); +}; +function useDebounceCallback(callback, delay) { + let handleCallback = useCallbackRef(callback), debounceTimerRef = React23.useRef(0); + return React23.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []), React23.useCallback(() => { + window.clearTimeout(debounceTimerRef.current), debounceTimerRef.current = window.setTimeout(handleCallback, delay); + }, [handleCallback, delay]); +} +function useResizeObserver(element, onResize) { + let handleResize = useCallbackRef(onResize); + useLayoutEffect2(() => { + let rAF = 0; + if (element) { + let resizeObserver = new ResizeObserver(() => { + cancelAnimationFrame(rAF), rAF = window.requestAnimationFrame(handleResize); + }); + return resizeObserver.observe(element), () => { + window.cancelAnimationFrame(rAF), resizeObserver.unobserve(element); + }; + } + }, [element, handleResize]); +} +function getSubtree(options, content) { + let { asChild, children } = options; + if (!asChild) return typeof content == "function" ? content(children) : content; + let firstChild = React23.Children.only(children); + return React23.cloneElement(firstChild, { + children: typeof content == "function" ? content(firstChild.props.children) : content + }); +} +var Root = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaScrollbar, Thumb = ScrollAreaThumb, Corner = ScrollAreaCorner; + +// src/components/components/ScrollArea/ScrollArea.tsx +import { styled as styled2 } from "storybook/theming"; +var ScrollAreaRoot = styled2(Root)( + ({ scrollbarsize, offset }) => ({ + width: "100%", + height: "100%", + overflow: "hidden", + "--scrollbar-size": `${scrollbarsize + offset}px`, + "--radix-scroll-area-thumb-width": `${scrollbarsize}px` + }) +), ScrollAreaViewport2 = styled2(Viewport)( + ({ focusable, theme }) => ({ + width: "100%", + height: "100%", + "&:focus": focusable ? { + outline: `2px solid ${theme.color.secondary}`, + outlineOffset: -2 + } : {} + }) +), ScrollAreaScrollbar2 = styled2(Scrollbar)(({ offset, horizontal, vertical }) => ({ + display: "flex", + userSelect: "none", + // ensures no selection + touchAction: "none", + // disable browser handling of all panning and zooming gestures on touch devices + background: "transparent", + transition: "all 0.2s ease-out", + borderRadius: "var(--scrollbar-size)", + zIndex: 1, + '&[data-orientation="vertical"]': { + width: "var(--scrollbar-size)", + paddingRight: offset, + marginTop: offset, + marginBottom: horizontal === "true" && vertical === "true" ? 0 : offset + }, + '&[data-orientation="horizontal"]': { + flexDirection: "column", + height: "var(--scrollbar-size)", + paddingBottom: offset, + marginLeft: offset, + marginRight: horizontal === "true" && vertical === "true" ? 0 : offset + } +})), ScrollAreaThumb2 = styled2(Thumb)(({ theme }) => ({ + flex: 1, + background: theme.textMutedColor, + opacity: 0.5, + borderRadius: "var(--scrollbar-size)", + position: "relative", + transition: "opacity 0.2s ease-out", + zIndex: 1, + "&:hover": { opacity: 0.8 }, + /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */ + "::before": { + content: '""', + position: "absolute", + top: "50%", + left: "50%", + transform: "translate(-50%,-50%)", + width: "100%", + height: "100%" + } +})), ScrollArea2 = forwardRef4( + ({ + children, + horizontal = !1, + vertical = !1, + offset = 2, + scrollbarSize = 6, + scrollPadding = 0, + className, + focusable = !1 + }, ref) => React11.createElement(ScrollAreaRoot, { scrollbarsize: scrollbarSize, offset, className }, React11.createElement( + ScrollAreaViewport2, + { + ref, + style: { scrollPadding }, + tabIndex: focusable ? 0 : void 0, + focusable + }, + children + ), horizontal && React11.createElement( + ScrollAreaScrollbar2, + { + orientation: "horizontal", + offset, + horizontal: horizontal.toString(), + vertical: vertical.toString() + }, + React11.createElement(ScrollAreaThumb2, null) + ), vertical && React11.createElement( + ScrollAreaScrollbar2, + { + orientation: "vertical", + offset, + horizontal: horizontal.toString(), + vertical: vertical.toString() + }, + React11.createElement(ScrollAreaThumb2, null) + ), horizontal && vertical && React11.createElement(Corner, null)) +); +ScrollArea2.displayName = "ScrollArea"; + +// src/shared/useCopyButton.ts +import { + useCallback as useCallback4, + useEffect as useEffect4, + useMemo as useMemo3, + useRef as useRef4, + useState as useState3 +} from "react"; +function useCopyButton({ + children = "Copy", + childrenOnCopy = "Copied!", + content, + onCopy, + ariaLabel = !1, + ariaLabelOnCopy = !1, + duration = 3e3 +}) { + let [copied, setCopied] = useState3(!1), timerRef = useRef4(null); + useEffect4( + () => () => { + timerRef.current && clearTimeout(timerRef.current); + }, + [] + ); + let handleClick = useCallback4( + (e) => { + timerRef.current && clearTimeout(timerRef.current); + let announcement = typeof ariaLabelOnCopy == "string" ? ariaLabelOnCopy : "Copied to clipboard"; + navigator.clipboard?.writeText(content).then(() => { + onCopy?.(e), setCopied(!0), $319e236875307eab$export$a9b970dcc4ae71a9(announcement, "polite"), timerRef.current = setTimeout(() => { + setCopied(!1), $319e236875307eab$export$d10ae4f68404609a("polite"), timerRef.current = null; + }, duration); + }); + }, + [content, onCopy, ariaLabelOnCopy, duration] + ); + return { + // @ts-expect-error - TypeScript is not realising T is constrained identically in both interfaces. + children: copied ? childrenOnCopy : children, + buttonProps: useMemo3( + () => ({ + onClick: handleClick, + ariaLabel: copied ? ariaLabelOnCopy : ariaLabel + }), + [handleClick, copied, ariaLabelOnCopy, ariaLabel] + ) + }; +} + +export { + ActionBar, + ScrollArea2 as ScrollArea, + useCopyButton +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-W6Y3UHOT.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-W6Y3UHOT.js new file mode 100644 index 0000000000000000000000000000000000000000..0857c12ef38c17a6bc22c76f287f8e6e73602bf7 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-W6Y3UHOT.js @@ -0,0 +1,1861 @@ +import { + OpenServiceAsyncSchemaError, + OpenServiceInvalidStaticPathError, + OpenServiceLoadedDrainExceededError, + OpenServiceMissingChannelError, + OpenServiceMissingServiceError, + OpenServiceRemoteCommandDisconnectedError, + OpenServiceRemoteCommandUnhandledError, + OpenServiceUnimplementedOperationError, + OpenServiceValidationError +} from "./chunk-KUHYVZJN.js"; +import { + buildQueryState, + toError +} from "./chunk-QC4HFS6K.js"; +import { + isEqual +} from "./chunk-Z3B64JMR.js"; +import { + getChannel +} from "./chunk-KK3JJ3E4.js"; +import { + OpenServiceStaticSnapshotInvalidError, + OpenServiceStaticSnapshotLoadError +} from "./chunk-IUGBVGDA.js"; + +// ../../node_modules/nanoid/index.browser.js +var nanoid = (size = 21) => crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => (byte &= 63, byte < 36 ? id += byte.toString(36) : byte < 62 ? id += (byte - 26).toString(36).toUpperCase() : byte > 62 ? id += "-" : id += "_", id), ""); + +// ../../node_modules/valibot/dist/index.mjs +var store$4, DEFAULT_CONFIG = { + lang: void 0, + message: void 0, + abortEarly: void 0, + abortPipeEarly: void 0 +}; +function getGlobalConfig(config$1) { + return !config$1 && !store$4 ? DEFAULT_CONFIG : { + lang: config$1?.lang ?? store$4?.lang, + message: config$1?.message, + abortEarly: config$1?.abortEarly ?? store$4?.abortEarly, + abortPipeEarly: config$1?.abortPipeEarly ?? store$4?.abortPipeEarly + }; +} +var store$3; +function getGlobalMessage(lang) { + return store$3?.get(lang); +} +var store$2; +function getSchemaMessage(lang) { + return store$2?.get(lang); +} +var store$1; +function getSpecificMessage(reference, lang) { + return store$1?.get(reference)?.get(lang); +} +function _stringify(input) { + let type = typeof input; + return type === "string" ? `"${input}"` : type === "number" || type === "bigint" || type === "boolean" ? `${input}` : type === "object" || type === "function" ? (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null" : type; +} +function _addIssue(context, label, dataset, config$1, other) { + let input = other && "input" in other ? other.input : dataset.value, expected = other?.expected ?? context.expects ?? null, received = other?.received ?? _stringify(input), issue = { + kind: context.kind, + type: context.type, + input, + expected, + received, + message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`, + requirement: context.requirement, + path: other?.path, + issues: other?.issues, + lang: config$1.lang, + abortEarly: config$1.abortEarly, + abortPipeEarly: config$1.abortPipeEarly + }, isSchema = context.kind === "schema", message$1 = other?.message ?? context.message ?? getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? getSchemaMessage(issue.lang) : null) ?? config$1.message ?? getGlobalMessage(issue.lang); + message$1 !== void 0 && (issue.message = typeof message$1 == "function" ? message$1(issue) : message$1), isSchema && (dataset.typed = !1), dataset.issues ? dataset.issues.push(issue) : dataset.issues = [issue]; +} +var _standardCache = /* @__PURE__ */ new WeakMap(); +function _getStandardProps(context) { + let cached = _standardCache.get(context); + return cached || (cached = { + version: 1, + vendor: "valibot", + validate(value$1) { + return context["~run"]({ value: value$1 }, getGlobalConfig()); + } + }, _standardCache.set(context, cached)), cached; +} +function _isValidObjectKey(object$1, key) { + return Object.prototype.hasOwnProperty.call(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor"; +} +var EMOJI_REGEX = new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation}))*)+$", "u"); +function minValue(requirement, message$1) { + return { + kind: "validation", + type: "min_value", + reference: minValue, + async: !1, + expects: `>=${requirement instanceof Date ? requirement.toJSON() : _stringify(requirement)}`, + requirement, + message: message$1, + "~run"(dataset, config$1) { + return dataset.typed && !(dataset.value >= this.requirement) && _addIssue(this, "value", dataset, config$1, { received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value) }), dataset; + } + }; +} +function safeInteger(message$1) { + return { + kind: "validation", + type: "safe_integer", + reference: safeInteger, + async: !1, + expects: null, + requirement: Number.isSafeInteger, + message: message$1, + "~run"(dataset, config$1) { + return dataset.typed && !this.requirement(dataset.value) && _addIssue(this, "safe integer", dataset, config$1), dataset; + } + }; +} +function getFallback(schema, dataset, config$1) { + return typeof schema.fallback == "function" ? schema.fallback(dataset, config$1) : schema.fallback; +} +function getDefault(schema, dataset, config$1) { + return typeof schema.default == "function" ? schema.default(dataset, config$1) : schema.default; +} +function array(item, message$1) { + return { + kind: "schema", + type: "array", + reference: array, + expects: "Array", + async: !1, + item, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + let input = dataset.value; + if (Array.isArray(input)) { + dataset.typed = !0, dataset.value = []; + for (let key = 0; key < input.length; key++) { + let value$1 = input[key], itemDataset = this.item["~run"]({ value: value$1 }, config$1); + if (itemDataset.issues) { + let pathItem = { + type: "array", + origin: "value", + input, + key, + value: value$1 + }; + for (let issue of itemDataset.issues) + issue.path ? issue.path.unshift(pathItem) : issue.path = [pathItem], dataset.issues?.push(issue); + if (dataset.issues || (dataset.issues = itemDataset.issues), config$1.abortEarly) { + dataset.typed = !1; + break; + } + } + itemDataset.typed || (dataset.typed = !1), dataset.value.push(itemDataset.value); + } + } else _addIssue(this, "type", dataset, config$1); + return dataset; + } + }; +} +function custom(check$1, message$1) { + return { + kind: "schema", + type: "custom", + reference: custom, + expects: "unknown", + async: !1, + check: check$1, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + return this.check(dataset.value) ? dataset.typed = !0 : _addIssue(this, "type", dataset, config$1), dataset; + } + }; +} +function looseObject(entries$1, message$1) { + return { + kind: "schema", + type: "loose_object", + reference: looseObject, + expects: "Object", + async: !1, + entries: entries$1, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + let input = dataset.value; + if (input && typeof input == "object") { + dataset.typed = !0, dataset.value = {}; + for (let key in this.entries) { + let valueSchema = this.entries[key]; + if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) { + let value$1 = key in input ? input[key] : getDefault(valueSchema), valueDataset = valueSchema["~run"]({ value: value$1 }, config$1); + if (valueDataset.issues) { + let pathItem = { + type: "object", + origin: "value", + input, + key, + value: value$1 + }; + for (let issue of valueDataset.issues) + issue.path ? issue.path.unshift(pathItem) : issue.path = [pathItem], dataset.issues?.push(issue); + if (dataset.issues || (dataset.issues = valueDataset.issues), config$1.abortEarly) { + dataset.typed = !1; + break; + } + } + valueDataset.typed || (dataset.typed = !1), dataset.value[key] = valueDataset.value; + } else if (valueSchema.fallback !== void 0) dataset.value[key] = getFallback(valueSchema); + else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish" && (_addIssue(this, "key", dataset, config$1, { + input: void 0, + expected: `"${key}"`, + path: [{ + type: "object", + origin: "key", + input, + key, + value: input[key] + }] + }), config$1.abortEarly)) + break; + } + if (!dataset.issues || !config$1.abortEarly) + for (let key in input) _isValidObjectKey(input, key) && !(key in this.entries) && (dataset.value[key] = input[key]); + } else _addIssue(this, "type", dataset, config$1); + return dataset; + } + }; +} +function number(message$1) { + return { + kind: "schema", + type: "number", + reference: number, + expects: "number", + async: !1, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + return typeof dataset.value == "number" && !isNaN(dataset.value) ? dataset.typed = !0 : _addIssue(this, "type", dataset, config$1), dataset; + } + }; +} +function object(entries$1, message$1) { + return { + kind: "schema", + type: "object", + reference: object, + expects: "Object", + async: !1, + entries: entries$1, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + let input = dataset.value; + if (input && typeof input == "object") { + dataset.typed = !0, dataset.value = {}; + for (let key in this.entries) { + let valueSchema = this.entries[key]; + if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) { + let value$1 = key in input ? input[key] : getDefault(valueSchema), valueDataset = valueSchema["~run"]({ value: value$1 }, config$1); + if (valueDataset.issues) { + let pathItem = { + type: "object", + origin: "value", + input, + key, + value: value$1 + }; + for (let issue of valueDataset.issues) + issue.path ? issue.path.unshift(pathItem) : issue.path = [pathItem], dataset.issues?.push(issue); + if (dataset.issues || (dataset.issues = valueDataset.issues), config$1.abortEarly) { + dataset.typed = !1; + break; + } + } + valueDataset.typed || (dataset.typed = !1), dataset.value[key] = valueDataset.value; + } else if (valueSchema.fallback !== void 0) dataset.value[key] = getFallback(valueSchema); + else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish" && (_addIssue(this, "key", dataset, config$1, { + input: void 0, + expected: `"${key}"`, + path: [{ + type: "object", + origin: "key", + input, + key, + value: input[key] + }] + }), config$1.abortEarly)) + break; + } + } else _addIssue(this, "type", dataset, config$1); + return dataset; + } + }; +} +function optional(wrapped, default_) { + return { + kind: "schema", + type: "optional", + reference: optional, + expects: `(${wrapped.expects} | undefined)`, + async: !1, + wrapped, + default: default_, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + return dataset.value === void 0 && (this.default !== void 0 && (dataset.value = getDefault(this, dataset, config$1)), dataset.value === void 0) ? (dataset.typed = !0, dataset) : this.wrapped["~run"](dataset, config$1); + } + }; +} +function record(key, value$1, message$1) { + return { + kind: "schema", + type: "record", + reference: record, + expects: "Object", + async: !1, + key, + value: value$1, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + let input = dataset.value; + if (input && typeof input == "object") { + dataset.typed = !0, dataset.value = {}; + for (let entryKey in input) if (_isValidObjectKey(input, entryKey)) { + let entryValue = input[entryKey], keyDataset = this.key["~run"]({ value: entryKey }, config$1); + if (keyDataset.issues) { + let pathItem = { + type: "object", + origin: "key", + input, + key: entryKey, + value: entryValue + }; + for (let issue of keyDataset.issues) + issue.path = [pathItem], dataset.issues?.push(issue); + if (dataset.issues || (dataset.issues = keyDataset.issues), config$1.abortEarly) { + dataset.typed = !1; + break; + } + } + let valueDataset = this.value["~run"]({ value: entryValue }, config$1); + if (valueDataset.issues) { + let pathItem = { + type: "object", + origin: "value", + input, + key: entryKey, + value: entryValue + }; + for (let issue of valueDataset.issues) + issue.path ? issue.path.unshift(pathItem) : issue.path = [pathItem], dataset.issues?.push(issue); + if (dataset.issues || (dataset.issues = valueDataset.issues), config$1.abortEarly) { + dataset.typed = !1; + break; + } + } + (!keyDataset.typed || !valueDataset.typed) && (dataset.typed = !1), keyDataset.typed && (dataset.value[keyDataset.value] = valueDataset.value); + } + } else _addIssue(this, "type", dataset, config$1); + return dataset; + } + }; +} +function string(message$1) { + return { + kind: "schema", + type: "string", + reference: string, + expects: "string", + async: !1, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + return typeof dataset.value == "string" ? dataset.typed = !0 : _addIssue(this, "type", dataset, config$1), dataset; + } + }; +} +function undefined_(message$1) { + return { + kind: "schema", + type: "undefined", + reference: undefined_, + expects: "undefined", + async: !1, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + return dataset.value === void 0 ? dataset.typed = !0 : _addIssue(this, "type", dataset, config$1), dataset; + } + }; +} +function unknown() { + return { + kind: "schema", + type: "unknown", + reference: unknown, + expects: "unknown", + async: !1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset) { + return dataset.typed = !0, dataset; + } + }; +} +function void_(message$1) { + return { + kind: "schema", + type: "void", + reference: void_, + expects: "void", + async: !1, + message: message$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + return dataset.value === void 0 ? dataset.typed = !0 : _addIssue(this, "type", dataset, config$1), dataset; + } + }; +} +function pipe(...pipe$1) { + return { + ...pipe$1[0], + pipe: pipe$1, + get "~standard"() { + return _getStandardProps(this); + }, + "~run"(dataset, config$1) { + for (let item of pipe$1) if (item.kind !== "metadata") { + if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) { + dataset.typed = !1; + break; + } + (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) && (dataset = item["~run"](dataset, config$1)); + } + return dataset; + } + }; +} +function safeParse(schema, input, config$1) { + let dataset = schema["~run"]({ value: input }, getGlobalConfig(config$1)); + return { + typed: dataset.typed, + success: !dataset.issues, + output: dataset.value, + issues: dataset.issues + }; +} + +// src/shared/open-service/service-channel.ts +var SERVICE_SYNC_START = "services:sync-start", SERVICE_SYNC_START_REPLY = "services:sync-start-reply", SERVICE_PATCHES = "services:patches", SERVICE_COMMAND_INVOKE = "services:command-invoke", SERVICE_COMMAND_ACK = "services:command-ack", SERVICE_COMMAND_RESULT = "services:command-result", SERVICE_COMMAND_ERROR = "services:command-error", stateSnapshotSchema = custom( + (value) => typeof value == "object" && value !== null && !Array.isArray(value) +), syncStartSchema = object({ + serviceId: string(), + clientId: string() +}), stampedSnapshotSchema = object({ + serviceId: string(), + state: stateSnapshotSchema, + version: pipe(number(), safeInteger(), minValue(0)), + clientId: string() +}), commandInvokeSchema = object({ + serviceId: string(), + commandName: string(), + input: optional(unknown()), + callId: string(), + clientId: string() +}), commandAckSchema = object({ + serviceId: string(), + callId: string(), + clientId: string() +}), commandResultSchema = object({ + serviceId: string(), + callId: string(), + result: optional(unknown()), + clientId: string() +}), commandErrorSchema = object({ + serviceId: string(), + callId: string(), + error: custom( + (value) => typeof value == "object" && value !== null && !Array.isArray(value) + ), + clientId: string() +}); +function generateClientId() { + return nanoid(); +} + +// ../../node_modules/@preact/signals-core/dist/signals-core.module.js +var i = /* @__PURE__ */ Symbol.for("preact-signals"); +function t() { + if (s > 1) + s--; + else { + var i3, t2 = !1; + for ((function() { + var i4 = c; + for (c = void 0; i4 !== void 0; ) + i4.S.v === i4.v && (i4.S.i = i4.i), i4 = i4.o; + })(); h !== void 0; ) { + var n3 = h; + for (h = void 0, v++; n3 !== void 0; ) { + var r2 = n3.u; + if (n3.u = void 0, n3.f &= -3, !(8 & n3.f) && w(n3)) try { + n3.c(); + } catch (n4) { + t2 || (i3 = n4, t2 = !0); + } + n3 = r2; + } + } + if (v = 0, s--, t2) throw i3; + } +} +function n(i3) { + if (s > 0) return i3(); + e = ++u, s++; + try { + return i3(); + } finally { + t(); + } +} +var r = void 0; +function o(i3) { + var t2 = r; + r = void 0; + try { + return i3(); + } finally { + r = t2; + } +} +var f, h = void 0, s = 0, v = 0, u = 0, e = 0, c = void 0, d = 0; +function a(i3) { + if (r !== void 0) { + var t2 = i3.n; + if (t2 === void 0 || t2.t !== r) + return t2 = { i: 0, S: i3, p: r.s, n: void 0, t: r, e: void 0, x: void 0, r: t2 }, r.s !== void 0 && (r.s.n = t2), r.s = t2, i3.n = t2, 32 & r.f && i3.S(t2), t2; + if (t2.i === -1) + return t2.i = 0, t2.n !== void 0 && (t2.n.p = t2.p, t2.p !== void 0 && (t2.p.n = t2.n), t2.p = r.s, t2.n = void 0, r.s.n = t2, r.s = t2), t2; + } +} +function l(i3, t2) { + this.v = i3, this.i = 0, this.n = void 0, this.t = void 0, this.l = 0, this.W = t2?.watched, this.Z = t2?.unwatched, this.name = t2?.name; +} +l.prototype.brand = i; +l.prototype.h = function() { + return !0; +}; +l.prototype.S = function(i3) { + var t2 = this, n3 = this.t; + n3 !== i3 && i3.e === void 0 && (i3.x = n3, this.t = i3, n3 !== void 0 ? n3.e = i3 : o(function() { + var i4; + (i4 = t2.W) == null || i4.call(t2); + })); +}; +l.prototype.U = function(i3) { + var t2 = this; + if (this.t !== void 0) { + var n3 = i3.e, r2 = i3.x; + n3 !== void 0 && (n3.x = r2, i3.e = void 0), r2 !== void 0 && (r2.e = n3, i3.x = void 0), i3 === this.t && (this.t = r2, r2 === void 0 && o(function() { + var i4; + (i4 = t2.Z) == null || i4.call(t2); + })); + } +}; +l.prototype.subscribe = function(i3) { + var t2 = this; + return j(function() { + var n3 = t2.value, o3 = r; + r = void 0; + try { + i3(n3); + } finally { + r = o3; + } + }, { name: "sub" }); +}; +l.prototype.valueOf = function() { + return this.value; +}; +l.prototype.toString = function() { + return this.value + ""; +}; +l.prototype.toJSON = function() { + return this.value; +}; +l.prototype.peek = function() { + var i3 = this; + return o(function() { + return i3.value; + }); +}; +Object.defineProperty(l.prototype, "value", { get: function() { + var i3 = a(this); + return i3 !== void 0 && (i3.i = this.i), this.v; +}, set: function(i3) { + if (i3 !== this.v) { + if (v > 100) throw new Error("Cycle detected"); + (function(i4) { + s !== 0 && v === 0 && i4.l !== e && (i4.l = e, c = { S: i4, v: i4.v, i: i4.i, o: c }); + })(this), this.v = i3, this.i++, d++, s++; + try { + for (var n3 = this.t; n3 !== void 0; n3 = n3.x) n3.t.N(); + } finally { + t(); + } + } +} }); +function y(i3, t2) { + return new l(i3, t2); +} +function w(i3) { + for (var t2 = i3.s; t2 !== void 0; t2 = t2.n) if (t2.S.i !== t2.i || !t2.S.h() || t2.S.i !== t2.i) return !0; + return !1; +} +function _(i3) { + for (var t2 = i3.s; t2 !== void 0; t2 = t2.n) { + var n3 = t2.S.n; + if (n3 !== void 0 && (t2.r = n3), t2.S.n = t2, t2.i = -1, t2.n === void 0) { + i3.s = t2; + break; + } + } +} +function b(i3) { + for (var t2 = i3.s, n3 = void 0; t2 !== void 0; ) { + var r2 = t2.p; + t2.i === -1 ? (t2.S.U(t2), r2 !== void 0 && (r2.n = t2.n), t2.n !== void 0 && (t2.n.p = r2)) : n3 = t2, t2.S.n = t2.r, t2.r !== void 0 && (t2.r = void 0), t2 = r2; + } + i3.s = n3; +} +function p(i3, t2) { + l.call(this, void 0), this.x = i3, this.s = void 0, this.g = d - 1, this.f = 4, this.W = t2?.watched, this.Z = t2?.unwatched, this.name = t2?.name; +} +p.prototype = new l(); +p.prototype.h = function() { + if (this.f &= -3, 1 & this.f) return !1; + if ((36 & this.f) == 32 || (this.f &= -5, this.g === d)) return !0; + if (this.g = d, this.f |= 1, this.i > 0 && !w(this)) + return this.f &= -2, !0; + var i3 = r; + try { + _(this), r = this; + var t2 = this.x(); + (16 & this.f || this.v !== t2 || this.i === 0) && (this.v = t2, this.f &= -17, this.i++); + } catch (i4) { + this.v = i4, this.f |= 16, this.i++; + } + return r = i3, b(this), this.f &= -2, !0; +}; +p.prototype.S = function(i3) { + if (this.t === void 0) { + this.f |= 36; + for (var t2 = this.s; t2 !== void 0; t2 = t2.n) t2.S.S(t2); + } + l.prototype.S.call(this, i3); +}; +p.prototype.U = function(i3) { + if (this.t !== void 0 && (l.prototype.U.call(this, i3), this.t === void 0)) { + this.f &= -33; + for (var t2 = this.s; t2 !== void 0; t2 = t2.n) t2.S.U(t2); + } +}; +p.prototype.N = function() { + if (!(2 & this.f)) { + this.f |= 6; + for (var i3 = this.t; i3 !== void 0; i3 = i3.x) i3.t.N(); + } +}; +Object.defineProperty(p.prototype, "value", { get: function() { + if (1 & this.f) throw new Error("Cycle detected"); + var i3 = a(this); + if (this.h(), i3 !== void 0 && (i3.i = this.i), 16 & this.f) throw this.v; + return this.v; +} }); +function g(i3, t2) { + return new p(i3, t2); +} +function S(i3) { + var n3 = i3.m; + if (i3.m = void 0, typeof n3 == "function") { + s++; + var o3 = r; + r = void 0; + try { + n3(); + } catch (t2) { + throw i3.f &= -2, i3.f |= 8, m(i3), t2; + } finally { + r = o3, t(); + } + } +} +function m(i3) { + for (var t2 = i3.s; t2 !== void 0; t2 = t2.n) t2.S.U(t2); + i3.x = void 0, i3.s = void 0, S(i3); +} +function x(i3) { + if (r !== this) throw new Error("Out-of-order effect"); + b(this), r = i3, this.f &= -2, 8 & this.f && m(this), t(); +} +function E(i3, t2) { + this.x = i3, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t2?.name, f && f.push(this); +} +E.prototype.c = function() { + var i3 = this.S(); + try { + if (8 & this.f || this.x === void 0) return; + var t2 = this.x(); + typeof t2 == "function" && (this.m = t2); + } finally { + i3(); + } +}; +E.prototype.S = function() { + if (1 & this.f) throw new Error("Cycle detected"); + this.f |= 1, this.f &= -9, S(this), _(this), s++; + var i3 = r; + return r = this, x.bind(this, i3); +}; +E.prototype.N = function() { + 2 & this.f || (this.f |= 2, this.u = h, h = this); +}; +E.prototype.d = function() { + this.f |= 8, 1 & this.f || m(this); +}; +E.prototype.dispose = function() { + this.d(); +}; +function j(i3, t2) { + var n3 = new E(i3, t2); + try { + n3.c(); + } catch (i4) { + throw n3.d(), i4; + } + var r2 = n3.d.bind(n3); + return r2[Symbol.dispose] = r2, r2; +} + +// ../../node_modules/deepsignal/core/dist/deepsignal-core.module.js +var n2 = /* @__PURE__ */ new WeakMap(), a2 = /* @__PURE__ */ new WeakMap(), o2 = /* @__PURE__ */ new WeakMap(), s2 = /* @__PURE__ */ new WeakSet(), u2 = /* @__PURE__ */ new WeakMap(), f2 = /^\$/, c2 = Object.getOwnPropertyDescriptor, i2 = !1, l2 = function(e2) { + if (!R(e2)) throw new Error("This object can't be observed."); + return a2.has(e2) || a2.set(e2, p2(e2, w2)), a2.get(e2); +}; +var p2 = function(e2, t2) { + var r2 = new Proxy(e2, t2); + return s2.add(r2), r2; +}, v2 = function() { + throw new Error("Don't mutate the signals directly."); +}, y2 = function(e2) { + return function(s3, u3, l3) { + var g2; + if (i2) return Reflect.get(s3, u3, l3); + var h2 = e2 || u3[0] === "$"; + if (!e2 && h2 && Array.isArray(s3)) { + if (u3 === "$") return o2.has(s3) || o2.set(s3, p2(s3, d2)), o2.get(s3); + h2 = u3 === "$length"; + } + n2.has(l3) || n2.set(l3, /* @__PURE__ */ new Map()); + var v3 = n2.get(l3), y3 = h2 ? u3.replace(f2, "") : u3; + if (v3.has(y3) || typeof ((g2 = c2(s3, y3)) == null ? void 0 : g2.get) != "function") { + var m3 = Reflect.get(s3, y3, l3); + if (h2 && typeof m3 == "function") return; + if (typeof y3 == "symbol" && b2.has(y3)) return m3; + v3.has(y3) || (R(m3) && (a2.has(m3) || a2.set(m3, p2(m3, w2)), m3 = a2.get(m3)), v3.set(y3, y(m3))); + } else v3.set(y3, g(function() { + return Reflect.get(s3, y3, l3); + })); + return h2 ? v3.get(y3) : v3.get(y3).value; + }; +}, w2 = { get: y2(!1), set: function(r2, o3, s3, i3) { + var l3; + if (typeof ((l3 = c2(r2, o3)) == null ? void 0 : l3.set) == "function") return Reflect.set(r2, o3, s3, i3); + n2.has(i3) || n2.set(i3, /* @__PURE__ */ new Map()); + var g2 = n2.get(i3); + if (o3[0] === "$") { + s3 instanceof l || v2(); + var h2 = o3.replace(f2, ""); + return g2.set(h2, s3), Reflect.set(r2, h2, s3.peek(), i3); + } + var y3 = s3; + R(s3) && (a2.has(s3) || a2.set(s3, p2(s3, w2)), y3 = a2.get(s3)); + var d3 = !(o3 in r2), b3 = Reflect.set(r2, o3, s3, i3); + return g2.has(o3) ? g2.get(o3).value = y3 : g2.set(o3, y(y3)), d3 && u2.has(r2) && u2.get(r2).value++, Array.isArray(r2) && g2.has("length") && (g2.get("length").value = r2.length), b3; +}, deleteProperty: function(e2, t2) { + t2[0] === "$" && v2(); + var r2 = n2.get(a2.get(e2)), o3 = Reflect.deleteProperty(e2, t2); + return r2 && r2.has(t2) && (r2.get(t2).value = void 0), u2.has(e2) && u2.get(e2).value++, o3; +}, ownKeys: function(e2) { + return u2.has(e2) || u2.set(e2, y(0)), u2._ = u2.get(e2).value, Reflect.ownKeys(e2); +} }, d2 = { get: y2(!0), set: v2, deleteProperty: v2 }, b2 = new Set(Object.getOwnPropertyNames(Symbol).map(function(e2) { + return Symbol[e2]; +}).filter(function(e2) { + return typeof e2 == "symbol"; +})), m2 = /* @__PURE__ */ new Set([Object, Array]), R = function(e2) { + return typeof e2 == "object" && e2 !== null && m2.has(e2.constructor) && !s2.has(e2); +}; + +// src/shared/open-service/service-validation.ts +function rethrowAsync(error) { + queueMicrotask(() => { + throw error; + }); +} +async function validateSchema(schema, value, meta) { + let validationResult = await schema["~standard"].validate(value); + if (validationResult.issues) + throw new OpenServiceValidationError({ ...meta, issues: validationResult.issues }); + return validationResult.value; +} +function validateSchemaSync(schema, value, meta) { + let validationResult = schema["~standard"].validate(value); + if (validationResult instanceof Promise) + throw new OpenServiceAsyncSchemaError({ + kind: meta.kind, + serviceId: meta.serviceId, + name: meta.name, + phase: meta.phase + }); + if (validationResult.issues) + throw new OpenServiceValidationError({ ...meta, issues: validationResult.issues }); + return validationResult.value; +} + +// src/shared/open-service/query-runtime.ts +var MAX_DRAIN_ITERATIONS = 32, inFlightLoads = /* @__PURE__ */ new Map(), activeHandlerLoadSession, EMPTY_SET = /* @__PURE__ */ new Set(); +function stableHash(value) { + let encode = (raw) => { + if (raw === void 0) + return { __t: "undefined" }; + if (raw === null || typeof raw != "object") + return raw; + if (Array.isArray(raw)) + return raw.map(encode); + let sorted = {}; + for (let k of Object.keys(raw).sort()) + sorted[k] = encode(raw[k]); + return { __t: "object", value: sorted }; + }; + return JSON.stringify(encode(value)); +} +function makeLoadKey(serviceId, queryName, validatedInput) { + return `${serviceId}::${queryName}::${stableHash(validatedInput)}`; +} +function surfaceRejections(settlements) { + let rejections = settlements.filter((s3) => s3.status === "rejected"); + if (rejections.length === 0) + return; + let [first, ...rest] = rejections.map((r2) => r2.reason); + if (rest.length > 0 && first instanceof Error && Reflect.get(first, "cause") === void 0) + try { + Reflect.set(first, "cause", { aggregated: rest }); + } catch { + } + throw first; +} +async function drainCollector(collector, settledKeys, serviceId, queryName) { + let iterations = 0; + for (; collector.size > 0; ) { + if (iterations++ > MAX_DRAIN_ITERATIONS) + throw new OpenServiceLoadedDrainExceededError({ + serviceId, + name: queryName, + iterations: MAX_DRAIN_ITERATIONS + }); + let pending = [...collector]; + collector.clear(); + let settlements = await Promise.allSettled(pending.map((entry) => entry.promise)); + if (settledKeys) + for (let entry of pending) + settledKeys.add(entry.key); + surfaceRejections(settlements); + } +} +function detachSnapshot(value) { + return value === null || typeof value != "object" ? value : JSON.parse(JSON.stringify(value)); +} +function validateQueryInput(refs, queryName, queryDef, input) { + return validateSchemaSync(queryDef.input, input, { + kind: "query", + serviceId: refs.serviceId, + name: queryName, + phase: "input" + }); +} +function validateQueryOutput(refs, queryName, queryDef, output) { + return validateSchemaSync(queryDef.output, output, { + kind: "query", + serviceId: refs.serviceId, + name: queryName, + phase: "output" + }); +} +function runHandlerSync(refs, queryName, queryDef, validatedInput, selfQueries, getService2) { + if (!queryDef.handler) + throw new OpenServiceUnimplementedOperationError({ + kind: "query", + serviceId: refs.serviceId, + name: queryName + }); + let handlerCtx = { self: { + get state() { + return refs.state; + }, + queries: selfQueries + }, getService: getService2 }; + return queryDef.handler(validatedInput, handlerCtx); +} +function createQueryGet(refs, queryName, queryDef, selfQueries, fireLoad) { + return function(input) { + let validatedInput = validateQueryInput( + refs, + queryName, + queryDef, + arguments.length === 0 ? void 0 : input + ); + return queryDef.load && fireLoad?.(validatedInput), validateQueryOutput( + refs, + queryName, + queryDef, + runHandlerSync( + refs, + queryName, + queryDef, + validatedInput, + selfQueries, + refs.registryApi.getService + ) + ); + }; +} +function triggerLoad(refs, queryName, queryDef, validatedInput, loadKey, parentAncestorChain) { + let existing = inFlightLoads.get(loadKey); + if (existing) + return existing; + let extendedChain = new Set(parentAncestorChain); + extendedChain.add(loadKey); + let promise = Promise.resolve().then(() => runLoadBody(refs, queryName, queryDef, validatedInput, extendedChain)).finally(() => { + inFlightLoads.get(loadKey) === promise && inFlightLoads.delete(loadKey); + }); + return inFlightLoads.set(loadKey, promise), promise; +} +async function runLoadBody(refs, queryName, queryDef, validatedInput, ancestorChain) { + if (!queryDef.load) + return; + let collector = /* @__PURE__ */ new Set(), wrappedQueries = buildLoadWrappedQueries(refs, ancestorChain, collector), loadCtx = { self: { + get state() { + return refs.state; + }, + queries: wrappedQueries, + commands: refs.getLoadCommands() + }, getService: refs.registryApi.getService }; + await Promise.resolve(queryDef.load(validatedInput, loadCtx)), await drainCollector(collector, void 0, refs.serviceId, queryName); +} +async function runReactiveLoad(refs, queryName, queryDef, validatedInput, isCurrent) { + if (!queryDef.load) + return; + let loadCtx = { self: { + get state() { + return refs.state; + }, + // Reactive-load reads must keep dependency loads warm. `.get()` on a default query is a pure + // read and never fires a load, so the body sees fire-and-forget wrappers instead: reading a + // dependency triggers its load (deduped while in flight) without awaiting a drain. + queries: refs.reactiveLoadQueries, + commands: refs.buildGatedCommands(isCurrent) + }, getService: refs.registryApi.getService }; + await Promise.resolve(queryDef.load(validatedInput, loadCtx)); +} +function buildReactiveLoadQueries(refs) { + let wrappedQueries = {}; + for (let [name, queryDef] of refs.queryDefinitions) { + let defaultQuery = refs.defaultQueries[name], get = createQueryGet(refs, name, queryDef, wrappedQueries, (validatedInput) => { + let loadKey = makeLoadKey(refs.serviceId, name, validatedInput); + triggerLoad(refs, name, queryDef, validatedInput, loadKey, EMPTY_SET).catch(rethrowAsync); + }); + wrappedQueries[name] = { + get, + loaded: defaultQuery.loaded, + subscribe: defaultQuery.subscribe + }; + } + return wrappedQueries; +} +function buildLoadWrappedQueries(refs, ancestorChain, collector) { + let wrappedQueries = {}; + for (let [name, queryDef] of refs.queryDefinitions) { + let defaultQuery = refs.defaultQueries[name], wrapped = { + get: createQueryGet(refs, name, queryDef, wrappedQueries, (validatedInput) => { + let loadKey = makeLoadKey(refs.serviceId, name, validatedInput), promise = triggerLoad(refs, name, queryDef, validatedInput, loadKey, ancestorChain); + ancestorChain.has(loadKey) || collector.add({ key: loadKey, promise }); + }), + loaded(input) { + return runLoaded( + refs, + name, + queryDef, + arguments.length === 0 ? void 0 : input, + ancestorChain + ); + }, + subscribe: defaultQuery.subscribe + }; + wrappedQueries[name] = wrapped; + } + return wrappedQueries; +} +async function runLoaded(refs, queryName, queryDef, rawInput, parentAncestorChain = EMPTY_SET) { + let validatedInput = validateQueryInput(refs, queryName, queryDef, rawInput), loadKey = makeLoadKey(refs.serviceId, queryName, validatedInput), ancestorChain = new Set(parentAncestorChain); + ancestorChain.add(loadKey); + let session = { + ancestorChain, + collector: /* @__PURE__ */ new Set(), + settledKeys: /* @__PURE__ */ new Set() + }; + if (queryDef.load && !parentAncestorChain.has(loadKey)) { + let promise = triggerLoad( + refs, + queryName, + queryDef, + validatedInput, + loadKey, + parentAncestorChain + ); + session.collector.add({ key: loadKey, promise }); + } + let iterations = 0, hasMoreWork = !0; + for (; hasMoreWork; ) { + if (iterations++ > MAX_DRAIN_ITERATIONS) + throw new OpenServiceLoadedDrainExceededError({ + serviceId: refs.serviceId, + name: queryName, + iterations: MAX_DRAIN_ITERATIONS + }); + for (; session.collector.size > 0; ) { + let pending = [...session.collector]; + session.collector.clear(); + let settlements = await Promise.allSettled(pending.map((entry) => entry.promise)); + for (let entry of pending) + session.settledKeys.add(entry.key); + surfaceRejections(settlements); + } + let previousSession2 = activeHandlerLoadSession; + activeHandlerLoadSession = session; + try { + runHandlerSync( + refs, + queryName, + queryDef, + validatedInput, + refs.defaultQueries, + refs.registryApi.getService + ); + } catch { + } finally { + activeHandlerLoadSession = previousSession2; + } + hasMoreWork = session.collector.size > 0; + } + let previousSession = activeHandlerLoadSession; + activeHandlerLoadSession = session; + try { + return validateQueryOutput( + refs, + queryName, + queryDef, + runHandlerSync( + refs, + queryName, + queryDef, + validatedInput, + refs.defaultQueries, + refs.registryApi.getService + ) + ); + } finally { + activeHandlerLoadSession = previousSession; + } +} +function createDefaultQuery(refs, queryName, queryDef) { + let resolveInput = (input, argsLength) => argsLength === 0 ? void 0 : input; + return { + get: createQueryGet(refs, queryName, queryDef, refs.defaultQueries, (validatedInput) => { + let session = activeHandlerLoadSession; + if (!session) + return; + let loadKey = makeLoadKey(refs.serviceId, queryName, validatedInput); + if (!session.ancestorChain.has(loadKey) && !session.settledKeys.has(loadKey)) { + let promise = triggerLoad( + refs, + queryName, + queryDef, + validatedInput, + loadKey, + session.ancestorChain + ); + session.collector.add({ key: loadKey, promise }); + } + }), + loaded(input) { + return runLoaded(refs, queryName, queryDef, resolveInput(input, arguments.length)); + }, + subscribe: ((...args) => { + if (args.length === 1 && typeof args[0] == "function") + return subscribeToQuery( + refs, + queryName, + queryDef, + void 0, + void 0, + args[0] + ); + if (args.length === 2 && typeof args[0] == "function" && typeof args[1] == "function") + return subscribeToQuery( + refs, + queryName, + queryDef, + void 0, + args[0], + args[1] + ); + let [input, selectorOrCallback, maybeCallback] = args; + return subscribeToQuery( + refs, + queryName, + queryDef, + input, + maybeCallback ? selectorOrCallback : void 0, + maybeCallback ?? selectorOrCallback + ); + }) + }; +} +function subscribeToQuery(refs, queryName, queryDef, rawInput, selector, callback) { + let active = !0, validatedInput; + try { + validatedInput = validateQueryInput(refs, queryName, queryDef, rawInput); + } catch (error) { + return callback( + buildQueryState(void 0, { status: "error", error: toError(error), loadStatus: "idle" }) + ), () => { + active = !1; + }; + } + let lifecycle = y({ + status: queryDef.load ? "pending" : "success", + error: void 0, + loadStatus: "idle" + }), loadTeardown; + if (queryDef.load) { + let epoch = 0; + loadTeardown = j(() => { + let myEpoch = ++epoch, isCurrent = () => myEpoch === epoch, previous = o(() => lifecycle.value); + lifecycle.value = { + status: previous.status, + error: previous.error, + loadStatus: "loading" + }, runReactiveLoad(refs, queryName, queryDef, validatedInput, isCurrent).then( + () => { + isCurrent() && (lifecycle.value = { status: "success", error: void 0, loadStatus: "idle" }); + }, + (error) => { + isCurrent() && (lifecycle.value = { status: "error", error: toError(error), loadStatus: "idle" }); + } + ); + }); + } + let comp = g(() => { + let output = runHandlerSync( + refs, + queryName, + queryDef, + validatedInput, + refs.defaultQueries, + refs.registryApi.getService + ); + if (selector) { + let validated = o(() => validateQueryOutput(refs, queryName, queryDef, output)); + return selector(output), detachSnapshot(selector(validated)); + } + return detachSnapshot(validateQueryOutput(refs, queryName, queryDef, output)); + }), hasEmitted = !1, lastEmitted, lastData, teardown = j(() => { + let life = lifecycle.value, data, status = life.status, error = life.error; + try { + data = comp.value, lastData = data; + } catch (handlerError) { + data = lastData, status = "error", error = toError(handlerError); + } + if (!active) + return; + let state = buildQueryState(data, { status, error, loadStatus: life.loadStatus }); + hasEmitted && isEqual(state, lastEmitted) || (hasEmitted = !0, lastEmitted = state, callback(state)); + }); + return () => { + active = !1, teardown(), loadTeardown?.(); + }; +} +function buildQueries(refs) { + let result = {}; + for (let [name, queryDef] of refs.queryDefinitions) + result[name] = createDefaultQuery(refs, name, queryDef); + return result; +} + +// src/shared/open-service/service-sync.ts +function isNewer(incoming, local) { + return incoming.version !== local.version ? incoming.version > local.version : incoming.clientId > local.clientId; +} +var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]); +function isPlainObject(value) { + return typeof value == "object" && value !== null && !Array.isArray(value); +} +function applyStatePatch(target, source, options) { + if (!options.preserveMissingKeys) + for (let key of Object.keys(target)) + FORBIDDEN_KEYS.has(key) || Object.prototype.hasOwnProperty.call(source, key) || delete target[key]; + for (let key of Object.keys(source)) { + if (FORBIDDEN_KEYS.has(key)) + continue; + let sourceValue = source[key], tarvalue = target[key]; + isPlainObject(sourceValue) && isPlainObject(tarvalue) ? applyStatePatch(tarvalue, sourceValue, options) : tarvalue !== sourceValue && (target[key] = sourceValue); + } +} +function createSnapshotReconciler(options) { + let { setState, initialStamp } = options, localStamp = initialStamp; + return { + get stamp() { + return localStamp; + }, + advanceLocal(clientId) { + return localStamp = { version: localStamp.version + 1, clientId }, localStamp; + }, + tryAdopt(incoming, state) { + return isNewer(incoming, localStamp) ? (localStamp = { version: incoming.version, clientId: incoming.clientId }, setState((current) => applyStatePatch(current, state, { preserveMissingKeys: !1 })), !0) : !1; + } + }; +} + +// src/shared/open-service/service-runtime.ts +function normalizeStaticStoragePath(serviceId, name, rawPath) { + let segments = rawPath.replaceAll("\\", "/").split("/").filter((segment) => segment.length > 0 && segment !== "."); + if (segments.length === 0 || segments.some((segment) => segment === "..")) + throw new OpenServiceInvalidStaticPathError({ serviceId, name, path: rawPath }); + return segments.join("/"); +} +function resolveStaticPath(serviceId, name, queryDef, input) { + let rawPath = queryDef.staticPath(input), relativePath = normalizeStaticStoragePath(serviceId, name, rawPath); + return `${serviceId}/${relativePath}`; +} +function createCommandSelf(state) { + return { + get state() { + return state; + }, + setState(mutate) { + n(() => { + mutate(state); + }); + }, + queries: {}, + commands: {} + }; +} +function buildCommands(serviceId, commands, createCommandCtx) { + return Object.fromEntries( + Object.entries(commands).map(([name, def]) => [ + name, + async (input) => { + if (!def.handler) + throw new OpenServiceUnimplementedOperationError({ + kind: "command", + serviceId, + name + }); + let validatedInput = await validateSchema(def.input, input, { + kind: "command", + serviceId, + name, + phase: "input" + }), output = await def.handler(validatedInput, createCommandCtx()); + return validateSchema(def.output, output, { + kind: "command", + serviceId, + name, + phase: "output" + }); + } + ]) + ); +} +function buildQueryDefinitionsWithStaticLoader(serviceId, queries, staticLoader, setState) { + return new Map( + Object.entries(queries).map(([name, queryDef]) => { + if (!queryDef.staticPath) + return [name, queryDef]; + let { staticPath } = queryDef; + return [ + name, + { + ...queryDef, + load: async (input) => { + let logicalPath = resolveStaticPath(serviceId, name, { staticPath }, input), snapshot = await staticLoader(logicalPath, { + serviceId, + queryName: name, + input + }); + setState((state) => { + applyStatePatch(state, snapshot, { + preserveMissingKeys: !0 + }); + }); + } + } + ]; + }) + ); +} +function createServiceRuntime(def, runtimeOptions, initialState = def.initialState) { + let rawState = initialState, state = l2(rawState), getStateSnapshot = () => structuredClone(rawState), commandSelf = createCommandSelf(state), { registryApi, staticLoader } = runtimeOptions, createCommandCtx = () => ({ + self: commandSelf, + getService: registryApi.getService + }), commands = buildCommands(def.id, def.commands, createCommandCtx); + commandSelf.commands = commands; + let loadCommands = commands, remoteCommandNames = /* @__PURE__ */ new Set(), queryDefinitions = staticLoader ? buildQueryDefinitionsWithStaticLoader( + def.id, + def.queries, + staticLoader, + commandSelf.setState + ) : new Map( + Object.entries(def.queries) + ), defaultQueries = {}, reactiveLoadQueries = {}, buildGatedCommands = (isCurrent) => { + let gatedSelf = { + get state() { + return state; + }, + setState(mutate) { + isCurrent() && n(() => { + mutate(state); + }); + }, + queries: defaultQueries, + commands: {} + }, gated = buildCommands(def.id, def.commands, () => ({ + self: gatedSelf, + getService: registryApi.getService + })); + return gatedSelf.commands = gated, remoteCommandNames.size === 0 ? gated : Object.fromEntries( + Object.keys(def.commands).map((name) => [ + name, + remoteCommandNames.has(name) ? loadCommands[name] : gated[name] + ]) + ); + }, refs = { + serviceId: def.id, + commandSelf, + state, + registryApi, + queryDefinitions, + defaultQueries, + reactiveLoadQueries, + getLoadCommands: () => loadCommands, + buildGatedCommands + }, builtQueries = buildQueries(refs); + for (let [name, query] of Object.entries(builtQueries)) + defaultQueries[name] = query; + for (let [name, query] of Object.entries(buildReactiveLoadQueries(refs))) + reactiveLoadQueries[name] = query; + commandSelf.queries = defaultQueries; + let queries = defaultQueries, queryCtx = { self: { + get state() { + return state; + }, + queries: defaultQueries + }, getService: registryApi.getService }, loadCtxForStatic = { + self: { + get state() { + return state; + }, + queries: defaultQueries, + commands + }, + getService: registryApi.getService + }; + return { + getStateSnapshot, + commandSelf, + queryCtx, + loadCtxForStatic, + commands, + queries, + runLoadOnce: async (queryName, validatedInput) => { + let queryDef = queryDefinitions.get(queryName); + if (!queryDef || !queryDef.load) + return; + let loadKey = makeLoadKey(def.id, queryName, validatedInput), ancestorChain = /* @__PURE__ */ new Set([loadKey]), previous = inFlightLoads.get(loadKey), promise = Promise.resolve().then(() => runLoadBody(refs, queryName, queryDef, validatedInput, ancestorChain)).finally(() => { + inFlightLoads.get(loadKey) === promise && (previous ? inFlightLoads.set(loadKey, previous) : inFlightLoads.delete(loadKey)); + }); + inFlightLoads.set(loadKey, promise), await promise; + }, + attachChannelCommands: (channelCommands, implementedCommandNames) => { + loadCommands = channelCommands, remoteCommandNames.clear(); + for (let name of Object.keys(def.commands)) + implementedCommandNames.has(name) || remoteCommandNames.add(name); + } + }; +} + +// src/shared/open-service/service-error-serialization.ts +var ERROR_MARKER = "__openServiceError__", RESERVED_KEYS = /* @__PURE__ */ new Set([ERROR_MARKER, "name", "message", "stack", "cause"]); +function isPlainObject2(value) { + return typeof value == "object" && value !== null && !Array.isArray(value); +} +function isSerializedError(value) { + return isPlainObject2(value) && value[ERROR_MARKER] === !0; +} +function toTransportSafe(value) { + if (value instanceof Error) + return serializeError(value); + if (Array.isArray(value)) + return value.map((entry) => toTransportSafe(entry)); + if (isPlainObject2(value)) { + let result = {}; + for (let [key, entry] of Object.entries(value)) + result[key] = toTransportSafe(entry); + return result; + } + if (value === null) + return null; + let kind = typeof value; + if (kind === "string" || kind === "number" || kind === "boolean") + return value; + if (kind === "bigint") + return value.toString(); +} +function serializeError(value) { + if (!(value instanceof Error)) + return { [ERROR_MARKER]: !0, name: "Error", message: String(value) }; + let properties = {}; + for (let key of Object.keys(value)) + RESERVED_KEYS.has(key) || (properties[key] = toTransportSafe(value[key])); + return { + [ERROR_MARKER]: !0, + name: value.name, + message: value.message, + ...value.stack !== void 0 ? { stack: value.stack } : {}, + ...value.cause !== void 0 ? { cause: toTransportSafe(value.cause) } : {}, + ...Object.keys(properties).length > 0 ? { properties } : {} + }; +} +function fromTransportSafe(value) { + if (isSerializedError(value)) + return deserializeError(value); + if (Array.isArray(value)) + return value.map((entry) => fromTransportSafe(entry)); + if (isPlainObject2(value)) { + let result = {}; + for (let [key, entry] of Object.entries(value)) + result[key] = fromTransportSafe(entry); + return result; + } + return value; +} +function deserializeError(serialized) { + let error = new Error(serialized.message); + if (error.name = serialized.name, serialized.stack !== void 0 && (error.stack = serialized.stack), "cause" in serialized && (error.cause = fromTransportSafe(serialized.cause)), serialized.properties) + for (let [key, value] of Object.entries(serialized.properties)) + error[key] = fromTransportSafe(value); + return error; +} + +// src/shared/open-service/service-transport.ts +var REMOTE_COMMAND_ACK_TIMEOUT_MS = 300; +function wrapCommandsForBroadcast(commands, context) { + let { serviceId, ownClientId, reconciler, getSnapshot, channel } = context; + return Object.fromEntries( + Object.entries(commands).map(([name, cmd]) => [ + name, + async (input) => { + let result = await cmd(input), stamp = reconciler.advanceLocal(ownClientId); + return channel.emit(SERVICE_PATCHES, { + serviceId, + state: getSnapshot(), + version: stamp.version, + clientId: stamp.clientId + }), result; + } + ]) + ); +} +function connectRuntimeToChannel(context) { + let { serviceId, ownClientId, reconciler, getSnapshot, channel, relay } = context, emitSyncStart = () => { + channel.emit(SERVICE_SYNC_START, { + serviceId, + clientId: ownClientId + }); + }, relayAdopted = () => { + channel.emit(SERVICE_PATCHES, { + serviceId, + state: getSnapshot(), + version: reconciler.stamp.version, + clientId: reconciler.stamp.clientId + }); + }, adoptPeerSnapshot = (snapshot) => { + let adopted = reconciler.tryAdopt( + { version: snapshot.version, clientId: snapshot.clientId }, + snapshot.state + ); + return adopted && relay && relayAdopted(), adopted; + }, onSyncStart = (payload) => { + let request = safeParse(syncStartSchema, payload); + !request.success || request.output.serviceId !== serviceId || request.output.clientId === ownClientId || channel.emit(SERVICE_SYNC_START_REPLY, { + serviceId, + state: getSnapshot(), + version: reconciler.stamp.version, + clientId: reconciler.stamp.clientId + }); + }, onSyncStartReply = (payload) => { + let snapshot = safeParse(stampedSnapshotSchema, payload); + !snapshot.success || snapshot.output.serviceId !== serviceId || adoptPeerSnapshot(snapshot.output); + }, onPatches = (payload) => { + let snapshot = safeParse(stampedSnapshotSchema, payload); + !snapshot.success || snapshot.output.serviceId !== serviceId || adoptPeerSnapshot(snapshot.output); + }; + return channel.on(SERVICE_SYNC_START, onSyncStart), channel.on(SERVICE_SYNC_START_REPLY, onSyncStartReply), channel.on(SERVICE_PATCHES, onPatches), emitSyncStart(), relay && reconciler.stamp.version > 0 && relayAdopted(), () => { + channel.off(SERVICE_SYNC_START, onSyncStart), channel.off(SERVICE_SYNC_START_REPLY, onSyncStartReply), channel.off(SERVICE_PATCHES, onPatches); + }; +} +function connectCommandTransport(context) { + let { serviceId, ownClientId, channel, localCommands, implementedCommandNames, commandNames } = context, pending = /* @__PURE__ */ new Map(), settle = (callId, apply) => { + let entry = pending.get(callId); + entry && (pending.delete(callId), clearTimeout(entry.noAckTimer), apply(entry)); + }, onInvoke = (payload) => { + let parsed = safeParse(commandInvokeSchema, payload); + if (!parsed.success || parsed.output.serviceId !== serviceId || !implementedCommandNames.has(parsed.output.commandName)) + return; + let invoke = parsed.output; + channel.emit(SERVICE_COMMAND_ACK, { + serviceId, + callId: invoke.callId, + clientId: ownClientId + }), Promise.resolve().then(() => localCommands[invoke.commandName](invoke.input)).then( + (result) => { + channel.emit(SERVICE_COMMAND_RESULT, { + serviceId, + callId: invoke.callId, + result, + clientId: ownClientId + }); + }, + (error) => { + channel.emit(SERVICE_COMMAND_ERROR, { + serviceId, + callId: invoke.callId, + error: serializeError(error), + clientId: ownClientId + }); + } + ); + }, onResult = (payload) => { + let result = safeParse(commandResultSchema, payload); + !result.success || result.output.serviceId !== serviceId || settle(result.output.callId, (entry) => entry.resolve(result.output.result)); + }, onError = (payload) => { + let failure = safeParse(commandErrorSchema, payload); + !failure.success || failure.output.serviceId !== serviceId || settle(failure.output.callId, (entry) => entry.reject(deserializeError(failure.output.error))); + }, onAck = (payload) => { + let ack = safeParse(commandAckSchema, payload); + if (!ack.success || ack.output.serviceId !== serviceId) + return; + let entry = pending.get(ack.output.callId); + entry && clearTimeout(entry.noAckTimer); + }; + channel.on(SERVICE_COMMAND_INVOKE, onInvoke), channel.on(SERVICE_COMMAND_RESULT, onResult), channel.on(SERVICE_COMMAND_ERROR, onError), channel.on(SERVICE_COMMAND_ACK, onAck); + let requestRemote = (commandName, input) => { + let callId = generateClientId(); + return new Promise((resolve, reject) => { + let noAckTimer = setTimeout(() => { + settle( + callId, + (entry) => entry.reject( + new OpenServiceRemoteCommandUnhandledError({ + serviceId, + commandName: entry.commandName + }) + ) + ); + }, REMOTE_COMMAND_ACK_TIMEOUT_MS); + pending.set(callId, { commandName, resolve, reject, noAckTimer }), channel.emit(SERVICE_COMMAND_INVOKE, { + serviceId, + commandName, + input, + callId, + clientId: ownClientId + }); + }); + }, commands = {}; + for (let name of commandNames) + commands[name] = implementedCommandNames.has(name) ? localCommands[name] : (input) => requestRemote(name, input); + return { + commands, + disconnect: () => { + channel.off(SERVICE_COMMAND_INVOKE, onInvoke), channel.off(SERVICE_COMMAND_RESULT, onResult), channel.off(SERVICE_COMMAND_ERROR, onError), channel.off(SERVICE_COMMAND_ACK, onAck); + for (let [, entry] of pending) + clearTimeout(entry.noAckTimer), entry.reject(new OpenServiceRemoteCommandDisconnectedError({ serviceId })); + pending.clear(); + } + }; +} +function connectServiceToChannel(context) { + let { + serviceId, + ownClientId, + reconciler, + getSnapshot, + channel, + relay, + commands, + implementedCommandNames, + commandNames, + runtime + } = context, broadcastCommands = wrapCommandsForBroadcast(commands, { + serviceId, + ownClientId, + reconciler, + getSnapshot, + channel + }), commandTransport = connectCommandTransport({ + serviceId, + ownClientId, + channel, + localCommands: broadcastCommands, + implementedCommandNames, + commandNames + }), disconnectSync = connectRuntimeToChannel({ + serviceId, + ownClientId, + reconciler, + getSnapshot, + channel, + relay + }); + return runtime.attachChannelCommands(commandTransport.commands, implementedCommandNames), { + commands: commandTransport.commands, + disconnect: () => { + disconnectSync(), commandTransport.disconnect(); + } + }; +} + +// src/shared/open-service/service-registry.ts +var REGISTRY_SYMBOL = /* @__PURE__ */ Symbol.for("storybook.open-service.registry"); +function getRegistry() { + let registryGlobal = globalThis; + return registryGlobal[REGISTRY_SYMBOL] ??= /* @__PURE__ */ new Map(), registryGlobal[REGISTRY_SYMBOL]; +} +function describeDefinition(definition) { + return { + id: definition.id, + description: definition.description, + queries: Object.fromEntries( + Object.entries(definition.queries).filter(([, query]) => !query.internal).map(([name, query]) => [ + name, + { + name, + description: query.description, + input: query.input, + output: query.output, + ...query.staticPath ? { staticPath: !0 } : {} + } + ]) + ), + commands: Object.fromEntries( + Object.entries(definition.commands).filter(([, command]) => !command.internal).map(([name, command]) => [ + name, + { + name, + description: command.description, + input: command.input, + output: command.output + } + ]) + ) + }; +} +function summarizeDescriptor(descriptor) { + return { + id: descriptor.id, + description: descriptor.description, + queryNames: Object.keys(descriptor.queries), + commandNames: Object.keys(descriptor.commands) + }; +} +function applyRegistration(definition, registration) { + return registration ? { + ...definition, + queries: Object.fromEntries( + Object.entries(definition.queries).map(([name, query]) => { + let override = registration.queries?.[name]; + return [ + name, + override && "staticInputs" in override ? { ...query, staticInputs: override.staticInputs } : query + ]; + }) + ), + commands: Object.fromEntries( + Object.entries(definition.commands).map(([name, command]) => { + let override = registration.commands?.[name]; + return [ + name, + override && "handler" in override ? { ...command, handler: override.handler } : command + ]; + }) + ) + } : definition; +} +var serviceRegistryApi = { + listServices, + describeService, + getService +}; +function registerService(definition, registration, { relay = !1, staticLoader } = {}) { + let registry = getRegistry(), existingEntry = registry.get(definition.id); + if (existingEntry) + return existingEntry.instance; + let ownClientId = generateClientId(), resolvedDefinition = applyRegistration(definition, registration), runtime = createServiceRuntime( + resolvedDefinition, + { registryApi: serviceRegistryApi, staticLoader }, + structuredClone(resolvedDefinition.initialState) + ), reconciler = createSnapshotReconciler({ + setState: (mutate) => runtime.commandSelf.setState((state) => mutate(state)), + initialStamp: { version: 0, clientId: ownClientId } + }), getSnapshot = () => runtime.getStateSnapshot(), descriptor = describeDefinition(resolvedDefinition), channel = getChannel(); + if (!channel) + throw new OpenServiceMissingChannelError({ serviceId: definition.id }); + let implementedCommandNames = new Set( + Object.entries(resolvedDefinition.commands).filter(([, command]) => typeof command.handler == "function").map(([name]) => name) + ), { commands, disconnect } = connectServiceToChannel({ + serviceId: definition.id, + ownClientId, + reconciler, + getSnapshot, + channel, + relay, + commands: runtime.commands, + implementedCommandNames, + commandNames: Object.keys(resolvedDefinition.commands), + runtime + }), instance = { + queries: runtime.queries, + commands, + ...serviceRegistryApi + }; + return registry.set(definition.id, { + definition: resolvedDefinition, + instance, + descriptor, + summary: summarizeDescriptor(descriptor), + disconnect + }), instance; +} +async function listServices() { + return Array.from(getRegistry().values()).filter(({ definition }) => !definition.internal).map(({ summary }) => summary); +} +async function describeService(serviceId) { + let entry = getRegistry().get(serviceId); + if (!entry) + throw new OpenServiceMissingServiceError({ serviceId }); + return entry.descriptor; +} +function getService(serviceId) { + let entry = getRegistry().get(serviceId); + if (!entry) + throw new OpenServiceMissingServiceError({ serviceId }); + return entry.instance; +} + +// src/shared/open-service/static-fetch.ts +var STATIC_SERVICES_PREFIX = "/services/"; +function shouldUseBrowserStaticLoader() { + return globalThis.CONFIG_TYPE === "PRODUCTION"; +} +function createBrowserStaticLoader() { + if (shouldUseBrowserStaticLoader()) + return async (logicalPath, context) => { + let url = `${STATIC_SERVICES_PREFIX}${logicalPath}`, res; + try { + res = await fetch(url); + } catch (cause) { + throw new OpenServiceStaticSnapshotLoadError({ ...context, logicalPath, url, cause }); + } + if (!res.ok) { + let cause = { status: res.status, statusText: res.statusText }; + throw new OpenServiceStaticSnapshotLoadError({ + ...context, + logicalPath, + url, + cause, + status: res.status, + statusText: res.statusText + }); + } + let snapshot; + try { + snapshot = await res.json(); + } catch (cause) { + throw new OpenServiceStaticSnapshotLoadError({ ...context, logicalPath, url, cause }); + } + if (snapshot && typeof snapshot == "object" && !Array.isArray(snapshot)) + return snapshot; + throw new OpenServiceStaticSnapshotInvalidError({ + ...context, + logicalPath, + url, + received: snapshot + }); + }; +} + +export { + array, + custom, + looseObject, + object, + optional, + record, + string, + undefined_, + void_, + registerService, + getService, + createBrowserStaticLoader +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-X5VVFFFE.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-X5VVFFFE.js new file mode 100644 index 0000000000000000000000000000000000000000..c5d1ab6e032842e7cf513d408a861d4e00c0e0dc --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-X5VVFFFE.js @@ -0,0 +1,698 @@ +import { + PARAM_KEY, + RESPONSIVE_VIEWPORT_VALUE +} from "./chunk-NQ3W4AUJ.js"; +import { + __commonJS +} from "./chunk-IMSF75WX.js"; + +// ../../node_modules/entities/lib/maps/entities.json +var require_entities = __commonJS({ + "../../node_modules/entities/lib/maps/entities.json"(exports, module) { + module.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}", Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\u2A3F", amp: "&", AMP: "&", andand: "\u2A55", And: "\u2A53", and: "\u2227", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220", ange: "\u29A4", angle: "\u2220", angmsdaa: "\u29A8", angmsdab: "\u29A9", angmsdac: "\u29AA", angmsdad: "\u29AB", angmsdae: "\u29AC", angmsdaf: "\u29AD", angmsdag: "\u29AE", angmsdah: "\u29AF", angmsd: "\u2221", angrt: "\u221F", angrtvb: "\u22BE", angrtvbd: "\u299D", angsph: "\u2222", angst: "\xC5", angzarr: "\u237C", Aogon: "\u0104", aogon: "\u0105", Aopf: "\u{1D538}", aopf: "\u{1D552}", apacir: "\u2A6F", ap: "\u2248", apE: "\u2A70", ape: "\u224A", apid: "\u224B", apos: "'", ApplyFunction: "\u2061", approx: "\u2248", approxeq: "\u224A", Aring: "\xC5", aring: "\xE5", Ascr: "\u{1D49C}", ascr: "\u{1D4B6}", Assign: "\u2254", ast: "*", asymp: "\u2248", asympeq: "\u224D", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", awconint: "\u2233", awint: "\u2A11", backcong: "\u224C", backepsilon: "\u03F6", backprime: "\u2035", backsim: "\u223D", backsimeq: "\u22CD", Backslash: "\u2216", Barv: "\u2AE7", barvee: "\u22BD", barwed: "\u2305", Barwed: "\u2306", barwedge: "\u2305", bbrk: "\u23B5", bbrktbrk: "\u23B6", bcong: "\u224C", Bcy: "\u0411", bcy: "\u0431", bdquo: "\u201E", becaus: "\u2235", because: "\u2235", Because: "\u2235", bemptyv: "\u29B0", bepsi: "\u03F6", bernou: "\u212C", Bernoullis: "\u212C", Beta: "\u0392", beta: "\u03B2", beth: "\u2136", between: "\u226C", Bfr: "\u{1D505}", bfr: "\u{1D51F}", bigcap: "\u22C2", bigcirc: "\u25EF", bigcup: "\u22C3", bigodot: "\u2A00", bigoplus: "\u2A01", bigotimes: "\u2A02", bigsqcup: "\u2A06", bigstar: "\u2605", bigtriangledown: "\u25BD", bigtriangleup: "\u25B3", biguplus: "\u2A04", bigvee: "\u22C1", bigwedge: "\u22C0", bkarow: "\u290D", blacklozenge: "\u29EB", blacksquare: "\u25AA", blacktriangle: "\u25B4", blacktriangledown: "\u25BE", blacktriangleleft: "\u25C2", blacktriangleright: "\u25B8", blank: "\u2423", blk12: "\u2592", blk14: "\u2591", blk34: "\u2593", block: "\u2588", bne: "=\u20E5", bnequiv: "\u2261\u20E5", bNot: "\u2AED", bnot: "\u2310", Bopf: "\u{1D539}", bopf: "\u{1D553}", bot: "\u22A5", bottom: "\u22A5", bowtie: "\u22C8", boxbox: "\u29C9", boxdl: "\u2510", boxdL: "\u2555", boxDl: "\u2556", boxDL: "\u2557", boxdr: "\u250C", boxdR: "\u2552", boxDr: "\u2553", boxDR: "\u2554", boxh: "\u2500", boxH: "\u2550", boxhd: "\u252C", boxHd: "\u2564", boxhD: "\u2565", boxHD: "\u2566", boxhu: "\u2534", boxHu: "\u2567", boxhU: "\u2568", boxHU: "\u2569", boxminus: "\u229F", boxplus: "\u229E", boxtimes: "\u22A0", boxul: "\u2518", boxuL: "\u255B", boxUl: "\u255C", boxUL: "\u255D", boxur: "\u2514", boxuR: "\u2558", boxUr: "\u2559", boxUR: "\u255A", boxv: "\u2502", boxV: "\u2551", boxvh: "\u253C", boxvH: "\u256A", boxVh: "\u256B", boxVH: "\u256C", boxvl: "\u2524", boxvL: "\u2561", boxVl: "\u2562", boxVL: "\u2563", boxvr: "\u251C", boxvR: "\u255E", boxVr: "\u255F", boxVR: "\u2560", bprime: "\u2035", breve: "\u02D8", Breve: "\u02D8", brvbar: "\xA6", bscr: "\u{1D4B7}", Bscr: "\u212C", bsemi: "\u204F", bsim: "\u223D", bsime: "\u22CD", bsolb: "\u29C5", bsol: "\\", bsolhsub: "\u27C8", bull: "\u2022", bullet: "\u2022", bump: "\u224E", bumpE: "\u2AAE", bumpe: "\u224F", Bumpeq: "\u224E", bumpeq: "\u224F", Cacute: "\u0106", cacute: "\u0107", capand: "\u2A44", capbrcup: "\u2A49", capcap: "\u2A4B", cap: "\u2229", Cap: "\u22D2", capcup: "\u2A47", capdot: "\u2A40", CapitalDifferentialD: "\u2145", caps: "\u2229\uFE00", caret: "\u2041", caron: "\u02C7", Cayleys: "\u212D", ccaps: "\u2A4D", Ccaron: "\u010C", ccaron: "\u010D", Ccedil: "\xC7", ccedil: "\xE7", Ccirc: "\u0108", ccirc: "\u0109", Cconint: "\u2230", ccups: "\u2A4C", ccupssm: "\u2A50", Cdot: "\u010A", cdot: "\u010B", cedil: "\xB8", Cedilla: "\xB8", cemptyv: "\u29B2", cent: "\xA2", centerdot: "\xB7", CenterDot: "\xB7", cfr: "\u{1D520}", Cfr: "\u212D", CHcy: "\u0427", chcy: "\u0447", check: "\u2713", checkmark: "\u2713", Chi: "\u03A7", chi: "\u03C7", circ: "\u02C6", circeq: "\u2257", circlearrowleft: "\u21BA", circlearrowright: "\u21BB", circledast: "\u229B", circledcirc: "\u229A", circleddash: "\u229D", CircleDot: "\u2299", circledR: "\xAE", circledS: "\u24C8", CircleMinus: "\u2296", CirclePlus: "\u2295", CircleTimes: "\u2297", cir: "\u25CB", cirE: "\u29C3", cire: "\u2257", cirfnint: "\u2A10", cirmid: "\u2AEF", cirscir: "\u29C2", ClockwiseContourIntegral: "\u2232", CloseCurlyDoubleQuote: "\u201D", CloseCurlyQuote: "\u2019", clubs: "\u2663", clubsuit: "\u2663", colon: ":", Colon: "\u2237", Colone: "\u2A74", colone: "\u2254", coloneq: "\u2254", comma: ",", commat: "@", comp: "\u2201", compfn: "\u2218", complement: "\u2201", complexes: "\u2102", cong: "\u2245", congdot: "\u2A6D", Congruent: "\u2261", conint: "\u222E", Conint: "\u222F", ContourIntegral: "\u222E", copf: "\u{1D554}", Copf: "\u2102", coprod: "\u2210", Coproduct: "\u2210", copy: "\xA9", COPY: "\xA9", copysr: "\u2117", CounterClockwiseContourIntegral: "\u2233", crarr: "\u21B5", cross: "\u2717", Cross: "\u2A2F", Cscr: "\u{1D49E}", cscr: "\u{1D4B8}", csub: "\u2ACF", csube: "\u2AD1", csup: "\u2AD0", csupe: "\u2AD2", ctdot: "\u22EF", cudarrl: "\u2938", cudarrr: "\u2935", cuepr: "\u22DE", cuesc: "\u22DF", cularr: "\u21B6", cularrp: "\u293D", cupbrcap: "\u2A48", cupcap: "\u2A46", CupCap: "\u224D", cup: "\u222A", Cup: "\u22D3", cupcup: "\u2A4A", cupdot: "\u228D", cupor: "\u2A45", cups: "\u222A\uFE00", curarr: "\u21B7", curarrm: "\u293C", curlyeqprec: "\u22DE", curlyeqsucc: "\u22DF", curlyvee: "\u22CE", curlywedge: "\u22CF", curren: "\xA4", curvearrowleft: "\u21B6", curvearrowright: "\u21B7", cuvee: "\u22CE", cuwed: "\u22CF", cwconint: "\u2232", cwint: "\u2231", cylcty: "\u232D", dagger: "\u2020", Dagger: "\u2021", daleth: "\u2138", darr: "\u2193", Darr: "\u21A1", dArr: "\u21D3", dash: "\u2010", Dashv: "\u2AE4", dashv: "\u22A3", dbkarow: "\u290F", dblac: "\u02DD", Dcaron: "\u010E", dcaron: "\u010F", Dcy: "\u0414", dcy: "\u0434", ddagger: "\u2021", ddarr: "\u21CA", DD: "\u2145", dd: "\u2146", DDotrahd: "\u2911", ddotseq: "\u2A77", deg: "\xB0", Del: "\u2207", Delta: "\u0394", delta: "\u03B4", demptyv: "\u29B1", dfisht: "\u297F", Dfr: "\u{1D507}", dfr: "\u{1D521}", dHar: "\u2965", dharl: "\u21C3", dharr: "\u21C2", DiacriticalAcute: "\xB4", DiacriticalDot: "\u02D9", DiacriticalDoubleAcute: "\u02DD", DiacriticalGrave: "`", DiacriticalTilde: "\u02DC", diam: "\u22C4", diamond: "\u22C4", Diamond: "\u22C4", diamondsuit: "\u2666", diams: "\u2666", die: "\xA8", DifferentialD: "\u2146", digamma: "\u03DD", disin: "\u22F2", div: "\xF7", divide: "\xF7", divideontimes: "\u22C7", divonx: "\u22C7", DJcy: "\u0402", djcy: "\u0452", dlcorn: "\u231E", dlcrop: "\u230D", dollar: "$", Dopf: "\u{1D53B}", dopf: "\u{1D555}", Dot: "\xA8", dot: "\u02D9", DotDot: "\u20DC", doteq: "\u2250", doteqdot: "\u2251", DotEqual: "\u2250", dotminus: "\u2238", dotplus: "\u2214", dotsquare: "\u22A1", doublebarwedge: "\u2306", DoubleContourIntegral: "\u222F", DoubleDot: "\xA8", DoubleDownArrow: "\u21D3", DoubleLeftArrow: "\u21D0", DoubleLeftRightArrow: "\u21D4", DoubleLeftTee: "\u2AE4", DoubleLongLeftArrow: "\u27F8", DoubleLongLeftRightArrow: "\u27FA", DoubleLongRightArrow: "\u27F9", DoubleRightArrow: "\u21D2", DoubleRightTee: "\u22A8", DoubleUpArrow: "\u21D1", DoubleUpDownArrow: "\u21D5", DoubleVerticalBar: "\u2225", DownArrowBar: "\u2913", downarrow: "\u2193", DownArrow: "\u2193", Downarrow: "\u21D3", DownArrowUpArrow: "\u21F5", DownBreve: "\u0311", downdownarrows: "\u21CA", downharpoonleft: "\u21C3", downharpoonright: "\u21C2", DownLeftRightVector: "\u2950", DownLeftTeeVector: "\u295E", DownLeftVectorBar: "\u2956", DownLeftVector: "\u21BD", DownRightTeeVector: "\u295F", DownRightVectorBar: "\u2957", DownRightVector: "\u21C1", DownTeeArrow: "\u21A7", DownTee: "\u22A4", drbkarow: "\u2910", drcorn: "\u231F", drcrop: "\u230C", Dscr: "\u{1D49F}", dscr: "\u{1D4B9}", DScy: "\u0405", dscy: "\u0455", dsol: "\u29F6", Dstrok: "\u0110", dstrok: "\u0111", dtdot: "\u22F1", dtri: "\u25BF", dtrif: "\u25BE", duarr: "\u21F5", duhar: "\u296F", dwangle: "\u29A6", DZcy: "\u040F", dzcy: "\u045F", dzigrarr: "\u27FF", Eacute: "\xC9", eacute: "\xE9", easter: "\u2A6E", Ecaron: "\u011A", ecaron: "\u011B", Ecirc: "\xCA", ecirc: "\xEA", ecir: "\u2256", ecolon: "\u2255", Ecy: "\u042D", ecy: "\u044D", eDDot: "\u2A77", Edot: "\u0116", edot: "\u0117", eDot: "\u2251", ee: "\u2147", efDot: "\u2252", Efr: "\u{1D508}", efr: "\u{1D522}", eg: "\u2A9A", Egrave: "\xC8", egrave: "\xE8", egs: "\u2A96", egsdot: "\u2A98", el: "\u2A99", Element: "\u2208", elinters: "\u23E7", ell: "\u2113", els: "\u2A95", elsdot: "\u2A97", Emacr: "\u0112", emacr: "\u0113", empty: "\u2205", emptyset: "\u2205", EmptySmallSquare: "\u25FB", emptyv: "\u2205", EmptyVerySmallSquare: "\u25AB", emsp13: "\u2004", emsp14: "\u2005", emsp: "\u2003", ENG: "\u014A", eng: "\u014B", ensp: "\u2002", Eogon: "\u0118", eogon: "\u0119", Eopf: "\u{1D53C}", eopf: "\u{1D556}", epar: "\u22D5", eparsl: "\u29E3", eplus: "\u2A71", epsi: "\u03B5", Epsilon: "\u0395", epsilon: "\u03B5", epsiv: "\u03F5", eqcirc: "\u2256", eqcolon: "\u2255", eqsim: "\u2242", eqslantgtr: "\u2A96", eqslantless: "\u2A95", Equal: "\u2A75", equals: "=", EqualTilde: "\u2242", equest: "\u225F", Equilibrium: "\u21CC", equiv: "\u2261", equivDD: "\u2A78", eqvparsl: "\u29E5", erarr: "\u2971", erDot: "\u2253", escr: "\u212F", Escr: "\u2130", esdot: "\u2250", Esim: "\u2A73", esim: "\u2242", Eta: "\u0397", eta: "\u03B7", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", euro: "\u20AC", excl: "!", exist: "\u2203", Exists: "\u2203", expectation: "\u2130", exponentiale: "\u2147", ExponentialE: "\u2147", fallingdotseq: "\u2252", Fcy: "\u0424", fcy: "\u0444", female: "\u2640", ffilig: "\uFB03", fflig: "\uFB00", ffllig: "\uFB04", Ffr: "\u{1D509}", ffr: "\u{1D523}", filig: "\uFB01", FilledSmallSquare: "\u25FC", FilledVerySmallSquare: "\u25AA", fjlig: "fj", flat: "\u266D", fllig: "\uFB02", fltns: "\u25B1", fnof: "\u0192", Fopf: "\u{1D53D}", fopf: "\u{1D557}", forall: "\u2200", ForAll: "\u2200", fork: "\u22D4", forkv: "\u2AD9", Fouriertrf: "\u2131", fpartint: "\u2A0D", frac12: "\xBD", frac13: "\u2153", frac14: "\xBC", frac15: "\u2155", frac16: "\u2159", frac18: "\u215B", frac23: "\u2154", frac25: "\u2156", frac34: "\xBE", frac35: "\u2157", frac38: "\u215C", frac45: "\u2158", frac56: "\u215A", frac58: "\u215D", frac78: "\u215E", frasl: "\u2044", frown: "\u2322", fscr: "\u{1D4BB}", Fscr: "\u2131", gacute: "\u01F5", Gamma: "\u0393", gamma: "\u03B3", Gammad: "\u03DC", gammad: "\u03DD", gap: "\u2A86", Gbreve: "\u011E", gbreve: "\u011F", Gcedil: "\u0122", Gcirc: "\u011C", gcirc: "\u011D", Gcy: "\u0413", gcy: "\u0433", Gdot: "\u0120", gdot: "\u0121", ge: "\u2265", gE: "\u2267", gEl: "\u2A8C", gel: "\u22DB", geq: "\u2265", geqq: "\u2267", geqslant: "\u2A7E", gescc: "\u2AA9", ges: "\u2A7E", gesdot: "\u2A80", gesdoto: "\u2A82", gesdotol: "\u2A84", gesl: "\u22DB\uFE00", gesles: "\u2A94", Gfr: "\u{1D50A}", gfr: "\u{1D524}", gg: "\u226B", Gg: "\u22D9", ggg: "\u22D9", gimel: "\u2137", GJcy: "\u0403", gjcy: "\u0453", gla: "\u2AA5", gl: "\u2277", glE: "\u2A92", glj: "\u2AA4", gnap: "\u2A8A", gnapprox: "\u2A8A", gne: "\u2A88", gnE: "\u2269", gneq: "\u2A88", gneqq: "\u2269", gnsim: "\u22E7", Gopf: "\u{1D53E}", gopf: "\u{1D558}", grave: "`", GreaterEqual: "\u2265", GreaterEqualLess: "\u22DB", GreaterFullEqual: "\u2267", GreaterGreater: "\u2AA2", GreaterLess: "\u2277", GreaterSlantEqual: "\u2A7E", GreaterTilde: "\u2273", Gscr: "\u{1D4A2}", gscr: "\u210A", gsim: "\u2273", gsime: "\u2A8E", gsiml: "\u2A90", gtcc: "\u2AA7", gtcir: "\u2A7A", gt: ">", GT: ">", Gt: "\u226B", gtdot: "\u22D7", gtlPar: "\u2995", gtquest: "\u2A7C", gtrapprox: "\u2A86", gtrarr: "\u2978", gtrdot: "\u22D7", gtreqless: "\u22DB", gtreqqless: "\u2A8C", gtrless: "\u2277", gtrsim: "\u2273", gvertneqq: "\u2269\uFE00", gvnE: "\u2269\uFE00", Hacek: "\u02C7", hairsp: "\u200A", half: "\xBD", hamilt: "\u210B", HARDcy: "\u042A", hardcy: "\u044A", harrcir: "\u2948", harr: "\u2194", hArr: "\u21D4", harrw: "\u21AD", Hat: "^", hbar: "\u210F", Hcirc: "\u0124", hcirc: "\u0125", hearts: "\u2665", heartsuit: "\u2665", hellip: "\u2026", hercon: "\u22B9", hfr: "\u{1D525}", Hfr: "\u210C", HilbertSpace: "\u210B", hksearow: "\u2925", hkswarow: "\u2926", hoarr: "\u21FF", homtht: "\u223B", hookleftarrow: "\u21A9", hookrightarrow: "\u21AA", hopf: "\u{1D559}", Hopf: "\u210D", horbar: "\u2015", HorizontalLine: "\u2500", hscr: "\u{1D4BD}", Hscr: "\u210B", hslash: "\u210F", Hstrok: "\u0126", hstrok: "\u0127", HumpDownHump: "\u224E", HumpEqual: "\u224F", hybull: "\u2043", hyphen: "\u2010", Iacute: "\xCD", iacute: "\xED", ic: "\u2063", Icirc: "\xCE", icirc: "\xEE", Icy: "\u0418", icy: "\u0438", Idot: "\u0130", IEcy: "\u0415", iecy: "\u0435", iexcl: "\xA1", iff: "\u21D4", ifr: "\u{1D526}", Ifr: "\u2111", Igrave: "\xCC", igrave: "\xEC", ii: "\u2148", iiiint: "\u2A0C", iiint: "\u222D", iinfin: "\u29DC", iiota: "\u2129", IJlig: "\u0132", ijlig: "\u0133", Imacr: "\u012A", imacr: "\u012B", image: "\u2111", ImaginaryI: "\u2148", imagline: "\u2110", imagpart: "\u2111", imath: "\u0131", Im: "\u2111", imof: "\u22B7", imped: "\u01B5", Implies: "\u21D2", incare: "\u2105", in: "\u2208", infin: "\u221E", infintie: "\u29DD", inodot: "\u0131", intcal: "\u22BA", int: "\u222B", Int: "\u222C", integers: "\u2124", Integral: "\u222B", intercal: "\u22BA", Intersection: "\u22C2", intlarhk: "\u2A17", intprod: "\u2A3C", InvisibleComma: "\u2063", InvisibleTimes: "\u2062", IOcy: "\u0401", iocy: "\u0451", Iogon: "\u012E", iogon: "\u012F", Iopf: "\u{1D540}", iopf: "\u{1D55A}", Iota: "\u0399", iota: "\u03B9", iprod: "\u2A3C", iquest: "\xBF", iscr: "\u{1D4BE}", Iscr: "\u2110", isin: "\u2208", isindot: "\u22F5", isinE: "\u22F9", isins: "\u22F4", isinsv: "\u22F3", isinv: "\u2208", it: "\u2062", Itilde: "\u0128", itilde: "\u0129", Iukcy: "\u0406", iukcy: "\u0456", Iuml: "\xCF", iuml: "\xEF", Jcirc: "\u0134", jcirc: "\u0135", Jcy: "\u0419", jcy: "\u0439", Jfr: "\u{1D50D}", jfr: "\u{1D527}", jmath: "\u0237", Jopf: "\u{1D541}", jopf: "\u{1D55B}", Jscr: "\u{1D4A5}", jscr: "\u{1D4BF}", Jsercy: "\u0408", jsercy: "\u0458", Jukcy: "\u0404", jukcy: "\u0454", Kappa: "\u039A", kappa: "\u03BA", kappav: "\u03F0", Kcedil: "\u0136", kcedil: "\u0137", Kcy: "\u041A", kcy: "\u043A", Kfr: "\u{1D50E}", kfr: "\u{1D528}", kgreen: "\u0138", KHcy: "\u0425", khcy: "\u0445", KJcy: "\u040C", kjcy: "\u045C", Kopf: "\u{1D542}", kopf: "\u{1D55C}", Kscr: "\u{1D4A6}", kscr: "\u{1D4C0}", lAarr: "\u21DA", Lacute: "\u0139", lacute: "\u013A", laemptyv: "\u29B4", lagran: "\u2112", Lambda: "\u039B", lambda: "\u03BB", lang: "\u27E8", Lang: "\u27EA", langd: "\u2991", langle: "\u27E8", lap: "\u2A85", Laplacetrf: "\u2112", laquo: "\xAB", larrb: "\u21E4", larrbfs: "\u291F", larr: "\u2190", Larr: "\u219E", lArr: "\u21D0", larrfs: "\u291D", larrhk: "\u21A9", larrlp: "\u21AB", larrpl: "\u2939", larrsim: "\u2973", larrtl: "\u21A2", latail: "\u2919", lAtail: "\u291B", lat: "\u2AAB", late: "\u2AAD", lates: "\u2AAD\uFE00", lbarr: "\u290C", lBarr: "\u290E", lbbrk: "\u2772", lbrace: "{", lbrack: "[", lbrke: "\u298B", lbrksld: "\u298F", lbrkslu: "\u298D", Lcaron: "\u013D", lcaron: "\u013E", Lcedil: "\u013B", lcedil: "\u013C", lceil: "\u2308", lcub: "{", Lcy: "\u041B", lcy: "\u043B", ldca: "\u2936", ldquo: "\u201C", ldquor: "\u201E", ldrdhar: "\u2967", ldrushar: "\u294B", ldsh: "\u21B2", le: "\u2264", lE: "\u2266", LeftAngleBracket: "\u27E8", LeftArrowBar: "\u21E4", leftarrow: "\u2190", LeftArrow: "\u2190", Leftarrow: "\u21D0", LeftArrowRightArrow: "\u21C6", leftarrowtail: "\u21A2", LeftCeiling: "\u2308", LeftDoubleBracket: "\u27E6", LeftDownTeeVector: "\u2961", LeftDownVectorBar: "\u2959", LeftDownVector: "\u21C3", LeftFloor: "\u230A", leftharpoondown: "\u21BD", leftharpoonup: "\u21BC", leftleftarrows: "\u21C7", leftrightarrow: "\u2194", LeftRightArrow: "\u2194", Leftrightarrow: "\u21D4", leftrightarrows: "\u21C6", leftrightharpoons: "\u21CB", leftrightsquigarrow: "\u21AD", LeftRightVector: "\u294E", LeftTeeArrow: "\u21A4", LeftTee: "\u22A3", LeftTeeVector: "\u295A", leftthreetimes: "\u22CB", LeftTriangleBar: "\u29CF", LeftTriangle: "\u22B2", LeftTriangleEqual: "\u22B4", LeftUpDownVector: "\u2951", LeftUpTeeVector: "\u2960", LeftUpVectorBar: "\u2958", LeftUpVector: "\u21BF", LeftVectorBar: "\u2952", LeftVector: "\u21BC", lEg: "\u2A8B", leg: "\u22DA", leq: "\u2264", leqq: "\u2266", leqslant: "\u2A7D", lescc: "\u2AA8", les: "\u2A7D", lesdot: "\u2A7F", lesdoto: "\u2A81", lesdotor: "\u2A83", lesg: "\u22DA\uFE00", lesges: "\u2A93", lessapprox: "\u2A85", lessdot: "\u22D6", lesseqgtr: "\u22DA", lesseqqgtr: "\u2A8B", LessEqualGreater: "\u22DA", LessFullEqual: "\u2266", LessGreater: "\u2276", lessgtr: "\u2276", LessLess: "\u2AA1", lesssim: "\u2272", LessSlantEqual: "\u2A7D", LessTilde: "\u2272", lfisht: "\u297C", lfloor: "\u230A", Lfr: "\u{1D50F}", lfr: "\u{1D529}", lg: "\u2276", lgE: "\u2A91", lHar: "\u2962", lhard: "\u21BD", lharu: "\u21BC", lharul: "\u296A", lhblk: "\u2584", LJcy: "\u0409", ljcy: "\u0459", llarr: "\u21C7", ll: "\u226A", Ll: "\u22D8", llcorner: "\u231E", Lleftarrow: "\u21DA", llhard: "\u296B", lltri: "\u25FA", Lmidot: "\u013F", lmidot: "\u0140", lmoustache: "\u23B0", lmoust: "\u23B0", lnap: "\u2A89", lnapprox: "\u2A89", lne: "\u2A87", lnE: "\u2268", lneq: "\u2A87", lneqq: "\u2268", lnsim: "\u22E6", loang: "\u27EC", loarr: "\u21FD", lobrk: "\u27E6", longleftarrow: "\u27F5", LongLeftArrow: "\u27F5", Longleftarrow: "\u27F8", longleftrightarrow: "\u27F7", LongLeftRightArrow: "\u27F7", Longleftrightarrow: "\u27FA", longmapsto: "\u27FC", longrightarrow: "\u27F6", LongRightArrow: "\u27F6", Longrightarrow: "\u27F9", looparrowleft: "\u21AB", looparrowright: "\u21AC", lopar: "\u2985", Lopf: "\u{1D543}", lopf: "\u{1D55D}", loplus: "\u2A2D", lotimes: "\u2A34", lowast: "\u2217", lowbar: "_", LowerLeftArrow: "\u2199", LowerRightArrow: "\u2198", loz: "\u25CA", lozenge: "\u25CA", lozf: "\u29EB", lpar: "(", lparlt: "\u2993", lrarr: "\u21C6", lrcorner: "\u231F", lrhar: "\u21CB", lrhard: "\u296D", lrm: "\u200E", lrtri: "\u22BF", lsaquo: "\u2039", lscr: "\u{1D4C1}", Lscr: "\u2112", lsh: "\u21B0", Lsh: "\u21B0", lsim: "\u2272", lsime: "\u2A8D", lsimg: "\u2A8F", lsqb: "[", lsquo: "\u2018", lsquor: "\u201A", Lstrok: "\u0141", lstrok: "\u0142", ltcc: "\u2AA6", ltcir: "\u2A79", lt: "<", LT: "<", Lt: "\u226A", ltdot: "\u22D6", lthree: "\u22CB", ltimes: "\u22C9", ltlarr: "\u2976", ltquest: "\u2A7B", ltri: "\u25C3", ltrie: "\u22B4", ltrif: "\u25C2", ltrPar: "\u2996", lurdshar: "\u294A", luruhar: "\u2966", lvertneqq: "\u2268\uFE00", lvnE: "\u2268\uFE00", macr: "\xAF", male: "\u2642", malt: "\u2720", maltese: "\u2720", Map: "\u2905", map: "\u21A6", mapsto: "\u21A6", mapstodown: "\u21A7", mapstoleft: "\u21A4", mapstoup: "\u21A5", marker: "\u25AE", mcomma: "\u2A29", Mcy: "\u041C", mcy: "\u043C", mdash: "\u2014", mDDot: "\u223A", measuredangle: "\u2221", MediumSpace: "\u205F", Mellintrf: "\u2133", Mfr: "\u{1D510}", mfr: "\u{1D52A}", mho: "\u2127", micro: "\xB5", midast: "*", midcir: "\u2AF0", mid: "\u2223", middot: "\xB7", minusb: "\u229F", minus: "\u2212", minusd: "\u2238", minusdu: "\u2A2A", MinusPlus: "\u2213", mlcp: "\u2ADB", mldr: "\u2026", mnplus: "\u2213", models: "\u22A7", Mopf: "\u{1D544}", mopf: "\u{1D55E}", mp: "\u2213", mscr: "\u{1D4C2}", Mscr: "\u2133", mstpos: "\u223E", Mu: "\u039C", mu: "\u03BC", multimap: "\u22B8", mumap: "\u22B8", nabla: "\u2207", Nacute: "\u0143", nacute: "\u0144", nang: "\u2220\u20D2", nap: "\u2249", napE: "\u2A70\u0338", napid: "\u224B\u0338", napos: "\u0149", napprox: "\u2249", natural: "\u266E", naturals: "\u2115", natur: "\u266E", nbsp: "\xA0", nbump: "\u224E\u0338", nbumpe: "\u224F\u0338", ncap: "\u2A43", Ncaron: "\u0147", ncaron: "\u0148", Ncedil: "\u0145", ncedil: "\u0146", ncong: "\u2247", ncongdot: "\u2A6D\u0338", ncup: "\u2A42", Ncy: "\u041D", ncy: "\u043D", ndash: "\u2013", nearhk: "\u2924", nearr: "\u2197", neArr: "\u21D7", nearrow: "\u2197", ne: "\u2260", nedot: "\u2250\u0338", NegativeMediumSpace: "\u200B", NegativeThickSpace: "\u200B", NegativeThinSpace: "\u200B", NegativeVeryThinSpace: "\u200B", nequiv: "\u2262", nesear: "\u2928", nesim: "\u2242\u0338", NestedGreaterGreater: "\u226B", NestedLessLess: "\u226A", NewLine: ` +`, nexist: "\u2204", nexists: "\u2204", Nfr: "\u{1D511}", nfr: "\u{1D52B}", ngE: "\u2267\u0338", nge: "\u2271", ngeq: "\u2271", ngeqq: "\u2267\u0338", ngeqslant: "\u2A7E\u0338", nges: "\u2A7E\u0338", nGg: "\u22D9\u0338", ngsim: "\u2275", nGt: "\u226B\u20D2", ngt: "\u226F", ngtr: "\u226F", nGtv: "\u226B\u0338", nharr: "\u21AE", nhArr: "\u21CE", nhpar: "\u2AF2", ni: "\u220B", nis: "\u22FC", nisd: "\u22FA", niv: "\u220B", NJcy: "\u040A", njcy: "\u045A", nlarr: "\u219A", nlArr: "\u21CD", nldr: "\u2025", nlE: "\u2266\u0338", nle: "\u2270", nleftarrow: "\u219A", nLeftarrow: "\u21CD", nleftrightarrow: "\u21AE", nLeftrightarrow: "\u21CE", nleq: "\u2270", nleqq: "\u2266\u0338", nleqslant: "\u2A7D\u0338", nles: "\u2A7D\u0338", nless: "\u226E", nLl: "\u22D8\u0338", nlsim: "\u2274", nLt: "\u226A\u20D2", nlt: "\u226E", nltri: "\u22EA", nltrie: "\u22EC", nLtv: "\u226A\u0338", nmid: "\u2224", NoBreak: "\u2060", NonBreakingSpace: "\xA0", nopf: "\u{1D55F}", Nopf: "\u2115", Not: "\u2AEC", not: "\xAC", NotCongruent: "\u2262", NotCupCap: "\u226D", NotDoubleVerticalBar: "\u2226", NotElement: "\u2209", NotEqual: "\u2260", NotEqualTilde: "\u2242\u0338", NotExists: "\u2204", NotGreater: "\u226F", NotGreaterEqual: "\u2271", NotGreaterFullEqual: "\u2267\u0338", NotGreaterGreater: "\u226B\u0338", NotGreaterLess: "\u2279", NotGreaterSlantEqual: "\u2A7E\u0338", NotGreaterTilde: "\u2275", NotHumpDownHump: "\u224E\u0338", NotHumpEqual: "\u224F\u0338", notin: "\u2209", notindot: "\u22F5\u0338", notinE: "\u22F9\u0338", notinva: "\u2209", notinvb: "\u22F7", notinvc: "\u22F6", NotLeftTriangleBar: "\u29CF\u0338", NotLeftTriangle: "\u22EA", NotLeftTriangleEqual: "\u22EC", NotLess: "\u226E", NotLessEqual: "\u2270", NotLessGreater: "\u2278", NotLessLess: "\u226A\u0338", NotLessSlantEqual: "\u2A7D\u0338", NotLessTilde: "\u2274", NotNestedGreaterGreater: "\u2AA2\u0338", NotNestedLessLess: "\u2AA1\u0338", notni: "\u220C", notniva: "\u220C", notnivb: "\u22FE", notnivc: "\u22FD", NotPrecedes: "\u2280", NotPrecedesEqual: "\u2AAF\u0338", NotPrecedesSlantEqual: "\u22E0", NotReverseElement: "\u220C", NotRightTriangleBar: "\u29D0\u0338", NotRightTriangle: "\u22EB", NotRightTriangleEqual: "\u22ED", NotSquareSubset: "\u228F\u0338", NotSquareSubsetEqual: "\u22E2", NotSquareSuperset: "\u2290\u0338", NotSquareSupersetEqual: "\u22E3", NotSubset: "\u2282\u20D2", NotSubsetEqual: "\u2288", NotSucceeds: "\u2281", NotSucceedsEqual: "\u2AB0\u0338", NotSucceedsSlantEqual: "\u22E1", NotSucceedsTilde: "\u227F\u0338", NotSuperset: "\u2283\u20D2", NotSupersetEqual: "\u2289", NotTilde: "\u2241", NotTildeEqual: "\u2244", NotTildeFullEqual: "\u2247", NotTildeTilde: "\u2249", NotVerticalBar: "\u2224", nparallel: "\u2226", npar: "\u2226", nparsl: "\u2AFD\u20E5", npart: "\u2202\u0338", npolint: "\u2A14", npr: "\u2280", nprcue: "\u22E0", nprec: "\u2280", npreceq: "\u2AAF\u0338", npre: "\u2AAF\u0338", nrarrc: "\u2933\u0338", nrarr: "\u219B", nrArr: "\u21CF", nrarrw: "\u219D\u0338", nrightarrow: "\u219B", nRightarrow: "\u21CF", nrtri: "\u22EB", nrtrie: "\u22ED", nsc: "\u2281", nsccue: "\u22E1", nsce: "\u2AB0\u0338", Nscr: "\u{1D4A9}", nscr: "\u{1D4C3}", nshortmid: "\u2224", nshortparallel: "\u2226", nsim: "\u2241", nsime: "\u2244", nsimeq: "\u2244", nsmid: "\u2224", nspar: "\u2226", nsqsube: "\u22E2", nsqsupe: "\u22E3", nsub: "\u2284", nsubE: "\u2AC5\u0338", nsube: "\u2288", nsubset: "\u2282\u20D2", nsubseteq: "\u2288", nsubseteqq: "\u2AC5\u0338", nsucc: "\u2281", nsucceq: "\u2AB0\u0338", nsup: "\u2285", nsupE: "\u2AC6\u0338", nsupe: "\u2289", nsupset: "\u2283\u20D2", nsupseteq: "\u2289", nsupseteqq: "\u2AC6\u0338", ntgl: "\u2279", Ntilde: "\xD1", ntilde: "\xF1", ntlg: "\u2278", ntriangleleft: "\u22EA", ntrianglelefteq: "\u22EC", ntriangleright: "\u22EB", ntrianglerighteq: "\u22ED", Nu: "\u039D", nu: "\u03BD", num: "#", numero: "\u2116", numsp: "\u2007", nvap: "\u224D\u20D2", nvdash: "\u22AC", nvDash: "\u22AD", nVdash: "\u22AE", nVDash: "\u22AF", nvge: "\u2265\u20D2", nvgt: ">\u20D2", nvHarr: "\u2904", nvinfin: "\u29DE", nvlArr: "\u2902", nvle: "\u2264\u20D2", nvlt: "<\u20D2", nvltrie: "\u22B4\u20D2", nvrArr: "\u2903", nvrtrie: "\u22B5\u20D2", nvsim: "\u223C\u20D2", nwarhk: "\u2923", nwarr: "\u2196", nwArr: "\u21D6", nwarrow: "\u2196", nwnear: "\u2927", Oacute: "\xD3", oacute: "\xF3", oast: "\u229B", Ocirc: "\xD4", ocirc: "\xF4", ocir: "\u229A", Ocy: "\u041E", ocy: "\u043E", odash: "\u229D", Odblac: "\u0150", odblac: "\u0151", odiv: "\u2A38", odot: "\u2299", odsold: "\u29BC", OElig: "\u0152", oelig: "\u0153", ofcir: "\u29BF", Ofr: "\u{1D512}", ofr: "\u{1D52C}", ogon: "\u02DB", Ograve: "\xD2", ograve: "\xF2", ogt: "\u29C1", ohbar: "\u29B5", ohm: "\u03A9", oint: "\u222E", olarr: "\u21BA", olcir: "\u29BE", olcross: "\u29BB", oline: "\u203E", olt: "\u29C0", Omacr: "\u014C", omacr: "\u014D", Omega: "\u03A9", omega: "\u03C9", Omicron: "\u039F", omicron: "\u03BF", omid: "\u29B6", ominus: "\u2296", Oopf: "\u{1D546}", oopf: "\u{1D560}", opar: "\u29B7", OpenCurlyDoubleQuote: "\u201C", OpenCurlyQuote: "\u2018", operp: "\u29B9", oplus: "\u2295", orarr: "\u21BB", Or: "\u2A54", or: "\u2228", ord: "\u2A5D", order: "\u2134", orderof: "\u2134", ordf: "\xAA", ordm: "\xBA", origof: "\u22B6", oror: "\u2A56", orslope: "\u2A57", orv: "\u2A5B", oS: "\u24C8", Oscr: "\u{1D4AA}", oscr: "\u2134", Oslash: "\xD8", oslash: "\xF8", osol: "\u2298", Otilde: "\xD5", otilde: "\xF5", otimesas: "\u2A36", Otimes: "\u2A37", otimes: "\u2297", Ouml: "\xD6", ouml: "\xF6", ovbar: "\u233D", OverBar: "\u203E", OverBrace: "\u23DE", OverBracket: "\u23B4", OverParenthesis: "\u23DC", para: "\xB6", parallel: "\u2225", par: "\u2225", parsim: "\u2AF3", parsl: "\u2AFD", part: "\u2202", PartialD: "\u2202", Pcy: "\u041F", pcy: "\u043F", percnt: "%", period: ".", permil: "\u2030", perp: "\u22A5", pertenk: "\u2031", Pfr: "\u{1D513}", pfr: "\u{1D52D}", Phi: "\u03A6", phi: "\u03C6", phiv: "\u03D5", phmmat: "\u2133", phone: "\u260E", Pi: "\u03A0", pi: "\u03C0", pitchfork: "\u22D4", piv: "\u03D6", planck: "\u210F", planckh: "\u210E", plankv: "\u210F", plusacir: "\u2A23", plusb: "\u229E", pluscir: "\u2A22", plus: "+", plusdo: "\u2214", plusdu: "\u2A25", pluse: "\u2A72", PlusMinus: "\xB1", plusmn: "\xB1", plussim: "\u2A26", plustwo: "\u2A27", pm: "\xB1", Poincareplane: "\u210C", pointint: "\u2A15", popf: "\u{1D561}", Popf: "\u2119", pound: "\xA3", prap: "\u2AB7", Pr: "\u2ABB", pr: "\u227A", prcue: "\u227C", precapprox: "\u2AB7", prec: "\u227A", preccurlyeq: "\u227C", Precedes: "\u227A", PrecedesEqual: "\u2AAF", PrecedesSlantEqual: "\u227C", PrecedesTilde: "\u227E", preceq: "\u2AAF", precnapprox: "\u2AB9", precneqq: "\u2AB5", precnsim: "\u22E8", pre: "\u2AAF", prE: "\u2AB3", precsim: "\u227E", prime: "\u2032", Prime: "\u2033", primes: "\u2119", prnap: "\u2AB9", prnE: "\u2AB5", prnsim: "\u22E8", prod: "\u220F", Product: "\u220F", profalar: "\u232E", profline: "\u2312", profsurf: "\u2313", prop: "\u221D", Proportional: "\u221D", Proportion: "\u2237", propto: "\u221D", prsim: "\u227E", prurel: "\u22B0", Pscr: "\u{1D4AB}", pscr: "\u{1D4C5}", Psi: "\u03A8", psi: "\u03C8", puncsp: "\u2008", Qfr: "\u{1D514}", qfr: "\u{1D52E}", qint: "\u2A0C", qopf: "\u{1D562}", Qopf: "\u211A", qprime: "\u2057", Qscr: "\u{1D4AC}", qscr: "\u{1D4C6}", quaternions: "\u210D", quatint: "\u2A16", quest: "?", questeq: "\u225F", quot: '"', QUOT: '"', rAarr: "\u21DB", race: "\u223D\u0331", Racute: "\u0154", racute: "\u0155", radic: "\u221A", raemptyv: "\u29B3", rang: "\u27E9", Rang: "\u27EB", rangd: "\u2992", range: "\u29A5", rangle: "\u27E9", raquo: "\xBB", rarrap: "\u2975", rarrb: "\u21E5", rarrbfs: "\u2920", rarrc: "\u2933", rarr: "\u2192", Rarr: "\u21A0", rArr: "\u21D2", rarrfs: "\u291E", rarrhk: "\u21AA", rarrlp: "\u21AC", rarrpl: "\u2945", rarrsim: "\u2974", Rarrtl: "\u2916", rarrtl: "\u21A3", rarrw: "\u219D", ratail: "\u291A", rAtail: "\u291C", ratio: "\u2236", rationals: "\u211A", rbarr: "\u290D", rBarr: "\u290F", RBarr: "\u2910", rbbrk: "\u2773", rbrace: "}", rbrack: "]", rbrke: "\u298C", rbrksld: "\u298E", rbrkslu: "\u2990", Rcaron: "\u0158", rcaron: "\u0159", Rcedil: "\u0156", rcedil: "\u0157", rceil: "\u2309", rcub: "}", Rcy: "\u0420", rcy: "\u0440", rdca: "\u2937", rdldhar: "\u2969", rdquo: "\u201D", rdquor: "\u201D", rdsh: "\u21B3", real: "\u211C", realine: "\u211B", realpart: "\u211C", reals: "\u211D", Re: "\u211C", rect: "\u25AD", reg: "\xAE", REG: "\xAE", ReverseElement: "\u220B", ReverseEquilibrium: "\u21CB", ReverseUpEquilibrium: "\u296F", rfisht: "\u297D", rfloor: "\u230B", rfr: "\u{1D52F}", Rfr: "\u211C", rHar: "\u2964", rhard: "\u21C1", rharu: "\u21C0", rharul: "\u296C", Rho: "\u03A1", rho: "\u03C1", rhov: "\u03F1", RightAngleBracket: "\u27E9", RightArrowBar: "\u21E5", rightarrow: "\u2192", RightArrow: "\u2192", Rightarrow: "\u21D2", RightArrowLeftArrow: "\u21C4", rightarrowtail: "\u21A3", RightCeiling: "\u2309", RightDoubleBracket: "\u27E7", RightDownTeeVector: "\u295D", RightDownVectorBar: "\u2955", RightDownVector: "\u21C2", RightFloor: "\u230B", rightharpoondown: "\u21C1", rightharpoonup: "\u21C0", rightleftarrows: "\u21C4", rightleftharpoons: "\u21CC", rightrightarrows: "\u21C9", rightsquigarrow: "\u219D", RightTeeArrow: "\u21A6", RightTee: "\u22A2", RightTeeVector: "\u295B", rightthreetimes: "\u22CC", RightTriangleBar: "\u29D0", RightTriangle: "\u22B3", RightTriangleEqual: "\u22B5", RightUpDownVector: "\u294F", RightUpTeeVector: "\u295C", RightUpVectorBar: "\u2954", RightUpVector: "\u21BE", RightVectorBar: "\u2953", RightVector: "\u21C0", ring: "\u02DA", risingdotseq: "\u2253", rlarr: "\u21C4", rlhar: "\u21CC", rlm: "\u200F", rmoustache: "\u23B1", rmoust: "\u23B1", rnmid: "\u2AEE", roang: "\u27ED", roarr: "\u21FE", robrk: "\u27E7", ropar: "\u2986", ropf: "\u{1D563}", Ropf: "\u211D", roplus: "\u2A2E", rotimes: "\u2A35", RoundImplies: "\u2970", rpar: ")", rpargt: "\u2994", rppolint: "\u2A12", rrarr: "\u21C9", Rrightarrow: "\u21DB", rsaquo: "\u203A", rscr: "\u{1D4C7}", Rscr: "\u211B", rsh: "\u21B1", Rsh: "\u21B1", rsqb: "]", rsquo: "\u2019", rsquor: "\u2019", rthree: "\u22CC", rtimes: "\u22CA", rtri: "\u25B9", rtrie: "\u22B5", rtrif: "\u25B8", rtriltri: "\u29CE", RuleDelayed: "\u29F4", ruluhar: "\u2968", rx: "\u211E", Sacute: "\u015A", sacute: "\u015B", sbquo: "\u201A", scap: "\u2AB8", Scaron: "\u0160", scaron: "\u0161", Sc: "\u2ABC", sc: "\u227B", sccue: "\u227D", sce: "\u2AB0", scE: "\u2AB4", Scedil: "\u015E", scedil: "\u015F", Scirc: "\u015C", scirc: "\u015D", scnap: "\u2ABA", scnE: "\u2AB6", scnsim: "\u22E9", scpolint: "\u2A13", scsim: "\u227F", Scy: "\u0421", scy: "\u0441", sdotb: "\u22A1", sdot: "\u22C5", sdote: "\u2A66", searhk: "\u2925", searr: "\u2198", seArr: "\u21D8", searrow: "\u2198", sect: "\xA7", semi: ";", seswar: "\u2929", setminus: "\u2216", setmn: "\u2216", sext: "\u2736", Sfr: "\u{1D516}", sfr: "\u{1D530}", sfrown: "\u2322", sharp: "\u266F", SHCHcy: "\u0429", shchcy: "\u0449", SHcy: "\u0428", shcy: "\u0448", ShortDownArrow: "\u2193", ShortLeftArrow: "\u2190", shortmid: "\u2223", shortparallel: "\u2225", ShortRightArrow: "\u2192", ShortUpArrow: "\u2191", shy: "\xAD", Sigma: "\u03A3", sigma: "\u03C3", sigmaf: "\u03C2", sigmav: "\u03C2", sim: "\u223C", simdot: "\u2A6A", sime: "\u2243", simeq: "\u2243", simg: "\u2A9E", simgE: "\u2AA0", siml: "\u2A9D", simlE: "\u2A9F", simne: "\u2246", simplus: "\u2A24", simrarr: "\u2972", slarr: "\u2190", SmallCircle: "\u2218", smallsetminus: "\u2216", smashp: "\u2A33", smeparsl: "\u29E4", smid: "\u2223", smile: "\u2323", smt: "\u2AAA", smte: "\u2AAC", smtes: "\u2AAC\uFE00", SOFTcy: "\u042C", softcy: "\u044C", solbar: "\u233F", solb: "\u29C4", sol: "/", Sopf: "\u{1D54A}", sopf: "\u{1D564}", spades: "\u2660", spadesuit: "\u2660", spar: "\u2225", sqcap: "\u2293", sqcaps: "\u2293\uFE00", sqcup: "\u2294", sqcups: "\u2294\uFE00", Sqrt: "\u221A", sqsub: "\u228F", sqsube: "\u2291", sqsubset: "\u228F", sqsubseteq: "\u2291", sqsup: "\u2290", sqsupe: "\u2292", sqsupset: "\u2290", sqsupseteq: "\u2292", square: "\u25A1", Square: "\u25A1", SquareIntersection: "\u2293", SquareSubset: "\u228F", SquareSubsetEqual: "\u2291", SquareSuperset: "\u2290", SquareSupersetEqual: "\u2292", SquareUnion: "\u2294", squarf: "\u25AA", squ: "\u25A1", squf: "\u25AA", srarr: "\u2192", Sscr: "\u{1D4AE}", sscr: "\u{1D4C8}", ssetmn: "\u2216", ssmile: "\u2323", sstarf: "\u22C6", Star: "\u22C6", star: "\u2606", starf: "\u2605", straightepsilon: "\u03F5", straightphi: "\u03D5", strns: "\xAF", sub: "\u2282", Sub: "\u22D0", subdot: "\u2ABD", subE: "\u2AC5", sube: "\u2286", subedot: "\u2AC3", submult: "\u2AC1", subnE: "\u2ACB", subne: "\u228A", subplus: "\u2ABF", subrarr: "\u2979", subset: "\u2282", Subset: "\u22D0", subseteq: "\u2286", subseteqq: "\u2AC5", SubsetEqual: "\u2286", subsetneq: "\u228A", subsetneqq: "\u2ACB", subsim: "\u2AC7", subsub: "\u2AD5", subsup: "\u2AD3", succapprox: "\u2AB8", succ: "\u227B", succcurlyeq: "\u227D", Succeeds: "\u227B", SucceedsEqual: "\u2AB0", SucceedsSlantEqual: "\u227D", SucceedsTilde: "\u227F", succeq: "\u2AB0", succnapprox: "\u2ABA", succneqq: "\u2AB6", succnsim: "\u22E9", succsim: "\u227F", SuchThat: "\u220B", sum: "\u2211", Sum: "\u2211", sung: "\u266A", sup1: "\xB9", sup2: "\xB2", sup3: "\xB3", sup: "\u2283", Sup: "\u22D1", supdot: "\u2ABE", supdsub: "\u2AD8", supE: "\u2AC6", supe: "\u2287", supedot: "\u2AC4", Superset: "\u2283", SupersetEqual: "\u2287", suphsol: "\u27C9", suphsub: "\u2AD7", suplarr: "\u297B", supmult: "\u2AC2", supnE: "\u2ACC", supne: "\u228B", supplus: "\u2AC0", supset: "\u2283", Supset: "\u22D1", supseteq: "\u2287", supseteqq: "\u2AC6", supsetneq: "\u228B", supsetneqq: "\u2ACC", supsim: "\u2AC8", supsub: "\u2AD4", supsup: "\u2AD6", swarhk: "\u2926", swarr: "\u2199", swArr: "\u21D9", swarrow: "\u2199", swnwar: "\u292A", szlig: "\xDF", Tab: " ", target: "\u2316", Tau: "\u03A4", tau: "\u03C4", tbrk: "\u23B4", Tcaron: "\u0164", tcaron: "\u0165", Tcedil: "\u0162", tcedil: "\u0163", Tcy: "\u0422", tcy: "\u0442", tdot: "\u20DB", telrec: "\u2315", Tfr: "\u{1D517}", tfr: "\u{1D531}", there4: "\u2234", therefore: "\u2234", Therefore: "\u2234", Theta: "\u0398", theta: "\u03B8", thetasym: "\u03D1", thetav: "\u03D1", thickapprox: "\u2248", thicksim: "\u223C", ThickSpace: "\u205F\u200A", ThinSpace: "\u2009", thinsp: "\u2009", thkap: "\u2248", thksim: "\u223C", THORN: "\xDE", thorn: "\xFE", tilde: "\u02DC", Tilde: "\u223C", TildeEqual: "\u2243", TildeFullEqual: "\u2245", TildeTilde: "\u2248", timesbar: "\u2A31", timesb: "\u22A0", times: "\xD7", timesd: "\u2A30", tint: "\u222D", toea: "\u2928", topbot: "\u2336", topcir: "\u2AF1", top: "\u22A4", Topf: "\u{1D54B}", topf: "\u{1D565}", topfork: "\u2ADA", tosa: "\u2929", tprime: "\u2034", trade: "\u2122", TRADE: "\u2122", triangle: "\u25B5", triangledown: "\u25BF", triangleleft: "\u25C3", trianglelefteq: "\u22B4", triangleq: "\u225C", triangleright: "\u25B9", trianglerighteq: "\u22B5", tridot: "\u25EC", trie: "\u225C", triminus: "\u2A3A", TripleDot: "\u20DB", triplus: "\u2A39", trisb: "\u29CD", tritime: "\u2A3B", trpezium: "\u23E2", Tscr: "\u{1D4AF}", tscr: "\u{1D4C9}", TScy: "\u0426", tscy: "\u0446", TSHcy: "\u040B", tshcy: "\u045B", Tstrok: "\u0166", tstrok: "\u0167", twixt: "\u226C", twoheadleftarrow: "\u219E", twoheadrightarrow: "\u21A0", Uacute: "\xDA", uacute: "\xFA", uarr: "\u2191", Uarr: "\u219F", uArr: "\u21D1", Uarrocir: "\u2949", Ubrcy: "\u040E", ubrcy: "\u045E", Ubreve: "\u016C", ubreve: "\u016D", Ucirc: "\xDB", ucirc: "\xFB", Ucy: "\u0423", ucy: "\u0443", udarr: "\u21C5", Udblac: "\u0170", udblac: "\u0171", udhar: "\u296E", ufisht: "\u297E", Ufr: "\u{1D518}", ufr: "\u{1D532}", Ugrave: "\xD9", ugrave: "\xF9", uHar: "\u2963", uharl: "\u21BF", uharr: "\u21BE", uhblk: "\u2580", ulcorn: "\u231C", ulcorner: "\u231C", ulcrop: "\u230F", ultri: "\u25F8", Umacr: "\u016A", umacr: "\u016B", uml: "\xA8", UnderBar: "_", UnderBrace: "\u23DF", UnderBracket: "\u23B5", UnderParenthesis: "\u23DD", Union: "\u22C3", UnionPlus: "\u228E", Uogon: "\u0172", uogon: "\u0173", Uopf: "\u{1D54C}", uopf: "\u{1D566}", UpArrowBar: "\u2912", uparrow: "\u2191", UpArrow: "\u2191", Uparrow: "\u21D1", UpArrowDownArrow: "\u21C5", updownarrow: "\u2195", UpDownArrow: "\u2195", Updownarrow: "\u21D5", UpEquilibrium: "\u296E", upharpoonleft: "\u21BF", upharpoonright: "\u21BE", uplus: "\u228E", UpperLeftArrow: "\u2196", UpperRightArrow: "\u2197", upsi: "\u03C5", Upsi: "\u03D2", upsih: "\u03D2", Upsilon: "\u03A5", upsilon: "\u03C5", UpTeeArrow: "\u21A5", UpTee: "\u22A5", upuparrows: "\u21C8", urcorn: "\u231D", urcorner: "\u231D", urcrop: "\u230E", Uring: "\u016E", uring: "\u016F", urtri: "\u25F9", Uscr: "\u{1D4B0}", uscr: "\u{1D4CA}", utdot: "\u22F0", Utilde: "\u0168", utilde: "\u0169", utri: "\u25B5", utrif: "\u25B4", uuarr: "\u21C8", Uuml: "\xDC", uuml: "\xFC", uwangle: "\u29A7", vangrt: "\u299C", varepsilon: "\u03F5", varkappa: "\u03F0", varnothing: "\u2205", varphi: "\u03D5", varpi: "\u03D6", varpropto: "\u221D", varr: "\u2195", vArr: "\u21D5", varrho: "\u03F1", varsigma: "\u03C2", varsubsetneq: "\u228A\uFE00", varsubsetneqq: "\u2ACB\uFE00", varsupsetneq: "\u228B\uFE00", varsupsetneqq: "\u2ACC\uFE00", vartheta: "\u03D1", vartriangleleft: "\u22B2", vartriangleright: "\u22B3", vBar: "\u2AE8", Vbar: "\u2AEB", vBarv: "\u2AE9", Vcy: "\u0412", vcy: "\u0432", vdash: "\u22A2", vDash: "\u22A8", Vdash: "\u22A9", VDash: "\u22AB", Vdashl: "\u2AE6", veebar: "\u22BB", vee: "\u2228", Vee: "\u22C1", veeeq: "\u225A", vellip: "\u22EE", verbar: "|", Verbar: "\u2016", vert: "|", Vert: "\u2016", VerticalBar: "\u2223", VerticalLine: "|", VerticalSeparator: "\u2758", VerticalTilde: "\u2240", VeryThinSpace: "\u200A", Vfr: "\u{1D519}", vfr: "\u{1D533}", vltri: "\u22B2", vnsub: "\u2282\u20D2", vnsup: "\u2283\u20D2", Vopf: "\u{1D54D}", vopf: "\u{1D567}", vprop: "\u221D", vrtri: "\u22B3", Vscr: "\u{1D4B1}", vscr: "\u{1D4CB}", vsubnE: "\u2ACB\uFE00", vsubne: "\u228A\uFE00", vsupnE: "\u2ACC\uFE00", vsupne: "\u228B\uFE00", Vvdash: "\u22AA", vzigzag: "\u299A", Wcirc: "\u0174", wcirc: "\u0175", wedbar: "\u2A5F", wedge: "\u2227", Wedge: "\u22C0", wedgeq: "\u2259", weierp: "\u2118", Wfr: "\u{1D51A}", wfr: "\u{1D534}", Wopf: "\u{1D54E}", wopf: "\u{1D568}", wp: "\u2118", wr: "\u2240", wreath: "\u2240", Wscr: "\u{1D4B2}", wscr: "\u{1D4CC}", xcap: "\u22C2", xcirc: "\u25EF", xcup: "\u22C3", xdtri: "\u25BD", Xfr: "\u{1D51B}", xfr: "\u{1D535}", xharr: "\u27F7", xhArr: "\u27FA", Xi: "\u039E", xi: "\u03BE", xlarr: "\u27F5", xlArr: "\u27F8", xmap: "\u27FC", xnis: "\u22FB", xodot: "\u2A00", Xopf: "\u{1D54F}", xopf: "\u{1D569}", xoplus: "\u2A01", xotime: "\u2A02", xrarr: "\u27F6", xrArr: "\u27F9", Xscr: "\u{1D4B3}", xscr: "\u{1D4CD}", xsqcup: "\u2A06", xuplus: "\u2A04", xutri: "\u25B3", xvee: "\u22C1", xwedge: "\u22C0", Yacute: "\xDD", yacute: "\xFD", YAcy: "\u042F", yacy: "\u044F", Ycirc: "\u0176", ycirc: "\u0177", Ycy: "\u042B", ycy: "\u044B", yen: "\xA5", Yfr: "\u{1D51C}", yfr: "\u{1D536}", YIcy: "\u0407", yicy: "\u0457", Yopf: "\u{1D550}", yopf: "\u{1D56A}", Yscr: "\u{1D4B4}", yscr: "\u{1D4CE}", YUcy: "\u042E", yucy: "\u044E", yuml: "\xFF", Yuml: "\u0178", Zacute: "\u0179", zacute: "\u017A", Zcaron: "\u017D", zcaron: "\u017E", Zcy: "\u0417", zcy: "\u0437", Zdot: "\u017B", zdot: "\u017C", zeetrf: "\u2128", ZeroWidthSpace: "\u200B", Zeta: "\u0396", zeta: "\u03B6", zfr: "\u{1D537}", Zfr: "\u2128", ZHcy: "\u0416", zhcy: "\u0436", zigrarr: "\u21DD", zopf: "\u{1D56B}", Zopf: "\u2124", Zscr: "\u{1D4B5}", zscr: "\u{1D4CF}", zwj: "\u200D", zwnj: "\u200C" }; + } +}); + +// ../../node_modules/entities/lib/maps/legacy.json +var require_legacy = __commonJS({ + "../../node_modules/entities/lib/maps/legacy.json"(exports, module) { + module.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\xE0", amp: "&", AMP: "&", Aring: "\xC5", aring: "\xE5", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", brvbar: "\xA6", Ccedil: "\xC7", ccedil: "\xE7", cedil: "\xB8", cent: "\xA2", copy: "\xA9", COPY: "\xA9", curren: "\xA4", deg: "\xB0", divide: "\xF7", Eacute: "\xC9", eacute: "\xE9", Ecirc: "\xCA", ecirc: "\xEA", Egrave: "\xC8", egrave: "\xE8", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", frac12: "\xBD", frac14: "\xBC", frac34: "\xBE", gt: ">", GT: ">", Iacute: "\xCD", iacute: "\xED", Icirc: "\xCE", icirc: "\xEE", iexcl: "\xA1", Igrave: "\xCC", igrave: "\xEC", iquest: "\xBF", Iuml: "\xCF", iuml: "\xEF", laquo: "\xAB", lt: "<", LT: "<", macr: "\xAF", micro: "\xB5", middot: "\xB7", nbsp: "\xA0", not: "\xAC", Ntilde: "\xD1", ntilde: "\xF1", Oacute: "\xD3", oacute: "\xF3", Ocirc: "\xD4", ocirc: "\xF4", Ograve: "\xD2", ograve: "\xF2", ordf: "\xAA", ordm: "\xBA", Oslash: "\xD8", oslash: "\xF8", Otilde: "\xD5", otilde: "\xF5", Ouml: "\xD6", ouml: "\xF6", para: "\xB6", plusmn: "\xB1", pound: "\xA3", quot: '"', QUOT: '"', raquo: "\xBB", reg: "\xAE", REG: "\xAE", sect: "\xA7", shy: "\xAD", sup1: "\xB9", sup2: "\xB2", sup3: "\xB3", szlig: "\xDF", THORN: "\xDE", thorn: "\xFE", times: "\xD7", Uacute: "\xDA", uacute: "\xFA", Ucirc: "\xDB", ucirc: "\xFB", Ugrave: "\xD9", ugrave: "\xF9", uml: "\xA8", Uuml: "\xDC", uuml: "\xFC", Yacute: "\xDD", yacute: "\xFD", yen: "\xA5", yuml: "\xFF" }; + } +}); + +// ../../node_modules/entities/lib/maps/xml.json +var require_xml = __commonJS({ + "../../node_modules/entities/lib/maps/xml.json"(exports, module) { + module.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' }; + } +}); + +// ../../node_modules/entities/lib/maps/decode.json +var require_decode = __commonJS({ + "../../node_modules/entities/lib/maps/decode.json"(exports, module) { + module.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240, "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212, "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 }; + } +}); + +// ../../node_modules/entities/lib/decode_codepoint.js +var require_decode_codepoint = __commonJS({ + "../../node_modules/entities/lib/decode_codepoint.js"(exports) { + "use strict"; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { default: mod }; + }; + Object.defineProperty(exports, "__esModule", { value: !0 }); + var decode_json_1 = __importDefault(require_decode()), fromCodePoint = ( + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + String.fromCodePoint || function(codePoint) { + var output = ""; + return codePoint > 65535 && (codePoint -= 65536, output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296), codePoint = 56320 | codePoint & 1023), output += String.fromCharCode(codePoint), output; + } + ); + function decodeCodePoint(codePoint) { + return codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111 ? "\uFFFD" : (codePoint in decode_json_1.default && (codePoint = decode_json_1.default[codePoint]), fromCodePoint(codePoint)); + } + exports.default = decodeCodePoint; + } +}); + +// ../../node_modules/entities/lib/decode.js +var require_decode2 = __commonJS({ + "../../node_modules/entities/lib/decode.js"(exports) { + "use strict"; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { default: mod }; + }; + Object.defineProperty(exports, "__esModule", { value: !0 }); + exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0; + var entities_json_1 = __importDefault(require_entities()), legacy_json_1 = __importDefault(require_legacy()), xml_json_1 = __importDefault(require_xml()), decode_codepoint_1 = __importDefault(require_decode_codepoint()), strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g; + exports.decodeXML = getStrictDecoder(xml_json_1.default); + exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default); + function getStrictDecoder(map) { + var replace = getReplacer(map); + return function(str) { + return String(str).replace(strictEntityRe, replace); + }; + } + var sorter = function(a, b) { + return a < b ? 1 : -1; + }; + exports.decodeHTML = (function() { + for (var legacy = Object.keys(legacy_json_1.default).sort(sorter), keys = Object.keys(entities_json_1.default).sort(sorter), i = 0, j = 0; i < keys.length; i++) + legacy[j] === keys[i] ? (keys[i] += ";?", j++) : keys[i] += ";"; + var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), replace = getReplacer(entities_json_1.default); + function replacer(str) { + return str.substr(-1) !== ";" && (str += ";"), replace(str); + } + return function(str) { + return String(str).replace(re, replacer); + }; + })(); + function getReplacer(map) { + return function(str) { + if (str.charAt(1) === "#") { + var secondChar = str.charAt(2); + return secondChar === "X" || secondChar === "x" ? decode_codepoint_1.default(parseInt(str.substr(3), 16)) : decode_codepoint_1.default(parseInt(str.substr(2), 10)); + } + return map[str.slice(1, -1)] || str; + }; + } + } +}); + +// ../../node_modules/entities/lib/encode.js +var require_encode = __commonJS({ + "../../node_modules/entities/lib/encode.js"(exports) { + "use strict"; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { default: mod }; + }; + Object.defineProperty(exports, "__esModule", { value: !0 }); + exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0; + var xml_json_1 = __importDefault(require_xml()), inverseXML = getInverseObj(xml_json_1.default), xmlReplacer = getInverseReplacer(inverseXML); + exports.encodeXML = getASCIIEncoder(inverseXML); + var entities_json_1 = __importDefault(require_entities()), inverseHTML = getInverseObj(entities_json_1.default), htmlReplacer = getInverseReplacer(inverseHTML); + exports.encodeHTML = getInverse(inverseHTML, htmlReplacer); + exports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML); + function getInverseObj(obj) { + return Object.keys(obj).sort().reduce(function(inverse, name) { + return inverse[obj[name]] = "&" + name + ";", inverse; + }, {}); + } + function getInverseReplacer(inverse) { + for (var single = [], multiple = [], _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) { + var k = _a[_i]; + k.length === 1 ? single.push("\\" + k) : multiple.push(k); + } + single.sort(); + for (var start = 0; start < single.length - 1; start++) { + for (var end = start; end < single.length - 1 && single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1); ) + end += 1; + var count = 1 + end - start; + count < 3 || single.splice(start, count, single[start] + "-" + single[end]); + } + return multiple.unshift("[" + single.join("") + "]"), new RegExp(multiple.join("|"), "g"); + } + var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, getCodePoint = ( + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + String.prototype.codePointAt != null ? ( + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + function(str) { + return str.codePointAt(0); + } + ) : ( + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + function(c) { + return (c.charCodeAt(0) - 55296) * 1024 + c.charCodeAt(1) - 56320 + 65536; + } + ) + ); + function singleCharReplacer(c) { + return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0)).toString(16).toUpperCase() + ";"; + } + function getInverse(inverse, re) { + return function(data) { + return data.replace(re, function(name) { + return inverse[name]; + }).replace(reNonASCII, singleCharReplacer); + }; + } + var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g"); + function escape(data) { + return data.replace(reEscapeChars, singleCharReplacer); + } + exports.escape = escape; + function escapeUTF8(data) { + return data.replace(xmlReplacer, singleCharReplacer); + } + exports.escapeUTF8 = escapeUTF8; + function getASCIIEncoder(obj) { + return function(data) { + return data.replace(reEscapeChars, function(c) { + return obj[c] || singleCharReplacer(c); + }); + }; + } + } +}); + +// ../../node_modules/entities/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/entities/lib/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: !0 }); + exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0; + var decode_1 = require_decode2(), encode_1 = require_encode(); + function decode(data, level) { + return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data); + } + exports.decode = decode; + function decodeStrict(data, level) { + return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data); + } + exports.decodeStrict = decodeStrict; + function encode(data, level) { + return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data); + } + exports.encode = encode; + var encode_2 = require_encode(); + Object.defineProperty(exports, "encodeXML", { enumerable: !0, get: function() { + return encode_2.encodeXML; + } }); + Object.defineProperty(exports, "encodeHTML", { enumerable: !0, get: function() { + return encode_2.encodeHTML; + } }); + Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: !0, get: function() { + return encode_2.encodeNonAsciiHTML; + } }); + Object.defineProperty(exports, "escape", { enumerable: !0, get: function() { + return encode_2.escape; + } }); + Object.defineProperty(exports, "escapeUTF8", { enumerable: !0, get: function() { + return encode_2.escapeUTF8; + } }); + Object.defineProperty(exports, "encodeHTML4", { enumerable: !0, get: function() { + return encode_2.encodeHTML; + } }); + Object.defineProperty(exports, "encodeHTML5", { enumerable: !0, get: function() { + return encode_2.encodeHTML; + } }); + var decode_2 = require_decode2(); + Object.defineProperty(exports, "decodeXML", { enumerable: !0, get: function() { + return decode_2.decodeXML; + } }); + Object.defineProperty(exports, "decodeHTML", { enumerable: !0, get: function() { + return decode_2.decodeHTML; + } }); + Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: !0, get: function() { + return decode_2.decodeHTMLStrict; + } }); + Object.defineProperty(exports, "decodeHTML4", { enumerable: !0, get: function() { + return decode_2.decodeHTML; + } }); + Object.defineProperty(exports, "decodeHTML5", { enumerable: !0, get: function() { + return decode_2.decodeHTML; + } }); + Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: !0, get: function() { + return decode_2.decodeHTMLStrict; + } }); + Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: !0, get: function() { + return decode_2.decodeHTMLStrict; + } }); + Object.defineProperty(exports, "decodeXMLStrict", { enumerable: !0, get: function() { + return decode_2.decodeXML; + } }); + } +}); + +// ../../node_modules/ansi-to-html/lib/ansi_to_html.js +var require_ansi_to_html = __commonJS({ + "../../node_modules/ansi-to-html/lib/ansi_to_html.js"(exports, module) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) + throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor; + } + function _createForOfIteratorHelper(o, allowArrayLike) { + var it = typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"]; + if (!it) { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length == "number") { + it && (o = it); + var i = 0, F = function() { + }; + return { s: F, n: function() { + return i >= o.length ? { done: !0 } : { done: !1, value: o[i++] }; + }, e: function(_e) { + throw _e; + }, f: F }; + } + throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); + } + var normalCompletion = !0, didErr = !1, err; + return { s: function() { + it = it.call(o); + }, n: function() { + var step = it.next(); + return normalCompletion = step.done, step; + }, e: function(_e2) { + didErr = !0, err = _e2; + }, f: function() { + try { + !normalCompletion && it.return != null && it.return(); + } finally { + if (didErr) throw err; + } + } }; + } + function _unsupportedIterableToArray(o, minLen) { + if (o) { + if (typeof o == "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + } + function _arrayLikeToArray(arr, len) { + (len == null || len > arr.length) && (len = arr.length); + for (var i = 0, arr2 = new Array(len); i < len; i++) + arr2[i] = arr[i]; + return arr2; + } + var entities = require_lib(), defaults = { + fg: "#FFF", + bg: "#000", + newline: !1, + escapeXML: !1, + stream: !1, + colors: getDefaultColors() + }; + function getDefaultColors() { + var colors = { + 0: "#000", + 1: "#A00", + 2: "#0A0", + 3: "#A50", + 4: "#00A", + 5: "#A0A", + 6: "#0AA", + 7: "#AAA", + 8: "#555", + 9: "#F55", + 10: "#5F5", + 11: "#FF5", + 12: "#55F", + 13: "#F5F", + 14: "#5FF", + 15: "#FFF" + }; + return range(0, 5).forEach(function(red) { + range(0, 5).forEach(function(green) { + range(0, 5).forEach(function(blue) { + return setStyleColor(red, green, blue, colors); + }); + }); + }), range(0, 23).forEach(function(gray) { + var c = gray + 232, l = toHexString(gray * 10 + 8); + colors[c] = "#" + l + l + l; + }), colors; + } + function setStyleColor(red, green, blue, colors) { + var c = 16 + red * 36 + green * 6 + blue, r = red > 0 ? red * 40 + 55 : 0, g = green > 0 ? green * 40 + 55 : 0, b = blue > 0 ? blue * 40 + 55 : 0; + colors[c] = toColorHexString([r, g, b]); + } + function toHexString(num) { + for (var str = num.toString(16); str.length < 2; ) + str = "0" + str; + return str; + } + function toColorHexString(ref) { + var results = [], _iterator = _createForOfIteratorHelper(ref), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + var r = _step.value; + results.push(toHexString(r)); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + return "#" + results.join(""); + } + function generateOutput(stack, token, data, options) { + var result; + return token === "text" ? result = pushText(data, options) : token === "display" ? result = handleDisplay(stack, data, options) : token === "xterm256Foreground" ? result = pushForegroundColor(stack, options.colors[data]) : token === "xterm256Background" ? result = pushBackgroundColor(stack, options.colors[data]) : token === "rgb" && (result = handleRgb(stack, data)), result; + } + function handleRgb(stack, data) { + data = data.substring(2).slice(0, -1); + var operation = +data.substr(0, 2), color = data.substring(5).split(";"), rgb = color.map(function(value) { + return ("0" + Number(value).toString(16)).substr(-2); + }).join(""); + return pushStyle(stack, (operation === 38 ? "color:#" : "background-color:#") + rgb); + } + function handleDisplay(stack, code, options) { + code = parseInt(code, 10); + var codeMap = { + "-1": function() { + return "
"; + }, + 0: function() { + return stack.length && resetStyles(stack); + }, + 1: function() { + return pushTag(stack, "b"); + }, + 3: function() { + return pushTag(stack, "i"); + }, + 4: function() { + return pushTag(stack, "u"); + }, + 8: function() { + return pushStyle(stack, "display:none"); + }, + 9: function() { + return pushTag(stack, "strike"); + }, + 22: function() { + return pushStyle(stack, "font-weight:normal;text-decoration:none;font-style:normal"); + }, + 23: function() { + return closeTag(stack, "i"); + }, + 24: function() { + return closeTag(stack, "u"); + }, + 39: function() { + return pushForegroundColor(stack, options.fg); + }, + 49: function() { + return pushBackgroundColor(stack, options.bg); + }, + 53: function() { + return pushStyle(stack, "text-decoration:overline"); + } + }, result; + return codeMap[code] ? result = codeMap[code]() : 4 < code && code < 7 ? result = pushTag(stack, "blink") : 29 < code && code < 38 ? result = pushForegroundColor(stack, options.colors[code - 30]) : 39 < code && code < 48 ? result = pushBackgroundColor(stack, options.colors[code - 40]) : 89 < code && code < 98 ? result = pushForegroundColor(stack, options.colors[8 + (code - 90)]) : 99 < code && code < 108 && (result = pushBackgroundColor(stack, options.colors[8 + (code - 100)])), result; + } + function resetStyles(stack) { + var stackClone = stack.slice(0); + return stack.length = 0, stackClone.reverse().map(function(tag) { + return ""; + }).join(""); + } + function range(low, high) { + for (var results = [], j = low; j <= high; j++) + results.push(j); + return results; + } + function notCategory(category) { + return function(e) { + return (category === null || e.category !== category) && category !== "all"; + }; + } + function categoryForCode(code) { + code = parseInt(code, 10); + var result = null; + return code === 0 ? result = "all" : code === 1 ? result = "bold" : 2 < code && code < 5 ? result = "underline" : 4 < code && code < 7 ? result = "blink" : code === 8 ? result = "hide" : code === 9 ? result = "strike" : 29 < code && code < 38 || code === 39 || 89 < code && code < 98 ? result = "foreground-color" : (39 < code && code < 48 || code === 49 || 99 < code && code < 108) && (result = "background-color"), result; + } + function pushText(text, options) { + return options.escapeXML ? entities.encodeXML(text) : text; + } + function pushTag(stack, tag, style) { + return style || (style = ""), stack.push(tag), "<".concat(tag).concat(style ? ' style="'.concat(style, '"') : "", ">"); + } + function pushStyle(stack, style) { + return pushTag(stack, "span", style); + } + function pushForegroundColor(stack, color) { + return pushTag(stack, "span", "color:" + color); + } + function pushBackgroundColor(stack, color) { + return pushTag(stack, "span", "background-color:" + color); + } + function closeTag(stack, style) { + var last; + if (stack.slice(-1)[0] === style && (last = stack.pop()), last) + return ""; + } + function tokenize(text, options, callback) { + var ansiMatch = !1, ansiHandler = 3; + function remove() { + return ""; + } + function removeXterm256Foreground(m, g1) { + return callback("xterm256Foreground", g1), ""; + } + function removeXterm256Background(m, g1) { + return callback("xterm256Background", g1), ""; + } + function newline(m) { + return options.newline ? callback("display", -1) : callback("text", m), ""; + } + function ansiMess(m, g1) { + ansiMatch = !0, g1.trim().length === 0 && (g1 = "0"), g1 = g1.trimRight(";").split(";"); + var _iterator2 = _createForOfIteratorHelper(g1), _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { + var g = _step2.value; + callback("display", g); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + return ""; + } + function realText(m) { + return callback("text", m), ""; + } + function rgb(m) { + return callback("rgb", m), ""; + } + var tokens = [{ + pattern: /^\x08+/, + sub: remove + }, { + pattern: /^\x1b\[[012]?K/, + sub: remove + }, { + pattern: /^\x1b\[\(B/, + sub: remove + }, { + pattern: /^\x1b\[[34]8;2;\d+;\d+;\d+m/, + sub: rgb + }, { + pattern: /^\x1b\[38;5;(\d+)m/, + sub: removeXterm256Foreground + }, { + pattern: /^\x1b\[48;5;(\d+)m/, + sub: removeXterm256Background + }, { + pattern: /^\n/, + sub: newline + }, { + pattern: /^\r+\n/, + sub: newline + }, { + pattern: /^\r/, + sub: newline + }, { + pattern: /^\x1b\[((?:\d{1,3};?)+|)m/, + sub: ansiMess + }, { + // CSI n J + // ED - Erase in Display Clears part of the screen. + // If n is 0 (or missing), clear from cursor to end of screen. + // If n is 1, clear from cursor to beginning of the screen. + // If n is 2, clear entire screen (and moves cursor to upper left on DOS ANSI.SYS). + // If n is 3, clear entire screen and delete all lines saved in the scrollback buffer + // (this feature was added for xterm and is supported by other terminal applications). + pattern: /^\x1b\[\d?J/, + sub: remove + }, { + // CSI n ; m f + // HVP - Horizontal Vertical Position Same as CUP + pattern: /^\x1b\[\d{0,3};\d{0,3}f/, + sub: remove + }, { + // catch-all for CSI sequences? + pattern: /^\x1b\[?[\d;]{0,3}/, + sub: remove + }, { + /** + * extracts real text - not containing: + * - `\x1b' - ESC - escape (Ascii 27) + * - '\x08' - BS - backspace (Ascii 8) + * - `\n` - Newline - linefeed (LF) (ascii 10) + * - `\r` - Windows Carriage Return (CR) + */ + pattern: /^(([^\x1b\x08\r\n])+)/, + sub: realText + }]; + function process(handler2, i2) { + i2 > ansiHandler && ansiMatch || (ansiMatch = !1, text = text.replace(handler2.pattern, handler2.sub)); + } + var results1 = [], _text = text, length = _text.length; + outer: for (; length > 0; ) { + for (var i = 0, o = 0, len = tokens.length; o < len; i = ++o) { + var handler = tokens[i]; + if (process(handler, i), text.length !== length) { + length = text.length; + continue outer; + } + } + if (text.length === length) + break; + results1.push(0), length = text.length; + } + return results1; + } + function updateStickyStack(stickyStack, token, data) { + return token !== "text" && (stickyStack = stickyStack.filter(notCategory(categoryForCode(data))), stickyStack.push({ + token, + data, + category: categoryForCode(data) + })), stickyStack; + } + var Filter = (function() { + function Filter2(options) { + _classCallCheck(this, Filter2), options = options || {}, options.colors && (options.colors = Object.assign({}, defaults.colors, options.colors)), this.options = Object.assign({}, defaults, options), this.stack = [], this.stickyStack = []; + } + return _createClass(Filter2, [{ + key: "toHtml", + value: function(input) { + var _this = this; + input = typeof input == "string" ? [input] : input; + var stack = this.stack, options = this.options, buf = []; + return this.stickyStack.forEach(function(element) { + var output = generateOutput(stack, element.token, element.data, options); + output && buf.push(output); + }), tokenize(input.join(""), options, function(token, data) { + var output = generateOutput(stack, token, data, options); + output && buf.push(output), options.stream && (_this.stickyStack = updateStickyStack(_this.stickyStack, token, data)); + }), stack.length && buf.push(resetStyles(stack)), buf.join(""); + } + }]), Filter2; + })(); + module.exports = Filter; + } +}); + +// src/viewport/resolveViewport.ts +var VIEWPORT_MIN_WIDTH = 40, VIEWPORT_MIN_HEIGHT = 40, URL_VALUE_PATTERN = /^([0-9]{1,4})([a-z]{0,4})-([0-9]{1,4})([a-z]{0,4})$/, normalizeGlobal = (value, defaultIsRotated) => typeof value == "string" ? { value, isRotated: defaultIsRotated } : { value: value?.value, isRotated: value?.isRotated ?? defaultIsRotated }, resolveViewport = ({ + globals, + storyGlobals, + userGlobals, + options, + lastSelectedOption, + disable = !1, + viewMode +}) => { + if (viewMode !== "story") + return { + name: "Responsive", + type: "desktop", + width: "100%", + height: "100%", + value: RESPONSIVE_VIEWPORT_VALUE, + option: void 0, + isCustom: !1, + isDefault: !0, + isLocked: !0, + isRotated: !1 + }; + let global = normalizeGlobal(globals?.[PARAM_KEY]), userGlobal = normalizeGlobal(userGlobals?.[PARAM_KEY]), storyGlobal = normalizeGlobal(storyGlobals?.[PARAM_KEY]), storyHasViewport = PARAM_KEY in storyGlobals, primaryGlobal = storyHasViewport ? storyGlobal : userGlobal, secondaryGlobal = storyHasViewport ? userGlobal : storyGlobal, value = primaryGlobal?.value ?? secondaryGlobal?.value ?? global?.value, isRotated = primaryGlobal?.isRotated ?? secondaryGlobal?.isRotated ?? global?.isRotated ?? !1, keys = Object.keys(options), isLocked = disable || PARAM_KEY in storyGlobals || !keys.length, [match, vx, ux, vy, uy] = value?.match(URL_VALUE_PATTERN) || []; + if (match) { + let x = ux && ux !== "px" ? vx : Math.max(Number(vx), VIEWPORT_MIN_WIDTH), y = uy && uy !== "px" ? vy : Math.max(Number(vy), VIEWPORT_MIN_HEIGHT), width = `${x}${ux === "pct" ? "%" : ux || "px"}`, height = `${y}${uy === "pct" ? "%" : uy || "px"}`, selection = lastSelectedOption ? options[lastSelectedOption] : void 0; + return { + name: selection?.name ?? "Custom", + type: selection?.type ?? "other", + width: isRotated ? height : width, + height: isRotated ? width : height, + value: match, + option: void 0, + isCustom: !0, + isDefault: !1, + isLocked, + isRotated + }; + } + if (value && keys.length) { + let { name, styles, type = "other" } = options[value] ?? options[keys[0]]; + return { + name, + type, + width: isRotated ? styles.height : styles.width, + height: isRotated ? styles.width : styles.height, + value, + option: value, + isCustom: !1, + isDefault: !1, + isLocked, + isRotated + }; + } + return { + name: "Responsive", + type: "desktop", + width: "100%", + height: "100%", + value: RESPONSIVE_VIEWPORT_VALUE, + option: void 0, + isCustom: !1, + isDefault: !0, + isLocked, + isRotated: !1 + }; +}, toViewportPixels = (dimension, reference) => { + let pxMatch = dimension.match(/^(\d+(?:\.\d+)?)px$/); + if (pxMatch) + return Math.round(Number(pxMatch[1])); + let percentMatch = dimension.match(/^(\d+(?:\.\d+)?)%$/); + if (percentMatch) + return Math.round(reference * Number(percentMatch[1]) / 100); +}, toResolvedViewportDimensions = (viewport, reference) => ({ + name: viewport.name, + value: viewport.value, + width: toViewportPixels(viewport.width, reference.width), + height: toViewportPixels(viewport.height, reference.height) +}); + +export { + resolveViewport, + toResolvedViewportDimensions, + require_ansi_to_html +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-YI2IBIQS.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-YI2IBIQS.js new file mode 100644 index 0000000000000000000000000000000000000000..7db1feb4b80159af397941d6624dc26565cb7394 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-YI2IBIQS.js @@ -0,0 +1,7 @@ +// src/shared/review/routes.ts +var REVIEW_COLLECTION_QUERY_PARAM = "collection", isReviewSummaryPath = (path) => path === "/review/" || path === "/review", isReviewCollectionStoryRoute = (path, customQueryParams) => !!path && path.startsWith("/story/") && customQueryParams?.[REVIEW_COLLECTION_QUERY_PARAM] !== void 0, isReviewManagerRoute = (path, customQueryParams) => !!path && (isReviewSummaryPath(path) || path.startsWith("/review/") || isReviewCollectionStoryRoute(path, customQueryParams)); + +export { + isReviewSummaryPath, + isReviewManagerRoute +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-YPBWNTGF.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-YPBWNTGF.js new file mode 100644 index 0000000000000000000000000000000000000000..ac0a8c8274b5d98c17e38916edc6c16570a494a5 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-YPBWNTGF.js @@ -0,0 +1,13 @@ +// ../addons/docs/src/blocks/controls/helpers.ts +var getControlId = (value, storyId, controlsId) => { + let base = value.replace(/\s+/g, "-"), parts = ["control"]; + return controlsId && parts.push(controlsId), storyId && parts.push(storyId), parts.push(base), parts.join("-"); +}, getControlSetterButtonId = (value, storyId, controlsId) => { + let base = value.replace(/\s+/g, "-"), parts = ["set"]; + return controlsId && parts.push(controlsId), storyId && parts.push(storyId), parts.push(base), parts.join("-"); +}; + +export { + getControlId, + getControlSetterButtonId +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-Z3B64JMR.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-Z3B64JMR.js new file mode 100644 index 0000000000000000000000000000000000000000..e83f1f6746171ed64287430e4e47e93b7207fcfb --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-Z3B64JMR.js @@ -0,0 +1,198 @@ +import { + noop +} from "./chunk-NZMVUW5T.js"; + +// ../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs +function isPlainObject(value) { + if (!value || typeof value != "object") + return !1; + let proto = Object.getPrototypeOf(value); + return proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null ? Object.prototype.toString.call(value) === "[object Object]" : !1; +} + +// ../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs +function getSymbols(object) { + return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol)); +} + +// ../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs +function getTag(value) { + return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value); +} + +// ../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs +var regexpTag = "[object RegExp]", stringTag = "[object String]", numberTag = "[object Number]", booleanTag = "[object Boolean]", argumentsTag = "[object Arguments]", symbolTag = "[object Symbol]", dateTag = "[object Date]", mapTag = "[object Map]", setTag = "[object Set]", arrayTag = "[object Array]", functionTag = "[object Function]", arrayBufferTag = "[object ArrayBuffer]", objectTag = "[object Object]", errorTag = "[object Error]", dataViewTag = "[object DataView]", uint8ArrayTag = "[object Uint8Array]", uint8ClampedArrayTag = "[object Uint8ClampedArray]", uint16ArrayTag = "[object Uint16Array]", uint32ArrayTag = "[object Uint32Array]", bigUint64ArrayTag = "[object BigUint64Array]", int8ArrayTag = "[object Int8Array]", int16ArrayTag = "[object Int16Array]", int32ArrayTag = "[object Int32Array]", bigInt64ArrayTag = "[object BigInt64Array]", float32ArrayTag = "[object Float32Array]", float64ArrayTag = "[object Float64Array]"; + +// ../../node_modules/es-toolkit/dist/compat/util/eq.mjs +function eq(value, other) { + return value === other || Number.isNaN(value) && Number.isNaN(other); +} + +// ../../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs +function isEqualWith(a, b, areValuesEqual) { + return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual); +} +function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) { + let result = areValuesEqual(a, b, property, aParent, bParent, stack); + if (result !== void 0) + return result; + if (typeof a == typeof b) + switch (typeof a) { + case "bigint": + case "string": + case "boolean": + case "symbol": + case "undefined": + return a === b; + case "number": + return a === b || Object.is(a, b); + case "function": + return a === b; + case "object": + return areObjectsEqual(a, b, stack, areValuesEqual); + } + return areObjectsEqual(a, b, stack, areValuesEqual); +} +function areObjectsEqual(a, b, stack, areValuesEqual) { + if (Object.is(a, b)) + return !0; + let aTag = getTag(a), bTag = getTag(b); + if (aTag === argumentsTag && (aTag = objectTag), bTag === argumentsTag && (bTag = objectTag), aTag !== bTag) + return !1; + switch (aTag) { + case stringTag: + return a.toString() === b.toString(); + case numberTag: { + let x = a.valueOf(), y = b.valueOf(); + return eq(x, y); + } + case booleanTag: + case dateTag: + case symbolTag: + return Object.is(a.valueOf(), b.valueOf()); + case regexpTag: + return a.source === b.source && a.flags === b.flags; + case functionTag: + return a === b; + } + stack = stack ?? /* @__PURE__ */ new Map(); + let aStack = stack.get(a), bStack = stack.get(b); + if (aStack != null && bStack != null) + return aStack === b; + stack.set(a, b), stack.set(b, a); + try { + switch (aTag) { + case mapTag: { + if (a.size !== b.size) + return !1; + for (let [key, value] of a.entries()) + if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) + return !1; + return !0; + } + case setTag: { + if (a.size !== b.size) + return !1; + let aValues = Array.from(a.values()), bValues = Array.from(b.values()); + for (let i = 0; i < aValues.length; i++) { + let aValue = aValues[i], index = bValues.findIndex((bValue) => isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual)); + if (index === -1) + return !1; + bValues.splice(index, 1); + } + return !0; + } + case arrayTag: + case uint8ArrayTag: + case uint8ClampedArrayTag: + case uint16ArrayTag: + case uint32ArrayTag: + case bigUint64ArrayTag: + case int8ArrayTag: + case int16ArrayTag: + case int32ArrayTag: + case bigInt64ArrayTag: + case float32ArrayTag: + case float64ArrayTag: { + if (typeof Buffer < "u" && Buffer.isBuffer(a) !== Buffer.isBuffer(b) || a.length !== b.length) + return !1; + for (let i = 0; i < a.length; i++) + if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) + return !1; + return !0; + } + case arrayBufferTag: + return a.byteLength !== b.byteLength ? !1 : areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual); + case dataViewTag: + return a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset ? !1 : areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual); + case errorTag: + return a.name === b.name && a.message === b.message; + case objectTag: { + if (!(areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject(a) && isPlainObject(b))) + return !1; + let aKeys = [...Object.keys(a), ...getSymbols(a)], bKeys = [...Object.keys(b), ...getSymbols(b)]; + if (aKeys.length !== bKeys.length) + return !1; + for (let i = 0; i < aKeys.length; i++) { + let propKey = aKeys[i], aProp = a[propKey]; + if (!Object.hasOwn(b, propKey)) + return !1; + let bProp = b[propKey]; + if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) + return !1; + } + return !0; + } + default: + return !1; + } + } finally { + stack.delete(a), stack.delete(b); + } +} + +// ../../node_modules/es-toolkit/dist/predicate/isEqual.mjs +function isEqual(a, b) { + return isEqualWith(a, b, noop); +} + +// ../../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs +function isPrimitive(value) { + return value == null || typeof value != "object" && typeof value != "function"; +} + +// ../../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs +function isTypedArray(x) { + return ArrayBuffer.isView(x) && !(x instanceof DataView); +} + +export { + isPrimitive, + isTypedArray, + getSymbols, + getTag, + regexpTag, + stringTag, + numberTag, + booleanTag, + argumentsTag, + symbolTag, + dateTag, + mapTag, + setTag, + arrayTag, + arrayBufferTag, + objectTag, + dataViewTag, + uint8ArrayTag, + uint8ClampedArrayTag, + uint16ArrayTag, + uint32ArrayTag, + int8ArrayTag, + int16ArrayTag, + int32ArrayTag, + float32ArrayTag, + float64ArrayTag, + isPlainObject, + isEqual +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-ZUWEVLDX.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-ZUWEVLDX.js new file mode 100644 index 0000000000000000000000000000000000000000..cdc335d001283c9a50e9e66df3c493e2a1c3cba5 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/chunk-ZUWEVLDX.js @@ -0,0 +1,18 @@ +// src/instrumenter/EVENTS.ts +var EVENTS = { + CALL: "storybook/instrumenter/call", + SYNC: "storybook/instrumenter/sync", + START: "storybook/instrumenter/start", + BACK: "storybook/instrumenter/back", + GOTO: "storybook/instrumenter/goto", + NEXT: "storybook/instrumenter/next", + END: "storybook/instrumenter/end" +}; + +// src/instrumenter/types.ts +var CallStates = /* @__PURE__ */ ((CallStates2) => (CallStates2.DONE = "done", CallStates2.ERROR = "error", CallStates2.ACTIVE = "active", CallStates2.WAITING = "waiting", CallStates2))(CallStates || {}); + +export { + EVENTS, + CallStates +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/formatter-L2YTDE3Q.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/formatter-L2YTDE3Q.js new file mode 100644 index 0000000000000000000000000000000000000000..4e77c69c2ad4d30652e664d69939672aaa17a5fd --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/formatter-L2YTDE3Q.js @@ -0,0 +1,16 @@ +import { + require_memoizerific +} from "./chunk-DRQKCCAG.js"; +import { + dedent +} from "./chunk-3LY4VQVK.js"; +import { + __toESM +} from "./chunk-IMSF75WX.js"; + +// src/components/components/syntaxhighlighter/formatter.ts +var import_memoizerific = __toESM(require_memoizerific(), 1); +var formatter = (0, import_memoizerific.default)(2)(async (type, source) => type === !1 ? source : dedent(source)); +export { + formatter +}; diff --git a/tools/ui/node_modules/storybook/dist/_browser-chunks/syntaxhighlighter-T5IQBZDB.js b/tools/ui/node_modules/storybook/dist/_browser-chunks/syntaxhighlighter-T5IQBZDB.js new file mode 100644 index 0000000000000000000000000000000000000000..3eb7af7ba9962994fcb7cdce5bab1afec3877a5e --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/_browser-chunks/syntaxhighlighter-T5IQBZDB.js @@ -0,0 +1,4084 @@ +import { + ActionBar, + ScrollArea, + useCopyButton +} from "./chunk-W22LQPXL.js"; +import { + _defineProperty, + _objectWithoutProperties +} from "./chunk-UAYGIC3L.js"; +import "./chunk-LITCR56V.js"; +import "./chunk-242VQQM5.js"; +import { + _extends +} from "./chunk-LE2LTDW3.js"; +import { + require_memoizerific +} from "./chunk-DRQKCCAG.js"; +import { + __commonJS, + __toESM +} from "./chunk-IMSF75WX.js"; + +// ../../node_modules/refractor/lang/bash.js +var require_bash = __commonJS({ + "../../node_modules/refractor/lang/bash.js"(exports, module) { + "use strict"; + module.exports = bash2; + bash2.displayName = "bash"; + bash2.aliases = ["shell"]; + function bash2(Prism) { + (function(Prism2) { + var envVars = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", commandAfterHeredoc = { + pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, + lookbehind: !0, + alias: "punctuation", + // this looks reasonably well in all themes + inside: null + // see below + }, insideString = { + bash: commandAfterHeredoc, + environment: { + pattern: RegExp("\\$" + envVars), + alias: "constant" + }, + variable: [ + // [0]: Arithmetic Environment + { + pattern: /\$?\(\([\s\S]+?\)\)/, + greedy: !0, + inside: { + // If there is a $ sign at the beginning highlight $(( and )) as variable + variable: [ + { + pattern: /(^\$\(\([\s\S]+)\)\)/, + lookbehind: !0 + }, + /^\$\(\(/ + ], + number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, + // Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic + operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, + // If there is no $ sign at the beginning highlight (( and )) as punctuation + punctuation: /\(\(?|\)\)?|,|;/ + } + }, + // [1]: Command Substitution + { + pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, + greedy: !0, + inside: { + variable: /^\$\(|^`|\)$|`$/ + } + }, + // [2]: Brace expansion + { + pattern: /\$\{[^}]+\}/, + greedy: !0, + inside: { + operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, + punctuation: /[\[\]]/, + environment: { + pattern: RegExp("(\\{)" + envVars), + lookbehind: !0, + alias: "constant" + } + } + }, + /\$(?:\w+|[#?*!@$])/ + ], + // Escape sequences from echo and printf's manuals, and escaped quotes. + entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ + }; + Prism2.languages.bash = { + shebang: { + pattern: /^#!\s*\/.*/, + alias: "important" + }, + comment: { + pattern: /(^|[^"{\\$])#.*/, + lookbehind: !0 + }, + "function-name": [ + // a) function foo { + // b) foo() { + // c) function foo() { + // but not “foo {” + { + // a) and c) + pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, + lookbehind: !0, + alias: "function" + }, + { + // b) + pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, + alias: "function" + } + ], + // Highlight variable names as variables in for and select beginnings. + "for-or-select": { + pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, + alias: "variable", + lookbehind: !0 + }, + // Highlight variable names as variables in the left-hand part + // of assignments (“=” and “+=”). + "assign-left": { + pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/, + inside: { + environment: { + pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + envVars), + lookbehind: !0, + alias: "constant" + } + }, + alias: "variable", + lookbehind: !0 + }, + string: [ + // Support for Here-documents https://en.wikipedia.org/wiki/Here_document + { + pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, + lookbehind: !0, + greedy: !0, + inside: insideString + }, + // Here-document with quotes around the tag + // → No expansion (so no “inside”). + { + pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, + lookbehind: !0, + greedy: !0, + inside: { + bash: commandAfterHeredoc + } + }, + // “Normal” string + { + // https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html + pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, + lookbehind: !0, + greedy: !0, + inside: insideString + }, + { + // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html + pattern: /(^|[^$\\])'[^']*'/, + lookbehind: !0, + greedy: !0 + }, + { + // https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html + pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, + greedy: !0, + inside: { + entity: insideString.entity + } + } + ], + environment: { + pattern: RegExp("\\$?" + envVars), + alias: "constant" + }, + variable: insideString.variable, + function: { + pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, + lookbehind: !0 + }, + keyword: { + pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, + lookbehind: !0 + }, + // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html + builtin: { + pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, + lookbehind: !0, + // Alias added to make those easier to distinguish from strings. + alias: "class-name" + }, + boolean: { + pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, + lookbehind: !0 + }, + "file-descriptor": { + pattern: /\B&\d\b/, + alias: "important" + }, + operator: { + // Lots of redirections here, but not just that. + pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, + inside: { + "file-descriptor": { + pattern: /^\d/, + alias: "important" + } + } + }, + punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, + number: { + pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, + lookbehind: !0 + } + }, commandAfterHeredoc.inside = Prism2.languages.bash; + for (var toBeCopied = [ + "comment", + "function-name", + "for-or-select", + "assign-left", + "string", + "environment", + "function", + "keyword", + "builtin", + "boolean", + "file-descriptor", + "operator", + "punctuation", + "number" + ], inside = insideString.variable[1].inside, i = 0; i < toBeCopied.length; i++) + inside[toBeCopied[i]] = Prism2.languages.bash[toBeCopied[i]]; + Prism2.languages.shell = Prism2.languages.bash; + })(Prism); + } + } +}); + +// ../../node_modules/refractor/lang/css.js +var require_css = __commonJS({ + "../../node_modules/refractor/lang/css.js"(exports, module) { + "use strict"; + module.exports = css2; + css2.displayName = "css"; + css2.aliases = []; + function css2(Prism) { + (function(Prism2) { + var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; + Prism2.languages.css = { + comment: /\/\*[\s\S]*?\*\//, + atrule: { + pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/, + inside: { + rule: /^@[\w-]+/, + "selector-function-argument": { + pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, + lookbehind: !0, + alias: "selector" + }, + keyword: { + pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, + lookbehind: !0 + } + // See rest below + } + }, + url: { + // https://drafts.csswg.org/css-values-3/#urls + pattern: RegExp( + "\\burl\\((?:" + string.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", + "i" + ), + greedy: !0, + inside: { + function: /^url/i, + punctuation: /^\(|\)$/, + string: { + pattern: RegExp("^" + string.source + "$"), + alias: "url" + } + } + }, + selector: { + pattern: RegExp( + `(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + string.source + ")*(?=\\s*\\{)" + ), + lookbehind: !0 + }, + string: { + pattern: string, + greedy: !0 + }, + property: { + pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, + lookbehind: !0 + }, + important: /!important\b/i, + function: { + pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, + lookbehind: !0 + }, + punctuation: /[(){};:,]/ + }, Prism2.languages.css.atrule.inside.rest = Prism2.languages.css; + var markup2 = Prism2.languages.markup; + markup2 && (markup2.tag.addInlined("style", "css"), markup2.tag.addAttribute("style", "css")); + })(Prism); + } + } +}); + +// ../../node_modules/refractor/lang/graphql.js +var require_graphql = __commonJS({ + "../../node_modules/refractor/lang/graphql.js"(exports, module) { + "use strict"; + module.exports = graphql2; + graphql2.displayName = "graphql"; + graphql2.aliases = []; + function graphql2(Prism) { + Prism.languages.graphql = { + comment: /#.*/, + description: { + pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i, + greedy: !0, + alias: "string", + inside: { + "language-markdown": { + pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/, + lookbehind: !0, + inside: Prism.languages.markdown + } + } + }, + string: { + pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/, + greedy: !0 + }, + number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, + boolean: /\b(?:false|true)\b/, + variable: /\$[a-z_]\w*/i, + directive: { + pattern: /@[a-z_]\w*/i, + alias: "function" + }, + "attr-name": { + pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, + greedy: !0 + }, + "atom-input": { + pattern: /\b[A-Z]\w*Input\b/, + alias: "class-name" + }, + scalar: /\b(?:Boolean|Float|ID|Int|String)\b/, + constant: /\b[A-Z][A-Z_\d]*\b/, + "class-name": { + pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/, + lookbehind: !0 + }, + fragment: { + pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/, + lookbehind: !0, + alias: "function" + }, + "definition-mutation": { + pattern: /(\bmutation\s+)[a-zA-Z_]\w*/, + lookbehind: !0, + alias: "function" + }, + "definition-query": { + pattern: /(\bquery\s+)[a-zA-Z_]\w*/, + lookbehind: !0, + alias: "function" + }, + keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/, + operator: /[!=|&]|\.{3}/, + "property-query": /\w+(?=\s*\()/, + object: /\w+(?=\s*\{)/, + punctuation: /[!(){}\[\]:=,]/, + property: /\w+/ + }, Prism.hooks.add("after-tokenize", function(env) { + if (env.language !== "graphql") + return; + var validTokens = env.tokens.filter(function(token) { + return typeof token != "string" && token.type !== "comment" && token.type !== "scalar"; + }), currentIndex = 0; + function getToken(offset) { + return validTokens[currentIndex + offset]; + } + function isTokenType(types, offset) { + offset = offset || 0; + for (var i2 = 0; i2 < types.length; i2++) { + var token = getToken(i2 + offset); + if (!token || token.type !== types[i2]) + return !1; + } + return !0; + } + function findClosingBracket(open, close) { + for (var stackHeight = 1, i2 = currentIndex; i2 < validTokens.length; i2++) { + var token = validTokens[i2], content = token.content; + if (token.type === "punctuation" && typeof content == "string") { + if (open.test(content)) + stackHeight++; + else if (close.test(content) && (stackHeight--, stackHeight === 0)) + return i2; + } + } + return -1; + } + function addAlias(token, alias) { + var aliases = token.alias; + aliases ? Array.isArray(aliases) || (token.alias = aliases = [aliases]) : token.alias = aliases = [], aliases.push(alias); + } + for (; currentIndex < validTokens.length; ) { + var startToken = validTokens[currentIndex++]; + if (startToken.type === "keyword" && startToken.content === "mutation") { + var inputVariables = []; + if (isTokenType(["definition-mutation", "punctuation"]) && getToken(1).content === "(") { + currentIndex += 2; + var definitionEnd = findClosingBracket(/^\($/, /^\)$/); + if (definitionEnd === -1) + continue; + for (; currentIndex < definitionEnd; currentIndex++) { + var t = getToken(0); + t.type === "variable" && (addAlias(t, "variable-input"), inputVariables.push(t.content)); + } + currentIndex = definitionEnd + 1; + } + if (isTokenType(["punctuation", "property-query"]) && getToken(0).content === "{" && (currentIndex++, addAlias(getToken(0), "property-mutation"), inputVariables.length > 0)) { + var mutationEnd = findClosingBracket(/^\{$/, /^\}$/); + if (mutationEnd === -1) + continue; + for (var i = currentIndex; i < mutationEnd; i++) { + var varToken = validTokens[i]; + varToken.type === "variable" && inputVariables.indexOf(varToken.content) >= 0 && addAlias(varToken, "variable-input"); + } + } + } + } + }); + } + } +}); + +// ../../node_modules/refractor/lang/js-extras.js +var require_js_extras = __commonJS({ + "../../node_modules/refractor/lang/js-extras.js"(exports, module) { + "use strict"; + module.exports = jsExtras2; + jsExtras2.displayName = "jsExtras"; + jsExtras2.aliases = []; + function jsExtras2(Prism) { + (function(Prism2) { + Prism2.languages.insertBefore("javascript", "function-variable", { + "method-variable": { + pattern: RegExp( + "(\\.\\s*)" + Prism2.languages.javascript["function-variable"].pattern.source + ), + lookbehind: !0, + alias: ["function-variable", "method", "function", "property-access"] + } + }), Prism2.languages.insertBefore("javascript", "function", { + method: { + pattern: RegExp( + "(\\.\\s*)" + Prism2.languages.javascript.function.source + ), + lookbehind: !0, + alias: ["function", "property-access"] + } + }), Prism2.languages.insertBefore("javascript", "constant", { + "known-class-name": [ + { + // standard built-ins + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects + pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/, + alias: "class-name" + }, + { + // errors + pattern: /\b(?:[A-Z]\w*)Error\b/, + alias: "class-name" + } + ] + }); + function withId(source, flags) { + return RegExp( + source.replace(//g, function() { + return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source; + }), + flags + ); + } + Prism2.languages.insertBefore("javascript", "keyword", { + imports: { + // https://tc39.es/ecma262/#sec-imports + pattern: withId( + /(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source + ), + lookbehind: !0, + inside: Prism2.languages.javascript + }, + exports: { + // https://tc39.es/ecma262/#sec-exports + pattern: withId( + /(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source + ), + lookbehind: !0, + inside: Prism2.languages.javascript + } + }), Prism2.languages.javascript.keyword.unshift( + { + pattern: /\b(?:as|default|export|from|import)\b/, + alias: "module" + }, + { + pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/, + alias: "control-flow" + }, + { + pattern: /\bnull\b/, + alias: ["null", "nil"] + }, + { + pattern: /\bundefined\b/, + alias: "nil" + } + ), Prism2.languages.insertBefore("javascript", "operator", { + spread: { + pattern: /\.{3}/, + alias: "operator" + }, + arrow: { + pattern: /=>/, + alias: "operator" + } + }), Prism2.languages.insertBefore("javascript", "punctuation", { + "property-access": { + pattern: withId(/(\.\s*)#?/.source), + lookbehind: !0 + }, + "maybe-class-name": { + pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/, + lookbehind: !0 + }, + dom: { + // this contains only a few commonly used DOM variables + pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/, + alias: "variable" + }, + console: { + pattern: /\bconsole(?=\s*\.)/, + alias: "class-name" + } + }); + for (var maybeClassNameTokens = [ + "function", + "function-variable", + "method", + "method-variable", + "property-access" + ], i = 0; i < maybeClassNameTokens.length; i++) { + var token = maybeClassNameTokens[i], value = Prism2.languages.javascript[token]; + Prism2.util.type(value) === "RegExp" && (value = Prism2.languages.javascript[token] = { + pattern: value + }); + var inside = value.inside || {}; + value.inside = inside, inside["maybe-class-name"] = /^[A-Z][\s\S]*/; + } + })(Prism); + } + } +}); + +// ../../node_modules/refractor/lang/json.js +var require_json = __commonJS({ + "../../node_modules/refractor/lang/json.js"(exports, module) { + "use strict"; + module.exports = json2; + json2.displayName = "json"; + json2.aliases = ["webmanifest"]; + function json2(Prism) { + Prism.languages.json = { + property: { + pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, + lookbehind: !0, + greedy: !0 + }, + string: { + pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, + lookbehind: !0, + greedy: !0 + }, + comment: { + pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, + greedy: !0 + }, + number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, + punctuation: /[{}[\],]/, + operator: /:/, + boolean: /\b(?:false|true)\b/, + null: { + pattern: /\bnull\b/, + alias: "keyword" + } + }, Prism.languages.webmanifest = Prism.languages.json; + } + } +}); + +// ../../node_modules/refractor/lang/jsx.js +var require_jsx = __commonJS({ + "../../node_modules/refractor/lang/jsx.js"(exports, module) { + "use strict"; + module.exports = jsx2; + jsx2.displayName = "jsx"; + jsx2.aliases = []; + function jsx2(Prism) { + (function(Prism2) { + var javascript = Prism2.util.clone(Prism2.languages.javascript), space = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, braces = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, spread = /(?:\{*\.{3}(?:[^{}]|)*\})/.source; + function re(source, flags) { + return source = source.replace(//g, function() { + return space; + }).replace(//g, function() { + return braces; + }).replace(//g, function() { + return spread; + }), RegExp(source, flags); + } + spread = re(spread).source, Prism2.languages.jsx = Prism2.languages.extend("markup", javascript), Prism2.languages.jsx.tag.pattern = re( + /<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source + ), Prism2.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, Prism2.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, Prism2.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, Prism2.languages.jsx.tag.inside.comment = javascript.comment, Prism2.languages.insertBefore( + "inside", + "attr-name", + { + spread: { + pattern: re(//.source), + inside: Prism2.languages.jsx + } + }, + Prism2.languages.jsx.tag + ), Prism2.languages.insertBefore( + "inside", + "special-attr", + { + script: { + // Allow for two levels of nesting + pattern: re(/=/.source), + alias: "language-javascript", + inside: { + "script-punctuation": { + pattern: /^=(?=\{)/, + alias: "punctuation" + }, + rest: Prism2.languages.jsx + } + } + }, + Prism2.languages.jsx.tag + ); + var stringifyToken = function(token) { + return token ? typeof token == "string" ? token : typeof token.content == "string" ? token.content : token.content.map(stringifyToken).join("") : ""; + }, walkTokens = function(tokens) { + for (var openedTags = [], i = 0; i < tokens.length; i++) { + var token = tokens[i], notTagNorBrace = !1; + if (typeof token != "string" && (token.type === "tag" && token.content[0] && token.content[0].type === "tag" ? token.content[0].content[0].content === " 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token.content[0].content[1]) && openedTags.pop() : token.content[token.content.length - 1].content === "/>" || openedTags.push({ + tagName: stringifyToken(token.content[0].content[1]), + openedBraces: 0 + }) : openedTags.length > 0 && token.type === "punctuation" && token.content === "{" ? openedTags[openedTags.length - 1].openedBraces++ : openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token.type === "punctuation" && token.content === "}" ? openedTags[openedTags.length - 1].openedBraces-- : notTagNorBrace = !0), (notTagNorBrace || typeof token == "string") && openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) { + var plainText = stringifyToken(token); + i < tokens.length - 1 && (typeof tokens[i + 1] == "string" || tokens[i + 1].type === "plain-text") && (plainText += stringifyToken(tokens[i + 1]), tokens.splice(i + 1, 1)), i > 0 && (typeof tokens[i - 1] == "string" || tokens[i - 1].type === "plain-text") && (plainText = stringifyToken(tokens[i - 1]) + plainText, tokens.splice(i - 1, 1), i--), tokens[i] = new Prism2.Token( + "plain-text", + plainText, + null, + plainText + ); + } + token.content && typeof token.content != "string" && walkTokens(token.content); + } + }; + Prism2.hooks.add("after-tokenize", function(env) { + env.language !== "jsx" && env.language !== "tsx" || walkTokens(env.tokens); + }); + })(Prism); + } + } +}); + +// ../../node_modules/refractor/lang/markdown.js +var require_markdown = __commonJS({ + "../../node_modules/refractor/lang/markdown.js"(exports, module) { + "use strict"; + module.exports = markdown2; + markdown2.displayName = "markdown"; + markdown2.aliases = ["md"]; + function markdown2(Prism) { + (function(Prism2) { + var inner = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source; + function createInline(pattern) { + return pattern = pattern.replace(//g, function() { + return inner; + }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + pattern + ")"); + } + var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace( + /__/g, + function() { + return tableCell; + } + ), tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source; + Prism2.languages.markdown = Prism2.languages.extend("markup", {}), Prism2.languages.insertBefore("markdown", "prolog", { + "front-matter-block": { + pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/, + lookbehind: !0, + greedy: !0, + inside: { + punctuation: /^---|---$/, + "front-matter": { + pattern: /\S+(?:\s+\S+)*/, + alias: ["yaml", "language-yaml"], + inside: Prism2.languages.yaml + } + } + }, + blockquote: { + // > ... + pattern: /^>(?:[\t ]*>)*/m, + alias: "punctuation" + }, + table: { + pattern: RegExp( + "^" + tableRow + tableLine + "(?:" + tableRow + ")*", + "m" + ), + inside: { + "table-data-rows": { + pattern: RegExp( + "^(" + tableRow + tableLine + ")(?:" + tableRow + ")*$" + ), + lookbehind: !0, + inside: { + "table-data": { + pattern: RegExp(tableCell), + inside: Prism2.languages.markdown + }, + punctuation: /\|/ + } + }, + "table-line": { + pattern: RegExp("^(" + tableRow + ")" + tableLine + "$"), + lookbehind: !0, + inside: { + punctuation: /\||:?-{3,}:?/ + } + }, + "table-header-row": { + pattern: RegExp("^" + tableRow + "$"), + inside: { + "table-header": { + pattern: RegExp(tableCell), + alias: "important", + inside: Prism2.languages.markdown + }, + punctuation: /\|/ + } + } + } + }, + code: [ + { + // Prefixed by 4 spaces or 1 tab and preceded by an empty line + pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/, + lookbehind: !0, + alias: "keyword" + }, + { + // ```optional language + // code block + // ``` + pattern: /^```[\s\S]*?^```$/m, + greedy: !0, + inside: { + "code-block": { + pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m, + lookbehind: !0 + }, + "code-language": { + pattern: /^(```).+/, + lookbehind: !0 + }, + punctuation: /```/ + } + } + ], + title: [ + { + // title 1 + // ======= + // title 2 + // ------- + pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m, + alias: "important", + inside: { + punctuation: /==+$|--+$/ + } + }, + { + // # title 1 + // ###### title 6 + pattern: /(^\s*)#.+/m, + lookbehind: !0, + alias: "important", + inside: { + punctuation: /^#+|#+$/ + } + } + ], + hr: { + // *** + // --- + // * * * + // ----------- + pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, + lookbehind: !0, + alias: "punctuation" + }, + list: { + // * item + // + item + // - item + // 1. item + pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, + lookbehind: !0, + alias: "punctuation" + }, + "url-reference": { + // [id]: http://example.com "Optional title" + // [id]: http://example.com 'Optional title' + // [id]: http://example.com (Optional title) + // [id]: "Optional title" + pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, + inside: { + variable: { + pattern: /^(!?\[)[^\]]+/, + lookbehind: !0 + }, + string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, + punctuation: /^[\[\]!:]|[<>]/ + }, + alias: "url" + }, + bold: { + // **strong** + // __strong__ + // allow one nested instance of italic text using the same delimiter + pattern: createInline( + /\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source + ), + lookbehind: !0, + greedy: !0, + inside: { + content: { + pattern: /(^..)[\s\S]+(?=..$)/, + lookbehind: !0, + inside: {} + // see below + }, + punctuation: /\*\*|__/ + } + }, + italic: { + // *em* + // _em_ + // allow one nested instance of bold text using the same delimiter + pattern: createInline( + /\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source + ), + lookbehind: !0, + greedy: !0, + inside: { + content: { + pattern: /(^.)[\s\S]+(?=.$)/, + lookbehind: !0, + inside: {} + // see below + }, + punctuation: /[*_]/ + } + }, + strike: { + // ~~strike through~~ + // ~strike~ + // eslint-disable-next-line regexp/strict + pattern: createInline(/(~~?)(?:(?!~))+\2/.source), + lookbehind: !0, + greedy: !0, + inside: { + content: { + pattern: /(^~~?)[\s\S]+(?=\1$)/, + lookbehind: !0, + inside: {} + // see below + }, + punctuation: /~~?/ + } + }, + "code-snippet": { + // `code` + // ``code`` + pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/, + lookbehind: !0, + greedy: !0, + alias: ["code", "keyword"] + }, + url: { + // [example](http://example.com "Optional title") + // [example][id] + // [example] [id] + pattern: createInline( + /!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source + ), + lookbehind: !0, + greedy: !0, + inside: { + operator: /^!/, + content: { + pattern: /(^\[)[^\]]+(?=\])/, + lookbehind: !0, + inside: {} + // see below + }, + variable: { + pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/, + lookbehind: !0 + }, + url: { + pattern: /(^\]\()[^\s)]+/, + lookbehind: !0 + }, + string: { + pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/, + lookbehind: !0 + } + } + } + }), ["url", "bold", "italic", "strike"].forEach(function(token) { + ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(inside) { + token !== inside && (Prism2.languages.markdown[token].inside.content.inside[inside] = Prism2.languages.markdown[inside]); + }); + }), Prism2.hooks.add("after-tokenize", function(env) { + if (env.language !== "markdown" && env.language !== "md") + return; + function walkTokens(tokens) { + if (!(!tokens || typeof tokens == "string")) + for (var i = 0, l = tokens.length; i < l; i++) { + var token = tokens[i]; + if (token.type !== "code") { + walkTokens(token.content); + continue; + } + var codeLang = token.content[1], codeBlock = token.content[3]; + if (codeLang && codeBlock && codeLang.type === "code-language" && codeBlock.type === "code-block" && typeof codeLang.content == "string") { + var lang = codeLang.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"); + lang = (/[a-z][\w-]*/i.exec(lang) || [""])[0].toLowerCase(); + var alias = "language-" + lang; + codeBlock.alias ? typeof codeBlock.alias == "string" ? codeBlock.alias = [codeBlock.alias, alias] : codeBlock.alias.push(alias) : codeBlock.alias = [alias]; + } + } + } + walkTokens(env.tokens); + }), Prism2.hooks.add("wrap", function(env) { + if (env.type === "code-block") { + for (var codeLang = "", i = 0, l = env.classes.length; i < l; i++) { + var cls = env.classes[i], match = /language-(.+)/.exec(cls); + if (match) { + codeLang = match[1]; + break; + } + } + var grammar = Prism2.languages[codeLang]; + if (grammar) + env.content = Prism2.highlight( + textContent(env.content.value), + grammar, + codeLang + ); + else if (codeLang && codeLang !== "none" && Prism2.plugins.autoloader) { + var id = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16); + env.attributes.id = id, Prism2.plugins.autoloader.loadLanguages(codeLang, function() { + var ele = document.getElementById(id); + ele && (ele.innerHTML = Prism2.highlight( + ele.textContent, + Prism2.languages[codeLang], + codeLang + )); + }); + } + } + }); + var tagPattern = RegExp(Prism2.languages.markup.tag.pattern.source, "gi"), KNOWN_ENTITY_NAMES = { + amp: "&", + lt: "<", + gt: ">", + quot: '"' + }, fromCodePoint = String.fromCodePoint || String.fromCharCode; + function textContent(html) { + var text = html.replace(tagPattern, ""); + return text = text.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(m, code) { + if (code = code.toLowerCase(), code[0] === "#") { + var value; + return code[1] === "x" ? value = parseInt(code.slice(2), 16) : value = Number(code.slice(1)), fromCodePoint(value); + } else { + var known = KNOWN_ENTITY_NAMES[code]; + return known || m; + } + }), text; + } + Prism2.languages.md = Prism2.languages.markdown; + })(Prism); + } + } +}); + +// ../../node_modules/refractor/lang/markup.js +var require_markup = __commonJS({ + "../../node_modules/refractor/lang/markup.js"(exports, module) { + "use strict"; + module.exports = markup2; + markup2.displayName = "markup"; + markup2.aliases = ["html", "mathml", "svg", "xml", "ssml", "atom", "rss"]; + function markup2(Prism) { + Prism.languages.markup = { + comment: { + pattern: //, + greedy: !0 + }, + prolog: { + pattern: /<\?[\s\S]+?\?>/, + greedy: !0 + }, + doctype: { + // https://www.w3.org/TR/xml/#NT-doctypedecl + pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, + greedy: !0, + inside: { + "internal-subset": { + pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, + lookbehind: !0, + greedy: !0, + inside: null + // see below + }, + string: { + pattern: /"[^"]*"|'[^']*'/, + greedy: !0 + }, + punctuation: /^$|[[\]]/, + "doctype-tag": /^DOCTYPE/i, + name: /[^\s<>'"]+/ + } + }, + cdata: { + pattern: //i, + greedy: !0 + }, + tag: { + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, + greedy: !0, + inside: { + tag: { + pattern: /^<\/?[^\s>\/]+/, + inside: { + punctuation: /^<\/?/, + namespace: /^[^\s>\/:]+:/ + } + }, + "special-attr": [], + "attr-value": { + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, + inside: { + punctuation: [ + { + pattern: /^=/, + alias: "attr-equals" + }, + /"|'/ + ] + } + }, + punctuation: /\/?>/, + "attr-name": { + pattern: /[^\s>\/]+/, + inside: { + namespace: /^[^\s>\/:]+:/ + } + } + } + }, + entity: [ + { + pattern: /&[\da-z]{1,8};/i, + alias: "named-entity" + }, + /&#x?[\da-f]{1,8};/i + ] + }, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.languages.markup.doctype.inside["internal-subset"].inside = Prism.languages.markup, Prism.hooks.add("wrap", function(env) { + env.type === "entity" && (env.attributes.title = env.content.value.replace(/&/, "&")); + }), Object.defineProperty(Prism.languages.markup.tag, "addInlined", { + /** + * Adds an inlined language to markup. + * + * An example of an inlined language is CSS with ` or + + + + + + + + + +
+
+

Manifest Debugger

+
${allPill}${compErrorsPill}${compInfosPill}${storiesPill}${docsPill}
+
+
+
+
+ ${activeEngine === "react-docgen" ? `
+ Tip: You are using react-docgen (the default). Generation took ${(durationMs / 1e3).toFixed(1)}s. For higher quality prop types, consider switching to react-docgen-typescript in your main.ts: +
typescript: {
+  reactDocgen: 'react-docgen-typescript',
+}
+ Note: react-docgen-typescript can be slower. If performance is acceptable for your project, it generally produces better results. + Learn more +
` : activeEngine === "react-docgen-typescript" && durationMs > 7500 ? `
+ Performance warning: react-docgen-typescript took ${(durationMs / 1e3).toFixed(1)}s to generate the manifest. This delay applies every time the manifest is used by an agent. Consider switching to the faster react-docgen in your main.ts: +
typescript: {
+  reactDocgen: 'react-docgen',
+}
+ Learn more +
` : `
+ Using ${activeEngine}. Generation took ${(durationMs / 1e3).toFixed(1)}s. +
`} + ${grid ? `

Components

+
+ ${grid} +
` : ""} + ${errorGroups.length ? `
${errorGroupsHTML}
` : ""} + ${docsGrid ? `

Unattached Docs

+
+ ${docsGrid} +
` : ""} + ${!grid && !docsGrid ? '
No components or docs.
' : ""} +
+
+ + `; +} +var esc = (s) => String(s ?? "").replace(/[&<>"']/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[c] ?? c), plural = (n, one2, many = `${one2}s`) => n === 1 ? one2 : many; +function analyzeComponent(c) { + let hasPropTypeError = !!c.error, warns = []; + c.description?.trim() || warns.push("No description found. Write a jsdoc comment such as /** Component description */."), c.import?.trim() || warns.push( + `Specify an @import jsdoc tag on your component or your stories meta such as @import import { ${c.name} } from 'my-design-system';` + ); + let allStories = storyEntries(c.stories), totalStories = allStories.length, storyErrors = allStories.filter((e) => !!e?.error).length, storyOk = totalStories - storyErrors, docsEntries = c.docs ? Object.values(c.docs) : [], totalDocs = docsEntries.length, docsErrors = docsEntries.filter((d) => !!d?.error).length, docsOk = totalDocs - docsErrors, hasAnyError = hasPropTypeError || storyErrors > 0 || docsErrors > 0; + return { + hasPropTypeError, + hasAnyError, + hasWarns: warns.length > 0, + warns, + totalStories, + storyErrors, + storyOk, + totalDocs, + docsErrors, + docsOk + }; +} +function analyzeDoc(d) { + return { + hasError: !!d.error + }; +} +function note(title, bodyHTML, kind) { + return ` +
+
${esc(title)}
+
${bodyHTML}
+
`; +} +function renderDocCard(key2, d, id) { + let a = analyzeDoc(d), statusDot = a.hasError ? "dot-err" : "dot-ok", slug = `${id}-${(d.id || key2).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")}`, errorBadge = a.hasError ? `` : "", contentBadge = d.content ? `` : ""; + return ` +
+
+
+

${esc(d.title || d.name || key2)}

+
+ ${errorBadge} + ${contentBadge} +
+
+
${d.path ? `${esc(d.id)} \xB7 ${esc(d.path)}` : esc(d.id)}
+ ${d.summary ? `
${esc(d.summary)}
` : ""} +
+ + + ${a.hasError ? `` : ""} + ${d.content ? `` : ""} + +
+ ${a.hasError ? ` +
+
+
${esc(d.error?.name || "Error")}
+
${esc(d.error?.message || "Unknown error")}
+
+
` : ""} + ${d.content ? ` +
+
+
${esc(d.content)}
+
+
` : ""} +
+
`; +} +function renderComponentCard(key2, c, id) { + let a = analyzeComponent(c), statusDot = a.hasAnyError ? "dot-err" : "dot-ok", allStories = storyEntries(c.stories), errorStories = allStories.filter((ex) => !!ex?.error), okStories = allStories.filter((ex) => !ex?.error), subcomponentEntries = Object.entries(c.subcomponents ?? {}), allDocs = c.docs ? Object.values(c.docs) : [], errorDocs = allDocs.filter((d) => !!d?.error), okDocs = allDocs.filter((d) => !d?.error), slug = `c-${id}-${(c.id || key2).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")}`, componentErrorBadge = a.hasPropTypeError ? `` : "", infosBadge = a.hasWarns ? `` : "", storiesBadge = a.totalStories > 0 ? `` : "", docsBadge = a.totalDocs > 0 ? `` : "", subcomponentsBadge = subcomponentEntries.length > 0 ? `` : "", { + parsed: activeParsed, + engine: cardEngine, + filePath, + exportName + } = docgenRenderData(c, a.hasPropTypeError), propEntries = activeParsed ? Object.entries(activeParsed.props ?? {}) : [], propTypesBadge = !a.hasPropTypeError && propEntries.length > 0 ? `` : "", primaryBadge = componentErrorBadge || propTypesBadge, propsCode = propEntries.length > 0 ? propEntries.sort(([aName], [bName]) => aName.localeCompare(bName)).map(([propName, info]) => { + let description = (info?.description ?? "").trim(), t = (info?.type ?? "any").trim(), optional = info?.required ? "" : "?", defaultVal = (info?.defaultValue ?? "").trim(), def = defaultVal ? ` = ${defaultVal}` : "", doc = ["/**", ...description.split(` +`).map((line) => ` * ${line}`), " */"].join(` +`) + ` +`; + return `${description ? doc : ""}${propName}${optional}: ${t}${def}`; + }).join(` + +`) : "", tags = c.jsDocTags && typeof c.jsDocTags == "object" ? Object.entries(c.jsDocTags).flatMap( + ([k, v]) => (Array.isArray(v) ? v : [v]).map( + (val) => `${esc(k)}: ${esc(val)}` + ) + ).join("") : ""; + return ` +
+
+
+

${esc(c.name || key2)}

+
+ ${primaryBadge} + ${infosBadge} + ${storiesBadge} + ${docsBadge} + ${subcomponentsBadge} +
+
+
${esc(c.id)} \xB7 ${esc(c.path)}
+ ${c.summary ? `
${esc(c.summary)}
` : ""} + ${c.description ? `
${esc(c.description)}
` : ""} + ${tags ? `
${tags}
` : ""} +
+ + + ${a.hasPropTypeError ? `` : ""} + ${a.hasWarns ? `` : ""} + ${a.totalStories > 0 ? `` : ""} + ${a.totalDocs > 0 ? `` : ""} + ${subcomponentEntries.length > 0 ? `` : ""} + ${!a.hasPropTypeError && propEntries.length > 0 ? `` : ""} + +
+ ${a.hasPropTypeError ? ` +
+ ${note("Prop type error", `
${esc(c.error?.message || "Unknown error")}
`, "err")} +
` : ""} + ${a.hasWarns ? ` +
+ ${a.warns.map((w) => note("Info", esc(w), "info")).join("")} +
` : ""} + ${!a.hasPropTypeError && propEntries.length > 0 ? ` +
+
+
+ Prop types (${cardEngine}) + ${propEntries.length} ${plural(propEntries.length, "prop type")} +
+
Component: ${filePath ? esc(path.relative(process.cwd(), filePath)) : ""}${exportName ? "::" + esc(exportName) : ""}
+
Props:
+
${esc(propsCode)}
+
+
` : ""} + ${a.totalStories > 0 ? ` +
+ ${errorStories.map( + (ex) => ` +
+
+ ${esc(ex.name)} + story error +
+ ${ex?.summary ? `
Summary: ${esc(ex.summary)}
` : ""} + ${ex?.description ? `
${esc(ex.description)}
` : ""} + ${ex?.snippet ? `
${esc(ex.snippet)}
` : ""} + ${ex?.error?.message ? `
${esc(ex.error.message)}
` : ""} +
` + ).join("")} + + + ${c.import ? `
+
+ Imports +
+
${c.import}
+
` : ""} + + ${okStories.map( + (ex) => ` +
+
+ ${esc(ex.name)} + story ok +
+ ${ex?.summary ? `
${esc(ex.summary)}
` : ""} + ${ex?.description ? `
${esc(ex.description)}
` : ""} + ${ex?.snippet ? `
${esc(ex.snippet)}
` : ""} +
` + ).join("")} +
` : ""} + ${a.totalDocs > 0 ? ` +
+ ${errorDocs.map( + (doc) => ` +
+
+ ${esc(doc.name)} + doc error +
+ ${doc.path ? `
${esc(doc.path)}
` : ""} + ${doc?.summary ? `
${esc(doc.summary)}
` : ""} + ${doc?.error?.message ? `
${esc(doc.error.message)}
` : ""} +
` + ).join("")} + ${okDocs.map( + (doc) => ` +
+
+ ${esc(doc.name)} + doc ok +
+ ${doc.path ? `
${esc(doc.path)}
` : ""} + ${doc?.summary ? `
${esc(doc.summary)}
` : ""} + ${doc?.content ? `
${esc(doc.content)}
` : ""} +
` + ).join("")} +
` : ""} + ${subcomponentEntries.length > 0 ? ` +
+ ${subcomponentEntries.map( + ([subcomponentName, subcomponent]) => renderSubcomponentNote(subcomponentName, subcomponent) + ).join("")} +
` : ""} +
+
`; +} +var docgenRenderData = (component, hasPropTypeError) => hasPropTypeError ? {} : component.reactDocgen ? { + parsed: parseReactDocgen(component.reactDocgen), + engine: "react-docgen", + filePath: component.reactDocgen.definedInFile, + exportName: component.reactDocgen.exportName +} : component.reactDocgenTypescript ? { + parsed: parseReactDocgenTypescript(component.reactDocgenTypescript), + engine: "react-docgen-typescript", + filePath: component.reactDocgenTypescript.filePath, + exportName: component.reactDocgenTypescript.exportName +} : component.reactComponentMeta ? { + parsed: parseReactComponentMeta(component.reactComponentMeta), + engine: "react-component-meta", + filePath: component.reactComponentMeta.filePath, + exportName: component.reactComponentMeta.exportName +} : {}; +function renderSubcomponentNote(subcomponentName, subcomponent) { + let hasPropTypeError = !!subcomponent.error, { parsed, engine, filePath, exportName } = docgenRenderData(subcomponent, hasPropTypeError), propEntries = Object.entries(parsed?.props ?? {}), tags = subcomponent.jsDocTags && typeof subcomponent.jsDocTags == "object" ? Object.entries(subcomponent.jsDocTags).flatMap( + ([key2, value]) => (Array.isArray(value) ? value : [value]).map( + (tagValue) => `${esc(key2)}: ${esc(tagValue)}` + ) + ).join("") : "", propsCode = propEntries.length > 0 ? propEntries.sort(([aName], [bName]) => aName.localeCompare(bName)).map(([propName, info]) => { + let description = (info?.description ?? "").trim(), type = (info?.type ?? "any").trim(), optional = info?.required ? "" : "?", defaultValue = (info?.defaultValue ?? "").trim(), fallback = defaultValue ? ` = ${defaultValue}` : "", doc = ["/**", ...description.split(` +`).map((line) => ` * ${line}`), " */"].join(` +`) + ` +`; + return `${description ? doc : ""}${propName}${optional}: ${type}${fallback}`; + }).join(` + +`) : ""; + return ` +
+
+ ${esc(subcomponentName)} + + ${hasPropTypeError ? "prop type error" : propEntries.length > 0 ? `${propEntries.length} ${plural(propEntries.length, "prop type")}` : "no prop types"} + +
+
${esc(subcomponent.path)}
+ ${subcomponent.summary ? `
${esc(subcomponent.summary)}
` : ""} + ${subcomponent.description ? `
${esc(subcomponent.description)}
` : ""} + ${tags ? `
${tags}
` : ""} + ${subcomponent.import ? `
${esc(subcomponent.import)}
` : ""} + ${hasPropTypeError ? `
${esc(subcomponent.error?.message ?? "Unknown error")}
` : ""} + ${!hasPropTypeError && propEntries.length > 0 ? ` +
Component: ${filePath ? esc(path.relative(process.cwd(), filePath)) : ""}${exportName ? "::" + esc(exportName) : ""}${engine ? ` (${esc(engine)})` : ""}
+
${esc(propsCode)}
` : ""} +
+ `; +} +var parseReactDocgenTypescript = (reactDocgenTypescript) => { + let props = reactDocgenTypescript.props ?? {}; + return { + props: Object.fromEntries( + Object.entries(props).map(([propName, prop]) => [ + propName, + { + description: prop.description, + // RDT uses prop.type.name as a flat string (e.g. "() => void", "{ id: string }") + // For enums, prefer prop.type.raw which has the full union + type: prop.type?.raw ?? prop.type?.name, + defaultValue: prop.defaultValue?.value, + required: prop.required + } + ]) + ) + }; +}, parseReactComponentMeta = (reactComponentMeta) => { + let props = reactComponentMeta.props ?? {}; + return { + props: Object.fromEntries( + Object.entries(props).map(([propName, prop]) => [ + propName, + { + description: prop.description, + type: prop.type?.raw ?? prop.type?.name, + defaultValue: prop.defaultValue?.value, + required: prop.required + } + ]) + ) + }; +}, parseReactDocgen = (reactDocgen) => { + let props = reactDocgen.props ?? {}; + return { + props: Object.fromEntries( + Object.entries(props).map(([propName, prop]) => [ + propName, + { + description: prop.description, + type: serializeTsType(prop.tsType ?? prop.type), + defaultValue: prop.defaultValue?.value, + required: prop.required + } + ]) + ) + }; +}; +function serializeTsType(tsType) { + if (tsType) { + if (tsType.raw && tsType.raw.trim().length > 0) + return tsType.raw; + if (tsType.name) { + if (tsType.elements) { + if (tsType.name === "union") + return tsType.elements.map((el) => serializeTsType(el) ?? "unknown").join(" | "); + if (tsType.name === "intersection") + return tsType.elements.map((el) => serializeTsType(el) ?? "unknown").join(" & "); + if (tsType.name === "Array") { + let el = tsType.elements[0]; + return `${serializeTsType(el) ?? "unknown"}[]`; + } + if (tsType.name === "tuple") + return `[${tsType.elements.map((el) => serializeTsType(el) ?? "unknown").join(", ")}]`; + } + if (tsType.value && tsType.name === "literal") + return tsType.value; + if (tsType.signature && tsType.name === "signature") { + if (tsType.type === "function") { + let args = (tsType.signature.arguments ?? []).map((a) => { + let argType = serializeTsType(a.type) ?? "any"; + return `${a.name}: ${argType}`; + }), ret = serializeTsType(tsType.signature.return) ?? "void"; + return `(${args.join(", ")}) => ${ret}`; + } + return tsType.type === "object" ? `{ ${(tsType.signature.properties ?? []).map((p) => { + let req = !!p.value?.required, propType = serializeTsType(p.value) ?? "any"; + return `${p.key}${req ? "" : "?"}: ${propType}`; + }).join("; ")} }` : "unknown"; + } + if (tsType.elements) { + let inner = tsType.elements.map((el) => serializeTsType(el) ?? "unknown"); + if (inner.length > 0) + return `${tsType.name}<${inner.join(", ")}>`; + } + return tsType.name; + } + } +} + +// src/core-server/utils/manifests/manifests.ts +function buildComponentsManifest(components, meta) { + return { + v: 1, + components, + meta + }; +} +function mergeServicePayloads(docgenPayloads, storyDocsPayloads, componentIds) { + return Object.fromEntries( + componentIds.flatMap((id) => { + let docgen = docgenPayloads[id]; + return docgen ? [[id, mergeManifestPayloads(docgen, storyDocsPayloads[id])]] : []; + }) + ); +} +function isDocgenServerManifestMode(features) { + return features.experimentalDocgenServer === !0 && features.componentsManifest === !0; +} +function isDocsManifest(manifest) { + return typeof manifest == "object" && manifest !== null && "docs" in manifest; +} +async function getManifestEntries(presets) { + let generator = await presets.apply("storyIndexGenerator"); + invariant(generator, "storyIndexGenerator must be configured"); + let index2 = await generator.getIndex(); + return Object.values(index2.entries).filter( + (entry) => entry.tags?.includes(Tag.MANIFEST) ?? !1 + ); +} +function getManifestComponentIds(manifestEntries) { + return Array.from(selectComponentEntriesByComponentId(manifestEntries).keys()); +} +async function getManifests(presets, manifestEntries, { watch: watch2 } = {}) { + return await presets.apply("experimental_manifests", void 0, { + manifestEntries, + watch: watch2 + }) ?? {}; +} +function resolveDocgenMeta(manifests, durationMs) { + let presetMeta = manifests.components?.meta; + return invariant( + presetMeta?.docgen, + "experimental_manifests must supply components.meta.docgen when experimentalDocgenServer is enabled" + ), { docgen: presetMeta.docgen, durationMs }; +} +function withDocsOnlyComponents(components, manifestComponentIds, docsByComponentId) { + let next = { ...components }; + for (let id of manifestComponentIds) + !next[id] && docsByComponentId[id] && (next[id] = mergeManifestPayloads(createDocsOnlyDocgenPayload(id))); + return next; +} +async function renderComponentsHtmlFromService(manifests, manifestComponentIds, docsManifest) { + let docgenService = getService("core/docgen"), storyDocsService = getService("core/story-docs"), startTime = performance.now(), [allDocgenPayloads, allStoryDocsPayloads, mdxPayloads] = await Promise.all([ + docgenService.queries.docgenForAllComponents.loaded(), + storyDocsService.queries.storyDocsForAllComponents.loaded(), + loadMdxPayloadsFromServiceIfNeeded(manifests, docsManifest) + ]), durationMs = Math.round(performance.now() - startTime), docsByComponentId = getAttachedDocsByComponent(manifests.components), components = withDocsOnlyComponents( + mergeServicePayloads(allDocgenPayloads, allStoryDocsPayloads, manifestComponentIds), + manifestComponentIds, + docsByComponentId + ), load = createServiceLoader(mdxPayloads), [componentsWithDocs, resolvedDocsManifest] = await Promise.all([ + resolveComponentDocs(components, manifests, load, fullTransform), + resolveDocsManifestRefs(docsManifest, load, fullTransform) + ]); + return renderComponentsManifest( + buildComponentsManifest(componentsWithDocs, resolveDocgenMeta(manifests, durationMs)), + resolvedDocsManifest + ); +} +async function writeManifestJsonFiles(outputDir, manifests, { skipComponents = !1 } = {}) { + await Promise.all( + Object.entries(manifests).filter(([name2]) => !skipComponents || name2 !== "components").map( + ([name2, content3]) => writeFile2(join(outputDir, "manifests", `${name2}.json`), JSON.stringify(content3, null, 2)) + ) + ); +} +async function writeDocgenServerManifests(outputDir, manifests, manifestComponentIds, docsManifest) { + let hasOtherManifests = Object.keys(manifests).some((name2) => name2 !== "components"), shouldWriteHtml = manifestComponentIds.length > 0 || !!docsManifest; + if (!hasOtherManifests && !shouldWriteHtml) + return; + let manifestsDir = join(outputDir, "manifests"); + await mkdir(manifestsDir, { recursive: !0 }); + let startTime = performance.now(), [docgenPayloads, storyDocsPayloads] = await Promise.all([ + loadDocgenPayloadsFromDisk(outputDir, manifestComponentIds), + loadStoryDocsPayloadsFromDisk(outputDir, manifestComponentIds) + ]), durationMs = Math.round(performance.now() - startTime), docsByComponentId = getAttachedDocsByComponent(manifests.components), mergedComponents = withDocsOnlyComponents( + mergeServicePayloads(docgenPayloads, storyDocsPayloads, manifestComponentIds), + manifestComponentIds, + docsByComponentId + ), load = createDiskLoader(outputDir), [attachedDocsWithSummaries, docsManifestWithSummaries] = await Promise.all([ + injectAttachedDocsSummaries(docsByComponentId, load), + resolveDocsManifestRefs(docsManifest, load, shallowSummaryTransform) + ]); + if (manifestComponentIds.length > 0 && await writeFile2( + join(manifestsDir, "components.json"), + JSON.stringify( + buildComponentsRefManifest( + toComponentManifestIndexEntries( + manifestComponentIds, + docgenPayloads, + storyDocsPayloads, + attachedDocsWithSummaries + ), + manifests.components?.meta + ), + null, + 2 + ) + ), await writeManifestJsonFiles( + outputDir, + docsManifestWithSummaries ? { ...manifests, docs: docsManifestWithSummaries } : manifests, + { skipComponents: !0 } + ), shouldWriteHtml) { + let [componentsWithDocs, resolvedDocsManifest] = await Promise.all([ + resolveComponentDocs(mergedComponents, manifests, load, fullTransform), + resolveDocsManifestRefs(docsManifest, load, fullTransform) + ]); + await writeFile2( + join(manifestsDir, "components.html"), + renderComponentsManifest( + buildComponentsManifest(componentsWithDocs, resolveDocgenMeta(manifests, durationMs)), + resolvedDocsManifest + ) + ); + } +} +async function writeLegacyManifests(outputDir, manifests, docsManifest) { + if (Object.keys(manifests).length === 0) + return; + let manifestsDir = join(outputDir, "manifests"); + await mkdir(manifestsDir, { recursive: !0 }), await writeManifestJsonFiles(outputDir, manifests), ("components" in manifests || "docs" in manifests) && await writeFile2( + join(manifestsDir, "components.html"), + renderComponentsManifest(manifests.components, docsManifest) + ); +} +async function writeManifests(outputDir, presets) { + try { + let features = await presets.apply("features"), manifestEntries = await getManifestEntries(presets), manifests = await getManifests(presets, manifestEntries), docsManifest = isDocsManifest(manifests.docs) ? manifests.docs : void 0; + if (isDocgenServerManifestMode(features)) { + await writeDocgenServerManifests( + outputDir, + manifests, + getManifestComponentIds(manifestEntries), + docsManifest + ); + return; + } + await writeLegacyManifests(outputDir, manifests, docsManifest); + } catch (e) { + logger3.error("Failed to generate manifests"), logger3.error(e instanceof Error ? e : String(e)); + } +} +function registerManifests({ app, presets }) { + let useDocgenServerPromise, isDocgenServerEnabled = () => (useDocgenServerPromise ??= presets.apply("features").then((features) => isDocgenServerManifestMode(features ?? {})), useDocgenServerPromise); + app.get("/manifests/:name.json", async (req, res) => { + try { + if (await isDocgenServerEnabled() && (req.params.name === "components" || req.params.name === "docs")) { + res.statusCode = 404, res.end( + `Manifest "${req.params.name}" is not available in dev when experimentalDocgenServer is enabled` + ); + return; + } + let manifestEntries = await getManifestEntries(presets), manifest = (await getManifests(presets, manifestEntries, { watch: !0 }))[req.params.name]; + manifest ? (res.setHeader("Content-Type", "application/json"), res.end(JSON.stringify(manifest))) : (res.statusCode = 404, res.end(`Manifest "${req.params.name}" not found`)); + } catch (e) { + logger3.error(e instanceof Error ? e : String(e)), res.statusCode = 500, res.end(e instanceof Error ? e.toString() : String(e)); + } + }), app.get("/manifests/components.html", async (req, res) => { + try { + let manifestEntries = await getManifestEntries(presets), manifests = await getManifests(presets, manifestEntries, { watch: !0 }), docsManifest = isDocsManifest(manifests.docs) ? manifests.docs : void 0; + if (await isDocgenServerEnabled()) { + res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end( + await renderComponentsHtmlFromService( + manifests, + getManifestComponentIds(manifestEntries), + docsManifest + ) + ); + return; + } + let componentsManifest = manifests.components; + if (!componentsManifest && !docsManifest) { + res.statusCode = 404, res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end("
No components or docs manifest configured.
"); + return; + } + res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end(renderComponentsManifest(componentsManifest, docsManifest)); + } catch (e) { + res.statusCode = 500, res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end(`
${e instanceof Error ? e.stack : String(e)}
`); + } + }); +} + +// src/core-server/utils/metadata.ts +import { writeFile as writeFile3 } from "node:fs/promises"; +import { getStorybookMetadata } from "storybook/internal/telemetry"; +async function extractStorybookMetadata(outputFile, configDir) { + let storybookMetadata = await getStorybookMetadata(configDir); + await writeFile3(outputFile, JSON.stringify(storybookMetadata)); +} +function useStorybookMetadata(app, configDir) { + app.use("/project.json", async (req, res) => { + let storybookMetadata = await getStorybookMetadata(configDir); + res.setHeader("Content-Type", "application/json"), res.write(JSON.stringify(storybookMetadata)), res.end(); + }); +} + +// src/core-server/utils/output-stats.ts +var import_json_ext = __toESM(require_src2(), 1), import_picocolors2 = __toESM(require_picocolors(), 1); +import { createWriteStream } from "node:fs"; +import { join as join4 } from "node:path"; +import { logger as logger4 } from "storybook/internal/node-logger"; +async function outputStats(directory, previewStats, managerStats) { + if (previewStats) { + let filePath = await writeStats(directory, "preview", previewStats); + logger4.info(`Preview stats written to ${import_picocolors2.default.cyan(filePath)}`); + } + if (managerStats) { + let filePath = await writeStats(directory, "manager", managerStats); + logger4.info(`Manager stats written to ${import_picocolors2.default.cyan(filePath)}`); + } +} +var writeStats = async (directory, name2, stats) => { + let filePath = join4(directory, `${name2}-stats.json`), { chunks, ...data2 } = stats.toJson(); + return await new Promise((resolve4, reject) => { + (0, import_json_ext.stringifyStream)(data2, null, 2).on("error", reject).pipe(createWriteStream(filePath)).on("error", reject).on("finish", resolve4); + }), filePath; +}; + +// src/core-server/utils/summarizeIndex.ts +import { isExampleStoryId } from "storybook/internal/telemetry"; + +// src/shared/utils/story-index-filters.ts +function isMdxEntry({ tags }) { + return tags?.includes(Tag.UNATTACHED_MDX) || tags?.includes(Tag.ATTACHED_MDX); +} + +// src/core-server/utils/summarizeIndex.ts +var PAGE_REGEX = /(page|screen)/i, isPageStory = (storyId) => PAGE_REGEX.test(storyId), isCLIExampleEntry = (entry) => [ + "example-introduction--docs", + "configure-your-project--docs", + "example-button--docs", + "example-button--primary", + "example-button--secondary", + "example-button--large", + "example-button--small", + "example-header--docs", + "example-header--logged-in", + "example-header--logged-out", + "example-page--logged-in", + "example-page--logged-out" +].includes(entry.id); +function summarizeIndex(storyIndex) { + let storyCount = 0, componentTitles = /* @__PURE__ */ new Set(), exampleStoryCount = 0, onboardingStoryCount = 0, onboardingDocsCount = 0, exampleDocsCount = 0, pageStoryCount = 0, playStoryCount = 0, testStoryCount = 0, autodocsCount = 0, mdxCount = 0, svelteCsfV4Count = 0, svelteCsfV5Count = 0, testsPerParentStory = /* @__PURE__ */ new Map(); + Object.values(storyIndex.entries).forEach((entry) => { + isCLIExampleEntry(entry) ? (entry.type === "story" && (exampleStoryCount += 1), entry.type === "docs" && (exampleDocsCount += 1)) : isExampleStoryId(entry.id) ? (entry.type === "story" && (onboardingStoryCount += 1), entry.type === "docs" && (onboardingDocsCount += 1)) : entry.type === "story" ? (storyCount += 1, componentTitles.add(entry.title), isPageStory(entry.title) && (pageStoryCount += 1), entry.tags?.includes(Tag.PLAY_FN) && (playStoryCount += 1), entry.tags?.includes(Tag.TEST_FN) && entry.parent && (testStoryCount += 1, testsPerParentStory.set(entry.parent, (testsPerParentStory.get(entry.parent) ?? 0) + 1)), entry.tags?.includes("svelte-csf-v4") ? svelteCsfV4Count += 1 : entry.tags?.includes("svelte-csf-v5") && (svelteCsfV5Count += 1)) : entry.type === "docs" && (isMdxEntry(entry) ? mdxCount += 1 : entry.tags?.includes(Tag.AUTODOCS) && (autodocsCount += 1)); + }); + let componentCount = componentTitles.size, maxTestsPerStory = 0, singleTestStoryCount = 0; + return testsPerParentStory.forEach((count) => { + count > maxTestsPerStory && (maxTestsPerStory = count), count === 1 && (singleTestStoryCount += 1); + }), { + storyCount, + componentCount, + pageStoryCount, + playStoryCount, + testStoryCount, + maxTestsPerStory, + singleTestStoryCount, + autodocsCount, + mdxCount, + exampleStoryCount, + exampleDocsCount, + onboardingStoryCount, + onboardingDocsCount, + svelteCsfV4Count, + svelteCsfV5Count, + version: storyIndex.v + }; +} + +// src/core-server/build-static.ts +async function buildStaticStandalone(options) { + if (options.configType = "PRODUCTION", options.outputDir === "") + throw new Error("Won't remove current directory. Check your outputDir!"); + if (options.outputDir = resolve(options.outputDir), options.configDir = resolve(options.configDir), logger5.step(`Cleaning outputDir: ${import_picocolors3.default.cyan(relative(process.cwd(), options.outputDir))}`), options.outputDir === "/") + throw new Error("Won't remove directory '/'. Check your outputDir!"); + await rm(options.outputDir, { recursive: !0, force: !0 }).catch(() => { + }), await mkdir2(options.outputDir, { recursive: !0 }); + let config = await loadMainConfig(options), { framework } = config, corePresets = [], frameworkName = typeof framework == "string" ? framework : framework?.name; + frameworkName ? corePresets.push(join(frameworkName, "preset")) : options.ignorePreview || logger5.warn(`you have not specified a framework in your ${options.configDir}/main.js`); + let commonPreset = join( + resolvePackageDir("storybook"), + "dist/core-server/presets/common-preset.js" + ), commonOverridePreset = import.meta.resolve("storybook/internal/core-server/presets/common-override-preset"); + logger5.step("Loading presets"); + let channel = new Channel2({}), presets = await loadAllPresets({ + corePresets: [commonPreset, ...corePresets], + overridePresets: [commonOverridePreset], + isCritical: !0, + channel, + ...options + }), { renderer } = await presets.apply("core", {}), build2 = await presets.apply("build", {}), [previewBuilder, managerBuilder] = await getBuilders({ + ...options, + presets, + build: build2, + channel + }), resolvedRenderer = renderer ? resolveAddonName(options.configDir, renderer, options) : void 0; + presets = await loadAllPresets({ + corePresets: [ + commonPreset, + ...managerBuilder.corePresets || [], + ...previewBuilder.corePresets || [], + ...resolvedRenderer ? [resolvedRenderer] : [], + ...corePresets + ], + overridePresets: [...previewBuilder.overridePresets || [], commonOverridePreset], + build: build2, + channel, + ...options + }); + let [features, core3, staticDirs] = await Promise.all([ + presets.apply("features"), + presets.apply("core"), + presets.apply("staticDirs") + ]), invokedBy = process.env.STORYBOOK_INVOKED_BY; + invokedBy && telemetry2("test-run", { runner: invokedBy, watch: !1 }, { configDir: options.configDir }); + let fullOptions = { + ...options, + channel, + presets, + features, + build: build2 + }, effects = []; + global2.FEATURES = features, await applyServicesPresetOnce(presets), options.previewOnly || await buildOrThrow( + async () => managerBuilder.build({ startTime: process.hrtime(), options: fullOptions }) + ), staticDirs && effects.push( + copyAllStaticFilesRelativeToMain(staticDirs, options.outputDir, options.configDir) + ); + let coreServerPublicDir = join(resolvePackageDir("storybook"), "assets/browser"); + effects.push(cp2(coreServerPublicDir, options.outputDir, { recursive: !0, force: !0 })); + let hasRegisteredServices = getRegisteredServices().length > 0, shouldWriteManifests = !options.ignorePreview && features?.componentsManifest; + (hasRegisteredServices || shouldWriteManifests) && effects.push( + (async () => { + hasRegisteredServices && (logger5.info("Building open services.."), await writeOpenServiceStaticFiles(options.outputDir)), shouldWriteManifests && await writeManifests(options.outputDir, presets); + })() + ); + let storyIndexGeneratorPromise = Promise.resolve(void 0); + options.ignorePreview || (storyIndexGeneratorPromise = presets.apply("storyIndexGenerator"), effects.push( + writeIndexJson( + join(options.outputDir, "index.json"), + storyIndexGeneratorPromise + ) + )), core3?.disableProjectJson || effects.push( + extractStorybookMetadata(join(options.outputDir, "project.json"), options.configDir) + ), options.debugWebpack && logConfig("Preview webpack config", await previewBuilder.getConfig(fullOptions)), options.ignorePreview ? logger5.info("Not building preview") : logger5.info("Building preview.."); + let startTime = process.hrtime(); + if (await Promise.all([ + ...options.ignorePreview ? [] : [ + previewBuilder.build({ + startTime, + options: fullOptions + }).then(async (previewStats) => { + logger5.trace({ message: "Preview built", time: process.hrtime(startTime) }); + let statsOption = options.webpackStatsJson || options.statsJson; + if (statsOption) { + let target = statsOption === !0 ? options.outputDir : statsOption; + await outputStats(target, previewStats); + } + }).catch((error) => { + throw logger5.error("Failed to build the preview"), process.exitCode = 1, error; + }) + ], + ...effects + ]), !options.test) + try { + let storyIndex = await (await storyIndexGeneratorPromise)?.getIndex(), payload = { + precedingUpgrade: await getPrecedingUpgrade() + }; + storyIndex && Object.assign(payload, { + storyIndex: summarizeIndex(storyIndex) + }), await telemetry2("build", payload, { configDir: options.configDir }); + } catch (e) { + logger5.debug?.(`Build telemetry failed: ${e instanceof Error ? e.message : String(e)}`); + } + logger5.step(`Output directory: ${options.outputDir}`); +} + +// src/core-server/build-dev.ts +import { readFile as readFile7 } from "node:fs/promises"; +import { + JsPackageManagerFactory, + cache as cache3, + getConfigInfo, + getInterpretedFile, + getProjectRoot, + isWebContainer, + loadAllPresets as loadAllPresets2, + loadMainConfig as loadMainConfig2, + resolveAddonName as resolveAddonName2, + resolvePathInStorybookCache as resolvePathInStorybookCache2, + validateFrameworkName, + versions +} from "storybook/internal/common"; +import { CLI_COLORS as CLI_COLORS2, deprecate, logger as logger18, prompt } from "storybook/internal/node-logger"; +import { MissingBuilderError as MissingBuilderError3, NoStatsForViteDevError } from "storybook/internal/server-errors"; +import { detectAgent as detectAgent2, oneWayHash, telemetry as telemetry4 } from "storybook/internal/telemetry"; +import { global as global3 } from "@storybook/global"; +var import_ts_dedent5 = __toESM(require_dist(), 1); + +// src/channels/postmessage/index.ts +var import_telejson = __toESM(require_dist2(), 1); +import { logger as logger7, pretty } from "storybook/internal/client-logger"; +import * as EVENTS from "storybook/internal/core-events"; + +// src/channels/postmessage/getEventSourceUrl.ts +import { logger as logger6 } from "storybook/internal/client-logger"; + +// src/channels/postmessage/index.ts +var { document: document2, location } = globalThis; +var CHANNEL_OPTIONS = globalThis.CHANNEL_OPTIONS || {}; + +// src/channels/websocket/index.ts +var import_telejson2 = __toESM(require_dist2(), 1); +import * as EVENTS2 from "storybook/internal/core-events"; +var CHANNEL_OPTIONS2 = globalThis.CHANNEL_OPTIONS || {}; + +// src/channels/index.ts +var channels_default = Channel; + +// src/core-server/dev-server.ts +import { logConfig as logConfig2, normalizeStories } from "storybook/internal/common"; +import { logger as logger12 } from "storybook/internal/node-logger"; +import { MissingBuilderError as MissingBuilderError2 } from "storybook/internal/server-errors"; +import { CHANGE_DETECTION_STATUS_TYPE_ID as CHANGE_DETECTION_STATUS_TYPE_ID2 } from "storybook/internal/types"; + +// ../../node_modules/@polka/compression/build.mjs +import zlib from "node:zlib"; +var NOOP = () => { +}, MIMES = /text|javascript|\/json|xml/i; +function getChunkSize(chunk, enc) { + return chunk ? Buffer.byteLength(chunk, enc) : 0; +} +function build_default({ threshold = 1024, level = -1, brotli = !1, gzip = !0, mimes = MIMES } = {}) { + let brotliOpts = typeof brotli == "object" && brotli || {}, gzipOpts = typeof gzip == "object" && gzip || {}; + return zlib.createBrotliCompress || (brotli = !1), (req, res, next = NOOP) => { + let accept = req.headers["accept-encoding"] + "", encoding = (brotli && /\bbr\b/.exec(accept) || gzip && /\bgzip\b/.exec(accept) || [])[0]; + if (req.method === "HEAD" || !encoding) return next(); + let compress, pendingListeners = [], pendingStatus = 0, started = !1, size = 0; + function start2() { + started = !0, size = res.getHeader("Content-Length") | 0 || size; + let compressible = mimes.test( + String(res.getHeader("Content-Type") || "text/plain") + ), cleartext = !res.getHeader("Content-Encoding"), listeners = pendingListeners || []; + compressible && cleartext && size >= threshold ? (res.setHeader("Content-Encoding", encoding), res.removeHeader("Content-Length"), encoding === "br" ? compress = zlib.createBrotliCompress({ + params: Object.assign({ + [zlib.constants.BROTLI_PARAM_QUALITY]: level, + [zlib.constants.BROTLI_PARAM_SIZE_HINT]: size + }, brotliOpts) + }) : compress = zlib.createGzip( + Object.assign({ level }, gzipOpts) + ), compress.on("data", (chunk) => write.call(res, chunk) || compress.pause()), on.call(res, "drain", () => compress.resume()), compress.on("end", () => end.call(res)), listeners.forEach((p) => compress.on.apply(compress, p))) : (pendingListeners = null, listeners.forEach((p) => on.apply(res, p))), writeHead.call(res, pendingStatus || res.statusCode); + } + let { end, write, on, writeHead } = res; + res.writeHead = function(status, reason, headers) { + if (typeof reason != "string" && ([headers, reason] = [reason, headers]), headers) for (let k in headers) res.setHeader(k, headers[k]); + return pendingStatus = status, this; + }, res.write = function(chunk, enc) { + return size += getChunkSize(chunk, enc), started || start2(), compress ? compress.write.apply(compress, arguments) : write.apply(this, arguments); + }, res.end = function(chunk, enc) { + return arguments.length > 0 && typeof chunk != "function" && (size += getChunkSize(chunk, enc)), started || start2(), compress ? compress.end.apply(compress, arguments) : end.apply(this, arguments); + }, res.on = function(type, listener) { + return pendingListeners ? compress ? compress.on(type, listener) : pendingListeners.push([type, listener]) : on.call(this, type, listener), this; + }, next(); + }; +} + +// ../../node_modules/polka/build.mjs +import http from "node:http"; +import { setImmediate } from "node:timers"; + +// ../../node_modules/regexparam/dist/index.mjs +function parse3(input, loose) { + if (input instanceof RegExp) return { keys: !1, pattern: input }; + var c, o, tmp, ext, keys = [], pattern = "", arr = input.split("/"); + for (arr[0] || arr.shift(); tmp = arr.shift(); ) + c = tmp[0], c === "*" ? (keys.push(c), pattern += tmp[1] === "?" ? "(?:/(.*))?" : "/(.*)") : c === ":" ? (o = tmp.indexOf("?", 1), ext = tmp.indexOf(".", 1), keys.push(tmp.substring(1, ~o ? o : ~ext ? ext : tmp.length)), pattern += ~o && !~ext ? "(?:/([^/]+?))?" : "/([^/]+?)", ~ext && (pattern += (~o ? "?" : "") + "\\" + tmp.substring(ext))) : pattern += "/" + tmp; + return { + keys, + pattern: new RegExp("^" + pattern + (loose ? "(?=$|/)" : "/?$"), "i") + }; +} + +// ../../node_modules/trouter/index.mjs +var MAP = { + "": 0, + GET: 1, + HEAD: 2, + PATCH: 3, + OPTIONS: 4, + CONNECT: 5, + DELETE: 6, + TRACE: 7, + POST: 8, + PUT: 9 +}, Trouter = class { + constructor() { + this.routes = [], this.all = this.add.bind(this, ""), this.get = this.add.bind(this, "GET"), this.head = this.add.bind(this, "HEAD"), this.patch = this.add.bind(this, "PATCH"), this.options = this.add.bind(this, "OPTIONS"), this.connect = this.add.bind(this, "CONNECT"), this.delete = this.add.bind(this, "DELETE"), this.trace = this.add.bind(this, "TRACE"), this.post = this.add.bind(this, "POST"), this.put = this.add.bind(this, "PUT"); + } + use(route, ...fns) { + let handlers = [].concat.apply([], fns), { keys, pattern } = parse3(route, !0); + return this.routes.push({ keys, pattern, method: "", handlers, midx: MAP[""] }), this; + } + add(method, route, ...fns) { + let { keys, pattern } = parse3(route), handlers = [].concat.apply([], fns); + return this.routes.push({ keys, pattern, method, handlers, midx: MAP[method] }), this; + } + find(method, url) { + let midx = MAP[method], isHEAD = midx === 2, i2 = 0, j = 0, k, tmp, arr = this.routes, matches = [], params = {}, handlers = []; + for (; i2 < arr.length; i2++) + if (tmp = arr[i2], tmp.midx === midx || tmp.midx === 0 || isHEAD && tmp.midx === 1) + if (tmp.keys === !1) { + if (matches = tmp.pattern.exec(url), matches === null) continue; + if (matches.groups !== void 0) for (k in matches.groups) params[k] = matches.groups[k]; + tmp.handlers.length > 1 ? handlers = handlers.concat(tmp.handlers) : handlers.push(tmp.handlers[0]); + } else if (tmp.keys.length > 0) { + if (matches = tmp.pattern.exec(url), matches === null) continue; + for (j = 0; j < tmp.keys.length; ) params[tmp.keys[j]] = matches[++j]; + tmp.handlers.length > 1 ? handlers = handlers.concat(tmp.handlers) : handlers.push(tmp.handlers[0]); + } else tmp.pattern.test(url) && (tmp.handlers.length > 1 ? handlers = handlers.concat(tmp.handlers) : handlers.push(tmp.handlers[0])); + return { params, handlers }; + } +}; + +// ../../node_modules/@polka/url/build.mjs +import * as qs from "node:querystring"; +function parse5(req) { + let raw = req.url; + if (raw == null) return; + let prev = req._parsedUrl; + if (prev && prev.raw === raw) return prev; + let pathname = raw, search2 = "", query, hash; + if (raw.length > 1) { + let idx = raw.indexOf("#", 1); + idx !== -1 && (hash = raw.substring(idx), pathname = raw.substring(0, idx)), idx = pathname.indexOf("?", 1), idx !== -1 && (search2 = pathname.substring(idx), pathname = pathname.substring(0, idx), search2.length > 1 && (query = qs.parse(search2.substring(1)))); + } + return req._parsedUrl = { pathname, search: search2, query, hash, raw }; +} + +// ../../node_modules/polka/build.mjs +function onError(err, req, res) { + let code = typeof err.status == "number" && err.status; + code = res.statusCode = code && code >= 100 ? code : 500, typeof err == "string" || Buffer.isBuffer(err) ? res.end(err) : res.end(err.message || http.STATUS_CODES[code]); +} +var mount = (fn) => fn instanceof Polka ? fn.attach : fn, Polka = class _Polka extends Trouter { + constructor(opts = {}) { + super(), this.parse = parse5, this.server = opts.server, this.handler = this.handler.bind(this), this.onError = opts.onError || onError, this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 }), this.attach = (req, res) => setImmediate(this.handler, req, res); + } + use(base, ...fns) { + return base === "/" ? super.use(base, fns.map(mount)) : typeof base == "function" || base instanceof _Polka ? super.use("/", [base, ...fns].map(mount)) : super.use( + base, + (req, _, next) => { + if (typeof base == "string") { + let len = base.length; + base.startsWith("/") || len++, req.url = req.url.substring(len) || "/", req.path = req.path.substring(len) || "/"; + } else + req.url = req.url.replace(base, "") || "/", req.path = req.path.replace(base, "") || "/"; + req.url.charAt(0) !== "/" && (req.url = "/" + req.url), next(); + }, + fns.map(mount), + (req, _, next) => { + req.path = req._parsedUrl.pathname, req.url = req.path + req._parsedUrl.search, next(); + } + ), this; + } + listen() { + return (this.server = this.server || http.createServer()).on("request", this.attach), this.server.listen.apply(this.server, arguments), this; + } + handler(req, res, next) { + let info = this.parse(req), path2 = info.pathname, obj = this.find(req.method, req.path = path2); + if (req.url = path2 + info.search, req.originalUrl = req.originalUrl || req.url, req.query = info.query || {}, req.search = info.search, req.params = obj.params, path2.length > 1 && path2.indexOf("%", 1) !== -1) + for (let k in req.params) + try { + req.params[k] = decodeURIComponent(req.params[k]); + } catch { + } + let i2 = 0, arr = obj.handlers.concat(this.onNoMatch), len = arr.length, loop = async () => res.finished || i2 < len && arr[i2++](req, res, next); + (next = next || ((err) => err ? this.onError(err, req, res, next) : loop().catch(next)))(); + } +}; +function build_default2(opts) { + return new Polka(opts); +} + +// ../../node_modules/dequal/dist/index.mjs +var has = Object.prototype.hasOwnProperty; +function find(iter, tar, key2) { + for (key2 of iter.keys()) + if (dequal(key2, tar)) return key2; +} +function dequal(foo, bar) { + var ctor, len, tmp; + if (foo === bar) return !0; + if (foo && bar && (ctor = foo.constructor) === bar.constructor) { + if (ctor === Date) return foo.getTime() === bar.getTime(); + if (ctor === RegExp) return foo.toString() === bar.toString(); + if (ctor === Array) { + if ((len = foo.length) === bar.length) + for (; len-- && dequal(foo[len], bar[len]); ) ; + return len === -1; + } + if (ctor === Set) { + if (foo.size !== bar.size) + return !1; + for (len of foo) + if (tmp = len, tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !bar.has(tmp)) return !1; + return !0; + } + if (ctor === Map) { + if (foo.size !== bar.size) + return !1; + for (len of foo) + if (tmp = len[0], tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !dequal(len[1], bar.get(tmp))) + return !1; + return !0; + } + if (ctor === ArrayBuffer) + foo = new Uint8Array(foo), bar = new Uint8Array(bar); + else if (ctor === DataView) { + if ((len = foo.byteLength) === bar.byteLength) + for (; len-- && foo.getInt8(len) === bar.getInt8(len); ) ; + return len === -1; + } + if (ArrayBuffer.isView(foo)) { + if ((len = foo.byteLength) === bar.byteLength) + for (; len-- && foo[len] === bar[len]; ) ; + return len === -1; + } + if (!ctor || typeof foo == "object") { + len = 0; + for (ctor in foo) + if (has.call(foo, ctor) && ++len && !has.call(bar, ctor) || !(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return !1; + return Object.keys(bar).length === len; + } + } + return foo !== foo && bar !== bar; +} + +// src/core-server/change-detection/change-detection-service.ts +import { logger as logger9 } from "storybook/internal/node-logger"; +import { CHANGE_DETECTION_STATUS_TYPE_ID } from "storybook/internal/types"; + +// src/core-server/change-detection/errors.ts +var ChangeDetectionUnavailableError = class extends Error { + constructor(message, options) { + super(message, options), this.name = "ChangeDetectionUnavailableError"; + } +}, ChangeDetectionFailureError = class extends Error { + constructor(message, options) { + super(message, options), this.name = "ChangeDetectionFailureError"; + } +}; + +// src/core-server/change-detection/GitDiffProvider.ts +import { watch } from "node:fs"; +import { readFile as readFile3, stat } from "node:fs/promises"; +import { logger as logger8 } from "storybook/internal/node-logger"; +function parseChangedFiles(stdout) { + return new Set( + stdout.split(` +`).map((line) => line.trim()).filter(Boolean) + ); +} +var GitDiffProvider = class { + constructor(cwd = process.cwd(), fileSystem = { watch, readFile: readFile3, stat }) { + this.cwd = cwd; + this.fileSystem = fileSystem; + this.gitStateCallback = () => { + }; + this.watchingInitialized = !1; + this.watchingStopped = !1; + } + async getRepoRoot() { + if (this.repoRoot) + return this.repoRoot; + try { + let { stdout } = await execa("git", ["rev-parse", "--show-toplevel"], { + cwd: this.cwd, + stdio: "pipe", + // Prevent git from acquiring .git/index.lock for stat-cache refreshes + // during read-only operations. Without this, parallel scans can race + // an interactive `git commit` and break the user's commit with + // "Unable to create '.git/index.lock': File exists". + env: { GIT_OPTIONAL_LOCKS: "0" } + }); + return this.repoRoot = stdout.trim(), this.repoRoot; + } catch (error) { + throw this.toGitError(error, "git rev-parse --show-toplevel"); + } + } + async getChangedFiles() { + let repoRoot = await this.getRepoRoot(), runGitCommand = (args) => this.runGitCommand(repoRoot, args), [staged, unstaged, added, intentToAdd, untracked] = await Promise.all([ + runGitCommand(["diff", "--name-only", "--diff-filter=ad", "--cached"]), + runGitCommand(["diff", "--name-only", "--diff-filter=ad"]), + runGitCommand(["diff", "--name-only", "--diff-filter=A", "--cached"]), + runGitCommand(["diff", "--name-only", "--diff-filter=A"]), + runGitCommand(["ls-files", "--others", "--exclude-standard"]) + ]); + return { + changed: /* @__PURE__ */ new Set([ + ...parseChangedFiles(staged.stdout), + ...parseChangedFiles(unstaged.stdout) + ]), + new: /* @__PURE__ */ new Set([ + ...parseChangedFiles(added.stdout), + ...parseChangedFiles(intentToAdd.stdout), + ...parseChangedFiles(untracked.stdout) + ]) + }; + } + async getHeadCommit() { + let repoRoot = await this.getRepoRoot(), { stdout } = await this.runGitCommand(repoRoot, ["rev-parse", "HEAD"]); + return stdout.trim(); + } + async isWorkingTreeClean() { + let repoRoot = await this.getRepoRoot(), { stdout } = await this.runGitCommand(repoRoot, ["status", "--porcelain"]); + return stdout.trim().length === 0; + } + onGitStateChange(callback) { + this.gitStateCallback = callback, !this.watchingInitialized && !this.watchingStopped && (this.watchingInitialized = !0, this.initializeWatching()); + } + async initializeWatching() { + try { + let gitDir = await this.getGitDir(); + this.headWatcher = this.attachWatcher({ + filePath: gitDir, + currentWatcher: this.headWatcher, + onChange: () => { + this.gitStateCallback(), this.reconfigureBranchWatcher(gitDir); + } + }), this.packedRefsWatcher = this.attachWatcher({ + filePath: gitDir, + currentWatcher: this.packedRefsWatcher, + onChange: () => { + this.gitStateCallback(); + } + }), await this.configureBranchWatcher(gitDir); + } catch { + } + } + attachWatcher(options) { + let { filePath, currentWatcher, onChange } = options; + if (!this.watchingStopped) + try { + let watcher = this.fileSystem.watch(filePath, { persistent: !1 }, () => { + this.watchingStopped || onChange(); + }); + return currentWatcher?.close(), watcher.on("error", () => { + watcher.close(), this.headWatcher === watcher && (this.headWatcher = void 0), this.packedRefsWatcher === watcher && (this.packedRefsWatcher = void 0), this.branchWatcher === watcher && (this.branchWatcher = void 0), this.stopWatching(), logger8.warn( + `Change detection git watcher failed for ${filePath}. Git state updates may stop until restart.` + ); + }), watcher; + } catch (error) { + if (this.isEnoentError(error)) + return; + throw error; + } + } + async configureBranchWatcher(gitDir) { + let branchRef = await this.readHeadRef(gitDir); + this.branchWatcher?.close(), this.branchWatcher = void 0; + let watchBranch = (filePath) => (this.branchWatcher = this.attachWatcher({ + filePath, + currentWatcher: this.branchWatcher, + onChange: () => { + this.gitStateCallback(), this.reconfigureBranchWatcher(gitDir); + } + }), this.branchWatcher); + branchRef?.startsWith("refs/heads/") && (watchBranch(dirname(join(gitDir, branchRef))) || watchBranch(join(gitDir, "refs", "heads"))); + } + reconfigureBranchWatcher(gitDir) { + this.configureBranchWatcher(gitDir).catch(() => { + logger8.warn("Change detection failed to reconfigure git branch watcher."), this.stopWatching(); + }); + } + dispose() { + this.stopWatching(); + } + stopWatching() { + this.watchingStopped || (this.watchingStopped = !0, this.headWatcher?.close(), this.headWatcher = void 0, this.packedRefsWatcher?.close(), this.packedRefsWatcher = void 0, this.branchWatcher?.close(), this.branchWatcher = void 0); + } + async getGitDir() { + let repoRoot = await this.getRepoRoot(), gitPath = join(repoRoot, ".git"); + try { + let gitStat = await this.fileSystem.stat(gitPath); + if (gitStat.isDirectory()) + return gitPath; + if (gitStat.isFile()) { + let gitPointer = await this.fileSystem.readFile(gitPath, "utf8"), match = /^gitdir:\s+(.+)$/m.exec(gitPointer.trim()); + if (match) + return resolve(repoRoot, match[1]); + } + } catch (error) { + if (!this.isEnoentError(error)) + throw error; + } + return gitPath; + } + async readHeadRef(gitDir) { + try { + let headContents = await this.fileSystem.readFile(join(gitDir, "HEAD"), "utf8"); + return /^ref:\s+(.+)$/m.exec(headContents.trim())?.[1]; + } catch (error) { + if (!this.isEnoentError(error)) + throw error; + } + } + async runGitCommand(repoRoot, args) { + try { + return await execa("git", args, { + cwd: repoRoot, + stdio: "pipe", + // GIT_OPTIONAL_LOCKS=0 disables the stat-cache refresh that + // `git status` and `git diff` would otherwise write into + // .git/index.lock. The diff/status output stays correct; we only + // skip the optional cache update. This prevents change detection + // scans from racing an interactive `git commit` running in the + // user's shell. + env: { GIT_OPTIONAL_LOCKS: "0" } + }); + } catch (error) { + throw this.toGitError(error, `git ${args.join(" ")}`); + } + } + isEnoentError(error) { + return !!(error && typeof error == "object" && "code" in error && error.code === "ENOENT"); + } + toGitError(error, command) { + let execaError = error, stderr = [execaError.stderr, execaError.shortMessage, execaError.message].filter(Boolean).join(` +`); + return execaError.code === "ENOENT" ? new ChangeDetectionUnavailableError("git is not available", { cause: error }) : stderr.includes("not a git repository") ? new ChangeDetectionUnavailableError("not a git repository", { + cause: error + }) : new ChangeDetectionFailureError(`${command} failed${stderr ? `: ${stderr}` : ""}`, { + cause: error + }); + } +}; + +// src/core-server/change-detection/IndexBaselineService.ts +import { createFileSystemCache, resolvePathInStorybookCache } from "storybook/internal/common"; +var DEFAULT_CACHE_KEY = "index-baseline"; +function extractBaselineEntryIds(storyIndex) { + let entryIds = /* @__PURE__ */ new Set(); + return Object.values(storyIndex.entries).forEach((entry) => { + (entry.type === "story" || entry.type === "docs") && !entry.importPath.startsWith("virtual:") && entryIds.add(entry.id); + }), entryIds; +} +var IndexBaselineService = class { + constructor(options) { + this.options = options; + this.baselineEntryIds = /* @__PURE__ */ new Set(); + this.syncInFlight = !1; + this.cache = options.cache ?? createFileSystemCache({ + basePath: resolvePathInStorybookCache(DEFAULT_CACHE_KEY), + ns: "storybook" + }); + } + start() { + return this.initializePromise || (this.initializePromise = this.initialize().catch(() => { + this.baselineEntryIds = /* @__PURE__ */ new Set(); + })), this.initializePromise; + } + async getBaselineEntryIds() { + return await this.start(), new Set(this.baselineEntryIds); + } + async handleGitStateChange() { + if (await this.start(), !this.syncInFlight) + try { + if (this.syncInFlight = !0, !await this.options.gitDiffProvider.isWorkingTreeClean()) + return; + let headCommit = await this.options.gitDiffProvider.getHeadCommit(); + await this.refreshBaseline(headCommit), this.options.onBaselineUpdated(); + } finally { + this.syncInFlight = !1; + } + } + async initialize() { + if (!await this.options.gitDiffProvider.isWorkingTreeClean()) { + await this.refreshBaseline(); + return; + } + let headCommit = await this.options.gitDiffProvider.getHeadCommit(), cachedSnapshot = await this.cache.get(headCommit); + if (cachedSnapshot?.entryIds?.length) { + this.baselineEntryIds = new Set(cachedSnapshot.entryIds); + return; + } + await this.refreshBaseline(headCommit); + } + async refreshBaseline(persistenceKey) { + let storyIndex = await (await this.options.storyIndexGeneratorPromise).getIndex(), entryIds = Array.from(extractBaselineEntryIds(storyIndex)).sort(); + this.baselineEntryIds = new Set(entryIds), persistenceKey && await this.cache.set(persistenceKey, { entryIds }); + } +}; + +// src/core-server/change-detection/readiness.ts +function createDeferred() { + let resolve4; + return { + promise: new Promise((fulfill) => { + resolve4 = fulfill; + }), + resolve: resolve4 + }; +} +var readinessDeferred = createDeferred(), readinessState; +function getChangeDetectionReadiness() { + return readinessState ? Promise.resolve(readinessState) : readinessDeferred.promise; +} +function setChangeDetectionReadiness(readiness) { + readinessState || (readinessState = readiness, readinessDeferred.resolve(readiness)); +} +function resetChangeDetectionReadiness() { + readinessDeferred = createDeferred(), readinessState = void 0; +} + +// src/core-server/change-detection/change-detection-service.ts +var CHANGE_DETECTION_DEBOUNCE_MS = 200; +function errorLikeToError(errorLike) { + let error = new Error(errorLike.message, { + cause: errorLike.cause ? errorLikeToError(errorLike.cause) : void 0 + }); + return error.name = errorLike.name ?? error.name, errorLike.stack && (error.stack = errorLike.stack), error; +} +function isSameStatus(a, b) { + return a ? a.storyId === b.storyId && a.typeId === b.typeId && a.value === b.value && a.title === b.title && a.description === b.description && a.sidebarContextMenu === b.sidebarContextMenu && dequal(a.data, b.data) : !1; +} +function mergeStatusValues(previousValue, nextValue) { + return previousValue === "status-value:new" || nextValue === "status-value:new" ? "status-value:new" : previousValue === "status-value:modified" || nextValue === "status-value:modified" ? "status-value:modified" : previousValue === "status-value:affected" || nextValue === "status-value:affected" ? "status-value:affected" : nextValue; +} +function mergeChangeDetectionStatuses(existing, incoming) { + return { + ...incoming, + value: mergeStatusValues(existing?.value, incoming.value), + title: incoming.title || existing?.title || "", + description: incoming.description || existing?.description || "", + sidebarContextMenu: incoming.sidebarContextMenu ?? existing?.sidebarContextMenu ?? !1 + }; +} +function buildIndexBaselineStatuses(storyIndex, baselineEntryIds) { + let statuses = /* @__PURE__ */ new Map(); + if (baselineEntryIds.size === 0) + return statuses; + for (let entryId of extractBaselineEntryIds(storyIndex)) + baselineEntryIds.has(entryId) || statuses.set(entryId, { + storyId: entryId, + typeId: CHANGE_DETECTION_STATUS_TYPE_ID, + value: "status-value:new", + title: "", + description: "", + sidebarContextMenu: !1 + }); + return statuses; +} +var ChangeDetectionService = class { + constructor(options) { + this.options = options; + this.disposed = !1; + this.scanInFlight = !1; + this.rerunAfterCurrentScan = !1; + this.readinessResolved = !1; + this.statusPipelineStarted = !1; + this.changeDetectionEnabled = !1; + this.previousStatuses = /* @__PURE__ */ new Map(); + this.gitDiffProvider = options.gitDiffProvider, this.indexBaselineService = options.indexBaselineService, this.workingDir = options.workingDir ?? process.cwd(), this.debounceMs = options.debounceMs ?? CHANGE_DETECTION_DEBOUNCE_MS, resetChangeDetectionReadiness(); + } + getModuleGraph() { + return getService("core/module-graph"); + } + /** True while the service is live and change-detection status publishing is enabled. */ + isActive() { + return !this.disposed && this.changeDetectionEnabled; + } + onGraphReady() { + this.isActive() && this.startStatusPipeline(); + } + onGraphChange() { + this.isActive() && this.scheduleScan(this.debounceMs); + } + onGraphError(error) { + this.isActive() && (this.resolveReadiness({ status: "error", error }), this.dispose().catch(() => { + })); + } + onGraphUnavailable(reason, error) { + this.isActive() && (logger9.warn(`Change detection unavailable: ${reason}`), this.resolveReadiness({ status: "unavailable", reason, error }), this.dispose()); + } + onModuleGraphStatus(status) { + if (this.isActive()) { + if (status.value === "ready") { + this.onGraphReady(); + return; + } + if (status.value === "error") { + this.onGraphError(errorLikeToError(status.error)); + return; + } + status.value === "unavailable" && this.onGraphUnavailable( + status.reason, + status.error ? errorLikeToError(status.error) : void 0 + ); + } + } + start(enabled) { + if (enabled === !1) { + logger9.debug("Change detection disabled."), this.resolveReadiness({ + status: "unavailable", + reason: "disabled" + }); + return; + } + logger9.debug("Change detection enabled."), this.changeDetectionEnabled = !0; + let moduleGraph = this.getModuleGraph(); + this.unsubscribeModuleGraphStatus = moduleGraph.queries.status.subscribe( + void 0, + ({ data: data2 }) => { + data2 !== void 0 && this.onModuleGraphStatus(data2); + } + ), this.unsubscribeModuleGraphRevision = moduleGraph.queries.graphRevision.subscribe( + void 0, + ({ data: data2 }) => { + (data2 ?? 0) > 0 && this.onGraphChange(); + } + ), moduleGraph.queries.status.loaded(void 0).then((status) => { + this.onModuleGraphStatus(status); + }).catch((error) => { + this.onGraphError(error instanceof Error ? error : new Error(String(error))); + }); + } + /** + * Wires the git-diff-driven status pipeline. Runs once the dependency graph is ready (so the + * initial scan and every git-state-change scan read a populated reverse index). + */ + startStatusPipeline() { + this.disposed || this.statusPipelineStarted || (this.statusPipelineStarted = !0, this.getIndexBaselineService().start(), this.getGitDiffProvider().onGitStateChange(() => { + this.disposed || (this.scheduleScan(this.debounceMs), this.getIndexBaselineService().handleGitStateChange().catch(() => { + })); + }), this.scheduleScan(0)); + } + async dispose() { + this.disposed || (this.disposed = !0, this.rerunAfterCurrentScan = !1, this.debounceTimer && (clearTimeout(this.debounceTimer), this.debounceTimer = void 0), this.gitDiffProvider?.dispose(), this.unsubscribeModuleGraphStatus?.(), this.unsubscribeModuleGraphStatus = void 0, this.unsubscribeModuleGraphRevision?.(), this.unsubscribeModuleGraphRevision = void 0); + } + scheduleScan(delayMs) { + this.debounceTimer && clearTimeout(this.debounceTimer), this.debounceTimer = setTimeout(() => { + this.debounceTimer = void 0, this.scan(); + }, delayMs); + } + async scan() { + if (this.disposed) + return; + let status = await this.getModuleGraph().queries.status.loaded(void 0); + if (!(this.disposed || status.value !== "ready")) { + if (this.scanInFlight) { + this.rerunAfterCurrentScan = !0; + return; + } + this.scanInFlight = !0; + try { + let nextStatuses = await this.buildStatuses(); + if (this.disposed) + return; + this.applyStatusStorePatch(nextStatuses), this.resolveReadiness({ status: "ready" }); + } catch (error) { + if (this.disposed) + return; + if (error instanceof ChangeDetectionUnavailableError) + logger9.warn(`Change detection unavailable: ${error.message}`), this.resolveReadiness({ + status: "unavailable", + reason: error.message, + error + }), await this.dispose(); + else if (error instanceof ChangeDetectionFailureError) + logger9.error(`Change detection failed: ${error.message}`), this.resolveReadiness({ + status: "error", + error + }); + else { + let failure = new ChangeDetectionFailureError( + error instanceof Error ? error.message : String(error), + { cause: error instanceof Error ? error : void 0 } + ); + logger9.error(`Change detection failed: ${failure.message}`), this.resolveReadiness({ + status: "error", + error: failure + }); + } + } finally { + this.scanInFlight = !1, !this.disposed && this.rerunAfterCurrentScan && (this.rerunAfterCurrentScan = !1, this.scan()); + } + } + } + async buildStatuses() { + let gitDiffProvider = this.getGitDiffProvider(), [changes, repoRoot, storyIndexGenerator, baselineEntryIds] = await Promise.all([ + gitDiffProvider.getChangedFiles(), + gitDiffProvider.getRepoRoot(), + this.options.storyIndexGeneratorPromise, + this.getIndexBaselineService().getBaselineEntryIds() + ]), changedFiles = new Set( + Array.from(changes.changed).map((path2) => normalize(join(repoRoot, path2))) + ), newFiles = new Set( + Array.from(changes.new).map((path2) => normalize(join(repoRoot, path2))) + ), scannedFiles = /* @__PURE__ */ new Set([...changedFiles, ...newFiles]), storyIndex = await storyIndexGenerator.getIndex(), baselineStatuses = buildIndexBaselineStatuses(storyIndex, baselineEntryIds), storyIdsByFile = getStoryIdsByAbsolutePath(storyIndex, this.workingDir), statuses = /* @__PURE__ */ new Map(), scannedFilesArray = [...scannedFiles], lookupResults = await this.getModuleGraph().queries.storiesForFiles.loaded({ + files: scannedFilesArray + }); + for (let i2 = 0; i2 < scannedFilesArray.length; i2++) { + let changedFile = scannedFilesArray[i2], allEntries = /* @__PURE__ */ new Map(); + for (let { storyFile, depth } of lookupResults[i2]) + allEntries.set(storyIndexPathToAbsolutePath(storyFile, this.workingDir), depth); + if (storyIdsByFile.has(changedFile) && allEntries.set(changedFile, 0), allEntries.size === 0) + continue; + let lowestDistance = Number.POSITIVE_INFINITY; + for (let distance of allEntries.values()) + distance < lowestDistance && (lowestDistance = distance); + for (let [storyFile, distance] of allEntries.entries()) { + let storyIds = storyIdsByFile.get(storyFile); + if (!storyIds) + continue; + let value = newFiles.has(storyFile) ? "status-value:new" : distance === lowestDistance ? "status-value:modified" : "status-value:affected"; + storyIds.forEach((storyId) => { + let existingStatus = statuses.get(storyId), nextStatus = { + storyId, + typeId: CHANGE_DETECTION_STATUS_TYPE_ID, + value: mergeStatusValues(existingStatus?.value, value), + title: "", + description: "", + sidebarContextMenu: !1 + }; + statuses.set(storyId, mergeChangeDetectionStatuses(existingStatus, nextStatus)); + }); + } + } + return baselineStatuses.forEach((status, storyId) => { + statuses.set(storyId, mergeChangeDetectionStatuses(statuses.get(storyId), status)); + }), statuses; + } + getGitDiffProvider() { + return this.gitDiffProvider ??= new GitDiffProvider(this.workingDir), this.gitDiffProvider; + } + getIndexBaselineService() { + return this.indexBaselineService ??= new IndexBaselineService({ + storyIndexGeneratorPromise: this.options.storyIndexGeneratorPromise, + gitDiffProvider: this.getGitDiffProvider(), + onBaselineUpdated: () => this.scheduleScan(this.debounceMs) + }), this.indexBaselineService; + } + applyStatusStorePatch(nextStatuses) { + let removedStoryIds = Array.from(this.previousStatuses.keys()).filter( + (storyId) => !nextStatuses.has(storyId) + ), changedStatuses = Array.from(nextStatuses.values()).filter( + (status) => !isSameStatus(this.previousStatuses.get(status.storyId), status) + ); + removedStoryIds.length === 0 && changedStatuses.length === 0 || (removedStoryIds.length > 0 && this.options.statusStore.unset(removedStoryIds), changedStatuses.length > 0 && this.options.statusStore.set(changedStatuses), this.previousStatuses = new Map(nextStatuses)); + } + resolveReadiness(readiness) { + this.readinessResolved || (this.readinessResolved = !0, setChangeDetectionReadiness(readiness)); + } +}; + +// src/core-server/stores/status.ts +var statusStore = createStatusStore({ + universalStatusStore: UniversalStore.create({ + ...UNIVERSAL_STATUS_STORE_OPTIONS, + /* + This is a temporary workaround, to ensure that the store is not created in the + vitest sub-process in addon-vitest, even though it imports from core-server + If it was created in the sub-process, it would try to connect to the leader in the dev server + before it was ready. + This will be fixed when we do the planned UniversalStore v0.2. + */ + leader: !optionalEnvToBoolean(process.env.VITEST_CHILD_PROCESS) + }), + environment: "server" +}), { fullStatusStore, getStatusStoreByTypeId, universalStatusStore } = statusStore; + +// src/core-server/utils/doTelemetry.ts +import { getPrecedingUpgrade as getPrecedingUpgrade2, telemetry as telemetry3 } from "storybook/internal/telemetry"; + +// src/core-server/utils/versionStatus.ts +var versionStatus = (versionCheck) => versionCheck.error ? "error" : versionCheck.cached ? "cached" : "success"; + +// src/core-server/utils/doTelemetry.ts +async function doTelemetry(app, core3, storyIndexGeneratorPromise, options) { + let { versionCheck, versionUpdates } = options; + invariant( + !versionUpdates || versionUpdates && versionCheck, + "versionCheck should be defined when versionUpdates is true" + ), telemetry3( + "dev", + async () => { + let generator = await storyIndexGeneratorPromise, indexAndStats; + try { + indexAndStats = await generator?.getIndexAndStats(); + } catch (err) { + return { error: err instanceof Error ? err : new Error("encountered a non-recoverable error") }; + } + let payload = { + precedingUpgrade: await getPrecedingUpgrade2() + }; + return indexAndStats && Object.assign(payload, { + versionStatus: versionUpdates && versionCheck ? versionStatus(versionCheck) : "disabled", + storyIndex: summarizeIndex(indexAndStats.storyIndex), + storyStats: indexAndStats.stats + }), payload; + }, + { configDir: options.configDir } + ); +} + +// src/core-server/utils/get-caching-middleware.ts +function getCachingMiddleware() { + return (req, res, next) => { + res.setHeader("Cache-Control", "no-store"), next(); + }; +} + +// src/core-server/utils/getAccessControlMiddleware.ts +function getAccessControlMiddleware(crossOriginIsolated) { + return (req, res, next) => { + crossOriginIsolated && (res.setHeader("Cross-Origin-Opener-Policy", "same-origin"), res.setHeader("Cross-Origin-Embedder-Policy", "require-corp")), next(); + }; +} + +// ../../node_modules/host-validation-middleware/dist/index.js +import net from "node:net"; +function extractHostNameFromHostHeader(hostHeader) { + let trimmedHost = hostHeader.trim(); + if (trimmedHost[0] === "[") { + let endIpv6 = trimmedHost.indexOf("]"); + return endIpv6 < 0 ? { type: "invalid" } : net.isIP(trimmedHost.slice(1, endIpv6)) === 6 ? { type: "ipv6" } : { type: "invalid" }; + } + let colonPos = trimmedHost.indexOf(":"), hostname = colonPos === -1 ? trimmedHost : trimmedHost.slice(0, colonPos); + return net.isIP(hostname) === 4 ? { type: "ipv4" } : { + type: "hostname", + value: hostname + }; +} +var isFileOrExtensionProtocolRE = /^(?:file|.+-extension):/i; +function isHostAllowedInternal(hostHeader, allowedHosts) { + if (isFileOrExtensionProtocolRE.test(hostHeader)) return !0; + let extracted = extractHostNameFromHostHeader(hostHeader); + if (extracted.type === "invalid") return !1; + if (extracted.type === "ipv4" || extracted.type === "ipv6") return !0; + let hostname = extracted.value; + if (hostname === "localhost" || hostname.endsWith(".localhost")) return !0; + for (let allowedHost of allowedHosts) + if (allowedHost === hostname || allowedHost[0] === "." && (allowedHost.slice(1) === hostname || hostname.endsWith(allowedHost))) return !0; + return !1; +} +var cache = /* @__PURE__ */ new WeakMap(); +function isHostAllowed(hostHeader, allowedHosts) { + if (hostHeader === void 0) return !0; + let cachedAllowedHosts; + if (Object.isFrozen(allowedHosts) && (cache.has(allowedHosts) || cache.set(allowedHosts, /* @__PURE__ */ new Set()), cachedAllowedHosts = cache.get(allowedHosts), cachedAllowedHosts.has(hostHeader))) + return !0; + let result = isHostAllowedInternal(hostHeader, allowedHosts); + return cachedAllowedHosts && result && cachedAllowedHosts.add(hostHeader), result; +} + +// src/core-server/utils/getHostValidationMiddleware.ts +var DEFAULT_ALLOWED_HOSTS = [], isValidHost = (host, options) => { + let allowedHosts = options.allowedHosts ?? DEFAULT_ALLOWED_HOSTS; + if (allowedHosts === !0) + return !0; + if (!host) + return !1; + try { + return options.host === "0.0.0.0" && allowedHosts.length === 0 ? !0 : isHostAllowed(host, [ + ...allowedHosts, + ...options.localAddress ? [new URL(options.localAddress).host] : [], + ...options.networkAddress ? [new URL(options.networkAddress).host] : [] + ]); + } catch { + return !1; + } +}; +function getHostValidationMiddleware(options) { + return (req, res, next) => { + let host = req.headers.host; + if ((options.allowedHosts ?? DEFAULT_ALLOWED_HOSTS) !== !0 && !isValidHost(host, options)) { + res.writeHead(403, { "Content-Type": "text/plain" }), res.end("Invalid host"); + return; + } + next(); + }; +} + +// src/core-server/utils/middleware.ts +import { existsSync } from "node:fs"; +var fileExists = (basename4) => [".js", ".mjs", ".cjs"].reduce((found, ext) => { + let filename = `${basename4}${ext}`; + return !found && existsSync(filename) ? filename : found; +}, ""); +async function getMiddleware(configDir) { + let middlewarePath = fileExists(resolve(configDir, "middleware")); + if (middlewarePath) { + let middlewareModule = await import("file://" + middlewarePath); + return middlewareModule.default ?? middlewareModule; + } + return () => { + }; +} + +// src/core-server/utils/open-browser/open-in-browser.ts +var import_ts_dedent = __toESM(require_dist(), 1); +import { logger as logger11 } from "storybook/internal/node-logger"; +import open2 from "open"; + +// src/core-server/utils/open-browser/opener.ts +var import_cross_spawn = __toESM(require_cross_spawn(), 1), import_picocolors4 = __toESM(require_picocolors(), 1); +import { execSync } from "node:child_process"; +import { join as join5 } from "node:path"; +import { logger as logger10 } from "storybook/internal/node-logger"; +import open from "open"; +var OSX_CHROME = "google chrome"; +function getBrowserEnv() { + let value = process.env.BROWSER, args = process.env.BROWSER_ARGS ? process.env.BROWSER_ARGS.split(" ") : []; + return value ? value.toLowerCase() === "none" ? { action: 0 /* NONE */ } : value.toLowerCase().endsWith(".js") || value.toLowerCase().endsWith(".mjs") || value.toLowerCase().endsWith(".cjs") || value.toLowerCase().endsWith(".ts") ? { action: 2 /* SCRIPT */, value, args } : value.toLowerCase().endsWith(".sh") ? { action: 3 /* SHELL_SCRIPT */, value, args } : { action: 1 /* BROWSER */, value, args } : { action: 1 /* BROWSER */, args }; +} +var BrowserEnvError = class extends StorybookError { + constructor(message) { + super({ + category: "CORE_SERVER", + code: 1, + message, + name: "BrowserEnvError" + }); + } +}; +function attachEventHandlers(child, scriptPath) { + child.on("error", (error) => { + logger10.error( + `Failed to run script specified in BROWSER. +${import_picocolors4.default.cyan(scriptPath)}: ${error.message}` + ); + }), child.on("close", (code) => { + if (code !== 0) { + logger10.error( + `The script specified as BROWSER environment variable failed. +${import_picocolors4.default.cyan(scriptPath)} exited with code ${code}.` + ); + return; + } + }); +} +function executeNodeScript(scriptPath, url) { + let extraArgs = process.argv.slice(2), child = (0, import_cross_spawn.default)(process.execPath, [scriptPath, ...extraArgs, url], { + stdio: "inherit" + }); + return attachEventHandlers(child, scriptPath), !0; +} +function executeShellScript(scriptPath, url) { + let extraArgs = process.argv.slice(2), child = (0, import_cross_spawn.default)("sh", [scriptPath, ...extraArgs, url], { + stdio: "inherit" + }); + return attachEventHandlers(child, scriptPath), !0; +} +function startBrowserProcess(browser, url, args) { + if (process.platform === "darwin" && (typeof browser != "string" || browser === OSX_CHROME)) { + let supportedChromiumBrowsers = [ + "Google Chrome Canary", + "Google Chrome Dev", + "Google Chrome Beta", + "Google Chrome", + "Microsoft Edge", + "Brave Browser", + "Vivaldi", + "Chromium" + ]; + for (let chromiumBrowser of supportedChromiumBrowsers) + try { + execSync(`ps cax | grep "${chromiumBrowser}"`); + let command = `osascript "${join5( + resolvePackageDir("storybook"), + "assets", + "server", + "openBrowser.applescript" + )}" "`.concat(encodeURI(url), '" "').concat( + process.env.OPEN_MATCH_HOST_ONLY === "true" ? encodeURI(new URL(url).origin) : encodeURI(url), + '" "' + ).concat(chromiumBrowser, '"'); + return execSync(command, { + cwd: __dirname + }), !0; + } catch { + } + } + process.platform === "darwin" && browser === "open" && (browser = void 0); + try { + return open(url, { + app: browser ? { name: browser, arguments: args } : void 0, + wait: !1, + url: !0 + }).catch(() => { + }), !0; + } catch { + return !1; + } +} +function openBrowser(url) { + let { action, value, args } = getBrowserEnv(), canRunShell = process.platform !== "win32"; + switch (action) { + case 0 /* NONE */: + return !1; + case 2 /* SCRIPT */: + return executeNodeScript(value, url); + case 3 /* SHELL_SCRIPT */: { + if (canRunShell) + return executeShellScript(value, url); + throw new BrowserEnvError( + "Shell scripts are not supported on Windows PowerShell. Use WSL instead." + ); + } + case 1 /* BROWSER */: + return startBrowserProcess(value, url, args); + default: + throw new BrowserEnvError("Not implemented."); + } +} + +// src/core-server/utils/open-browser/open-in-browser.ts +async function openInBrowser(address) { + let errorOccurred = !1, openBrowserResult; + try { + openBrowserResult = await openBrowser(address); + } catch { + errorOccurred = !0; + } + if (openBrowserResult !== !1) { + try { + errorOccurred && (await open2(address), errorOccurred = !1); + } catch { + errorOccurred = !0; + } + if (errorOccurred) { + let browserEnv = process.env.BROWSER, browserHint = browserEnv ? ` + +Note: BROWSER environment variable is set to "${browserEnv}". To disable browser opening, use BROWSER=none or the --ci flag.` : ""; + logger11.error(import_ts_dedent.dedent` + Could not open ${address} inside a browser. If you're running this command inside a + docker container or on a CI, you need to pass the '--ci' flag to prevent opening a + browser by default.${browserHint} + `); + } + } +} + +// src/core-server/dev-server.ts +async function storybookDevServer(options, server) { + let core3 = await options.presets.apply("core"), app = build_default2({ server }), workingDir = process.cwd(), configDir = options.configDir, features = await options.presets.apply("features"), stories = await options.presets.apply("stories"), normalizedStories = normalizeStories(stories, { + configDir, + workingDir + }), storyIndexGeneratorPromise = options.presets.apply("storyIndexGenerator"), changeDetectionService = new ChangeDetectionService({ + storyIndexGeneratorPromise, + statusStore: getStatusStoreByTypeId(CHANGE_DETECTION_STATUS_TYPE_ID2), + workingDir + }), disposeChangeDetectionRuntime = async () => { + await changeDetectionService.dispose().catch(() => { + }); + }; + if (app.use(build_default({ level: 1 })), typeof options.extendServer == "function" && options.extendServer(server), app.use( + getHostValidationMiddleware({ + host: options.host, + allowedHosts: core3?.allowedHosts, + localAddress: options.localAddress, + networkAddress: options.networkAddress + }) + ), app.use(getAccessControlMiddleware(core3?.crossOriginIsolated ?? !1)), app.use(getCachingMiddleware()), registerIndexJsonRoute({ + app, + storyIndexGeneratorPromise, + normalizedStories, + channel: options.channel, + workingDir, + configDir + }), (await getMiddleware(options.configDir))(app), await options.presets.apply("experimental_devServer", app), !core3?.builder) + throw new MissingBuilderError2(); + let resolvedPreviewBuilder = typeof core3?.builder == "string" ? core3.builder : core3?.builder?.name, [previewBuilder, managerBuilder] = await Promise.all([ + getPreviewBuilder(resolvedPreviewBuilder), + getManagerBuilder(), + useStatics(app, options) + ]); + options.debugWebpack && logConfig2("Preview webpack config", await previewBuilder.getConfig(options)), core3?.disableProjectJson || useStorybookMetadata(app, options.configDir); + let managerResult = options.previewOnly ? void 0 : await managerBuilder.start({ + startTime: process.hrtime(), + options, + router: app, + server, + channel: options.channel + }), previewResult = await Promise.resolve(); + if (!options.ignorePreview) { + logger12.debug("Starting preview.."), previewResult = await previewBuilder.start({ + startTime: process.hrtime(), + options, + router: app, + server, + channel: options.channel + }).catch(async (e) => { + throw logger12.error("Failed to build the preview"), process.exitCode = 1, await disposeChangeDetectionRuntime(), await managerBuilder?.bail().catch(() => { + }), await previewBuilder?.bail().catch(() => { + }), e; + }); + let adapter; + try { + adapter = previewBuilder.changeDetectionAdapter?.(); + } catch (err) { + logger12.warn("Change detection: adapter initialisation failed"), logger12.debug(err instanceof Error ? err.stack ?? err.message : String(err)); + } + resolveChangeDetectionAdapter(adapter), features.changeDetection !== !1 ? changeDetectionService.start(!0) : changeDetectionService.start(!1); + } + let listening = new Promise((resolve4, reject) => { + server.once("error", reject), app.listen({ port: options.port, host: options.host }, resolve4); + }); + try { + let [indexGenerator] = await Promise.all([storyIndexGeneratorPromise, listening]); + if (indexGenerator && !options.ci && !options.smokeTest && options.open) { + let url = options.host ? options.networkAddress : options.localAddress; + openInBrowser(options.previewOnly ? `${url}iframe.html?navigator=true` : url).catch(() => { + }); + } + } catch (e) { + throw await disposeChangeDetectionRuntime(), await managerBuilder?.bail().catch(() => { + }), await previewBuilder?.bail().catch(() => { + }), e; + } + features?.componentsManifest && registerManifests({ app, presets: options.presets }), doTelemetry(app, core3, storyIndexGeneratorPromise, options); + async function cancelTelemetry() { + try { + if (!isTelemetryModuleEnabled()) + return; + let payload = { eventType: "dev" }; + try { + let indexAndStats = await (await storyIndexGeneratorPromise)?.getIndexAndStats(); + indexAndStats && Object.assign(payload, { + storyIndex: summarizeIndex(indexAndStats.storyIndex), + storyStats: indexAndStats.stats + }); + } catch { + } + await telemetry("canceled", payload, { immediate: !0 }); + } finally { + await disposeChangeDetectionRuntime(), process.exit(0); + } + } + return process.on("SIGINT", cancelTelemetry), process.on("SIGTERM", cancelTelemetry), { previewResult, managerResult }; +} + +// src/core-server/utils/get-server-channel.ts +var import_telejson3 = __toESM(require_dist2(), 1); +import { Channel as Channel3, HEARTBEAT_INTERVAL as HEARTBEAT_INTERVAL2, setChannel as setChannel2 } from "storybook/internal/channels"; +import WebSocket2, { WebSocketServer } from "ws"; + +// src/core-server/utils/validate-token.ts +import { timingSafeEqual } from "node:crypto"; +function isValidToken(requestToken, expectedToken) { + if (!requestToken || !expectedToken) + return !1; + let a = new Uint8Array(Buffer.from(requestToken, "utf8")), b = new Uint8Array(Buffer.from(expectedToken, "utf8")); + try { + return a.length === b.length && timingSafeEqual(a, b); + } catch { + return !1; + } +} + +// src/core-server/utils/get-server-channel.ts +var ServerChannelTransport = class { + constructor(server, options) { + this.socket = new WebSocketServer({ noServer: !0 }), server.on("upgrade", (request, socket, head) => { + try { + let url = request.url && new URL(request.url, options.localAddress); + if (!url || url.pathname !== "/storybook-server-channel") + return; + if (!options.skipValidation) { + let originHost = request.headers.origin && new URL(request.headers.origin).host; + if (!isValidHost(originHost, options)) + throw new Error("Invalid websocket origin"); + let requestToken = url.searchParams.get("token"); + if (!isValidToken(requestToken, options.token)) + throw new Error("Invalid websocket token"); + } + this.socket.handleUpgrade(request, socket, head, (ws) => { + this.socket.emit("connection", ws, request); + }); + } catch (error) { + logger.warn(`Rejecting WebSocket connection: ${error}`), socket.write(`HTTP/1.1 403 Forbidden\r +Connection: close\r +\r +`), socket.destroy(); + } + }), this.socket.on("connection", (wss) => { + wss.on("message", (raw) => { + let data2 = raw.toString(), event = typeof data2 == "string" && (0, import_telejson3.isJSON)(data2) ? (0, import_telejson3.parse)(data2, {}) : data2; + this.handler?.(event); + }); + }); + let interval = setInterval(() => { + this.send({ type: "ping" }); + }, HEARTBEAT_INTERVAL2); + this.socket.on("close", function() { + clearInterval(interval); + }), process.on("SIGTERM", () => { + this.socket.clients.forEach((client) => { + client.readyState === WebSocket2.OPEN && client.close(1001, "Server is shutting down"); + }), this.socket.close(() => process.exit(0)); + }); + } + setHandler(handler) { + this.handler = handler; + } + send(event) { + let data2 = (0, import_telejson3.stringify)(event, { maxDepth: 15 }); + Array.from(this.socket.clients).filter((c) => c.readyState === WebSocket2.OPEN).forEach((client) => client.send(data2)); + } +}; +function getServerChannel(server, options) { + let transports = [new ServerChannelTransport(server, options)], channel = new Channel3({ transports, async: !0 }); + return setChannel2(channel), UniversalStore.__prepare(channel, UniversalStore.Environment.SERVER), channel; +} + +// src/core-server/utils/output-startup-information.ts +var import_picocolors6 = __toESM(require_picocolors(), 1), import_pretty_hrtime = __toESM(require_pretty_hrtime(), 1), import_ts_dedent3 = __toESM(require_dist(), 1); +import { CLI_COLORS, logger as logger13 } from "storybook/internal/node-logger"; + +// src/core-server/utils/update-check.ts +var import_picocolors5 = __toESM(require_picocolors(), 1), import_ts_dedent2 = __toESM(require_dist(), 1); +import { cache as cache2 } from "storybook/internal/common"; +import { colors } from "storybook/internal/node-logger"; +import semver from "semver"; +var { STORYBOOK_VERSION_BASE = "https://storybook.js.org", CI } = process.env, updateCheck = async (version2) => { + let result, time = Date.now(); + try { + let fromCache = await cache2.get("lastUpdateCheck", { success: !1, time: 0 }); + time - 864e5 > fromCache.time && !CI ? (result = { success: !0, cached: !1, data: await (await Promise.race([ + fetch(`${STORYBOOK_VERSION_BASE}/versions.json?current=${version2}`), + // if fetch is too slow, we won't wait for it + new Promise((res, rej) => global.setTimeout(rej, 1500)) + ])).json(), time }, await cache2.set("lastUpdateCheck", result)) : result = { ...fromCache, cached: !0 }; + } catch (error) { + result = { success: !1, cached: !1, error, time }; + } + return result; +}; +function createUpdateMessage(updateInfo, version2) { + let updateMessage; + try { + let upgradeCommand = `npx storybook@${semver.prerelease(updateInfo.data.latest.version) ? "next" : "latest"} upgrade`; + updateMessage = updateInfo.success && semver.lt(version2, updateInfo.data.latest.version) ? import_ts_dedent2.dedent` + ${colors.orange( + `A new version (${import_picocolors5.default.bold(updateInfo.data.latest.version)}) is available!` + )} + + ${import_picocolors5.default.gray("Upgrade now:")} ${colors.green(upgradeCommand)} + + ${import_picocolors5.default.gray("Read full changelog:")} ${import_picocolors5.default.gray( + import_picocolors5.default.underline("https://github.com/storybookjs/storybook/blob/main/CHANGELOG.md") + )} + ` : ""; + } catch { + updateMessage = ""; + } + return updateMessage; +} + +// src/core-server/utils/output-startup-information.ts +function outputStartupInformation(options) { + let { + updateInfo, + version: version2, + name: name2, + address, + networkAddress, + allowedHosts, + managerTotalTime, + previewTotalTime + } = options, otherAllowedHosts = allowedHosts === !0 ? "all (insecure)" : allowedHosts?.length ? allowedHosts.join(", ") : void 0, updateMessage = createUpdateMessage(updateInfo, version2), serverMessages = [ + `- Local: ${address}`, + `- On your network: ${networkAddress}`, + otherAllowedHosts && `- Other allowed hosts: ${otherAllowedHosts}` + ]; + logger13.logBox( + import_ts_dedent3.dedent` + Storybook ready! + + ${serverMessages.join(` +`)}${updateMessage ? ` + +${updateMessage}` : ""} + `, + { + formatBorder: CLI_COLORS.storybook, + contentPadding: 3, + rounded: !0 + } + ); + let timeStatement = [ + managerTotalTime && `${import_picocolors6.default.underline((0, import_pretty_hrtime.default)(managerTotalTime))} for manager`, + previewTotalTime && `${import_picocolors6.default.underline((0, import_pretty_hrtime.default)(previewTotalTime))} for preview` + ].filter(Boolean).join(" and "); + logger13.info(timeStatement); +} + +// src/core-server/utils/runtime-instance-registry.ts +import { existsSync as existsSync2, rmSync } from "node:fs"; +import { mkdir as mkdir3, readFile as readFile4, readdir, rename, rm as rm2, stat as stat2, writeFile as writeFile4 } from "node:fs/promises"; +import { randomUUID } from "node:crypto"; +import { homedir } from "node:os"; +import { normalizeAddonName } from "storybook/internal/common"; +var STORYBOOK_MCP_ADDON = "@storybook/addon-mcp", DEFAULT_MCP_ENDPOINT = "/mcp", ONE_DAY_MS = 1440 * 60 * 1e3, SEVEN_DAYS_MS = 7 * ONE_DAY_MS; +function getDefaultRuntimeInstanceRegistryDir() { + return join(homedir(), ".storybook", "instances"); +} +function getOrigin(address) { + return new URL(address).origin; +} +function getMcpMetadataFromMainConfig(mainConfig) { + let addon = mainConfig.addons?.find( + (entry) => normalizeAddonName(entry) === STORYBOOK_MCP_ADDON + ); + return addon ? { status: "ready", endpoint: typeof addon == "object" && typeof addon.options?.endpoint == "string" ? addon.options.endpoint : DEFAULT_MCP_ENDPOINT } : { status: "not-installed" }; +} +function detectRuntimeInstanceAgent() { + return isClaudePreviewLaunch() ? CLAUDE_PREVIEW_AGENT_NAME : detectAgent()?.name; +} +function createRuntimeInstanceRecord({ + address, + agent, + configDir, + cwd = process.cwd(), + instanceId = randomUUID(), + mcp = { status: "not-installed" }, + now = /* @__PURE__ */ new Date(), + pid = process.pid, + port, + storybookVersion +}) { + let origin = getOrigin(address), timestamp = now.toISOString(); + return { + schemaVersion: 1, + instanceId, + pid, + cwd: resolve(cwd), + ...configDir ? { configDir: resolve(cwd, configDir) } : {}, + url: origin, + port, + ...agent ? { agent } : {}, + storybookVersion, + startedAt: timestamp, + updatedAt: timestamp, + mcp + }; +} +async function writeRuntimeInstanceRecord(record, registryDir = getDefaultRuntimeInstanceRegistryDir()) { + await mkdir3(registryDir, { recursive: !0 }), await cleanupRuntimeInstanceRegistry(registryDir); + let recordPath = join(registryDir, `${record.instanceId}.json`), tempPath = join( + registryDir, + `${record.instanceId}.${record.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}.tmp` + ); + try { + await writeFile4(tempPath, `${JSON.stringify(record, null, 2)} +`, "utf-8"), await rename(tempPath, recordPath); + } catch (error) { + throw await rm2(tempPath, { force: !0 }).catch(() => { + }), error; + } + return recordPath; +} +function isRecordObject(value) { + return typeof value == "object" && value !== null; +} +function getTimestampMs(record, key2) { + let value = record[key2]; + if (typeof value != "string") + return; + let timestamp = Date.parse(value); + return Number.isFinite(timestamp) ? timestamp : void 0; +} +function getRecordAgeMs(record, fileModifiedAtMs, nowMs) { + let recordTimestampMs = isRecordObject(record) ? getTimestampMs(record, "updatedAt") ?? getTimestampMs(record, "startedAt") : void 0; + return nowMs - (recordTimestampMs ?? fileModifiedAtMs); +} +function getRecordPid(record) { + if (!(!isRecordObject(record) || typeof record.pid != "number")) + return Number.isInteger(record.pid) && record.pid > 0 ? record.pid : void 0; +} +function isErrnoException(error) { + return typeof error == "object" && error !== null && "code" in error; +} +function getRuntimeInstanceRegistryCleanupDecision(entry) { + if (entry.kind === "temp-file") + return entry.nowMs - entry.fileModifiedAtMs > ONE_DAY_MS ? { action: "remove" } : { action: "keep" }; + if (entry.kind === "malformed-json") + return entry.nowMs - entry.fileModifiedAtMs > SEVEN_DAYS_MS ? { action: "remove" } : { action: "keep" }; + let recordAgeMs = getRecordAgeMs(entry.record, entry.fileModifiedAtMs, entry.nowMs); + if (recordAgeMs > SEVEN_DAYS_MS) + return { action: "remove" }; + if (recordAgeMs < ONE_DAY_MS) + return { action: "keep" }; + let recordPid = getRecordPid(entry.record); + return recordPid === void 0 ? { action: "keep" } : { action: "check-pid", pid: recordPid }; +} +function isPidInactive(pid) { + try { + return process.kill(pid, 0), !1; + } catch (error) { + return isErrnoException(error) && error.code === "ESRCH"; + } +} +async function applyCleanupDecision(recordPath, decision) { + (decision.action === "remove" || decision.action === "check-pid" && isPidInactive(decision.pid)) && await rm2(recordPath, { force: !0 }); +} +async function cleanupRuntimeInstanceRegistry(registryDir) { + let nowMs = Date.now(), entries = await readdir(registryDir, { withFileTypes: !0 }).catch(() => []); + await Promise.all( + entries.map(async (entry) => { + if (!entry.isFile()) + return; + let recordPath = join(registryDir, entry.name); + try { + let { mtimeMs } = await stat2(recordPath); + if (entry.name.endsWith(".tmp")) { + await applyCleanupDecision( + recordPath, + getRuntimeInstanceRegistryCleanupDecision({ + kind: "temp-file", + fileModifiedAtMs: mtimeMs, + nowMs + }) + ); + return; + } + if (!entry.name.endsWith(".json")) + return; + let content3 = await readFile4(recordPath, "utf-8"), record; + try { + record = JSON.parse(content3); + } catch { + await applyCleanupDecision( + recordPath, + getRuntimeInstanceRegistryCleanupDecision({ + kind: "malformed-json", + fileModifiedAtMs: mtimeMs, + nowMs + }) + ); + return; + } + await applyCleanupDecision( + recordPath, + getRuntimeInstanceRegistryCleanupDecision({ + kind: "record", + fileModifiedAtMs: mtimeMs, + nowMs, + record + }) + ); + } catch { + } + }) + ); +} +function registerProcessCleanup(recordPath) { + let cleanupSync = () => { + existsSync2(recordPath) && rmSync(recordPath, { force: !0 }); + }; + return process.once("exit", cleanupSync), process.prependOnceListener("SIGINT", cleanupSync), process.prependOnceListener("SIGTERM", cleanupSync), () => { + process.off("exit", cleanupSync), process.off("SIGINT", cleanupSync), process.off("SIGTERM", cleanupSync); + }; +} +async function writeStorybookRuntimeInstanceRecord({ + address, + agent = detectRuntimeInstanceAgent(), + configDir, + cwd, + mcp, + pid, + port, + registryDir, + registerCleanup = !0, + storybookVersion +}) { + let record = createRuntimeInstanceRecord({ + address, + agent, + configDir, + cwd, + mcp, + pid, + port, + storybookVersion + }), recordPath = await writeRuntimeInstanceRecord(record, registryDir), unregisterProcessCleanup = registerCleanup ? registerProcessCleanup(recordPath) : () => { + }; + return { + record, + recordPath, + unregisterProcessCleanup, + cleanup: async () => { + unregisterProcessCleanup(), await rm2(recordPath, { force: !0 }); + } + }; +} + +// src/core-server/utils/server-address.ts +var import_detect_port = __toESM(require_detect_port2(), 1); +import os from "node:os"; +import { logger as logger14 } from "storybook/internal/node-logger"; +import { NoFreePortError } from "storybook/internal/server-errors"; +function getServerAddresses(port, host, proto, initialPath) { + let address = new URL(`${proto}://localhost:${port}/`), networkAddress = new URL(`${proto}://${host || getLocalIp()}:${port}/`); + if (initialPath) { + let searchParams = `?path=${decodeURIComponent( + initialPath.startsWith("/") ? initialPath : `/${initialPath}` + )}`; + address.search = searchParams, networkAddress.search = searchParams; + } + return { + address: address.href, + networkAddress: networkAddress.href + }; +} +var getServerPort = (port, { exactPort } = {}) => (0, import_detect_port.default)(port).catch((error) => { + logger14.error(error), process.exit(-1); +}).then((freePort) => { + if (!freePort) + throw new NoFreePortError({ requestedPort: port }); + return exactPort && port != null && freePort !== port && (logger14.error(`Port ${port} is not available. Exiting because --exact-port was provided.`), process.exit(-1)), freePort; +}), getServerChannelUrl = (port, { https: https2 }) => `${https2 ? "wss" : "ws"}://localhost:${port}/storybook-server-channel`, getLocalIp = () => { + let allFilteredIps = Object.values(os.networkInterfaces()).flat().filter((ip) => ip && ip.family === "IPv4" && !ip.internal); + return allFilteredIps.length ? allFilteredIps[0]?.address : "0.0.0.0"; +}; + +// src/core-server/utils/server-init.ts +import { readFile as readFile5 } from "node:fs/promises"; +import { logger as logger15 } from "storybook/internal/node-logger"; +import http2 from "http"; +import https from "https"; +async function getServer(options) { + if (!options.https) + return http2.createServer(); + options.sslCert || (logger15.error("Error: --ssl-cert is required with --https"), process.exit(-1)), options.sslKey || (logger15.error("Error: --ssl-key is required with --https"), process.exit(-1)); + let sslOptions = { + ca: await Promise.all((options.sslCa || []).map((ca) => readFile5(ca, { encoding: "utf8" }))), + cert: await readFile5(options.sslCert, { encoding: "utf8" }), + key: await readFile5(options.sslKey, { encoding: "utf8" }) + }; + return https.createServer(sslOptions); +} + +// src/core-server/utils/strip-comments-and-strings.ts +function stripCommentsAndStrings(code) { + let result = code.replace(/(['"`])(?:\\.|(?!\1)[\s\S])*?\1/g, '""'); + return result = result.replace(/\/\*[\s\S]*?\*\//g, ""), result = result.split(` +`).map((line) => line.split("//")[0]).join(` +`), result; +} + +// src/core-server/utils/warnOnIncompatibleAddons.ts +import { logger as logger17 } from "storybook/internal/node-logger"; + +// ../lib/cli-storybook/src/doctor/getIncompatibleStorybookPackages.ts +var import_picocolors7 = __toESM(require_picocolors(), 1); +import { versions as storybookCorePackages } from "storybook/internal/common"; +import { logger as logger16 } from "storybook/internal/node-logger"; +import semver2 from "semver"; + +// ../lib/cli-storybook/src/automigrate/helpers/consolidated-packages.ts +var consolidatedPackages = { + "@storybook/channels": "storybook/internal/channels", + "@storybook/client-logger": "storybook/internal/client-logger", + "@storybook/core-common": "storybook/internal/common", + "@storybook/core-events": "storybook/internal/core-events", + "@storybook/csf": "storybook/internal/csf", + "@storybook/csf-tools": "storybook/internal/csf-tools", + "@storybook/docs-tools": "storybook/internal/docs-tools", + "@storybook/node-logger": "storybook/internal/node-logger", + "@storybook/preview-api": "storybook/preview-api", + "@storybook/router": "storybook/internal/router", + "@storybook/telemetry": "storybook/internal/telemetry", + "@storybook/theming": "storybook/theming", + "@storybook/types": "storybook/internal/types", + "@storybook/manager-api": "storybook/manager-api", + "@storybook/manager": "storybook/internal/manager", + "@storybook/preview": "storybook/internal/preview", + "@storybook/core-server": "storybook/internal/core-server", + "@storybook/builder-manager": "storybook/internal/builder-manager", + "@storybook/components": "storybook/internal/components", + "@storybook/test": "storybook/test", + "@storybook/experimental-nextjs-vite": "@storybook/nextjs-vite", + "@storybook/instrumenter": "storybook/internal/instrumenter", + "@storybook/blocks": "@storybook/addon-docs/blocks" +}; + +// ../lib/cli-storybook/src/doctor/getIncompatibleStorybookPackages.ts +var checkPackageCompatibility = async (dependency, context) => { + let { currentStorybookVersion, skipErrors, packageManager } = context; + try { + let dependencyPackageJson = await packageManager.getModulePackageJSON(dependency); + if (dependencyPackageJson === null) + return { packageName: dependency }; + let { + version: packageVersion, + name: name2 = dependency, + dependencies, + peerDependencies, + homepage + } = dependencyPackageJson, packageStorybookVersion = Object.entries({ + ...dependencies, + ...peerDependencies + }).filter( + ([dep]) => storybookCorePackages[dep] || consolidatedPackages[dep] + ).map(([_, versionRange]) => versionRange).find((versionRange) => versionRange && // We can't check compatibility for 0.x packages, so we skip them + !/^[~^]?0\./.test(versionRange) && semver2.validRange(versionRange) && !semver2.satisfies(currentStorybookVersion, versionRange)), isCorePackage = storybookCorePackages[name2], availableUpdate, availableCoreUpdate; + return isCorePackage && packageVersion && semver2.gt(currentStorybookVersion, packageVersion) && (availableUpdate = currentStorybookVersion), isCorePackage && packageVersion && semver2.gt(packageVersion, currentStorybookVersion) && (availableCoreUpdate = packageVersion), { + packageName: name2, + packageVersion, + homepage, + hasIncompatibleDependencies: packageStorybookVersion != null, + packageStorybookVersion, + availableUpdate, + availableCoreUpdate + }; + } catch (err) { + return skipErrors || logger16.log( + `Error checking compatibility for ${dependency}, please report an issue: +` + String(err) + ), { packageName: dependency }; + } +}, getIncompatibleStorybookPackages = async (context) => { + if (context.currentStorybookVersion.includes("0.0.0")) + return []; + let allDeps = context.packageManager.getAllDependencies(), storybookLikeDeps = Object.keys(allDeps).filter((dep) => dep.includes("storybook")); + if (storybookLikeDeps.length === 0 && !context.skipErrors) + throw new Error("No Storybook dependencies found in the package.json"); + return Promise.all( + storybookLikeDeps.filter((dep) => !storybookCorePackages[dep]).map((dep) => checkPackageCompatibility(dep, context)) + ); +}, getIncompatiblePackagesSummary = (dependencyAnalysis, currentStorybookVersion) => { + let summaryMessage = [], incompatiblePackages = dependencyAnalysis.filter( + (dep) => dep.hasIncompatibleDependencies + ); + return incompatiblePackages.length > 0 && (summaryMessage.push( + `You are currently using Storybook ${import_picocolors7.default.bold( + currentStorybookVersion + )} but you have packages which are incompatible with it: +` + ), incompatiblePackages.forEach( + ({ + packageName: addonName, + packageVersion: addonVersion, + homepage, + availableUpdate, + packageStorybookVersion + }) => { + let packageDescription = `${addonName}@${addonVersion}`, updateMessage = availableUpdate ? ` (${availableUpdate} available!)` : "", dependsOnStorybook = packageStorybookVersion != null ? ` which depends on ${packageStorybookVersion}` : "", packageRepo = homepage ? ` + Repo: ${homepage}` : ""; + summaryMessage.push( + `- ${packageDescription}${updateMessage}${dependsOnStorybook}${packageRepo}` + ); + } + ), summaryMessage.push( + ` +Please consider updating your packages or contacting the maintainers for compatibility details.`, + ` +For more details on compatibility guidance, see:`, + "https://github.com/storybookjs/storybook/issues/32836" + ), incompatiblePackages.some((dep) => dep.availableCoreUpdate) && summaryMessage.push( + ` +`, + `The version of ${import_picocolors7.default.blue(`storybook@${currentStorybookVersion}`)} is behind the following core packages:`, + `${incompatiblePackages.filter((dep) => dep.availableCoreUpdate).map( + ({ packageName, packageVersion }) => `- ${import_picocolors7.default.blue(`${packageName}@${packageVersion}`)}` + ).join(` +`)}`, + ` +`, + "Upgrade Storybook with:", + import_picocolors7.default.blue("npx storybook@latest upgrade") + )), summaryMessage.join(` +`); +}; + +// src/core-server/utils/warnOnIncompatibleAddons.ts +var warnOnIncompatibleAddons = async (currentStorybookVersion, packageManager) => { + let incompatiblePackagesList = await getIncompatibleStorybookPackages({ + skipUpgradeCheck: !0, + skipErrors: !0, + currentStorybookVersion, + packageManager + }), incompatiblePackagesMessage = getIncompatiblePackagesSummary( + incompatiblePackagesList, + currentStorybookVersion + ); + incompatiblePackagesMessage && logger17.warn(incompatiblePackagesMessage); +}; + +// src/core-server/utils/warnWhenUsingArgTypesRegex.ts +var import_picocolors8 = __toESM(require_picocolors(), 1), import_ts_dedent4 = __toESM(require_dist(), 1); +import { readFile as readFile6 } from "node:fs/promises"; +import { core } from "storybook/internal/babel"; +import { babelParse } from "storybook/internal/csf-tools"; +async function warnWhenUsingArgTypesRegex(previewConfigPath, config) { + let previewContent = previewConfigPath ? await readFile6(previewConfigPath, { encoding: "utf8" }) : ""; + (config?.addons?.some( + (it) => typeof it == "string" ? it === "@chromatic-com/storybook" : it.name === "@chromatic-com/storybook" + ) ?? !1) && previewConfigPath && previewContent.includes("argTypesRegex") && new core.File( + { filename: previewConfigPath }, + { code: previewContent, ast: babelParse(previewContent) } + ).path.traverse({ + Identifier: (path2) => { + if (path2.node.name === "argTypesRegex") { + let message = import_ts_dedent4.dedent` + ${import_picocolors8.default.bold("Attention")}: We've detected that you're using ${import_picocolors8.default.cyan( + "actions.argTypesRegex" + )} together with the visual test addon: + + ${path2.buildCodeFrameError(previewConfigPath).message} + + We recommend removing the ${import_picocolors8.default.cyan( + "argTypesRegex" + )} and assigning explicit action with the ${import_picocolors8.default.cyan( + "fn" + )} function from ${import_picocolors8.default.cyan("storybook/test")} instead: + https://storybook.js.org/docs/essentials/actions#via-storybooktest-fn-spies + + The build used by the addon for snapshot testing doesn't take the regex into account, which can cause hard to debug problems when a snapshot depends on the presence of action props. + `; + console.warn(message); + } + } + }); +} + +// src/core-server/build-dev.ts +async function resolveOnboardingInitialPath(cliInitialPath) { + if (cliInitialPath || detectAgent2()) + return cliInitialPath; + if (await cache3.get("onboarding-pending").catch(() => { + })) { + try { + await cache3.remove("onboarding-pending"); + } catch { + } + return "/onboarding"; + } +} +async function buildDevStandalone(options) { + let { packageJson, versionUpdates } = options, { storybookVersion, previewConfigPath } = options, configDir = resolve(options.configDir); + packageJson ? (invariant( + packageJson.version !== void 0, + `Expected package.json#version to be defined in the "${packageJson.name}" package}` + ), storybookVersion = packageJson.version, previewConfigPath = getConfigInfo(configDir).previewConfigPath ?? void 0) : storybookVersion || (storybookVersion = versions.storybook); + let [port, versionCheck] = await Promise.all([ + getServerPort(options.port, { exactPort: options.exactPort }), + versionUpdates ? updateCheck(storybookVersion) : Promise.resolve({ success: !1, cached: !1, data: {}, time: Date.now() }) + ]); + !options.ci && !options.smokeTest && options.port != null && port !== options.port && (await prompt.confirm({ + message: import_ts_dedent5.dedent` + Port ${options.port} is not available. + Would you like to run Storybook on port ${port} instead? + `, + initialValue: !0 + }) || process.exit(1)); + let cacheKey = oneWayHash(relative(getProjectRoot(), configDir)); + invariant(port, "expected options to have a port"), options.initialPath = await resolveOnboardingInitialPath(options.initialPath); + let { address: localAddress, networkAddress } = getServerAddresses( + port, + options.host, + options.https ? "https" : "http", + options.initialPath + ), cacheOutputDir = resolvePathInStorybookCache2("public", cacheKey), outputDir = resolve(options.outputDir || cacheOutputDir); + options.smokeTest && (outputDir = cacheOutputDir), options.port = port, options.versionCheck = versionCheck, options.configType = "DEVELOPMENT", options.configDir = configDir, options.cacheKey = cacheKey, options.outputDir = outputDir, options.serverChannelUrl = getServerChannelUrl(port, options), options.localAddress = localAddress, options.networkAddress = networkAddress, options.pnp = await detectPnp(), options.pnp && deprecate(import_ts_dedent5.dedent` + As of Storybook 10.0, PnP is deprecated. + If you are using PnP, you can continue to use Storybook 10.0, but we recommend migrating to a different package manager or linker-mode. + + In future versions, PnP compatibility will be removed. + `); + let config = await loadMainConfig2(options), { core: core3, framework } = config, corePresets = [], frameworkName = typeof framework == "string" ? framework : framework?.name; + options.ignorePreview || validateFrameworkName(frameworkName), frameworkName && corePresets.push(join(frameworkName, "preset")), frameworkName = frameworkName || "custom"; + let packageManager = JsPackageManagerFactory.getPackageManager({ + configDir: options.configDir + }); + try { + await warnOnIncompatibleAddons(storybookVersion, packageManager); + } catch (e) { + logger18.warn("Storybook failed to check addon compatibility"), logger18.debug(`${e instanceof Error ? e.stack : String(e)}`); + } + try { + await warnWhenUsingArgTypesRegex(previewConfigPath, config); + } catch { + } + let server = await getServer(options), presets = await loadAllPresets2({ + corePresets, + overridePresets: [ + import.meta.resolve("storybook/internal/core-server/presets/common-override-preset") + ], + ...options, + isCritical: !0, + channel: new channels_default({ + transports: [ + { + setHandler: () => () => console.error("CHANNEL IS NOT READY YET"), + send: () => () => console.error("CHANNEL IS NOT READY YET") + } + ] + }) + }), { allowedHosts, renderer, builder } = await presets.apply("core", {}); + if (options.host === "0.0.0.0" && (!allowedHosts || allowedHosts !== !0 && allowedHosts.length === 0) && logger18.warn(import_ts_dedent5.dedent` + --host is set to 0.0.0.0 but no allowedHosts are defined. Allowing all hosts. + To restrict allowed hosts, set core.allowedHosts in your main Storybook config. + See: https://storybook.js.org/docs/api/main-config/main-config-core + `), !builder) + throw new MissingBuilderError3(); + versionCheck.success && !versionCheck.cached && telemetry4("version-update"); + let resolvedPreviewBuilder = typeof builder == "string" ? builder : builder.name, [previewBuilder, managerBuilder] = await Promise.all([ + getPreviewBuilder(resolvedPreviewBuilder), + getManagerBuilder() + ]); + if (resolvedPreviewBuilder.includes("builder-vite")) { + let deprecationMessage = (0, import_ts_dedent5.dedent)(`Using CommonJS in your main configuration file is deprecated with Vite. + - Refer to the migration guide at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#commonjs-with-vite-is-deprecated`), mainJsPath = getInterpretedFile( + resolve(options.configDir || ".storybook", "main") + ); + /\.c[jt]s$/.test(mainJsPath) && deprecate(deprecationMessage); + let mainJsContent = await readFile7(mainJsPath, { encoding: "utf8" }), CJS_CONTENT_REGEX = /\bmodule\.exports\b|\bexports[.[]|\brequire\s*\(|\bObject\.(?:defineProperty|defineProperties|assign)\s*\(\s*exports\b/, strippedContent = stripCommentsAndStrings(mainJsContent); + CJS_CONTENT_REGEX.test(strippedContent) && deprecate(deprecationMessage); + } + let resolvedRenderer = renderer && resolveAddonName2(options.configDir, renderer, options), channel = getServerChannel(server, { + token: getWsToken(), + host: options.host, + allowedHosts, + skipValidation: isWebContainer(), + localAddress, + networkAddress + }); + presets = await loadAllPresets2({ + corePresets: [ + join(resolvePackageDir("storybook"), "dist/core-server/presets/common-preset.js"), + ...managerBuilder.corePresets || [], + ...previewBuilder.corePresets || [], + ...resolvedRenderer ? [resolvedRenderer] : [], + ...corePresets + ], + overridePresets: [ + ...previewBuilder.overridePresets || [], + import.meta.resolve("storybook/internal/core-server/presets/common-override-preset") + ], + ...options, + channel + }); + let features = await presets.apply("features"); + global3.FEATURES = features, await applyServicesPresetOnce(presets), await presets.apply("experimental_serverChannel", channel); + let fullOptions = { + ...options, + presets, + features, + channel + }, { managerResult, previewResult } = await buildOrThrow( + async () => storybookDevServer(fullOptions, server) + ), mcp = getMcpMetadataFromMainConfig(config); + await writeStorybookRuntimeInstanceRecord({ + address: localAddress, + configDir: options.configDir, + mcp, + port, + storybookVersion + }).catch((error) => { + logger18.warn("Storybook failed to write its runtime instance registry record."), logger18.debug(error instanceof Error ? error.stack ?? error.message : String(error)); + }); + let previewTotalTime = previewResult?.totalTime, managerTotalTime = managerResult?.totalTime, previewStats = previewResult?.stats, managerStats = managerResult?.stats, statsOption = options.webpackStatsJson || options.statsJson; + if (statsOption) { + let target = statsOption === !0 ? options.outputDir : statsOption; + await outputStats(target, previewStats); + } + if (options.smokeTest) { + let warnings = []; + warnings.push(...managerStats?.toJson()?.warnings || []); + try { + warnings.push(...previewStats?.toJson()?.warnings || []); + } catch (err) { + if (!(err instanceof NoStatsForViteDevError)) + throw err; + } + let problems = warnings.filter((warning) => !warning.message.includes("export 'useInsertionEffect'")).filter((warning) => !warning.message.includes("compilation but it's unused")).filter( + (warning) => !warning.message.includes("Conflicting values for 'process.env.NODE_ENV'") + ); + problems.length > 0 ? (logger18.error("Smoke tests failed."), logger18.log(problems.map((p) => p.stack).join(` +`))) : logger18.step(CLI_COLORS2.success("Smoke tests passed, exiting.")), logger18.outro(""), process.exit(problems.length > 0 ? 1 : 0); + } else { + let name2 = frameworkName.split("@storybook/").length > 1 ? frameworkName.split("@storybook/")[1] : frameworkName; + options.quiet || outputStartupInformation({ + updateInfo: versionCheck, + version: storybookVersion, + name: name2, + address: localAddress, + networkAddress, + allowedHosts, + managerTotalTime, + previewTotalTime + }); + } + return { port, address: localAddress, networkAddress }; +} + +// src/core-server/build-index.ts +import { writeFile as writeFile5 } from "node:fs/promises"; +import { normalizeStories as normalizeStories2 } from "storybook/internal/common"; +import { logger as logger20 } from "storybook/internal/node-logger"; + +// src/core-server/load.ts +import { Channel as Channel4, setChannel as setChannel3 } from "storybook/internal/channels"; +import { + getProjectRoot as getProjectRoot2, + loadAllPresets as loadAllPresets3, + loadMainConfig as loadMainConfig3, + resolveAddonName as resolveAddonName3, + validateFrameworkName as validateFrameworkName2 +} from "storybook/internal/common"; +import { oneWayHash as oneWayHash2 } from "storybook/internal/telemetry"; +import { global as global4 } from "@storybook/global"; +async function loadStorybook(options) { + let configDir = resolve(options.configDir), cacheKey = oneWayHash2(relative(getProjectRoot2(), configDir)); + options.configType = "DEVELOPMENT", options.configDir = configDir, options.cacheKey = cacheKey; + let channel = new Channel4({}); + setChannel3(channel); + let config = await loadMainConfig3(options), { framework } = config, corePresets = [], frameworkName = typeof framework == "string" ? framework : framework?.name; + options.ignorePreview || validateFrameworkName2(frameworkName), frameworkName && corePresets.push(join(frameworkName, "preset")), frameworkName = frameworkName || "custom"; + let presets = await loadAllPresets3({ + corePresets, + overridePresets: [ + import.meta.resolve("storybook/internal/core-server/presets/common-override-preset") + ], + ...options, + isCritical: !0, + channel + }), { renderer, builder } = await presets.apply("core", {}), resolvedRenderer = renderer && resolveAddonName3(options.configDir, renderer, options), builderName = typeof builder == "string" ? builder : builder?.name; + if (builderName) { + let builderPresetDir = builderName.startsWith("file:") || isAbsolute(builderName) ? dirname(builderName) : resolvePackageDir(builderName); + corePresets.push(join(builderPresetDir, "preset.js")); + } + presets = await loadAllPresets3({ + corePresets: [ + join(resolvePackageDir("storybook"), "dist/core-server/presets/common-preset.js"), + ...resolvedRenderer ? [resolvedRenderer] : [], + ...corePresets + ], + overridePresets: [ + import.meta.resolve("storybook/internal/core-server/presets/common-override-preset") + ], + channel, + ...options + }); + let features = await presets.apply("features"); + return global4.FEATURES = features, await applyServicesPresetOnce(presets), { + ...options, + presets, + features + }; +} + +// src/core-server/utils/StoryIndexGenerator.ts +import { existsSync as existsSync3 } from "node:fs"; +import { readFile as readFile8 } from "node:fs/promises"; +import { dirname as dirname2, extname, join as join6, normalize as normalize2, relative as relative4, resolve as resolve3, sep } from "node:path"; +import { commonGlobOptions as commonGlobOptions2, getProjectRoot as getProjectRoot3, normalizeStoryPath } from "storybook/internal/common"; +import { combineTags, storyNameFromExport, toId } from "storybook/internal/csf"; +import { getStorySortParameter, loadConfig } from "storybook/internal/csf-tools"; +import { logger as logger19, once } from "storybook/internal/node-logger"; +import { isExampleStoryId as isExampleStoryId2 } from "storybook/internal/telemetry"; +var import_picocolors9 = __toESM(require_picocolors(), 1); +var import_ts_dedent7 = __toESM(require_dist(), 1), TsconfigPaths = __toESM(require_lib3(), 1); + +// src/preview-api/modules/store/sortStories.ts +var import_ts_dedent6 = __toESM(require_dist(), 1); + +// src/preview-api/modules/store/storySort.ts +var STORY_KIND_PATH_SEPARATOR = /\s*\/\s*/, storySort = (options = {}) => (a, b) => { + if (a.title === b.title && !options.includeNames) + return 0; + let method = options.method || "configure", order = options.order || [], storyTitleA = a.title.trim().split(STORY_KIND_PATH_SEPARATOR), storyTitleB = b.title.trim().split(STORY_KIND_PATH_SEPARATOR); + options.includeNames && (storyTitleA.push(a.name), storyTitleB.push(b.name)); + let depth = 0; + for (; storyTitleA[depth] || storyTitleB[depth]; ) { + if (!storyTitleA[depth]) + return -1; + if (!storyTitleB[depth]) + return 1; + let nameA = storyTitleA[depth], nameB = storyTitleB[depth]; + if (nameA !== nameB) { + let indexA = order.indexOf(nameA), indexB = order.indexOf(nameB), indexWildcard = order.indexOf("*"); + return indexA !== -1 || indexB !== -1 ? (indexA === -1 && (indexWildcard !== -1 ? indexA = indexWildcard : indexA = order.length), indexB === -1 && (indexWildcard !== -1 ? indexB = indexWildcard : indexB = order.length), indexA - indexB) : method === "configure" ? 0 : nameA.localeCompare(nameB, options.locales ? options.locales : void 0, { + numeric: !0, + sensitivity: "accent" + }); + } + let index2 = order.indexOf(nameA); + index2 === -1 && (index2 = order.indexOf("*")), order = index2 !== -1 && Array.isArray(order[index2 + 1]) ? order[index2 + 1] : [], depth += 1; + } + return 0; +}; + +// src/preview-api/modules/store/sortStories.ts +var sortStoriesCommon = (stories, storySortParameter, fileNameOrder) => { + if (storySortParameter) { + let sortFn; + typeof storySortParameter == "function" ? sortFn = storySortParameter : sortFn = storySort(storySortParameter), stories.sort(sortFn); + } else + stories.sort( + (s1, s2) => fileNameOrder.indexOf(s1.importPath) - fileNameOrder.indexOf(s2.importPath) + ); + return stories; +}, sortStoriesV7 = (stories, storySortParameter, fileNameOrder) => { + try { + return sortStoriesCommon(stories, storySortParameter, fileNameOrder); + } catch (err) { + throw new Error(import_ts_dedent6.dedent` + Error sorting stories with sort parameter ${storySortParameter}: + + > ${err.message} + + Are you using a V6-style sort function in V7 mode? + + More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort + `); + } +}; + +// src/core-server/utils/IndexingError.ts +var IndexingError = class extends Error { + constructor(message, importPaths, stack) { + super(), this.message = message, this.importPaths = importPaths, stack && (this.stack = stack); + } + pathsString() { + return this.importPaths.length === 1 ? `${slash(this.importPaths[0])}` : `${this.importPaths.map(slash).join(",")}`; + } + toString() { + return `${this.pathsString()}: ${this.message}`; + } +}, MultipleIndexingError = class extends Error { + constructor(indexingErrors) { + super(); + this.indexingErrors = indexingErrors; + if (this.indexingErrors.length === 0) + throw new Error("Unexpected empty error list"); + if (this.indexingErrors.length === 1) { + let [err] = this.indexingErrors; + this.message = `Unable to index ${err.pathsString()}`; + } else + this.message = `Unable to index files: +${this.indexingErrors.map((err) => `- ${err}`).join(` +`)}`; + } + toString() { + return this.indexingErrors.length === 1 ? `${this.message}: + ${this.indexingErrors[0].stack}` : this.message; + } +}; + +// src/core-server/utils/autoName.ts +import { basename as basename3 } from "node:path"; +function autoName(mdxImportPath, csfImportPath, defaultName) { + let mdxBasename = basename3(mdxImportPath), csfBasename = basename3(csfImportPath), [mdxFilename] = mdxBasename.split("."), [csfFilename] = csfBasename.split("."); + return mdxFilename === csfFilename ? defaultName : mdxFilename; +} + +// src/core-server/utils/analyze-mdx.ts +init_acorn(); +var import_acorn_jsx2 = __toESM(require_acorn_jsx(), 1); + +// ../../node_modules/mdast-util-to-string/lib/index.js +var emptyOptions = {}; +function toString2(value, options) { + let settings = options || emptyOptions, includeImageAlt = typeof settings.includeImageAlt == "boolean" ? settings.includeImageAlt : !0, includeHtml = typeof settings.includeHtml == "boolean" ? settings.includeHtml : !0; + return one(value, includeImageAlt, includeHtml); +} +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ("value" in value) + return value.type === "html" && !includeHtml ? "" : value.value; + if (includeImageAlt && "alt" in value && value.alt) + return value.alt; + if ("children" in value) + return all(value.children, includeImageAlt, includeHtml); + } + return Array.isArray(value) ? all(value, includeImageAlt, includeHtml) : ""; +} +function all(values, includeImageAlt, includeHtml) { + let result = [], index2 = -1; + for (; ++index2 < values.length; ) + result[index2] = one(values[index2], includeImageAlt, includeHtml); + return result.join(""); +} +function node(value) { + return !!(value && typeof value == "object"); +} + +// ../../node_modules/character-entities/index.js +var characterEntities = { + AElig: "\xC6", + AMP: "&", + Aacute: "\xC1", + Abreve: "\u0102", + Acirc: "\xC2", + Acy: "\u0410", + Afr: "\u{1D504}", + Agrave: "\xC0", + Alpha: "\u0391", + Amacr: "\u0100", + And: "\u2A53", + Aogon: "\u0104", + Aopf: "\u{1D538}", + ApplyFunction: "\u2061", + Aring: "\xC5", + Ascr: "\u{1D49C}", + Assign: "\u2254", + Atilde: "\xC3", + Auml: "\xC4", + Backslash: "\u2216", + Barv: "\u2AE7", + Barwed: "\u2306", + Bcy: "\u0411", + Because: "\u2235", + Bernoullis: "\u212C", + Beta: "\u0392", + Bfr: "\u{1D505}", + Bopf: "\u{1D539}", + Breve: "\u02D8", + Bscr: "\u212C", + Bumpeq: "\u224E", + CHcy: "\u0427", + COPY: "\xA9", + Cacute: "\u0106", + Cap: "\u22D2", + CapitalDifferentialD: "\u2145", + Cayleys: "\u212D", + Ccaron: "\u010C", + Ccedil: "\xC7", + Ccirc: "\u0108", + Cconint: "\u2230", + Cdot: "\u010A", + Cedilla: "\xB8", + CenterDot: "\xB7", + Cfr: "\u212D", + Chi: "\u03A7", + CircleDot: "\u2299", + CircleMinus: "\u2296", + CirclePlus: "\u2295", + CircleTimes: "\u2297", + ClockwiseContourIntegral: "\u2232", + CloseCurlyDoubleQuote: "\u201D", + CloseCurlyQuote: "\u2019", + Colon: "\u2237", + Colone: "\u2A74", + Congruent: "\u2261", + Conint: "\u222F", + ContourIntegral: "\u222E", + Copf: "\u2102", + Coproduct: "\u2210", + CounterClockwiseContourIntegral: "\u2233", + Cross: "\u2A2F", + Cscr: "\u{1D49E}", + Cup: "\u22D3", + CupCap: "\u224D", + DD: "\u2145", + DDotrahd: "\u2911", + DJcy: "\u0402", + DScy: "\u0405", + DZcy: "\u040F", + Dagger: "\u2021", + Darr: "\u21A1", + Dashv: "\u2AE4", + Dcaron: "\u010E", + Dcy: "\u0414", + Del: "\u2207", + Delta: "\u0394", + Dfr: "\u{1D507}", + DiacriticalAcute: "\xB4", + DiacriticalDot: "\u02D9", + DiacriticalDoubleAcute: "\u02DD", + DiacriticalGrave: "`", + DiacriticalTilde: "\u02DC", + Diamond: "\u22C4", + DifferentialD: "\u2146", + Dopf: "\u{1D53B}", + Dot: "\xA8", + DotDot: "\u20DC", + DotEqual: "\u2250", + DoubleContourIntegral: "\u222F", + DoubleDot: "\xA8", + DoubleDownArrow: "\u21D3", + DoubleLeftArrow: "\u21D0", + DoubleLeftRightArrow: "\u21D4", + DoubleLeftTee: "\u2AE4", + DoubleLongLeftArrow: "\u27F8", + DoubleLongLeftRightArrow: "\u27FA", + DoubleLongRightArrow: "\u27F9", + DoubleRightArrow: "\u21D2", + DoubleRightTee: "\u22A8", + DoubleUpArrow: "\u21D1", + DoubleUpDownArrow: "\u21D5", + DoubleVerticalBar: "\u2225", + DownArrow: "\u2193", + DownArrowBar: "\u2913", + DownArrowUpArrow: "\u21F5", + DownBreve: "\u0311", + DownLeftRightVector: "\u2950", + DownLeftTeeVector: "\u295E", + DownLeftVector: "\u21BD", + DownLeftVectorBar: "\u2956", + DownRightTeeVector: "\u295F", + DownRightVector: "\u21C1", + DownRightVectorBar: "\u2957", + DownTee: "\u22A4", + DownTeeArrow: "\u21A7", + Downarrow: "\u21D3", + Dscr: "\u{1D49F}", + Dstrok: "\u0110", + ENG: "\u014A", + ETH: "\xD0", + Eacute: "\xC9", + Ecaron: "\u011A", + Ecirc: "\xCA", + Ecy: "\u042D", + Edot: "\u0116", + Efr: "\u{1D508}", + Egrave: "\xC8", + Element: "\u2208", + Emacr: "\u0112", + EmptySmallSquare: "\u25FB", + EmptyVerySmallSquare: "\u25AB", + Eogon: "\u0118", + Eopf: "\u{1D53C}", + Epsilon: "\u0395", + Equal: "\u2A75", + EqualTilde: "\u2242", + Equilibrium: "\u21CC", + Escr: "\u2130", + Esim: "\u2A73", + Eta: "\u0397", + Euml: "\xCB", + Exists: "\u2203", + ExponentialE: "\u2147", + Fcy: "\u0424", + Ffr: "\u{1D509}", + FilledSmallSquare: "\u25FC", + FilledVerySmallSquare: "\u25AA", + Fopf: "\u{1D53D}", + ForAll: "\u2200", + Fouriertrf: "\u2131", + Fscr: "\u2131", + GJcy: "\u0403", + GT: ">", + Gamma: "\u0393", + Gammad: "\u03DC", + Gbreve: "\u011E", + Gcedil: "\u0122", + Gcirc: "\u011C", + Gcy: "\u0413", + Gdot: "\u0120", + Gfr: "\u{1D50A}", + Gg: "\u22D9", + Gopf: "\u{1D53E}", + GreaterEqual: "\u2265", + GreaterEqualLess: "\u22DB", + GreaterFullEqual: "\u2267", + GreaterGreater: "\u2AA2", + GreaterLess: "\u2277", + GreaterSlantEqual: "\u2A7E", + GreaterTilde: "\u2273", + Gscr: "\u{1D4A2}", + Gt: "\u226B", + HARDcy: "\u042A", + Hacek: "\u02C7", + Hat: "^", + Hcirc: "\u0124", + Hfr: "\u210C", + HilbertSpace: "\u210B", + Hopf: "\u210D", + HorizontalLine: "\u2500", + Hscr: "\u210B", + Hstrok: "\u0126", + HumpDownHump: "\u224E", + HumpEqual: "\u224F", + IEcy: "\u0415", + IJlig: "\u0132", + IOcy: "\u0401", + Iacute: "\xCD", + Icirc: "\xCE", + Icy: "\u0418", + Idot: "\u0130", + Ifr: "\u2111", + Igrave: "\xCC", + Im: "\u2111", + Imacr: "\u012A", + ImaginaryI: "\u2148", + Implies: "\u21D2", + Int: "\u222C", + Integral: "\u222B", + Intersection: "\u22C2", + InvisibleComma: "\u2063", + InvisibleTimes: "\u2062", + Iogon: "\u012E", + Iopf: "\u{1D540}", + Iota: "\u0399", + Iscr: "\u2110", + Itilde: "\u0128", + Iukcy: "\u0406", + Iuml: "\xCF", + Jcirc: "\u0134", + Jcy: "\u0419", + Jfr: "\u{1D50D}", + Jopf: "\u{1D541}", + Jscr: "\u{1D4A5}", + Jsercy: "\u0408", + Jukcy: "\u0404", + KHcy: "\u0425", + KJcy: "\u040C", + Kappa: "\u039A", + Kcedil: "\u0136", + Kcy: "\u041A", + Kfr: "\u{1D50E}", + Kopf: "\u{1D542}", + Kscr: "\u{1D4A6}", + LJcy: "\u0409", + LT: "<", + Lacute: "\u0139", + Lambda: "\u039B", + Lang: "\u27EA", + Laplacetrf: "\u2112", + Larr: "\u219E", + Lcaron: "\u013D", + Lcedil: "\u013B", + Lcy: "\u041B", + LeftAngleBracket: "\u27E8", + LeftArrow: "\u2190", + LeftArrowBar: "\u21E4", + LeftArrowRightArrow: "\u21C6", + LeftCeiling: "\u2308", + LeftDoubleBracket: "\u27E6", + LeftDownTeeVector: "\u2961", + LeftDownVector: "\u21C3", + LeftDownVectorBar: "\u2959", + LeftFloor: "\u230A", + LeftRightArrow: "\u2194", + LeftRightVector: "\u294E", + LeftTee: "\u22A3", + LeftTeeArrow: "\u21A4", + LeftTeeVector: "\u295A", + LeftTriangle: "\u22B2", + LeftTriangleBar: "\u29CF", + LeftTriangleEqual: "\u22B4", + LeftUpDownVector: "\u2951", + LeftUpTeeVector: "\u2960", + LeftUpVector: "\u21BF", + LeftUpVectorBar: "\u2958", + LeftVector: "\u21BC", + LeftVectorBar: "\u2952", + Leftarrow: "\u21D0", + Leftrightarrow: "\u21D4", + LessEqualGreater: "\u22DA", + LessFullEqual: "\u2266", + LessGreater: "\u2276", + LessLess: "\u2AA1", + LessSlantEqual: "\u2A7D", + LessTilde: "\u2272", + Lfr: "\u{1D50F}", + Ll: "\u22D8", + Lleftarrow: "\u21DA", + Lmidot: "\u013F", + LongLeftArrow: "\u27F5", + LongLeftRightArrow: "\u27F7", + LongRightArrow: "\u27F6", + Longleftarrow: "\u27F8", + Longleftrightarrow: "\u27FA", + Longrightarrow: "\u27F9", + Lopf: "\u{1D543}", + LowerLeftArrow: "\u2199", + LowerRightArrow: "\u2198", + Lscr: "\u2112", + Lsh: "\u21B0", + Lstrok: "\u0141", + Lt: "\u226A", + Map: "\u2905", + Mcy: "\u041C", + MediumSpace: "\u205F", + Mellintrf: "\u2133", + Mfr: "\u{1D510}", + MinusPlus: "\u2213", + Mopf: "\u{1D544}", + Mscr: "\u2133", + Mu: "\u039C", + NJcy: "\u040A", + Nacute: "\u0143", + Ncaron: "\u0147", + Ncedil: "\u0145", + Ncy: "\u041D", + NegativeMediumSpace: "\u200B", + NegativeThickSpace: "\u200B", + NegativeThinSpace: "\u200B", + NegativeVeryThinSpace: "\u200B", + NestedGreaterGreater: "\u226B", + NestedLessLess: "\u226A", + NewLine: ` +`, + Nfr: "\u{1D511}", + NoBreak: "\u2060", + NonBreakingSpace: "\xA0", + Nopf: "\u2115", + Not: "\u2AEC", + NotCongruent: "\u2262", + NotCupCap: "\u226D", + NotDoubleVerticalBar: "\u2226", + NotElement: "\u2209", + NotEqual: "\u2260", + NotEqualTilde: "\u2242\u0338", + NotExists: "\u2204", + NotGreater: "\u226F", + NotGreaterEqual: "\u2271", + NotGreaterFullEqual: "\u2267\u0338", + NotGreaterGreater: "\u226B\u0338", + NotGreaterLess: "\u2279", + NotGreaterSlantEqual: "\u2A7E\u0338", + NotGreaterTilde: "\u2275", + NotHumpDownHump: "\u224E\u0338", + NotHumpEqual: "\u224F\u0338", + NotLeftTriangle: "\u22EA", + NotLeftTriangleBar: "\u29CF\u0338", + NotLeftTriangleEqual: "\u22EC", + NotLess: "\u226E", + NotLessEqual: "\u2270", + NotLessGreater: "\u2278", + NotLessLess: "\u226A\u0338", + NotLessSlantEqual: "\u2A7D\u0338", + NotLessTilde: "\u2274", + NotNestedGreaterGreater: "\u2AA2\u0338", + NotNestedLessLess: "\u2AA1\u0338", + NotPrecedes: "\u2280", + NotPrecedesEqual: "\u2AAF\u0338", + NotPrecedesSlantEqual: "\u22E0", + NotReverseElement: "\u220C", + NotRightTriangle: "\u22EB", + NotRightTriangleBar: "\u29D0\u0338", + NotRightTriangleEqual: "\u22ED", + NotSquareSubset: "\u228F\u0338", + NotSquareSubsetEqual: "\u22E2", + NotSquareSuperset: "\u2290\u0338", + NotSquareSupersetEqual: "\u22E3", + NotSubset: "\u2282\u20D2", + NotSubsetEqual: "\u2288", + NotSucceeds: "\u2281", + NotSucceedsEqual: "\u2AB0\u0338", + NotSucceedsSlantEqual: "\u22E1", + NotSucceedsTilde: "\u227F\u0338", + NotSuperset: "\u2283\u20D2", + NotSupersetEqual: "\u2289", + NotTilde: "\u2241", + NotTildeEqual: "\u2244", + NotTildeFullEqual: "\u2247", + NotTildeTilde: "\u2249", + NotVerticalBar: "\u2224", + Nscr: "\u{1D4A9}", + Ntilde: "\xD1", + Nu: "\u039D", + OElig: "\u0152", + Oacute: "\xD3", + Ocirc: "\xD4", + Ocy: "\u041E", + Odblac: "\u0150", + Ofr: "\u{1D512}", + Ograve: "\xD2", + Omacr: "\u014C", + Omega: "\u03A9", + Omicron: "\u039F", + Oopf: "\u{1D546}", + OpenCurlyDoubleQuote: "\u201C", + OpenCurlyQuote: "\u2018", + Or: "\u2A54", + Oscr: "\u{1D4AA}", + Oslash: "\xD8", + Otilde: "\xD5", + Otimes: "\u2A37", + Ouml: "\xD6", + OverBar: "\u203E", + OverBrace: "\u23DE", + OverBracket: "\u23B4", + OverParenthesis: "\u23DC", + PartialD: "\u2202", + Pcy: "\u041F", + Pfr: "\u{1D513}", + Phi: "\u03A6", + Pi: "\u03A0", + PlusMinus: "\xB1", + Poincareplane: "\u210C", + Popf: "\u2119", + Pr: "\u2ABB", + Precedes: "\u227A", + PrecedesEqual: "\u2AAF", + PrecedesSlantEqual: "\u227C", + PrecedesTilde: "\u227E", + Prime: "\u2033", + Product: "\u220F", + Proportion: "\u2237", + Proportional: "\u221D", + Pscr: "\u{1D4AB}", + Psi: "\u03A8", + QUOT: '"', + Qfr: "\u{1D514}", + Qopf: "\u211A", + Qscr: "\u{1D4AC}", + RBarr: "\u2910", + REG: "\xAE", + Racute: "\u0154", + Rang: "\u27EB", + Rarr: "\u21A0", + Rarrtl: "\u2916", + Rcaron: "\u0158", + Rcedil: "\u0156", + Rcy: "\u0420", + Re: "\u211C", + ReverseElement: "\u220B", + ReverseEquilibrium: "\u21CB", + ReverseUpEquilibrium: "\u296F", + Rfr: "\u211C", + Rho: "\u03A1", + RightAngleBracket: "\u27E9", + RightArrow: "\u2192", + RightArrowBar: "\u21E5", + RightArrowLeftArrow: "\u21C4", + RightCeiling: "\u2309", + RightDoubleBracket: "\u27E7", + RightDownTeeVector: "\u295D", + RightDownVector: "\u21C2", + RightDownVectorBar: "\u2955", + RightFloor: "\u230B", + RightTee: "\u22A2", + RightTeeArrow: "\u21A6", + RightTeeVector: "\u295B", + RightTriangle: "\u22B3", + RightTriangleBar: "\u29D0", + RightTriangleEqual: "\u22B5", + RightUpDownVector: "\u294F", + RightUpTeeVector: "\u295C", + RightUpVector: "\u21BE", + RightUpVectorBar: "\u2954", + RightVector: "\u21C0", + RightVectorBar: "\u2953", + Rightarrow: "\u21D2", + Ropf: "\u211D", + RoundImplies: "\u2970", + Rrightarrow: "\u21DB", + Rscr: "\u211B", + Rsh: "\u21B1", + RuleDelayed: "\u29F4", + SHCHcy: "\u0429", + SHcy: "\u0428", + SOFTcy: "\u042C", + Sacute: "\u015A", + Sc: "\u2ABC", + Scaron: "\u0160", + Scedil: "\u015E", + Scirc: "\u015C", + Scy: "\u0421", + Sfr: "\u{1D516}", + ShortDownArrow: "\u2193", + ShortLeftArrow: "\u2190", + ShortRightArrow: "\u2192", + ShortUpArrow: "\u2191", + Sigma: "\u03A3", + SmallCircle: "\u2218", + Sopf: "\u{1D54A}", + Sqrt: "\u221A", + Square: "\u25A1", + SquareIntersection: "\u2293", + SquareSubset: "\u228F", + SquareSubsetEqual: "\u2291", + SquareSuperset: "\u2290", + SquareSupersetEqual: "\u2292", + SquareUnion: "\u2294", + Sscr: "\u{1D4AE}", + Star: "\u22C6", + Sub: "\u22D0", + Subset: "\u22D0", + SubsetEqual: "\u2286", + Succeeds: "\u227B", + SucceedsEqual: "\u2AB0", + SucceedsSlantEqual: "\u227D", + SucceedsTilde: "\u227F", + SuchThat: "\u220B", + Sum: "\u2211", + Sup: "\u22D1", + Superset: "\u2283", + SupersetEqual: "\u2287", + Supset: "\u22D1", + THORN: "\xDE", + TRADE: "\u2122", + TSHcy: "\u040B", + TScy: "\u0426", + Tab: " ", + Tau: "\u03A4", + Tcaron: "\u0164", + Tcedil: "\u0162", + Tcy: "\u0422", + Tfr: "\u{1D517}", + Therefore: "\u2234", + Theta: "\u0398", + ThickSpace: "\u205F\u200A", + ThinSpace: "\u2009", + Tilde: "\u223C", + TildeEqual: "\u2243", + TildeFullEqual: "\u2245", + TildeTilde: "\u2248", + Topf: "\u{1D54B}", + TripleDot: "\u20DB", + Tscr: "\u{1D4AF}", + Tstrok: "\u0166", + Uacute: "\xDA", + Uarr: "\u219F", + Uarrocir: "\u2949", + Ubrcy: "\u040E", + Ubreve: "\u016C", + Ucirc: "\xDB", + Ucy: "\u0423", + Udblac: "\u0170", + Ufr: "\u{1D518}", + Ugrave: "\xD9", + Umacr: "\u016A", + UnderBar: "_", + UnderBrace: "\u23DF", + UnderBracket: "\u23B5", + UnderParenthesis: "\u23DD", + Union: "\u22C3", + UnionPlus: "\u228E", + Uogon: "\u0172", + Uopf: "\u{1D54C}", + UpArrow: "\u2191", + UpArrowBar: "\u2912", + UpArrowDownArrow: "\u21C5", + UpDownArrow: "\u2195", + UpEquilibrium: "\u296E", + UpTee: "\u22A5", + UpTeeArrow: "\u21A5", + Uparrow: "\u21D1", + Updownarrow: "\u21D5", + UpperLeftArrow: "\u2196", + UpperRightArrow: "\u2197", + Upsi: "\u03D2", + Upsilon: "\u03A5", + Uring: "\u016E", + Uscr: "\u{1D4B0}", + Utilde: "\u0168", + Uuml: "\xDC", + VDash: "\u22AB", + Vbar: "\u2AEB", + Vcy: "\u0412", + Vdash: "\u22A9", + Vdashl: "\u2AE6", + Vee: "\u22C1", + Verbar: "\u2016", + Vert: "\u2016", + VerticalBar: "\u2223", + VerticalLine: "|", + VerticalSeparator: "\u2758", + VerticalTilde: "\u2240", + VeryThinSpace: "\u200A", + Vfr: "\u{1D519}", + Vopf: "\u{1D54D}", + Vscr: "\u{1D4B1}", + Vvdash: "\u22AA", + Wcirc: "\u0174", + Wedge: "\u22C0", + Wfr: "\u{1D51A}", + Wopf: "\u{1D54E}", + Wscr: "\u{1D4B2}", + Xfr: "\u{1D51B}", + Xi: "\u039E", + Xopf: "\u{1D54F}", + Xscr: "\u{1D4B3}", + YAcy: "\u042F", + YIcy: "\u0407", + YUcy: "\u042E", + Yacute: "\xDD", + Ycirc: "\u0176", + Ycy: "\u042B", + Yfr: "\u{1D51C}", + Yopf: "\u{1D550}", + Yscr: "\u{1D4B4}", + Yuml: "\u0178", + ZHcy: "\u0416", + Zacute: "\u0179", + Zcaron: "\u017D", + Zcy: "\u0417", + Zdot: "\u017B", + ZeroWidthSpace: "\u200B", + Zeta: "\u0396", + Zfr: "\u2128", + Zopf: "\u2124", + Zscr: "\u{1D4B5}", + aacute: "\xE1", + abreve: "\u0103", + ac: "\u223E", + acE: "\u223E\u0333", + acd: "\u223F", + acirc: "\xE2", + acute: "\xB4", + acy: "\u0430", + aelig: "\xE6", + af: "\u2061", + afr: "\u{1D51E}", + agrave: "\xE0", + alefsym: "\u2135", + aleph: "\u2135", + alpha: "\u03B1", + amacr: "\u0101", + amalg: "\u2A3F", + amp: "&", + and: "\u2227", + andand: "\u2A55", + andd: "\u2A5C", + andslope: "\u2A58", + andv: "\u2A5A", + ang: "\u2220", + ange: "\u29A4", + angle: "\u2220", + angmsd: "\u2221", + angmsdaa: "\u29A8", + angmsdab: "\u29A9", + angmsdac: "\u29AA", + angmsdad: "\u29AB", + angmsdae: "\u29AC", + angmsdaf: "\u29AD", + angmsdag: "\u29AE", + angmsdah: "\u29AF", + angrt: "\u221F", + angrtvb: "\u22BE", + angrtvbd: "\u299D", + angsph: "\u2222", + angst: "\xC5", + angzarr: "\u237C", + aogon: "\u0105", + aopf: "\u{1D552}", + ap: "\u2248", + apE: "\u2A70", + apacir: "\u2A6F", + ape: "\u224A", + apid: "\u224B", + apos: "'", + approx: "\u2248", + approxeq: "\u224A", + aring: "\xE5", + ascr: "\u{1D4B6}", + ast: "*", + asymp: "\u2248", + asympeq: "\u224D", + atilde: "\xE3", + auml: "\xE4", + awconint: "\u2233", + awint: "\u2A11", + bNot: "\u2AED", + backcong: "\u224C", + backepsilon: "\u03F6", + backprime: "\u2035", + backsim: "\u223D", + backsimeq: "\u22CD", + barvee: "\u22BD", + barwed: "\u2305", + barwedge: "\u2305", + bbrk: "\u23B5", + bbrktbrk: "\u23B6", + bcong: "\u224C", + bcy: "\u0431", + bdquo: "\u201E", + becaus: "\u2235", + because: "\u2235", + bemptyv: "\u29B0", + bepsi: "\u03F6", + bernou: "\u212C", + beta: "\u03B2", + beth: "\u2136", + between: "\u226C", + bfr: "\u{1D51F}", + bigcap: "\u22C2", + bigcirc: "\u25EF", + bigcup: "\u22C3", + bigodot: "\u2A00", + bigoplus: "\u2A01", + bigotimes: "\u2A02", + bigsqcup: "\u2A06", + bigstar: "\u2605", + bigtriangledown: "\u25BD", + bigtriangleup: "\u25B3", + biguplus: "\u2A04", + bigvee: "\u22C1", + bigwedge: "\u22C0", + bkarow: "\u290D", + blacklozenge: "\u29EB", + blacksquare: "\u25AA", + blacktriangle: "\u25B4", + blacktriangledown: "\u25BE", + blacktriangleleft: "\u25C2", + blacktriangleright: "\u25B8", + blank: "\u2423", + blk12: "\u2592", + blk14: "\u2591", + blk34: "\u2593", + block: "\u2588", + bne: "=\u20E5", + bnequiv: "\u2261\u20E5", + bnot: "\u2310", + bopf: "\u{1D553}", + bot: "\u22A5", + bottom: "\u22A5", + bowtie: "\u22C8", + boxDL: "\u2557", + boxDR: "\u2554", + boxDl: "\u2556", + boxDr: "\u2553", + boxH: "\u2550", + boxHD: "\u2566", + boxHU: "\u2569", + boxHd: "\u2564", + boxHu: "\u2567", + boxUL: "\u255D", + boxUR: "\u255A", + boxUl: "\u255C", + boxUr: "\u2559", + boxV: "\u2551", + boxVH: "\u256C", + boxVL: "\u2563", + boxVR: "\u2560", + boxVh: "\u256B", + boxVl: "\u2562", + boxVr: "\u255F", + boxbox: "\u29C9", + boxdL: "\u2555", + boxdR: "\u2552", + boxdl: "\u2510", + boxdr: "\u250C", + boxh: "\u2500", + boxhD: "\u2565", + boxhU: "\u2568", + boxhd: "\u252C", + boxhu: "\u2534", + boxminus: "\u229F", + boxplus: "\u229E", + boxtimes: "\u22A0", + boxuL: "\u255B", + boxuR: "\u2558", + boxul: "\u2518", + boxur: "\u2514", + boxv: "\u2502", + boxvH: "\u256A", + boxvL: "\u2561", + boxvR: "\u255E", + boxvh: "\u253C", + boxvl: "\u2524", + boxvr: "\u251C", + bprime: "\u2035", + breve: "\u02D8", + brvbar: "\xA6", + bscr: "\u{1D4B7}", + bsemi: "\u204F", + bsim: "\u223D", + bsime: "\u22CD", + bsol: "\\", + bsolb: "\u29C5", + bsolhsub: "\u27C8", + bull: "\u2022", + bullet: "\u2022", + bump: "\u224E", + bumpE: "\u2AAE", + bumpe: "\u224F", + bumpeq: "\u224F", + cacute: "\u0107", + cap: "\u2229", + capand: "\u2A44", + capbrcup: "\u2A49", + capcap: "\u2A4B", + capcup: "\u2A47", + capdot: "\u2A40", + caps: "\u2229\uFE00", + caret: "\u2041", + caron: "\u02C7", + ccaps: "\u2A4D", + ccaron: "\u010D", + ccedil: "\xE7", + ccirc: "\u0109", + ccups: "\u2A4C", + ccupssm: "\u2A50", + cdot: "\u010B", + cedil: "\xB8", + cemptyv: "\u29B2", + cent: "\xA2", + centerdot: "\xB7", + cfr: "\u{1D520}", + chcy: "\u0447", + check: "\u2713", + checkmark: "\u2713", + chi: "\u03C7", + cir: "\u25CB", + cirE: "\u29C3", + circ: "\u02C6", + circeq: "\u2257", + circlearrowleft: "\u21BA", + circlearrowright: "\u21BB", + circledR: "\xAE", + circledS: "\u24C8", + circledast: "\u229B", + circledcirc: "\u229A", + circleddash: "\u229D", + cire: "\u2257", + cirfnint: "\u2A10", + cirmid: "\u2AEF", + cirscir: "\u29C2", + clubs: "\u2663", + clubsuit: "\u2663", + colon: ":", + colone: "\u2254", + coloneq: "\u2254", + comma: ",", + commat: "@", + comp: "\u2201", + compfn: "\u2218", + complement: "\u2201", + complexes: "\u2102", + cong: "\u2245", + congdot: "\u2A6D", + conint: "\u222E", + copf: "\u{1D554}", + coprod: "\u2210", + copy: "\xA9", + copysr: "\u2117", + crarr: "\u21B5", + cross: "\u2717", + cscr: "\u{1D4B8}", + csub: "\u2ACF", + csube: "\u2AD1", + csup: "\u2AD0", + csupe: "\u2AD2", + ctdot: "\u22EF", + cudarrl: "\u2938", + cudarrr: "\u2935", + cuepr: "\u22DE", + cuesc: "\u22DF", + cularr: "\u21B6", + cularrp: "\u293D", + cup: "\u222A", + cupbrcap: "\u2A48", + cupcap: "\u2A46", + cupcup: "\u2A4A", + cupdot: "\u228D", + cupor: "\u2A45", + cups: "\u222A\uFE00", + curarr: "\u21B7", + curarrm: "\u293C", + curlyeqprec: "\u22DE", + curlyeqsucc: "\u22DF", + curlyvee: "\u22CE", + curlywedge: "\u22CF", + curren: "\xA4", + curvearrowleft: "\u21B6", + curvearrowright: "\u21B7", + cuvee: "\u22CE", + cuwed: "\u22CF", + cwconint: "\u2232", + cwint: "\u2231", + cylcty: "\u232D", + dArr: "\u21D3", + dHar: "\u2965", + dagger: "\u2020", + daleth: "\u2138", + darr: "\u2193", + dash: "\u2010", + dashv: "\u22A3", + dbkarow: "\u290F", + dblac: "\u02DD", + dcaron: "\u010F", + dcy: "\u0434", + dd: "\u2146", + ddagger: "\u2021", + ddarr: "\u21CA", + ddotseq: "\u2A77", + deg: "\xB0", + delta: "\u03B4", + demptyv: "\u29B1", + dfisht: "\u297F", + dfr: "\u{1D521}", + dharl: "\u21C3", + dharr: "\u21C2", + diam: "\u22C4", + diamond: "\u22C4", + diamondsuit: "\u2666", + diams: "\u2666", + die: "\xA8", + digamma: "\u03DD", + disin: "\u22F2", + div: "\xF7", + divide: "\xF7", + divideontimes: "\u22C7", + divonx: "\u22C7", + djcy: "\u0452", + dlcorn: "\u231E", + dlcrop: "\u230D", + dollar: "$", + dopf: "\u{1D555}", + dot: "\u02D9", + doteq: "\u2250", + doteqdot: "\u2251", + dotminus: "\u2238", + dotplus: "\u2214", + dotsquare: "\u22A1", + doublebarwedge: "\u2306", + downarrow: "\u2193", + downdownarrows: "\u21CA", + downharpoonleft: "\u21C3", + downharpoonright: "\u21C2", + drbkarow: "\u2910", + drcorn: "\u231F", + drcrop: "\u230C", + dscr: "\u{1D4B9}", + dscy: "\u0455", + dsol: "\u29F6", + dstrok: "\u0111", + dtdot: "\u22F1", + dtri: "\u25BF", + dtrif: "\u25BE", + duarr: "\u21F5", + duhar: "\u296F", + dwangle: "\u29A6", + dzcy: "\u045F", + dzigrarr: "\u27FF", + eDDot: "\u2A77", + eDot: "\u2251", + eacute: "\xE9", + easter: "\u2A6E", + ecaron: "\u011B", + ecir: "\u2256", + ecirc: "\xEA", + ecolon: "\u2255", + ecy: "\u044D", + edot: "\u0117", + ee: "\u2147", + efDot: "\u2252", + efr: "\u{1D522}", + eg: "\u2A9A", + egrave: "\xE8", + egs: "\u2A96", + egsdot: "\u2A98", + el: "\u2A99", + elinters: "\u23E7", + ell: "\u2113", + els: "\u2A95", + elsdot: "\u2A97", + emacr: "\u0113", + empty: "\u2205", + emptyset: "\u2205", + emptyv: "\u2205", + emsp13: "\u2004", + emsp14: "\u2005", + emsp: "\u2003", + eng: "\u014B", + ensp: "\u2002", + eogon: "\u0119", + eopf: "\u{1D556}", + epar: "\u22D5", + eparsl: "\u29E3", + eplus: "\u2A71", + epsi: "\u03B5", + epsilon: "\u03B5", + epsiv: "\u03F5", + eqcirc: "\u2256", + eqcolon: "\u2255", + eqsim: "\u2242", + eqslantgtr: "\u2A96", + eqslantless: "\u2A95", + equals: "=", + equest: "\u225F", + equiv: "\u2261", + equivDD: "\u2A78", + eqvparsl: "\u29E5", + erDot: "\u2253", + erarr: "\u2971", + escr: "\u212F", + esdot: "\u2250", + esim: "\u2242", + eta: "\u03B7", + eth: "\xF0", + euml: "\xEB", + euro: "\u20AC", + excl: "!", + exist: "\u2203", + expectation: "\u2130", + exponentiale: "\u2147", + fallingdotseq: "\u2252", + fcy: "\u0444", + female: "\u2640", + ffilig: "\uFB03", + fflig: "\uFB00", + ffllig: "\uFB04", + ffr: "\u{1D523}", + filig: "\uFB01", + fjlig: "fj", + flat: "\u266D", + fllig: "\uFB02", + fltns: "\u25B1", + fnof: "\u0192", + fopf: "\u{1D557}", + forall: "\u2200", + fork: "\u22D4", + forkv: "\u2AD9", + fpartint: "\u2A0D", + frac12: "\xBD", + frac13: "\u2153", + frac14: "\xBC", + frac15: "\u2155", + frac16: "\u2159", + frac18: "\u215B", + frac23: "\u2154", + frac25: "\u2156", + frac34: "\xBE", + frac35: "\u2157", + frac38: "\u215C", + frac45: "\u2158", + frac56: "\u215A", + frac58: "\u215D", + frac78: "\u215E", + frasl: "\u2044", + frown: "\u2322", + fscr: "\u{1D4BB}", + gE: "\u2267", + gEl: "\u2A8C", + gacute: "\u01F5", + gamma: "\u03B3", + gammad: "\u03DD", + gap: "\u2A86", + gbreve: "\u011F", + gcirc: "\u011D", + gcy: "\u0433", + gdot: "\u0121", + ge: "\u2265", + gel: "\u22DB", + geq: "\u2265", + geqq: "\u2267", + geqslant: "\u2A7E", + ges: "\u2A7E", + gescc: "\u2AA9", + gesdot: "\u2A80", + gesdoto: "\u2A82", + gesdotol: "\u2A84", + gesl: "\u22DB\uFE00", + gesles: "\u2A94", + gfr: "\u{1D524}", + gg: "\u226B", + ggg: "\u22D9", + gimel: "\u2137", + gjcy: "\u0453", + gl: "\u2277", + glE: "\u2A92", + gla: "\u2AA5", + glj: "\u2AA4", + gnE: "\u2269", + gnap: "\u2A8A", + gnapprox: "\u2A8A", + gne: "\u2A88", + gneq: "\u2A88", + gneqq: "\u2269", + gnsim: "\u22E7", + gopf: "\u{1D558}", + grave: "`", + gscr: "\u210A", + gsim: "\u2273", + gsime: "\u2A8E", + gsiml: "\u2A90", + gt: ">", + gtcc: "\u2AA7", + gtcir: "\u2A7A", + gtdot: "\u22D7", + gtlPar: "\u2995", + gtquest: "\u2A7C", + gtrapprox: "\u2A86", + gtrarr: "\u2978", + gtrdot: "\u22D7", + gtreqless: "\u22DB", + gtreqqless: "\u2A8C", + gtrless: "\u2277", + gtrsim: "\u2273", + gvertneqq: "\u2269\uFE00", + gvnE: "\u2269\uFE00", + hArr: "\u21D4", + hairsp: "\u200A", + half: "\xBD", + hamilt: "\u210B", + hardcy: "\u044A", + harr: "\u2194", + harrcir: "\u2948", + harrw: "\u21AD", + hbar: "\u210F", + hcirc: "\u0125", + hearts: "\u2665", + heartsuit: "\u2665", + hellip: "\u2026", + hercon: "\u22B9", + hfr: "\u{1D525}", + hksearow: "\u2925", + hkswarow: "\u2926", + hoarr: "\u21FF", + homtht: "\u223B", + hookleftarrow: "\u21A9", + hookrightarrow: "\u21AA", + hopf: "\u{1D559}", + horbar: "\u2015", + hscr: "\u{1D4BD}", + hslash: "\u210F", + hstrok: "\u0127", + hybull: "\u2043", + hyphen: "\u2010", + iacute: "\xED", + ic: "\u2063", + icirc: "\xEE", + icy: "\u0438", + iecy: "\u0435", + iexcl: "\xA1", + iff: "\u21D4", + ifr: "\u{1D526}", + igrave: "\xEC", + ii: "\u2148", + iiiint: "\u2A0C", + iiint: "\u222D", + iinfin: "\u29DC", + iiota: "\u2129", + ijlig: "\u0133", + imacr: "\u012B", + image: "\u2111", + imagline: "\u2110", + imagpart: "\u2111", + imath: "\u0131", + imof: "\u22B7", + imped: "\u01B5", + in: "\u2208", + incare: "\u2105", + infin: "\u221E", + infintie: "\u29DD", + inodot: "\u0131", + int: "\u222B", + intcal: "\u22BA", + integers: "\u2124", + intercal: "\u22BA", + intlarhk: "\u2A17", + intprod: "\u2A3C", + iocy: "\u0451", + iogon: "\u012F", + iopf: "\u{1D55A}", + iota: "\u03B9", + iprod: "\u2A3C", + iquest: "\xBF", + iscr: "\u{1D4BE}", + isin: "\u2208", + isinE: "\u22F9", + isindot: "\u22F5", + isins: "\u22F4", + isinsv: "\u22F3", + isinv: "\u2208", + it: "\u2062", + itilde: "\u0129", + iukcy: "\u0456", + iuml: "\xEF", + jcirc: "\u0135", + jcy: "\u0439", + jfr: "\u{1D527}", + jmath: "\u0237", + jopf: "\u{1D55B}", + jscr: "\u{1D4BF}", + jsercy: "\u0458", + jukcy: "\u0454", + kappa: "\u03BA", + kappav: "\u03F0", + kcedil: "\u0137", + kcy: "\u043A", + kfr: "\u{1D528}", + kgreen: "\u0138", + khcy: "\u0445", + kjcy: "\u045C", + kopf: "\u{1D55C}", + kscr: "\u{1D4C0}", + lAarr: "\u21DA", + lArr: "\u21D0", + lAtail: "\u291B", + lBarr: "\u290E", + lE: "\u2266", + lEg: "\u2A8B", + lHar: "\u2962", + lacute: "\u013A", + laemptyv: "\u29B4", + lagran: "\u2112", + lambda: "\u03BB", + lang: "\u27E8", + langd: "\u2991", + langle: "\u27E8", + lap: "\u2A85", + laquo: "\xAB", + larr: "\u2190", + larrb: "\u21E4", + larrbfs: "\u291F", + larrfs: "\u291D", + larrhk: "\u21A9", + larrlp: "\u21AB", + larrpl: "\u2939", + larrsim: "\u2973", + larrtl: "\u21A2", + lat: "\u2AAB", + latail: "\u2919", + late: "\u2AAD", + lates: "\u2AAD\uFE00", + lbarr: "\u290C", + lbbrk: "\u2772", + lbrace: "{", + lbrack: "[", + lbrke: "\u298B", + lbrksld: "\u298F", + lbrkslu: "\u298D", + lcaron: "\u013E", + lcedil: "\u013C", + lceil: "\u2308", + lcub: "{", + lcy: "\u043B", + ldca: "\u2936", + ldquo: "\u201C", + ldquor: "\u201E", + ldrdhar: "\u2967", + ldrushar: "\u294B", + ldsh: "\u21B2", + le: "\u2264", + leftarrow: "\u2190", + leftarrowtail: "\u21A2", + leftharpoondown: "\u21BD", + leftharpoonup: "\u21BC", + leftleftarrows: "\u21C7", + leftrightarrow: "\u2194", + leftrightarrows: "\u21C6", + leftrightharpoons: "\u21CB", + leftrightsquigarrow: "\u21AD", + leftthreetimes: "\u22CB", + leg: "\u22DA", + leq: "\u2264", + leqq: "\u2266", + leqslant: "\u2A7D", + les: "\u2A7D", + lescc: "\u2AA8", + lesdot: "\u2A7F", + lesdoto: "\u2A81", + lesdotor: "\u2A83", + lesg: "\u22DA\uFE00", + lesges: "\u2A93", + lessapprox: "\u2A85", + lessdot: "\u22D6", + lesseqgtr: "\u22DA", + lesseqqgtr: "\u2A8B", + lessgtr: "\u2276", + lesssim: "\u2272", + lfisht: "\u297C", + lfloor: "\u230A", + lfr: "\u{1D529}", + lg: "\u2276", + lgE: "\u2A91", + lhard: "\u21BD", + lharu: "\u21BC", + lharul: "\u296A", + lhblk: "\u2584", + ljcy: "\u0459", + ll: "\u226A", + llarr: "\u21C7", + llcorner: "\u231E", + llhard: "\u296B", + lltri: "\u25FA", + lmidot: "\u0140", + lmoust: "\u23B0", + lmoustache: "\u23B0", + lnE: "\u2268", + lnap: "\u2A89", + lnapprox: "\u2A89", + lne: "\u2A87", + lneq: "\u2A87", + lneqq: "\u2268", + lnsim: "\u22E6", + loang: "\u27EC", + loarr: "\u21FD", + lobrk: "\u27E6", + longleftarrow: "\u27F5", + longleftrightarrow: "\u27F7", + longmapsto: "\u27FC", + longrightarrow: "\u27F6", + looparrowleft: "\u21AB", + looparrowright: "\u21AC", + lopar: "\u2985", + lopf: "\u{1D55D}", + loplus: "\u2A2D", + lotimes: "\u2A34", + lowast: "\u2217", + lowbar: "_", + loz: "\u25CA", + lozenge: "\u25CA", + lozf: "\u29EB", + lpar: "(", + lparlt: "\u2993", + lrarr: "\u21C6", + lrcorner: "\u231F", + lrhar: "\u21CB", + lrhard: "\u296D", + lrm: "\u200E", + lrtri: "\u22BF", + lsaquo: "\u2039", + lscr: "\u{1D4C1}", + lsh: "\u21B0", + lsim: "\u2272", + lsime: "\u2A8D", + lsimg: "\u2A8F", + lsqb: "[", + lsquo: "\u2018", + lsquor: "\u201A", + lstrok: "\u0142", + lt: "<", + ltcc: "\u2AA6", + ltcir: "\u2A79", + ltdot: "\u22D6", + lthree: "\u22CB", + ltimes: "\u22C9", + ltlarr: "\u2976", + ltquest: "\u2A7B", + ltrPar: "\u2996", + ltri: "\u25C3", + ltrie: "\u22B4", + ltrif: "\u25C2", + lurdshar: "\u294A", + luruhar: "\u2966", + lvertneqq: "\u2268\uFE00", + lvnE: "\u2268\uFE00", + mDDot: "\u223A", + macr: "\xAF", + male: "\u2642", + malt: "\u2720", + maltese: "\u2720", + map: "\u21A6", + mapsto: "\u21A6", + mapstodown: "\u21A7", + mapstoleft: "\u21A4", + mapstoup: "\u21A5", + marker: "\u25AE", + mcomma: "\u2A29", + mcy: "\u043C", + mdash: "\u2014", + measuredangle: "\u2221", + mfr: "\u{1D52A}", + mho: "\u2127", + micro: "\xB5", + mid: "\u2223", + midast: "*", + midcir: "\u2AF0", + middot: "\xB7", + minus: "\u2212", + minusb: "\u229F", + minusd: "\u2238", + minusdu: "\u2A2A", + mlcp: "\u2ADB", + mldr: "\u2026", + mnplus: "\u2213", + models: "\u22A7", + mopf: "\u{1D55E}", + mp: "\u2213", + mscr: "\u{1D4C2}", + mstpos: "\u223E", + mu: "\u03BC", + multimap: "\u22B8", + mumap: "\u22B8", + nGg: "\u22D9\u0338", + nGt: "\u226B\u20D2", + nGtv: "\u226B\u0338", + nLeftarrow: "\u21CD", + nLeftrightarrow: "\u21CE", + nLl: "\u22D8\u0338", + nLt: "\u226A\u20D2", + nLtv: "\u226A\u0338", + nRightarrow: "\u21CF", + nVDash: "\u22AF", + nVdash: "\u22AE", + nabla: "\u2207", + nacute: "\u0144", + nang: "\u2220\u20D2", + nap: "\u2249", + napE: "\u2A70\u0338", + napid: "\u224B\u0338", + napos: "\u0149", + napprox: "\u2249", + natur: "\u266E", + natural: "\u266E", + naturals: "\u2115", + nbsp: "\xA0", + nbump: "\u224E\u0338", + nbumpe: "\u224F\u0338", + ncap: "\u2A43", + ncaron: "\u0148", + ncedil: "\u0146", + ncong: "\u2247", + ncongdot: "\u2A6D\u0338", + ncup: "\u2A42", + ncy: "\u043D", + ndash: "\u2013", + ne: "\u2260", + neArr: "\u21D7", + nearhk: "\u2924", + nearr: "\u2197", + nearrow: "\u2197", + nedot: "\u2250\u0338", + nequiv: "\u2262", + nesear: "\u2928", + nesim: "\u2242\u0338", + nexist: "\u2204", + nexists: "\u2204", + nfr: "\u{1D52B}", + ngE: "\u2267\u0338", + nge: "\u2271", + ngeq: "\u2271", + ngeqq: "\u2267\u0338", + ngeqslant: "\u2A7E\u0338", + nges: "\u2A7E\u0338", + ngsim: "\u2275", + ngt: "\u226F", + ngtr: "\u226F", + nhArr: "\u21CE", + nharr: "\u21AE", + nhpar: "\u2AF2", + ni: "\u220B", + nis: "\u22FC", + nisd: "\u22FA", + niv: "\u220B", + njcy: "\u045A", + nlArr: "\u21CD", + nlE: "\u2266\u0338", + nlarr: "\u219A", + nldr: "\u2025", + nle: "\u2270", + nleftarrow: "\u219A", + nleftrightarrow: "\u21AE", + nleq: "\u2270", + nleqq: "\u2266\u0338", + nleqslant: "\u2A7D\u0338", + nles: "\u2A7D\u0338", + nless: "\u226E", + nlsim: "\u2274", + nlt: "\u226E", + nltri: "\u22EA", + nltrie: "\u22EC", + nmid: "\u2224", + nopf: "\u{1D55F}", + not: "\xAC", + notin: "\u2209", + notinE: "\u22F9\u0338", + notindot: "\u22F5\u0338", + notinva: "\u2209", + notinvb: "\u22F7", + notinvc: "\u22F6", + notni: "\u220C", + notniva: "\u220C", + notnivb: "\u22FE", + notnivc: "\u22FD", + npar: "\u2226", + nparallel: "\u2226", + nparsl: "\u2AFD\u20E5", + npart: "\u2202\u0338", + npolint: "\u2A14", + npr: "\u2280", + nprcue: "\u22E0", + npre: "\u2AAF\u0338", + nprec: "\u2280", + npreceq: "\u2AAF\u0338", + nrArr: "\u21CF", + nrarr: "\u219B", + nrarrc: "\u2933\u0338", + nrarrw: "\u219D\u0338", + nrightarrow: "\u219B", + nrtri: "\u22EB", + nrtrie: "\u22ED", + nsc: "\u2281", + nsccue: "\u22E1", + nsce: "\u2AB0\u0338", + nscr: "\u{1D4C3}", + nshortmid: "\u2224", + nshortparallel: "\u2226", + nsim: "\u2241", + nsime: "\u2244", + nsimeq: "\u2244", + nsmid: "\u2224", + nspar: "\u2226", + nsqsube: "\u22E2", + nsqsupe: "\u22E3", + nsub: "\u2284", + nsubE: "\u2AC5\u0338", + nsube: "\u2288", + nsubset: "\u2282\u20D2", + nsubseteq: "\u2288", + nsubseteqq: "\u2AC5\u0338", + nsucc: "\u2281", + nsucceq: "\u2AB0\u0338", + nsup: "\u2285", + nsupE: "\u2AC6\u0338", + nsupe: "\u2289", + nsupset: "\u2283\u20D2", + nsupseteq: "\u2289", + nsupseteqq: "\u2AC6\u0338", + ntgl: "\u2279", + ntilde: "\xF1", + ntlg: "\u2278", + ntriangleleft: "\u22EA", + ntrianglelefteq: "\u22EC", + ntriangleright: "\u22EB", + ntrianglerighteq: "\u22ED", + nu: "\u03BD", + num: "#", + numero: "\u2116", + numsp: "\u2007", + nvDash: "\u22AD", + nvHarr: "\u2904", + nvap: "\u224D\u20D2", + nvdash: "\u22AC", + nvge: "\u2265\u20D2", + nvgt: ">\u20D2", + nvinfin: "\u29DE", + nvlArr: "\u2902", + nvle: "\u2264\u20D2", + nvlt: "<\u20D2", + nvltrie: "\u22B4\u20D2", + nvrArr: "\u2903", + nvrtrie: "\u22B5\u20D2", + nvsim: "\u223C\u20D2", + nwArr: "\u21D6", + nwarhk: "\u2923", + nwarr: "\u2196", + nwarrow: "\u2196", + nwnear: "\u2927", + oS: "\u24C8", + oacute: "\xF3", + oast: "\u229B", + ocir: "\u229A", + ocirc: "\xF4", + ocy: "\u043E", + odash: "\u229D", + odblac: "\u0151", + odiv: "\u2A38", + odot: "\u2299", + odsold: "\u29BC", + oelig: "\u0153", + ofcir: "\u29BF", + ofr: "\u{1D52C}", + ogon: "\u02DB", + ograve: "\xF2", + ogt: "\u29C1", + ohbar: "\u29B5", + ohm: "\u03A9", + oint: "\u222E", + olarr: "\u21BA", + olcir: "\u29BE", + olcross: "\u29BB", + oline: "\u203E", + olt: "\u29C0", + omacr: "\u014D", + omega: "\u03C9", + omicron: "\u03BF", + omid: "\u29B6", + ominus: "\u2296", + oopf: "\u{1D560}", + opar: "\u29B7", + operp: "\u29B9", + oplus: "\u2295", + or: "\u2228", + orarr: "\u21BB", + ord: "\u2A5D", + order: "\u2134", + orderof: "\u2134", + ordf: "\xAA", + ordm: "\xBA", + origof: "\u22B6", + oror: "\u2A56", + orslope: "\u2A57", + orv: "\u2A5B", + oscr: "\u2134", + oslash: "\xF8", + osol: "\u2298", + otilde: "\xF5", + otimes: "\u2297", + otimesas: "\u2A36", + ouml: "\xF6", + ovbar: "\u233D", + par: "\u2225", + para: "\xB6", + parallel: "\u2225", + parsim: "\u2AF3", + parsl: "\u2AFD", + part: "\u2202", + pcy: "\u043F", + percnt: "%", + period: ".", + permil: "\u2030", + perp: "\u22A5", + pertenk: "\u2031", + pfr: "\u{1D52D}", + phi: "\u03C6", + phiv: "\u03D5", + phmmat: "\u2133", + phone: "\u260E", + pi: "\u03C0", + pitchfork: "\u22D4", + piv: "\u03D6", + planck: "\u210F", + planckh: "\u210E", + plankv: "\u210F", + plus: "+", + plusacir: "\u2A23", + plusb: "\u229E", + pluscir: "\u2A22", + plusdo: "\u2214", + plusdu: "\u2A25", + pluse: "\u2A72", + plusmn: "\xB1", + plussim: "\u2A26", + plustwo: "\u2A27", + pm: "\xB1", + pointint: "\u2A15", + popf: "\u{1D561}", + pound: "\xA3", + pr: "\u227A", + prE: "\u2AB3", + prap: "\u2AB7", + prcue: "\u227C", + pre: "\u2AAF", + prec: "\u227A", + precapprox: "\u2AB7", + preccurlyeq: "\u227C", + preceq: "\u2AAF", + precnapprox: "\u2AB9", + precneqq: "\u2AB5", + precnsim: "\u22E8", + precsim: "\u227E", + prime: "\u2032", + primes: "\u2119", + prnE: "\u2AB5", + prnap: "\u2AB9", + prnsim: "\u22E8", + prod: "\u220F", + profalar: "\u232E", + profline: "\u2312", + profsurf: "\u2313", + prop: "\u221D", + propto: "\u221D", + prsim: "\u227E", + prurel: "\u22B0", + pscr: "\u{1D4C5}", + psi: "\u03C8", + puncsp: "\u2008", + qfr: "\u{1D52E}", + qint: "\u2A0C", + qopf: "\u{1D562}", + qprime: "\u2057", + qscr: "\u{1D4C6}", + quaternions: "\u210D", + quatint: "\u2A16", + quest: "?", + questeq: "\u225F", + quot: '"', + rAarr: "\u21DB", + rArr: "\u21D2", + rAtail: "\u291C", + rBarr: "\u290F", + rHar: "\u2964", + race: "\u223D\u0331", + racute: "\u0155", + radic: "\u221A", + raemptyv: "\u29B3", + rang: "\u27E9", + rangd: "\u2992", + range: "\u29A5", + rangle: "\u27E9", + raquo: "\xBB", + rarr: "\u2192", + rarrap: "\u2975", + rarrb: "\u21E5", + rarrbfs: "\u2920", + rarrc: "\u2933", + rarrfs: "\u291E", + rarrhk: "\u21AA", + rarrlp: "\u21AC", + rarrpl: "\u2945", + rarrsim: "\u2974", + rarrtl: "\u21A3", + rarrw: "\u219D", + ratail: "\u291A", + ratio: "\u2236", + rationals: "\u211A", + rbarr: "\u290D", + rbbrk: "\u2773", + rbrace: "}", + rbrack: "]", + rbrke: "\u298C", + rbrksld: "\u298E", + rbrkslu: "\u2990", + rcaron: "\u0159", + rcedil: "\u0157", + rceil: "\u2309", + rcub: "}", + rcy: "\u0440", + rdca: "\u2937", + rdldhar: "\u2969", + rdquo: "\u201D", + rdquor: "\u201D", + rdsh: "\u21B3", + real: "\u211C", + realine: "\u211B", + realpart: "\u211C", + reals: "\u211D", + rect: "\u25AD", + reg: "\xAE", + rfisht: "\u297D", + rfloor: "\u230B", + rfr: "\u{1D52F}", + rhard: "\u21C1", + rharu: "\u21C0", + rharul: "\u296C", + rho: "\u03C1", + rhov: "\u03F1", + rightarrow: "\u2192", + rightarrowtail: "\u21A3", + rightharpoondown: "\u21C1", + rightharpoonup: "\u21C0", + rightleftarrows: "\u21C4", + rightleftharpoons: "\u21CC", + rightrightarrows: "\u21C9", + rightsquigarrow: "\u219D", + rightthreetimes: "\u22CC", + ring: "\u02DA", + risingdotseq: "\u2253", + rlarr: "\u21C4", + rlhar: "\u21CC", + rlm: "\u200F", + rmoust: "\u23B1", + rmoustache: "\u23B1", + rnmid: "\u2AEE", + roang: "\u27ED", + roarr: "\u21FE", + robrk: "\u27E7", + ropar: "\u2986", + ropf: "\u{1D563}", + roplus: "\u2A2E", + rotimes: "\u2A35", + rpar: ")", + rpargt: "\u2994", + rppolint: "\u2A12", + rrarr: "\u21C9", + rsaquo: "\u203A", + rscr: "\u{1D4C7}", + rsh: "\u21B1", + rsqb: "]", + rsquo: "\u2019", + rsquor: "\u2019", + rthree: "\u22CC", + rtimes: "\u22CA", + rtri: "\u25B9", + rtrie: "\u22B5", + rtrif: "\u25B8", + rtriltri: "\u29CE", + ruluhar: "\u2968", + rx: "\u211E", + sacute: "\u015B", + sbquo: "\u201A", + sc: "\u227B", + scE: "\u2AB4", + scap: "\u2AB8", + scaron: "\u0161", + sccue: "\u227D", + sce: "\u2AB0", + scedil: "\u015F", + scirc: "\u015D", + scnE: "\u2AB6", + scnap: "\u2ABA", + scnsim: "\u22E9", + scpolint: "\u2A13", + scsim: "\u227F", + scy: "\u0441", + sdot: "\u22C5", + sdotb: "\u22A1", + sdote: "\u2A66", + seArr: "\u21D8", + searhk: "\u2925", + searr: "\u2198", + searrow: "\u2198", + sect: "\xA7", + semi: ";", + seswar: "\u2929", + setminus: "\u2216", + setmn: "\u2216", + sext: "\u2736", + sfr: "\u{1D530}", + sfrown: "\u2322", + sharp: "\u266F", + shchcy: "\u0449", + shcy: "\u0448", + shortmid: "\u2223", + shortparallel: "\u2225", + shy: "\xAD", + sigma: "\u03C3", + sigmaf: "\u03C2", + sigmav: "\u03C2", + sim: "\u223C", + simdot: "\u2A6A", + sime: "\u2243", + simeq: "\u2243", + simg: "\u2A9E", + simgE: "\u2AA0", + siml: "\u2A9D", + simlE: "\u2A9F", + simne: "\u2246", + simplus: "\u2A24", + simrarr: "\u2972", + slarr: "\u2190", + smallsetminus: "\u2216", + smashp: "\u2A33", + smeparsl: "\u29E4", + smid: "\u2223", + smile: "\u2323", + smt: "\u2AAA", + smte: "\u2AAC", + smtes: "\u2AAC\uFE00", + softcy: "\u044C", + sol: "/", + solb: "\u29C4", + solbar: "\u233F", + sopf: "\u{1D564}", + spades: "\u2660", + spadesuit: "\u2660", + spar: "\u2225", + sqcap: "\u2293", + sqcaps: "\u2293\uFE00", + sqcup: "\u2294", + sqcups: "\u2294\uFE00", + sqsub: "\u228F", + sqsube: "\u2291", + sqsubset: "\u228F", + sqsubseteq: "\u2291", + sqsup: "\u2290", + sqsupe: "\u2292", + sqsupset: "\u2290", + sqsupseteq: "\u2292", + squ: "\u25A1", + square: "\u25A1", + squarf: "\u25AA", + squf: "\u25AA", + srarr: "\u2192", + sscr: "\u{1D4C8}", + ssetmn: "\u2216", + ssmile: "\u2323", + sstarf: "\u22C6", + star: "\u2606", + starf: "\u2605", + straightepsilon: "\u03F5", + straightphi: "\u03D5", + strns: "\xAF", + sub: "\u2282", + subE: "\u2AC5", + subdot: "\u2ABD", + sube: "\u2286", + subedot: "\u2AC3", + submult: "\u2AC1", + subnE: "\u2ACB", + subne: "\u228A", + subplus: "\u2ABF", + subrarr: "\u2979", + subset: "\u2282", + subseteq: "\u2286", + subseteqq: "\u2AC5", + subsetneq: "\u228A", + subsetneqq: "\u2ACB", + subsim: "\u2AC7", + subsub: "\u2AD5", + subsup: "\u2AD3", + succ: "\u227B", + succapprox: "\u2AB8", + succcurlyeq: "\u227D", + succeq: "\u2AB0", + succnapprox: "\u2ABA", + succneqq: "\u2AB6", + succnsim: "\u22E9", + succsim: "\u227F", + sum: "\u2211", + sung: "\u266A", + sup1: "\xB9", + sup2: "\xB2", + sup3: "\xB3", + sup: "\u2283", + supE: "\u2AC6", + supdot: "\u2ABE", + supdsub: "\u2AD8", + supe: "\u2287", + supedot: "\u2AC4", + suphsol: "\u27C9", + suphsub: "\u2AD7", + suplarr: "\u297B", + supmult: "\u2AC2", + supnE: "\u2ACC", + supne: "\u228B", + supplus: "\u2AC0", + supset: "\u2283", + supseteq: "\u2287", + supseteqq: "\u2AC6", + supsetneq: "\u228B", + supsetneqq: "\u2ACC", + supsim: "\u2AC8", + supsub: "\u2AD4", + supsup: "\u2AD6", + swArr: "\u21D9", + swarhk: "\u2926", + swarr: "\u2199", + swarrow: "\u2199", + swnwar: "\u292A", + szlig: "\xDF", + target: "\u2316", + tau: "\u03C4", + tbrk: "\u23B4", + tcaron: "\u0165", + tcedil: "\u0163", + tcy: "\u0442", + tdot: "\u20DB", + telrec: "\u2315", + tfr: "\u{1D531}", + there4: "\u2234", + therefore: "\u2234", + theta: "\u03B8", + thetasym: "\u03D1", + thetav: "\u03D1", + thickapprox: "\u2248", + thicksim: "\u223C", + thinsp: "\u2009", + thkap: "\u2248", + thksim: "\u223C", + thorn: "\xFE", + tilde: "\u02DC", + times: "\xD7", + timesb: "\u22A0", + timesbar: "\u2A31", + timesd: "\u2A30", + tint: "\u222D", + toea: "\u2928", + top: "\u22A4", + topbot: "\u2336", + topcir: "\u2AF1", + topf: "\u{1D565}", + topfork: "\u2ADA", + tosa: "\u2929", + tprime: "\u2034", + trade: "\u2122", + triangle: "\u25B5", + triangledown: "\u25BF", + triangleleft: "\u25C3", + trianglelefteq: "\u22B4", + triangleq: "\u225C", + triangleright: "\u25B9", + trianglerighteq: "\u22B5", + tridot: "\u25EC", + trie: "\u225C", + triminus: "\u2A3A", + triplus: "\u2A39", + trisb: "\u29CD", + tritime: "\u2A3B", + trpezium: "\u23E2", + tscr: "\u{1D4C9}", + tscy: "\u0446", + tshcy: "\u045B", + tstrok: "\u0167", + twixt: "\u226C", + twoheadleftarrow: "\u219E", + twoheadrightarrow: "\u21A0", + uArr: "\u21D1", + uHar: "\u2963", + uacute: "\xFA", + uarr: "\u2191", + ubrcy: "\u045E", + ubreve: "\u016D", + ucirc: "\xFB", + ucy: "\u0443", + udarr: "\u21C5", + udblac: "\u0171", + udhar: "\u296E", + ufisht: "\u297E", + ufr: "\u{1D532}", + ugrave: "\xF9", + uharl: "\u21BF", + uharr: "\u21BE", + uhblk: "\u2580", + ulcorn: "\u231C", + ulcorner: "\u231C", + ulcrop: "\u230F", + ultri: "\u25F8", + umacr: "\u016B", + uml: "\xA8", + uogon: "\u0173", + uopf: "\u{1D566}", + uparrow: "\u2191", + updownarrow: "\u2195", + upharpoonleft: "\u21BF", + upharpoonright: "\u21BE", + uplus: "\u228E", + upsi: "\u03C5", + upsih: "\u03D2", + upsilon: "\u03C5", + upuparrows: "\u21C8", + urcorn: "\u231D", + urcorner: "\u231D", + urcrop: "\u230E", + uring: "\u016F", + urtri: "\u25F9", + uscr: "\u{1D4CA}", + utdot: "\u22F0", + utilde: "\u0169", + utri: "\u25B5", + utrif: "\u25B4", + uuarr: "\u21C8", + uuml: "\xFC", + uwangle: "\u29A7", + vArr: "\u21D5", + vBar: "\u2AE8", + vBarv: "\u2AE9", + vDash: "\u22A8", + vangrt: "\u299C", + varepsilon: "\u03F5", + varkappa: "\u03F0", + varnothing: "\u2205", + varphi: "\u03D5", + varpi: "\u03D6", + varpropto: "\u221D", + varr: "\u2195", + varrho: "\u03F1", + varsigma: "\u03C2", + varsubsetneq: "\u228A\uFE00", + varsubsetneqq: "\u2ACB\uFE00", + varsupsetneq: "\u228B\uFE00", + varsupsetneqq: "\u2ACC\uFE00", + vartheta: "\u03D1", + vartriangleleft: "\u22B2", + vartriangleright: "\u22B3", + vcy: "\u0432", + vdash: "\u22A2", + vee: "\u2228", + veebar: "\u22BB", + veeeq: "\u225A", + vellip: "\u22EE", + verbar: "|", + vert: "|", + vfr: "\u{1D533}", + vltri: "\u22B2", + vnsub: "\u2282\u20D2", + vnsup: "\u2283\u20D2", + vopf: "\u{1D567}", + vprop: "\u221D", + vrtri: "\u22B3", + vscr: "\u{1D4CB}", + vsubnE: "\u2ACB\uFE00", + vsubne: "\u228A\uFE00", + vsupnE: "\u2ACC\uFE00", + vsupne: "\u228B\uFE00", + vzigzag: "\u299A", + wcirc: "\u0175", + wedbar: "\u2A5F", + wedge: "\u2227", + wedgeq: "\u2259", + weierp: "\u2118", + wfr: "\u{1D534}", + wopf: "\u{1D568}", + wp: "\u2118", + wr: "\u2240", + wreath: "\u2240", + wscr: "\u{1D4CC}", + xcap: "\u22C2", + xcirc: "\u25EF", + xcup: "\u22C3", + xdtri: "\u25BD", + xfr: "\u{1D535}", + xhArr: "\u27FA", + xharr: "\u27F7", + xi: "\u03BE", + xlArr: "\u27F8", + xlarr: "\u27F5", + xmap: "\u27FC", + xnis: "\u22FB", + xodot: "\u2A00", + xopf: "\u{1D569}", + xoplus: "\u2A01", + xotime: "\u2A02", + xrArr: "\u27F9", + xrarr: "\u27F6", + xscr: "\u{1D4CD}", + xsqcup: "\u2A06", + xuplus: "\u2A04", + xutri: "\u25B3", + xvee: "\u22C1", + xwedge: "\u22C0", + yacute: "\xFD", + yacy: "\u044F", + ycirc: "\u0177", + ycy: "\u044B", + yen: "\xA5", + yfr: "\u{1D536}", + yicy: "\u0457", + yopf: "\u{1D56A}", + yscr: "\u{1D4CE}", + yucy: "\u044E", + yuml: "\xFF", + zacute: "\u017A", + zcaron: "\u017E", + zcy: "\u0437", + zdot: "\u017C", + zeetrf: "\u2128", + zeta: "\u03B6", + zfr: "\u{1D537}", + zhcy: "\u0436", + zigrarr: "\u21DD", + zopf: "\u{1D56B}", + zscr: "\u{1D4CF}", + zwj: "\u200D", + zwnj: "\u200C" +}; + +// ../../node_modules/decode-named-character-reference/index.js +var own = {}.hasOwnProperty; +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : !1; +} + +// ../../node_modules/micromark-util-chunked/index.js +function splice(list3, start2, remove, items) { + let end = list3.length, chunkStart = 0, parameters; + if (start2 < 0 ? start2 = -start2 > end ? 0 : end + start2 : start2 = start2 > end ? end : start2, remove = remove > 0 ? remove : 0, items.length < 1e4) + parameters = Array.from(items), parameters.unshift(start2, remove), list3.splice(...parameters); + else + for (remove && list3.splice(start2, remove); chunkStart < items.length; ) + parameters = items.slice(chunkStart, chunkStart + 1e4), parameters.unshift(start2, 0), list3.splice(...parameters), chunkStart += 1e4, start2 += 1e4; +} +function push(list3, items) { + return list3.length > 0 ? (splice(list3, list3.length, 0, items), list3) : items; +} + +// ../../node_modules/micromark-util-combine-extensions/index.js +var hasOwnProperty3 = {}.hasOwnProperty; +function combineExtensions(extensions) { + let all2 = {}, index2 = -1; + for (; ++index2 < extensions.length; ) + syntaxExtension(all2, extensions[index2]); + return all2; +} +function syntaxExtension(all2, extension2) { + let hook; + for (hook in extension2) { + let left = (hasOwnProperty3.call(all2, hook) ? all2[hook] : void 0) || (all2[hook] = {}), right = extension2[hook], code; + if (right) + for (code in right) { + hasOwnProperty3.call(left, code) || (left[code] = []); + let value = right[code]; + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ); + } + } +} +function constructs(existing, list3) { + let index2 = -1, before = []; + for (; ++index2 < list3.length; ) + (list3[index2].add === "after" ? existing : before).push(list3[index2]); + splice(existing, 0, 0, before); +} + +// ../../node_modules/micromark-util-decode-numeric-character-reference/index.js +function decodeNumericCharacterReference(value, base) { + let code = Number.parseInt(value, base); + return ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || code === 11 || code > 13 && code < 32 || // Control character (DEL) of C0, and C1 controls. + code > 126 && code < 160 || // Lone high surrogates and low surrogates. + code > 55295 && code < 57344 || // Noncharacters. + code > 64975 && code < 65008 || /* eslint-disable no-bitwise */ + (code & 65535) === 65535 || (code & 65535) === 65534 || /* eslint-enable no-bitwise */ + // Out of range + code > 1114111 ? "\uFFFD" : String.fromCodePoint(code) + ); +} + +// ../../node_modules/micromark-util-normalize-identifier/index.js +function normalizeIdentifier(value) { + return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); +} + +// ../../node_modules/micromark-util-character/index.js +var unicodePunctuationInternal = regexCheck(new RegExp("\\p{P}", "u")), asciiAlpha = regexCheck(/[A-Za-z]/), asciiAlphanumeric = regexCheck(/[\dA-Za-z]/), asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/); +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ); +} +var asciiDigit = regexCheck(/\d/), asciiHexDigit = regexCheck(/[\dA-Fa-f]/), asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/); +function markdownLineEnding(code) { + return code !== null && code < -2; +} +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32); +} +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32; +} +function unicodePunctuation(code) { + return asciiPunctuation(code) || unicodePunctuationInternal(code); +} +var unicodeWhitespace = regexCheck(/\s/); +function regexCheck(regex) { + return check; + function check(code) { + return code !== null && code > -1 && regex.test(String.fromCharCode(code)); + } +} + +// ../../node_modules/micromark/lib/compile.js +var hasOwnProperty4 = {}.hasOwnProperty; + +// ../../node_modules/micromark-factory-space/index.js +function factorySpace(effects, ok2, type, max) { + let limit = max ? max - 1 : Number.POSITIVE_INFINITY, size = 0; + return start2; + function start2(code) { + return markdownSpace(code) ? (effects.enter(type), prefix(code)) : ok2(code); + } + function prefix(code) { + return markdownSpace(code) && size++ < limit ? (effects.consume(code), prefix) : (effects.exit(type), ok2(code)); + } +} + +// ../../node_modules/micromark/lib/initialize/content.js +var content = { + tokenize: initializeContent +}; +function initializeContent(effects) { + let contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ), previous2; + return contentStart; + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code); + return; + } + return effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), factorySpace(effects, contentStart, "linePrefix"); + } + function paragraphInitial(code) { + return effects.enter("paragraph"), lineStart(code); + } + function lineStart(code) { + let token = effects.enter("chunkText", { + contentType: "text", + previous: previous2 + }); + return previous2 && (previous2.next = token), previous2 = token, data2(code); + } + function data2(code) { + if (code === null) { + effects.exit("chunkText"), effects.exit("paragraph"), effects.consume(code); + return; + } + return markdownLineEnding(code) ? (effects.consume(code), effects.exit("chunkText"), lineStart) : (effects.consume(code), data2); + } +} + +// ../../node_modules/micromark/lib/initialize/document.js +var document3 = { + tokenize: initializeDocument +}, containerConstruct = { + tokenize: tokenizeContainer +}; +function initializeDocument(effects) { + let self2 = this, stack = [], continued = 0, childFlow, childToken, lineStartOffset; + return start2; + function start2(code) { + if (continued < stack.length) { + let item = stack[continued]; + return self2.containerState = item[1], effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code); + } + return checkNewContainers(code); + } + function documentContinue(code) { + if (continued++, self2.containerState._closeFlow) { + self2.containerState._closeFlow = void 0, childFlow && closeFlow(); + let indexBeforeExits = self2.events.length, indexBeforeFlow = indexBeforeExits, point3; + for (; indexBeforeFlow--; ) + if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") { + point3 = self2.events[indexBeforeFlow][1].end; + break; + } + exitContainers(continued); + let index2 = indexBeforeExits; + for (; index2 < self2.events.length; ) + self2.events[index2][1].end = Object.assign({}, point3), index2++; + return splice( + self2.events, + indexBeforeFlow + 1, + 0, + self2.events.slice(indexBeforeExits) + ), self2.events.length = index2, checkNewContainers(code); + } + return start2(code); + } + function checkNewContainers(code) { + if (continued === stack.length) { + if (!childFlow) + return documentContinued(code); + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) + return flowStart(code); + self2.interrupt = !!(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack); + } + return self2.containerState = {}, effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code); + } + function thereIsANewContainer(code) { + return childFlow && closeFlow(), exitContainers(continued), documentContinued(code); + } + function thereIsNoNewContainer(code) { + return self2.parser.lazy[self2.now().line] = continued !== stack.length, lineStartOffset = self2.now().offset, flowStart(code); + } + function documentContinued(code) { + return self2.containerState = {}, effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code); + } + function containerContinue(code) { + return continued++, stack.push([self2.currentConstruct, self2.containerState]), documentContinued(code); + } + function flowStart(code) { + if (code === null) { + childFlow && closeFlow(), exitContainers(0), effects.consume(code); + return; + } + return childFlow = childFlow || self2.parser.flow(self2.now()), effects.enter("chunkFlow", { + contentType: "flow", + previous: childToken, + _tokenizer: childFlow + }), flowContinue(code); + } + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit("chunkFlow"), !0), exitContainers(0), effects.consume(code); + return; + } + return markdownLineEnding(code) ? (effects.consume(code), writeToChild(effects.exit("chunkFlow")), continued = 0, self2.interrupt = void 0, start2) : (effects.consume(code), flowContinue); + } + function writeToChild(token, eof) { + let stream = self2.sliceStream(token); + if (eof && stream.push(null), token.previous = childToken, childToken && (childToken.next = token), childToken = token, childFlow.defineSkip(token.start), childFlow.write(stream), self2.parser.lazy[token.start.line]) { + let index2 = childFlow.events.length; + for (; index2--; ) + if ( + // The token starts before the line ending… + childFlow.events[index2][1].start.offset < lineStartOffset && // …and either is not ended yet… + (!childFlow.events[index2][1].end || // …or ends after it. + childFlow.events[index2][1].end.offset > lineStartOffset) + ) + return; + let indexBeforeExits = self2.events.length, indexBeforeFlow = indexBeforeExits, seen, point3; + for (; indexBeforeFlow--; ) + if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") { + if (seen) { + point3 = self2.events[indexBeforeFlow][1].end; + break; + } + seen = !0; + } + for (exitContainers(continued), index2 = indexBeforeExits; index2 < self2.events.length; ) + self2.events[index2][1].end = Object.assign({}, point3), index2++; + splice( + self2.events, + indexBeforeFlow + 1, + 0, + self2.events.slice(indexBeforeExits) + ), self2.events.length = index2; + } + } + function exitContainers(size) { + let index2 = stack.length; + for (; index2-- > size; ) { + let entry = stack[index2]; + self2.containerState = entry[1], entry[0].exit.call(self2, effects); + } + stack.length = size; + } + function closeFlow() { + childFlow.write([null]), childToken = void 0, childFlow = void 0, self2.containerState._closeFlow = void 0; + } +} +function tokenizeContainer(effects, ok2, nok) { + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok2, nok), + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); +} + +// ../../node_modules/micromark-util-classify-character/index.js +function classifyCharacter(code) { + if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) + return 1; + if (unicodePunctuation(code)) + return 2; +} + +// ../../node_modules/micromark-util-resolve-all/index.js +function resolveAll(constructs2, events, context) { + let called = [], index2 = -1; + for (; ++index2 < constructs2.length; ) { + let resolve4 = constructs2[index2].resolveAll; + resolve4 && !called.includes(resolve4) && (events = resolve4(events, context), called.push(resolve4)); + } + return events; +} + +// ../../node_modules/micromark-core-commonmark/lib/attention.js +var attention = { + name: "attention", + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +}; +function resolveAllAttention(events, context) { + let index2 = -1, open3, group, text3, openingSequence, closingSequence, use, nextEvents, offset2; + for (; ++index2 < events.length; ) + if (events[index2][0] === "enter" && events[index2][1].type === "attentionSequence" && events[index2][1]._close) { + for (open3 = index2; open3--; ) + if (events[open3][0] === "exit" && events[open3][1].type === "attentionSequence" && events[open3][1]._open && // If the markers are the same: + context.sliceSerialize(events[open3][1]).charCodeAt(0) === context.sliceSerialize(events[index2][1]).charCodeAt(0)) { + if ((events[open3][1]._close || events[index2][1]._open) && (events[index2][1].end.offset - events[index2][1].start.offset) % 3 && !((events[open3][1].end.offset - events[open3][1].start.offset + events[index2][1].end.offset - events[index2][1].start.offset) % 3)) + continue; + use = events[open3][1].end.offset - events[open3][1].start.offset > 1 && events[index2][1].end.offset - events[index2][1].start.offset > 1 ? 2 : 1; + let start2 = Object.assign({}, events[open3][1].end), end = Object.assign({}, events[index2][1].start); + movePoint(start2, -use), movePoint(end, use), openingSequence = { + type: use > 1 ? "strongSequence" : "emphasisSequence", + start: start2, + end: Object.assign({}, events[open3][1].end) + }, closingSequence = { + type: use > 1 ? "strongSequence" : "emphasisSequence", + start: Object.assign({}, events[index2][1].start), + end + }, text3 = { + type: use > 1 ? "strongText" : "emphasisText", + start: Object.assign({}, events[open3][1].end), + end: Object.assign({}, events[index2][1].start) + }, group = { + type: use > 1 ? "strong" : "emphasis", + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + }, events[open3][1].end = Object.assign({}, openingSequence.start), events[index2][1].start = Object.assign({}, closingSequence.end), nextEvents = [], events[open3][1].end.offset - events[open3][1].start.offset && (nextEvents = push(nextEvents, [ + ["enter", events[open3][1], context], + ["exit", events[open3][1], context] + ])), nextEvents = push(nextEvents, [ + ["enter", group, context], + ["enter", openingSequence, context], + ["exit", openingSequence, context], + ["enter", text3, context] + ]), nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open3 + 1, index2), + context + ) + ), nextEvents = push(nextEvents, [ + ["exit", text3, context], + ["enter", closingSequence, context], + ["exit", closingSequence, context], + ["exit", group, context] + ]), events[index2][1].end.offset - events[index2][1].start.offset ? (offset2 = 2, nextEvents = push(nextEvents, [ + ["enter", events[index2][1], context], + ["exit", events[index2][1], context] + ])) : offset2 = 0, splice(events, open3 - 1, index2 - open3 + 3, nextEvents), index2 = open3 + nextEvents.length - offset2 - 2; + break; + } + } + for (index2 = -1; ++index2 < events.length; ) + events[index2][1].type === "attentionSequence" && (events[index2][1].type = "data"); + return events; +} +function tokenizeAttention(effects, ok2) { + let attentionMarkers2 = this.parser.constructs.attentionMarkers.null, previous2 = this.previous, before = classifyCharacter(previous2), marker; + return start2; + function start2(code) { + return marker = code, effects.enter("attentionSequence"), inside(code); + } + function inside(code) { + if (code === marker) + return effects.consume(code), inside; + let token = effects.exit("attentionSequence"), after = classifyCharacter(code), open3 = !after || after === 2 && before || attentionMarkers2.includes(code), close = !before || before === 2 && after || attentionMarkers2.includes(previous2); + return token._open = !!(marker === 42 ? open3 : open3 && (before || !close)), token._close = !!(marker === 42 ? close : close && (after || !open3)), ok2(code); + } +} +function movePoint(point3, offset2) { + point3.column += offset2, point3.offset += offset2, point3._bufferIndex += offset2; +} + +// ../../node_modules/micromark-core-commonmark/lib/autolink.js +var autolink = { + name: "autolink", + tokenize: tokenizeAutolink +}; +function tokenizeAutolink(effects, ok2, nok) { + let size = 0; + return start2; + function start2(code) { + return effects.enter("autolink"), effects.enter("autolinkMarker"), effects.consume(code), effects.exit("autolinkMarker"), effects.enter("autolinkProtocol"), open3; + } + function open3(code) { + return asciiAlpha(code) ? (effects.consume(code), schemeOrEmailAtext) : emailAtext(code); + } + function schemeOrEmailAtext(code) { + return code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code) ? (size = 1, schemeInsideOrEmailAtext(code)) : emailAtext(code); + } + function schemeInsideOrEmailAtext(code) { + return code === 58 ? (effects.consume(code), size = 0, urlInside) : (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32 ? (effects.consume(code), schemeInsideOrEmailAtext) : (size = 0, emailAtext(code)); + } + function urlInside(code) { + return code === 62 ? (effects.exit("autolinkProtocol"), effects.enter("autolinkMarker"), effects.consume(code), effects.exit("autolinkMarker"), effects.exit("autolink"), ok2) : code === null || code === 32 || code === 60 || asciiControl(code) ? nok(code) : (effects.consume(code), urlInside); + } + function emailAtext(code) { + return code === 64 ? (effects.consume(code), emailAtSignOrDot) : asciiAtext(code) ? (effects.consume(code), emailAtext) : nok(code); + } + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code); + } + function emailLabel(code) { + return code === 46 ? (effects.consume(code), size = 0, emailAtSignOrDot) : code === 62 ? (effects.exit("autolinkProtocol").type = "autolinkEmail", effects.enter("autolinkMarker"), effects.consume(code), effects.exit("autolinkMarker"), effects.exit("autolink"), ok2) : emailValue(code); + } + function emailValue(code) { + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + let next = code === 45 ? emailValue : emailLabel; + return effects.consume(code), next; + } + return nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/blank-line.js +var blankLine = { + tokenize: tokenizeBlankLine, + partial: !0 +}; +function tokenizeBlankLine(effects, ok2, nok) { + return start2; + function start2(code) { + return markdownSpace(code) ? factorySpace(effects, after, "linePrefix")(code) : after(code); + } + function after(code) { + return code === null || markdownLineEnding(code) ? ok2(code) : nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/block-quote.js +var blockQuote = { + name: "blockQuote", + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +}; +function tokenizeBlockQuoteStart(effects, ok2, nok) { + let self2 = this; + return start2; + function start2(code) { + if (code === 62) { + let state = self2.containerState; + return state.open || (effects.enter("blockQuote", { + _container: !0 + }), state.open = !0), effects.enter("blockQuotePrefix"), effects.enter("blockQuoteMarker"), effects.consume(code), effects.exit("blockQuoteMarker"), after; + } + return nok(code); + } + function after(code) { + return markdownSpace(code) ? (effects.enter("blockQuotePrefixWhitespace"), effects.consume(code), effects.exit("blockQuotePrefixWhitespace"), effects.exit("blockQuotePrefix"), ok2) : (effects.exit("blockQuotePrefix"), ok2(code)); + } +} +function tokenizeBlockQuoteContinuation(effects, ok2, nok) { + let self2 = this; + return contStart; + function contStart(code) { + return markdownSpace(code) ? factorySpace( + effects, + contBefore, + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code) : contBefore(code); + } + function contBefore(code) { + return effects.attempt(blockQuote, ok2, nok)(code); + } +} +function exit(effects) { + effects.exit("blockQuote"); +} + +// ../../node_modules/micromark-core-commonmark/lib/character-escape.js +var characterEscape = { + name: "characterEscape", + tokenize: tokenizeCharacterEscape +}; +function tokenizeCharacterEscape(effects, ok2, nok) { + return start2; + function start2(code) { + return effects.enter("characterEscape"), effects.enter("escapeMarker"), effects.consume(code), effects.exit("escapeMarker"), inside; + } + function inside(code) { + return asciiPunctuation(code) ? (effects.enter("characterEscapeValue"), effects.consume(code), effects.exit("characterEscapeValue"), effects.exit("characterEscape"), ok2) : nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/character-reference.js +var characterReference = { + name: "characterReference", + tokenize: tokenizeCharacterReference +}; +function tokenizeCharacterReference(effects, ok2, nok) { + let self2 = this, size = 0, max, test; + return start2; + function start2(code) { + return effects.enter("characterReference"), effects.enter("characterReferenceMarker"), effects.consume(code), effects.exit("characterReferenceMarker"), open3; + } + function open3(code) { + return code === 35 ? (effects.enter("characterReferenceMarkerNumeric"), effects.consume(code), effects.exit("characterReferenceMarkerNumeric"), numeric) : (effects.enter("characterReferenceValue"), max = 31, test = asciiAlphanumeric, value(code)); + } + function numeric(code) { + return code === 88 || code === 120 ? (effects.enter("characterReferenceMarkerHexadecimal"), effects.consume(code), effects.exit("characterReferenceMarkerHexadecimal"), effects.enter("characterReferenceValue"), max = 6, test = asciiHexDigit, value) : (effects.enter("characterReferenceValue"), max = 7, test = asciiDigit, value(code)); + } + function value(code) { + if (code === 59 && size) { + let token = effects.exit("characterReferenceValue"); + return test === asciiAlphanumeric && !decodeNamedCharacterReference(self2.sliceSerialize(token)) ? nok(code) : (effects.enter("characterReferenceMarker"), effects.consume(code), effects.exit("characterReferenceMarker"), effects.exit("characterReference"), ok2); + } + return test(code) && size++ < max ? (effects.consume(code), value) : nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/code-fenced.js +var nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: !0 +}, codeFenced = { + name: "codeFenced", + tokenize: tokenizeCodeFenced, + concrete: !0 +}; +function tokenizeCodeFenced(effects, ok2, nok) { + let self2 = this, closeStart = { + tokenize: tokenizeCloseStart, + partial: !0 + }, initialPrefix = 0, sizeOpen = 0, marker; + return start2; + function start2(code) { + return beforeSequenceOpen(code); + } + function beforeSequenceOpen(code) { + let tail = self2.events[self2.events.length - 1]; + return initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], !0).length : 0, marker = code, effects.enter("codeFenced"), effects.enter("codeFencedFence"), effects.enter("codeFencedFenceSequence"), sequenceOpen(code); + } + function sequenceOpen(code) { + return code === marker ? (sizeOpen++, effects.consume(code), sequenceOpen) : sizeOpen < 3 ? nok(code) : (effects.exit("codeFencedFenceSequence"), markdownSpace(code) ? factorySpace(effects, infoBefore, "whitespace")(code) : infoBefore(code)); + } + function infoBefore(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("codeFencedFence"), self2.interrupt ? ok2(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)) : (effects.enter("codeFencedFenceInfo"), effects.enter("chunkString", { + contentType: "string" + }), info(code)); + } + function info(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("chunkString"), effects.exit("codeFencedFenceInfo"), infoBefore(code)) : markdownSpace(code) ? (effects.exit("chunkString"), effects.exit("codeFencedFenceInfo"), factorySpace(effects, metaBefore, "whitespace")(code)) : code === 96 && code === marker ? nok(code) : (effects.consume(code), info); + } + function metaBefore(code) { + return code === null || markdownLineEnding(code) ? infoBefore(code) : (effects.enter("codeFencedFenceMeta"), effects.enter("chunkString", { + contentType: "string" + }), meta(code)); + } + function meta(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("chunkString"), effects.exit("codeFencedFenceMeta"), infoBefore(code)) : code === 96 && code === marker ? nok(code) : (effects.consume(code), meta); + } + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code); + } + function contentBefore(code) { + return effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), contentStart; + } + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) ? factorySpace( + effects, + beforeContentChunk, + "linePrefix", + initialPrefix + 1 + )(code) : beforeContentChunk(code); + } + function beforeContentChunk(code) { + return code === null || markdownLineEnding(code) ? effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) : (effects.enter("codeFlowValue"), contentChunk(code)); + } + function contentChunk(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("codeFlowValue"), beforeContentChunk(code)) : (effects.consume(code), contentChunk); + } + function after(code) { + return effects.exit("codeFenced"), ok2(code); + } + function tokenizeCloseStart(effects2, ok3, nok2) { + let size = 0; + return startBefore; + function startBefore(code) { + return effects2.enter("lineEnding"), effects2.consume(code), effects2.exit("lineEnding"), start3; + } + function start3(code) { + return effects2.enter("codeFencedFence"), markdownSpace(code) ? factorySpace( + effects2, + beforeSequenceClose, + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code) : beforeSequenceClose(code); + } + function beforeSequenceClose(code) { + return code === marker ? (effects2.enter("codeFencedFenceSequence"), sequenceClose(code)) : nok2(code); + } + function sequenceClose(code) { + return code === marker ? (size++, effects2.consume(code), sequenceClose) : size >= sizeOpen ? (effects2.exit("codeFencedFenceSequence"), markdownSpace(code) ? factorySpace(effects2, sequenceCloseAfter, "whitespace")(code) : sequenceCloseAfter(code)) : nok2(code); + } + function sequenceCloseAfter(code) { + return code === null || markdownLineEnding(code) ? (effects2.exit("codeFencedFence"), ok3(code)) : nok2(code); + } + } +} +function tokenizeNonLazyContinuation(effects, ok2, nok) { + let self2 = this; + return start2; + function start2(code) { + return code === null ? nok(code) : (effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), lineStart); + } + function lineStart(code) { + return self2.parser.lazy[self2.now().line] ? nok(code) : ok2(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/code-indented.js +var codeIndented = { + name: "codeIndented", + tokenize: tokenizeCodeIndented +}, furtherStart = { + tokenize: tokenizeFurtherStart, + partial: !0 +}; +function tokenizeCodeIndented(effects, ok2, nok) { + let self2 = this; + return start2; + function start2(code) { + return effects.enter("codeIndented"), factorySpace(effects, afterPrefix, "linePrefix", 5)(code); + } + function afterPrefix(code) { + let tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], !0).length >= 4 ? atBreak(code) : nok(code); + } + function atBreak(code) { + return code === null ? after(code) : markdownLineEnding(code) ? effects.attempt(furtherStart, atBreak, after)(code) : (effects.enter("codeFlowValue"), inside(code)); + } + function inside(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("codeFlowValue"), atBreak(code)) : (effects.consume(code), inside); + } + function after(code) { + return effects.exit("codeIndented"), ok2(code); + } +} +function tokenizeFurtherStart(effects, ok2, nok) { + let self2 = this; + return furtherStart2; + function furtherStart2(code) { + return self2.parser.lazy[self2.now().line] ? nok(code) : markdownLineEnding(code) ? (effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), furtherStart2) : factorySpace(effects, afterPrefix, "linePrefix", 5)(code); + } + function afterPrefix(code) { + let tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], !0).length >= 4 ? ok2(code) : markdownLineEnding(code) ? furtherStart2(code) : nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/code-text.js +var codeText = { + name: "codeText", + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +}; +function resolveCodeText(events) { + let tailExitIndex = events.length - 4, headEnterIndex = 3, index2, enter; + if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) { + for (index2 = headEnterIndex; ++index2 < tailExitIndex; ) + if (events[index2][1].type === "codeTextData") { + events[headEnterIndex][1].type = "codeTextPadding", events[tailExitIndex][1].type = "codeTextPadding", headEnterIndex += 2, tailExitIndex -= 2; + break; + } + } + for (index2 = headEnterIndex - 1, tailExitIndex++; ++index2 <= tailExitIndex; ) + enter === void 0 ? index2 !== tailExitIndex && events[index2][1].type !== "lineEnding" && (enter = index2) : (index2 === tailExitIndex || events[index2][1].type === "lineEnding") && (events[enter][1].type = "codeTextData", index2 !== enter + 2 && (events[enter][1].end = events[index2 - 1][1].end, events.splice(enter + 2, index2 - enter - 2), tailExitIndex -= index2 - enter - 2, index2 = enter + 2), enter = void 0); + return events; +} +function previous(code) { + return code !== 96 || this.events[this.events.length - 1][1].type === "characterEscape"; +} +function tokenizeCodeText(effects, ok2, nok) { + let self2 = this, sizeOpen = 0, size, token; + return start2; + function start2(code) { + return effects.enter("codeText"), effects.enter("codeTextSequence"), sequenceOpen(code); + } + function sequenceOpen(code) { + return code === 96 ? (effects.consume(code), sizeOpen++, sequenceOpen) : (effects.exit("codeTextSequence"), between(code)); + } + function between(code) { + return code === null ? nok(code) : code === 32 ? (effects.enter("space"), effects.consume(code), effects.exit("space"), between) : code === 96 ? (token = effects.enter("codeTextSequence"), size = 0, sequenceClose(code)) : markdownLineEnding(code) ? (effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), between) : (effects.enter("codeTextData"), data2(code)); + } + function data2(code) { + return code === null || code === 32 || code === 96 || markdownLineEnding(code) ? (effects.exit("codeTextData"), between(code)) : (effects.consume(code), data2); + } + function sequenceClose(code) { + return code === 96 ? (effects.consume(code), size++, sequenceClose) : size === sizeOpen ? (effects.exit("codeTextSequence"), effects.exit("codeText"), ok2(code)) : (token.type = "codeTextData", data2(code)); + } +} + +// ../../node_modules/micromark-util-subtokenize/index.js +function subtokenize(events) { + let jumps = {}, index2 = -1, event, lineIndex, otherIndex, otherEvent, parameters, subevents, more; + for (; ++index2 < events.length; ) { + for (; index2 in jumps; ) + index2 = jumps[index2]; + if (event = events[index2], index2 && event[1].type === "chunkFlow" && events[index2 - 1][1].type === "listItemPrefix" && (subevents = event[1]._tokenizer.events, otherIndex = 0, otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank" && (otherIndex += 2), otherIndex < subevents.length && subevents[otherIndex][1].type === "content")) + for (; ++otherIndex < subevents.length && subevents[otherIndex][1].type !== "content"; ) + subevents[otherIndex][1].type === "chunkText" && (subevents[otherIndex][1]._isInFirstContentOfListItem = !0, otherIndex++); + if (event[0] === "enter") + event[1].contentType && (Object.assign(jumps, subcontent(events, index2)), index2 = jumps[index2], more = !0); + else if (event[1]._container) { + for (otherIndex = index2, lineIndex = void 0; otherIndex-- && (otherEvent = events[otherIndex], otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank"); ) + otherEvent[0] === "enter" && (lineIndex && (events[lineIndex][1].type = "lineEndingBlank"), otherEvent[1].type = "lineEnding", lineIndex = otherIndex); + lineIndex && (event[1].end = Object.assign({}, events[lineIndex][1].start), parameters = events.slice(lineIndex, index2), parameters.unshift(event), splice(events, lineIndex, index2 - lineIndex + 1, parameters)); + } + } + return !more; +} +function subcontent(events, eventIndex) { + let token = events[eventIndex][1], context = events[eventIndex][2], startPosition = eventIndex - 1, startPositions = [], tokenizer3 = token._tokenizer || context.parser[token.contentType](token.start), childEvents = tokenizer3.events, jumps = [], gaps = {}, stream, previous2, index2 = -1, current2 = token, adjust = 0, start2 = 0, breaks = [start2]; + for (; current2; ) { + for (; events[++startPosition][1] !== current2; ) + ; + startPositions.push(startPosition), current2._tokenizer || (stream = context.sliceStream(current2), current2.next || stream.push(null), previous2 && tokenizer3.defineSkip(current2.start), current2._isInFirstContentOfListItem && (tokenizer3._gfmTasklistFirstContentOfListItem = !0), tokenizer3.write(stream), current2._isInFirstContentOfListItem && (tokenizer3._gfmTasklistFirstContentOfListItem = void 0)), previous2 = current2, current2 = current2.next; + } + for (current2 = token; ++index2 < childEvents.length; ) + // Find a void token that includes a break. + childEvents[index2][0] === "exit" && childEvents[index2 - 1][0] === "enter" && childEvents[index2][1].type === childEvents[index2 - 1][1].type && childEvents[index2][1].start.line !== childEvents[index2][1].end.line && (start2 = index2 + 1, breaks.push(start2), current2._tokenizer = void 0, current2.previous = void 0, current2 = current2.next); + for (tokenizer3.events = [], current2 ? (current2._tokenizer = void 0, current2.previous = void 0) : breaks.pop(), index2 = breaks.length; index2--; ) { + let slice = childEvents.slice(breaks[index2], breaks[index2 + 1]), start3 = startPositions.pop(); + jumps.unshift([start3, start3 + slice.length - 1]), splice(events, start3, 2, slice); + } + for (index2 = -1; ++index2 < jumps.length; ) + gaps[adjust + jumps[index2][0]] = adjust + jumps[index2][1], adjust += jumps[index2][1] - jumps[index2][0] - 1; + return gaps; +} + +// ../../node_modules/micromark-core-commonmark/lib/content.js +var content2 = { + tokenize: tokenizeContent, + resolve: resolveContent +}, continuationConstruct = { + tokenize: tokenizeContinuation, + partial: !0 +}; +function resolveContent(events) { + return subtokenize(events), events; +} +function tokenizeContent(effects, ok2) { + let previous2; + return chunkStart; + function chunkStart(code) { + return effects.enter("content"), previous2 = effects.enter("chunkContent", { + contentType: "content" + }), chunkInside(code); + } + function chunkInside(code) { + return code === null ? contentEnd(code) : markdownLineEnding(code) ? effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) : (effects.consume(code), chunkInside); + } + function contentEnd(code) { + return effects.exit("chunkContent"), effects.exit("content"), ok2(code); + } + function contentContinue(code) { + return effects.consume(code), effects.exit("chunkContent"), previous2.next = effects.enter("chunkContent", { + contentType: "content", + previous: previous2 + }), previous2 = previous2.next, chunkInside; + } +} +function tokenizeContinuation(effects, ok2, nok) { + let self2 = this; + return startLookahead; + function startLookahead(code) { + return effects.exit("chunkContent"), effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), factorySpace(effects, prefixed, "linePrefix"); + } + function prefixed(code) { + if (code === null || markdownLineEnding(code)) + return nok(code); + let tail = self2.events[self2.events.length - 1]; + return !self2.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], !0).length >= 4 ? ok2(code) : effects.interrupt(self2.parser.constructs.flow, nok, ok2)(code); + } +} + +// ../../node_modules/micromark-factory-destination/index.js +function factoryDestination(effects, ok2, nok, type, literalType, literalMarkerType, rawType, stringType, max) { + let limit = max || Number.POSITIVE_INFINITY, balance = 0; + return start2; + function start2(code) { + return code === 60 ? (effects.enter(type), effects.enter(literalType), effects.enter(literalMarkerType), effects.consume(code), effects.exit(literalMarkerType), enclosedBefore) : code === null || code === 32 || code === 41 || asciiControl(code) ? nok(code) : (effects.enter(type), effects.enter(rawType), effects.enter(stringType), effects.enter("chunkString", { + contentType: "string" + }), raw(code)); + } + function enclosedBefore(code) { + return code === 62 ? (effects.enter(literalMarkerType), effects.consume(code), effects.exit(literalMarkerType), effects.exit(literalType), effects.exit(type), ok2) : (effects.enter(stringType), effects.enter("chunkString", { + contentType: "string" + }), enclosed(code)); + } + function enclosed(code) { + return code === 62 ? (effects.exit("chunkString"), effects.exit(stringType), enclosedBefore(code)) : code === null || code === 60 || markdownLineEnding(code) ? nok(code) : (effects.consume(code), code === 92 ? enclosedEscape : enclosed); + } + function enclosedEscape(code) { + return code === 60 || code === 62 || code === 92 ? (effects.consume(code), enclosed) : enclosed(code); + } + function raw(code) { + return !balance && (code === null || code === 41 || markdownLineEndingOrSpace(code)) ? (effects.exit("chunkString"), effects.exit(stringType), effects.exit(rawType), effects.exit(type), ok2(code)) : balance < limit && code === 40 ? (effects.consume(code), balance++, raw) : code === 41 ? (effects.consume(code), balance--, raw) : code === null || code === 32 || code === 40 || asciiControl(code) ? nok(code) : (effects.consume(code), code === 92 ? rawEscape : raw); + } + function rawEscape(code) { + return code === 40 || code === 41 || code === 92 ? (effects.consume(code), raw) : raw(code); + } +} + +// ../../node_modules/micromark-factory-label/index.js +function factoryLabel(effects, ok2, nok, type, markerType, stringType) { + let self2 = this, size = 0, seen; + return start2; + function start2(code) { + return effects.enter(type), effects.enter(markerType), effects.consume(code), effects.exit(markerType), effects.enter(stringType), atBreak; + } + function atBreak(code) { + return size > 999 || code === null || code === 91 || code === 93 && !seen || // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + code === 94 && !size && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code) : code === 93 ? (effects.exit(stringType), effects.enter(markerType), effects.consume(code), effects.exit(markerType), effects.exit(type), ok2) : markdownLineEnding(code) ? (effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), atBreak) : (effects.enter("chunkString", { + contentType: "string" + }), labelInside(code)); + } + function labelInside(code) { + return code === null || code === 91 || code === 93 || markdownLineEnding(code) || size++ > 999 ? (effects.exit("chunkString"), atBreak(code)) : (effects.consume(code), seen || (seen = !markdownSpace(code)), code === 92 ? labelEscape : labelInside); + } + function labelEscape(code) { + return code === 91 || code === 92 || code === 93 ? (effects.consume(code), size++, labelInside) : labelInside(code); + } +} + +// ../../node_modules/micromark-factory-title/index.js +function factoryTitle(effects, ok2, nok, type, markerType, stringType) { + let marker; + return start2; + function start2(code) { + return code === 34 || code === 39 || code === 40 ? (effects.enter(type), effects.enter(markerType), effects.consume(code), effects.exit(markerType), marker = code === 40 ? 41 : code, begin) : nok(code); + } + function begin(code) { + return code === marker ? (effects.enter(markerType), effects.consume(code), effects.exit(markerType), effects.exit(type), ok2) : (effects.enter(stringType), atBreak(code)); + } + function atBreak(code) { + return code === marker ? (effects.exit(stringType), begin(marker)) : code === null ? nok(code) : markdownLineEnding(code) ? (effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), factorySpace(effects, atBreak, "linePrefix")) : (effects.enter("chunkString", { + contentType: "string" + }), inside(code)); + } + function inside(code) { + return code === marker || code === null || markdownLineEnding(code) ? (effects.exit("chunkString"), atBreak(code)) : (effects.consume(code), code === 92 ? escape : inside); + } + function escape(code) { + return code === marker || code === 92 ? (effects.consume(code), inside) : inside(code); + } +} + +// ../../node_modules/micromark-factory-whitespace/index.js +function factoryWhitespace(effects, ok2) { + let seen; + return start2; + function start2(code) { + return markdownLineEnding(code) ? (effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), seen = !0, start2) : markdownSpace(code) ? factorySpace( + effects, + start2, + seen ? "linePrefix" : "lineSuffix" + )(code) : ok2(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/definition.js +var definition = { + name: "definition", + tokenize: tokenizeDefinition +}, titleBefore = { + tokenize: tokenizeTitleBefore, + partial: !0 +}; +function tokenizeDefinition(effects, ok2, nok) { + let self2 = this, identifier; + return start2; + function start2(code) { + return effects.enter("definition"), before(code); + } + function before(code) { + return factoryLabel.call( + self2, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + "definitionLabel", + "definitionLabelMarker", + "definitionLabelString" + )(code); + } + function labelAfter(code) { + return identifier = normalizeIdentifier( + self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1) + ), code === 58 ? (effects.enter("definitionMarker"), effects.consume(code), effects.exit("definitionMarker"), markerAfter) : nok(code); + } + function markerAfter(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code); + } + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + "definitionDestination", + "definitionDestinationLiteral", + "definitionDestinationLiteralMarker", + "definitionDestinationRaw", + "definitionDestinationString" + )(code); + } + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code); + } + function after(code) { + return markdownSpace(code) ? factorySpace(effects, afterWhitespace, "whitespace")(code) : afterWhitespace(code); + } + function afterWhitespace(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("definition"), self2.parser.defined.push(identifier), ok2(code)) : nok(code); + } +} +function tokenizeTitleBefore(effects, ok2, nok) { + return titleBefore2; + function titleBefore2(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, beforeMarker)(code) : nok(code); + } + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + "definitionTitle", + "definitionTitleMarker", + "definitionTitleString" + )(code); + } + function titleAfter(code) { + return markdownSpace(code) ? factorySpace(effects, titleAfterOptionalWhitespace, "whitespace")(code) : titleAfterOptionalWhitespace(code); + } + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok2(code) : nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/hard-break-escape.js +var hardBreakEscape = { + name: "hardBreakEscape", + tokenize: tokenizeHardBreakEscape +}; +function tokenizeHardBreakEscape(effects, ok2, nok) { + return start2; + function start2(code) { + return effects.enter("hardBreakEscape"), effects.consume(code), after; + } + function after(code) { + return markdownLineEnding(code) ? (effects.exit("hardBreakEscape"), ok2(code)) : nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/heading-atx.js +var headingAtx = { + name: "headingAtx", + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +}; +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2, contentStart = 3, content3, text3; + return events[contentStart][1].type === "whitespace" && (contentStart += 2), contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace" && (contentEnd -= 2), events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace") && (contentEnd -= contentStart + 1 === contentEnd ? 2 : 4), contentEnd > contentStart && (content3 = { + type: "atxHeadingText", + start: events[contentStart][1].start, + end: events[contentEnd][1].end + }, text3 = { + type: "chunkText", + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: "text" + }, splice(events, contentStart, contentEnd - contentStart + 1, [ + ["enter", content3, context], + ["enter", text3, context], + ["exit", text3, context], + ["exit", content3, context] + ])), events; +} +function tokenizeHeadingAtx(effects, ok2, nok) { + let size = 0; + return start2; + function start2(code) { + return effects.enter("atxHeading"), before(code); + } + function before(code) { + return effects.enter("atxHeadingSequence"), sequenceOpen(code); + } + function sequenceOpen(code) { + return code === 35 && size++ < 6 ? (effects.consume(code), sequenceOpen) : code === null || markdownLineEndingOrSpace(code) ? (effects.exit("atxHeadingSequence"), atBreak(code)) : nok(code); + } + function atBreak(code) { + return code === 35 ? (effects.enter("atxHeadingSequence"), sequenceFurther(code)) : code === null || markdownLineEnding(code) ? (effects.exit("atxHeading"), ok2(code)) : markdownSpace(code) ? factorySpace(effects, atBreak, "whitespace")(code) : (effects.enter("atxHeadingText"), data2(code)); + } + function sequenceFurther(code) { + return code === 35 ? (effects.consume(code), sequenceFurther) : (effects.exit("atxHeadingSequence"), atBreak(code)); + } + function data2(code) { + return code === null || code === 35 || markdownLineEndingOrSpace(code) ? (effects.exit("atxHeadingText"), atBreak(code)) : (effects.consume(code), data2); + } +} + +// ../../node_modules/micromark-util-html-tag-name/index.js +var htmlBlockNames = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "search", + "section", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" +], htmlRawNames = ["pre", "script", "style", "textarea"]; + +// ../../node_modules/micromark-core-commonmark/lib/html-flow.js +var htmlFlow = { + name: "htmlFlow", + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: !0 +}, blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: !0 +}, nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: !0 +}; +function resolveToHtmlFlow(events) { + let index2 = events.length; + for (; index2-- && !(events[index2][0] === "enter" && events[index2][1].type === "htmlFlow"); ) + ; + return index2 > 1 && events[index2 - 2][1].type === "linePrefix" && (events[index2][1].start = events[index2 - 2][1].start, events[index2 + 1][1].start = events[index2 - 2][1].start, events.splice(index2 - 2, 2)), events; +} +function tokenizeHtmlFlow(effects, ok2, nok) { + let self2 = this, marker, closingTag, buffer, index2, markerB; + return start2; + function start2(code) { + return before(code); + } + function before(code) { + return effects.enter("htmlFlow"), effects.enter("htmlFlowData"), effects.consume(code), open3; + } + function open3(code) { + return code === 33 ? (effects.consume(code), declarationOpen) : code === 47 ? (effects.consume(code), closingTag = !0, tagCloseStart) : code === 63 ? (effects.consume(code), marker = 3, self2.interrupt ? ok2 : continuationDeclarationInside) : asciiAlpha(code) ? (effects.consume(code), buffer = String.fromCharCode(code), tagName) : nok(code); + } + function declarationOpen(code) { + return code === 45 ? (effects.consume(code), marker = 2, commentOpenInside) : code === 91 ? (effects.consume(code), marker = 5, index2 = 0, cdataOpenInside) : asciiAlpha(code) ? (effects.consume(code), marker = 4, self2.interrupt ? ok2 : continuationDeclarationInside) : nok(code); + } + function commentOpenInside(code) { + return code === 45 ? (effects.consume(code), self2.interrupt ? ok2 : continuationDeclarationInside) : nok(code); + } + function cdataOpenInside(code) { + let value = "CDATA["; + return code === value.charCodeAt(index2++) ? (effects.consume(code), index2 === value.length ? self2.interrupt ? ok2 : continuation : cdataOpenInside) : nok(code); + } + function tagCloseStart(code) { + return asciiAlpha(code) ? (effects.consume(code), buffer = String.fromCharCode(code), tagName) : nok(code); + } + function tagName(code) { + if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + let slash2 = code === 47, name2 = buffer.toLowerCase(); + return !slash2 && !closingTag && htmlRawNames.includes(name2) ? (marker = 1, self2.interrupt ? ok2(code) : continuation(code)) : htmlBlockNames.includes(buffer.toLowerCase()) ? (marker = 6, slash2 ? (effects.consume(code), basicSelfClosing) : self2.interrupt ? ok2(code) : continuation(code)) : (marker = 7, self2.interrupt && !self2.parser.lazy[self2.now().line] ? nok(code) : closingTag ? completeClosingTagAfter(code) : completeAttributeNameBefore(code)); + } + return code === 45 || asciiAlphanumeric(code) ? (effects.consume(code), buffer += String.fromCharCode(code), tagName) : nok(code); + } + function basicSelfClosing(code) { + return code === 62 ? (effects.consume(code), self2.interrupt ? ok2 : continuation) : nok(code); + } + function completeClosingTagAfter(code) { + return markdownSpace(code) ? (effects.consume(code), completeClosingTagAfter) : completeEnd(code); + } + function completeAttributeNameBefore(code) { + return code === 47 ? (effects.consume(code), completeEnd) : code === 58 || code === 95 || asciiAlpha(code) ? (effects.consume(code), completeAttributeName) : markdownSpace(code) ? (effects.consume(code), completeAttributeNameBefore) : completeEnd(code); + } + function completeAttributeName(code) { + return code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code) ? (effects.consume(code), completeAttributeName) : completeAttributeNameAfter(code); + } + function completeAttributeNameAfter(code) { + return code === 61 ? (effects.consume(code), completeAttributeValueBefore) : markdownSpace(code) ? (effects.consume(code), completeAttributeNameAfter) : completeAttributeNameBefore(code); + } + function completeAttributeValueBefore(code) { + return code === null || code === 60 || code === 61 || code === 62 || code === 96 ? nok(code) : code === 34 || code === 39 ? (effects.consume(code), markerB = code, completeAttributeValueQuoted) : markdownSpace(code) ? (effects.consume(code), completeAttributeValueBefore) : completeAttributeValueUnquoted(code); + } + function completeAttributeValueQuoted(code) { + return code === markerB ? (effects.consume(code), markerB = null, completeAttributeValueQuotedAfter) : code === null || markdownLineEnding(code) ? nok(code) : (effects.consume(code), completeAttributeValueQuoted); + } + function completeAttributeValueUnquoted(code) { + return code === null || code === 34 || code === 39 || code === 47 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace(code) ? completeAttributeNameAfter(code) : (effects.consume(code), completeAttributeValueUnquoted); + } + function completeAttributeValueQuotedAfter(code) { + return code === 47 || code === 62 || markdownSpace(code) ? completeAttributeNameBefore(code) : nok(code); + } + function completeEnd(code) { + return code === 62 ? (effects.consume(code), completeAfter) : nok(code); + } + function completeAfter(code) { + return code === null || markdownLineEnding(code) ? continuation(code) : markdownSpace(code) ? (effects.consume(code), completeAfter) : nok(code); + } + function continuation(code) { + return code === 45 && marker === 2 ? (effects.consume(code), continuationCommentInside) : code === 60 && marker === 1 ? (effects.consume(code), continuationRawTagOpen) : code === 62 && marker === 4 ? (effects.consume(code), continuationClose) : code === 63 && marker === 3 ? (effects.consume(code), continuationDeclarationInside) : code === 93 && marker === 5 ? (effects.consume(code), continuationCdataInside) : markdownLineEnding(code) && (marker === 6 || marker === 7) ? (effects.exit("htmlFlowData"), effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code)) : code === null || markdownLineEnding(code) ? (effects.exit("htmlFlowData"), continuationStart(code)) : (effects.consume(code), continuation); + } + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code); + } + function continuationStartNonLazy(code) { + return effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), continuationBefore; + } + function continuationBefore(code) { + return code === null || markdownLineEnding(code) ? continuationStart(code) : (effects.enter("htmlFlowData"), continuation(code)); + } + function continuationCommentInside(code) { + return code === 45 ? (effects.consume(code), continuationDeclarationInside) : continuation(code); + } + function continuationRawTagOpen(code) { + return code === 47 ? (effects.consume(code), buffer = "", continuationRawEndTag) : continuation(code); + } + function continuationRawEndTag(code) { + if (code === 62) { + let name2 = buffer.toLowerCase(); + return htmlRawNames.includes(name2) ? (effects.consume(code), continuationClose) : continuation(code); + } + return asciiAlpha(code) && buffer.length < 8 ? (effects.consume(code), buffer += String.fromCharCode(code), continuationRawEndTag) : continuation(code); + } + function continuationCdataInside(code) { + return code === 93 ? (effects.consume(code), continuationDeclarationInside) : continuation(code); + } + function continuationDeclarationInside(code) { + return code === 62 ? (effects.consume(code), continuationClose) : code === 45 && marker === 2 ? (effects.consume(code), continuationDeclarationInside) : continuation(code); + } + function continuationClose(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("htmlFlowData"), continuationAfter(code)) : (effects.consume(code), continuationClose); + } + function continuationAfter(code) { + return effects.exit("htmlFlow"), ok2(code); + } +} +function tokenizeNonLazyContinuationStart(effects, ok2, nok) { + let self2 = this; + return start2; + function start2(code) { + return markdownLineEnding(code) ? (effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), after) : nok(code); + } + function after(code) { + return self2.parser.lazy[self2.now().line] ? nok(code) : ok2(code); + } +} +function tokenizeBlankLineBefore(effects, ok2, nok) { + return start2; + function start2(code) { + return effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), effects.attempt(blankLine, ok2, nok); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/html-text.js +var htmlText = { + name: "htmlText", + tokenize: tokenizeHtmlText +}; +function tokenizeHtmlText(effects, ok2, nok) { + let self2 = this, marker, index2, returnState; + return start2; + function start2(code) { + return effects.enter("htmlText"), effects.enter("htmlTextData"), effects.consume(code), open3; + } + function open3(code) { + return code === 33 ? (effects.consume(code), declarationOpen) : code === 47 ? (effects.consume(code), tagCloseStart) : code === 63 ? (effects.consume(code), instruction) : asciiAlpha(code) ? (effects.consume(code), tagOpen) : nok(code); + } + function declarationOpen(code) { + return code === 45 ? (effects.consume(code), commentOpenInside) : code === 91 ? (effects.consume(code), index2 = 0, cdataOpenInside) : asciiAlpha(code) ? (effects.consume(code), declaration) : nok(code); + } + function commentOpenInside(code) { + return code === 45 ? (effects.consume(code), commentEnd) : nok(code); + } + function comment(code) { + return code === null ? nok(code) : code === 45 ? (effects.consume(code), commentClose) : markdownLineEnding(code) ? (returnState = comment, lineEndingBefore(code)) : (effects.consume(code), comment); + } + function commentClose(code) { + return code === 45 ? (effects.consume(code), commentEnd) : comment(code); + } + function commentEnd(code) { + return code === 62 ? end(code) : code === 45 ? commentClose(code) : comment(code); + } + function cdataOpenInside(code) { + let value = "CDATA["; + return code === value.charCodeAt(index2++) ? (effects.consume(code), index2 === value.length ? cdata : cdataOpenInside) : nok(code); + } + function cdata(code) { + return code === null ? nok(code) : code === 93 ? (effects.consume(code), cdataClose) : markdownLineEnding(code) ? (returnState = cdata, lineEndingBefore(code)) : (effects.consume(code), cdata); + } + function cdataClose(code) { + return code === 93 ? (effects.consume(code), cdataEnd) : cdata(code); + } + function cdataEnd(code) { + return code === 62 ? end(code) : code === 93 ? (effects.consume(code), cdataEnd) : cdata(code); + } + function declaration(code) { + return code === null || code === 62 ? end(code) : markdownLineEnding(code) ? (returnState = declaration, lineEndingBefore(code)) : (effects.consume(code), declaration); + } + function instruction(code) { + return code === null ? nok(code) : code === 63 ? (effects.consume(code), instructionClose) : markdownLineEnding(code) ? (returnState = instruction, lineEndingBefore(code)) : (effects.consume(code), instruction); + } + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code); + } + function tagCloseStart(code) { + return asciiAlpha(code) ? (effects.consume(code), tagClose) : nok(code); + } + function tagClose(code) { + return code === 45 || asciiAlphanumeric(code) ? (effects.consume(code), tagClose) : tagCloseBetween(code); + } + function tagCloseBetween(code) { + return markdownLineEnding(code) ? (returnState = tagCloseBetween, lineEndingBefore(code)) : markdownSpace(code) ? (effects.consume(code), tagCloseBetween) : end(code); + } + function tagOpen(code) { + return code === 45 || asciiAlphanumeric(code) ? (effects.consume(code), tagOpen) : code === 47 || code === 62 || markdownLineEndingOrSpace(code) ? tagOpenBetween(code) : nok(code); + } + function tagOpenBetween(code) { + return code === 47 ? (effects.consume(code), end) : code === 58 || code === 95 || asciiAlpha(code) ? (effects.consume(code), tagOpenAttributeName) : markdownLineEnding(code) ? (returnState = tagOpenBetween, lineEndingBefore(code)) : markdownSpace(code) ? (effects.consume(code), tagOpenBetween) : end(code); + } + function tagOpenAttributeName(code) { + return code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code) ? (effects.consume(code), tagOpenAttributeName) : tagOpenAttributeNameAfter(code); + } + function tagOpenAttributeNameAfter(code) { + return code === 61 ? (effects.consume(code), tagOpenAttributeValueBefore) : markdownLineEnding(code) ? (returnState = tagOpenAttributeNameAfter, lineEndingBefore(code)) : markdownSpace(code) ? (effects.consume(code), tagOpenAttributeNameAfter) : tagOpenBetween(code); + } + function tagOpenAttributeValueBefore(code) { + return code === null || code === 60 || code === 61 || code === 62 || code === 96 ? nok(code) : code === 34 || code === 39 ? (effects.consume(code), marker = code, tagOpenAttributeValueQuoted) : markdownLineEnding(code) ? (returnState = tagOpenAttributeValueBefore, lineEndingBefore(code)) : markdownSpace(code) ? (effects.consume(code), tagOpenAttributeValueBefore) : (effects.consume(code), tagOpenAttributeValueUnquoted); + } + function tagOpenAttributeValueQuoted(code) { + return code === marker ? (effects.consume(code), marker = void 0, tagOpenAttributeValueQuotedAfter) : code === null ? nok(code) : markdownLineEnding(code) ? (returnState = tagOpenAttributeValueQuoted, lineEndingBefore(code)) : (effects.consume(code), tagOpenAttributeValueQuoted); + } + function tagOpenAttributeValueUnquoted(code) { + return code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96 ? nok(code) : code === 47 || code === 62 || markdownLineEndingOrSpace(code) ? tagOpenBetween(code) : (effects.consume(code), tagOpenAttributeValueUnquoted); + } + function tagOpenAttributeValueQuotedAfter(code) { + return code === 47 || code === 62 || markdownLineEndingOrSpace(code) ? tagOpenBetween(code) : nok(code); + } + function end(code) { + return code === 62 ? (effects.consume(code), effects.exit("htmlTextData"), effects.exit("htmlText"), ok2) : nok(code); + } + function lineEndingBefore(code) { + return effects.exit("htmlTextData"), effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), lineEndingAfter; + } + function lineEndingAfter(code) { + return markdownSpace(code) ? factorySpace( + effects, + lineEndingAfterPrefix, + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code) : lineEndingAfterPrefix(code); + } + function lineEndingAfterPrefix(code) { + return effects.enter("htmlTextData"), returnState(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/label-end.js +var labelEnd = { + name: "labelEnd", + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +}, resourceConstruct = { + tokenize: tokenizeResource +}, referenceFullConstruct = { + tokenize: tokenizeReferenceFull +}, referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +}; +function resolveAllLabelEnd(events) { + let index2 = -1; + for (; ++index2 < events.length; ) { + let token = events[index2][1]; + (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") && (events.splice(index2 + 1, token.type === "labelImage" ? 4 : 2), token.type = "data", index2++); + } + return events; +} +function resolveToLabelEnd(events, context) { + let index2 = events.length, offset2 = 0, token, open3, close, media; + for (; index2--; ) + if (token = events[index2][1], open3) { + if (token.type === "link" || token.type === "labelLink" && token._inactive) + break; + events[index2][0] === "enter" && token.type === "labelLink" && (token._inactive = !0); + } else if (close) { + if (events[index2][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced && (open3 = index2, token.type !== "labelLink")) { + offset2 = 2; + break; + } + } else token.type === "labelEnd" && (close = index2); + let group = { + type: events[open3][1].type === "labelLink" ? "link" : "image", + start: Object.assign({}, events[open3][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }, label = { + type: "label", + start: Object.assign({}, events[open3][1].start), + end: Object.assign({}, events[close][1].end) + }, text3 = { + type: "labelText", + start: Object.assign({}, events[open3 + offset2 + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + }; + return media = [ + ["enter", group, context], + ["enter", label, context] + ], media = push(media, events.slice(open3 + 1, open3 + offset2 + 3)), media = push(media, [["enter", text3, context]]), media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open3 + offset2 + 4, close - 3), + context + ) + ), media = push(media, [ + ["exit", text3, context], + events[close - 2], + events[close - 1], + ["exit", label, context] + ]), media = push(media, events.slice(close + 1)), media = push(media, [["exit", group, context]]), splice(events, open3, events.length, media), events; +} +function tokenizeLabelEnd(effects, ok2, nok) { + let self2 = this, index2 = self2.events.length, labelStart, defined; + for (; index2--; ) + if ((self2.events[index2][1].type === "labelImage" || self2.events[index2][1].type === "labelLink") && !self2.events[index2][1]._balanced) { + labelStart = self2.events[index2][1]; + break; + } + return start2; + function start2(code) { + return labelStart ? labelStart._inactive ? labelEndNok(code) : (defined = self2.parser.defined.includes( + normalizeIdentifier( + self2.sliceSerialize({ + start: labelStart.end, + end: self2.now() + }) + ) + ), effects.enter("labelEnd"), effects.enter("labelMarker"), effects.consume(code), effects.exit("labelMarker"), effects.exit("labelEnd"), after) : nok(code); + } + function after(code) { + return code === 40 ? effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) : code === 91 ? effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) : defined ? labelEndOk(code) : labelEndNok(code); + } + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code); + } + function labelEndOk(code) { + return ok2(code); + } + function labelEndNok(code) { + return labelStart._balanced = !0, nok(code); + } +} +function tokenizeResource(effects, ok2, nok) { + return resourceStart; + function resourceStart(code) { + return effects.enter("resource"), effects.enter("resourceMarker"), effects.consume(code), effects.exit("resourceMarker"), resourceBefore; + } + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code); + } + function resourceOpen(code) { + return code === 41 ? resourceEnd(code) : factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + "resourceDestination", + "resourceDestinationLiteral", + "resourceDestinationLiteralMarker", + "resourceDestinationRaw", + "resourceDestinationString", + 32 + )(code); + } + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code); + } + function resourceDestinationMissing(code) { + return nok(code); + } + function resourceBetween(code) { + return code === 34 || code === 39 || code === 40 ? factoryTitle( + effects, + resourceTitleAfter, + nok, + "resourceTitle", + "resourceTitleMarker", + "resourceTitleString" + )(code) : resourceEnd(code); + } + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code); + } + function resourceEnd(code) { + return code === 41 ? (effects.enter("resourceMarker"), effects.consume(code), effects.exit("resourceMarker"), effects.exit("resource"), ok2) : nok(code); + } +} +function tokenizeReferenceFull(effects, ok2, nok) { + let self2 = this; + return referenceFull; + function referenceFull(code) { + return factoryLabel.call( + self2, + effects, + referenceFullAfter, + referenceFullMissing, + "reference", + "referenceMarker", + "referenceString" + )(code); + } + function referenceFullAfter(code) { + return self2.parser.defined.includes( + normalizeIdentifier( + self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1) + ) + ) ? ok2(code) : nok(code); + } + function referenceFullMissing(code) { + return nok(code); + } +} +function tokenizeReferenceCollapsed(effects, ok2, nok) { + return referenceCollapsedStart; + function referenceCollapsedStart(code) { + return effects.enter("reference"), effects.enter("referenceMarker"), effects.consume(code), effects.exit("referenceMarker"), referenceCollapsedOpen; + } + function referenceCollapsedOpen(code) { + return code === 93 ? (effects.enter("referenceMarker"), effects.consume(code), effects.exit("referenceMarker"), effects.exit("reference"), ok2) : nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/label-start-image.js +var labelStartImage = { + name: "labelStartImage", + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +}; +function tokenizeLabelStartImage(effects, ok2, nok) { + let self2 = this; + return start2; + function start2(code) { + return effects.enter("labelImage"), effects.enter("labelImageMarker"), effects.consume(code), effects.exit("labelImageMarker"), open3; + } + function open3(code) { + return code === 91 ? (effects.enter("labelMarker"), effects.consume(code), effects.exit("labelMarker"), effects.exit("labelImage"), after) : nok(code); + } + function after(code) { + return code === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code) : ok2(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/label-start-link.js +var labelStartLink = { + name: "labelStartLink", + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +}; +function tokenizeLabelStartLink(effects, ok2, nok) { + let self2 = this; + return start2; + function start2(code) { + return effects.enter("labelLink"), effects.enter("labelMarker"), effects.consume(code), effects.exit("labelMarker"), effects.exit("labelLink"), after; + } + function after(code) { + return code === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code) : ok2(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/line-ending.js +var lineEnding = { + name: "lineEnding", + tokenize: tokenizeLineEnding +}; +function tokenizeLineEnding(effects, ok2) { + return start2; + function start2(code) { + return effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), factorySpace(effects, ok2, "linePrefix"); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/thematic-break.js +var thematicBreak = { + name: "thematicBreak", + tokenize: tokenizeThematicBreak +}; +function tokenizeThematicBreak(effects, ok2, nok) { + let size = 0, marker; + return start2; + function start2(code) { + return effects.enter("thematicBreak"), before(code); + } + function before(code) { + return marker = code, atBreak(code); + } + function atBreak(code) { + return code === marker ? (effects.enter("thematicBreakSequence"), sequence(code)) : size >= 3 && (code === null || markdownLineEnding(code)) ? (effects.exit("thematicBreak"), ok2(code)) : nok(code); + } + function sequence(code) { + return code === marker ? (effects.consume(code), size++, sequence) : (effects.exit("thematicBreakSequence"), markdownSpace(code) ? factorySpace(effects, atBreak, "whitespace")(code) : atBreak(code)); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/list.js +var list2 = { + name: "list", + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +}, listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: !0 +}, indentConstruct = { + tokenize: tokenizeIndent, + partial: !0 +}; +function tokenizeListStart(effects, ok2, nok) { + let self2 = this, tail = self2.events[self2.events.length - 1], initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], !0).length : 0, size = 0; + return start2; + function start2(code) { + let kind = self2.containerState.type || (code === 42 || code === 43 || code === 45 ? "listUnordered" : "listOrdered"); + if (kind === "listUnordered" ? !self2.containerState.marker || code === self2.containerState.marker : asciiDigit(code)) { + if (self2.containerState.type || (self2.containerState.type = kind, effects.enter(kind, { + _container: !0 + })), kind === "listUnordered") + return effects.enter("listItemPrefix"), code === 42 || code === 45 ? effects.check(thematicBreak, nok, atMarker)(code) : atMarker(code); + if (!self2.interrupt || code === 49) + return effects.enter("listItemPrefix"), effects.enter("listItemValue"), inside(code); + } + return nok(code); + } + function inside(code) { + return asciiDigit(code) && ++size < 10 ? (effects.consume(code), inside) : (!self2.interrupt || size < 2) && (self2.containerState.marker ? code === self2.containerState.marker : code === 41 || code === 46) ? (effects.exit("listItemValue"), atMarker(code)) : nok(code); + } + function atMarker(code) { + return effects.enter("listItemMarker"), effects.consume(code), effects.exit("listItemMarker"), self2.containerState.marker = self2.containerState.marker || code, effects.check( + blankLine, + // Can’t be empty when interrupting. + self2.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ); + } + function onBlank(code) { + return self2.containerState.initialBlankLine = !0, initialSize++, endOfPrefix(code); + } + function otherPrefix(code) { + return markdownSpace(code) ? (effects.enter("listItemPrefixWhitespace"), effects.consume(code), effects.exit("listItemPrefixWhitespace"), endOfPrefix) : nok(code); + } + function endOfPrefix(code) { + return self2.containerState.size = initialSize + self2.sliceSerialize(effects.exit("listItemPrefix"), !0).length, ok2(code); + } +} +function tokenizeListContinuation(effects, ok2, nok) { + let self2 = this; + return self2.containerState._closeFlow = void 0, effects.check(blankLine, onBlank, notBlank); + function onBlank(code) { + return self2.containerState.furtherBlankLines = self2.containerState.furtherBlankLines || self2.containerState.initialBlankLine, factorySpace( + effects, + ok2, + "listItemIndent", + self2.containerState.size + 1 + )(code); + } + function notBlank(code) { + return self2.containerState.furtherBlankLines || !markdownSpace(code) ? (self2.containerState.furtherBlankLines = void 0, self2.containerState.initialBlankLine = void 0, notInCurrentItem(code)) : (self2.containerState.furtherBlankLines = void 0, self2.containerState.initialBlankLine = void 0, effects.attempt(indentConstruct, ok2, notInCurrentItem)(code)); + } + function notInCurrentItem(code) { + return self2.containerState._closeFlow = !0, self2.interrupt = void 0, factorySpace( + effects, + effects.attempt(list2, ok2, nok), + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code); + } +} +function tokenizeIndent(effects, ok2, nok) { + let self2 = this; + return factorySpace( + effects, + afterPrefix, + "listItemIndent", + self2.containerState.size + 1 + ); + function afterPrefix(code) { + let tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], !0).length === self2.containerState.size ? ok2(code) : nok(code); + } +} +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type); +} +function tokenizeListItemPrefixWhitespace(effects, ok2, nok) { + let self2 = this; + return factorySpace( + effects, + afterPrefix, + "listItemPrefixWhitespace", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5 + ); + function afterPrefix(code) { + let tail = self2.events[self2.events.length - 1]; + return !markdownSpace(code) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok2(code) : nok(code); + } +} + +// ../../node_modules/micromark-core-commonmark/lib/setext-underline.js +var setextUnderline = { + name: "setextUnderline", + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +}; +function resolveToSetextUnderline(events, context) { + let index2 = events.length, content3, text3, definition2; + for (; index2--; ) + if (events[index2][0] === "enter") { + if (events[index2][1].type === "content") { + content3 = index2; + break; + } + events[index2][1].type === "paragraph" && (text3 = index2); + } else + events[index2][1].type === "content" && events.splice(index2, 1), !definition2 && events[index2][1].type === "definition" && (definition2 = index2); + let heading = { + type: "setextHeading", + start: Object.assign({}, events[text3][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }; + return events[text3][1].type = "setextHeadingText", definition2 ? (events.splice(text3, 0, ["enter", heading, context]), events.splice(definition2 + 1, 0, ["exit", events[content3][1], context]), events[content3][1].end = Object.assign({}, events[definition2][1].end)) : events[content3][1] = heading, events.push(["exit", heading, context]), events; +} +function tokenizeSetextUnderline(effects, ok2, nok) { + let self2 = this, marker; + return start2; + function start2(code) { + let index2 = self2.events.length, paragraph; + for (; index2--; ) + if (self2.events[index2][1].type !== "lineEnding" && self2.events[index2][1].type !== "linePrefix" && self2.events[index2][1].type !== "content") { + paragraph = self2.events[index2][1].type === "paragraph"; + break; + } + return !self2.parser.lazy[self2.now().line] && (self2.interrupt || paragraph) ? (effects.enter("setextHeadingLine"), marker = code, before(code)) : nok(code); + } + function before(code) { + return effects.enter("setextHeadingLineSequence"), inside(code); + } + function inside(code) { + return code === marker ? (effects.consume(code), inside) : (effects.exit("setextHeadingLineSequence"), markdownSpace(code) ? factorySpace(effects, after, "lineSuffix")(code) : after(code)); + } + function after(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("setextHeadingLine"), ok2(code)) : nok(code); + } +} + +// ../../node_modules/micromark/lib/initialize/flow.js +var flow = { + tokenize: initializeFlow +}; +function initializeFlow(effects) { + let self2 = this, initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content2, afterConstruct) + ), + "linePrefix" + ) + ) + ); + return initial; + function atBlankEnding(code) { + if (code === null) { + effects.consume(code); + return; + } + return effects.enter("lineEndingBlank"), effects.consume(code), effects.exit("lineEndingBlank"), self2.currentConstruct = void 0, initial; + } + function afterConstruct(code) { + if (code === null) { + effects.consume(code); + return; + } + return effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), self2.currentConstruct = void 0, initial; + } +} + +// ../../node_modules/micromark/lib/initialize/text.js +var resolver = { + resolveAll: createResolver() +}, string = initializeFactory("string"), text = initializeFactory("text"); +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === "text" ? resolveAllLineSuffixes : void 0 + ) + }; + function initializeText(effects) { + let self2 = this, constructs2 = this.parser.constructs[field], text3 = effects.attempt(constructs2, start2, notText); + return start2; + function start2(code) { + return atBreak(code) ? text3(code) : notText(code); + } + function notText(code) { + if (code === null) { + effects.consume(code); + return; + } + return effects.enter("data"), effects.consume(code), data2; + } + function data2(code) { + return atBreak(code) ? (effects.exit("data"), text3(code)) : (effects.consume(code), data2); + } + function atBreak(code) { + if (code === null) + return !0; + let list3 = constructs2[code], index2 = -1; + if (list3) + for (; ++index2 < list3.length; ) { + let item = list3[index2]; + if (!item.previous || item.previous.call(self2, self2.previous)) + return !0; + } + return !1; + } + } +} +function createResolver(extraResolver) { + return resolveAllText; + function resolveAllText(events, context) { + let index2 = -1, enter; + for (; ++index2 <= events.length; ) + enter === void 0 ? events[index2] && events[index2][1].type === "data" && (enter = index2, index2++) : (!events[index2] || events[index2][1].type !== "data") && (index2 !== enter + 2 && (events[enter][1].end = events[index2 - 1][1].end, events.splice(enter + 2, index2 - enter - 2), index2 = enter + 2), enter = void 0); + return extraResolver ? extraResolver(events, context) : events; + } +} +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0; + for (; ++eventIndex <= events.length; ) + if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") { + let data2 = events[eventIndex - 1][1], chunks = context.sliceStream(data2), index2 = chunks.length, bufferIndex = -1, size = 0, tabs; + for (; index2--; ) { + let chunk = chunks[index2]; + if (typeof chunk == "string") { + for (bufferIndex = chunk.length; chunk.charCodeAt(bufferIndex - 1) === 32; ) + size++, bufferIndex--; + if (bufferIndex) break; + bufferIndex = -1; + } else if (chunk === -2) + tabs = !0, size++; + else if (chunk !== -1) { + index2++; + break; + } + } + if (size) { + let token = { + type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing", + start: { + line: data2.end.line, + column: data2.end.column - size, + offset: data2.end.offset - size, + _index: data2.start._index + index2, + _bufferIndex: index2 ? bufferIndex : data2.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data2.end) + }; + data2.end = Object.assign({}, token.start), data2.start.offset === data2.end.offset ? Object.assign(data2, token) : (events.splice( + eventIndex, + 0, + ["enter", token, context], + ["exit", token, context] + ), eventIndex += 2); + } + eventIndex++; + } + return events; +} + +// ../../node_modules/micromark/lib/create-tokenizer.js +function createTokenizer(parser, initialize, from) { + let point3 = Object.assign( + from ? Object.assign({}, from) : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ), columnStart = {}, resolveAllConstructs = [], chunks = [], stack = [], consumed = !0, effects = { + consume, + enter, + exit: exit2, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: !0 + }) + }, context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + }, state = initialize.tokenize.call(context, effects), expectedCode; + return initialize.resolveAll && resolveAllConstructs.push(initialize), context; + function write(slice) { + return chunks = push(chunks, slice), main(), chunks[chunks.length - 1] !== null ? [] : (addResult(initialize, 0), context.events = resolveAll(resolveAllConstructs, context.events, context), context.events); + } + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs); + } + function sliceStream(token) { + return sliceChunks(chunks, token); + } + function now() { + let { line, column, offset: offset2, _index, _bufferIndex } = point3; + return { + line, + column, + offset: offset2, + _index, + _bufferIndex + }; + } + function defineSkip(value) { + columnStart[value.line] = value.column, accountForPotentialSkip(); + } + function main() { + let chunkIndex; + for (; point3._index < chunks.length; ) { + let chunk = chunks[point3._index]; + if (typeof chunk == "string") + for (chunkIndex = point3._index, point3._bufferIndex < 0 && (point3._bufferIndex = 0); point3._index === chunkIndex && point3._bufferIndex < chunk.length; ) + go(chunk.charCodeAt(point3._bufferIndex)); + else + go(chunk); + } + } + function go(code) { + consumed = void 0, expectedCode = code, state = state(code); + } + function consume(code) { + markdownLineEnding(code) ? (point3.line++, point3.column = 1, point3.offset += code === -3 ? 2 : 1, accountForPotentialSkip()) : code !== -1 && (point3.column++, point3.offset++), point3._bufferIndex < 0 ? point3._index++ : (point3._bufferIndex++, point3._bufferIndex === chunks[point3._index].length && (point3._bufferIndex = -1, point3._index++)), context.previous = code, consumed = !0; + } + function enter(type, fields) { + let token = fields || {}; + return token.type = type, token.start = now(), context.events.push(["enter", token, context]), stack.push(token), token; + } + function exit2(type) { + let token = stack.pop(); + return token.end = now(), context.events.push(["exit", token, context]), token; + } + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from); + } + function onsuccessfulcheck(_, info) { + info.restore(); + } + function constructFactory(onreturn, fields) { + return hook; + function hook(constructs2, returnState, bogusState) { + let listOfConstructs, constructIndex, currentConstruct, info; + return Array.isArray(constructs2) ? handleListOfConstructs(constructs2) : "tokenize" in constructs2 ? ( + // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs2]) + ) : handleMapOfConstructs(constructs2); + function handleMapOfConstructs(map) { + return start2; + function start2(code) { + let def = code !== null && map[code], all2 = code !== null && map.null, list3 = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...Array.isArray(def) ? def : def ? [def] : [], + ...Array.isArray(all2) ? all2 : all2 ? [all2] : [] + ]; + return handleListOfConstructs(list3)(code); + } + } + function handleListOfConstructs(list3) { + return listOfConstructs = list3, constructIndex = 0, list3.length === 0 ? bogusState : handleConstruct(list3[constructIndex]); + } + function handleConstruct(construct) { + return start2; + function start2(code) { + return info = store(), currentConstruct = construct, construct.partial || (context.currentConstruct = construct), construct.name && context.parser.constructs.disable.null.includes(construct.name) ? nok(code) : construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok2, + nok + )(code); + } + } + function ok2(code) { + return consumed = !0, onreturn(currentConstruct, info), returnState; + } + function nok(code) { + return consumed = !0, info.restore(), ++constructIndex < listOfConstructs.length ? handleConstruct(listOfConstructs[constructIndex]) : bogusState; + } + } + } + function addResult(construct, from2) { + construct.resolveAll && !resolveAllConstructs.includes(construct) && resolveAllConstructs.push(construct), construct.resolve && splice( + context.events, + from2, + context.events.length - from2, + construct.resolve(context.events.slice(from2), context) + ), construct.resolveTo && (context.events = construct.resolveTo(context.events, context)); + } + function store() { + let startPoint = now(), startPrevious = context.previous, startCurrentConstruct = context.currentConstruct, startEventsIndex = context.events.length, startStack = Array.from(stack); + return { + restore, + from: startEventsIndex + }; + function restore() { + point3 = startPoint, context.previous = startPrevious, context.currentConstruct = startCurrentConstruct, context.events.length = startEventsIndex, stack = startStack, accountForPotentialSkip(); + } + } + function accountForPotentialSkip() { + point3.line in columnStart && point3.column < 2 && (point3.column = columnStart[point3.line], point3.offset += columnStart[point3.line] - 1); + } +} +function sliceChunks(chunks, token) { + let startIndex = token.start._index, startBufferIndex = token.start._bufferIndex, endIndex = token.end._index, endBufferIndex = token.end._bufferIndex, view; + if (startIndex === endIndex) + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]; + else { + if (view = chunks.slice(startIndex, endIndex), startBufferIndex > -1) { + let head = view[0]; + typeof head == "string" ? view[0] = head.slice(startBufferIndex) : view.shift(); + } + endBufferIndex > 0 && view.push(chunks[endIndex].slice(0, endBufferIndex)); + } + return view; +} +function serializeChunks(chunks, expandTabs) { + let index2 = -1, result = [], atTab; + for (; ++index2 < chunks.length; ) { + let chunk = chunks[index2], value; + if (typeof chunk == "string") + value = chunk; + else + switch (chunk) { + case -5: { + value = "\r"; + break; + } + case -4: { + value = ` +`; + break; + } + case -3: { + value = `\r +`; + break; + } + case -2: { + value = expandTabs ? " " : " "; + break; + } + case -1: { + if (!expandTabs && atTab) continue; + value = " "; + break; + } + default: + value = String.fromCharCode(chunk); + } + atTab = chunk === -2, result.push(value); + } + return result.join(""); +} + +// ../../node_modules/micromark/lib/constructs.js +var constructs_exports = {}; +__export(constructs_exports, { + attentionMarkers: () => attentionMarkers, + contentInitial: () => contentInitial, + disable: () => disable, + document: () => document4, + flow: () => flow2, + flowInitial: () => flowInitial, + insideSpan: () => insideSpan, + string: () => string2, + text: () => text2 +}); +var document4 = { + 42: list2, + 43: list2, + 45: list2, + 48: list2, + 49: list2, + 50: list2, + 51: list2, + 52: list2, + 53: list2, + 54: list2, + 55: list2, + 56: list2, + 57: list2, + 62: blockQuote +}, contentInitial = { + 91: definition +}, flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + 32: codeIndented +}, flow2 = { + 35: headingAtx, + 42: thematicBreak, + 45: [setextUnderline, thematicBreak], + 60: htmlFlow, + 61: setextUnderline, + 95: thematicBreak, + 96: codeFenced, + 126: codeFenced +}, string2 = { + 38: characterReference, + 92: characterEscape +}, text2 = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + 33: labelStartImage, + 38: characterReference, + 42: attention, + 60: [autolink, htmlText], + 91: labelStartLink, + 92: [hardBreakEscape, characterEscape], + 93: labelEnd, + 95: attention, + 96: codeText +}, insideSpan = { + null: [attention, resolver] +}, attentionMarkers = { + null: [42, 95] +}, disable = { + null: [] +}; + +// ../../node_modules/micromark/lib/parse.js +function parse10(options) { + let constructs2 = ( + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_exports, ...(options || {}).extensions || []]) + ), parser = { + defined: [], + lazy: {}, + constructs: constructs2, + content: create(content), + document: create(document3), + flow: create(flow), + string: create(string), + text: create(text) + }; + return parser; + function create(initial) { + return creator; + function creator(from) { + return createTokenizer(parser, initial, from); + } + } +} + +// ../../node_modules/micromark/lib/postprocess.js +function postprocess(events) { + for (; !subtokenize(events); ) + ; + return events; +} + +// ../../node_modules/micromark/lib/preprocess.js +var search = /[\0\t\n\r]/g; +function preprocess() { + let column = 1, buffer = "", start2 = !0, atCarriageReturn; + return preprocessor; + function preprocessor(value, encoding, end) { + let chunks = [], match, next, startPosition, endPosition, code; + for (value = buffer + (typeof value == "string" ? value.toString() : new TextDecoder(encoding || void 0).decode(value)), startPosition = 0, buffer = "", start2 && (value.charCodeAt(0) === 65279 && startPosition++, start2 = void 0); startPosition < value.length; ) { + if (search.lastIndex = startPosition, match = search.exec(value), endPosition = match && match.index !== void 0 ? match.index : value.length, code = value.charCodeAt(endPosition), !match) { + buffer = value.slice(startPosition); + break; + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) + chunks.push(-3), atCarriageReturn = void 0; + else + switch (atCarriageReturn && (chunks.push(-5), atCarriageReturn = void 0), startPosition < endPosition && (chunks.push(value.slice(startPosition, endPosition)), column += endPosition - startPosition), code) { + case 0: { + chunks.push(65533), column++; + break; + } + case 9: { + for (next = Math.ceil(column / 4) * 4, chunks.push(-2); column++ < next; ) chunks.push(-1); + break; + } + case 10: { + chunks.push(-4), column = 1; + break; + } + default: + atCarriageReturn = !0, column = 1; + } + startPosition = endPosition + 1; + } + return end && (atCarriageReturn && chunks.push(-5), buffer && chunks.push(buffer), chunks.push(null)), chunks; + } +} + +// ../../node_modules/micromark-util-decode-string/index.js +var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode); +} +function decode($0, $1, $2) { + if ($1) + return $1; + if ($2.charCodeAt(0) === 35) { + let head2 = $2.charCodeAt(1), hex = head2 === 120 || head2 === 88; + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10); + } + return decodeNamedCharacterReference($2) || $0; +} + +// ../../node_modules/unist-util-stringify-position/lib/index.js +function stringifyPosition(value) { + return !value || typeof value != "object" ? "" : "position" in value || "type" in value ? position(value.position) : "start" in value || "end" in value ? position(value) : "line" in value || "column" in value ? point(value) : ""; +} +function point(point3) { + return index(point3 && point3.line) + ":" + index(point3 && point3.column); +} +function position(pos) { + return point(pos && pos.start) + "-" + point(pos && pos.end); +} +function index(value) { + return value && typeof value == "number" ? value : 1; +} + +// ../../node_modules/mdast-util-from-markdown/lib/index.js +var own2 = {}.hasOwnProperty; +function fromMarkdown(value, encoding, options) { + return typeof encoding != "string" && (options = encoding, encoding = void 0), compiler(options)( + postprocess( + parse10(options).document().write(preprocess()(value, encoding, !0)) + ) + ); +} +function compiler(options) { + let config = { + transforms: [], + canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote2), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText2, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition2), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list3, onenterlistordered), + listUnordered: opener(list3), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak2) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + }; + configure(config, (options || {}).mdastExtensions || []); + let data2 = {}; + return compile2; + function compile2(events) { + let tree = { + type: "root", + children: [] + }, context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit: exit2, + buffer, + resume, + data: data2 + }, listStack = [], index2 = -1; + for (; ++index2 < events.length; ) + if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") + if (events[index2][0] === "enter") + listStack.push(index2); + else { + let tail = listStack.pop(); + index2 = prepareList(events, tail, index2); + } + for (index2 = -1; ++index2 < events.length; ) { + let handler = config[events[index2][0]]; + own2.call(handler, events[index2][1].type) && handler[events[index2][1].type].call( + Object.assign( + { + sliceSerialize: events[index2][2].sliceSerialize + }, + context + ), + events[index2][1] + ); + } + if (context.tokenStack.length > 0) { + let tail = context.tokenStack[context.tokenStack.length - 1]; + (tail[1] || defaultOnError).call(context, void 0, tail[0]); + } + for (tree.position = { + start: point2( + events.length > 0 ? events[0][1].start : { + line: 1, + column: 1, + offset: 0 + } + ), + end: point2( + events.length > 0 ? events[events.length - 2][1].end : { + line: 1, + column: 1, + offset: 0 + } + ) + }, index2 = -1; ++index2 < config.transforms.length; ) + tree = config.transforms[index2](tree) || tree; + return tree; + } + function prepareList(events, start2, length) { + let index2 = start2 - 1, containerBalance = -1, listSpread = !1, listItem2, lineIndex, firstBlankLineIndex, atMarker; + for (; ++index2 <= length; ) { + let event = events[index2]; + switch (event[1].type) { + case "listUnordered": + case "listOrdered": + case "blockQuote": { + event[0] === "enter" ? containerBalance++ : containerBalance--, atMarker = void 0; + break; + } + case "lineEndingBlank": { + event[0] === "enter" && (listItem2 && !atMarker && !containerBalance && !firstBlankLineIndex && (firstBlankLineIndex = index2), atMarker = void 0); + break; + } + case "linePrefix": + case "listItemValue": + case "listItemMarker": + case "listItemPrefix": + case "listItemPrefixWhitespace": + break; + default: + atMarker = void 0; + } + if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) { + if (listItem2) { + let tailIndex = index2; + for (lineIndex = void 0; tailIndex--; ) { + let tailEvent = events[tailIndex]; + if (tailEvent[1].type === "lineEnding" || tailEvent[1].type === "lineEndingBlank") { + if (tailEvent[0] === "exit") continue; + lineIndex && (events[lineIndex][1].type = "lineEndingBlank", listSpread = !0), tailEvent[1].type = "lineEnding", lineIndex = tailIndex; + } else if (!(tailEvent[1].type === "linePrefix" || tailEvent[1].type === "blockQuotePrefix" || tailEvent[1].type === "blockQuotePrefixWhitespace" || tailEvent[1].type === "blockQuoteMarker" || tailEvent[1].type === "listItemIndent")) + break; + } + firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex) && (listItem2._spread = !0), listItem2.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ), events.splice(lineIndex || index2, 0, ["exit", listItem2, event[2]]), index2++, length++; + } + if (event[1].type === "listItemPrefix") { + let item = { + type: "listItem", + _spread: !1, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: void 0 + }; + listItem2 = item, events.splice(index2, 0, ["enter", item, event[2]]), index2++, length++, firstBlankLineIndex = void 0, atMarker = !0; + } + } + } + return events[start2][1]._spread = listSpread, length; + } + function opener(create, and) { + return open3; + function open3(token) { + enter.call(this, create(token), token), and && and.call(this, token); + } + } + function buffer() { + this.stack.push({ + type: "fragment", + children: [] + }); + } + function enter(node2, token, errorHandler) { + this.stack[this.stack.length - 1].children.push(node2), this.stack.push(node2), this.tokenStack.push([token, errorHandler]), node2.position = { + start: point2(token.start), + // @ts-expect-error: `end` will be patched later. + end: void 0 + }; + } + function closer(and) { + return close; + function close(token) { + and && and.call(this, token), exit2.call(this, token); + } + } + function exit2(token, onExitError) { + let node2 = this.stack.pop(), open3 = this.tokenStack.pop(); + if (open3) + open3[0].type !== token.type && (onExitError ? onExitError.call(this, token, open3[0]) : (open3[1] || defaultOnError).call(this, token, open3[0])); + else throw new Error( + "Cannot close `" + token.type + "` (" + stringifyPosition({ + start: token.start, + end: token.end + }) + "): it\u2019s not open" + ); + node2.position.end = point2(token.end); + } + function resume() { + return toString2(this.stack.pop()); + } + function onenterlistordered() { + this.data.expectingFirstListItemValue = !0; + } + function onenterlistitemvalue(token) { + if (this.data.expectingFirstListItemValue) { + let ancestor = this.stack[this.stack.length - 2]; + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10), this.data.expectingFirstListItemValue = void 0; + } + } + function onexitcodefencedfenceinfo() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.lang = data3; + } + function onexitcodefencedfencemeta() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.meta = data3; + } + function onexitcodefencedfence() { + this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0); + } + function onexitcodefenced() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.value = data3.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0; + } + function onexitcodeindented() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.value = data3.replace(/(\r?\n|\r)$/g, ""); + } + function onexitdefinitionlabelstring(token) { + let label = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.label = label, node2.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase(); + } + function onexitdefinitiontitlestring() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.title = data3; + } + function onexitdefinitiondestinationstring() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.url = data3; + } + function onexitatxheadingsequence(token) { + let node2 = this.stack[this.stack.length - 1]; + if (!node2.depth) { + let depth = this.sliceSerialize(token).length; + node2.depth = depth; + } + } + function onexitsetextheadingtext() { + this.data.setextHeadingSlurpLineEnding = !0; + } + function onexitsetextheadinglinesequence(token) { + let node2 = this.stack[this.stack.length - 1]; + node2.depth = this.sliceSerialize(token).codePointAt(0) === 61 ? 1 : 2; + } + function onexitsetextheading() { + this.data.setextHeadingSlurpLineEnding = void 0; + } + function onenterdata(token) { + let siblings = this.stack[this.stack.length - 1].children, tail = siblings[siblings.length - 1]; + (!tail || tail.type !== "text") && (tail = text3(), tail.position = { + start: point2(token.start), + // @ts-expect-error: we’ll add `end` later. + end: void 0 + }, siblings.push(tail)), this.stack.push(tail); + } + function onexitdata(token) { + let tail = this.stack.pop(); + tail.value += this.sliceSerialize(token), tail.position.end = point2(token.end); + } + function onexitlineending(token) { + let context = this.stack[this.stack.length - 1]; + if (this.data.atHardBreak) { + let tail = context.children[context.children.length - 1]; + tail.position.end = point2(token.end), this.data.atHardBreak = void 0; + return; + } + !this.data.setextHeadingSlurpLineEnding && config.canContainEols.includes(context.type) && (onenterdata.call(this, token), onexitdata.call(this, token)); + } + function onexithardbreak() { + this.data.atHardBreak = !0; + } + function onexithtmlflow() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.value = data3; + } + function onexithtmltext() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.value = data3; + } + function onexitcodetext() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.value = data3; + } + function onexitlink() { + let node2 = this.stack[this.stack.length - 1]; + if (this.data.inReference) { + let referenceType = this.data.referenceType || "shortcut"; + node2.type += "Reference", node2.referenceType = referenceType, delete node2.url, delete node2.title; + } else + delete node2.identifier, delete node2.label; + this.data.referenceType = void 0; + } + function onexitimage() { + let node2 = this.stack[this.stack.length - 1]; + if (this.data.inReference) { + let referenceType = this.data.referenceType || "shortcut"; + node2.type += "Reference", node2.referenceType = referenceType, delete node2.url, delete node2.title; + } else + delete node2.identifier, delete node2.label; + this.data.referenceType = void 0; + } + function onexitlabeltext(token) { + let string3 = this.sliceSerialize(token), ancestor = this.stack[this.stack.length - 2]; + ancestor.label = decodeString(string3), ancestor.identifier = normalizeIdentifier(string3).toLowerCase(); + } + function onexitlabel() { + let fragment = this.stack[this.stack.length - 1], value = this.resume(), node2 = this.stack[this.stack.length - 1]; + if (this.data.inReference = !0, node2.type === "link") { + let children = fragment.children; + node2.children = children; + } else + node2.alt = value; + } + function onexitresourcedestinationstring() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.url = data3; + } + function onexitresourcetitlestring() { + let data3 = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.title = data3; + } + function onexitresource() { + this.data.inReference = void 0; + } + function onenterreference() { + this.data.referenceType = "collapsed"; + } + function onexitreferencestring(token) { + let label = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.label = label, node2.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase(), this.data.referenceType = "full"; + } + function onexitcharacterreferencemarker(token) { + this.data.characterReferenceType = token.type; + } + function onexitcharacterreferencevalue(token) { + let data3 = this.sliceSerialize(token), type = this.data.characterReferenceType, value; + type ? (value = decodeNumericCharacterReference( + data3, + type === "characterReferenceMarkerNumeric" ? 10 : 16 + ), this.data.characterReferenceType = void 0) : value = decodeNamedCharacterReference(data3); + let tail = this.stack.pop(); + tail.value += value, tail.position.end = point2(token.end); + } + function onexitautolinkprotocol(token) { + onexitdata.call(this, token); + let node2 = this.stack[this.stack.length - 1]; + node2.url = this.sliceSerialize(token); + } + function onexitautolinkemail(token) { + onexitdata.call(this, token); + let node2 = this.stack[this.stack.length - 1]; + node2.url = "mailto:" + this.sliceSerialize(token); + } + function blockQuote2() { + return { + type: "blockquote", + children: [] + }; + } + function codeFlow() { + return { + type: "code", + lang: null, + meta: null, + value: "" + }; + } + function codeText2() { + return { + type: "inlineCode", + value: "" + }; + } + function definition2() { + return { + type: "definition", + identifier: "", + label: null, + title: null, + url: "" + }; + } + function emphasis() { + return { + type: "emphasis", + children: [] + }; + } + function heading() { + return { + type: "heading", + // @ts-expect-error `depth` will be set later. + depth: 0, + children: [] + }; + } + function hardBreak() { + return { + type: "break" + }; + } + function html() { + return { + type: "html", + value: "" + }; + } + function image() { + return { + type: "image", + title: null, + url: "", + alt: null + }; + } + function link() { + return { + type: "link", + title: null, + url: "", + children: [] + }; + } + function list3(token) { + return { + type: "list", + ordered: token.type === "listOrdered", + start: null, + spread: token._spread, + children: [] + }; + } + function listItem(token) { + return { + type: "listItem", + spread: token._spread, + checked: null, + children: [] + }; + } + function paragraph() { + return { + type: "paragraph", + children: [] + }; + } + function strong() { + return { + type: "strong", + children: [] + }; + } + function text3() { + return { + type: "text", + value: "" + }; + } + function thematicBreak2() { + return { + type: "thematicBreak" + }; + } +} +function point2(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + }; +} +function configure(combined, extensions) { + let index2 = -1; + for (; ++index2 < extensions.length; ) { + let value = extensions[index2]; + Array.isArray(value) ? configure(combined, value) : extension(combined, value); + } +} +function extension(combined, extension2) { + let key2; + for (key2 in extension2) + if (own2.call(extension2, key2)) + switch (key2) { + case "canContainEols": { + let right = extension2[key2]; + right && combined[key2].push(...right); + break; + } + case "transforms": { + let right = extension2[key2]; + right && combined[key2].push(...right); + break; + } + case "enter": + case "exit": { + let right = extension2[key2]; + right && Object.assign(combined[key2], right); + break; + } + } +} +function defaultOnError(left, right) { + throw left ? new Error( + "Cannot close `" + left.type + "` (" + stringifyPosition({ + start: left.start, + end: left.end + }) + "): a different token (`" + right.type + "`, " + stringifyPosition({ + start: right.start, + end: right.end + }) + ") is open" + ) : new Error( + "Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({ + start: right.start, + end: right.end + }) + ") is still open" + ); +} + +// ../../node_modules/mdast-util-mdx-expression/lib/index.js +function mdxExpressionFromMarkdown() { + return { + enter: { + mdxFlowExpression: enterMdxFlowExpression, + mdxTextExpression: enterMdxTextExpression + }, + exit: { + mdxFlowExpression: exitMdxExpression, + mdxFlowExpressionChunk: exitMdxExpressionData, + mdxTextExpression: exitMdxExpression, + mdxTextExpressionChunk: exitMdxExpressionData + } + }; +} +function enterMdxFlowExpression(token) { + this.enter({ type: "mdxFlowExpression", value: "" }, token), this.buffer(); +} +function enterMdxTextExpression(token) { + this.enter({ type: "mdxTextExpression", value: "" }, token), this.buffer(); +} +function exitMdxExpression(token) { + let value = this.resume(), estree = token.estree, node2 = this.stack[this.stack.length - 1]; + node2.type === "mdxFlowExpression" || node2.type, this.exit(token), node2.value = value, estree && (node2.data = { estree }); +} +function exitMdxExpressionData(token) { + this.config.enter.data.call(this, token), this.config.exit.data.call(this, token); +} + +// ../../node_modules/character-entities-legacy/index.js +var characterEntitiesLegacy = [ + "AElig", + "AMP", + "Aacute", + "Acirc", + "Agrave", + "Aring", + "Atilde", + "Auml", + "COPY", + "Ccedil", + "ETH", + "Eacute", + "Ecirc", + "Egrave", + "Euml", + "GT", + "Iacute", + "Icirc", + "Igrave", + "Iuml", + "LT", + "Ntilde", + "Oacute", + "Ocirc", + "Ograve", + "Oslash", + "Otilde", + "Ouml", + "QUOT", + "REG", + "THORN", + "Uacute", + "Ucirc", + "Ugrave", + "Uuml", + "Yacute", + "aacute", + "acirc", + "acute", + "aelig", + "agrave", + "amp", + "aring", + "atilde", + "auml", + "brvbar", + "ccedil", + "cedil", + "cent", + "copy", + "curren", + "deg", + "divide", + "eacute", + "ecirc", + "egrave", + "eth", + "euml", + "frac12", + "frac14", + "frac34", + "gt", + "iacute", + "icirc", + "iexcl", + "igrave", + "iquest", + "iuml", + "laquo", + "lt", + "macr", + "micro", + "middot", + "nbsp", + "not", + "ntilde", + "oacute", + "ocirc", + "ograve", + "ordf", + "ordm", + "oslash", + "otilde", + "ouml", + "para", + "plusmn", + "pound", + "quot", + "raquo", + "reg", + "sect", + "shy", + "sup1", + "sup2", + "sup3", + "szlig", + "thorn", + "times", + "uacute", + "ucirc", + "ugrave", + "uml", + "uuml", + "yacute", + "yen", + "yuml" +]; + +// ../../node_modules/character-reference-invalid/index.js +var characterReferenceInvalid = { + 0: "\uFFFD", + 128: "\u20AC", + 130: "\u201A", + 131: "\u0192", + 132: "\u201E", + 133: "\u2026", + 134: "\u2020", + 135: "\u2021", + 136: "\u02C6", + 137: "\u2030", + 138: "\u0160", + 139: "\u2039", + 140: "\u0152", + 142: "\u017D", + 145: "\u2018", + 146: "\u2019", + 147: "\u201C", + 148: "\u201D", + 149: "\u2022", + 150: "\u2013", + 151: "\u2014", + 152: "\u02DC", + 153: "\u2122", + 154: "\u0161", + 155: "\u203A", + 156: "\u0153", + 158: "\u017E", + 159: "\u0178" +}; + +// ../../node_modules/is-decimal/index.js +function isDecimal(character) { + let code = typeof character == "string" ? character.charCodeAt(0) : character; + return code >= 48 && code <= 57; +} + +// ../../node_modules/is-hexadecimal/index.js +function isHexadecimal(character) { + let code = typeof character == "string" ? character.charCodeAt(0) : character; + return code >= 97 && code <= 102 || code >= 65 && code <= 70 || code >= 48 && code <= 57; +} + +// ../../node_modules/is-alphabetical/index.js +function isAlphabetical(character) { + let code = typeof character == "string" ? character.charCodeAt(0) : character; + return code >= 97 && code <= 122 || code >= 65 && code <= 90; +} + +// ../../node_modules/is-alphanumerical/index.js +function isAlphanumerical(character) { + return isAlphabetical(character) || isDecimal(character); +} + +// ../../node_modules/parse-entities/lib/index.js +var messages = [ + "", + /* 1: Non terminated (named) */ + "Named character references must be terminated by a semicolon", + /* 2: Non terminated (numeric) */ + "Numeric character references must be terminated by a semicolon", + /* 3: Empty (named) */ + "Named character references cannot be empty", + /* 4: Empty (numeric) */ + "Numeric character references cannot be empty", + /* 5: Unknown (named) */ + "Named character references must be known", + /* 6: Disallowed (numeric) */ + "Numeric character references cannot be disallowed", + /* 7: Prohibited (numeric) */ + "Numeric character references cannot be outside the permissible Unicode range" +]; +function parseEntities(value, options) { + let settings = options || {}, additional = typeof settings.additional == "string" ? settings.additional.charCodeAt(0) : settings.additional, result = [], index2 = 0, lines = -1, queue = "", point3, indent; + settings.position && ("start" in settings.position || "indent" in settings.position ? (indent = settings.position.indent, point3 = settings.position.start) : point3 = settings.position); + let line = (point3 ? point3.line : 0) || 1, column = (point3 ? point3.column : 0) || 1, previous2 = now(), character; + for (index2--; ++index2 <= value.length; ) + if (character === 10 && (column = (indent ? indent[lines] : 0) || 1), character = value.charCodeAt(index2), character === 38) { + let following = value.charCodeAt(index2 + 1); + if (following === 9 || following === 10 || following === 12 || following === 32 || following === 38 || following === 60 || Number.isNaN(following) || additional && following === additional) { + queue += String.fromCharCode(character), column++; + continue; + } + let start2 = index2 + 1, begin = start2, end = start2, type; + if (following === 35) { + end = ++begin; + let following2 = value.charCodeAt(end); + following2 === 88 || following2 === 120 ? (type = "hexadecimal", end = ++begin) : type = "decimal"; + } else + type = "named"; + let characterReferenceCharacters = "", characterReference2 = "", characters2 = "", test = type === "named" ? isAlphanumerical : type === "decimal" ? isDecimal : isHexadecimal; + for (end--; ++end <= value.length; ) { + let following2 = value.charCodeAt(end); + if (!test(following2)) + break; + characters2 += String.fromCharCode(following2), type === "named" && characterEntitiesLegacy.includes(characters2) && (characterReferenceCharacters = characters2, characterReference2 = decodeNamedCharacterReference(characters2)); + } + let terminated = value.charCodeAt(end) === 59; + if (terminated) { + end++; + let namedReference = type === "named" ? decodeNamedCharacterReference(characters2) : !1; + namedReference && (characterReferenceCharacters = characters2, characterReference2 = namedReference); + } + let diff = 1 + end - start2, reference = ""; + if (!(!terminated && settings.nonTerminated === !1)) + if (!characters2) + type !== "named" && warning(4, diff); + else if (type === "named") { + if (terminated && !characterReference2) + warning(5, 1); + else if (characterReferenceCharacters !== characters2 && (end = begin + characterReferenceCharacters.length, diff = 1 + end - begin, terminated = !1), !terminated) { + let reason = characterReferenceCharacters ? 1 : 3; + if (settings.attribute) { + let following2 = value.charCodeAt(end); + following2 === 61 ? (warning(reason, diff), characterReference2 = "") : isAlphanumerical(following2) ? characterReference2 = "" : warning(reason, diff); + } else + warning(reason, diff); + } + reference = characterReference2; + } else { + terminated || warning(2, diff); + let referenceCode = Number.parseInt( + characters2, + type === "hexadecimal" ? 16 : 10 + ); + if (prohibited(referenceCode)) + warning(7, diff), reference = "\uFFFD"; + else if (referenceCode in characterReferenceInvalid) + warning(6, diff), reference = characterReferenceInvalid[referenceCode]; + else { + let output = ""; + disallowed(referenceCode) && warning(6, diff), referenceCode > 65535 && (referenceCode -= 65536, output += String.fromCharCode( + referenceCode >>> 10 | 55296 + ), referenceCode = 56320 | referenceCode & 1023), reference = output + String.fromCharCode(referenceCode); + } + } + if (reference) { + flush(), previous2 = now(), index2 = end - 1, column += end - start2 + 1, result.push(reference); + let next = now(); + next.offset++, settings.reference && settings.reference.call( + settings.referenceContext || void 0, + reference, + { start: previous2, end: next }, + value.slice(start2 - 1, end) + ), previous2 = next; + } else + characters2 = value.slice(start2 - 1, end), queue += characters2, column += characters2.length, index2 = end - 1; + } else + character === 10 && (line++, lines++, column = 0), Number.isNaN(character) ? flush() : (queue += String.fromCharCode(character), column++); + return result.join(""); + function now() { + return { + line, + column, + offset: index2 + ((point3 ? point3.offset : 0) || 0) + }; + } + function warning(code, offset2) { + let position2; + settings.warning && (position2 = now(), position2.column += offset2, position2.offset += offset2, settings.warning.call( + settings.warningContext || void 0, + messages[code], + position2, + code + )); + } + function flush() { + queue && (result.push(queue), settings.text && settings.text.call(settings.textContext || void 0, queue, { + start: previous2, + end: now() + }), queue = ""); + } +} +function prohibited(code) { + return code >= 55296 && code <= 57343 || code > 1114111; +} +function disallowed(code) { + return code >= 1 && code <= 8 || code === 11 || code >= 13 && code <= 31 || code >= 127 && code <= 159 || code >= 64976 && code <= 65007 || (code & 65535) === 65535 || (code & 65535) === 65534; +} + +// ../../node_modules/character-entities-html4/index.js +var characterEntitiesHtml4 = { + nbsp: "\xA0", + iexcl: "\xA1", + cent: "\xA2", + pound: "\xA3", + curren: "\xA4", + yen: "\xA5", + brvbar: "\xA6", + sect: "\xA7", + uml: "\xA8", + copy: "\xA9", + ordf: "\xAA", + laquo: "\xAB", + not: "\xAC", + shy: "\xAD", + reg: "\xAE", + macr: "\xAF", + deg: "\xB0", + plusmn: "\xB1", + sup2: "\xB2", + sup3: "\xB3", + acute: "\xB4", + micro: "\xB5", + para: "\xB6", + middot: "\xB7", + cedil: "\xB8", + sup1: "\xB9", + ordm: "\xBA", + raquo: "\xBB", + frac14: "\xBC", + frac12: "\xBD", + frac34: "\xBE", + iquest: "\xBF", + Agrave: "\xC0", + Aacute: "\xC1", + Acirc: "\xC2", + Atilde: "\xC3", + Auml: "\xC4", + Aring: "\xC5", + AElig: "\xC6", + Ccedil: "\xC7", + Egrave: "\xC8", + Eacute: "\xC9", + Ecirc: "\xCA", + Euml: "\xCB", + Igrave: "\xCC", + Iacute: "\xCD", + Icirc: "\xCE", + Iuml: "\xCF", + ETH: "\xD0", + Ntilde: "\xD1", + Ograve: "\xD2", + Oacute: "\xD3", + Ocirc: "\xD4", + Otilde: "\xD5", + Ouml: "\xD6", + times: "\xD7", + Oslash: "\xD8", + Ugrave: "\xD9", + Uacute: "\xDA", + Ucirc: "\xDB", + Uuml: "\xDC", + Yacute: "\xDD", + THORN: "\xDE", + szlig: "\xDF", + agrave: "\xE0", + aacute: "\xE1", + acirc: "\xE2", + atilde: "\xE3", + auml: "\xE4", + aring: "\xE5", + aelig: "\xE6", + ccedil: "\xE7", + egrave: "\xE8", + eacute: "\xE9", + ecirc: "\xEA", + euml: "\xEB", + igrave: "\xEC", + iacute: "\xED", + icirc: "\xEE", + iuml: "\xEF", + eth: "\xF0", + ntilde: "\xF1", + ograve: "\xF2", + oacute: "\xF3", + ocirc: "\xF4", + otilde: "\xF5", + ouml: "\xF6", + divide: "\xF7", + oslash: "\xF8", + ugrave: "\xF9", + uacute: "\xFA", + ucirc: "\xFB", + uuml: "\xFC", + yacute: "\xFD", + thorn: "\xFE", + yuml: "\xFF", + fnof: "\u0192", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + bull: "\u2022", + hellip: "\u2026", + prime: "\u2032", + Prime: "\u2033", + oline: "\u203E", + frasl: "\u2044", + weierp: "\u2118", + image: "\u2111", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + int: "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666", + quot: '"', + amp: "&", + lt: "<", + gt: ">", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + circ: "\u02C6", + tilde: "\u02DC", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + permil: "\u2030", + lsaquo: "\u2039", + rsaquo: "\u203A", + euro: "\u20AC" +}; + +// ../../node_modules/stringify-entities/lib/util/to-named.js +var own3 = {}.hasOwnProperty, characters = {}, key; +for (key in characterEntitiesHtml4) + own3.call(characterEntitiesHtml4, key) && (characters[characterEntitiesHtml4[key]] = key); + +// ../../node_modules/vfile-message/lib/index.js +var VFileMessage = class extends Error { + /** + * Create a message for `reason`. + * + * > 🪦 **Note**: also has obsolete signatures. + * + * @overload + * @param {string} reason + * @param {Options | null | undefined} [options] + * @returns + * + * @overload + * @param {string} reason + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {string} reason + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {string} reason + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {Error | VFileMessage} cause + * @param {string | null | undefined} [origin] + * @returns + * + * @param {Error | VFileMessage | string} causeOrReason + * Reason for message, should use markdown. + * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] + * Configuration (optional). + * @param {string | null | undefined} [origin] + * Place in code where the message originates (example: + * `'my-package:my-rule'` or `'my-rule'`). + * @returns + * Instance of `VFileMessage`. + */ + // eslint-disable-next-line complexity + constructor(causeOrReason, optionsOrParentOrPlace, origin) { + super(), typeof optionsOrParentOrPlace == "string" && (origin = optionsOrParentOrPlace, optionsOrParentOrPlace = void 0); + let reason = "", options = {}, legacyCause = !1; + if (optionsOrParentOrPlace && ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace ? options = { place: optionsOrParentOrPlace } : "start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace ? options = { place: optionsOrParentOrPlace } : "type" in optionsOrParentOrPlace ? options = { + ancestors: [optionsOrParentOrPlace], + place: optionsOrParentOrPlace.position + } : options = { ...optionsOrParentOrPlace }), typeof causeOrReason == "string" ? reason = causeOrReason : !options.cause && causeOrReason && (legacyCause = !0, reason = causeOrReason.message, options.cause = causeOrReason), !options.ruleId && !options.source && typeof origin == "string") { + let index2 = origin.indexOf(":"); + index2 === -1 ? options.ruleId = origin : (options.source = origin.slice(0, index2), options.ruleId = origin.slice(index2 + 1)); + } + if (!options.place && options.ancestors && options.ancestors) { + let parent = options.ancestors[options.ancestors.length - 1]; + parent && (options.place = parent.position); + } + let start2 = options.place && "start" in options.place ? options.place.start : options.place; + this.ancestors = options.ancestors || void 0, this.cause = options.cause || void 0, this.column = start2 ? start2.column : void 0, this.fatal = void 0, this.file = "", this.message = reason, this.line = start2 ? start2.line : void 0, this.name = stringifyPosition(options.place) || "1:1", this.place = options.place || void 0, this.reason = this.message, this.ruleId = options.ruleId || void 0, this.source = options.source || void 0, this.stack = legacyCause && options.cause && typeof options.cause.stack == "string" ? options.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0; + } +}; +VFileMessage.prototype.file = ""; +VFileMessage.prototype.name = ""; +VFileMessage.prototype.reason = ""; +VFileMessage.prototype.message = ""; +VFileMessage.prototype.stack = ""; +VFileMessage.prototype.column = void 0; +VFileMessage.prototype.line = void 0; +VFileMessage.prototype.ancestors = void 0; +VFileMessage.prototype.cause = void 0; +VFileMessage.prototype.fatal = void 0; +VFileMessage.prototype.place = void 0; +VFileMessage.prototype.ruleId = void 0; +VFileMessage.prototype.source = void 0; + +// ../../node_modules/mdast-util-mdx-jsx/lib/index.js +function mdxJsxFromMarkdown() { + return { + canContainEols: ["mdxJsxTextElement"], + enter: { + mdxJsxFlowTag: enterMdxJsxTag, + mdxJsxFlowTagClosingMarker: enterMdxJsxTagClosingMarker, + mdxJsxFlowTagAttribute: enterMdxJsxTagAttribute, + mdxJsxFlowTagExpressionAttribute: enterMdxJsxTagExpressionAttribute, + mdxJsxFlowTagAttributeValueLiteral: buffer, + mdxJsxFlowTagAttributeValueExpression: buffer, + mdxJsxFlowTagSelfClosingMarker: enterMdxJsxTagSelfClosingMarker, + mdxJsxTextTag: enterMdxJsxTag, + mdxJsxTextTagClosingMarker: enterMdxJsxTagClosingMarker, + mdxJsxTextTagAttribute: enterMdxJsxTagAttribute, + mdxJsxTextTagExpressionAttribute: enterMdxJsxTagExpressionAttribute, + mdxJsxTextTagAttributeValueLiteral: buffer, + mdxJsxTextTagAttributeValueExpression: buffer, + mdxJsxTextTagSelfClosingMarker: enterMdxJsxTagSelfClosingMarker + }, + exit: { + mdxJsxFlowTagClosingMarker: exitMdxJsxTagClosingMarker, + mdxJsxFlowTagNamePrimary: exitMdxJsxTagNamePrimary, + mdxJsxFlowTagNameMember: exitMdxJsxTagNameMember, + mdxJsxFlowTagNameLocal: exitMdxJsxTagNameLocal, + mdxJsxFlowTagExpressionAttribute: exitMdxJsxTagExpressionAttribute, + mdxJsxFlowTagExpressionAttributeValue: data2, + mdxJsxFlowTagAttributeNamePrimary: exitMdxJsxTagAttributeNamePrimary, + mdxJsxFlowTagAttributeNameLocal: exitMdxJsxTagAttributeNameLocal, + mdxJsxFlowTagAttributeValueLiteral: exitMdxJsxTagAttributeValueLiteral, + mdxJsxFlowTagAttributeValueLiteralValue: data2, + mdxJsxFlowTagAttributeValueExpression: exitMdxJsxTagAttributeValueExpression, + mdxJsxFlowTagAttributeValueExpressionValue: data2, + mdxJsxFlowTagSelfClosingMarker: exitMdxJsxTagSelfClosingMarker, + mdxJsxFlowTag: exitMdxJsxTag, + mdxJsxTextTagClosingMarker: exitMdxJsxTagClosingMarker, + mdxJsxTextTagNamePrimary: exitMdxJsxTagNamePrimary, + mdxJsxTextTagNameMember: exitMdxJsxTagNameMember, + mdxJsxTextTagNameLocal: exitMdxJsxTagNameLocal, + mdxJsxTextTagExpressionAttribute: exitMdxJsxTagExpressionAttribute, + mdxJsxTextTagExpressionAttributeValue: data2, + mdxJsxTextTagAttributeNamePrimary: exitMdxJsxTagAttributeNamePrimary, + mdxJsxTextTagAttributeNameLocal: exitMdxJsxTagAttributeNameLocal, + mdxJsxTextTagAttributeValueLiteral: exitMdxJsxTagAttributeValueLiteral, + mdxJsxTextTagAttributeValueLiteralValue: data2, + mdxJsxTextTagAttributeValueExpression: exitMdxJsxTagAttributeValueExpression, + mdxJsxTextTagAttributeValueExpressionValue: data2, + mdxJsxTextTagSelfClosingMarker: exitMdxJsxTagSelfClosingMarker, + mdxJsxTextTag: exitMdxJsxTag + } + }; + function buffer() { + this.buffer(); + } + function point3(d) { + return { line: d.line, column: d.column, offset: d.offset }; + } + function data2(token) { + this.config.enter.data.call(this, token), this.config.exit.data.call(this, token); + } + function enterMdxJsxTag(token) { + let tag = { + name: void 0, + attributes: [], + close: !1, + selfClosing: !1, + start: token.start, + end: token.end + }; + this.data.mdxJsxTagStack || (this.data.mdxJsxTagStack = []), this.data.mdxJsxTag = tag, this.buffer(); + } + function enterMdxJsxTagClosingMarker(token) { + let stack = this.data.mdxJsxTagStack; + if (stack.length === 0) + throw new VFileMessage( + "Unexpected closing slash `/` in tag, expected an open tag first", + { start: token.start, end: token.end }, + "mdast-util-mdx-jsx:unexpected-closing-slash" + ); + } + function enterMdxJsxTagAnyAttribute(token) { + let tag = this.data.mdxJsxTag; + if (tag.close) + throw new VFileMessage( + "Unexpected attribute in closing tag, expected the end of the tag", + { start: token.start, end: token.end }, + "mdast-util-mdx-jsx:unexpected-attribute" + ); + } + function enterMdxJsxTagSelfClosingMarker(token) { + let tag = this.data.mdxJsxTag; + if (tag.close) + throw new VFileMessage( + "Unexpected self-closing slash `/` in closing tag, expected the end of the tag", + { start: token.start, end: token.end }, + "mdast-util-mdx-jsx:unexpected-self-closing-slash" + ); + } + function exitMdxJsxTagClosingMarker() { + let tag = this.data.mdxJsxTag; + tag.close = !0; + } + function exitMdxJsxTagNamePrimary(token) { + let tag = this.data.mdxJsxTag; + tag.name = this.sliceSerialize(token); + } + function exitMdxJsxTagNameMember(token) { + let tag = this.data.mdxJsxTag; + tag.name += "." + this.sliceSerialize(token); + } + function exitMdxJsxTagNameLocal(token) { + let tag = this.data.mdxJsxTag; + tag.name += ":" + this.sliceSerialize(token); + } + function enterMdxJsxTagAttribute(token) { + let tag = this.data.mdxJsxTag; + enterMdxJsxTagAnyAttribute.call(this, token), tag.attributes.push({ + type: "mdxJsxAttribute", + name: "", + value: null, + position: { + start: point3(token.start), + // @ts-expect-error: `end` will be patched later. + end: void 0 + } + }); + } + function enterMdxJsxTagExpressionAttribute(token) { + let tag = this.data.mdxJsxTag; + enterMdxJsxTagAnyAttribute.call(this, token), tag.attributes.push({ + type: "mdxJsxExpressionAttribute", + value: "", + position: { + start: point3(token.start), + // @ts-expect-error: `end` will be patched later. + end: void 0 + } + }), this.buffer(); + } + function exitMdxJsxTagExpressionAttribute(token) { + let tag = this.data.mdxJsxTag; + let tail = tag.attributes[tag.attributes.length - 1]; + tail.type; + let estree = token.estree; + tail.value = this.resume(), tail.position, tail.position.end = point3(token.end), estree && (tail.data = { estree }); + } + function exitMdxJsxTagAttributeNamePrimary(token) { + let tag = this.data.mdxJsxTag; + let node2 = tag.attributes[tag.attributes.length - 1]; + node2.type, node2.name = this.sliceSerialize(token), node2.position, node2.position.end = point3(token.end); + } + function exitMdxJsxTagAttributeNameLocal(token) { + let tag = this.data.mdxJsxTag; + let node2 = tag.attributes[tag.attributes.length - 1]; + node2.type, node2.name += ":" + this.sliceSerialize(token), node2.position, node2.position.end = point3(token.end); + } + function exitMdxJsxTagAttributeValueLiteral(token) { + let tag = this.data.mdxJsxTag; + let node2 = tag.attributes[tag.attributes.length - 1]; + node2.value = parseEntities(this.resume(), { nonTerminated: !1 }), node2.position, node2.position.end = point3(token.end); + } + function exitMdxJsxTagAttributeValueExpression(token) { + let tag = this.data.mdxJsxTag; + let tail = tag.attributes[tag.attributes.length - 1]; + tail.type; + let node2 = { type: "mdxJsxAttributeValueExpression", value: this.resume() }, estree = token.estree; + estree && (node2.data = { estree }), tail.value = node2, tail.position, tail.position.end = point3(token.end); + } + function exitMdxJsxTagSelfClosingMarker() { + let tag = this.data.mdxJsxTag; + tag.selfClosing = !0; + } + function exitMdxJsxTag(token) { + let tag = this.data.mdxJsxTag; + let stack = this.data.mdxJsxTagStack; + let tail = stack[stack.length - 1]; + if (tag.close && tail.name !== tag.name) + throw new VFileMessage( + "Unexpected closing tag `" + serializeAbbreviatedTag(tag) + "`, expected corresponding closing tag for `" + serializeAbbreviatedTag(tail) + "` (" + stringifyPosition(tail) + ")", + { start: token.start, end: token.end }, + "mdast-util-mdx-jsx:end-tag-mismatch" + ); + this.resume(), tag.close ? stack.pop() : this.enter( + { + type: token.type === "mdxJsxTextTag" ? "mdxJsxTextElement" : "mdxJsxFlowElement", + name: tag.name || null, + attributes: tag.attributes, + children: [] + }, + token, + onErrorRightIsTag + ), tag.selfClosing || tag.close ? this.exit(token, onErrorLeftIsTag) : stack.push(tag); + } + function onErrorRightIsTag(closing, open3) { + let stack = this.data.mdxJsxTagStack; + let tag = stack[stack.length - 1]; + let place = closing ? " before the end of `" + closing.type + "`" : "", position2 = closing ? { start: closing.start, end: closing.end } : void 0; + throw new VFileMessage( + "Expected a closing tag for `" + serializeAbbreviatedTag(tag) + "` (" + stringifyPosition({ start: open3.start, end: open3.end }) + ")" + place, + position2, + "mdast-util-mdx-jsx:end-tag-mismatch" + ); + } + function onErrorLeftIsTag(a, b) { + let tag = this.data.mdxJsxTag; + throw new VFileMessage( + "Expected the closing tag `" + serializeAbbreviatedTag(tag) + "` either after the end of `" + b.type + "` (" + stringifyPosition(b.end) + ") or another opening tag after the start of `" + b.type + "` (" + stringifyPosition(b.start) + ")", + { start: a.start, end: a.end }, + "mdast-util-mdx-jsx:end-tag-mismatch" + ); + } + function serializeAbbreviatedTag(tag) { + return "<" + (tag.close ? "/" : "") + (tag.name || "") + ">"; + } +} + +// ../../node_modules/mdast-util-mdxjs-esm/lib/index.js +function mdxjsEsmFromMarkdown() { + return { + enter: { mdxjsEsm: enterMdxjsEsm }, + exit: { mdxjsEsm: exitMdxjsEsm, mdxjsEsmData: exitMdxjsEsmData } + }; +} +function enterMdxjsEsm(token) { + this.enter({ type: "mdxjsEsm", value: "" }, token), this.buffer(); +} +function exitMdxjsEsm(token) { + let value = this.resume(), node2 = this.stack[this.stack.length - 1]; + node2.type, this.exit(token); + let estree = token.estree; + node2.value = value, estree && (node2.data = { estree }); +} +function exitMdxjsEsmData(token) { + this.config.enter.data.call(this, token), this.config.exit.data.call(this, token); +} + +// ../../node_modules/mdast-util-mdx/lib/index.js +function mdxFromMarkdown() { + return [ + mdxExpressionFromMarkdown(), + mdxJsxFromMarkdown(), + mdxjsEsmFromMarkdown() + ]; +} + +// ../../node_modules/micromark-extension-mdxjs/index.js +init_acorn(); +var import_acorn_jsx = __toESM(require_acorn_jsx(), 1); + +// ../../node_modules/estree-util-visit/lib/color.node.js +function color(d) { + return "\x1B[33m" + d + "\x1B[39m"; +} + +// ../../node_modules/estree-util-visit/lib/index.js +var own4 = {}.hasOwnProperty, CONTINUE = /* @__PURE__ */ Symbol("continue"), EXIT = /* @__PURE__ */ Symbol("exit"), SKIP = /* @__PURE__ */ Symbol("skip"); +function visit(tree, visitor) { + let enter, leave; + typeof visitor == "function" ? enter = visitor : visitor && typeof visitor == "object" && (visitor.enter && (enter = visitor.enter), visitor.leave && (leave = visitor.leave)), build2(tree, void 0, void 0, [])(); + function build2(node2, key2, index2, parents) { + return nodelike(node2) && (visit2.displayName = "node (" + color(node2.type) + ")"), visit2; + function visit2() { + let result = enter ? toResult(enter(node2, key2, index2, parents)) : []; + if (result[0] === EXIT) + return result; + if (result[0] !== SKIP) { + let cKey; + for (cKey in node2) + if (own4.call(node2, cKey) && node2[cKey] && typeof node2[cKey] == "object" && // @ts-expect-error: custom esast extension. + cKey !== "data" && // @ts-expect-error: custom esast extension. + cKey !== "position") { + let grandparents = parents.concat(node2), value = node2[cKey]; + if (Array.isArray(value)) { + let nodes = ( + /** @type {Array} */ + value + ), cIndex = 0; + for (; cIndex > -1 && cIndex < nodes.length; ) { + let subvalue = nodes[cIndex]; + if (nodelike(subvalue)) { + let subresult = build2( + subvalue, + cKey, + cIndex, + grandparents + )(); + if (subresult[0] === EXIT) return subresult; + cIndex = typeof subresult[1] == "number" ? subresult[1] : cIndex + 1; + } else + cIndex++; + } + } else if (nodelike(value)) { + let subresult = build2(value, cKey, void 0, grandparents)(); + if (subresult[0] === EXIT) return subresult; + } + } + } + return leave ? toResult(leave(node2, key2, index2, parents)) : result; + } + } +} +function toResult(value) { + return Array.isArray(value) ? value : typeof value == "number" ? [CONTINUE, value] : [value]; +} +function nodelike(value) { + return !!(value && typeof value == "object" && "type" in value && typeof value.type == "string" && value.type.length > 0); +} + +// ../../node_modules/micromark-util-events-to-acorn/lib/index.js +function eventsToAcorn(events, options) { + let prefix = options.prefix || "", suffix = options.suffix || "", acornOptions = Object.assign({}, options.acornOptions), comments = [], tokens = [], onComment = acornOptions.onComment, onToken = acornOptions.onToken, swallow = !1, estree, exception, acornConfig = Object.assign({}, acornOptions, { + onComment: comments, + preserveParens: !0 + }); + onToken && (acornConfig.onToken = tokens); + let collection = collect(events, options.tokenTypes), source = collection.value, value = prefix + source + suffix, isEmptyExpression = options.expression && empty2(source); + if (isEmptyExpression && !options.allowEmpty) + throw new VFileMessage("Unexpected empty expression", { + place: parseOffsetToUnistPoint(0), + ruleId: "unexpected-empty-expression", + source: "micromark-extension-mdx-expression" + }); + try { + estree = options.expression && !isEmptyExpression ? options.acorn.parseExpressionAt(value, 0, acornConfig) : options.acorn.parse(value, acornConfig); + } catch (error_) { + let error = ( + /** @type {AcornError} */ + error_ + ), point3 = parseOffsetToUnistPoint(error.pos); + error.message = String(error.message).replace(/ \(\d+:\d+\)$/, ""), error.pos = point3.offset, error.loc = { + line: point3.line, + column: point3.column - 1 + }, exception = error, swallow = error.raisedAt >= prefix.length + source.length || // Broken comments are raised at their start, not their end. + error.message === "Unterminated comment"; + } + if (estree && options.expression && !isEmptyExpression) + if (empty2(value.slice(estree.end, value.length - suffix.length))) + estree = { + type: "Program", + start: 0, + end: prefix.length + source.length, + // @ts-expect-error: It’s good. + body: [{ + type: "ExpressionStatement", + expression: estree, + start: 0, + end: prefix.length + source.length + }], + sourceType: "module", + comments: [] + }; + else { + let point3 = parseOffsetToUnistPoint(estree.end), error = ( + /** @type {AcornError} */ + new Error("Unexpected content after expression") + ); + error.pos = point3.offset, error.loc = { + line: point3.line, + column: point3.column - 1 + }, exception = error, estree = void 0; + } + if (estree) { + if (estree.comments = comments, visit(estree, function(esnode, field, index2, parents) { + let context = ( + /** @type {AcornNode | Array} */ + parents[parents.length - 1] + ), property = field; + esnode.type === "ParenthesizedExpression" && context && property && (typeof index2 == "number" && (context = context[property], property = index2), context[property] = esnode.expression), fixPosition(esnode); + }), Array.isArray(onComment)) + onComment.push(...comments); + else if (typeof onComment == "function") + for (let comment of comments) + onComment(comment.type === "Block", comment.value, comment.start, comment.end, comment.loc.start, comment.loc.end); + for (let token of tokens) + token.end <= prefix.length || token.start - prefix.length >= source.length || (fixPosition(token), Array.isArray(onToken) ? onToken.push(token) : onToken(token)); + } + return { + estree, + error: exception, + swallow + }; + function fixPosition(nodeOrToken) { + let pointStart = parseOffsetToUnistPoint(nodeOrToken.start), pointEnd = parseOffsetToUnistPoint(nodeOrToken.end); + nodeOrToken.start = pointStart.offset, nodeOrToken.end = pointEnd.offset, nodeOrToken.loc = { + start: { + line: pointStart.line, + column: pointStart.column - 1, + // @ts-expect-error: not allowed by acorn types. + offset: pointStart.offset + }, + end: { + line: pointEnd.line, + column: pointEnd.column - 1, + // @ts-expect-error: not allowed by acorn types. + offset: pointEnd.offset + } + }, nodeOrToken.range = [nodeOrToken.start, nodeOrToken.end]; + } + function parseOffsetToUnistPoint(acornOffset) { + let sourceOffset = acornOffset - prefix.length; + sourceOffset < 0 ? sourceOffset = 0 : sourceOffset > source.length && (sourceOffset = source.length); + let point3 = relativeToPoint(collection.stops, sourceOffset); + return point3 || (point3 = { + line: options.start.line, + column: options.start.column, + offset: options.start.offset + }), point3; + } +} +function empty2(value) { + return /^\s*$/.test(value.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g, "")); +} +function collect(events, tokenTypes) { + let result = { + value: "", + stops: [] + }, index2 = -1; + for (; ++index2 < events.length; ) { + let event = events[index2]; + if (event[0] === "enter") { + let type = event[1].type; + if (type === "lineEnding" || tokenTypes.includes(type)) { + let chunks = event[2].sliceStream(event[1]); + for (; chunks.length > 0 && chunks[0] === -1; ) + chunks.shift(); + let value = serializeChunks2(chunks); + result.stops.push([result.value.length, event[1].start]), result.value += value, result.stops.push([result.value.length, event[1].end]); + } + } + } + return result; +} +function relativeToPoint(stops, relative5) { + let index2 = 0; + for (; index2 < stops.length && stops[index2][0] <= relative5; ) + index2 += 1; + if (index2 === 0) + return; + let [stopRelative, stopAbsolute] = stops[index2 - 1], rest = relative5 - stopRelative; + return { + line: stopAbsolute.line, + column: stopAbsolute.column + rest, + offset: stopAbsolute.offset + rest + }; +} +function serializeChunks2(chunks) { + let index2 = -1, result = [], atTab; + for (; ++index2 < chunks.length; ) { + let chunk = chunks[index2], value; + if (typeof chunk == "string") + value = chunk; + else switch (chunk) { + case -5: { + value = "\r"; + break; + } + case -4: { + value = ` +`; + break; + } + case -3: { + value = `\r +`; + break; + } + case -2: { + value = " "; + break; + } + /* c8 ignore next 6 */ + case -1: { + if (atTab) continue; + value = " "; + break; + } + default: + value = String.fromCharCode(chunk); + } + atTab = chunk === -2, result.push(value); + } + return result.join(""); +} + +// ../../node_modules/unist-util-position-from-estree/lib/index.js +function positionFromEstree(node2) { + let nodeLike = node2 || {}, loc = nodeLike.loc || {}, range = nodeLike.range || [void 0, void 0], start2 = pointOrUndefined(loc.start, range[0] || nodeLike.start), end = pointOrUndefined(loc.end, range[1] || nodeLike.end); + if (start2 && end) + return { start: start2, end }; +} +function pointOrUndefined(estreePoint, estreeOffset) { + if (estreePoint && typeof estreePoint == "object") { + let line = "line" in estreePoint ? numberOrUndefined(estreePoint.line) : void 0, column = "column" in estreePoint ? numberOrUndefined(estreePoint.column) : void 0; + if (line && column !== void 0) + return { + line, + column: column + 1, + offset: numberOrUndefined(estreeOffset) + }; + } +} +function numberOrUndefined(value) { + return typeof value == "number" && value > -1 ? value : void 0; +} + +// ../../node_modules/micromark-factory-mdx-expression/index.js +var indentSize = 2, trouble = "https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression", unexpectedEndOfFileHash = "#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-", unexpectedLazyHash = "#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed", nonSpreadHash = "#unexpected-type-in-code-expected-an-object-spread-spread", spreadExtraHash = "#unexpected-extra-content-in-spread-only-a-single-spread-is-supported", acornHash = "#could-not-parse-expression-with-acorn"; +function factoryMdxExpression(effects, ok2, type, markerType, chunkType, acorn, acornOptions, addResult, spread, allowEmpty, allowLazy) { + let self2 = this, eventStart = this.events.length + 3, size = 0, pointStart, lastCrash; + return start2; + function start2(code) { + return effects.enter(type), effects.enter(markerType), effects.consume(code), effects.exit(markerType), pointStart = self2.now(), before; + } + function before(code) { + if (code === null) { + if (lastCrash) throw lastCrash; + let error = new VFileMessage("Unexpected end of file in expression, expected a corresponding closing brace for `{`", { + place: self2.now(), + ruleId: "unexpected-eof", + source: "micromark-extension-mdx-expression" + }); + throw error.url = trouble + unexpectedEndOfFileHash, error; + } + if (markdownLineEnding(code)) + return effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), eolAfter; + if (code === 125 && size === 0) { + let next = acorn ? mdxExpressionParse.call(self2, acorn, acornOptions, chunkType, eventStart, pointStart, allowEmpty || !1, spread || !1) : { + type: "ok", + estree: void 0 + }; + if (next.type === "ok") { + effects.enter(markerType), effects.consume(code), effects.exit(markerType); + let token = effects.exit(type); + return addResult && next.estree && Object.assign(token, { + estree: next.estree + }), ok2; + } + return lastCrash = next.message, effects.enter(chunkType), effects.consume(code), inside; + } + return effects.enter(chunkType), inside(code); + } + function inside(code) { + return code === 125 && size === 0 || code === null || markdownLineEnding(code) ? (effects.exit(chunkType), before(code)) : (code === 123 && !acorn ? size += 1 : code === 125 && (size -= 1), effects.consume(code), inside); + } + function eolAfter(code) { + let now = self2.now(); + if (now.line !== pointStart.line && !allowLazy && self2.parser.lazy[now.line]) { + let error = new VFileMessage("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", { + place: self2.now(), + ruleId: "unexpected-lazy", + source: "micromark-extension-mdx-expression" + }); + throw error.url = trouble + unexpectedLazyHash, error; + } + return markdownSpace(code) ? factorySpace(effects, before, "linePrefix", indentSize + 1)(code) : before(code); + } +} +function mdxExpressionParse(acorn, acornOptions, chunkType, eventStart, pointStart, allowEmpty, spread) { + let result = eventsToAcorn(this.events.slice(eventStart), { + acorn, + tokenTypes: [chunkType], + acornOptions, + start: pointStart, + expression: !0, + allowEmpty, + prefix: spread ? "({" : "", + suffix: spread ? "})" : "" + }), estree = result.estree; + if (spread && estree) { + let head = estree.body[0]; + if (head.type !== "ExpressionStatement" || head.expression.type !== "ObjectExpression") { + let place = positionFromEstree(head), error = new VFileMessage("Unexpected `" + head.type + "` in code: expected an object spread (`{...spread}`)", { + place: place.start, + ruleId: "non-spread", + source: "micromark-extension-mdx-expression" + }); + throw error.url = trouble + nonSpreadHash, error; + } + if (head.expression.properties[1]) { + let place = positionFromEstree(head.expression.properties[1]), error = new VFileMessage("Unexpected extra content in spread: only a single spread is supported", { + place: place.start, + ruleId: "spread-extra", + source: "micromark-extension-mdx-expression" + }); + throw error.url = trouble + spreadExtraHash, error; + } + if (head.expression.properties[0] && head.expression.properties[0].type !== "SpreadElement") { + let place = positionFromEstree(head.expression.properties[0]), error = new VFileMessage("Unexpected `" + head.expression.properties[0].type + "` in code: only spread elements are supported", { + place: place.start, + ruleId: "non-spread", + source: "micromark-extension-mdx-expression" + }); + throw error.url = trouble + nonSpreadHash, error; + } + } + if (result.error) { + let error = new VFileMessage("Could not parse expression with acorn", { + cause: result.error, + place: { + line: result.error.loc.line, + column: result.error.loc.column + 1, + offset: result.error.pos + }, + ruleId: "acorn", + source: "micromark-extension-mdx-expression" + }); + return error.url = trouble + acornHash, { + type: "nok", + message: error + }; + } + return { + type: "ok", + estree + }; +} + +// ../../node_modules/micromark-extension-mdx-expression/lib/syntax.js +function mdxExpression(options) { + let options_ = options || {}, addResult = options_.addResult, acorn = options_.acorn, spread = options_.spread, allowEmpty = options_.allowEmpty, acornOptions; + if (allowEmpty == null && (allowEmpty = !0), acorn) { + if (!acorn.parseExpressionAt) + throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`"); + acornOptions = Object.assign({ + ecmaVersion: 2024, + sourceType: "module" + }, options_.acornOptions); + } else if (options_.acornOptions || options_.addResult) + throw new Error("Expected an `acorn` instance passed in as `options.acorn`"); + return { + flow: { + 123: { + name: "mdxFlowExpression", + tokenize: tokenizeFlowExpression, + concrete: !0 + } + }, + text: { + 123: { + name: "mdxTextExpression", + tokenize: tokenizeTextExpression + } + } + }; + function tokenizeFlowExpression(effects, ok2, nok) { + let self2 = this; + return start2; + function start2(code) { + return before(code); + } + function before(code) { + return factoryMdxExpression.call(self2, effects, after, "mdxFlowExpression", "mdxFlowExpressionMarker", "mdxFlowExpressionChunk", acorn, acornOptions, addResult, spread, allowEmpty)(code); + } + function after(code) { + return markdownSpace(code) ? factorySpace(effects, end, "whitespace")(code) : end(code); + } + function end(code) { + let lessThanValue = self2.parser.constructs.flow[60], jsxTag = (Array.isArray(lessThanValue) ? lessThanValue : ( + /* c8 ignore next 3 -- always a list when normalized. */ + lessThanValue ? [lessThanValue] : [] + )).find(function(d) { + return d.name === "mdxJsxFlowTag"; + }); + return code === 60 && jsxTag ? effects.attempt(jsxTag, end, nok)(code) : code === null || markdownLineEnding(code) ? ok2(code) : nok(code); + } + } + function tokenizeTextExpression(effects, ok2) { + let self2 = this; + return start2; + function start2(code) { + return factoryMdxExpression.call(self2, effects, ok2, "mdxTextExpression", "mdxTextExpressionMarker", "mdxTextExpressionChunk", acorn, acornOptions, addResult, spread, allowEmpty, !0)(code); + } + } +} + +// ../../node_modules/estree-util-is-identifier-name/lib/index.js +var startRe = /[$_\p{ID_Start}]/u, contRe = /[$_\u{200C}\u{200D}\p{ID_Continue}]/u, contReJsx = /[-$_\u{200C}\u{200D}\p{ID_Continue}]/u; +var emptyOptions2 = {}; +function start(code) { + return code ? startRe.test(String.fromCodePoint(code)) : !1; +} +function cont(code, options) { + let re = (options || emptyOptions2).jsx ? contReJsx : contRe; + return code ? re.test(String.fromCodePoint(code)) : !1; +} + +// ../../node_modules/micromark-extension-mdx-jsx/lib/factory-tag.js +var trouble2 = "https://github.com/micromark/micromark-extension-mdx-jsx"; +function factoryTag(effects, ok2, nok, acorn, acornOptions, addResult, allowLazy, tagType, tagMarkerType, tagClosingMarkerType, tagSelfClosingMarker, tagNameType, tagNamePrimaryType, tagNameMemberMarkerType, tagNameMemberType, tagNamePrefixMarkerType, tagNameLocalType, tagExpressionAttributeType, tagExpressionAttributeMarkerType, tagExpressionAttributeValueType, tagAttributeType, tagAttributeNameType, tagAttributeNamePrimaryType, tagAttributeNamePrefixMarkerType, tagAttributeNameLocalType, tagAttributeInitializerMarkerType, tagAttributeValueLiteralType, tagAttributeValueLiteralMarkerType, tagAttributeValueLiteralValueType, tagAttributeValueExpressionType, tagAttributeValueExpressionMarkerType, tagAttributeValueExpressionValueType) { + let self2 = this, returnState, marker; + return start2; + function start2(code) { + return effects.enter(tagType), effects.enter(tagMarkerType), effects.consume(code), effects.exit(tagMarkerType), startAfter; + } + function startAfter(code) { + return markdownLineEndingOrSpace(code) ? nok(code) : (returnState = nameBefore, esWhitespaceStart(code)); + } + function nameBefore(code) { + if (code === 47) + return effects.enter(tagClosingMarkerType), effects.consume(code), effects.exit(tagClosingMarkerType), returnState = closingTagNameBefore, esWhitespaceStart; + if (code === 62) + return tagEnd(code); + if (code !== null && code >= 0 && start(code)) + return effects.enter(tagNameType), effects.enter(tagNamePrimaryType), effects.consume(code), primaryName; + crash(code, "before name", "a character that can start a name, such as a letter, `$`, or `_`" + (code === 33 ? " (note: to create a comment in MDX, use `{/* text */}`)" : "")); + } + function closingTagNameBefore(code) { + if (code === 62) + return tagEnd(code); + if (code !== null && code >= 0 && start(code)) + return effects.enter(tagNameType), effects.enter(tagNamePrimaryType), effects.consume(code), primaryName; + crash(code, "before name", "a character that can start a name, such as a letter, `$`, or `_`" + (code === 42 || code === 47 ? " (note: JS comments in JSX tags are not supported in MDX)" : "")); + } + function primaryName(code) { + if (code !== null && code >= 0 && cont(code, { + jsx: !0 + })) + return effects.consume(code), primaryName; + if (code === 46 || code === 47 || code === 58 || code === 62 || code === 123 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) + return effects.exit(tagNamePrimaryType), returnState = primaryNameAfter, esWhitespaceStart(code); + crash(code, "in name", "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag" + (code === 64 ? " (note: to create a link in MDX, use `[text](url)`)" : "")); + } + function primaryNameAfter(code) { + if (code === 46) + return effects.enter(tagNameMemberMarkerType), effects.consume(code), effects.exit(tagNameMemberMarkerType), returnState = memberNameBefore, esWhitespaceStart; + if (code === 58) + return effects.enter(tagNamePrefixMarkerType), effects.consume(code), effects.exit(tagNamePrefixMarkerType), returnState = localNameBefore, esWhitespaceStart; + if (code === 47 || code === 62 || code === 123 || code !== null && code >= 0 && start(code)) + return effects.exit(tagNameType), attributeBefore(code); + crash(code, "after name", "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"); + } + function memberNameBefore(code) { + if (code !== null && code >= 0 && start(code)) + return effects.enter(tagNameMemberType), effects.consume(code), memberName; + crash(code, "before member name", "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"); + } + function memberName(code) { + if (code !== null && code >= 0 && cont(code, { + jsx: !0 + })) + return effects.consume(code), memberName; + if (code === 46 || code === 47 || code === 62 || code === 123 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) + return effects.exit(tagNameMemberType), returnState = memberNameAfter, esWhitespaceStart(code); + crash(code, "in member name", "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag" + (code === 64 ? " (note: to create a link in MDX, use `[text](url)`)" : "")); + } + function memberNameAfter(code) { + if (code === 46) + return effects.enter(tagNameMemberMarkerType), effects.consume(code), effects.exit(tagNameMemberMarkerType), returnState = memberNameBefore, esWhitespaceStart; + if (code === 47 || code === 62 || code === 123 || code !== null && code >= 0 && start(code)) + return effects.exit(tagNameType), attributeBefore(code); + crash(code, "after member name", "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"); + } + function localNameBefore(code) { + if (code !== null && code >= 0 && start(code)) + return effects.enter(tagNameLocalType), effects.consume(code), localName; + crash(code, "before local name", "a character that can start a name, such as a letter, `$`, or `_`" + (code === 43 || code !== null && code > 46 && code < 58 ? " (note: to create a link in MDX, use `[text](url)`)" : "")); + } + function localName(code) { + if (code !== null && code >= 0 && cont(code, { + jsx: !0 + })) + return effects.consume(code), localName; + if (code === 47 || code === 62 || code === 123 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) + return effects.exit(tagNameLocalType), returnState = localNameAfter, esWhitespaceStart(code); + crash(code, "in local name", "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"); + } + function localNameAfter(code) { + if (code === 47 || code === 62 || code === 123 || code !== null && code >= 0 && start(code)) + return effects.exit(tagNameType), attributeBefore(code); + crash(code, "after local name", "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"); + } + function attributeBefore(code) { + if (code === 47) + return effects.enter(tagSelfClosingMarker), effects.consume(code), effects.exit(tagSelfClosingMarker), returnState = selfClosing, esWhitespaceStart; + if (code === 62) + return tagEnd(code); + if (code === 123) + return factoryMdxExpression.call(self2, effects, attributeExpressionAfter, tagExpressionAttributeType, tagExpressionAttributeMarkerType, tagExpressionAttributeValueType, acorn, acornOptions, addResult, !0, !1, allowLazy)(code); + if (code !== null && code >= 0 && start(code)) + return effects.enter(tagAttributeType), effects.enter(tagAttributeNameType), effects.enter(tagAttributeNamePrimaryType), effects.consume(code), attributePrimaryName; + crash(code, "before attribute name", "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"); + } + function attributeExpressionAfter(code) { + return returnState = attributeBefore, esWhitespaceStart(code); + } + function attributePrimaryName(code) { + if (code !== null && code >= 0 && cont(code, { + jsx: !0 + })) + return effects.consume(code), attributePrimaryName; + if (code === 47 || code === 58 || code === 61 || code === 62 || code === 123 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) + return effects.exit(tagAttributeNamePrimaryType), returnState = attributePrimaryNameAfter, esWhitespaceStart(code); + crash(code, "in attribute name", "an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag"); + } + function attributePrimaryNameAfter(code) { + if (code === 58) + return effects.enter(tagAttributeNamePrefixMarkerType), effects.consume(code), effects.exit(tagAttributeNamePrefixMarkerType), returnState = attributeLocalNameBefore, esWhitespaceStart; + if (code === 61) + return effects.exit(tagAttributeNameType), effects.enter(tagAttributeInitializerMarkerType), effects.consume(code), effects.exit(tagAttributeInitializerMarkerType), returnState = attributeValueBefore, esWhitespaceStart; + if (code === 47 || code === 62 || code === 123 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || code !== null && code >= 0 && start(code)) + return effects.exit(tagAttributeNameType), effects.exit(tagAttributeType), returnState = attributeBefore, esWhitespaceStart(code); + crash(code, "after attribute name", "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"); + } + function attributeLocalNameBefore(code) { + if (code !== null && code >= 0 && start(code)) + return effects.enter(tagAttributeNameLocalType), effects.consume(code), attributeLocalName; + crash(code, "before local attribute name", "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"); + } + function attributeLocalName(code) { + if (code !== null && code >= 0 && cont(code, { + jsx: !0 + })) + return effects.consume(code), attributeLocalName; + if (code === 47 || code === 61 || code === 62 || code === 123 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) + return effects.exit(tagAttributeNameLocalType), effects.exit(tagAttributeNameType), returnState = attributeLocalNameAfter, esWhitespaceStart(code); + crash(code, "in local attribute name", "an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag"); + } + function attributeLocalNameAfter(code) { + if (code === 61) + return effects.enter(tagAttributeInitializerMarkerType), effects.consume(code), effects.exit(tagAttributeInitializerMarkerType), returnState = attributeValueBefore, esWhitespaceStart; + if (code === 47 || code === 62 || code === 123 || code !== null && code >= 0 && start(code)) + return effects.exit(tagAttributeType), attributeBefore(code); + crash(code, "after local attribute name", "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"); + } + function attributeValueBefore(code) { + if (code === 34 || code === 39) + return effects.enter(tagAttributeValueLiteralType), effects.enter(tagAttributeValueLiteralMarkerType), effects.consume(code), effects.exit(tagAttributeValueLiteralMarkerType), marker = code, attributeValueQuotedStart; + if (code === 123) + return factoryMdxExpression.call(self2, effects, attributeValueExpressionAfter, tagAttributeValueExpressionType, tagAttributeValueExpressionMarkerType, tagAttributeValueExpressionValueType, acorn, acornOptions, addResult, !1, !1, allowLazy)(code); + crash(code, "before attribute value", "a character that can start an attribute value, such as `\"`, `'`, or `{`" + (code === 60 ? " (note: to use an element or fragment as a prop value in MDX, use `{}`)" : "")); + } + function attributeValueExpressionAfter(code) { + return effects.exit(tagAttributeType), returnState = attributeBefore, esWhitespaceStart(code); + } + function attributeValueQuotedStart(code) { + return code === null && crash(code, "in attribute value", "a corresponding closing quote `" + String.fromCodePoint(marker) + "`"), code === marker ? (effects.enter(tagAttributeValueLiteralMarkerType), effects.consume(code), effects.exit(tagAttributeValueLiteralMarkerType), effects.exit(tagAttributeValueLiteralType), effects.exit(tagAttributeType), marker = void 0, returnState = attributeBefore, esWhitespaceStart) : markdownLineEnding(code) ? (returnState = attributeValueQuotedStart, esWhitespaceStart(code)) : (effects.enter(tagAttributeValueLiteralValueType), attributeValueQuoted(code)); + } + function attributeValueQuoted(code) { + return code === null || code === marker || markdownLineEnding(code) ? (effects.exit(tagAttributeValueLiteralValueType), attributeValueQuotedStart(code)) : (effects.consume(code), attributeValueQuoted); + } + function selfClosing(code) { + if (code === 62) + return tagEnd(code); + crash(code, "after self-closing slash", "`>` to end the tag" + (code === 42 || code === 47 ? " (note: JS comments in JSX tags are not supported in MDX)" : "")); + } + function tagEnd(code) { + return effects.enter(tagMarkerType), effects.consume(code), effects.exit(tagMarkerType), effects.exit(tagType), ok2; + } + function esWhitespaceStart(code) { + return markdownLineEnding(code) ? (effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), esWhitespaceEolAfter) : markdownSpace(code) || unicodeWhitespace(code) ? (effects.enter("esWhitespace"), esWhitespaceInside(code)) : returnState(code); + } + function esWhitespaceInside(code) { + return markdownLineEnding(code) ? (effects.exit("esWhitespace"), esWhitespaceStart(code)) : markdownSpace(code) || unicodeWhitespace(code) ? (effects.consume(code), esWhitespaceInside) : (effects.exit("esWhitespace"), returnState(code)); + } + function esWhitespaceEolAfter(code) { + if (!allowLazy && self2.parser.lazy[self2.now().line]) { + let error = new VFileMessage("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", self2.now(), "micromark-extension-mdx-jsx:unexpected-lazy"); + throw error.url = trouble2 + "#unexpected-lazy-line-in-container-expected-line-to-be", error; + } + return esWhitespaceStart(code); + } + function crash(code, at2, expect) { + let error = new VFileMessage("Unexpected " + (code === null ? "end of file" : "character `" + (code === 96 ? "` ` `" : String.fromCodePoint(code)) + "` (" + serializeCharCode(code) + ")") + " " + at2 + ", expected " + expect, self2.now(), "micromark-extension-mdx-jsx:unexpected-" + (code === null ? "eof" : "character")); + throw error.url = trouble2 + (code === null ? "#unexpected-end-of-file-at-expected-expect" : "#unexpected-character-at-expected-expect"), error; + } +} +function serializeCharCode(code) { + return "U+" + code.toString(16).toUpperCase().padStart(4, "0"); +} + +// ../../node_modules/micromark-extension-mdx-jsx/lib/jsx-text.js +function jsxText(acorn, options) { + return { + name: "mdxJsxTextTag", + tokenize: tokenizeJsxText + }; + function tokenizeJsxText(effects, ok2, nok) { + return factoryTag.call(this, effects, ok2, nok, acorn, options.acornOptions, options.addResult, !0, "mdxJsxTextTag", "mdxJsxTextTagMarker", "mdxJsxTextTagClosingMarker", "mdxJsxTextTagSelfClosingMarker", "mdxJsxTextTagName", "mdxJsxTextTagNamePrimary", "mdxJsxTextTagNameMemberMarker", "mdxJsxTextTagNameMember", "mdxJsxTextTagNamePrefixMarker", "mdxJsxTextTagNameLocal", "mdxJsxTextTagExpressionAttribute", "mdxJsxTextTagExpressionAttributeMarker", "mdxJsxTextTagExpressionAttributeValue", "mdxJsxTextTagAttribute", "mdxJsxTextTagAttributeName", "mdxJsxTextTagAttributeNamePrimary", "mdxJsxTextTagAttributeNamePrefixMarker", "mdxJsxTextTagAttributeNameLocal", "mdxJsxTextTagAttributeInitializerMarker", "mdxJsxTextTagAttributeValueLiteral", "mdxJsxTextTagAttributeValueLiteralMarker", "mdxJsxTextTagAttributeValueLiteralValue", "mdxJsxTextTagAttributeValueExpression", "mdxJsxTextTagAttributeValueExpressionMarker", "mdxJsxTextTagAttributeValueExpressionValue"); + } +} + +// ../../node_modules/micromark-extension-mdx-jsx/lib/jsx-flow.js +function jsxFlow(acorn, options) { + return { + concrete: !0, + name: "mdxJsxFlowTag", + tokenize: tokenizeJsxFlow + }; + function tokenizeJsxFlow(effects, ok2, nok) { + let self2 = this; + return start2; + function start2(code) { + return before(code); + } + function before(code) { + return factoryTag.call(self2, effects, after, nok, acorn, options.acornOptions, options.addResult, !1, "mdxJsxFlowTag", "mdxJsxFlowTagMarker", "mdxJsxFlowTagClosingMarker", "mdxJsxFlowTagSelfClosingMarker", "mdxJsxFlowTagName", "mdxJsxFlowTagNamePrimary", "mdxJsxFlowTagNameMemberMarker", "mdxJsxFlowTagNameMember", "mdxJsxFlowTagNamePrefixMarker", "mdxJsxFlowTagNameLocal", "mdxJsxFlowTagExpressionAttribute", "mdxJsxFlowTagExpressionAttributeMarker", "mdxJsxFlowTagExpressionAttributeValue", "mdxJsxFlowTagAttribute", "mdxJsxFlowTagAttributeName", "mdxJsxFlowTagAttributeNamePrimary", "mdxJsxFlowTagAttributeNamePrefixMarker", "mdxJsxFlowTagAttributeNameLocal", "mdxJsxFlowTagAttributeInitializerMarker", "mdxJsxFlowTagAttributeValueLiteral", "mdxJsxFlowTagAttributeValueLiteralMarker", "mdxJsxFlowTagAttributeValueLiteralValue", "mdxJsxFlowTagAttributeValueExpression", "mdxJsxFlowTagAttributeValueExpressionMarker", "mdxJsxFlowTagAttributeValueExpressionValue")(code); + } + function after(code) { + return markdownSpace(code) ? factorySpace(effects, end, "whitespace")(code) : end(code); + } + function end(code) { + let leftBraceValue = self2.parser.constructs.flow[123], constructs2 = Array.isArray(leftBraceValue) ? leftBraceValue : leftBraceValue ? [leftBraceValue] : [], expression; + for (let construct of constructs2) + if (construct.name === "mdxFlowExpression") { + expression = construct; + break; + } + return code === 60 ? ( + // We can’t just say: fine. Lines of blocks have to be parsed until an eol/eof. + start2(code) + ) : code === 123 && expression ? effects.attempt(expression, end, nok)(code) : code === null || markdownLineEnding(code) ? ok2(code) : nok(code); + } + } +} + +// ../../node_modules/micromark-extension-mdx-jsx/lib/syntax.js +function mdxJsx(options) { + let settings = options || {}, acorn = settings.acorn, acornOptions; + if (acorn) { + if (!acorn.parse || !acorn.parseExpressionAt) + throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`"); + acornOptions = Object.assign({ + ecmaVersion: 2024, + sourceType: "module" + }, settings.acornOptions, { + locations: !0 + }); + } else if (settings.acornOptions || settings.addResult) + throw new Error("Expected an `acorn` instance passed in as `options.acorn`"); + return { + flow: { + 60: jsxFlow(acorn || void 0, { + acornOptions, + addResult: settings.addResult || void 0 + }) + }, + text: { + 60: jsxText(acorn || void 0, { + acornOptions, + addResult: settings.addResult || void 0 + }) + } + }; +} + +// ../../node_modules/micromark-extension-mdx-md/index.js +function mdxMd() { + return { + disable: { null: ["autolink", "codeIndented", "htmlFlow", "htmlText"] } + }; +} + +// ../../node_modules/micromark-extension-mdxjs-esm/lib/syntax.js +var blankLineBefore2 = { + tokenize: tokenizeNextBlank, + partial: !0 +}, trouble3 = "https://github.com/micromark/micromark-extension-mdxjs-esm", allowedAcornTypes = /* @__PURE__ */ new Set(["ExportAllDeclaration", "ExportDefaultDeclaration", "ExportNamedDeclaration", "ImportDeclaration"]); +function mdxjsEsm(options) { + let exportImportConstruct = { + tokenize: tokenizeExportImport, + concrete: !0 + }; + if (!options || !options.acorn || !options.acorn.parse) + throw new Error("Expected an `acorn` instance passed in as `options.acorn`"); + let acorn = options.acorn, acornOptions = Object.assign({ + ecmaVersion: 2024, + sourceType: "module" + }, options.acornOptions, { + locations: !0 + }); + return { + flow: { + 101: exportImportConstruct, + 105: exportImportConstruct + } + }; + function tokenizeExportImport(effects, ok2, nok) { + let self2 = this, definedModuleSpecifiers = self2.parser.definedModuleSpecifiers || (self2.parser.definedModuleSpecifiers = []), eventStart = this.events.length + 1, buffer = ""; + return self2.interrupt ? nok : start2; + function start2(code) { + return self2.now().column > 1 ? nok(code) : (effects.enter("mdxjsEsm"), effects.enter("mdxjsEsmData"), effects.consume(code), buffer += String.fromCharCode(code), word); + } + function word(code) { + return asciiAlpha(code) ? (effects.consume(code), buffer += String.fromCharCode(code), word) : (buffer === "import" || buffer === "export") && code === 32 ? (effects.consume(code), inside) : nok(code); + } + function inside(code) { + return code === null || markdownLineEnding(code) ? (effects.exit("mdxjsEsmData"), lineStart(code)) : (effects.consume(code), inside); + } + function lineStart(code) { + return code === null ? atEnd(code) : markdownLineEnding(code) ? effects.check(blankLineBefore2, atEnd, continuationStart)(code) : (effects.enter("mdxjsEsmData"), inside(code)); + } + function continuationStart(code) { + return effects.enter("lineEnding"), effects.consume(code), effects.exit("lineEnding"), lineStart; + } + function atEnd(code) { + let result = eventsToAcorn(self2.events.slice(eventStart), { + acorn, + acornOptions, + tokenTypes: ["mdxjsEsmData"], + prefix: definedModuleSpecifiers.length > 0 ? "var " + definedModuleSpecifiers.join(",") + ` +` : "" + }); + if (result.error) { + if (code !== null && result.swallow) + return continuationStart(code); + let error = new VFileMessage("Could not parse import/exports with acorn", { + cause: result.error, + place: { + line: result.error.loc.line, + column: result.error.loc.column + 1, + offset: result.error.pos + }, + ruleId: "acorn", + source: "micromark-extension-mdxjs-esm" + }); + throw error.url = trouble3 + "#could-not-parse-importexports-with-acorn", error; + } + if (definedModuleSpecifiers.length > 0) { + let declaration = result.estree.body.shift(); + } + let index2 = -1; + for (; ++index2 < result.estree.body.length; ) { + let node2 = result.estree.body[index2]; + if (!allowedAcornTypes.has(node2.type)) { + let error = new VFileMessage("Unexpected `" + node2.type + "` in code: only import/exports are supported", { + place: positionFromEstree(node2), + ruleId: "non-esm", + source: "micromark-extension-mdxjs-esm" + }); + throw error.url = trouble3 + "#unexpected-type-in-code-only-importexports-are-supported", error; + } + if (node2.type === "ImportDeclaration" && !self2.interrupt) { + let index3 = -1; + for (; ++index3 < node2.specifiers.length; ) { + let specifier = node2.specifiers[index3]; + definedModuleSpecifiers.push(specifier.local.name); + } + } + } + return Object.assign(effects.exit("mdxjsEsm"), options.addResult ? { + estree: result.estree + } : void 0), ok2(code); + } + } +} +function tokenizeNextBlank(effects, ok2, nok) { + return start2; + function start2(code) { + return effects.enter("lineEndingBlank"), effects.consume(code), effects.exit("lineEndingBlank"), effects.attempt(blankLine, ok2, nok); + } +} + +// ../../node_modules/micromark-extension-mdxjs/index.js +function mdxjs(options) { + let settings = Object.assign( + { + acorn: Parser.extend((0, import_acorn_jsx.default)()), + acornOptions: { ecmaVersion: 2024, sourceType: "module" }, + addResult: !0 + }, + options + ); + return combineExtensions([ + mdxjsEsm(settings), + mdxExpression(settings), + mdxJsx(settings), + mdxMd() + ]); +} + +// src/core-server/utils/analyze-mdx.ts +var mdxSyntaxOptions = { + acorn: Parser.extend((0, import_acorn_jsx2.default)()), + acornOptions: { ecmaVersion: 2024, sourceType: "module" }, + addResult: !0 +}, parseMdx = (code) => fromMarkdown(code, { + extensions: [mdxjs(mdxSyntaxOptions)], + mdastExtensions: [mdxFromMarkdown()] +}), createEmptyMdxMetadata = () => ({ + title: void 0, + of: void 0, + name: void 0, + id: void 0, + summary: void 0, + isTemplate: !1, + metaTags: void 0 +}), isMdxJsxAttribute = (node2) => node2.type === "mdxJsxAttribute", isMetaElement = (node2) => node2.type === "mdxJsxFlowElement" && node2.name === "Meta", isStringLiteral = (value) => value?.type === "Literal" && typeof value.value == "string", getAttribute = (metaElement, attributeName) => metaElement.attributes.find( + (node2) => isMdxJsxAttribute(node2) && node2.name === attributeName +), getAttributeValue = (metaElement, attributeName) => getAttribute(metaElement, attributeName)?.value, getExpression = (attributeValue) => { + let expressionStatement = attributeValue.data?.estree?.body[0]; + if (expressionStatement?.type === "ExpressionStatement") + return expressionStatement.expression; + throw new Error("Expected JSX expression, received unknown"); +}, getStringAttribute = (metaElement, attributeName) => { + let attributeValue = getAttributeValue(metaElement, attributeName); + if (attributeValue) { + if (typeof attributeValue == "string") + return attributeValue; + throw new Error(`Expected string literal ${attributeName}, received JSXExpressionContainer`); + } +}, getOfImportPath = (metaElement, importMap) => { + let attributeValue = getAttributeValue(metaElement, "of"); + if (!attributeValue) + return; + if (typeof attributeValue == "string") + throw new Error("Expected JSX expression, received Literal"); + let expression = getExpression(attributeValue); + if (expression.type !== "Identifier") + throw new Error(`Expected identifier, received ${expression.type}`); + let importPath = importMap[expression.name]; + if (importPath) + return importPath; + throw new Error(`Unknown identifier ${expression.name}`); +}, getMetaTags = (metaElement) => { + let attribute = getAttribute(metaElement, "tags"); + if (!attribute) + return; + let attributeValue = attribute.value; + if (!attributeValue) + throw new Error("Expected JSX expression tags, received null"); + if (typeof attributeValue == "string") + throw new Error("Expected JSX expression tags, received Literal"); + let expression = getExpression(attributeValue); + if (expression.type !== "ArrayExpression") + throw new Error(`Expected tags array, received ${expression.type}`); + return expression.elements.map((element) => { + if (isStringLiteral(element)) + return element.value; + throw new Error(`Expected string literal tag, received ${element?.type ?? "null"}`); + }); +}, getIsTemplate = (metaElement) => { + let attribute = getAttribute(metaElement, "isTemplate"); + if (!attribute) + return !1; + let attributeValue = attribute.value; + if (attributeValue == null) + return !0; + if (typeof attributeValue == "string") + throw new Error("Expected expression isTemplate, received Literal"); + let expression = getExpression(attributeValue); + if (expression.type === "Literal" && typeof expression.value == "boolean") + return expression.value; + throw new Error( + `Expected boolean isTemplate, received ${typeof expression.value}` + ); +}, extractMeta = (metaElement, importMap) => ({ + title: getStringAttribute(metaElement, "title"), + of: getOfImportPath(metaElement, importMap), + name: getStringAttribute(metaElement, "name"), + id: getStringAttribute(metaElement, "id"), + summary: getStringAttribute(metaElement, "summary"), + isTemplate: getIsTemplate(metaElement), + metaTags: getMetaTags(metaElement) +}), extractImports = (root) => { + let importMap = {}; + for (let child of root.body) { + if (child.type !== "ImportDeclaration") + continue; + let importPath = child.source.value; + if (child.source.type !== "Literal" || typeof importPath != "string") + throw new Error("MDX: unexpected import source"); + for (let specifier of child.specifiers) + importMap[specifier.local.name] = importPath; + } + return importMap; +}, analyzeParsedMdx = (root) => { + let importMap = {}, metaElement; + for (let child of root.children) + if (child.type === "mdxjsEsm" && child.data?.estree && Object.assign(importMap, extractImports(child.data.estree)), isMetaElement(child)) { + if (metaElement) + throw new Error("Meta can only be declared once"); + metaElement = child; + } + return { + ...metaElement ? extractMeta(metaElement, importMap) : createEmptyMdxMetadata(), + imports: Array.from(new Set(Object.values(importMap))) + }; +}, analyzeMdx = async (code) => analyzeParsedMdx(parseMdx(code)); + +// src/core-server/utils/summarizeStats.ts +var addStats = (stat3, acc) => { + Object.entries(stat3).forEach(([key2, value]) => { + let statsKey = key2; + acc[statsKey] || (acc[statsKey] = 0), acc[statsKey] += value ? 1 : 0; + }); +}; + +// src/core-server/utils/StoryIndexGenerator.ts +var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.startsWith(".") ? slash(resolve3(workingDir, normalizeStoryPath(join6(dirname2(normalizedPath), otherImport)))) : otherImport, StoryIndexGenerator = class _StoryIndexGenerator { + constructor(specifiers, options) { + this.specifiers = specifiers; + this.options = options; + this.invalidationListeners = /* @__PURE__ */ new Set(); + this.specifierToCache = /* @__PURE__ */ new Map(); + } + static { + /** Cache for findMatchingFiles results */ + this.findMatchingFilesCache = /* @__PURE__ */ new Map(); + } + /** Generate a cache key for findMatchingFiles */ + static getFindMatchingFilesCacheKey(specifier, workingDir, ignoreWarnings) { + return JSON.stringify({ + directory: specifier.directory, + files: specifier.files, + workingDir, + ignoreWarnings + }); + } + /** Clear the findMatchingFiles cache */ + static clearFindMatchingFilesCache() { + this.findMatchingFilesCache.clear(); + } + static async findMatchingFiles(specifier, workingDir, ignoreWarnings = !1) { + let cacheKey = this.getFindMatchingFilesCacheKey(specifier, workingDir, ignoreWarnings), cached = this.findMatchingFilesCache.get(cacheKey); + if (cached) + return cached; + let pathToSubIndex = {}, globCwd = slash(resolve3(workingDir, specifier.directory)), globPattern = specifier.files.startsWith("!") ? `./${specifier.files}` : specifier.files, { globby } = await import("../_node-chunks/globby-F6LJSRNJ.js"), files = await globby(globPattern, { + absolute: !0, + cwd: globCwd, + ...commonGlobOptions2(globPattern), + onlyFiles: !0 + }); + return files.length === 0 && !ignoreWarnings && once.warn( + `No story files found for the specified pattern: ${import_picocolors9.default.blue( + join6(specifier.directory, specifier.files) + )}` + ), files.sort().forEach((absolutePath) => { + let ext = extname(absolutePath); + if (ext === ".storyshot") { + let relativePath = relative4(workingDir, absolutePath); + logger19.info(`Skipping ${ext} file ${relativePath}`); + return; + } + pathToSubIndex[absolutePath] = !1; + }), this.findMatchingFilesCache.set(cacheKey, pathToSubIndex), pathToSubIndex; + } + static async findMatchingFilesForSpecifiers(specifiers, workingDir, ignoreWarnings = !1) { + return Promise.all( + specifiers.map(async (specifier) => { + let pathToSubIndex = await _StoryIndexGenerator.findMatchingFiles( + specifier, + workingDir, + ignoreWarnings + ); + return [specifier, pathToSubIndex]; + }) + ); + } + async initialize() { + (await _StoryIndexGenerator.findMatchingFilesForSpecifiers( + this.specifiers, + this.options.workingDir + )).forEach( + ([specifier, cache4]) => this.specifierToCache.set(specifier, cache4) + ); + let previewCode = await this.getPreviewCode(), projectTags = this.getProjectTags(previewCode); + await this.ensureExtracted({ projectTags }); + } + /** Run the updater function over all the empty cache entries */ + async updateExtracted(updater, overwrite = !1) { + await Promise.all( + this.specifiers.map(async (specifier) => { + let entry = this.specifierToCache.get(specifier); + return invariant( + entry, + `specifier does not have a matching cache entry in specifierToCache: ${JSON.stringify( + specifier + )}` + ), Promise.all( + Object.keys(entry).map(async (absolutePath) => { + if (!(entry[absolutePath] && !overwrite)) + try { + entry[absolutePath] = await updater(specifier, absolutePath, entry[absolutePath]); + } catch (err) { + let relativePath = `.${sep}${relative4(this.options.workingDir, absolutePath)}`; + entry[absolutePath] = { + type: "error", + err: new IndexingError( + err instanceof Error ? err.message : String(err), + [relativePath], + err instanceof Error ? err.stack : void 0 + ) + }; + } + }) + ); + }) + ); + } + isDocsMdx(absolutePath) { + return /(? this.isDocsMdx(absolutePath) ? !1 : this.extractStories(specifier, absolutePath, projectTags) + ), await this.updateExtracted( + async (specifier, absolutePath) => this.extractDocs(specifier, absolutePath, projectTags) + ); + let statsSummary = {}; + return { entries: this.specifiers.flatMap((specifier) => { + let cache4 = this.specifierToCache.get(specifier); + return invariant( + cache4, + `specifier does not have a matching cache entry in specifierToCache: ${JSON.stringify( + specifier + )}` + ), Object.values(cache4).flatMap((entry) => entry ? entry.type === "docs" ? [entry] : entry.type === "error" ? [entry] : entry.entries.map((item) => { + if (item.type === "docs") + return item; + isExampleStoryId2(item.id) || addStats(item.extra.stats, statsSummary); + let { extra, ...existing } = item; + return existing; + }) : []); + }), stats: statsSummary }; + } + findDependencies(absoluteImports) { + return [...this.specifierToCache.values()].flatMap( + (cache4) => Object.entries(cache4).filter(([fileName, cacheEntry]) => !cacheEntry || cacheEntry.type !== "stories" ? !1 : !!absoluteImports.find( + (storyImport) => fileName.match( + new RegExp(`^${storyImport.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(\\.[^.]+)?$`) + ) + )).map(([_, cacheEntry]) => cacheEntry) + ); + } + /** + * Try to find the component path from a raw import string and return it in the same format as + * `importPath`. Respect tsconfig paths if available. + * + * If no such file exists, assume that the import is from a package and return the raw + */ + resolveComponentPath(rawComponentPath, absolutePath, matchPath) { + let matchedPath = matchPath?.(rawComponentPath, void 0, void 0, supportedExtensions) ?? rawComponentPath, resolved; + try { + resolved = resolveImport(matchedPath, { basedir: dirname2(absolutePath) }); + } catch { + return matchedPath; + } + let relativePath = relative4(this.options.workingDir, resolved); + return slash(normalizeStoryPath(relativePath)); + } + async extractStories(specifier, absolutePath, projectTags = []) { + let relativePath = relative4(this.options.workingDir, absolutePath), importPath = slash(normalizeStoryPath(relativePath)), defaultMakeTitle = (userTitle) => { + let title = userOrAutoTitleFromSpecifier(importPath, specifier, userTitle); + return invariant( + title, + "makeTitle created an undefined title. This happens when the fileName doesn't match any specifier from main.js" + ), title; + }, indexer = this.options.indexers.find((ind) => ind.test.exec(absolutePath)); + invariant(indexer, `No matching indexer found for ${absolutePath}`); + let indexInputs = await indexer.createIndex(absolutePath, { + makeTitle: defaultMakeTitle + }), tsconfigPath = up("tsconfig.json", { + cwd: this.options.workingDir, + last: getProjectRoot3() + }), tsconfig = TsconfigPaths.loadConfig(tsconfigPath), matchPath; + tsconfig.resultType === "success" && (matchPath = TsconfigPaths.createMatchPath(tsconfig.absoluteBaseUrl, tsconfig.paths, [ + "browser", + "module", + "main" + ])); + let toImportPath = (path2) => path2 ? path2.startsWith("virtual:") ? path2 : slash(normalizeStoryPath(relative4(this.options.workingDir, path2))) : importPath, storyEntries2 = indexInputs.map((input) => { + let name2 = input.name ?? storyNameFromExport(input.exportName), componentPath = input.rawComponentPath && this.resolveComponentPath(input.rawComponentPath, absolutePath, matchPath), title = input.title ?? defaultMakeTitle(), id = input.__id ?? toId(input.metaId ?? title, storyNameFromExport(input.exportName)), tags = combineTags(...projectTags, ...input.tags ?? []), subtype = input.subtype ?? "story", entry = { + type: "story", + subtype, + id, + extra: { + metaId: input.metaId, + stats: input.__stats ?? {} + }, + name: name2, + title, + importPath: toImportPath(input.importPath), + componentPath, + tags + }; + return subtype === "test" && (entry.parent = input.parent, entry.parentName = input.parentName), input.exportName && (entry.exportName = input.exportName), entry; + }); + if (storyEntries2.some((entry) => entry.tags.includes(Tag.AUTODOCS)) && !!this.options.docs && this.options.build?.test?.disableAutoDocs !== !0) { + let name2 = this.options.docs?.defaultName ?? "Docs", { metaId } = indexInputs[0], entry = storyEntries2[0], id = toId(metaId ?? entry.title, name2), tags = combineTags(...projectTags, ...indexInputs[0].tags ?? []); + return { + entries: [{ + id, + title: entry.title, + name: name2, + importPath: entry.importPath, + type: "docs", + tags, + storiesImports: [] + }, ...storyEntries2], + dependents: [], + type: "stories" + }; + } + return { + entries: storyEntries2, + dependents: [], + type: "stories" + }; + } + async extractDocs(specifier, absolutePath, projectTags = []) { + let relativePath = relative4(this.options.workingDir, absolutePath); + try { + let normalizedPath = normalizeStoryPath(relativePath), importPath = slash(normalizedPath), content3 = await readFile8(absolutePath, { encoding: "utf8" }), result = await analyzeMdx(content3); + if (result.isTemplate) + return !1; + let absoluteImports = result.imports.map( + (p) => makeAbsolute(p, normalizedPath, this.options.workingDir) + ), dependencies = this.findDependencies(absoluteImports), sortedDependencies = dependencies, csfEntry; + if (result.of) { + let absoluteOf = makeAbsolute(result.of, normalizedPath, this.options.workingDir), metaDependency; + dependencies.forEach((dep) => { + if (dep.entries.length > 0) { + let first = dep.entries.find((e) => e.type !== "docs"); + normalize2(resolve3(this.options.workingDir, first.importPath)).startsWith( + normalize2(absoluteOf) + ) && (csfEntry = first, metaDependency = dep); + } + }), metaDependency && (sortedDependencies = [ + metaDependency, + ...dependencies.filter((d) => d !== metaDependency) + ]), invariant( + csfEntry, + import_ts_dedent7.dedent` + Could not find or load CSF file at path "${result.of}" referenced by \`of={}\` in docs file "${relativePath}". + + - Does that file exist? + - If so, is it a CSF file (\`.stories.*\`)? + - If so, is it matched by the \`stories\` glob in \`main.js\`? + - If so, has the file successfully loaded in Storybook and are its stories visible? + ` + ); + } + dependencies.forEach((dep) => { + dep.dependents.push(absolutePath); + }); + let title = csfEntry?.title || userOrAutoTitleFromSpecifier(importPath, specifier, result.title); + invariant( + title, + "makeTitle created an undefined title. This happens when a specifier's doesn't have any matches in its fileName" + ); + let defaultName = this.options.docs?.defaultName ?? "Docs", name2 = result.name || (csfEntry ? autoName(importPath, csfEntry.importPath, defaultName) : defaultName), id = toId(csfEntry?.extra.metaId || result.id || title, name2), tags = combineTags( + ...projectTags, + ...csfEntry?.tags ?? [], + ...result.metaTags ?? [], + csfEntry ? Tag.ATTACHED_MDX : Tag.UNATTACHED_MDX + ); + return { + id, + title, + name: name2, + importPath, + storiesImports: sortedDependencies.map((dep) => dep.entries[0].importPath), + type: "docs", + tags + }; + } catch (err) { + throw err && err.source?.match(/mdast-util-mdx-jsx/g) && logger19.warn( + `\u{1F4A1} This seems to be an MDX2 syntax error. Please refer to the MDX section in the following resource for assistance on how to fix this: ${import_picocolors9.default.yellow( + "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx2-upgrade" + )}` + ), err; + } + } + chooseDuplicate(firstEntry, secondEntry, projectTags) { + if (firstEntry.importPath === secondEntry.importPath) + return firstEntry; + let firstIsBetter = !0; + (secondEntry.type === "story" || isMdxEntry(secondEntry) && firstEntry.type === "docs" && !isMdxEntry(firstEntry)) && (firstIsBetter = !1); + let betterEntry = firstIsBetter ? firstEntry : secondEntry, worseEntry = firstIsBetter ? secondEntry : firstEntry, changeDocsName = 'Use `` to distinguish them.'; + if (worseEntry.type === "story") + throw new IndexingError(`Duplicate stories with id: ${firstEntry.id}`, [ + firstEntry.importPath, + secondEntry.importPath + ]); + if (betterEntry.type === "story") { + let worseDescriptor = isMdxEntry(worseEntry) ? "component docs page" : "automatically generated docs page", docsName = this.options.docs?.defaultName ?? "Docs"; + throw betterEntry.name === docsName ? new IndexingError( + `You have a story for ${betterEntry.title} with the same name as your default docs entry name (${betterEntry.name}), so the docs page is being dropped. Consider changing the story name.`, + [firstEntry.importPath, secondEntry.importPath] + ) : new IndexingError( + `You have a story for ${betterEntry.title} with the same name as your ${worseDescriptor} (${worseEntry.name}), so the docs page is being dropped. ${changeDocsName}`, + [firstEntry.importPath, secondEntry.importPath] + ); + } else if (isMdxEntry(betterEntry)) { + if (isMdxEntry(worseEntry)) + throw new IndexingError( + `You have two component docs pages with the same name ${betterEntry.title}:${betterEntry.name}. ${changeDocsName}`, + [firstEntry.importPath, secondEntry.importPath] + ); + if (worseEntry.tags?.includes(Tag.AUTODOCS) && !projectTags?.includes(Tag.AUTODOCS)) + throw new IndexingError( + `You created a component docs page for '${worseEntry.title}', but also tagged the CSF file with '${Tag.AUTODOCS}'. This is probably a mistake.`, + [betterEntry.importPath, worseEntry.importPath] + ); + } else + return { + ...betterEntry, + storiesImports: [ + ...betterEntry.storiesImports, + worseEntry.importPath, + ...worseEntry.storiesImports + ] + }; + return betterEntry; + } + async sortStories(entries, storySortParameter) { + let sortableStories = Object.values(entries), fileNameOrder = _StoryIndexGenerator.storyFileNames(this.specifierToCache); + return sortStoriesV7(sortableStories, storySortParameter, fileNameOrder), sortableStories.reduce( + (acc, item) => (acc[item.id] = item, acc), + {} + ); + } + async getIndex() { + return (await this.getIndexAndStats()).storyIndex; + } + async getIndexAndStats() { + if (this.lastIndex && this.lastStats) + return { storyIndex: this.lastIndex, stats: this.lastStats }; + if (this.lastError) + throw this.lastError; + let previewCode = await this.getPreviewCode(), projectTags = this.getProjectTags(previewCode), { entries: storiesList, stats } = await this.ensureExtracted({ projectTags }); + try { + let errorEntries = storiesList.filter((entry) => entry.type === "error"); + if (errorEntries.length) + throw new MultipleIndexingError(errorEntries.map((entry) => entry.err)); + let duplicateErrors = [], indexEntries = {}; + if (storiesList.forEach((entry) => { + try { + let existing = indexEntries[entry.id]; + existing ? indexEntries[entry.id] = this.chooseDuplicate(existing, entry, projectTags) : indexEntries[entry.id] = entry; + } catch (err) { + err instanceof IndexingError && duplicateErrors.push(err); + } + }), duplicateErrors.length) + throw new MultipleIndexingError(duplicateErrors); + let sorted = await this.sortStories( + indexEntries, + previewCode && getStorySortParameter(previewCode) + ); + return this.lastStats = stats, this.lastIndex = { + v: 5, + entries: sorted + }, { storyIndex: this.lastIndex, stats: this.lastStats }; + } catch (err) { + throw this.lastError = err == null || err instanceof Error ? err : void 0, invariant(this.lastError), logger19.warn(`\u{1F6A8} ${this.lastError.toString()}`), this.lastError; + } + } + invalidateAll() { + this.specifierToCache.forEach((cache4) => { + Object.keys(cache4).forEach((key2) => { + cache4[key2] = !1; + }); + }), this.lastIndex = null, this.lastError = null, this.invalidationListeners.forEach((listener) => listener()); + } + invalidate(importPath, removed) { + let absolutePath = slash(resolve3(this.options.workingDir, importPath)), specifier = Array.from(this.specifierToCache.keys()).find( + (ns) => ns.importPathMatcher.exec(importPath) + ); + if (!specifier) + return; + let cache4 = this.specifierToCache.get(specifier); + invariant( + cache4, + `specifier does not have a matching cache entry in specifierToCache: ${JSON.stringify( + specifier + )}` + ); + let cacheEntry = cache4[absolutePath]; + if (cacheEntry && cacheEntry.type === "stories") { + let { dependents } = cacheEntry, invalidated = /* @__PURE__ */ new Set(); + this.specifierToCache.forEach((otherCache) => { + dependents.forEach((dep) => { + otherCache[dep] && (invalidated.add(dep), otherCache[dep] = !1); + }); + }); + } + if (removed) { + if (cacheEntry && cacheEntry.type === "docs") { + let absoluteImports = cacheEntry.storiesImports.map( + (p) => resolve3(this.options.workingDir, p) + ); + this.findDependencies(absoluteImports).forEach( + (dep) => dep.dependents.splice(dep.dependents.indexOf(absolutePath), 1) + ); + } + delete cache4[absolutePath]; + } else + cache4[absolutePath] = !1; + this.lastIndex = null, this.lastError = null, this.invalidationListeners.forEach((listener) => listener()); + } + onInvalidated(listener) { + return this.invalidationListeners.add(listener), () => { + this.invalidationListeners.delete(listener); + }; + } + async getPreviewCode() { + let previewFile = ["js", "jsx", "ts", "tsx", "mjs", "cjs", "mts"].map((ext) => join6(this.options.configDir, `preview.${ext}`)).find((fname) => existsSync3(fname)); + return previewFile && (await readFile8(previewFile, { encoding: "utf8" })).toString(); + } + getProjectTags(previewCode) { + let projectTags = [], defaultTags = [Tag.DEV, Tag.TEST, Tag.MANIFEST]; + if (previewCode) + try { + projectTags = loadConfig(previewCode).parse().getFieldValue(["tags"]) ?? []; + } catch { + once.warn(import_ts_dedent7.dedent` + Unable to parse tags from project configuration. If defined, tags should be specified inline, e.g. + + export default { + tags: ['foo'], + } + + --- + + Received: + + ${previewCode} + `); + } + return [...defaultTags, ...projectTags]; + } + // Get the story file names in "imported order" + static storyFileNames(specifierToCache) { + return Array.from(specifierToCache.values()).flatMap((r) => Object.keys(r)); + } +}; + +// src/core-server/build-index.ts +var buildIndex = async (options) => { + let { presets } = await loadStorybook(options), [indexers, stories, docsOptions] = await Promise.all([ + presets.apply("experimental_indexers", []), + presets.apply("stories", []), + presets.apply("docs") + ]), { configDir } = options, workingDir = process.cwd(), directories = { + configDir, + workingDir + }, normalizedStories = normalizeStories2(stories, directories), generator = new StoryIndexGenerator(normalizedStories, { + ...directories, + indexers, + docs: docsOptions, + build: {} + }); + return await generator.initialize(), generator.getIndex(); +}, buildIndexStandalone = async (options) => { + let index2 = await buildIndex(options); + logger20.info(`Writing index to ${options.outputFile}`), await writeFile5(options.outputFile, JSON.stringify(index2)); +}; + +// src/core-server/standalone.ts +async function build(options = {}, frameworkOptions = {}) { + let { mode = "dev" } = options, { default: packageJson } = await import("storybook/package.json", { with: { type: "json" } }), commonOptions = { + ...options, + ...frameworkOptions, + frameworkPresets: [ + ...options.frameworkPresets || [], + ...frameworkOptions.frameworkPresets || [] + ], + packageJson + }; + if (mode === "dev") + return buildDevStandalone(commonOptions); + if (mode === "static") + return buildStaticStandalone(commonOptions); + if (mode === "index") + return buildIndexStandalone(commonOptions); + throw new Error("'mode' parameter should be either 'dev', 'static', or 'index'"); +} +var standalone_default = build; + +// src/core-server/utils/get-stories-paths-from-config.ts +import { normalizeStories as normalizeStories3 } from "storybook/internal/common"; +var getStoriesPathsFromConfig = async ({ + stories, + configDir, + workingDir +}) => { + if (stories.length === 0) + return []; + let normalizedStories = normalizeStories3(stories, { configDir, workingDir }); + return (await StoryIndexGenerator.findMatchingFilesForSpecifiers( + normalizedStories, + workingDir, + !0 + )).flatMap( + ([specifier, cache4]) => StoryIndexGenerator.storyFileNames(/* @__PURE__ */ new Map([[specifier, cache4]])) + ); +}; + +// src/shared/universal-store/mock.ts +var import_ts_dedent8 = __toESM(require_dist(), 1); +import { Channel as Channel5 } from "storybook/internal/channels"; +var MockUniversalStore = class _MockUniversalStore extends UniversalStore { + constructor(options, testUtils) { + UniversalStore.isInternalConstructing = !0, super( + { ...options, leader: !0 }, + { channel: new Channel5({}), environment: UniversalStore.Environment.MOCK } + ), UniversalStore.isInternalConstructing = !1, typeof testUtils?.fn == "function" && (this.testUtils = testUtils, this.getState = testUtils.fn(this.getState), this.setState = testUtils.fn(this.setState), this.subscribe = testUtils.fn(this.subscribe), this.onStateChange = testUtils.fn(this.onStateChange), this.send = testUtils.fn(this.send)); + } + /** Create a mock universal store. This is just an alias for the constructor */ + static create(options, testUtils) { + return new _MockUniversalStore(options, testUtils); + } + unsubscribeAll() { + if (!this.testUtils) + throw new Error( + import_ts_dedent8.dedent`Cannot call unsubscribeAll on a store that does not have testUtils. + Please provide testUtils as the second argument when creating the store.` + ); + let callReturnedUnsubscribeFn = (result) => { + try { + result.value(); + } catch { + } + }; + this.subscribe.mock?.results.forEach(callReturnedUnsubscribeFn), this.onStateChange.mock?.results.forEach(callReturnedUnsubscribeFn); + } +}; +export { + ChangeDetectionFailureError, + ChangeDetectionService, + ChangeDetectionUnavailableError, + MDX_SERVICE_ID, + StoryIndexGenerator, + Tag, + analyzeMdx, + analyzeTestResults, + standalone_default as build, + buildDevStandalone, + buildIndex, + buildIndexStandalone, + buildStaticStandalone, + describeService, + MockUniversalStore as experimental_MockUniversalStore, + UniversalStore as experimental_UniversalStore, + defineService as experimental_defineService, + getChangeDetectionReadiness as experimental_getChangeDetectionReadiness, + getStatusStoreByTypeId as experimental_getStatusStore, + getTestProviderStoreById as experimental_getTestProviderStore, + loadStorybook as experimental_loadStorybook, + registerService as experimental_registerService, + generateStoryFile, + getComponentCandidates, + getErrorLevel, + getPreviewBodyTemplate, + getPreviewHeadTemplate, + getServerPort, + getService, + getStoriesPathsFromConfig, + fullStatusStore as internal_fullStatusStore, + fullTestProviderStore as internal_fullTestProviderStore, + universalStatusStore as internal_universalStatusStore, + universalTestProviderStore as internal_universalTestProviderStore, + listServices, + mapStaticDir, + mdxManifestRef, + mdxQueryStaticPath, + mdxStaticStorePath, + resolveOnboardingInitialPath, + runStoryTests, + sendTelemetryError, + toStoryTestResult, + withTelemetry +}; diff --git a/tools/ui/node_modules/storybook/dist/core-server/presets/common-manager.css b/tools/ui/node_modules/storybook/dist/core-server/presets/common-manager.css new file mode 100644 index 0000000000000000000000000000000000000000..adfae8dbd3390209a29c17878b4daae5cafbaed1 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/core-server/presets/common-manager.css @@ -0,0 +1,170 @@ +/* ../../node_modules/@devtools-ds/tree/dist/main.css */ +.Tree-tree-fbbbe38 { + width: 100%; + font-family: Menlo, monospace; +} +.Tree-item-353d6f3 { + list-style: none; +} +.Tree-group-d3c3d8a { + margin: 0; + padding: 0; + list-style: none; +} +.Tree-group-d3c3d8a .Tree-label-d819155 { + cursor: default; + line-height: 1.5; + width: 100%; + display: inline-block; + outline: 0; + padding-left: 5px; +} +.Tree-group-d3c3d8a .Tree-label-d819155:focus { + background-color: var(--focusColor,#007feb); + color: var(--focusTextColor,undefined); +} +.Tree-group-d3c3d8a .Tree-label-d819155:focus.Tree-focusWhite-f1e00c2 * { + color: #fff; +} +.Tree-group-d3c3d8a .Tree-label-d819155:focus.Tree-focusWhite-f1e00c2 .Tree-arrow-03ab2e7 { + border-color: transparent transparent transparent #fff; +} +.Tree-group-d3c3d8a .Tree-label-d819155.Tree-hover-3cc4e5d:hover:not(:focus) { + background-color: var(--hoverColor,#f2fafe); + border-radius: var(--hoverRadius,0); +} +.Tree-arrow-03ab2e7 { + margin: 0 .7em 0 .1em; + display: inline-block; + width: 0; + height: 0; + border-style: solid; + border-width: .4em 0 .4em .4em; + border-color: transparent transparent transparent var(--arrowColor,#bebec0); + vertical-align: baseline; +} +.Tree-arrow-03ab2e7.Tree-open-3f1a336 { + transform: rotate(90deg); + bottom: -.05em; +} +@media screen and (prefers-reduced-motion: reduce) { + .Tree-arrow-03ab2e7 { + transition: none; + } +} +.Tree-dark-1b4aa00 { + --focusColor:#235895; + --hoverColor:#27272C; + --arrowColor:#9D9D9E; +} +.Tree-chrome-bcbcac6.Tree-light-09174ee { + --focusColor:#CFE8FC; + --hoverColor:#EDF2FC; + --arrowColor:#8E8E8E; + --hoverRadius:6px; +} +.Tree-chrome-bcbcac6.Tree-dark-1b4aa00 { + --focusColor:#093D69; + --hoverColor:#192538; + --arrowColor:#B7B7B7; +} + +/* ../../node_modules/@devtools-ds/object-inspector/dist/main.css */ +.ObjectInspector-object-inspector-0c33e82 { + width: 100%; + font-family: Menlo, monospace; + color: var(--textColor); +} +.ObjectInspector-object-label-b81482b { + color: var(--labelColor,#0a66e6); +} +.ObjectInspector-text-25f57f3 { + color: var(--textColor); +} +.ObjectInspector-key-4f712bb { + color: var(--keyColor,#0a66e6); +} +.ObjectInspector-value-f7ec2e5 { + color: var(--valueColor,#e51ebb); +} +.ObjectInspector-string-c496000 { + color: var(--stringColor,#e51ebb); +} +.ObjectInspector-regex-59d45a3 { + color: var(--regexColor,#0a66e6); +} +.ObjectInspector-error-b818698 { + color: var(--errorColor,#b30000); +} +.ObjectInspector-boolean-2dd1642 { + color: var(--booleanColor,#117c04); +} +.ObjectInspector-number-a6daabb { + color: var(--numberColor,#117c04); +} +.ObjectInspector-undefined-3a68263 { + color: var(--undefinedColor,#6a6a6a); +} +.ObjectInspector-null-74acb50 { + color: var(--nullColor,#6a6a6a); +} +.ObjectInspector-function-07bbdcd { + color: var(--functionColor,#0a66e6); +} +.ObjectInspector-function-decorator-3d22c24 { + color: var(--functionDecoratorColor,#0a66e6); +} +.ObjectInspector-prototype-f2449ee { + color: var(--prototypeColor,#6a6a6a); +} +:root { + --textColor:#6A6A6A; +} +.ObjectInspector-dark-0c96c97 { + --labelColor:#6FB9FF; + --textColor:#9D9D9E; + --keyColor:#6FB9FF; + --valueColor:#EB7ED9; + --stringColor:#EB7ED9; + --regexColor:#6FB9FF; + --errorColor:#FFAED3; + --booleanColor:#81DF6C; + --numberColor:#81DF6C; + --undefinedColor:#9D9D9E; + --nullColor:#9D9D9E; + --prototypeColor:#9D9D9E; + --functionColor:#6FB9FF; + --functionDecoratorColor:#6FB9FF; +} +.ObjectInspector-chrome-2f3ca98.ObjectInspector-light-78bef54 { + --labelColor:#444444; + --textColor:#8E8E8E; + --keyColor:#881280; + --valueColor:#8E8E8E; + --stringColor:#CF4B49; + --regexColor:#CF4B49; + --errorColor:#FF0000; + --booleanColor:#3646B6; + --numberColor:#2D0BC9; + --undefinedColor:#444444; + --nullColor:#444444; + --prototypeColor:#BD84C2; + --functionColor:#303942; + --functionDecoratorColor:#3646B6; +} +.ObjectInspector-chrome-2f3ca98.ObjectInspector-dark-0c96c97 { + --labelColor:#C8C8C8; + --textColor:#EDEEEE; + --keyColor:#F6D9F8; + --valueColor:#C8C8C8; + --stringColor:#EE8953; + --regexColor:#EE8953; + --errorColor:#FD7E7E; + --booleanColor:#987FFD; + --numberColor:#987FFD; + --undefinedColor:#848484; + --nullColor:#848484; + --prototypeColor:#AB98AC; + --functionColor:#EDEEEE; + --functionDecoratorColor:#D0D6FB; +} diff --git a/tools/ui/node_modules/storybook/dist/core-server/presets/common-manager.js b/tools/ui/node_modules/storybook/dist/core-server/presets/common-manager.js new file mode 100644 index 0000000000000000000000000000000000000000..cd1a500a0de21a5ba2065d07fbc40f499a32ada4 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/core-server/presets/common-manager.js @@ -0,0 +1,7273 @@ +import { + getControlId, + getControlSetterButtonId +} from "../../_browser-chunks/chunk-YPBWNTGF.js"; +import { + _defineProperty, + _objectWithoutProperties +} from "../../_browser-chunks/chunk-UAYGIC3L.js"; +import { + $319e236875307eab$export$a9b970dcc4ae71a9 +} from "../../_browser-chunks/chunk-LITCR56V.js"; +import "../../_browser-chunks/chunk-242VQQM5.js"; +import { + curriedDarken$1, + curriedLighten$1, + curriedOpacify$1, + curriedTransparentize$1, + rgba +} from "../../_browser-chunks/chunk-S6TK43XQ.js"; +import { + _extends +} from "../../_browser-chunks/chunk-LE2LTDW3.js"; +import { + dequal, + registerService, + uniq +} from "../../_browser-chunks/chunk-DFGA7I22.js"; +import { + ADDON_ID as ADDON_ID4, + ADDON_ID2 as ADDON_ID5, + PARAM_KEY2 as PARAM_KEY4, + TOOL_ID as TOOL_ID2, + docgenServiceDef +} from "../../_browser-chunks/chunk-5FAQJLSD.js"; +import { + EVENTS +} from "../../_browser-chunks/chunk-ZUWEVLDX.js"; +import { + require_ansi_to_html, + resolveViewport +} from "../../_browser-chunks/chunk-X5VVFFFE.js"; +import "../../_browser-chunks/chunk-W6Y3UHOT.js"; +import "../../_browser-chunks/chunk-KUHYVZJN.js"; +import "../../_browser-chunks/chunk-QC4HFS6K.js"; +import { + mergeServiceArgTypes +} from "../../_browser-chunks/chunk-FLUL445Z.js"; +import { + cloneDeep, + pickBy +} from "../../_browser-chunks/chunk-5GYAEUAU.js"; +import "../../_browser-chunks/chunk-Z3B64JMR.js"; +import "../../_browser-chunks/chunk-NZMVUW5T.js"; +import "../../_browser-chunks/chunk-KK3JJ3E4.js"; +import { + ADDON_ID, + MINIMAL_VIEWPORTS, + PARAM_KEY, + TOOL_ID +} from "../../_browser-chunks/chunk-NQ3W4AUJ.js"; +import "../../_browser-chunks/chunk-IUGBVGDA.js"; +import "../../_browser-chunks/chunk-2HVKLHKJ.js"; +import "../../_browser-chunks/chunk-SC67XZST.js"; +import "../../_browser-chunks/chunk-3LY4VQVK.js"; +import { + ADDON_ID as ADDON_ID2, + CLEAR_ID, + EVENT_ID, + PANEL_ID, + PARAM_KEY as PARAM_KEY2 +} from "../../_browser-chunks/chunk-6XWLIJQL.js"; +import { + ADDON_ID as ADDON_ID3, + DEFAULT_BACKGROUNDS, + PARAM_KEY as PARAM_KEY3 +} from "../../_browser-chunks/chunk-6YDLG6WW.js"; +import { + __toESM +} from "../../_browser-chunks/chunk-IMSF75WX.js"; + +// src/shared/open-service/services/docgen/manager.tsx +import { addons } from "storybook/manager-api"; +var ADDON_ID6 = "core/docgen", manager_default = addons.register(ADDON_ID6, () => { + globalThis.FEATURES?.experimentalDocgenServer && registerService(docgenServiceDef); +}); + +// src/controls/manager.tsx +import React28 from "react"; +import { AddonPanel } from "storybook/internal/components"; +import { SAVE_STORY_REQUEST, SAVE_STORY_RESPONSE } from "storybook/internal/core-events"; +import { FailedIcon, PassedIcon } from "@storybook/icons"; +import { addons as addons2, experimental_requestResponse, getService, types } from "storybook/manager-api"; +import { color } from "storybook/theming"; + +// src/controls/components/ControlsPanel.tsx +import React26, { useEffect as useEffect9, useMemo as useMemo3, useState as useState11 } from "react"; +import { STORY_FINISHED, STORY_PREPARED } from "storybook/internal/core-events"; +import { global } from "@storybook/global"; +import { + useArgTypes, + useArgs, + useChannel, + useGlobals, + useParameter, + useServiceQuery, + useStorybookApi, + useStorybookState +} from "storybook/manager-api"; +import { styled as styled21 } from "storybook/theming"; + +// ../addons/docs/src/blocks/components/ArgsTable/ArgsTable.tsx +import React24, { useCallback as useCallback6, useEffect as useEffect8, useRef as useRef5, useState as useState10 } from "react"; +import { once } from "storybook/internal/client-logger"; +import { Button as Button5, Link as Link3, ResetWrapper } from "storybook/internal/components"; +import { includeConditionalArg } from "storybook/internal/csf"; +import { DocumentIcon as DocumentIcon2, UndoIcon } from "@storybook/icons"; +import { styled as styled19 } from "storybook/theming"; + +// ../addons/docs/src/blocks/components/EmptyBlock.tsx +import React from "react"; +import { withReset } from "storybook/internal/components"; +import { styled } from "storybook/theming"; +var Wrapper = styled.div(withReset, ({ theme: theme3 }) => ({ + backgroundColor: theme3.base === "light" ? "rgba(0,0,0,.01)" : "rgba(255,255,255,.01)", + borderRadius: theme3.appBorderRadius, + border: `1px dashed ${theme3.appBorderColor}`, + display: "flex", + alignItems: "center", + justifyContent: "center", + padding: 20, + margin: "25px 0 40px", + color: curriedTransparentize$1(0.3, theme3.color.defaultText), + fontSize: theme3.typography.size.s2 +})), EmptyBlock = (props) => React.createElement(Wrapper, { ...props, className: "docblock-emptyblock sb-unstyled" }); + +// ../addons/docs/src/blocks/components/ArgsTable/ArgRow.tsx +import React20 from "react"; +import { codeCommon as codeCommon3 } from "storybook/internal/components"; + +// ../../node_modules/markdown-to-jsx/dist/index.modern.js +import * as e from "react"; +function n() { + return n = Object.assign ? Object.assign.bind() : function(e2) { + for (var n2 = 1; n2 < arguments.length; n2++) { + var r2 = arguments[n2]; + for (var t in r2) Object.prototype.hasOwnProperty.call(r2, t) && (e2[t] = r2[t]); + } + return e2; + }, n.apply(this, arguments); +} +var r = ["children", "options"]; +var o = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e2, n2) => (e2[n2.toLowerCase()] = n2, e2), { class: "className", for: "htmlFor" }), a = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: "\xA0", quot: "\u201C" }, c = ["style", "script", "pre"], i = ["src", "href", "data", "formAction", "srcDoc", "action"], u = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, l = /\n{2,}$/, s = /^(\s*>[\s\S]*?)(?=\n\n|$)/, f = /^ *> ?/gm, _ = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, d = /^ {2,}\n/, p = /^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/, y = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, h = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, g = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, m = /^(?:\n *)*\n/, k = /\r\n?/g, x = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, q = /^\[\^([^\]]+)]/, v = /\f/g, b = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, $ = /^\s*?\[(x|\s)\]/, S = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, z = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, E = /^([^\n]+)\n *(=|-)\2{2,} *\n/, A = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, R = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, B = /^)/, L = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, O = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, j = /^\{.*\}$/, C = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, I = /^<([^ >]+[:@\/][^ >]+)>/, T = /-([a-z])?/gi, M = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, w = /^[^\n]+(?: \n|\n{2,})/, D = /^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/, F = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, P = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Z = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, N = /\t/g, G = /(^ *\||\| *$)/g, U = /^ *:-+: *$/, V = /^ *:-+ *$/, H = /^ *-+: *$/, Q = (e2) => `(?=[\\s\\S]+?\\1${e2 ? "\\1" : ""})`, W = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", J = RegExp(`^([*_])\\1${Q(1)}${W}\\1\\1(?!\\1)`), K = RegExp(`^([*_])${Q(0)}${W}\\1(?!\\1)`), X = RegExp(`^(==)${Q(0)}${W}\\1`), Y = RegExp(`^(~~)${Q(0)}${W}\\1`), ee = /^(:[a-zA-Z0-9-_]+:)/, ne = /^\\([^0-9A-Za-z\s])/, re = /\\([^0-9A-Za-z\s])/g, te = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/, oe = /^\n+/, ae = /^([ \t]*)/, ce = /(?:^|\n)( *)$/, ie = "(?:\\d+\\.)", ue = "(?:[*+-])"; +function le(e2) { + return "( *)(" + (e2 === 1 ? ie : ue) + ") +"; +} +var se = le(1), fe = le(2); +function _e(e2) { + return RegExp("^" + (e2 === 1 ? se : fe)); +} +var de = _e(1), pe = _e(2); +function ye(e2) { + return RegExp("^" + (e2 === 1 ? se : fe) + "[^\\n]*(?:\\n(?!\\1" + (e2 === 1 ? ie : ue) + " )[^\\n]*)*(\\n|$)", "gm"); +} +var he = ye(1), ge = ye(2); +function me(e2) { + let n2 = e2 === 1 ? ie : ue; + return RegExp("^( *)(" + n2 + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + n2 + " (?!" + n2 + " ))\\n*|\\s*\\n*$)"); +} +var ke = me(1), xe = me(2); +function qe(e2, n2) { + let r2 = n2 === 1, t = r2 ? ke : xe, o2 = r2 ? he : ge, a2 = r2 ? de : pe; + return { t: (e3) => a2.test(e3), o: je(function(e3, n3) { + let r3 = ce.exec(n3.prevCapture); + return r3 && (n3.list || !n3.inline && !n3.simple) ? t.exec(e3 = r3[1] + e3) : null; + }), i: 1, u(e3, n3, t2) { + let c2 = r2 ? +e3[2] : void 0, i2 = e3[0].replace(l, ` +`).match(o2), u2 = !1; + return { items: i2.map(function(e4, r3) { + let o3 = a2.exec(e4)[0].length, c3 = RegExp("^ {1," + o3 + "}", "gm"), l2 = e4.replace(c3, "").replace(a2, ""), s2 = r3 === i2.length - 1, f2 = l2.indexOf(` + +`) !== -1 || s2 && u2; + u2 = f2; + let _2 = t2.inline, d2 = t2.list, p2; + t2.list = !0, f2 ? (t2.inline = !1, p2 = Se(l2) + ` + +`) : (t2.inline = !0, p2 = Se(l2)); + let y2 = n3(p2, t2); + return t2.inline = _2, t2.list = d2, y2; + }), ordered: r2, start: c2 }; + }, l: (n3, r3, t2) => e2(n3.ordered ? "ol" : "ul", { key: t2.key, start: n3.type === "20" ? n3.start : void 0 }, n3.items.map(function(n4, o3) { + return e2("li", { key: o3 }, r3(n4, t2)); + })) }; +} +var ve = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), be = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/; +function $e(e2) { + return typeof e2 == "string"; +} +function Se(e2) { + let n2 = e2.length; + for (; n2 > 0 && e2[n2 - 1] <= " "; ) n2--; + return e2.slice(0, n2); +} +function ze(e2, n2) { + return e2.startsWith(n2); +} +function Ee(e2, n2, r2) { + if (Array.isArray(r2)) { + for (let n3 = 0; n3 < r2.length; n3++) if (ze(e2, r2[n3])) return !0; + return !1; + } + return r2(e2, n2); +} +function Ae(e2) { + return e2.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase(); +} +function Re(e2) { + return H.test(e2) ? "right" : U.test(e2) ? "center" : V.test(e2) ? "left" : null; +} +function Be(e2, n2, r2, t) { + let o2 = r2.inTable; + r2.inTable = !0; + let a2 = [[]], c2 = ""; + function i2() { + if (!c2) return; + let e3 = a2[a2.length - 1]; + e3.push.apply(e3, n2(c2, r2)), c2 = ""; + } + return e2.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e3, n3, r3) => { + e3.trim() === "|" && (i2(), t) ? n3 !== 0 && n3 !== r3.length - 1 && a2.push([]) : c2 += e3; + }), i2(), r2.inTable = o2, a2; +} +function Le(e2, n2, r2) { + r2.inline = !0; + let t = e2[2] ? e2[2].replace(G, "").split("|").map(Re) : [], o2 = e2[3] ? (function(e3, n3, r3) { + return e3.trim().split(` +`).map(function(e4) { + return Be(e4, n3, r3, !0); + }); + })(e2[3], n2, r2) : [], a2 = Be(e2[1], n2, r2, !!o2.length); + return r2.inline = !1, o2.length ? { align: t, cells: o2, header: a2, type: "25" } : { children: a2, type: "21" }; +} +function Oe(e2, n2) { + return e2.align[n2] == null ? {} : { textAlign: e2.align[n2] }; +} +function je(e2) { + return e2.inline = 1, e2; +} +function Ce(e2) { + return je(function(n2, r2) { + return r2.inline ? e2.exec(n2) : null; + }); +} +function Ie(e2) { + return je(function(n2, r2) { + return r2.inline || r2.simple ? e2.exec(n2) : null; + }); +} +function Te(e2) { + return function(n2, r2) { + return r2.inline || r2.simple ? null : e2.exec(n2); + }; +} +function Me(e2) { + return je(function(n2) { + return e2.exec(n2); + }); +} +var we = /(javascript|vbscript|data(?!:image)):/i; +function De(e2) { + try { + let n2 = decodeURIComponent(e2).replace(/[^A-Za-z0-9/:]/g, ""); + if (we.test(n2)) return null; + } catch { + return null; + } + return e2; +} +function Fe(e2) { + return e2 && e2.replace(re, "$1"); +} +function Pe(e2, n2, r2) { + let t = r2.inline || !1, o2 = r2.simple || !1; + r2.inline = !0, r2.simple = !0; + let a2 = e2(n2, r2); + return r2.inline = t, r2.simple = o2, a2; +} +function Ze(e2, n2, r2) { + let t = r2.inline || !1, o2 = r2.simple || !1; + r2.inline = !1, r2.simple = !0; + let a2 = e2(n2, r2); + return r2.inline = t, r2.simple = o2, a2; +} +function Ne(e2, n2, r2) { + let t = r2.inline || !1; + r2.inline = !1; + let o2 = e2(n2, r2); + return r2.inline = t, o2; +} +var Ge = (e2, n2, r2) => ({ children: Pe(n2, e2[2], r2) }); +function Ue() { + return {}; +} +function Ve() { + return null; +} +function He(...e2) { + return e2.filter(Boolean).join(" "); +} +function Qe(e2, n2, r2) { + let t = e2, o2 = n2.split("."); + for (; o2.length && (t = t[o2[0]], t !== void 0); ) o2.shift(); + return t || r2; +} +function We(r2 = "", t = {}) { + t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? n({}, a, t.namedCodesToUnicode) : a; + let l2 = t.slugify || Ae, G2 = t.sanitizer || De, U2 = t.createElement || e.createElement, V2 = [s, y, h, t.enforceAtxHeadings ? z : S, E, M, ke, xe], H2 = [...V2, w, A, B, O]; + function Q2(e2, n2) { + for (let r3 = 0; r3 < e2.length; r3++) if (e2[r3].test(n2)) return !0; + return !1; + } + function W2(e2, r3, ...o2) { + let a2 = Qe(t.overrides, e2 + ".props", {}); + return U2((function(e3, n2) { + let r4 = Qe(n2, e3); + return r4 ? typeof r4 == "function" || typeof r4 == "object" && "render" in r4 ? r4 : Qe(n2, e3 + ".component", e3) : e3; + })(e2, t.overrides), n({}, r3, a2, { className: He(r3?.className, a2.className) || void 0 }), ...o2); + } + function re2(e2) { + e2 = e2.replace(b, ""); + let n2 = !1; + t.forceInline ? n2 = !0 : t.forceBlock || (n2 = Z.test(e2) === !1); + let r3 = fe2(se2(n2 ? e2 : Se(e2).replace(oe, "") + ` + +`, { inline: n2 })); + for (; $e(r3[r3.length - 1]) && !r3[r3.length - 1].trim(); ) r3.pop(); + if (t.wrapper === null) return r3; + let o2 = t.wrapper || (n2 ? "span" : "div"), a2; + if (r3.length > 1 || t.forceWrapper) a2 = r3; + else { + if (r3.length === 1) return a2 = r3[0], typeof a2 == "string" ? W2("span", { key: "outer" }, a2) : a2; + a2 = null; + } + return U2(o2, { key: "outer" }, a2); + } + function ce2(e2, n2) { + if (!n2 || !n2.trim()) return null; + let r3 = n2.match(u); + return r3 ? r3.reduce(function(n3, r4) { + let t2 = r4.indexOf("="); + if (t2 !== -1) { + let a2 = (function(e3) { + return e3.indexOf("-") !== -1 && e3.match(L) === null && (e3 = e3.replace(T, function(e4, n4) { + return n4.toUpperCase(); + })), e3; + })(r4.slice(0, t2)).trim(), c2 = (function(e3) { + let n4 = e3[0]; + return (n4 === '"' || n4 === "'") && e3.length >= 2 && e3[e3.length - 1] === n4 ? e3.slice(1, -1) : e3; + })(r4.slice(t2 + 1).trim()), u2 = o[a2] || a2; + if (u2 === "ref") return n3; + let l3 = n3[u2] = (function(e3, n4, r5, t3) { + return n4 === "style" ? (function(e4) { + let n5 = [], r6 = "", t4 = !1, o2 = !1, a3 = ""; + if (!e4) return n5; + for (let c4 = 0; c4 < e4.length; c4++) { + let i2 = e4[c4]; + if (i2 !== '"' && i2 !== "'" || t4 || (o2 ? i2 === a3 && (o2 = !1, a3 = "") : (o2 = !0, a3 = i2)), i2 === "(" && r6.endsWith("url") ? t4 = !0 : i2 === ")" && t4 && (t4 = !1), i2 !== ";" || o2 || t4) r6 += i2; + else { + let e5 = r6.trim(); + if (e5) { + let r7 = e5.indexOf(":"); + if (r7 > 0) { + let t5 = e5.slice(0, r7).trim(), o3 = e5.slice(r7 + 1).trim(); + n5.push([t5, o3]); + } + } + r6 = ""; + } + } + let c3 = r6.trim(); + if (c3) { + let e5 = c3.indexOf(":"); + if (e5 > 0) { + let r7 = c3.slice(0, e5).trim(), t5 = c3.slice(e5 + 1).trim(); + n5.push([r7, t5]); + } + } + return n5; + })(r5).reduce(function(n5, [r6, o2]) { + return n5[r6.replace(/(-[a-z])/g, (e4) => e4[1].toUpperCase())] = t3(o2, e3, r6), n5; + }, {}) : i.indexOf(n4) !== -1 ? t3(Fe(r5), e3, n4) : (r5.match(j) && (r5 = Fe(r5.slice(1, r5.length - 1))), r5 === "true" || r5 !== "false" && r5); + })(e2, a2, c2, G2); + typeof l3 == "string" && (A.test(l3) || O.test(l3)) && (n3[u2] = re2(l3.trim())); + } else r4 !== "style" && (n3[o[r4] || r4] = !0); + return n3; + }, {}) : null; + } + let ie2 = [], ue2 = {}, le2 = { 0: { t: [">"], o: Te(s), i: 1, u(e2, n2, r3) { + let [, t2, o2] = e2[0].replace(f, "").match(_); + return { alert: t2, children: n2(o2, r3) }; + }, l(e2, n2, r3) { + let t2 = { key: r3.key }; + return e2.alert && (t2.className = "markdown-alert-" + l2(e2.alert.toLowerCase(), Ae), e2.children.unshift({ attrs: {}, children: [{ type: "27", text: e2.alert }], noInnerParse: !0, type: "11", tag: "header" })), W2("blockquote", t2, n2(e2.children, r3)); + } }, 1: { t: [" "], o: Me(d), i: 1, u: Ue, l: (e2, n2, r3) => W2("br", { key: r3.key }) }, 2: { t: ["--", "__", "**", "- ", "* ", "_ "], o: Te(p), i: 1, u: Ue, l: (e2, n2, r3) => W2("hr", { key: r3.key }) }, 3: { t: [" "], o: Te(h), i: 0, u: (e2) => ({ lang: void 0, text: Fe(Se(e2[0].replace(/^ {4}/gm, ""))) }), l: (e2, r3, t2) => W2("pre", { key: t2.key }, W2("code", n({}, e2.attrs, { className: e2.lang ? "lang-" + e2.lang : "" }), e2.text)) }, 4: { t: ["```", "~~~"], o: Te(y), i: 0, u: (e2) => ({ attrs: ce2("code", e2[3] || ""), lang: e2[2] || void 0, text: e2[4], type: "3" }) }, 5: { t: ["`"], o: Ie(g), i: 3, u: (e2) => ({ text: Fe(e2[2]) }), l: (e2, n2, r3) => W2("code", { key: r3.key }, e2.text) }, 6: { t: ["[^"], o: Te(x), i: 0, u: (e2) => (ie2.push({ footnote: e2[2], identifier: e2[1] }), {}), l: Ve }, 7: { t: ["[^"], o: Ce(q), i: 1, u: (e2) => ({ target: "#" + l2(e2[1], Ae), text: e2[1] }), l: (e2, n2, r3) => W2("a", { key: r3.key, href: G2(e2.target, "a", "href") }, W2("sup", { key: r3.key }, e2.text)) }, 8: { t: ["[ ]", "[x]"], o: Ce($), i: 1, u: (e2) => ({ completed: e2[1].toLowerCase() === "x" }), l: (e2, n2, r3) => W2("input", { checked: e2.completed, key: r3.key, readOnly: !0, type: "checkbox" }) }, 9: { t: ["#"], o: Te(t.enforceAtxHeadings ? z : S), i: 1, u: (e2, n2, r3) => ({ children: Pe(n2, e2[2], r3), id: l2(e2[2], Ae), level: e2[1].length }), l: (e2, n2, r3) => W2("h" + e2.level, { id: e2.id, key: r3.key }, n2(e2.children, r3)) }, 10: { t: (e2) => { + let n2 = e2.indexOf(` +`); + return n2 > 0 && n2 < e2.length - 1 && (e2[n2 + 1] === "=" || e2[n2 + 1] === "-"); + }, o: Te(E), i: 1, u: (e2, n2, r3) => ({ children: Pe(n2, e2[1], r3), level: e2[2] === "=" ? 1 : 2, type: "9" }) }, 11: { t: ["<"], o: Me(A), i: 1, u(e2, n2, r3) { + let [, t2] = e2[3].match(ae), o2 = RegExp("^" + t2, "gm"), a2 = e2[3].replace(o2, ""), i2 = Q2(H2, a2) ? Ne : Pe, u2 = e2[1].toLowerCase(), l3 = c.indexOf(u2) !== -1, s2 = (l3 ? u2 : e2[1]).trim(), f2 = { attrs: ce2(s2, e2[2]), noInnerParse: l3, tag: s2 }; + if (r3.inAnchor = r3.inAnchor || u2 === "a", l3) f2.text = e2[3]; + else { + let e3 = r3.inHTML; + r3.inHTML = !0, f2.children = i2(n2, a2, r3), r3.inHTML = e3; + } + return r3.inAnchor = !1, f2; + }, l: (e2, r3, t2) => W2(e2.tag, n({ key: t2.key }, e2.attrs), e2.text || (e2.children ? r3(e2.children, t2) : "")) }, 13: { t: ["<"], o: Me(O), i: 1, u(e2) { + let n2 = e2[1].trim(); + return { attrs: ce2(n2, e2[2] || ""), tag: n2 }; + }, l: (e2, r3, t2) => W2(e2.tag, n({}, e2.attrs, { key: t2.key })) }, 12: { t: [""); + case Node.PROCESSING_INSTRUCTION_NODE: + return React142.createElement("span", null, data.nodeName); + case Node.DOCUMENT_TYPE_NODE: + return React142.createElement("span", { + style: styles.htmlDoctype + }, ""); + case Node.DOCUMENT_NODE: + return React142.createElement("span", null, data.nodeName); + case Node.DOCUMENT_FRAGMENT_NODE: + return React142.createElement("span", null, data.nodeName); + default: + return React142.createElement("span", null, nameByNodeType[data.nodeType]); + } +}, domIterator = function* (data) { + if (data && data.childNodes) { + if (shouldInline(data)) + return; + for (let i2 = 0; i2 < data.childNodes.length; i2++) { + let node = data.childNodes[i2]; + node.nodeType === Node.TEXT_NODE && node.textContent.trim().length === 0 || (yield { + name: `${node.tagName}[${i2}]`, + data: node + }); + } + data.tagName && (yield { + name: "CLOSE_TAG", + data: { + tagName: data.tagName + }, + isCloseTag: !0 + }); + } +}, DOMInspector = (props) => React152.createElement(TreeView, { + nodeRenderer: DOMNodePreview, + dataIterator: domIterator, + ...props +}), themedDOMInspector = themeAcceptor(DOMInspector), import_is_dom = __toESM2(require_is_dom()), Inspector = ({ table = !1, data, ...rest }) => table ? React162.createElement(themedTableInspector, { + data, + ...rest +}) : (0, import_is_dom.default)(data) ? React162.createElement(themedDOMInspector, { + data, + ...rest +}) : React162.createElement(themedObjectInspector, { + data, + ...rest +}); + +// src/actions/components/ActionLogger/index.tsx +import { styled as styled23, withTheme } from "storybook/theming"; + +// src/actions/components/ActionLogger/style.tsx +import { styled as styled22 } from "storybook/theming"; +var Action = styled22.div({ + display: "flex", + padding: 0, + borderLeft: "5px solid transparent", + borderBottom: "1px solid transparent", + transition: "all 0.1s", + alignItems: "flex-start", + whiteSpace: "pre" +}), Counter = styled22.div(({ theme: theme3 }) => ({ + backgroundColor: curriedOpacify$1(0.5, theme3.appBorderColor), + color: theme3.color.inverseText, + fontSize: theme3.typography.size.s1, + fontWeight: theme3.typography.weight.bold, + lineHeight: 1, + padding: "1px 5px", + borderRadius: 20, + margin: "2px 0px" +})), InspectorContainer = styled22.div({ + flex: 1, + padding: "0 0 0 5px" +}); + +// src/actions/components/ActionLogger/index.tsx +var UnstyledWrapped = forwardRef( + ({ children, className }, ref) => React31.createElement(ScrollArea, { ref, horizontal: !0, vertical: !0, className }, children) +); +UnstyledWrapped.displayName = "UnstyledWrapped"; +var Wrapper8 = styled23(UnstyledWrapped)({ + margin: 0, + padding: "10px 5px 20px" +}), ThemedInspector = withTheme(({ theme: theme3, ...props }) => React31.createElement(Inspector, { theme: theme3.addonActionsTheme || "chromeLight", table: !1, ...props })), ActionLogger = ({ actions, expandLevel, onClear }) => { + let wrapperRef = useRef6(null), wrapper = wrapperRef.current, wasAtBottom = wrapper && wrapper.scrollHeight - wrapper.scrollTop === wrapper.clientHeight; + return useEffect10(() => { + wasAtBottom && (wrapperRef.current.scrollTop = wrapperRef.current.scrollHeight); + }, [wasAtBottom, actions.length]), React31.createElement(Fragment, null, React31.createElement(Wrapper8, { ref: wrapperRef }, actions.map((action) => React31.createElement(Action, { key: action.id }, action.count > 1 && React31.createElement(Counter, null, action.count), React31.createElement(InspectorContainer, null, React31.createElement( + ThemedInspector, + { + sortObjectKeys: !0, + showNonenumerable: !1, + name: action.data.name, + data: action.data.args ?? action.data, + expandLevel + } + ))))), React31.createElement(ActionBar, { actionItems: [{ title: "Clear", onClick: onClear }] })); +}; + +// src/actions/containers/ActionLogger/index.tsx +var safeDeepEqual = (a2, b2) => { + try { + return dequal(a2, b2); + } catch { + return !1; + } +}; +function ActionLogger2({ active, api }) { + let [actions, setActions] = useState13([]), expandLevel = useParameter2(PARAM_KEY2)?.expandLevel ?? 1, clearActions = useCallback8(() => { + api.emit(CLEAR_ID), setActions([]); + }, [api]), addAction = useCallback8((action) => { + setActions((prevActions) => { + let limit = action.options.limit ?? 50, previous = prevActions.length ? prevActions[prevActions.length - 1] : null; + if (previous && safeDeepEqual(previous.data, action.data)) { + let updated = [...prevActions]; + return updated[updated.length - 1] = { + ...previous, + count: previous.count + 1 + }, updated.slice(-limit); + } else { + let newAction = { ...action, count: 1 }; + return [...prevActions, newAction].slice(-limit); + } + }); + }, []), handleStoryChange = useCallback8(() => { + actions.length > 0 && actions[0].options.clearOnStoryChange && clearActions(); + }, [actions, clearActions]); + useEffect11(() => (api.on(EVENT_ID, addAction), api.on(STORY_CHANGED2, handleStoryChange), () => { + api.off(EVENT_ID, addAction), api.off(STORY_CHANGED2, handleStoryChange); + }), [api, addAction, handleStoryChange]); + let props = useMemo5( + () => ({ + actions, + expandLevel, + onClear: clearActions + }), + [actions, expandLevel, clearActions] + ); + return active ? React33.createElement(ActionLogger, { ...props }) : null; +} + +// src/actions/manager.tsx +var manager_default3 = addons3.register(ADDON_ID2, (api) => { + globalThis?.FEATURES?.actions && addons3.add(PANEL_ID, { + title: Title2, + type: types2.PANEL, + render: ({ active }) => React34.createElement(ActionLogger2, { api, active: !!active }), + paramKey: PARAM_KEY2 + }); +}); + +// src/component-testing/manager.tsx +import React57 from "react"; +import { AddonPanel as AddonPanel2 } from "storybook/internal/components"; +import { Consumer, addons as addons4, types as types3 } from "storybook/manager-api"; + +// src/component-testing/components/Panel.tsx +import React55, { Fragment as Fragment3, memo as memo4, useEffect as useEffect18, useMemo as useMemo6, useRef as useRef7, useState as useState20 } from "react"; +import { + FORCE_REMOUNT, + PLAY_FUNCTION_THREW_EXCEPTION, + STORY_RENDER_PHASE_CHANGED, + STORY_THREW_EXCEPTION, + UNHANDLED_ERRORS_WHILE_PLAYING +} from "storybook/internal/core-events"; +import { global as global2 } from "@storybook/global"; +import { + experimental_useStatusStore, + useAddonState as useAddonState2, + useChannel as useChannel3, + useParameter as useParameter3, + useStorybookApi as useStorybookApi6, + useStorybookState as useStorybookState2 +} from "storybook/manager-api"; + +// src/component-testing/constants.ts +var ADDON_ID8 = "storybook/interactions", PANEL_ID2 = `${ADDON_ID8}/panel`, PARAM_KEY6 = "interactions", DOCUMENTATION_LINK = "writing-tests/integrations/vitest-addon", DOCUMENTATION_DISCREPANCY_LINK = `${DOCUMENTATION_LINK}#what-happens-when-there-are-different-test-results-in-multiple-environments`, DOCUMENTATION_PLAY_FUNCTION_LINK = "writing-stories/play-function#writing-stories-with-the-play-function", INTERNAL_RENDER_CALL_ID = "internal_render_call"; + +// ../addons/a11y/src/constants.ts +var ADDON_ID9 = "storybook/a11y", PANEL_ID3 = `${ADDON_ID9}/panel`; +var UI_STATE_ID = `${ADDON_ID9}/ui`, RESULT = `${ADDON_ID9}/result`, REQUEST = `${ADDON_ID9}/request`, RUNNING = `${ADDON_ID9}/running`, ERROR2 = `${ADDON_ID9}/error`, MANUAL = `${ADDON_ID9}/manual`, SELECT = `${ADDON_ID9}/select`, DOCUMENTATION_LINK2 = "writing-tests/accessibility-testing", DOCUMENTATION_DISCREPANCY_LINK2 = `${DOCUMENTATION_LINK2}#why-are-my-tests-failing-in-different-environments`; + +// ../addons/vitest/src/constants.ts +var ADDON_ID10 = "storybook/test", TEST_PROVIDER_ID = `${ADDON_ID10}/test-provider`, STORYBOOK_ADDON_TEST_CHANNEL = `${ADDON_ID10}/channel`; +var DOCUMENTATION_LINK3 = "writing-tests/integrations/vitest-addon", DOCUMENTATION_FATAL_ERROR_LINK = `${DOCUMENTATION_LINK3}#what-happens-if-vitest-itself-has-an-error`; +var storeOptions = { + id: ADDON_ID10, + initialState: { + config: { + coverage: !1, + a11y: !1 + }, + watching: !1, + cancelling: !1, + fatalError: void 0, + index: { entries: {}, v: 5 }, + previewAnnotations: [], + currentRun: { + triggeredBy: void 0, + config: { + coverage: !1, + a11y: !1 + }, + componentTestStatuses: [], + a11yStatuses: [], + a11yReports: {}, + reports: {}, + componentTestCount: { + success: 0, + error: 0 + }, + a11yCount: { + success: 0, + warning: 0, + error: 0 + }, + storyIds: void 0, + totalTestCount: void 0, + startedAt: void 0, + finishedAt: void 0, + unhandledErrors: [], + coverageSummary: void 0 + } + } +}; +var STORE_CHANNEL_EVENT_NAME = `UNIVERSAL_STORE:${storeOptions.id}`; +var STATUS_TYPE_ID_COMPONENT_TEST = "storybook/component-test"; +var TRIGGER_TEST_RUN_REQUEST = `${ADDON_ID10}/trigger-test-run-request`, TRIGGER_TEST_RUN_RESPONSE = `${ADDON_ID10}/trigger-test-run-response`; + +// src/component-testing/components/InteractionsPanel.tsx +import * as React54 from "react"; +import { srOnlyStyles as srOnlyStyles3, styled as styled32 } from "storybook/theming"; + +// src/component-testing/utils.ts +var import_ansi_to_html = __toESM(require_ansi_to_html(), 1); +import { useTheme } from "storybook/theming"; + +// ../../node_modules/ansi-regex/index.js +function ansiRegex({ onlyFirst = !1 } = {}) { + let pattern = "(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]"; + return new RegExp(pattern, onlyFirst ? void 0 : "g"); +} + +// ../../node_modules/strip-ansi/index.js +var regex = ansiRegex(); +function stripAnsi(string) { + if (typeof string != "string") + throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); + return !string.includes("\x1B") && !string.includes("\x9B") ? string : string.replace(regex, ""); +} + +// src/component-testing/utils.ts +function isInteractionsDisabled(parameters) { + return !!parameters?.[PARAM_KEY6]?.disable; +} +function isTestAssertionError(error) { + return isChaiError(error) || isJestError(error); +} +function isChaiError(error) { + return error && typeof error == "object" && "name" in error && typeof error.name == "string" && error.name === "AssertionError"; +} +function isJestError(error) { + return error && typeof error == "object" && "message" in error && typeof error.message == "string" && stripAnsi(error.message).startsWith("expect("); +} +function createAnsiToHtmlFilter(theme3) { + return new import_ansi_to_html.default({ + escapeXML: !0, + fg: theme3.color.defaultText, + bg: theme3.background.content + }); +} +function useAnsiToHtmlFilter() { + let theme3 = useTheme(); + return createAnsiToHtmlFilter(theme3); +} + +// src/component-testing/components/DetachedDebuggerMessage.tsx +import React35 from "react"; +import { Link as Link4 } from "storybook/internal/components"; +import { styled as styled24 } from "storybook/theming"; +var Wrapper9 = styled24.div(({ theme: { color: color2, typography: typography4, background } }) => ({ + textAlign: "start", + padding: "11px 15px", + fontSize: `${typography4.size.s2 - 1}px`, + fontWeight: typography4.weight.regular, + lineHeight: "1rem", + background: background.app, + borderBottom: `1px solid ${color2.border}`, + color: color2.defaultText, + backgroundClip: "padding-box", + position: "relative" +})), DetachedDebuggerMessage = ({ storyUrl }) => React35.createElement(Wrapper9, null, "Debugger controls are not available on composed Storybooks.", " ", React35.createElement( + Link4, + { + href: `${storyUrl}&addonPanel=${PANEL_ID2}`, + target: "_blank", + rel: "noopener noreferrer", + withArrow: !0 + }, + "Open in external Storybook" +)); + +// src/component-testing/components/EmptyState.tsx +import React36, { useEffect as useEffect12, useState as useState14 } from "react"; +import { EmptyTabContent as EmptyTabContent2, Link as Link5 } from "storybook/internal/components"; +import { DocumentIcon as DocumentIcon3 } from "@storybook/icons"; +import { useStorybookApi as useStorybookApi4 } from "storybook/manager-api"; +import { styled as styled25 } from "storybook/theming"; +var Links2 = styled25.div(({ theme: theme3 }) => ({ + display: "flex", + fontSize: theme3.typography.size.s2 - 1, + gap: 25 +})), Empty2 = () => { + let [isLoading, setIsLoading] = useState14(!0), docsUrl = useStorybookApi4().getDocsUrl({ + subpath: DOCUMENTATION_PLAY_FUNCTION_LINK, + versioned: !0, + renderer: !0 + }); + return useEffect12(() => { + let load = setTimeout(() => { + setIsLoading(!1); + }, 100); + return () => clearTimeout(load); + }, []), isLoading ? null : React36.createElement("div", null, React36.createElement( + EmptyTabContent2, + { + title: "Interactions", + description: React36.createElement(React36.Fragment, null, "Interactions allow you to verify the functional aspects of UIs. Write a play function for your story and you'll see it run here."), + footer: React36.createElement(Links2, null, React36.createElement(Link5, { href: docsUrl, target: "_blank", withArrow: !0 }, React36.createElement(DocumentIcon3, null), " Read docs")) + } + )); +}; + +// src/component-testing/components/Interaction.tsx +import * as React49 from "react"; +import { Button as Button7 } from "storybook/internal/components"; +import { ChevronDownIcon as ChevronDownIcon3, ChevronUpIcon as ChevronUpIcon2 } from "@storybook/icons"; +import { styled as styled28, typography as typography2 } from "storybook/theming"; + +// src/component-testing/components/MatcherResult.tsx +import React47 from "react"; +import { styled as styled26, typography } from "storybook/theming"; + +// src/component-testing/components/MethodCall.tsx +import React46, { Fragment as Fragment2 } from "react"; +import { logger as logger4 } from "storybook/internal/client-logger"; + +// ../../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectInspector.js +import React45, { useEffect as useEffect16, useState as useState18 } from "react"; + +// ../../node_modules/@devtools-ds/object-inspector/node_modules/clsx/dist/clsx.m.js +function toVal(mix) { + var k2, y2, str = ""; + if (mix) + if (typeof mix == "object") + if (Array.isArray(mix)) + for (k2 = 0; k2 < mix.length; k2++) + mix[k2] && (y2 = toVal(mix[k2])) && (str && (str += " "), str += y2); + else + for (k2 in mix) + mix[k2] && (y2 = toVal(k2)) && (str && (str += " "), str += y2); + else typeof mix != "boolean" && !mix.call && (str && (str += " "), str += mix); + return str; +} +function clsx_m_default() { + for (var i2 = 0, x2, str = ""; i2 < arguments.length; ) + (x2 = toVal(arguments[i2++])) && (str && (str += " "), str += x2); + return str; +} + +// ../../node_modules/@devtools-ds/object-parser/dist/esm/index.js +var isArray = (val) => Array.isArray(val) || // Detect https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays +ArrayBuffer.isView(val) && !(val instanceof DataView), isObject = (val) => val !== null && typeof val == "object" && !isArray(val) && !(val instanceof Date) && !(val instanceof RegExp) && !(val instanceof Error) && !(val instanceof WeakMap) && !(val instanceof WeakSet), isKnownObject = (val) => isObject(val) || isArray(val) || typeof val == "function" || val instanceof Promise, getPromiseState = (promise) => { + let unique = /unique/; + return Promise.race([promise, unique]).then((result) => result === unique ? ["pending"] : ["fulfilled", result], (e2) => ["rejected", e2]); +}, buildAST = async (key, value, depth, sortKeys, isPrototype, showPrototype) => { + let astNode = { + key, + depth, + value, + type: "value", + parent: void 0 + }; + if (value && isKnownObject(value) && depth < 100) { + let children = [], t = "object"; + if (isArray(value)) { + for (let i2 = 0; i2 < value.length; i2++) + children.push(async () => { + let child = await buildAST(i2.toString(), value[i2], depth + 1, sortKeys); + return child.parent = astNode, child; + }); + t = "array"; + } else { + let keys = Object.getOwnPropertyNames(value); + sortKeys && keys.sort(); + for (let i2 = 0; i2 < keys.length; i2++) { + let safeValue; + try { + safeValue = value[keys[i2]]; + } catch { + } + children.push(async () => { + let child = await buildAST(keys[i2], safeValue, depth + 1, sortKeys); + return child.parent = astNode, child; + }); + } + if (typeof value == "function" && (t = "function"), value instanceof Promise) { + let [status, result] = await getPromiseState(value); + children.push(async () => { + let child = await buildAST("", status, depth + 1, sortKeys); + return child.parent = astNode, child; + }), status !== "pending" && children.push(async () => { + let child = await buildAST("", result, depth + 1, sortKeys); + return child.parent = astNode, child; + }), t = "promise"; + } + if (value instanceof Map) { + let parsedEntries = Array.from(value.entries()).map((entry) => { + let [entryKey, entryValue] = entry; + return { + "": entryKey, + "": entryValue + }; + }); + children.push(async () => { + let child = await buildAST("", parsedEntries, depth + 1, sortKeys); + return child.parent = astNode, child; + }), children.push(async () => { + let child = await buildAST("size", value.size, depth + 1, sortKeys); + return child.parent = astNode, child; + }), t = "map"; + } + if (value instanceof Set) { + let parsedEntries = Array.from(value.entries()).map((entry) => entry[1]); + children.push(async () => { + let child = await buildAST("", parsedEntries, depth + 1, sortKeys); + return child.parent = astNode, child; + }), children.push(async () => { + let child = await buildAST("size", value.size, depth + 1, sortKeys); + return child.parent = astNode, child; + }), t = "set"; + } + } + value !== Object.prototype && showPrototype && children.push(async () => { + let child = await buildAST("", Object.getPrototypeOf(value), depth + 1, sortKeys, !0); + return child.parent = astNode, child; + }), astNode.type = t, astNode.children = children, astNode.isPrototype = isPrototype; + } + return astNode; +}, parse4 = (data, sortKeys, includePrototypes) => buildAST("root", data, 0, sortKeys === !1 ? sortKeys : !0, void 0, includePrototypes === !1 ? includePrototypes : !0); + +// ../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js +function ownKeys(e2, r2) { + var t = Object.keys(e2); + if (Object.getOwnPropertySymbols) { + var o2 = Object.getOwnPropertySymbols(e2); + r2 && (o2 = o2.filter(function(r3) { + return Object.getOwnPropertyDescriptor(e2, r3).enumerable; + })), t.push.apply(t, o2); + } + return t; +} +function _objectSpread2(e2) { + for (var r2 = 1; r2 < arguments.length; r2++) { + var t = arguments[r2] != null ? arguments[r2] : {}; + r2 % 2 ? ownKeys(Object(t), !0).forEach(function(r3) { + _defineProperty(e2, r3, t[r3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r3) { + Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t, r3)); + }); + } + return e2; +} + +// ../../node_modules/@devtools-ds/themes/dist/esm/utils.js +import React37 from "react"; + +// ../../node_modules/@devtools-ds/themes/node_modules/clsx/dist/clsx.m.js +function toVal2(mix) { + var k2, y2, str = ""; + if (mix) + if (typeof mix == "object") + if (Array.isArray(mix)) + for (k2 = 0; k2 < mix.length; k2++) + mix[k2] && (y2 = toVal2(mix[k2])) && (str && (str += " "), str += y2); + else + for (k2 in mix) + mix[k2] && (y2 = toVal2(k2)) && (str && (str += " "), str += y2); + else typeof mix != "boolean" && !mix.call && (str && (str += " "), str += mix); + return str; +} +function clsx_m_default2() { + for (var i2 = 0, x2, str = ""; i2 < arguments.length; ) + (x2 = toVal2(arguments[i2++])) && (str && (str += " "), str += x2); + return str; +} + +// ../../node_modules/@devtools-ds/themes/dist/esm/utils.js +var _excluded = ["children"]; +var ThemeContext2 = React37.createContext({ + theme: "chrome", + colorScheme: "light" +}); +var ThemeProvider = (_ref) => { + let { + children + } = _ref, value = _objectWithoutProperties(_ref, _excluded), wrappedTheme = React37.useContext(ThemeContext2); + return React37.createElement(ThemeContext2.Provider, { + value: _objectSpread2(_objectSpread2({}, wrappedTheme), value) + }, children); +}, useTheme2 = (props, styles = {}) => { + let themeContext = React37.useContext(ThemeContext2), currentTheme = props.theme || themeContext.theme || "chrome", currentColorScheme = props.colorScheme || themeContext.colorScheme || "light", themeClass = clsx_m_default2(styles[currentTheme], styles[currentColorScheme]); + return { + currentColorScheme, + currentTheme, + themeClass + }; +}; + +// ../../node_modules/@devtools-ds/themes/dist/esm/AutoThemeProvider.js +import React38 from "react"; + +// ../../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectInspectorItem.js +import React44, { useEffect as useEffect15, useState as useState17 } from "react"; + +// ../../node_modules/@devtools-ds/tree/dist/esm/index.js +import React40, { useState as useState15, useEffect as useEffect13 } from "react"; + +// ../../node_modules/@devtools-ds/tree/node_modules/clsx/dist/clsx.m.js +function toVal3(mix) { + var k2, y2, str = ""; + if (mix) + if (typeof mix == "object") + if (Array.isArray(mix)) + for (k2 = 0; k2 < mix.length; k2++) + mix[k2] && (y2 = toVal3(mix[k2])) && (str && (str += " "), str += y2); + else + for (k2 in mix) + mix[k2] && (y2 = toVal3(k2)) && (str && (str += " "), str += y2); + else typeof mix != "boolean" && !mix.call && (str && (str += " "), str += mix); + return str; +} +function clsx_m_default3() { + for (var i2 = 0, x2, str = ""; i2 < arguments.length; ) + (x2 = toVal3(arguments[i2++])) && (str && (str += " "), str += x2); + return str; +} + +// ../../node_modules/@devtools-ds/tree/dist/esm/TreeContext.js +import React39 from "react"; +var TreeContext = React39.createContext({ + isChild: !1, + depth: 0, + hasHover: !0 +}), TreeContext_default = TreeContext; + +// ../../node_modules/@devtools-ds/tree/dist/esm/Tree.css.js +var Tree_css_default = { tree: "Tree-tree-fbbbe38", item: "Tree-item-353d6f3", group: "Tree-group-d3c3d8a", label: "Tree-label-d819155", focusWhite: "Tree-focusWhite-f1e00c2", arrow: "Tree-arrow-03ab2e7", hover: "Tree-hover-3cc4e5d", open: "Tree-open-3f1a336", dark: "Tree-dark-1b4aa00", chrome: "Tree-chrome-bcbcac6", light: "Tree-light-09174ee" }; + +// ../../node_modules/@devtools-ds/tree/dist/esm/index.js +var _excluded2 = ["theme", "hover", "colorScheme", "children", "label", "className", "onUpdate", "onSelect", "open"], Tree = (props) => { + let { + theme: theme3, + hover, + colorScheme, + children, + label, + className, + onUpdate, + onSelect, + open + } = props, html = _objectWithoutProperties(props, _excluded2), { + themeClass, + currentTheme + } = useTheme2({ + theme: theme3, + colorScheme + }, Tree_css_default), [isOpen, setOpen] = useState15(open); + useEffect13(() => { + setOpen(open); + }, [open]); + let updateState = (value) => { + setOpen(value), onUpdate && onUpdate(value); + }, hasChildren = React40.Children.count(children) > 0, updateFocus = (newNode, previousNode) => { + if (newNode.isSameNode(previousNode || null)) return; + let focusableNode = newNode.querySelector('[tabindex="-1"]'); + focusableNode?.focus(), newNode.setAttribute("aria-selected", "true"), previousNode?.removeAttribute("aria-selected"); + }, getParent = (node, role) => { + let parent = node; + for (; parent && parent.parentElement; ) { + if (parent.getAttribute("role") === role) + return parent; + parent = parent.parentElement; + } + return null; + }, getListElements = (node) => { + let tree = getParent(node, "tree"); + return tree ? Array.from(tree.querySelectorAll("li")) : []; + }, moveBack = (node) => { + let group = getParent(node, "group"), toggle = group?.previousElementSibling; + if (toggle && toggle.getAttribute("tabindex") === "-1") { + let toggleParent = toggle.parentElement, nodeParent = node.parentElement; + updateFocus(toggleParent, nodeParent); + } + }, moveHome = (node, direction) => { + let elements = getListElements(node); + elements.forEach((element) => { + element.removeAttribute("aria-selected"); + }), direction === "start" && elements[0] && updateFocus(elements[0]), direction === "end" && elements[elements.length - 1] && updateFocus(elements[elements.length - 1]); + }, moveFocusAdjacent = (node, direction) => { + let elements = getListElements(node) || []; + for (let i2 = 0; i2 < elements.length; i2++) { + let currentNode = elements[i2]; + if (currentNode.getAttribute("aria-selected") === "true") { + direction === "up" && elements[i2 - 1] ? updateFocus(elements[i2 - 1], currentNode) : direction === "down" && elements[i2 + 1] && updateFocus(elements[i2 + 1], currentNode); + return; + } + } + updateFocus(elements[0]); + }, handleKeypress = (event, isChild2) => { + let node = event.target; + (event.key === "Enter" || event.key === " ") && updateState(!isOpen), event.key === "ArrowRight" && isOpen && !isChild2 ? moveFocusAdjacent(node, "down") : event.key === "ArrowRight" && updateState(!0), event.key === "ArrowLeft" && (!isOpen || isChild2) ? moveBack(node) : event.key === "ArrowLeft" && updateState(!1), event.key === "ArrowDown" && moveFocusAdjacent(node, "down"), event.key === "ArrowUp" && moveFocusAdjacent(node, "up"), event.key === "Home" && moveHome(node, "start"), event.key === "End" && moveHome(node, "end"); + }, handleClick = (event, isChild2) => { + let node = event.target, parent = getParent(node, "treeitem"), elements = getListElements(node) || [], found = !1; + for (let i2 = 0; i2 < elements.length; i2++) { + let currentNode = elements[i2]; + if (currentNode.getAttribute("aria-selected") === "true") { + parent && (found = !0, updateFocus(parent, currentNode)); + break; + } + } + !found && parent && updateFocus(parent), isChild2 || updateState(!isOpen); + }, handleBlur = (event) => { + let node = event.currentTarget; + !node.contains(document.activeElement) && node.getAttribute("role") === "tree" && node.setAttribute("tabindex", "0"); + }, handleFocus = (event) => { + let node = event.target; + if (node.getAttribute("role") === "tree") { + let selected = node.querySelector('[aria-selected="true"]'); + selected ? updateFocus(selected) : moveFocusAdjacent(node, "down"), node.setAttribute("tabindex", "-1"); + } + }, handleButtonFocus = () => { + onSelect?.(); + }, getPaddingStyles = (depth2) => { + let space = depth2 * 0.9 + 0.3; + return { + paddingLeft: `${space}em`, + width: `calc(100% - ${space}em)` + }; + }, { + isChild, + depth, + hasHover + } = React40.useContext(TreeContext_default), showHover = hasHover ? hover : !1; + if (!isChild) + return React40.createElement("ul", _extends({ + role: "tree", + tabIndex: 0, + className: clsx_m_default3(Tree_css_default.tree, Tree_css_default.group, themeClass, className), + onFocus: handleFocus, + onBlur: handleBlur + }, html), React40.createElement(TreeContext_default.Provider, { + value: { + isChild: !0, + depth: 0, + hasHover: showHover + } + }, React40.createElement(Tree, props))); + if (!hasChildren) + return React40.createElement("li", _extends({ + role: "treeitem", + className: Tree_css_default.item + }, html), React40.createElement("div", { + role: "button", + className: clsx_m_default3(Tree_css_default.label, { + [Tree_css_default.hover]: showHover, + [Tree_css_default.focusWhite]: currentTheme === "firefox" + }), + tabIndex: -1, + style: getPaddingStyles(depth), + onKeyDown: (e2) => { + handleKeypress(e2, isChild); + }, + onClick: (e2) => handleClick(e2, !0), + onFocus: handleButtonFocus + }, React40.createElement("span", null, label))); + let arrowClass = clsx_m_default3(Tree_css_default.arrow, { + [Tree_css_default.open]: isOpen + }); + return React40.createElement("li", { + role: "treeitem", + "aria-expanded": isOpen, + className: Tree_css_default.item + }, React40.createElement("div", { + role: "button", + tabIndex: -1, + className: clsx_m_default3(Tree_css_default.label, { + [Tree_css_default.hover]: showHover, + [Tree_css_default.focusWhite]: currentTheme === "firefox" + }), + style: getPaddingStyles(depth), + onClick: (e2) => handleClick(e2), + onKeyDown: (e2) => handleKeypress(e2), + onFocus: handleButtonFocus + }, React40.createElement("span", null, React40.createElement("span", { + "aria-hidden": !0, + className: arrowClass + }), React40.createElement("span", null, label))), React40.createElement("ul", _extends({ + role: "group", + className: clsx_m_default3(className, Tree_css_default.group) + }, html), isOpen && React40.Children.map(children, (child) => React40.createElement(TreeContext_default.Provider, { + value: { + isChild: !0, + depth: depth + 1, + hasHover: showHover + } + }, child)))); +}; +Tree.defaultProps = { + open: !1, + hover: !0 +}; + +// ../../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectValue.js +import React41, { useState as useState16, useEffect as useEffect14 } from "react"; + +// ../../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectInspector.css.js +var ObjectInspector_css_default = { "object-inspector": "ObjectInspector-object-inspector-0c33e82", objectInspector: "ObjectInspector-object-inspector-0c33e82", "object-label": "ObjectInspector-object-label-b81482b", objectLabel: "ObjectInspector-object-label-b81482b", text: "ObjectInspector-text-25f57f3", key: "ObjectInspector-key-4f712bb", value: "ObjectInspector-value-f7ec2e5", string: "ObjectInspector-string-c496000", regex: "ObjectInspector-regex-59d45a3", error: "ObjectInspector-error-b818698", boolean: "ObjectInspector-boolean-2dd1642", number: "ObjectInspector-number-a6daabb", undefined: "ObjectInspector-undefined-3a68263", null: "ObjectInspector-null-74acb50", function: "ObjectInspector-function-07bbdcd", "function-decorator": "ObjectInspector-function-decorator-3d22c24", functionDecorator: "ObjectInspector-function-decorator-3d22c24", prototype: "ObjectInspector-prototype-f2449ee", dark: "ObjectInspector-dark-0c96c97", chrome: "ObjectInspector-chrome-2f3ca98", light: "ObjectInspector-light-78bef54" }; + +// ../../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectValue.js +var _excluded3 = ["ast", "theme", "showKey", "colorScheme", "className"], buildValue = (key, value, valueClass, showKey, depth) => { + let computedKey = key.includes("-") ? `"${key}"` : key, isRoot = depth <= 0; + return React41.createElement("span", { + className: ObjectInspector_css_default.text + }, !isRoot && showKey && React41.createElement(React41.Fragment, null, React41.createElement("span", { + className: ObjectInspector_css_default.key + }, computedKey), React41.createElement("span", null, ":\xA0")), React41.createElement("span", { + className: valueClass + }, value)); +}, ObjectValue2 = (props) => { + let { + ast, + theme: theme3, + showKey, + colorScheme, + className + } = props, html = _objectWithoutProperties(props, _excluded3), { + themeClass + } = useTheme2({ + theme: theme3, + colorScheme + }, ObjectInspector_css_default), [asyncValue, setAsyncValue] = useState16(React41.createElement("span", null)), value = React41.createElement("span", null); + return useEffect14(() => { + ast.value instanceof Promise && (async (promise) => { + setAsyncValue(buildValue(ast.key, `Promise { "${await getPromiseState(promise)}" }`, ObjectInspector_css_default.key, showKey, ast.depth)); + })(ast.value); + }, [ast, showKey]), typeof ast.value == "number" || typeof ast.value == "bigint" ? value = buildValue(ast.key, String(ast.value), ObjectInspector_css_default.number, showKey, ast.depth) : typeof ast.value == "boolean" ? value = buildValue(ast.key, String(ast.value), ObjectInspector_css_default.boolean, showKey, ast.depth) : typeof ast.value == "string" ? value = buildValue(ast.key, `"${ast.value}"`, ObjectInspector_css_default.string, showKey, ast.depth) : typeof ast.value > "u" ? value = buildValue(ast.key, "undefined", ObjectInspector_css_default.undefined, showKey, ast.depth) : typeof ast.value == "symbol" ? value = buildValue(ast.key, ast.value.toString(), ObjectInspector_css_default.string, showKey, ast.depth) : typeof ast.value == "function" ? value = buildValue(ast.key, `${ast.value.name}()`, ObjectInspector_css_default.key, showKey, ast.depth) : typeof ast.value == "object" && (ast.value === null ? value = buildValue(ast.key, "null", ObjectInspector_css_default.null, showKey, ast.depth) : Array.isArray(ast.value) ? value = buildValue(ast.key, `Array(${ast.value.length})`, ObjectInspector_css_default.key, showKey, ast.depth) : ast.value instanceof Date ? value = buildValue(ast.key, `Date ${ast.value.toString()}`, ObjectInspector_css_default.value, showKey, ast.depth) : ast.value instanceof RegExp ? value = buildValue(ast.key, ast.value.toString(), ObjectInspector_css_default.regex, showKey, ast.depth) : ast.value instanceof Error ? value = buildValue(ast.key, ast.value.toString(), ObjectInspector_css_default.error, showKey, ast.depth) : isObject(ast.value) ? value = buildValue(ast.key, "{\u2026}", ObjectInspector_css_default.key, showKey, ast.depth) : value = buildValue(ast.key, ast.value.constructor.name, ObjectInspector_css_default.key, showKey, ast.depth)), React41.createElement("span", _extends({ + className: clsx_m_default(themeClass, className) + }, html), asyncValue, value); +}; +ObjectValue2.defaultProps = { + showKey: !0 +}; +var ObjectValue_default = ObjectValue2; + +// ../../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectLabel.js +import React43 from "react"; +var _excluded4 = ["ast", "theme", "previewMax", "open", "colorScheme", "className"], buildPreview = (children, previewMax, showKey) => { + let previews = []; + for (let i2 = 0; i2 < children.length; i2++) { + let child = children[i2]; + if (child.isPrototype || (previews.push(React43.createElement(ObjectValue_default, { + key: child.key, + ast: child, + showKey + })), i2 < children.length - 1 ? previews.push(", ") : previews.push(" ")), child.isPrototype && i2 === children.length - 1 && (previews.pop(), previews.push(" ")), i2 === previewMax - 1 && children.length > previewMax) { + previews.push("\u2026 "); + break; + } + } + return previews; +}, getArrayLabel = (ast, open, previewMax, theme3) => { + let l2 = ast.value.length; + return open ? React43.createElement("span", null, "Array(", l2, ")") : React43.createElement(React43.Fragment, null, React43.createElement("span", null, `${theme3 === "firefox" ? "Array" : ""}(${l2}) [ `), buildPreview(ast.children, previewMax, !1), React43.createElement("span", null, "]")); +}, getObjectLabel = (ast, open, previewMax, theme3) => ast.isPrototype ? React43.createElement("span", null, `Object ${theme3 === "firefox" ? "{ \u2026 }" : ""}`) : open ? React43.createElement("span", null, "{\u2026}") : React43.createElement(React43.Fragment, null, React43.createElement("span", null, `${theme3 === "firefox" ? "Object " : ""}{ `), buildPreview(ast.children, previewMax, !0), React43.createElement("span", null, "}")), getPromiseLabel = (ast, open, previewMax) => open ? React43.createElement("span", null, `Promise { "${String(ast.children[0].value)}" }`) : React43.createElement(React43.Fragment, null, React43.createElement("span", null, "Promise { "), buildPreview(ast.children, previewMax, !0), React43.createElement("span", null, "}")), getMapLabel = (ast, open, previewMax, theme3) => { + let { + size + } = ast.value; + return open ? React43.createElement("span", null, `Map(${size})`) : React43.createElement(React43.Fragment, null, React43.createElement("span", null, `Map${theme3 === "chrome" ? `(${size})` : ""} { `), buildPreview(ast.children, previewMax, !0), React43.createElement("span", null, "}")); +}, getSetLabel = (ast, open, previewMax) => { + let { + size + } = ast.value; + return open ? React43.createElement("span", null, "Set(", size, ")") : React43.createElement(React43.Fragment, null, React43.createElement("span", null, `Set(${ast.value.size}) {`), buildPreview(ast.children, previewMax, !0), React43.createElement("span", null, "}")); +}, ObjectLabel2 = (props) => { + let { + ast, + theme: theme3, + previewMax, + open, + colorScheme, + className + } = props, html = _objectWithoutProperties(props, _excluded4), { + themeClass, + currentTheme + } = useTheme2({ + theme: theme3, + colorScheme + }, ObjectInspector_css_default), isPrototype = ast.isPrototype || !1, classes = clsx_m_default(ObjectInspector_css_default.objectLabel, themeClass, className, { + [ObjectInspector_css_default.prototype]: isPrototype + }), isRoot = ast.depth <= 0, Key = () => React43.createElement("span", { + className: isPrototype ? ObjectInspector_css_default.prototype : ObjectInspector_css_default.key + }, isRoot ? "" : `${ast.key}: `); + return ast.type === "array" ? React43.createElement("span", _extends({ + className: classes + }, html), React43.createElement(Key, null), getArrayLabel(ast, open, previewMax, currentTheme)) : ast.type === "function" ? React43.createElement("span", _extends({ + className: classes + }, html), React43.createElement(Key, null), currentTheme === "chrome" && React43.createElement("span", { + className: ObjectInspector_css_default.functionDecorator + }, "\u0192 "), React43.createElement("span", { + className: clsx_m_default({ + [ObjectInspector_css_default.function]: !isPrototype + }) + }, `${ast.value.name}()`)) : ast.type === "promise" ? React43.createElement("span", _extends({ + className: classes + }, html), React43.createElement(Key, null), getPromiseLabel(ast, open, previewMax)) : ast.type === "map" ? React43.createElement("span", _extends({ + className: classes + }, html), React43.createElement(Key, null), getMapLabel(ast, open, previewMax, currentTheme)) : ast.type === "set" ? React43.createElement("span", _extends({ + className: classes + }, html), React43.createElement(Key, null), getSetLabel(ast, open, previewMax)) : React43.createElement("span", _extends({ + className: classes + }, html), React43.createElement(Key, null), getObjectLabel(ast, open, previewMax, currentTheme)); +}; +ObjectLabel2.defaultProps = { + previewMax: 8, + open: !1 +}; +var ObjectLabel_default = ObjectLabel2; + +// ../../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectInspectorItem.js +var ObjectInspectorItem = (props) => { + let { + ast, + expandLevel, + depth + } = props, [resolved, setResolved] = useState17(), [open, setOpen] = useState17(depth < expandLevel); + return useEffect15(() => { + (async () => { + if (ast.type !== "value") { + let promises = ast.children.map((f2) => f2()), children = await Promise.all(promises), r2 = _objectSpread2(_objectSpread2({}, ast), {}, { + children + }); + setResolved(r2); + } + })(); + }, [ast]), resolved ? React44.createElement(Tree, { + hover: !1, + open, + label: React44.createElement(ObjectLabel_default, { + open, + ast: resolved + }), + onSelect: () => { + var _props$onSelect; + (_props$onSelect = props.onSelect) === null || _props$onSelect === void 0 || _props$onSelect.call(props, ast); + }, + onUpdate: (value) => { + setOpen(value); + } + }, resolved.children.map((child) => React44.createElement(ObjectInspectorItem, { + key: child.key, + ast: child, + depth: depth + 1, + expandLevel, + onSelect: props.onSelect + }))) : React44.createElement(Tree, { + hover: !1, + label: React44.createElement(ObjectValue_default, { + ast + }), + onSelect: () => { + var _props$onSelect2; + (_props$onSelect2 = props.onSelect) === null || _props$onSelect2 === void 0 || _props$onSelect2.call(props, ast); + } + }); +}; +ObjectInspectorItem.defaultProps = { + expandLevel: 0, + depth: 0 +}; +var ObjectInspectorItem_default = ObjectInspectorItem; + +// ../../node_modules/@devtools-ds/object-inspector/dist/esm/ObjectInspector.js +var _excluded5 = ["data", "expandLevel", "sortKeys", "includePrototypes", "className", "theme", "colorScheme", "onSelect"], ObjectInspector2 = (props) => { + let { + data, + expandLevel, + sortKeys, + includePrototypes, + className, + theme: theme3, + colorScheme, + onSelect + } = props, html = _objectWithoutProperties(props, _excluded5), [ast, setAST] = useState18(void 0), { + themeClass, + currentTheme, + currentColorScheme + } = useTheme2({ + theme: theme3, + colorScheme + }, ObjectInspector_css_default); + return useEffect16(() => { + (async () => setAST(await parse4(data, sortKeys, includePrototypes)))(); + }, [data, sortKeys, includePrototypes]), React45.createElement("div", _extends({ + className: clsx_m_default(ObjectInspector_css_default.objectInspector, className, themeClass) + }, html), ast && React45.createElement(ThemeProvider, { + theme: currentTheme, + colorScheme: currentColorScheme + }, React45.createElement(ObjectInspectorItem_default, { + ast, + expandLevel, + onSelect + }))); +}; +ObjectInspector2.defaultProps = { + expandLevel: 0, + sortKeys: !0, + includePrototypes: !0 +}; + +// src/component-testing/components/MethodCall.tsx +import { useTheme as useTheme3 } from "storybook/theming"; +var colorsLight = { + base: "#444", + nullish: "#7D99AA", + string: "#16B242", + number: "#5D40D0", + boolean: "#f41840", + objectkey: "#698394", + instance: "#A15C20", + function: "#EA7509", + muted: "#7D99AA", + tag: { + name: "#6F2CAC", + suffix: "#1F99E5" + }, + date: "#459D9C", + error: { + name: "#D43900", + message: "#444" + }, + regex: { + source: "#A15C20", + flags: "#EA7509" + }, + meta: "#EA7509", + method: "#0271B6" +}, colorsDark = { + base: "#eee", + nullish: "#aaa", + string: "#5FE584", + number: "#6ba5ff", + boolean: "#ff4191", + objectkey: "#accfe6", + instance: "#E3B551", + function: "#E3B551", + muted: "#aaa", + tag: { + name: "#f57bff", + suffix: "#8EB5FF" + }, + date: "#70D4D3", + error: { + name: "#f40", + message: "#eee" + }, + regex: { + source: "#FAD483", + flags: "#E3B551" + }, + meta: "#FAD483", + method: "#5EC1FF" +}, useThemeColors = () => { + let { base } = useTheme3(); + return base === "dark" ? colorsDark : colorsLight; +}, special = /[^A-Z0-9]/i, trimEnd = /[\s.,…]+$/gm, ellipsize = (string, maxlength) => { + if (string.length <= maxlength) + return string; + for (let i2 = maxlength - 1; i2 >= 0; i2 -= 1) + if (special.test(string[i2]) && i2 > 10) + return `${string.slice(0, i2).replace(trimEnd, "")}\u2026`; + return `${string.slice(0, maxlength).replace(trimEnd, "")}\u2026`; +}, stringify = (value) => { + try { + return JSON.stringify(value, null, 1); + } catch { + return String(value); + } +}, interleave = (nodes, separator) => nodes.flatMap( + (node, index) => index === nodes.length - 1 ? [node] : [node, React46.cloneElement(separator, { key: `sep${index}` })] +), Node2 = ({ + value, + nested, + showObjectInspector, + callsById, + ...props +}) => { + switch (!0) { + case value === null: + return React46.createElement(NullNode, { ...props }); + case value === void 0: + return React46.createElement(UndefinedNode, { ...props }); + case Array.isArray(value): + return React46.createElement(ArrayNode, { ...props, value, callsById }); + case typeof value == "string": + return React46.createElement(StringNode, { ...props, value }); + case typeof value == "number": + return React46.createElement(NumberNode, { ...props, value }); + case typeof value == "boolean": + return React46.createElement(BooleanNode, { ...props, value }); + case Object.prototype.hasOwnProperty.call(value, "__date__"): + return React46.createElement(DateNode, { ...props, ...value.__date__ }); + case Object.prototype.hasOwnProperty.call(value, "__error__"): + return React46.createElement(ErrorNode, { ...props, ...value.__error__ }); + case Object.prototype.hasOwnProperty.call(value, "__regexp__"): + return React46.createElement(RegExpNode, { ...props, ...value.__regexp__ }); + case Object.prototype.hasOwnProperty.call(value, "__function__"): + return React46.createElement(FunctionNode, { ...props, ...value.__function__ }); + case Object.prototype.hasOwnProperty.call(value, "__symbol__"): + return React46.createElement(SymbolNode, { ...props, ...value.__symbol__ }); + case Object.prototype.hasOwnProperty.call(value, "__element__"): + return React46.createElement(ElementNode, { ...props, ...value.__element__ }); + case Object.prototype.hasOwnProperty.call(value, "__class__"): + return React46.createElement(ClassNode, { ...props, ...value.__class__ }); + case Object.prototype.hasOwnProperty.call(value, "__callId__"): + return React46.createElement(MethodCall, { call: callsById?.get(value.__callId__), callsById }); + case Object.prototype.toString.call(value) === "[object Object]": + return React46.createElement( + ObjectNode, + { + value, + showInspector: showObjectInspector, + callsById, + ...props + } + ); + default: + return React46.createElement(OtherNode, { value, ...props }); + } +}, NullNode = (props) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { color: colors.nullish }, ...props }, "null"); +}, UndefinedNode = (props) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { color: colors.nullish }, ...props }, "undefined"); +}, StringNode = ({ value, ...props }) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { color: colors.string }, ...props }, JSON.stringify(ellipsize(value, 50))); +}, NumberNode = ({ value, ...props }) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { color: colors.number }, ...props }, value); +}, BooleanNode = ({ value, ...props }) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { color: colors.boolean }, ...props }, String(value)); +}, ArrayNode = ({ + value, + nested = !1, + callsById +}) => { + let colors = useThemeColors(); + if (nested) + return React46.createElement("span", { style: { color: colors.base } }, "[\u2026]"); + let nodes = value.slice(0, 3).map((v2, index) => React46.createElement(Node2, { key: `${index}--${JSON.stringify(v2)}`, value: v2, nested: !0, callsById })), nodelist = interleave(nodes, React46.createElement("span", null, ", ")); + return value.length <= 3 ? React46.createElement("span", { style: { color: colors.base } }, "[", nodelist, "]") : React46.createElement("span", { style: { color: colors.base } }, "(", value.length, ") [", nodelist, ", \u2026]"); +}, ObjectNode = ({ + showInspector, + value, + callsById, + nested = !1 +}) => { + let isDarkMode = useTheme3().base === "dark", colors = useThemeColors(); + if (showInspector) + return React46.createElement(React46.Fragment, null, React46.createElement( + ObjectInspector2, + { + id: "interactions-object-inspector", + data: value, + includePrototypes: !1, + colorScheme: isDarkMode ? "dark" : "light" + } + )); + if (nested) + return React46.createElement("span", { style: { color: colors.base } }, "{\u2026}"); + let nodelist = interleave( + Object.entries(value).slice(0, 2).map(([k2, v2]) => React46.createElement(Fragment2, { key: k2 }, React46.createElement("span", { style: { color: colors.objectkey } }, k2, ": "), React46.createElement(Node2, { value: v2, callsById, nested: !0 }))), + React46.createElement("span", null, ", ") + ); + return Object.keys(value).length <= 2 ? React46.createElement("span", { style: { color: colors.base } }, "{ ", nodelist, " }") : React46.createElement("span", { style: { color: colors.base } }, "(", Object.keys(value).length, ") ", "{ ", nodelist, ", \u2026 }"); +}, ClassNode = ({ name }) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { color: colors.instance } }, name); +}, FunctionNode = ({ name }) => { + let colors = useThemeColors(); + return name ? React46.createElement("span", { style: { color: colors.function } }, name) : React46.createElement("span", { style: { color: colors.nullish, fontStyle: "italic" } }, "anonymous"); +}, ElementNode = ({ + prefix, + localName, + id, + classNames = [], + innerText +}) => { + let name = prefix ? `${prefix}:${localName}` : localName, colors = useThemeColors(); + return React46.createElement("span", { style: { wordBreak: "keep-all" } }, React46.createElement("span", { key: `${name}_lt`, style: { color: colors.muted } }, "<"), React46.createElement("span", { key: `${name}_tag`, style: { color: colors.tag.name } }, name), React46.createElement("span", { key: `${name}_suffix`, style: { color: colors.tag.suffix } }, id ? `#${id}` : classNames.reduce((acc, className) => `${acc}.${className}`, "")), React46.createElement("span", { key: `${name}_gt`, style: { color: colors.muted } }, ">"), !id && classNames.length === 0 && innerText && React46.createElement(React46.Fragment, null, React46.createElement("span", { key: `${name}_text` }, innerText), React46.createElement("span", { key: `${name}_close_lt`, style: { color: colors.muted } }, "<"), React46.createElement("span", { key: `${name}_close_tag`, style: { color: colors.tag.name } }, "/", name), React46.createElement("span", { key: `${name}_close_gt`, style: { color: colors.muted } }, ">"))); +}, DateNode = ({ value }) => { + let parsed = new Date(value); + isNaN(Number(parsed)) && (logger4.warn("Invalid date value:", value), parsed = null); + let colors = useThemeColors(); + if (!parsed) + return React46.createElement("span", { style: { whiteSpace: "nowrap", color: colors.date } }, "Invalid date"); + let [date, time, ms] = parsed.toISOString().split(/[T.Z]/); + return React46.createElement("span", { style: { whiteSpace: "nowrap", color: colors.date } }, date, React46.createElement("span", { style: { opacity: 0.7 } }, "T"), time === "00:00:00" ? React46.createElement("span", { style: { opacity: 0.7 } }, time) : time, ms === "000" ? React46.createElement("span", { style: { opacity: 0.7 } }, ".", ms) : `.${ms}`, React46.createElement("span", { style: { opacity: 0.7 } }, "Z")); +}, ErrorNode = ({ name, message }) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { color: colors.error.name } }, name, message && ": ", message && React46.createElement("span", { style: { color: colors.error.message }, title: message.length > 50 ? message : "" }, ellipsize(message, 50))); +}, RegExpNode = ({ flags, source }) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { whiteSpace: "nowrap", color: colors.regex.flags } }, "/", React46.createElement("span", { style: { color: colors.regex.source } }, source), "/", flags); +}, SymbolNode = ({ description }) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { whiteSpace: "nowrap", color: colors.instance } }, "Symbol(", description && React46.createElement("span", { style: { color: colors.meta } }, '"', description, '"'), ")"); +}, OtherNode = ({ value }) => { + let colors = useThemeColors(); + return React46.createElement("span", { style: { color: colors.meta } }, stringify(value)); +}, StepNode = ({ label }) => { + let colors = useThemeColors(), { typography: typography4 } = useTheme3(); + return React46.createElement( + "span", + { + style: { + color: colors.base, + fontFamily: typography4.fonts.base, + fontSize: typography4.size.s2 - 1 + } + }, + label + ); +}, MethodCall = ({ + call, + callsById +}) => { + if (!call) + return null; + if (call.method === "step" && call.path?.length === 0) + return React46.createElement(StepNode, { label: call.args[0] }); + let path = call.path?.flatMap((elem, index) => { + let callId = elem.__callId__; + return [ + callId ? React46.createElement(MethodCall, { key: `elem${index}`, call: callsById?.get(callId), callsById }) : React46.createElement("span", { key: `elem${index}` }, elem), + React46.createElement("wbr", { key: `wbr${index}` }), + React46.createElement("span", { key: `dot${index}` }, ".") + ]; + }), args = call.args?.flatMap((arg, index, array) => { + let node = React46.createElement(Node2, { key: `node${index}`, value: arg, callsById }); + return index < array.length - 1 ? [node, React46.createElement("span", { key: `comma${index}` }, ",\xA0"), React46.createElement("wbr", { key: `wbr${index}` })] : [node]; + }), colors = useThemeColors(); + return React46.createElement(React46.Fragment, null, React46.createElement("span", { style: { color: colors.base } }, path), React46.createElement("span", { style: { color: colors.method } }, call.method), React46.createElement("span", { style: { color: colors.base } }, "(", React46.createElement("wbr", null), args, React46.createElement("wbr", null), ")")); +}; + +// src/component-testing/components/MatcherResult.tsx +var getParams = (line, fromIndex = 0) => { + for (let i2 = fromIndex, depth = 1; i2 < line.length; i2 += 1) + if (line[i2] === "(" ? depth += 1 : line[i2] === ")" && (depth -= 1), depth === 0) + return line.slice(fromIndex, i2); + return ""; +}, parseValue = (value) => { + try { + return value === "undefined" ? void 0 : JSON.parse(value); + } catch { + return value; + } +}, StyledExpected = styled26.span(({ theme: theme3 }) => ({ + color: theme3.base === "light" ? theme3.color.positiveText : theme3.color.positive +})), StyledReceived = styled26.span(({ theme: theme3 }) => ({ + color: theme3.base === "light" ? theme3.color.negativeText : theme3.color.negative +})), Received = ({ value, parsed }) => parsed ? React47.createElement(Node2, { showObjectInspector: !0, value, style: { color: "#D43900" } }) : React47.createElement(StyledReceived, null, value), Expected = ({ value, parsed }) => parsed ? typeof value == "string" && value.startsWith("called with") ? React47.createElement(React47.Fragment, null, value) : React47.createElement(Node2, { showObjectInspector: !0, value, style: { color: "#16B242" } }) : React47.createElement(StyledExpected, null, value), MatcherResult = ({ + message, + style = {} +}) => { + let filter = useAnsiToHtmlFilter(), lines = message.split(` +`); + return React47.createElement( + "pre", + { + style: { + margin: 0, + padding: "8px 10px 8px 36px", + fontSize: typography.size.s1, + ...style + } + }, + lines.flatMap((line, index) => { + if (line.startsWith("expect(")) { + let received = getParams(line, 7), remainderIndex = received ? 7 + received.length : 0, matcher = received && line.slice(remainderIndex).match(/\.(to|last|nth)[A-Z]\w+\(/); + if (matcher) { + let expectedIndex = remainderIndex + (matcher.index ?? 0) + matcher[0].length, expected = getParams(line, expectedIndex); + if (expected) + return [ + "expect(", + React47.createElement(Received, { key: `received_${received}`, value: received }), + line.slice(remainderIndex, expectedIndex), + React47.createElement(Expected, { key: `expected_${expected}`, value: expected }), + line.slice(expectedIndex + expected.length), + React47.createElement("br", { key: `br${index}` }) + ]; + } + } + if (line.match(/^\s*- /)) + return [React47.createElement(Expected, { key: line + index, value: line }), React47.createElement("br", { key: `br${index}` })]; + if (line.match(/^\s*\+ /) || line.match(/^Received: $/)) + return [React47.createElement(Received, { key: line + index, value: line }), React47.createElement("br", { key: `br${index}` })]; + let [, assertionLabel, assertionValue] = line.match(/^(Expected|Received): (.*)$/) || []; + if (assertionLabel && assertionValue) + return assertionLabel === "Expected" ? [ + "Expected: ", + React47.createElement(Expected, { key: line + index, value: parseValue(assertionValue), parsed: !0 }), + React47.createElement("br", { key: `br${index}` }) + ] : [ + "Received: ", + React47.createElement(Received, { key: line + index, value: parseValue(assertionValue), parsed: !0 }), + React47.createElement("br", { key: `br${index}` }) + ]; + let [, prefix, numberOfCalls] = line.match(/(Expected number|Received number|Number) of calls: (\d+)$/i) || []; + if (prefix && numberOfCalls) + return [ + `${prefix} of calls: `, + React47.createElement(Node2, { key: line + index, value: Number(numberOfCalls) }), + React47.createElement("br", { key: `br${index}` }) + ]; + let [, receivedValue] = line.match(/^Received has value: (.+)$/) || []; + return receivedValue ? [ + "Received has value: ", + React47.createElement(Node2, { key: line + index, value: parseValue(receivedValue) }), + React47.createElement("br", { key: `br${index}` }) + ] : [ + React47.createElement( + "span", + { + key: line + index, + dangerouslySetInnerHTML: { __html: filter.toHtml(line) } + } + ), + React47.createElement("br", { key: `br${index}` }) + ]; + }) + ); +}; + +// src/component-testing/components/StatusIcon.tsx +import React48 from "react"; +import { CheckIcon as CheckIcon2, CircleIcon, PlayIcon, StopAltIcon } from "@storybook/icons"; +import { styled as styled27, useTheme as useTheme4 } from "storybook/theming"; +var WarningContainer = styled27.div({ + width: 14, + height: 14, + display: "flex", + alignItems: "center", + justifyContent: "center" +}), StatusIcon = ({ status }) => { + let theme3 = useTheme4(); + switch (status) { + case "done" /* DONE */: + return React48.createElement(CheckIcon2, { color: theme3.color.positive, "data-testid": "icon-done" }); + case "error" /* ERROR */: + return React48.createElement(StopAltIcon, { color: theme3.color.negative, "data-testid": "icon-error" }); + case "active" /* ACTIVE */: + return React48.createElement(PlayIcon, { color: theme3.color.secondary, "data-testid": "icon-active" }); + case "waiting" /* WAITING */: + return React48.createElement(WarningContainer, { "data-testid": "icon-waiting" }, React48.createElement(CircleIcon, { color: curriedTransparentize$1(0.5, "#CCCCCC"), size: 6 })); + default: + return null; + } +}; + +// src/component-testing/components/Interaction.tsx +var MethodCallWrapper = styled28.div({ + fontFamily: typography2.fonts.mono, + fontSize: typography2.size.s1, + overflowWrap: "break-word", + inlineSize: "calc( 100% - 40px )" +}), RowContainer = styled28("li", { + shouldForwardProp: (prop) => !["call", "pausedAt"].includes(prop.toString()) +})( + ({ theme: theme3, call }) => ({ + listStyle: "none", + position: "relative", + display: "flex", + flexDirection: "column", + borderBottom: `1px solid ${theme3.appBorderColor}`, + fontFamily: typography2.fonts.base, + fontSize: 13, + ...call.status === "error" /* ERROR */ && { + backgroundColor: theme3.base === "dark" ? curriedTransparentize$1(0.93, theme3.color.negative) : theme3.background.warning + }, + paddingLeft: (call.ancestors?.length ?? 0) * 20 + }), + ({ theme: theme3, call, pausedAt }) => pausedAt === call.id && { + "&::before": { + content: '""', + position: "absolute", + top: -5, + zIndex: 1, + borderTop: "4.5px solid transparent", + borderLeft: `7px solid ${theme3.color.warning}`, + borderBottom: "4.5px solid transparent" + }, + "&::after": { + content: '""', + position: "absolute", + top: -1, + zIndex: 1, + width: "100%", + borderTop: `1.5px solid ${theme3.color.warning}` + } + } +), RowHeader = styled28.div( + ({ theme: theme3, $isNavigationDisabled }) => ({ + display: "flex", + "&:hover": $isNavigationDisabled ? {} : { background: theme3.background.hoverable } + }) +), RowLabel = styled28("button", { + shouldForwardProp: (prop) => !["call"].includes(prop.toString()) +})(({ theme: theme3, disabled, call }) => ({ + flex: 1, + display: "grid", + background: "none", + border: 0, + gridTemplateColumns: "15px 1fr", + alignItems: "center", + minHeight: 40, + margin: 0, + padding: "8px 15px", + textAlign: "start", + cursor: disabled || call.status === "error" /* ERROR */ ? "default" : "pointer", + "&:focus-visible": { + outline: 0, + boxShadow: `inset 3px 0 0 0 ${call.status === "error" /* ERROR */ ? theme3.color.warning : theme3.color.secondary}`, + background: call.status === "error" /* ERROR */ ? "transparent" : theme3.background.hoverable + }, + "& > div": { + opacity: call.status === "waiting" /* WAITING */ ? 0.5 : 1 + } +})), RowActions = styled28.div({ + display: "flex", + alignItems: "center", + padding: 6 +}), StyledButton2 = styled28(Button7)(({ theme: theme3 }) => ({ + color: theme3.textMutedColor, + margin: "0 3px" +})), RowMessage = styled28("div")(({ theme: theme3 }) => ({ + padding: "8px 10px 8px 36px", + fontSize: typography2.size.s1, + color: theme3.color.defaultText, + pre: { + margin: 0, + padding: 0 + } +})), ErrorName = styled28.span(({ theme: theme3 }) => ({ + color: theme3.base === "dark" ? "#5EC1FF" : "#0271B6" +})), ErrorMessage = styled28.span(({ theme: theme3 }) => ({ + color: theme3.base === "dark" ? "#eee" : "#444" +})), ErrorExplainer = styled28.p(({ theme: theme3 }) => ({ + color: theme3.base === "dark" ? theme3.color.negative : theme3.color.negativeText, + fontSize: theme3.typography.size.s2, + maxWidth: 500, + textWrap: "balance" +})), extractStepName = (call) => { + if (call.method === "step" && call.path?.length === 0 && typeof call.args?.[0] == "string") { + let label = call.args[0].trim(); + if (label.length > 0) + return label; + } + return call.method; +}, getRowAriaLabel = ({ + isNavigationDisabled, + stepName, + statusText +}) => `${isNavigationDisabled ? "Interaction row" : "Go to interaction row"}: ${stepName}. Status: ${statusText}.`, getExpandButtonAriaLabel = ({ + isCollapsed, + stepName +}) => `${isCollapsed ? "Expand" : "Collapse"} nested interaction steps for ${stepName}`, stepStatusTextMap = { + done: "passed", + error: "failed", + active: "running", + waiting: "pending" +}, getInteractionStatusText = (call) => call.status ? stepStatusTextMap[call.status] : "not run", Exception = ({ exception }) => { + let filter = useAnsiToHtmlFilter(); + if (!exception) + return null; + if (exception.callId === INTERNAL_RENDER_CALL_ID) + return React49.createElement(RowMessage, null, React49.createElement("pre", null, React49.createElement(ErrorName, null, exception.name, ":"), " ", React49.createElement(ErrorMessage, null, exception.message)), React49.createElement(ErrorExplainer, null, "The component failed to render properly. Automated component tests will not run until this is resolved. Check the full error message in Storybook\u2019s canvas to debug.")); + if (isJestError(exception)) + return React49.createElement(MatcherResult, { ...exception }); + if (isChaiError(exception)) + return React49.createElement(RowMessage, null, React49.createElement( + MatcherResult, + { + message: `${exception.message}${exception.diff ? ` + +${exception.diff}` : ""}`, + style: { padding: 0 } + } + ), React49.createElement("p", null, "See the full stack trace in the browser console.")); + let paragraphs = exception.message.split(` + +`), more = paragraphs.length > 1; + return React49.createElement(RowMessage, null, React49.createElement("pre", { dangerouslySetInnerHTML: { __html: filter.toHtml(paragraphs[0]) } }), more && React49.createElement("p", null, "See the full stack trace in the browser console.")); +}, Interaction = ({ + call, + callsById, + controls, + controlStates, + childCallIds, + isHidden, + isCollapsed, + toggleCollapsed, + pausedAt +}) => { + let [isHovered, setIsHovered] = React49.useState(!1), isNavigationDisabled = !controlStates.goto || !call.interceptable || !!call.ancestors?.length, stepName = extractStepName(call), interactionStatus = getInteractionStatusText(call); + return isHidden || call.id === INTERNAL_RENDER_CALL_ID ? null : React49.createElement(RowContainer, { call, pausedAt }, React49.createElement(RowHeader, { $isNavigationDisabled: isNavigationDisabled }, React49.createElement( + RowLabel, + { + "aria-label": getRowAriaLabel({ + isNavigationDisabled, + stepName, + statusText: interactionStatus + }), + call, + onClick: () => controls.goto(call.id), + onPointerDown: (e2) => e2.preventDefault(), + disabled: isNavigationDisabled, + onMouseEnter: () => controlStates.goto && setIsHovered(!0), + onMouseLeave: () => controlStates.goto && setIsHovered(!1) + }, + React49.createElement(StatusIcon, { status: isHovered ? "active" /* ACTIVE */ : call.status }), + React49.createElement(MethodCallWrapper, { style: { marginLeft: 6, marginBottom: 1 } }, React49.createElement(MethodCall, { call, callsById })) + ), React49.createElement(RowActions, null, (childCallIds?.length ?? 0) > 0 && React49.createElement( + StyledButton2, + { + padding: "small", + variant: "ghost", + onClick: toggleCollapsed, + ariaLabel: getExpandButtonAriaLabel({ isCollapsed, stepName }), + "aria-expanded": !isCollapsed + }, + isCollapsed ? React49.createElement(ChevronUpIcon2, null) : React49.createElement(ChevronDownIcon3, null) + ))), call.status === "error" /* ERROR */ && call.exception?.callId === call.id && React49.createElement(Exception, { exception: call.exception })); +}; + +// src/component-testing/components/TestDiscrepancyMessage.tsx +import React50 from "react"; +import { Link as Link6 } from "storybook/internal/components"; +import { useStorybookApi as useStorybookApi5 } from "storybook/manager-api"; +import { styled as styled29 } from "storybook/theming"; +var Wrapper10 = styled29.div(({ theme: { color: color2, typography: typography4, background } }) => ({ + textAlign: "start", + padding: "11px 15px", + fontSize: `${typography4.size.s2 - 1}px`, + fontWeight: typography4.weight.regular, + lineHeight: "1rem", + background: background.app, + borderBottom: `1px solid ${color2.border}`, + color: color2.defaultText, + backgroundClip: "padding-box", + position: "relative", + code: { + fontSize: `${typography4.size.s1 - 1}px`, + color: "inherit", + margin: "0 0.2em", + padding: "0 0.2em", + background: "rgba(255, 255, 255, 0.8)", + borderRadius: "2px", + boxShadow: "0 0 0 1px rgba(0, 0, 0, 0.1)" + } +})), TestDiscrepancyMessage = ({ browserTestStatus }) => { + let docsUrl = useStorybookApi5().getDocsUrl({ + subpath: DOCUMENTATION_DISCREPANCY_LINK, + versioned: !0, + renderer: !0 + }), [passed, failed] = browserTestStatus === "error" /* ERROR */ ? ["the CLI", "this browser"] : ["this browser", "the CLI"]; + return React50.createElement(Wrapper10, null, "This interaction test passed in ", passed, ", but the tests failed in ", failed, ".", " ", React50.createElement(Link6, { href: docsUrl, target: "_blank", withArrow: !0 }, "Learn what could cause this")); +}; + +// src/component-testing/components/Toolbar.tsx +import React53 from "react"; +import { Button as Button8, P as P2, Separator, Toolbar as SharedToolbar } from "storybook/internal/components"; +import { + FastForwardIcon, + PlayBackIcon, + PlayNextIcon, + RewindIcon, + SyncIcon +} from "@storybook/icons"; +import { styled as styled31, useTheme as useTheme5 } from "storybook/theming"; + +// src/component-testing/components/StatusBadge.tsx +import React51 from "react"; +import { TooltipNote, WithTooltip } from "storybook/internal/components"; +import { styled as styled30, typography as typography3 } from "storybook/theming"; +var StatusColorMapping = { + rendering: "mediumdark", + playing: "warning", + completed: "positive", + errored: "negative", + aborted: "purple" +}, StatusTextMapping = { + rendering: "Wait", + playing: "Runs", + completed: "Pass", + errored: "Fail", + aborted: "Bail" +}, StatusNoteMapping = { + rendering: "Story is rendering", + playing: "Interactions are running", + completed: "Story ran successfully", + errored: "Story failed to complete", + aborted: "Interactions aborted due to file changes" +}, StyledBadge = styled30.div(({ theme: theme3, status }) => ({ + display: "inline-block", + padding: "4px 6px 4px 8px", + borderRadius: "4px", + backgroundColor: theme3.color[StatusColorMapping[status]], + color: "white", + fontFamily: typography3.fonts.base, + textTransform: "uppercase", + fontSize: typography3.size.s1, + letterSpacing: 3, + fontWeight: typography3.weight.bold, + minWidth: 65, + textAlign: "center" +})), StatusBadge = ({ status }) => { + let badgeText = StatusTextMapping[status], badgeNote = StatusNoteMapping[status]; + return React51.createElement( + WithTooltip, + { + hasChrome: !1, + placement: "top", + trigger: "hover", + tooltip: React51.createElement(TooltipNote, { note: badgeNote }) + }, + React51.createElement(StyledBadge, { "aria-label": `Story status: ${badgeText}`, status }, badgeText) + ); +}; + +// src/component-testing/components/Toolbar.tsx +var ToolbarWrapper = styled31.div(({ theme: theme3 }) => ({ + boxShadow: `${theme3.appBorderColor} 0 -1px 0 0 inset`, + background: theme3.background.app, + position: "sticky", + top: 0, + zIndex: 1 +})), StyledButton3 = styled31(Button8)(({ theme: theme3 }) => ({ + borderRadius: 4, + padding: 6, + color: theme3.textMutedColor, + "&:not(:disabled)": { + "&:hover,&:focus-visible": { + color: theme3.color.secondary + } + } +})), StyledIconButton = styled31(Button8)(({ theme: theme3 }) => ({ + color: theme3.textMutedColor +})), OpenInEditorButton = styled31(Button8)(({ theme: theme3 }) => ({ + color: theme3.color.secondary, + fontWeight: theme3.typography.weight.bold, + justifyContent: "flex-end", + textAlign: "right", + whiteSpace: "nowrap", + fontSize: 13, + lineHeight: 24 +})), StyledLocation = styled31(P2)(({ theme: theme3 }) => ({ + color: theme3.textMutedColor, + cursor: "default", + fontWeight: theme3.typography.weight.regular, + justifyContent: "flex-end", + textAlign: "right", + whiteSpace: "nowrap", + margin: 0, + fontSize: 13 +})), ControlsGroup = styled31.div({ + display: "flex", + alignItems: "center", + flex: 1, + gap: 6 +}), RewindButton = styled31(StyledIconButton)({ + marginInlineStart: 3 +}), JumpToEndButton = styled31(StyledButton3)({ + marginInline: 3, + lineHeight: "12px" +}), RerunButton = styled31(StyledIconButton)(({ theme: theme3, animating, disabled }) => ({ + opacity: disabled ? 0.5 : 1, + svg: { + animation: animating ? `${theme3.animation.rotate360} 200ms ease-out` : void 0 + } +})), Toolbar = ({ + controls, + controlStates, + status, + storyFileName, + onScrollToEnd, + importPath, + canOpenInEditor, + api +}) => { + let buttonText = status === "errored" ? "Scroll to error" : "Scroll to end", theme3 = useTheme5(), preventFocusLoss = (e2) => e2.preventDefault(); + return React53.createElement(ToolbarWrapper, null, React53.createElement( + SharedToolbar, + { + backgroundColor: theme3.background.app, + innerStyle: { gap: 6, paddingInline: 15 }, + "aria-label": "Component test playback controls" + }, + React53.createElement(ControlsGroup, null, React53.createElement(StatusBadge, { status }), React53.createElement( + JumpToEndButton, + { + ariaLabel: !1, + onClick: onScrollToEnd, + onPointerDown: preventFocusLoss, + disabled: !onScrollToEnd + }, + buttonText + ), React53.createElement(Separator, null), React53.createElement( + RewindButton, + { + padding: "small", + variant: "ghost", + ariaLabel: "Go to start", + onClick: controls.start, + onPointerDown: preventFocusLoss, + disabled: !controlStates.start + }, + React53.createElement(RewindIcon, null) + ), React53.createElement( + StyledIconButton, + { + padding: "small", + variant: "ghost", + ariaLabel: "Go back", + onClick: controls.back, + onPointerDown: preventFocusLoss, + disabled: !controlStates.back + }, + React53.createElement(PlayBackIcon, null) + ), React53.createElement( + StyledIconButton, + { + padding: "small", + variant: "ghost", + ariaLabel: "Go forward", + onClick: controls.next, + onPointerDown: preventFocusLoss, + disabled: !controlStates.next + }, + React53.createElement(PlayNextIcon, null) + ), React53.createElement( + StyledIconButton, + { + padding: "small", + variant: "ghost", + ariaLabel: "Go to end", + onClick: controls.end, + onPointerDown: preventFocusLoss, + disabled: !controlStates.end + }, + React53.createElement(FastForwardIcon, null) + ), React53.createElement( + RerunButton, + { + padding: "small", + variant: "ghost", + ariaLabel: "Rerun", + onClick: controls.rerun, + onPointerDown: preventFocusLoss + }, + React53.createElement(SyncIcon, null) + )), + (importPath || storyFileName) && (canOpenInEditor ? React53.createElement( + OpenInEditorButton, + { + padding: "small", + size: "small", + variant: "ghost", + ariaLabel: "Open in editor", + onClick: () => { + api.openInEditor({ + file: importPath + }); + } + }, + storyFileName + ) : React53.createElement(StyledLocation, null, storyFileName)) + )); +}; + +// src/component-testing/components/InteractionsPanel.tsx +var Container3 = styled32.div(({ theme: theme3 }) => ({ + height: "100%", + background: theme3.background.content +})), InteractionsSection = styled32.section({ + position: "relative" +}), InteractionsHeading = styled32.h3(srOnlyStyles3), InteractionsList = styled32.ol({ + margin: 0, + padding: 0 +}), CaughtException = styled32.div(({ theme: theme3 }) => ({ + borderBottom: `1px solid ${theme3.appBorderColor}`, + backgroundColor: theme3.base === "dark" ? curriedTransparentize$1(0.93, theme3.color.negative) : theme3.background.warning, + padding: 15, + fontSize: theme3.typography.size.s2 - 1, + lineHeight: "19px" +})), CaughtExceptionCode = styled32.code(({ theme: theme3 }) => ({ + margin: "0 1px", + padding: 3, + fontSize: theme3.typography.size.s1 - 1, + lineHeight: 1, + verticalAlign: "top", + background: "rgba(0, 0, 0, 0.05)", + border: `1px solid ${theme3.appBorderColor}`, + borderRadius: 3 +})), CaughtExceptionTitle = styled32.div({ + paddingBottom: 4, + fontWeight: "bold" +}), CaughtExceptionDescription = styled32.p({ + margin: 0, + padding: "0 0 20px" +}), CaughtExceptionStack = styled32.pre(({ theme: theme3 }) => ({ + margin: 0, + padding: 0, + "&:not(:last-child)": { + paddingBottom: 16 + }, + fontSize: theme3.typography.size.s1 - 1 +})), StatusAnnouncementMapping = { + rendering: "Component test is rendering.", + playing: "Component test is running.", + completed: "Component test completed successfully.", + errored: "Component test failed.", + aborted: "Component test was aborted." +}, getStatusAnnouncement = (status, hasException) => status === "completed" && hasException ? StatusAnnouncementMapping.errored : StatusAnnouncementMapping[status], InteractionsPanel = React54.memo( + function({ + storyUrl, + status, + calls, + controls, + controlStates, + interactions, + fileName, + hasException, + caughtException, + unhandledErrors, + pausedAt, + onScrollToEnd, + endRef, + hasResultMismatch, + browserTestStatus, + importPath, + canOpenInEditor, + api + }) { + let filter = useAnsiToHtmlFilter(), hasRealInteractions = interactions.some((i2) => i2.id !== INTERNAL_RENDER_CALL_ID), isListBusy = status === "rendering" || status === "playing", statusAnnouncement = getStatusAnnouncement(status, hasException), isStatusAlert = status === "errored" || status === "completed" && hasException; + return React54.useEffect(() => { + $319e236875307eab$export$a9b970dcc4ae71a9(statusAnnouncement, isStatusAlert ? "assertive" : "polite"); + }, [statusAnnouncement, isStatusAlert]), React54.createElement(Container3, null, hasResultMismatch && React54.createElement(TestDiscrepancyMessage, { browserTestStatus }), controlStates.detached && (hasRealInteractions || hasException) && React54.createElement(DetachedDebuggerMessage, { storyUrl }), React54.createElement( + Toolbar, + { + controls, + controlStates, + status, + storyFileName: fileName, + onScrollToEnd, + importPath, + canOpenInEditor, + api + } + ), React54.createElement(InteractionsSection, null, React54.createElement(InteractionsHeading, null, "Interaction steps"), React54.createElement(InteractionsList, { "aria-busy": isListBusy }, interactions.map((call) => React54.createElement( + Interaction, + { + key: call.id, + call, + callsById: calls, + controls, + controlStates, + childCallIds: call.childCallIds, + isHidden: call.isHidden, + isCollapsed: call.isCollapsed, + toggleCollapsed: call.toggleCollapsed, + pausedAt + } + )))), caughtException && !isTestAssertionError(caughtException) && React54.createElement(CaughtException, null, React54.createElement(CaughtExceptionTitle, null, "Caught exception in ", React54.createElement(CaughtExceptionCode, null, "play"), " function"), React54.createElement( + CaughtExceptionStack, + { + "data-chromatic": "ignore", + dangerouslySetInnerHTML: { + __html: filter.toHtml(printSerializedError(caughtException)) + } + } + )), unhandledErrors && React54.createElement(CaughtException, null, React54.createElement(CaughtExceptionTitle, null, "Unhandled Errors"), React54.createElement(CaughtExceptionDescription, null, "Found ", unhandledErrors.length, " unhandled error", unhandledErrors.length > 1 ? "s" : "", " ", "while running the play function. This might cause false positive assertions. Resolve unhandled errors or ignore unhandled errors with setting the", React54.createElement(CaughtExceptionCode, null, "test.dangerouslyIgnoreUnhandledErrors"), " ", "parameter to ", React54.createElement(CaughtExceptionCode, null, "true"), "."), unhandledErrors.map((error, i2) => React54.createElement(CaughtExceptionStack, { key: i2, "data-chromatic": "ignore" }, printSerializedError(error)))), React54.createElement("div", { ref: endRef }), status === "completed" && !caughtException && !hasRealInteractions && React54.createElement(Empty2, null)); + } +); +function printSerializedError(error) { + return error.stack || `${error.name}: ${error.message}`; +} + +// src/component-testing/components/Panel.tsx +var INITIAL_CONTROL_STATES = { + detached: !1, + start: !1, + back: !1, + goto: !1, + next: !1, + end: !1 +}, playStatusMap = { + rendering: "rendering", + playing: "playing", + completed: "completed", + errored: "errored", + aborted: "aborted" +}, terminalStatuses = ["completed", "errored", "aborted"], storyStatusMap = { + done: "status-value:success", + error: "status-value:error", + active: "status-value:pending", + waiting: "status-value:pending" +}, getInteractions = ({ + log, + calls, + collapsed, + setCollapsed +}) => { + let callsById = /* @__PURE__ */ new Map(), childCallMap = /* @__PURE__ */ new Map(); + return log.map(({ callId, ancestors, status }) => { + let isHidden = !1; + return ancestors.forEach((ancestor) => { + collapsed.has(ancestor) && (isHidden = !0), childCallMap.set(ancestor, (childCallMap.get(ancestor) || []).concat(callId)); + }), { ...calls.get(callId), status, isHidden }; + }).map((call) => { + let status = call.status === "error" /* ERROR */ && call.ancestors && callsById.get(call.ancestors.slice(-1)[0])?.status === "active" /* ACTIVE */ ? "active" /* ACTIVE */ : call.status; + return callsById.set(call.id, { ...call, status }), { + ...call, + status, + childCallIds: childCallMap.get(call.id), + isCollapsed: collapsed.has(call.id), + toggleCollapsed: () => setCollapsed((ids) => (ids.has(call.id) ? ids.delete(call.id) : ids.add(call.id), new Set(ids))) + }; + }); +}, getPanelState = (state, { + log, + calls, + collapsed, + setCollapsed +}) => getInteractions({ log, calls, collapsed, setCollapsed }).reduce( + (acc, interaction) => (interaction.id === INTERNAL_RENDER_CALL_ID ? acc.interactions.push(interaction) : state.status !== "rendering" && (acc.controlStates = state.controlStates, acc.interactions.push(interaction), interaction.method !== "step" && acc.interactionsCount++), acc), + { + ...state, + controlStates: INITIAL_CONTROL_STATES, + interactions: [], + interactionsCount: 0 + } +), getInternalRenderCall = (storyId, exception) => ({ + id: INTERNAL_RENDER_CALL_ID, + method: "render", + args: [], + cursor: 0, + storyId, + ancestors: [], + path: [], + interceptable: !0, + retain: !1, + exception +}), getInternalRenderLogItem = (status) => ({ + callId: INTERNAL_RENDER_CALL_ID, + status, + ancestors: [] +}), Panel = memo4( + function({ refId, storyId, storyUrl }) { + let { statusValue, testRunId } = experimental_useStatusStore((state2) => { + let storyStatus = refId ? void 0 : state2[storyId]?.[STATUS_TYPE_ID_COMPONENT_TEST]; + return { + statusValue: storyStatus?.value, + testRunId: storyStatus?.data?.testRunId + }; + }), state = useStorybookState2(), api = useStorybookApi6(), importPath = api.getData(state.storyId, state.refId)?.importPath, canOpenInEditor = global2.CONFIG_TYPE === "DEVELOPMENT" && !state.refId, [panelState, set] = useAddonState2(ADDON_ID8, { + status: "rendering", + controlStates: INITIAL_CONTROL_STATES, + interactions: [], + interactionsCount: 0, + hasException: !1, + pausedAt: void 0, + caughtException: void 0, + unhandledErrors: void 0 + }), [scrollTarget, setScrollTarget] = useState20(void 0), [collapsed, setCollapsed] = useState20(/* @__PURE__ */ new Set()), [hasResultMismatch, setResultMismatch] = useState20(!1), { + status = "rendering", + controlStates = INITIAL_CONTROL_STATES, + interactions = [], + pausedAt = void 0, + caughtException = void 0, + unhandledErrors = void 0 + } = panelState, log = useRef7([getInternalRenderLogItem("active" /* ACTIVE */)]), calls = useRef7( + /* @__PURE__ */ new Map([[INTERNAL_RENDER_CALL_ID, getInternalRenderCall(storyId)]]) + ), setCall = ({ status: status2, ...call }) => calls.current.set(call.id, call), endRef = useRef7(); + useEffect18(() => { + let observer; + return global2.IntersectionObserver && (observer = new global2.IntersectionObserver( + ([end]) => setScrollTarget(end.isIntersecting ? void 0 : end.target), + { root: global2.document.querySelector('#storybook-panel-root [role="tabpanel"]') } + ), endRef.current && observer.observe(endRef.current)), () => observer?.disconnect(); + }, []); + let lastStoryId = useRef7(void 0), latestRenderId = useRef7(0), emit = useChannel3( + { + [EVENTS.CALL]: setCall, + [EVENTS.SYNC]: (payload) => { + log.current = [getInternalRenderLogItem("done" /* DONE */), ...payload.logItems], set( + (state2) => getPanelState( + { ...state2, controlStates: payload.controlStates, pausedAt: payload.pausedAt }, + { log: log.current, calls: calls.current, collapsed, setCollapsed } + ) + ); + }, + [STORY_RENDER_PHASE_CHANGED]: (event) => { + lastStoryId.current === event.storyId && ["preparing", "loading"].includes(event.newPhase) || (lastStoryId.current === event.storyId ? latestRenderId.current = Math.max(latestRenderId.current, event.renderId || 0) : (latestRenderId.current = event.renderId || 0, lastStoryId.current = event.storyId), latestRenderId.current === event.renderId && (event.newPhase === "rendering" ? (log.current = [getInternalRenderLogItem("active" /* ACTIVE */)], calls.current.set(INTERNAL_RENDER_CALL_ID, getInternalRenderCall(storyId)), set({ + status: "rendering", + controlStates: INITIAL_CONTROL_STATES, + pausedAt: void 0, + interactions: [], + interactionsCount: 0, + hasException: !1, + caughtException: void 0, + unhandledErrors: void 0 + })) : set((state2) => { + let status2 = event.newPhase in playStatusMap && !terminalStatuses.includes(state2.status) ? playStatusMap[event.newPhase] : state2.status; + return getPanelState( + { ...state2, status: status2, pausedAt: void 0 }, + { log: log.current, calls: calls.current, collapsed, setCollapsed } + ); + }))); + }, + [STORY_THREW_EXCEPTION]: (e2) => { + log.current = [getInternalRenderLogItem("error" /* ERROR */)], calls.current.set( + INTERNAL_RENDER_CALL_ID, + getInternalRenderCall(storyId, { ...e2, callId: INTERNAL_RENDER_CALL_ID }) + ), set( + (state2) => getPanelState( + { + ...state2, + hasException: !0, + caughtException: void 0, + controlStates: INITIAL_CONTROL_STATES, + pausedAt: void 0 + }, + { log: log.current, calls: calls.current, collapsed, setCollapsed } + ) + ); + }, + [PLAY_FUNCTION_THREW_EXCEPTION]: (caughtException2) => { + set((state2) => ({ ...state2, caughtException: caughtException2, hasException: !0 })); + }, + [UNHANDLED_ERRORS_WHILE_PLAYING]: (unhandledErrors2) => { + set((state2) => ({ ...state2, unhandledErrors: unhandledErrors2, hasException: !0 })); + } + }, + [collapsed] + ); + useEffect18(() => { + set( + (state2) => getPanelState(state2, { log: log.current, calls: calls.current, collapsed, setCollapsed }) + ); + }, [set, collapsed]); + let controls = useMemo6( + () => ({ + start: () => emit(EVENTS.START, { storyId }), + back: () => emit(EVENTS.BACK, { storyId }), + goto: (callId) => emit(EVENTS.GOTO, { storyId, callId }), + next: () => emit(EVENTS.NEXT, { storyId }), + end: () => emit(EVENTS.END, { storyId }), + rerun: () => { + emit(FORCE_REMOUNT, { storyId }); + } + }), + [emit, storyId] + ), storyFilePath = useParameter3("fileName", ""), [fileName] = storyFilePath.toString().split("/").slice(-1), scrollToTarget = () => scrollTarget?.scrollIntoView({ behavior: "smooth", block: "end" }), hasException = !!caughtException || !!unhandledErrors || interactions.some((v2) => v2.status === "error" /* ERROR */), browserTestStatus = useMemo6(() => status !== "playing" && (interactions.length > 0 || hasException) ? hasException ? "error" /* ERROR */ : "done" /* DONE */ : status === "playing" ? "active" /* ACTIVE */ : void 0, [status, interactions, hasException]); + return useEffect18(() => { + if (browserTestStatus && statusValue && statusValue !== "status-value:pending" && statusValue !== storyStatusMap[browserTestStatus]) { + let timeout = setTimeout( + () => setResultMismatch((currentValue) => (currentValue || emit(STORYBOOK_ADDON_TEST_CHANNEL, { + type: "test-discrepancy", + payload: { + browserStatus: browserTestStatus === "done" /* DONE */ ? "PASS" : "FAIL", + cliStatus: browserTestStatus === "done" /* DONE */ ? "FAIL" : "PASS", + storyId, + testRunId + } + }), !0)), + 2e3 + ); + return () => clearTimeout(timeout); + } else + setResultMismatch(!1); + }, [emit, browserTestStatus, statusValue, storyId, testRunId]), React55.createElement(Fragment3, { key: "component-tests" }, React55.createElement( + InteractionsPanel, + { + storyUrl, + status, + hasResultMismatch, + browserTestStatus, + calls: calls.current, + controls, + controlStates: { ...controlStates, detached: !!refId || controlStates.detached }, + interactions, + fileName, + hasException, + caughtException, + unhandledErrors, + pausedAt, + endRef, + onScrollToEnd: scrollTarget && scrollToTarget, + importPath, + canOpenInEditor, + api + } + )); + } +); + +// src/component-testing/components/PanelTitle.tsx +import React56 from "react"; +import { Badge as Badge3 } from "storybook/internal/components"; +import { useAddonState as useAddonState3, useStorybookApi as useStorybookApi7 } from "storybook/manager-api"; +function PanelTitle() { + let selectedPanel = useStorybookApi7().getSelectedPanel(), [addonState = {}] = useAddonState3(ADDON_ID8), { status, hasException, interactionsCount } = addonState; + return React56.createElement("div", { style: { display: "flex", alignItems: "center", gap: 6 } }, React56.createElement("span", null, "Interactions"), interactionsCount && status !== "errored" && !hasException ? React56.createElement(Badge3, { compact: !0, status: selectedPanel === PANEL_ID2 ? "active" : "neutral" }, interactionsCount) : null, status === "errored" || hasException ? React56.createElement(StatusIcon, { status: "error" /* ERROR */ }) : null); +} + +// src/component-testing/manager.tsx +var manager_default4 = addons4.register(ADDON_ID8, () => { + if (globalThis?.FEATURES?.interactions) { + let filter = ({ state }) => { + let origin = state.refId && state.refs[state.refId]?.url || document.location.origin, { pathname, search = "" } = state.location, path = pathname + (state.refId ? search.replace(`/${state.refId}_`, "/") : search); + return { + refId: state.refId, + storyId: state.storyId, + storyUrl: origin + path + }; + }; + addons4.add(PANEL_ID2, { + type: types3.PANEL, + title: () => React57.createElement(PanelTitle, null), + match: ({ viewMode }) => viewMode === "story", + disabled: isInteractionsDisabled, + render: ({ active }) => React57.createElement(AddonPanel2, { active: !!active }, React57.createElement(Consumer, { filter }, (props) => React57.createElement(Panel, { ...props }))) + }); + } +}); + +// src/backgrounds/manager.tsx +import React59 from "react"; +import { addons as addons5, types as types4 } from "storybook/manager-api"; + +// src/backgrounds/components/Tool.tsx +import React58, { Fragment as Fragment4, memo as memo5, useCallback as useCallback9 } from "react"; +import { Select, ToggleButton as ToggleButton2 } from "storybook/internal/components"; +import { CircleIcon as CircleIcon2, GridIcon, PhotoIcon } from "@storybook/icons"; +import { useGlobals as useGlobals2, useParameter as useParameter4 } from "storybook/manager-api"; +var BackgroundTool = memo5(function() { + let config = useParameter4(PARAM_KEY3), [globals, updateGlobals, storyGlobals] = useGlobals2(), { options = DEFAULT_BACKGROUNDS, disable = !0 } = config || {}; + if (disable) + return null; + let data = globals[PARAM_KEY3] || {}, backgroundName = data.value, isGridActive = data.grid || !1, item = options[backgroundName], isLocked = !!storyGlobals?.[PARAM_KEY3], length = Object.keys(options).length; + return React58.createElement( + Pure, + { + length, + backgroundMap: options, + item, + updateGlobals, + backgroundName, + isLocked, + isGridActive + } + ); +}), Pure = memo5(function(props) { + let { + length, + updateGlobals, + backgroundMap, + backgroundName, + isLocked, + isGridActive: isGrid + } = props, update = useCallback9( + (input) => { + updateGlobals({ + [PARAM_KEY3]: input + }); + }, + [updateGlobals] + ), options = Object.entries(backgroundMap).map(([k2, value]) => ({ + value: k2, + title: value.name, + icon: React58.createElement(CircleIcon2, { color: value?.value || "grey" }) + })); + return React58.createElement(Fragment4, null, React58.createElement( + ToggleButton2, + { + padding: "small", + variant: "ghost", + key: "grid", + pressed: isGrid, + disabled: isLocked, + ariaLabel: isLocked ? "Grid set by story parameters" : "Grid visibility", + tooltip: isLocked ? "Grid set by story parameters" : "Toggle grid visibility", + onClick: () => update({ value: backgroundName, grid: !isGrid }) + }, + React58.createElement(GridIcon, null) + ), length > 0 ? React58.createElement( + Select, + { + resetLabel: "Reset background", + onReset: () => update(void 0), + disabled: isLocked, + key: "background", + icon: React58.createElement(PhotoIcon, null), + ariaLabel: isLocked ? "Background set by story parameters" : "Preview background", + tooltip: isLocked ? "Background set by story parameters" : "Change background", + defaultOptions: backgroundName, + options, + onSelect: (selected) => update({ value: selected, grid: isGrid }) + } + ) : null); +}); + +// src/backgrounds/manager.tsx +var manager_default5 = addons5.register(ADDON_ID3, () => { + globalThis?.FEATURES?.backgrounds && addons5.add(ADDON_ID3, { + title: "Backgrounds", + type: types4.TOOL, + match: ({ viewMode, tabId }) => !!(viewMode && viewMode.match(/^(story|docs)$/)) && !tabId, + render: () => React59.createElement(BackgroundTool, null) + }); +}); + +// src/measure/manager.tsx +import React61 from "react"; +import { addons as addons6, types as types5 } from "storybook/manager-api"; + +// src/measure/Tool.tsx +import React60, { useCallback as useCallback10, useEffect as useEffect19 } from "react"; +import { ToggleButton as ToggleButton3 } from "storybook/internal/components"; +import { RulerIcon } from "@storybook/icons"; +import { useGlobals as useGlobals3, useParameter as useParameter5, useStorybookApi as useStorybookApi8 } from "storybook/manager-api"; +var Tool = () => { + let isDisabled = useParameter5("measure")?.disable, [globals, updateGlobals] = useGlobals3(), { measureEnabled } = globals || {}, api = useStorybookApi8(), toggleMeasure = useCallback10( + () => updateGlobals({ + measureEnabled: !measureEnabled + }), + [updateGlobals, measureEnabled] + ); + return useEffect19(() => { + isDisabled || api.setAddonShortcut(ADDON_ID4, { + label: "Toggle Measure", + defaultShortcut: ["M"], + actionName: "measure", + showInMenu: !1, + action: toggleMeasure + }); + }, [toggleMeasure, api, isDisabled]), isDisabled ? null : React60.createElement( + ToggleButton3, + { + key: TOOL_ID2, + pressed: measureEnabled, + padding: "small", + variant: "ghost", + ariaLabel: "Measure tool", + tooltip: "Toggle measure", + ariaDescription: "When enabled, this tool shows dimensions and whitespace (margin, padding, border) for the currently hovered element in the preview area. Does not work with keyboard focus.", + onClick: toggleMeasure + }, + React60.createElement(RulerIcon, null) + ); +}; + +// src/measure/manager.tsx +var manager_default6 = addons6.register(ADDON_ID4, () => { + globalThis?.FEATURES?.measure && addons6.add(TOOL_ID2, { + type: types5.TOOL, + title: "Measure", + match: ({ viewMode, tabId }) => viewMode === "story" && !tabId, + render: () => React61.createElement(Tool, null) + }); +}); + +// src/outline/manager.tsx +import React64 from "react"; +import { addons as addons7, types as types6 } from "storybook/manager-api"; + +// src/outline/OutlineSelector.tsx +import React63, { memo as memo6, useCallback as useCallback11, useEffect as useEffect20 } from "react"; +import { ToggleButton as ToggleButton4 } from "storybook/internal/components"; +import { OutlineIcon } from "@storybook/icons"; +import { useGlobals as useGlobals4, useParameter as useParameter6, useStorybookApi as useStorybookApi9 } from "storybook/manager-api"; +var OutlineSelector = memo6(function() { + let isDisabled = useParameter6(PARAM_KEY4)?.disable, [globals, updateGlobals] = useGlobals4(), api = useStorybookApi9(), isActive = [!0, "true"].includes(globals[PARAM_KEY4]), toggleOutline = useCallback11( + () => updateGlobals({ + [PARAM_KEY4]: !isActive + }), + [isActive, updateGlobals] + ); + return useEffect20(() => { + isDisabled || api.setAddonShortcut(ADDON_ID5, { + label: "Toggle Outline", + defaultShortcut: ["alt", "O"], + actionName: "outline", + showInMenu: !1, + action: toggleOutline + }); + }, [toggleOutline, api, isDisabled]), isDisabled ? null : React63.createElement( + ToggleButton4, + { + key: "outline", + padding: "small", + variant: "ghost", + pressed: isActive, + ariaLabel: "Outline tool", + ariaDescription: "When enabled, this tool displays the outline of every element in the preview area, which helps understand their layout.", + tooltip: "Toggle outline", + onClick: toggleOutline + }, + React63.createElement(OutlineIcon, null) + ); +}); + +// src/outline/manager.tsx +var manager_default7 = addons7.register(ADDON_ID5, () => { + globalThis?.FEATURES?.outline && addons7.add(ADDON_ID5, { + title: "Outline", + type: types6.TOOL, + match: ({ viewMode, tabId }) => !!(viewMode && viewMode.match(/^(story|docs)$/)) && !tabId, + render: () => React64.createElement(OutlineSelector, null) + }); +}); + +// src/viewport/manager.tsx +import * as React67 from "react"; +import { addons as addons8, types as types7 } from "storybook/manager-api"; + +// src/viewport/components/Tool.tsx +import React66, { useMemo as useMemo8 } from "react"; +import { Select as Select2 } from "storybook/internal/components"; +import { GrowIcon } from "@storybook/icons"; +import { styled as styled33 } from "storybook/theming"; + +// src/viewport/useViewport.ts +import { useCallback as useCallback12, useEffect as useEffect21, useMemo as useMemo7, useRef as useRef8 } from "react"; +import { deprecate } from "storybook/internal/client-logger"; +import { useGlobals as useGlobals5, useParameter as useParameter7, useStorybookApi as useStorybookApi10 } from "storybook/manager-api"; +var cycle = (viewports, current, direction = 1) => { + let keys = Object.keys(viewports), nextIndex = (current ? keys.indexOf(current) : -1) + direction; + return nextIndex < 0 ? keys[keys.length - 1] : nextIndex >= keys.length ? keys[0] : keys[nextIndex]; +}, normalizeGlobal = (value, defaultIsRotated) => typeof value == "string" ? { value, isRotated: defaultIsRotated } : { value: value?.value, isRotated: value?.isRotated ?? defaultIsRotated }, useViewport = () => { + let api = useStorybookApi10(), { viewMode } = api.getUrlState(), lastSelectedOption = useRef8(), parameter = useParameter7(PARAM_KEY), [globals, updateGlobals, storyGlobals, userGlobals] = useGlobals5(); + useEffect21(() => { + if (parameter && "defaultViewport" in parameter) { + let value2 = parameter.defaultViewport; + deprecate( + `The \`viewport.defaultViewport\` parameter was removed in Storybook 10. Use \`globals: { viewport: ${JSON.stringify(value2)} }\` instead, or run \`npx storybook automigrate\` to update your code automatically.` + ); + } + }, [parameter]); + let { options = MINIMAL_VIEWPORTS, disable = !1 } = parameter || {}, { name, type, width, height, value, option, isCustom, isDefault, isLocked, isRotated } = resolveViewport({ + globals, + storyGlobals, + userGlobals, + options, + lastSelectedOption: lastSelectedOption.current, + disable, + viewMode + }), update = useCallback12( + (input) => updateGlobals({ [PARAM_KEY]: normalizeGlobal(input, !1) }), + [updateGlobals] + ), resize = useCallback12( + (width2, height2) => { + let w2 = width2.replace(/px$/, "").replace(/%$/, "pct"), h2 = height2.replace(/px$/, "").replace(/%$/, "pct"), value2 = isRotated ? `${h2}-${w2}` : `${w2}-${h2}`; + update({ value: value2, isRotated }); + }, + [update, isRotated] + ); + return useEffect21(() => { + parameter && option && (Object.hasOwn(options, option) ? lastSelectedOption.current = option : (lastSelectedOption.current = void 0, PARAM_KEY in storyGlobals || update({ value: void 0, isRotated: !1 }))); + }, [parameter, storyGlobals, options, option, update]), useEffect21(() => { + api.setAddonShortcut(ADDON_ID, { + label: "Next viewport", + defaultShortcut: ["alt", "V"], + actionName: "next", + action: () => update({ value: cycle(options, lastSelectedOption.current), isRotated }) + }), api.setAddonShortcut(ADDON_ID, { + label: "Previous viewport", + defaultShortcut: ["alt", "shift", "V"], + actionName: "previous", + action: () => update({ value: cycle(options, lastSelectedOption.current, -1), isRotated }) + }), api.setAddonShortcut(ADDON_ID, { + label: "Reset viewport", + defaultShortcut: ["alt", "control", "V"], + actionName: "reset", + action: () => update({ value: void 0, isRotated: !1 }) + }); + }, [api, update, options, isRotated]), useMemo7( + () => ({ + name, + type, + width, + height, + value, + option, + isCustom, + isDefault, + isLocked, + isRotated, + options, + lastSelectedOption: lastSelectedOption.current, + resize, + reset: () => update({ value: void 0, isRotated: !1 }), + rotate: () => update({ value, isRotated: !isRotated }), + select: (value2) => update({ value: value2, isRotated }) + }), + [ + name, + type, + width, + height, + value, + option, + isCustom, + isDefault, + isRotated, + isLocked, + options, + resize, + update + ] + ); +}; + +// src/viewport/viewportIcons.tsx +import React65 from "react"; +import { BrowserIcon, DiamondIcon, MobileIcon, TabletIcon, WatchIcon } from "@storybook/icons"; +var iconsMap = { + desktop: React65.createElement(BrowserIcon, null), + mobile: React65.createElement(MobileIcon, null), + tablet: React65.createElement(TabletIcon, null), + watch: React65.createElement(WatchIcon, null), + other: React65.createElement(DiamondIcon, null) +}; + +// src/viewport/components/Tool.tsx +var Dimensions = styled33.div(({ theme: theme3 }) => ({ + display: "flex", + gap: 2, + marginLeft: 20, + fontFamily: theme3.typography.fonts.mono, + fontSize: theme3.typography.size.s1 - 1, + fontWeight: theme3.typography.weight.regular, + color: theme3.textMutedColor +})), ViewportTool = () => { + let { + name, + value, + isDefault, + isCustom, + isLocked, + options: viewportMap, + reset, + select + } = useViewport(), options = useMemo8(() => { + let presetOptions = Object.entries(viewportMap).map(([k2, value2]) => ({ + value: k2, + title: value2.name, + icon: iconsMap[value2.type], + right: React66.createElement(Dimensions, null, React66.createElement("span", null, value2.styles.width.replace("px", "")), React66.createElement("span", null, "\xD7"), React66.createElement("span", null, value2.styles.height.replace("px", ""))) + })); + return isCustom && value ? [ + ...presetOptions, + { + value, + title: name, + icon: iconsMap.other, + right: null + } + ] : presetOptions; + }, [viewportMap, isCustom, value, name]); + return React66.createElement( + Select2, + { + resetLabel: "Reset viewport", + onReset: reset, + key: "viewport", + disabled: isLocked, + ariaLabel: isLocked ? "Viewport size set by story parameters" : "Viewport size", + ariaDescription: "Select a viewport among predefined options for the preview area, or reset to the default viewport.", + tooltip: isLocked ? "Viewport set by story parameters" : "Change viewport", + defaultOptions: value, + options, + onSelect: (selected) => select(selected), + icon: React66.createElement(GrowIcon, null) + }, + isDefault ? null : name + ); +}; + +// src/viewport/manager.tsx +var manager_default8 = addons8.register(ADDON_ID, () => { + globalThis?.FEATURES?.viewport && addons8.add(TOOL_ID, { + title: "viewport / media-queries", + type: types7.TOOL, + match: ({ viewMode, tabId }) => viewMode === "story" && !tabId, + render: () => React67.createElement(ViewportTool, null) + }); +}); + +// src/core-server/presets/common-manager.ts +var common_manager_default = [ + manager_default, + manager_default6, + manager_default3, + manager_default5, + manager_default4, + manager_default2, + manager_default8, + manager_default7 +]; +export { + common_manager_default as default +}; diff --git a/tools/ui/node_modules/storybook/dist/core-server/presets/common-override-preset.js b/tools/ui/node_modules/storybook/dist/core-server/presets/common-override-preset.js new file mode 100644 index 0000000000000000000000000000000000000000..7be8a51a0135414138354f27b737e899238bec7c --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/core-server/presets/common-override-preset.js @@ -0,0 +1,81 @@ +import CJS_COMPAT_NODE_URL_9zo2090uugq from 'node:url'; +import CJS_COMPAT_NODE_PATH_9zo2090uugq from 'node:path'; +import CJS_COMPAT_NODE_MODULE_9zo2090uugq from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_9zo2090uugq.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_9zo2090uugq.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_9zo2090uugq.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ +import { + slash +} from "../../_node-chunks/chunk-7NFVFFX4.js"; +import { + glob +} from "../../_node-chunks/chunk-QBGVQW7M.js"; +import "../../_node-chunks/chunk-IATWEHFW.js"; + +// src/core-server/utils/remove-mdx-entries.ts +import { isAbsolute, join, relative } from "node:path"; +import { commonGlobOptions, normalizeStories } from "storybook/internal/common"; +async function removeMDXEntries(entries, options) { + let list = normalizeStories(entries, { + configDir: options.configDir, + workingDir: options.configDir, + defaultFilesPattern: "**/*.@(stories.@(js|jsx|mjs|ts|tsx))" + }); + return (await Promise.all( + list.map(async ({ directory, files, titlePrefix }) => { + let pattern = join(directory, files), absolutePattern = isAbsolute(pattern) ? pattern : join(options.configDir, pattern), absoluteDirectory = isAbsolute(directory) ? directory : join(options.configDir, directory); + return { + files: (await glob(slash(absolutePattern), { + ...commonGlobOptions(absolutePattern), + follow: !0 + })).map((f) => relative(absoluteDirectory, f)), + directory, + titlePrefix + }; + }) + )).flatMap(({ directory, files, titlePrefix }, i) => { + let filteredEntries = files.filter((s) => !s.endsWith(".mdx")), items = []; + return filteredEntries.length < files.length ? items = filteredEntries.map((k) => ({ + directory, + titlePrefix, + files: `**/${k}` + })) : items = [ + { directory: list[i].directory, titlePrefix: list[i].titlePrefix, files: list[i].files } + ], items; + }); +} + +// src/core-server/presets/common-override-preset.ts +var framework = async (config) => { + let name = typeof config == "string" ? config : config?.name, options = typeof config == "string" ? {} : config?.options || {}; + return { + name, + options + }; +}, stories = async (entries, options) => options?.build?.test?.disableMDXEntries ? removeMDXEntries(entries, options) : entries, typescript = async (input, options) => options?.build?.test?.disableDocgen ? { ...input ?? {}, reactDocgen: !1, check: !1 } : input, createTestBuildFeatures = (value) => ({ + disableBlocks: value, + disabledAddons: value ? ["@storybook/addon-docs", "@storybook/addon-essentials/docs", "@storybook/addon-coverage"] : [], + disableMDXEntries: value, + disableAutoDocs: value, + disableDocgen: value, + disableSourcemaps: value, + disableTreeShaking: value, + esbuildMinify: value +}), build = async (value, options) => ({ + ...value, + test: options.test ? { + ...createTestBuildFeatures(!!options.test), + ...value?.test + } : createTestBuildFeatures(!1) +}); +export { + build, + framework, + stories, + typescript +}; diff --git a/tools/ui/node_modules/storybook/dist/core-server/presets/common-preset.js b/tools/ui/node_modules/storybook/dist/core-server/presets/common-preset.js new file mode 100644 index 0000000000000000000000000000000000000000..f0d1f51c606ffe1b06c695a5f6600d943500a520 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/core-server/presets/common-preset.js @@ -0,0 +1,2072 @@ +import CJS_COMPAT_NODE_URL_9zo2090uugq from 'node:url'; +import CJS_COMPAT_NODE_PATH_9zo2090uugq from 'node:path'; +import CJS_COMPAT_NODE_MODULE_9zo2090uugq from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_9zo2090uugq.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_9zo2090uugq.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_9zo2090uugq.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ +import { + REVIEW_EVENTS +} from "../../_node-chunks/chunk-FLMS7GQC.js"; +import "../../_node-chunks/chunk-FWMB2W64.js"; +import "../../_node-chunks/chunk-J5J2U7AN.js"; +import { + docgenQueryStaticPath, + doesStoryFileExist, + fullTestProviderStore, + generateStoryFile, + getComponentCandidates, + getStoryMetadata, + getWsToken, + parseStaticDir, + registerModuleGraphService, + runStoryTests, + sendTelemetryError, + storyDocsQueryStaticPath, + throttle, + universalTestProviderStore +} from "../../_node-chunks/chunk-PUL3B5RN.js"; +import "../../_node-chunks/chunk-VF7RHUTK.js"; +import "../../_node-chunks/chunk-KLPIPE5T.js"; +import { + get, + isStoryCreatedByAISetup +} from "../../_node-chunks/chunk-ICZ5TGZI.js"; +import "../../_node-chunks/chunk-D3SKCU36.js"; +import { + getService, + getStoryImportPathFromEntry, + registerService, + selectComponentEntriesByComponentId, + toMerged +} from "../../_node-chunks/chunk-M4WPWXBW.js"; +import "../../_node-chunks/chunk-R4ZTPG4K.js"; +import "../../_node-chunks/chunk-5VUPW2CE.js"; +import { + array, + custom, + looseObject, + object, + optional, + record, + string, + undefined_, + void_ +} from "../../_node-chunks/chunk-DAV6URMF.js"; +import "../../_node-chunks/chunk-TL6AUD3A.js"; +import "../../_node-chunks/chunk-6RKCYWK4.js"; +import { + globalSettings +} from "../../_node-chunks/chunk-KIPVWN75.js"; +import { + invariant +} from "../../_node-chunks/chunk-Q2H5WIGS.js"; +import { + importMetaResolve, + resolvePackageDir +} from "../../_node-chunks/chunk-P34EJWSD.js"; +import "../../_node-chunks/chunk-WBGUDDIU.js"; +import "../../_node-chunks/chunk-5OSVVXLI.js"; +import { + OpenServiceDocgenMissingComponentError +} from "../../_node-chunks/chunk-7T7BCSOI.js"; +import { + require_dist +} from "../../_node-chunks/chunk-RSQFAFCN.js"; +import { + require_picocolors +} from "../../_node-chunks/chunk-SLGVGTWJ.js"; +import { + toStoryIndexPath +} from "../../_node-chunks/chunk-WQRGS6PD.js"; +import { + isAbsolute, + join +} from "../../_node-chunks/chunk-AN5PKEA2.js"; +import "../../_node-chunks/chunk-QBGVQW7M.js"; +import { + __commonJS, + __require, + __toESM +} from "../../_node-chunks/chunk-IATWEHFW.js"; + +// ../../node_modules/shell-quote/quote.js +var require_quote = __commonJS({ + "../../node_modules/shell-quote/quote.js"(exports, module) { + "use strict"; + module.exports = function(xs) { + return xs.map(function(s) { + return s === "" ? "''" : s && typeof s == "object" ? s.op.replace(/(.)/g, "\\$1") : /["\s\\]/.test(s) && !/'/.test(s) ? "'" + s.replace(/(['])/g, "\\$1") + "'" : /["'\s]/.test(s) ? '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"' : String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, "$1\\$2"); + }).join(" "); + }; + } +}); + +// ../../node_modules/shell-quote/parse.js +var require_parse = __commonJS({ + "../../node_modules/shell-quote/parse.js"(exports, module) { + "use strict"; + var CONTROL = "(?:" + [ + "\\|\\|", + "\\&\\&", + ";;", + "\\|\\&", + "\\<\\(", + "\\<\\<\\<", + ">>", + ">\\&", + "<\\&", + "[&;()|<>]" + ].join("|") + ")", controlRE = new RegExp("^" + CONTROL + "$"), META = "|&;()<> \\t", SINGLE_QUOTE = '"((\\\\"|[^"])*?)"', DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'", hash = /^#$/, SQ = "'", DQ = '"', DS = "$", TOKEN = "", mult = 4294967296; + for (i = 0; i < 4; i++) + TOKEN += (mult * Math.random()).toString(16); + var i, startsWithToken = new RegExp("^" + TOKEN); + function matchAll(s, r) { + for (var origIndex = r.lastIndex, matches = [], matchObj; matchObj = r.exec(s); ) + matches.push(matchObj), r.lastIndex === matchObj.index && (r.lastIndex += 1); + return r.lastIndex = origIndex, matches; + } + function getVar(env2, pre, key) { + var r = typeof env2 == "function" ? env2(key) : env2[key]; + return typeof r > "u" && key != "" ? r = "" : typeof r > "u" && (r = "$"), typeof r == "object" ? pre + TOKEN + JSON.stringify(r) + TOKEN : pre + r; + } + function parseInternal(string2, env2, opts) { + opts || (opts = {}); + var BS = opts.escape || "\\", BAREWORD = "(\\" + BS + `['"` + META + `]|[^\\s'"` + META + "])+", chunker = new RegExp([ + "(" + CONTROL + ")", + // control chars + "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+" + ].join("|"), "g"), matches = matchAll(string2, chunker); + if (matches.length === 0) + return []; + env2 || (env2 = {}); + var commented = !1; + return matches.map(function(match) { + var s = match[0]; + if (!s || commented) + return; + if (controlRE.test(s)) + return { op: s }; + var quote = !1, esc = !1, out = "", isGlob = !1, i2; + function parseEnvVar() { + i2 += 1; + var varend, varname, char = s.charAt(i2); + if (char === "{") { + if (i2 += 1, s.charAt(i2) === "}") + throw new Error("Bad substitution: " + s.slice(i2 - 2, i2 + 1)); + if (varend = s.indexOf("}", i2), varend < 0) + throw new Error("Bad substitution: " + s.slice(i2)); + varname = s.slice(i2, varend), i2 = varend; + } else if (/[*@#?$!_-]/.test(char)) + varname = char, i2 += 1; + else { + var slicedFromI = s.slice(i2); + varend = slicedFromI.match(/[^\w\d_]/), varend ? (varname = slicedFromI.slice(0, varend.index), i2 += varend.index - 1) : (varname = slicedFromI, i2 = s.length); + } + return getVar(env2, "", varname); + } + for (i2 = 0; i2 < s.length; i2++) { + var c = s.charAt(i2); + if (isGlob = isGlob || !quote && (c === "*" || c === "?"), esc) + out += c, esc = !1; + else if (quote) + c === quote ? quote = !1 : quote == SQ ? out += c : c === BS ? (i2 += 1, c = s.charAt(i2), c === DQ || c === BS || c === DS ? out += c : out += BS + c) : c === DS ? out += parseEnvVar() : out += c; + else if (c === DQ || c === SQ) + quote = c; + else { + if (controlRE.test(c)) + return { op: s }; + if (hash.test(c)) { + commented = !0; + var commentObj = { comment: string2.slice(match.index + i2 + 1) }; + return out.length ? [out, commentObj] : [commentObj]; + } else c === BS ? esc = !0 : c === DS ? out += parseEnvVar() : out += c; + } + } + return isGlob ? { op: "glob", pattern: out } : out; + }).reduce(function(prev, arg) { + return typeof arg > "u" ? prev : prev.concat(arg); + }, []); + } + module.exports = function(s, env2, opts) { + var mapped = parseInternal(s, env2, opts); + return typeof env2 != "function" ? mapped : mapped.reduce(function(acc, s2) { + if (typeof s2 == "object") + return acc.concat(s2); + var xs = s2.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g")); + return xs.length === 1 ? acc.concat(xs[0]) : acc.concat(xs.filter(Boolean).map(function(x) { + return startsWithToken.test(x) ? JSON.parse(x.split(TOKEN)[1]) : x; + })); + }, []); + }; + } +}); + +// ../../node_modules/shell-quote/index.js +var require_shell_quote = __commonJS({ + "../../node_modules/shell-quote/index.js"(exports) { + "use strict"; + exports.quote = require_quote(); + exports.parse = require_parse(); + } +}); + +// ../../node_modules/launch-editor/editor-info/macos.js +var require_macos = __commonJS({ + "../../node_modules/launch-editor/editor-info/macos.js"(exports, module) { + module.exports = { + "/Applications/Atom.app/Contents/MacOS/Atom": "atom", + "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta": "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta", + "/Applications/Brackets.app/Contents/MacOS/Brackets": "brackets", + "/Applications/Sublime Text.app/Contents/MacOS/Sublime Text": "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl", + "/Applications/Sublime Text.app/Contents/MacOS/sublime_text": "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl", + "/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2": "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl", + "/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text": "/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl", + "/Applications/Visual Studio Code.app/Contents/MacOS/Code": "code", + "/Applications/Visual Studio Code.app/Contents/MacOS/Electron": "code", + "/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders": "code-insiders", + "/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron": "code-insiders", + "/Applications/VSCodium.app/Contents/MacOS/Electron": "codium", + "/Applications/Cursor.app/Contents/MacOS/Cursor": "cursor", + "/Applications/Trae.app/Contents/MacOS/Electron": "trae", + "/Applications/Antigravity.app/Contents/MacOS/Electron": "antigravity", + "/Applications/AppCode.app/Contents/MacOS/appcode": "/Applications/AppCode.app/Contents/MacOS/appcode", + "/Applications/CLion.app/Contents/MacOS/clion": "/Applications/CLion.app/Contents/MacOS/clion", + "/Applications/IntelliJ IDEA.app/Contents/MacOS/idea": "/Applications/IntelliJ IDEA.app/Contents/MacOS/idea", + "/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea": "/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea", + "/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea": "/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea", + "/Applications/PhpStorm.app/Contents/MacOS/phpstorm": "/Applications/PhpStorm.app/Contents/MacOS/phpstorm", + "/Applications/PyCharm.app/Contents/MacOS/pycharm": "/Applications/PyCharm.app/Contents/MacOS/pycharm", + "/Applications/PyCharm CE.app/Contents/MacOS/pycharm": "/Applications/PyCharm CE.app/Contents/MacOS/pycharm", + "/Applications/RubyMine.app/Contents/MacOS/rubymine": "/Applications/RubyMine.app/Contents/MacOS/rubymine", + "/Applications/WebStorm.app/Contents/MacOS/webstorm": "/Applications/WebStorm.app/Contents/MacOS/webstorm", + "/Applications/MacVim.app/Contents/MacOS/MacVim": "mvim", + "/Applications/GoLand.app/Contents/MacOS/goland": "/Applications/GoLand.app/Contents/MacOS/goland", + "/Applications/Rider.app/Contents/MacOS/rider": "/Applications/Rider.app/Contents/MacOS/rider", + "/Applications/Zed.app/Contents/MacOS/zed": "zed" + }; + } +}); + +// ../../node_modules/launch-editor/editor-info/linux.js +var require_linux = __commonJS({ + "../../node_modules/launch-editor/editor-info/linux.js"(exports, module) { + module.exports = { + atom: "atom", + Brackets: "brackets", + "code-insiders": "code-insiders", + code: "code", + vscodium: "vscodium", + codium: "codium", + cursor: "cursor", + trae: "trae", + antigravity: "antigravity", + emacs: "emacs", + gvim: "gvim", + idea: "idea", + "idea.sh": "idea", + phpstorm: "phpstorm", + "phpstorm.sh": "phpstorm", + pycharm: "pycharm", + "pycharm.sh": "pycharm", + rubymine: "rubymine", + "rubymine.sh": "rubymine", + sublime_text: "subl", + vim: "vim", + webstorm: "webstorm", + "webstorm.sh": "webstorm", + goland: "goland", + "goland.sh": "goland", + rider: "rider", + "rider.sh": "rider", + zed: "zed" + }; + } +}); + +// ../../node_modules/launch-editor/editor-info/windows.js +var require_windows = __commonJS({ + "../../node_modules/launch-editor/editor-info/windows.js"(exports, module) { + module.exports = [ + "Brackets.exe", + "Code.exe", + "Code - Insiders.exe", + "VSCodium.exe", + "Cursor.exe", + "atom.exe", + "sublime_text.exe", + "notepad++.exe", + "clion.exe", + "clion64.exe", + "idea.exe", + "idea64.exe", + "phpstorm.exe", + "phpstorm64.exe", + "pycharm.exe", + "pycharm64.exe", + "rubymine.exe", + "rubymine64.exe", + "webstorm.exe", + "webstorm64.exe", + "goland.exe", + "goland64.exe", + "rider.exe", + "rider64.exe", + "Trae.exe", + "zed.exe", + "Antigravity.exe" + ]; + } +}); + +// ../../node_modules/launch-editor/guess.js +var require_guess = __commonJS({ + "../../node_modules/launch-editor/guess.js"(exports, module) { + var path = __require("path"), shellQuote = require_shell_quote(), childProcess = __require("child_process"), COMMON_EDITORS_MACOS = require_macos(), COMMON_EDITORS_LINUX = require_linux(), COMMON_EDITORS_WIN = require_windows(); + module.exports = function(specifiedEditor) { + if (specifiedEditor) + return shellQuote.parse(specifiedEditor); + if (process.env.LAUNCH_EDITOR) + return [process.env.LAUNCH_EDITOR]; + if (process.versions.webcontainer) + return [process.env.EDITOR || "code"]; + try { + if (process.platform === "darwin") { + let output = childProcess.execSync("ps x -o comm=", { + stdio: ["pipe", "pipe", "ignore"] + }).toString(), processNames = Object.keys(COMMON_EDITORS_MACOS), processList = output.split(` +`); + for (let i = 0; i < processNames.length; i++) { + let processName = processNames[i]; + if (processList.includes(processName)) + return [COMMON_EDITORS_MACOS[processName]]; + let processNameWithoutApplications = processName.replace("/Applications", ""); + if (output.indexOf(processNameWithoutApplications) !== -1) { + if (processName !== COMMON_EDITORS_MACOS[processName]) + return [COMMON_EDITORS_MACOS[processName]]; + let runningProcess = processList.find((procName) => procName.endsWith(processNameWithoutApplications)); + if (runningProcess !== void 0) + return [runningProcess]; + } + } + } else if (process.platform === "win32") { + let runningProcesses = childProcess.execSync( + 'powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"', + { + stdio: ["pipe", "pipe", "ignore"] + } + ).toString().split(`\r +`); + for (let i = 0; i < runningProcesses.length; i++) { + let fullProcessPath = runningProcesses[i].trim(), shortProcessName = path.basename(fullProcessPath); + if (COMMON_EDITORS_WIN.indexOf(shortProcessName) !== -1) + return [fullProcessPath]; + } + } else if (process.platform === "linux") { + let output = childProcess.execSync("ps x --no-heading -o comm --sort=comm", { + stdio: ["pipe", "pipe", "ignore"] + }).toString(), processNames = Object.keys(COMMON_EDITORS_LINUX); + for (let i = 0; i < processNames.length; i++) { + let processName = processNames[i]; + if (output.indexOf(processName) !== -1) + return [COMMON_EDITORS_LINUX[processName]]; + } + } + } catch { + } + return process.env.VISUAL ? [process.env.VISUAL] : process.env.EDITOR ? [process.env.EDITOR] : [null]; + }; + } +}); + +// ../../node_modules/launch-editor/get-args.js +var require_get_args = __commonJS({ + "../../node_modules/launch-editor/get-args.js"(exports, module) { + var path = __require("path"); + module.exports = function(editor, fileName, lineNumber, columnNumber = 1) { + switch (path.basename(editor).replace(/\.(exe|cmd|bat)$/i, "")) { + case "atom": + case "Atom": + case "Atom Beta": + case "subl": + case "sublime": + case "sublime_text": + case "wstorm": + case "charm": + case "zed": + return [`${fileName}:${lineNumber}:${columnNumber}`]; + case "notepad++": + return ["-n" + lineNumber, "-c" + columnNumber, fileName]; + case "vim": + case "mvim": + return [`+call cursor(${lineNumber}, ${columnNumber})`, fileName]; + case "joe": + case "gvim": + return [`+${lineNumber}`, fileName]; + case "emacs": + case "emacsclient": + return [`+${lineNumber}:${columnNumber}`, fileName]; + case "rmate": + case "mate": + case "mine": + return ["--line", lineNumber, fileName]; + case "code": + case "Code": + case "code-insiders": + case "Code - Insiders": + case "codium": + case "trae": + case "antigravity": + case "cursor": + case "vscodium": + case "VSCodium": + return ["-r", "-g", `${fileName}:${lineNumber}:${columnNumber}`]; + case "appcode": + case "clion": + case "clion64": + case "idea": + case "idea64": + case "phpstorm": + case "phpstorm64": + case "pycharm": + case "pycharm64": + case "rubymine": + case "rubymine64": + case "webstorm": + case "webstorm64": + case "goland": + case "goland64": + case "rider": + case "rider64": + return ["--line", lineNumber, "--column", columnNumber, fileName]; + } + return process.env.LAUNCH_EDITOR ? [fileName, lineNumber, columnNumber] : [fileName]; + }; + } +}); + +// ../../node_modules/launch-editor/index.js +var require_launch_editor = __commonJS({ + "../../node_modules/launch-editor/index.js"(exports, module) { + var fs = __require("fs"), os = __require("os"), path = __require("path"), colors = require_picocolors(), childProcess = __require("child_process"), guessEditor = require_guess(), getArgumentsForPosition = require_get_args(); + function wrapErrorCallback(cb) { + return (fileName, errorMessage) => { + console.log(), console.log( + colors.red("Could not open " + path.basename(fileName) + " in the editor.") + ), errorMessage && (errorMessage[errorMessage.length - 1] !== "." && (errorMessage += "."), console.log( + colors.red("The editor process exited with an error: " + errorMessage) + )), console.log(), cb && cb(fileName, errorMessage); + }; + } + function isTerminalEditor(editor) { + switch (editor) { + case "vim": + case "emacs": + case "nano": + return !0; + } + return !1; + } + var positionRE = /:(\d+)(:(\d+))?$/; + function parseFile(file) { + file.startsWith("file://") && (file = __require("url").fileURLToPath(file)); + let fileName = file.replace(positionRE, ""), match = file.match(positionRE), lineNumber = match && match[1], columnNumber = match && match[3]; + return { + fileName, + lineNumber, + columnNumber + }; + } + var _childProcess = null; + function launchEditor(file, specifiedEditor, onErrorCallback) { + let parsed = parseFile(file), { fileName } = parsed, { lineNumber, columnNumber } = parsed; + if (!fs.existsSync(fileName)) + return; + typeof specifiedEditor == "function" && (onErrorCallback = specifiedEditor, specifiedEditor = void 0), onErrorCallback = wrapErrorCallback(onErrorCallback); + let [editor, ...args] = guessEditor(specifiedEditor); + if (!editor) { + onErrorCallback(fileName, null); + return; + } + if (process.platform === "linux" && fileName.startsWith("/mnt/") && /Microsoft/i.test(os.release()) && (fileName = path.relative("", fileName)), lineNumber) { + let extraArgs = getArgumentsForPosition(editor, fileName, lineNumber, columnNumber); + args.push.apply(args, extraArgs); + } else + args.push(fileName); + if (_childProcess && isTerminalEditor(editor) && _childProcess.kill("SIGKILL"), process.platform === "win32") { + let escapeCmdArgs2 = function(cmdArgs) { + return cmdArgs.replace(/([&|<>,;=^])/g, "^$1"); + }, doubleQuoteIfNeeded2 = function(str) { + return str.includes("^") ? `^"${str}^"` : str.includes(" ") ? `"${str}"` : str; + }; + var escapeCmdArgs = escapeCmdArgs2, doubleQuoteIfNeeded = doubleQuoteIfNeeded2; + let launchCommand = [editor, ...args.map(escapeCmdArgs2)].map(doubleQuoteIfNeeded2).join(" "); + _childProcess = childProcess.exec(launchCommand, { + stdio: "inherit", + shell: !0 + }); + } else + _childProcess = childProcess.spawn(editor, args, { stdio: "inherit" }); + _childProcess.on("exit", function(errorCode) { + _childProcess = null, errorCode && onErrorCallback(fileName, "(code " + errorCode + ")"); + }), _childProcess.on("error", function(error) { + let { code, message } = error; + code === "ENOENT" && (message = `${message} ('${editor}' command does not exist in 'PATH')`), onErrorCallback(fileName, message); + }); + } + module.exports = launchEditor; + } +}); + +// src/core-server/presets/common-preset.ts +import { existsSync as existsSync2 } from "node:fs"; +import { readFile as readFile2 } from "node:fs/promises"; +import { + JsPackageManagerFactory, + STORY_FILE_TEST_REGEXP, + getBabelPresetEnvMajor, + getDirectoryFromWorkingDir, + getPreviewBodyTemplate, + getPreviewHeadTemplate, + loadEnvs, + normalizeStories, + optionalEnvToBoolean, + removeAddon as removeAddonBase +} from "storybook/internal/common"; +import { StoryIndexGenerator } from "storybook/internal/core-server"; +import { loadCsf } from "storybook/internal/csf-tools"; +import { logger as logger6 } from "storybook/internal/node-logger"; +import { telemetry as telemetry10 } from "storybook/internal/telemetry"; + +// src/shared/open-service/services/extraction-service.server.ts +function subscribeExtractionServiceRefresh(moduleGraph, options) { + let refreshExtracted = async (componentIds) => { + let idsToRefresh = Array.from(componentIds).filter( + (id) => options.query.get({ id }) !== void 0 + ); + idsToRefresh.length !== 0 && await Promise.all( + idsToRefresh.map((id) => options.refreshComponent(id).catch(() => { + })) + ); + }; + moduleGraph.queries.latestStoryChanges.subscribe(void 0, async ({ data }) => { + if (!data || data.revision === 0) + return; + let { storyFiles } = data, componentEntries = selectComponentEntriesByComponentId( + Object.values((await options.getIndex()).entries) + ); + if (storyFiles.length === 0) { + await refreshExtracted(componentEntries.keys()); + return; + } + let componentEntryCandidates = Array.from(componentEntries).map(([id, entry]) => { + let storyFilePath = getStoryImportPathFromEntry(entry); + if (storyFilePath) + return { + id, + storyIndexPath: toStoryIndexPath(storyFilePath, options.workingDir) + }; + }).filter((candidate) => candidate !== void 0), bumpedComponentIds = /* @__PURE__ */ new Set(); + for (let storyFile of storyFiles) { + let componentEntry = componentEntryCandidates.find( + (candidate) => candidate.storyIndexPath === storyFile + ); + componentEntry && bumpedComponentIds.add(componentEntry.id); + } + await refreshExtracted(bumpedComponentIds); + }); +} +function registerExtractionService(definition, options) { + let { workingDir, getIndex, provider, queryName, extractCommand, extractAllCommand } = options; + invariant( + queryName in definition.queries, + `Extraction service "${definition.id}" has no query named "${queryName}".` + ), invariant( + extractCommand in definition.commands && extractAllCommand in definition.commands, + `Extraction service "${definition.id}" is missing command "${extractCommand}" or "${extractAllCommand}".` + ); + let resolveComponentEntries = async () => selectComponentEntriesByComponentId(Object.values((await getIndex()).entries)), extractComponent = async (ctx, id) => { + let entry = (await resolveComponentEntries()).get(id); + if (!entry) + throw new OpenServiceDocgenMissingComponentError({ id }); + let payload = await provider({ entry }); + if (!payload) { + ctx.self.setState((state) => { + delete state.components[id]; + }); + return; + } + return ctx.self.setState((state) => { + state.components[id] = payload; + }), payload; + }, runtime = registerService(definition, { + queries: { + [queryName]: { + staticInputs: async () => { + let eligible = await resolveComponentEntries(); + return Array.from(eligible.keys(), (id) => ({ id })); + } + } + }, + commands: { + [extractCommand]: { + handler: (input, ctx) => extractComponent(ctx, input.id) + }, + [extractAllCommand]: { + handler: async (_input, ctx) => { + let ids = Array.from((await resolveComponentEntries()).keys()); + await Promise.all(ids.map((id) => extractComponent(ctx, id))); + } + } + } + }), moduleGraph = getService("core/module-graph"); + return subscribeExtractionServiceRefresh(moduleGraph, { + workingDir, + getIndex, + query: runtime.queries[queryName], + refreshComponent: (id) => runtime.commands[extractCommand]({ id }) + }), runtime; +} + +// src/shared/open-service/services/docgen/definition.ts +import { defineService } from "storybook/open-service"; +var docgenInputSchema = object({ id: string() }), argTypesSchema = custom( + (value) => typeof value == "object" && value !== null && !Array.isArray(value) +), docgenErrorSchema = object({ + name: string(), + message: string() +}), docgenJsDocTagsSchema = record(string(), array(string())), docgenComponentFields = { + name: string(), + path: string(), + description: optional(string()), + summary: optional(string()), + jsDocTags: docgenJsDocTagsSchema, + argTypes: optional(argTypesSchema), + error: optional(docgenErrorSchema) +}, docgenSubcomponentFields = { + ...docgenComponentFields, + import: optional(string()) +}, docgenSubcomponentSchema = looseObject(docgenSubcomponentFields), docgenPayloadSchema = looseObject({ + id: string(), + ...docgenComponentFields, + subcomponents: optional(record(string(), docgenSubcomponentSchema)) +}), docgenOutputSchema = optional(docgenPayloadSchema), docgenServiceDef = defineService({ + id: "core/docgen", + description: "Component documentation (name, description, props, JSDoc tags) keyed by component id.", + initialState: { components: {} }, + queries: { + docgen: { + description: "Returns the docgen payload for one component id, or undefined when not loaded.", + input: docgenInputSchema, + output: docgenOutputSchema, + handler: (input, ctx) => ctx.self.state.components[input.id], + load: async (input, ctx) => { + await ctx.self.commands.extractDocgen(input); + }, + staticPath: (input) => docgenQueryStaticPath(input.id) + }, + docgenForAllComponents: { + description: "Returns docgen payloads for every component in the story index.", + input: void_(), + output: record(string(), docgenPayloadSchema), + handler: (_input, ctx) => ctx.self.state.components, + load: async (_input, ctx) => { + await ctx.self.commands.extractAllDocgen(void 0); + } + } + }, + commands: { + extractDocgen: { + description: "Resolves the story entry for a component id, runs the registered provider chain, writes the result into state, and returns it (or undefined when no provider produced docgen).", + input: docgenInputSchema, + output: docgenOutputSchema + // Handler is supplied at registration time so it can close over the story index and the + // composed experimental_docgenProvider chain. + }, + extractAllDocgen: { + description: "Extracts docgen for every component id in the story index by invoking `extractDocgen` for each.", + input: undefined_(), + output: void_() + // Handler is supplied at registration time so it can close over the story index. + } + } +}); + +// src/shared/open-service/services/docgen/server.ts +function registerDocgenService(options) { + return registerExtractionService(docgenServiceDef, { + workingDir: options.workingDir ?? process.cwd(), + getIndex: options.getIndex, + provider: options.docgenProvider, + queryName: "docgen", + extractCommand: "extractDocgen", + extractAllCommand: "extractAllDocgen" + }); +} + +// src/shared/open-service/services/docgen/worker/docgen-worker-client.ts +import { existsSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { Worker } from "node:worker_threads"; +import { logger } from "storybook/internal/node-logger"; +var WORKER_SPECIFIER = "storybook/internal/docgen-worker", DEFAULT_TASK_TIMEOUT_MS = 12e4; +function errorLikeToError(errorLike) { + let error = new Error(errorLike.message); + return errorLike.name && (error.name = errorLike.name), errorLike.stack && (error.stack = errorLike.stack), error; +} +var DocgenWorker = class { + constructor(scriptPath, descriptors, taskTimeoutMs = DEFAULT_TASK_TIMEOUT_MS) { + this.taskTimeoutMs = taskTimeoutMs; + this.pending = /* @__PURE__ */ new Map(); + // Captured from the `ready` promise executor (which runs synchronously) so `fail()` can settle + // `ready` if the worker dies before sending `init`. No-op default keeps TS definite-assignment happy. + this.rejectReady = () => { + }; + this.nextId = 0; + this.dead = !1; + this.worker = new Worker(scriptPath), this.worker.unref(), this.worker.on("message", (msg) => this.handleMessage(msg)), this.worker.on("error", (error) => this.fail(error)), this.worker.on("exit", (code) => { + this.dead || this.fail(new Error(`docgen worker exited unexpectedly with code ${code}`)); + }), this.ready = new Promise((resolve2, reject) => { + this.rejectReady = reject; + let onMessage = (msg) => { + msg.type === "init" && (this.worker.off("message", onMessage), msg.error ? reject(errorLikeToError(msg.error)) : resolve2()); + }; + this.worker.on("message", onMessage); + }), this.ready.catch(() => { + }), this.post({ type: "init", descriptors }); + } + async extract(entry) { + if (this.dead) + throw new Error("docgen worker is no longer running"); + return await this.ready, new Promise((resolve2, reject) => { + let id = this.nextId++, pending = { resolve: resolve2, reject }; + this.taskTimeoutMs > 0 && (pending.timer = setTimeout(() => { + this.pending.delete(id), reject(new Error(`docgen worker extract ${id} timed out after ${this.taskTimeoutMs}ms`)); + }, this.taskTimeoutMs), pending.timer.unref?.()), this.pending.set(id, pending), this.post({ type: "extract", id, entry }); + }); + } + post(msg) { + this.worker.postMessage(msg); + } + handleMessage(msg) { + if (msg.type !== "extract") + return; + let pending = this.pending.get(msg.id); + pending && (pending.timer && clearTimeout(pending.timer), this.pending.delete(msg.id), msg.error ? pending.reject(errorLikeToError(msg.error)) : pending.resolve(msg.payload)); + } + /** Reject everything in flight and tear the worker down; used on fatal worker failure. */ + fail(error) { + this.dead || (logger.debug(`docgen worker failure: ${error.message}`), this.dead = !0, this.rejectReady(error), this.rejectAllPending(error), this.worker.terminate().catch(() => 0)); + } + rejectAllPending(error) { + for (let [, pending] of this.pending) + pending.timer && clearTimeout(pending.timer), pending.reject(error); + this.pending.clear(); + } +}; +function resolveWorkerScriptPath() { + try { + let scriptPath = fileURLToPath(importMetaResolve(WORKER_SPECIFIER)); + return existsSync(scriptPath) ? scriptPath : void 0; + } catch { + return; + } +} +function createDocgenWorkerClient(descriptors) { + let scriptPath = resolveWorkerScriptPath(); + if (!scriptPath) { + logger.debug( + "docgen worker disabled: compiled worker script not found (running from source without a build?)" + ); + return; + } + let worker; + return { + async extract(entry) { + return worker ??= new DocgenWorker(scriptPath, descriptors), worker.extract(entry); + } + }; +} + +// src/shared/open-service/services/story-docs/definition.ts +import { defineService as defineService2 } from "storybook/open-service"; +var storyDocsInputSchema = object({ id: string() }), storyDocsErrorSchema = object({ + name: string(), + message: string() +}), storyDocSchema = object({ + id: string(), + name: string(), + snippet: optional(string()), + description: optional(string()), + summary: optional(string()), + error: optional(storyDocsErrorSchema) +}), storyDocsPayloadSchema = object({ + id: string(), + name: string(), + path: string(), + import: optional(string()), + stories: record(string(), storyDocSchema), + error: optional(storyDocsErrorSchema) +}), storyDocsOutputSchema = optional(storyDocsPayloadSchema), storyDocsServiceDef = defineService2({ + id: "core/story-docs", + description: "Story documentation (snippets, descriptions, imports) keyed by component id.", + initialState: { components: {} }, + queries: { + storyDocs: { + description: "Returns the story-docs payload for one component id, or undefined when not loaded.", + input: storyDocsInputSchema, + output: storyDocsOutputSchema, + handler: (input, ctx) => Object.hasOwn(ctx.self.state.components, input.id) ? ctx.self.state.components[input.id] : void 0, + load: async (input, ctx) => { + await ctx.self.commands.extractStoryDocs(input); + }, + staticPath: (input) => storyDocsQueryStaticPath(input.id) + }, + storyDocsForAllComponents: { + description: "Returns story-docs payloads for every component in the story index.", + input: void_(), + output: record(string(), storyDocsPayloadSchema), + handler: (_input, ctx) => ctx.self.state.components, + load: async (_input, ctx) => { + await ctx.self.commands.extractAllStoryDocs(void 0); + } + } + }, + commands: { + extractStoryDocs: { + description: "Resolves the story entry for a component id, runs the registered provider chain, writes the result into state, and returns it (or undefined when no provider produced story docs).", + input: storyDocsInputSchema, + output: storyDocsOutputSchema + }, + extractAllStoryDocs: { + description: "Extracts story docs for every component id in the story index by invoking `extractStoryDocs` for each.", + input: undefined_(), + output: void_() + } + } +}); + +// src/shared/open-service/services/story-docs/server.ts +function registerStoryDocsService(options) { + return registerExtractionService(storyDocsServiceDef, { + workingDir: options.workingDir ?? process.cwd(), + getIndex: options.getIndex, + provider: options.storyDocsProvider, + queryName: "storyDocs", + extractCommand: "extractStoryDocs", + extractAllCommand: "extractAllStoryDocs" + }); +} + +// src/core-server/presets/common-preset.ts +var import_ts_dedent = __toESM(require_dist(), 1); + +// src/core-server/server-channel/ai-setup-channel.ts +import { + AI_SETUP_ANALYTICS_REQUEST, + AI_SETUP_ANALYTICS_RESPONSE +} from "storybook/internal/core-events"; +import { + getLastEvents, + getStorybookMetadata, + isStoryCreatedByAISetup as isStoryCreatedByAISetup2, + telemetry +} from "storybook/internal/telemetry"; +import { logger as logger2 } from "storybook/internal/node-logger"; + +// src/core-server/utils/wait-for-idle-vitest.ts +async function waitForIdleVitest(maxWaitMs = 1800 * 1e3, pollIntervalMs = 60 * 1e3) { + let deadline = Date.now() + maxWaitMs; + for (; Date.now() < deadline; ) { + try { + let state = fullTestProviderStore.getFullState(); + if (!Object.values(state).some((s) => s === "test-provider-state:running")) + return !0; + } catch { + return !0; + } + await new Promise((resolve2) => setTimeout(resolve2, pollIntervalMs)); + } + return !1; +} + +// src/shared/utils/ai-checklist-flags.ts +import { resolve } from "node:path"; +import { cache } from "storybook/internal/common"; +function isProjectScopedFlag(value) { + return typeof value == "object" && value !== null && "configDir" in value && typeof value.configDir == "string"; +} +async function readProjectScopedFlag(key, configDir) { + try { + let value = await cache.get(key); + if (isProjectScopedFlag(value) && value.configDir === resolve(configDir)) + return value; + } catch { + } +} +async function hasAiInitOptIn(configDir) { + return (await readProjectScopedFlag("ai-init-opt-in", configDir))?.answer === !0; +} +async function hasAiSetupRun(configDir) { + return !!await readProjectScopedFlag("ai-setup-ran", configDir); +} +async function getAiSetupRunId(configDir) { + return (await readProjectScopedFlag("ai-setup-ran", configDir))?.runId; +} + +// src/core-server/server-channel/ai-setup-channel.ts +function initAIAnalyticsChannel(channel, options, getStoryIndexGeneratorPromise) { + return channel.on(AI_SETUP_ANALYTICS_REQUEST, async () => { + let stats = {}, runId; + try { + let lastEvents = await getLastEvents(), lastAISetup = lastEvents?.["ai-setup"], lastSetupStoryScoringRun = lastEvents?.["ai-setup-final-scoring"]; + if (runId = await getAiSetupRunId(options.configDir), !lastAISetup || lastSetupStoryScoringRun && lastSetupStoryScoringRun.body.payload.runId === lastAISetup.body.payload.runId) + return; + let metadata = await getStorybookMetadata(options.configDir), isReactStorybook = metadata?.renderer?.includes("@storybook/react"), hasVitestAddon = !!metadata?.addons && Object.keys(metadata.addons).some( + (addonKey) => addonKey.includes("@storybook/addon-vitest") + ); + if (!isReactStorybook || !hasVitestAddon) + return; + if (!await waitForIdleVitest()) { + logger2.debug("AI_SETUP_ANALYTICS_REQUEST timed out waiting for vitest to be available."); + return; + } + let generatorPromise = getStoryIndexGeneratorPromise?.(); + if (!generatorPromise) { + logger2.debug( + "AI_SETUP_ANALYTICS_REQUEST could not proceed as the index generator is not ready." + ); + return; + } + let indexAndStats = await (await generatorPromise).getIndexAndStats(); + if (!indexAndStats) { + logger2.debug("AI_SETUP_ANALYTICS_REQUEST could not proceed as the index is not ready."); + return; + } + let aiStoryFiles = /* @__PURE__ */ new Set(), aiStoryCount = 0; + for (let entry of Object.values(indexAndStats.storyIndex.entries)) + isStoryCreatedByAISetup2(entry) && (aiStoryFiles.add(entry.importPath), aiStoryCount++); + if (aiStoryFiles.size > 0) { + let aiTestRunResult = await runStoryTests([...aiStoryFiles]); + telemetry("ai-setup-final-scoring", { + stats: { + fileCount: aiStoryFiles.size, + storyCount: aiStoryCount, + testRunDuration: aiTestRunResult.duration + }, + runId, + results: aiTestRunResult.summary, + ...aiTestRunResult.runError ? { runError: aiTestRunResult.runError } : {} + }); + } else + telemetry("ai-setup-final-scoring", { + stats: { + fileCount: 0, + storyCount: 0, + testRunDuration: 0 + }, + runId, + runError: "No stories found that were generated by ai setup" + }); + } catch { + telemetry("ai-setup-final-scoring", { + stats, + runId, + runError: "Unknown error during AI story scoring" + }); + } finally { + channel.emit(AI_SETUP_ANALYTICS_RESPONSE); + } + }), channel; +} + +// src/core-server/server-channel/create-new-story-channel.ts +import { + CREATE_NEW_STORYFILE_REQUEST, + CREATE_NEW_STORYFILE_RESPONSE +} from "storybook/internal/core-events"; +import { telemetry as telemetry2 } from "storybook/internal/telemetry"; +function initCreateNewStoryChannel(channel, options) { + return channel.on( + CREATE_NEW_STORYFILE_REQUEST, + async (data) => { + let result = await generateStoryFile(data.payload, options); + result.success ? (channel.emit(CREATE_NEW_STORYFILE_RESPONSE, { + success: !0, + id: data.id, + payload: { + storyId: result.storyId, + storyFilePath: result.storyFilePath, + exportedStoryName: result.exportedStoryName + }, + error: null + }), telemetry2("create-new-story-file", { + success: !0 + })) : (channel.emit(CREATE_NEW_STORYFILE_RESPONSE, { + success: !1, + id: data.id, + payload: result.errorType === "STORY_FILE_EXISTS" ? { + type: "STORY_FILE_EXISTS", + kind: result.kind + } : void 0, + error: result.error || "Unknown error occurred" + }), await telemetry2("create-new-story-file", { + success: !1, + error: result.errorType || result.error + })); + } + ), channel; +} + +// src/core-server/server-channel/file-search-channel.ts +import { readFile } from "node:fs/promises"; +import { dirname, join as join2 } from "node:path"; +import { extractRenderer, getFrameworkName, getProjectRoot } from "storybook/internal/common"; +import { + FILE_COMPONENT_SEARCH_REQUEST, + FILE_COMPONENT_SEARCH_RESPONSE +} from "storybook/internal/core-events"; +import { telemetry as telemetry3 } from "storybook/internal/telemetry"; + +// src/core-server/utils/parser/generic-parser.ts +import { parser, types as t } from "storybook/internal/babel"; +var GenericParser = class { + /** + * Parse the content of a file and return the exports + * + * @param content The content of the file + * @returns The exports of the file + */ + async parse(content) { + let ast = parser.parse(content, { + allowImportExportEverywhere: !0, + allowAwaitOutsideFunction: !0, + allowNewTargetOutsideFunction: !0, + allowReturnOutsideFunction: !0, + allowUndeclaredExports: !0, + plugins: [ + // Language features + "typescript", + "jsx", + // Latest ECMAScript features + "asyncGenerators", + "bigInt", + "classProperties", + "classPrivateProperties", + "classPrivateMethods", + "classStaticBlock", + "dynamicImport", + "exportNamespaceFrom", + "logicalAssignment", + "moduleStringNames", + "nullishCoalescingOperator", + "numericSeparator", + "objectRestSpread", + "optionalCatchBinding", + "optionalChaining", + "privateIn", + "regexpUnicodeSets", + "topLevelAwait", + // ECMAScript proposals + "asyncDoExpressions", + "decimal", + "decorators", + "decoratorAutoAccessors", + "deferredImportEvaluation", + "destructuringPrivate", + "doExpressions", + "explicitResourceManagement", + "exportDefaultFrom", + "functionBind", + "functionSent", + "importAttributes", + "importReflection", + "moduleBlocks", + "partialApplication", + "recordAndTuple", + "sourcePhaseImports", + "throwExpressions" + ] + }), exports = []; + return ast.program.body.forEach(function(node) { + t.isExportNamedDeclaration(node) ? (t.isFunctionDeclaration(node.declaration) && t.isIdentifier(node.declaration.id) && exports.push({ + name: node.declaration.id.name, + default: !1 + }), t.isClassDeclaration(node.declaration) && t.isIdentifier(node.declaration.id) && exports.push({ + name: node.declaration.id.name, + default: !1 + }), node.declaration === null && node.specifiers.length > 0 && node.specifiers.forEach((specifier) => { + t.isExportSpecifier(specifier) && t.isIdentifier(specifier.exported) && exports.push({ + name: specifier.exported.name, + default: !1 + }); + }), t.isVariableDeclaration(node.declaration) && node.declaration.declarations.forEach((declaration) => { + t.isVariableDeclarator(declaration) && t.isIdentifier(declaration.id) && exports.push({ + name: declaration.id.name, + default: !1 + }); + })) : t.isExportDefaultDeclaration(node) && exports.push({ + name: "default", + default: !0 + }); + }), { exports }; + } +}; + +// src/core-server/utils/parser/index.ts +function getParser(renderer) { + return new GenericParser(); +} + +// src/core-server/utils/search-files.ts +var FILE_EXTENSIONS = ["js", "mjs", "cjs", "jsx", "mts", "ts", "tsx", "cts"], IGNORED_FILES = [ + "**/node_modules/**", + "**/*.spec.*", + "**/*.test.*", + "**/*.stories.*", + "**/storybook-static/**" +]; +async function searchFiles({ + searchQuery, + cwd, + ignoredFiles = IGNORED_FILES, + fileExtensions = FILE_EXTENSIONS +}) { + let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-F6LJSRNJ.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [ + `**/*${searchQuery}*.${fileExtensionsPattern}`, + `**/*${searchQuery}*/**/*.${fileExtensionsPattern}` + ]; + return (await globby(globbedSearchQuery, { + ignore: ignoredFiles, + gitignore: !0, + caseSensitiveMatch: !1, + cwd, + objectMode: !0 + })).map((entry) => entry.path).filter((entry) => fileExtensions.some((ext) => entry.endsWith(`.${ext}`))); +} + +// src/core-server/server-channel/file-search-channel.ts +async function initFileSearchChannel(channel, options) { + return channel.on( + FILE_COMPONENT_SEARCH_REQUEST, + async (data) => { + let searchQuery = data.id; + try { + if (!searchQuery) + return; + let frameworkName = await getFrameworkName(options), rendererName = await extractRenderer(frameworkName), entries = (await searchFiles({ + searchQuery, + cwd: getProjectRoot() + })).map(async (file) => { + let parser3 = getParser(rendererName); + try { + let content = await readFile(join2(getProjectRoot(), file), "utf-8"), { storyFileName } = getStoryMetadata(join2(getProjectRoot(), file)), dir = dirname(file), storyFileExists = doesStoryFileExist(join2(getProjectRoot(), dir), storyFileName), info = await parser3.parse(content); + return { + filepath: file, + exportedComponents: info.exports, + storyFileExists + }; + } catch (e) { + return telemetry3("create-new-story-file-search", { + success: !1, + error: `Could not parse file: ${e}` + }), { + filepath: file, + storyFileExists: !1, + exportedComponents: null + }; + } + }); + telemetry3("create-new-story-file-search", { + success: !0, + payload: { + fileCount: entries.length + } + }), channel.emit(FILE_COMPONENT_SEARCH_RESPONSE, { + success: !0, + id: searchQuery, + payload: { + files: await Promise.all(entries) + }, + error: null + }); + } catch (e) { + channel.emit(FILE_COMPONENT_SEARCH_RESPONSE, { + success: !1, + id: searchQuery ?? "", + error: `An error occurred while searching for components in the project. +${e?.message}` + }), telemetry3("create-new-story-file-search", { + success: !1, + error: `An error occurred while searching for components: ${e}` + }); + } + } + ), channel; +} + +// src/core-server/server-channel/ghost-stories-channel.ts +import { GHOST_STORIES_REQUEST, GHOST_STORIES_RESPONSE } from "storybook/internal/core-events"; +import { getLastEvents as getLastEvents2, getStorybookMetadata as getStorybookMetadata2, telemetry as telemetry4 } from "storybook/internal/telemetry"; +var SkipGhostStoriesTelemetry = class extends Error { +}; +function initGhostStoriesChannel(channel, options) { + return channel.on(GHOST_STORIES_REQUEST, async () => { + let stats = {}, aiSetupRunId = await getAiSetupRunId(options.configDir); + try { + await telemetry4("ghost-stories", async () => { + try { + let ghostRunStart = Date.now(), lastEvents = await getLastEvents2(), lastInit = lastEvents?.init, lastAISetup = lastEvents?.["ai-setup"], lastSetupStoryScoringRun = lastEvents?.["ai-setup-final-scoring"], lastGhostStoriesRun = lastEvents?.["ghost-stories"]; + if (!(lastAISetup ?? lastInit)) + throw new SkipGhostStoriesTelemetry(); + if (lastGhostStoriesRun && lastSetupStoryScoringRun.body.payload.runId === lastAISetup.body.payload.runId) + throw new SkipGhostStoriesTelemetry(); + let metadata = await getStorybookMetadata2(options.configDir), isReactStorybook = metadata?.renderer?.includes("@storybook/react"), hasVitestAddon = !!metadata?.addons && Object.keys(metadata.addons).some( + (addonKey) => addonKey.includes("@storybook/addon-vitest") + ); + if (!isReactStorybook || !hasVitestAddon) + throw new SkipGhostStoriesTelemetry(); + if (!await waitForIdleVitest()) + return { + stats, + aiSetupRunId, + runError: "Vitest busy, couldn't run ghost stories" + }; + let candidateAnalysisStart = Date.now(), candidatesResult = await getComponentCandidates(); + if (stats.candidateAnalysisDuration = Date.now() - candidateAnalysisStart, stats.globMatchCount = candidatesResult.globMatchCount, stats.analyzedCount = candidatesResult.analyzedCount ?? 0, stats.avgComplexity = candidatesResult.avgComplexity ?? 0, stats.candidateCount = candidatesResult.candidates.length, candidatesResult.error) + return stats.totalRunDuration = Date.now() - ghostRunStart, { + stats, + aiSetupRunId, + runError: candidatesResult.error + }; + if (candidatesResult.candidates.length === 0) + return stats.totalRunDuration = Date.now() - ghostRunStart, { + stats, + aiSetupRunId, + runError: "No candidates found" + }; + let testRunResult = await runStoryTests(candidatesResult.candidates, { + ghostRun: !0 + }); + return stats.totalRunDuration = Date.now() - ghostRunStart, stats.testRunDuration = testRunResult.duration, testRunResult.runError ? { + stats, + aiSetupRunId, + runError: testRunResult.runError + } : { + stats, + aiSetupRunId, + results: testRunResult.summary + }; + } catch (error) { + if (error instanceof SkipGhostStoriesTelemetry) + throw error; + return { + stats, + aiSetupRunId, + runError: "Unknown error during ghost run" + }; + } + }); + } catch (error) { + if (!(error instanceof SkipGhostStoriesTelemetry)) + throw error; + } finally { + channel.emit(GHOST_STORIES_RESPONSE); + } + }), channel; +} + +// src/core-server/server-channel/open-in-editor-channel.ts +var import_launch_editor = __toESM(require_launch_editor(), 1); +import { OPEN_IN_EDITOR_REQUEST, OPEN_IN_EDITOR_RESPONSE } from "storybook/internal/core-events"; +import { telemetry as telemetry5 } from "storybook/internal/telemetry"; +async function initOpenInEditorChannel(channel) { + return channel.on(OPEN_IN_EDITOR_REQUEST, async (payload) => { + let sendTelemetry = (data) => { + telemetry5("open-in-editor", data); + }; + try { + let { file: targetFile, line, column } = payload; + if (!targetFile) + throw new Error("No file was provided to open"); + let location = typeof line == "number" ? `${targetFile}:${line}${typeof column == "number" ? `:${column}` : ""}` : targetFile; + await new Promise((resolve2, reject) => { + (0, import_launch_editor.default)(location, void 0, (_fileName, errorMessage) => { + errorMessage ? reject(new Error(errorMessage)) : resolve2(); + }); + }), channel.emit(OPEN_IN_EDITOR_RESPONSE, { + file: targetFile, + line, + column, + error: null + }), sendTelemetry({ success: !0 }); + } catch (e) { + let error = e?.message || "Failed to open in editor"; + channel.emit(OPEN_IN_EDITOR_RESPONSE, { + error, + ...payload + }), sendTelemetry({ success: !1, error }); + } + }), channel; +} + +// src/shared/review/features.ts +var isReviewFeatureEnabled = (features2) => features2?.experimentalReview !== !1 && !!features2?.changeDetection; + +// src/core-server/server-channel/review-channel.ts +var STALE_GRACE_MS = 1e4, defaultSubscribeToModuleGraphChanges = (onChange) => { + try { + return getService("core/module-graph").queries.getGraphRevision.subscribe(void 0, ({ data: revision }) => { + revision !== void 0 && revision > 0 && onChange(); + }); + } catch { + return () => { + }; + } +}; +function prepareReview(payload) { + let { stale: _untrustedStale, ...rest } = payload; + return { + ...rest, + // Server-side timestamp is authoritative for "Created x minutes ago". + createdAt: Date.now() + }; +} +function initReviewChannel(channel, options = {}) { + let subscribeToModuleGraphChanges = options.subscribeToModuleGraphChanges ?? defaultSubscribeToModuleGraphChanges, cached; + return channel.on(REVIEW_EVENTS.PUSH_REVIEW, (payload) => { + cached = prepareReview(payload), channel.emit(REVIEW_EVENTS.DISPLAY_REVIEW, cached); + }), channel.on(REVIEW_EVENTS.REQUEST_REVIEW, () => { + cached && channel.emit(REVIEW_EVENTS.DISPLAY_REVIEW, cached); + }), channel.on(REVIEW_EVENTS.DISMISS_REVIEW, (returnSearch) => { + cached = void 0, channel.emit(REVIEW_EVENTS.REVIEW_DISMISSED, returnSearch ?? null); + }), subscribeToModuleGraphChanges(() => { + !cached || cached.stale || cached.createdAt === void 0 || Date.now() < cached.createdAt + STALE_GRACE_MS || (cached = { ...cached, stale: !0 }, channel.emit(REVIEW_EVENTS.REVIEW_STALE)); + }), channel; +} + +// src/core-server/server-channel/telemetry-channel.ts +import { + AI_PROMPT_NUDGE, + PREVIEW_INITIALIZED, + SHARE_ISOLATE_MODE, + SIDEBAR_FILTER_CHANGED +} from "storybook/internal/core-events"; +import { + getLastEvents as getLastEvents3, + getSessionId, + telemetry as telemetry6 +} from "storybook/internal/telemetry"; +var makePayload = (userAgent, lastInit, sessionId) => { + let payload = { + userAgent, + isNewUser: !1, + timeSinceInit: void 0 + }; + return sessionId && lastInit?.body?.sessionId === sessionId && (payload.timeSinceInit = Date.now() - lastInit.timestamp, payload.isNewUser = !!lastInit.body.payload.newUser), payload; +}; +function initTelemetryChannel(channel) { + channel.on(PREVIEW_INITIALIZED, async ({ userAgent }) => { + try { + let sessionId = await getSessionId(), lastEvents = await getLastEvents3(), lastInit = lastEvents.init; + if (!lastEvents["preview-first-load"]) { + let payload = makePayload(userAgent, lastInit, sessionId); + telemetry6("preview-first-load", payload); + } + } catch { + } + }), channel.on(SHARE_ISOLATE_MODE, async () => { + telemetry6("share", { action: "isolate-mode-opened" }); + }), channel.on(SIDEBAR_FILTER_CHANGED, (payload) => { + telemetry6("sidebar-filter", payload); + }), channel.on(AI_PROMPT_NUDGE, async ({ id, origin }) => { + telemetry6("ai-prompt-nudge", { id, origin }); + }), channel.on(REVIEW_EVENTS.PAGEVIEW, ({ page, reviewCreatedAt }) => { + telemetry6("review", { action: "pageview", source: "mcp-review", page, reviewCreatedAt }); + }); +} + +// src/core-server/utils/checklist.ts +import { createFileSystemCache, resolvePathInStorybookCache } from "storybook/internal/common"; +import { experimental_UniversalStore } from "storybook/internal/core-server"; +import { + AI_SETUP_ANALYTICS_REQUEST as AI_SETUP_ANALYTICS_REQUEST2, + GHOST_STORIES_REQUEST as GHOST_STORIES_REQUEST2, + STORY_INDEX_INVALIDATED +} from "storybook/internal/core-events"; +import { logger as logger3 } from "storybook/internal/node-logger"; +import { telemetry as telemetry7 } from "storybook/internal/telemetry"; + +// src/shared/checklist-store/checklistData.state.ts +var initialState = { + items: { + accessibilityTests: { status: "open" }, + aiSetup: { status: "open" }, + autodocs: { status: "open" }, + ciTests: { status: "open" }, + controls: { status: "open" }, + coverage: { status: "open" }, + guidedTour: { status: "open" }, + installA11y: { status: "open" }, + installChromatic: { status: "open" }, + installDocs: { status: "open" }, + installVitest: { status: "open" }, + mdxDocs: { status: "open" }, + moreComponents: { status: "open" }, + moreStories: { status: "open" }, + onboardingSurvey: { status: "open" }, + organizeStories: { status: "open" }, + renderComponent: { status: "open" }, + runTests: { status: "open" }, + publishStorybook: { status: "open" }, + shareStorybook: { status: "open" }, + viewports: { status: "open" }, + visualTests: { status: "open" }, + whatsNewStorybook10: { status: "open" }, + writeInteractions: { status: "open" } + }, + widget: {} +}; + +// src/shared/checklist-store/index.ts +var UNIVERSAL_CHECKLIST_STORE_OPTIONS = { + id: "storybook/checklist", + initialState +}; + +// src/core-server/utils/checklist.ts +async function initializeChecklist(channel, getStoryIndexGeneratorPromise, configDir) { + try { + let store = experimental_UniversalStore.create({ + ...UNIVERSAL_CHECKLIST_STORE_OPTIONS, + leader: !0 + }), cache2 = createFileSystemCache({ + basePath: resolvePathInStorybookCache("checklist"), + ns: "storybook" + }), [[userState, saveUserState], [projectState, saveProjectState]] = await Promise.all([ + globalSettings().then((settings) => { + let save = throttle(() => settings.save(), 1e3), state = { + items: settings.value.checklist?.items ?? {}, + widget: settings.value.checklist?.widget ?? {} + }; + return [state, ({ + items = state.items, + widget = state.widget + }) => { + settings.value.checklist = { items, widget }, save(); + }]; + }), + cache2.get("state").then((cachedState) => [{ items: cachedState?.items ?? {} }, ({ items }) => cache2.set("state", { items })]) + ]); + store.setState( + (value) => ({ + ...toMerged(value, toMerged(userState, projectState)), + loaded: !0 + }) + ), hasAiSetupRun(configDir).then((hasSetupRun) => { + hasSetupRun && store.setState((state) => ({ ...state, aiSetupRun: !0 })); + }).catch(() => { + }), hasAiInitOptIn(configDir).then((hasOptedIn) => { + store.setState((state) => ({ ...state, aiOptIn: hasOptedIn })); + }).catch(() => { + }); + let isAiSetupCompleted = async () => { + try { + if (!await hasAiSetupRun(configDir)) + return !1; + let generatorPromise = getStoryIndexGeneratorPromise?.(); + if (!generatorPromise) + return !1; + let entries = (await (await generatorPromise)?.getIndexAndStats?.())?.storyIndex?.entries; + return Object.values(entries || []).some(isStoryCreatedByAISetup); + } catch { + return !1; + } + }, markAiSetupDone = async () => await isAiSetupCompleted() ? (store.getState().items.aiSetup?.status !== "done" && store.setState((state) => ({ + ...state, + items: { + ...state.items, + aiSetup: { ...state.items.aiSetup, status: "done" } + } + })), !0) : !1, AI_IDLE_DELAY_MS = 240 * 1e3, analyticsTimer, analyticsEmitted = !1, throttledSyncAiSetupStatus = throttle(() => markAiSetupDone().catch(() => { + }), 1e3), scheduleIdleCheck = () => { + !channel || analyticsEmitted || (throttledSyncAiSetupStatus(), clearTimeout(analyticsTimer), analyticsTimer = setTimeout(async () => { + if (!store.getState().aiSetupRun) + return; + let now = Date.now(), [lastTestRun, lastSelfHealing] = await Promise.all([ + get("test-run").catch(() => { + }), + get("ai-setup-self-healing-scoring").catch(() => { + }) + ]); + if ([lastTestRun, lastSelfHealing].some( + (e) => e && now - e.timestamp < AI_IDLE_DELAY_MS + )) { + scheduleIdleCheck(); + return; + } + await markAiSetupDone(), store.getState().items.aiSetup?.status === "done" && (analyticsEmitted = !0, channel.off(STORY_INDEX_INVALIDATED, onIndexInvalidated), unsubscribeTestProvider(), channel.emit(GHOST_STORIES_REQUEST2), channel.emit(AI_SETUP_ANALYTICS_REQUEST2)); + }, AI_IDLE_DELAY_MS)); + }; + markAiSetupDone().then((detected) => { + detected && scheduleIdleCheck(); + }); + let onIndexInvalidated = () => { + analyticsEmitted || scheduleIdleCheck(); + }; + channel && channel.on(STORY_INDEX_INVALIDATED, onIndexInvalidated); + let unsubscribeTestProvider = universalTestProviderStore.onStateChange(() => { + analyticsEmitted || scheduleIdleCheck(); + }); + store.onStateChange((state, previousState) => { + let entries = Object.entries(state.items), projectValues = {}, userValues = {}; + if (entries.forEach(([id, { status, mutedAt }]) => { + status === "done" ? projectValues[id] = { status } : (status === "accepted" || status === "skipped") && (userValues[id] = { status }), mutedAt && (userValues[id] = { + ...userValues[id], + mutedAt + }); + }), saveProjectState({ items: projectValues }), saveUserState({ items: userValues, widget: state.widget }), !previousState.loaded) + return; + let { mutedItems, statusItems } = entries.reduce( + (acc, [item, { mutedAt, status }]) => { + let prev = previousState.items[item]; + return mutedAt !== prev?.mutedAt && acc.mutedItems.push(item), status !== prev?.status && acc.statusItems.push(item), acc; + }, + { mutedItems: [], statusItems: [] } + ); + mutedItems.length > 0 && telemetry7("onboarding-checklist-muted", { + items: mutedItems, + completedItems: entries.reduce((acc, [id, { status }]) => status === "done" || status === "accepted" ? acc.concat([id]) : acc, []), + skippedItems: entries.reduce((acc, [id, { status }]) => status === "skipped" ? acc.concat([id]) : acc, []) + }), statusItems.forEach((item) => { + let { status } = state.items[item]; + telemetry7("onboarding-checklist-status", { item, status }); + }); + }); + } catch (err) { + logger3.error("Failed to initialize checklist"), logger3.error(err); + } +} + +// src/core-server/utils/constants.ts +var defaultStaticDirs = [ + { + from: join(resolvePackageDir("storybook"), "assets/browser"), + to: "/sb-common-assets" + } +], defaultFavicon = join(resolvePackageDir("storybook"), "assets/browser/favicon.svg"); + +// src/core-server/utils/save-story/save-story.ts +import { writeFile } from "node:fs/promises"; +import { basename, join as join3 } from "node:path"; +import { formatFileContent } from "storybook/internal/common"; +import { + SAVE_STORY_REQUEST, + SAVE_STORY_RESPONSE, + STORY_RENDERED +} from "storybook/internal/core-events"; +import { storyNameFromExport, toId } from "storybook/internal/csf"; +import { printCsf, readCsf } from "storybook/internal/csf-tools"; +import { logger as logger4 } from "storybook/internal/node-logger"; +import { isExampleStoryId, telemetry as telemetry8 } from "storybook/internal/telemetry"; + +// src/core-server/utils/save-story/duplicate-story-with-new-name.ts +import { types as t2, traverse } from "storybook/internal/babel"; + +// src/core-server/utils/save-story/utils.ts +var SaveStoryError = class extends Error { +}; + +// src/core-server/utils/save-story/duplicate-story-with-new-name.ts +var duplicateStoryWithNewName = (csfFile, storyName, newStoryName) => { + let node = csfFile._storyExports[storyName], cloned = t2.cloneNode(node); + if (!cloned) + throw new SaveStoryError("cannot clone Node"); + let found = !1; + if (traverse(cloned, { + Identifier(path) { + found || path.node.name === storyName && (found = !0, path.node.name = newStoryName); + }, + ObjectProperty(path) { + let key = path.get("key"); + key.isIdentifier() && key.node.name === "args" && path.remove(); + }, + noScope: !0 + }), !(t2.isCallExpression(cloned.init) && t2.isMemberExpression(cloned.init.callee) && t2.isIdentifier(cloned.init.callee.property) && cloned.init.callee.property.name === "story") && (t2.isArrowFunctionExpression(cloned.init) || t2.isCallExpression(cloned.init))) + throw new SaveStoryError("Creating a new story based on a CSF2 story is not supported"); + return traverse(csfFile._ast, { + Program(path) { + path.pushContainer( + "body", + t2.exportNamedDeclaration(t2.variableDeclaration("const", [cloned])) + ); + } + }), cloned; +}; + +// src/core-server/utils/save-story/update-args-in-csf-file.ts +import { types as t4, traverse as traverse2 } from "storybook/internal/babel"; + +// src/core-server/utils/save-story/valueToAST.ts +import { parser as parser2, types as t3 } from "storybook/internal/babel"; +function valueToAST(literal) { + if (literal === null) + return t3.nullLiteral(); + switch (typeof literal) { + case "function": + return parser2.parse(literal.toString(), { + allowReturnOutsideFunction: !0, + allowSuperOutsideMethod: !0 + }).program.body[0]?.expression; + case "number": + return t3.numericLiteral(literal); + case "string": + return t3.stringLiteral(literal); + case "boolean": + return t3.booleanLiteral(literal); + case "undefined": + return t3.identifier("undefined"); + default: + return Array.isArray(literal) ? t3.arrayExpression(literal.map(valueToAST)) : t3.objectExpression( + Object.keys(literal).filter((k) => typeof literal[k] < "u").map((k) => { + let value = literal[k]; + return t3.objectProperty(t3.stringLiteral(k), valueToAST(value)); + }) + ); + } +} + +// src/core-server/utils/save-story/update-args-in-csf-file.ts +var updateArgsInCsfFile = async (node, input) => { + let found = !1, args = Object.fromEntries( + Object.entries(input).map(([k, v]) => [k, valueToAST(v)]) + ); + if (!(t4.isCallExpression(node) && t4.isMemberExpression(node.callee) && t4.isIdentifier(node.callee.property) && node.callee.property.name === "story") && (t4.isArrowFunctionExpression(node) || t4.isCallExpression(node))) + throw new SaveStoryError("Updating a CSF2 story is not supported"); + if (t4.isObjectExpression(node)) { + let properties = node.properties, argsProperty = properties.find((property) => { + if (t4.isObjectProperty(property)) { + let key = property.key; + return t4.isIdentifier(key) && key.name === "args"; + } + return !1; + }); + if (argsProperty) { + if (t4.isObjectProperty(argsProperty)) { + let a = argsProperty.value; + if (t4.isObjectExpression(a)) { + a.properties.forEach((p) => { + if (t4.isObjectProperty(p)) { + let key = p.key; + t4.isIdentifier(key) && key.name in args && (p.value = args[key.name], delete args[key.name]); + } + }); + let remainder = Object.entries(args); + Object.keys(args).length && remainder.forEach(([key, value]) => { + a.properties.push(t4.objectProperty(t4.identifier(key), value)); + }); + } + } + } else + properties.unshift( + t4.objectProperty( + t4.identifier("args"), + t4.objectExpression( + Object.entries(args).map(([key, value]) => t4.objectProperty(t4.identifier(key), value)) + ) + ) + ); + return; + } + traverse2(node, { + ObjectExpression(path) { + if (found) + return; + found = !0; + let argsProperty = path.get("properties").find((property) => { + if (property.isObjectProperty()) { + let key = property.get("key"); + return key.isIdentifier() && key.node.name === "args"; + } + return !1; + }); + if (argsProperty) { + if (argsProperty.isObjectProperty()) { + let a = argsProperty.get("value"); + if (a.isObjectExpression()) { + a.traverse({ + ObjectProperty(p) { + let key = p.get("key"); + key.isIdentifier() && key.node.name in args && (p.get("value").replaceWith(args[key.node.name]), delete args[key.node.name]); + }, + noScope: !0 + }); + let remainder = Object.entries(args); + Object.keys(args).length && remainder.forEach(([key, value]) => { + a.pushContainer("properties", t4.objectProperty(t4.identifier(key), value)); + }); + } + } + } else + path.unshiftContainer( + "properties", + t4.objectProperty( + t4.identifier("args"), + t4.objectExpression( + Object.entries(args).map(([key, value]) => t4.objectProperty(t4.identifier(key), value)) + ) + ) + ); + }, + noScope: !0 + }); +}; + +// src/core-server/utils/save-story/save-story.ts +var parseArgs = (args) => JSON.parse(args, (_, value) => value === "__sb_empty_function_arg__" ? () => { +} : value), removeExtraNewlines = (code, name) => { + let anything = "([\\s\\S])", newline = "(\\r\\n|\\r|\\n)", closing = newline + "};" + newline, regex = new RegExp( + // Looks for an export by the given name, considers the first closing brace on its own line + // to be the end of the story definition. + `^(?${anything}*)(?export const ${name} =${anything}+?${closing})(?${anything}*)$` + ), { before, story, after } = code.match(regex)?.groups || {}; + return story ? before + story.replaceAll(/(\r\n|\r|\n)(\r\n|\r|\n)([ \t]*[a-z0-9_]+): /gi, "$2$3:") + after : code; +}; +function initializeSaveStory(channel, options) { + channel.on(SAVE_STORY_REQUEST, async ({ id, payload }) => { + let { csfId, importPath, args, name } = payload, newStoryId, newStoryName, sourceFileName, sourceFilePath, sourceStoryName; + try { + sourceFileName = basename(importPath), sourceFilePath = join3(process.cwd(), importPath); + let csf = await readCsf(sourceFilePath, { + makeTitle: (userTitle) => userTitle || "myTitle" + }), parsed = csf.parse(), stories = Object.entries(parsed._stories), [componentId, storyId] = csfId.split("--"); + newStoryName = name && storyNameFromExport(name), newStoryId = newStoryName && toId(componentId, newStoryName); + let [storyName] = stories.find(([key, value]) => value.id.endsWith(`--${storyId}`)) || []; + if (!storyName) + throw new SaveStoryError("Source story not found."); + if (name && csf.getStoryExport(name)) + throw new SaveStoryError("Story already exists."); + sourceStoryName = storyNameFromExport(storyName), await updateArgsInCsfFile( + name ? duplicateStoryWithNewName(parsed, storyName, name) : csf.getStoryExport(storyName), + args ? parseArgs(args) : {} + ); + let code = await formatFileContent( + sourceFilePath, + removeExtraNewlines(printCsf(csf).code, name || storyName) + ); + await Promise.all([ + new Promise((resolve2) => { + channel.on(STORY_RENDERED, resolve2), setTimeout(() => resolve2(channel.off(STORY_RENDERED, resolve2)), 3e3); + }), + writeFile(sourceFilePath, code) + ]), channel.emit(SAVE_STORY_RESPONSE, { + id, + success: !0, + payload: { + csfId, + newStoryId, + newStoryName, + newStoryExportName: name, + sourceFileContent: code, + sourceFileName, + sourceStoryName, + sourceStoryExportName: storyName + }, + error: null + }), isExampleStoryId(newStoryId ?? csfId) || await telemetry8("save-story", { + action: name ? "createStory" : "updateStory", + success: !0 + }); + } catch (error) { + channel.emit(SAVE_STORY_RESPONSE, { + id, + success: !1, + error: error instanceof SaveStoryError ? error.message : "Unknown error" + }), logger4.error( + `Error writing to ${sourceFilePath}: +${error.stack || error.message || error.toString()}` + ), error instanceof SaveStoryError || await telemetry8("save-story", { + action: name ? "createStory" : "updateStory", + success: !1, + error + }); + } + }); +} + +// src/core-server/utils/whats-new.ts +import { writeFile as writeFile2 } from "node:fs/promises"; +import { findConfigFile, loadMainConfig } from "storybook/internal/common"; +import { + REQUEST_WHATS_NEW_DATA, + RESULT_WHATS_NEW_DATA, + SET_WHATS_NEW_CACHE, + TELEMETRY_ERROR, + TOGGLE_WHATS_NEW_NOTIFICATIONS +} from "storybook/internal/core-events"; +import { printConfig, readConfig } from "storybook/internal/csf-tools"; +import { logger as logger5 } from "storybook/internal/node-logger"; +import { telemetry as telemetry9 } from "storybook/internal/telemetry"; +var WHATS_NEW_CACHE = "whats-new-cache", WHATS_NEW_URL = "https://storybook.js.org/whats-new/v1"; +function initializeWhatsNew(channel, options) { + channel.on(SET_WHATS_NEW_CACHE, async (data) => { + let cache2 = await options.cache.get(WHATS_NEW_CACHE).catch((e) => (logger5.verbose(e), {})); + await options.cache.set(WHATS_NEW_CACHE, { ...cache2, ...data }); + }), channel.on(REQUEST_WHATS_NEW_DATA, async () => { + try { + let post = await fetch(WHATS_NEW_URL).then(async (response) => { + if (response.ok) + return response.json(); + throw response; + }), disableWhatsNewNotifications = (await loadMainConfig({ configDir: options.configDir })).core?.disableWhatsNewNotifications === !0, cache2 = await options.cache.get(WHATS_NEW_CACHE) ?? {}, data = { + ...post, + status: "SUCCESS", + postIsRead: post.url === cache2.lastReadPost, + showNotification: post.url !== cache2.lastDismissedPost && post.url !== cache2.lastReadPost, + disableWhatsNewNotifications + }; + channel.emit(RESULT_WHATS_NEW_DATA, { data }); + } catch (e) { + logger5.verbose(e instanceof Error ? e.message : String(e)), channel.emit(RESULT_WHATS_NEW_DATA, { + data: { status: "ERROR" } + }); + } + }), channel.on( + TOGGLE_WHATS_NEW_NOTIFICATIONS, + async ({ disableWhatsNewNotifications }) => { + try { + let mainPath = findConfigFile("main", options.configDir); + invariant(mainPath, `unable to find Storybook main file in ${options.configDir}`); + let main = await readConfig(mainPath); + if (!main._exportsObject) + throw new Error( + "Unable to parse Storybook main file while trying to read 'core' property" + ); + main.setFieldValue(["core", "disableWhatsNewNotifications"], disableWhatsNewNotifications), await writeFile2(mainPath, printConfig(main).code), await telemetry9("core-config", { disableWhatsNewNotifications }); + } catch (error) { + invariant(error instanceof Error), await sendTelemetryError(error, "core-config", { + cliOptions: options, + presetOptions: { + ...options, + corePresets: [], + overridePresets: [] + }, + skipPrompt: !0 + }); + } + } + ), channel.on(TELEMETRY_ERROR, async (error) => { + await sendTelemetryError(error, "browser", { + cliOptions: options, + presetOptions: { + ...options, + corePresets: [], + overridePresets: [] + }, + skipPrompt: !0 + }); + }); +} + +// src/core-server/presets/common-preset.ts +var interpolate = (string2, data = {}) => Object.entries(data).reduce((acc, [k, v]) => acc.replace(new RegExp(`%${k}%`, "g"), v), string2), staticDirs = async (values = []) => [ + ...defaultStaticDirs, + ...values +], favicon = async (value, options) => { + if (value) + return value; + let staticDirsValue = await options.presets.apply("staticDirs"), faviconPaths = (staticDirsValue ? staticDirsValue.map((dir) => typeof dir == "string" ? dir : `${dir.from}:${dir.to}`) : []).map((dir) => { + let results = [], normalizedDir = staticDirsValue && !isAbsolute(dir) ? getDirectoryFromWorkingDir({ + configDir: options.configDir, + workingDir: process.cwd(), + directory: dir + }) : dir, { staticPath, targetEndpoint } = parseStaticDir(normalizedDir); + return ["/favicon.svg", "/favicon.ico"].includes(targetEndpoint) && results.push(staticPath), targetEndpoint === "/" && (results.push(join(staticPath, "favicon.svg")), results.push(join(staticPath, "favicon.ico"))), results.filter((path) => existsSync2(path)); + }).reduce((l1, l2) => l1.concat(l2), []); + return faviconPaths.length > 1 && logger6.debug(import_ts_dedent.dedent` + Looks like multiple favicons were detected. Using the first one. + + ${faviconPaths.join(", ")} + `), faviconPaths[0] || defaultFavicon; +}, babel = async (_, options) => { + let { presets } = options, babelDefault = await presets.apply("babelDefault", {}, options) ?? {}, presetConfig = { + targets: { + // This is the same browser supports that we use to bundle our manager and preview code. + chrome: 100, + safari: 15, + firefox: 91 + } + }; + return options?.features && "babelRemoveBugfixes" in options.features && options.features.babelRemoveBugfixes || (presetConfig.bugfixes = !0), { + ...babelDefault, + // This override makes sure that we will never transpile babel further down then the browsers that storybook supports. + // This is needed to support the mount property of the context described here: + // https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-story-in-a-file + overrides: [ + ...babelDefault?.overrides ?? [], + { + include: /\.(story|stories)\.[cm]?[jt]sx?$/, + presets: [["@babel/preset-env", presetConfig]] + } + ] + }; +}, title = (previous, options) => previous || options.packageJson?.name || !1, logLevel = (previous, options) => previous || options.loglevel || "info", previewHead = async (base, { configDir, presets }) => { + let interpolations = await presets.apply("env"); + return getPreviewHeadTemplate(configDir, interpolations); +}, env = async () => { + let { raw } = await loadEnvs({ production: !0 }); + return raw; +}, previewBody = async (base, { configDir, presets }) => { + let interpolations = await presets.apply("env"); + return getPreviewBodyTemplate(configDir, interpolations); +}, typescript = () => ({ + check: !1, + // 'react-docgen' faster than `react-docgen-typescript` but produces lower quality results + reactDocgen: "react-docgen", + reactDocgenTypescriptOptions: { + shouldExtractLiteralValuesFromEnum: !0, + shouldRemoveUndefinedFromOptional: !0, + propFilter: (prop) => prop.parent ? !/node_modules/.test(prop.parent.fileName) : !0, + // NOTE: this default cannot be changed + savePropValueAsString: !0 + } +}), experimental_serverAPI = (extension, options) => { + let removeAddon = removeAddonBase, packageManager = JsPackageManagerFactory.getPackageManager({ + configDir: options.configDir + }); + return removeAddon = async (id, opts) => (await telemetry10("remove", { addon: id, source: "api" }), removeAddonBase(id, { ...opts, packageManager })), { ...extension, removeAddon }; +}, core = async (existing, options) => ({ + ...existing, + channelOptions: { + ...existing?.channelOptions ?? {}, + ...options.configType === "DEVELOPMENT" ? { wsToken: getWsToken() } : {} + }, + disableTelemetry: options.disableTelemetry || optionalEnvToBoolean(process.env.STORYBOOK_DISABLE_TELEMETRY), + enableCrashReports: options.enableCrashReports || optionalEnvToBoolean(process.env.STORYBOOK_ENABLE_CRASH_REPORTS) +}), babelPresetEnvMajor = getBabelPresetEnvMajor(), features = async (existing) => ({ + ...existing, + actions: !0, + argTypeTargetsV7: !0, + babelRemoveBugfixes: babelPresetEnvMajor ? babelPresetEnvMajor >= 8 : !1, + backgrounds: !0, + changeDetection: !0, + componentsManifest: !1, + controls: !0, + disallowImplicitActionsInRenderV8: !0, + // `experimentalReview` is deliberately NOT defaulted here. It is tri-state: MCP tooling + // (`@storybook/addon-mcp`) enables review for the `storybook ai` CLI channel unless the user + // explicitly sets `false`, so an explicit default would be indistinguishable from a user + // opt-out in the merged preset. See `isReviewFeatureEnabled` in `shared/review/features.ts`. + highlight: !0, + interactions: !0, + legacyDecoratorFileOrder: !1, + measure: !0, + outline: !0, + menuOnboardingChecklist: !0, + sidebarOnboardingChecklist: !0, + viewport: !0 +}), csfIndexer = { + test: STORY_FILE_TEST_REGEXP, + createIndex: async (fileName, options) => { + let code = (await readFile2(fileName, "utf-8")).toString(); + return code.trim().length === 0 ? (logger6.debug(`The file ${fileName} is empty. Skipping indexing.`), []) : loadCsf(code, { ...options, fileName }).parse().indexInputs; + } +}, experimental_indexers = (existingIndexers) => [csfIndexer].concat(existingIndexers || []), frameworkOptions = async (_, options) => { + let config = await options.presets.apply("framework"); + return typeof config == "string" ? {} : typeof config > "u" ? null : config.options; +}, managerHead = async (_, options) => { + let location = join(options.configDir, "manager-head.html"); + if (existsSync2(location)) { + let contents = readFile2(location, { encoding: "utf8" }), interpolations = options.presets.apply("env"); + return interpolate(await contents, await interpolations); + } + return ""; +}, channelToken = async (value) => value, experimental_serverChannel = async (channel, options) => (initAIAnalyticsChannel(channel, options, () => storyIndexGeneratorPromise), initializeChecklist(channel, () => storyIndexGeneratorPromise, options.configDir), initializeWhatsNew(channel, options), initializeSaveStory(channel, options), initFileSearchChannel(channel, options), initCreateNewStoryChannel(channel, options), initGhostStoriesChannel(channel, options), initOpenInEditorChannel(channel), isReviewFeatureEnabled(await options.presets.apply("features")) && initReviewChannel(channel), initTelemetryChannel(channel), channel), resolvedReact = async (existing) => { + try { + return { + ...existing, + react: resolvePackageDir("react"), + reactDom: resolvePackageDir("react-dom") + }; + } catch { + return existing; + } +}, managerEntries = async (existing) => [ + join(resolvePackageDir("storybook"), "dist/core-server/presets/common-manager.js"), + ...existing || [] +]; +globalThis.STORYBOOK_SERVICES_LOADED = globalThis.STORYBOOK_SERVICES_LOADED ?? !1; +var services = async (_value, options) => { + if (globalThis.STORYBOOK_SERVICES_LOADED) + throw new Error( + 'The "services" preset property was applied twice, but should only be applied once. Multiple code paths applying it will cause service registration to fail.' + ); + globalThis.STORYBOOK_SERVICES_LOADED = !0; + let storyIndexGenerator2 = await options.presets.apply("storyIndexGenerator"); + if (registerModuleGraphService({ + channel: options.channel, + getIndex: () => storyIndexGenerator2.getIndex(), + workingDir: process.cwd(), + presets: options.presets + }), (await options.presets.apply("features"))?.experimentalDocgenServer && !options.ignorePreview) { + let [docgenDescriptors, storyDocsProvider] = await Promise.all([ + options.presets.apply("experimental_docgenProvider", []), + options.presets.apply( + "experimental_storyDocsProvider", + async () => { + } + ) + ]), docgenWorker = docgenDescriptors.length > 0 ? createDocgenWorkerClient(docgenDescriptors) : void 0; + docgenWorker && registerDocgenService({ + getIndex: () => storyIndexGenerator2.getIndex(), + docgenProvider: (input) => docgenWorker.extract(input.entry), + workingDir: process.cwd() + }), registerStoryDocsService({ + getIndex: () => storyIndexGenerator2.getIndex(), + storyDocsProvider, + workingDir: process.cwd() + }); + } +}, storyIndexGeneratorPromise, storyIndexGenerator = async (_, options) => storyIndexGeneratorPromise || (storyIndexGeneratorPromise = (async () => { + let workingDir = process.cwd(), configDir = options.configDir, stories = await options.presets.apply("stories"), normalizedStories = normalizeStories(stories, { + configDir, + workingDir + }), [indexers, docs] = await Promise.all([ + options.presets.apply("experimental_indexers", []), + options.presets.apply("docs") + ]), generator = new StoryIndexGenerator(normalizedStories, { + workingDir, + configDir, + indexers, + docs + }); + return await generator.initialize(), generator; +})(), storyIndexGeneratorPromise); +export { + babel, + channelToken, + core, + csfIndexer, + env, + experimental_indexers, + experimental_serverAPI, + experimental_serverChannel, + favicon, + features, + frameworkOptions, + logLevel, + managerEntries, + managerHead, + previewBody, + previewHead, + resolvedReact, + services, + staticDirs, + storyIndexGenerator, + title, + typescript +}; diff --git a/tools/ui/node_modules/storybook/dist/csf-tools/index.d.ts b/tools/ui/node_modules/storybook/dist/csf-tools/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c0fd806d85b41f4db6a1f4a116a191651346e08e --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/csf-tools/index.d.ts @@ -0,0 +1,316 @@ +import { types, NodePath, GeneratorOptions, generate, RecastOptions } from 'storybook/internal/babel'; +export { babelParse } from 'storybook/internal/babel'; +import { ComponentAnnotations, StoryAnnotations, IndexInputStats, IndexedCSFFile, IndexInput, CsfEnricher, StoriesEntry, Tag } from 'storybook/internal/types'; +import { ArgTypes } from 'storybook/internal/csf'; + +interface PrintResultType { + code: string; + map?: any; + toString(): string; +} + +interface BabelFile { + ast: types.File; + opts: any; + hub: any; + metadata: object; + path: NodePath; + scope: any; + inputMap: object | null; + code: string; +} +declare const isValidPreviewPath: (filepath: string) => boolean; +declare const isModuleMock: (importPath: string) => boolean; +interface CsfOptions { + fileName?: string; + makeTitle: (userTitle: string) => string; + /** + * If an inline meta is detected e.g. `export default { title: 'foo' }` it will be transformed + * into a constant format e.g. `export const _meta = { title: 'foo' }; export default _meta;` + */ + transformInlineMeta?: boolean; +} +declare class NoMetaError extends Error { + constructor(message: string, ast: types.Node, fileName?: string); +} +declare class MultipleMetaError extends Error { + constructor(message: string, ast: types.Node, fileName?: string); +} +declare class MixedFactoryError extends Error { + constructor(message: string, ast: types.Node, fileName?: string); +} +declare class BadMetaError extends Error { + constructor(message: string, ast: types.Node, fileName?: string); +} +interface StaticMeta extends Pick { + component?: string; +} +interface StaticStory extends Pick { + id: string; + localName?: string; + __stats: IndexInputStats; +} +interface StoryTest { + node: types.Node; + function: types.Node; + name: string; + id: string; + tags: string[]; + parent: { + node: types.Node; + }; +} +declare class CsfFile { + _ast: types.File; + _file: BabelFile; + _options: CsfOptions; + _rawComponentPath?: string; + _componentImportSpecifier?: types.ImportSpecifier | types.ImportDefaultSpecifier; + _meta?: StaticMeta; + _stories: Record; + _metaAnnotations: Record; + _storyExports: Record; + _storyDeclarationPath: Record>; + _storyPaths: Record>; + _metaStatement: types.Statement | undefined; + _metaStatementPath: NodePath | undefined; + _metaNode: types.ObjectExpression | undefined; + _metaPath: NodePath | undefined; + _metaVariableName: string | undefined; + _metaIsFactory: boolean | undefined; + _storyStatements: Record; + _storyAnnotations: Record>; + _templates: Record; + _namedExportsOrder?: string[]; + imports: string[]; + _tests: StoryTest[]; + constructor(ast: types.File, options: CsfOptions, file: BabelFile); + _parseTitle(value: types.Node): string; + _parseMeta(declaration: types.ObjectExpression, program: types.Program): void; + getStoryExport(key: string): types.Node; + parse(): CsfFile & IndexedCSFFile; + get meta(): StaticMeta | undefined; + get stories(): StaticStory[]; + getStoryTests(story: string | types.Node): StoryTest[]; + get indexInputs(): IndexInput[]; +} +/** Using new babel.File is more powerful and give access to API such as buildCodeFrameError */ +declare const babelParseFile: ({ code, filename, ast, }: { + code: string; + filename?: string; + ast?: types.File; +}) => BabelFile; +declare const loadCsf: (code: string, options: CsfOptions) => CsfFile; +declare const formatCsf: (csf: CsfFile, options?: GeneratorOptions & { + inputSourceMap?: any; +}, code?: string) => ReturnType | string; +/** Use this function, if you want to preserve styles. Uses recast under the hood. */ +declare const printCsf: (csf: CsfFile, options?: RecastOptions) => PrintResultType; +declare const readCsf: (fileName: string, options: CsfOptions) => Promise; +declare const writeCsf: (csf: CsfFile, fileName?: string) => Promise; + +declare const _getPathProperties: (path: string[], node: types.Node) => types.ObjectProperty[] | undefined; +declare class ConfigFile { + _ast: types.File; + _code: string; + _exports: Record; + _exportDecls: Record; + _exportsObject: types.ObjectExpression | undefined; + _quotes: 'single' | 'double' | undefined; + fileName?: string; + hasDefaultExport: boolean; + constructor(ast: types.File, code: string, fileName?: string); + _parseExportsObject(exportsObject: types.ObjectExpression): void; + /** Unwraps TS assertions/satisfies from a node, to get the underlying node. */ + _unwrap: (node: types.Node | undefined | null) => any; + /** + * Resolve a declaration node by unwrapping TS assertions/satisfies and following identifiers to + * resolve the correct node in case it's an identifier. + */ + _resolveDeclaration: (node: types.Node, parent?: types.Node) => any; + parse(): this; + getFieldNode(path: string[]): types.Node | undefined; + getFieldProperties(path: string[]): ReturnType; + getFieldValue(path: string[]): T | undefined; + getSafeFieldValue(path: string[]): any; + setFieldNode(path: string[], expr: types.Expression): void; + /** + * @example + * + * ```ts + * // 1. { framework: 'framework-name' } + * // 2. { framework: { name: 'framework-name', options: {} } + * getNameFromPath(['framework']); // => 'framework-name' + * ``` + * + * @returns The name of a node in a given path, supporting the following formats: + */ + getNameFromPath(path: string[]): string | undefined; + /** + * Returns an array of names of a node in a given path, supporting the following formats: + * + * @example + * + * ```ts + * const config = { + * addons: ['first-addon', { name: 'second-addon', options: {} }], + * }; + * // => ['first-addon', 'second-addon'] + * getNamesFromPath(['addons']); + * ``` + */ + getNamesFromPath(path: string[]): string[] | undefined; + _getPnpWrappedValue(node: types.Node): string | undefined; + /** + * Given a node and a fallback property, returns a **non-evaluated** string value of the node. + * + * 1. `{ node: 'value' }` + * 2. `{ node: { fallbackProperty: 'value' } }` + */ + _getPresetValue(node: types.Node, fallbackProperty: string): string; + removeField(path: string[]): void; + appendValueToArray(path: string[], value: any): void; + appendNodeToArray(path: string[], node: types.Expression): void; + /** + * Specialized helper to remove addons or other array entries that can either be strings or + * objects with a name property. + */ + removeEntryFromArray(path: string[], value: string): void; + _inferQuotes(): "single" | "double"; + valueToNode(value: any): types.Expression | undefined; + setFieldValue(path: string[], value: any): void; + getBodyDeclarations(): types.Statement[]; + setBodyDeclaration(declaration: types.Declaration): void; + /** + * Import specifiers for a specific require import + * + * @example + * + * ```ts + * // const { foo } = require('bar'); + * setRequireImport(['foo'], 'bar'); + * + * // const foo = require('bar'); + * setRequireImport('foo', 'bar'); + * ``` + * + * @param importSpecifiers - The import specifiers to set. If a string is passed in, a default + * import will be set. Otherwise, an array of named imports will be set + * @param fromImport - The module to import from + */ + setRequireImport(importSpecifier: string[] | string, fromImport: string): void; + /** + * Set import specifiers for a given import statement. + * + * Does not support setting type imports (yet) + * + * @example + * + * ```ts + * // import { foo } from 'bar'; + * setImport(['foo'], 'bar'); + * + * // import foo from 'bar'; + * setImport('foo', 'bar'); + * + * // import * as foo from 'bar'; + * setImport({ namespace: 'foo' }, 'bar'); + * + * // import 'bar'; + * setImport(null, 'bar'); + * ``` + * + * @param importSpecifiers - The import specifiers to set. If a string is passed in, a default + * import will be set. Otherwise, an array of named imports will be set + * @param fromImport - The module to import from + */ + setImport(importSpecifier: string[] | string | { + namespace: string; + } | null, fromImport: string): void; + _removeRequireImport(importSpecifier: string[] | string | { + namespace: string; + } | null, fromImport: string): void; + _removeImport(importSpecifier: string[] | string | { + namespace: string; + } | null, fromImport: string): void; + /** + * Remove import specifiers for a given import statement. + * + * Does not support removing type imports (yet) + * + * @example + * + * ```ts + * // import { foo } from 'bar'; + * setImport(['foo'], 'bar'); + * + * // import foo from 'bar'; + * setImport('foo', 'bar'); + * + * // import * as foo from 'bar'; + * setImport({ namespace: 'foo' }, 'bar'); + * + * // import 'bar'; + * setImport(null, 'bar'); + * ``` + * + * @param importSpecifiers - The import specifiers to remove. If a string is passed in, will only + * remove the default import. Otherwise, named imports matching the array will be removed. + * @param fromImport - The module to import from + */ + removeImport(importSpecifier: string[] | string | { + namespace: string; + } | null, fromImport: string): void; +} +declare const loadConfig: (code: string, fileName?: string) => ConfigFile; +declare const formatConfig: (config: ConfigFile) => string; +declare const printConfig: (config: ConfigFile, options?: RecastOptions) => PrintResultType; +declare const readConfig: (fileName: string) => Promise; +declare const writeConfig: (config: ConfigFile, fileName?: string) => Promise; +declare const isCsfFactoryPreview: (previewConfig: ConfigFile) => boolean; + +declare const getStorySortParameter: (previewCode: string) => any; + +interface EnrichCsfOptions { + disableSource?: boolean; + disableDescription?: boolean; + enrichCsf?: CsfEnricher; +} +declare const enrichCsfStory: (csf: CsfFile, csfSource: CsfFile, key: string, options?: EnrichCsfOptions) => void; +declare const enrichCsfMeta: (csf: CsfFile, csfSource: CsfFile, options?: EnrichCsfOptions) => void; +declare const enrichCsf: (csf: CsfFile, csfSource: CsfFile, options?: EnrichCsfOptions) => Promise; +declare const extractSource: (node: types.Node) => string; +declare const extractDescription: (node?: types.Node) => string; + +type TagsFilter = { + include: string[]; + exclude: string[]; + skip: string[]; +}; +declare function vitestTransform({ code, fileName, configDir, stories, tagsFilter, previewLevelTags, }: { + code: string; + fileName: string; + configDir: string; + tagsFilter: TagsFilter; + stories: StoriesEntry[]; + previewLevelTags: Tag[]; +}): Promise>; + +/** + * Transforms a component file directly into a Vitest test file. Uses a getComponentArgTypes + * function to retrieve component argTypes for required prop generation. Uses portable stories to + * construct a test based on the default state of a component (basic render + required args) + */ +declare const componentTransform: ({ code, fileName, getComponentArgTypes, }: { + code: string; + fileName: string; + getComponentArgTypes?: (options: { + componentName: string; + fileName: string; + }) => Promise; +}) => Promise | { + code: string; + map: null; +}>; + +export { BadMetaError, ConfigFile, CsfFile, type CsfOptions, type EnrichCsfOptions, MixedFactoryError, MultipleMetaError, NoMetaError, type StaticMeta, type StaticStory, type StoryTest, babelParseFile, componentTransform, enrichCsf, enrichCsfMeta, enrichCsfStory, extractDescription, extractSource, formatConfig, formatCsf, getStorySortParameter, isCsfFactoryPreview, isModuleMock, isValidPreviewPath, loadConfig, loadCsf, printConfig, printCsf, readConfig, readCsf, vitestTransform, writeConfig, writeCsf }; diff --git a/tools/ui/node_modules/storybook/dist/csf-tools/index.js b/tools/ui/node_modules/storybook/dist/csf-tools/index.js new file mode 100644 index 0000000000000000000000000000000000000000..60c447e5d2df9edf569aa38970acb070a9f13988 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/csf-tools/index.js @@ -0,0 +1,76 @@ +import CJS_COMPAT_NODE_URL_9zo2090uugq from 'node:url'; +import CJS_COMPAT_NODE_PATH_9zo2090uugq from 'node:path'; +import CJS_COMPAT_NODE_MODULE_9zo2090uugq from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_9zo2090uugq.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_9zo2090uugq.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_9zo2090uugq.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ +import { + BadMetaError, + ConfigFile, + CsfFile, + MixedFactoryError, + MultipleMetaError, + NoMetaError, + babelParse, + babelParseFile, + componentTransform, + enrichCsf, + enrichCsfMeta, + enrichCsfStory, + extractDescription, + extractSource, + formatConfig, + formatCsf, + getStorySortParameter, + isCsfFactoryPreview, + isModuleMock, + isValidPreviewPath, + loadConfig, + loadCsf, + printConfig, + printCsf, + readConfig, + readCsf, + vitestTransform, + writeConfig, + writeCsf +} from "../_node-chunks/chunk-D3SKCU36.js"; +import "../_node-chunks/chunk-5VUPW2CE.js"; +import "../_node-chunks/chunk-RSQFAFCN.js"; +import "../_node-chunks/chunk-IATWEHFW.js"; +export { + BadMetaError, + ConfigFile, + CsfFile, + MixedFactoryError, + MultipleMetaError, + NoMetaError, + babelParse, + babelParseFile, + componentTransform, + enrichCsf, + enrichCsfMeta, + enrichCsfStory, + extractDescription, + extractSource, + formatConfig, + formatCsf, + getStorySortParameter, + isCsfFactoryPreview, + isModuleMock, + isValidPreviewPath, + loadConfig, + loadCsf, + printConfig, + printCsf, + readConfig, + readCsf, + vitestTransform, + writeConfig, + writeCsf +}; diff --git a/tools/ui/node_modules/storybook/dist/csf/index.d.ts b/tools/ui/node_modules/storybook/dist/csf/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0209e04b9d5a25a6efc3ffd78479c74b88762c2d --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/csf/index.d.ts @@ -0,0 +1,2144 @@ +import { BoundFunctions, queries } from '@testing-library/dom'; +import { userEvent } from '@testing-library/user-event'; +import React$1, { ComponentProps } from 'react'; +import { StorybookTypes, Renderer as Renderer$1, ProjectAnnotations as ProjectAnnotations$1, NormalizedProjectAnnotations, ComponentAnnotations as ComponentAnnotations$1, StoryAnnotations as StoryAnnotations$1, ComposedStoryFn, TestFunction as TestFunction$1 } from 'storybook/internal/types'; +import { AddonTypes as AddonTypes$1, StoryContext as StoryContext$1 } from 'storybook/internal/csf'; + +/** +Convert a union type to an intersection type. + +Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153). + +@example +``` +import type {UnionToIntersection} from 'type-fest'; + +type Union = {the(): void} | {great(arg: string): void} | {escape: boolean}; + +type Intersection = UnionToIntersection; +//=> {the(): void} & {great(arg: string): void} & {escape: boolean} +``` + +@category Type +*/ +type UnionToIntersection = ( + // `extends unknown` is always going to be the case and is used to convert the + // `Union` into a [distributive conditional + // type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types). + Union extends unknown + // The union type is used as the only argument to a function since the union + // of function arguments is an intersection. + ? (distributedUnion: Union) => void + // This won't happen. + : never + // Infer the `Intersection` type since TypeScript represents the positional + // arguments of unions of functions as an intersection of the union. +) extends ((mergedIntersection: infer Intersection) => void) + // The `& Union` is to ensure result of `UnionToIntersection` is always assignable to `A | B` + ? Intersection & Union + : never; + +/** +Create a union of all keys from a given type, even those exclusive to specific union members. + +Unlike the native `keyof` keyword, which returns keys present in **all** union members, this type returns keys from **any** member. + +@link https://stackoverflow.com/a/49402091 + +@example +``` +import type {KeysOfUnion} from 'type-fest'; + +type A = { + common: string; + a: number; +}; + +type B = { + common: string; + b: string; +}; + +type C = { + common: string; + c: boolean; +}; + +type Union = A | B | C; + +type CommonKeys = keyof Union; +//=> 'common' + +type AllKeys = KeysOfUnion; +//=> 'common' | 'a' | 'b' | 'c' +``` + +@category Object +*/ +type KeysOfUnion = + // Hack to fix https://github.com/sindresorhus/type-fest/issues/1008 + keyof UnionToIntersection : never>; + +/** +Returns a boolean for whether the given type is `any`. + +@link https://stackoverflow.com/a/49928360/1490091 + +Useful in type utilities, such as disallowing `any`s to be passed to a function. + +@example +``` +import type {IsAny} from 'type-fest'; + +const typedObject = {a: 1, b: 2} as const; +const anyObject: any = {a: 1, b: 2}; + +function get extends true ? {} : Record), K extends keyof O = keyof O>(object: O, key: K) { + return object[key]; +} + +const typedA = get(typedObject, 'a'); +//=> 1 + +const anyA = get(anyObject, 'a'); +//=> any +``` + +@category Type Guard +@category Utilities +*/ +type IsAny = 0 extends 1 & NoInfer ? true : false; + +/** +Returns a boolean for whether the given key is an optional key of type. + +This is useful when writing utility types or schema validators that need to differentiate `optional` keys. + +@example +``` +import type {IsOptionalKeyOf} from 'type-fest'; + +type User = { + name: string; + surname: string; + + luckyNumber?: number; +}; + +type Admin = { + name: string; + surname?: string; +}; + +type T1 = IsOptionalKeyOf; +//=> true + +type T2 = IsOptionalKeyOf; +//=> false + +type T3 = IsOptionalKeyOf; +//=> boolean + +type T4 = IsOptionalKeyOf; +//=> false + +type T5 = IsOptionalKeyOf; +//=> boolean +``` + +@category Type Guard +@category Utilities +*/ +type IsOptionalKeyOf = + IsAny extends true ? never + : Key extends keyof Type + ? Type extends Record + ? false + : true + : false; + +/** +Extract all optional keys from the given type. + +This is useful when you want to create a new type that contains different type values for the optional keys only. + +@example +``` +import type {OptionalKeysOf, Except} from 'type-fest'; + +type User = { + name: string; + surname: string; + + luckyNumber?: number; +}; + +const REMOVE_FIELD = Symbol('remove field symbol'); +type UpdateOperation = Except, OptionalKeysOf> & { + [Key in OptionalKeysOf]?: Entity[Key] | typeof REMOVE_FIELD; +}; + +const update1: UpdateOperation = { + name: 'Alice', +}; + +const update2: UpdateOperation = { + name: 'Bob', + luckyNumber: REMOVE_FIELD, +}; +``` + +@category Utilities +*/ +type OptionalKeysOf = + Type extends unknown // For distributing `Type` + ? (keyof {[Key in keyof Type as + IsOptionalKeyOf extends false + ? never + : Key + ]: never + }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf` is always assignable to `keyof Type` + : never; // Should never happen + +/** +Extract all required keys from the given type. + +This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc... + +@example +``` +import type {RequiredKeysOf} from 'type-fest'; + +declare function createValidation< + Entity extends object, + Key extends RequiredKeysOf = RequiredKeysOf, +>(field: Key, validator: (value: Entity[Key]) => boolean): (entity: Entity) => boolean; + +type User = { + name: string; + surname: string; + luckyNumber?: number; +}; + +const validator1 = createValidation('name', value => value.length < 25); +const validator2 = createValidation('surname', value => value.length < 25); + +// @ts-expect-error +const validator3 = createValidation('luckyNumber', value => value > 0); +// Error: Argument of type '"luckyNumber"' is not assignable to parameter of type '"name" | "surname"'. +``` + +@category Utilities +*/ +type RequiredKeysOf = + Type extends unknown // For distributing `Type` + ? Exclude> + : never; // Should never happen + +/** +Returns a boolean for whether the given type is `never`. + +@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919 +@link https://stackoverflow.com/a/53984913/10292952 +@link https://www.zhenghao.io/posts/ts-never + +Useful in type utilities, such as checking if something does not occur. + +@example +``` +import type {IsNever, And} from 'type-fest'; + +type A = IsNever; +//=> true + +type B = IsNever; +//=> false + +type C = IsNever; +//=> false + +type D = IsNever; +//=> false + +type E = IsNever; +//=> false + +type F = IsNever; +//=> false +``` + +@example +``` +import type {IsNever} from 'type-fest'; + +type IsTrue = T extends true ? true : false; + +// When a distributive conditional is instantiated with `never`, the entire conditional results in `never`. +type A = IsTrue; +//=> never + +// If you don't want that behaviour, you can explicitly add an `IsNever` check before the distributive conditional. +type IsTrueFixed = + IsNever extends true ? false : T extends true ? true : false; + +type B = IsTrueFixed; +//=> false +``` + +@category Type Guard +@category Utilities +*/ +type IsNever = [T] extends [never] ? true : false; + +/** +An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`. + +Use-cases: +- You can use this in combination with `Is*` types to create an if-else-like experience. For example, `If, 'is any', 'not any'>`. + +Note: +- Returns a union of if branch and else branch if the given type is `boolean` or `any`. For example, `If` will return `'Y' | 'N'`. +- Returns the else branch if the given type is `never`. For example, `If` will return `'N'`. + +@example +``` +import type {If} from 'type-fest'; + +type A = If; +//=> 'yes' + +type B = If; +//=> 'no' + +type C = If; +//=> 'yes' | 'no' + +type D = If; +//=> 'yes' | 'no' + +type E = If; +//=> 'no' +``` + +@example +``` +import type {If, IsAny, IsNever} from 'type-fest'; + +type A = If, 'is any', 'not any'>; +//=> 'not any' + +type B = If, 'is never', 'not never'>; +//=> 'is never' +``` + +@example +``` +import type {If, IsEqual} from 'type-fest'; + +type IfEqual = If, IfBranch, ElseBranch>; + +type A = IfEqual; +//=> 'equal' + +type B = IfEqual; +//=> 'not equal' +``` + +Note: Sometimes using the `If` type can make an implementation non–tail-recursive, which can impact performance. In such cases, it’s better to use a conditional directly. Refer to the following example: + +@example +``` +import type {If, IsEqual, StringRepeat} from 'type-fest'; + +type HundredZeroes = StringRepeat<'0', 100>; + +// The following implementation is not tail recursive +type Includes = + S extends `${infer First}${infer Rest}` + ? If, + 'found', + Includes> + : 'not found'; + +// Hence, instantiations with long strings will fail +// @ts-expect-error +type Fails = Includes; +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Error: Type instantiation is excessively deep and possibly infinite. + +// However, if we use a simple conditional instead of `If`, the implementation becomes tail-recursive +type IncludesWithoutIf = + S extends `${infer First}${infer Rest}` + ? IsEqual extends true + ? 'found' + : IncludesWithoutIf + : 'not found'; + +// Now, instantiations with long strings will work +type Works = IncludesWithoutIf; +//=> 'not found' +``` + +@category Type Guard +@category Utilities +*/ +type If = + IsNever extends true + ? ElseBranch + : Type extends true + ? IfBranch + : ElseBranch; + +/** +Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability. + +@example +``` +import type {Simplify} from 'type-fest'; + +type PositionProps = { + top: number; + left: number; +}; + +type SizeProps = { + width: number; + height: number; +}; + +// In your editor, hovering over `Props` will show a flattened object with all the properties. +type Props = Simplify; +``` + +Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface. + +If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify` if you can't re-declare the `value`. + +@example +``` +import type {Simplify} from 'type-fest'; + +interface SomeInterface { + foo: number; + bar?: string; + baz: number | undefined; +} + +type SomeType = { + foo: number; + bar?: string; + baz: number | undefined; +}; + +const literal = {foo: 123, bar: 'hello', baz: 456}; +const someType: SomeType = literal; +const someInterface: SomeInterface = literal; + +declare function fn(object: Record): void; + +fn(literal); // Good: literal object type is sealed +fn(someType); // Good: type is sealed +// @ts-expect-error +fn(someInterface); // Error: Index signature for type 'string' is missing in type 'someInterface'. Because `interface` can be re-opened +fn(someInterface as Simplify); // Good: transform an `interface` into a `type` +``` + +@link https://github.com/microsoft/TypeScript/issues/15300 +@see {@link SimplifyDeep} +@category Object +*/ +type Simplify = {[KeyType in keyof T]: T[KeyType]} & {}; + +/** +Returns a boolean for whether the two given types are equal. + +@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650 +@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796 + +Use-cases: +- If you want to make a conditional branch based on the result of a comparison of two types. + +@example +``` +import type {IsEqual} from 'type-fest'; + +// This type returns a boolean for whether the given array includes the given item. +// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal. +type Includes = + Value extends readonly [Value[0], ...infer rest] + ? IsEqual extends true + ? true + : Includes + : false; +``` + +@category Type Guard +@category Utilities +*/ +type IsEqual = + [A] extends [B] + ? [B] extends [A] + ? _IsEqual + : false + : false; + +// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`. +type _IsEqual = + (() => G extends A & G | G ? 1 : 2) extends + (() => G extends B & G | G ? 1 : 2) + ? true + : false; + +/** +Omit any index signatures from the given object type, leaving only explicitly defined properties. + +This is the counterpart of `PickIndexSignature`. + +Use-cases: +- Remove overly permissive signatures from third-party types. + +This type was taken from this [StackOverflow answer](https://stackoverflow.com/a/68261113/420747). + +It relies on the fact that an empty object (`{}`) is assignable to an object with just an index signature, like `Record`, but not to an object with explicitly defined keys, like `Record<'foo' | 'bar', unknown>`. + +(The actual value type, `unknown`, is irrelevant and could be any type. Only the key type matters.) + +``` +const indexed: Record = {}; // Allowed + +// @ts-expect-error +const keyed: Record<'foo', unknown> = {}; // Error +// TS2739: Type '{}' is missing the following properties from type 'Record<"foo" | "bar", unknown>': foo, bar +``` + +Instead of causing a type error like the above, you can also use a [conditional type](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html) to test whether a type is assignable to another: + +``` +type Indexed = {} extends Record + ? '✅ `{}` is assignable to `Record`' + : '❌ `{}` is NOT assignable to `Record`'; + +type IndexedResult = Indexed; +//=> '✅ `{}` is assignable to `Record`' + +type Keyed = {} extends Record<'foo' | 'bar', unknown> + ? '✅ `{}` is assignable to `Record<\'foo\' | \'bar\', unknown>`' + : '❌ `{}` is NOT assignable to `Record<\'foo\' | \'bar\', unknown>`'; + +type KeyedResult = Keyed; +//=> '❌ `{}` is NOT assignable to `Record<\'foo\' | \'bar\', unknown>`' +``` + +Using a [mapped type](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#further-exploration), you can then check for each `KeyType` of `ObjectType`... + +``` +type OmitIndexSignature = { + [KeyType in keyof ObjectType // Map each key of `ObjectType`... + ]: ObjectType[KeyType]; // ...to its original value, i.e. `OmitIndexSignature == Foo`. +}; +``` + +...whether an empty object (`{}`) would be assignable to an object with that `KeyType` (`Record`)... + +``` +type OmitIndexSignature = { + [KeyType in keyof ObjectType + // Is `{}` assignable to `Record`? + as {} extends Record + ? never // ✅ `{}` is assignable to `Record` + : KeyType // ❌ `{}` is NOT assignable to `Record` + ]: ObjectType[KeyType]; +}; +``` + +If `{}` is assignable, it means that `KeyType` is an index signature and we want to remove it. If it is not assignable, `KeyType` is a "real" key and we want to keep it. + +@example +``` +import type {OmitIndexSignature} from 'type-fest'; + +type Example = { + // These index signatures will be removed. + [x: string]: any; + [x: number]: any; + [x: symbol]: any; + [x: `head-${string}`]: string; + [x: `${string}-tail`]: string; + [x: `head-${string}-tail`]: string; + [x: `${bigint}`]: string; + [x: `embedded-${number}`]: string; + + // These explicitly defined keys will remain. + foo: 'bar'; + qux?: 'baz'; +}; + +type ExampleWithoutIndexSignatures = OmitIndexSignature; +//=> {foo: 'bar'; qux?: 'baz'} +``` + +@see {@link PickIndexSignature} +@category Object +*/ +type OmitIndexSignature = { + [KeyType in keyof ObjectType as {} extends Record + ? never + : KeyType]: ObjectType[KeyType]; +}; + +/** +Pick only index signatures from the given object type, leaving out all explicitly defined properties. + +This is the counterpart of `OmitIndexSignature`. + +@example +``` +import type {PickIndexSignature} from 'type-fest'; + +declare const symbolKey: unique symbol; + +type Example = { + // These index signatures will remain. + [x: string]: unknown; + [x: number]: unknown; + [x: symbol]: unknown; + [x: `head-${string}`]: string; + [x: `${string}-tail`]: string; + [x: `head-${string}-tail`]: string; + [x: `${bigint}`]: string; + [x: `embedded-${number}`]: string; + + // These explicitly defined keys will be removed. + ['kebab-case-key']: string; + [symbolKey]: string; + foo: 'bar'; + qux?: 'baz'; +}; + +type ExampleIndexSignature = PickIndexSignature; +// { +// [x: string]: unknown; +// [x: number]: unknown; +// [x: symbol]: unknown; +// [x: `head-${string}`]: string; +// [x: `${string}-tail`]: string; +// [x: `head-${string}-tail`]: string; +// [x: `${bigint}`]: string; +// [x: `embedded-${number}`]: string; +// } +``` + +@see {@link OmitIndexSignature} +@category Object +*/ +type PickIndexSignature = { + [KeyType in keyof ObjectType as {} extends Record + ? KeyType + : never]: ObjectType[KeyType]; +}; + +// Merges two objects without worrying about index signatures. +type SimpleMerge = Simplify<{ + [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; +} & Source>; + +/** +Merge two types into a new type. Keys of the second type overrides keys of the first type. + +This is different from the TypeScript `&` (intersection) operator. With `&`, conflicting property types are intersected, which often results in `never`. For example, `{a: string} & {a: number}` makes `a` become `string & number`, which resolves to `never`. With `Merge`, the second type's keys cleanly override the first, so `Merge<{a: string}, {a: number}>` gives `{a: number}` as expected. `Merge` also produces a flattened type (via `Simplify`), making it more readable in IDE tooltips compared to `A & B`. + +@example +``` +import type {Merge} from 'type-fest'; + +type Foo = { + a: string; + b: number; +}; + +type Bar = { + a: number; // Conflicts with Foo['a'] + c: boolean; +}; + +// With `&`, `a` becomes `string & number` which is `never`. Not what you want. +type WithIntersection = (Foo & Bar)['a']; +//=> never + +// With `Merge`, `a` is cleanly overridden to `number`. +type WithMerge = Merge['a']; +//=> number +``` + +@example +``` +import type {Merge} from 'type-fest'; + +type Foo = { + [x: string]: unknown; + [x: number]: unknown; + foo: string; + bar: symbol; +}; + +type Bar = { + [x: number]: number; + [x: symbol]: unknown; + bar: Date; + baz: boolean; +}; + +export type FooBar = Merge; +//=> { +// [x: string]: unknown; +// [x: number]: number; +// [x: symbol]: unknown; +// foo: string; +// bar: Date; +// baz: boolean; +// } +``` + +Note: If you want a merge type that more accurately reflects the runtime behavior of object spread or `Object.assign`, refer to the {@link ObjectMerge} type. + +@see {@link ObjectMerge} +@category Object +*/ +type Merge = + Destination extends unknown // For distributing `Destination` + ? Source extends unknown // For distributing `Source` + ? If, Destination, _Merge> + : never // Should never happen + : never; // Should never happen + +type _Merge = + Simplify< + SimpleMerge, PickIndexSignature> + & SimpleMerge, OmitIndexSignature> + >; + +/** +Works similar to the built-in `Pick` utility type, except for the following differences: +- Distributes over union types and allows picking keys from any member of the union type. +- Primitives types are returned as-is. +- Picks all keys if `Keys` is `any`. +- Doesn't pick `number` from a `string` index signature. + +@example +``` +type ImageUpload = { + url: string; + size: number; + thumbnailUrl: string; +}; + +type VideoUpload = { + url: string; + duration: number; + encodingFormat: string; +}; + +// Distributes over union types and allows picking keys from any member of the union type +type MediaDisplay = HomomorphicPick; +//=> {url: string; size: number} | {url: string; duration: number} + +// Primitive types are returned as-is +type Primitive = HomomorphicPick; +//=> string | number + +// Picks all keys if `Keys` is `any` +type Any = HomomorphicPick<{a: 1; b: 2} | {c: 3}, any>; +//=> {a: 1; b: 2} | {c: 3} + +// Doesn't pick `number` from a `string` index signature +type IndexSignature = HomomorphicPick<{[k: string]: unknown}, number>; +//=> {} +*/ +type HomomorphicPick> = { + [P in keyof T as Extract]: T[P] +}; + +/** +Merges user specified options with default options. + +@example +``` +type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean}; +type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: false}; +type SpecifiedOptions = {leavesOnly: true}; + +type Result = ApplyDefaultOptions; +//=> {maxRecursionDepth: 10; leavesOnly: true} +``` + +@example +``` +// Complains if default values are not provided for optional options + +type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean}; +type DefaultPathsOptions = {maxRecursionDepth: 10}; +type SpecifiedOptions = {}; + +type Result = ApplyDefaultOptions; +// ~~~~~~~~~~~~~~~~~~~ +// Property 'leavesOnly' is missing in type 'DefaultPathsOptions' but required in type '{ maxRecursionDepth: number; leavesOnly: boolean; }'. +``` + +@example +``` +// Complains if an option's default type does not conform to the expected type + +type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean}; +type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: 'no'}; +type SpecifiedOptions = {}; + +type Result = ApplyDefaultOptions; +// ~~~~~~~~~~~~~~~~~~~ +// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'. +``` + +@example +``` +// Complains if an option's specified type does not conform to the expected type + +type PathsOptions = {maxRecursionDepth?: number; leavesOnly?: boolean}; +type DefaultPathsOptions = {maxRecursionDepth: 10; leavesOnly: false}; +type SpecifiedOptions = {leavesOnly: 'yes'}; + +type Result = ApplyDefaultOptions; +// ~~~~~~~~~~~~~~~~ +// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'. +``` +*/ +type ApplyDefaultOptions< + Options extends object, + Defaults extends Simplify, RequiredKeysOf> & Partial, never>>>, + SpecifiedOptions extends Options, +> = + If, Defaults, + If, Defaults, + Simplify ? undefined extends SpecifiedOptions[Key] ? never : Key : Key + ]: SpecifiedOptions[Key] + }> & Required>>>; + +/** +Filter out keys from an object. + +Returns `never` if `Exclude` is strictly equal to `Key`. +Returns `never` if `Key` extends `Exclude`. +Returns `Key` otherwise. + +@example +``` +type Filtered = Filter<'foo', 'foo'>; +//=> never +``` + +@example +``` +type Filtered = Filter<'bar', string>; +//=> never +``` + +@example +``` +type Filtered = Filter<'bar', 'foo'>; +//=> 'bar' +``` + +@see {Except} +*/ +type Filter = IsEqual extends true ? never : (KeyType extends ExcludeType ? never : KeyType); + +type ExceptOptions = { + /** + Disallow assigning non-specified properties. + + Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`. + + @default false + */ + requireExactProps?: boolean; +}; + +type DefaultExceptOptions = { + requireExactProps: false; +}; + +/** +Create a type from an object type without certain keys. + +We recommend setting the `requireExactProps` option to `true`. + +This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically. + +This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)). + +@example +``` +import type {Except} from 'type-fest'; + +type Foo = { + a: number; + b: string; +}; + +type FooWithoutA = Except; +//=> {b: string} + +// @ts-expect-error +const fooWithoutA: FooWithoutA = {a: 1, b: '2'}; +// errors: 'a' does not exist in type '{ b: string; }' + +type FooWithoutB = Except; +//=> {a: number} & Partial> + +// @ts-expect-error +const fooWithoutB: FooWithoutB = {a: 1, b: '2'}; +// errors at 'b': Type 'string' is not assignable to type 'undefined'. + +// The `Omit` utility type doesn't work when omitting specific keys from objects containing index signatures. + +// Consider the following example: + +type UserData = { + [metadata: string]: string; + email: string; + name: string; + role: 'admin' | 'user'; +}; + +// `Omit` clearly doesn't behave as expected in this case: +type PostPayload = Omit; +//=> {[x: string]: string; [x: number]: string} + +// In situations like this, `Except` works better. +// It simply removes the `email` key while preserving all the other keys. +type PostPayloadFixed = Except; +//=> {[x: string]: string; name: string; role: 'admin' | 'user'} +``` + +@category Object +*/ +type Except = + _Except>; + +type _Except> = { + [KeyType in keyof ObjectType as Filter]: ObjectType[KeyType]; +} & (Options['requireExactProps'] extends true + ? Partial> + : {}); + +/** +Create a type that makes the given keys optional, while keeping the remaining keys as is. + +Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are optional. + +@example +``` +import type {SetOptional} from 'type-fest'; + +type Foo = { + a: number; + b?: string; + c: boolean; +}; + +type SomeOptional = SetOptional; +//=> {a: number; b?: string; c?: boolean} +``` + +@category Object +*/ +type SetOptional = + (BaseType extends (...arguments_: never) => any + ? (...arguments_: Parameters) => ReturnType + : unknown) + & _SetOptional; + +type _SetOptional = + BaseType extends unknown // To distribute `BaseType` when it's a union type. + ? Simplify< + // Pick just the keys that are readonly from the base type. + Except + // Pick the keys that should be mutable from the base type and make them mutable. + & Partial> + > + : never; + +interface ComponentSelector { + __emotion_styles: any; +} + +/** + * @desc Utility type for getting props type of React component. + * It takes `defaultProps` into an account - making props with defaults optional. + */ +type PropsOf> = ReactJSX.LibraryManagedAttributes>; + +interface Theme { +} + +type IsPreReact19$1 = 2 extends Parameters>['length'] ? true : false; +/** @ts-ignore */ +type ReactJSXElement = true extends IsPreReact19$1 ? JSX.Element : React.JSX.Element; +/** @ts-ignore */ +type ReactJSXElementClass = true extends IsPreReact19$1 ? JSX.ElementClass : React.JSX.ElementClass; +/** @ts-ignore */ +type ReactJSXElementAttributesProperty = true extends IsPreReact19$1 ? JSX.ElementAttributesProperty : React.JSX.ElementAttributesProperty; +/** @ts-ignore */ +type ReactJSXElementChildrenAttribute = true extends IsPreReact19$1 ? JSX.ElementChildrenAttribute : React.JSX.ElementChildrenAttribute; +/** @ts-ignore */ +type ReactJSXLibraryManagedAttributes = true extends IsPreReact19$1 ? JSX.LibraryManagedAttributes : React.JSX.LibraryManagedAttributes; +/** @ts-ignore */ +type ReactJSXIntrinsicAttributes = true extends IsPreReact19$1 ? JSX.IntrinsicAttributes : React.JSX.IntrinsicAttributes; +/** @ts-ignore */ +type ReactJSXIntrinsicClassAttributes = true extends IsPreReact19$1 ? JSX.IntrinsicClassAttributes : React.JSX.IntrinsicClassAttributes; +/** @ts-ignore */ +type ReactJSXIntrinsicElements$1 = true extends IsPreReact19$1 ? JSX.IntrinsicElements : React.JSX.IntrinsicElements; +/** @ts-ignore */ +type ReactJSXElementType = true extends IsPreReact19$1 ? string | React.JSXElementConstructor : React.JSX.ElementType; +declare namespace ReactJSX { + type ElementType = ReactJSXElementType; + interface Element extends ReactJSXElement { + } + interface ElementClass extends ReactJSXElementClass { + } + interface ElementAttributesProperty extends ReactJSXElementAttributesProperty { + } + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { + } + type LibraryManagedAttributes = ReactJSXLibraryManagedAttributes; + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { + } + interface IntrinsicClassAttributes extends ReactJSXIntrinsicClassAttributes { + } + type IntrinsicElements = ReactJSXIntrinsicElements$1; +} + +type IsPreReact19 = 2 extends Parameters>['length'] ? true : false; +/** @ts-ignore */ +type ReactJSXIntrinsicElements = true extends IsPreReact19 ? JSX.IntrinsicElements : React.JSX.IntrinsicElements; + +/** + * @typeparam ComponentProps Props which will be included when withComponent is called + * @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called + */ +interface StyledComponent extends React.FC, ComponentSelector { + withComponent>>(component: C): StyledComponent, {}, { + ref?: React.Ref>; + }>; + withComponent>>(component: C): StyledComponent>; + withComponent(tag: Tag): StyledComponent; +} + +type IconType = keyof typeof icons; +declare const Svg: StyledComponent<{ + theme?: Theme; + as?: React$1.ElementType; +}, React$1.SVGProps, {}>; +interface IconsProps extends ComponentProps { + icon: IconType; + useSymbol?: boolean; + onClick?: () => void; + __suppressDeprecationWarning?: boolean; +} +declare const icons: { + readonly user: "UserIcon"; + readonly useralt: "UserAltIcon"; + readonly useradd: "UserAddIcon"; + readonly users: "UsersIcon"; + readonly profile: "ProfileIcon"; + readonly facehappy: "FaceHappyIcon"; + readonly faceneutral: "FaceNeutralIcon"; + readonly facesad: "FaceSadIcon"; + readonly accessibility: "AccessibilityIcon"; + readonly accessibilityalt: "AccessibilityAltIcon"; + readonly arrowup: "ChevronUpIcon"; + readonly arrowdown: "ChevronDownIcon"; + readonly arrowleft: "ChevronLeftIcon"; + readonly arrowright: "ChevronRightIcon"; + readonly arrowupalt: "ArrowUpIcon"; + readonly arrowdownalt: "ArrowDownIcon"; + readonly arrowleftalt: "ArrowLeftIcon"; + readonly arrowrightalt: "ArrowRightIcon"; + readonly expandalt: "ExpandAltIcon"; + readonly collapse: "CollapseIcon"; + readonly expand: "ExpandIcon"; + readonly unfold: "UnfoldIcon"; + readonly transfer: "TransferIcon"; + readonly redirect: "RedirectIcon"; + readonly undo: "UndoIcon"; + readonly reply: "ReplyIcon"; + readonly sync: "SyncIcon"; + readonly upload: "UploadIcon"; + readonly download: "DownloadIcon"; + readonly back: "BackIcon"; + readonly proceed: "ProceedIcon"; + readonly refresh: "RefreshIcon"; + readonly globe: "GlobeIcon"; + readonly compass: "CompassIcon"; + readonly location: "LocationIcon"; + readonly pin: "PinIcon"; + readonly time: "TimeIcon"; + readonly dashboard: "DashboardIcon"; + readonly timer: "TimerIcon"; + readonly home: "HomeIcon"; + readonly admin: "AdminIcon"; + readonly info: "InfoIcon"; + readonly question: "QuestionIcon"; + readonly support: "SupportIcon"; + readonly alert: "AlertIcon"; + readonly email: "EmailIcon"; + readonly phone: "PhoneIcon"; + readonly link: "LinkIcon"; + readonly unlink: "LinkBrokenIcon"; + readonly bell: "BellIcon"; + readonly rss: "RSSIcon"; + readonly sharealt: "ShareAltIcon"; + readonly share: "ShareIcon"; + readonly circle: "CircleIcon"; + readonly circlehollow: "CircleHollowIcon"; + readonly bookmarkhollow: "BookmarkHollowIcon"; + readonly bookmark: "BookmarkIcon"; + readonly hearthollow: "HeartHollowIcon"; + readonly heart: "HeartIcon"; + readonly starhollow: "StarHollowIcon"; + readonly star: "StarIcon"; + readonly certificate: "CertificateIcon"; + readonly verified: "VerifiedIcon"; + readonly thumbsup: "ThumbsUpIcon"; + readonly shield: "ShieldIcon"; + readonly basket: "BasketIcon"; + readonly beaker: "BeakerIcon"; + readonly hourglass: "HourglassIcon"; + readonly flag: "FlagIcon"; + readonly cloudhollow: "CloudHollowIcon"; + readonly edit: "EditIcon"; + readonly cog: "CogIcon"; + readonly nut: "NutIcon"; + readonly wrench: "WrenchIcon"; + readonly ellipsis: "EllipsisIcon"; + readonly check: "CheckIcon"; + readonly form: "FormIcon"; + readonly batchdeny: "BatchDenyIcon"; + readonly batchaccept: "BatchAcceptIcon"; + readonly controls: "ControlsIcon"; + readonly plus: "PlusIcon"; + readonly closeAlt: "CloseAltIcon"; + readonly cross: "CrossIcon"; + readonly trash: "TrashIcon"; + readonly pinalt: "PinAltIcon"; + readonly unpin: "UnpinIcon"; + readonly add: "AddIcon"; + readonly subtract: "SubtractIcon"; + readonly close: "CloseIcon"; + readonly delete: "DeleteIcon"; + readonly passed: "PassedIcon"; + readonly changed: "ChangedIcon"; + readonly failed: "FailedIcon"; + readonly clear: "ClearIcon"; + readonly comment: "CommentIcon"; + readonly commentadd: "CommentAddIcon"; + readonly requestchange: "RequestChangeIcon"; + readonly comments: "CommentsIcon"; + readonly lock: "LockIcon"; + readonly unlock: "UnlockIcon"; + readonly key: "KeyIcon"; + readonly outbox: "OutboxIcon"; + readonly credit: "CreditIcon"; + readonly button: "ButtonIcon"; + readonly type: "TypeIcon"; + readonly pointerdefault: "PointerDefaultIcon"; + readonly pointerhand: "PointerHandIcon"; + readonly browser: "BrowserIcon"; + readonly tablet: "TabletIcon"; + readonly mobile: "MobileIcon"; + readonly watch: "WatchIcon"; + readonly sidebar: "SidebarIcon"; + readonly sidebaralt: "SidebarAltIcon"; + readonly sidebaralttoggle: "SidebarAltToggleIcon"; + readonly sidebartoggle: "SidebarToggleIcon"; + readonly bottombar: "BottomBarIcon"; + readonly bottombartoggle: "BottomBarToggleIcon"; + readonly cpu: "CPUIcon"; + readonly database: "DatabaseIcon"; + readonly memory: "MemoryIcon"; + readonly structure: "StructureIcon"; + readonly box: "BoxIcon"; + readonly power: "PowerIcon"; + readonly photo: "PhotoIcon"; + readonly component: "ComponentIcon"; + readonly grid: "GridIcon"; + readonly outline: "OutlineIcon"; + readonly photodrag: "PhotoDragIcon"; + readonly search: "SearchIcon"; + readonly zoom: "ZoomIcon"; + readonly zoomout: "ZoomOutIcon"; + readonly zoomreset: "ZoomResetIcon"; + readonly eye: "EyeIcon"; + readonly eyeclose: "EyeCloseIcon"; + readonly lightning: "LightningIcon"; + readonly lightningoff: "LightningOffIcon"; + readonly contrast: "ContrastIcon"; + readonly switchalt: "SwitchAltIcon"; + readonly mirror: "MirrorIcon"; + readonly grow: "GrowIcon"; + readonly paintbrush: "PaintBrushIcon"; + readonly ruler: "RulerIcon"; + readonly stop: "StopIcon"; + readonly camera: "CameraIcon"; + readonly video: "VideoIcon"; + readonly speaker: "SpeakerIcon"; + readonly play: "PlayIcon"; + readonly playback: "PlayBackIcon"; + readonly playnext: "PlayNextIcon"; + readonly rewind: "RewindIcon"; + readonly fastforward: "FastForwardIcon"; + readonly stopalt: "StopAltIcon"; + readonly sidebyside: "SideBySideIcon"; + readonly stacked: "StackedIcon"; + readonly sun: "SunIcon"; + readonly moon: "MoonIcon"; + readonly book: "BookIcon"; + readonly document: "DocumentIcon"; + readonly copy: "CopyIcon"; + readonly category: "CategoryIcon"; + readonly folder: "FolderIcon"; + readonly print: "PrintIcon"; + readonly graphline: "GraphLineIcon"; + readonly calendar: "CalendarIcon"; + readonly graphbar: "GraphBarIcon"; + readonly menu: "MenuIcon"; + readonly menualt: "MenuIcon"; + readonly filter: "FilterIcon"; + readonly docchart: "DocChartIcon"; + readonly doclist: "DocListIcon"; + readonly markup: "MarkupIcon"; + readonly bold: "BoldIcon"; + readonly paperclip: "PaperClipIcon"; + readonly listordered: "ListOrderedIcon"; + readonly listunordered: "ListUnorderedIcon"; + readonly paragraph: "ParagraphIcon"; + readonly markdown: "MarkdownIcon"; + readonly repository: "RepoIcon"; + readonly commit: "CommitIcon"; + readonly branch: "BranchIcon"; + readonly pullrequest: "PullRequestIcon"; + readonly merge: "MergeIcon"; + readonly apple: "AppleIcon"; + readonly linux: "LinuxIcon"; + readonly ubuntu: "UbuntuIcon"; + readonly windows: "WindowsIcon"; + readonly storybook: "StorybookIcon"; + readonly azuredevops: "AzureDevOpsIcon"; + readonly bitbucket: "BitbucketIcon"; + readonly chrome: "ChromeIcon"; + readonly chromatic: "ChromaticIcon"; + readonly componentdriven: "ComponentDrivenIcon"; + readonly discord: "DiscordIcon"; + readonly facebook: "FacebookIcon"; + readonly figma: "FigmaIcon"; + readonly gdrive: "GDriveIcon"; + readonly github: "GithubIcon"; + readonly gitlab: "GitlabIcon"; + readonly google: "GoogleIcon"; + readonly graphql: "GraphqlIcon"; + readonly medium: "MediumIcon"; + readonly redux: "ReduxIcon"; + readonly twitter: "TwitterIcon"; + readonly youtube: "YoutubeIcon"; + readonly vscode: "VSCodeIcon"; +}; + +type ToolbarShortcutType = 'next' | 'previous' | 'reset'; +type ToolbarItemType = 'item' | 'reset'; +interface ToolbarShortcutConfig { + label: string; + keys: string[]; +} +type ToolbarShortcuts = Record; +interface ToolbarItem { + value?: string; + icon?: IconsProps['icon']; + right?: string; + title?: string; + hideIcon?: boolean; + type?: ToolbarItemType; +} +interface NormalizedToolbarConfig { + /** The label to show for this toolbar item */ + title?: string; + /** Choose an icon to show for this toolbar item */ + icon?: IconsProps['icon']; + /** Set to true to prevent default update of icon to match any present selected items icon */ + preventDynamicIcon?: boolean; + items: ToolbarItem[]; + shortcuts?: ToolbarShortcuts; + /** Change title based on selected value */ + dynamicTitle?: boolean; +} +type ToolbarConfig = Omit & { + items: (string | ToolbarItem)[]; +}; +type ToolbarArgType = { + name?: string; + description?: string; + defaultValue?: any; + toolbar?: ToolbarConfig; + /** + * @deprecated This loose index signature has been added for compatibility with InputType, and + * will be removed in Storybook 11 + */ + [key: string]: any; +}; + +interface SBBaseType { + required?: boolean; + raw?: string; +} +type SBScalarType = SBBaseType & { + name: 'boolean' | 'string' | 'number' | 'function' | 'symbol' | 'date'; +}; +type SBArrayType = SBBaseType & { + name: 'array'; + value: SBType; +}; +type SBNodeType = SBBaseType & { + name: 'node'; + renderer: string; +}; +type SBObjectType = SBBaseType & { + name: 'object'; + value: Record; +}; +type SBEnumType = SBBaseType & { + name: 'enum'; + value: (string | number)[]; +}; +type SBIntersectionType = SBBaseType & { + name: 'intersection'; + value: SBType[]; +}; +type SBUnionType = SBBaseType & { + name: 'union'; + value: SBType[]; +}; +type SBLiteralType = SBBaseType & { + name: 'literal'; + value: unknown; +}; +type SBTupleType = SBBaseType & { + name: 'tuple'; + value: SBType[]; +}; +type SBOtherType = SBBaseType & { + name: 'other'; + value: string; +}; +type SBType = SBScalarType | SBEnumType | SBArrayType | SBNodeType | SBObjectType | SBIntersectionType | SBUnionType | SBLiteralType | SBTupleType | SBOtherType; + +interface ActionsParameters { + /** + * Actions configuration + * + * @see https://storybook.js.org/docs/essentials/actions#parameters + */ + actions?: { + /** + * Create actions for each arg that matches the regex. (**NOT recommended, see below**) + * + * This is quite useful when your component has dozens (or hundreds) of methods and you do not + * want to manually apply the fn utility for each of those methods. However, this is not the + * recommended way of writing actions. That's because automatically inferred args are not + * available as spies in your play function. If you use argTypesRegex and your stories have play + * functions, you will need to also define args with the fn utility to test them in your play + * function. + * + * @example `argTypesRegex: '^on.*'` + */ + argTypesRegex?: string; + /** + * Removes the addon panel and turns off the feature's behavior. If you wish to turn off this + * feature for the entire Storybook, you can set the option in your `main.js|ts` configuration + * file. + * + * @see https://storybook.js.org/docs/essentials/actions#disable + */ + disable?: boolean; + /** + * Binds a standard HTML event handler to the outermost HTML element rendered by your component + * and triggers an action when the event is called for a given selector. The format is + * ` `. The selector is optional; it defaults to all elements. + * + * **To enable this feature, you must use the `withActions` decorator.** + * + * @example `handles: ['mouseover', 'click .btn']` + */ + handles?: string[]; + /** + * An integer specifying to which level the tree should be initially expanded. + * + * @default 1 + */ + expandLevel?: number; + }; +} +interface ActionsTypes { + parameters: ActionsParameters; +} + +declare const PARAM_KEY = "backgrounds"; + +interface Background { + name: string; + value: string; +} +type BackgroundMap = Record; +interface GridConfig { + cellAmount: number; + cellSize: number; + opacity: number; + offsetX?: number; + offsetY?: number; +} +type GlobalState$1 = { + value: string | undefined; + grid?: boolean; +}; +interface BackgroundsParameters { + /** + * Backgrounds configuration + * + * @see https://storybook.js.org/docs/essentials/backgrounds#parameters + */ + backgrounds?: { + /** Default background color */ + default?: string; + /** + * Removes the tool and disables the feature's behavior. If you wish to turn off this feature + * for the entire Storybook, you can set the option in your `main.js|ts` configuration file. + * + * @see https://storybook.js.org/docs/essentials/backgrounds#disable + */ + disable?: boolean; + /** Configuration for the background grid */ + grid?: GridConfig; + /** Available background colors */ + options?: BackgroundMap; + }; +} +interface BackgroundsGlobals { + /** + * Backgrounds configuration + * + * @see https://storybook.js.org/docs/essentials/backgrounds#globals + */ + [PARAM_KEY]?: GlobalState$1 | GlobalState$1['value']; +} +interface BackgroundTypes { + parameters: BackgroundsParameters; + globals: BackgroundsGlobals; +} + +interface ControlsParameters { + /** + * Controls configuration + * + * @see https://storybook.js.org/docs/essentials/controls#parameters-1 + */ + controls?: { + /** + * Removes the addon panel and turns off the feature's behavior. If you wish to turn off this + * feature for the entire Storybook, you can set the option in your `main.js|ts` configuration + * file. + * + * @see https://storybook.js.org/docs/essentials/controls#disable + */ + disable?: boolean; + /** Disable the ability to create or edit stories from the Controls panel */ + disableSaveFromUI?: boolean; + /** Exclude specific properties from the Controls panel */ + exclude?: string[] | RegExp; + /** + * Show the full documentation for each property in the Controls addon panel, including the + * description and default value. + */ + expanded?: boolean; + /** Exclude only specific properties in the Controls panel */ + include?: string[] | RegExp; + /** + * Custom control type matchers + * + * @see https://storybook.js.org/docs/essentials/controls#custom-control-type-matchers + */ + matchers?: { + date?: RegExp; + color?: RegExp; + }; + /** + * Preset color swatches for the color picker control + * + * @example PresetColors: [{ color: '#ff4785', title: 'Coral' }, 'rgba(0, 159, 183, 1)', + * '#fe4a49'] + */ + presetColors?: Array; + /** Controls sorting order */ + sort?: 'none' | 'alpha' | 'requiredFirst'; + }; +} +interface ControlsTypes { + parameters: ControlsParameters; +} + +interface HighlightTypes { + parameters: HighlightParameters; +} +interface HighlightParameters { + /** + * Highlight configuration + * + * @see https://storybook.js.org/docs/essentials/highlight#parameters + */ + highlight?: { + /** + * Removes the tool and disables the feature's behavior. If you wish to turn off this feature + * for the entire Storybook, you can set the option in your `main.js|ts` configuration file. + * + * @see https://storybook.js.org/docs/essentials/highlight#disable + */ + disable?: boolean; + }; +} + +interface MeasureParameters { + /** + * Measure configuration + * + * @see https://storybook.js.org/docs/essentials/measure-and-outline#parameters + */ + measure?: { + /** + * Removes the tool and disables the feature's behavior. If you wish to turn off this feature + * for the entire Storybook, you can set the option in your `main.js|ts` configuration file. + * + * @see https://storybook.js.org/docs/essentials/measure-and-outline#disable + */ + disable?: boolean; + }; +} +interface MeasureTypes { + parameters: MeasureParameters; +} + +interface OutlineParameters { + /** + * Outline configuration + * + * @see https://storybook.js.org/docs/essentials/measure-and-outline#parameters + */ + outline?: { + /** + * Removes the tool and disables the feature's behavior. If you wish to turn off this feature + * for the entire Storybook, you can set the option in your `main.js|ts` configuration file. + * + * @see https://storybook.js.org/docs/essentials/measure-and-outline#disable + */ + disable?: boolean; + }; +} +interface OutlineTypes { + parameters: OutlineParameters; +} + +interface TestParameters { + test?: { + /** Ignore unhandled errors during test execution */ + dangerouslyIgnoreUnhandledErrors?: boolean; + /** Whether to throw exceptions coming from the play function */ + throwPlayFunctionExceptions?: boolean; + }; +} +interface TestTypes { + parameters: TestParameters; +} + +interface Viewport { + name: string; + styles: ViewportStyles; + type?: ViewportType; +} +type ViewportType = 'desktop' | 'mobile' | 'tablet' | 'watch' | 'other'; +interface ViewportStyles { + height: string; + width: string; +} +type GlobalState = { + /** + * When set, the viewport is applied and cannot be changed using the toolbar. Must match the key + * of one of the available viewports or follow the format '{width}-{height}', e.g. '320-480' which + * may include a unit (e.g. '100vw' or '100pct'). + */ + value: string | undefined; + /** + * When true the viewport applied will be rotated 90°, e.g. it will rotate from portrait to + * landscape orientation. + */ + isRotated?: boolean; +}; +interface ViewportParameters { + /** + * Viewport configuration + * + * @see https://storybook.js.org/docs/essentials/viewport#parameters + */ + viewport?: { + /** + * Removes the tool and disables the feature's behavior. If you wish to turn off this feature + * for the entire Storybook, you can set the option in your `main.js|ts` configuration file. + * + * @see https://storybook.js.org/docs/essentials/viewport#disable + */ + disable?: boolean; + /** + * Specify the available viewports. The width and height values must include the unit, e.g. + * '320px'. + */ + options: Record; + }; +} +interface ViewportGlobals { + /** + * Viewport configuration + * + * @see https://storybook.js.org/docs/essentials/viewport#globals + */ + viewport?: GlobalState | GlobalState['value']; +} +interface ViewportTypes { + parameters: ViewportParameters; + globals: ViewportGlobals; +} + +type CoreTypes = StorybookTypes & ActionsTypes & BackgroundTypes & ControlsTypes & HighlightTypes & MeasureTypes & OutlineTypes & TestTypes & ViewportTypes; +/** Flag a project-annotations object as already containing the core annotations. */ +declare function markAsComposedWithCoreAnnotations(annotations: T): T; +/** Whether a project-annotations object already contains the core annotations. */ +declare function hasCoreAnnotations(annotations: unknown): boolean; +declare function getCoreAnnotations(): any[]; + +type StoryId = string; +type ComponentId = string; +type ComponentTitle = string; +type StoryName = string; +/** @deprecated */ +type StoryKind = ComponentTitle; +type Tag = string; +interface StoryIdentifier { + componentId: ComponentId; + title: ComponentTitle; + /** @deprecated */ + kind: ComponentTitle; + id: StoryId; + name: StoryName; + /** @deprecated */ + story: StoryName; + tags: Tag[]; +} +interface Parameters$1 { + [name: string]: any; +} +interface StrictParameters { + [name: string]: unknown; +} +type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text'; +type ConditionalTest = { + truthy?: boolean; +} | { + exists: boolean; +} | { + eq: any; +} | { + neq: any; +}; +type ConditionalValue = { + arg: string; +} | { + global: string; +}; +type Conditional = ConditionalValue & ConditionalTest; +interface ControlBase { + [key: string]: any; + /** @see https://storybook.js.org/docs/api/arg-types#controltype */ + type?: ControlType; + disable?: boolean; +} +interface Report { + type: string; + version?: number; + result: unknown; + status: 'failed' | 'passed' | 'warning'; +} +interface ReportingAPI { + reports: Report[]; + addReport: (report: Report) => void; +} +type Control = ControlType | false | (ControlBase & (ControlBase | { + type: 'color'; + /** @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors */ + presetColors?: string[]; +} | { + type: 'file'; + /** @see https://storybook.js.org/docs/api/arg-types#controlaccept */ + accept?: string; +} | { + type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select'; + /** @see https://storybook.js.org/docs/api/arg-types#controllabels */ + labels?: { + [options: string]: string; + }; +} | { + type: 'number' | 'range'; + /** @see https://storybook.js.org/docs/api/arg-types#controlmax */ + max?: number; + /** @see https://storybook.js.org/docs/api/arg-types#controlmin */ + min?: number; + /** @see https://storybook.js.org/docs/api/arg-types#controlstep */ + step?: number; +})); +interface InputType { + /** @see https://storybook.js.org/docs/api/arg-types#control */ + control?: Control; + /** @see https://storybook.js.org/docs/api/arg-types#description */ + description?: string; + /** @see https://storybook.js.org/docs/api/arg-types#if */ + if?: Conditional; + /** @see https://storybook.js.org/docs/api/arg-types#mapping */ + mapping?: { + [key: string]: any; + }; + /** @see https://storybook.js.org/docs/api/arg-types#name */ + name?: string; + /** @see https://storybook.js.org/docs/api/arg-types#options */ + options?: readonly any[]; + /** @see https://storybook.js.org/docs/api/arg-types#table */ + table?: { + [key: string]: unknown; + /** @see https://storybook.js.org/docs/api/arg-types#tablecategory */ + category?: string; + /** @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue */ + defaultValue?: { + summary?: string | undefined; + detail?: string | undefined; + }; + /** @see https://storybook.js.org/docs/api/arg-types#tabledisable */ + disable?: boolean; + /** @see https://storybook.js.org/docs/api/arg-types#tablesubcategory */ + subcategory?: string; + /** @see https://storybook.js.org/docs/api/arg-types#tabletype */ + type?: { + summary?: string | undefined; + detail?: string | undefined; + }; + }; + /** @see https://storybook.js.org/docs/api/arg-types#type */ + type?: SBType | SBScalarType['name']; + /** + * @deprecated Use `table.defaultValue.summary` instead. + * @see https://storybook.js.org/docs/api/arg-types#defaultvalue + */ + defaultValue?: any; + [key: string]: any; +} +interface StrictInputType extends InputType { + name: string; + type?: SBType; +} +interface Args { + [name: string]: any; +} +interface StrictArgs { + [name: string]: unknown; +} +/** @see https://storybook.js.org/docs/api/arg-types#argtypes */ +type ArgTypes = { + [name in keyof TArgs]: InputType; +}; +type StrictArgTypes = { + [name in keyof TArgs]: StrictInputType; +}; +interface Globals { + [name: string]: any; +} +interface GlobalTypes { + [name: string]: ToolbarArgType; +} +/** + * AddonTypes allows addons to extend the type system with additional args, parameters, and globals. + * + * Addons can use `definePreviewAddon()` to declare additional types that will be merged + * into the story context. For example, an addon that provides a `theme` arg could declare: + * + * ```ts + * const themeAddon = definePreviewAddon<{ args: { theme: 'light' | 'dark' } }>({ + * decorators: [(Story, { args }) => ] + * }); + * ``` + * + * When users include this addon in their preview config, the `theme` arg becomes available and + * type-checked across all stories. + */ +interface AddonTypes { + tags?: Tag[] | undefined; + args?: unknown; + parameters?: Record; + globals?: Record; +} +interface Renderer extends AddonTypes { + /** What is the type of the `component` annotation in this renderer? */ + component: any; + /** What does the story function return in this renderer? */ + storyResult: any; + /** What type of element does this renderer render to? */ + canvasElement: any; + mount(): Promise; + T?: unknown; + args: unknown; + csf4: boolean; +} +/** @deprecated - Use `Renderer` */ +type AnyFramework = Renderer; +interface StoryContextForEnhancers extends StoryIdentifier { + component?: (TRenderer & { + T: any; + })['component']; + subcomponents?: Record; + parameters: Parameters$1; + initialArgs: TArgs; + argTypes: StrictArgTypes; +} +type ArgsEnhancer = (context: StoryContextForEnhancers) => TArgs; +type ArgTypesEnhancer = ((context: StoryContextForEnhancers) => StrictArgTypes) & { + secondPass?: boolean; +}; +interface StoryContextUpdate { + args?: TArgs; + globals?: Globals; + [key: string]: any; +} +type ViewMode = 'story' | 'docs'; +type LoaderFunction = (context: StoryContextForLoaders) => Promise | void> | Record | void; +type Awaitable = T | PromiseLike; +type CleanupCallback = () => Awaitable; +type BeforeAll = () => Awaitable; +type BeforeEach = (context: StoryContext) => Awaitable; +type AfterEach = (context: StoryContext) => Awaitable; +interface Canvas extends BoundFunctions { +} +interface StoryContext extends StoryContextForEnhancers, Required> { + loaded: Record; + abortSignal: AbortSignal; + canvasElement: TRenderer['canvasElement']; + hooks: unknown; + originalStoryFn: ArgsStoryFn; + viewMode: ViewMode; + step: StepFunction; + context: this; + canvas: Canvas; + userEvent: ReturnType; + mount: TRenderer['mount']; + reporting: ReportingAPI; +} +/** @deprecated Use {@link StoryContext} instead. */ +interface StoryContextForLoaders extends StoryContext { +} +/** @deprecated Use {@link StoryContext} instead. */ +interface PlayFunctionContext extends StoryContext { +} +type StepLabel = string; +type StepFunction = (label: StepLabel, play: PlayFunction) => Promise | void; +type PlayFunction = (context: PlayFunctionContext) => Promise | void; +type TestFunction = (context: StoryContext) => Promise | void; +type PartialStoryFn = (update?: StoryContextUpdate>) => TRenderer['storyResult']; +type LegacyStoryFn = (context: StoryContext) => TRenderer['storyResult']; +type ArgsStoryFn = (args: TArgs, context: StoryContext) => (TRenderer & { + T: TArgs; +})['storyResult']; +type StoryFn = LegacyStoryFn | ArgsStoryFn; +type DecoratorFunction = (fn: PartialStoryFn, c: StoryContext) => TRenderer['storyResult']; +type DecoratorApplicator = (storyFn: LegacyStoryFn, decorators: DecoratorFunction[]) => LegacyStoryFn; +type StepRunner = (label: StepLabel, play: PlayFunction, context: StoryContext) => Promise; +interface BaseAnnotations { + /** + * Wrapper components or Storybook decorators that wrap a story. + * + * Decorators defined in Meta will be applied to every story variation. + * + * @see [Decorators](https://storybook.js.org/docs/writing-stories/decorators) + */ + decorators?: DecoratorFunction>[] | DecoratorFunction>; + /** + * Custom metadata for a story. + * + * @see [Parameters](https://storybook.js.org/docs/writing-stories/parameters) + */ + parameters?: Parameters$1 & (TRenderer['csf4'] extends true ? CoreTypes['parameters'] & TRenderer['parameters'] : unknown); + /** + * Dynamic data that are provided (and possibly updated by) Storybook and its addons. + * + * @see [Args](https://storybook.js.org/docs/writing-stories/args) + */ + args?: Partial; + /** + * ArgTypes encode basic metadata for args, such as `name`, `description`, `defaultValue` for an + * arg. These get automatically filled in by Storybook Docs. + * + * @see [ArgTypes](https://storybook.js.org/docs/api/arg-types) + */ + argTypes?: Partial>; + /** + * Asynchronous functions which provide data for a story. + * + * @see [Loaders](https://storybook.js.org/docs/writing-stories/loaders) + */ + loaders?: LoaderFunction[] | LoaderFunction; + /** + * Function to be called before each story. When the function is async, it will be awaited. + * + * `beforeEach` can be added to preview, the default export and to a specific story. They are run + * (and awaited) in the order: preview, default export, story + * + * A cleanup function can be returned. + */ + beforeEach?: BeforeEach[] | BeforeEach; + /** + * Function to be called after each play function for post-test assertions. Don't use this + * function for cleaning up state. You can use the return callback of `beforeEach` for that, which + * is run when switching stories. When the function is async, it will be awaited. + * + * `afterEach` can be added to preview, the default export and to a specific story. They are run + * (and awaited) reverse order: preview, default export, story + */ + afterEach?: AfterEach[] | AfterEach; + /** + * Define a custom render function for the story(ies). If not passed, a default render function by + * the renderer will be used. + */ + render?: ArgsStoryFn; + /** Named tags for a story, used to filter stories in different contexts. */ + tags?: (TRenderer['tags'] extends Tag[] ? TRenderer['tags'] : Tag[]) | undefined; + mount?: (context: StoryContext) => TRenderer['mount']; +} +interface ProjectAnnotations extends BaseAnnotations { + argsEnhancers?: ArgsEnhancer[]; + argTypesEnhancers?: ArgTypesEnhancer[]; + /** + * Lifecycle hook which runs once, before any loaders, decorators or stories, and may rerun when + * configuration changes or when reinitializing (e.g. between test runs). The function may be + * synchronous or asynchronous, and may return a cleanup function which may also be synchronous or + * asynchronous. The cleanup function is not guaranteed to run (e.g. when the browser closes), but + * runs when configuration changes or when reinitializing. This hook may only be defined globally + * (i.e. not on component or story level). When multiple hooks are specified, they are to be + * executed sequentially (and awaited) in the following order: + * + * - Addon hooks (in order of addons array in e.g. .storybook/main.js) + * - Annotation hooks (in order of previewAnnotations array in e.g. .storybook/main.js) + * - Preview hook (via e.g. .storybook/preview.js) Cleanup functions are executed sequentially in + * reverse order of initialization. + */ + beforeAll?: BeforeAll; + initialGlobals?: Globals & (TRenderer['csf4'] extends true ? CoreTypes['globals'] & TRenderer['globals'] : unknown); + globalTypes?: GlobalTypes; + applyDecorators?: DecoratorApplicator; + runStep?: StepRunner; +} +type StoryDescriptor$1 = string[] | RegExp; +interface ComponentAnnotations extends BaseAnnotations { + /** + * Title of the component which will be presented in the navigation. **Should be unique.** + * + * Components can be organized in a nested structure using "/" as a separator. + * + * Since CSF 3.0 this property is optional -- it can be inferred from the filesystem path + * + * @example Export default { ... title: 'Design System/Atoms/Button' } + * + * @see [Story Hierarchy](https://storybook.js.org/docs/writing-stories/naming-components-and-hierarchy#structure-and-hierarchy) + */ + title?: ComponentTitle; + /** + * Id of the component (prefix of the story id) which is used for URLs. + * + * By default is inferred from sanitizing the title + * + * @see [Permalink to stories](https://storybook.js.org/docs/configure/sidebar-and-urls#permalink-to-stories) + */ + id?: ComponentId; + /** + * Used to only include certain named exports as stories. Useful when you want to have non-story + * exports such as mock data or ignore a few stories. + * + * @example IncludeStories: ['SimpleStory', 'ComplexStory'] includeStories: /.*Story$/ + * + * @see [Non-story exports](https://storybook.js.org/docs/api/csf#non-story-exports) + */ + includeStories?: StoryDescriptor$1; + /** + * Used to exclude certain named exports. Useful when you want to have non-story exports such as + * mock data or ignore a few stories. + * + * @example ExcludeStories: ['simpleData', 'complexData'] excludeStories: /.*Data$/ + * + * @see [Non-story exports](https://storybook.js.org/docs/api/csf#non-story-exports) + */ + excludeStories?: StoryDescriptor$1; + /** + * The primary component for your story. + * + * Used by addons for automatic prop table generation and display of other component metadata. + */ + component?: (TRenderer & { + T: Record extends Required ? any : TArgs; + })['component']; + /** + * Auxiliary subcomponents that are part of the stories. + * + * Used by addons for automatic prop table generation and display of other component metadata. + * + * @example Import { Button, ButtonGroup } from './components'; + * + * Export default { ... subcomponents: { Button, ButtonGroup } } + * + * By defining them each component will have its tab in the args table. + */ + subcomponents?: Record; + /** Function that is executed after the story is rendered. */ + play?: PlayFunction; + /** Override the globals values for all stories in this component */ + globals?: Partial; +} +type StoryAnnotations> = BaseAnnotations & { + /** Override the display name in the UI (CSF v3) */ + name?: StoryName; + /** Override the display name in the UI (CSF v2) */ + storyName?: StoryName; + /** Function that is executed after the story is rendered. */ + play?: PlayFunction; + /** Override the globals values for this story */ + globals?: Partial; + /** @deprecated */ + story?: Omit, 'story'>; +} & ({} extends TRequiredArgs ? { + args?: TRequiredArgs; +} : { + args: TRequiredArgs; +}); +type LegacyAnnotatedStoryFn = StoryFn & StoryAnnotations; +type LegacyStoryAnnotationsOrFn = LegacyAnnotatedStoryFn | StoryAnnotations; +type AnnotatedStoryFn = ArgsStoryFn & StoryAnnotations; +type StoryAnnotationsOrFn = AnnotatedStoryFn | StoryAnnotations; +type ArgsFromMeta = Meta extends { + render?: ArgsStoryFn; + loaders?: (infer Loaders)[] | (infer Loaders); + decorators?: (infer Decorators)[] | (infer Decorators); +} ? Simplify & LoaderArgs>> : unknown; +type DecoratorsArgs = UnionToIntersection ? TArgs : unknown>; +type LoaderArgs = UnionToIntersection ? TArgs : unknown>; + +/** + * Helper function to include/exclude an arg based on the value of other other args aka "conditional + * args" + */ +declare const includeConditionalArg: (argType: InputType, args: Args, globals: Globals) => any; + +interface Preview { + readonly _tag: 'Preview'; + input: ProjectAnnotations$1 & { + addons?: PreviewAddon[]; + }; + composed: NormalizedProjectAnnotations; + meta>(input: TInput): Meta; + type(): Preview; +} +type InferTypes[]> = T extends PreviewAddon[] ? C & { + csf4: true; +} : never; +declare function definePreview[]>(input: ProjectAnnotations$1 & { + addons?: Addons; +}): Preview>; +interface PreviewAddon extends ProjectAnnotations$1 { +} +declare function definePreviewAddon(preview: ProjectAnnotations$1): PreviewAddon; +declare function isPreview(input: unknown): input is Preview; +interface Meta = ComponentAnnotations$1> { + readonly _tag: 'Meta'; + input: TMetaInput; + preview: Preview; + story(input?: () => TRenderer['storyResult']): Story TRenderer['storyResult']; + }>; + story>>(input?: TInput): Story; +} +declare function isMeta(input: unknown): input is Meta; +interface Story = StoryAnnotations$1> { + readonly _tag: 'Story'; + input: TInput; + composed: Pick, 'argTypes' | 'parameters' | 'id' | 'tags' | 'globals'> & { + args: TRenderer['args']; + name: string; + }; + meta: Meta; + play: TInput['play']; + run: (context?: Partial>>, testName?: string) => Promise; + extend>(input: TInput): Story; + test(name: string, fn: TestFunction$1): void; + test(name: string, annotations: StoryAnnotations$1, fn: TestFunction$1): void; +} +declare function isStory(input: unknown): input is Story; +declare function getStoryChildren(story: Story): Story[]; + +/** + * Remove punctuation and illegal characters from a story ID. + * + * See https://gist.github.com/davidjrice/9d2af51100e41c6c4b4a + */ +declare const sanitize: (string: string) => string; +/** Generate a storybook ID from a component/kind and story name. */ +declare const toId: (kind: string, name?: string) => string; +/** Generate a storybook test ID from a story ID and test name. */ +declare const toTestId: (parentId: string, testName: string) => string; +/** Transform a CSF named export into a readable story name */ +declare const storyNameFromExport: (key: string) => string; +type StoryDescriptor = string[] | RegExp; +interface IncludeExcludeOptions { + includeStories?: StoryDescriptor; + excludeStories?: StoryDescriptor; +} +/** Does a named export match CSF inclusion/exclusion options? */ +declare function isExportStory(key: string, { includeStories, excludeStories }: IncludeExcludeOptions): boolean | null; +interface SeparatorOptions { + rootSeparator: string | RegExp; + groupSeparator: string | RegExp; +} +/** Parse out the component/kind name from a path, using the given separator config. */ +declare const parseKind: (kind: string, { rootSeparator, groupSeparator }: SeparatorOptions) => { + root: string | null; + groups: string[]; +}; +/** Combine a set of project / meta / story tags, removing duplicates and handling negations. */ +declare const combineTags: (...tags: string[]) => string[]; + +export { type ActionsTypes, type AddonTypes, type AfterEach, type AnnotatedStoryFn, type AnyFramework, type ArgTypes, type ArgTypesEnhancer, type Args, type ArgsEnhancer, type ArgsFromMeta, type ArgsStoryFn, type BackgroundTypes, type BackgroundsGlobals, type BaseAnnotations, type BeforeAll, type BeforeEach, type Canvas, type CleanupCallback, type ComponentAnnotations, type ComponentId, type ComponentTitle, type Conditional, type ControlsTypes, type CoreTypes, type DecoratorApplicator, type DecoratorFunction, type GlobalTypes, type Globals, type HighlightTypes, type IncludeExcludeOptions, type InferTypes, type InputType, type LegacyAnnotatedStoryFn, type LegacyStoryAnnotationsOrFn, type LegacyStoryFn, type LoaderFunction, type MeasureTypes, type Meta, type OutlineTypes, type Parameters$1 as Parameters, type PartialStoryFn, type PlayFunction, type PlayFunctionContext, type Preview, type PreviewAddon, type ProjectAnnotations, type Renderer, type SBArrayType, type SBEnumType, type SBIntersectionType, type SBLiteralType, type SBNodeType, type SBObjectType, type SBOtherType, type SBScalarType, type SBTupleType, type SBType, type SBUnionType, type SeparatorOptions, type StepFunction, type StepLabel, type StepRunner, type Story, type StoryAnnotations, type StoryAnnotationsOrFn, type StoryContext, type StoryContextForEnhancers, type StoryContextForLoaders, type StoryContextUpdate, type StoryFn, type StoryId, type StoryIdentifier, type StoryKind, type StoryName, type StrictArgTypes, type StrictArgs, type StrictInputType, type StrictParameters, type Tag, type TestFunction, type TestTypes, type ViewMode, type ViewportGlobals, type ViewportTypes, combineTags, definePreview, definePreviewAddon, getCoreAnnotations, getStoryChildren, hasCoreAnnotations, includeConditionalArg, isExportStory, isMeta, isPreview, isStory, markAsComposedWithCoreAnnotations, parseKind, sanitize, storyNameFromExport, toId, toTestId }; diff --git a/tools/ui/node_modules/storybook/dist/csf/index.js b/tools/ui/node_modules/storybook/dist/csf/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2871585363338d578b9ace1acb146c8eadacf9f0 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/csf/index.js @@ -0,0 +1,2157 @@ +import { + selectSnippetForStory +} from "../_browser-chunks/chunk-GWNTJ7C3.js"; +import { + PARAM_KEY as PARAM_KEY3, + PARAM_KEY2 as PARAM_KEY4, + docgenServiceDef +} from "../_browser-chunks/chunk-5FAQJLSD.js"; +import { + composeConfigs, + composeStory, + mountDestructured, + normalizeArrays, + normalizeProjectAnnotations, + registerService +} from "../_browser-chunks/chunk-SNLGT2ZI.js"; +import "../_browser-chunks/chunk-MEXTPDJG.js"; +import { + Tag +} from "../_browser-chunks/chunk-A26ZOLVJ.js"; +import "../_browser-chunks/chunk-SFVA4SBT.js"; +import "../_browser-chunks/chunk-DRQKCCAG.js"; +import { + shouldSkipStoryDocsEmit +} from "../_browser-chunks/chunk-OA6XKWIN.js"; +import { + invariant +} from "../_browser-chunks/chunk-IWQGIXJS.js"; +import "../_browser-chunks/chunk-X5VVFFFE.js"; +import { + object, + optional, + record, + string, + undefined_, + void_ +} from "../_browser-chunks/chunk-W6Y3UHOT.js"; +import "../_browser-chunks/chunk-KUHYVZJN.js"; +import "../_browser-chunks/chunk-QC4HFS6K.js"; +import { + combineParameters +} from "../_browser-chunks/chunk-FLUL445Z.js"; +import "../_browser-chunks/chunk-5GYAEUAU.js"; +import "../_browser-chunks/chunk-Z3B64JMR.js"; +import "../_browser-chunks/chunk-NZMVUW5T.js"; +import "../_browser-chunks/chunk-KK3JJ3E4.js"; +import { + PARAM_KEY +} from "../_browser-chunks/chunk-NQ3W4AUJ.js"; +import "../_browser-chunks/chunk-IUGBVGDA.js"; +import "../_browser-chunks/chunk-2HVKLHKJ.js"; +import "../_browser-chunks/chunk-SC67XZST.js"; +import { + dedent +} from "../_browser-chunks/chunk-3LY4VQVK.js"; +import { + HIGHLIGHT, + MAX_Z_INDEX, + MIN_TOUCH_AREA_SIZE, + REMOVE_HIGHLIGHT, + RESET_HIGHLIGHT, + SCROLL_INTO_VIEW +} from "../_browser-chunks/chunk-KJHJLCBK.js"; +import "../_browser-chunks/chunk-ECQ75MKQ.js"; +import { + action +} from "../_browser-chunks/chunk-EUVGDK4H.js"; +import "../_browser-chunks/chunk-6XWLIJQL.js"; +import { + DEFAULT_BACKGROUNDS, + PARAM_KEY as PARAM_KEY2 +} from "../_browser-chunks/chunk-6YDLG6WW.js"; +import { + __commonJS, + __export, + __toESM +} from "../_browser-chunks/chunk-IMSF75WX.js"; + +// ../../node_modules/@ngard/tiny-isequal/index.js +var require_tiny_isequal = __commonJS({ + "../../node_modules/@ngard/tiny-isequal/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }), exports.isEqual = /* @__PURE__ */ (function() { + var e = Object.prototype.toString, r = Object.getPrototypeOf, t = Object.getOwnPropertySymbols ? function(e2) { + return Object.keys(e2).concat(Object.getOwnPropertySymbols(e2)); + } : Object.keys; + return function(n, a) { + return (function n2(a2, c, u) { + var i, s, l, o = e.call(a2), f = e.call(c); + if (a2 === c) return !0; + if (a2 == null || c == null) return !1; + if (u.indexOf(a2) > -1 && u.indexOf(c) > -1) return !0; + if (u.push(a2, c), o != f || (i = t(a2), s = t(c), i.length != s.length || i.some(function(e2) { + return !n2(a2[e2], c[e2], u); + }))) return !1; + switch (o.slice(8, -1)) { + case "Symbol": + return a2.valueOf() == c.valueOf(); + case "Date": + case "Number": + return +a2 == +c || +a2 != +a2 && +c != +c; + case "RegExp": + case "Function": + case "String": + case "Boolean": + return "" + a2 == "" + c; + case "Set": + case "Map": + i = a2.entries(), s = c.entries(); + do + if (!n2((l = i.next()).value, s.next().value, u)) return !1; + while (!l.done); + return !0; + case "ArrayBuffer": + a2 = new Uint8Array(a2), c = new Uint8Array(c); + case "DataView": + a2 = new Uint8Array(a2.buffer), c = new Uint8Array(c.buffer); + case "Float32Array": + case "Float64Array": + case "Int8Array": + case "Int16Array": + case "Int32Array": + case "Uint8Array": + case "Uint16Array": + case "Uint32Array": + case "Uint8ClampedArray": + case "Arguments": + case "Array": + if (a2.length != c.length) return !1; + for (l = 0; l < a2.length; l++) if ((l in a2 || l in c) && (l in a2 != l in c || !n2(a2[l], c[l], u))) return !1; + return !0; + case "Object": + return n2(r(a2), r(c), u); + default: + return !1; + } + })(n, a, []); + }; + })(); + } +}); + +// src/csf/toStartCaseStr.ts +function toStartCaseStr(str) { + return str.replace(/_/g, " ").replace(/-/g, " ").replace(/\./g, " ").replace(/([^\n])([A-Z])([a-z])/g, (str2, $1, $2, $3) => `${$1} ${$2}${$3}`).replace(/([a-z])([A-Z])/g, (str2, $1, $2) => `${$1} ${$2}`).replace(/([a-z])([0-9])/gi, (str2, $1, $2) => `${$1} ${$2}`).replace(/([0-9])([a-z])/gi, (str2, $1, $2) => `${$1} ${$2}`).replace(/(\s|^)(\w)/g, (str2, $1, $2) => `${$1}${$2.toUpperCase()}`).replace(/ +/g, " ").trim(); +} + +// src/csf/includeConditionalArg.ts +var import_tiny_isequal = __toESM(require_tiny_isequal(), 1), count = (vals) => vals.map((v) => typeof v < "u").filter(Boolean).length, testValue = (cond, value) => { + let { exists, eq, neq, truthy } = cond; + if (count([exists, eq, neq, truthy]) > 1) + throw new Error(`Invalid conditional test ${JSON.stringify({ exists, eq, neq })}`); + if (typeof eq < "u") + return (0, import_tiny_isequal.isEqual)(value, eq); + if (typeof neq < "u") + return !(0, import_tiny_isequal.isEqual)(value, neq); + if (typeof exists < "u") { + let valueExists = typeof value < "u"; + return exists ? valueExists : !valueExists; + } + return (typeof truthy > "u" ? !0 : truthy) ? !!value : !value; +}, includeConditionalArg = (argType, args, globals) => { + if (!argType.if) + return !0; + let { arg, global: global5 } = argType.if; + if (count([arg, global5]) !== 1) + throw new Error(`Invalid conditional value ${JSON.stringify({ arg, global: global5 })}`); + let value = arg ? args[arg] : globals[global5]; + return testValue(argType.if, value); +}; + +// src/csf/csf-factories.ts +import { combineTags } from "storybook/internal/csf"; + +// src/actions/preview.ts +import { definePreviewAddon } from "storybook/internal/csf"; + +// src/actions/addArgs.ts +var addArgs_exports = {}; +__export(addArgs_exports, { + argsEnhancers: () => argsEnhancers +}); + +// src/actions/addArgsHelpers.ts +var isInInitialArgs = (name, initialArgs) => typeof initialArgs[name] > "u" && !(name in initialArgs), inferActionsFromArgTypesRegex = (context) => { + let { + initialArgs, + argTypes, + id, + parameters: { actions } + } = context; + if (!actions || actions.disable || !actions.argTypesRegex || !argTypes) + return {}; + let argTypesRegex = new RegExp(actions.argTypesRegex); + return Object.entries(argTypes).filter( + ([name]) => !!argTypesRegex.test(name) + ).reduce((acc, [name, argType]) => (isInInitialArgs(name, initialArgs) && (acc[name] = action(name, { implicit: !0, id })), acc), {}); +}, addActionsFromArgTypes = (context) => { + let { + initialArgs, + argTypes, + parameters: { actions } + } = context; + return actions?.disable || !argTypes ? {} : Object.entries(argTypes).filter(([name, argType]) => !!argType.action).reduce((acc, [name, argType]) => (isInInitialArgs(name, initialArgs) && (acc[name] = action(typeof argType.action == "string" ? argType.action : name)), acc), {}); +}; + +// src/actions/addArgs.ts +var argsEnhancers = [ + addActionsFromArgTypes, + inferActionsFromArgTypesRegex +]; + +// src/actions/loaders.ts +var loaders_exports = {}; +__export(loaders_exports, { + loaders: () => loaders +}); +import { onMockCall } from "storybook/test"; +var subscribed = !1, logActionsWhenMockCalled = (context) => { + let { parameters: parameters2 } = context; + parameters2?.actions?.disable || subscribed || (onMockCall((mock, args) => { + let name = mock.getMockName(); + name !== "spy" && name !== "vi.fn()" && (!/^next\/.*::/.test(name) || [ + "next/router::useRouter()", + "next/navigation::useRouter()", + "next/navigation::redirect", + "next/link::Link", + "next/cache::", + "next/headers::cookies().set", + "next/headers::cookies().delete", + "next/headers::headers().set", + "next/headers::headers().delete" + ].some((prefix) => name.startsWith(prefix))) && action(name)(args); + }), subscribed = !0); +}, loaders = [logActionsWhenMockCalled]; + +// src/actions/preview.ts +var preview_default = () => definePreviewAddon({ + ...addArgs_exports, + ...loaders_exports +}); + +// src/backgrounds/preview.ts +import { definePreviewAddon as definePreviewAddon2 } from "storybook/internal/csf"; + +// src/backgrounds/decorator.ts +import { useEffect } from "storybook/preview-api"; + +// src/backgrounds/utils.ts +var { document: document2 } = globalThis, isReduceMotionEnabled = () => globalThis?.matchMedia ? !!globalThis.matchMedia("(prefers-reduced-motion: reduce)")?.matches : !1, clearStyles = (selector) => { + (Array.isArray(selector) ? selector : [selector]).forEach(clearStyle); +}, clearStyle = (selector) => { + if (!document2) + return; + let element = document2.getElementById(selector); + element && element.parentElement && element.parentElement.removeChild(element); +}, addGridStyle = (selector, css) => { + if (!document2) + return; + let existingStyle = document2.getElementById(selector); + if (existingStyle) + existingStyle.innerHTML !== css && (existingStyle.innerHTML = css); + else { + let style = document2.createElement("style"); + style.setAttribute("id", selector), style.innerHTML = css, document2.head.appendChild(style); + } +}, addBackgroundStyle = (selector, css, storyId) => { + if (!document2) + return; + let existingStyle = document2.getElementById(selector); + if (existingStyle) + existingStyle.innerHTML !== css && (existingStyle.innerHTML = css); + else { + let style = document2.createElement("style"); + style.setAttribute("id", selector), style.innerHTML = css; + let gridStyleSelector = `addon-backgrounds-grid${storyId ? `-docs-${storyId}` : ""}`, existingGridStyle = document2.getElementById(gridStyleSelector); + existingGridStyle ? existingGridStyle.parentElement?.insertBefore(style, existingGridStyle) : document2.head.appendChild(style); + } +}; + +// src/backgrounds/decorator.ts +var defaultGrid = { + cellSize: 100, + cellAmount: 10, + opacity: 0.8 +}, BG_SELECTOR_BASE = "addon-backgrounds", GRID_SELECTOR_BASE = "addon-backgrounds-grid", transitionStyle = isReduceMotionEnabled() ? "" : "transition: background-color 0.3s;", withBackgroundAndGrid = (StoryFn, context) => { + let { globals = {}, parameters: parameters2 = {}, viewMode, id } = context, { + options = DEFAULT_BACKGROUNDS, + disable, + grid = defaultGrid + } = parameters2[PARAM_KEY2] || {}, data = globals[PARAM_KEY2] || {}, backgroundName = typeof data == "string" ? data : data?.value, item = backgroundName ? options[backgroundName] : void 0, value = typeof item == "string" ? item : item?.value || "transparent", showGrid = typeof data == "string" ? !1 : data.grid || !1, shownBackground = !!item && !disable, backgroundSelector = viewMode === "docs" ? `#anchor--${id} .docs-story, #anchor--primary--${id} .docs-story` : ".sb-show-main", gridSelector = viewMode === "docs" ? `#anchor--${id} .docs-story, #anchor--primary--${id} .docs-story` : ".sb-show-main", isLayoutPadded = parameters2.layout === void 0 || parameters2.layout === "padded", defaultOffset = viewMode === "docs" ? 20 : isLayoutPadded ? 16 : 0, { cellAmount, cellSize, opacity, offsetX = defaultOffset, offsetY = defaultOffset } = grid, backgroundSelectorId = viewMode === "docs" ? `${BG_SELECTOR_BASE}-docs-${id}` : `${BG_SELECTOR_BASE}-color`, backgroundTarget = viewMode === "docs" ? id : null; + useEffect(() => { + let backgroundStyles = ` + ${backgroundSelector} { + background: ${value} !important; + ${transitionStyle} + }`; + if (!shownBackground) { + clearStyles(backgroundSelectorId); + return; + } + addBackgroundStyle(backgroundSelectorId, backgroundStyles, backgroundTarget); + }, [backgroundSelector, backgroundSelectorId, backgroundTarget, shownBackground, value]); + let gridSelectorId = viewMode === "docs" ? `${GRID_SELECTOR_BASE}-docs-${id}` : `${GRID_SELECTOR_BASE}`; + return useEffect(() => { + if (!showGrid) { + clearStyles(gridSelectorId); + return; + } + let gridSize = [ + `${cellSize * cellAmount}px ${cellSize * cellAmount}px`, + `${cellSize * cellAmount}px ${cellSize * cellAmount}px`, + `${cellSize}px ${cellSize}px`, + `${cellSize}px ${cellSize}px` + ].join(", "), gridStyles = ` + ${gridSelector} { + background-size: ${gridSize} !important; + background-position: ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px !important; + background-blend-mode: difference !important; + background-image: linear-gradient(rgba(130, 130, 130, ${opacity}) 1px, transparent 1px), + linear-gradient(90deg, rgba(130, 130, 130, ${opacity}) 1px, transparent 1px), + linear-gradient(rgba(130, 130, 130, ${opacity / 2}) 1px, transparent 1px), + linear-gradient(90deg, rgba(130, 130, 130, ${opacity / 2}) 1px, transparent 1px) !important; + } + `; + addGridStyle(gridSelectorId, gridStyles); + }, [cellAmount, cellSize, gridSelector, gridSelectorId, showGrid, offsetX, offsetY, opacity]), StoryFn(); +}; + +// src/backgrounds/preview.ts +var decorators = globalThis.FEATURES?.backgrounds ? [withBackgroundAndGrid] : [], parameters = { + [PARAM_KEY2]: { + grid: { + cellSize: 20, + opacity: 0.5, + cellAmount: 5 + }, + disable: !1 + } +}, initialGlobals = { + [PARAM_KEY2]: { value: void 0, grid: !1 } +}, preview_default2 = () => definePreviewAddon2({ + decorators, + parameters, + initialGlobals +}); + +// src/component-testing/preview.ts +import { definePreviewAddon as definePreviewAddon3 } from "storybook/internal/csf"; +import { instrument } from "storybook/internal/instrumenter"; +var { step } = instrument( + { + // It seems like the label is unused, but the instrumenter has access to it + // The context will be bounded later in StoryRender, so that the user can write just: + // await step("label", (context) => { + // // labeled step + // }); + step: async (label, play, context) => play(context) + }, + { intercept: !0 } +), preview_default3 = () => definePreviewAddon3({ + parameters: { + throwPlayFunctionExceptions: !1 + }, + runStep: step +}); + +// src/core-server/utils/ghost-stories/test-annotations.ts +import { definePreviewAddon as definePreviewAddon4 } from "storybook/internal/csf"; +var isEmptyRender = (element) => { + let style = getComputedStyle(element), rect = element.getBoundingClientRect(); + return !(rect.width > 0 && rect.height > 0 && style.visibility !== "hidden" && Number(style.opacity) > 0 && style.display !== "none"); +}, afterEach = async ({ reporting, canvasElement, globals }) => { + try { + if (!globals.renderAnalysis?.enabled) + return; + let emptyRender = isEmptyRender(canvasElement.firstElementChild ?? canvasElement); + emptyRender && reporting.addReport({ + type: "render-analysis", + version: 1, + result: { + emptyRender + }, + status: "warning" + }); + } catch { + } +}, test_annotations_default = () => definePreviewAddon4({ afterEach }); + +// src/highlight/preview.ts +import { definePreviewAddon as definePreviewAddon5 } from "storybook/internal/csf"; +import { addons } from "storybook/preview-api"; + +// src/highlight/useHighlights.ts +import { STORY_RENDER_PHASE_CHANGED } from "storybook/internal/core-events"; + +// src/highlight/icons.ts +var iconPaths = { + chevronLeft: [ + "M9.10355 10.1464C9.29882 10.3417 9.29882 10.6583 9.10355 10.8536C8.90829 11.0488 8.59171 11.0488 8.39645 10.8536L4.89645 7.35355C4.70118 7.15829 4.70118 6.84171 4.89645 6.64645L8.39645 3.14645C8.59171 2.95118 8.90829 2.95118 9.10355 3.14645C9.29882 3.34171 9.29882 3.65829 9.10355 3.85355L5.95711 7L9.10355 10.1464Z" + ], + chevronRight: [ + "M4.89645 10.1464C4.70118 10.3417 4.70118 10.6583 4.89645 10.8536C5.09171 11.0488 5.40829 11.0488 5.60355 10.8536L9.10355 7.35355C9.29882 7.15829 9.29882 6.84171 9.10355 6.64645L5.60355 3.14645C5.40829 2.95118 5.09171 2.95118 4.89645 3.14645C4.70118 3.34171 4.70118 3.65829 4.89645 3.85355L8.04289 7L4.89645 10.1464Z" + ], + info: [ + "M7 5.5a.5.5 0 01.5.5v4a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zM7 4.5A.75.75 0 107 3a.75.75 0 000 1.5z", + "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z" + ], + shareAlt: [ + "M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z", + "M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z" + ] +}; + +// src/highlight/utils.ts +var svgElements = "svg,path,rect,circle,line,polyline,polygon,ellipse,text".split(","), createElement = (type, props = {}, children) => { + let element = svgElements.includes(type) ? document.createElementNS("http://www.w3.org/2000/svg", type) : document.createElement(type); + return Object.entries(props).forEach(([key, val]) => { + /[A-Z]/.test(key) ? (key === "onClick" && (element.addEventListener("click", val), element.addEventListener("keydown", (e) => { + (e.key === "Enter" || e.key === " ") && (e.preventDefault(), val()); + })), key === "onMouseEnter" && element.addEventListener("mouseenter", val), key === "onMouseLeave" && element.addEventListener("mouseleave", val)) : element.setAttribute(key, val); + }), children?.forEach((child) => { + if (!(child == null || child === !1)) + try { + element.appendChild(child); + } catch { + element.appendChild(document.createTextNode(String(child))); + } + }), element; +}, createIcon = (name) => iconPaths[name] && createElement( + "svg", + { width: "14", height: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg" }, + iconPaths[name].map( + (d) => createElement("path", { + fill: "currentColor", + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d + }) + ) +), normalizeOptions = (options) => { + if ("elements" in options) { + let { elements, color, style } = options; + return { + id: void 0, + priority: 0, + selectors: elements, + styles: { + outline: `2px ${style} ${color}`, + outlineOffset: "2px", + boxShadow: "0 0 0 6px rgba(255,255,255,0.6)" + }, + menu: void 0 + }; + } + let { menu, ...rest } = options; + return { + id: void 0, + priority: 0, + styles: { + outline: "2px dashed #029cfd" + }, + ...rest, + menu: Array.isArray(menu) ? menu.every(Array.isArray) ? menu : [menu] : void 0 + }; +}, isFunction = (obj) => obj instanceof Function, state = /* @__PURE__ */ new Map(), listeners = /* @__PURE__ */ new Map(), teardowns = /* @__PURE__ */ new Map(), useStore = (initialValue) => { + let key = /* @__PURE__ */ Symbol(); + return listeners.set(key, []), state.set(key, initialValue), { get: () => state.get(key), set: (update) => { + let current = state.get(key), next = isFunction(update) ? update(current) : update; + next !== current && (state.set(key, next), listeners.get(key)?.forEach((listener) => { + teardowns.get(listener)?.(), teardowns.set(listener, listener(next)); + })); + }, subscribe: (listener) => (listeners.get(key)?.push(listener), () => { + let list = listeners.get(key); + list && listeners.set( + key, + list.filter((l) => l !== listener) + ); + }), teardown: () => { + listeners.get(key)?.forEach((listener) => { + teardowns.get(listener)?.(), teardowns.delete(listener); + }), listeners.delete(key), state.delete(key); + } }; +}, mapElements = (highlights) => { + let root = document.getElementById("storybook-root"), map = /* @__PURE__ */ new Map(); + for (let highlight of highlights) { + let { priority = 0 } = highlight; + for (let selector of highlight.selectors) { + let elements = [ + ...document.querySelectorAll( + // Elements matching the selector, excluding storybook elements and their descendants. + // Necessary to find portaled elements (e.g. children of `body`). + `:is(${selector}):not([id^="storybook-"], [id^="storybook-"] *, [class^="sb-"], [class^="sb-"] *)` + ), + // Elements matching the selector inside the storybook root, as these were excluded above. + ...root?.querySelectorAll(selector) || [] + ]; + for (let element of elements) { + let existing = map.get(element); + (!existing || existing.priority <= priority) && map.set(element, { + ...highlight, + priority, + selectors: Array.from(new Set((existing?.selectors || []).concat(selector))) + }); + } + } + } + return map; +}, mapBoxes = (elements) => Array.from(elements.entries()).map(([element, { selectors, styles, hoverStyles, focusStyles, menu }]) => { + let { top, left, width, height } = element.getBoundingClientRect(), { position } = getComputedStyle(element); + return { + element, + selectors, + styles, + hoverStyles, + focusStyles, + menu, + top: position === "fixed" ? top : top + window.scrollY, + left: position === "fixed" ? left : left + window.scrollX, + width, + height + }; +}).sort((a, b) => b.width * b.height - a.width * a.height), isOverMenu = (menuElement, coordinates) => { + let menu = menuElement.getBoundingClientRect(), { x, y } = coordinates; + return menu?.top && menu?.left && x >= menu.left && x <= menu.left + menu.width && y >= menu.top && y <= menu.top + menu.height; +}, isTargeted = (box, boxElement, coordinates) => { + if (!boxElement || !coordinates) + return !1; + let { left, top, width, height } = box; + height < MIN_TOUCH_AREA_SIZE && (top = top - Math.round((MIN_TOUCH_AREA_SIZE - height) / 2), height = MIN_TOUCH_AREA_SIZE), width < MIN_TOUCH_AREA_SIZE && (left = left - Math.round((MIN_TOUCH_AREA_SIZE - width) / 2), width = MIN_TOUCH_AREA_SIZE), boxElement.style.position === "fixed" && (left += window.scrollX, top += window.scrollY); + let { x, y } = coordinates; + return x >= left && x <= left + width && y >= top && y <= top + height; +}, keepInViewport = (element, targetCoordinates, options = {}) => { + let { x, y } = targetCoordinates, { margin = 5, topOffset = 0, centered = !1 } = options, { scrollX, scrollY, innerHeight: windowHeight, innerWidth: windowWidth } = window, top = Math.min( + element.style.position === "fixed" ? y - scrollY : y, + windowHeight - element.clientHeight - margin - topOffset + scrollY + ), leftOffset = centered ? element.clientWidth / 2 : 0, left = element.style.position === "fixed" ? Math.max(Math.min(x - scrollX, windowWidth - leftOffset - margin), leftOffset + margin) : Math.max( + Math.min(x, windowWidth - leftOffset - margin + scrollX), + leftOffset + margin + scrollX + ); + Object.assign(element.style, { + ...left !== x && { left: `${left}px` }, + ...top !== y && { top: `${top}px` } + }); +}, showPopover = (element) => { + window.HTMLElement.prototype.hasOwnProperty("showPopover") && element.showPopover(); +}, hidePopover = (element) => { + window.HTMLElement.prototype.hasOwnProperty("showPopover") && element.hidePopover(); +}, getEventDetails = (target) => ({ + top: target.top, + left: target.left, + width: target.width, + height: target.height, + selectors: target.selectors, + element: { + attributes: Object.fromEntries( + Array.from(target.element.attributes).map((attr) => [attr.name, attr.value]) + ), + localName: target.element.localName, + tagName: target.element.tagName, + outerHTML: target.element.outerHTML + } +}); + +// src/highlight/useHighlights.ts +var menuId = "storybook-highlights-menu", rootId = "storybook-highlights-root", storybookRootId = "storybook-root", useHighlights = (channel) => { + if (globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED) + return; + globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED = !0; + let { document: document3 } = globalThis, highlights = useStore([]), elements = useStore(/* @__PURE__ */ new Map()), boxes = useStore([]), clickCoords = useStore(), hoverCoords = useStore(), targets = useStore([]), hovered = useStore([]), focused = useStore(), selected = useStore(), root = document3.getElementById(rootId); + highlights.subscribe(() => { + root || (root = createElement("div", { id: rootId }), document3.body.appendChild(root)); + }), highlights.subscribe((value) => { + let storybookRoot = document3.getElementById(storybookRootId); + if (!storybookRoot) + return; + elements.set(mapElements(value)); + let observer = new MutationObserver(() => elements.set(mapElements(value))); + return observer.observe(storybookRoot, { subtree: !0, childList: !0 }), () => { + observer.disconnect(); + }; + }), elements.subscribe((value) => { + let updateBoxes = () => requestAnimationFrame(() => boxes.set(mapBoxes(value))), observer = new ResizeObserver(updateBoxes); + observer.observe(document3.body), Array.from(value.keys()).forEach((element) => observer.observe(element)); + let scrollers = Array.from(document3.body.querySelectorAll("*")).filter((el) => { + let { overflow, overflowX, overflowY } = window.getComputedStyle(el); + return ["auto", "scroll"].some((o) => [overflow, overflowX, overflowY].includes(o)); + }); + return scrollers.forEach((element) => element.addEventListener("scroll", updateBoxes)), () => { + observer.disconnect(), scrollers.forEach((element) => element.removeEventListener("scroll", updateBoxes)); + }; + }), elements.subscribe((value) => { + let sticky = Array.from(value.keys()).filter(({ style }) => style.position === "sticky"), updateBoxes = () => requestAnimationFrame(() => { + boxes.set( + (current) => current.map((box) => { + if (sticky.includes(box.element)) { + let { top, left } = box.element.getBoundingClientRect(); + return { ...box, top: top + window.scrollY, left: left + window.scrollX }; + } + return box; + }) + ); + }); + return document3.addEventListener("scroll", updateBoxes), () => document3.removeEventListener("scroll", updateBoxes); + }), elements.subscribe((value) => { + targets.set((t) => t.filter(({ element }) => value.has(element))); + }), targets.subscribe((value) => { + value.length ? (selected.set((s) => value.some((t) => t.element === s?.element) ? s : void 0), focused.set((s) => value.some((t) => t.element === s?.element) ? s : void 0)) : (selected.set(void 0), focused.set(void 0), clickCoords.set(void 0)); + }); + let styleElementByHighlight = new Map(/* @__PURE__ */ new Map()); + highlights.subscribe((value) => { + value.forEach(({ keyframes }) => { + if (keyframes) { + let style = styleElementByHighlight.get(keyframes); + style || (style = document3.createElement("style"), style.setAttribute("data-highlight", "keyframes"), styleElementByHighlight.set(keyframes, style), document3.head.appendChild(style)), style.innerHTML = keyframes; + } + }), styleElementByHighlight.forEach((style, keyframes) => { + value.some((v) => v.keyframes === keyframes) || (style.remove(), styleElementByHighlight.delete(keyframes)); + }); + }); + let boxElementByTargetElement = new Map(/* @__PURE__ */ new Map()); + boxes.subscribe((value) => { + value.forEach((box) => { + let boxElement = boxElementByTargetElement.get(box.element); + if (root && !boxElement) { + let props = { + popover: "manual", + "data-highlight-dimensions": `w${box.width.toFixed(0)}h${box.height.toFixed(0)}`, + "data-highlight-coordinates": `x${box.left.toFixed(0)}y${box.top.toFixed(0)}` + }; + boxElement = root.appendChild( + createElement("div", props, [createElement("div")]) + ), boxElementByTargetElement.set(box.element, boxElement); + } + }), boxElementByTargetElement.forEach((box, element) => { + value.some(({ element: e }) => e === element) || (box.remove(), boxElementByTargetElement.delete(element)); + }); + }), boxes.subscribe((value) => { + let targetable = value.filter((box) => box.menu); + if (!targetable.length) + return; + let onClick = (event) => { + requestAnimationFrame(() => { + let menu = document3.getElementById(menuId), coords = { x: event.pageX, y: event.pageY }; + if (menu && !isOverMenu(menu, coords)) { + let results = targetable.filter((box) => { + let boxElement = boxElementByTargetElement.get(box.element); + return isTargeted(box, boxElement, coords); + }); + clickCoords.set(results.length ? coords : void 0), targets.set(results); + } + }); + }; + return document3.addEventListener("click", onClick), () => document3.removeEventListener("click", onClick); + }); + let updateHovered = () => { + let menu = document3.getElementById(menuId), coords = hoverCoords.get(); + !coords || menu && isOverMenu(menu, coords) || hovered.set((current) => { + let update = boxes.get().filter((box) => { + let boxElement = boxElementByTargetElement.get(box.element); + return isTargeted(box, boxElement, coords); + }), existing = current.filter((box) => update.includes(box)), additions = update.filter((box) => !current.includes(box)), hasRemovals = current.length - existing.length; + return additions.length || hasRemovals ? [...existing, ...additions] : current; + }); + }; + hoverCoords.subscribe(updateHovered), boxes.subscribe(updateHovered); + let updateBoxStyles = () => { + let selectedElement = selected.get(), targetElements = selectedElement ? [selectedElement] : targets.get(), focusedElement = targetElements.length === 1 ? targetElements[0] : focused.get(), isMenuOpen = clickCoords.get() !== void 0; + boxes.get().forEach((box) => { + let boxElement = boxElementByTargetElement.get(box.element); + if (boxElement) { + let isFocused = focusedElement === box, isHovered = isMenuOpen ? focusedElement ? isFocused : targetElements.includes(box) : hovered.get()?.includes(box); + Object.assign(boxElement.style, { + animation: "none", + background: "transparent", + border: "none", + boxSizing: "border-box", + outline: "none", + outlineOffset: "0px", + ...box.styles, + ...isHovered ? box.hoverStyles : {}, + ...isFocused ? box.focusStyles : {}, + position: getComputedStyle(box.element).position === "fixed" ? "fixed" : "absolute", + zIndex: MAX_Z_INDEX - 10, + top: `${box.top}px`, + left: `${box.left}px`, + width: `${box.width}px`, + height: `${box.height}px`, + margin: 0, + padding: 0, + cursor: box.menu && isHovered ? "pointer" : "default", + pointerEvents: box.menu ? "auto" : "none", + display: "flex", + alignItems: "center", + justifyContent: "center", + overflow: "visible" + }), Object.assign(boxElement.children[0].style, { + width: "100%", + height: "100%", + minHeight: `${MIN_TOUCH_AREA_SIZE}px`, + minWidth: `${MIN_TOUCH_AREA_SIZE}px`, + boxSizing: "content-box", + padding: boxElement.style.outlineWidth || "0px" + }), showPopover(boxElement); + } + }); + }; + boxes.subscribe(updateBoxStyles), targets.subscribe(updateBoxStyles), hovered.subscribe(updateBoxStyles), focused.subscribe(updateBoxStyles), selected.subscribe(updateBoxStyles); + let renderMenu = () => { + if (!root) + return; + let menu = document3.getElementById(menuId); + if (menu) + menu.innerHTML = ""; + else { + let props = { id: menuId, popover: "manual" }; + menu = root.appendChild(createElement("div", props)), root.appendChild( + createElement("style", {}, [ + ` + #${menuId} { + position: absolute; + z-index: ${MAX_Z_INDEX}; + width: 300px; + padding: 0px; + margin: 15px 0 0 0; + transform: translateX(-50%); + font-family: "Nunito Sans", -apple-system, ".SFNSText-Regular", "San Francisco", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + background: white; + border: none; + border-radius: 6px; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.05), 0 5px 15px 0 rgba(0, 0, 0, 0.1); + color: #2E3438; + } + #${menuId} ul { + list-style: none; + margin: 0; + padding: 0; + } + #${menuId} > ul { + max-height: 300px; + overflow-y: auto; + padding: 4px 0; + } + #${menuId} li { + padding: 0 4px; + margin: 0; + } + #${menuId} li > :not(ul) { + display: flex; + padding: 8px; + margin: 0; + align-items: center; + gap: 8px; + border-radius: 4px; + } + #${menuId} button { + width: 100%; + border: 0; + background: transparent; + color: inherit; + text-align: left; + font-family: inherit; + font-size: inherit; + } + #${menuId} button:focus-visible { + outline-color: #029CFD; + } + #${menuId} button:hover { + background: rgba(2, 156, 253, 0.07); + color: #029CFD; + cursor: pointer; + } + #${menuId} li code { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + line-height: 16px; + font-size: 11px; + } + #${menuId} li svg { + flex-shrink: 0; + margin: 1px; + color: #73828C; + } + #${menuId} li > button:hover svg, #${menuId} li > button:focus-visible svg { + color: #029CFD; + } + #${menuId} .element-list li svg { + display: none; + } + #${menuId} li.selectable svg, #${menuId} li.selected svg { + display: block; + } + #${menuId} .menu-list { + border-top: 1px solid rgba(38, 85, 115, 0.15); + } + #${menuId} .menu-list > li:not(:last-child) { + padding-bottom: 4px; + margin-bottom: 4px; + border-bottom: 1px solid rgba(38, 85, 115, 0.15); + } + #${menuId} .menu-items, #${menuId} .menu-items li { + padding: 0; + } + #${menuId} .menu-item { + display: flex; + } + #${menuId} .menu-item-content { + display: flex; + flex-direction: column; + flex-grow: 1; + } + ` + ]) + ); + } + let selectedElement = selected.get(), elementList = selectedElement ? [selectedElement] : targets.get(); + if (elementList.length && (menu.style.position = getComputedStyle(elementList[0].element).position === "fixed" ? "fixed" : "absolute", menu.appendChild( + createElement( + "ul", + { class: "element-list" }, + elementList.map((target) => { + let selectable = elementList.length > 1 && !!target.menu?.some( + (group) => group.some( + (item) => !item.selectors || item.selectors.some((s) => target.selectors.includes(s)) + ) + ), props = selectable ? { + class: "selectable", + onClick: () => selected.set(target), + onMouseEnter: () => focused.set(target), + onMouseLeave: () => focused.set(void 0) + } : selectedElement ? { class: "selected", onClick: () => selected.set(void 0) } : {}, asButton = selectable || selectedElement; + return createElement("li", props, [ + createElement(asButton ? "button" : "div", asButton ? { type: "button" } : {}, [ + selectedElement ? createIcon("chevronLeft") : null, + createElement("code", {}, [target.element.outerHTML]), + selectable ? createIcon("chevronRight") : null + ]) + ]); + }) + ) + )), selected.get() || targets.get().length === 1) { + let target = selected.get() || targets.get()[0], menuGroups = target.menu?.filter( + (group) => group.some( + (item) => !item.selectors || item.selectors.some((s) => target.selectors.includes(s)) + ) + ); + menuGroups?.length && menu.appendChild( + createElement( + "ul", + { class: "menu-list" }, + menuGroups.map( + (menuItems) => createElement("li", {}, [ + createElement( + "ul", + { class: "menu-items" }, + menuItems.map( + ({ id, title, description, iconLeft, iconRight, clickEvent: event }) => { + let onClick = event && (() => channel.emit(event, id, getEventDetails(target))); + return createElement("li", {}, [ + createElement( + onClick ? "button" : "div", + onClick ? { class: "menu-item", type: "button", onClick } : { class: "menu-item" }, + [ + iconLeft ? createIcon(iconLeft) : null, + createElement("div", { class: "menu-item-content" }, [ + createElement(description ? "strong" : "span", {}, [title]), + description && createElement("span", {}, [description]) + ]), + iconRight ? createIcon(iconRight) : null + ] + ) + ]); + } + ) + ) + ]) + ) + ) + ); + } + let coords = clickCoords.get(); + coords ? (Object.assign(menu.style, { + display: "block", + left: `${menu.style.position === "fixed" ? coords.x - window.scrollX : coords.x}px`, + top: `${menu.style.position === "fixed" ? coords.y - window.scrollY : coords.y}px` + }), showPopover(menu), requestAnimationFrame(() => keepInViewport(menu, coords, { topOffset: 15, centered: !0 }))) : (hidePopover(menu), Object.assign(menu.style, { display: "none" })); + }; + targets.subscribe(renderMenu), selected.subscribe(renderMenu); + let addHighlight = (highlight) => { + let info = normalizeOptions(highlight); + highlights.set((value) => { + let others = info.id ? value.filter((h) => h.id !== info.id) : value; + return info.selectors?.length ? [...others, info] : others; + }); + }, removeHighlight = (id) => { + id && highlights.set((value) => value.filter((h) => h.id !== id)); + }, resetState = () => { + highlights.set([]), elements.set(/* @__PURE__ */ new Map()), boxes.set([]), clickCoords.set(void 0), hoverCoords.set(void 0), targets.set([]), hovered.set([]), focused.set(void 0), selected.set(void 0); + }, removeTimeout, scrollIntoView = (target, options) => { + let id = "scrollIntoView-highlight"; + clearTimeout(removeTimeout), removeHighlight(id); + let element = document3.querySelector(target); + if (!element) { + console.warn(`Cannot scroll into view: ${target} not found`); + return; + } + element.scrollIntoView({ behavior: "smooth", block: "center", ...options }); + let keyframeName = `kf-${Math.random().toString(36).substring(2, 15)}`; + highlights.set((value) => [ + ...value, + { + id, + priority: 1e3, + selectors: [target], + styles: { + outline: "2px solid #1EA7FD", + outlineOffset: "-1px", + animation: `${keyframeName} 3s linear forwards` + }, + keyframes: `@keyframes ${keyframeName} { + 0% { outline: 2px solid #1EA7FD; } + 20% { outline: 2px solid #1EA7FD00; } + 40% { outline: 2px solid #1EA7FD; } + 60% { outline: 2px solid #1EA7FD00; } + 80% { outline: 2px solid #1EA7FD; } + 100% { outline: 2px solid #1EA7FD00; } + }` + } + ]), removeTimeout = setTimeout(() => removeHighlight(id), 3500); + }, onMouseMove = (event) => { + requestAnimationFrame(() => hoverCoords.set({ x: event.pageX, y: event.pageY })); + }; + document3.body.addEventListener("mousemove", onMouseMove), channel.on(HIGHLIGHT, addHighlight), channel.on(REMOVE_HIGHLIGHT, removeHighlight), channel.on(RESET_HIGHLIGHT, resetState), channel.on(SCROLL_INTO_VIEW, scrollIntoView), channel.on(STORY_RENDER_PHASE_CHANGED, ({ newPhase }) => { + newPhase === "loading" && resetState(); + }); +}; + +// src/highlight/preview.ts +globalThis?.FEATURES?.highlight && addons?.ready && addons.ready().then(useHighlights); +var preview_default4 = () => definePreviewAddon5({}); + +// src/measure/preview.ts +import { definePreviewAddon as definePreviewAddon6 } from "storybook/internal/csf"; + +// src/measure/withMeasure.ts +import { useEffect as useEffect2 } from "storybook/preview-api"; + +// src/measure/box-model/canvas.ts +import { global } from "@storybook/global"; +function getDocumentWidthAndHeight() { + let container = global.document.documentElement, height = Math.max(container.scrollHeight, container.offsetHeight); + return { width: Math.max(container.scrollWidth, container.offsetWidth), height }; +} +function createCanvas() { + let canvas = global.document.createElement("canvas"); + canvas.id = "storybook-addon-measure"; + let context = canvas.getContext("2d"); + invariant(context != null); + let { width, height } = getDocumentWidthAndHeight(); + return setCanvasWidthAndHeight(canvas, context, { width, height }), canvas.style.position = "absolute", canvas.style.left = "0", canvas.style.top = "0", canvas.style.zIndex = "2147483647", canvas.style.pointerEvents = "none", global.document.body.appendChild(canvas), { canvas, context, width, height }; +} +function setCanvasWidthAndHeight(canvas, context, { width, height }) { + canvas.style.width = `${width}px`, canvas.style.height = `${height}px`; + let scale = global.window.devicePixelRatio; + canvas.width = Math.floor(width * scale), canvas.height = Math.floor(height * scale), context.scale(scale, scale); +} +var state2 = {}; +function init() { + state2.canvas || (state2 = createCanvas()); +} +function clear() { + state2.context && state2.context.clearRect(0, 0, state2.width ?? 0, state2.height ?? 0); +} +function draw(callback) { + clear(), callback(state2.context); +} +function rescale() { + invariant(state2.canvas, "Canvas should exist in the state."), invariant(state2.context, "Context should exist in the state."), setCanvasWidthAndHeight(state2.canvas, state2.context, { width: 0, height: 0 }); + let { width, height } = getDocumentWidthAndHeight(); + setCanvasWidthAndHeight(state2.canvas, state2.context, { width, height }), state2.width = width, state2.height = height; +} +function destroy() { + state2.canvas && (clear(), state2.canvas.parentNode?.removeChild(state2.canvas), state2 = {}); +} + +// src/measure/box-model/visualizer.ts +import { global as global2 } from "@storybook/global"; + +// src/measure/box-model/labels.ts +var colors = { + margin: "#f6b26b", + border: "#ffe599", + padding: "#93c47d", + content: "#6fa8dc", + text: "#232020" +}, labelPadding = 6; +function roundedRect(context, { x, y, w, h, r }) { + x = x - w / 2, y = y - h / 2, w < 2 * r && (r = w / 2), h < 2 * r && (r = h / 2), context.beginPath(), context.moveTo(x + r, y), context.arcTo(x + w, y, x + w, y + h, r), context.arcTo(x + w, y + h, x, y + h, r), context.arcTo(x, y + h, x, y, r), context.arcTo(x, y, x + w, y, r), context.closePath(); +} +function positionCoordinate(position, { padding, border, width, height, top, left }) { + let contentWidth = width - border.left - border.right - padding.left - padding.right, contentHeight = height - padding.top - padding.bottom - border.top - border.bottom, x = left + border.left + padding.left, y = top + border.top + padding.top; + return position === "top" ? x += contentWidth / 2 : position === "right" ? (x += contentWidth, y += contentHeight / 2) : position === "bottom" ? (x += contentWidth / 2, y += contentHeight) : position === "left" ? y += contentHeight / 2 : position === "center" && (x += contentWidth / 2, y += contentHeight / 2), { x, y }; +} +function offset(type, position, { margin, border, padding }, labelPaddingSize, external) { + let shift = (dir) => 0, offsetX = 0, offsetY = 0, locationMultiplier = external ? 1 : 0.5, labelPaddingShift = external ? labelPaddingSize * 2 : 0; + return type === "padding" ? shift = (dir) => padding[dir] * locationMultiplier + labelPaddingShift : type === "border" ? shift = (dir) => padding[dir] + border[dir] * locationMultiplier + labelPaddingShift : type === "margin" && (shift = (dir) => padding[dir] + border[dir] + margin[dir] * locationMultiplier + labelPaddingShift), position === "top" ? offsetY = -shift("top") : position === "right" ? offsetX = shift("right") : position === "bottom" ? offsetY = shift("bottom") : position === "left" && (offsetX = -shift("left")), { offsetX, offsetY }; +} +function collide(a, b) { + return Math.abs(a.x - b.x) < Math.abs(a.w + b.w) / 2 && Math.abs(a.y - b.y) < Math.abs(a.h + b.h) / 2; +} +function overlapAdjustment(position, currentRect, prevRect) { + return position === "top" ? currentRect.y = prevRect.y - prevRect.h - labelPadding : position === "right" ? currentRect.x = prevRect.x + prevRect.w / 2 + labelPadding + currentRect.w / 2 : position === "bottom" ? currentRect.y = prevRect.y + prevRect.h + labelPadding : position === "left" && (currentRect.x = prevRect.x - prevRect.w / 2 - labelPadding - currentRect.w / 2), { x: currentRect.x, y: currentRect.y }; +} +function textWithRect(context, type, { x, y, w, h }, text) { + return roundedRect(context, { x, y, w, h, r: 3 }), context.fillStyle = `${colors[type]}dd`, context.fill(), context.strokeStyle = colors[type], context.stroke(), context.fillStyle = colors.text, context.fillText(text, x, y), roundedRect(context, { x, y, w, h, r: 3 }), context.fillStyle = `${colors[type]}dd`, context.fill(), context.strokeStyle = colors[type], context.stroke(), context.fillStyle = colors.text, context.fillText(text, x, y), { x, y, w, h }; +} +function configureText(context, text) { + context.font = "600 12px monospace", context.textBaseline = "middle", context.textAlign = "center"; + let metrics = context.measureText(text), actualHeight = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent, w = metrics.width + labelPadding * 2, h = actualHeight + labelPadding * 2; + return { w, h }; +} +function drawLabel(context, measurements, { type, position = "center", text }, prevRect, external = !1) { + let { x, y } = positionCoordinate(position, measurements), { offsetX, offsetY } = offset(type, position, measurements, labelPadding + 1, external); + x += offsetX, y += offsetY; + let { w, h } = configureText(context, text); + if (prevRect && collide({ x, y, w, h }, prevRect)) { + let adjusted = overlapAdjustment(position, { x, y, w, h }, prevRect); + x = adjusted.x, y = adjusted.y; + } + return textWithRect(context, type, { x, y, w, h }, text); +} +function floatingOffset(alignment, { w, h }) { + let deltaW = w * 0.5 + labelPadding, deltaH = h * 0.5 + labelPadding; + return { + offsetX: (alignment.x === "left" ? -1 : 1) * deltaW, + offsetY: (alignment.y === "top" ? -1 : 1) * deltaH + }; +} +function drawFloatingLabel(context, measurements, { type, text }) { + let { floatingAlignment: floatingAlignment2, extremities } = measurements, x = extremities[floatingAlignment2.x], y = extremities[floatingAlignment2.y], { w, h } = configureText(context, text), { offsetX, offsetY } = floatingOffset(floatingAlignment2, { + w, + h + }); + return x += offsetX, y += offsetY, textWithRect(context, type, { x, y, w, h }, text); +} +function drawStack(context, measurements, stack, external) { + let rects = []; + stack.forEach((l, idx) => { + let rect = external && l.position === "center" ? drawFloatingLabel(context, measurements, l) : drawLabel(context, measurements, l, rects[idx - 1], external); + rects[idx] = rect; + }); +} +function labelStacks(context, measurements, labels, externalLabels) { + let stacks = labels.reduce((acc, l) => (Object.prototype.hasOwnProperty.call(acc, l.position) || (acc[l.position] = []), acc[l.position]?.push(l), acc), {}); + stacks.top && drawStack(context, measurements, stacks.top, externalLabels), stacks.right && drawStack(context, measurements, stacks.right, externalLabels), stacks.bottom && drawStack(context, measurements, stacks.bottom, externalLabels), stacks.left && drawStack(context, measurements, stacks.left, externalLabels), stacks.center && drawStack(context, measurements, stacks.center, externalLabels); +} + +// src/measure/box-model/visualizer.ts +var colors2 = { + margin: "#f6b26ba8", + border: "#ffe599a8", + padding: "#93c47d8c", + content: "#6fa8dca8" +}, SMALL_NODE_SIZE = 30; +function pxToNumber(px) { + return parseInt(px.replace("px", ""), 10); +} +function round(value) { + return Number.isInteger(value) ? value : value.toFixed(2); +} +function filterZeroValues(labels) { + return labels.filter((l) => l.text !== 0 && l.text !== "0"); +} +function floatingAlignment(extremities) { + let windowExtremities = { + top: global2.window.scrollY, + bottom: global2.window.scrollY + global2.window.innerHeight, + left: global2.window.scrollX, + right: global2.window.scrollX + global2.window.innerWidth + }, distances = { + top: Math.abs(windowExtremities.top - extremities.top), + bottom: Math.abs(windowExtremities.bottom - extremities.bottom), + left: Math.abs(windowExtremities.left - extremities.left), + right: Math.abs(windowExtremities.right - extremities.right) + }; + return { + x: distances.left > distances.right ? "left" : "right", + y: distances.top > distances.bottom ? "top" : "bottom" + }; +} +function measureElement(element) { + let style = global2.getComputedStyle(element), { top, left, right, bottom, width, height } = element.getBoundingClientRect(), { + marginTop, + marginBottom, + marginLeft, + marginRight, + paddingTop, + paddingBottom, + paddingLeft, + paddingRight, + borderBottomWidth, + borderTopWidth, + borderLeftWidth, + borderRightWidth + } = style; + top = top + global2.window.scrollY, left = left + global2.window.scrollX, bottom = bottom + global2.window.scrollY, right = right + global2.window.scrollX; + let margin = { + top: pxToNumber(marginTop), + bottom: pxToNumber(marginBottom), + left: pxToNumber(marginLeft), + right: pxToNumber(marginRight) + }, padding = { + top: pxToNumber(paddingTop), + bottom: pxToNumber(paddingBottom), + left: pxToNumber(paddingLeft), + right: pxToNumber(paddingRight) + }, border = { + top: pxToNumber(borderTopWidth), + bottom: pxToNumber(borderBottomWidth), + left: pxToNumber(borderLeftWidth), + right: pxToNumber(borderRightWidth) + }, extremities = { + top: top - margin.top, + bottom: bottom + margin.bottom, + left: left - margin.left, + right: right + margin.right + }; + return { + margin, + padding, + border, + top, + left, + bottom, + right, + width, + height, + extremities, + floatingAlignment: floatingAlignment(extremities) + }; +} +function drawMargin(context, { margin, width, height, top, left, bottom, right }) { + let marginHeight = height + margin.bottom + margin.top; + context.fillStyle = colors2.margin, context.fillRect(left, top - margin.top, width, margin.top), context.fillRect(right, top - margin.top, margin.right, marginHeight), context.fillRect(left, bottom, width, margin.bottom), context.fillRect(left - margin.left, top - margin.top, margin.left, marginHeight); + let marginLabels = [ + { + type: "margin", + text: round(margin.top), + position: "top" + }, + { + type: "margin", + text: round(margin.right), + position: "right" + }, + { + type: "margin", + text: round(margin.bottom), + position: "bottom" + }, + { + type: "margin", + text: round(margin.left), + position: "left" + } + ]; + return filterZeroValues(marginLabels); +} +function drawPadding(context, { padding, border, width, height, top, left, bottom, right }) { + let paddingWidth = width - border.left - border.right, paddingHeight = height - padding.top - padding.bottom - border.top - border.bottom; + context.fillStyle = colors2.padding, context.fillRect(left + border.left, top + border.top, paddingWidth, padding.top), context.fillRect( + right - padding.right - border.right, + top + padding.top + border.top, + padding.right, + paddingHeight + ), context.fillRect( + left + border.left, + bottom - padding.bottom - border.bottom, + paddingWidth, + padding.bottom + ), context.fillRect(left + border.left, top + padding.top + border.top, padding.left, paddingHeight); + let paddingLabels = [ + { + type: "padding", + text: padding.top, + position: "top" + }, + { + type: "padding", + text: padding.right, + position: "right" + }, + { + type: "padding", + text: padding.bottom, + position: "bottom" + }, + { + type: "padding", + text: padding.left, + position: "left" + } + ]; + return filterZeroValues(paddingLabels); +} +function drawBorder(context, { border, width, height, top, left, bottom, right }) { + let borderHeight = height - border.top - border.bottom; + context.fillStyle = colors2.border, context.fillRect(left, top, width, border.top), context.fillRect(left, bottom - border.bottom, width, border.bottom), context.fillRect(left, top + border.top, border.left, borderHeight), context.fillRect(right - border.right, top + border.top, border.right, borderHeight); + let borderLabels = [ + { + type: "border", + text: border.top, + position: "top" + }, + { + type: "border", + text: border.right, + position: "right" + }, + { + type: "border", + text: border.bottom, + position: "bottom" + }, + { + type: "border", + text: border.left, + position: "left" + } + ]; + return filterZeroValues(borderLabels); +} +function drawContent(context, { padding, border, width, height, top, left }) { + let contentWidth = width - border.left - border.right - padding.left - padding.right, contentHeight = height - padding.top - padding.bottom - border.top - border.bottom; + return context.fillStyle = colors2.content, context.fillRect( + left + border.left + padding.left, + top + border.top + padding.top, + contentWidth, + contentHeight + ), [ + { + type: "content", + position: "center", + text: `${round(contentWidth)} x ${round(contentHeight)}` + } + ]; +} +function drawBoxModel(element) { + return (context) => { + if (element && context) { + let measurements = measureElement(element), marginLabels = drawMargin(context, measurements), paddingLabels = drawPadding(context, measurements), borderLabels = drawBorder(context, measurements), contentLabels = drawContent(context, measurements), externalLabels = measurements.width <= SMALL_NODE_SIZE * 3 || measurements.height <= SMALL_NODE_SIZE; + labelStacks( + context, + measurements, + [...contentLabels, ...paddingLabels, ...borderLabels, ...marginLabels], + externalLabels + ); + } + }; +} +function drawSelectedElement(element) { + draw(drawBoxModel(element)); +} + +// src/measure/util.ts +import { global as global3 } from "@storybook/global"; +var deepElementFromPoint = (x, y) => { + let element = global3.document.elementFromPoint(x, y), crawlShadows = (node) => { + if (node && node.shadowRoot) { + let nestedElement = node.shadowRoot.elementFromPoint(x, y); + return node.isEqualNode(nestedElement) ? node : nestedElement.shadowRoot ? crawlShadows(nestedElement) : nestedElement; + } + return node; + }; + return crawlShadows(element) || element; +}; + +// src/measure/withMeasure.ts +var nodeAtPointerRef, pointer = { x: 0, y: 0 }; +function findAndDrawElement(x, y) { + nodeAtPointerRef = deepElementFromPoint(x, y), drawSelectedElement(nodeAtPointerRef); +} +var withMeasure = (StoryFn, context) => { + let { measureEnabled } = context.globals || {}, measureActive = measureEnabled && !context.parameters?.measure?.disable; + return useEffect2(() => { + if (typeof globalThis.document > "u") + return; + let onPointerMove = (event) => { + window.requestAnimationFrame(() => { + event.stopPropagation(), pointer.x = event.clientX, pointer.y = event.clientY; + }); + }; + return globalThis.document.addEventListener("pointermove", onPointerMove), () => { + globalThis.document.removeEventListener("pointermove", onPointerMove); + }; + }, []), useEffect2(() => { + let onPointerOver = (event) => { + window.requestAnimationFrame(() => { + event.stopPropagation(), findAndDrawElement(event.clientX, event.clientY); + }); + }, onResize = () => { + window.requestAnimationFrame(() => { + rescale(); + }); + }; + return context.viewMode === "story" && measureActive && (globalThis.document.addEventListener("pointerover", onPointerOver), init(), globalThis.window.addEventListener("resize", onResize), findAndDrawElement(pointer.x, pointer.y)), () => { + globalThis.window.removeEventListener("resize", onResize), destroy(); + }; + }, [measureActive, context.viewMode]), StoryFn(); +}; + +// src/measure/preview.ts +var decorators2 = globalThis.FEATURES?.measure ? [withMeasure] : [], initialGlobals2 = { + [PARAM_KEY3]: !1 +}, preview_default5 = () => definePreviewAddon6({ + decorators: decorators2, + initialGlobals: initialGlobals2 +}); + +// src/outline/preview.ts +import { definePreviewAddon as definePreviewAddon7 } from "storybook/internal/csf"; + +// src/outline/withOutline.ts +import { useEffect as useEffect3, useMemo } from "storybook/preview-api"; + +// src/outline/helpers.ts +import { global as global4 } from "@storybook/global"; +var clearStyles2 = (selector) => { + (Array.isArray(selector) ? selector : [selector]).forEach(clearStyle2); +}, clearStyle2 = (input) => { + let selector = typeof input == "string" ? input : input.join(""), element = global4.document.getElementById(selector); + element && element.parentElement && element.parentElement.removeChild(element); +}, addOutlineStyles = (selector, css) => { + let existingStyle = global4.document.getElementById(selector); + if (existingStyle) + existingStyle.innerHTML !== css && (existingStyle.innerHTML = css); + else { + let style = global4.document.createElement("style"); + style.setAttribute("id", selector), style.innerHTML = css, global4.document.head.appendChild(style); + } +}; + +// src/outline/outlineCSS.ts +function outlineCSS(selector) { + return dedent` + ${selector} body { + outline: 1px solid #2980b9 !important; + } + + ${selector} article { + outline: 1px solid #3498db !important; + } + + ${selector} nav { + outline: 1px solid #0088c3 !important; + } + + ${selector} aside { + outline: 1px solid #33a0ce !important; + } + + ${selector} section { + outline: 1px solid #66b8da !important; + } + + ${selector} header { + outline: 1px solid #99cfe7 !important; + } + + ${selector} footer { + outline: 1px solid #cce7f3 !important; + } + + ${selector} h1 { + outline: 1px solid #162544 !important; + } + + ${selector} h2 { + outline: 1px solid #314e6e !important; + } + + ${selector} h3 { + outline: 1px solid #3e5e85 !important; + } + + ${selector} h4 { + outline: 1px solid #449baf !important; + } + + ${selector} h5 { + outline: 1px solid #c7d1cb !important; + } + + ${selector} h6 { + outline: 1px solid #4371d0 !important; + } + + ${selector} main { + outline: 1px solid #2f4f90 !important; + } + + ${selector} address { + outline: 1px solid #1a2c51 !important; + } + + ${selector} div { + outline: 1px solid #036cdb !important; + } + + ${selector} p { + outline: 1px solid #ac050b !important; + } + + ${selector} hr { + outline: 1px solid #ff063f !important; + } + + ${selector} pre { + outline: 1px solid #850440 !important; + } + + ${selector} blockquote { + outline: 1px solid #f1b8e7 !important; + } + + ${selector} ol { + outline: 1px solid #ff050c !important; + } + + ${selector} ul { + outline: 1px solid #d90416 !important; + } + + ${selector} li { + outline: 1px solid #d90416 !important; + } + + ${selector} dl { + outline: 1px solid #fd3427 !important; + } + + ${selector} dt { + outline: 1px solid #ff0043 !important; + } + + ${selector} dd { + outline: 1px solid #e80174 !important; + } + + ${selector} figure { + outline: 1px solid #ff00bb !important; + } + + ${selector} figcaption { + outline: 1px solid #bf0032 !important; + } + + ${selector} table { + outline: 1px solid #00cc99 !important; + } + + ${selector} caption { + outline: 1px solid #37ffc4 !important; + } + + ${selector} thead { + outline: 1px solid #98daca !important; + } + + ${selector} tbody { + outline: 1px solid #64a7a0 !important; + } + + ${selector} tfoot { + outline: 1px solid #22746b !important; + } + + ${selector} tr { + outline: 1px solid #86c0b2 !important; + } + + ${selector} th { + outline: 1px solid #a1e7d6 !important; + } + + ${selector} td { + outline: 1px solid #3f5a54 !important; + } + + ${selector} col { + outline: 1px solid #6c9a8f !important; + } + + ${selector} colgroup { + outline: 1px solid #6c9a9d !important; + } + + ${selector} button { + outline: 1px solid #da8301 !important; + } + + ${selector} datalist { + outline: 1px solid #c06000 !important; + } + + ${selector} fieldset { + outline: 1px solid #d95100 !important; + } + + ${selector} form { + outline: 1px solid #d23600 !important; + } + + ${selector} input { + outline: 1px solid #fca600 !important; + } + + ${selector} keygen { + outline: 1px solid #b31e00 !important; + } + + ${selector} label { + outline: 1px solid #ee8900 !important; + } + + ${selector} legend { + outline: 1px solid #de6d00 !important; + } + + ${selector} meter { + outline: 1px solid #e8630c !important; + } + + ${selector} optgroup { + outline: 1px solid #b33600 !important; + } + + ${selector} option { + outline: 1px solid #ff8a00 !important; + } + + ${selector} output { + outline: 1px solid #ff9619 !important; + } + + ${selector} progress { + outline: 1px solid #e57c00 !important; + } + + ${selector} select { + outline: 1px solid #e26e0f !important; + } + + ${selector} textarea { + outline: 1px solid #cc5400 !important; + } + + ${selector} details { + outline: 1px solid #33848f !important; + } + + ${selector} summary { + outline: 1px solid #60a1a6 !important; + } + + ${selector} command { + outline: 1px solid #438da1 !important; + } + + ${selector} menu { + outline: 1px solid #449da6 !important; + } + + ${selector} del { + outline: 1px solid #bf0000 !important; + } + + ${selector} ins { + outline: 1px solid #400000 !important; + } + + ${selector} img { + outline: 1px solid #22746b !important; + } + + ${selector} iframe { + outline: 1px solid #64a7a0 !important; + } + + ${selector} embed { + outline: 1px solid #98daca !important; + } + + ${selector} object { + outline: 1px solid #00cc99 !important; + } + + ${selector} param { + outline: 1px solid #37ffc4 !important; + } + + ${selector} video { + outline: 1px solid #6ee866 !important; + } + + ${selector} audio { + outline: 1px solid #027353 !important; + } + + ${selector} source { + outline: 1px solid #012426 !important; + } + + ${selector} canvas { + outline: 1px solid #a2f570 !important; + } + + ${selector} track { + outline: 1px solid #59a600 !important; + } + + ${selector} map { + outline: 1px solid #7be500 !important; + } + + ${selector} area { + outline: 1px solid #305900 !important; + } + + ${selector} a { + outline: 1px solid #ff62ab !important; + } + + ${selector} em { + outline: 1px solid #800b41 !important; + } + + ${selector} strong { + outline: 1px solid #ff1583 !important; + } + + ${selector} i { + outline: 1px solid #803156 !important; + } + + ${selector} b { + outline: 1px solid #cc1169 !important; + } + + ${selector} u { + outline: 1px solid #ff0430 !important; + } + + ${selector} s { + outline: 1px solid #f805e3 !important; + } + + ${selector} small { + outline: 1px solid #d107b2 !important; + } + + ${selector} abbr { + outline: 1px solid #4a0263 !important; + } + + ${selector} q { + outline: 1px solid #240018 !important; + } + + ${selector} cite { + outline: 1px solid #64003c !important; + } + + ${selector} dfn { + outline: 1px solid #b4005a !important; + } + + ${selector} sub { + outline: 1px solid #dba0c8 !important; + } + + ${selector} sup { + outline: 1px solid #cc0256 !important; + } + + ${selector} time { + outline: 1px solid #d6606d !important; + } + + ${selector} code { + outline: 1px solid #e04251 !important; + } + + ${selector} kbd { + outline: 1px solid #5e001f !important; + } + + ${selector} samp { + outline: 1px solid #9c0033 !important; + } + + ${selector} var { + outline: 1px solid #d90047 !important; + } + + ${selector} mark { + outline: 1px solid #ff0053 !important; + } + + ${selector} bdi { + outline: 1px solid #bf3668 !important; + } + + ${selector} bdo { + outline: 1px solid #6f1400 !important; + } + + ${selector} ruby { + outline: 1px solid #ff7b93 !important; + } + + ${selector} rt { + outline: 1px solid #ff2f54 !important; + } + + ${selector} rp { + outline: 1px solid #803e49 !important; + } + + ${selector} span { + outline: 1px solid #cc2643 !important; + } + + ${selector} br { + outline: 1px solid #db687d !important; + } + + ${selector} wbr { + outline: 1px solid #db175b !important; + }`; +} + +// src/outline/withOutline.ts +var withOutline = (StoryFn, context) => { + let globals = context.globals || {}, isActive = !context.parameters?.[PARAM_KEY4]?.disable && [!0, "true"].includes(globals[PARAM_KEY4]), isInDocs = context.viewMode === "docs", outlineStyles = useMemo(() => outlineCSS(isInDocs ? '[data-story-block="true"]' : ".sb-show-main"), [context]); + return useEffect3(() => { + let selectorId = isInDocs ? `addon-outline-docs-${context.id}` : "addon-outline"; + return isActive ? addOutlineStyles(selectorId, outlineStyles) : clearStyles2(selectorId), () => { + clearStyles2(selectorId); + }; + }, [isActive, outlineStyles, context]), StoryFn(); +}; + +// src/outline/preview.ts +var decorators3 = globalThis.FEATURES?.outline ? [withOutline] : [], initialGlobals3 = { + [PARAM_KEY4]: !1 +}, preview_default6 = () => definePreviewAddon7({ decorators: decorators3, initialGlobals: initialGlobals3 }); + +// src/shared/open-service/services/docgen/preview.ts +import { definePreviewAddon as definePreviewAddon8 } from "storybook/internal/csf"; +var preview_default7 = () => definePreviewAddon8({ + beforeAll: () => { + globalThis.FEATURES?.experimentalDocgenServer && registerService(docgenServiceDef); + } +}); + +// src/shared/open-service/services/story-docs/preview.ts +import { definePreviewAddon as definePreviewAddon9 } from "storybook/internal/csf"; + +// src/shared/open-service/services/story-docs/definition.ts +import { defineService } from "storybook/open-service"; + +// src/shared/open-service/services/story-docs/paths.ts +function storyDocsQueryStaticPath(id) { + return `${id}.json`; +} + +// src/shared/open-service/services/story-docs/definition.ts +var storyDocsInputSchema = object({ id: string() }), storyDocsErrorSchema = object({ + name: string(), + message: string() +}), storyDocSchema = object({ + id: string(), + name: string(), + snippet: optional(string()), + description: optional(string()), + summary: optional(string()), + error: optional(storyDocsErrorSchema) +}), storyDocsPayloadSchema = object({ + id: string(), + name: string(), + path: string(), + import: optional(string()), + stories: record(string(), storyDocSchema), + error: optional(storyDocsErrorSchema) +}), storyDocsOutputSchema = optional(storyDocsPayloadSchema), storyDocsServiceDef = defineService({ + id: "core/story-docs", + description: "Story documentation (snippets, descriptions, imports) keyed by component id.", + initialState: { components: {} }, + queries: { + storyDocs: { + description: "Returns the story-docs payload for one component id, or undefined when not loaded.", + input: storyDocsInputSchema, + output: storyDocsOutputSchema, + handler: (input, ctx) => Object.hasOwn(ctx.self.state.components, input.id) ? ctx.self.state.components[input.id] : void 0, + load: async (input, ctx) => { + await ctx.self.commands.extractStoryDocs(input); + }, + staticPath: (input) => storyDocsQueryStaticPath(input.id) + }, + storyDocsForAllComponents: { + description: "Returns story-docs payloads for every component in the story index.", + input: void_(), + output: record(string(), storyDocsPayloadSchema), + handler: (_input, ctx) => ctx.self.state.components, + load: async (_input, ctx) => { + await ctx.self.commands.extractAllStoryDocs(void 0); + } + } + }, + commands: { + extractStoryDocs: { + description: "Resolves the story entry for a component id, runs the registered provider chain, writes the result into state, and returns it (or undefined when no provider produced story docs).", + input: storyDocsInputSchema, + output: storyDocsOutputSchema + }, + extractAllStoryDocs: { + description: "Extracts story docs for every component id in the story index by invoking `extractStoryDocs` for each.", + input: undefined_(), + output: void_() + } + } +}); + +// src/shared/open-service/services/story-docs/story-docs-source-before-each.ts +import { emitTransformCode, getService } from "storybook/preview-api"; +function storyDocsSourceBeforeEach(context) { + if (!globalThis.FEATURES?.experimentalDocgenServer || shouldSkipStoryDocsEmit(context.parameters)) + return; + let service = (() => { + try { + return getService("core/story-docs"); + } catch { + return; + } + })(); + if (!service) + return; + let storyId = context.id, componentId = storyId.split("--")[0], cancelled = !1, codePanelSnippetPromise = service.queries.storyDocs.loaded({ id: componentId }).then((payload) => { + if (cancelled) + return; + let source = selectSnippetForStory(payload, storyId) ?? context.parameters?.docs?.source?.originalSource; + if (source !== void 0) + return emitTransformCode(source, context); + }); + return () => (cancelled = !0, codePanelSnippetPromise); +} + +// src/shared/open-service/services/story-docs/preview.ts +var preview_default8 = () => "FEATURES" in globalThis && globalThis.FEATURES?.experimentalDocgenServer ? definePreviewAddon9({ + beforeAll: () => { + registerService(storyDocsServiceDef); + }, + beforeEach: storyDocsSourceBeforeEach +}) : definePreviewAddon9({}); + +// src/test/preview.ts +import { definePreviewAddon as definePreviewAddon10 } from "storybook/internal/csf"; +import { instrument as instrument2 } from "storybook/internal/instrumenter"; +import { + clearAllMocks, + fn, + isMockFunction, + resetAllMocks, + restoreAllMocks, + uninstrumentedUserEvent, + within +} from "storybook/test"; +var resetAllMocksLoader = ({ parameters: parameters2 }) => { + parameters2?.test?.mockReset === !0 ? resetAllMocks() : parameters2?.test?.clearMocks === !0 ? clearAllMocks() : parameters2?.test?.restoreMocks !== !1 && restoreAllMocks(); +}, traverseArgs = (value, depth = 0, key) => { + if (depth > 5 || value == null) + return value; + if (isMockFunction(value)) + return key && value.mockName(key), value; + if (typeof value == "function" && "isAction" in value && value.isAction && !("implicit" in value && value.implicit)) { + let mock = fn(value); + return key && mock.mockName(key), mock; + } + if (Array.isArray(value)) { + depth++; + for (let i = 0; i < value.length; i++) + Object.getOwnPropertyDescriptor(value, i)?.writable && (value[i] = traverseArgs(value[i], depth)); + return value; + } + if (typeof value == "object" && value.constructor === Object) { + depth++; + for (let [k, v] of Object.entries(value)) + Object.getOwnPropertyDescriptor(value, k)?.writable && (value[k] = traverseArgs(v, depth, k)); + return value; + } + return value; +}, nameSpiesAndWrapActionsInSpies = ({ initialArgs }) => { + traverseArgs(initialArgs); +}, patchedFocus = !1, enhanceContext = async (context) => { + globalThis.HTMLElement && context.canvasElement instanceof globalThis.HTMLElement && (context.canvas = within(context.canvasElement)); + try { + let clipboard = globalThis.window?.navigator?.clipboard; + if (clipboard && (context.userEvent = instrument2( + { userEvent: uninstrumentedUserEvent.setup() }, + { + intercept: !0, + getKeys: (obj) => Object.keys(obj).filter((key) => key !== "eventWrapper") + } + ).userEvent, Object.defineProperty(globalThis.window.navigator, "clipboard", { + get: () => clipboard, + configurable: !0 + }), !patchedFocus)) { + let originalFocus = HTMLElement.prototype.focus, currentFocus = HTMLElement.prototype.focus, noopFocus = () => { + }, focusingElements = /* @__PURE__ */ new Set(); + Object.defineProperties(HTMLElement.prototype, { + focus: { + configurable: !0, + set: (newFocus) => { + currentFocus = newFocus; + }, + get() { + return this.ownerDocument?.defaultView ? focusingElements.has(this) ? originalFocus : (focusingElements.add(this), setTimeout(() => focusingElements.delete(this), 0), currentFocus) : noopFocus; + } + } + }), patchedFocus = !0; + } + } catch { + } +}, preview_default9 = () => definePreviewAddon10({ + loaders: [resetAllMocksLoader, nameSpiesAndWrapActionsInSpies, enhanceContext] +}); + +// src/viewport/preview.ts +import { definePreviewAddon as definePreviewAddon11 } from "storybook/internal/csf"; +var initialGlobals4 = { + [PARAM_KEY]: { value: void 0, isRotated: !1 } +}, preview_default10 = () => definePreviewAddon11({ + initialGlobals: initialGlobals4 +}); + +// src/csf/core-annotations.ts +var CORE_ANNOTATIONS_COMPOSED = /* @__PURE__ */ Symbol.for("storybook.internal.composedWithCoreAnnotations"); +function markAsComposedWithCoreAnnotations(annotations) { + return Object.defineProperty(annotations, CORE_ANNOTATIONS_COMPOSED, { + value: !0, + enumerable: !1, + configurable: !0, + writable: !0 + }), annotations; +} +function hasCoreAnnotations(annotations) { + return annotations != null && typeof annotations == "object" && annotations[CORE_ANNOTATIONS_COMPOSED] === !0; +} +function getCoreAnnotations() { + return [ + // @ts-expect-error CJS fallback + (preview_default5.default ?? preview_default5)(), + // @ts-expect-error CJS fallback + (preview_default2.default ?? preview_default2)(), + // @ts-expect-error CJS fallback + (preview_default4.default ?? preview_default4)(), + // @ts-expect-error CJS fallback + (preview_default6.default ?? preview_default6)(), + // @ts-expect-error CJS fallback + (preview_default10.default ?? preview_default10)(), + // @ts-expect-error CJS fallback + (preview_default.default ?? preview_default)(), + // @ts-expect-error CJS fallback + (preview_default3.default ?? preview_default3)(), + // @ts-expect-error CJS fallback + (preview_default9.default ?? preview_default9)(), + // @ts-expect-error CJS fallback + (test_annotations_default.default ?? test_annotations_default)(), + // @ts-expect-error CJS fallback + (preview_default7.default ?? preview_default7)(), + // @ts-expect-error CJS fallback + (preview_default8.default ?? preview_default8)() + ]; +} + +// src/csf/csf-factories.ts +function definePreview(input) { + let composed, preview = { + _tag: "Preview", + input, + get composed() { + if (composed) + return composed; + let { addons: addons2, ...rest } = input; + return composed = markAsComposedWithCoreAnnotations( + normalizeProjectAnnotations( + composeConfigs([...getCoreAnnotations(), ...addons2 ?? [], rest]) + ) + ), composed; + }, + type() { + return this; + }, + meta(meta) { + return defineMeta(meta, this); + } + }; + return globalThis.globalProjectAnnotations = preview.composed, preview; +} +function definePreviewAddon12(preview) { + return preview; +} +function isPreview(input) { + return input != null && typeof input == "object" && "_tag" in input && input?._tag === "Preview"; +} +function isMeta(input) { + return input != null && typeof input == "object" && "_tag" in input && input?._tag === "Meta"; +} +function defineMeta(input, preview) { + return { + _tag: "Meta", + input: { ...input, parameters: { ...input.parameters, csfFactory: !0 } }, + preview, + // @ts-expect-error hard + story(story = {}) { + return defineStory(typeof story == "function" ? { render: story } : story, this); + } + }; +} +function isStory(input) { + return input != null && typeof input == "object" && "_tag" in input && input?._tag === "Story"; +} +function defineStory(input, meta) { + let composed, compose = () => (composed || (composed = composeStory( + input, + meta.input, + void 0, + meta.preview.composed + )), composed), __children = []; + return { + _tag: "Story", + input, + meta, + // @ts-expect-error this is a private property used only once in renderers/react/src/preview + __compose: compose, + __children, + get composed() { + let composed2 = compose(), { args, argTypes, parameters: parameters2, id, tags, globals, storyName: name } = composed2; + return { args, argTypes, parameters: parameters2, id, tags, name, globals }; + }, + get play() { + return input.play ?? meta.input?.play ?? (async () => { + }); + }, + async run(context) { + await compose().run(context); + }, + test(name, overridesOrTestFn, testFn) { + let annotations = typeof overridesOrTestFn != "function" ? overridesOrTestFn : {}, testFunction = typeof overridesOrTestFn != "function" ? testFn : overridesOrTestFn, play = mountDestructured(this.play) || mountDestructured(testFunction) ? ( + // mount needs to be explicitly destructured + // eslint-disable-next-line @typescript-eslint/no-unused-vars + async ({ mount, context }) => { + await this.play?.(context), await testFunction(context); + } + ) : async (context) => { + await this.play?.(context), await testFunction(context); + }, test = this.extend({ + ...annotations, + name, + tags: [Tag.TEST_FN, `!${Tag.AUTODOCS}`, ...annotations.tags ?? []], + play + }); + return __children.push(test), test; + }, + extend(input2) { + return defineStory( + { + ...this.input, + ...input2, + args: { ...this.input.args || {}, ...input2.args }, + argTypes: combineParameters(this.input.argTypes, input2.argTypes), + afterEach: [ + ...normalizeArrays(this.input?.afterEach ?? []), + ...normalizeArrays(input2.afterEach ?? []) + ], + beforeEach: [ + ...normalizeArrays(this.input?.beforeEach ?? []), + ...normalizeArrays(input2.beforeEach ?? []) + ], + decorators: [ + ...normalizeArrays(this.input?.decorators ?? []), + ...normalizeArrays(input2.decorators ?? []) + ], + globals: { ...this.input.globals, ...input2.globals }, + loaders: [ + ...normalizeArrays(this.input?.loaders ?? []), + ...normalizeArrays(input2.loaders ?? []) + ], + parameters: combineParameters(this.input.parameters, input2.parameters), + tags: combineTags(...this.input.tags ?? [], ...input2.tags ?? []) + }, + this.meta + ); + } + }; +} +function getStoryChildren(story) { + return "__children" in story ? story.__children : []; +} + +// src/csf/index.ts +var sanitize = (string2) => string2.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "-").replace(/-+/g, "-").replace(/^-+/, "").replace(/-+$/, ""), sanitizeSafe = (string2, part) => { + let sanitized = sanitize(string2); + if (sanitized === "") + throw new Error(`Invalid ${part} '${string2}', must include alphanumeric characters`); + return sanitized; +}, toId = (kind, name) => `${sanitizeSafe(kind, "kind")}${name ? `--${sanitizeSafe(name, "name")}` : ""}`, toTestId = (parentId, testName) => `${parentId}:${sanitizeSafe(testName, "test")}`, storyNameFromExport = (key) => toStartCaseStr(key); +function matches(storyKey, arrayOrRegex) { + return Array.isArray(arrayOrRegex) ? arrayOrRegex.includes(storyKey) : storyKey.match(arrayOrRegex); +} +function isExportStory(key, { includeStories, excludeStories }) { + return ( + // https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs + key !== "__esModule" && (!includeStories || matches(key, includeStories)) && (!excludeStories || !matches(key, excludeStories)) + ); +} +var parseKind = (kind, { rootSeparator, groupSeparator }) => { + let [root, remainder] = kind.split(rootSeparator, 2), groups = (remainder || kind).split(groupSeparator).filter((i) => !!i); + return { + root: remainder ? root : null, + groups + }; +}, combineTags2 = (...tags) => { + let result = tags.reduce((acc, tag) => (tag.startsWith("!") ? acc.delete(tag.slice(1)) : acc.add(tag), acc), /* @__PURE__ */ new Set()); + return Array.from(result); +}; +export { + combineTags2 as combineTags, + definePreview, + definePreviewAddon12 as definePreviewAddon, + getCoreAnnotations, + getStoryChildren, + hasCoreAnnotations, + includeConditionalArg, + isExportStory, + isMeta, + isPreview, + isStory, + markAsComposedWithCoreAnnotations, + parseKind, + sanitize, + storyNameFromExport, + toId, + toTestId +}; diff --git a/tools/ui/node_modules/storybook/dist/docs-tools/index.d.ts b/tools/ui/node_modules/storybook/dist/docs-tools/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f5f0f9d7088ca861a2a144a615f1542b86fd14e3 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/docs-tools/index.d.ts @@ -0,0 +1,214 @@ +import * as storybook_internal_types from 'storybook/internal/types'; +import { StrictArgTypes, Renderer, StoryContextForEnhancers, DocgenPayload, StoryId, Parameters, Args, ArgTypes } from 'storybook/internal/types'; + +type Component = any; + +interface JsDocParam { + name: string | undefined | null; + description?: string | null; +} +interface JsDocReturns { + description?: string | null; +} +interface JsDocTags { + params?: JsDocParam[] | null; + returns?: JsDocReturns | null; +} +interface PropSummaryValue { + summary?: string | undefined; + detail?: string | undefined; +} +type PropType = PropSummaryValue; +type PropDefaultValue = PropSummaryValue; +interface PropDef { + name: string; + type: PropType | null; + sbType?: any; + required: boolean; + description?: string; + defaultValue?: PropDefaultValue | null; + jsDocTags?: JsDocTags; +} + +type PropsExtractor = (component: Component) => { + rows?: PropDef[]; +} | null; +type ArgTypesExtractor = (component: Component) => StrictArgTypes | null; +interface DocgenType { + name: string; + description?: string; + required?: boolean; + value?: any; +} +interface DocgenPropType extends DocgenType { + value?: any; + raw?: string; + computed?: boolean; +} +interface DocgenFlowType extends DocgenType { + type?: string; + raw?: string; + signature?: any; + elements?: any[]; +} +interface DocgenTypeScriptType extends DocgenType { + raw?: string; +} +interface DocgenPropDefaultValue { + value: string; + computed?: boolean; + func?: boolean; +} +interface DocgenInfo { + type: DocgenPropType; + flowType?: DocgenFlowType; + tsType?: DocgenTypeScriptType; + required: boolean; + description: string; + defaultValue: DocgenPropDefaultValue; +} +declare enum TypeSystem { + JAVASCRIPT = "JavaScript", + FLOW = "Flow", + TYPESCRIPT = "TypeScript", + UNKNOWN = "Unknown" +} + +declare const convert: (docgenInfo: DocgenInfo) => any; + +declare function isDefaultValueBlacklisted(value: string): boolean; + +declare const str: (obj: any) => string; + +declare function hasDocgen(component: Component): component is object & { + __docgenInfo: T; +}; +declare function isValidDocgenSection(docgenSection: any): boolean; +declare function getDocgenSection(component: Component, section: string): any; +declare function getDocgenDescription(component: Component): string; + +interface ExtractedJsDocParam extends JsDocParam { + type?: any; + getPrettyName: () => string | undefined; + getTypeName: () => string | null; +} +interface ExtractedJsDocReturns extends JsDocReturns { + type?: any; + getTypeName: () => string | null; +} +interface ExtractedJsDoc { + params?: ExtractedJsDocParam[] | null; + deprecated?: string | null; + returns?: ExtractedJsDocReturns | null; + ignore: boolean; +} +interface JsDocParsingOptions { + tags?: string[]; +} +interface JsDocParsingResult { + includesJsDoc: boolean; + ignore: boolean; + description?: string; + extractedTags?: ExtractedJsDoc; +} +type ParseJsDoc = (value: string | null, options?: JsDocParsingOptions) => JsDocParsingResult; +declare const parseJsDoc: ParseJsDoc; + +interface ExtractedProp { + propDef: PropDef; + docgenInfo: DocgenInfo; + jsDocTags?: ExtractedJsDoc; + typeSystem: TypeSystem; +} +type ExtractProps = (component: Component, section: string) => ExtractedProp[]; +declare const extractComponentSectionArray: (docgenSection: any) => any; +declare const extractComponentSectionObject: (docgenSection: any) => (ExtractedProp | null)[]; +declare const extractComponentProps: ExtractProps; +declare function extractComponentDescription(component?: Component): string; + +declare const MAX_TYPE_SUMMARY_LENGTH = 90; +declare const MAX_DEFAULT_VALUE_SUMMARY_LENGTH = 50; +declare function isTooLongForTypeSummary(value: string): boolean; +declare function isTooLongForDefaultValueSummary(value: string): boolean; +declare function createSummaryValue(summary?: string, detail?: string): PropSummaryValue; +declare const normalizeNewlines: (string: string) => string; + +declare const enhanceArgTypes: (context: StoryContextForEnhancers) => storybook_internal_types.Parameters; + +/** + * Builds the Controls/ArgTypes table shape from server docgen and custom argTypes. + * + * Mirrors the legacy `prepareStory` enhancer chain when `experimentalDocgenServer` is enabled: + * server docgen stands in for `enhanceArgTypes`, user annotations from `customArgTypes` layer on + * top, then `inferArgTypes` and `inferControls` run the second pass that `prepareStory` skips. + * + * Callers source custom argTypes from the prepared meta/story they already hold — the docs blocks + * resolve it locally through `useOf` (as `StrictArgTypes`), the manager Controls panel reads it + * from the `STORY_PREPARED` channel via `useArgTypes` (as the looser `ArgTypes`); both are + * accepted here and normalized by the inference passes below. + */ +declare function mergeServiceArgTypes({ payload, storyId, parameters, initialArgs, customArgTypes, }: { + payload: DocgenPayload; + storyId: StoryId; + /** May be undefined when the manager renders before the preview reports `storyPrepared`. */ + parameters?: Parameters; + initialArgs?: Args; + customArgTypes?: ArgTypes; +}): StrictArgTypes; +/** Returns subcomponent argTypes that were converted by the renderer provider at write time. */ +declare function getServiceSubcomponentArgTypes(payload: DocgenPayload): Record; + +declare const ADDON_ID = "storybook/docs"; +declare const PANEL_ID = "storybook/docs/panel"; +declare const PARAM_KEY = "docs"; +declare const SNIPPET_RENDERED = "storybook/docs/snippet-rendered"; +declare enum SourceType { + /** + * AUTO is the default + * + * Use the CODE logic if: + * + * - The user has set a custom source snippet in `docs.source.code` story parameter + * - The story is not an args-based story + * + * Use the DYNAMIC rendered snippet if the story is an args story + */ + AUTO = "auto", + /** Render the code extracted by csf-plugin */ + CODE = "code", + /** Render dynamically-rendered source snippet from the story's virtual DOM (currently React only) */ + DYNAMIC = "dynamic" +} + +type StoryDocsCodePanelParameters = { + __isArgsStory?: boolean; + __isPortableStory?: boolean; + docs?: { + source?: { + code?: string; + type?: SourceType; + }; + }; +}; +/** + * Whether the preview story-docs hook should skip emitting a snippet to the manager Code panel. + * + * The args/source shape logic mirrors {@link skipJsxRender} in the React `jsxDecorator`, so static + * service snippets replace dynamic JSX rendering under the same conditions. It additionally skips + * portable stories (vitest, playwright/jest portable): those have no manager Code panel and no OSA + * server peer, so the `extractStoryDocs` remote command has no handler and would reject after the + * ack timeout — there is nothing to emit to. + */ +declare function shouldSkipStoryDocsEmit(parameters?: StoryDocsCodePanelParameters): boolean; +/** + * Whether the Code panel should keep rendering blank while it waits for a story-docs service snippet + * instead of falling back to raw CSF (`originalSource`). + * + * True while the docgen server might still emit a snippet for the current story: either the story is + * known to emit one, or it is not prepared yet so the emit decision — which depends on prepared + * parameters like `__isArgsStory` — is still unknown in the manager. Holding the fallback during + * that window prevents flashing raw CSF before the service snippet arrives for newly opened stories. + */ +declare function shouldWaitForServiceSnippet(parameters: StoryDocsCodePanelParameters | undefined, storyPrepared: boolean | undefined): boolean; + +export { ADDON_ID, type ArgTypesExtractor, type Component, type DocgenFlowType, type DocgenInfo, type DocgenPropDefaultValue, type DocgenPropType, type DocgenType, type DocgenTypeScriptType, type ExtractProps, type ExtractedJsDoc, type ExtractedJsDocParam, type ExtractedJsDocReturns, type ExtractedProp, type JsDocParam, type JsDocParsingOptions, type JsDocParsingResult, type JsDocReturns, type JsDocTags, MAX_DEFAULT_VALUE_SUMMARY_LENGTH, MAX_TYPE_SUMMARY_LENGTH, PANEL_ID, PARAM_KEY, type ParseJsDoc, type PropDef, type PropDefaultValue, type PropSummaryValue, type PropType, type PropsExtractor, SNIPPET_RENDERED, SourceType, type StoryDocsCodePanelParameters, TypeSystem, convert, createSummaryValue, enhanceArgTypes, extractComponentDescription, extractComponentProps, extractComponentSectionArray, extractComponentSectionObject, getDocgenDescription, getDocgenSection, getServiceSubcomponentArgTypes, hasDocgen, isDefaultValueBlacklisted, isTooLongForDefaultValueSummary, isTooLongForTypeSummary, isValidDocgenSection, mergeServiceArgTypes, normalizeNewlines, parseJsDoc, shouldSkipStoryDocsEmit, shouldWaitForServiceSnippet, str }; diff --git a/tools/ui/node_modules/storybook/dist/docs-tools/index.js b/tools/ui/node_modules/storybook/dist/docs-tools/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6aa8eb843277484d7e243dc1a5f5461b00582159 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/docs-tools/index.js @@ -0,0 +1,69 @@ +import { + ADDON_ID, + MAX_DEFAULT_VALUE_SUMMARY_LENGTH, + MAX_TYPE_SUMMARY_LENGTH, + PANEL_ID, + PARAM_KEY, + SNIPPET_RENDERED, + SourceType, + TypeSystem, + convert, + createSummaryValue, + enhanceArgTypes, + extractComponentDescription, + extractComponentProps, + extractComponentSectionArray, + extractComponentSectionObject, + getDocgenDescription, + getDocgenSection, + hasDocgen, + isDefaultValueBlacklisted, + isTooLongForDefaultValueSummary, + isTooLongForTypeSummary, + isValidDocgenSection, + normalizeNewlines, + parseJsDoc, + shouldSkipStoryDocsEmit, + shouldWaitForServiceSnippet, + str +} from "../_browser-chunks/chunk-OA6XKWIN.js"; +import { + getServiceSubcomponentArgTypes, + mergeServiceArgTypes +} from "../_browser-chunks/chunk-FLUL445Z.js"; +import "../_browser-chunks/chunk-5GYAEUAU.js"; +import "../_browser-chunks/chunk-Z3B64JMR.js"; +import "../_browser-chunks/chunk-NZMVUW5T.js"; +import "../_browser-chunks/chunk-3LY4VQVK.js"; +import "../_browser-chunks/chunk-IMSF75WX.js"; +export { + ADDON_ID, + MAX_DEFAULT_VALUE_SUMMARY_LENGTH, + MAX_TYPE_SUMMARY_LENGTH, + PANEL_ID, + PARAM_KEY, + SNIPPET_RENDERED, + SourceType, + TypeSystem, + convert, + createSummaryValue, + enhanceArgTypes, + extractComponentDescription, + extractComponentProps, + extractComponentSectionArray, + extractComponentSectionObject, + getDocgenDescription, + getDocgenSection, + getServiceSubcomponentArgTypes, + hasDocgen, + isDefaultValueBlacklisted, + isTooLongForDefaultValueSummary, + isTooLongForTypeSummary, + isValidDocgenSection, + mergeServiceArgTypes, + normalizeNewlines, + parseJsDoc, + shouldSkipStoryDocsEmit, + shouldWaitForServiceSnippet, + str +}; diff --git a/tools/ui/node_modules/storybook/dist/highlight/index.d.ts b/tools/ui/node_modules/storybook/dist/highlight/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a2c8e28a9ce4578e32e78f62f6a6f8981bc9a134 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/highlight/index.d.ts @@ -0,0 +1,62 @@ +declare const HIGHLIGHT = "storybook/highlight/add"; +declare const REMOVE_HIGHLIGHT = "storybook/highlight/remove"; +declare const RESET_HIGHLIGHT = "storybook/highlight/reset"; +declare const SCROLL_INTO_VIEW = "storybook/highlight/scroll-into-view"; + +declare const iconPaths: { + chevronLeft: string[]; + chevronRight: string[]; + info: string[]; + shareAlt: string[]; +}; +type IconName = keyof typeof iconPaths; + +interface HighlightMenuItem { + /** Unique identifier for the menu item */ + id: string; + /** Title of the menu item */ + title: string; + /** Description of the menu item */ + description?: string; + /** Icon for the menu item, left side */ + iconLeft?: IconName; + /** Icon for the menu item, right side */ + iconRight?: IconName; + /** Name for a channel event to trigger when the menu item is clicked */ + clickEvent?: string; + /** HTML selectors for which this menu item should show (subset of `selectors`) */ + selectors?: HighlightOptions['selectors']; +} +interface HighlightOptions { + /** Unique identifier for the highlight, required if you want to remove the highlight later */ + id?: string; + /** HTML selectors of the elements */ + selectors: string[]; + /** Priority of the highlight, higher takes precedence, defaults to 0 */ + priority?: number; + /** CSS styles to apply to the highlight */ + styles?: Record; + /** CSS styles to apply to the highlight when it is hovered */ + hoverStyles?: Record; + /** CSS styles to apply to the highlight when it is focused or selected */ + focusStyles?: Record; + /** Keyframes required for animations */ + keyframes?: string; + /** Groups of menu items to show when the highlight is selected */ + menu?: HighlightMenuItem[][]; +} +interface ClickEventDetails { + top: number; + left: number; + width: number; + height: number; + selectors: string[]; + element: { + attributes: Record; + localName: string; + tagName: string; + outerHTML: string; + }; +} + +export { type ClickEventDetails, HIGHLIGHT, type HighlightMenuItem, type HighlightOptions, REMOVE_HIGHLIGHT, RESET_HIGHLIGHT, SCROLL_INTO_VIEW }; diff --git a/tools/ui/node_modules/storybook/dist/highlight/index.js b/tools/ui/node_modules/storybook/dist/highlight/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2c6889b27c92bc338fe726a70a40f9315cf38529 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/highlight/index.js @@ -0,0 +1,13 @@ +import { + HIGHLIGHT, + REMOVE_HIGHLIGHT, + RESET_HIGHLIGHT, + SCROLL_INTO_VIEW +} from "../_browser-chunks/chunk-KJHJLCBK.js"; +import "../_browser-chunks/chunk-IMSF75WX.js"; +export { + HIGHLIGHT, + REMOVE_HIGHLIGHT, + RESET_HIGHLIGHT, + SCROLL_INTO_VIEW +}; diff --git a/tools/ui/node_modules/storybook/dist/instrumenter/index.d.ts b/tools/ui/node_modules/storybook/dist/instrumenter/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..756054d9cdd19e00948fa915d5faeaa608010f5f --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/instrumenter/index.d.ts @@ -0,0 +1,127 @@ +import { NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn, StoryId } from 'storybook/internal/types'; + +declare global { + var globalProjectAnnotations: NormalizedProjectAnnotations; + var defaultProjectAnnotations: ProjectAnnotations; +} +type WrappedStoryRef = { + __pw_type: 'jsx'; + props: Record; +} | { + __pw_type: 'importRef'; +}; +type UnwrappedJSXStoryRef = { + __pw_type: 'jsx'; + type: UnwrappedImportStoryRef; +}; +type UnwrappedImportStoryRef = ComposedStoryFn; +declare global { + function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise; +} + +type RenderPhase = 'preparing' | 'loading' | 'beforeEach' | 'rendering' | 'playing' | 'played' | 'completing' | 'completed' | 'afterEach' | 'finished' | 'aborted' | 'errored'; + +interface Call { + id: string; + cursor: number; + storyId: StoryId; + ancestors: Call['id'][]; + path: Array; + method: string; + args: any[]; + interceptable: boolean; + retain: boolean; + status?: CallStates.DONE | CallStates.ERROR | CallStates.ACTIVE | CallStates.WAITING; + exception?: { + name: Error['name']; + message: Error['message']; + stack: Error['stack']; + callId: Call['id']; + showDiff?: boolean; + diff?: string; + actual?: unknown; + expected?: unknown; + }; +} +declare enum CallStates { + DONE = "done", + ERROR = "error", + ACTIVE = "active", + WAITING = "waiting" +} +interface CallRef { + __callId__: Call['id']; +} +interface ElementRef { + __element__: { + prefix?: string; + localName: string; + id?: string; + classNames?: string[]; + innerText?: string; + }; +} +interface ControlStates { + detached: boolean; + start: boolean; + back: boolean; + goto: boolean; + next: boolean; + end: boolean; +} +interface LogItem { + callId: Call['id']; + status: Call['status']; + ancestors: Call['id'][]; +} +interface SyncPayload { + controlStates: ControlStates; + logItems: LogItem[]; + pausedAt?: Call['id']; +} +interface State { + renderPhase: RenderPhase; + isDebugging: boolean; + isPlaying: boolean; + isLocked: boolean; + cursor: number; + calls: Call[]; + shadowCalls: Call[]; + callRefsByResult: Map; + chainedCallIds: Set; + ancestors: Call['id'][]; + playUntil?: Call['id']; + resolvers: Record; + syncTimeout?: ReturnType; + forwardedException?: Error; +} +interface Options { + intercept?: boolean | ((method: string, path: Array) => boolean); + retain?: boolean; + mutate?: boolean; + path?: Array; + getArgs?: (call: Call, state: State) => Call['args']; + getKeys?: (originalObject: Record, depth: number) => string[]; +} + +/** + * Instruments an object or module by traversing its properties, patching any functions (methods) to + * enable debugging. Patched functions will emit a `call` event when invoked. When intercept = true, + * patched functions will return a Promise when the debugger stops before this function. As such, + * "interceptable" functions will have to be `await`-ed. + */ +declare function instrument>(obj: TObj, options?: Options): TObj; + +declare const EVENTS: { + CALL: string; + SYNC: string; + START: string; + BACK: string; + GOTO: string; + NEXT: string; + END: string; +}; + +export { type Call, type CallRef, CallStates, type ControlStates, EVENTS, type ElementRef, type LogItem, type Options, type RenderPhase, type State, type SyncPayload, instrument }; diff --git a/tools/ui/node_modules/storybook/dist/instrumenter/index.js b/tools/ui/node_modules/storybook/dist/instrumenter/index.js new file mode 100644 index 0000000000000000000000000000000000000000..95d425ba0690c709f51df65d70cfcd80268ea991 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/instrumenter/index.js @@ -0,0 +1,407 @@ +import { + CallStates, + EVENTS +} from "../_browser-chunks/chunk-ZUWEVLDX.js"; +import { + processError +} from "../_browser-chunks/chunk-QGGIYUMM.js"; +import "../_browser-chunks/chunk-IMSF75WX.js"; + +// src/instrumenter/instrumenter.ts +import { once } from "storybook/internal/client-logger"; +import { + FORCE_REMOUNT, + SET_CURRENT_STORY, + STORY_RENDER_PHASE_CHANGED +} from "storybook/internal/core-events"; +import { global } from "@storybook/global"; + +// src/instrumenter/preview-api.ts +var addons = globalThis.__STORYBOOK_ADDONS_PREVIEW; + +// src/instrumenter/instrumenter.ts +var alreadyCompletedException = new Error( + "This function ran after the play function completed. Did you forget to `await` it?" +), isObject = (o) => Object.prototype.toString.call(o) === "[object Object]", isModule = (o) => Object.prototype.toString.call(o) === "[object Module]", isInstrumentable = (o) => { + if (!isObject(o) && !isModule(o)) + return !1; + if (o.constructor === void 0) + return !0; + let proto = o.constructor.prototype; + return !!isObject(proto); +}, construct = (obj) => { + try { + return new obj.constructor(); + } catch { + return {}; + } +}, getInitialState = () => ({ + renderPhase: "preparing", + isDebugging: !1, + isPlaying: !1, + isLocked: !1, + cursor: 0, + calls: [], + shadowCalls: [], + callRefsByResult: /* @__PURE__ */ new Map(), + chainedCallIds: /* @__PURE__ */ new Set(), + ancestors: [], + playUntil: void 0, + resolvers: {}, + syncTimeout: void 0 +}), getRetainedState = (state, isDebugging = !1) => { + let calls = (isDebugging ? state.shadowCalls : state.calls).filter((call) => call.retain); + if (!calls.length) + return; + let callRefsByResult = new Map( + Array.from(state.callRefsByResult.entries()).filter(([, ref]) => ref.retain) + ); + return { cursor: calls.length, calls, callRefsByResult }; +}, Instrumenter = class { + constructor() { + this.detached = !1; + this.initialized = !1; + // State is tracked per story to deal with multiple stories on the same canvas (i.e. docs mode) + this.state = {}; + this.loadParentWindowState = () => { + try { + this.state = global.window?.parent?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ || {}; + } catch { + this.detached = !0; + } + }; + this.updateParentWindowState = () => { + try { + global.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ = this.state; + } catch { + this.detached = !0; + } + }; + this.loadParentWindowState(); + let resetState = ({ + storyId, + renderPhase, + isPlaying = !0, + isDebugging = !1 + }) => { + let state = this.getState(storyId); + this.setState(storyId, { + ...getInitialState(), + ...getRetainedState(state, isDebugging), + renderPhase: renderPhase || state.renderPhase, + shadowCalls: isDebugging ? state.shadowCalls : [], + chainedCallIds: isDebugging ? state.chainedCallIds : /* @__PURE__ */ new Set(), + playUntil: isDebugging ? state.playUntil : void 0, + isPlaying, + isDebugging + }), this.sync(storyId); + }, start = (channel) => ({ storyId, playUntil }) => { + this.getState(storyId).isDebugging || this.setState(storyId, ({ calls }) => ({ + calls: [], + shadowCalls: calls.map((call) => ({ ...call, status: "waiting" /* WAITING */ })), + isDebugging: !0 + })); + let log = this.getLog(storyId); + this.setState(storyId, ({ shadowCalls }) => { + if (playUntil || !log.length) + return { playUntil }; + let firstRowIndex = shadowCalls.findIndex((call) => call.id === log[0].callId); + return { + playUntil: shadowCalls.slice(0, firstRowIndex).filter((call) => call.interceptable && !call.ancestors?.length).slice(-1)[0]?.id + }; + }), channel.emit(FORCE_REMOUNT, { storyId, isDebugging: !0 }); + }, back = (channel) => ({ storyId }) => { + let log = this.getLog(storyId).filter((call) => !call.ancestors?.length), last = log.reduceRight((res, item, index) => res >= 0 || item.status === "waiting" /* WAITING */ ? res : index, -1); + start(channel)({ storyId, playUntil: log[last - 1]?.callId }); + }, goto = (channel) => ({ storyId, callId }) => { + let { calls, shadowCalls, resolvers } = this.getState(storyId), call = calls.find(({ id }) => id === callId), shadowCall = shadowCalls.find(({ id }) => id === callId); + if (!call && shadowCall && Object.values(resolvers).length > 0) { + let nextId = this.getLog(storyId).find((c) => c.status === "waiting" /* WAITING */)?.callId; + shadowCall.id !== nextId && this.setState(storyId, { playUntil: shadowCall.id }), Object.values(resolvers).forEach((resolve) => resolve()); + } else + start(channel)({ storyId, playUntil: callId }); + }, next = (channel) => ({ storyId }) => { + let { resolvers } = this.getState(storyId); + if (Object.values(resolvers).length > 0) + Object.values(resolvers).forEach((resolve) => resolve()); + else { + let nextId = this.getLog(storyId).find((c) => c.status === "waiting" /* WAITING */)?.callId; + nextId ? start(channel)({ storyId, playUntil: nextId }) : end({ storyId }); + } + }, end = ({ storyId }) => { + this.setState(storyId, { playUntil: void 0, isDebugging: !1 }), Object.values(this.getState(storyId).resolvers).forEach((resolve) => resolve()); + }, renderPhaseChanged = ({ + storyId, + newPhase + }) => { + let { isDebugging } = this.getState(storyId); + if (newPhase === "preparing" && isDebugging) + return resetState({ storyId, renderPhase: newPhase, isDebugging }); + if (newPhase === "playing") + return resetState({ storyId, renderPhase: newPhase, isDebugging }); + newPhase === "played" ? this.setState(storyId, { + renderPhase: newPhase, + isLocked: !1, + isPlaying: !1, + isDebugging: !1 + }) : newPhase === "errored" ? this.setState(storyId, { + renderPhase: newPhase, + isLocked: !1, + isPlaying: !1 + }) : newPhase === "aborted" ? this.setState(storyId, { + renderPhase: newPhase, + isLocked: !0, + isPlaying: !1 + }) : this.setState(storyId, { + renderPhase: newPhase + }), this.sync(storyId); + }; + addons && addons.ready().then(() => { + this.channel = addons.getChannel(), this.channel.on(FORCE_REMOUNT, resetState), this.channel.on(STORY_RENDER_PHASE_CHANGED, renderPhaseChanged), this.channel.on(SET_CURRENT_STORY, () => { + this.initialized ? this.cleanup() : this.initialized = !0; + }), this.channel.on(EVENTS.START, start(this.channel)), this.channel.on(EVENTS.BACK, back(this.channel)), this.channel.on(EVENTS.GOTO, goto(this.channel)), this.channel.on(EVENTS.NEXT, next(this.channel)), this.channel.on(EVENTS.END, end); + }); + } + getState(storyId) { + return this.state[storyId] || getInitialState(); + } + setState(storyId, update) { + if (storyId) { + let state = this.getState(storyId), patch = typeof update == "function" ? update(state) : update; + this.state = { ...this.state, [storyId]: { ...state, ...patch } }, this.updateParentWindowState(); + } + } + cleanup() { + this.state = Object.entries(this.state).reduce( + (acc, [storyId, state]) => { + let retainedState = getRetainedState(state); + return retainedState && (acc[storyId] = Object.assign(getInitialState(), retainedState)), acc; + }, + {} + ); + let payload = { controlStates: { + detached: this.detached, + start: !1, + back: !1, + goto: !1, + next: !1, + end: !1 + }, logItems: [] }; + this.channel?.emit(EVENTS.SYNC, payload), this.updateParentWindowState(); + } + getLog(storyId) { + let { calls, shadowCalls } = this.getState(storyId), merged = [...shadowCalls]; + calls.forEach((call, index) => { + merged[index] = call; + }); + let seen = /* @__PURE__ */ new Set(); + return merged.reduceRight((acc, call) => (call.args.forEach((arg) => { + arg?.__callId__ && seen.add(arg.__callId__); + }), call.path.forEach((node) => { + node.__callId__ && seen.add(node.__callId__); + }), (call.interceptable || call.exception) && !seen.has(call.id) && (acc.unshift({ callId: call.id, status: call.status, ancestors: call.ancestors }), seen.add(call.id)), acc), []); + } + // Traverses the object structure to recursively patch all function properties. + // Returns the original object, or a new object with the same constructor, + // depending on whether it should mutate. + instrument(obj, options, depth = 0) { + if (!isInstrumentable(obj)) + return obj; + let { mutate = !1, path = [] } = options, keys = options.getKeys ? options.getKeys(obj, depth) : Object.keys(obj); + return depth += 1, keys.reduce( + (acc, key) => { + let descriptor = getPropertyDescriptor(obj, key); + if (typeof descriptor?.get == "function") { + if (descriptor.configurable) { + let getter = () => descriptor?.get?.bind(obj)?.(); + Object.defineProperty(acc, key, { + get: () => this.instrument(getter(), { ...options, path: path.concat(key) }, depth) + }); + } + return acc; + } + let value = obj[key]; + return typeof value != "function" ? (acc[key] = this.instrument(value, { ...options, path: path.concat(key) }, depth), acc) : "__originalFn__" in value && typeof value.__originalFn__ == "function" ? (acc[key] = value, acc) : (acc[key] = (...args) => this.track(key, value, obj, args, options), acc[key].__originalFn__ = value, Object.defineProperty(acc[key], "name", { value: key, writable: !1 }), Object.keys(value).length > 0 && Object.assign( + acc[key], + this.instrument({ ...value }, { ...options, path: path.concat(key) }, depth) + ), acc); + }, + mutate ? obj : construct(obj) + ); + } + // Monkey patch an object method to record calls. + // Returns a function that invokes the original function, records the invocation ("call") and + // returns the original result. + track(method, fn, object, args, options) { + let storyId = args?.[0]?.__storyId__ || global.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId, { cursor, ancestors } = this.getState(storyId); + this.setState(storyId, { cursor: cursor + 1 }); + let id = `${ancestors.slice(-1)[0] || storyId} [${cursor}] ${method}`, { path = [], intercept = !1, retain = !1 } = options, interceptable = typeof intercept == "function" ? intercept(method, path) : intercept, call = { id, cursor, storyId, ancestors, path, method, args, interceptable, retain }, result = (interceptable && !ancestors.length ? this.intercept : this.invoke).call(this, fn, object, call, options); + return this.instrument(result, { ...options, mutate: !0, path: [{ __callId__: call.id }] }); + } + intercept(fn, object, call, options) { + let { chainedCallIds, isDebugging, playUntil } = this.getState(call.storyId), isChainedUpon = chainedCallIds.has(call.id); + return !isDebugging || isChainedUpon || playUntil ? (playUntil === call.id && this.setState(call.storyId, { playUntil: void 0 }), this.invoke(fn, object, call, options)) : new Promise((resolve) => { + this.setState(call.storyId, ({ resolvers }) => ({ + isLocked: !1, + resolvers: { ...resolvers, [call.id]: resolve } + })); + }).then(() => (this.setState(call.storyId, (state) => { + let { [call.id]: _, ...resolvers } = state.resolvers; + return { isLocked: !0, resolvers }; + }), this.invoke(fn, object, call, options))); + } + invoke(fn, object, call, options) { + let { callRefsByResult, renderPhase } = this.getState(call.storyId), maximumDepth = 25, serializeValues = (value, depth, seen) => { + if (seen.includes(value)) + return "[Circular]"; + if (seen = [...seen, value], depth > maximumDepth) + return "..."; + if (callRefsByResult.has(value)) + return callRefsByResult.get(value); + if (value instanceof Array) + return value.map((it) => serializeValues(it, ++depth, seen)); + if (value instanceof Date) + return { __date__: { value: value.toISOString() } }; + if (value instanceof Error) { + let { name, message, stack } = value; + return { __error__: { name, message, stack } }; + } + if (value instanceof RegExp) { + let { flags, source } = value; + return { __regexp__: { flags, source } }; + } + if (value instanceof global.window?.HTMLElement) { + let { prefix, localName, id, classList, innerText } = value, classNames = Array.from(classList); + return { __element__: { prefix, localName, id, classNames, innerText } }; + } + return typeof value == "function" ? { + __function__: { name: "getMockName" in value ? value.getMockName() : value.name } + } : typeof value == "symbol" ? { __symbol__: { description: value.description } } : typeof value == "object" && value?.constructor?.name && value?.constructor?.name !== "Object" ? { __class__: { name: value.constructor.name } } : Object.prototype.toString.call(value) === "[object Object]" ? Object.fromEntries( + Object.entries(value).map(([key, val]) => [key, serializeValues(val, ++depth, seen)]) + ) : value; + }, info = { + ...call, + args: call.args.map((arg) => serializeValues(arg, 0, [])) + }; + call.path.forEach((ref) => { + ref?.__callId__ && this.setState(call.storyId, ({ chainedCallIds }) => ({ + chainedCallIds: new Set(Array.from(chainedCallIds).concat(ref.__callId__)) + })); + }); + let handleException = (e) => { + if (e instanceof Error) { + let { name, message, stack, callId = call.id } = e, { + showDiff = void 0, + diff = void 0, + actual = void 0, + expected = void 0 + } = e.name === "AssertionError" ? processError(e) : e, exception = { name, message, stack, callId, showDiff, diff, actual, expected }; + if (this.update({ ...info, status: "error" /* ERROR */, exception }), this.setState(call.storyId, (state) => ({ + callRefsByResult: new Map([ + ...Array.from(state.callRefsByResult.entries()), + [e, { __callId__: call.id, retain: call.retain }] + ]) + })), call.ancestors?.length) + throw Object.prototype.hasOwnProperty.call(e, "callId") || Object.defineProperty(e, "callId", { value: call.id }), e; + } + throw e; + }; + try { + if (renderPhase === "played" && !call.retain) + throw alreadyCompletedException; + let finalArgs = (options.getArgs ? options.getArgs(call, this.getState(call.storyId)) : call.args).map((arg) => typeof arg != "function" || isClass(arg) || Object.keys(arg).length ? arg : (...args) => { + let { cursor, ancestors } = this.getState(call.storyId); + this.setState(call.storyId, { cursor: 0, ancestors: [...ancestors, call.id] }); + let restore = () => this.setState(call.storyId, { cursor, ancestors }), willRestore = !1; + try { + let res = arg(...args); + return res instanceof Promise ? (willRestore = !0, res.finally(restore)) : res; + } finally { + willRestore || restore(); + } + }), result = fn.apply(object, finalArgs); + return result && ["object", "function", "symbol"].includes(typeof result) && this.setState(call.storyId, (state) => ({ + callRefsByResult: new Map([ + ...Array.from(state.callRefsByResult.entries()), + [result, { __callId__: call.id, retain: call.retain }] + ]) + })), this.update({ + ...info, + status: result instanceof Promise ? "active" /* ACTIVE */ : "done" /* DONE */ + }), result instanceof Promise ? result.then((value) => (this.update({ ...info, status: "done" /* DONE */ }), value), handleException) : result; + } catch (e) { + return handleException(e); + } + } + // Sends the call info to the manager and synchronizes the log. + update(call) { + this.channel?.emit(EVENTS.CALL, call), this.setState(call.storyId, ({ calls }) => { + let callsById = calls.concat(call).reduce((a, c) => Object.assign(a, { [c.id]: c }), {}); + return { + // Calls are sorted to ensure parent calls always come before calls in their callback. + calls: Object.values(callsById).sort( + (a, b) => a.id.localeCompare(b.id, void 0, { numeric: !0 }) + ) + }; + }), this.sync(call.storyId); + } + // Builds a log of interceptable calls and control states and sends it to the manager. + // Uses a 0ms debounce because this might get called many times in one tick. + sync(storyId) { + let synchronize = () => { + let { isLocked, isPlaying } = this.getState(storyId), logItems = this.getLog(storyId), pausedAt = logItems.filter(({ ancestors }) => !ancestors.length).find((item) => item.status === "waiting" /* WAITING */)?.callId, hasActive = logItems.some((item) => item.status === "active" /* ACTIVE */); + if (this.detached || isLocked || hasActive || logItems.length === 0) { + let payload2 = { controlStates: { + detached: this.detached, + start: !1, + back: !1, + goto: !1, + next: !1, + end: !1 + }, logItems }; + this.channel?.emit(EVENTS.SYNC, payload2); + return; + } + let hasPrevious = logItems.some( + (item) => item.status === "done" /* DONE */ || item.status === "error" /* ERROR */ + ), payload = { controlStates: { + detached: this.detached, + start: hasPrevious, + back: hasPrevious, + goto: !0, + next: isPlaying, + end: isPlaying + }, logItems, pausedAt }; + this.channel?.emit(EVENTS.SYNC, payload); + }; + this.setState(storyId, ({ syncTimeout }) => (clearTimeout(syncTimeout), { syncTimeout: setTimeout(synchronize, 0) })); + } +}; +function instrument(obj, options = {}) { + try { + let forceInstrument = !1, skipInstrument = !1; + return global.window?.location?.search?.includes("instrument=true") ? forceInstrument = !0 : global.window?.location?.search?.includes("instrument=false") && (skipInstrument = !0), global.window?.parent === global.window && !forceInstrument || skipInstrument ? obj : (global.window && !global.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ && (global.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ = new Instrumenter()), (global.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).instrument(obj, options)); + } catch (e) { + return once.warn(e), obj; + } +} +function getPropertyDescriptor(obj, propName) { + let target = obj; + for (; target != null; ) { + let descriptor = Object.getOwnPropertyDescriptor(target, propName); + if (descriptor) + return descriptor; + target = Object.getPrototypeOf(target); + } +} +function isClass(obj) { + if (typeof obj != "function") + return !1; + let descriptor = Object.getOwnPropertyDescriptor(obj, "prototype"); + return descriptor ? !descriptor.writable : !1; +} +export { + CallStates, + EVENTS, + instrument +}; diff --git a/tools/ui/node_modules/storybook/dist/manager-api/index.d.ts b/tools/ui/node_modules/storybook/dist/manager-api/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b30aa3b0ab03e1d1c7e4937d0dd401226f1019b2 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/manager-api/index.d.ts @@ -0,0 +1,6948 @@ +import React, { FC, ReactNode, ReactElement, Component } from 'react'; +import { Channel as Channel$1, Listener as Listener$2 } from 'storybook/internal/channels'; +export { Listener as ChannelListener } from 'storybook/internal/channels'; +import { RouterData, NavigateOptions } from 'storybook/internal/router'; +import { Addon_Types, Addon_TypesEnum, Addon_Collection, Addon_TypesMapping, Addon_BaseType, Addon_TestProviderType, Addon_PageType, Addon_WrapperType, Addon_Config, API_ProviderData, API_StateMerger, API_Provider, Globals, GlobalTypes, API_Layout, API_LayoutCustomisations, API_UI, API_PanelPositions, API_Notification, API_IframeRenderer, API_Refs, API_ComposedRef, API_SetRefData, API_ComposedRefUpdate, API_Settings, StoryId, API_LoadedRefData, API_PreparedStoryIndex, API_ViewMode, API_FilterFunction, TagsOptions, Tag as Tag$1, StatusValue as StatusValue$1, API_HashEntry, API_LeafEntry, API_StoryEntry, API_TestEntry, Args, API_IndexHash, API_DocsEntry, API_Versions, API_UnknownEntries, API_Version, API_OptionsData, Parameters, ArgTypes, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn } from 'storybook/internal/types'; +export { Addon_Type as Addon, API_ComponentEntry as ComponentEntry, API_ComposedRef as ComposedRef, API_DocsEntry as DocsEntry, API_GroupEntry as GroupEntry, API_HashEntry as HashEntry, API_IndexHash as IndexHash, API_LeafEntry as LeafEntry, API_Refs as Refs, API_RootEntry as RootEntry, API_IndexHash as StoriesHash, API_StoryEntry as StoryEntry } from 'storybook/internal/types'; +import { ThemeVars } from 'storybook/theming'; +import { OpenInEditorResponsePayload, WhatsNewData } from 'storybook/internal/core-events'; +import { toId, StrictArgTypes, Args as Args$1, StoryId as StoryId$1 } from 'storybook/internal/csf'; + +type ChannelHandler = (event: ChannelEvent) => void; +interface ChannelTransport { + send(event: ChannelEvent, options?: any): void; + setHandler(handler: ChannelHandler): void; +} +interface ChannelEvent { + type: string; + from: string; + args: any[]; +} +interface Listener$1 { + (...args: any[]): void; +} +/** + * Structural interface for Channel, used in type declarations to avoid nominal incompatibility + * between source and dist Channel class declarations. + */ +interface ChannelLike$1 { + readonly isAsync: boolean; + readonly hasTransport: boolean; + addListener(eventName: string, listener: Listener$1): void; + emit(eventName: string, ...args: any): void; + last(eventName: string): any; + eventNames(): string[]; + listenerCount(eventName: string): number; + listeners(eventName: string): Listener$1[] | undefined; + once(eventName: string, listener: Listener$1): void; + removeAllListeners(eventName?: string): void; + removeListener(eventName: string, listener: Listener$1): void; + on(eventName: string, listener: Listener$1): void; + off(eventName: string, listener: Listener$1): void; +} +interface ChannelArgsSingle { + transport?: ChannelTransport; + async?: boolean; +} +interface ChannelArgsMulti { + transports: ChannelTransport[]; + async?: boolean; +} + +declare class Channel implements ChannelLike$1 { + readonly isAsync: boolean; + private sender; + private events; + private data; + private readonly transports; + constructor(input: ChannelArgsMulti); + constructor(input: ChannelArgsSingle); + get hasTransport(): boolean; + addListener(eventName: string, listener: Listener$1): void; + emit(eventName: string, ...args: any): void; + last(eventName: string): any; + eventNames(): string[]; + listenerCount(eventName: string): number; + listeners(eventName: string): Listener$1[] | undefined; + once(eventName: string, listener: Listener$1): void; + removeAllListeners(eventName?: string): void; + removeListener(eventName: string, listener: Listener$1): void; + on(eventName: string, listener: Listener$1): void; + off(eventName: string, listener: Listener$1): void; + private handleEvent; + private onceListener; +} + +/** In-process channel with no transport — the default for unit tests and manager story mocks. */ +declare function mockChannel(): Channel; + +declare class AddonStore { + constructor(); + private loaders; + private elements; + private config; + private channel; + private promise; + private resolve; + getChannel: () => Channel$1; + ready: () => Promise; + hasChannel: () => boolean; + setChannel: (channel: Channel$1) => void; + getElements(type: T): Addon_Collection | any; + /** + * Adds an addon to the addon store. + * + * @param {string} id - The id of the addon. + * @param {Addon_Type} addon - The addon to add. + * @returns {void} + */ + add(id: string, addon: Addon_BaseType | Omit | Omit | Omit): void; + setConfig: (value: Addon_Config) => void; + getConfig: () => Addon_Config; + /** + * Registers an addon loader function. + * + * @param {string} id - The id of the addon loader. + * @param {(api: API) => void} callback - The function that will be called to register the addon. + * @returns {void} + */ + register: (id: string, callback: (api: API) => void) => void; + loadAddons: (api: any) => void; + experimental_getRegisteredAddons(type?: T): string[]; +} +declare const addons: AddonStore; + +type GetState = () => State; +type SetState = (a: any, b: any) => any; +interface Upstream { + /** + * Whether to allow persistence of state to local/sessionStorage. This is used to disable + * persistence in Storybook's own tests. True by default. + */ + allowPersistence?: boolean; + getState: GetState; + setState: SetState; +} +type Patch = Partial; +type InputFnPatch = (s: State) => Patch; +type InputPatch = Patch | InputFnPatch; +type PersistenceHandler = (patch: Partial, serialize: ((s: State) => Partial>) | undefined) => void | Promise; +interface Options { + persistence: 'none' | 'session' | 'url' | string; + serialize?: (s: State) => Partial>; +} +type CallBack = (s: State) => void; +declare class Store { + upstreamPersistence: boolean; + upstreamGetState: GetState; + upstreamSetState: SetState; + private persistenceHandlers; + constructor({ allowPersistence, setState, getState }: Upstream); + registerPersistenceHandler(key: string, handler: PersistenceHandler): void; + getInitialState(base: State): any; + getState(): State; + setState(inputPatch: InputPatch, options?: Options): Promise; + setState(inputPatch: InputPatch, callback?: CallBack, options?: Options): Promise; +} + +type ModuleFn = (m: ModuleArgs, options?: any) => { + init?: () => void | Promise; + api: APIType; + state: StateType; +}; +type ModuleArgs = RouterData & API_ProviderData & { + mode?: 'production' | 'development'; + state: State; + fullAPI: API; + store: Store; +}; + +interface SubAPI$d { + /** + * Returns a collection of elements of a specific type. + * + * @template T - The type of the elements in the collection. + * @param {Addon_Types | Addon_TypesEnum.experimental_PAGE} type - The type of the elements to + * retrieve. + * @returns {Addon_Collection} - A collection of elements of the specified type. + * @protected This is used internally in storybook's manager. + */ + getElements: (type: T) => Addon_Collection; + /** + * Clears statuses for all registered test providers by calling each provider's `clear` function. + */ + clearStatuses: () => void; + /** + * Returns the id of the currently selected panel. + * + * @returns {string} - The ID of the currently selected panel. + */ + getSelectedPanel: () => string; + /** + * Sets the currently selected panel via it's ID. + * + * @param {string} panelName - The ID of the panel to select. + * @returns {void} + */ + setSelectedPanel: (panelName: string) => void; + /** + * Sets the state of an addon with the given ID. + * + * @deprecated This API might get dropped, if you are using this, please file an issue. + * @template S - The type of the addon state. + * @param {string} addonId - The ID of the addon to set the state for. + * @param {S | API_StateMerger} newStateOrMerger - The new state to set, or a function which + * receives the current state and returns the new state. + * @param {Options} [options] - Optional options for the state update. + * @returns {Promise} - A promise that resolves with the new state after it has been set. + */ + setAddonState(addonId: string, newStateOrMerger: S | API_StateMerger, options?: Options): Promise; + /** + * Returns the state of an addon with the given ID. + * + * @deprecated This API might get dropped, if you are using this, please file an issue. + * @template S - The type of the addon state. + * @param {string} addonId - The ID of the addon to get the state for. + * @returns {S} - The state of the addon with the given ID. + */ + getAddonState(addonId: string): S; +} + +interface SubAPI$c { + /** + * Returns the channel object. + * + * @protected Please do not use, it's for internal use only. + */ + getChannel: () => API_Provider['channel']; + /** + * Adds a listener to the channel for the given event type. Returns a function that can be called + * to remove the listener. + * + * @param type - The event type to listen for. If using a core event, import it from + * `storybook/internal/core-events`. + * @param handler - The callback function to be called when the event is emitted. + * @returns A function that can be called to remove the listener. + */ + on: (type: string, handler: Listener$2) => () => void; + /** + * Removes a listener from the channel for the given event type. + * + * @param type - The event type to remove the listener from. If using a core event, import it from + * `storybook/internal/core-events`. + * @param handler - The callback function to be removed. + */ + off: (type: string, handler: Listener$2) => void; + /** + * Emits an event on the channel for the given event type. + * + * @param type - The event type to emit. If using a core event, import it from + * `storybook/internal/core-events`. + * @param args - The arguments to pass to the event listener. + */ + emit: (type: string, ...args: any[]) => void; + /** + * Adds a one-time listener to the channel for the given event type. + * + * @param type - The event type to listen for. If using a core event, import it from + * `storybook/internal/core-events`. + * @param handler - The callback function to be called when the event is emitted. + */ + once: (type: string, handler: Listener$2) => void; +} + +interface SubState$9 { + globals?: Globals; + userGlobals?: Globals; + storyGlobals?: Globals; + globalTypes?: GlobalTypes; +} +interface SubAPI$b { + /** + * Returns the current globals, which is the user globals overlaid with the story globals + * + * @returns {Globals} The current globals. + */ + getGlobals: () => Globals; + /** + * Returns the current globals, as set by the user (a story may have override values) + * + * @returns {Globals} The current user globals. + */ + getUserGlobals: () => Globals /** + * /** Returns the current globals, as set by the story + * + * @returns {Globals} The current story globals. + */; + getStoryGlobals: () => Globals /** + * Returns the globalTypes, as defined at the project level. + * + * @returns {GlobalTypes} The globalTypes. + */; + getGlobalTypes: () => GlobalTypes; + /** + * Updates the current globals with the provided new globals. + * + * @param {Globals} newGlobals - The new globals to update with. + * @returns {void} + */ + updateGlobals: (newGlobals: Globals) => void; +} + +interface SubState$8 { + layout: API_Layout; + layoutCustomisations: API_LayoutCustomisations; + ui: API_UI; + selectedPanel: string | undefined; + theme: ThemeVars; +} +/** + * Availability of the sidebar/nav: 'unavailable' means the current route suppresses the nav + * entirely (review routes), otherwise it is 'shown' or 'hidden' based on the layout state. + */ +type NavAvailability = 'shown' | 'hidden' | 'unavailable'; +interface SubAPI$a { + /** + * Toggles the fullscreen mode of the Storybook UI. + * + * @param toggled - Optional boolean value to set the fullscreen mode to. If not provided, it will + * toggle the current state. + */ + toggleFullscreen: (toggled?: boolean) => void; + /** + * Toggles the visibility of the panel in the Storybook UI. + * + * @param toggled - Optional boolean value to set the panel visibility to. If not provided, it + * will toggle the current state. + */ + togglePanel: (toggled?: boolean) => void; + /** + * Toggles the position of the panel in the Storybook UI. + * + * @param position - Optional string value to set the panel position to. If not provided, it will + * toggle between 'bottom' and 'right'. + */ + togglePanelPosition: (position?: API_PanelPositions) => void; + /** + * Toggles the visibility of the navigation bar in the Storybook UI. + * + * @param toggled - Optional boolean value to set the navigation bar visibility to. If not + * provided, it will toggle the current state. + */ + toggleNav: (toggled?: boolean) => void; + /** + * Toggles the visibility of the toolbar in the Storybook UI. + * + * @param toggled - Optional boolean value to set the toolbar visibility to. If not provided, it + * will toggle the current state. + */ + toggleToolbar: (toggled?: boolean) => void; + /** + * Sets the options for the Storybook UI. + * + * @param options - An object containing the options to set. + */ + setOptions: (options: any) => void; + /** Sets the sizes of the resizable elements in the layout. */ + setSizes: (options: Partial>) => void; + /** GetIsFullscreen - Returns the current fullscreen mode of the Storybook UI. */ + getIsFullscreen: () => boolean; + /** GetIsPanelShown - Returns the current visibility of the panel in the Storybook UI. */ + getIsPanelShown: () => boolean; + /** GetIsNavShown - Returns the current visibility of the navigation bar in the Storybook UI. */ + getIsNavShown: () => boolean; + /** + * GetNavAvailability - Returns whether the sidebar/nav is shown, hidden (but can be shown by the + * user), or unavailable because the current route suppresses it entirely (review routes). + */ + getNavAvailability: () => NavAvailability; + /** + * GetShowToolbarWithCustomisations - Returns the current visibility of the toolbar, taking into + * account customisations requested by the end user via a layoutCustomisations function. + */ + getShowToolbarWithCustomisations: (showToolbar: boolean) => boolean; + /** + * GetShowPanelWithCustomisations - Returns the current visibility of the addon panel, taking into + * account customisations requested by the end user via a layoutCustomisations function. + */ + getShowPanelWithCustomisations: (showPanel: boolean) => boolean; + /** + * GetNavSizeWithCustomisations - Returns the size to apply to the sidebar/nav, taking into + * account customisations requested by the end user via a layoutCustomisations function. + */ + getNavSizeWithCustomisations: (navSize: number) => number; + /** + * Attempts to focus an element identified by its ID. + * + * @param elementId - The id of the element to focus. + * @param options - Options for focusing the element. + * @param options.forceFocus - Whether to make the element focusable even though it wasn't. + * @param options.select - Whether to call select() on the element after focusing it. + * @param options.poll - Whether to poll for the element if it is not immediately available. + * Defaults to true. When true, polls every 50ms for up to 500ms. + * @returns Whether the element was successfully focused. Returns a Promise when polling. + */ + focusOnUIElement: (elementId?: string, options?: boolean | { + forceFocus?: boolean; + select?: boolean; + poll?: boolean; + }) => boolean | Promise; +} + +interface SubState$7 { + notifications: API_Notification[]; +} +/** The API for managing notifications. */ +interface SubAPI$9 { + /** + * Adds a new notification to the list of notifications. If a notification with the same ID + * already exists, it will be replaced. + * + * @param notification - The notification to add. + */ + addNotification: (notification: API_Notification) => void; + /** + * Removes a notification from the list of notifications and calls the onClear callback. + * + * @param id - The ID of the notification to remove. + */ + clearNotification: (id: string) => void; +} + +/** The API for opening files in the editor. */ +interface SubAPI$8 { + /** + * Opens the file in the editor. You can optionally provide a line and column number to open at a + * more specific location. + */ + openInEditor: (payload: { + file: string; + line?: number; + column?: number; + }) => Promise; +} + +interface SubAPI$7 { + renderPreview?: API_IframeRenderer; +} + +interface SubState$6 { + refs: API_Refs; +} +interface SubAPI$6 { + /** + * Finds a composed ref by its source. + * + * @param {string} source - The source/URL of the composed ref. + * @returns {API_ComposedRef} - The composed ref object. + */ + findRef: (source: string) => API_ComposedRef; + /** + * Sets a composed ref by its ID and data. + * + * @param {string} id - The ID of the composed ref. + * @param {API_SetRefData} data - The data to set for the composed ref. + * @param {boolean} [ready] - Whether the composed ref is ready. + */ + setRef: (id: string, data: API_SetRefData, ready?: boolean) => void; + /** + * Updates a composed ref by its ID and update object. + * + * @param {string} id - The ID of the composed ref. + * @param {API_ComposedRefUpdate} ref - The update object for the composed ref. + */ + updateRef: (id: string, ref: API_ComposedRefUpdate) => Promise; + /** + * Gets all composed refs. + * + * @returns {API_Refs} - The composed refs object. + */ + getRefs: () => API_Refs; + /** + * Checks if a composed ref is valid. + * + * @param {API_SetRefData} ref - The composed ref to check. + * @returns {Promise} - A promise that resolves when the check is complete. + */ + checkRef: (ref: API_SetRefData) => Promise; + /** + * Changes the version of a composed ref by its ID and URL. + * + * @param {string} id - The ID of the composed ref. + * @param {string} url - The new URL for the composed ref. + */ + changeRefVersion: (id: string, url: string) => Promise; + /** + * Changes the state of a composed ref by its ID and previewInitialized flag. + * + * @param {string} id - The ID of the composed ref. + * @param {boolean} previewInitialized - The new previewInitialized flag for the composed ref. + */ + changeRefState: (id: string, previewInitialized: boolean) => void; +} + +interface SubAPI$5 { + storeSelection: () => void; + retrieveSelection: () => StoryId; + /** + * Changes the active settings tab. + * + * @example + * + * ```ts + * changeSettingsTab(`about`); + * ``` + * + * @param path - The path of the settings page to navigate to. The path NOT should include the + * `/settings` prefix. + */ + changeSettingsTab: (path: string) => void; + /** Closes the settings screen and returns to the last tracked story or the first story. */ + closeSettings: () => void; + /** + * Checks if the settings screen is currently active. + * + * @returns A boolean indicating whether the settings screen is active. + */ + isSettingsScreenActive: () => boolean; +} +interface SubState$5 { + settings: API_Settings; +} + +declare const controlOrMetaSymbol: () => "⌘" | "ctrl"; +declare const controlOrMetaKey: () => "meta" | "control"; +declare const optionOrAltSymbol: () => "⌥" | "alt"; +declare const isShortcutTaken: (arr1: string[], arr2: string[]) => boolean; +type KeyboardEventLike = Pick; +declare const eventToShortcut: (e: KeyboardEventLike) => (string | string[])[] | null; +declare const shortcutMatchesShortcut: (inputShortcut: (string | string[])[], shortcut: API_KeyCollection) => boolean; +declare const eventMatchesShortcut: (e: KeyboardEventLike, shortcut: API_KeyCollection) => boolean; +/** + * Returns a human-readable symbol for a keyboard key. + * + * @param key The key to convert to a symbol. + * @returns A string that a human could understand as that keyboard key. + */ +declare const keyToSymbol: (key: string) => string; +declare const shortcutToHumanString: (shortcut: API_KeyCollection) => string; +declare const shortcutToAriaKeyshortcuts: (shortcut: API_KeyCollection) => string; + +interface SubState$4 { + shortcuts: API_Shortcuts; +} +interface SubAPI$4 { + /** Returns the current shortcuts. */ + getShortcutKeys(): API_Shortcuts; + /** Returns the default shortcuts. */ + getDefaultShortcuts(): API_Shortcuts | API_AddonShortcutDefaults; + /** Returns the shortcuts for addons. */ + getAddonsShortcuts(): API_AddonShortcuts; + /** Returns the labels for addon shortcuts. */ + getAddonsShortcutLabels(): API_AddonShortcutLabels; + /** Returns the default shortcuts for addons. */ + getAddonsShortcutDefaults(): API_AddonShortcutDefaults; + /** + * Sets the shortcuts to the given value. + * + * @param shortcuts The new shortcuts to set. + * @returns A promise that resolves to the new shortcuts. + */ + setShortcuts(update: API_Shortcuts | ((shortcuts: API_Shortcuts) => API_Shortcuts)): Promise; + /** + * Sets the shortcut for the given action to the given value. + * + * @param action The action to set the shortcut for. + * @param value The new shortcut to set. + * @returns A promise that resolves to the new shortcut. + */ + setShortcut(action: API_Action, value: API_KeyCollection): Promise; + /** + * Sets the shortcut for the given addon to the given value. + * + * @param addon The addon to set the shortcut for. + * @param shortcut The new shortcut to set. + * @returns A promise that resolves to the new addon shortcut. + */ + setAddonShortcut(addon: string, shortcut: API_AddonShortcut): Promise; + /** + * Restores all default shortcuts. + * + * @returns A promise that resolves to the new shortcuts. + */ + restoreAllDefaultShortcuts(): Promise; + /** + * Restores the default shortcut for the given action. + * + * @param action The action to restore the default shortcut for. + * @returns A promise that resolves to the new shortcut. + */ + restoreDefaultShortcut(action: API_Action): Promise; + /** + * Handles a keydown event. + * + * @param event The event to handle. + */ + handleKeydownEvent(event: KeyboardEventLike): void; + /** + * Handles a shortcut feature. + * + * @param feature The feature to handle. + * @param event The event to handle. + */ + handleShortcutFeature(feature: API_Action, event: KeyboardEventLike): void; +} +type API_KeyCollection = string[]; +interface API_Shortcuts { + fullScreen: API_KeyCollection; + togglePanel: API_KeyCollection; + panelPosition: API_KeyCollection; + toggleNav: API_KeyCollection; + toolbar: API_KeyCollection; + search: API_KeyCollection; + focusNav: API_KeyCollection; + focusIframe: API_KeyCollection; + focusPanel: API_KeyCollection; + prevComponent: API_KeyCollection; + nextComponent: API_KeyCollection; + prevStory: API_KeyCollection; + nextStory: API_KeyCollection; + shortcutsPage: API_KeyCollection; + aboutPage: API_KeyCollection; + escape: API_KeyCollection; + collapseAll: API_KeyCollection; + expandAll: API_KeyCollection; + remount: API_KeyCollection; + openInEditor: API_KeyCollection; + openInIsolation: API_KeyCollection; + copyStoryLink: API_KeyCollection; + goToPreviousLandmark: API_KeyCollection; + goToNextLandmark: API_KeyCollection; +} +type API_Action = keyof API_Shortcuts; +interface API_AddonShortcut { + label: string; + defaultShortcut: API_KeyCollection; + actionName: string; + showInMenu?: boolean; + action: (...args: any[]) => any; +} +type API_AddonShortcuts = Record; +type API_AddonShortcutLabels = Record; +type API_AddonShortcutDefaults = Record; + +type Direction = -1 | 1; +type ParameterName = string; +type StoryUpdate = Partial>; +type DocsUpdate = Partial>; +interface SubState$3 extends API_LoadedRefData { + storyId: StoryId; + internal_index?: API_PreparedStoryIndex; + viewMode: API_ViewMode; + filters: Record; + tagPresets: TagsOptions; + defaultIncludedTagFilters: Tag$1[]; + defaultExcludedTagFilters: Tag$1[]; + includedTagFilters: Tag$1[]; + excludedTagFilters: Tag$1[]; + includedStatusFilters: StatusValue$1[]; + excludedStatusFilters: StatusValue$1[]; +} +interface SubAPI$3 { + /** + * The `storyId` method is a reference to the `toId` function from `@storybook/csf`, which is used + * to generate a unique ID for a story. This ID is used to identify a specific story in the + * Storybook index. + * + * @type {typeof toId} + */ + storyId: typeof toId; + /** + * Resolves a story, docs, component or group ID to its corresponding hash entry in the index. + * + * @param {StoryId} storyId - The ID of the story to resolve. + * @param {string} [refsId] - The ID of the refs to use for resolving the story. + * @returns {API_HashEntry} - The hash entry corresponding to the given story ID. + */ + resolveStory: (storyId: StoryId, refsId?: string) => API_HashEntry | undefined; + /** + * Selects the first story to display in the Storybook UI. + * + * @returns {void} + */ + selectFirstStory: () => void; + /** + * Selects a story to display in the Storybook UI. + * + * @param {string} [kindOrId] - The kind or ID of the story to select. + * @param {StoryId} [story] - The ID of the story to select. + * @param {Object} [obj] - An optional object containing additional options. + * @param {string} [obj.ref] - The ref ID of the story to select. + * @param {API_ViewMode} [obj.viewMode] - The view mode to display the story in. + * @returns {void} + */ + selectStory: (kindOrId?: string, story?: StoryId, obj?: { + ref?: string; + viewMode?: API_ViewMode; + }) => void; + /** + * Returns the current story's data, including its ID, kind, name, and parameters. + * + * @returns {API_LeafEntry} The current story's data. + */ + getCurrentStoryData: () => API_LeafEntry; + /** + * Returns the current story index. + * + * @returns {API_PreparedStoryIndex | undefined} The current story index, or undefined if not yet + * loaded. + */ + getIndex: () => API_PreparedStoryIndex | undefined; + /** + * Sets the prepared story index to the given value. + * + * @param {API_PreparedStoryIndex} index - The prepared story index to set. + * @returns {Promise} A promise that resolves when the prepared story index has been set. + */ + setIndex: (index: API_PreparedStoryIndex) => Promise; + /** + * Jumps to the next or previous component in the index. + * + * @param {Direction} direction - The direction to jump. Use -1 to jump to the previous component, + * and 1 to jump to the next component. + * @returns {void} + */ + jumpToComponent: (direction: Direction) => void; + /** + * Jumps to the next or previous story in the story index. + * + * @param {Direction} direction - The direction to jump. Use -1 to jump to the previous story, and + * 1 to jump to the next story. + * @returns {void} + */ + jumpToStory: (direction: Direction) => void; + /** + * Returns the data for the given story ID and optional ref ID. + * + * @param {StoryId} storyId - The ID of the story to retrieve data for. + * @param {string} [refId] - The ID of the ref to retrieve data for. If not provided, retrieves + * data for the default ref. + * @returns {API_LeafEntry} The data for the given story ID and optional ref ID. + */ + getData: (storyId: StoryId, refId?: string) => API_LeafEntry; + /** + * Returns a boolean indicating whether the given story ID and optional ref ID have been prepared. + * + * @param {StoryId} storyId - The ID of the story to check. + * @param {string} [refId] - The ID of the ref to check. If not provided, checks all refs for the + * given story ID. + * @returns {boolean} A boolean indicating whether the given story ID and optional ref ID have + * been prepared. + */ + isPrepared: (storyId: StoryId, refId?: string) => boolean; + /** + * Returns the parameters for the given story ID and optional ref ID. + * + * @param {StoryId | { storyId: StoryId; refId: string }} storyId - The ID of the story to + * retrieve parameters for, or an object containing the story ID and ref ID. + * @param {ParameterName} [parameterName] - The name of the parameter to retrieve. If not + * provided, returns all parameters. + * @returns {API_StoryEntry['parameters'] | any} The parameters for the given story ID and + * optional ref ID. + */ + getParameters: (storyId: StoryId | { + storyId: StoryId; + refId: string; + }, parameterName?: ParameterName) => API_StoryEntry['parameters'] | any; + /** + * Returns the current value of the specified parameter for the currently selected story. + * + * @template S - The type of the parameter value. + * @param {ParameterName} [parameterName] - The name of the parameter to retrieve. If not + * provided, returns all parameters. + * @returns {S} The value of the specified parameter for the currently selected story. + */ + getCurrentParameter(parameterName?: ParameterName): S; + /** + * Updates the arguments for the given story with the provided new arguments. + * + * @param {API_StoryEntry | API_TestEntry} story - The story to update the arguments for. + * @param {Args} newArgs - The new arguments to set for the story. + * @returns {void} + */ + updateStoryArgs(story: API_StoryEntry | API_TestEntry, newArgs: Args): void; + /** + * Resets the arguments for the given story to their initial values. + * + * @param {API_StoryEntry | API_TestEntry} story - The story to reset the arguments for. + * @param {string[]} [argNames] - An optional array of argument names to reset. If not provided, + * all arguments will be reset. + * @returns {void} + */ + resetStoryArgs: (story: API_StoryEntry | API_TestEntry, argNames?: string[]) => void; + /** + * Finds the leaf entry for the given story ID in the given story index. + * + * @param {API_IndexHash} index - The story index to search for the leaf entry in. + * @param {StoryId} storyId - The ID of the story to find the leaf entry for. + * @returns {API_LeafEntry | undefined} The leaf entry for the given story ID, or undefined if no + * leaf entry was found. + */ + findLeafEntry(index: API_IndexHash, storyId: StoryId): API_LeafEntry | undefined; + /** + * Finds the leaf story ID for the given component or group ID in the given index. + * + * @param {API_IndexHash} index - The story index to search for the leaf story ID in. + * @param {StoryId} storyId - The ID of the story to find the leaf story ID for. + * @returns {StoryId | undefined} The ID of the leaf story, or undefined if no leaf story was + * found. + */ + findLeafStoryId(index: API_IndexHash, storyId: StoryId): StoryId | undefined; + /** + * Finds all the leaf story IDs for the given entry ID in the given index. + * + * @param {StoryId} entryId - The ID of the entry to find the leaf story IDs for. + * @returns {StoryId[]} The IDs of all the leaf stories, or an empty array if no leaf stories were + * found. + */ + findAllLeafStoryIds(entryId: string): StoryId[]; + /** + * Finds the ID of the sibling story in the given direction for the given story ID in the given + * story index. + * + * @param {StoryId} storyId - The ID of the story to find the sibling of. + * @param {API_IndexHash} index - The story index to search for the sibling in. + * @param {Direction} direction - The direction to search for the sibling in. + * @param {boolean} toSiblingGroup - When true, skips over leafs within the same group. + * @returns {StoryId} The ID of the sibling story, or null if no sibling was found. + */ + findSiblingStoryId(storyId: StoryId, index: API_IndexHash, direction: Direction, toSiblingGroup: boolean): StoryId; + /** + * Fetches the story index from the server. + * + * @returns {Promise} A promise that resolves when the index has been fetched. + */ + fetchIndex: () => Promise; + /** + * Updates the story with the given ID with the provided update object. + * + * @param {StoryId} storyId - The ID of the story to update. + * @param {StoryUpdate} update - An object containing the updated story information. + * @param {API_ComposedRef} [ref] - The composed ref of the story to update. + * @returns {Promise} A promise that resolves when the story has been updated. + */ + updateStory: (storyId: StoryId, update: StoryUpdate, ref?: API_ComposedRef) => Promise; + /** + * Updates the documentation for the given story ID with the given update object. + * + * @param {StoryId} storyId - The ID of the story to update. + * @param {DocsUpdate} update - An object containing the updated documentation information. + * @param {API_ComposedRef} [ref] - The composed ref of the story to update. + * @returns {Promise} A promise that resolves when the documentation has been updated. + */ + updateDocs: (storyId: StoryId, update: DocsUpdate, ref?: API_ComposedRef) => Promise; + /** + * Sets the preview as initialized. + * + * @param {ComposedRef} [ref] - The composed ref of the story to set as initialized. + * @returns {Promise} A promise that resolves when the preview has been set as initialized. + */ + setPreviewInitialized: (ref?: API_ComposedRef) => Promise; + /** + * Updates the filtering of the index. + * + * @param {string} addonId - The ID of the addon to update. + * @param {API_FilterFunction} filterFunction - A function that returns a boolean based on the + * story, index and status. + * @returns {Promise} A promise that resolves when the state has been updated. + */ + experimental_setFilter: (addonId: string, filterFunction: API_FilterFunction) => Promise; + /** Resets tag filters in the sidebar to the default filters. */ + resetTagFilters(): Promise; + /** + * Replaces all tag filters in the sidebar with the provided included and excluded lists. + * + * @param included The tags to include in the filtered stories list + * @param excluded The tags to filter out (exclude) from the stories list + */ + setAllTagFilters(included: Tag$1[], excluded: Tag$1[]): Promise; + /** + * Adds tag filters to the included or excluded filter lists. Included filters are included in the + * stories list, whereas excluded filters are filtered out. + * + * @param tags The tags to add as filters. + * @param excluded Whether to add the tags to the include or exclude filter list. + */ + addTagFilters(tags: Tag$1[], excluded: boolean): Promise; + /** + * Removes tag filters from both the included and excluded filter lists. + * + * @param tags The tags to remove from filters. + */ + removeTagFilters(tags: Tag$1[]): Promise; + /** Resets status filters in the sidebar (clears both included and excluded). */ + resetStatusFilters(): Promise; + /** + * Replaces all status filters in the sidebar with the provided included and excluded lists. + * + * @param included The status values to include in the filtered stories list + * @param excluded The status values to filter out (exclude) from the stories list + */ + setAllStatusFilters(included: StatusValue$1[], excluded: StatusValue$1[]): Promise; + /** + * Adds status filters to the included or excluded filter lists. + * + * @param statuses The status values to add as filters. + * @param excluded Whether to add to the include or exclude filter list. + */ + addStatusFilters(statuses: StatusValue$1[], excluded: boolean): Promise; + /** + * Removes status filters from both the included and excluded filter lists. + * + * @param statuses The status values to remove from filters. + */ + removeStatusFilters(statuses: StatusValue$1[]): Promise; +} + +interface SubState$2 { + customQueryParams: QueryParams; +} +interface QueryParams { + [key: string]: string | undefined; +} +interface QueryParamInput { + [key: string]: string | undefined | null; +} +/** SubAPI for managing URL navigation and state. */ +interface SubAPI$2 { + /** + * Navigate to a new URL. + * + * @param {string} url - The URL to navigate to. + * @param {NavigateOptions} options - Options for the navigation. + * @returns {void} + */ + navigateUrl: (url: string, options: NavigateOptions) => void; + /** + * Get the manager and preview hrefs for a story. + * + * @param {string} storyId - The ID of the story to get the URL for. + * @param {Object} options - Options for the URL. + * @param {string} [options.base] - Return an absolute href based on the current origin or network + * address. + * @param {boolean} [options.inheritArgs] - Inherit args from the current URL. If storyId matches + * current story, inheritArgs defaults to true. + * @param {boolean} [options.inheritGlobals] - Inherit globals from the current URL. Defaults to + * true. + * @param {QueryParams} [options.queryParams] - Query params to add to the URL. + * @param {string} [options.refId] - ID of the ref to get the URL for (for composed Storybooks) + * @param {string} [options.viewMode] - The view mode to use, defaults to 'story'. + * @param {boolean} [options.embed] - Append `embed=true` so the preview broadcasts + * content dimensions to an embedding parent via `iframe.resize` postMessage. Affects + * `previewHref` only. + * @param {boolean} [options.freeze] - Append the `freeze=finished` preview contract so the + * preview settles to a static end frame and blocks interaction. Affects `previewHref` only. + * @returns {Object} Manager and preview hrefs for the story. + */ + getStoryHrefs(storyId: string, options?: { + base?: 'origin' | 'network'; + inheritArgs?: boolean; + inheritGlobals?: boolean; + queryParams?: QueryParams; + refId?: string; + viewMode?: API_ViewMode; + embed?: boolean; + freeze?: boolean; + }): { + managerHref: string; + previewHref: string; + }; + /** + * Get the value of a query parameter from the current URL. + * + * @param {string} key - The key of the query parameter to get. + * @returns {string | undefined} The value of the query parameter, or undefined if it does not + * exist. + */ + getQueryParam: (key: string) => string | undefined; + /** + * Returns an object containing the current state of the URL. + * + * @returns {{ + * queryParams: QueryParams; + * path: string; + * viewMode?: string; + * storyId?: string; + * url: string; + * }} + * An object containing the current state of the URL. + */ + getUrlState: () => { + queryParams: QueryParams; + path: string; + hash: string; + viewMode?: string; + storyId?: string; + url: string; + }; + /** + * Set the query parameters for the current URL. + * + * @param {QueryParams} input - An object containing the query parameters to set. + * @returns {void} + */ + setQueryParams: (input: QueryParamInput) => void; + /** + * Set the query parameters for the current URL & navigates. + * + * @param {QueryParams} input - An object containing the query parameters to set. + * @param {NavigateOptions} options - Options for the navigation. + * @returns {void} + */ + applyQueryParams: (input: QueryParamInput, options?: NavigateOptions) => void; +} + +interface SubState$1 { + versions: API_Versions & API_UnknownEntries; + lastVersionCheck: number; + dismissedVersionNotification: undefined | string; +} +interface SubAPI$1 { + /** + * Returns the current version of the Storybook Manager. + * + * @returns {API_Version} The current version of the Storybook Manager. + */ + getCurrentVersion: () => API_Version; + /** + * Returns the latest version of the Storybook Manager. + * + * @returns {API_Version} The latest version of the Storybook Manager. + */ + getLatestVersion: () => API_Version; + /** + * Returns the URL of the Storybook documentation for the current version. + * + * @param options - The options for the documentation URL. + * @param options.asset - Like subpath, but links to the docs-assets directory. + * @param options.subpath - The subpath of the documentation URL. + * @param options.versioned - Whether to include the versioned path. + * @param options.renderer - Whether to include the renderer path. + * @param options.ref - Tracking reference for the docs site. E.g. 'ui', 'error', 'upgrade', etc. + * @returns {string} The URL of the Storybook Manager documentation. + */ + getDocsUrl: (options: { + asset?: string; + subpath?: string; + versioned?: boolean; + renderer?: boolean; + ref?: string; + }) => string; + /** + * Checks if an update is available for the Storybook Manager. + * + * @returns {boolean} True if an update is available, false otherwise. + */ + versionUpdateAvailable: () => boolean; +} + +type SubState = { + whatsNewData?: WhatsNewData; +}; +type SubAPI = { + isWhatsNewUnread(): boolean; + whatsNewHasBeenRead(): void; + toggleWhatsNewNotifications(): void; +}; + +declare class RequestResponseError | void> extends Error { + payload: Payload | undefined; + constructor(message: string, payload?: Payload); +} +declare const experimental_requestResponse: | void = void>(channel: Channel$1, requestEvent: string, responseEvent: string, payload: RequestPayload, timeout?: number) => Promise; + +declare const isMacLike: () => boolean; + +declare const _default: (a: TObj, ...b: Partial[]) => TObj; + +declare const ActiveTabs: { + SIDEBAR: "sidebar"; + CANVAS: "canvas"; + ADDONS: "addons"; +}; + +declare const ManagerContext: React.Context<{ + api: API; + state: State; +}>; +type State = SubState$8 & SubState$3 & SubState$6 & SubState$7 & SubState$1 & SubState$2 & SubState$4 & SubState$5 & SubState$9 & SubState & RouterData & API_OptionsData & Other; +type API = SubAPI$d & SubAPI$c & SubAPI$7 & SubAPI$3 & SubAPI$6 & SubAPI$b & SubAPI$a & SubAPI$9 & SubAPI$4 & SubAPI$5 & SubAPI$1 & SubAPI$2 & SubAPI & SubAPI$8 & Other; +interface Other { + [key: string]: any; +} +interface Combo { + api: API; + state: State; +} +type ManagerProviderProps = RouterData & API_ProviderData & { + children: ReactNode | FC; +}; +declare const combineParameters: (...parameterSets: Parameters[]) => {}; +declare class ManagerProvider extends Component { + api: API; + modules: ReturnType[]; + mounted: boolean; + static displayName: string; + constructor(props: ManagerProviderProps); + componentDidMount(): void; + static getDerivedStateFromProps(props: ManagerProviderProps, state: State): State; + shouldComponentUpdate(nextProps: ManagerProviderProps, nextState: State): boolean; + initModules: () => void; + render(): React.JSX.Element; +} +interface ManagerConsumerProps

{ + filter?: (combo: Combo) => P; + children: FC

| ReactNode; +} +declare function ManagerConsumer

({ filter, children, }: ManagerConsumerProps

): ReactElement; +declare function useStorybookState(): State; +declare function useStorybookApi(): API; + +interface API_EventMap { + [eventId: string]: Listener$2; +} +declare const useChannel: (eventMap: API_EventMap, deps?: any[]) => (type: string, ...args: any[]) => void; +declare function useStoryPrepared(storyId?: StoryId): boolean; +declare function useParameter(parameterKey: string, defaultValue?: S): S; +declare function useSharedState(stateId: string, defaultState?: S): [S, (newStateOrMerger: S | API_StateMerger, options?: Options) => void]; +declare function useAddonState(addonId: string, defaultState?: S): [S, (newStateOrMerger: S | API_StateMerger, options?: Options) => void]; +declare function useArgs(): [Args, (newArgs: Args) => void, (argNames?: string[]) => void, Args]; +declare function useGlobals(): [ + globals: Globals, + updateGlobals: (newGlobals: Globals) => void, + storyGlobals: Globals, + userGlobals: Globals +]; +declare function useGlobalTypes(): GlobalTypes; +declare function useArgTypes(): ArgTypes; + +declare const typesX: typeof Addon_TypesEnum; + +type EnvironmentType = (typeof UniversalStore.Environment)[keyof typeof UniversalStore.Environment]; +type StatusType = (typeof UniversalStore.Status)[keyof typeof UniversalStore.Status]; +type StateUpdater = (prevState: TState) => TState; +type Actor = { + id: string; + type: (typeof UniversalStore.ActorType)[keyof typeof UniversalStore.ActorType]; + environment: EnvironmentType; +}; +type EventInfo = { + actor: Actor; + forwardingActor?: Actor; +}; +type Listener = (event: TEvent, eventInfo: EventInfo) => void; +type BaseEvent = { + type: string; + payload?: any; +}; +interface SetStateEvent extends BaseEvent { + type: typeof UniversalStore.InternalEventType.SET_STATE; + payload: { + state: TState; + previousState: TState; + }; +} +interface ExistingStateRequestEvent extends BaseEvent { + type: typeof UniversalStore.InternalEventType.EXISTING_STATE_REQUEST; + payload: never; +} +interface ExistingStateResponseEvent extends BaseEvent { + type: typeof UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE; + payload: TState; +} +interface LeaderCreatedEvent extends BaseEvent { + type: typeof UniversalStore.InternalEventType.LEADER_CREATED; + payload: never; +} +interface FollowerCreatedEvent extends BaseEvent { + type: typeof UniversalStore.InternalEventType.FOLLOWER_CREATED; + payload: never; +} +type InternalEvent = SetStateEvent | ExistingStateRequestEvent | ExistingStateResponseEvent | FollowerCreatedEvent | LeaderCreatedEvent; +type Event = TEvent | InternalEvent; +type ChannelLike = Pick; +type StoreOptions = { + id: string; + leader?: boolean; + initialState?: TState; + debug?: boolean; +}; +type EnvironmentOverrides = { + channel: ChannelLike; + environment: EnvironmentType; +}; + +/** + * A universal store implementation that synchronizes state across different environments using a + * channel-based communication. + * + * The store follows a leader-follower pattern where: + * + * - Leader: The main store instance that owns and manages the state + * - Follower: Store instances that mirror the leader's state + * + * Features: + * + * - State synchronization across environments + * - Event-based communication + * - Type-safe state and custom events + * - Subscription system for state changes and custom events + * + * @remarks + * - The store must be created using the static `create()` method, not the constructor + * - Follower stores will automatically sync with their leader's state. If they have initial state, it + * will be replaced immediately when it has synced with the leader. + * + * @example + * + * ```typescript + * interface MyState { + * count: number; + * } + * interface MyCustomEvent { + * type: 'INCREMENT'; + * payload: number; + * } + * + * // Create a leader store + * const leaderStore = UniversalStore.create({ + * id: 'my-store', + * leader: true, + * initialState: { count: 0 }, + * }); + * + * // Create a follower store + * const followerStore = UniversalStore.create({ + * id: 'my-store', + * leader: false, + * }); + * ``` + * + * @template State - The type of state managed by the store + * @template CustomEvent - Custom events that can be sent through the store. Must have a `type` + * string and optional `payload` + * @throws {Error} If constructed directly instead of using `create()` + * @throws {Error} If created without setting a channel first + * @throws {Error} If a follower is created with initial state + * @throws {Error} If a follower cannot find its leader within 1 second + */ +declare class UniversalStore { + /** + * Defines the possible actor types in the store system + * + * @readonly + */ + static readonly ActorType: { + readonly LEADER: "LEADER"; + readonly FOLLOWER: "FOLLOWER"; + }; + /** + * Defines the possible environments the store can run in + * + * @readonly + */ + static readonly Environment: { + readonly SERVER: "SERVER"; + readonly MANAGER: "MANAGER"; + readonly PREVIEW: "PREVIEW"; + readonly UNKNOWN: "UNKNOWN"; + readonly MOCK: "MOCK"; + }; + /** + * Internal event types used for store synchronization + * + * @readonly + */ + static readonly InternalEventType: { + readonly EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST"; + readonly EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE"; + readonly SET_STATE: "__SET_STATE"; + readonly LEADER_CREATED: "__LEADER_CREATED"; + readonly FOLLOWER_CREATED: "__FOLLOWER_CREATED"; + }; + static readonly Status: { + readonly UNPREPARED: "UNPREPARED"; + readonly SYNCING: "SYNCING"; + readonly READY: "READY"; + readonly ERROR: "ERROR"; + }; + protected static isInternalConstructing: boolean; + /** + * The preparation construct is used to keep track of all store's preparation state the promise is + * resolved when the store is prepared with the static __prepare() method which will also change + * the state from PENDING to RESOLVED + */ + private static preparation; + private static setupPreparationPromise; + /** Enable debug logs for this store */ + debugging: boolean; + /** The actor object representing the store instance with a unique ID and a type */ + get actor(): Actor; + /** + * The current state of the store, that signals both if the store is prepared by Storybook and + * also - in the case of a follower - if the state has been synced with the leader's state. + */ + get status(): StatusType; + /** + * A promise that resolves when the store is fully ready. A leader will be ready when the store + * has been prepared by Storybook, which is almost instantly. + * + * A follower will be ready when the state has been synced with the leader's state, within a few + * hundred milliseconds. + */ + untilReady(): Promise<[void | { + channel: ChannelLike; + environment: EnvironmentType; + }, void | undefined]>; + /** + * The syncing construct is used to keep track of if the instance's state has been synced with the + * other instances. A leader will immediately have the promise resolved. A follower will initially + * be in a PENDING state, and resolve when the leader has sent the existing state, or reject if no + * leader has responded before the timeout. + */ + private syncing?; + private channelEventName; + private state; + private channel?; + private environment?; + private listeners; + private id; + private actorId; + private actorType; + protected constructor(options: StoreOptions, environmentOverrides?: EnvironmentOverrides); + /** Creates a new instance of UniversalStore */ + static create(options: StoreOptions): UniversalStore; + /** Gets the current state */ + getState: () => State; + /** + * Updates the store's state + * + * Either a new state or a state updater function can be passed to the method. + */ + setState(updater: State | StateUpdater): void; + /** + * Subscribes to store events + * + * @returns A function to unsubscribe + */ + subscribe: { + (listener: Listener>): () => void; + ['type']>(eventType: EventType, listener: Listener, { + type: EventType; + }>>): () => void; + }; + /** + * Subscribes to state changes + * + * @returns Unsubscribe function + */ + onStateChange(listener: (state: State, previousState: State, eventInfo: EventInfo) => void): () => void; + /** Sends a custom event to the other stores */ + send: (event: CustomEvent) => void; + private emitToChannel; + private prepareThis; + private emitToListeners; + private handleChannelEvents; + private debug; +} + +/** + * A hook to use a UniversalStore in the manager UI (eg. in an addon panel). This hook will react to + * changes in the store state and re-render when the store changes. + * + * @param universalStore The UniversalStore instance to use. + * @param selector An optional selector function to select a subset of the store state. + * @remark This hook is intended for use in the manager UI. For use in the preview, import from + * `storybook/preview-api` instead. + */ +declare const useUniversalStore: { + , TState = TUniversalStore extends UniversalStore ? S : never>(universalStore: TUniversalStore): [TState, TUniversalStore['setState']]; + , TSelectedState, TState = TUniversalStore extends UniversalStore ? S : never>(universalStore: TUniversalStore, selector: (state: TState) => TSelectedState): [TSelectedState, TUniversalStore['setState']]; +}; + +/** + * A mock universal store that can be used when testing code that relies on a universal store. It + * functions exactly like a normal universal store, with a few exceptions: + * + * - It is fully isolated, meaning that it doesn't interact with any channel, and it is always a + * leader. + * + * If the second testUtils argument is provided, all the public methods are spied on, so they can be + * asserted. + * + * When a mock store is re-used across tests (eg. in stories), you manually need to reset the state + * after each test. + * + * @example + * + * ```ts + * import * as testUtils from 'storybook/test'; // in stories + * import { vi as testUtils } from 'vitest'; // ... or in Vitest tests + * + * const initialState = { ... }; + * const store = new MockUniversalStore({ initialState }, testUtils); + * + * export default { + * title: 'My story', + * beforeEach: () => { + * return () => { + * store.setState(initialState); + * }; + * } + * } + * ``` + */ +declare class MockUniversalStore extends UniversalStore { + private testUtils; + constructor(options: StoreOptions, testUtils?: any); + /** Create a mock universal store. This is just an alias for the constructor */ + static create(options: StoreOptions, testUtils?: any): MockUniversalStore; + unsubscribeAll(): void; +} + +/** + * Actions represent the type of change to a location value. + */ +declare enum Action { + /** + * A POP indicates a change to an arbitrary index in the history stack, such + * as a back or forward navigation. It does not describe the direction of the + * navigation, only that the current index changed. + * + * Note: This is the default action for newly created history objects. + */ + Pop = "POP", + /** + * A PUSH indicates a new entry being added to the history stack, such as when + * a link is clicked and a new page loads. When this happens, all subsequent + * entries in the stack are lost. + */ + Push = "PUSH", + /** + * A REPLACE indicates the entry at the current index in the history stack + * being replaced by a new one. + */ + Replace = "REPLACE" +} +/** + * The pathname, search, and hash values of a URL. + */ +interface Path { + /** + * A URL pathname, beginning with a /. + */ + pathname: string; + /** + * A URL search string, beginning with a ?. + */ + search: string; + /** + * A URL fragment identifier, beginning with a #. + */ + hash: string; +} +/** + * An entry in a history stack. A location contains information about the + * URL path, as well as possibly some arbitrary state and a key. + */ +interface Location extends Path { + /** + * A value of arbitrary data associated with this location. + */ + state: any; + /** + * A unique string associated with this location. May be used to safely store + * and retrieve data in some other storage API, like `localStorage`. + * + * Note: This value is always "default" on the initial location. + */ + key: string; +} + +/** + * Map of routeId -> data returned from a loader/action/error + */ +interface RouteData { + [routeId: string]: any; +} +declare enum ResultType { + data = "data", + deferred = "deferred", + redirect = "redirect", + error = "error" +} +/** + * Successful result from a loader or action + */ +interface SuccessResult { + type: ResultType.data; + data: any; + statusCode?: number; + headers?: Headers; +} +/** + * Successful defer() result from a loader or action + */ +interface DeferredResult { + type: ResultType.deferred; + deferredData: DeferredData; + statusCode?: number; + headers?: Headers; +} +/** + * Redirect result from a loader or action + */ +interface RedirectResult { + type: ResultType.redirect; + status: number; + location: string; + revalidate: boolean; + reloadDocument?: boolean; +} +/** + * Unsuccessful result from a loader or action + */ +interface ErrorResult { + type: ResultType.error; + error: any; + headers?: Headers; +} +/** + * Result from a loader or action - potentially successful or unsuccessful + */ +type DataResult = SuccessResult | DeferredResult | RedirectResult | ErrorResult; +type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete"; +type UpperCaseFormMethod = Uppercase; +/** + * Active navigation/fetcher form methods are exposed in lowercase on the + * RouterState + */ +type FormMethod = LowerCaseFormMethod; +/** + * In v7, active navigation/fetcher form methods are exposed in uppercase on the + * RouterState. This is to align with the normalization done via fetch(). + */ +type V7_FormMethod = UpperCaseFormMethod; +type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain"; +type JsonObject = { + [Key in string]: JsonValue; +} & { + [Key in string]?: JsonValue | undefined; +}; +type JsonArray = JsonValue[] | readonly JsonValue[]; +type JsonPrimitive = string | number | boolean | null; +type JsonValue = JsonPrimitive | JsonObject | JsonArray; +/** + * @private + * Internal interface to pass around for action submissions, not intended for + * external consumption + */ +type Submission = { + formMethod: FormMethod | V7_FormMethod; + formAction: string; + formEncType: FormEncType; + formData: FormData; + json: undefined; + text: undefined; +} | { + formMethod: FormMethod | V7_FormMethod; + formAction: string; + formEncType: FormEncType; + formData: undefined; + json: JsonValue; + text: undefined; +} | { + formMethod: FormMethod | V7_FormMethod; + formAction: string; + formEncType: FormEncType; + formData: undefined; + json: undefined; + text: string; +}; +/** + * @private + * Arguments passed to route loader/action functions. Same for now but we keep + * this as a private implementation detail in case they diverge in the future. + */ +interface DataFunctionArgs { + request: Request; + params: Params; + context?: any; +} +/** + * Arguments passed to loader functions + */ +interface LoaderFunctionArgs extends DataFunctionArgs { +} +/** + * Arguments passed to action functions + */ +interface ActionFunctionArgs extends DataFunctionArgs { +} +/** + * Loaders and actions can return anything except `undefined` (`null` is a + * valid return value if there is no data to return). Responses are preferred + * and will ease any future migration to Remix + */ +type DataFunctionValue = Response | NonNullable | null; +/** + * Route loader function signature + */ +interface LoaderFunction { + (args: LoaderFunctionArgs): Promise | DataFunctionValue; +} +/** + * Route action function signature + */ +interface ActionFunction { + (args: ActionFunctionArgs): Promise | DataFunctionValue; +} +/** + * Route shouldRevalidate function signature. This runs after any submission + * (navigation or fetcher), so we flatten the navigation/fetcher submission + * onto the arguments. It shouldn't matter whether it came from a navigation + * or a fetcher, what really matters is the URLs and the formData since loaders + * have to re-run based on the data models that were potentially mutated. + */ +interface ShouldRevalidateFunction { + (args: { + currentUrl: URL; + currentParams: AgnosticDataRouteMatch["params"]; + nextUrl: URL; + nextParams: AgnosticDataRouteMatch["params"]; + formMethod?: Submission["formMethod"]; + formAction?: Submission["formAction"]; + formEncType?: Submission["formEncType"]; + text?: Submission["text"]; + formData?: Submission["formData"]; + json?: Submission["json"]; + actionResult?: DataResult; + defaultShouldRevalidate: boolean; + }): boolean; +} +/** + * Keys we cannot change from within a lazy() function. We spread all other keys + * onto the route. Either they're meaningful to the router, or they'll get + * ignored. + */ +type ImmutableRouteKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "children"; +type RequireOne = Exclude<{ + [K in keyof T]: K extends Key ? Omit & Required> : never; +}[keyof T], undefined>; +/** + * lazy() function to load a route definition, which can add non-matching + * related properties to a route + */ +interface LazyRouteFunction { + (): Promise>>; +} +/** + * Base RouteObject with common props shared by all types of routes + */ +type AgnosticBaseRouteObject = { + caseSensitive?: boolean; + path?: string; + id?: string; + loader?: LoaderFunction; + action?: ActionFunction; + hasErrorBoundary?: boolean; + shouldRevalidate?: ShouldRevalidateFunction; + handle?: any; + lazy?: LazyRouteFunction; +}; +/** + * Index routes must not have children + */ +type AgnosticIndexRouteObject = AgnosticBaseRouteObject & { + children?: undefined; + index: true; +}; +/** + * Non-index routes may have children, but cannot have index + */ +type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & { + children?: AgnosticRouteObject[]; + index?: false; +}; +/** + * A route object represents a logical route, with (optionally) its child + * routes organized in a tree-like structure. + */ +type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject; +type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & { + id: string; +}; +type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & { + children?: AgnosticDataRouteObject[]; + id: string; +}; +/** + * A data route object, which is just a RouteObject with a required unique ID + */ +type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject; +/** + * The parameters that were parsed from the URL path. + */ +type Params = { + readonly [key in Key]: string | undefined; +}; +/** + * A RouteMatch contains info about how a route matched a URL. + */ +interface AgnosticRouteMatch { + /** + * The names and values of dynamic parameters in the URL. + */ + params: Params; + /** + * The portion of the URL pathname that was matched. + */ + pathname: string; + /** + * The portion of the URL pathname that was matched before child routes. + */ + pathnameBase: string; + /** + * The route object that was used to match. + */ + route: RouteObjectType; +} +interface AgnosticDataRouteMatch extends AgnosticRouteMatch { +} +declare class DeferredData { + private pendingKeysSet; + private controller; + private abortPromise; + private unlistenAbortSignal; + private subscribers; + data: Record; + init?: ResponseInit; + deferredKeys: string[]; + constructor(data: Record, responseInit?: ResponseInit); + private trackPromise; + private onSettle; + private emit; + subscribe(fn: (aborted: boolean, settledKey?: string) => void): () => boolean; + cancel(): void; + resolveData(signal: AbortSignal): Promise; + get done(): boolean; + get unwrappedData(): {}; + get pendingKeys(): string[]; +} + +/** + * State maintained internally by the router. During a navigation, all states + * reflect the the "old" location unless otherwise noted. + */ +interface RouterState { + /** + * The action of the most recent navigation + */ + historyAction: Action; + /** + * The current location reflected by the router + */ + location: Location; + /** + * The current set of route matches + */ + matches: AgnosticDataRouteMatch[]; + /** + * Tracks whether we've completed our initial data load + */ + initialized: boolean; + /** + * Current scroll position we should start at for a new view + * - number -> scroll position to restore to + * - false -> do not restore scroll at all (used during submissions) + * - null -> don't have a saved position, scroll to hash or top of page + */ + restoreScrollPosition: number | false | null; + /** + * Indicate whether this navigation should skip resetting the scroll position + * if we are unable to restore the scroll position + */ + preventScrollReset: boolean; + /** + * Tracks the state of the current navigation + */ + navigation: Navigation; + /** + * Tracks any in-progress revalidations + */ + revalidation: RevalidationState; + /** + * Data from the loaders for the current matches + */ + loaderData: RouteData; + /** + * Data from the action for the current matches + */ + actionData: RouteData | null; + /** + * Errors caught from loaders for the current matches + */ + errors: RouteData | null; + /** + * Map of current fetchers + */ + fetchers: Map; + /** + * Map of current blockers + */ + blockers: Map; +} +/** + * Data that can be passed into hydrate a Router from SSR + */ +type HydrationState = Partial>; +/** + * Potential states for state.navigation + */ +type NavigationStates = { + Idle: { + state: "idle"; + location: undefined; + formMethod: undefined; + formAction: undefined; + formEncType: undefined; + formData: undefined; + json: undefined; + text: undefined; + }; + Loading: { + state: "loading"; + location: Location; + formMethod: Submission["formMethod"] | undefined; + formAction: Submission["formAction"] | undefined; + formEncType: Submission["formEncType"] | undefined; + formData: Submission["formData"] | undefined; + json: Submission["json"] | undefined; + text: Submission["text"] | undefined; + }; + Submitting: { + state: "submitting"; + location: Location; + formMethod: Submission["formMethod"]; + formAction: Submission["formAction"]; + formEncType: Submission["formEncType"]; + formData: Submission["formData"]; + json: Submission["json"]; + text: Submission["text"]; + }; +}; +type Navigation = NavigationStates[keyof NavigationStates]; +type RevalidationState = "idle" | "loading"; +/** + * Potential states for fetchers + */ +type FetcherStates = { + Idle: { + state: "idle"; + formMethod: undefined; + formAction: undefined; + formEncType: undefined; + text: undefined; + formData: undefined; + json: undefined; + data: TData | undefined; + " _hasFetcherDoneAnything "?: boolean; + }; + Loading: { + state: "loading"; + formMethod: Submission["formMethod"] | undefined; + formAction: Submission["formAction"] | undefined; + formEncType: Submission["formEncType"] | undefined; + text: Submission["text"] | undefined; + formData: Submission["formData"] | undefined; + json: Submission["json"] | undefined; + data: TData | undefined; + " _hasFetcherDoneAnything "?: boolean; + }; + Submitting: { + state: "submitting"; + formMethod: Submission["formMethod"]; + formAction: Submission["formAction"]; + formEncType: Submission["formEncType"]; + text: Submission["text"]; + formData: Submission["formData"]; + json: Submission["json"]; + data: TData | undefined; + " _hasFetcherDoneAnything "?: boolean; + }; +}; +type Fetcher = FetcherStates[keyof FetcherStates]; +interface BlockerBlocked { + state: "blocked"; + reset(): void; + proceed(): void; + location: Location; +} +interface BlockerUnblocked { + state: "unblocked"; + reset: undefined; + proceed: undefined; + location: undefined; +} +interface BlockerProceeding { + state: "proceeding"; + reset: undefined; + proceed: undefined; + location: Location; +} +type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding; + +/** + * NOTE: If you refactor this to split up the modules into separate files, + * you'll need to update the rollup config for react-router-dom-v5-compat. + */ + +declare global { + var __staticRouterHydrationData: HydrationState | undefined; +} + +/** Free-form error attached to a payload or subcomponent. */ +interface DocgenError { + name: string; + message: string; +} +/** Compact JSDoc tag map: tag name → list of tag values (e.g. `@example a` → `{ example: ['a'] }`). */ +type DocgenJsDocTags = Record; +/** + * Docgen payload returned by `core/docgen`'s `docgen` query. + * + * Component-only fields (props, descriptions, subcomponents). Story snippets and file-level + * imports live in `core/story-docs` when `experimentalDocgenServer` is enabled. + */ +interface DocgenPayload { + id: string; + name: string; + /** CSF story file import path from the index entry (same as component manifest `path`). */ + path: string; + description?: string; + summary?: string; + jsDocTags: DocgenJsDocTags; + /** Renderer-converted argTypes derived from integration-specific docgen data at write time. */ + argTypes?: StrictArgTypes; + subcomponents?: Record; + error?: DocgenError; + [key: string]: unknown; +} +/** Component-level summary + docgen for one subcomponent. */ +interface DocgenSubcomponent { + name: string; + path: string; + description?: string; + summary?: string; + import?: string; + jsDocTags: DocgenJsDocTags; + /** Renderer-converted argTypes derived from integration-specific docgen data at write time. */ + argTypes?: StrictArgTypes; + error?: DocgenError; + [key: string]: unknown; +} + +declare global { + var globalProjectAnnotations: NormalizedProjectAnnotations; + var defaultProjectAnnotations: ProjectAnnotations; +} +type WrappedStoryRef = { + __pw_type: 'jsx'; + props: Record; +} | { + __pw_type: 'importRef'; +}; +type UnwrappedJSXStoryRef = { + __pw_type: 'jsx'; + type: UnwrappedImportStoryRef; +}; +type UnwrappedImportStoryRef = ComposedStoryFn; +declare global { + function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise; +} + +/** System tags used throughout Storybook for categorizing and filtering stories and docs entries. */ +declare const Tag: { + /** Indicates that autodocs should be generated for this component */ + readonly AUTODOCS: "autodocs"; + /** MDX documentation attached to a component's stories file */ + readonly ATTACHED_MDX: "attached-mdx"; + /** Standalone MDX documentation not attached to stories */ + readonly UNATTACHED_MDX: "unattached-mdx"; + /** Story has a play function */ + readonly PLAY_FN: "play-fn"; + /** Story has a test function */ + readonly TEST_FN: "test-fn"; + /** Development environment tag */ + readonly DEV: "dev"; + /** Test environment tag */ + readonly TEST: "test"; + /** Manifest generation tag */ + readonly MANIFEST: "manifest"; +}; +/** + * Tags can be any string, including custom user-defined tags. The Tag constant above defines the + * system tags used by Storybook. + */ +type Tag = string; + +/** The Standard Typed interface. This is a base type extended by other specs. */ +interface StandardTypedV1 { + /** The Standard properties. */ + readonly "~standard": StandardTypedV1.Props; +} +declare namespace StandardTypedV1 { + /** The Standard Typed properties interface. */ + interface Props { + /** The version number of the standard. */ + readonly version: 1; + /** The vendor name of the schema library. */ + readonly vendor: string; + /** Inferred types associated with the schema. */ + readonly types?: Types | undefined; + } + /** The Standard Typed types interface. */ + interface Types { + /** The input type of the schema. */ + readonly input: Input; + /** The output type of the schema. */ + readonly output: Output; + } + /** Infers the input type of a Standard Typed. */ + type InferInput = NonNullable["input"]; + /** Infers the output type of a Standard Typed. */ + type InferOutput = NonNullable["output"]; +} +/** The Standard Schema interface. */ +interface StandardSchemaV1$1 { + /** The Standard Schema properties. */ + readonly "~standard": StandardSchemaV1$1.Props; +} +declare namespace StandardSchemaV1$1 { + /** The Standard Schema properties interface. */ + interface Props extends StandardTypedV1.Props { + /** Validates unknown input values. */ + readonly validate: (value: unknown, options?: StandardSchemaV1$1.Options | undefined) => Result | Promise>; + } + /** The result interface of the validate function. */ + type Result = SuccessResult | FailureResult; + /** The result interface if validation succeeds. */ + interface SuccessResult { + /** The typed output value. */ + readonly value: Output; + /** A falsy value for `issues` indicates success. */ + readonly issues?: undefined; + } + interface Options { + /** Explicit support for additional vendor-specific parameters, if needed. */ + readonly libraryOptions?: Record | undefined; + } + /** The result interface if validation fails. */ + interface FailureResult { + /** The issues of failed validation. */ + readonly issues: ReadonlyArray; + } + /** The issue interface of the failure output. */ + interface Issue { + /** The error message of the issue. */ + readonly message: string; + /** The path of the issue, if any. */ + readonly path?: ReadonlyArray | undefined; + } + /** The path segment interface of the issue. */ + interface PathSegment { + /** The key representing a path segment. */ + readonly key: PropertyKey; + } + /** The Standard types interface. */ + interface Types extends StandardTypedV1.Types { + } + /** Infers the input type of a Standard. */ + type InferInput = StandardTypedV1.InferInput; + /** Infers the output type of a Standard. */ + type InferOutput = StandardTypedV1.InferOutput; +} + +/** Generic Standard Schema constraint used across open-service definitions. */ +type AnySchema = StandardSchemaV1$1; +/** Stable alias for service identifiers across definition, runtime, and registration APIs. */ +type ServiceId = string; +/** Public schema shape exposed when describing a schema-backed service contract. */ +type SchemaDescriptor = AnySchema; +/** Raw caller-facing value type accepted by a schema-backed operation. */ +type InferSchemaInput = StandardSchemaV1$1.InferInput; +/** Parsed value type produced by a schema after validation. */ +type InferSchemaOutput = StandardSchemaV1$1.InferOutput; +/** + * Named schema maps are the core inference surface for inline open-service authoring. + * + * `defineService()` infers one input-schema map and one output-schema map per operation family + * (queries and commands). Keeping those maps separate gives TypeScript a place to correlate the + * `input` and `output` properties of each inline object before it contextually types sibling + * callbacks like `handler`, `load`, `staticPath`, and `staticInputs`. + */ +type OperationInputSchemas = Record; +/** + * Output-schema maps must stay key-aligned with their input-schema map. + * + * The authoring helper uses this alias instead of a plain `Record` so each + * operation key retains its own input/output schema pair during inference. + */ +type MatchingOutputSchemas = { + [TKey in keyof TInputSchemas]: AnySchema; +}; +/** + * Internal utility used to keep handler maps assignable without collapsing everything to `unknown`. + */ +type BivariantCallback = { + bivarianceHack(...args: TArgs): TResult; +}['bivarianceHack']; +/** + * Runtime command map derived directly from the inferred command schema maps. + * + * Queries only need command-call typing, not the full command definition objects, so this helper + * keeps query contexts readable while still preserving exact input/output types per command. + */ +type CommandFunctions> = { + [TKey in keyof TCommandInputSchemas]: BivariantCallback<[ + input: InferSchemaInput + ], Promise>>; +}; +/** + * Coarse lifecycle of a query's `load`, modeled after TanStack Query's `status`. + * + * - `pending` — no successful load has completed yet (and none has failed). The query may still + * expose `data` (the synchronous "current best" handler result), but nothing has been loaded. + * - `error` — the most recent attempt (load rejection, or a synchronous handler / validation throw) + * failed. `data` keeps the last successful value, if any. + * - `success` — a load has completed (or the query has no `load`, so there is nothing to load). + */ +type QueryStatus = 'pending' | 'error' | 'success'; +/** + * Whether a `load` is currently running, modeled after TanStack Query's `fetchStatus` — but named + * with our own `load` vocabulary because open-service "loads" are any slow async work (computation, + * extraction, I/O), not specifically remote fetching. + * + * - `loading` — a `load` is in flight (the first load, or a reactive background re-load). + * - `idle` — no `load` is currently running. + */ +type LoadStatus = 'loading' | 'idle'; +/** + * The reactive state of a subscribed query: its current `data` plus the lifecycle of its `load`. + * + * `data` and `status` are independent. `data` is the synchronous handler result ("current best + * effort") and holds the last successful value (or `undefined` before the first success / when a + * handler throws), while `status`/`loadStatus`/`error` describe the asynchronous `load` lifecycle + * tracked per subscription. A query with no `load` is `success`/`idle` from its first emission. + * + * `isLoading` is intentionally "any load in flight" (TanStack's `isFetching`), and + * `isInitialLoading` is "a load is in flight and there is nothing to show yet"; the names follow our + * `load` vocabulary rather than TanStack's `fetch`/`load` split. Unlike TanStack Query, a + * subscription here can attach to a query whose `data` is already cached in service state, so + * `isInitialLoading` additionally requires `data === undefined` — it never flags over cached data. + */ +type QueryState = { + /** Last successfully produced value; `undefined` before the first success. */ + data: TData | undefined; + /** The failure that produced `status: 'error'`, otherwise `undefined`. */ + error: Error | undefined; + status: QueryStatus; + loadStatus: LoadStatus; + /** `status === 'pending'`. */ + isPending: boolean; + /** `status === 'success'`. */ + isSuccess: boolean; + /** `status === 'error'`. */ + isError: boolean; + /** `loadStatus === 'loading'` — any load in flight, foreground or background. */ + isLoading: boolean; + /** `isPending && isLoading && data === undefined` — a first load with nothing to show yet. */ + isInitialLoading: boolean; + /** `isLoading && !isPending` — a background re-load while data is already shown. */ + isRefreshing: boolean; +}; +/** + * Public runtime shape of a query. + * + * - `.get(input)` reads synchronously: it validates input, runs the handler against current state, + * and returns the validated result. It does **not** fire the query's `load` — it is a pure + * "current best effort" read. (Reads of *other* queries from inside a handler or `load` body still + * participate in dependency tracking, so `.loaded()` and subscriptions trigger those dependency + * loads; a bare consumer `.get()` does not.) + * - `.loaded(input)` awaits the full load — this query's `load` plus every transitively read + * dependency — before resolving with the validated result. + * - `.subscribe(input, callback)` invokes `callback` synchronously with the current {@link QueryState} + * and again whenever tracked state or the load lifecycle changes (deduped on the whole state). + * Subscribing is what fires the query's reactive `load`. + * + * There is intentionally no bare-call form: a previous `query(input)` that returned synchronously + * *and* fired the `load` behind the scenes was removed because the implicit background load was + * confusing. Read with `.get(input)`, await with `.loaded(input)`, observe with `.subscribe(...)`. + * + * Queries whose input schema resolves to `undefined` (for example `v.void()`) may be called with + * zero arguments: `query.get()`, `query.loaded()`. + */ +type InputQuery = { + get(input: TInput): TOutput; + loaded(input: TInput): Promise; + subscribe(input: TInput, callback: (state: QueryState) => void): () => void; + subscribe(input: TInput, selector: (value: TOutput) => TSelected, callback: (state: QueryState) => void): () => void; +}; +/** Zero-argument overloads merged into {@link Query} when the input schema is void. */ +type VoidQuery = { + get(): TOutput; + loaded(): Promise; + subscribe(callback: (state: QueryState) => void): () => void; + subscribe(selector: (value: TOutput) => TSelected, callback: (state: QueryState) => void): () => void; +}; +type Query = undefined extends TInput ? VoidQuery & InputQuery : InputQuery; +/** + * Runtime query map derived directly from the inferred query schema maps. + * + * The query counterpart to {@link CommandFunctions}: it preserves each sibling query's exact + * input/output types on the read-only `self.queries` handle, so a handler or `load` can call + * `self.queries.someQuery.get(input)` without manual casts. `defineService` computes this map from + * the inferred query schema maps and threads it into the handler/load contexts as their `TQueries`; + * the erased {@link AnyQueryFunctions} bound is used everywhere the concrete map is not known. + */ +type QueryFunctions> = { + [TKey in keyof TQueryInputSchemas]: Query, InferSchemaOutput>; +}; +/** + * Permissive bound for a `self.queries` handle. + * + * Every {@link Query} — input or void — structurally satisfies {@link InputQuery} (the void + * overloads are additive), so this is the supertype that any concrete {@link QueryFunctions} map is + * assignable to. It is the bound (and erased default) for the `TQueries` parameter below, which lets + * the precise per-service map flow into handler contexts while still erasing cleanly into the + * structural `AnyQueryDefinition` storage constraint. Using `Query` here instead + * would wrongly demand the void zero-arg overloads from input queries. + */ +type AnyQueryFunctions = Record>; +/** + * Read-only service handle exposed to query handlers. + * + * Query handlers are strict readers: they can read state and call sibling queries, but they cannot + * mutate state and cannot invoke commands. Mutations belong in commands; load-side preparation + * belongs in `load`. + */ +type QuerySelf = { + readonly state: TState; + queries: TQueries; +}; +/** + * Load handle exposed to `load` functions. + * + * `load` may read state and queries, and may invoke declared commands to mutate state. It does + * not receive `setState` directly — all writes must flow through commands so authors keep one + * documented mutation surface per service. + */ +type LoadSelf = MatchingOutputSchemas, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = QuerySelf & { + commands: CommandFunctions; +}; +/** + * Mutable service handle exposed to command handlers. + * + * Commands receive both `setState` for direct state mutation and `commands` so one command can + * delegate to another within the same service. + */ +type CommandSelf = MatchingOutputSchemas, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = LoadSelf & { + setState(mutate: (state: TState) => void): void; +}; +type ServiceSummary = { + id: ServiceId; + description?: string; + queryNames: string[]; + commandNames: string[]; +}; +type OperationDescriptor = { + name: string; + description?: string; + input: SchemaDescriptor; + output: SchemaDescriptor; + /** Present when the query declares `staticPath` at definition time. */ + staticPath?: true; +}; +type ServiceDescriptor = { + id: ServiceId; + description?: string; + queries: Record; + commands: Record; +}; +/** Context passed to query handlers. */ +type QueryCtx = { + self: QuerySelf; + getService: ServiceRegistryApi['getService']; +}; +/** Context passed to `load` functions and static-input enumerators. */ +type LoadCtx = MatchingOutputSchemas, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = { + self: LoadSelf; + getService: ServiceRegistryApi['getService']; +}; +/** Static input enumerator stored on registered definitions; always receives load context. */ +type RegisteredStaticInputs = BivariantCallback<[ + ctx: LoadCtx +], unknown[] | Promise>; +/** Context passed to command handlers. */ +type CommandCtx = MatchingOutputSchemas, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = { + self: CommandSelf; + getService: ServiceRegistryApi['getService']; +}; +/** + * Declarative definition for one query. + * + * Queries validate caller input synchronously, run a synchronous read-only handler, and validate + * the resolved output. The optional `load` hook is fired by subscriptions (reactively) and by + * `.loaded()` callers (drained to completion), deduped per `(service, query, input)` while one is + * already in flight — a bare `.get()` read never fires it. + * + * Queries that participate in static JSON generation declare `staticPath` at definition time. + * `staticInputs` may also be declared here when the input list has no runtime dependencies; inputs + * that need registry or story-index context belong in server registration instead. + */ +type QueryDefinition = MatchingOutputSchemas, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = { + description?: string; + /** + * When true, hides this query from `describeService()` output. Defaults to false. Does not disable + * the query at runtime — callers with a service handle can still invoke it. + */ + internal?: boolean; + input: TInputSchema; + output: TOutputSchema; + /** Logical path for the serialized state snapshot, relative to this service's output folder. */ + staticPath?: BivariantCallback<[input: InferSchemaOutput], string>; + /** Dependency-free static build inputs declared alongside the public contract. */ + staticInputs?: BivariantCallback<[ + ], InferSchemaInput[] | Promise[]>>; + handler?: BivariantCallback<[ + input: InferSchemaOutput, + ctx: QueryCtx + ], InferSchemaInput>; + load?: BivariantCallback<[ + input: InferSchemaOutput, + ctx: LoadCtx + ], void | Promise>; +}; +/** + * Declarative definition for one command. + * + * Commands validate caller input, run against a mutable context, and validate the resolved output. + */ +type CommandDefinition = MatchingOutputSchemas, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = { + description?: string; + /** + * When true, hides this command from `describeService()` output. Defaults to false. Does not + * disable the command at runtime — callers with a service handle can still invoke it. + */ + internal?: boolean; + input: TInputSchema; + output: TOutputSchema; + handler?: BivariantCallback<[ + input: InferSchemaOutput, + ctx: CommandCtx + ], InferSchemaInput | Promise>>; +}; +/** Internal structural constraint used to store any query definition in a record. */ +type AnyQueryDefinition = { + description?: string; + internal?: boolean; + input: AnySchema; + output: AnySchema; + staticPath?: BivariantCallback<[input: unknown], string>; + staticInputs?: RegisteredStaticInputs; + handler?: BivariantCallback<[input: unknown, ctx: QueryCtx], unknown>; + load?: BivariantCallback<[input: unknown, ctx: LoadCtx], void | Promise>; +}; +/** Internal structural constraint used to store any command definition in a record. */ +type AnyCommandDefinition = { + description?: string; + internal?: boolean; + input: AnySchema; + output: AnySchema; + handler?: BivariantCallback<[ + input: unknown, + ctx: CommandCtx + ], unknown | Promise>; +}; +/** Named query map attached to a service definition. */ +type Queries = Record>; +/** Named command map attached to a service definition. */ +type Commands = Record>; +/** Top-level description of a service: identity, initial state, queries, and commands. */ +type ServiceDefinition, TCommands extends Commands, TId extends ServiceId = ServiceId> = { + id: TId; + description?: string; + /** + * When true, hides this service from `listServices()` output. Defaults to false. Does not disable + * the service at runtime — callers can still resolve it through `getService()`. + */ + internal?: boolean; + /** + * Initial state for the service. Must be a plain object (not a primitive, `null`, or array) — see + * {@link ServiceState} for why. The authoring boundary (`defineService`) enforces this; the runtime + * type stays `TState` so already-constructed definitions flow through the registry unchanged. + */ + initialState: TState; + queries: TQueries; + commands: TCommands; +}; +/** Structural constraint for any service definition stored in the registry. */ +type AnyServiceDefinition = ServiceDefinition, Commands>; +/** Runtime service instance derived from a `ServiceDefinition`. */ +type ServiceInstance, TCommands extends Commands> = { + queries: { + [TKey in keyof TQueries]: TQueries[TKey] extends { + input: infer TInputSchema extends AnySchema; + output: infer TOutputSchema extends AnySchema; + } ? Query, InferSchemaOutput> : never; + }; + commands: { + [TKey in keyof TCommands]: TCommands[TKey] extends { + input: infer TInputSchema extends AnySchema; + output: infer TOutputSchema extends AnySchema; + } ? (input: InferSchemaInput) => Promise> : never; + }; +}; +/** Runtime instance type recovered from one authored service definition. */ +type ServiceInstanceOf = TDefinition extends ServiceDefinition ? ServiceInstance : never; +interface ServiceRegistryApi { + listServices(): Promise; + describeService(serviceId: ServiceId): Promise; + getService(serviceId: ServiceId): TInstance; +} +type RuntimeService = ServiceInstance, Commands> & ServiceRegistryApi; +type ServiceQueryRegistration = { + /** Static build inputs that may depend on registry or other server context. */ + staticInputs?: RegisteredStaticInputs; +}; +type ServiceCommandRegistration> = Pick; +type ServiceRegistrationOptions, TCommands extends Commands> = { + queries?: { + [TKey in keyof TQueries]?: ServiceQueryRegistration; + }; + commands?: { + [TKey in keyof TCommands]?: ServiceCommandRegistration; + }; +}; + +//#endregion +//#region src/methods/fallback/fallback.d.ts +/** +* Fallback type. +*/ +type Fallback>> = MaybeDeepReadonly> | ((dataset?: OutputDataset, InferIssue>, config?: Config>) => MaybeDeepReadonly>); +/** +* Schema with fallback type. +*/ +type SchemaWithFallback>, TFallback$1 extends Fallback> = TSchema & { + /** + * The fallback value. + */ + readonly fallback: TFallback$1; +}; +//#endregion +//#region src/methods/fallback/fallbackAsync.d.ts +/** +* Fallback async type. +*/ +type FallbackAsync> | BaseSchemaAsync>> = MaybeDeepReadonly> | ((dataset?: OutputDataset, InferIssue>, config?: Config>) => MaybePromise>>); +/** +* Schema with fallback async type. +*/ +type SchemaWithFallbackAsync> | BaseSchemaAsync>, TFallback$1 extends FallbackAsync> = Omit & { + /** + * The fallback value. + */ + readonly fallback: TFallback$1; + /** + * Whether it's async. + */ + readonly async: true; + /** + * The Standard Schema properties. + * + * @internal + */ + readonly "~standard": StandardProps, InferOutput>; + /** + * Parses unknown input values. + * + * @param dataset The input dataset. + * @param config The configuration. + * + * @returns The output dataset. + * + * @internal + */ + readonly "~run": (dataset: UnknownDataset, config: Config>) => Promise, InferIssue>>; +}; +//#endregion +//#region src/types/metadata.d.ts +/** +* Base metadata interface. +*/ +interface BaseMetadata { + /** + * The object kind. + */ + readonly kind: "metadata"; + /** + * The metadata type. + */ + readonly type: string; + /** + * The metadata reference. + */ + readonly reference: (...args: any[]) => BaseMetadata; + /** + * The input, output and issue type. + * + * @internal + */ + readonly "~types"?: { + readonly input: TInput$1; + readonly output: TInput$1; + readonly issue: never; + } | undefined; +} +//#endregion +//#region src/types/dataset.d.ts +/** +* Unknown dataset interface. +*/ +interface UnknownDataset { + /** + * Whether is's typed. + */ + typed?: false; + /** + * The dataset value. + */ + value: unknown; + /** + * The dataset issues. + */ + issues?: undefined; +} +/** +* Success dataset interface. +*/ +interface SuccessDataset { + /** + * Whether is's typed. + */ + typed: true; + /** + * The dataset value. + */ + value: TValue$1; + /** + * The dataset issues. + */ + issues?: undefined; +} +/** +* Partial dataset interface. +*/ +interface PartialDataset> { + /** + * Whether is's typed. + */ + typed: true; + /** + * The dataset value. + */ + value: TValue$1; + /** + * The dataset issues. + */ + issues: [TIssue, ...TIssue[]]; +} +/** +* Failure dataset interface. +*/ +interface FailureDataset> { + /** + * Whether is's typed. + */ + typed: false; + /** + * The dataset value. + */ + value: unknown; + /** + * The dataset issues. + */ + issues: [TIssue, ...TIssue[]]; +} +/** +* Output dataset type. +*/ +type OutputDataset> = SuccessDataset | PartialDataset | FailureDataset; +//#endregion +//#region src/types/standard.d.ts +/** +* The Standard Schema properties interface. +*/ +interface StandardProps { + /** + * The version number of the standard. + */ + readonly version: 1; + /** + * The vendor name of the schema library. + */ + readonly vendor: "valibot"; + /** + * Validates unknown input values. + */ + readonly validate: (value: unknown) => StandardResult | Promise>; + /** + * Inferred types associated with the schema. + */ + readonly types?: StandardTypes | undefined; +} +/** +* The result interface of the validate function. +*/ +type StandardResult = StandardSuccessResult | StandardFailureResult; +/** +* The result interface if validation succeeds. +*/ +interface StandardSuccessResult { + /** + * The typed output value. + */ + readonly value: TOutput$1; + /** + * The non-existent issues. + */ + readonly issues?: undefined; +} +/** +* The result interface if validation fails. +*/ +interface StandardFailureResult { + /** + * The issues of failed validation. + */ + readonly issues: readonly StandardIssue[]; +} +/** +* The issue interface of the failure output. +*/ +interface StandardIssue { + /** + * The error message of the issue. + */ + readonly message: string; + /** + * The path of the issue, if any. + */ + readonly path?: readonly (PropertyKey | StandardPathItem)[] | undefined; +} +/** +* The path item interface of the issue. +*/ +interface StandardPathItem { + /** + * The key of the path item. + */ + readonly key: PropertyKey; +} +/** +* The Standard Schema types interface. +*/ +interface StandardTypes { + /** + * The input type of the schema. + */ + readonly input: TInput$1; + /** + * The output type of the schema. + */ + readonly output: TOutput$1; +} +//#endregion +//#region src/types/schema.d.ts +/** +* Base schema interface. +*/ +interface BaseSchema> { + /** + * The object kind. + */ + readonly kind: "schema"; + /** + * The schema type. + */ + readonly type: string; + /** + * The schema reference. + */ + readonly reference: (...args: any[]) => BaseSchema>; + /** + * The expected property. + */ + readonly expects: string; + /** + * Whether it's async. + */ + readonly async: false; + /** + * The Standard Schema properties. + * + * @internal + */ + readonly "~standard": StandardProps; + /** + * Parses unknown input values. + * + * @param dataset The input dataset. + * @param config The configuration. + * + * @returns The output dataset. + * + * @internal + */ + readonly "~run": (dataset: UnknownDataset, config: Config>) => OutputDataset; + /** + * The input, output and issue type. + * + * @internal + */ + readonly "~types"?: { + readonly input: TInput$1; + readonly output: TOutput$1; + readonly issue: TIssue; + } | undefined; +} +/** +* Base schema async interface. +*/ +interface BaseSchemaAsync> extends Omit, "reference" | "async" | "~run"> { + /** + * The schema reference. + */ + readonly reference: (...args: any[]) => BaseSchema> | BaseSchemaAsync>; + /** + * Whether it's async. + */ + readonly async: true; + /** + * Parses unknown input values. + * + * @param dataset The input dataset. + * @param config The configuration. + * + * @returns The output dataset. + * + * @internal + */ + readonly "~run": (dataset: UnknownDataset, config: Config>) => Promise>; +} +//#endregion +//#region src/types/transformation.d.ts +/** +* Base transformation interface. +*/ +interface BaseTransformation> { + /** + * The object kind. + */ + readonly kind: "transformation"; + /** + * The transformation type. + */ + readonly type: string; + /** + * The transformation reference. + */ + readonly reference: (...args: any[]) => BaseTransformation>; + /** + * Whether it's async. + */ + readonly async: false; + /** + * Transforms known input values. + * + * @param dataset The input dataset. + * @param config The configuration. + * + * @returns The output dataset. + * + * @internal + */ + readonly "~run": (dataset: SuccessDataset, config: Config>) => OutputDataset | TIssue>; + /** + * The input, output and issue type. + * + * @internal + */ + readonly "~types"?: { + readonly input: TInput$1; + readonly output: TOutput$1; + readonly issue: TIssue; + } | undefined; +} +/** +* Base transformation async interface. +*/ +interface BaseTransformationAsync> extends Omit, "reference" | "async" | "~run"> { + /** + * The transformation reference. + */ + readonly reference: (...args: any[]) => BaseTransformation> | BaseTransformationAsync>; + /** + * Whether it's async. + */ + readonly async: true; + /** + * Transforms known input values. + * + * @param dataset The input dataset. + * @param config The configuration. + * + * @returns The output dataset. + * + * @internal + */ + readonly "~run": (dataset: SuccessDataset, config: Config>) => Promise | TIssue>>; +} +//#endregion +//#region src/types/validation.d.ts +/** +* Base validation interface. +*/ +interface BaseValidation> { + /** + * The object kind. + */ + readonly kind: "validation"; + /** + * The validation type. + */ + readonly type: string; + /** + * The validation reference. + */ + readonly reference: (...args: any[]) => BaseValidation>; + /** + * The expected property. + */ + readonly expects: string | null; + /** + * Whether it's async. + */ + readonly async: false; + /** + * Validates known input values. + * + * @param dataset The input dataset. + * @param config The configuration. + * + * @returns The output dataset. + * + * @internal + */ + readonly "~run": (dataset: OutputDataset>, config: Config>) => OutputDataset | TIssue>; + /** + * The input, output and issue type. + * + * @internal + */ + readonly "~types"?: { + readonly input: TInput$1; + readonly output: TOutput$1; + readonly issue: TIssue; + } | undefined; +} +/** +* Base validation async interface. +*/ +interface BaseValidationAsync> extends Omit, "reference" | "async" | "~run"> { + /** + * The validation reference. + */ + readonly reference: (...args: any[]) => BaseValidation> | BaseValidationAsync>; + /** + * Whether it's async. + */ + readonly async: true; + /** + * Validates known input values. + * + * @param dataset The input dataset. + * @param config The configuration. + * + * @returns The output dataset. + * + * @internal + */ + readonly "~run": (dataset: OutputDataset>, config: Config>) => Promise | TIssue>>; +} +//#endregion +//#region src/types/infer.d.ts +/** +* Infer input type. +*/ +type InferInput> | BaseSchemaAsync> | BaseValidation> | BaseValidationAsync> | BaseTransformation> | BaseTransformationAsync> | BaseMetadata> = NonNullable["input"]; +/** +* Infer output type. +*/ +type InferOutput> | BaseSchemaAsync> | BaseValidation> | BaseValidationAsync> | BaseTransformation> | BaseTransformationAsync> | BaseMetadata> = NonNullable["output"]; +/** +* Infer issue type. +*/ +type InferIssue> | BaseSchemaAsync> | BaseValidation> | BaseValidationAsync> | BaseTransformation> | BaseTransformationAsync> | BaseMetadata> = NonNullable["issue"]; +/** +* Constructs a type that is maybe readonly. +*/ +type MaybeReadonly = TValue$1 | Readonly; +/** +* Constructs a type that is deeply readonly. +*/ +type DeepReadonly = TValue$1 extends Record | readonly unknown[] ? { readonly [TKey in keyof TValue$1]: DeepReadonly } : TValue$1; +/** +* Constructs a type that is maybe deeply readonly. +*/ +type MaybeDeepReadonly = TValue$1 | DeepReadonly; +/** +* Constructs a type that is maybe a promise. +*/ +type MaybePromise = TValue$1 | Promise; +/** +* Prettifies a type for better readability. +* +* Hint: This type has no effect and is only used so that TypeScript displays +* the final type in the preview instead of the utility types used. +*/ +type Prettify = { [TKey in keyof TObject]: TObject[TKey] } & {}; +/** +* Marks specific keys as optional. +*/ +type MarkOptional = { [TKey in keyof TObject]?: unknown } & Omit & Partial>; +//#endregion +//#region src/types/other.d.ts +/** +* Error message type. +*/ +type ErrorMessage> = ((issue: TIssue) => string) | string; +/** +* Default type. +*/ +type Default>, TInput$1 extends null | undefined> = MaybeDeepReadonly | TInput$1> | ((dataset?: UnknownDataset, config?: Config>) => MaybeDeepReadonly | TInput$1>) | undefined; +/** +* Default async type. +*/ +type DefaultAsync> | BaseSchemaAsync>, TInput$1 extends null | undefined> = MaybeDeepReadonly | TInput$1> | ((dataset?: UnknownDataset, config?: Config>) => MaybePromise | TInput$1>>) | undefined; +/** +* Default value type. +*/ +type DefaultValue>, null | undefined> | DefaultAsync> | BaseSchemaAsync>, null | undefined>> = TDefault extends DefaultAsync> | BaseSchemaAsync>, infer TInput> ? TDefault extends ((dataset?: UnknownDataset, config?: Config>) => MaybePromise | TInput>>) ? Awaited> : TDefault : never; +//#endregion +//#region src/types/object.d.ts +/** +* Optional entry schema type. +*/ +type OptionalEntrySchema = ExactOptionalSchema>, unknown> | NullishSchema>, unknown> | OptionalSchema>, unknown>; +/** +* Optional entry schema async type. +*/ +type OptionalEntrySchemaAsync = ExactOptionalSchemaAsync> | BaseSchemaAsync>, unknown> | NullishSchemaAsync> | BaseSchemaAsync>, unknown> | OptionalSchemaAsync> | BaseSchemaAsync>, unknown>; +/** +* Object entries interface. +*/ +interface ObjectEntries { + [key: string]: BaseSchema> | SchemaWithFallback>, unknown> | OptionalEntrySchema; +} +/** +* Object entries async interface. +*/ +interface ObjectEntriesAsync { + [key: string]: BaseSchema> | BaseSchemaAsync> | SchemaWithFallback>, unknown> | SchemaWithFallbackAsync> | BaseSchemaAsync>, unknown> | OptionalEntrySchema | OptionalEntrySchemaAsync; +} +/** +* Infer entries input type. +*/ +type InferEntriesInput = { -readonly [TKey in keyof TEntries$1]: InferInput }; +/** +* Infer entries output type. +*/ +type InferEntriesOutput = { -readonly [TKey in keyof TEntries$1]: InferOutput }; +/** +* Optional input keys type. +*/ +type OptionalInputKeys = { [TKey in keyof TEntries$1]: TEntries$1[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? TKey : never }[keyof TEntries$1]; +/** +* Optional output keys type. +*/ +type OptionalOutputKeys = { [TKey in keyof TEntries$1]: TEntries$1[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? undefined extends TEntries$1[TKey]["default"] ? TKey : never : never }[keyof TEntries$1]; +/** +* Input with question marks type. +*/ +type InputWithQuestionMarks> = MarkOptional>; +/** +* Output with question marks type. +*/ +type OutputWithQuestionMarks> = MarkOptional>; +/** +* Readonly output keys type. +*/ +type ReadonlyOutputKeys = { [TKey in keyof TEntries$1]: TEntries$1[TKey] extends { + readonly pipe: readonly unknown[]; +} ? ReadonlyAction extends TEntries$1[TKey]["pipe"][number] ? TKey : never : never }[keyof TEntries$1]; +/** +* Output with readonly type. +*/ +type OutputWithReadonly>> = ReadonlyOutputKeys extends never ? TObject : Readonly & Pick>>; +/** +* Infer object input type. +*/ +type InferObjectInput = Prettify>>; +/** +* Infer object output type. +*/ +type InferObjectOutput = Prettify>>>; +/** +* Infer object issue type. +*/ +type InferObjectIssue = InferIssue; +//#endregion +//#region src/types/issue.d.ts +/** +* Array path item interface. +*/ +interface ArrayPathItem { + /** + * The path item type. + */ + readonly type: "array"; + /** + * The path item origin. + */ + readonly origin: "value"; + /** + * The path item input. + */ + readonly input: MaybeReadonly; + /** + * The path item key. + */ + readonly key: number; + /** + * The path item value. + */ + readonly value: unknown; +} +/** +* Map path item interface. +*/ +interface MapPathItem { + /** + * The path item type. + */ + readonly type: "map"; + /** + * The path item origin. + */ + readonly origin: "key" | "value"; + /** + * The path item input. + */ + readonly input: Map; + /** + * The path item key. + */ + readonly key: unknown; + /** + * The path item value. + */ + readonly value: unknown; +} +/** +* Object path item interface. +*/ +interface ObjectPathItem { + /** + * The path item type. + */ + readonly type: "object"; + /** + * The path item origin. + */ + readonly origin: "key" | "value"; + /** + * The path item input. + */ + readonly input: Record; + /** + * The path item key. + */ + readonly key: string; + /** + * The path item value. + */ + readonly value: unknown; +} +/** +* Set path item interface. +*/ +interface SetPathItem { + /** + * The path item type. + */ + readonly type: "set"; + /** + * The path item origin. + */ + readonly origin: "value"; + /** + * The path item input. + */ + readonly input: Set; + /** + * The path item key. + */ + readonly key: null; + /** + * The path item key. + */ + readonly value: unknown; +} +/** +* Unknown path item interface. +*/ +interface UnknownPathItem { + /** + * The path item type. + */ + readonly type: "unknown"; + /** + * The path item origin. + */ + readonly origin: "key" | "value"; + /** + * The path item input. + */ + readonly input: unknown; + /** + * The path item key. + */ + readonly key: unknown; + /** + * The path item value. + */ + readonly value: unknown; +} +/** +* Issue path item type. +*/ +type IssuePathItem = ArrayPathItem | MapPathItem | ObjectPathItem | SetPathItem | UnknownPathItem; +/** +* Base issue interface. +*/ +interface BaseIssue extends Config> { + /** + * The issue kind. + */ + readonly kind: "schema" | "validation" | "transformation"; + /** + * The issue type. + */ + readonly type: string; + /** + * The raw input data. + */ + readonly input: TInput$1; + /** + * The expected property. + */ + readonly expected: string | null; + /** + * The received property. + */ + readonly received: string; + /** + * The error message. + */ + readonly message: string; + /** + * The input requirement. + */ + readonly requirement?: unknown | undefined; + /** + * The issue path. + */ + readonly path?: [IssuePathItem, ...IssuePathItem[]] | undefined; + /** + * The sub issues. + */ + readonly issues?: [BaseIssue, ...BaseIssue[]] | undefined; +} +//#endregion +//#region src/types/config.d.ts +/** +* Config interface. +*/ +interface Config> { + /** + * The selected language. + */ + readonly lang?: string | undefined; + /** + * The error message. + */ + readonly message?: ErrorMessage | undefined; + /** + * Whether it should be aborted early. + */ + readonly abortEarly?: boolean | undefined; + /** + * Whether a pipe should be aborted early. + */ + readonly abortPipeEarly?: boolean | undefined; +} +//#endregion +//#region src/schemas/array/types.d.ts +/** +* Array issue interface. +*/ +interface ArrayIssue extends BaseIssue { + /** + * The issue kind. + */ + readonly kind: "schema"; + /** + * The issue type. + */ + readonly type: "array"; + /** + * The expected property. + */ + readonly expected: "Array"; +} +//#endregion +//#region src/schemas/array/array.d.ts +/** +* Array schema interface. +*/ +interface ArraySchema>, TMessage extends ErrorMessage | undefined> extends BaseSchema[], InferOutput[], ArrayIssue | InferIssue> { + /** + * The schema type. + */ + readonly type: "array"; + /** + * The schema reference. + */ + readonly reference: typeof array; + /** + * The expected property. + */ + readonly expects: "Array"; + /** + * The array item schema. + */ + readonly item: TItem$1; + /** + * The error message. + */ + readonly message: TMessage; +} +/** +* Creates an array schema. +* +* @param item The item schema. +* +* @returns An array schema. +*/ +declare function array>>(item: TItem$1): ArraySchema; +/** +* Creates an array schema. +* +* @param item The item schema. +* @param message The error message. +* +* @returns An array schema. +*/ +declare function array>, const TMessage extends ErrorMessage | undefined>(item: TItem$1, message: TMessage): ArraySchema; +//#endregion +//#region src/schemas/custom/types.d.ts +/** +* Custom issue interface. +*/ +interface CustomIssue extends BaseIssue { + /** + * The issue kind. + */ + readonly kind: "schema"; + /** + * The issue type. + */ + readonly type: "custom"; + /** + * The expected property. + */ + readonly expected: "unknown"; +} +//#endregion +//#region src/schemas/custom/custom.d.ts +/** +* Check type. +*/ +type Check = (input: unknown) => boolean; +/** +* Custom schema interface. +*/ +interface CustomSchema | undefined> extends BaseSchema { + /** + * The schema type. + */ + readonly type: "custom"; + /** + * The schema reference. + */ + readonly reference: typeof custom; + /** + * The expected property. + */ + readonly expects: "unknown"; + /** + * The type check function. + */ + readonly check: Check; + /** + * The error message. + */ + readonly message: TMessage; +} +/** +* Creates a custom schema. +* +* @param check The type check function. +* +* @returns A custom schema. +*/ +declare function custom(check: Check): CustomSchema; +/** +* Creates a custom schema. +* +* @param check The type check function. +* @param message The error message. +* +* @returns A custom schema. +*/ +declare function custom | undefined = ErrorMessage | undefined>(check: Check, message: TMessage): CustomSchema; +//#endregion +//#region src/schemas/exactOptional/exactOptional.d.ts +/** +* Exact optional schema interface. +*/ +interface ExactOptionalSchema>, TDefault extends Default> extends BaseSchema, InferOutput, InferIssue> { + /** + * The schema type. + */ + readonly type: "exact_optional"; + /** + * The schema reference. + */ + readonly reference: typeof exactOptional; + /** + * The expected property. + */ + readonly expects: TWrapped$1["expects"]; + /** + * The wrapped schema. + */ + readonly wrapped: TWrapped$1; + /** + * The default value. + */ + readonly default: TDefault; +} +/** +* Creates an exact optional schema. +* +* @param wrapped The wrapped schema. +* +* @returns An exact optional schema. +*/ +declare function exactOptional>>(wrapped: TWrapped$1): ExactOptionalSchema; +/** +* Creates an exact optional schema. +* +* @param wrapped The wrapped schema. +* @param default_ The default value. +* +* @returns An exact optional schema. +*/ +declare function exactOptional>, const TDefault extends Default>(wrapped: TWrapped$1, default_: TDefault): ExactOptionalSchema; +//#endregion +//#region src/schemas/exactOptional/exactOptionalAsync.d.ts +/** +* Exact optional schema async interface. +*/ +interface ExactOptionalSchemaAsync> | BaseSchemaAsync>, TDefault extends DefaultAsync> extends BaseSchemaAsync, InferOutput, InferIssue> { + /** + * The schema type. + */ + readonly type: "exact_optional"; + /** + * The schema reference. + */ + readonly reference: typeof exactOptional | typeof exactOptionalAsync; + /** + * The expected property. + */ + readonly expects: TWrapped$1["expects"]; + /** + * The wrapped schema. + */ + readonly wrapped: TWrapped$1; + /** + * The default value. + */ + readonly default: TDefault; +} +/** +* Creates an exact optional schema. +* +* @param wrapped The wrapped schema. +* +* @returns An exact optional schema. +*/ +declare function exactOptionalAsync> | BaseSchemaAsync>>(wrapped: TWrapped$1): ExactOptionalSchemaAsync; +/** +* Creates an exact optional schema. +* +* @param wrapped The wrapped schema. +* @param default_ The default value. +* +* @returns An exact optional schema. +*/ +declare function exactOptionalAsync> | BaseSchemaAsync>, const TDefault extends DefaultAsync>(wrapped: TWrapped$1, default_: TDefault): ExactOptionalSchemaAsync; +//#endregion +//#region src/schemas/looseObject/types.d.ts +/** +* Loose object issue interface. +*/ +interface LooseObjectIssue extends BaseIssue { + /** + * The issue kind. + */ + readonly kind: "schema"; + /** + * The issue type. + */ + readonly type: "loose_object"; + /** + * The expected property. + */ + readonly expected: "Object" | `"${string}"`; +} +//#endregion +//#region src/schemas/looseObject/looseObject.d.ts +/** +* Loose object schema interface. +*/ +interface LooseObjectSchema | undefined> extends BaseSchema & { + [key: string]: unknown; +}, InferObjectOutput & { + [key: string]: unknown; +}, LooseObjectIssue | InferObjectIssue> { + /** + * The schema type. + */ + readonly type: "loose_object"; + /** + * The schema reference. + */ + readonly reference: typeof looseObject; + /** + * The expected property. + */ + readonly expects: "Object"; + /** + * The entries schema. + */ + readonly entries: TEntries$1; + /** + * The error message. + */ + readonly message: TMessage; +} +/** +* Creates a loose object schema. +* +* @param entries The entries schema. +* +* @returns A loose object schema. +*/ +declare function looseObject(entries: TEntries$1): LooseObjectSchema; +/** +* Creates a loose object schema. +* +* @param entries The entries schema. +* @param message The error message. +* +* @returns A loose object schema. +*/ +declare function looseObject | undefined>(entries: TEntries$1, message: TMessage): LooseObjectSchema; +//#endregion +//#region src/schemas/nullish/types.d.ts +/** +* Infer nullish output type. +*/ +type InferNullishOutput> | BaseSchemaAsync>, TDefault extends DefaultAsync> = undefined extends TDefault ? InferOutput | null | undefined : InferOutput | Extract, null | undefined>; +//#endregion +//#region src/schemas/nullish/nullish.d.ts +/** +* Nullish schema interface. +*/ +interface NullishSchema>, TDefault extends Default> extends BaseSchema | null | undefined, InferNullishOutput, InferIssue> { + /** + * The schema type. + */ + readonly type: "nullish"; + /** + * The schema reference. + */ + readonly reference: typeof nullish; + /** + * The expected property. + */ + readonly expects: `(${TWrapped$1["expects"]} | null | undefined)`; + /** + * The wrapped schema. + */ + readonly wrapped: TWrapped$1; + /** + * The default value. + */ + readonly default: TDefault; +} +/** +* Creates a nullish schema. +* +* @param wrapped The wrapped schema. +* +* @returns A nullish schema. +*/ +declare function nullish>>(wrapped: TWrapped$1): NullishSchema; +/** +* Creates a nullish schema. +* +* @param wrapped The wrapped schema. +* @param default_ The default value. +* +* @returns A nullish schema. +*/ +declare function nullish>, const TDefault extends Default>(wrapped: TWrapped$1, default_: TDefault): NullishSchema; +//#endregion +//#region src/schemas/nullish/nullishAsync.d.ts +/** +* Nullish schema async interface. +*/ +interface NullishSchemaAsync> | BaseSchemaAsync>, TDefault extends DefaultAsync> extends BaseSchemaAsync | null | undefined, InferNullishOutput, InferIssue> { + /** + * The schema type. + */ + readonly type: "nullish"; + /** + * The schema reference. + */ + readonly reference: typeof nullish | typeof nullishAsync; + /** + * The expected property. + */ + readonly expects: `(${TWrapped$1["expects"]} | null | undefined)`; + /** + * The wrapped schema. + */ + readonly wrapped: TWrapped$1; + /** + * The default value. + */ + readonly default: TDefault; +} +/** +* Creates a nullish schema. +* +* @param wrapped The wrapped schema. +* +* @returns A nullish schema. +*/ +declare function nullishAsync> | BaseSchemaAsync>>(wrapped: TWrapped$1): NullishSchemaAsync; +/** +* Creates a nullish schema. +* +* @param wrapped The wrapped schema. +* @param default_ The default value. +* +* @returns A nullish schema. +*/ +declare function nullishAsync> | BaseSchemaAsync>, const TDefault extends DefaultAsync>(wrapped: TWrapped$1, default_: TDefault): NullishSchemaAsync; +//#endregion +//#region src/schemas/object/types.d.ts +/** +* Object issue interface. +*/ +interface ObjectIssue extends BaseIssue { + /** + * The issue kind. + */ + readonly kind: "schema"; + /** + * The issue type. + */ + readonly type: "object"; + /** + * The expected property. + */ + readonly expected: "Object" | `"${string}"`; +} +//#endregion +//#region src/schemas/object/object.d.ts +/** +* Object schema interface. +*/ +interface ObjectSchema | undefined> extends BaseSchema, InferObjectOutput, ObjectIssue | InferObjectIssue> { + /** + * The schema type. + */ + readonly type: "object"; + /** + * The schema reference. + */ + readonly reference: typeof object; + /** + * The expected property. + */ + readonly expects: "Object"; + /** + * The entries schema. + */ + readonly entries: TEntries$1; + /** + * The error message. + */ + readonly message: TMessage; +} +/** +* Creates an object schema. +* +* Hint: This schema removes unknown entries. The output will only include the +* entries you specify. To include unknown entries, use `looseObject`. To +* return an issue for unknown entries, use `strictObject`. To include and +* validate unknown entries, use `objectWithRest`. +* +* @param entries The entries schema. +* +* @returns An object schema. +*/ +declare function object(entries: TEntries$1): ObjectSchema; +/** +* Creates an object schema. +* +* Hint: This schema removes unknown entries. The output will only include the +* entries you specify. To include unknown entries, use `looseObject`. To +* return an issue for unknown entries, use `strictObject`. To include and +* validate unknown entries, use `objectWithRest`. +* +* @param entries The entries schema. +* @param message The error message. +* +* @returns An object schema. +*/ +declare function object | undefined>(entries: TEntries$1, message: TMessage): ObjectSchema; +//#endregion +//#region src/schemas/optional/types.d.ts +/** +* Infer optional output type. +*/ +type InferOptionalOutput> | BaseSchemaAsync>, TDefault extends DefaultAsync> = undefined extends TDefault ? InferOutput | undefined : InferOutput | Extract, undefined>; +//#endregion +//#region src/schemas/optional/optional.d.ts +/** +* Optional schema interface. +*/ +interface OptionalSchema>, TDefault extends Default> extends BaseSchema | undefined, InferOptionalOutput, InferIssue> { + /** + * The schema type. + */ + readonly type: "optional"; + /** + * The schema reference. + */ + readonly reference: typeof optional; + /** + * The expected property. + */ + readonly expects: `(${TWrapped$1["expects"]} | undefined)`; + /** + * The wrapped schema. + */ + readonly wrapped: TWrapped$1; + /** + * The default value. + */ + readonly default: TDefault; +} +/** +* Creates an optional schema. +* +* @param wrapped The wrapped schema. +* +* @returns An optional schema. +*/ +declare function optional>>(wrapped: TWrapped$1): OptionalSchema; +/** +* Creates an optional schema. +* +* @param wrapped The wrapped schema. +* @param default_ The default value. +* +* @returns An optional schema. +*/ +declare function optional>, const TDefault extends Default>(wrapped: TWrapped$1, default_: TDefault): OptionalSchema; +//#endregion +//#region src/schemas/optional/optionalAsync.d.ts +/** +* Optional schema async interface. +*/ +interface OptionalSchemaAsync> | BaseSchemaAsync>, TDefault extends DefaultAsync> extends BaseSchemaAsync | undefined, InferOptionalOutput, InferIssue> { + /** + * The schema type. + */ + readonly type: "optional"; + /** + * The schema reference. + */ + readonly reference: typeof optional | typeof optionalAsync; + /** + * The expected property. + */ + readonly expects: `(${TWrapped$1["expects"]} | undefined)`; + /** + * The wrapped schema. + */ + readonly wrapped: TWrapped$1; + /** + * The default value. + */ + readonly default: TDefault; +} +/** +* Creates an optional schema. +* +* @param wrapped The wrapped schema. +* +* @returns An optional schema. +*/ +declare function optionalAsync> | BaseSchemaAsync>>(wrapped: TWrapped$1): OptionalSchemaAsync; +/** +* Creates an optional schema. +* +* @param wrapped The wrapped schema. +* @param default_ The default value. +* +* @returns An optional schema. +*/ +declare function optionalAsync> | BaseSchemaAsync>, const TDefault extends DefaultAsync>(wrapped: TWrapped$1, default_: TDefault): OptionalSchemaAsync; +//#endregion +//#region src/schemas/record/types.d.ts +/** +* Record issue interface. +*/ +interface RecordIssue extends BaseIssue { + /** + * The issue kind. + */ + readonly kind: "schema"; + /** + * The issue type. + */ + readonly type: "record"; + /** + * The expected property. + */ + readonly expected: "Object"; +} +/** +* Is literal type. +*/ +type IsLiteral = string extends TKey$1 ? false : number extends TKey$1 ? false : symbol extends TKey$1 ? false : TKey$1 extends Brand ? false : true; +/** +* Optional keys type. +*/ +type OptionalKeys> = { [TKey in keyof TObject]: IsLiteral extends true ? TKey : never }[keyof TObject]; +/** +* With question marks type. +* +* Hint: We mark an entry as optional if we detect that its key is a literal +* type. The reason for this is that it is not technically possible to detect +* missing literal keys without restricting the key schema to `string`, `enum` +* and `picklist`. However, if `enum` and `picklist` are used, it is better to +* use `object` with `entriesFromList` because it already covers the needed +* functionality. This decision also reduces the bundle size of `record`, +* because it only needs to check the entries of the input and not any missing +* keys. +*/ +type WithQuestionMarks> = MarkOptional>; +/** +* With readonly type. +*/ +type WithReadonly> | BaseSchemaAsync>, TObject extends WithQuestionMarks>> = TValue$1 extends { + readonly pipe: readonly unknown[]; +} ? ReadonlyAction extends TValue$1["pipe"][number] ? Readonly : TObject : TObject; +/** +* Infer record input type. +*/ +type InferRecordInput> | BaseSchemaAsync>, TValue$1 extends BaseSchema> | BaseSchemaAsync>> = Prettify, InferInput>>>; +/** +* Infer record output type. +*/ +type InferRecordOutput> | BaseSchemaAsync>, TValue$1 extends BaseSchema> | BaseSchemaAsync>> = Prettify, InferOutput>>>>; +//#endregion +//#region src/schemas/record/record.d.ts +/** +* Record schema interface. +*/ +interface RecordSchema>, TValue$1 extends BaseSchema>, TMessage extends ErrorMessage | undefined> extends BaseSchema, InferRecordOutput, RecordIssue | InferIssue | InferIssue> { + /** + * The schema type. + */ + readonly type: "record"; + /** + * The schema reference. + */ + readonly reference: typeof record; + /** + * The expected property. + */ + readonly expects: "Object"; + /** + * The record key schema. + */ + readonly key: TKey$1; + /** + * The record value schema. + */ + readonly value: TValue$1; + /** + * The error message. + */ + readonly message: TMessage; +} +/** +* Creates a record schema. +* +* @param key The key schema. +* @param value The value schema. +* +* @returns A record schema. +*/ +declare function record>, const TValue$1 extends BaseSchema>>(key: TKey$1, value: TValue$1): RecordSchema; +/** +* Creates a record schema. +* +* @param key The key schema. +* @param value The value schema. +* @param message The error message. +* +* @returns A record schema. +*/ +declare function record>, const TValue$1 extends BaseSchema>, const TMessage extends ErrorMessage | undefined>(key: TKey$1, value: TValue$1, message: TMessage): RecordSchema; +//#endregion +//#region src/schemas/string/string.d.ts +/** +* String issue interface. +*/ +interface StringIssue extends BaseIssue { + /** + * The issue kind. + */ + readonly kind: "schema"; + /** + * The issue type. + */ + readonly type: "string"; + /** + * The expected property. + */ + readonly expected: "string"; +} +/** +* String schema interface. +*/ +interface StringSchema | undefined> extends BaseSchema { + /** + * The schema type. + */ + readonly type: "string"; + /** + * The schema reference. + */ + readonly reference: typeof string; + /** + * The expected property. + */ + readonly expects: "string"; + /** + * The error message. + */ + readonly message: TMessage; +} +/** +* Creates a string schema. +* +* @returns A string schema. +*/ +declare function string(): StringSchema; +/** +* Creates a string schema. +* +* @param message The error message. +* +* @returns A string schema. +*/ +declare function string | undefined>(message: TMessage): StringSchema; +//#endregion +//#region src/schemas/undefined/undefined.d.ts +/** +* Undefined issue interface. +*/ +interface UndefinedIssue extends BaseIssue { + /** + * The issue kind. + */ + readonly kind: "schema"; + /** + * The issue type. + */ + readonly type: "undefined"; + /** + * The expected property. + */ + readonly expected: "undefined"; +} +/** +* Undefined schema interface. +*/ +interface UndefinedSchema | undefined> extends BaseSchema { + /** + * The schema type. + */ + readonly type: "undefined"; + /** + * The schema reference. + */ + readonly reference: typeof undefined_; + /** + * The expected property. + */ + readonly expects: "undefined"; + /** + * The error message. + */ + readonly message: TMessage; +} +/** +* Creates an undefined schema. +* +* @returns An undefined schema. +*/ +declare function undefined_(): UndefinedSchema; +/** +* Creates an undefined schema. +* +* @param message The error message. +* +* @returns An undefined schema. +*/ +declare function undefined_ | undefined>(message: TMessage): UndefinedSchema; +//#endregion +//#region src/schemas/void/void.d.ts +/** +* Void issue interface. +*/ +interface VoidIssue extends BaseIssue { + /** + * The issue kind. + */ + readonly kind: "schema"; + /** + * The issue type. + */ + readonly type: "void"; + /** + * The expected property. + */ + readonly expected: "void"; +} +/** +* Void schema interface. +*/ +interface VoidSchema | undefined> extends BaseSchema { + /** + * The schema type. + */ + readonly type: "void"; + /** + * The schema reference. + */ + readonly reference: typeof void_; + /** + * The expected property. + */ + readonly expects: "void"; + /** + * The error message. + */ + readonly message: TMessage; +} +/** +* Creates a void schema. +* +* @returns A void schema. +*/ +declare function void_(): VoidSchema; +/** +* Creates a void schema. +* +* @param message The error message. +* +* @returns A void schema. +*/ +declare function void_ | undefined>(message: TMessage): VoidSchema; +//#endregion +//#region src/actions/brand/brand.d.ts +/** +* Brand symbol. +*/ +declare const BrandSymbol: unique symbol; +/** +* Brand name type. +*/ +type BrandName = string | number | symbol; +/** +* Brand interface. +*/ +interface Brand { + [BrandSymbol]: { [TValue in TName]: TValue }; +} +//#endregion +//#region src/actions/readonly/readonly.d.ts +/** +* Readonly output type. +*/ +type ReadonlyOutput = TInput$1 extends Map ? ReadonlyMap : TInput$1 extends Set ? ReadonlySet : Readonly; +/** +* Readonly action interface. +*/ +interface ReadonlyAction extends BaseTransformation, never> { + /** + * The action type. + */ + readonly type: "readonly"; + /** + * The action reference. + */ + readonly reference: typeof readonly; +} +/** +* Creates a readonly transformation action. +* +* @returns A readonly action. +*/ +declare function readonly(): ReadonlyAction; + +/** + * The core services registered in each runtime. + * + * These lists are the single source of truth: the `*CoreServices` types below derive their keys + * from each definition's `id` (so `getService` typing follows the list), and + * `core-service-types.test.ts` checks the lists against the per-runtime registrar-file convention + * (a `services//.{ts,tsx}` file exists for each listed service, and vice versa) to + * catch a service being added to one without the other. Note this guards the convention, not the + * actual call: a service can have a registrar file yet still not be wired up by its caller. + * + * Each list only references definitions already loaded in that runtime, and the runtime entrypoints + * import the derived *types* (`import type`), so these value imports add no runtime cost to the + * manager/preview/server bundles — only the membership test pulls them in as values. + */ +declare const managerCoreServiceDefs: ServiceDefinition<{ + components: Record; +}, { + readonly docgen: QueryDefinition<{ + components: Record; + }, ObjectSchema<{ + readonly id: StringSchema; + }, undefined>, OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>, { + readonly extractDocgen: ObjectSchema<{ + readonly id: StringSchema; + }, undefined>; + readonly extractAllDocgen: UndefinedSchema; + }, { + readonly extractDocgen: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + readonly extractAllDocgen: VoidSchema; + }, QueryFunctions<{ + readonly docgen: ObjectSchema<{ + readonly id: StringSchema; + }, undefined>; + readonly docgenForAllComponents: VoidSchema; + }, { + readonly docgen: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + readonly docgenForAllComponents: RecordSchema, LooseObjectSchema<{ + readonly subcomponents: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + }>> & ({ + internal?: false; + } | { + __internal_naming_error: "Operation \"docgen\" has internal: true but must be prefixed with \"_\""; + }); + readonly docgenForAllComponents: QueryDefinition<{ + components: Record; + }, VoidSchema, RecordSchema, LooseObjectSchema<{ + readonly subcomponents: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>, { + readonly extractDocgen: ObjectSchema<{ + readonly id: StringSchema; + }, undefined>; + readonly extractAllDocgen: UndefinedSchema; + }, { + readonly extractDocgen: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + readonly extractAllDocgen: VoidSchema; + }, QueryFunctions<{ + readonly docgen: ObjectSchema<{ + readonly id: StringSchema; + }, undefined>; + readonly docgenForAllComponents: VoidSchema; + }, { + readonly docgen: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + readonly docgenForAllComponents: RecordSchema, LooseObjectSchema<{ + readonly subcomponents: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + }>> & ({ + internal?: false; + } | { + __internal_naming_error: "Operation \"docgenForAllComponents\" has internal: true but must be prefixed with \"_\""; + }); +} & { + readonly docgen: { + output: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + }; + readonly docgenForAllComponents: { + output: RecordSchema, LooseObjectSchema<{ + readonly subcomponents: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + }; +}, { + readonly extractDocgen: CommandDefinition<{ + components: Record; + }, ObjectSchema<{ + readonly id: StringSchema; + }, undefined>, OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>, { + readonly extractDocgen: ObjectSchema<{ + readonly id: StringSchema; + }, undefined>; + readonly extractAllDocgen: UndefinedSchema; + }, { + readonly extractDocgen: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + readonly extractAllDocgen: VoidSchema; + }, QueryFunctions<{ + readonly docgen: ObjectSchema<{ + readonly id: StringSchema; + }, undefined>; + readonly docgenForAllComponents: VoidSchema; + }, { + readonly docgen: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + readonly docgenForAllComponents: RecordSchema, LooseObjectSchema<{ + readonly subcomponents: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + }>> & ({ + internal?: false; + } | { + __internal_naming_error: "Operation \"extractDocgen\" has internal: true but must be prefixed with \"_\""; + }); + readonly extractAllDocgen: CommandDefinition<{ + components: Record; + }, UndefinedSchema, VoidSchema, { + readonly extractDocgen: ObjectSchema<{ + readonly id: StringSchema; + }, undefined>; + readonly extractAllDocgen: UndefinedSchema; + }, { + readonly extractDocgen: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + readonly extractAllDocgen: VoidSchema; + }, QueryFunctions<{ + readonly docgen: ObjectSchema<{ + readonly id: StringSchema; + }, undefined>; + readonly docgenForAllComponents: VoidSchema; + }, { + readonly docgen: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + readonly docgenForAllComponents: RecordSchema, LooseObjectSchema<{ + readonly subcomponents: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + }>> & ({ + internal?: false; + } | { + __internal_naming_error: "Operation \"extractAllDocgen\" has internal: true but must be prefixed with \"_\""; + }); +} & { + readonly extractDocgen: { + output: OptionalSchema, LooseObjectSchema<{ + import: OptionalSchema, undefined>; + name: StringSchema; + path: StringSchema; + description: OptionalSchema, undefined>; + summary: OptionalSchema, undefined>; + jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + argTypes: OptionalSchema, undefined>, undefined>; + error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + }, undefined>, undefined>, undefined>; + readonly name: StringSchema; + readonly path: StringSchema; + readonly description: OptionalSchema, undefined>; + readonly summary: OptionalSchema, undefined>; + readonly jsDocTags: RecordSchema, ArraySchema, undefined>, undefined>; + readonly argTypes: OptionalSchema, undefined>, undefined>; + readonly error: OptionalSchema; + readonly message: StringSchema; + }, undefined>, undefined>; + readonly id: StringSchema; + }, undefined>, undefined>; + }; + readonly extractAllDocgen: { + output: VoidSchema; + }; +}, "core/docgen">[]; +/** Maps a list of service definitions to `{ [id]: instance }`, keyed by each definition's id. */ +type CoreServices = { + [Def in TDefs[number] as Def['id']]: ServiceInstanceOf; +}; +/** Core services registered in the Storybook manager. */ +type ManagerCoreServices = CoreServices; +/** Module-level `getService` overloads keyed by a per-runtime core-service map. */ +interface TypedGetService { + (serviceId: K): TMap[K]; + (serviceId: ServiceId): TInstance; +} + +type TestProviderState = 'test-provider-state:pending' | 'test-provider-state:running' | 'test-provider-state:succeeded' | 'test-provider-state:crashed'; +type TestProviderId = string; +type TestProviderStateByProviderId = Record; +type TestProviderStoreEventType = 'run-all' | 'clear-all' | 'settings-changed'; +type TestProviderStoreEvent = BaseEvent & { + type: TestProviderStoreEventType; +}; +type BaseTestProviderStore = { + /** + * Notifies all listeners that settings have changed for test providers. The Storybook UI will + * highlight the test providers to tell the user that settings has changed. + */ + settingsChanged: () => void; + /** + * Subscribe to clicks on the "Run All" button, that is supposed to trigger all test providers to + * run. Your test provider should do the "main thing" when this happens, similar to when the user + * triggers your test provider specifically. + * + * @example + * + * ```typescript + * // Subscribe to run-all events + * const unsubscribe = myTestProviderStore.onRunAll(() => { + * await runAllMyTests(); + * }); + * ``` + */ + onRunAll: (listener: () => void) => () => void; + /** + * Subscribe to clicks on the "Clear All" button, that is supposed to clear all state from test + * providers. Storybook already clears all statuses, but if your test provider has more + * non-status-based state, you can use this to clear that here. + * + * @remarks + * The purpose of this is _not_ to clear your test provider's settings, only the test results. + * @example + * + * ```typescript + * // Subscribe to clear-all events + * const unsubscribe = myTestProviderStore.onClearAll(() => { + * clearMyTestResults(); + * }); + * + * // Later, when no longer needed + * unsubscribe(); + * ``` + */ + onClearAll: (listener: () => void) => () => void; +}; +/** + * Represents a store for a specific test provider, identified by its unique ID. This store provides + * methods to manage the state of an individual test provider, including getting and setting its + * state, running operations with automatic state management, and accessing its unique identifier. + * + * Each test provider has its own instance of this store, allowing for independent state management + * across different test providers in the application. + * + * @example + * + * ```typescript + * // Get a store for a specific test provider + * const grammarStore = getTestProviderStoreById('addon-grammar'); + * + * // Check the current state + * if (grammarStore.getState() === 'test-provider-state:pending') { + * console.log('Grammar tests are ready to run'); + * } + * + * // Run tests with automatic state management + * grammarStore.runWithState(async () => { + * await runGrammarTests(); + * }); + * ``` + * + * @see {@link TestProviderState} for possible state values + * @see {@link BaseTestProviderStore} for methods inherited from the base store + */ +type TestProviderStoreById = BaseTestProviderStore & { + /** + * Gets the current state of this specific test provider + * + * The state represents the current execution status of the test provider, which can be one of the + * following: + * + * - 'test-provider-state:pending': Tests have not been run yet + * - 'test-provider-state:running': Tests are currently running + * - 'test-provider-state:succeeded': Tests completed successfully + * - 'test-provider-state:crashed': Running tests failed or encountered an error + * + * Storybook UI will use this state to determine what to show in the UI. + * + * @remarks + * The 'test-provider-state:crashed' is meant to signify that the test run as a whole failed to + * execute for some reason. It should _not_ be set just because a number of tests failed, use + * statuses and the status store for that. See {@link TestStatusStore} for managing individual test + * statuses. + * @example + * + * ```typescript + * // Get the current state of a specific test provider + * const state = testProviderStore.getState(); + * + * // Conditionally render UI based on the state + * const TestStatus = () => { + * const state = testProviderStore.getState(); + * + * if (state === 'test-provider-state:running') { + * return ; + * } else if (state === 'test-provider-state:succeeded') { + * return ; + * } else if (state === 'test-provider-state:crashed') { + * return ; + * } + * + * return ; + * }; + * ``` + */ + getState: () => TestProviderState; + /** + * Sets the state of this specific test provider + * + * This method allows you to manually update the execution state of the test provider. It's + * typically used when you need to reflect the current status of test execution in the UI or when + * you want to programmatically control the test provider's state. + * + * Common use cases include: + * + * - Setting to 'running' when tests start + * - Setting to 'succeeded' when tests complete successfully + * - Setting to 'crashed' when tests fail or encounter errors + * - Setting to 'pending' to reset the state + * + * The state represents the current execution status of the test provider, which can be one of the + * following: + * + * - 'test-provider-state:pending': Tests have not been run yet + * - 'test-provider-state:running': Tests are currently running + * - 'test-provider-state:succeeded': Tests completed successfully + * - 'test-provider-state:crashed': Running tests failed or encountered an error + * + * Storybook UI will use this state to determine what to show in the UI. + * + * @remarks + * The 'test-provider-state:crashed' is meant to signify that the test run as a whole failed to + * execute for some reason. It should _not_ be set just because a number of tests failed, use + * statuses and the status store for that. See {@link TestStatusStore} for managing individual test + * statuses. + * + * For most use cases, consider using {@link runWithState} instead, which provides automatic state + * management and error handling during test execution. + * @example + * + * ```typescript + * // Update the state when tests start running + * const startTests = async () => { + * testProviderStore.setState('test-provider-state:running'); + * ... run tests ... + * }; + * ``` + */ + setState: (state: TestProviderState) => void; + /** + * Runs a callback and automatically updates the test provider's state with running, succeeded or + * crashed, depending on the end result. + * + * - Immediately changes the state to 'running' + * - If the callback returns/resolves, change the state to 'succeeded'. + * - If the callback throws an error/rejects, change the state to 'crashed'. + * + * This approach helps prevent state inconsistencies that might occur if exceptions are thrown + * during test execution. + * + * @example + * + * ```typescript + * // Run tests with automatic state management + * const runTests = () => { + * testProviderStore.runWithState(async () => { + * // The state is automatically set to 'running' before this callback + * + * // Run tests here... + * const results = await executeTests(); + * }); + * }; + * ``` + */ + runWithState: (callback: () => void | Promise) => Promise; + /** The unique identifier for this test provider */ + testProviderId: TestProviderId; +}; +/** + * React OR preview hook for accessing the state of _all_ test providers. This hook will only + * trigger a re-render when the state changes. It is recommended to pass the optional selector, to + * get more fine-grained control of re-renders. + * + * @example + * + * ```typescript + * const TestStatus = () => { + * const state = useTestProviderStore((state) => state['my-test-provider']); + * }; + * ``` + */ +type UseTestProviderStore = ( +/** + * Optional selector function to extract or transform specific parts of the state + * + * @example + * + * ```typescript + * // Use the entire state + * const allProviderStates = useTestProviderStore(); + * + * // Get state for a specific provider + * const myProviderState = useTestProviderStore((state) => state['my-test-provider']); + * + * // Get a count of providers in each state + * const statusCounts = useTestProviderStore((state) => { + * const counts = { + * pending: 0, + * running: 0, + * succeeded: 0, + * crashed: 0, + * }; + * + * Object.values(state).forEach((status) => { + * if (status === 'test-provider-state:pending') counts.pending++; + * else if (status === 'test-provider-state:running') counts.running++; + * else if (status === 'test-provider-state:succeeded') counts.succeeded++; + * else if (status === 'test-provider-state:crashed') counts.crashed++; + * }); + * + * return counts; + * }); + * + * // Check if all tests have completed + * const allTestsCompleted = useTestProviderStore((state) => { + * return Object.values(state).every( + * (status) => + * status === 'test-provider-state:succeeded' || + * status === 'test-provider-state:crashed' + * ); + * }); + * ``` + */ +selector?: (state: TestProviderStateByProviderId) => T) => T; + +type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:new' | 'status-value:modified' | 'status-value:affected' | 'status-value:reviewing' | 'status-value:warning' | 'status-value:error' | 'status-value:unknown'; +type StatusTypeId = string; +type StatusByTypeId = Record; +type StatusesByStoryIdAndTypeId = Record; +interface Status { + value: StatusValue; + typeId: StatusTypeId; + storyId: StoryId$1; + title: string; + description: string; + data?: any; + sidebarContextMenu?: boolean; +} +declare const StatusStoreEventType: { + readonly SELECT: "select"; +}; +type StatusStoreEvent = { + type: typeof StatusStoreEventType.SELECT; + payload: Status[]; +}; +type StatusStore = { + getAll: () => StatusesByStoryIdAndTypeId; + set: (statuses: Status[]) => void; + onAllStatusChange: (listener: (statuses: StatusesByStoryIdAndTypeId, previousStatuses: StatusesByStoryIdAndTypeId) => void) => () => void; + onSelect: (listener: (selectedStatuses: Status[]) => void) => () => void; + unset: (storyIds?: StoryId$1[]) => void; +}; +type StatusStoreByTypeId = StatusStore & { + typeId: StatusTypeId; +}; +type UseStatusStore = (selector?: (statuses: StatusesByStoryIdAndTypeId) => T) => T; + +declare const fullStatusStore: StatusStore & { + selectStatuses: (statuses: Status[]) => void; + typeId: undefined; +}; +declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId; +declare const useStatusStore: UseStatusStore; +declare const universalStatusStore: UniversalStore; + +declare const fullTestProviderStore: { + settingsChanged: () => void; + onRunAll: (listener: () => void) => () => void; + onClearAll: (listener: () => void) => () => void; +} & { + getFullState: UniversalStore["getState"]; + setFullState: UniversalStore["setState"]; + onSettingsChanged: (listener: (testProviderId: TestProviderId) => void) => () => void; + runAll: () => void; + clearAll: () => void; +}; +declare const getTestProviderStoreById: (testProviderId: TestProviderId) => TestProviderStoreById; +declare const useTestProviderStore: UseTestProviderStore; +declare const universalTestProviderStore: UniversalStore; + +type Primitive = string | number | symbol | bigint | boolean | null | undefined; + +declare namespace util { + type AssertEqual = (() => V extends T ? 1 : 2) extends () => V extends U ? 1 : 2 ? true : false; + export type isAny = 0 extends 1 & T ? true : false; + export const assertEqual: (_: AssertEqual) => void; + export function assertIs(_arg: T): void; + export function assertNever(_x: never): never; + export type Omit = Pick>; + export type OmitKeys = Pick>; + export type MakePartial = Omit & Partial>; + export type Exactly = T & Record, never>; + export type InexactPartial = { + [k in keyof T]?: T[k] | undefined; + }; + export const arrayToEnum: (items: U) => { [k in U[number]]: k; }; + export const getValidEnumValues: (obj: any) => any[]; + export const objectValues: (obj: any) => any[]; + export const objectKeys: ObjectConstructor["keys"]; + export const find: (arr: T[], checker: (arg: T) => any) => T | undefined; + export type identity = objectUtil.identity; + export type flatten = objectUtil.flatten; + export type noUndefined = T extends undefined ? never : T; + export const isInteger: NumberConstructor["isInteger"]; + export function joinValues(array: T, separator?: string): string; + export const jsonStringifyReplacer: (_: string, value: any) => any; + export { }; +} +declare namespace objectUtil { + export type MergeShapes = keyof U & keyof V extends never ? U & V : { + [k in Exclude]: U[k]; + } & V; + type optionalKeys = { + [k in keyof T]: undefined extends T[k] ? k : never; + }[keyof T]; + type requiredKeys = { + [k in keyof T]: undefined extends T[k] ? never : k; + }[keyof T]; + export type addQuestionMarks = { + [K in requiredKeys]: T[K]; + } & { + [K in optionalKeys]?: T[K]; + } & { + [k in keyof T]?: unknown; + }; + export type identity = T; + export type flatten = identity<{ + [k in keyof T]: T[k]; + }>; + export type noNeverKeys = { + [k in keyof T]: [T[k]] extends [never] ? never : k; + }[keyof T]; + export type noNever = identity<{ + [k in noNeverKeys]: k extends keyof T ? T[k] : never; + }>; + export const mergeShapes: (first: U, second: T) => T & U; + export type extendShape = keyof A & keyof B extends never ? A & B : { + [K in keyof A as K extends keyof B ? never : K]: A[K]; + } & { + [K in keyof B]: B[K]; + }; + export { }; +} +declare const ZodParsedType: { + string: "string"; + nan: "nan"; + number: "number"; + integer: "integer"; + float: "float"; + boolean: "boolean"; + date: "date"; + bigint: "bigint"; + symbol: "symbol"; + function: "function"; + undefined: "undefined"; + null: "null"; + array: "array"; + object: "object"; + unknown: "unknown"; + promise: "promise"; + void: "void"; + never: "never"; + map: "map"; + set: "set"; +}; +type ZodParsedType = keyof typeof ZodParsedType; + +type allKeys = T extends any ? keyof T : never; +type typeToFlattenedError = { + formErrors: U[]; + fieldErrors: { + [P in allKeys]?: U[]; + }; +}; +declare const ZodIssueCode: { + invalid_type: "invalid_type"; + invalid_literal: "invalid_literal"; + custom: "custom"; + invalid_union: "invalid_union"; + invalid_union_discriminator: "invalid_union_discriminator"; + invalid_enum_value: "invalid_enum_value"; + unrecognized_keys: "unrecognized_keys"; + invalid_arguments: "invalid_arguments"; + invalid_return_type: "invalid_return_type"; + invalid_date: "invalid_date"; + invalid_string: "invalid_string"; + too_small: "too_small"; + too_big: "too_big"; + invalid_intersection_types: "invalid_intersection_types"; + not_multiple_of: "not_multiple_of"; + not_finite: "not_finite"; +}; +type ZodIssueCode = keyof typeof ZodIssueCode; +type ZodIssueBase = { + path: (string | number)[]; + message?: string | undefined; +}; +interface ZodInvalidTypeIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_type; + expected: ZodParsedType; + received: ZodParsedType; +} +interface ZodInvalidLiteralIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_literal; + expected: unknown; + received: unknown; +} +interface ZodUnrecognizedKeysIssue extends ZodIssueBase { + code: typeof ZodIssueCode.unrecognized_keys; + keys: string[]; +} +interface ZodInvalidUnionIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_union; + unionErrors: ZodError[]; +} +interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_union_discriminator; + options: Primitive[]; +} +interface ZodInvalidEnumValueIssue extends ZodIssueBase { + received: string | number; + code: typeof ZodIssueCode.invalid_enum_value; + options: (string | number)[]; +} +interface ZodInvalidArgumentsIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_arguments; + argumentsError: ZodError; +} +interface ZodInvalidReturnTypeIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_return_type; + returnTypeError: ZodError; +} +interface ZodInvalidDateIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_date; +} +type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "jwt" | "base64url" | { + includes: string; + position?: number | undefined; +} | { + startsWith: string; +} | { + endsWith: string; +}; +interface ZodInvalidStringIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_string; + validation: StringValidation; +} +interface ZodTooSmallIssue extends ZodIssueBase { + code: typeof ZodIssueCode.too_small; + minimum: number | bigint; + inclusive: boolean; + exact?: boolean; + type: "array" | "string" | "number" | "set" | "date" | "bigint"; +} +interface ZodTooBigIssue extends ZodIssueBase { + code: typeof ZodIssueCode.too_big; + maximum: number | bigint; + inclusive: boolean; + exact?: boolean; + type: "array" | "string" | "number" | "set" | "date" | "bigint"; +} +interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase { + code: typeof ZodIssueCode.invalid_intersection_types; +} +interface ZodNotMultipleOfIssue extends ZodIssueBase { + code: typeof ZodIssueCode.not_multiple_of; + multipleOf: number | bigint; +} +interface ZodNotFiniteIssue extends ZodIssueBase { + code: typeof ZodIssueCode.not_finite; +} +interface ZodCustomIssue extends ZodIssueBase { + code: typeof ZodIssueCode.custom; + params?: { + [k: string]: any; + }; +} +type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue; +type ZodIssue = ZodIssueOptionalMessage & { + fatal?: boolean | undefined; + message: string; +}; +type recursiveZodFormattedError = T extends [any, ...any[]] ? { + [K in keyof T]?: ZodFormattedError; +} : T extends any[] ? { + [k: number]: ZodFormattedError; +} : T extends object ? { + [K in keyof T]?: ZodFormattedError; +} : unknown; +type ZodFormattedError = { + _errors: U[]; +} & recursiveZodFormattedError>; +declare class ZodError extends Error { + issues: ZodIssue[]; + get errors(): ZodIssue[]; + constructor(issues: ZodIssue[]); + format(): ZodFormattedError; + format(mapper: (issue: ZodIssue) => U): ZodFormattedError; + static create: (issues: ZodIssue[]) => ZodError; + static assert(value: unknown): asserts value is ZodError; + toString(): string; + get message(): string; + get isEmpty(): boolean; + addIssue: (sub: ZodIssue) => void; + addIssues: (subs?: ZodIssue[]) => void; + flatten(): typeToFlattenedError; + flatten(mapper?: (issue: ZodIssue) => U): typeToFlattenedError; + get formErrors(): typeToFlattenedError; +} +type stripPath = T extends any ? util.OmitKeys : never; +type IssueData = stripPath & { + path?: (string | number)[]; + fatal?: boolean | undefined; +}; +type ErrorMapCtx = { + defaultError: string; + data: any; +}; +type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => { + message: string; +}; + +type ParseParams = { + path: (string | number)[]; + errorMap: ZodErrorMap; + async: boolean; +}; +type ParsePathComponent = string | number; +type ParsePath = ParsePathComponent[]; +interface ParseContext { + readonly common: { + readonly issues: ZodIssue[]; + readonly contextualErrorMap?: ZodErrorMap | undefined; + readonly async: boolean; + }; + readonly path: ParsePath; + readonly schemaErrorMap?: ZodErrorMap | undefined; + readonly parent: ParseContext | null; + readonly data: any; + readonly parsedType: ZodParsedType; +} +type ParseInput = { + data: any; + path: (string | number)[]; + parent: ParseContext; +}; +declare class ParseStatus { + value: "aborted" | "dirty" | "valid"; + dirty(): void; + abort(): void; + static mergeArray(status: ParseStatus, results: SyncParseReturnType[]): SyncParseReturnType; + static mergeObjectAsync(status: ParseStatus, pairs: { + key: ParseReturnType; + value: ParseReturnType; + }[]): Promise>; + static mergeObjectSync(status: ParseStatus, pairs: { + key: SyncParseReturnType; + value: SyncParseReturnType; + alwaysSet?: boolean; + }[]): SyncParseReturnType; +} +type INVALID = { + status: "aborted"; +}; +declare const INVALID: INVALID; +type DIRTY = { + status: "dirty"; + value: T; +}; +declare const DIRTY: (value: T) => DIRTY; +type OK = { + status: "valid"; + value: T; +}; +declare const OK: (value: T) => OK; +type SyncParseReturnType = OK | DIRTY | INVALID; +type AsyncParseReturnType = Promise>; +type ParseReturnType = SyncParseReturnType | AsyncParseReturnType; + +declare namespace enumUtil { + type UnionToIntersectionFn = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never; + type GetUnionLast = UnionToIntersectionFn extends () => infer Last ? Last : never; + type UnionToTuple = [T] extends [never] ? Tuple : UnionToTuple>, [GetUnionLast, ...Tuple]>; + type CastToStringTuple = T extends [string, ...string[]] ? T : never; + export type UnionToTupleString = CastToStringTuple>; + export { }; +} + +declare namespace errorUtil { + type ErrMessage = string | { + message?: string | undefined; + }; + const errToObj: (message?: ErrMessage) => { + message?: string | undefined; + }; + const toString: (message?: ErrMessage) => string | undefined; +} + +declare namespace partialUtil { + type DeepPartial = T extends ZodObject ? ZodObject<{ + [k in keyof T["shape"]]: ZodOptional>; + }, T["_def"]["unknownKeys"], T["_def"]["catchall"]> : T extends ZodArray ? ZodArray, Card> : T extends ZodOptional ? ZodOptional> : T extends ZodNullable ? ZodNullable> : T extends ZodTuple ? { + [k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial : never; + } extends infer PI ? PI extends ZodTupleItems ? ZodTuple : never : never : T; +} + +/** + * The Standard Schema interface. + */ +type StandardSchemaV1 = { + /** + * The Standard Schema properties. + */ + readonly "~standard": StandardSchemaV1.Props; +}; +declare namespace StandardSchemaV1 { + /** + * The Standard Schema properties interface. + */ + export interface Props { + /** + * The version number of the standard. + */ + readonly version: 1; + /** + * The vendor name of the schema library. + */ + readonly vendor: string; + /** + * Validates unknown input values. + */ + readonly validate: (value: unknown) => Result | Promise>; + /** + * Inferred types associated with the schema. + */ + readonly types?: Types | undefined; + } + /** + * The result interface of the validate function. + */ + export type Result = SuccessResult | FailureResult; + /** + * The result interface if validation succeeds. + */ + export interface SuccessResult { + /** + * The typed output value. + */ + readonly value: Output; + /** + * The non-existent issues. + */ + readonly issues?: undefined; + } + /** + * The result interface if validation fails. + */ + export interface FailureResult { + /** + * The issues of failed validation. + */ + readonly issues: ReadonlyArray; + } + /** + * The issue interface of the failure output. + */ + export interface Issue { + /** + * The error message of the issue. + */ + readonly message: string; + /** + * The path of the issue, if any. + */ + readonly path?: ReadonlyArray | undefined; + } + /** + * The path segment interface of the issue. + */ + export interface PathSegment { + /** + * The key representing a path segment. + */ + readonly key: PropertyKey; + } + /** + * The Standard Schema types interface. + */ + export interface Types { + /** + * The input type of the schema. + */ + readonly input: Input; + /** + * The output type of the schema. + */ + readonly output: Output; + } + /** + * Infers the input type of a Standard Schema. + */ + export type InferInput = NonNullable["input"]; + /** + * Infers the output type of a Standard Schema. + */ + export type InferOutput = NonNullable["output"]; + export { }; +} + +interface RefinementCtx { + addIssue: (arg: IssueData) => void; + path: (string | number)[]; +} +type ZodRawShape = { + [k: string]: ZodTypeAny; +}; +type ZodTypeAny = ZodType; +type TypeOf> = T["_output"]; +type input> = T["_input"]; +type output> = T["_output"]; + +type CustomErrorParams = Partial>; +interface ZodTypeDef { + errorMap?: ZodErrorMap | undefined; + description?: string | undefined; +} +type RawCreateParams = { + errorMap?: ZodErrorMap | undefined; + invalid_type_error?: string | undefined; + required_error?: string | undefined; + message?: string | undefined; + description?: string | undefined; +} | undefined; +type SafeParseSuccess = { + success: true; + data: Output; + error?: never; +}; +type SafeParseError = { + success: false; + error: ZodError; + data?: never; +}; +type SafeParseReturnType = SafeParseSuccess | SafeParseError; +declare abstract class ZodType { + readonly _type: Output; + readonly _output: Output; + readonly _input: Input; + readonly _def: Def; + get description(): string | undefined; + "~standard": StandardSchemaV1.Props; + abstract _parse(input: ParseInput): ParseReturnType; + _getType(input: ParseInput): string; + _getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext; + _processInputParams(input: ParseInput): { + status: ParseStatus; + ctx: ParseContext; + }; + _parseSync(input: ParseInput): SyncParseReturnType; + _parseAsync(input: ParseInput): AsyncParseReturnType; + parse(data: unknown, params?: util.InexactPartial): Output; + safeParse(data: unknown, params?: util.InexactPartial): SafeParseReturnType; + "~validate"(data: unknown): StandardSchemaV1.Result | Promise>; + parseAsync(data: unknown, params?: util.InexactPartial): Promise; + safeParseAsync(data: unknown, params?: util.InexactPartial): Promise>; + /** Alias of safeParseAsync */ + spa: (data: unknown, params?: util.InexactPartial) => Promise>; + refine(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects; + refine(check: (arg: Output) => unknown | Promise, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects; + refinement(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects; + refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects; + _refinement(refinement: RefinementEffect["refinement"]): ZodEffects; + superRefine(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects; + superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects; + superRefine(refinement: (arg: Output, ctx: RefinementCtx) => Promise): ZodEffects; + constructor(def: Def); + optional(): ZodOptional; + nullable(): ZodNullable; + nullish(): ZodOptional>; + array(): ZodArray; + promise(): ZodPromise; + or(option: T): ZodUnion<[this, T]>; + and(incoming: T): ZodIntersection; + transform(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise): ZodEffects; + default(def: util.noUndefined): ZodDefault; + default(def: () => util.noUndefined): ZodDefault; + brand(brand?: B): ZodBranded; + catch(def: Output): ZodCatch; + catch(def: (ctx: { + error: ZodError; + input: Input; + }) => Output): ZodCatch; + describe(description: string): this; + pipe(target: T): ZodPipeline; + readonly(): ZodReadonly; + isOptional(): boolean; + isNullable(): boolean; +} +type ZodNumberCheck = { + kind: "min"; + value: number; + inclusive: boolean; + message?: string | undefined; +} | { + kind: "max"; + value: number; + inclusive: boolean; + message?: string | undefined; +} | { + kind: "int"; + message?: string | undefined; +} | { + kind: "multipleOf"; + value: number; + message?: string | undefined; +} | { + kind: "finite"; + message?: string | undefined; +}; +interface ZodNumberDef extends ZodTypeDef { + checks: ZodNumberCheck[]; + typeName: ZodFirstPartyTypeKind.ZodNumber; + coerce: boolean; +} +declare class ZodNumber extends ZodType { + _parse(input: ParseInput): ParseReturnType; + static create: (params?: RawCreateParams & { + coerce?: boolean; + }) => ZodNumber; + gte(value: number, message?: errorUtil.ErrMessage): ZodNumber; + min: (value: number, message?: errorUtil.ErrMessage) => ZodNumber; + gt(value: number, message?: errorUtil.ErrMessage): ZodNumber; + lte(value: number, message?: errorUtil.ErrMessage): ZodNumber; + max: (value: number, message?: errorUtil.ErrMessage) => ZodNumber; + lt(value: number, message?: errorUtil.ErrMessage): ZodNumber; + protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber; + _addCheck(check: ZodNumberCheck): ZodNumber; + int(message?: errorUtil.ErrMessage): ZodNumber; + positive(message?: errorUtil.ErrMessage): ZodNumber; + negative(message?: errorUtil.ErrMessage): ZodNumber; + nonpositive(message?: errorUtil.ErrMessage): ZodNumber; + nonnegative(message?: errorUtil.ErrMessage): ZodNumber; + multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber; + step: (value: number, message?: errorUtil.ErrMessage) => ZodNumber; + finite(message?: errorUtil.ErrMessage): ZodNumber; + safe(message?: errorUtil.ErrMessage): ZodNumber; + get minValue(): number | null; + get maxValue(): number | null; + get isInt(): boolean; + get isFinite(): boolean; +} +interface ZodBooleanDef extends ZodTypeDef { + typeName: ZodFirstPartyTypeKind.ZodBoolean; + coerce: boolean; +} +declare class ZodBoolean extends ZodType { + _parse(input: ParseInput): ParseReturnType; + static create: (params?: RawCreateParams & { + coerce?: boolean; + }) => ZodBoolean; +} +interface ZodArrayDef extends ZodTypeDef { + type: T; + typeName: ZodFirstPartyTypeKind.ZodArray; + exactLength: { + value: number; + message?: string | undefined; + } | null; + minLength: { + value: number; + message?: string | undefined; + } | null; + maxLength: { + value: number; + message?: string | undefined; + } | null; +} +type ArrayCardinality = "many" | "atleastone"; +type arrayOutputType = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][]; +declare class ZodArray extends ZodType, ZodArrayDef, Cardinality extends "atleastone" ? [T["_input"], ...T["_input"][]] : T["_input"][]> { + _parse(input: ParseInput): ParseReturnType; + get element(): T; + min(minLength: number, message?: errorUtil.ErrMessage): this; + max(maxLength: number, message?: errorUtil.ErrMessage): this; + length(len: number, message?: errorUtil.ErrMessage): this; + nonempty(message?: errorUtil.ErrMessage): ZodArray; + static create: (schema: El, params?: RawCreateParams) => ZodArray; +} +type UnknownKeysParam = "passthrough" | "strict" | "strip"; +interface ZodObjectDef extends ZodTypeDef { + typeName: ZodFirstPartyTypeKind.ZodObject; + shape: () => T; + catchall: Catchall; + unknownKeys: UnknownKeys; +} +type objectOutputType = objectUtil.flatten>> & CatchallOutput & PassthroughType; +type baseObjectOutputType = { + [k in keyof Shape]: Shape[k]["_output"]; +}; +type objectInputType = objectUtil.flatten> & CatchallInput & PassthroughType; +type baseObjectInputType = objectUtil.addQuestionMarks<{ + [k in keyof Shape]: Shape[k]["_input"]; +}>; +type CatchallOutput = ZodType extends T ? unknown : { + [k: string]: T["_output"]; +}; +type CatchallInput = ZodType extends T ? unknown : { + [k: string]: T["_input"]; +}; +type PassthroughType = T extends "passthrough" ? { + [k: string]: unknown; +} : unknown; +type deoptional = T extends ZodOptional ? deoptional : T extends ZodNullable ? ZodNullable> : T; +declare class ZodObject, Input = objectInputType> extends ZodType, Input> { + private _cached; + _getCached(): { + shape: T; + keys: string[]; + }; + _parse(input: ParseInput): ParseReturnType; + get shape(): T; + strict(message?: errorUtil.ErrMessage): ZodObject; + strip(): ZodObject; + passthrough(): ZodObject; + /** + * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped. + * If you want to pass through unknown properties, use `.passthrough()` instead. + */ + nonstrict: () => ZodObject; + extend(augmentation: Augmentation): ZodObject, UnknownKeys, Catchall>; + /** + * @deprecated Use `.extend` instead + * */ + augment: (augmentation: Augmentation) => ZodObject, UnknownKeys, Catchall>; + /** + * Prior to zod@1.0.12 there was a bug in the + * inferred type of merged objects. Please + * upgrade if you are experiencing issues. + */ + merge(merging: Incoming): ZodObject, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>; + setKey(key: Key, schema: Schema): ZodObject; + catchall(index: Index): ZodObject; + pick>(mask: Mask): ZodObject>, UnknownKeys, Catchall>; + omit>(mask: Mask): ZodObject, UnknownKeys, Catchall>; + /** + * @deprecated + */ + deepPartial(): partialUtil.DeepPartial; + partial(): ZodObject<{ + [k in keyof T]: ZodOptional; + }, UnknownKeys, Catchall>; + partial>(mask: Mask): ZodObject : T[k]; + }>, UnknownKeys, Catchall>; + required(): ZodObject<{ + [k in keyof T]: deoptional; + }, UnknownKeys, Catchall>; + required>(mask: Mask): ZodObject : T[k]; + }>, UnknownKeys, Catchall>; + keyof(): ZodEnum>; + static create: (shape: Shape, params?: RawCreateParams) => ZodObject, objectInputType>; + static strictCreate: (shape: Shape, params?: RawCreateParams) => ZodObject; + static lazycreate: (shape: () => Shape, params?: RawCreateParams) => ZodObject; +} +type AnyZodObject = ZodObject; +type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>; +interface ZodUnionDef> extends ZodTypeDef { + options: T; + typeName: ZodFirstPartyTypeKind.ZodUnion; +} +declare class ZodUnion extends ZodType, T[number]["_input"]> { + _parse(input: ParseInput): ParseReturnType; + get options(): T; + static create: >(types: Options, params?: RawCreateParams) => ZodUnion; +} +interface ZodIntersectionDef extends ZodTypeDef { + left: T; + right: U; + typeName: ZodFirstPartyTypeKind.ZodIntersection; +} +declare class ZodIntersection extends ZodType, T["_input"] & U["_input"]> { + _parse(input: ParseInput): ParseReturnType; + static create: (left: TSchema, right: USchema, params?: RawCreateParams) => ZodIntersection; +} +type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]]; +type AssertArray = T extends any[] ? T : never; +type OutputTypeOfTuple = AssertArray<{ + [k in keyof T]: T[k] extends ZodType ? T[k]["_output"] : never; +}>; +type OutputTypeOfTupleWithRest = Rest extends ZodTypeAny ? [...OutputTypeOfTuple, ...Rest["_output"][]] : OutputTypeOfTuple; +type InputTypeOfTuple = AssertArray<{ + [k in keyof T]: T[k] extends ZodType ? T[k]["_input"] : never; +}>; +type InputTypeOfTupleWithRest = Rest extends ZodTypeAny ? [...InputTypeOfTuple, ...Rest["_input"][]] : InputTypeOfTuple; +interface ZodTupleDef extends ZodTypeDef { + items: T; + rest: Rest; + typeName: ZodFirstPartyTypeKind.ZodTuple; +} +declare class ZodTuple extends ZodType, ZodTupleDef, InputTypeOfTupleWithRest> { + _parse(input: ParseInput): ParseReturnType; + get items(): T; + rest(rest: RestSchema): ZodTuple; + static create: (schemas: Items, params?: RawCreateParams) => ZodTuple; +} +type EnumValues = readonly [T, ...T[]]; +type Values = { + [k in T[number]]: k; +}; +interface ZodEnumDef extends ZodTypeDef { + values: T; + typeName: ZodFirstPartyTypeKind.ZodEnum; +} +type Writeable = { + -readonly [P in keyof T]: T[P]; +}; +type FilterEnum = Values extends [] ? [] : Values extends [infer Head, ...infer Rest] ? Head extends ToExclude ? FilterEnum : [Head, ...FilterEnum] : never; +type typecast = A extends T ? A : never; +declare function createZodEnum>(values: T, params?: RawCreateParams): ZodEnum>; +declare function createZodEnum(values: T, params?: RawCreateParams): ZodEnum; +declare class ZodEnum extends ZodType, T[number]> { + _cache: Set | undefined; + _parse(input: ParseInput): ParseReturnType; + get options(): T; + get enum(): Values; + get Values(): Values; + get Enum(): Values; + extract(values: ToExtract, newDef?: RawCreateParams): ZodEnum>; + exclude(values: ToExclude, newDef?: RawCreateParams): ZodEnum>, [string, ...string[]]>>; + static create: typeof createZodEnum; +} +interface ZodPromiseDef extends ZodTypeDef { + type: T; + typeName: ZodFirstPartyTypeKind.ZodPromise; +} +declare class ZodPromise extends ZodType, ZodPromiseDef, Promise> { + unwrap(): T; + _parse(input: ParseInput): ParseReturnType; + static create: (schema: Inner, params?: RawCreateParams) => ZodPromise; +} +type RefinementEffect = { + type: "refinement"; + refinement: (arg: T, ctx: RefinementCtx) => any; +}; +type TransformEffect = { + type: "transform"; + transform: (arg: T, ctx: RefinementCtx) => any; +}; +type PreprocessEffect = { + type: "preprocess"; + transform: (arg: T, ctx: RefinementCtx) => any; +}; +type Effect = RefinementEffect | TransformEffect | PreprocessEffect; +interface ZodEffectsDef extends ZodTypeDef { + schema: T; + typeName: ZodFirstPartyTypeKind.ZodEffects; + effect: Effect; +} +declare class ZodEffects, Input = input> extends ZodType, Input> { + innerType(): T; + sourceType(): T; + _parse(input: ParseInput): ParseReturnType; + static create: (schema: I, effect: Effect, params?: RawCreateParams) => ZodEffects; + static createWithPreprocess: (preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects; +} + +interface ZodOptionalDef extends ZodTypeDef { + innerType: T; + typeName: ZodFirstPartyTypeKind.ZodOptional; +} +declare class ZodOptional extends ZodType, T["_input"] | undefined> { + _parse(input: ParseInput): ParseReturnType; + unwrap(): T; + static create: (type: Inner, params?: RawCreateParams) => ZodOptional; +} +interface ZodNullableDef extends ZodTypeDef { + innerType: T; + typeName: ZodFirstPartyTypeKind.ZodNullable; +} +declare class ZodNullable extends ZodType, T["_input"] | null> { + _parse(input: ParseInput): ParseReturnType; + unwrap(): T; + static create: (type: Inner, params?: RawCreateParams) => ZodNullable; +} +interface ZodDefaultDef extends ZodTypeDef { + innerType: T; + defaultValue: () => util.noUndefined; + typeName: ZodFirstPartyTypeKind.ZodDefault; +} +declare class ZodDefault extends ZodType, ZodDefaultDef, T["_input"] | undefined> { + _parse(input: ParseInput): ParseReturnType; + removeDefault(): T; + static create: (type: Inner, params: RawCreateParams & { + default: Inner["_input"] | (() => util.noUndefined); + }) => ZodDefault; +} +interface ZodCatchDef extends ZodTypeDef { + innerType: T; + catchValue: (ctx: { + error: ZodError; + input: unknown; + }) => T["_input"]; + typeName: ZodFirstPartyTypeKind.ZodCatch; +} +declare class ZodCatch extends ZodType, unknown> { + _parse(input: ParseInput): ParseReturnType; + removeCatch(): T; + static create: (type: Inner, params: RawCreateParams & { + catch: Inner["_output"] | (() => Inner["_output"]); + }) => ZodCatch; +} +interface ZodBrandedDef extends ZodTypeDef { + type: T; + typeName: ZodFirstPartyTypeKind.ZodBranded; +} +declare const BRAND: unique symbol; +type BRAND = { + [BRAND]: { + [k in T]: true; + }; +}; +declare class ZodBranded extends ZodType, ZodBrandedDef, T["_input"]> { + _parse(input: ParseInput): ParseReturnType; + unwrap(): T; +} +interface ZodPipelineDef extends ZodTypeDef { + in: A; + out: B; + typeName: ZodFirstPartyTypeKind.ZodPipeline; +} +declare class ZodPipeline extends ZodType, A["_input"]> { + _parse(input: ParseInput): ParseReturnType; + static create(a: ASchema, b: BSchema): ZodPipeline; +} +type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | { + readonly [Symbol.toStringTag]: string; +} | Date | Error | Generator | Promise | RegExp; +type MakeReadonly = T extends Map ? ReadonlyMap : T extends Set ? ReadonlySet : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array ? ReadonlyArray : T extends BuiltIn ? T : Readonly; +interface ZodReadonlyDef extends ZodTypeDef { + innerType: T; + typeName: ZodFirstPartyTypeKind.ZodReadonly; +} +declare class ZodReadonly extends ZodType, ZodReadonlyDef, MakeReadonly> { + _parse(input: ParseInput): ParseReturnType; + static create: (type: Inner, params?: RawCreateParams) => ZodReadonly; + unwrap(): T; +} +declare enum ZodFirstPartyTypeKind { + ZodString = "ZodString", + ZodNumber = "ZodNumber", + ZodNaN = "ZodNaN", + ZodBigInt = "ZodBigInt", + ZodBoolean = "ZodBoolean", + ZodDate = "ZodDate", + ZodSymbol = "ZodSymbol", + ZodUndefined = "ZodUndefined", + ZodNull = "ZodNull", + ZodAny = "ZodAny", + ZodUnknown = "ZodUnknown", + ZodNever = "ZodNever", + ZodVoid = "ZodVoid", + ZodArray = "ZodArray", + ZodObject = "ZodObject", + ZodUnion = "ZodUnion", + ZodDiscriminatedUnion = "ZodDiscriminatedUnion", + ZodIntersection = "ZodIntersection", + ZodTuple = "ZodTuple", + ZodRecord = "ZodRecord", + ZodMap = "ZodMap", + ZodSet = "ZodSet", + ZodFunction = "ZodFunction", + ZodLazy = "ZodLazy", + ZodLiteral = "ZodLiteral", + ZodEnum = "ZodEnum", + ZodEffects = "ZodEffects", + ZodNativeEnum = "ZodNativeEnum", + ZodOptional = "ZodOptional", + ZodNullable = "ZodNullable", + ZodDefault = "ZodDefault", + ZodCatch = "ZodCatch", + ZodPromise = "ZodPromise", + ZodBranded = "ZodBranded", + ZodPipeline = "ZodPipeline", + ZodReadonly = "ZodReadonly" +} + +declare const userSettingSchema: ZodObject<{ + version: ZodNumber; + userSince: ZodOptional; + init: ZodOptional; + }, "strip", ZodTypeAny, { + skipOnboarding?: boolean | undefined; + }, { + skipOnboarding?: boolean | undefined; + }>>; + checklist: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + aiSetup: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + autodocs: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + ciTests: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + controls: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + coverage: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + guidedTour: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + installA11y: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + installChromatic: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + installDocs: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + installVitest: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + mdxDocs: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + moreComponents: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + moreStories: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + onboardingSurvey: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + organizeStories: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + publishStorybook: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + shareStorybook: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + renderComponent: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + runTests: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + viewports: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + visualTests: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + whatsNewStorybook10: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + writeInteractions: ZodOptional>; + mutedAt: ZodOptional; + }, "strict", ZodTypeAny, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }, { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }>>; + }, "strip", ZodTypeAny, { + controls?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + autodocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + accessibilityTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + aiSetup?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + ciTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + coverage?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + guidedTour?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installA11y?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installChromatic?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installVitest?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + mdxDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreComponents?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + onboardingSurvey?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + organizeStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + publishStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + shareStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + renderComponent?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + runTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + viewports?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + visualTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + whatsNewStorybook10?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + writeInteractions?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + }, { + controls?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + autodocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + accessibilityTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + aiSetup?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + ciTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + coverage?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + guidedTour?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installA11y?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installChromatic?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installVitest?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + mdxDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreComponents?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + onboardingSurvey?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + organizeStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + publishStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + shareStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + renderComponent?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + runTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + viewports?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + visualTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + whatsNewStorybook10?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + writeInteractions?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + }>>; + widget: ZodOptional; + }, "strip", ZodTypeAny, { + disable?: boolean | undefined; + }, { + disable?: boolean | undefined; + }>>; + }, "strip", ZodTypeAny, { + items?: { + controls?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + autodocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + accessibilityTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + aiSetup?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + ciTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + coverage?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + guidedTour?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installA11y?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installChromatic?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installVitest?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + mdxDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreComponents?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + onboardingSurvey?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + organizeStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + publishStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + shareStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + renderComponent?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + runTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + viewports?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + visualTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + whatsNewStorybook10?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + writeInteractions?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + } | undefined; + widget?: { + disable?: boolean | undefined; + } | undefined; + }, { + items?: { + controls?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + autodocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + accessibilityTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + aiSetup?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + ciTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + coverage?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + guidedTour?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installA11y?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installChromatic?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installVitest?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + mdxDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreComponents?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + onboardingSurvey?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + organizeStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + publishStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + shareStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + renderComponent?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + runTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + viewports?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + visualTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + whatsNewStorybook10?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + writeInteractions?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + } | undefined; + widget?: { + disable?: boolean | undefined; + } | undefined; + }>>; +}, "strip", ZodTypeAny, { + version: number; + userSince?: number | undefined; + init?: { + skipOnboarding?: boolean | undefined; + } | undefined; + checklist?: { + items?: { + controls?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + autodocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + accessibilityTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + aiSetup?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + ciTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + coverage?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + guidedTour?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installA11y?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installChromatic?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installVitest?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + mdxDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreComponents?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + onboardingSurvey?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + organizeStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + publishStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + shareStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + renderComponent?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + runTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + viewports?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + visualTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + whatsNewStorybook10?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + writeInteractions?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + } | undefined; + widget?: { + disable?: boolean | undefined; + } | undefined; + } | undefined; +}, { + version: number; + userSince?: number | undefined; + init?: { + skipOnboarding?: boolean | undefined; + } | undefined; + checklist?: { + items?: { + controls?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + autodocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + accessibilityTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + aiSetup?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + ciTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + coverage?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + guidedTour?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installA11y?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installChromatic?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + installVitest?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + mdxDocs?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreComponents?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + moreStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + onboardingSurvey?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + organizeStories?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + publishStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + shareStorybook?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + renderComponent?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + runTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + viewports?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + visualTests?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + whatsNewStorybook10?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + writeInteractions?: { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + } | undefined; + } | undefined; + widget?: { + disable?: boolean | undefined; + } | undefined; + } | undefined; +}>; +declare function globalSettings(filePath?: string): Promise; +/** + * A class for reading and writing settings from a JSON file. Supports nested settings with dot + * notation. + */ +declare class Settings { + private filePath; + value: TypeOf; + /** + * Create a new Settings instance + * + * @param filePath Path to the JSON settings file + * @param value Loaded value of settings + */ + constructor(filePath: string, value: TypeOf); + /** Save settings to the file */ + save(): Promise; +} + +/** ChecklistState is the persisted state, which may be incomplete */ +type ChecklistState = NonNullable>['value']['checklist']>; +/** Store uses initialState to ensure all items are present */ +type StoreState = Required> & { + items: NonNullable>; + loaded?: boolean; + /** True unless the user opted out from AI during `storybook init`. Set by the server from the event cache. Treat empty values as true.*/ + aiOptIn?: boolean; + /** True when the user ran the AI setup at some point in the past. Treat empty values as false.*/ + aiSetupRun?: boolean; +}; +type ItemId = keyof StoreState['items']; +type StoreEvent = { + type: 'accept'; + payload: ItemId; +} | { + type: 'done'; + payload: ItemId; +} | { + type: 'skip'; + payload: ItemId; +} | { + type: 'reset'; + payload: ItemId; +} | { + type: 'mute'; + payload: Array; +} | { + type: 'disable'; + payload: boolean; +}; + +declare const universalChecklistStore: UniversalStore; +declare const checklistStore: { + getValue: (id: ItemId) => { + status?: "done" | "open" | "accepted" | "skipped" | undefined; + mutedAt?: number | undefined; + }; + accept: (id: ItemId) => void; + done: (id: ItemId) => void; + skip: (id: ItemId) => void; + reset: (id: ItemId) => void; + mute: (itemIds: Array) => void; + disable: (value: boolean) => void; +}; + +/** + * React hook to get a stable reference to a service command. + * + * Fire-and-forget: the returned async function invokes the command and returns a Promise. + * Callers manage their own loading/error state. This keeps the hook minimal and composable + * with any state management approach (local `useState`, `useReducer`, TanStack Query, etc.). + * + * The reference is stable as long as `service` and `commandName` do not change, so it is + * safe to pass to child components or include in effect dependency arrays. + */ +type CommandFn = TCommands[TKey] extends (...args: any[]) => any ? TCommands[TKey] : never; +/** + * Returns a stable reference to the named service command. + * + * @param service - A service instance from `registerService`. + * @param commandName - The name of the command to invoke. + * + * @example + * ```tsx + * const assignField = useServiceCommand(service, 'assignRecordField'); + * + * return ( + * + * ); + * ``` + */ +declare function useServiceCommand Promise>; +}, TKey extends keyof TInstance['commands'] & string>(service: TInstance, commandName: TKey): CommandFn; + +/** + * React hook to subscribe to a service query with fine-grained reactivity. + * + * Backed by React's `useSyncExternalStore`, so it integrates correctly with React 18+ concurrent + * features. Manager-only: that hook does not exist before React 18, and the preview must keep + * supporting React 16/17, so preview docs blocks use the shim-based `useQuerySubscription` instead. + * + * Returns a {@link QueryState}: the current `data` plus the `load` lifecycle (`status`, + * `loadStatus`, `error`, and the derived booleans). Re-renders whenever the subscribed query emits + * (the runtime already dedupes deeply-equal emissions, so the hook does not). Object inputs are + * compared with deep equality when deciding whether to re-subscribe, so inline literals at the call + * site are safe; selectors are compared by reference, so memoize them (`useCallback` / module + * scope) to avoid re-subscribing every render. + */ + +/** + * Subscribe to a service query and receive reactive {@link QueryState} updates in a React component. + * + * Pass the query directly (e.g. `myService.queries.thing`) so its input/output types infer per + * query. The service must exist: if it may be absent (e.g. behind a feature flag), guard at a parent + * and conditionally render the component that calls this hook. + * + * A void-input query needs no input argument. As soon as a selector is involved the input is + * positional, so a void-input query passes `undefined` explicitly: + * `useServiceQuery(query, undefined, selector)`. + * + * @example + * ```tsx + * const { data, isInitialLoading, isError } = useServiceQuery(recordService.queries.recordFields, { + * entryId: 'a', + * }); + * ``` + */ +declare function useServiceQuery(query: Query): QueryState; +declare function useServiceQuery(query: Query, input: TInput): QueryState; +declare function useServiceQuery(query: Query, input: TInput, selector: (value: TOutput) => TSelected): QueryState; + +/** + * Manager-side entrypoint for the open-service architecture. + * + * Import from here in manager (React) code. Define services with `storybook/open-service`. + * + * Quick start: + * + * ```ts + * import { registerService, useServiceQuery, useServiceCommand } from 'storybook/manager-api'; + * + * // Inside an addons.register callback: + * const service = registerService(myServiceDef); + * + * function MyTool() { + * const { data } = useServiceQuery(service.queries.value); + * const setValue = useServiceCommand(service, 'setValue'); + * return ; + * } + * ``` + */ + +declare const getService: TypedGetService; +/** + * Registers a service in the manager and returns its runtime surface. + * + * The manager is a relay hub: it bridges the dev server and the preview iframes. The channel is read + * via `getChannel()` from `storybook/internal/channels`, which the manager runtime installs before any + * `addons.register` callback runs, so no manual channel setup is needed. + */ +declare function registerService, TCommands extends Commands>(definition: ServiceDefinition, registration?: ServiceRegistrationOptions): ServiceInstance & ServiceRegistryApi; + +export { type API, type API_EventMap, type API_KeyCollection, ActiveTabs, AddonStore, type Combo, ManagerConsumer as Consumer, type KeyboardEventLike, ManagerContext, type ManagerProviderProps, ManagerProvider as Provider, RequestResponseError, type State, type Options as StoreOptions, Tag, addons, combineParameters, controlOrMetaKey, controlOrMetaSymbol, eventMatchesShortcut, eventToShortcut, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, getTestProviderStoreById as experimental_getTestProviderStore, experimental_requestResponse, useStatusStore as experimental_useStatusStore, useTestProviderStore as experimental_useTestProviderStore, useUniversalStore as experimental_useUniversalStore, getService, checklistStore as internal_checklistStore, fullStatusStore as internal_fullStatusStore, fullTestProviderStore as internal_fullTestProviderStore, universalChecklistStore as internal_universalChecklistStore, universalStatusStore as internal_universalStatusStore, universalTestProviderStore as internal_universalTestProviderStore, isMacLike, isShortcutTaken, keyToSymbol, _default as merge, mockChannel, optionOrAltSymbol, registerService, shortcutMatchesShortcut, shortcutToAriaKeyshortcuts, shortcutToHumanString, typesX as types, useAddonState, useArgTypes, useArgs, useChannel, useGlobalTypes, useGlobals, useParameter, useServiceCommand, useServiceQuery, useSharedState, useStoryPrepared, useStorybookApi, useStorybookState }; diff --git a/tools/ui/node_modules/storybook/dist/manager-api/index.js b/tools/ui/node_modules/storybook/dist/manager-api/index.js new file mode 100644 index 0000000000000000000000000000000000000000..18bab759bce27c0efb03bbc971b72503c5be813a --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/manager-api/index.js @@ -0,0 +1,3311 @@ +import { + UNIVERSAL_STATUS_STORE_OPTIONS, + countStatusesByValue, + createStatusStore, + statusValueShortName, + toStatusValue +} from "../_browser-chunks/chunk-4PUEAVR7.js"; +import { + isReviewManagerRoute +} from "../_browser-chunks/chunk-YI2IBIQS.js"; +import { + UniversalStore, + parse, + stringify as stringify2 +} from "../_browser-chunks/chunk-GPBLMYGI.js"; +import "../_browser-chunks/chunk-MFQQ5L5I.js"; +import { + countBy, + dequal, + getService, + partition, + registerService, + useServiceCommand, + useServiceQuery +} from "../_browser-chunks/chunk-DFGA7I22.js"; +import { + BUILT_IN_FILTERS, + Tag, + USER_TAG_FILTER, + mockChannel +} from "../_browser-chunks/chunk-A26ZOLVJ.js"; +import { + stringify +} from "../_browser-chunks/chunk-SFVA4SBT.js"; +import { + require_memoizerific +} from "../_browser-chunks/chunk-DRQKCCAG.js"; +import "../_browser-chunks/chunk-W6Y3UHOT.js"; +import "../_browser-chunks/chunk-KUHYVZJN.js"; +import "../_browser-chunks/chunk-QC4HFS6K.js"; +import { + mapValues, + mergeWith, + omit, + pick, + toMerged +} from "../_browser-chunks/chunk-5GYAEUAU.js"; +import { + isEqual +} from "../_browser-chunks/chunk-Z3B64JMR.js"; +import "../_browser-chunks/chunk-NZMVUW5T.js"; +import { + getChannel, + setChannel +} from "../_browser-chunks/chunk-KK3JJ3E4.js"; +import "../_browser-chunks/chunk-IUGBVGDA.js"; +import "../_browser-chunks/chunk-2HVKLHKJ.js"; +import "../_browser-chunks/chunk-SC67XZST.js"; +import { + dedent +} from "../_browser-chunks/chunk-3LY4VQVK.js"; +import { + __commonJS, + __export, + __toESM +} from "../_browser-chunks/chunk-IMSF75WX.js"; + +// ../../node_modules/toggle-selection/index.js +var require_toggle_selection = __commonJS({ + "../../node_modules/toggle-selection/index.js"(exports, module) { + module.exports = function() { + var selection = document.getSelection(); + if (!selection.rangeCount) + return function() { + }; + for (var active = document.activeElement, ranges = [], i = 0; i < selection.rangeCount; i++) + ranges.push(selection.getRangeAt(i)); + switch (active.tagName.toUpperCase()) { + // .toUpperCase handles XHTML + case "INPUT": + case "TEXTAREA": + active.blur(); + break; + default: + active = null; + break; + } + return selection.removeAllRanges(), function() { + selection.type === "Caret" && selection.removeAllRanges(), selection.rangeCount || ranges.forEach(function(range) { + selection.addRange(range); + }), active && active.focus(); + }; + }; + } +}); + +// ../../node_modules/copy-to-clipboard/index.js +var require_copy_to_clipboard = __commonJS({ + "../../node_modules/copy-to-clipboard/index.js"(exports, module) { + "use strict"; + var deselectCurrent = require_toggle_selection(), clipboardToIE11Formatting = { + "text/plain": "Text", + "text/html": "Url", + default: "Text" + }, defaultMessage = "Copy to clipboard: #{key}, Enter"; + function format(message) { + var copyKey = (/mac os x/i.test(navigator.userAgent) ? "\u2318" : "Ctrl") + "+C"; + return message.replace(/#{\s*key\s*}/g, copyKey); + } + function copy2(text, options) { + var debug, message, reselectPrevious, range, selection, mark, success = !1; + options || (options = {}), debug = options.debug || !1; + try { + reselectPrevious = deselectCurrent(), range = document.createRange(), selection = document.getSelection(), mark = document.createElement("span"), mark.textContent = text, mark.ariaHidden = "true", mark.style.all = "unset", mark.style.position = "fixed", mark.style.top = 0, mark.style.clip = "rect(0, 0, 0, 0)", mark.style.whiteSpace = "pre", mark.style.webkitUserSelect = "text", mark.style.MozUserSelect = "text", mark.style.msUserSelect = "text", mark.style.userSelect = "text", mark.addEventListener("copy", function(e) { + if (e.stopPropagation(), options.format) + if (e.preventDefault(), typeof e.clipboardData > "u") { + debug && console.warn("unable to use e.clipboardData"), debug && console.warn("trying IE specific stuff"), window.clipboardData.clearData(); + var format2 = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting.default; + window.clipboardData.setData(format2, text); + } else + e.clipboardData.clearData(), e.clipboardData.setData(options.format, text); + options.onCopy && (e.preventDefault(), options.onCopy(e.clipboardData)); + }), document.body.appendChild(mark), range.selectNodeContents(mark), selection.addRange(range); + var successful = document.execCommand("copy"); + if (!successful) + throw new Error("copy command was unsuccessful"); + success = !0; + } catch (err) { + debug && console.error("unable to copy using execCommand: ", err), debug && console.warn("trying IE specific stuff"); + try { + window.clipboardData.setData(options.format || "text", text), options.onCopy && options.onCopy(window.clipboardData), success = !0; + } catch (err2) { + debug && console.error("unable to copy using clipboardData: ", err2), debug && console.error("falling back to prompt"), message = format("message" in options ? options.message : defaultMessage), window.prompt(message, text); + } + } finally { + selection && (typeof selection.removeRange == "function" ? selection.removeRange(range) : selection.removeAllRanges()), mark && document.body.removeChild(mark), reselectPrevious(); + } + return success; + } + module.exports = copy2; + } +}); + +// ../../node_modules/store2/dist/store2.js +var require_store2 = __commonJS({ + "../../node_modules/store2/dist/store2.js"(exports, module) { + (function(window2, define) { + var _ = { + version: "2.14.4", + areas: {}, + apis: {}, + nsdelim: ".", + // utilities + inherit: function(api, o) { + for (var p in api) + o.hasOwnProperty(p) || Object.defineProperty(o, p, Object.getOwnPropertyDescriptor(api, p)); + return o; + }, + stringify: function(d, fn) { + return d === void 0 || typeof d == "function" ? d + "" : JSON.stringify(d, fn || _.replace); + }, + parse: function(s, fn) { + try { + return JSON.parse(s, fn || _.revive); + } catch { + return s; + } + }, + // extension hooks + fn: function(name, fn) { + _.storeAPI[name] = fn; + for (var api in _.apis) + _.apis[api][name] = fn; + }, + get: function(area, key) { + return area.getItem(key); + }, + set: function(area, key, string) { + area.setItem(key, string); + }, + remove: function(area, key) { + area.removeItem(key); + }, + key: function(area, i) { + return area.key(i); + }, + length: function(area) { + return area.length; + }, + clear: function(area) { + area.clear(); + }, + // core functions + Store: function(id, area, namespace) { + var store3 = _.inherit(_.storeAPI, function(key, data, overwrite) { + return arguments.length === 0 ? store3.getAll() : typeof data == "function" ? store3.transact(key, data, overwrite) : data !== void 0 ? store3.set(key, data, overwrite) : typeof key == "string" || typeof key == "number" ? store3.get(key) : typeof key == "function" ? store3.each(key) : key ? store3.setAll(key, data) : store3.clear(); + }); + store3._id = id; + try { + var testKey = "__store2_test"; + area.setItem(testKey, "ok"), store3._area = area, area.removeItem(testKey); + } catch { + store3._area = _.storage("fake"); + } + return store3._ns = namespace || "", _.areas[id] || (_.areas[id] = store3._area), _.apis[store3._ns + store3._id] || (_.apis[store3._ns + store3._id] = store3), store3; + }, + storeAPI: { + // admin functions + area: function(id, area) { + var store3 = this[id]; + return (!store3 || !store3.area) && (store3 = _.Store(id, area, this._ns), this[id] || (this[id] = store3)), store3; + }, + namespace: function(namespace, singleArea, delim) { + if (delim = delim || this._delim || _.nsdelim, !namespace) + return this._ns ? this._ns.substring(0, this._ns.length - delim.length) : ""; + var ns = namespace, store3 = this[ns]; + if ((!store3 || !store3.namespace) && (store3 = _.Store(this._id, this._area, this._ns + ns + delim), store3._delim = delim, this[ns] || (this[ns] = store3), !singleArea)) + for (var name in _.areas) + store3.area(name, _.areas[name]); + return store3; + }, + isFake: function(force) { + return force ? (this._real = this._area, this._area = _.storage("fake")) : force === !1 && (this._area = this._real || this._area), this._area.name === "fake"; + }, + toString: function() { + return "store" + (this._ns ? "." + this.namespace() : "") + "[" + this._id + "]"; + }, + // storage functions + has: function(key) { + return this._area.has ? this._area.has(this._in(key)) : this._in(key) in this._area; + }, + size: function() { + return this.keys().length; + }, + each: function(fn, fill) { + for (var i = 0, m = _.length(this._area); i < m; i++) { + var key = this._out(_.key(this._area, i)); + if (key !== void 0 && fn.call(this, key, this.get(key), fill) === !1) + break; + m > _.length(this._area) && (m--, i--); + } + return fill || this; + }, + keys: function(fillList) { + return this.each(function(k, v, list) { + list.push(k); + }, fillList || []); + }, + get: function(key, alt) { + var s = _.get(this._area, this._in(key)), fn; + return typeof alt == "function" && (fn = alt, alt = null), s !== null ? _.parse(s, fn) : alt ?? s; + }, + getAll: function(fillObj) { + return this.each(function(k, v, all) { + all[k] = v; + }, fillObj || {}); + }, + transact: function(key, fn, alt) { + var val = this.get(key, alt), ret = fn(val); + return this.set(key, ret === void 0 ? val : ret), this; + }, + set: function(key, data, overwrite) { + var d = this.get(key), replacer; + return d != null && overwrite === !1 ? data : (typeof overwrite == "function" && (replacer = overwrite, overwrite = void 0), _.set(this._area, this._in(key), _.stringify(data, replacer), overwrite) || d); + }, + setAll: function(data, overwrite) { + var changed, val; + for (var key in data) + val = data[key], this.set(key, val, overwrite) !== val && (changed = !0); + return changed; + }, + add: function(key, data, replacer) { + var d = this.get(key); + if (d instanceof Array) + data = d.concat(data); + else if (d !== null) { + var type = typeof d; + if (type === typeof data && type === "object") { + for (var k in data) + d[k] = data[k]; + data = d; + } else + data = d + data; + } + return _.set(this._area, this._in(key), _.stringify(data, replacer)), data; + }, + remove: function(key, alt) { + var d = this.get(key, alt); + return _.remove(this._area, this._in(key)), d; + }, + clear: function() { + return this._ns ? this.each(function(k) { + _.remove(this._area, this._in(k)); + }, 1) : _.clear(this._area), this; + }, + clearAll: function() { + var area = this._area; + for (var id in _.areas) + _.areas.hasOwnProperty(id) && (this._area = _.areas[id], this.clear()); + return this._area = area, this; + }, + // internal use functions + _in: function(k) { + return typeof k != "string" && (k = _.stringify(k)), this._ns ? this._ns + k : k; + }, + _out: function(k) { + return this._ns ? k && k.indexOf(this._ns) === 0 ? k.substring(this._ns.length) : void 0 : ( + // so each() knows to skip it + k + ); + } + }, + // end _.storeAPI + storage: function(name) { + return _.inherit(_.storageAPI, { items: {}, name }); + }, + storageAPI: { + length: 0, + has: function(k) { + return this.items.hasOwnProperty(k); + }, + key: function(i) { + var c = 0; + for (var k in this.items) + if (this.has(k) && i === c++) + return k; + }, + setItem: function(k, v) { + this.has(k) || this.length++, this.items[k] = v; + }, + removeItem: function(k) { + this.has(k) && (delete this.items[k], this.length--); + }, + getItem: function(k) { + return this.has(k) ? this.items[k] : null; + }, + clear: function() { + for (var k in this.items) + this.removeItem(k); + } + } + // end _.storageAPI + }, store2 = ( + // safely set this up (throws error in IE10/32bit mode for local files) + _.Store("local", (function() { + try { + return localStorage; + } catch { + } + })()) + ); + store2.local = store2, store2._ = _, store2.area("session", (function() { + try { + return sessionStorage; + } catch { + } + })()), store2.area("page", _.storage("page")), typeof define == "function" && define.amd !== void 0 ? define("store2", [], function() { + return store2; + }) : typeof module < "u" && module.exports ? module.exports = store2 : (window2.store && (_.conflict = window2.store), window2.store = store2); + })(exports, exports && exports.define); + } +}); + +// src/manager-api/root.tsx +import React4, { + Component, + Fragment, + useCallback as useCallback2, + useContext, + useEffect, + useMemo, + useRef as useRef2, + useState +} from "react"; +import { + DOCS_PREPARED as DOCS_PREPARED2, + SET_STORIES as SET_STORIES2, + SHARED_STATE_CHANGED, + SHARED_STATE_SET, + STORY_CHANGED as STORY_CHANGED2, + STORY_PREPARED as STORY_PREPARED2 +} from "storybook/internal/core-events"; + +// src/manager-api/context.ts +import { createContext as ReactCreateContext } from "react"; +var createContext = ({ api, state }) => ReactCreateContext({ api, state }); + +// src/manager-api/lib/merge.ts +import { logger } from "storybook/internal/client-logger"; +var merge_default = (a, ...b) => { + let target = {}; + target = mergeWith( + {}, + a, + (objValue, srcValue) => { + if (Array.isArray(srcValue) && Array.isArray(objValue)) + return srcValue.forEach((s) => { + objValue.find((o) => o === s || isEqual(o, s)) || objValue.push(s); + }), objValue; + if (Array.isArray(objValue)) + return logger.log(["the types mismatch, picking", objValue]), objValue; + } + ); + for (let obj of b) + target = mergeWith(target, obj, (objValue, srcValue) => { + if (Array.isArray(srcValue) && Array.isArray(objValue)) + return srcValue.forEach((s) => { + objValue.find((o) => o === s || isEqual(o, s)) || objValue.push(s); + }), objValue; + if (Array.isArray(objValue)) + return logger.log(["the types mismatch, picking", objValue]), objValue; + }); + return target; +}, noArrayMerge = (a, ...b) => { + let target = {}; + target = mergeWith( + {}, + a, + (objValue, srcValue) => { + if (Array.isArray(srcValue)) + return srcValue; + } + ); + for (let obj of b) + target = mergeWith(target, obj, (objValue, srcValue) => { + if (Array.isArray(srcValue)) + return srcValue; + }); + return target; +}; + +// src/manager-api/initial-state.ts +var main = (...additions) => additions.reduce((acc, item) => merge_default(acc, item), {}), initial_state_default = main; + +// src/manager-api/lib/addons.ts +import { logger as logger2 } from "storybook/internal/client-logger"; +import { SET_CONFIG } from "storybook/internal/core-events"; +import { Addon_TypesEnum } from "storybook/internal/types"; +var AddonStore = class { + constructor() { + this.loaders = {}; + this.elements = {}; + this.config = {}; + this.getChannel = () => { + if (this.channel) + return this.channel; + let installed = getChannel(); + return installed ? (this.channel = installed, this.resolve(), this.channel) : mockChannel(); + }; + this.ready = () => this.promise; + this.hasChannel = () => !!this.channel || !!getChannel(); + this.setChannel = (channel) => { + this.channel = channel, setChannel(channel), this.resolve(); + }; + this.setConfig = (value) => { + Object.assign(this.config, value), this.hasChannel() ? this.getChannel().emit(SET_CONFIG, this.config) : this.ready().then((channel) => { + channel.emit(SET_CONFIG, this.config); + }); + }; + this.getConfig = () => this.config; + /** + * Registers an addon loader function. + * + * @param {string} id - The id of the addon loader. + * @param {(api: API) => void} callback - The function that will be called to register the addon. + * @returns {void} + */ + this.register = (id, callback) => { + this.loaders[id] && logger2.warn(`${id} was loaded twice, this could have bad side-effects`), this.loaders[id] = callback; + }; + this.loadAddons = (api) => { + Object.values(this.loaders).forEach((value) => value(api)); + }; + this.promise = new Promise((res) => { + this.resolve = () => res(this.getChannel()); + }); + } + getElements(type) { + return this.elements[type] || (this.elements[type] = {}), this.elements[type]; + } + /** + * Adds an addon to the addon store. + * + * @param {string} id - The id of the addon. + * @param {Addon_Type} addon - The addon to add. + * @returns {void} + */ + add(id, addon) { + let { type } = addon, collection = this.getElements(type); + collection[id] = { ...addon, id }; + } + experimental_getRegisteredAddons(type) { + return Object.keys(type ? this.getElements(type) : this.loaders); + } +}, KEY = "__STORYBOOK_ADDONS_MANAGER"; +function getAddonsStore() { + return globalThis[KEY] || (globalThis[KEY] = new AddonStore()), globalThis[KEY]; +} +var addons = getAddonsStore(); + +// src/manager-api/modules/addons.ts +var addons_exports = {}; +__export(addons_exports, { + ensurePanel: () => ensurePanel, + init: () => init +}); +import { logger as logger3 } from "storybook/internal/client-logger"; +import { Addon_TypesEnum as Addon_TypesEnum2 } from "storybook/internal/types"; +function ensurePanel(panels, selectedPanel, currentPanel) { + let keys2 = Object.keys(panels ?? {}); + return keys2.indexOf(selectedPanel) >= 0 ? selectedPanel : keys2.length ? keys2[0] : currentPanel; +} +var init = ({ provider, store: store2, fullAPI }) => { + let api = { + getElements: (type) => provider.getElements(type), + clearStatuses: () => { + let testProviders = api.getElements(Addon_TypesEnum2.experimental_TEST_PROVIDER); + Object.values(testProviders).forEach((testProvider) => { + try { + testProvider.clear?.(); + } catch (e) { + try { + logger3.warn(`Failed to clear test provider "${testProvider.id}":`, e); + } catch { + } + } + }); + }, + getSelectedPanel: () => { + let { selectedPanel } = store2.getState(); + return ensurePanel(api.getElements(Addon_TypesEnum2.PANEL), selectedPanel, selectedPanel); + }, + setSelectedPanel: (panelName) => { + store2.setState({ selectedPanel: panelName }, { persistence: "session" }); + }, + setAddonState(addonId, newStateOrMerger, options) { + let merger = typeof newStateOrMerger == "function" ? newStateOrMerger : () => newStateOrMerger; + return store2.setState( + (s) => ({ ...s, addons: { ...s.addons, [addonId]: merger(s.addons[addonId]) } }), + options + ).then(() => api.getAddonState(addonId)); + }, + getAddonState: (addonId) => store2.getState().addons[addonId] || globalThis?.STORYBOOK_ADDON_STATE[addonId] + }; + return { + api, + state: { + selectedPanel: ensurePanel( + api.getElements(Addon_TypesEnum2.PANEL), + store2.getState().selectedPanel + ), + addons: {} + } + }; +}; + +// src/manager-api/modules/channel.ts +var channel_exports = {}; +__export(channel_exports, { + init: () => init2 +}); +var init2 = ({ provider }) => ({ api: { + getChannel: () => provider.channel, + on: (type, handler) => (provider.channel?.on(type, handler), () => provider.channel?.off(type, handler)), + off: (type, handler) => provider.channel?.off(type, handler), + once: (type, handler) => provider.channel?.once(type, handler), + emit: (type, data, ...args) => { + data?.options?.target && data.options.target !== "storybook-preview-iframe" && !data.options.target.startsWith("storybook-ref-") && (data.options.target = data.options.target !== "storybook_internal" ? `storybook-ref-${data.options.target}` : "storybook-preview-iframe"), provider.channel?.emit(type, data, ...args); + } +}, state: {} }); + +// src/manager-api/modules/globals.ts +var globals_exports = {}; +__export(globals_exports, { + init: () => init4 +}); +import { logger as logger5 } from "storybook/internal/client-logger"; +import { GLOBALS_UPDATED, SET_GLOBALS, UPDATE_GLOBALS } from "storybook/internal/core-events"; + +// src/manager-api/lib/events.ts +import { logger as logger4 } from "storybook/internal/client-logger"; + +// src/manager-api/modules/refs.ts +var refs_exports = {}; +__export(refs_exports, { + defaultStoryMapper: () => defaultStoryMapper, + getSourceType: () => getSourceType, + init: () => init3 +}); +import { global } from "@storybook/global"; + +// src/manager-api/lib/stories.ts +import { sanitize } from "storybook/internal/csf"; +var import_memoizerific = __toESM(require_memoizerific(), 1); + +// src/manager-api/lib/intersect.ts +var intersect_default = (a, b) => !Array.isArray(a) || !Array.isArray(b) || !a.length || !b.length ? [] : a.reduce((acc, aValue) => (b.includes(aValue) && acc.push(aValue), acc), []); + +// src/manager-api/lib/stories.ts +var TITLE_PATH_SEPARATOR = /\s*\/\s*/, denormalizeStoryParameters = ({ + globalParameters, + kindParameters, + stories +}) => mapValues(stories, (storyData) => ({ + ...storyData, + parameters: combineParameters( + globalParameters, + kindParameters[storyData.kind], + storyData.parameters + ) +})), transformSetStoriesStoryDataToPreparedStoryIndex = (stories) => ({ v: 5, entries: Object.entries(stories).reduce( + (acc, [id, story]) => { + if (!story) + return acc; + let { docsOnly, fileName, ...parameters } = story.parameters, base = { + title: story.kind, + id, + name: story.name, + importPath: fileName + }; + if (docsOnly) + acc[id] = { + type: "docs", + tags: ["stories-mdx"], + storiesImports: [], + ...base + }; + else { + let { argTypes, args, initialArgs } = story; + acc[id] = { + type: "story", + subtype: "story", + ...base, + parameters, + argTypes, + args, + initialArgs + }; + } + return acc; + }, + {} +) }), transformStoryIndexV2toV3 = (index) => ({ + v: 3, + stories: Object.values(index.stories).reduce( + (acc, entry) => (acc[entry.id] = { + ...entry, + title: entry.kind, + name: entry.name || entry.story, + importPath: entry.parameters.fileName || "" + }, acc), + {} + ) +}), transformStoryIndexV3toV4 = (index) => { + let countByTitle = countBy(Object.values(index.stories), (item) => item.title); + return { + v: 4, + entries: Object.values(index.stories).reduce( + (acc, entry) => { + let type = "story"; + return (entry.parameters?.docsOnly || entry.name === "Page" && countByTitle[entry.title] === 1) && (type = "docs"), acc[entry.id] = { + type, + ...type === "docs" && { tags: ["stories-mdx"], storiesImports: [] }, + ...entry + }, delete acc[entry.id].story, delete acc[entry.id].kind, acc; + }, + {} + ) + }; +}, transformStoryIndexV4toV5 = (index) => ({ + v: 5, + entries: Object.values(index.entries).reduce( + (acc, entry) => (acc[entry.id] = { + ...entry, + tags: entry.tags ? [Tag.DEV, Tag.TEST, ...entry.tags] : [Tag.DEV] + }, acc), + {} + ) +}), transformStoryIndexToStoriesHash = (input, { provider, docsOptions, filters, allStatuses, statusFilterKey }) => { + if (!input.v) + throw new Error("Composition: Missing stories.json version"); + let index = input; + index = index.v === 2 ? transformStoryIndexV2toV3(index) : index, index = index.v === 3 ? transformStoryIndexV3toV4(index) : index, index = index.v === 4 ? transformStoryIndexV4toV5(index) : index, index = index; + let indexEntries = Object.values(index.entries), filterFunctions = Object.values(filters), statusFilterFn = statusFilterKey ? filters[statusFilterKey] : void 0, entryValues = indexEntries.filter((entry) => { + let statuses = allStatuses[entry.id] ?? {}; + return statusFilterFn && !statusFilterFn({ ...entry, statuses }) && !indexEntries.filter((item) => "parent" in item && item.parent === entry.id).some( + (child) => statusFilterFn({ ...child, statuses: allStatuses[child.id] ?? {} }) + ) ? !1 : Object.values(statuses).some(({ value }) => value === "status-value:error") || filterFunctions.every((fn) => fn({ ...entry, statuses })) ? !0 : indexEntries.filter((item) => "parent" in item && item.parent === entry.id).some((child) => filterFunctions.every((fn) => fn({ ...child, statuses }))); + }), { sidebar = {} } = provider.getConfig(), { showRoots, collapsedRoots = [], renderLabel } = sidebar, setShowRoots = typeof showRoots < "u", storiesHashOutOfOrder = entryValues.reduce((acc, item) => { + if (docsOptions.docsMode && item.type !== "docs") + return acc; + let { title } = item, groups = title.trim().split(TITLE_PATH_SEPARATOR), root = (!setShowRoots || showRoots) && groups.length > 1 ? [groups.shift()] : [], names = [...root, ...groups], paths = names.reduce((list, name, idx) => { + let parent = idx > 0 && list[idx - 1], id = sanitize(parent ? `${parent}-${name}` : name); + if (name.trim() === "") + throw new Error(dedent`Invalid title ${title} ending in slash.`); + if (parent === id) + throw new Error( + dedent` + Invalid part '${name}', leading to id === parentId ('${id}'), inside title '${title}' + + Did you create a path that uses the separator char accidentally, such as 'Vue ' where '/' is a separator char? See https://github.com/storybookjs/storybook/issues/6128 + ` + ); + return list.push(id), list; + }, []); + return paths.forEach((id, idx) => { + let childId = paths[idx + 1] || item.id; + root.length && idx === 0 ? acc[id] = merge_default(acc[id] || {}, { + type: "root", + id, + name: names[idx], + tags: [], + depth: idx, + renderLabel, + startCollapsed: collapsedRoots.includes(id), + // Note that this will later get appended to the previous list of children (see below) + children: [childId] + }) : (!acc[id] || acc[id].type === "component") && idx === paths.length - 1 ? acc[id] = merge_default(acc[id] || {}, { + type: "component", + id, + name: names[idx], + tags: [], + parent: paths[idx - 1], + depth: idx, + renderLabel, + ...childId && { + children: [childId] + } + }) : acc[id] = merge_default(acc[id] || {}, { + type: "group", + id, + name: names[idx], + tags: [], + parent: paths[idx - 1], + depth: idx, + renderLabel, + ...childId && { + children: [childId] + } + }); + }), acc[item.id] = { + tags: [], + ...item, + depth: paths.length, + parent: "parent" in item ? item.parent : paths[paths.length - 1], + renderLabel, + prepared: !!item.parameters + }, acc; + }, {}); + function addItem(acc, item) { + if (acc[item.id] || (acc[item.id] = item, "children" in item && item.children && (item.children.forEach((childId) => addItem(acc, storiesHashOutOfOrder[childId])), item.tags = item.children.reduce((currentTags, childId) => currentTags === null ? acc[childId].tags : intersect_default(currentTags, acc[childId].tags), null) || [])), item.type === "component") { + let firstChild = acc[item.children[0]]; + firstChild && "importPath" in firstChild && (item.importPath = firstChild.importPath); + } + return acc; + } + let storiesHash = Object.values(storiesHashOutOfOrder).filter((i) => i.type !== "root" && !i.parent).reduce((acc, item) => addItem(acc, item), {}); + return storiesHash = Object.values(storiesHashOutOfOrder).filter((i) => i.type === "root").reduce(addItem, storiesHash), storiesHash = Object.values(storiesHash).reduce((acc, item) => { + if (item.type === "story" && item.subtype === "test") { + let story = acc[item.parent], component = acc[story.parent]; + acc[component.id] = { + ...component, + // Remove test from the component node as it will be attached to the story node instead + children: component.children && component.children.filter((id) => id !== item.id) + }, acc[story.id] = { + ...story, + // Add test to the story node + children: (story.children || []).concat(item.id) + }, acc[item.id] = { + ...item, + depth: item.depth + 1 + }; + } else + acc[item.id] = item; + return acc; + }, {}), storiesHash; +}, addPreparedStories = (newHash, oldHash) => oldHash ? Object.fromEntries( + Object.entries(newHash).map(([id, newEntry]) => { + let oldEntry = oldHash[id]; + return newEntry.type === "story" && oldEntry?.type === "story" && oldEntry.prepared ? ("children" in oldEntry && delete oldEntry.children, [id, { ...oldEntry, ...newEntry, prepared: !0 }]) : [id, newEntry]; + }) +) : newHash, getComponentLookupList = (0, import_memoizerific.default)(1)((hash) => Object.entries(hash).reduce((acc, i) => { + let value = i[1]; + return value.type === "component" && acc.push([...value.children]), acc; +}, [])), getStoriesLookupList = (0, import_memoizerific.default)(1)((hash) => Object.keys(hash).filter((k) => ["story", "docs"].includes(hash[k].type))); + +// src/manager-api/modules/refs.ts +var { location, fetch } = global, getSourceType = (source, refId) => { + let { origin: localOrigin, pathname: localPathname } = location, { origin: sourceOrigin, pathname: sourcePathname } = new URL(source), localFull = `${localOrigin + localPathname}`.replace(/\/[^\/]*$/, ""), sourceFull = `${sourceOrigin + sourcePathname}`.replace(/\/[^\/]*$/, ""); + return localFull === sourceFull ? ["local", sourceFull] : refId || source ? ["external", sourceFull] : [null, null]; +}, defaultStoryMapper = (b, a) => ({ ...a, kind: a.kind.replace("|", "/") }), addRefIds = (input, ref) => Object.entries(input).reduce((acc, [id, item]) => ({ ...acc, [id]: { ...item, refId: ref.id } }), {}), applyRefStoryUpdates = (index, storyUpdates) => (storyUpdates && Object.entries(storyUpdates).forEach(([id, update2]) => { + let entry = index[id]; + entry && (entry.type === "story" || entry.type === "docs") && (index[id] = { ...entry, ...update2 }); +}), index); +async function handleRequest(request) { + if (!request) + return {}; + try { + let response = await request; + if (response === !1 || response === !0) + throw new Error("Unexpected boolean response"); + if (!response.ok) { + if (response.status === 401) + try { + let json2 = await response.json(); + if (json2.loginUrl) + return { loginUrl: json2.loginUrl }; + } catch { + } + throw new Error(`Unexpected response not OK: ${response.statusText}`); + } + let json = await response.json(); + return json.entries || json.stories ? { storyIndex: json } : json; + } catch (err) { + return { indexError: err }; + } +} +var parseUrl = (url) => { + let credentialsRegex = /https?:\/\/(.+:.+)@/, cleanUrl = url, authorization, [, credentials] = url.match(credentialsRegex) || []; + return credentials && (cleanUrl = url.replace(`${credentials}@`, ""), authorization = btoa(`${credentials}`)), { + url: cleanUrl, + authorization + }; +}, map = (input, ref, options) => { + let { storyMapper } = options; + return storyMapper ? Object.entries(input).reduce((acc, [id, item]) => ({ ...acc, [id]: storyMapper(ref, item) }), {}) : input; +}, init3 = ({ store: store2, provider, singleStory, docsOptions = {} }, { runCheck = !0 } = {}) => { + let api = { + findRef: (source) => { + let refs2 = api.getRefs(); + return Object.values(refs2).find(({ url }) => url.match(source)); + }, + changeRefVersion: async (id, url) => { + let { versions, title } = api.getRefs()[id], ref = { + id, + url, + versions, + title, + index: {}, + filteredIndex: {}, + expanded: !0 + }; + await api.setRef(id, { ...ref, type: "unknown" }, !1), await api.checkRef(ref); + }, + changeRefState: (id, previewInitialized) => { + let { [id]: ref, ...updated } = api.getRefs(); + updated[id] = { ...ref, previewInitialized }, store2.setState({ + refs: updated + }); + }, + checkRef: async (ref) => { + let { id, url, version: version2, type } = ref, isPublic = type === "server-checked", loadedData = {}, query = version2 ? `?version=${version2}` : "", credentials = isPublic ? "omit" : "include", urlParseResult = parseUrl(url), headers = { + Accept: "application/json" + }; + urlParseResult.authorization && Object.assign(headers, { + Authorization: `Basic ${urlParseResult.authorization}` + }); + let [indexResult, storiesResult] = await Promise.all( + ["index.json", "stories.json"].map( + async (file) => handleRequest( + fetch(`${urlParseResult.url}/${file}${query}`, { + headers, + credentials + }) + ) + ) + ); + if (!indexResult.indexError || !storiesResult.indexError) { + let metadata = await handleRequest( + fetch(`${urlParseResult.url}/metadata.json${query}`, { + headers, + credentials, + cache: "no-cache" + }).catch(() => !1) + ); + Object.assign(loadedData, { + ...indexResult.indexError ? storiesResult : indexResult, + ...!metadata.indexError && metadata + }); + } else isPublic || (loadedData.indexError = { + message: dedent` + Error: Loading of ref failed + at fetch (lib/api/src/modules/refs.ts) + + URL: ${urlParseResult.url} + + We weren't able to load the above URL, + it's possible a CORS error happened. + + Please check your dev-tools network tab. + ` + }); + let versions = ref.versions && Object.keys(ref.versions).length ? ref.versions : loadedData.versions; + await api.setRef(id, { + id, + url: urlParseResult.url, + ...loadedData, + ...versions ? { versions } : {}, + type: loadedData.storyIndex ? "lazy" : "auto-inject" + }); + }, + getRefs: () => { + let { refs: refs2 = {} } = store2.getState(); + return refs2; + }, + setRef: async (id, { storyIndex, setStoriesData, ...rest }, ready = !1) => { + if (singleStory) + return; + let internal_index, index, filteredIndex, { filters } = store2.getState(), { storyMapper = defaultStoryMapper } = provider.getConfig(), ref = api.getRefs()[id]; + (storyIndex || setStoriesData) && (internal_index = setStoriesData ? transformSetStoriesStoryDataToPreparedStoryIndex( + map(setStoriesData, ref, { storyMapper }) + ) : storyIndex, filteredIndex = transformStoryIndexToStoriesHash(storyIndex, { + provider, + docsOptions, + filters, + allStatuses: {} + }), index = transformStoryIndexToStoriesHash(storyIndex, { + provider, + docsOptions, + filters: {}, + allStatuses: {} + })), index && (index = addRefIds(index, ref), index = applyRefStoryUpdates(index, ref?.storyUpdates)), filteredIndex && (filteredIndex = addRefIds(filteredIndex, ref), filteredIndex = applyRefStoryUpdates(filteredIndex, ref?.storyUpdates)), await api.updateRef(id, { ...ref, ...rest, index, filteredIndex, internal_index }); + }, + updateRef: async (id, data) => { + let { [id]: ref, ...updated } = api.getRefs(); + updated[id] = { ...ref, ...data }; + let ordered = Object.keys(initialState2).reduce((obj, key) => (obj[key] = updated[key], obj), {}); + await store2.setState({ + refs: ordered + }); + } + }, refs = !singleStory && global.REFS || {}, initialState2 = refs; + return runCheck && new Promise(async (resolve) => { + for (let ref of Object.values(refs)) + await api.checkRef({ ...ref, stories: {} }); + resolve(void 0); + }), { + api, + state: { + refs: initialState2 + } + }; +}; + +// src/manager-api/lib/events.ts +var getEventMetadata = (context, fullAPI) => { + let { source, refId, type } = context, [sourceType, sourceLocation] = getSourceType(source, refId), ref; + (refId || sourceType === "external") && (ref = refId && fullAPI.getRefs()[refId] ? fullAPI.getRefs()[refId] : fullAPI.findRef(sourceLocation)); + let meta = { + source, + sourceType, + sourceLocation, + refId, + ref, + type + }; + switch (!0) { + case typeof refId == "string": + case sourceType === "local": + case sourceType === "external": + return meta; + // if we couldn't find the source, something risky happened, we ignore the input, and log a warning + default: + return logger4.warn(`Received a ${type} frame that was not configured as a ref`), null; + } +}; + +// src/manager-api/modules/globals.ts +var init4 = ({ store: store2, fullAPI, provider }) => { + let api = { + getGlobals() { + return store2.getState().globals; + }, + getUserGlobals() { + return store2.getState().userGlobals; + }, + getStoryGlobals() { + return store2.getState().storyGlobals; + }, + getGlobalTypes() { + return store2.getState().globalTypes; + }, + updateGlobals(newGlobals) { + provider.channel?.emit(UPDATE_GLOBALS, { + globals: newGlobals, + options: { + target: "storybook-preview-iframe" + } + }); + } + }, state = { + globals: {}, + userGlobals: {}, + storyGlobals: {}, + globalTypes: {} + }, updateGlobals = ({ + globals, + storyGlobals, + userGlobals + }) => { + let { + globals: currentGlobals, + userGlobals: currentUserGlobals, + storyGlobals: currentStoryGlobals + } = store2.getState(); + dequal(globals, currentGlobals) || store2.setState({ globals }), dequal(userGlobals, currentUserGlobals) || store2.setState({ userGlobals }), dequal(storyGlobals, currentStoryGlobals) || store2.setState({ storyGlobals }); + }; + return provider.channel?.on( + GLOBALS_UPDATED, + function({ globals, storyGlobals, userGlobals }) { + let { ref } = getEventMetadata(this, fullAPI); + ref ? logger5.warn( + "received a GLOBALS_UPDATED from a non-local ref. This is not currently supported." + ) : updateGlobals({ globals, storyGlobals, userGlobals }); + } + ), provider.channel?.on( + SET_GLOBALS, + function({ globals, globalTypes }) { + let { ref } = getEventMetadata(this, fullAPI), currentUserGlobals = store2.getState()?.userGlobals; + ref ? Object.keys(globals).length > 0 && logger5.warn("received globals from a non-local ref. This is not currently supported.") : store2.setState({ globals, userGlobals: globals, globalTypes }), currentUserGlobals && Object.keys(currentUserGlobals).length !== 0 && !dequal(globals, currentUserGlobals) && api.updateGlobals(currentUserGlobals); + } + ), { + api, + state + }; +}; + +// src/manager-api/modules/layout.ts +var layout_exports = {}; +__export(layout_exports, { + ActiveTabs: () => ActiveTabs, + DEFAULT_BOTTOM_PANEL_HEIGHT: () => DEFAULT_BOTTOM_PANEL_HEIGHT, + DEFAULT_NAV_SIZE: () => DEFAULT_NAV_SIZE, + DEFAULT_RIGHT_PANEL_WIDTH: () => DEFAULT_RIGHT_PANEL_WIDTH, + focusableUIElements: () => focusableUIElements, + getDefaultLayoutState: () => getDefaultLayoutState, + init: () => init5, + isPagesViewMode: () => isPagesViewMode +}); +import { SET_CONFIG as SET_CONFIG2 } from "storybook/internal/core-events"; +import { global as global2 } from "@storybook/global"; +import { deprecate } from "storybook/internal/client-logger"; +import { create } from "storybook/theming/create"; +var { document: document2 } = global2, isFunction = (val) => typeof val == "function", ActiveTabs = { + SIDEBAR: "sidebar", + CANVAS: "canvas", + ADDONS: "addons" +}, isPagesViewMode = (viewMode) => viewMode !== void 0 && viewMode !== "story" && viewMode !== "docs" && viewMode !== "review", DEFAULT_NAV_SIZE = 300, DEFAULT_BOTTOM_PANEL_HEIGHT = 300, DEFAULT_RIGHT_PANEL_WIDTH = 400, getDefaultLayoutState = () => ({ + ui: { + enableShortcuts: !0 + }, + layout: { + initialActive: ActiveTabs.CANVAS, + navSize: DEFAULT_NAV_SIZE, + bottomPanelHeight: DEFAULT_BOTTOM_PANEL_HEIGHT, + rightPanelWidth: DEFAULT_RIGHT_PANEL_WIDTH, + recentVisibleSizes: { + navSize: DEFAULT_NAV_SIZE, + bottomPanelHeight: DEFAULT_BOTTOM_PANEL_HEIGHT, + rightPanelWidth: DEFAULT_RIGHT_PANEL_WIDTH + }, + panelPosition: "bottom", + showNav: !0, + showPanel: !0, + showTabs: !0, + showToolbar: !0 + }, + layoutCustomisations: { + showPanel: void 0, + showSidebar: void 0, + showToolbar: void 0 + }, + selectedPanel: void 0, + theme: create() +}), focusableUIElements = { + addonPanel: "storybook-panel-region", + storySearchField: "storybook-explorer-searchfield", + storyListMenu: "storybook-explorer-menu", + storyPanelRoot: "storybook-panel-root", + showAddonPanel: "storybook-show-addon-panel", + sidebarRegion: "storybook-sidebar-region", + showSidebar: "storybook-show-sidebar" +}, getIsNavShown = (state) => state.layout.navSize > 0, getIsPanelShown = (state) => { + let { bottomPanelHeight, rightPanelWidth, panelPosition } = state.layout; + return panelPosition === "bottom" && bottomPanelHeight > 0 || panelPosition === "right" && rightPanelWidth > 0; +}, getIsFullscreen = (state) => !getIsNavShown(state) && !getIsPanelShown(state), getRecentVisibleSizes = (layoutState) => ({ + navSize: layoutState.navSize > 0 ? layoutState.navSize : layoutState.recentVisibleSizes.navSize, + bottomPanelHeight: layoutState.bottomPanelHeight > 0 ? layoutState.bottomPanelHeight : layoutState.recentVisibleSizes.bottomPanelHeight, + rightPanelWidth: layoutState.rightPanelWidth > 0 ? layoutState.rightPanelWidth : layoutState.recentVisibleSizes.rightPanelWidth +}), applyLayoutOptions = (layoutState, options, singleStory) => { + let layoutKeys = Object.keys(layoutState), layoutAtTopLevel = pick(options, layoutKeys); + for (let key of Object.keys(layoutAtTopLevel)) + deprecate( + `Calling \`setConfig({ ${key}: ... })\` is deprecated. Please call \`setConfig({ layout: { ${key}: ... } })\` instead.` + ); + let mergedLayoutOptions = toMerged(layoutAtTopLevel, options.layout || {}), { showPanel, showNav } = mergedLayoutOptions, nextLayoutState = toMerged(layoutState, pick(mergedLayoutOptions, layoutKeys)); + return showNav === !1 || singleStory ? (nextLayoutState.recentVisibleSizes = getRecentVisibleSizes(nextLayoutState), nextLayoutState.navSize = 0) : showNav === !0 && (nextLayoutState.navSize = nextLayoutState.recentVisibleSizes.navSize), showPanel === !1 ? (nextLayoutState.recentVisibleSizes = getRecentVisibleSizes(nextLayoutState), nextLayoutState.bottomPanelHeight = 0, nextLayoutState.rightPanelWidth = 0) : showPanel === !0 && (nextLayoutState.bottomPanelHeight = nextLayoutState.recentVisibleSizes.bottomPanelHeight, nextLayoutState.rightPanelWidth = nextLayoutState.recentVisibleSizes.rightPanelWidth), nextLayoutState; +}, applyUiOptions = (uiState, options) => { + let uiKeys = Object.keys(uiState), uiAtTopLevel = pick(options, uiKeys); + for (let key of Object.keys(uiAtTopLevel)) + deprecate( + `Calling \`setConfig({ ${key}: ... })\` is deprecated. Please call \`setConfig({ ui: { ${key}: ... } })\` instead.` + ); + let typedUiKeys = uiKeys; + return toMerged(uiState, pick(toMerged(uiAtTopLevel, options.ui || {}), typedUiKeys)); +}, init5 = ({ store: store2, provider, singleStory }) => { + let api = { + toggleFullscreen(nextState) { + return store2.setState( + (state) => { + let isFullscreen = getIsFullscreen(state), shouldFullscreen = typeof nextState == "boolean" ? nextState : !isFullscreen; + return shouldFullscreen === isFullscreen ? { layout: state.layout } : shouldFullscreen ? { + layout: { + ...state.layout, + navSize: 0, + bottomPanelHeight: 0, + rightPanelWidth: 0, + recentVisibleSizes: getRecentVisibleSizes(state.layout) + } + } : { + layout: { + ...state.layout, + navSize: state.singleStory ? 0 : state.layout.recentVisibleSizes.navSize, + bottomPanelHeight: state.layout.recentVisibleSizes.bottomPanelHeight, + rightPanelWidth: state.layout.recentVisibleSizes.rightPanelWidth + } + }; + }, + { persistence: "session" } + ); + }, + togglePanel(nextState) { + return store2.setState( + (state) => { + let isPanelShown = getIsPanelShown(state), shouldShowPanel = typeof nextState == "boolean" ? nextState : !isPanelShown; + return shouldShowPanel === isPanelShown ? { layout: state.layout } : shouldShowPanel ? { + layout: { + ...state.layout, + bottomPanelHeight: state.layout.recentVisibleSizes.bottomPanelHeight, + rightPanelWidth: state.layout.recentVisibleSizes.rightPanelWidth + } + } : { + layout: { + ...state.layout, + bottomPanelHeight: 0, + rightPanelWidth: 0, + recentVisibleSizes: getRecentVisibleSizes(state.layout) + } + }; + }, + { persistence: "session" } + ); + }, + togglePanelPosition(position) { + return store2.setState( + (state) => { + let nextPosition = position || (state.layout.panelPosition === "right" ? "bottom" : "right"); + return { + layout: { + ...state.layout, + panelPosition: nextPosition, + bottomPanelHeight: state.layout.recentVisibleSizes.bottomPanelHeight, + rightPanelWidth: state.layout.recentVisibleSizes.rightPanelWidth + } + }; + }, + { persistence: "permanent" } + ); + }, + toggleNav(nextState) { + return store2.setState( + (state) => { + if (state.singleStory) + return { layout: state.layout }; + let isNavShown = getIsNavShown(state), shouldShowNav = typeof nextState == "boolean" ? nextState : !isNavShown; + return shouldShowNav === isNavShown ? { layout: state.layout } : shouldShowNav ? { + layout: { + ...state.layout, + navSize: state.layout.recentVisibleSizes.navSize + } + } : { + layout: { + ...state.layout, + navSize: 0, + recentVisibleSizes: getRecentVisibleSizes(state.layout) + } + }; + }, + { persistence: "session" } + ); + }, + toggleToolbar(toggled) { + return store2.setState( + (state) => { + let value = typeof toggled < "u" ? toggled : !state.layout.showToolbar; + return { + layout: { + ...state.layout, + showToolbar: value + } + }; + }, + { persistence: "session" } + ); + }, + setSizes({ + navSize, + bottomPanelHeight, + rightPanelWidth + }) { + return store2.setState( + (state) => { + let nextLayoutState = { + ...state.layout, + navSize: navSize ?? state.layout.navSize, + bottomPanelHeight: bottomPanelHeight ?? state.layout.bottomPanelHeight, + rightPanelWidth: rightPanelWidth ?? state.layout.rightPanelWidth + }; + return { + layout: { + ...nextLayoutState, + recentVisibleSizes: getRecentVisibleSizes(nextLayoutState) + } + }; + }, + { persistence: "session" } + ); + }, + /** + * Attempts to focus (and select) an element identified by its ID. It is the responsibility of + * the callee to ensure that the element is present in the DOM and that no focus trap is + * available. When polling is enabled, this API polls and attempts to perform the focus for a + * set duration (max 500ms), so that race conditions can be avoided with the current API + * design. + * + * @param elementId The id of the element to focus. + * @param options When a boolean, treated as the `select` option for backwards compatibility. + * When an object, may contain `select` and `poll` options. + * @returns Whether the element was successfully focused. Returns a Promise when polling. + */ + focusOnUIElement(elementId, options) { + let { + forceFocus = !1, + select = !1, + poll = !0 + } = typeof options == "boolean" ? { select: options } : options ?? {}; + if (!elementId) + return !1; + let attemptFocus = () => { + let element = document2.getElementById(elementId); + return !element || (element.focus(), element !== document2.activeElement && forceFocus && element.getAttribute("tabindex") === null && (element.setAttribute("tabindex", "-1"), element.focus()), element !== document2.activeElement && element.id !== document2.activeElement?.id) ? !1 : (select && element.select?.(), !0); + }; + return attemptFocus() ? !0 : poll ? new Promise((resolve) => { + let startTime = Date.now(), maxDuration = 500, intervalId = setInterval(() => { + let elapsed = Date.now() - startTime; + if (attemptFocus()) { + clearInterval(intervalId), resolve(!0); + return; + } + elapsed >= maxDuration && (clearInterval(intervalId), resolve(!1)); + }, 50); + }) : !1; + }, + getInitialOptions() { + let userConfig = provider.getConfig(), defaultLayoutState = getDefaultLayoutState(), { theme, selectedPanel, layoutCustomisations } = userConfig; + return { + ...defaultLayoutState, + layout: applyLayoutOptions(defaultLayoutState.layout, userConfig, !!singleStory), + layoutCustomisations: { + ...defaultLayoutState.layoutCustomisations, + ...layoutCustomisations ?? {} + }, + ui: applyUiOptions(defaultLayoutState.ui, userConfig), + selectedPanel: selectedPanel || defaultLayoutState.selectedPanel, + theme: theme || defaultLayoutState.theme + }; + }, + getIsFullscreen() { + return getIsFullscreen(store2.getState()); + }, + getIsPanelShown() { + return getIsPanelShown(store2.getState()); + }, + getIsNavShown() { + return getIsNavShown(store2.getState()); + }, + getNavAvailability() { + let state = store2.getState(); + return isReviewManagerRoute(state.path, state.customQueryParams) ? "unavailable" : getIsNavShown(state) ? "shown" : "hidden"; + }, + getShowToolbarWithCustomisations(showToolbar) { + let state = store2.getState(); + return isFunction(state.layoutCustomisations.showToolbar) ? state.layoutCustomisations.showToolbar(state, showToolbar) ?? showToolbar : showToolbar; + }, + getShowPanelWithCustomisations(showPanel) { + let state = store2.getState(); + return isFunction(state.layoutCustomisations.showPanel) ? state.layoutCustomisations.showPanel(state, showPanel) ?? showPanel : showPanel; + }, + getNavSizeWithCustomisations(navSize) { + let state = store2.getState(); + if (isFunction(state.layoutCustomisations.showSidebar)) { + let shouldShowNav = state.layoutCustomisations.showSidebar(state, navSize !== 0); + if (navSize === 0 && shouldShowNav === !0) + return state.layout.recentVisibleSizes.navSize; + if (navSize !== 0 && shouldShowNav === !1) + return 0; + } + return navSize; + }, + setOptions: (options) => { + let { layout, ui, selectedPanel, theme } = store2.getState(); + if (!options) + return; + let updatedLayout = applyLayoutOptions(layout, options, !!singleStory), updatedUi = applyUiOptions(ui, options), updatedTheme = { + ...theme, + ...options.theme + }, modification = {}; + isEqual(ui, updatedUi) || (modification.ui = updatedUi), isEqual(layout, updatedLayout) || (modification.layout = updatedLayout), options.selectedPanel && !isEqual(selectedPanel, options.selectedPanel) && (modification.selectedPanel = options.selectedPanel), Object.keys(modification).length && store2.setState(modification, { persistence: "permanent" }), isEqual(theme, updatedTheme) || store2.setState({ theme: updatedTheme }); + } + }, persisted = pick(store2.getState(), ["layout", "selectedPanel"]); + return provider.channel?.on(SET_CONFIG2, () => { + api.setOptions(merge_default(api.getInitialOptions(), persisted)); + }), { + api, + state: merge_default(api.getInitialOptions(), persisted) + }; +}; + +// src/manager-api/modules/notifications.ts +var notifications_exports = {}; +__export(notifications_exports, { + init: () => init6 +}); +var init6 = ({ store: store2 }) => ({ + api: { + addNotification: (newNotification) => { + store2.setState(({ notifications }) => { + let [existing, others] = partition(notifications, (n) => n.id === newNotification.id); + return existing.forEach((notification) => { + notification.onClear && notification.onClear({ dismissed: !1, timeout: !1 }); + }), { notifications: [...others, newNotification] }; + }); + }, + clearNotification: (notificationId) => { + store2.setState(({ notifications }) => { + let [matching, others] = partition(notifications, (n) => n.id === notificationId); + return matching.forEach((notification) => { + notification.onClear && notification.onClear({ dismissed: !1, timeout: !1 }); + }), { notifications: others }; + }); + } + }, + state: { notifications: [] } +}); + +// src/manager-api/modules/open-in-editor.tsx +var open_in_editor_exports = {}; +__export(open_in_editor_exports, { + init: () => init7 +}); +import React from "react"; +import { + OPEN_IN_EDITOR_REQUEST, + OPEN_IN_EDITOR_RESPONSE +} from "storybook/internal/core-events"; +import { FailedIcon } from "@storybook/icons"; +var init7 = ({ provider, fullAPI }) => ({ + api: { + openInEditor(payload) { + return new Promise((resolve) => { + let { file, line, column } = payload, handler = (res) => { + res.file === file && res.line === line && res.column === column && (provider.channel?.off(OPEN_IN_EDITOR_RESPONSE, handler), resolve(res)); + }; + provider.channel?.on(OPEN_IN_EDITOR_RESPONSE, handler), provider.channel?.emit(OPEN_IN_EDITOR_REQUEST, payload); + }); + } + }, + state: { notifications: [] }, + init: async () => { + let { color } = await import("../theming/index.js"); + provider.channel?.on(OPEN_IN_EDITOR_RESPONSE, (payload) => { + payload.error !== null && fullAPI.addNotification({ + id: "open-in-editor-error", + content: { + headline: "Failed to open in editor", + subHeadline: payload.error || "Check the Storybook process on the command line for more details." + }, + icon: React.createElement(FailedIcon, { color: color.negative }), + duration: 8e3 + }); + }); + } +}); + +// src/manager-api/modules/provider.ts +var provider_exports = {}; +__export(provider_exports, { + init: () => init8 +}); +var init8 = ({ provider }) => ({ + api: provider.renderPreview ? { renderPreview: provider.renderPreview } : {}, + state: {} +}); + +// src/manager-api/modules/settings.ts +var settings_exports = {}; +__export(settings_exports, { + init: () => init9 +}); +var init9 = ({ store: store2, navigate, fullAPI }) => ({ + state: { settings: { lastTrackedStoryId: null } }, + api: { + closeSettings: () => { + let { + settings: { lastTrackedStoryId } + } = store2.getState(); + lastTrackedStoryId ? fullAPI.selectStory(lastTrackedStoryId) : fullAPI.selectFirstStory(); + }, + changeSettingsTab: (path) => { + navigate(`/settings/${path}`); + }, + isSettingsScreenActive: () => { + let { path } = fullAPI.getUrlState(); + return !!(path || "").match(/^\/settings/); + }, + retrieveSelection() { + let { settings } = store2.getState(); + return settings.lastTrackedStoryId; + }, + storeSelection: async () => { + let { storyId, settings } = store2.getState(); + await store2.setState({ + settings: { ...settings, lastTrackedStoryId: storyId } + }); + } + } +}); + +// src/manager-api/modules/shortcuts.ts +var shortcuts_exports = {}; +__export(shortcuts_exports, { + controlOrMetaKey: () => controlOrMetaKey2, + defaultShortcuts: () => defaultShortcuts, + init: () => init10, + isMacLike: () => isMacLike2, + keys: () => keys +}); +var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1); +import { + FORCE_REMOUNT, + PREVIEW_KEYDOWN, + STORIES_COLLAPSE_ALL, + STORIES_EXPAND_ALL +} from "storybook/internal/core-events"; +import { global as global4 } from "@storybook/global"; + +// src/manager-api/lib/platform.ts +import { global as global3 } from "@storybook/global"; +var { navigator: navigator2 } = global3, isMacLike = () => navigator2 && navigator2.platform ? !!navigator2.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1; + +// src/manager-api/lib/shortcut.ts +var controlOrMetaSymbol = () => isMacLike() ? "\u2318" : "ctrl", controlOrMetaKey = () => isMacLike() ? "meta" : "control", optionOrAltSymbol = () => isMacLike() ? "\u2325" : "alt", isShortcutTaken = (arr1, arr2) => JSON.stringify(arr1) === JSON.stringify(arr2), eventToShortcut = (e) => { + if (["Meta", "Alt", "Control", "Shift", "Tab"].includes(e.key)) + return null; + let keys2 = []; + e.altKey && keys2.push("alt"), e.ctrlKey && keys2.push("control"), e.metaKey && keys2.push("meta"), e.shiftKey && keys2.push("shift"); + let codeUpper = e.code?.toUpperCase(), codeToCharMap = { + MINUS: "-", + EQUAL: "=", + BRACKETLEFT: "[", + BRACKETRIGHT: "]", + BACKSLASH: "\\", + SEMICOLON: ";", + QUOTE: "'", + BACKQUOTE: "`", + COMMA: ",", + PERIOD: ".", + SLASH: "/" + }, codeChar = codeUpper ? codeUpper.startsWith("KEY") && codeUpper.length === 4 ? codeUpper.replace("KEY", "") : codeUpper.startsWith("DIGIT") ? codeUpper.replace("DIGIT", "") : codeToCharMap[codeUpper] : void 0; + if (e.key && e.key.length === 1 && e.key !== " ") { + let key = e.key.toUpperCase(), code = codeChar; + code && code.length === 1 && code !== key ? keys2.push([key, code]) : keys2.push(key); + } else e.key === "Dead" && codeChar && keys2.push(codeChar); + return e.key === " " && keys2.push("space"), e.key === "Escape" && keys2.push("escape"), e.key === "ArrowRight" && keys2.push("ArrowRight"), e.key === "ArrowDown" && keys2.push("ArrowDown"), e.key === "ArrowUp" && keys2.push("ArrowUp"), e.key === "ArrowLeft" && keys2.push("ArrowLeft"), keys2.length > 0 ? keys2 : null; +}, shortcutMatchesShortcut = (inputShortcut, shortcut) => !inputShortcut || !shortcut || (inputShortcut.join("").startsWith("shift/") && inputShortcut.shift(), inputShortcut.length !== shortcut.length) ? !1 : !inputShortcut.find( + (input, i) => Array.isArray(input) ? !input.includes(shortcut[i]) : input !== shortcut[i] +), eventMatchesShortcut = (e, shortcut) => shortcutMatchesShortcut(eventToShortcut(e), shortcut), keyToSymbol = (key) => key === "alt" ? optionOrAltSymbol() : key === "control" ? "\u2303" : key === "meta" ? "\u2318" : key === "shift" ? "\u21E7\u200B" : key === "Enter" || key === "Backspace" || key === "Esc" || key === "escape" ? "" : key === " " ? "SPACE" : key === "ArrowUp" ? "\u2191" : key === "ArrowDown" ? "\u2193" : key === "ArrowLeft" ? "\u2190" : key === "ArrowRight" ? "\u2192" : key?.toUpperCase(), shortcutToHumanString = (shortcut) => shortcut.map(keyToSymbol).join(" "), shortcutToAriaKeyshortcuts = (shortcut) => shortcut.map((shortcut2) => shortcut2 === "+" ? "plus" : shortcut2 === " " ? "space" : shortcut2).join("+"); + +// src/manager-api/modules/shortcuts.ts +var { navigator: navigator3, document: document3 } = global4; +function wasFocusInElement(element) { + return document3.activeElement && element?.contains(document3.activeElement); +} +var isMacLike2 = () => navigator3 && navigator3.platform ? !!navigator3.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1, controlOrMetaKey2 = () => isMacLike2() ? "meta" : "control"; +function keys(o) { + return Object.keys(o); +} +var defaultShortcuts = Object.freeze({ + fullScreen: ["alt", "F"], + togglePanel: ["alt", "A"], + panelPosition: ["alt", "D"], + toggleNav: ["alt", "S"], + toolbar: ["alt", "T"], + search: [controlOrMetaKey2(), "K"], + focusNav: ["1"], + focusIframe: ["2"], + focusPanel: ["3"], + prevComponent: ["alt", "ArrowUp"], + nextComponent: ["alt", "ArrowDown"], + prevStory: ["alt", "ArrowLeft"], + nextStory: ["alt", "ArrowRight"], + shortcutsPage: [controlOrMetaKey2(), "shift", ","], + aboutPage: [controlOrMetaKey2(), ","], + escape: ["escape"], + // This one is not customizable + collapseAll: [controlOrMetaKey2(), "shift", "ArrowUp"], + expandAll: [controlOrMetaKey2(), "shift", "ArrowDown"], + remount: ["alt", "R"], + openInEditor: ["alt", "shift", "E"], + openInIsolation: ["alt", "shift", "I"], + copyStoryLink: ["alt", "shift", "L"], + goToPreviousLandmark: ["shift", "F6"], + // hardcoded in react-aria + goToNextLandmark: ["F6"] + // hardcoded in react-aria + // TODO: bring this back once we want to add shortcuts for this + // copyStoryName: ['alt', 'shift', 'C'], +}), addonsShortcuts = {}; +function shouldSkipShortcut(event) { + let target = event.target; + return !!(/input|textarea/i.test(target.tagName) || target.getAttribute("contenteditable") !== null || target.closest("dialog[open]")); +} +var init10 = ({ store: store2, fullAPI, provider }) => { + let api = { + // Getting and setting shortcuts + getShortcutKeys() { + return store2.getState().shortcuts; + }, + getDefaultShortcuts() { + return { + ...defaultShortcuts, + ...api.getAddonsShortcutDefaults() + }; + }, + getAddonsShortcuts() { + return addonsShortcuts; + }, + getAddonsShortcutLabels() { + let labels = {}; + return Object.entries(api.getAddonsShortcuts()).forEach(([actionName, { label }]) => { + labels[actionName] = label; + }), labels; + }, + getAddonsShortcutDefaults() { + let defaults = {}; + return Object.entries(api.getAddonsShortcuts()).forEach(([actionName, { defaultShortcut }]) => { + defaults[actionName] = defaultShortcut; + }), defaults; + }, + async setShortcuts(update2) { + let { shortcuts } = await store2.setState( + (state2) => ({ shortcuts: typeof update2 == "function" ? update2(state2.shortcuts) : update2 }), + { persistence: "permanent" } + ); + return shortcuts; + }, + async restoreAllDefaultShortcuts() { + return api.setShortcuts(api.getDefaultShortcuts()); + }, + async setShortcut(action, value) { + return await api.setShortcuts((shortcuts) => ({ ...shortcuts, [action]: value })), value; + }, + async setAddonShortcut(addon, shortcut) { + return await api.setShortcuts((shortcuts) => ({ + ...shortcuts, + [`${addon}-${shortcut.actionName}`]: shortcut.defaultShortcut + })), addonsShortcuts[`${addon}-${shortcut.actionName}`] = shortcut, shortcut; + }, + async restoreDefaultShortcut(action) { + let defaultShortcut = api.getDefaultShortcuts()[action]; + return api.setShortcut(action, defaultShortcut); + }, + // Listening to shortcut events + handleKeydownEvent(event) { + let shortcut = eventToShortcut(event), shortcuts = api.getShortcutKeys(), matchedFeature = keys(shortcuts).find( + (feature) => shortcutMatchesShortcut(shortcut, shortcuts[feature]) + ); + matchedFeature && api.handleShortcutFeature(matchedFeature, event); + }, + // warning: event might not have a full prototype chain because it may originate from the channel + handleShortcutFeature(feature, event) { + let state2 = store2.getState(), { + ui: { enableShortcuts }, + storyId, + refId, + viewMode + } = state2; + if (!enableShortcuts) + return; + let isSidebarShortcutBlocked = fullAPI.getNavAvailability() === "unavailable", isSidebarShortcutFeature = ["focusNav", "search", "toggleNav"].includes(feature); + if (!(isSidebarShortcutBlocked && isSidebarShortcutFeature)) + switch (event?.preventDefault && event.preventDefault(), feature) { + case "escape": { + fullAPI.getIsFullscreen() ? fullAPI.toggleFullscreen(!1) : fullAPI.getIsNavShown() && fullAPI.toggleNav(!0); + break; + } + // Handled by @react-aria/interactions and useLandmarkIndicator + case "goToNextLandmark": + case "goToPreviousLandmark": + break; + case "focusNav": { + fullAPI.getIsFullscreen() && fullAPI.toggleFullscreen(!1), fullAPI.getIsNavShown() || fullAPI.toggleNav(!0), fullAPI.focusOnUIElement(focusableUIElements.storyListMenu); + break; + } + case "search": { + fullAPI.getIsFullscreen() && fullAPI.toggleFullscreen(!1), fullAPI.getIsNavShown() || fullAPI.toggleNav(!0), setTimeout(() => { + fullAPI.focusOnUIElement(focusableUIElements.storySearchField, !0); + }, 0); + break; + } + case "focusIframe": { + let element = document3.getElementById("storybook-preview-iframe"); + if (element) + try { + element.contentWindow.focus(); + } catch { + } + break; + } + case "focusPanel": { + fullAPI.getIsFullscreen() && fullAPI.toggleFullscreen(!1), fullAPI.getIsPanelShown() || fullAPI.togglePanel(!0), fullAPI.focusOnUIElement(focusableUIElements.storyPanelRoot); + break; + } + case "nextStory": { + fullAPI.jumpToStory(1); + break; + } + case "prevStory": { + fullAPI.jumpToStory(-1); + break; + } + case "nextComponent": { + fullAPI.jumpToComponent(1); + break; + } + case "prevComponent": { + fullAPI.jumpToComponent(-1); + break; + } + case "fullScreen": { + fullAPI.toggleFullscreen(); + break; + } + case "togglePanel": { + let wasPanelShown = fullAPI.getIsPanelShown(), panelElement = document3.getElementById(focusableUIElements.addonPanel); + fullAPI.togglePanel(), wasPanelShown && wasFocusInElement(panelElement) && fullAPI.focusOnUIElement(focusableUIElements.showAddonPanel, { + poll: !0 + }).then((success) => { + success === !1 && document3.body.focus(); + }), wasPanelShown || fullAPI.focusOnUIElement(focusableUIElements.addonPanel, { + forceFocus: !0, + poll: !0 + }); + break; + } + case "toggleNav": { + let wasNavShown = fullAPI.getIsNavShown(), sidebarElement = document3.getElementById(focusableUIElements.sidebarRegion); + fullAPI.toggleNav(), wasNavShown && wasFocusInElement(sidebarElement) && fullAPI.focusOnUIElement(focusableUIElements.showSidebar, { + poll: !0 + }).then((success) => { + success === !1 && document3.body.focus(); + }), wasNavShown || fullAPI.focusOnUIElement(focusableUIElements.sidebarRegion, { + forceFocus: !0, + poll: !0 + }); + break; + } + case "toolbar": { + fullAPI.toggleToolbar(); + break; + } + case "panelPosition": { + fullAPI.getIsFullscreen() && fullAPI.toggleFullscreen(!1), fullAPI.getIsPanelShown() || fullAPI.togglePanel(!0), fullAPI.togglePanelPosition(); + break; + } + case "aboutPage": { + fullAPI.navigate("/settings/about"); + break; + } + case "shortcutsPage": { + fullAPI.navigate("/settings/shortcuts"); + break; + } + case "collapseAll": { + fullAPI.emit(STORIES_COLLAPSE_ALL); + break; + } + case "expandAll": { + fullAPI.emit(STORIES_EXPAND_ALL); + break; + } + case "remount": { + fullAPI.emit(FORCE_REMOUNT, { storyId }); + break; + } + case "openInEditor": { + global4.CONFIG_TYPE === "DEVELOPMENT" && fullAPI.openInEditor({ + file: fullAPI.getCurrentStoryData().importPath + }); + break; + } + case "openInIsolation": { + if (storyId && viewMode === "story") { + let { previewHref } = fullAPI.getStoryHrefs(storyId, { refId }); + window.open(previewHref, "_blank", "noopener,noreferrer"); + } + break; + } + // TODO: bring this back once we want to add shortcuts for this + // case 'copyStoryName': { + // const storyData = fullAPI.getCurrentStoryData(); + // if (storyData.type === 'story') { + // copy(storyData.exportName); + // } + // break; + // } + case "copyStoryLink": { + if (storyId) { + let { managerHref } = fullAPI.getStoryHrefs(storyId, { refId }); + (0, import_copy_to_clipboard.default)(managerHref); + } + break; + } + default: + addonsShortcuts[feature].action(); + break; + } + } + }, { shortcuts: persistedShortcuts = defaultShortcuts } = store2.getState(), state = { + // Any saved shortcuts that are still in our set of defaults + shortcuts: keys(defaultShortcuts).reduce( + (acc, key) => ({ ...acc, [key]: persistedShortcuts[key] || defaultShortcuts[key] }), + defaultShortcuts + ) + }; + return { api, state, init: () => { + document3.addEventListener("keydown", (event) => { + shouldSkipShortcut(event) || api.handleKeydownEvent(event); + }), provider.channel?.on(PREVIEW_KEYDOWN, (data) => { + api.handleKeydownEvent(data.event); + }); + } }; +}; + +// src/manager-api/modules/stories.ts +var stories_exports = {}; +__export(stories_exports, { + init: () => init11 +}); +import { logger as logger6 } from "storybook/internal/client-logger"; +import { + CONFIG_ERROR, + CURRENT_STORY_WAS_SET, + DOCS_PREPARED, + PRELOAD_ENTRIES, + RESET_STORY_ARGS, + SELECT_STORY, + SET_CONFIG as SET_CONFIG3, + SET_CURRENT_STORY, + SET_FILTER, + SET_INDEX, + SET_STORIES, + SIDEBAR_FILTER_CHANGED, + STORY_ARGS_UPDATED, + STORY_CHANGED, + STORY_INDEX_INVALIDATED, + STORY_MISSING, + STORY_PREPARED, + STORY_SPECIFIED, + UPDATE_STORY_ARGS +} from "storybook/internal/core-events"; +import { sanitize as sanitize2, toId } from "storybook/internal/csf"; +import { queryFromLocation } from "storybook/internal/router"; +import { global as global5 } from "@storybook/global"; + +// src/manager-api/lib/url.ts +var buildNavigationUrl = (path, queryParams = {}) => { + let params = Object.entries(queryParams).filter(([k, v]) => k !== "path" && v !== null && v !== void 0).sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${k}=${v}`); + return [path, ...params].join("&"); +}; + +// src/shared/universal-store/use-universal-store-manager.ts +import * as React2 from "react"; +var useUniversalStore = (universalStore, selector) => { + let snapshotRef = React2.useRef( + selector ? selector(universalStore.getState()) : universalStore.getState() + ), subscribe = React2.useCallback( + (listener) => universalStore.onStateChange((state2, previousState) => { + if (!selector) { + snapshotRef.current = state2, listener(); + return; + } + let selectedState = selector(state2), selectedPreviousState = selector(previousState); + !isEqual(selectedState, selectedPreviousState) && (snapshotRef.current = selectedState, listener()); + }), + [universalStore, selector] + ), getSnapshot = React2.useCallback(() => { + let currentState = universalStore.getState(), selectedState = selector ? selector(currentState) : currentState; + return isEqual(selectedState, snapshotRef.current) || (snapshotRef.current = selectedState), snapshotRef.current; + }, [universalStore, selector]); + return [React2.useSyncExternalStore(subscribe, getSnapshot), universalStore.setState]; +}; + +// src/manager-api/stores/status.ts +var statusStore = createStatusStore({ + universalStatusStore: UniversalStore.create({ + ...UNIVERSAL_STATUS_STORE_OPTIONS, + leader: globalThis.CONFIG_TYPE === "PRODUCTION" + }), + useUniversalStore, + environment: "manager" +}), { fullStatusStore, getStatusStoreByTypeId, useStatusStore, universalStatusStore } = statusStore; + +// src/manager-api/lib/filter-param.ts +var parseFilterParam = (param, transform) => { + if (!param) + return { included: [], excluded: [] }; + let included = [], excluded = []; + return param.split(";").forEach((raw) => { + if (!raw) + return; + let isExcluded = raw.startsWith("!"), value = transform(isExcluded ? raw.slice(1) : raw); + value != null && (isExcluded ? excluded.push(value) : included.push(value)); + }), { included, excluded }; +}; + +// src/manager-api/modules/statuses.ts +var parseStatusesParam = (statusesParam) => parseFilterParam(statusesParam, toStatusValue), serializeStatusesParam = (included, excluded) => { + if (!included.length && !excluded.length) + return; + let serializedIncluded = included.map((v) => statusValueShortName(v)).sort(), serializedExcluded = excluded.map((v) => `!${statusValueShortName(v)}`).sort(); + return [...serializedIncluded, ...serializedExcluded].join(";"); +}, computeStatusFilterFn = (includedStatusFilters, excludedStatusFilters) => (entry) => { + if (!includedStatusFilters.length && !excludedStatusFilters.length) + return !0; + let storyStatuses = (fullStatusStore.getAll() ?? {})[entry.id], storyStatusValues = storyStatuses ? Object.values(storyStatuses).map((s) => s.value) : [], passesInclude = !includedStatusFilters.length || includedStatusFilters.some((v) => storyStatusValues.includes(v)), passesExclude = !excludedStatusFilters.length || excludedStatusFilters.every((v) => !storyStatusValues.includes(v)); + return passesInclude && passesExclude; +}; + +// src/manager-api/modules/tags.ts +var import_memoizerific2 = __toESM(require_memoizerific(), 1); +var BUILT_IN_URL_TAG_MAP = { + $docs: "_docs", + $play: "_play", + $test: "_test" +}, parseTagsParam = (tagsParam) => parseFilterParam(tagsParam, (raw) => BUILT_IN_URL_TAG_MAP[raw] ?? raw), serializeTagsParam = (included, excluded) => { + if (!included.length && !excluded.length) + return ""; + let reverseBuiltInUrlTagMap = Object.fromEntries( + Object.entries(BUILT_IN_URL_TAG_MAP).map(([urlTag, internalTag]) => [internalTag, urlTag]) + ), serializedIncluded = included.map((tag) => reverseBuiltInUrlTagMap[tag] ?? tag).sort(), serializedExcluded = excluded.map((tag) => `!${reverseBuiltInUrlTagMap[tag] ?? tag}`).sort(); + return [...serializedIncluded, ...serializedExcluded].join(";"); +}, getDefaultTagsFromPreset = (0, import_memoizerific2.default)(1)((presets) => { + let presetEntries = Object.entries(presets); + return { + included: presetEntries.filter(([, option]) => option.defaultFilterSelection === "include").map(([tag]) => tag), + excluded: presetEntries.filter(([, option]) => option.defaultFilterSelection === "exclude").map(([tag]) => tag) + }; +}), computeStaticFilterFn = (tagPresets) => { + let staticExcludeTags = Object.entries(tagPresets).reduce( + (acc, entry) => { + let [tag, option] = entry; + return option.excludeFromSidebar && (acc[tag] = !0), acc; + }, + {} + ); + return (item) => { + let tags = item.tags ?? [], isCsfAutodocsEntry = item.type === "docs" && !tags.includes(Tag.ATTACHED_MDX) && !tags.includes(Tag.UNATTACHED_MDX); + return (tags.includes(Tag.DEV) || isCsfAutodocsEntry) && tags.filter((tag) => staticExcludeTags[tag]).length === 0; + }; +}, computeTagsFilterFn = (includedTagFilters, excludedTagFilters) => { + let computeFilterFunctions = (set2) => Object.values( + set2.reduce( + (acc, tag) => (Object.hasOwn(BUILT_IN_FILTERS, tag) ? acc["built-in"].push(BUILT_IN_FILTERS[tag]) : acc.user.push(USER_TAG_FILTER(tag)), acc), + { "built-in": [], user: [] } + ) + ).filter((group) => group.length > 0); + return (item) => { + let included = computeFilterFunctions(includedTagFilters), excluded = computeFilterFunctions(excludedTagFilters); + return (!included.length || included.every((group) => group.some((filterFn) => filterFn(item, !1)))) && (!excluded.length || excluded.every((group) => group.every((filterFn) => filterFn(item, !0)))); + }; +}; + +// src/manager-api/modules/stories.ts +var { fetch: fetch2 } = global5, STORY_INDEX_PATH = "./index.json", TAGS_FILTER = "tags-filter", STATIC_FILTER = "static-filter", STATUS_FILTER = "status-filter", BUILT_IN_TAG_IDS = new Set(Object.keys(BUILT_IN_FILTERS)), removedOptions = ["enableShortcuts", "theme", "showRoots"]; +function removeRemovedOptions(options) { + if (!options || typeof options == "string") + return options; + let result = { ...options }; + return removedOptions.forEach((option) => { + option in result && delete result[option]; + }), result; +} +var FILTER_KEYS = { + tag: { included: "includedTagFilters", excluded: "excludedTagFilters" }, + status: { included: "includedStatusFilters", excluded: "excludedStatusFilters" } +}, init11 = ({ + fullAPI, + store: store2, + navigate, + provider, + state: { location: location2 } = {}, + storyId: initialStoryId, + viewMode: initialViewMode, + docsOptions = {} +}) => { + let navigateWithQueryParams = (path, options) => { + let { customQueryParams } = store2.getState(); + navigate(buildNavigationUrl(path, customQueryParams ?? {}), options); + }, persistFilters = (inputPatch) => store2.setState(inputPatch, { + persistence: "url", + serialize: (s) => { + let tagsValue = serializeTagsParam(s.includedTagFilters, s.excludedTagFilters), statusesValue = serializeStatusesParam( + s.includedStatusFilters, + s.excludedStatusFilters + ); + return { tags: tagsValue ?? null, statuses: statusesValue ?? null }; + } + }), urlFilterTelemetryEmitted = !1, addFilters = async (type, items, excluded) => { + let { included, excluded: excludedKey } = FILTER_KEYS[type], state = store2.getState(), newIncluded = new Set(state[included]), newExcluded = new Set(state[excludedKey]); + for (let item of items) { + let [target, other] = excluded ? [newExcluded, newIncluded] : [newIncluded, newExcluded]; + other.delete(item), target.add(item); + } + await persistFilters({ + [included]: Array.from(newIncluded), + [excludedKey]: Array.from(newExcluded) + }); + }, removeFilters = async (type, items) => { + let { included, excluded } = FILTER_KEYS[type], state = store2.getState(), itemSet = new Set(items); + await persistFilters({ + [included]: state[included].filter((v) => !itemSet.has(v)), + [excluded]: state[excluded].filter((v) => !itemSet.has(v)) + }); + }, emitFilterTelemetry = (trigger, changed) => { + let state = store2.getState(), includedTags = (state.includedTagFilters ?? []).filter((id) => BUILT_IN_TAG_IDS.has(id)), excludedTags = (state.excludedTagFilters ?? []).filter((id) => BUILT_IN_TAG_IDS.has(id)), changeDetectionEnabled = !!globalThis?.FEATURES?.changeDetection, includedStatuses = changeDetectionEnabled ? state.includedStatusFilters ?? [] : [], excludedStatuses = changeDetectionEnabled ? state.excludedStatusFilters ?? [] : [], storyCounts = {}, entries = state.internal_index ? Object.values(state.internal_index.entries) : []; + for (let tagId of /* @__PURE__ */ new Set([...includedTags, ...excludedTags])) { + let filterDef = BUILT_IN_FILTERS[tagId]; + storyCounts[tagId] = entries.filter((entry) => filterDef(entry)).length; + } + if (includedStatuses.length > 0 || excludedStatuses.length > 0) { + let statusCounts = countStatusesByValue(fullStatusStore.getAll()); + for (let statusValue of /* @__PURE__ */ new Set([...includedStatuses, ...excludedStatuses])) + statusCounts[statusValue] !== void 0 && (storyCounts[statusValue] = statusCounts[statusValue]); + } + provider.channel?.emit(SIDEBAR_FILTER_CHANGED, { + trigger, + changed, + activeTagFilters: { included: includedTags, excluded: excludedTags }, + activeStatusFilters: { included: includedStatuses, excluded: excludedStatuses }, + storyCounts + }); + }, api = { + storyId: toId, + getData: (storyId, refId) => { + let result = api.resolveStory(storyId, refId); + if (result?.type === "story" || result?.type === "docs") + return result; + }, + isPrepared: (storyId, refId) => { + let data = api.getData(storyId, refId); + return data ? data.type === "story" ? data.prepared : !0 : !1; + }, + resolveStory: (storyId, refId) => { + let { refs, index } = store2.getState(); + if (!(refId && !refs[refId])) + return refId ? refs?.[refId]?.index?.[storyId] ?? void 0 : index ? index[storyId] : void 0; + }, + getCurrentStoryData: () => { + let { storyId, refId } = store2.getState(); + return api.getData(storyId, refId); + }, + getIndex: () => { + let { internal_index } = store2.getState(); + return internal_index; + }, + getParameters: (storyIdOrCombo, parameterName) => { + let { storyId, refId } = typeof storyIdOrCombo == "string" ? { storyId: storyIdOrCombo, refId: void 0 } : storyIdOrCombo, data = api.getData(storyId, refId); + if (["story", "docs"].includes(data?.type)) { + let { parameters } = data; + if (parameters) + return parameterName ? parameters[parameterName] : parameters; + } + return null; + }, + getCurrentParameter: (parameterName) => { + let { storyId, refId } = store2.getState(); + return api.getParameters({ storyId, refId }, parameterName) || void 0; + }, + jumpToComponent: (direction) => { + let { filteredIndex, storyId, refs, refId } = store2.getState(); + if (!api.getData(storyId, refId)) + return; + let hash = refId ? refs[refId].filteredIndex || {} : filteredIndex; + if (!hash) + return; + let result = api.findSiblingStoryId(storyId, hash, direction, !0); + result && api.selectStory(result, void 0, { ref: refId }); + }, + jumpToStory: (direction) => { + let { filteredIndex, storyId, refs, refId } = store2.getState(), story = api.getData(storyId, refId); + if (!story) + return; + let hash = story.refId ? refs[story.refId].filteredIndex : filteredIndex; + if (!hash) + return; + let result = api.findSiblingStoryId(storyId, hash, direction, !1); + result && api.selectStory(result, void 0, { ref: refId }); + }, + selectFirstStory: () => { + let state = store2.getState(), { filteredIndex } = state; + if (filteredIndex) { + let firstStory2 = Object.keys(filteredIndex).find( + (id) => filteredIndex[id].type === "story" + ); + firstStory2 && api.selectStory(firstStory2); + return; + } + let { index } = state; + if (!index) + return; + let firstStory = Object.keys(index).find((id) => index[id].type === "story"); + if (firstStory) { + api.selectStory(firstStory); + return; + } + navigateWithQueryParams("/"); + }, + selectStory: (titleOrId = void 0, name = void 0, options = {}) => { + let { ref } = options, { storyId, index, filteredIndex, refs, settings } = store2.getState(), gotoStory = (entry) => entry?.type === "docs" || entry?.type === "story" ? (store2.setState({ settings: { ...settings, lastTrackedStoryId: entry.id } }), navigateWithQueryParams( + `/${entry.type}/${entry.refId ? `${entry.refId}_${entry.id}` : entry.id}` + ), !0) : !1, kindSlug = storyId?.split("--", 2)[0], hash = ref ? refs[ref].index : index, filteredHash = ref ? refs[ref].filteredIndex : filteredIndex; + if (!(!hash || !filteredHash)) + if (name) + if (!titleOrId) + gotoStory(hash[toId(kindSlug, name)]); + else { + let id = ref ? `${ref}_${toId(titleOrId, name)}` : toId(titleOrId, name); + if (hash[id]) + gotoStory(hash[id]); + else { + let entry = hash[sanitize2(titleOrId)]; + if (entry?.type === "component") { + let foundId = entry.children.find((childId) => hash[childId].name === name); + gotoStory(foundId ? hash[foundId] : void 0); + } + } + } + else { + let entry = titleOrId ? hash[titleOrId] || hash[sanitize2(titleOrId)] : hash[kindSlug]; + if (!entry) + throw new Error(`Unknown id or title: '${titleOrId}'`); + gotoStory(entry) || gotoStory(api.findLeafEntry(filteredHash, entry.id)); + } + }, + findLeafEntry(index, storyId) { + let entry = index[storyId]; + if (!entry) + return; + if (entry.type === "docs" || entry.type === "story") + return entry; + let childStoryId = entry.children.find((childId) => index[childId]); + return childStoryId ? api.findLeafEntry(index, childStoryId) : void 0; + }, + findLeafStoryId(index, storyId) { + return api.findLeafEntry(index, storyId)?.id; + }, + findAllLeafStoryIds(entryId) { + let { index } = store2.getState(); + if (!index) + return []; + let findChildEntriesRecursively = (currentEntryId, results = []) => { + let node = index[currentEntryId]; + return node && (node.type === "story" && results.push(node.id), "children" in node && node.children?.forEach((childId) => findChildEntriesRecursively(childId, results))), results; + }; + return findChildEntriesRecursively(entryId, []); + }, + findSiblingStoryId(storyId, index, direction, toSiblingGroup) { + if (toSiblingGroup) { + let lookupList2 = getComponentLookupList(index), position2 = lookupList2.findIndex((i) => i.includes(storyId)); + return position2 === lookupList2.length - 1 && direction > 0 || position2 === 0 && direction < 0 ? void 0 : lookupList2[position2 + direction] ? lookupList2[position2 + direction][0] : void 0; + } + let lookupList = getStoriesLookupList(index), position = lookupList.indexOf(storyId); + if (!(position === lookupList.length - 1 && direction > 0) && !(position === 0 && direction < 0)) + return lookupList[position + direction]; + }, + updateStoryArgs: (story, updatedArgs) => { + let { id: storyId, refId } = story; + provider.channel?.emit(UPDATE_STORY_ARGS, { + storyId, + updatedArgs, + options: { target: refId } + }); + }, + resetStoryArgs: (story, argNames) => { + let { id: storyId, refId } = story; + provider.channel?.emit(RESET_STORY_ARGS, { + storyId, + argNames, + options: { target: refId } + }); + }, + fetchIndex: async () => { + try { + let result = await fetch2(STORY_INDEX_PATH); + if (result.status !== 200) + throw new Error(await result.text()); + let storyIndex = await result.json(); + if (storyIndex.v < 3) { + logger6.warn(`Skipping story index with version v${storyIndex.v}, awaiting SET_STORIES.`); + return; + } + await api.setIndex(storyIndex); + } catch (err) { + await store2.setState({ indexError: err }); + } + }, + // The story index we receive on SET_INDEX is "prepared" in that it has parameters + // The story index we receive on fetchStoryIndex is not, but all the prepared fields are optional + // so we can cast one to the other easily enough + setIndex: async (input) => { + let { filteredIndex: oldFilteredHash, index: oldHash, filters } = store2.getState(), allStatuses = fullStatusStore.getAll(), newFilteredHash = transformStoryIndexToStoriesHash(input, { + provider, + docsOptions, + filters, + allStatuses, + statusFilterKey: STATUS_FILTER + }), newHash = transformStoryIndexToStoriesHash(input, { + provider, + docsOptions, + filters: {}, + allStatuses + }); + await store2.setState({ + internal_index: input, + filteredIndex: addPreparedStories(newFilteredHash, oldFilteredHash), + index: addPreparedStories(newHash, oldHash), + indexError: void 0 + }); + }, + // FIXME: is there a bug where filtered stories get added back in on updateStory??? + updateStory: async (storyId, update2, ref) => { + if (ref) { + let { id: refId, index, filteredIndex } = ref, storyUpdates = { + ...ref.storyUpdates, + [storyId]: { ...ref.storyUpdates?.[storyId], ...update2 } + }; + index && index[storyId] && (index[storyId] = { + ...index[storyId], + ...update2 + }), filteredIndex && filteredIndex[storyId] && (filteredIndex[storyId] = { + ...filteredIndex[storyId], + ...update2 + }), await fullAPI.updateRef(refId, { index, filteredIndex, storyUpdates }); + } else { + let { index, filteredIndex } = store2.getState(); + index && index[storyId] && (index[storyId] = { + ...index[storyId], + ...update2 + }), filteredIndex && filteredIndex[storyId] && (filteredIndex[storyId] = { + ...filteredIndex[storyId], + ...update2 + }), (index || filteredIndex) && await store2.setState({ index, filteredIndex }); + } + }, + updateDocs: async (docsId, update2, ref) => { + if (ref) { + let { id: refId, index, filteredIndex } = ref, storyUpdates = { + ...ref.storyUpdates, + [docsId]: { ...ref.storyUpdates?.[docsId], ...update2 } + }; + index && index[docsId] && (index[docsId] = { + ...index[docsId], + ...update2 + }), filteredIndex && filteredIndex[docsId] && (filteredIndex[docsId] = { + ...filteredIndex[docsId], + ...update2 + }), await fullAPI.updateRef(refId, { index, filteredIndex, storyUpdates }); + } else { + let { index, filteredIndex } = store2.getState(); + index && (index[docsId] = { + ...index[docsId], + ...update2 + }), filteredIndex && (filteredIndex[docsId] = { + ...filteredIndex[docsId], + ...update2 + }), (index || filteredIndex) && await store2.setState({ index, filteredIndex }); + } + }, + setPreviewInitialized: async (ref) => { + ref ? fullAPI.updateRef(ref.id, { previewInitialized: !0 }) : store2.setState({ previewInitialized: !0 }); + }, + experimental_setFilter: async (id, filterFunction) => { + await store2.setState((state) => ({ filters: { ...state.filters, [id]: filterFunction } })); + let { internal_index: index } = store2.getState(); + if (!index) + return; + await api.setIndex(index); + let refs = await fullAPI.getRefs(); + for (let [refId, { internal_index, ...ref }] of Object.entries(refs)) + await fullAPI.setRef(refId, { ...ref, storyIndex: internal_index }, !0); + provider.channel?.emit(SET_FILTER, { id }); + }, + resetTagFilters: async () => { + await persistFilters((s) => ({ + includedTagFilters: s.defaultIncludedTagFilters, + excludedTagFilters: s.defaultExcludedTagFilters + })), await recomputeTagsFilter(); + }, + setAllTagFilters: async (included, excluded) => { + await persistFilters({ includedTagFilters: included, excludedTagFilters: excluded }), await recomputeTagsFilter(); + }, + addTagFilters: async (tags2, excluded) => { + await addFilters("tag", tags2, excluded), await recomputeTagsFilter(), tags2.length === 1 && BUILT_IN_TAG_IDS.has(tags2[0]) && emitFilterTelemetry("interaction", { + filterType: "tag", + filterId: tags2[0], + action: excluded ? "exclude" : "include" + }); + }, + removeTagFilters: async (tags2) => { + await removeFilters("tag", tags2), await recomputeTagsFilter(), tags2.length === 1 && BUILT_IN_TAG_IDS.has(tags2[0]) && emitFilterTelemetry("interaction", { + filterType: "tag", + filterId: tags2[0], + action: "remove" + }); + }, + resetStatusFilters: async () => { + await persistFilters({ includedStatusFilters: [], excludedStatusFilters: [] }), await recomputeStatusFilter(); + }, + setAllStatusFilters: async (included, excluded) => { + let prevState = store2.getState(), prevIncluded = new Set(prevState.includedStatusFilters ?? []), prevExcluded = new Set(prevState.excludedStatusFilters ?? []), nextIncluded = new Set(included), nextExcluded = new Set(excluded); + await persistFilters({ includedStatusFilters: included, excludedStatusFilters: excluded }), await recomputeStatusFilter(); + let changedIds = /* @__PURE__ */ new Set([ + ...prevIncluded, + ...prevExcluded, + ...nextIncluded, + ...nextExcluded + ]); + for (let id of changedIds) { + let wasIncluded = prevIncluded.has(id), wasExcluded = prevExcluded.has(id), isIncluded = nextIncluded.has(id), isExcluded = nextExcluded.has(id); + if (wasIncluded === isIncluded && wasExcluded === isExcluded) + continue; + let action; + isIncluded ? action = "include" : isExcluded ? action = "exclude" : action = "remove", emitFilterTelemetry("interaction", { + filterType: "status", + filterId: id, + action + }); + } + }, + addStatusFilters: async (statuses2, excluded) => { + await addFilters("status", statuses2, excluded), await recomputeStatusFilter(), statuses2.length === 1 && emitFilterTelemetry("interaction", { + filterType: "status", + filterId: statuses2[0], + action: excluded ? "exclude" : "include" + }); + }, + removeStatusFilters: async (statuses2) => { + await removeFilters("status", statuses2), await recomputeStatusFilter(), statuses2.length === 1 && emitFilterTelemetry("interaction", { + filterType: "status", + filterId: statuses2[0], + action: "remove" + }); + } + }, recomputeTagsFilter = () => { + let { includedTagFilters, excludedTagFilters } = store2.getState(); + return api.experimental_setFilter( + TAGS_FILTER, + computeTagsFilterFn(includedTagFilters, excludedTagFilters) + ); + }, recomputeStatusFilter = () => { + let { includedStatusFilters, excludedStatusFilters } = store2.getState(); + return api.experimental_setFilter( + STATUS_FILTER, + computeStatusFilterFn(includedStatusFilters ?? [], excludedStatusFilters ?? []) + ); + }; + provider.channel?.on( + STORY_SPECIFIED, + function({ + storyId, + viewMode + }) { + let { sourceType } = getEventMetadata(this, fullAPI); + if (sourceType === "local") { + let state = store2.getState(), isCanvasRoute = !isReviewManagerRoute(state.path, state.customQueryParams) && (state.path === "/" || state.viewMode === "story" || state.viewMode === "docs"), stateHasSelection = state.viewMode && state.storyId, stateSelectionDifferent = state.viewMode !== viewMode || state.storyId !== storyId, { type } = state.index?.[state.storyId] || {}, isStory = !(type === "root" || type === "component" || type === "group"); + if (isCanvasRoute) { + let { filteredIndex } = state; + if (filteredIndex && !stateHasSelection && !(filteredIndex[storyId]?.type === "story")) { + let firstFiltered = filteredIndex ? Object.keys(filteredIndex).find((id) => { + let entry = filteredIndex[id]; + return entry.type === "story" || entry.type === "docs"; + }) : void 0; + firstFiltered && navigateWithQueryParams(`/${viewMode}/${firstFiltered}`); + return; + } + stateHasSelection && stateSelectionDifferent && isStory ? provider.channel?.emit(SET_CURRENT_STORY, { + storyId: state.storyId, + viewMode: state.viewMode + }) : stateSelectionDifferent && navigateWithQueryParams(`/${viewMode}/${storyId}`); + } + } + } + ), provider.channel?.on(CURRENT_STORY_WAS_SET, function() { + let { ref } = getEventMetadata(this, fullAPI); + api.setPreviewInitialized(ref); + }), provider.channel?.on(STORY_CHANGED, function() { + let { sourceType } = getEventMetadata(this, fullAPI); + if (sourceType === "local") { + let options = api.getCurrentParameter("options"); + options && fullAPI.setOptions(removeRemovedOptions(options)); + } + }), provider.channel?.on( + STORY_PREPARED, + function({ id, ...update2 }) { + let { ref, sourceType } = getEventMetadata(this, fullAPI); + if (api.updateStory(id, { ...update2, prepared: !0 }, ref), !ref && !store2.getState().hasCalledSetOptions) { + let { options } = update2.parameters; + fullAPI.setOptions(removeRemovedOptions(options)), store2.setState({ hasCalledSetOptions: !0 }); + } + if (sourceType === "local") { + let { storyId, index, refId } = store2.getState(); + if (!index) + return; + let toBePreloaded = Array.from( + /* @__PURE__ */ new Set([ + api.findSiblingStoryId(storyId, index, 1, !0), + api.findSiblingStoryId(storyId, index, -1, !0) + ]) + ).filter(Boolean); + provider.channel?.emit(PRELOAD_ENTRIES, { + ids: toBePreloaded, + options: { target: refId } + }); + } + } + ), provider.channel?.on( + DOCS_PREPARED, + function({ id, ...update2 }) { + let { ref } = getEventMetadata(this, fullAPI); + api.updateStory(id, { ...update2, prepared: !0 }, ref); + } + ), provider.channel?.on(SET_INDEX, function(index) { + let { ref } = getEventMetadata(this, fullAPI); + if (ref) + fullAPI.setRef(ref.id, { ...ref, storyIndex: index }, !0); + else { + api.setIndex(index); + let options = api.getCurrentParameter("options"); + fullAPI.setOptions(removeRemovedOptions(options)); + } + }), provider.channel?.on(SET_STORIES, function(data) { + let { ref } = getEventMetadata(this, fullAPI), setStoriesData = data.v ? denormalizeStoryParameters(data) : data.stories; + if (ref) + fullAPI.setRef(ref.id, { ...ref, setStoriesData }, !0); + else + throw new Error("Cannot call SET_STORIES for local frame"); + }), provider.channel?.on( + SELECT_STORY, + function({ + kind, + title = kind, + story, + name = story, + storyId, + ...rest + }) { + let { ref } = getEventMetadata(this, fullAPI); + ref ? fullAPI.selectStory(storyId || title, name, { ...rest, ref: ref.id }) : fullAPI.selectStory(storyId || title, name, rest); + } + ), provider.channel?.on( + STORY_ARGS_UPDATED, + function({ storyId, args }) { + let { ref } = getEventMetadata(this, fullAPI); + api.updateStory(storyId, { args }, ref); + } + ), provider.channel?.on(CONFIG_ERROR, function(err) { + let { ref } = getEventMetadata(this, fullAPI); + api.setPreviewInitialized(ref); + }), provider.channel?.on(STORY_MISSING, function(err) { + let { ref } = getEventMetadata(this, fullAPI); + api.setPreviewInitialized(ref); + }), provider.channel?.on(SET_CONFIG3, () => { + let configFilters2 = provider.getConfig()?.sidebar?.filters || {}, { + includedTagFilters, + excludedTagFilters, + includedStatusFilters, + excludedStatusFilters, + tagPresets: tagPresets2 + } = store2.getState(); + store2.setState(({ filters }) => ({ + filters: { + ...filters, + ...configFilters2, + [STATIC_FILTER]: computeStaticFilterFn(tagPresets2), + [TAGS_FILTER]: computeTagsFilterFn(includedTagFilters, excludedTagFilters), + [STATUS_FILTER]: computeStatusFilterFn(includedStatusFilters, excludedStatusFilters) + } + })); + }), fullStatusStore.onAllStatusChange(async () => { + recomputeStatusFilter(); + let { internal_index: index } = store2.getState(); + if (!index) + return; + await api.setIndex(index); + let refs = await fullAPI.getRefs(); + Object.entries(refs).forEach(([refId, { internal_index, ...ref }]) => { + fullAPI.setRef(refId, { ...ref, storyIndex: internal_index }, !0); + }); + }); + let configFilters = provider.getConfig()?.sidebar?.filters || {}, tagPresets = global5.TAGS_OPTIONS || {}, defaultTags = getDefaultTagsFromPreset(tagPresets), { tags, statuses } = queryFromLocation(location2 ?? { search: "" }), parsedTags = parseTagsParam(tags), hasTagsParam = tags !== void 0, initialIncluded = hasTagsParam ? parsedTags.included : defaultTags.included, initialExcluded = hasTagsParam ? parsedTags.excluded : defaultTags.excluded, parsedStatuses = parseStatusesParam(statuses), initialIncludedStatuses = parsedStatuses.included, initialExcludedStatuses = parsedStatuses.excluded, initialFilters = { + ...configFilters, + [STATIC_FILTER]: computeStaticFilterFn(tagPresets), + [TAGS_FILTER]: computeTagsFilterFn(initialIncluded, initialExcluded), + [STATUS_FILTER]: computeStatusFilterFn(initialIncludedStatuses, initialExcludedStatuses) + }; + return { + api, + state: { + storyId: initialStoryId, + viewMode: initialViewMode, + hasCalledSetOptions: !1, + previewInitialized: !1, + filters: initialFilters, + tagPresets, + defaultIncludedTagFilters: defaultTags.included, + defaultExcludedTagFilters: defaultTags.excluded, + includedTagFilters: initialIncluded, + excludedTagFilters: initialExcluded, + includedStatusFilters: initialIncludedStatuses, + excludedStatusFilters: initialExcludedStatuses + }, + init: async () => { + if (provider.channel?.on(STORY_INDEX_INVALIDATED, () => api.fetchIndex()), await api.fetchIndex(), urlFilterTelemetryEmitted) + return; + urlFilterTelemetryEmitted = !0; + let hasBuiltInTagFilters = initialIncluded.some((id) => BUILT_IN_TAG_IDS.has(id)) || initialExcluded.some((id) => BUILT_IN_TAG_IDS.has(id)), hasStatusFilters = !!globalThis?.FEATURES?.changeDetection && (initialIncludedStatuses.length > 0 || initialExcludedStatuses.length > 0); + (hasBuiltInTagFilters || hasStatusFilters) && emitFilterTelemetry("url"); + } + }; +}; + +// src/manager-api/modules/url.ts +var url_exports = {}; +__export(url_exports, { + getCustomQueryParams: () => getCustomQueryParams, + init: () => init12 +}); +import { + GLOBALS_UPDATED as GLOBALS_UPDATED2, + NAVIGATE_URL, + SET_CURRENT_STORY as SET_CURRENT_STORY2, + STORY_ARGS_UPDATED as STORY_ARGS_UPDATED2, + UPDATE_QUERY_PARAMS +} from "storybook/internal/core-events"; +import { buildArgsParam, queryFromLocation as queryFromLocation2 } from "storybook/internal/router"; +import { global as global6 } from "@storybook/global"; +var parseBoolean = (value) => { + if (value === "true" || value === "1") + return !0; + if (value === "false" || value === "0") + return !1; +}, parseSerializedParam = (param) => Object.fromEntries( + param.split(";").map((pair) => pair.split(":")).map(([key, value]) => [key, encodeURIComponent(value)]).filter(([key, value]) => key && value) +), mergeSerializedParams = (params, extraParams) => { + let pairs = parseSerializedParam(params), extra = parseSerializedParam(extraParams); + return Object.entries({ ...pairs, ...extra }).map(([key, value]) => `${key}:${value}`).join(";"); +}, LAYOUT_QUERY_PARAM_KEYS = ["full", "panel", "nav", "shortcuts", "addonPanel", "tabs", "path"], getCustomQueryParams = (location2) => omit(queryFromLocation2(location2), LAYOUT_QUERY_PARAM_KEYS), prevParams, initialUrlSupport = ({ + state: { location: location2, path, viewMode, storyId: storyIdFromUrl }, + singleStory +}) => { + let { full, panel, nav, shortcuts, addonPanel, tabs } = queryFromLocation2(location2), navSize, bottomPanelHeight, rightPanelWidth; + parseBoolean(full) === !0 ? (navSize = 0, bottomPanelHeight = 0, rightPanelWidth = 0) : parseBoolean(full) === !1 && (navSize = DEFAULT_NAV_SIZE, bottomPanelHeight = DEFAULT_BOTTOM_PANEL_HEIGHT, rightPanelWidth = DEFAULT_RIGHT_PANEL_WIDTH), singleStory || (parseBoolean(nav) === !0 && (navSize = DEFAULT_NAV_SIZE), parseBoolean(nav) === !1 && (navSize = 0)), parseBoolean(panel) === !1 && (bottomPanelHeight = 0, rightPanelWidth = 0); + let layout = { + navSize, + bottomPanelHeight, + rightPanelWidth, + panelPosition: ["right", "bottom"].includes(panel) ? panel : void 0, + showTabs: parseBoolean(tabs) + }, ui = { + enableShortcuts: parseBoolean(shortcuts) + }, selectedPanel = addonPanel || void 0, storyId = storyIdFromUrl, otherParams = getCustomQueryParams(location2), customQueryParams = dequal(prevParams, otherParams) ? prevParams : otherParams; + return prevParams = customQueryParams, { viewMode, layout, ui, selectedPanel, location: location2, path, customQueryParams, storyId }; +}, init12 = (moduleArgs) => { + let { store: store2, navigate, provider, fullAPI } = moduleArgs, navigateTo = (path, queryParams = {}, options = {}) => navigate(buildNavigationUrl(path, queryParams), options), api = { + getStoryHrefs(storyId, options = {}) { + let { id: currentStoryId, refId: currentRefId } = fullAPI.getCurrentStoryData() ?? {}, isCurrentStory = storyId === currentStoryId && options.refId === currentRefId, { customQueryParams, location: location2, refs } = store2.getState(), { + base, + inheritArgs = isCurrentStory, + inheritGlobals = !0, + queryParams = {}, + refId, + viewMode = "story", + embed = !1, + freeze = !1 + } = options; + if (refId && !refs[refId]) + throw new Error(`Invalid refId: ${refId}`); + let pathname = location2.pathname || "/", originAddress = global6.window.location.origin + pathname, networkAddress = global6.STORYBOOK_NETWORK_ADDRESS ?? originAddress, managerBase = base === "origin" ? originAddress : base === "network" ? networkAddress : pathname, previewBase = refId ? refs[refId].url + "/iframe.html" : global6.PREVIEW_URL || `${managerBase.replace(/\/[^/]*\.html$/, "").replace(/\/?$/, "/")}iframe.html`, refParam = refId ? `&refId=${encodeURIComponent(refId)}` : "", { args = "", globals = "", ...otherParams } = queryParams, argsParam = inheritArgs ? mergeSerializedParams(customQueryParams?.args ?? "", args) : args, globalsParam = inheritGlobals ? mergeSerializedParams(customQueryParams?.globals ?? "", globals) : globals, managerQueryParams = omit(otherParams, ["embed", "freeze"]), previewQueryParams = omit(otherParams, ["id", "viewMode", "embed", "freeze"]), customManagerParams = stringify(managerQueryParams, { + nesting: !0, + nestingSyntax: "js" + }), customPreviewParams = stringify(previewQueryParams, { + nesting: !0, + nestingSyntax: "js" + }); + argsParam = argsParam && `&args=${argsParam}`, globalsParam = globalsParam && `&globals=${globalsParam}`, customManagerParams = customManagerParams && `&${customManagerParams}`, customPreviewParams = customPreviewParams && `&${customPreviewParams}`; + let embedParam = embed ? "&embed=true" : "", freezeParam = freeze ? "&freeze=finished" : ""; + return { + managerHref: `${managerBase}?path=/${viewMode}/${refId ? `${refId}_` : ""}${storyId}${argsParam}${globalsParam}${customManagerParams}`, + previewHref: `${previewBase}?id=${storyId}&viewMode=${viewMode}${refParam}${argsParam}${refId ? "" : globalsParam}${customPreviewParams}${embedParam}${freezeParam}` + }; + }, + getQueryParam(key) { + let { customQueryParams } = store2.getState(); + return customQueryParams ? customQueryParams[key] : void 0; + }, + getUrlState() { + let { location: location2, path, customQueryParams, storyId, url, viewMode } = store2.getState(); + return { + path, + hash: location2?.hash ?? "", + queryParams: customQueryParams, + storyId, + url, + viewMode + }; + }, + setQueryParams(input) { + let { customQueryParams } = store2.getState(), update2 = { ...customQueryParams }; + for (let [key, value] of Object.entries(input)) + value == null ? delete update2[key] : update2[key] = value; + dequal(customQueryParams, update2) || (store2.setState({ customQueryParams: update2 }), provider.channel?.emit(UPDATE_QUERY_PARAMS, update2)); + }, + applyQueryParams(input, options) { + let { path, hash = "", queryParams } = api.getUrlState(); + navigateTo(`${path}${hash}`, { ...queryParams, ...input }, options), api.setQueryParams(input); + }, + navigateUrl(url, options) { + navigate(url, { plain: !0, ...options }); + } + }, updateArgsParam = () => { + let { path, hash = "", queryParams, viewMode } = api.getUrlState(); + if (viewMode !== "story") + return; + let currentStory = fullAPI.getCurrentStoryData(); + if (currentStory?.type !== "story") + return; + let { args, initialArgs } = currentStory, argsString = buildArgsParam(initialArgs, args); + navigateTo(`${path}${hash}`, { ...queryParams, args: argsString || null }, { replace: !0 }), api.setQueryParams({ args: argsString || null }); + }; + provider.channel?.on(SET_CURRENT_STORY2, () => updateArgsParam()); + let handleOrId; + return provider.channel?.on(STORY_ARGS_UPDATED2, () => { + "requestIdleCallback" in global6.window ? (handleOrId && global6.window.cancelIdleCallback(handleOrId), handleOrId = global6.window.requestIdleCallback(updateArgsParam, { timeout: 1e3 })) : (handleOrId && clearTimeout(handleOrId), setTimeout(updateArgsParam, 100)); + }), provider.channel?.on(GLOBALS_UPDATED2, ({ userGlobals, initialGlobals }) => { + let { path, hash = "", queryParams } = api.getUrlState(), globalsString = buildArgsParam(initialGlobals, merge_default(initialGlobals, userGlobals)); + navigateTo( + `${path}${hash}`, + { ...queryParams, globals: globalsString || null }, + { replace: !0 } + ), api.setQueryParams({ globals: globalsString || null }); + }), provider.channel?.on(NAVIGATE_URL, (url, options) => { + api.navigateUrl(url, options); + }), { + api, + state: initialUrlSupport(moduleArgs), + init: () => { + store2.registerPersistenceHandler("url", (_patch, serialize) => { + if (serialize) { + let params = serialize(store2.getState()); + api.applyQueryParams(params, { replace: !0 }); + } + }); + } + }; +}; + +// src/manager-api/modules/versions.ts +var versions_exports = {}; +__export(versions_exports, { + init: () => init13 +}); +var import_memoizerific3 = __toESM(require_memoizerific(), 1); +import { global as global7 } from "@storybook/global"; +import semver from "semver"; + +// src/manager-api/version.ts +var version = "10.5.6"; + +// src/manager-api/modules/versions.ts +var { VERSIONCHECK } = global7, getVersionCheckData = (0, import_memoizerific3.default)(1)(() => { + try { + return { ...JSON.parse(VERSIONCHECK).data || {} }; + } catch { + return {}; + } +}), normalizeRendererName = (renderer) => renderer.includes("vue") ? "vue" : renderer, init13 = ({ store: store2 }) => { + let { dismissedVersionNotification } = store2.getState(), state = { + versions: { + current: { + version + }, + ...getVersionCheckData() + }, + dismissedVersionNotification + }, api = { + getCurrentVersion: () => { + let { + versions: { current } + } = store2.getState(); + return current; + }, + getLatestVersion: () => { + let { + versions: { latest, next, current } + } = store2.getState(); + return current && semver.prerelease(current.version) && next ? latest && semver.gt(latest.version, next.version) ? latest : next : latest; + }, + // TODO: Move this to it's own "info" module later + getDocsUrl: ({ asset, subpath = asset, versioned, renderer, ref = "ui" }) => { + let { versions } = store2.getState(), latestVersion = versions.latest?.version, currentVersion = versions.current?.version, activeVersion = currentVersion?.startsWith("0.0.0") && latestVersion || currentVersion, url = `https://storybook.js.org/${asset ? "docs-assets" : "docs"}/`; + if (asset && activeVersion) + url += `${semver.major(activeVersion)}.${semver.minor(activeVersion)}/`; + else if (versioned && activeVersion && latestVersion) { + let versionDiff = semver.diff(latestVersion, activeVersion); + versionDiff === "patch" || versionDiff === null || (url += `${semver.major(activeVersion)}.${semver.minor(activeVersion)}/`); + } + let [cleanedSubpath, hash] = subpath?.split("#") || []; + if (cleanedSubpath && (url += asset ? cleanedSubpath : `${cleanedSubpath}/`), renderer && typeof global7.STORYBOOK_RENDERER < "u") { + let rendererName = global7.STORYBOOK_RENDERER; + rendererName && (url += `?renderer=${normalizeRendererName(rendererName)}`); + } + return ref && (url += `${url.includes("?") ? "&" : "?"}ref=${ref}`), hash && (url += `#${hash}`), url; + }, + versionUpdateAvailable: () => { + let latest = api.getLatestVersion(), current = api.getCurrentVersion(); + if (latest) { + if (!latest.version || !current.version) + return !0; + let actualCurrent = !!semver.prerelease(current.version) ? `${semver.major(current.version)}.${semver.minor(current.version)}.${semver.patch( + current.version + )}` : current.version, diff = semver.diff(actualCurrent, latest.version); + return semver.gt(latest.version, actualCurrent) && diff !== "patch" && !diff.includes("pre"); + } + return !1; + } + }; + return { init: async () => { + let { versions = {} } = store2.getState(), { latest, next } = getVersionCheckData(); + await store2.setState({ + versions: { ...versions, latest, next } + }); + }, state, api }; +}; + +// src/manager-api/modules/whatsnew.tsx +var whatsnew_exports = {}; +__export(whatsnew_exports, { + init: () => init14 +}); +import React3 from "react"; +import { + REQUEST_WHATS_NEW_DATA, + RESULT_WHATS_NEW_DATA, + SET_WHATS_NEW_CACHE, + TOGGLE_WHATS_NEW_NOTIFICATIONS +} from "storybook/internal/core-events"; +import { global as global8 } from "@storybook/global"; +var WHATS_NEW_NOTIFICATION_ID = "whats-new", StorybookIcon = ({ color = "currentColor", size = 14 }) => React3.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, + React3.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2.042.616a.704.704 0 00-.66.729L1.816 12.9c.014.367.306.66.672.677l9.395.422h.032a.704.704 0 00.704-.703V.704c0-.015 0-.03-.002-.044a.704.704 0 00-.746-.659l-.773.049.057 1.615a.105.105 0 01-.17.086l-.52-.41-.617.468a.105.105 0 01-.168-.088L9.746.134 2.042.616zm8.003 4.747c-.247.192-2.092.324-2.092.05.04-1.045-.429-1.091-.689-1.091-.247 0-.662.075-.662.634 0 .57.607.893 1.32 1.27 1.014.538 2.24 1.188 2.24 2.823 0 1.568-1.273 2.433-2.898 2.433-1.676 0-3.141-.678-2.976-3.03.065-.275 2.197-.21 2.197 0-.026.971.195 1.256.753 1.256.43 0 .624-.236.624-.634 0-.602-.633-.958-1.361-1.367-.987-.554-2.148-1.205-2.148-2.7 0-1.494 1.027-2.489 2.86-2.489 1.832 0 2.832.98 2.832 2.845z", + fill: color + } + ) +), init14 = ({ fullAPI, store: store2, provider }) => { + let state = { + whatsNewData: void 0 + }; + function setWhatsNewState(newState) { + store2.setState({ whatsNewData: newState }), state.whatsNewData = newState; + } + let api = { + isWhatsNewUnread() { + return state.whatsNewData?.status === "SUCCESS" && !state.whatsNewData.postIsRead; + }, + whatsNewHasBeenRead() { + state.whatsNewData?.status === "SUCCESS" && (setWhatsNewCache({ lastReadPost: state.whatsNewData.url }), setWhatsNewState({ ...state.whatsNewData, postIsRead: !0 }), fullAPI.clearNotification(WHATS_NEW_NOTIFICATION_ID)); + }, + toggleWhatsNewNotifications() { + state.whatsNewData?.status === "SUCCESS" && (setWhatsNewState({ + ...state.whatsNewData, + disableWhatsNewNotifications: !state.whatsNewData.disableWhatsNewNotifications + }), provider.channel?.emit(TOGGLE_WHATS_NEW_NOTIFICATIONS, { + disableWhatsNewNotifications: state.whatsNewData.disableWhatsNewNotifications + })); + } + }; + function getLatestWhatsNewPost() { + return provider.channel?.emit(REQUEST_WHATS_NEW_DATA), new Promise( + (resolve) => provider.channel?.once( + RESULT_WHATS_NEW_DATA, + ({ data }) => resolve(data) + ) + ); + } + function setWhatsNewCache(cache) { + provider.channel?.emit(SET_WHATS_NEW_CACHE, cache); + } + return { init: async () => { + if (global8.CONFIG_TYPE !== "DEVELOPMENT") + return; + let whatsNewData = await getLatestWhatsNewPost(); + setWhatsNewState(whatsNewData); + let urlState = fullAPI.getUrlState(), isOnboardingView = urlState?.path === "/onboarding" || urlState.queryParams?.onboarding === "true", isReviewView = urlState?.path === "/review/" || urlState?.path === "/review" || urlState?.path?.startsWith("/review/"); + !isOnboardingView && !isReviewView && whatsNewData.status === "SUCCESS" && !whatsNewData.disableWhatsNewNotifications && whatsNewData.showNotification && fullAPI.addNotification({ + id: WHATS_NEW_NOTIFICATION_ID, + link: "/settings/whats-new", + content: { + headline: whatsNewData.title, + subHeadline: "Learn what's new in Storybook" + }, + icon: React3.createElement(StorybookIcon, null), + onClear({ dismissed }) { + dismissed && setWhatsNewCache({ lastDismissedPost: whatsNewData.url }); + } + }); + }, state, api }; +}; + +// src/manager-api/store.ts +var import_store2 = __toESM(require_store2(), 1); + +// src/manager-api/lib/store-setup.ts +var store_setup_default = (_) => { + _.fn("set", function(key, data) { + return _.set( + // @ts-expect-error('this' implicitly has type 'any') + this._area, + // @ts-expect-error('this' implicitly has type 'any') + this._in(key), + stringify2(data, { maxDepth: 50 }) + ); + }), _.fn("get", function(key, alt) { + let value = _.get(this._area, this._in(key)); + return value !== null ? parse(value) : alt || value; + }); +}; + +// src/manager-api/store.ts +store_setup_default(import_store2.default._); +var STORAGE_KEY = "@storybook/manager/store"; +function get(storage) { + return storage.get(STORAGE_KEY) || {}; +} +function set(storage, value) { + return storage.set(STORAGE_KEY, value); +} +function update(storage, patch) { + let previous = get(storage); + return set(storage, { ...previous, ...patch }); +} +var Store = class { + constructor({ allowPersistence, setState, getState }) { + this.persistenceHandlers = /* @__PURE__ */ new Map(); + this.upstreamPersistence = allowPersistence ?? !0, this.upstreamSetState = setState, this.upstreamGetState = getState; + } + registerPersistenceHandler(key, handler) { + this.persistenceHandlers.set(key, handler); + } + // The assumption is that this will be called once, to initialize the React state + // when the module is instantiated + getInitialState(base) { + for (let storage of [import_store2.default.local, import_store2.default.session]) { + let persisted = get(storage); + if ("includedTagFilters" in persisted || "excludedTagFilters" in persisted) { + let { includedTagFilters: _i, excludedTagFilters: _e, ...rest } = persisted; + set(storage, rest); + } + } + let local = get(import_store2.default.local), session = get(import_store2.default.session); + return { ...base, ...local, ...session }; + } + getState() { + return this.upstreamGetState(); + } + async setState(inputPatch, cbOrOptions, inputOptions) { + let callback, options; + typeof cbOrOptions == "function" ? (callback = cbOrOptions, options = inputOptions) : options = cbOrOptions; + let { persistence = "none" } = options || {}, patch = {}, delta = {}; + typeof inputPatch == "function" ? patch = (state) => (delta = inputPatch(state), delta) : (patch = inputPatch, delta = patch); + let newState = await new Promise((resolve) => { + this.upstreamSetState(patch, () => { + resolve(this.getState()); + }); + }); + if (persistence !== "none" && this.upstreamPersistence) + if (persistence === "url") { + let handler = this.persistenceHandlers.get("url"); + handler && await handler(delta, options?.serialize); + } else { + let storage = persistence === "session" ? import_store2.default.session : import_store2.default.local; + await update(storage, delta); + } + return callback && callback(newState), newState; + } +}; + +// src/manager-api/lib/request-response.ts +var RequestResponseError = class extends Error { + constructor(message, payload) { + super(message); + this.payload = void 0; + this.payload = payload; + } +}, experimental_requestResponse = (channel, requestEvent, responseEvent, payload, timeout = 5e3) => { + let timeoutId; + return new Promise((resolve, reject) => { + let request = { + id: Math.random().toString(16).slice(2), + payload + }, responseHandler = (response) => { + response.id === request.id && (clearTimeout(timeoutId), channel.off(responseEvent, responseHandler), response.success ? resolve(response.payload) : reject(new RequestResponseError(response.error, response.payload))); + }; + channel.emit(requestEvent, request), channel.on(responseEvent, responseHandler), timeoutId = setTimeout(() => { + channel.off(responseEvent, responseHandler), reject(new RequestResponseError("Timed out waiting for response")); + }, timeout); + }); +}; + +// src/manager-api/root.tsx +var { ActiveTabs: ActiveTabs2 } = layout_exports; +var ManagerContext = createContext({ api: void 0, state: initial_state_default({}) }), combineParameters = (...parameterSets) => noArrayMerge({}, ...parameterSets), ManagerProvider = class extends Component { + constructor(props) { + super(props); + this.api = {}; + // Addon register callbacks run in the constructor (before mount) so manager-side listeners exist + // before the preview iframe emits its first events. React's this.setState is a no-op before mount, + // so store writes during registration are applied directly to this.state until this flips true. + this.mounted = !1; + this.initModules = () => { + this.modules.forEach((module) => { + "init" in module && module.init(); + }); + }; + let { + location: location2, + path, + refId, + viewMode = props.docsOptions.docsMode ? "docs" : props.viewMode, + singleStory, + storyId, + docsOptions, + navigate + } = props, store2 = new Store({ + getState: () => this.state, + setState: (stateChange, callback) => { + if (!this.mounted) { + let patch = typeof stateChange == "function" ? stateChange(this.state) : stateChange; + return this.state = { ...this.state, ...patch }, callback?.(this.state), this.state; + } + return this.setState(stateChange, () => callback(this.state)), this.state; + } + }), routeData = { location: location2, path, viewMode, singleStory, storyId, refId }, optionsData = { docsOptions }; + this.state = store2.getInitialState(initial_state_default({ ...routeData, ...optionsData })); + let apiData = { + navigate, + store: store2, + provider: props.provider + }; + this.modules = [ + provider_exports, + channel_exports, + addons_exports, + layout_exports, + notifications_exports, + settings_exports, + shortcuts_exports, + stories_exports, + refs_exports, + globals_exports, + url_exports, + versions_exports, + whatsnew_exports, + open_in_editor_exports + ].map( + (m) => m.init({ ...routeData, ...optionsData, ...apiData, state: this.state, fullAPI: this.api }) + ); + let state = initial_state_default(this.state, ...this.modules.map((m) => m.state)), api = Object.assign(this.api, { navigate }, ...this.modules.map((m) => m.api)); + this.state = state, this.api = api, props.provider.handleAPI(this.api); + } + componentDidMount() { + this.mounted = !0; + } + static getDerivedStateFromProps(props, state) { + let locationSearchChanged = state.location?.search !== props.location?.search; + return state.path !== props.path || locationSearchChanged ? { + ...state, + location: props.location, + path: props.path, + refId: props.refId, + viewMode: props.viewMode, + storyId: props.storyId, + customQueryParams: getCustomQueryParams(props.location) + } : null; + } + shouldComponentUpdate(nextProps, nextState) { + let prevProps = this.props, prevState = this.state; + return prevProps.path !== nextProps.path || !isEqual(prevState, nextState); + } + render() { + let { children } = this.props, value = { + state: this.state, + api: this.api + }; + return React4.createElement(EffectOnMount, { effect: this.initModules }, React4.createElement(ManagerContext.Provider, { value }, React4.createElement(ManagerConsumer, null, children))); + } +}; +ManagerProvider.displayName = "Manager"; +var EffectOnMount = ({ children, effect }) => (React4.useEffect(effect, []), children), defaultFilter = (c) => c; +function ManagerConsumer({ + // @ts-expect-error (Converted from ts-ignore) + filter = defaultFilter, + children +}) { + let managerContext = useContext(ManagerContext), renderer = useRef2(children), filterer = useRef2(filter); + if (typeof renderer.current != "function") + return React4.createElement(Fragment, null, renderer.current); + let comboData = filterer.current(managerContext), comboDataArray = useMemo(() => [...Object.entries(comboData).reduce((acc, keyval) => acc.concat(keyval), [])], [managerContext.state]); + return useMemo(() => { + let Child = renderer.current; + return React4.createElement(Child, { ...comboData }); + }, comboDataArray); +} +function useStorybookState() { + let { state } = useContext(ManagerContext); + return state; +} +function useStorybookApi() { + let { api } = useContext(ManagerContext); + return api; +} +function orDefault(fromStore, defaultState) { + return typeof fromStore > "u" ? defaultState : fromStore; +} +var useChannel = (eventMap, deps = []) => { + let api = useStorybookApi(); + return useEffect(() => (Object.entries(eventMap).forEach(([type, listener]) => api.on(type, listener)), () => { + Object.entries(eventMap).forEach(([type, listener]) => api.off(type, listener)); + }), deps), api.emit; +}; +function useStoryPrepared(storyId) { + return useStorybookApi().isPrepared(storyId); +} +function useParameter(parameterKey, defaultValue) { + let api = useStorybookApi(), [parameter, setParameter] = useState(api.getCurrentParameter(parameterKey)), handleParameterChange = useCallback2(() => { + let newParameter = api.getCurrentParameter(parameterKey); + setParameter(newParameter); + }, [api, parameterKey]); + return useChannel( + { + [STORY_PREPARED2]: handleParameterChange, + [DOCS_PREPARED2]: handleParameterChange + }, + [handleParameterChange] + ), orDefault(parameter, defaultValue); +} +globalThis.STORYBOOK_ADDON_STATE = {}; +var { STORYBOOK_ADDON_STATE } = globalThis; +function useSharedState(stateId, defaultState) { + let api = useStorybookApi(), existingState = api.getAddonState(stateId) || STORYBOOK_ADDON_STATE[stateId], state = orDefault( + existingState, + STORYBOOK_ADDON_STATE[stateId] ? STORYBOOK_ADDON_STATE[stateId] : defaultState + ), quicksync = !1; + state === defaultState && defaultState !== void 0 && (STORYBOOK_ADDON_STATE[stateId] = defaultState, quicksync = !0), useEffect(() => { + quicksync && api.setAddonState(stateId, defaultState); + }, [quicksync]); + let setState = useCallback2( + async (s, options) => { + await api.setAddonState(stateId, s, options); + let result = api.getAddonState(stateId); + return STORYBOOK_ADDON_STATE[stateId] = result, result; + }, + [api, stateId] + ), allListeners = useMemo(() => { + let stateChangeHandlers = { + [`${SHARED_STATE_CHANGED}-client-${stateId}`]: setState, + [`${SHARED_STATE_SET}-client-${stateId}`]: setState + }, stateInitializationHandlers = { + [SET_STORIES2]: async () => { + let currentState = api.getAddonState(stateId); + currentState ? (STORYBOOK_ADDON_STATE[stateId] = currentState, api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, currentState)) : STORYBOOK_ADDON_STATE[stateId] ? (await setState(STORYBOOK_ADDON_STATE[stateId]), api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, STORYBOOK_ADDON_STATE[stateId])) : defaultState !== void 0 && (await setState(defaultState), STORYBOOK_ADDON_STATE[stateId] = defaultState, api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, defaultState)); + }, + [STORY_CHANGED2]: () => { + let currentState = api.getAddonState(stateId); + currentState !== void 0 && api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, currentState); + } + }; + return { + ...stateChangeHandlers, + ...stateInitializationHandlers + }; + }, [stateId]), emit = useChannel(allListeners), stateSetter = useCallback2( + async (newStateOrMerger, options) => { + await setState(newStateOrMerger, options); + let result = api.getAddonState(stateId); + emit(`${SHARED_STATE_CHANGED}-manager-${stateId}`, result); + }, + [api, emit, setState, stateId] + ); + return [state, stateSetter]; +} +function useAddonState(addonId, defaultState) { + return useSharedState(addonId, defaultState); +} +function useArgs() { + let { getCurrentStoryData, updateStoryArgs, resetStoryArgs } = useStorybookApi(), data = getCurrentStoryData(), args = data?.type === "story" ? data.args : {}, initialArgs = data?.type === "story" ? data.initialArgs : {}, updateArgs = useCallback2( + (newArgs) => updateStoryArgs(data, newArgs), + [data, updateStoryArgs] + ), resetArgs = useCallback2( + (argNames) => resetStoryArgs(data, argNames), + [data, resetStoryArgs] + ); + return [args, updateArgs, resetArgs, initialArgs]; +} +function useGlobals() { + let api = useStorybookApi(); + return [api.getGlobals(), api.updateGlobals, api.getStoryGlobals(), api.getUserGlobals()]; +} +function useGlobalTypes() { + return useStorybookApi().getGlobalTypes(); +} +function useCurrentStory() { + let { getCurrentStoryData } = useStorybookApi(); + return getCurrentStoryData(); +} +function useArgTypes() { + let current = useCurrentStory(); + return current?.type === "story" && current.argTypes || {}; +} +var typesX = Addon_TypesEnum; + +// src/shared/universal-store/mock.ts +import { Channel } from "storybook/internal/channels"; +var MockUniversalStore = class _MockUniversalStore extends UniversalStore { + constructor(options, testUtils) { + UniversalStore.isInternalConstructing = !0, super( + { ...options, leader: !0 }, + { channel: new Channel({}), environment: UniversalStore.Environment.MOCK } + ), UniversalStore.isInternalConstructing = !1, typeof testUtils?.fn == "function" && (this.testUtils = testUtils, this.getState = testUtils.fn(this.getState), this.setState = testUtils.fn(this.setState), this.subscribe = testUtils.fn(this.subscribe), this.onStateChange = testUtils.fn(this.onStateChange), this.send = testUtils.fn(this.send)); + } + /** Create a mock universal store. This is just an alias for the constructor */ + static create(options, testUtils) { + return new _MockUniversalStore(options, testUtils); + } + unsubscribeAll() { + if (!this.testUtils) + throw new Error( + dedent`Cannot call unsubscribeAll on a store that does not have testUtils. + Please provide testUtils as the second argument when creating the store.` + ); + let callReturnedUnsubscribeFn = (result) => { + try { + result.value(); + } catch { + } + }; + this.subscribe.mock?.results.forEach(callReturnedUnsubscribeFn), this.onStateChange.mock?.results.forEach(callReturnedUnsubscribeFn); + } +}; + +// src/shared/test-provider-store/index.ts +var UNIVERSAL_TEST_PROVIDER_STORE_OPTIONS = { + id: "storybook/test-provider", + leader: !0, + initialState: {} +}; +function createTestProviderStore({ + universalTestProviderStore: universalTestProviderStore2, + useUniversalStore: useUniversalStore2 +}) { + let baseStore = { + settingsChanged: () => { + universalTestProviderStore2.untilReady().then(() => { + universalTestProviderStore2.send({ type: "settings-changed" }); + }); + }, + onRunAll: (listener) => universalTestProviderStore2.subscribe("run-all", listener), + onClearAll: (listener) => universalTestProviderStore2.subscribe("clear-all", listener) + }, fullTestProviderStore2 = { + ...baseStore, + getFullState: universalTestProviderStore2.getState, + setFullState: universalTestProviderStore2.setState, + onSettingsChanged: (listener) => universalTestProviderStore2.subscribe("settings-changed", listener), + runAll: async () => { + await universalTestProviderStore2.untilReady(), universalTestProviderStore2.send({ type: "run-all" }); + }, + clearAll: async () => { + await universalTestProviderStore2.untilReady(), universalTestProviderStore2.send({ type: "clear-all" }); + } + }, getTestProviderStoreById2 = (testProviderId) => { + let getStateForTestProvider = () => universalTestProviderStore2.getState()[testProviderId] ?? "test-provider-state:pending", setStateForTestProvider = (state) => { + universalTestProviderStore2.untilReady().then(() => { + universalTestProviderStore2.setState((currentState) => ({ + ...currentState, + [testProviderId]: state + })); + }); + }; + return { + ...baseStore, + testProviderId, + getState: getStateForTestProvider, + setState: setStateForTestProvider, + runWithState: async (callback) => { + setStateForTestProvider("test-provider-state:running"); + try { + await callback(), setStateForTestProvider("test-provider-state:succeeded"); + } catch { + setStateForTestProvider("test-provider-state:crashed"); + } + } + }; + }; + return useUniversalStore2 ? { + getTestProviderStoreById: getTestProviderStoreById2, + fullTestProviderStore: fullTestProviderStore2, + universalTestProviderStore: universalTestProviderStore2, + useTestProviderStore: (selector) => useUniversalStore2(universalTestProviderStore2, selector)[0] + } : { + getTestProviderStoreById: getTestProviderStoreById2, + fullTestProviderStore: fullTestProviderStore2, + universalTestProviderStore: universalTestProviderStore2 + }; +} + +// src/manager-api/stores/test-provider.ts +var testProviderStore = createTestProviderStore({ + universalTestProviderStore: UniversalStore.create({ + ...UNIVERSAL_TEST_PROVIDER_STORE_OPTIONS, + leader: globalThis.CONFIG_TYPE === "PRODUCTION" + }), + useUniversalStore +}), { + fullTestProviderStore, + getTestProviderStoreById, + useTestProviderStore, + universalTestProviderStore +} = testProviderStore; + +// src/shared/checklist-store/checklistData.state.ts +var initialState = { + items: { + accessibilityTests: { status: "open" }, + aiSetup: { status: "open" }, + autodocs: { status: "open" }, + ciTests: { status: "open" }, + controls: { status: "open" }, + coverage: { status: "open" }, + guidedTour: { status: "open" }, + installA11y: { status: "open" }, + installChromatic: { status: "open" }, + installDocs: { status: "open" }, + installVitest: { status: "open" }, + mdxDocs: { status: "open" }, + moreComponents: { status: "open" }, + moreStories: { status: "open" }, + onboardingSurvey: { status: "open" }, + organizeStories: { status: "open" }, + renderComponent: { status: "open" }, + runTests: { status: "open" }, + publishStorybook: { status: "open" }, + shareStorybook: { status: "open" }, + viewports: { status: "open" }, + visualTests: { status: "open" }, + whatsNewStorybook10: { status: "open" }, + writeInteractions: { status: "open" } + }, + widget: {} +}; + +// src/shared/checklist-store/index.ts +var UNIVERSAL_CHECKLIST_STORE_OPTIONS = { + id: "storybook/checklist", + initialState +}, createChecklistStore = (universalChecklistStore2) => ({ + getValue: (id) => universalChecklistStore2.getState().items[id] ?? { status: "open", mutedAt: void 0 }, + accept: (id) => { + universalChecklistStore2.setState((state) => ({ + ...state, + items: { ...state.items, [id]: { ...state.items[id], status: "accepted" } } + })); + }, + done: (id) => { + universalChecklistStore2.setState((state) => ({ + ...state, + items: { ...state.items, [id]: { ...state.items[id], status: "done" } } + })); + }, + skip: (id) => { + universalChecklistStore2.setState((state) => ({ + ...state, + items: { ...state.items, [id]: { ...state.items[id], status: "skipped" } } + })); + }, + reset: (id) => { + universalChecklistStore2.setState((state) => ({ + ...state, + items: { ...state.items, [id]: { ...state.items[id], status: "open" } } + })); + }, + mute: (itemIds) => { + universalChecklistStore2.setState((state) => ({ + ...state, + items: itemIds.reduce( + (acc, id) => ({ ...acc, [id]: { ...state.items[id], mutedAt: Date.now() } }), + state.items + ) + })); + }, + disable: (value) => { + universalChecklistStore2.setState((state) => ({ + ...state, + widget: { ...state.widget, disable: value }, + items: Object.entries(state.items).reduce( + (acc, [id, value2]) => ({ ...acc, [id]: { ...value2, mutedAt: void 0 } }), + state.items + ) + })); + } +}); + +// src/manager-api/stores/checklist.ts +var universalChecklistStore = UniversalStore.create({ + ...UNIVERSAL_CHECKLIST_STORE_OPTIONS, + leader: globalThis.CONFIG_TYPE === "PRODUCTION" +}), checklistStore = createChecklistStore(universalChecklistStore); +export { + ActiveTabs2 as ActiveTabs, + ManagerConsumer as Consumer, + ManagerContext, + ManagerProvider as Provider, + RequestResponseError, + Tag, + addons, + combineParameters, + controlOrMetaKey, + controlOrMetaSymbol, + eventMatchesShortcut, + eventToShortcut, + MockUniversalStore as experimental_MockUniversalStore, + UniversalStore as experimental_UniversalStore, + getStatusStoreByTypeId as experimental_getStatusStore, + getTestProviderStoreById as experimental_getTestProviderStore, + experimental_requestResponse, + useStatusStore as experimental_useStatusStore, + useTestProviderStore as experimental_useTestProviderStore, + useUniversalStore as experimental_useUniversalStore, + getService, + checklistStore as internal_checklistStore, + fullStatusStore as internal_fullStatusStore, + fullTestProviderStore as internal_fullTestProviderStore, + universalChecklistStore as internal_universalChecklistStore, + universalStatusStore as internal_universalStatusStore, + universalTestProviderStore as internal_universalTestProviderStore, + isMacLike, + isShortcutTaken, + keyToSymbol, + merge_default as merge, + mockChannel, + optionOrAltSymbol, + registerService, + shortcutMatchesShortcut, + shortcutToAriaKeyshortcuts, + shortcutToHumanString, + typesX as types, + useAddonState, + useArgTypes, + useArgs, + useChannel, + useGlobalTypes, + useGlobals, + useParameter, + useServiceCommand, + useServiceQuery, + useSharedState, + useStoryPrepared, + useStorybookApi, + useStorybookState +}; diff --git a/tools/ui/node_modules/storybook/dist/manager-errors.d.ts b/tools/ui/node_modules/storybook/dist/manager-errors.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0c8e4ce48b4e80f029d566ac626406f20e7034ec --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/manager-errors.d.ts @@ -0,0 +1,689 @@ +import { StoryId } from 'storybook/internal/csf'; +import { NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn } from 'storybook/internal/types'; + +/** + * Actions represent the type of change to a location value. + */ +declare enum Action { + /** + * A POP indicates a change to an arbitrary index in the history stack, such + * as a back or forward navigation. It does not describe the direction of the + * navigation, only that the current index changed. + * + * Note: This is the default action for newly created history objects. + */ + Pop = "POP", + /** + * A PUSH indicates a new entry being added to the history stack, such as when + * a link is clicked and a new page loads. When this happens, all subsequent + * entries in the stack are lost. + */ + Push = "PUSH", + /** + * A REPLACE indicates the entry at the current index in the history stack + * being replaced by a new one. + */ + Replace = "REPLACE" +} +/** + * The pathname, search, and hash values of a URL. + */ +interface Path { + /** + * A URL pathname, beginning with a /. + */ + pathname: string; + /** + * A URL search string, beginning with a ?. + */ + search: string; + /** + * A URL fragment identifier, beginning with a #. + */ + hash: string; +} +/** + * An entry in a history stack. A location contains information about the + * URL path, as well as possibly some arbitrary state and a key. + */ +interface Location extends Path { + /** + * A value of arbitrary data associated with this location. + */ + state: any; + /** + * A unique string associated with this location. May be used to safely store + * and retrieve data in some other storage API, like `localStorage`. + * + * Note: This value is always "default" on the initial location. + */ + key: string; +} + +/** + * Map of routeId -> data returned from a loader/action/error + */ +interface RouteData { + [routeId: string]: any; +} +declare enum ResultType { + data = "data", + deferred = "deferred", + redirect = "redirect", + error = "error" +} +/** + * Successful result from a loader or action + */ +interface SuccessResult { + type: ResultType.data; + data: any; + statusCode?: number; + headers?: Headers; +} +/** + * Successful defer() result from a loader or action + */ +interface DeferredResult { + type: ResultType.deferred; + deferredData: DeferredData; + statusCode?: number; + headers?: Headers; +} +/** + * Redirect result from a loader or action + */ +interface RedirectResult { + type: ResultType.redirect; + status: number; + location: string; + revalidate: boolean; + reloadDocument?: boolean; +} +/** + * Unsuccessful result from a loader or action + */ +interface ErrorResult { + type: ResultType.error; + error: any; + headers?: Headers; +} +/** + * Result from a loader or action - potentially successful or unsuccessful + */ +type DataResult = SuccessResult | DeferredResult | RedirectResult | ErrorResult; +type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete"; +type UpperCaseFormMethod = Uppercase; +/** + * Active navigation/fetcher form methods are exposed in lowercase on the + * RouterState + */ +type FormMethod = LowerCaseFormMethod; +/** + * In v7, active navigation/fetcher form methods are exposed in uppercase on the + * RouterState. This is to align with the normalization done via fetch(). + */ +type V7_FormMethod = UpperCaseFormMethod; +type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain"; +type JsonObject = { + [Key in string]: JsonValue; +} & { + [Key in string]?: JsonValue | undefined; +}; +type JsonArray = JsonValue[] | readonly JsonValue[]; +type JsonPrimitive = string | number | boolean | null; +type JsonValue = JsonPrimitive | JsonObject | JsonArray; +/** + * @private + * Internal interface to pass around for action submissions, not intended for + * external consumption + */ +type Submission = { + formMethod: FormMethod | V7_FormMethod; + formAction: string; + formEncType: FormEncType; + formData: FormData; + json: undefined; + text: undefined; +} | { + formMethod: FormMethod | V7_FormMethod; + formAction: string; + formEncType: FormEncType; + formData: undefined; + json: JsonValue; + text: undefined; +} | { + formMethod: FormMethod | V7_FormMethod; + formAction: string; + formEncType: FormEncType; + formData: undefined; + json: undefined; + text: string; +}; +/** + * @private + * Arguments passed to route loader/action functions. Same for now but we keep + * this as a private implementation detail in case they diverge in the future. + */ +interface DataFunctionArgs { + request: Request; + params: Params; + context?: any; +} +/** + * Arguments passed to loader functions + */ +interface LoaderFunctionArgs extends DataFunctionArgs { +} +/** + * Arguments passed to action functions + */ +interface ActionFunctionArgs extends DataFunctionArgs { +} +/** + * Loaders and actions can return anything except `undefined` (`null` is a + * valid return value if there is no data to return). Responses are preferred + * and will ease any future migration to Remix + */ +type DataFunctionValue = Response | NonNullable | null; +/** + * Route loader function signature + */ +interface LoaderFunction { + (args: LoaderFunctionArgs): Promise | DataFunctionValue; +} +/** + * Route action function signature + */ +interface ActionFunction { + (args: ActionFunctionArgs): Promise | DataFunctionValue; +} +/** + * Route shouldRevalidate function signature. This runs after any submission + * (navigation or fetcher), so we flatten the navigation/fetcher submission + * onto the arguments. It shouldn't matter whether it came from a navigation + * or a fetcher, what really matters is the URLs and the formData since loaders + * have to re-run based on the data models that were potentially mutated. + */ +interface ShouldRevalidateFunction { + (args: { + currentUrl: URL; + currentParams: AgnosticDataRouteMatch["params"]; + nextUrl: URL; + nextParams: AgnosticDataRouteMatch["params"]; + formMethod?: Submission["formMethod"]; + formAction?: Submission["formAction"]; + formEncType?: Submission["formEncType"]; + text?: Submission["text"]; + formData?: Submission["formData"]; + json?: Submission["json"]; + actionResult?: DataResult; + defaultShouldRevalidate: boolean; + }): boolean; +} +/** + * Keys we cannot change from within a lazy() function. We spread all other keys + * onto the route. Either they're meaningful to the router, or they'll get + * ignored. + */ +type ImmutableRouteKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "children"; +type RequireOne = Exclude<{ + [K in keyof T]: K extends Key ? Omit & Required> : never; +}[keyof T], undefined>; +/** + * lazy() function to load a route definition, which can add non-matching + * related properties to a route + */ +interface LazyRouteFunction { + (): Promise>>; +} +/** + * Base RouteObject with common props shared by all types of routes + */ +type AgnosticBaseRouteObject = { + caseSensitive?: boolean; + path?: string; + id?: string; + loader?: LoaderFunction; + action?: ActionFunction; + hasErrorBoundary?: boolean; + shouldRevalidate?: ShouldRevalidateFunction; + handle?: any; + lazy?: LazyRouteFunction; +}; +/** + * Index routes must not have children + */ +type AgnosticIndexRouteObject = AgnosticBaseRouteObject & { + children?: undefined; + index: true; +}; +/** + * Non-index routes may have children, but cannot have index + */ +type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & { + children?: AgnosticRouteObject[]; + index?: false; +}; +/** + * A route object represents a logical route, with (optionally) its child + * routes organized in a tree-like structure. + */ +type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject; +type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & { + id: string; +}; +type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & { + children?: AgnosticDataRouteObject[]; + id: string; +}; +/** + * A data route object, which is just a RouteObject with a required unique ID + */ +type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject; +/** + * The parameters that were parsed from the URL path. + */ +type Params = { + readonly [key in Key]: string | undefined; +}; +/** + * A RouteMatch contains info about how a route matched a URL. + */ +interface AgnosticRouteMatch { + /** + * The names and values of dynamic parameters in the URL. + */ + params: Params; + /** + * The portion of the URL pathname that was matched. + */ + pathname: string; + /** + * The portion of the URL pathname that was matched before child routes. + */ + pathnameBase: string; + /** + * The route object that was used to match. + */ + route: RouteObjectType; +} +interface AgnosticDataRouteMatch extends AgnosticRouteMatch { +} +declare class DeferredData { + private pendingKeysSet; + private controller; + private abortPromise; + private unlistenAbortSignal; + private subscribers; + data: Record; + init?: ResponseInit; + deferredKeys: string[]; + constructor(data: Record, responseInit?: ResponseInit); + private trackPromise; + private onSettle; + private emit; + subscribe(fn: (aborted: boolean, settledKey?: string) => void): () => boolean; + cancel(): void; + resolveData(signal: AbortSignal): Promise; + get done(): boolean; + get unwrappedData(): {}; + get pendingKeys(): string[]; +} + +/** + * State maintained internally by the router. During a navigation, all states + * reflect the the "old" location unless otherwise noted. + */ +interface RouterState { + /** + * The action of the most recent navigation + */ + historyAction: Action; + /** + * The current location reflected by the router + */ + location: Location; + /** + * The current set of route matches + */ + matches: AgnosticDataRouteMatch[]; + /** + * Tracks whether we've completed our initial data load + */ + initialized: boolean; + /** + * Current scroll position we should start at for a new view + * - number -> scroll position to restore to + * - false -> do not restore scroll at all (used during submissions) + * - null -> don't have a saved position, scroll to hash or top of page + */ + restoreScrollPosition: number | false | null; + /** + * Indicate whether this navigation should skip resetting the scroll position + * if we are unable to restore the scroll position + */ + preventScrollReset: boolean; + /** + * Tracks the state of the current navigation + */ + navigation: Navigation; + /** + * Tracks any in-progress revalidations + */ + revalidation: RevalidationState; + /** + * Data from the loaders for the current matches + */ + loaderData: RouteData; + /** + * Data from the action for the current matches + */ + actionData: RouteData | null; + /** + * Errors caught from loaders for the current matches + */ + errors: RouteData | null; + /** + * Map of current fetchers + */ + fetchers: Map; + /** + * Map of current blockers + */ + blockers: Map; +} +/** + * Data that can be passed into hydrate a Router from SSR + */ +type HydrationState = Partial>; +/** + * Potential states for state.navigation + */ +type NavigationStates = { + Idle: { + state: "idle"; + location: undefined; + formMethod: undefined; + formAction: undefined; + formEncType: undefined; + formData: undefined; + json: undefined; + text: undefined; + }; + Loading: { + state: "loading"; + location: Location; + formMethod: Submission["formMethod"] | undefined; + formAction: Submission["formAction"] | undefined; + formEncType: Submission["formEncType"] | undefined; + formData: Submission["formData"] | undefined; + json: Submission["json"] | undefined; + text: Submission["text"] | undefined; + }; + Submitting: { + state: "submitting"; + location: Location; + formMethod: Submission["formMethod"]; + formAction: Submission["formAction"]; + formEncType: Submission["formEncType"]; + formData: Submission["formData"]; + json: Submission["json"]; + text: Submission["text"]; + }; +}; +type Navigation = NavigationStates[keyof NavigationStates]; +type RevalidationState = "idle" | "loading"; +/** + * Potential states for fetchers + */ +type FetcherStates = { + Idle: { + state: "idle"; + formMethod: undefined; + formAction: undefined; + formEncType: undefined; + text: undefined; + formData: undefined; + json: undefined; + data: TData | undefined; + " _hasFetcherDoneAnything "?: boolean; + }; + Loading: { + state: "loading"; + formMethod: Submission["formMethod"] | undefined; + formAction: Submission["formAction"] | undefined; + formEncType: Submission["formEncType"] | undefined; + text: Submission["text"] | undefined; + formData: Submission["formData"] | undefined; + json: Submission["json"] | undefined; + data: TData | undefined; + " _hasFetcherDoneAnything "?: boolean; + }; + Submitting: { + state: "submitting"; + formMethod: Submission["formMethod"]; + formAction: Submission["formAction"]; + formEncType: Submission["formEncType"]; + text: Submission["text"]; + formData: Submission["formData"]; + json: Submission["json"]; + data: TData | undefined; + " _hasFetcherDoneAnything "?: boolean; + }; +}; +type Fetcher = FetcherStates[keyof FetcherStates]; +interface BlockerBlocked { + state: "blocked"; + reset(): void; + proceed(): void; + location: Location; +} +interface BlockerUnblocked { + state: "unblocked"; + reset: undefined; + proceed: undefined; + location: undefined; +} +interface BlockerProceeding { + state: "proceeding"; + reset: undefined; + proceed: undefined; + location: Location; +} +type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding; + +/** + * NOTE: If you refactor this to split up the modules into separate files, + * you'll need to update the rollup config for react-router-dom-v5-compat. + */ + +declare global { + var __staticRouterHydrationData: HydrationState | undefined; +} + +declare global { + var globalProjectAnnotations: NormalizedProjectAnnotations; + var defaultProjectAnnotations: ProjectAnnotations; +} +type WrappedStoryRef = { + __pw_type: 'jsx'; + props: Record; +} | { + __pw_type: 'importRef'; +}; +type UnwrappedJSXStoryRef = { + __pw_type: 'jsx'; + type: UnwrappedImportStoryRef; +}; +type UnwrappedImportStoryRef = ComposedStoryFn; +declare global { + function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise; +} + +type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:new' | 'status-value:modified' | 'status-value:affected' | 'status-value:reviewing' | 'status-value:warning' | 'status-value:error' | 'status-value:unknown'; +type StatusTypeId = string; +interface Status { + value: StatusValue; + typeId: StatusTypeId; + storyId: StoryId; + title: string; + description: string; + data?: any; + sidebarContextMenu?: boolean; +} + +declare abstract class StorybookError extends Error { + private _name; + /** Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'. */ + readonly category: string; + /** Code representing the error. Used to uniquely identify the error, e.g., 1. */ + readonly code: number; + /** + * Data associated with the error. Used to provide additional information in the error message or + * to be passed to telemetry. + */ + readonly data: {}; + /** + * Specifies the documentation for the error. + * + * - If `true`, links to a documentation page on the Storybook website (make sure it exists before + * enabling) – This is not implemented yet. + * - If a string, uses the provided URL for documentation (external or FAQ links). + * - If `false` (default), no documentation link is added. + */ + readonly documentation: boolean | string | string[]; + /** Flag used to easily determine if the error originates from Storybook. */ + readonly fromStorybook: true; + /** + * Flag used to determine if the error is handled by us and should therefore not be shown to the + * user. + */ + isHandledError: boolean; + get fullErrorCode(): `SB_${string}_${string}`; + /** Overrides the default `Error.name` property in the format: SB__. */ + get name(): string; + set name(name: string); + /** + * A collection of sub errors which relate to a parent error. + * + * Sub-errors are used to represent multiple related errors that occurred together. When a + * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error + * are sent as separate telemetry events. This allows for better error tracking and debugging. + * + * @example + * + * ```ts + * const error1 = new SomeError(); + * const error2 = new AnotherError(); + * const parentError = new ParentError({ + * // ... other props + * subErrors: [error1, error2], + * }); + * ``` + */ + subErrors: StorybookError[]; + constructor(props: { + category: string; + code: number; + message: string; + cause?: unknown; + documentation?: boolean | string | string[]; + isHandledError?: boolean; + name: string; + /** + * Optional array of sub-errors that are related to this error. When this error is sent to + * telemetry, each sub-error will be sent as a separate event. + */ + subErrors?: StorybookError[]; + }); + /** Generates the error message along with additional documentation link (if applicable). */ + static getFullMessage({ documentation, code, category, message, }: ConstructorParameters[0]): string; +} + +/** + * If you can't find a suitable category for your error, create one based on the package name/file + * path of which the error is thrown. For instance: If it's from `storybook/internal/client-logger`, + * then MANAGER_CLIENT-LOGGER + * + * Categories are prefixed by a logical grouping, e.g. MANAGER_ to prevent manager and preview + * errors from having the same category and error code. + */ +declare enum Category { + MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT", + MANAGER_UI = "MANAGER_UI", + MANAGER_API = "MANAGER_API", + MANAGER_CLIENT_LOGGER = "MANAGER_CLIENT-LOGGER", + MANAGER_CHANNELS = "MANAGER_CHANNELS", + MANAGER_CORE_EVENTS = "MANAGER_CORE-EVENTS", + MANAGER_ROUTER = "MANAGER_ROUTER", + MANAGER_THEMING = "MANAGER_THEMING", + MANAGER_UNIVERSAL_STORE = "MANAGER_UNIVERSAL-STORE", + MANAGER_OPEN_SERVICE = "MANAGER_OPEN-SERVICE" +} +declare class ProviderDoesNotExtendBaseProviderError extends StorybookError { + constructor(); +} +declare class UncaughtManagerError extends StorybookError { + data: { + error: Error; + }; + constructor(data: { + error: Error; + }); +} +declare class StatusTypeIdMismatchError extends StorybookError { + data: { + status: Status; + typeId: StatusTypeId; + }; + constructor(data: { + status: Status; + typeId: StatusTypeId; + }); +} +declare class UniversalStoreFollowerTimeoutError extends StorybookError { + constructor(followerId: string); +} +declare class OpenServiceStaticSnapshotLoadError extends StorybookError { + data: { + serviceId: string; + queryName: string; + input: unknown; + logicalPath: string; + url: string; + cause: unknown; + status?: number; + statusText?: string; + }; + constructor(data: { + serviceId: string; + queryName: string; + input: unknown; + logicalPath: string; + url: string; + cause: unknown; + status?: number; + statusText?: string; + }); +} +declare class OpenServiceStaticSnapshotInvalidError extends StorybookError { + data: { + serviceId: string; + queryName: string; + input: unknown; + logicalPath: string; + url: string; + received: unknown; + }; + constructor(data: { + serviceId: string; + queryName: string; + input: unknown; + logicalPath: string; + url: string; + received: unknown; + }); +} + +export { Category, OpenServiceStaticSnapshotInvalidError, OpenServiceStaticSnapshotLoadError, ProviderDoesNotExtendBaseProviderError, StatusTypeIdMismatchError, UncaughtManagerError, UniversalStoreFollowerTimeoutError }; diff --git a/tools/ui/node_modules/storybook/dist/manager-errors.js b/tools/ui/node_modules/storybook/dist/manager-errors.js new file mode 100644 index 0000000000000000000000000000000000000000..849dc2d093a664f265d14a7f9053684649ba2d97 --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/manager-errors.js @@ -0,0 +1,20 @@ +import { + Category, + OpenServiceStaticSnapshotInvalidError, + OpenServiceStaticSnapshotLoadError, + ProviderDoesNotExtendBaseProviderError, + StatusTypeIdMismatchError, + UncaughtManagerError, + UniversalStoreFollowerTimeoutError +} from "./_browser-chunks/chunk-IUGBVGDA.js"; +import "./_browser-chunks/chunk-2HVKLHKJ.js"; +import "./_browser-chunks/chunk-IMSF75WX.js"; +export { + Category, + OpenServiceStaticSnapshotInvalidError, + OpenServiceStaticSnapshotLoadError, + ProviderDoesNotExtendBaseProviderError, + StatusTypeIdMismatchError, + UncaughtManagerError, + UniversalStoreFollowerTimeoutError +}; diff --git a/tools/ui/node_modules/storybook/dist/manager/globals-runtime.js b/tools/ui/node_modules/storybook/dist/manager/globals-runtime.js new file mode 100644 index 0000000000000000000000000000000000000000..a92a3221b4cce40981facb1ead319083d905a0cf --- /dev/null +++ b/tools/ui/node_modules/storybook/dist/manager/globals-runtime.js @@ -0,0 +1,78958 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __require = /* @__PURE__ */ ((x2) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x2, { + get: (a5, b3) => (typeof require < "u" ? require : a5)[b3] +}) : x2)(function(x2) { + if (typeof require < "u") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x2 + '" is not supported'); +}); +var __esm = (fn4, res, err) => function() { + if (err) throw err[0]; + try { + return fn4 && (res = (0, fn4[__getOwnPropNames(fn4)[0]])(fn4 = 0)), res; + } catch (e2) { + throw err = [e2], e2; + } +}; +var __commonJS = (cb, mod) => function() { + try { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + } catch (e2) { + throw mod = 0, e2; + } +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: !0 }); +}, __copyProps = (to, from2, except, desc) => { + if (from2 && typeof from2 == "object" || typeof from2 == "function") + for (let key of __getOwnPropNames(from2)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); + +// ../../node_modules/ts-dedent/esm/index.js +function dedent(templ) { + for (var values = [], _i = 1; _i < arguments.length; _i++) + values[_i - 1] = arguments[_i]; + var strings = Array.from(typeof templ == "string" ? [templ] : templ); + strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, ""); + var indentLengths = strings.reduce(function(arr, str2) { + var matches4 = str2.match(/\n([\t ]+|(?!\s).)/g); + return matches4 ? arr.concat(matches4.map(function(match3) { + var _a4, _b; + return (_b = (_a4 = match3.match(/[\t ]/g)) === null || _a4 === void 0 ? void 0 : _a4.length) !== null && _b !== void 0 ? _b : 0; + })) : arr; + }, []); + if (indentLengths.length) { + var pattern_1 = new RegExp(` +[ ]{` + Math.min.apply(Math, indentLengths) + "}", "g"); + strings = strings.map(function(str2) { + return str2.replace(pattern_1, ` +`); + }); + } + strings[0] = strings[0].replace(/^\r?\n/, ""); + var string2 = strings[0]; + return values.forEach(function(value, i3) { + var endentations = string2.match(/(?:^|\n)( *)$/), endentation = endentations ? endentations[1] : "", indentedValue = value; + typeof value == "string" && value.includes(` +`) && (indentedValue = String(value).split(` +`).map(function(str2, i4) { + return i4 === 0 ? str2 : "" + endentation + str2; + }).join(` +`)), string2 += indentedValue + strings[i3 + 1]; + }), string2; +} +var init_esm = __esm({ + "../../node_modules/ts-dedent/esm/index.js"() { + } +}); + +// ../../node_modules/@storybook/global/dist/index.mjs +var scope, init_dist = __esm({ + "../../node_modules/@storybook/global/dist/index.mjs"() { + scope = (() => { + let win; + return typeof window < "u" ? win = window : typeof globalThis < "u" ? win = globalThis : typeof global < "u" ? win = global : typeof self < "u" ? win = self : win = {}, win; + })(); + } +}); + +// src/client-logger/index.ts +var client_logger_exports = {}; +__export(client_logger_exports, { + deprecate: () => deprecate, + logger: () => logger, + once: () => once, + pretty: () => pretty +}); +var LOGLEVEL, levels, currentLogLevelString, currentLogLevelNumber, logger, logged, once, deprecate, pretty, init_client_logger = __esm({ + "src/client-logger/index.ts"() { + "use strict"; + init_dist(); + ({ LOGLEVEL } = scope), levels = { + trace: 1, + debug: 2, + info: 3, + warn: 4, + error: 5, + silent: 10 + }, currentLogLevelString = LOGLEVEL, currentLogLevelNumber = levels[currentLogLevelString] || levels.info, logger = { + trace: (message, ...rest) => { + currentLogLevelNumber <= levels.trace && console.trace(message, ...rest); + }, + debug: (message, ...rest) => { + currentLogLevelNumber <= levels.debug && console.debug(message, ...rest); + }, + info: (message, ...rest) => { + currentLogLevelNumber <= levels.info && console.info(message, ...rest); + }, + warn: (message, ...rest) => { + currentLogLevelNumber <= levels.warn && console.warn(message, ...rest); + }, + error: (message, ...rest) => { + currentLogLevelNumber <= levels.error && console.error(message, ...rest); + }, + log: (message, ...rest) => { + currentLogLevelNumber < levels.silent && console.log(message, ...rest); + } + }, logged = /* @__PURE__ */ new Set(), once = (type5) => (message, ...rest) => { + if (!logged.has(message)) + return logged.add(message), logger[type5](message, ...rest); + }; + once.clear = () => logged.clear(); + once.trace = once("trace"); + once.debug = once("debug"); + once.info = once("info"); + once.warn = once("warn"); + once.error = once("error"); + once.log = once("log"); + deprecate = once("warn"), pretty = (type5) => (...args) => { + let argArray = []; + if (args.length) { + let startTagRe = //gi, endTagRe = /<\/span>/gi, reResultArray; + for (argArray.push(args[0].replace(startTagRe, "%c").replace(endTagRe, "%c")); reResultArray = startTagRe.exec(args[0]); ) + argArray.push(reResultArray[2]), argArray.push(""); + for (let j2 = 1; j2 < args.length; j2++) + argArray.push(args[j2]); + } + logger[type5].apply(logger, argArray); + }; + pretty.trace = pretty("trace"); + pretty.debug = pretty("debug"); + pretty.info = pretty("info"); + pretty.warn = pretty("warn"); + pretty.error = pretty("error"); + } +}); + +// ../../node_modules/react/cjs/react.production.min.js +var require_react_production_min = __commonJS({ + "../../node_modules/react/cjs/react.production.min.js"(exports) { + "use strict"; + var l3 = /* @__PURE__ */ Symbol.for("react.element"), n3 = /* @__PURE__ */ Symbol.for("react.portal"), p5 = /* @__PURE__ */ Symbol.for("react.fragment"), q = /* @__PURE__ */ Symbol.for("react.strict_mode"), r3 = /* @__PURE__ */ Symbol.for("react.profiler"), t2 = /* @__PURE__ */ Symbol.for("react.provider"), u4 = /* @__PURE__ */ Symbol.for("react.context"), v3 = /* @__PURE__ */ Symbol.for("react.forward_ref"), w3 = /* @__PURE__ */ Symbol.for("react.suspense"), x2 = /* @__PURE__ */ Symbol.for("react.memo"), y3 = /* @__PURE__ */ Symbol.for("react.lazy"), z = Symbol.iterator; + function A3(a5) { + return a5 === null || typeof a5 != "object" ? null : (a5 = z && a5[z] || a5["@@iterator"], typeof a5 == "function" ? a5 : null); + } + var B3 = { isMounted: function() { + return !1; + }, enqueueForceUpdate: function() { + }, enqueueReplaceState: function() { + }, enqueueSetState: function() { + } }, C3 = Object.assign, D = {}; + function E2(a5, b3, e2) { + this.props = a5, this.context = b3, this.refs = D, this.updater = e2 || B3; + } + E2.prototype.isReactComponent = {}; + E2.prototype.setState = function(a5, b3) { + if (typeof a5 != "object" && typeof a5 != "function" && a5 != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + this.updater.enqueueSetState(this, a5, b3, "setState"); + }; + E2.prototype.forceUpdate = function(a5) { + this.updater.enqueueForceUpdate(this, a5, "forceUpdate"); + }; + function F() { + } + F.prototype = E2.prototype; + function G(a5, b3, e2) { + this.props = a5, this.context = b3, this.refs = D, this.updater = e2 || B3; + } + var H = G.prototype = new F(); + H.constructor = G; + C3(H, E2.prototype); + H.isPureReactComponent = !0; + var I = Array.isArray, J = Object.prototype.hasOwnProperty, K2 = { current: null }, L = { key: !0, ref: !0, __self: !0, __source: !0 }; + function M(a5, b3, e2) { + var d3, c3 = {}, k = null, h4 = null; + if (b3 != null) for (d3 in b3.ref !== void 0 && (h4 = b3.ref), b3.key !== void 0 && (k = "" + b3.key), b3) J.call(b3, d3) && !L.hasOwnProperty(d3) && (c3[d3] = b3[d3]); + var g3 = arguments.length - 2; + if (g3 === 1) c3.children = e2; + else if (1 < g3) { + for (var f6 = Array(g3), m5 = 0; m5 < g3; m5++) f6[m5] = arguments[m5 + 2]; + c3.children = f6; + } + if (a5 && a5.defaultProps) for (d3 in g3 = a5.defaultProps, g3) c3[d3] === void 0 && (c3[d3] = g3[d3]); + return { $$typeof: l3, type: a5, key: k, ref: h4, props: c3, _owner: K2.current }; + } + function N(a5, b3) { + return { $$typeof: l3, type: a5.type, key: b3, ref: a5.ref, props: a5.props, _owner: a5._owner }; + } + function O(a5) { + return typeof a5 == "object" && a5 !== null && a5.$$typeof === l3; + } + function escape4(a5) { + var b3 = { "=": "=0", ":": "=2" }; + return "$" + a5.replace(/[=:]/g, function(a6) { + return b3[a6]; + }); + } + var P3 = /\/+/g; + function Q(a5, b3) { + return typeof a5 == "object" && a5 !== null && a5.key != null ? escape4("" + a5.key) : b3.toString(36); + } + function R2(a5, b3, e2, d3, c3) { + var k = typeof a5; + (k === "undefined" || k === "boolean") && (a5 = null); + var h4 = !1; + if (a5 === null) h4 = !0; + else switch (k) { + case "string": + case "number": + h4 = !0; + break; + case "object": + switch (a5.$$typeof) { + case l3: + case n3: + h4 = !0; + } + } + if (h4) return h4 = a5, c3 = c3(h4), a5 = d3 === "" ? "." + Q(h4, 0) : d3, I(c3) ? (e2 = "", a5 != null && (e2 = a5.replace(P3, "$&/") + "/"), R2(c3, b3, e2, "", function(a6) { + return a6; + })) : c3 != null && (O(c3) && (c3 = N(c3, e2 + (!c3.key || h4 && h4.key === c3.key ? "" : ("" + c3.key).replace(P3, "$&/") + "/") + a5)), b3.push(c3)), 1; + if (h4 = 0, d3 = d3 === "" ? "." : d3 + ":", I(a5)) for (var g3 = 0; g3 < a5.length; g3++) { + k = a5[g3]; + var f6 = d3 + Q(k, g3); + h4 += R2(k, b3, e2, f6, c3); + } + else if (f6 = A3(a5), typeof f6 == "function") for (a5 = f6.call(a5), g3 = 0; !(k = a5.next()).done; ) k = k.value, f6 = d3 + Q(k, g3++), h4 += R2(k, b3, e2, f6, c3); + else if (k === "object") throw b3 = String(a5), Error("Objects are not valid as a React child (found: " + (b3 === "[object Object]" ? "object with keys {" + Object.keys(a5).join(", ") + "}" : b3) + "). If you meant to render a collection of children, use an array instead."); + return h4; + } + function S2(a5, b3, e2) { + if (a5 == null) return a5; + var d3 = [], c3 = 0; + return R2(a5, d3, "", "", function(a6) { + return b3.call(e2, a6, c3++); + }), d3; + } + function T2(a5) { + if (a5._status === -1) { + var b3 = a5._result; + b3 = b3(), b3.then(function(b4) { + (a5._status === 0 || a5._status === -1) && (a5._status = 1, a5._result = b4); + }, function(b4) { + (a5._status === 0 || a5._status === -1) && (a5._status = 2, a5._result = b4); + }), a5._status === -1 && (a5._status = 0, a5._result = b3); + } + if (a5._status === 1) return a5._result.default; + throw a5._result; + } + var U = { current: null }, V = { transition: null }, W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K2 }; + function X() { + throw Error("act(...) is not supported in production builds of React."); + } + exports.Children = { map: S2, forEach: function(a5, b3, e2) { + S2(a5, function() { + b3.apply(this, arguments); + }, e2); + }, count: function(a5) { + var b3 = 0; + return S2(a5, function() { + b3++; + }), b3; + }, toArray: function(a5) { + return S2(a5, function(a6) { + return a6; + }) || []; + }, only: function(a5) { + if (!O(a5)) throw Error("React.Children.only expected to receive a single React element child."); + return a5; + } }; + exports.Component = E2; + exports.Fragment = p5; + exports.Profiler = r3; + exports.PureComponent = G; + exports.StrictMode = q; + exports.Suspense = w3; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W; + exports.act = X; + exports.cloneElement = function(a5, b3, e2) { + if (a5 == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a5 + "."); + var d3 = C3({}, a5.props), c3 = a5.key, k = a5.ref, h4 = a5._owner; + if (b3 != null) { + if (b3.ref !== void 0 && (k = b3.ref, h4 = K2.current), b3.key !== void 0 && (c3 = "" + b3.key), a5.type && a5.type.defaultProps) var g3 = a5.type.defaultProps; + for (f6 in b3) J.call(b3, f6) && !L.hasOwnProperty(f6) && (d3[f6] = b3[f6] === void 0 && g3 !== void 0 ? g3[f6] : b3[f6]); + } + var f6 = arguments.length - 2; + if (f6 === 1) d3.children = e2; + else if (1 < f6) { + g3 = Array(f6); + for (var m5 = 0; m5 < f6; m5++) g3[m5] = arguments[m5 + 2]; + d3.children = g3; + } + return { $$typeof: l3, type: a5.type, key: c3, ref: k, props: d3, _owner: h4 }; + }; + exports.createContext = function(a5) { + return a5 = { $$typeof: u4, _currentValue: a5, _currentValue2: a5, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, a5.Provider = { $$typeof: t2, _context: a5 }, a5.Consumer = a5; + }; + exports.createElement = M; + exports.createFactory = function(a5) { + var b3 = M.bind(null, a5); + return b3.type = a5, b3; + }; + exports.createRef = function() { + return { current: null }; + }; + exports.forwardRef = function(a5) { + return { $$typeof: v3, render: a5 }; + }; + exports.isValidElement = O; + exports.lazy = function(a5) { + return { $$typeof: y3, _payload: { _status: -1, _result: a5 }, _init: T2 }; + }; + exports.memo = function(a5, b3) { + return { $$typeof: x2, type: a5, compare: b3 === void 0 ? null : b3 }; + }; + exports.startTransition = function(a5) { + var b3 = V.transition; + V.transition = {}; + try { + a5(); + } finally { + V.transition = b3; + } + }; + exports.unstable_act = X; + exports.useCallback = function(a5, b3) { + return U.current.useCallback(a5, b3); + }; + exports.useContext = function(a5) { + return U.current.useContext(a5); + }; + exports.useDebugValue = function() { + }; + exports.useDeferredValue = function(a5) { + return U.current.useDeferredValue(a5); + }; + exports.useEffect = function(a5, b3) { + return U.current.useEffect(a5, b3); + }; + exports.useId = function() { + return U.current.useId(); + }; + exports.useImperativeHandle = function(a5, b3, e2) { + return U.current.useImperativeHandle(a5, b3, e2); + }; + exports.useInsertionEffect = function(a5, b3) { + return U.current.useInsertionEffect(a5, b3); + }; + exports.useLayoutEffect = function(a5, b3) { + return U.current.useLayoutEffect(a5, b3); + }; + exports.useMemo = function(a5, b3) { + return U.current.useMemo(a5, b3); + }; + exports.useReducer = function(a5, b3, e2) { + return U.current.useReducer(a5, b3, e2); + }; + exports.useRef = function(a5) { + return U.current.useRef(a5); + }; + exports.useState = function(a5) { + return U.current.useState(a5); + }; + exports.useSyncExternalStore = function(a5, b3, e2) { + return U.current.useSyncExternalStore(a5, b3, e2); + }; + exports.useTransition = function() { + return U.current.useTransition(); + }; + exports.version = "18.3.1"; + } +}); + +// ../../node_modules/react/index.js +var require_react = __commonJS({ + "../../node_modules/react/index.js"(exports, module2) { + "use strict"; + module2.exports = require_react_production_min(); + } +}); + +// ../../node_modules/scheduler/cjs/scheduler.production.min.js +var require_scheduler_production_min = __commonJS({ + "../../node_modules/scheduler/cjs/scheduler.production.min.js"(exports) { + "use strict"; + function f6(a5, b3) { + var c3 = a5.length; + a5.push(b3); + a: for (; 0 < c3; ) { + var d3 = c3 - 1 >>> 1, e2 = a5[d3]; + if (0 < g3(e2, b3)) a5[d3] = b3, a5[c3] = e2, c3 = d3; + else break a; + } + } + function h4(a5) { + return a5.length === 0 ? null : a5[0]; + } + function k(a5) { + if (a5.length === 0) return null; + var b3 = a5[0], c3 = a5.pop(); + if (c3 !== b3) { + a5[0] = c3; + a: for (var d3 = 0, e2 = a5.length, w3 = e2 >>> 1; d3 < w3; ) { + var m5 = 2 * (d3 + 1) - 1, C3 = a5[m5], n3 = m5 + 1, x2 = a5[n3]; + if (0 > g3(C3, c3)) n3 < e2 && 0 > g3(x2, C3) ? (a5[d3] = x2, a5[n3] = c3, d3 = n3) : (a5[d3] = C3, a5[m5] = c3, d3 = m5); + else if (n3 < e2 && 0 > g3(x2, c3)) a5[d3] = x2, a5[n3] = c3, d3 = n3; + else break a; + } + } + return b3; + } + function g3(a5, b3) { + var c3 = a5.sortIndex - b3.sortIndex; + return c3 !== 0 ? c3 : a5.id - b3.id; + } + typeof performance == "object" && typeof performance.now == "function" ? (l3 = performance, exports.unstable_now = function() { + return l3.now(); + }) : (p5 = Date, q = p5.now(), exports.unstable_now = function() { + return p5.now() - q; + }); + var l3, p5, q, r3 = [], t2 = [], u4 = 1, v3 = null, y3 = 3, z = !1, A3 = !1, B3 = !1, D = typeof setTimeout == "function" ? setTimeout : null, E2 = typeof clearTimeout == "function" ? clearTimeout : null, F = typeof setImmediate < "u" ? setImmediate : null; + typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling); + function G(a5) { + for (var b3 = h4(t2); b3 !== null; ) { + if (b3.callback === null) k(t2); + else if (b3.startTime <= a5) k(t2), b3.sortIndex = b3.expirationTime, f6(r3, b3); + else break; + b3 = h4(t2); + } + } + function H(a5) { + if (B3 = !1, G(a5), !A3) if (h4(r3) !== null) A3 = !0, I(J); + else { + var b3 = h4(t2); + b3 !== null && K2(H, b3.startTime - a5); + } + } + function J(a5, b3) { + A3 = !1, B3 && (B3 = !1, E2(L), L = -1), z = !0; + var c3 = y3; + try { + for (G(b3), v3 = h4(r3); v3 !== null && (!(v3.expirationTime > b3) || a5 && !M()); ) { + var d3 = v3.callback; + if (typeof d3 == "function") { + v3.callback = null, y3 = v3.priorityLevel; + var e2 = d3(v3.expirationTime <= b3); + b3 = exports.unstable_now(), typeof e2 == "function" ? v3.callback = e2 : v3 === h4(r3) && k(r3), G(b3); + } else k(r3); + v3 = h4(r3); + } + if (v3 !== null) var w3 = !0; + else { + var m5 = h4(t2); + m5 !== null && K2(H, m5.startTime - b3), w3 = !1; + } + return w3; + } finally { + v3 = null, y3 = c3, z = !1; + } + } + var N = !1, O = null, L = -1, P3 = 5, Q = -1; + function M() { + return !(exports.unstable_now() - Q < P3); + } + function R2() { + if (O !== null) { + var a5 = exports.unstable_now(); + Q = a5; + var b3 = !0; + try { + b3 = O(!0, a5); + } finally { + b3 ? S2() : (N = !1, O = null); + } + } else N = !1; + } + var S2; + typeof F == "function" ? S2 = function() { + F(R2); + } : typeof MessageChannel < "u" ? (T2 = new MessageChannel(), U = T2.port2, T2.port1.onmessage = R2, S2 = function() { + U.postMessage(null); + }) : S2 = function() { + D(R2, 0); + }; + var T2, U; + function I(a5) { + O = a5, N || (N = !0, S2()); + } + function K2(a5, b3) { + L = D(function() { + a5(exports.unstable_now()); + }, b3); + } + exports.unstable_IdlePriority = 5; + exports.unstable_ImmediatePriority = 1; + exports.unstable_LowPriority = 4; + exports.unstable_NormalPriority = 3; + exports.unstable_Profiling = null; + exports.unstable_UserBlockingPriority = 2; + exports.unstable_cancelCallback = function(a5) { + a5.callback = null; + }; + exports.unstable_continueExecution = function() { + A3 || z || (A3 = !0, I(J)); + }; + exports.unstable_forceFrameRate = function(a5) { + 0 > a5 || 125 < a5 ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : P3 = 0 < a5 ? Math.floor(1e3 / a5) : 5; + }; + exports.unstable_getCurrentPriorityLevel = function() { + return y3; + }; + exports.unstable_getFirstCallbackNode = function() { + return h4(r3); + }; + exports.unstable_next = function(a5) { + switch (y3) { + case 1: + case 2: + case 3: + var b3 = 3; + break; + default: + b3 = y3; + } + var c3 = y3; + y3 = b3; + try { + return a5(); + } finally { + y3 = c3; + } + }; + exports.unstable_pauseExecution = function() { + }; + exports.unstable_requestPaint = function() { + }; + exports.unstable_runWithPriority = function(a5, b3) { + switch (a5) { + case 1: + case 2: + case 3: + case 4: + case 5: + break; + default: + a5 = 3; + } + var c3 = y3; + y3 = a5; + try { + return b3(); + } finally { + y3 = c3; + } + }; + exports.unstable_scheduleCallback = function(a5, b3, c3) { + var d3 = exports.unstable_now(); + switch (typeof c3 == "object" && c3 !== null ? (c3 = c3.delay, c3 = typeof c3 == "number" && 0 < c3 ? d3 + c3 : d3) : c3 = d3, a5) { + case 1: + var e2 = -1; + break; + case 2: + e2 = 250; + break; + case 5: + e2 = 1073741823; + break; + case 4: + e2 = 1e4; + break; + default: + e2 = 5e3; + } + return e2 = c3 + e2, a5 = { id: u4++, callback: b3, priorityLevel: a5, startTime: c3, expirationTime: e2, sortIndex: -1 }, c3 > d3 ? (a5.sortIndex = c3, f6(t2, a5), h4(r3) === null && a5 === h4(t2) && (B3 ? (E2(L), L = -1) : B3 = !0, K2(H, c3 - d3))) : (a5.sortIndex = e2, f6(r3, a5), A3 || z || (A3 = !0, I(J))), a5; + }; + exports.unstable_shouldYield = M; + exports.unstable_wrapCallback = function(a5) { + var b3 = y3; + return function() { + var c3 = y3; + y3 = b3; + try { + return a5.apply(this, arguments); + } finally { + y3 = c3; + } + }; + }; + } +}); + +// ../../node_modules/scheduler/index.js +var require_scheduler = __commonJS({ + "../../node_modules/scheduler/index.js"(exports, module2) { + "use strict"; + module2.exports = require_scheduler_production_min(); + } +}); + +// ../../node_modules/react-dom/cjs/react-dom.production.min.js +var require_react_dom_production_min = __commonJS({ + "../../node_modules/react-dom/cjs/react-dom.production.min.js"(exports) { + "use strict"; + var aa = require_react(), ca = require_scheduler(); + function p5(a5) { + for (var b3 = "https://reactjs.org/docs/error-decoder.html?invariant=" + a5, c3 = 1; c3 < arguments.length; c3++) b3 += "&args[]=" + encodeURIComponent(arguments[c3]); + return "Minified React error #" + a5 + "; visit " + b3 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; + } + var da = /* @__PURE__ */ new Set(), ea = {}; + function fa(a5, b3) { + ha(a5, b3), ha(a5 + "Capture", b3); + } + function ha(a5, b3) { + for (ea[a5] = b3, a5 = 0; a5 < b3.length; a5++) da.add(b3[a5]); + } + var ia = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), ja = Object.prototype.hasOwnProperty, ka = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, la = {}, ma = {}; + function oa(a5) { + return ja.call(ma, a5) ? !0 : ja.call(la, a5) ? !1 : ka.test(a5) ? ma[a5] = !0 : (la[a5] = !0, !1); + } + function pa(a5, b3, c3, d3) { + if (c3 !== null && c3.type === 0) return !1; + switch (typeof b3) { + case "function": + case "symbol": + return !0; + case "boolean": + return d3 ? !1 : c3 !== null ? !c3.acceptsBooleans : (a5 = a5.toLowerCase().slice(0, 5), a5 !== "data-" && a5 !== "aria-"); + default: + return !1; + } + } + function qa(a5, b3, c3, d3) { + if (b3 === null || typeof b3 > "u" || pa(a5, b3, c3, d3)) return !0; + if (d3) return !1; + if (c3 !== null) switch (c3.type) { + case 3: + return !b3; + case 4: + return b3 === !1; + case 5: + return isNaN(b3); + case 6: + return isNaN(b3) || 1 > b3; + } + return !1; + } + function v3(a5, b3, c3, d3, e2, f6, g3) { + this.acceptsBooleans = b3 === 2 || b3 === 3 || b3 === 4, this.attributeName = d3, this.attributeNamespace = e2, this.mustUseProperty = c3, this.propertyName = a5, this.type = b3, this.sanitizeURL = f6, this.removeEmptyString = g3; + } + var z = {}; + "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a5) { + z[a5] = new v3(a5, 0, !1, a5, null, !1, !1); + }); + [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(a5) { + var b3 = a5[0]; + z[b3] = new v3(b3, 1, !1, a5[1], null, !1, !1); + }); + ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(a5) { + z[a5] = new v3(a5, 2, !1, a5.toLowerCase(), null, !1, !1); + }); + ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(a5) { + z[a5] = new v3(a5, 2, !1, a5, null, !1, !1); + }); + "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a5) { + z[a5] = new v3(a5, 3, !1, a5.toLowerCase(), null, !1, !1); + }); + ["checked", "multiple", "muted", "selected"].forEach(function(a5) { + z[a5] = new v3(a5, 3, !0, a5, null, !1, !1); + }); + ["capture", "download"].forEach(function(a5) { + z[a5] = new v3(a5, 4, !1, a5, null, !1, !1); + }); + ["cols", "rows", "size", "span"].forEach(function(a5) { + z[a5] = new v3(a5, 6, !1, a5, null, !1, !1); + }); + ["rowSpan", "start"].forEach(function(a5) { + z[a5] = new v3(a5, 5, !1, a5.toLowerCase(), null, !1, !1); + }); + var ra = /[\-:]([a-z])/g; + function sa(a5) { + return a5[1].toUpperCase(); + } + "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a5) { + var b3 = a5.replace( + ra, + sa + ); + z[b3] = new v3(b3, 1, !1, a5, null, !1, !1); + }); + "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a5) { + var b3 = a5.replace(ra, sa); + z[b3] = new v3(b3, 1, !1, a5, "http://www.w3.org/1999/xlink", !1, !1); + }); + ["xml:base", "xml:lang", "xml:space"].forEach(function(a5) { + var b3 = a5.replace(ra, sa); + z[b3] = new v3(b3, 1, !1, a5, "http://www.w3.org/XML/1998/namespace", !1, !1); + }); + ["tabIndex", "crossOrigin"].forEach(function(a5) { + z[a5] = new v3(a5, 1, !1, a5.toLowerCase(), null, !1, !1); + }); + z.xlinkHref = new v3("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1); + ["src", "href", "action", "formAction"].forEach(function(a5) { + z[a5] = new v3(a5, 1, !1, a5.toLowerCase(), null, !0, !0); + }); + function ta(a5, b3, c3, d3) { + var e2 = z.hasOwnProperty(b3) ? z[b3] : null; + (e2 !== null ? e2.type !== 0 : d3 || !(2 < b3.length) || b3[0] !== "o" && b3[0] !== "O" || b3[1] !== "n" && b3[1] !== "N") && (qa(b3, c3, e2, d3) && (c3 = null), d3 || e2 === null ? oa(b3) && (c3 === null ? a5.removeAttribute(b3) : a5.setAttribute(b3, "" + c3)) : e2.mustUseProperty ? a5[e2.propertyName] = c3 === null ? e2.type === 3 ? !1 : "" : c3 : (b3 = e2.attributeName, d3 = e2.attributeNamespace, c3 === null ? a5.removeAttribute(b3) : (e2 = e2.type, c3 = e2 === 3 || e2 === 4 && c3 === !0 ? "" : "" + c3, d3 ? a5.setAttributeNS(d3, b3, c3) : a5.setAttribute(b3, c3)))); + } + var ua = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, va = /* @__PURE__ */ Symbol.for("react.element"), wa = /* @__PURE__ */ Symbol.for("react.portal"), ya = /* @__PURE__ */ Symbol.for("react.fragment"), za = /* @__PURE__ */ Symbol.for("react.strict_mode"), Aa = /* @__PURE__ */ Symbol.for("react.profiler"), Ba = /* @__PURE__ */ Symbol.for("react.provider"), Ca = /* @__PURE__ */ Symbol.for("react.context"), Da = /* @__PURE__ */ Symbol.for("react.forward_ref"), Ea = /* @__PURE__ */ Symbol.for("react.suspense"), Fa = /* @__PURE__ */ Symbol.for("react.suspense_list"), Ga = /* @__PURE__ */ Symbol.for("react.memo"), Ha = /* @__PURE__ */ Symbol.for("react.lazy"), Ia = /* @__PURE__ */ Symbol.for("react.offscreen"), Ja = Symbol.iterator; + function Ka(a5) { + return a5 === null || typeof a5 != "object" ? null : (a5 = Ja && a5[Ja] || a5["@@iterator"], typeof a5 == "function" ? a5 : null); + } + var A3 = Object.assign, La; + function Ma(a5) { + if (La === void 0) try { + throw Error(); + } catch (c3) { + var b3 = c3.stack.trim().match(/\n( *(at )?)/); + La = b3 && b3[1] || ""; + } + return ` +` + La + a5; + } + var Na = !1; + function Oa(a5, b3) { + if (!a5 || Na) return ""; + Na = !0; + var c3 = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + try { + if (b3) if (b3 = function() { + throw Error(); + }, Object.defineProperty(b3.prototype, "props", { set: function() { + throw Error(); + } }), typeof Reflect == "object" && Reflect.construct) { + try { + Reflect.construct(b3, []); + } catch (l3) { + var d3 = l3; + } + Reflect.construct(a5, [], b3); + } else { + try { + b3.call(); + } catch (l3) { + d3 = l3; + } + a5.call(b3.prototype); + } + else { + try { + throw Error(); + } catch (l3) { + d3 = l3; + } + a5(); + } + } catch (l3) { + if (l3 && d3 && typeof l3.stack == "string") { + for (var e2 = l3.stack.split(` +`), f6 = d3.stack.split(` +`), g3 = e2.length - 1, h4 = f6.length - 1; 1 <= g3 && 0 <= h4 && e2[g3] !== f6[h4]; ) h4--; + for (; 1 <= g3 && 0 <= h4; g3--, h4--) if (e2[g3] !== f6[h4]) { + if (g3 !== 1 || h4 !== 1) + do + if (g3--, h4--, 0 > h4 || e2[g3] !== f6[h4]) { + var k = ` +` + e2[g3].replace(" at new ", " at "); + return a5.displayName && k.includes("") && (k = k.replace("", a5.displayName)), k; + } + while (1 <= g3 && 0 <= h4); + break; + } + } + } finally { + Na = !1, Error.prepareStackTrace = c3; + } + return (a5 = a5 ? a5.displayName || a5.name : "") ? Ma(a5) : ""; + } + function Pa(a5) { + switch (a5.tag) { + case 5: + return Ma(a5.type); + case 16: + return Ma("Lazy"); + case 13: + return Ma("Suspense"); + case 19: + return Ma("SuspenseList"); + case 0: + case 2: + case 15: + return a5 = Oa(a5.type, !1), a5; + case 11: + return a5 = Oa(a5.type.render, !1), a5; + case 1: + return a5 = Oa(a5.type, !0), a5; + default: + return ""; + } + } + function Qa(a5) { + if (a5 == null) return null; + if (typeof a5 == "function") return a5.displayName || a5.name || null; + if (typeof a5 == "string") return a5; + switch (a5) { + case ya: + return "Fragment"; + case wa: + return "Portal"; + case Aa: + return "Profiler"; + case za: + return "StrictMode"; + case Ea: + return "Suspense"; + case Fa: + return "SuspenseList"; + } + if (typeof a5 == "object") switch (a5.$$typeof) { + case Ca: + return (a5.displayName || "Context") + ".Consumer"; + case Ba: + return (a5._context.displayName || "Context") + ".Provider"; + case Da: + var b3 = a5.render; + return a5 = a5.displayName, a5 || (a5 = b3.displayName || b3.name || "", a5 = a5 !== "" ? "ForwardRef(" + a5 + ")" : "ForwardRef"), a5; + case Ga: + return b3 = a5.displayName || null, b3 !== null ? b3 : Qa(a5.type) || "Memo"; + case Ha: + b3 = a5._payload, a5 = a5._init; + try { + return Qa(a5(b3)); + } catch { + } + } + return null; + } + function Ra(a5) { + var b3 = a5.type; + switch (a5.tag) { + case 24: + return "Cache"; + case 9: + return (b3.displayName || "Context") + ".Consumer"; + case 10: + return (b3._context.displayName || "Context") + ".Provider"; + case 18: + return "DehydratedFragment"; + case 11: + return a5 = b3.render, a5 = a5.displayName || a5.name || "", b3.displayName || (a5 !== "" ? "ForwardRef(" + a5 + ")" : "ForwardRef"); + case 7: + return "Fragment"; + case 5: + return b3; + case 4: + return "Portal"; + case 3: + return "Root"; + case 6: + return "Text"; + case 16: + return Qa(b3); + case 8: + return b3 === za ? "StrictMode" : "Mode"; + case 22: + return "Offscreen"; + case 12: + return "Profiler"; + case 21: + return "Scope"; + case 13: + return "Suspense"; + case 19: + return "SuspenseList"; + case 25: + return "TracingMarker"; + case 1: + case 0: + case 17: + case 2: + case 14: + case 15: + if (typeof b3 == "function") return b3.displayName || b3.name || null; + if (typeof b3 == "string") return b3; + } + return null; + } + function Sa(a5) { + switch (typeof a5) { + case "boolean": + case "number": + case "string": + case "undefined": + return a5; + case "object": + return a5; + default: + return ""; + } + } + function Ta(a5) { + var b3 = a5.type; + return (a5 = a5.nodeName) && a5.toLowerCase() === "input" && (b3 === "checkbox" || b3 === "radio"); + } + function Ua(a5) { + var b3 = Ta(a5) ? "checked" : "value", c3 = Object.getOwnPropertyDescriptor(a5.constructor.prototype, b3), d3 = "" + a5[b3]; + if (!a5.hasOwnProperty(b3) && typeof c3 < "u" && typeof c3.get == "function" && typeof c3.set == "function") { + var e2 = c3.get, f6 = c3.set; + return Object.defineProperty(a5, b3, { configurable: !0, get: function() { + return e2.call(this); + }, set: function(a6) { + d3 = "" + a6, f6.call(this, a6); + } }), Object.defineProperty(a5, b3, { enumerable: c3.enumerable }), { getValue: function() { + return d3; + }, setValue: function(a6) { + d3 = "" + a6; + }, stopTracking: function() { + a5._valueTracker = null, delete a5[b3]; + } }; + } + } + function Va(a5) { + a5._valueTracker || (a5._valueTracker = Ua(a5)); + } + function Wa(a5) { + if (!a5) return !1; + var b3 = a5._valueTracker; + if (!b3) return !0; + var c3 = b3.getValue(), d3 = ""; + return a5 && (d3 = Ta(a5) ? a5.checked ? "true" : "false" : a5.value), a5 = d3, a5 !== c3 ? (b3.setValue(a5), !0) : !1; + } + function Xa(a5) { + if (a5 = a5 || (typeof document < "u" ? document : void 0), typeof a5 > "u") return null; + try { + return a5.activeElement || a5.body; + } catch { + return a5.body; + } + } + function Ya(a5, b3) { + var c3 = b3.checked; + return A3({}, b3, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: c3 ?? a5._wrapperState.initialChecked }); + } + function Za(a5, b3) { + var c3 = b3.defaultValue == null ? "" : b3.defaultValue, d3 = b3.checked != null ? b3.checked : b3.defaultChecked; + c3 = Sa(b3.value != null ? b3.value : c3), a5._wrapperState = { initialChecked: d3, initialValue: c3, controlled: b3.type === "checkbox" || b3.type === "radio" ? b3.checked != null : b3.value != null }; + } + function ab(a5, b3) { + b3 = b3.checked, b3 != null && ta(a5, "checked", b3, !1); + } + function bb(a5, b3) { + ab(a5, b3); + var c3 = Sa(b3.value), d3 = b3.type; + if (c3 != null) d3 === "number" ? (c3 === 0 && a5.value === "" || a5.value != c3) && (a5.value = "" + c3) : a5.value !== "" + c3 && (a5.value = "" + c3); + else if (d3 === "submit" || d3 === "reset") { + a5.removeAttribute("value"); + return; + } + b3.hasOwnProperty("value") ? cb(a5, b3.type, c3) : b3.hasOwnProperty("defaultValue") && cb(a5, b3.type, Sa(b3.defaultValue)), b3.checked == null && b3.defaultChecked != null && (a5.defaultChecked = !!b3.defaultChecked); + } + function db(a5, b3, c3) { + if (b3.hasOwnProperty("value") || b3.hasOwnProperty("defaultValue")) { + var d3 = b3.type; + if (!(d3 !== "submit" && d3 !== "reset" || b3.value !== void 0 && b3.value !== null)) return; + b3 = "" + a5._wrapperState.initialValue, c3 || b3 === a5.value || (a5.value = b3), a5.defaultValue = b3; + } + c3 = a5.name, c3 !== "" && (a5.name = ""), a5.defaultChecked = !!a5._wrapperState.initialChecked, c3 !== "" && (a5.name = c3); + } + function cb(a5, b3, c3) { + (b3 !== "number" || Xa(a5.ownerDocument) !== a5) && (c3 == null ? a5.defaultValue = "" + a5._wrapperState.initialValue : a5.defaultValue !== "" + c3 && (a5.defaultValue = "" + c3)); + } + var eb = Array.isArray; + function fb(a5, b3, c3, d3) { + if (a5 = a5.options, b3) { + b3 = {}; + for (var e2 = 0; e2 < c3.length; e2++) b3["$" + c3[e2]] = !0; + for (c3 = 0; c3 < a5.length; c3++) e2 = b3.hasOwnProperty("$" + a5[c3].value), a5[c3].selected !== e2 && (a5[c3].selected = e2), e2 && d3 && (a5[c3].defaultSelected = !0); + } else { + for (c3 = "" + Sa(c3), b3 = null, e2 = 0; e2 < a5.length; e2++) { + if (a5[e2].value === c3) { + a5[e2].selected = !0, d3 && (a5[e2].defaultSelected = !0); + return; + } + b3 !== null || a5[e2].disabled || (b3 = a5[e2]); + } + b3 !== null && (b3.selected = !0); + } + } + function gb(a5, b3) { + if (b3.dangerouslySetInnerHTML != null) throw Error(p5(91)); + return A3({}, b3, { value: void 0, defaultValue: void 0, children: "" + a5._wrapperState.initialValue }); + } + function hb(a5, b3) { + var c3 = b3.value; + if (c3 == null) { + if (c3 = b3.children, b3 = b3.defaultValue, c3 != null) { + if (b3 != null) throw Error(p5(92)); + if (eb(c3)) { + if (1 < c3.length) throw Error(p5(93)); + c3 = c3[0]; + } + b3 = c3; + } + b3 == null && (b3 = ""), c3 = b3; + } + a5._wrapperState = { initialValue: Sa(c3) }; + } + function ib(a5, b3) { + var c3 = Sa(b3.value), d3 = Sa(b3.defaultValue); + c3 != null && (c3 = "" + c3, c3 !== a5.value && (a5.value = c3), b3.defaultValue == null && a5.defaultValue !== c3 && (a5.defaultValue = c3)), d3 != null && (a5.defaultValue = "" + d3); + } + function jb(a5) { + var b3 = a5.textContent; + b3 === a5._wrapperState.initialValue && b3 !== "" && b3 !== null && (a5.value = b3); + } + function kb(a5) { + switch (a5) { + case "svg": + return "http://www.w3.org/2000/svg"; + case "math": + return "http://www.w3.org/1998/Math/MathML"; + default: + return "http://www.w3.org/1999/xhtml"; + } + } + function lb(a5, b3) { + return a5 == null || a5 === "http://www.w3.org/1999/xhtml" ? kb(b3) : a5 === "http://www.w3.org/2000/svg" && b3 === "foreignObject" ? "http://www.w3.org/1999/xhtml" : a5; + } + var mb, nb = (function(a5) { + return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(b3, c3, d3, e2) { + MSApp.execUnsafeLocalFunction(function() { + return a5(b3, c3, d3, e2); + }); + } : a5; + })(function(a5, b3) { + if (a5.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in a5) a5.innerHTML = b3; + else { + for (mb = mb || document.createElement("div"), mb.innerHTML = "" + b3.valueOf().toString() + "", b3 = mb.firstChild; a5.firstChild; ) a5.removeChild(a5.firstChild); + for (; b3.firstChild; ) a5.appendChild(b3.firstChild); + } + }); + function ob(a5, b3) { + if (b3) { + var c3 = a5.firstChild; + if (c3 && c3 === a5.lastChild && c3.nodeType === 3) { + c3.nodeValue = b3; + return; + } + } + a5.textContent = b3; + } + var pb = { + animationIterationCount: !0, + aspectRatio: !0, + borderImageOutset: !0, + borderImageSlice: !0, + borderImageWidth: !0, + boxFlex: !0, + boxFlexGroup: !0, + boxOrdinalGroup: !0, + columnCount: !0, + columns: !0, + flex: !0, + flexGrow: !0, + flexPositive: !0, + flexShrink: !0, + flexNegative: !0, + flexOrder: !0, + gridArea: !0, + gridRow: !0, + gridRowEnd: !0, + gridRowSpan: !0, + gridRowStart: !0, + gridColumn: !0, + gridColumnEnd: !0, + gridColumnSpan: !0, + gridColumnStart: !0, + fontWeight: !0, + lineClamp: !0, + lineHeight: !0, + opacity: !0, + order: !0, + orphans: !0, + tabSize: !0, + widows: !0, + zIndex: !0, + zoom: !0, + fillOpacity: !0, + floodOpacity: !0, + stopOpacity: !0, + strokeDasharray: !0, + strokeDashoffset: !0, + strokeMiterlimit: !0, + strokeOpacity: !0, + strokeWidth: !0 + }, qb = ["Webkit", "ms", "Moz", "O"]; + Object.keys(pb).forEach(function(a5) { + qb.forEach(function(b3) { + b3 = b3 + a5.charAt(0).toUpperCase() + a5.substring(1), pb[b3] = pb[a5]; + }); + }); + function rb(a5, b3, c3) { + return b3 == null || typeof b3 == "boolean" || b3 === "" ? "" : c3 || typeof b3 != "number" || b3 === 0 || pb.hasOwnProperty(a5) && pb[a5] ? ("" + b3).trim() : b3 + "px"; + } + function sb2(a5, b3) { + a5 = a5.style; + for (var c3 in b3) if (b3.hasOwnProperty(c3)) { + var d3 = c3.indexOf("--") === 0, e2 = rb(c3, b3[c3], d3); + c3 === "float" && (c3 = "cssFloat"), d3 ? a5.setProperty(c3, e2) : a5[c3] = e2; + } + } + var tb = A3({ menuitem: !0 }, { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 }); + function ub(a5, b3) { + if (b3) { + if (tb[a5] && (b3.children != null || b3.dangerouslySetInnerHTML != null)) throw Error(p5(137, a5)); + if (b3.dangerouslySetInnerHTML != null) { + if (b3.children != null) throw Error(p5(60)); + if (typeof b3.dangerouslySetInnerHTML != "object" || !("__html" in b3.dangerouslySetInnerHTML)) throw Error(p5(61)); + } + if (b3.style != null && typeof b3.style != "object") throw Error(p5(62)); + } + } + function vb(a5, b3) { + if (a5.indexOf("-") === -1) return typeof b3.is == "string"; + switch (a5) { + case "annotation-xml": + case "color-profile": + case "font-face": + case "font-face-src": + case "font-face-uri": + case "font-face-format": + case "font-face-name": + case "missing-glyph": + return !1; + default: + return !0; + } + } + var wb = null; + function xb(a5) { + return a5 = a5.target || a5.srcElement || window, a5.correspondingUseElement && (a5 = a5.correspondingUseElement), a5.nodeType === 3 ? a5.parentNode : a5; + } + var yb = null, zb = null, Ab = null; + function Bb(a5) { + if (a5 = Cb(a5)) { + if (typeof yb != "function") throw Error(p5(280)); + var b3 = a5.stateNode; + b3 && (b3 = Db(b3), yb(a5.stateNode, a5.type, b3)); + } + } + function Eb(a5) { + zb ? Ab ? Ab.push(a5) : Ab = [a5] : zb = a5; + } + function Fb() { + if (zb) { + var a5 = zb, b3 = Ab; + if (Ab = zb = null, Bb(a5), b3) for (a5 = 0; a5 < b3.length; a5++) Bb(b3[a5]); + } + } + function Gb(a5, b3) { + return a5(b3); + } + function Hb() { + } + var Ib = !1; + function Jb(a5, b3, c3) { + if (Ib) return a5(b3, c3); + Ib = !0; + try { + return Gb(a5, b3, c3); + } finally { + Ib = !1, (zb !== null || Ab !== null) && (Hb(), Fb()); + } + } + function Kb(a5, b3) { + var c3 = a5.stateNode; + if (c3 === null) return null; + var d3 = Db(c3); + if (d3 === null) return null; + c3 = d3[b3]; + a: switch (b3) { + case "onClick": + case "onClickCapture": + case "onDoubleClick": + case "onDoubleClickCapture": + case "onMouseDown": + case "onMouseDownCapture": + case "onMouseMove": + case "onMouseMoveCapture": + case "onMouseUp": + case "onMouseUpCapture": + case "onMouseEnter": + (d3 = !d3.disabled) || (a5 = a5.type, d3 = !(a5 === "button" || a5 === "input" || a5 === "select" || a5 === "textarea")), a5 = !d3; + break a; + default: + a5 = !1; + } + if (a5) return null; + if (c3 && typeof c3 != "function") throw Error(p5(231, b3, typeof c3)); + return c3; + } + var Lb = !1; + if (ia) try { + Mb = {}, Object.defineProperty(Mb, "passive", { get: function() { + Lb = !0; + } }), window.addEventListener("test", Mb, Mb), window.removeEventListener("test", Mb, Mb); + } catch { + Lb = !1; + } + var Mb; + function Nb(a5, b3, c3, d3, e2, f6, g3, h4, k) { + var l3 = Array.prototype.slice.call(arguments, 3); + try { + b3.apply(c3, l3); + } catch (m5) { + this.onError(m5); + } + } + var Ob = !1, Pb = null, Qb = !1, Rb = null, Sb = { onError: function(a5) { + Ob = !0, Pb = a5; + } }; + function Tb(a5, b3, c3, d3, e2, f6, g3, h4, k) { + Ob = !1, Pb = null, Nb.apply(Sb, arguments); + } + function Ub(a5, b3, c3, d3, e2, f6, g3, h4, k) { + if (Tb.apply(this, arguments), Ob) { + if (Ob) { + var l3 = Pb; + Ob = !1, Pb = null; + } else throw Error(p5(198)); + Qb || (Qb = !0, Rb = l3); + } + } + function Vb(a5) { + var b3 = a5, c3 = a5; + if (a5.alternate) for (; b3.return; ) b3 = b3.return; + else { + a5 = b3; + do + b3 = a5, (b3.flags & 4098) !== 0 && (c3 = b3.return), a5 = b3.return; + while (a5); + } + return b3.tag === 3 ? c3 : null; + } + function Wb(a5) { + if (a5.tag === 13) { + var b3 = a5.memoizedState; + if (b3 === null && (a5 = a5.alternate, a5 !== null && (b3 = a5.memoizedState)), b3 !== null) return b3.dehydrated; + } + return null; + } + function Xb(a5) { + if (Vb(a5) !== a5) throw Error(p5(188)); + } + function Yb(a5) { + var b3 = a5.alternate; + if (!b3) { + if (b3 = Vb(a5), b3 === null) throw Error(p5(188)); + return b3 !== a5 ? null : a5; + } + for (var c3 = a5, d3 = b3; ; ) { + var e2 = c3.return; + if (e2 === null) break; + var f6 = e2.alternate; + if (f6 === null) { + if (d3 = e2.return, d3 !== null) { + c3 = d3; + continue; + } + break; + } + if (e2.child === f6.child) { + for (f6 = e2.child; f6; ) { + if (f6 === c3) return Xb(e2), a5; + if (f6 === d3) return Xb(e2), b3; + f6 = f6.sibling; + } + throw Error(p5(188)); + } + if (c3.return !== d3.return) c3 = e2, d3 = f6; + else { + for (var g3 = !1, h4 = e2.child; h4; ) { + if (h4 === c3) { + g3 = !0, c3 = e2, d3 = f6; + break; + } + if (h4 === d3) { + g3 = !0, d3 = e2, c3 = f6; + break; + } + h4 = h4.sibling; + } + if (!g3) { + for (h4 = f6.child; h4; ) { + if (h4 === c3) { + g3 = !0, c3 = f6, d3 = e2; + break; + } + if (h4 === d3) { + g3 = !0, d3 = f6, c3 = e2; + break; + } + h4 = h4.sibling; + } + if (!g3) throw Error(p5(189)); + } + } + if (c3.alternate !== d3) throw Error(p5(190)); + } + if (c3.tag !== 3) throw Error(p5(188)); + return c3.stateNode.current === c3 ? a5 : b3; + } + function Zb(a5) { + return a5 = Yb(a5), a5 !== null ? $b(a5) : null; + } + function $b(a5) { + if (a5.tag === 5 || a5.tag === 6) return a5; + for (a5 = a5.child; a5 !== null; ) { + var b3 = $b(a5); + if (b3 !== null) return b3; + a5 = a5.sibling; + } + return null; + } + var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B3 = ca.unstable_now, ec = ca.unstable_getCurrentPriorityLevel, fc = ca.unstable_ImmediatePriority, gc = ca.unstable_UserBlockingPriority, hc = ca.unstable_NormalPriority, ic = ca.unstable_LowPriority, jc = ca.unstable_IdlePriority, kc = null, lc = null; + function mc(a5) { + if (lc && typeof lc.onCommitFiberRoot == "function") try { + lc.onCommitFiberRoot(kc, a5, void 0, (a5.current.flags & 128) === 128); + } catch { + } + } + var oc = Math.clz32 ? Math.clz32 : nc, pc = Math.log, qc = Math.LN2; + function nc(a5) { + return a5 >>>= 0, a5 === 0 ? 32 : 31 - (pc(a5) / qc | 0) | 0; + } + var rc = 64, sc = 4194304; + function tc(a5) { + switch (a5 & -a5) { + case 1: + return 1; + case 2: + return 2; + case 4: + return 4; + case 8: + return 8; + case 16: + return 16; + case 32: + return 32; + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return a5 & 4194240; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + return a5 & 130023424; + case 134217728: + return 134217728; + case 268435456: + return 268435456; + case 536870912: + return 536870912; + case 1073741824: + return 1073741824; + default: + return a5; + } + } + function uc(a5, b3) { + var c3 = a5.pendingLanes; + if (c3 === 0) return 0; + var d3 = 0, e2 = a5.suspendedLanes, f6 = a5.pingedLanes, g3 = c3 & 268435455; + if (g3 !== 0) { + var h4 = g3 & ~e2; + h4 !== 0 ? d3 = tc(h4) : (f6 &= g3, f6 !== 0 && (d3 = tc(f6))); + } else g3 = c3 & ~e2, g3 !== 0 ? d3 = tc(g3) : f6 !== 0 && (d3 = tc(f6)); + if (d3 === 0) return 0; + if (b3 !== 0 && b3 !== d3 && (b3 & e2) === 0 && (e2 = d3 & -d3, f6 = b3 & -b3, e2 >= f6 || e2 === 16 && (f6 & 4194240) !== 0)) return b3; + if ((d3 & 4) !== 0 && (d3 |= c3 & 16), b3 = a5.entangledLanes, b3 !== 0) for (a5 = a5.entanglements, b3 &= d3; 0 < b3; ) c3 = 31 - oc(b3), e2 = 1 << c3, d3 |= a5[c3], b3 &= ~e2; + return d3; + } + function vc(a5, b3) { + switch (a5) { + case 1: + case 2: + case 4: + return b3 + 250; + case 8: + case 16: + case 32: + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return b3 + 5e3; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + return -1; + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1; + default: + return -1; + } + } + function wc(a5, b3) { + for (var c3 = a5.suspendedLanes, d3 = a5.pingedLanes, e2 = a5.expirationTimes, f6 = a5.pendingLanes; 0 < f6; ) { + var g3 = 31 - oc(f6), h4 = 1 << g3, k = e2[g3]; + k === -1 ? ((h4 & c3) === 0 || (h4 & d3) !== 0) && (e2[g3] = vc(h4, b3)) : k <= b3 && (a5.expiredLanes |= h4), f6 &= ~h4; + } + } + function xc(a5) { + return a5 = a5.pendingLanes & -1073741825, a5 !== 0 ? a5 : a5 & 1073741824 ? 1073741824 : 0; + } + function yc() { + var a5 = rc; + return rc <<= 1, (rc & 4194240) === 0 && (rc = 64), a5; + } + function zc(a5) { + for (var b3 = [], c3 = 0; 31 > c3; c3++) b3.push(a5); + return b3; + } + function Ac(a5, b3, c3) { + a5.pendingLanes |= b3, b3 !== 536870912 && (a5.suspendedLanes = 0, a5.pingedLanes = 0), a5 = a5.eventTimes, b3 = 31 - oc(b3), a5[b3] = c3; + } + function Bc(a5, b3) { + var c3 = a5.pendingLanes & ~b3; + a5.pendingLanes = b3, a5.suspendedLanes = 0, a5.pingedLanes = 0, a5.expiredLanes &= b3, a5.mutableReadLanes &= b3, a5.entangledLanes &= b3, b3 = a5.entanglements; + var d3 = a5.eventTimes; + for (a5 = a5.expirationTimes; 0 < c3; ) { + var e2 = 31 - oc(c3), f6 = 1 << e2; + b3[e2] = 0, d3[e2] = -1, a5[e2] = -1, c3 &= ~f6; + } + } + function Cc(a5, b3) { + var c3 = a5.entangledLanes |= b3; + for (a5 = a5.entanglements; c3; ) { + var d3 = 31 - oc(c3), e2 = 1 << d3; + e2 & b3 | a5[d3] & b3 && (a5[d3] |= b3), c3 &= ~e2; + } + } + var C3 = 0; + function Dc(a5) { + return a5 &= -a5, 1 < a5 ? 4 < a5 ? (a5 & 268435455) !== 0 ? 16 : 536870912 : 4 : 1; + } + var Ec, Fc, Gc, Hc, Ic, Jc = !1, Kc = [], Lc = null, Mc = null, Nc = null, Oc = /* @__PURE__ */ new Map(), Pc = /* @__PURE__ */ new Map(), Qc = [], Rc = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); + function Sc(a5, b3) { + switch (a5) { + case "focusin": + case "focusout": + Lc = null; + break; + case "dragenter": + case "dragleave": + Mc = null; + break; + case "mouseover": + case "mouseout": + Nc = null; + break; + case "pointerover": + case "pointerout": + Oc.delete(b3.pointerId); + break; + case "gotpointercapture": + case "lostpointercapture": + Pc.delete(b3.pointerId); + } + } + function Tc(a5, b3, c3, d3, e2, f6) { + return a5 === null || a5.nativeEvent !== f6 ? (a5 = { blockedOn: b3, domEventName: c3, eventSystemFlags: d3, nativeEvent: f6, targetContainers: [e2] }, b3 !== null && (b3 = Cb(b3), b3 !== null && Fc(b3)), a5) : (a5.eventSystemFlags |= d3, b3 = a5.targetContainers, e2 !== null && b3.indexOf(e2) === -1 && b3.push(e2), a5); + } + function Uc(a5, b3, c3, d3, e2) { + switch (b3) { + case "focusin": + return Lc = Tc(Lc, a5, b3, c3, d3, e2), !0; + case "dragenter": + return Mc = Tc(Mc, a5, b3, c3, d3, e2), !0; + case "mouseover": + return Nc = Tc(Nc, a5, b3, c3, d3, e2), !0; + case "pointerover": + var f6 = e2.pointerId; + return Oc.set(f6, Tc(Oc.get(f6) || null, a5, b3, c3, d3, e2)), !0; + case "gotpointercapture": + return f6 = e2.pointerId, Pc.set(f6, Tc(Pc.get(f6) || null, a5, b3, c3, d3, e2)), !0; + } + return !1; + } + function Vc(a5) { + var b3 = Wc(a5.target); + if (b3 !== null) { + var c3 = Vb(b3); + if (c3 !== null) { + if (b3 = c3.tag, b3 === 13) { + if (b3 = Wb(c3), b3 !== null) { + a5.blockedOn = b3, Ic(a5.priority, function() { + Gc(c3); + }); + return; + } + } else if (b3 === 3 && c3.stateNode.current.memoizedState.isDehydrated) { + a5.blockedOn = c3.tag === 3 ? c3.stateNode.containerInfo : null; + return; + } + } + } + a5.blockedOn = null; + } + function Xc(a5) { + if (a5.blockedOn !== null) return !1; + for (var b3 = a5.targetContainers; 0 < b3.length; ) { + var c3 = Yc(a5.domEventName, a5.eventSystemFlags, b3[0], a5.nativeEvent); + if (c3 === null) { + c3 = a5.nativeEvent; + var d3 = new c3.constructor(c3.type, c3); + wb = d3, c3.target.dispatchEvent(d3), wb = null; + } else return b3 = Cb(c3), b3 !== null && Fc(b3), a5.blockedOn = c3, !1; + b3.shift(); + } + return !0; + } + function Zc(a5, b3, c3) { + Xc(a5) && c3.delete(b3); + } + function $c() { + Jc = !1, Lc !== null && Xc(Lc) && (Lc = null), Mc !== null && Xc(Mc) && (Mc = null), Nc !== null && Xc(Nc) && (Nc = null), Oc.forEach(Zc), Pc.forEach(Zc); + } + function ad(a5, b3) { + a5.blockedOn === b3 && (a5.blockedOn = null, Jc || (Jc = !0, ca.unstable_scheduleCallback(ca.unstable_NormalPriority, $c))); + } + function bd(a5) { + function b3(b4) { + return ad(b4, a5); + } + if (0 < Kc.length) { + ad(Kc[0], a5); + for (var c3 = 1; c3 < Kc.length; c3++) { + var d3 = Kc[c3]; + d3.blockedOn === a5 && (d3.blockedOn = null); + } + } + for (Lc !== null && ad(Lc, a5), Mc !== null && ad(Mc, a5), Nc !== null && ad(Nc, a5), Oc.forEach(b3), Pc.forEach(b3), c3 = 0; c3 < Qc.length; c3++) d3 = Qc[c3], d3.blockedOn === a5 && (d3.blockedOn = null); + for (; 0 < Qc.length && (c3 = Qc[0], c3.blockedOn === null); ) Vc(c3), c3.blockedOn === null && Qc.shift(); + } + var cd = ua.ReactCurrentBatchConfig, dd = !0; + function ed(a5, b3, c3, d3) { + var e2 = C3, f6 = cd.transition; + cd.transition = null; + try { + C3 = 1, fd(a5, b3, c3, d3); + } finally { + C3 = e2, cd.transition = f6; + } + } + function gd(a5, b3, c3, d3) { + var e2 = C3, f6 = cd.transition; + cd.transition = null; + try { + C3 = 4, fd(a5, b3, c3, d3); + } finally { + C3 = e2, cd.transition = f6; + } + } + function fd(a5, b3, c3, d3) { + if (dd) { + var e2 = Yc(a5, b3, c3, d3); + if (e2 === null) hd(a5, b3, d3, id, c3), Sc(a5, d3); + else if (Uc(e2, a5, b3, c3, d3)) d3.stopPropagation(); + else if (Sc(a5, d3), b3 & 4 && -1 < Rc.indexOf(a5)) { + for (; e2 !== null; ) { + var f6 = Cb(e2); + if (f6 !== null && Ec(f6), f6 = Yc(a5, b3, c3, d3), f6 === null && hd(a5, b3, d3, id, c3), f6 === e2) break; + e2 = f6; + } + e2 !== null && d3.stopPropagation(); + } else hd(a5, b3, d3, null, c3); + } + } + var id = null; + function Yc(a5, b3, c3, d3) { + if (id = null, a5 = xb(d3), a5 = Wc(a5), a5 !== null) if (b3 = Vb(a5), b3 === null) a5 = null; + else if (c3 = b3.tag, c3 === 13) { + if (a5 = Wb(b3), a5 !== null) return a5; + a5 = null; + } else if (c3 === 3) { + if (b3.stateNode.current.memoizedState.isDehydrated) return b3.tag === 3 ? b3.stateNode.containerInfo : null; + a5 = null; + } else b3 !== a5 && (a5 = null); + return id = a5, null; + } + function jd(a5) { + switch (a5) { + case "cancel": + case "click": + case "close": + case "contextmenu": + case "copy": + case "cut": + case "auxclick": + case "dblclick": + case "dragend": + case "dragstart": + case "drop": + case "focusin": + case "focusout": + case "input": + case "invalid": + case "keydown": + case "keypress": + case "keyup": + case "mousedown": + case "mouseup": + case "paste": + case "pause": + case "play": + case "pointercancel": + case "pointerdown": + case "pointerup": + case "ratechange": + case "reset": + case "resize": + case "seeked": + case "submit": + case "touchcancel": + case "touchend": + case "touchstart": + case "volumechange": + case "change": + case "selectionchange": + case "textInput": + case "compositionstart": + case "compositionend": + case "compositionupdate": + case "beforeblur": + case "afterblur": + case "beforeinput": + case "blur": + case "fullscreenchange": + case "focus": + case "hashchange": + case "popstate": + case "select": + case "selectstart": + return 1; + case "drag": + case "dragenter": + case "dragexit": + case "dragleave": + case "dragover": + case "mousemove": + case "mouseout": + case "mouseover": + case "pointermove": + case "pointerout": + case "pointerover": + case "scroll": + case "toggle": + case "touchmove": + case "wheel": + case "mouseenter": + case "mouseleave": + case "pointerenter": + case "pointerleave": + return 4; + case "message": + switch (ec()) { + case fc: + return 1; + case gc: + return 4; + case hc: + case ic: + return 16; + case jc: + return 536870912; + default: + return 16; + } + default: + return 16; + } + } + var kd = null, ld = null, md = null; + function nd() { + if (md) return md; + var a5, b3 = ld, c3 = b3.length, d3, e2 = "value" in kd ? kd.value : kd.textContent, f6 = e2.length; + for (a5 = 0; a5 < c3 && b3[a5] === e2[a5]; a5++) ; + var g3 = c3 - a5; + for (d3 = 1; d3 <= g3 && b3[c3 - d3] === e2[f6 - d3]; d3++) ; + return md = e2.slice(a5, 1 < d3 ? 1 - d3 : void 0); + } + function od(a5) { + var b3 = a5.keyCode; + return "charCode" in a5 ? (a5 = a5.charCode, a5 === 0 && b3 === 13 && (a5 = 13)) : a5 = b3, a5 === 10 && (a5 = 13), 32 <= a5 || a5 === 13 ? a5 : 0; + } + function pd() { + return !0; + } + function qd() { + return !1; + } + function rd(a5) { + function b3(b4, d3, e2, f6, g3) { + this._reactName = b4, this._targetInst = e2, this.type = d3, this.nativeEvent = f6, this.target = g3, this.currentTarget = null; + for (var c3 in a5) a5.hasOwnProperty(c3) && (b4 = a5[c3], this[c3] = b4 ? b4(f6) : f6[c3]); + return this.isDefaultPrevented = (f6.defaultPrevented != null ? f6.defaultPrevented : f6.returnValue === !1) ? pd : qd, this.isPropagationStopped = qd, this; + } + return A3(b3.prototype, { preventDefault: function() { + this.defaultPrevented = !0; + var a6 = this.nativeEvent; + a6 && (a6.preventDefault ? a6.preventDefault() : typeof a6.returnValue != "unknown" && (a6.returnValue = !1), this.isDefaultPrevented = pd); + }, stopPropagation: function() { + var a6 = this.nativeEvent; + a6 && (a6.stopPropagation ? a6.stopPropagation() : typeof a6.cancelBubble != "unknown" && (a6.cancelBubble = !0), this.isPropagationStopped = pd); + }, persist: function() { + }, isPersistent: pd }), b3; + } + var sd = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(a5) { + return a5.timeStamp || Date.now(); + }, defaultPrevented: 0, isTrusted: 0 }, td = rd(sd), ud = A3({}, sd, { view: 0, detail: 0 }), vd = rd(ud), wd, xd, yd, Ad = A3({}, ud, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: zd, button: 0, buttons: 0, relatedTarget: function(a5) { + return a5.relatedTarget === void 0 ? a5.fromElement === a5.srcElement ? a5.toElement : a5.fromElement : a5.relatedTarget; + }, movementX: function(a5) { + return "movementX" in a5 ? a5.movementX : (a5 !== yd && (yd && a5.type === "mousemove" ? (wd = a5.screenX - yd.screenX, xd = a5.screenY - yd.screenY) : xd = wd = 0, yd = a5), wd); + }, movementY: function(a5) { + return "movementY" in a5 ? a5.movementY : xd; + } }), Bd = rd(Ad), Cd = A3({}, Ad, { dataTransfer: 0 }), Dd = rd(Cd), Ed = A3({}, ud, { relatedTarget: 0 }), Fd = rd(Ed), Gd = A3({}, sd, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Hd = rd(Gd), Id = A3({}, sd, { clipboardData: function(a5) { + return "clipboardData" in a5 ? a5.clipboardData : window.clipboardData; + } }), Jd = rd(Id), Kd = A3({}, sd, { data: 0 }), Ld = rd(Kd), Md = { + Esc: "Escape", + Spacebar: " ", + Left: "ArrowLeft", + Up: "ArrowUp", + Right: "ArrowRight", + Down: "ArrowDown", + Del: "Delete", + Win: "OS", + Menu: "ContextMenu", + Apps: "ContextMenu", + Scroll: "ScrollLock", + MozPrintableKey: "Unidentified" + }, Nd = { + 8: "Backspace", + 9: "Tab", + 12: "Clear", + 13: "Enter", + 16: "Shift", + 17: "Control", + 18: "Alt", + 19: "Pause", + 20: "CapsLock", + 27: "Escape", + 32: " ", + 33: "PageUp", + 34: "PageDown", + 35: "End", + 36: "Home", + 37: "ArrowLeft", + 38: "ArrowUp", + 39: "ArrowRight", + 40: "ArrowDown", + 45: "Insert", + 46: "Delete", + 112: "F1", + 113: "F2", + 114: "F3", + 115: "F4", + 116: "F5", + 117: "F6", + 118: "F7", + 119: "F8", + 120: "F9", + 121: "F10", + 122: "F11", + 123: "F12", + 144: "NumLock", + 145: "ScrollLock", + 224: "Meta" + }, Od = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; + function Pd(a5) { + var b3 = this.nativeEvent; + return b3.getModifierState ? b3.getModifierState(a5) : (a5 = Od[a5]) ? !!b3[a5] : !1; + } + function zd() { + return Pd; + } + var Qd = A3({}, ud, { key: function(a5) { + if (a5.key) { + var b3 = Md[a5.key] || a5.key; + if (b3 !== "Unidentified") return b3; + } + return a5.type === "keypress" ? (a5 = od(a5), a5 === 13 ? "Enter" : String.fromCharCode(a5)) : a5.type === "keydown" || a5.type === "keyup" ? Nd[a5.keyCode] || "Unidentified" : ""; + }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: zd, charCode: function(a5) { + return a5.type === "keypress" ? od(a5) : 0; + }, keyCode: function(a5) { + return a5.type === "keydown" || a5.type === "keyup" ? a5.keyCode : 0; + }, which: function(a5) { + return a5.type === "keypress" ? od(a5) : a5.type === "keydown" || a5.type === "keyup" ? a5.keyCode : 0; + } }), Rd = rd(Qd), Sd = A3({}, Ad, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Td = rd(Sd), Ud = A3({}, ud, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: zd }), Vd = rd(Ud), Wd = A3({}, sd, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), Xd = rd(Wd), Yd = A3({}, Ad, { + deltaX: function(a5) { + return "deltaX" in a5 ? a5.deltaX : "wheelDeltaX" in a5 ? -a5.wheelDeltaX : 0; + }, + deltaY: function(a5) { + return "deltaY" in a5 ? a5.deltaY : "wheelDeltaY" in a5 ? -a5.wheelDeltaY : "wheelDelta" in a5 ? -a5.wheelDelta : 0; + }, + deltaZ: 0, + deltaMode: 0 + }), Zd = rd(Yd), $d = [9, 13, 27, 32], ae = ia && "CompositionEvent" in window, be = null; + ia && "documentMode" in document && (be = document.documentMode); + var ce = ia && "TextEvent" in window && !be, de = ia && (!ae || be && 8 < be && 11 >= be), ee = " ", fe = !1; + function ge(a5, b3) { + switch (a5) { + case "keyup": + return $d.indexOf(b3.keyCode) !== -1; + case "keydown": + return b3.keyCode !== 229; + case "keypress": + case "mousedown": + case "focusout": + return !0; + default: + return !1; + } + } + function he(a5) { + return a5 = a5.detail, typeof a5 == "object" && "data" in a5 ? a5.data : null; + } + var ie = !1; + function je(a5, b3) { + switch (a5) { + case "compositionend": + return he(b3); + case "keypress": + return b3.which !== 32 ? null : (fe = !0, ee); + case "textInput": + return a5 = b3.data, a5 === ee && fe ? null : a5; + default: + return null; + } + } + function ke(a5, b3) { + if (ie) return a5 === "compositionend" || !ae && ge(a5, b3) ? (a5 = nd(), md = ld = kd = null, ie = !1, a5) : null; + switch (a5) { + case "paste": + return null; + case "keypress": + if (!(b3.ctrlKey || b3.altKey || b3.metaKey) || b3.ctrlKey && b3.altKey) { + if (b3.char && 1 < b3.char.length) return b3.char; + if (b3.which) return String.fromCharCode(b3.which); + } + return null; + case "compositionend": + return de && b3.locale !== "ko" ? null : b3.data; + default: + return null; + } + } + var le = { color: !0, date: !0, datetime: !0, "datetime-local": !0, email: !0, month: !0, number: !0, password: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 }; + function me(a5) { + var b3 = a5 && a5.nodeName && a5.nodeName.toLowerCase(); + return b3 === "input" ? !!le[a5.type] : b3 === "textarea"; + } + function ne(a5, b3, c3, d3) { + Eb(d3), b3 = oe(b3, "onChange"), 0 < b3.length && (c3 = new td("onChange", "change", null, c3, d3), a5.push({ event: c3, listeners: b3 })); + } + var pe = null, qe = null; + function re2(a5) { + se(a5, 0); + } + function te(a5) { + var b3 = ue(a5); + if (Wa(b3)) return a5; + } + function ve(a5, b3) { + if (a5 === "change") return b3; + } + var we = !1; + ia && (ia ? (ye = "oninput" in document, ye || (ze = document.createElement("div"), ze.setAttribute("oninput", "return;"), ye = typeof ze.oninput == "function"), xe = ye) : xe = !1, we = xe && (!document.documentMode || 9 < document.documentMode)); + var xe, ye, ze; + function Ae() { + pe && (pe.detachEvent("onpropertychange", Be), qe = pe = null); + } + function Be(a5) { + if (a5.propertyName === "value" && te(qe)) { + var b3 = []; + ne(b3, qe, a5, xb(a5)), Jb(re2, b3); + } + } + function Ce(a5, b3, c3) { + a5 === "focusin" ? (Ae(), pe = b3, qe = c3, pe.attachEvent("onpropertychange", Be)) : a5 === "focusout" && Ae(); + } + function De(a5) { + if (a5 === "selectionchange" || a5 === "keyup" || a5 === "keydown") return te(qe); + } + function Ee(a5, b3) { + if (a5 === "click") return te(b3); + } + function Fe(a5, b3) { + if (a5 === "input" || a5 === "change") return te(b3); + } + function Ge(a5, b3) { + return a5 === b3 && (a5 !== 0 || 1 / a5 === 1 / b3) || a5 !== a5 && b3 !== b3; + } + var He = typeof Object.is == "function" ? Object.is : Ge; + function Ie(a5, b3) { + if (He(a5, b3)) return !0; + if (typeof a5 != "object" || a5 === null || typeof b3 != "object" || b3 === null) return !1; + var c3 = Object.keys(a5), d3 = Object.keys(b3); + if (c3.length !== d3.length) return !1; + for (d3 = 0; d3 < c3.length; d3++) { + var e2 = c3[d3]; + if (!ja.call(b3, e2) || !He(a5[e2], b3[e2])) return !1; + } + return !0; + } + function Je(a5) { + for (; a5 && a5.firstChild; ) a5 = a5.firstChild; + return a5; + } + function Ke(a5, b3) { + var c3 = Je(a5); + a5 = 0; + for (var d3; c3; ) { + if (c3.nodeType === 3) { + if (d3 = a5 + c3.textContent.length, a5 <= b3 && d3 >= b3) return { node: c3, offset: b3 - a5 }; + a5 = d3; + } + a: { + for (; c3; ) { + if (c3.nextSibling) { + c3 = c3.nextSibling; + break a; + } + c3 = c3.parentNode; + } + c3 = void 0; + } + c3 = Je(c3); + } + } + function Le(a5, b3) { + return a5 && b3 ? a5 === b3 ? !0 : a5 && a5.nodeType === 3 ? !1 : b3 && b3.nodeType === 3 ? Le(a5, b3.parentNode) : "contains" in a5 ? a5.contains(b3) : a5.compareDocumentPosition ? !!(a5.compareDocumentPosition(b3) & 16) : !1 : !1; + } + function Me() { + for (var a5 = window, b3 = Xa(); b3 instanceof a5.HTMLIFrameElement; ) { + try { + var c3 = typeof b3.contentWindow.location.href == "string"; + } catch { + c3 = !1; + } + if (c3) a5 = b3.contentWindow; + else break; + b3 = Xa(a5.document); + } + return b3; + } + function Ne(a5) { + var b3 = a5 && a5.nodeName && a5.nodeName.toLowerCase(); + return b3 && (b3 === "input" && (a5.type === "text" || a5.type === "search" || a5.type === "tel" || a5.type === "url" || a5.type === "password") || b3 === "textarea" || a5.contentEditable === "true"); + } + function Oe(a5) { + var b3 = Me(), c3 = a5.focusedElem, d3 = a5.selectionRange; + if (b3 !== c3 && c3 && c3.ownerDocument && Le(c3.ownerDocument.documentElement, c3)) { + if (d3 !== null && Ne(c3)) { + if (b3 = d3.start, a5 = d3.end, a5 === void 0 && (a5 = b3), "selectionStart" in c3) c3.selectionStart = b3, c3.selectionEnd = Math.min(a5, c3.value.length); + else if (a5 = (b3 = c3.ownerDocument || document) && b3.defaultView || window, a5.getSelection) { + a5 = a5.getSelection(); + var e2 = c3.textContent.length, f6 = Math.min(d3.start, e2); + d3 = d3.end === void 0 ? f6 : Math.min(d3.end, e2), !a5.extend && f6 > d3 && (e2 = d3, d3 = f6, f6 = e2), e2 = Ke(c3, f6); + var g3 = Ke( + c3, + d3 + ); + e2 && g3 && (a5.rangeCount !== 1 || a5.anchorNode !== e2.node || a5.anchorOffset !== e2.offset || a5.focusNode !== g3.node || a5.focusOffset !== g3.offset) && (b3 = b3.createRange(), b3.setStart(e2.node, e2.offset), a5.removeAllRanges(), f6 > d3 ? (a5.addRange(b3), a5.extend(g3.node, g3.offset)) : (b3.setEnd(g3.node, g3.offset), a5.addRange(b3))); + } + } + for (b3 = [], a5 = c3; a5 = a5.parentNode; ) a5.nodeType === 1 && b3.push({ element: a5, left: a5.scrollLeft, top: a5.scrollTop }); + for (typeof c3.focus == "function" && c3.focus(), c3 = 0; c3 < b3.length; c3++) a5 = b3[c3], a5.element.scrollLeft = a5.left, a5.element.scrollTop = a5.top; + } + } + var Pe = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re = null, Se = null, Te = !1; + function Ue(a5, b3, c3) { + var d3 = c3.window === c3 ? c3.document : c3.nodeType === 9 ? c3 : c3.ownerDocument; + Te || Qe == null || Qe !== Xa(d3) || (d3 = Qe, "selectionStart" in d3 && Ne(d3) ? d3 = { start: d3.selectionStart, end: d3.selectionEnd } : (d3 = (d3.ownerDocument && d3.ownerDocument.defaultView || window).getSelection(), d3 = { anchorNode: d3.anchorNode, anchorOffset: d3.anchorOffset, focusNode: d3.focusNode, focusOffset: d3.focusOffset }), Se && Ie(Se, d3) || (Se = d3, d3 = oe(Re, "onSelect"), 0 < d3.length && (b3 = new td("onSelect", "select", null, b3, c3), a5.push({ event: b3, listeners: d3 }), b3.target = Qe))); + } + function Ve(a5, b3) { + var c3 = {}; + return c3[a5.toLowerCase()] = b3.toLowerCase(), c3["Webkit" + a5] = "webkit" + b3, c3["Moz" + a5] = "moz" + b3, c3; + } + var We = { animationend: Ve("Animation", "AnimationEnd"), animationiteration: Ve("Animation", "AnimationIteration"), animationstart: Ve("Animation", "AnimationStart"), transitionend: Ve("Transition", "TransitionEnd") }, Xe = {}, Ye = {}; + ia && (Ye = document.createElement("div").style, "AnimationEvent" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), "TransitionEvent" in window || delete We.transitionend.transition); + function Ze(a5) { + if (Xe[a5]) return Xe[a5]; + if (!We[a5]) return a5; + var b3 = We[a5], c3; + for (c3 in b3) if (b3.hasOwnProperty(c3) && c3 in Ye) return Xe[a5] = b3[c3]; + return a5; + } + var $e = Ze("animationend"), af = Ze("animationiteration"), bf = Ze("animationstart"), cf = Ze("transitionend"), df = /* @__PURE__ */ new Map(), ef = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); + function ff(a5, b3) { + df.set(a5, b3), fa(b3, [a5]); + } + for (gf = 0; gf < ef.length; gf++) + hf = ef[gf], jf = hf.toLowerCase(), kf = hf[0].toUpperCase() + hf.slice(1), ff(jf, "on" + kf); + var hf, jf, kf, gf; + ff($e, "onAnimationEnd"); + ff(af, "onAnimationIteration"); + ff(bf, "onAnimationStart"); + ff("dblclick", "onDoubleClick"); + ff("focusin", "onFocus"); + ff("focusout", "onBlur"); + ff(cf, "onTransitionEnd"); + ha("onMouseEnter", ["mouseout", "mouseover"]); + ha("onMouseLeave", ["mouseout", "mouseover"]); + ha("onPointerEnter", ["pointerout", "pointerover"]); + ha("onPointerLeave", ["pointerout", "pointerover"]); + fa("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")); + fa("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")); + fa("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]); + fa("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")); + fa("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")); + fa("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" ")); + var lf = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), mf = new Set("cancel close invalid load scroll toggle".split(" ").concat(lf)); + function nf(a5, b3, c3) { + var d3 = a5.type || "unknown-event"; + a5.currentTarget = c3, Ub(d3, b3, void 0, a5), a5.currentTarget = null; + } + function se(a5, b3) { + b3 = (b3 & 4) !== 0; + for (var c3 = 0; c3 < a5.length; c3++) { + var d3 = a5[c3], e2 = d3.event; + d3 = d3.listeners; + a: { + var f6 = void 0; + if (b3) for (var g3 = d3.length - 1; 0 <= g3; g3--) { + var h4 = d3[g3], k = h4.instance, l3 = h4.currentTarget; + if (h4 = h4.listener, k !== f6 && e2.isPropagationStopped()) break a; + nf(e2, h4, l3), f6 = k; + } + else for (g3 = 0; g3 < d3.length; g3++) { + if (h4 = d3[g3], k = h4.instance, l3 = h4.currentTarget, h4 = h4.listener, k !== f6 && e2.isPropagationStopped()) break a; + nf(e2, h4, l3), f6 = k; + } + } + } + if (Qb) throw a5 = Rb, Qb = !1, Rb = null, a5; + } + function D(a5, b3) { + var c3 = b3[of]; + c3 === void 0 && (c3 = b3[of] = /* @__PURE__ */ new Set()); + var d3 = a5 + "__bubble"; + c3.has(d3) || (pf(b3, a5, 2, !1), c3.add(d3)); + } + function qf(a5, b3, c3) { + var d3 = 0; + b3 && (d3 |= 4), pf(c3, a5, d3, b3); + } + var rf = "_reactListening" + Math.random().toString(36).slice(2); + function sf(a5) { + if (!a5[rf]) { + a5[rf] = !0, da.forEach(function(b4) { + b4 !== "selectionchange" && (mf.has(b4) || qf(b4, !1, a5), qf(b4, !0, a5)); + }); + var b3 = a5.nodeType === 9 ? a5 : a5.ownerDocument; + b3 === null || b3[rf] || (b3[rf] = !0, qf("selectionchange", !1, b3)); + } + } + function pf(a5, b3, c3, d3) { + switch (jd(b3)) { + case 1: + var e2 = ed; + break; + case 4: + e2 = gd; + break; + default: + e2 = fd; + } + c3 = e2.bind(null, b3, c3, a5), e2 = void 0, !Lb || b3 !== "touchstart" && b3 !== "touchmove" && b3 !== "wheel" || (e2 = !0), d3 ? e2 !== void 0 ? a5.addEventListener(b3, c3, { capture: !0, passive: e2 }) : a5.addEventListener(b3, c3, !0) : e2 !== void 0 ? a5.addEventListener(b3, c3, { passive: e2 }) : a5.addEventListener(b3, c3, !1); + } + function hd(a5, b3, c3, d3, e2) { + var f6 = d3; + if ((b3 & 1) === 0 && (b3 & 2) === 0 && d3 !== null) a: for (; ; ) { + if (d3 === null) return; + var g3 = d3.tag; + if (g3 === 3 || g3 === 4) { + var h4 = d3.stateNode.containerInfo; + if (h4 === e2 || h4.nodeType === 8 && h4.parentNode === e2) break; + if (g3 === 4) for (g3 = d3.return; g3 !== null; ) { + var k = g3.tag; + if ((k === 3 || k === 4) && (k = g3.stateNode.containerInfo, k === e2 || k.nodeType === 8 && k.parentNode === e2)) return; + g3 = g3.return; + } + for (; h4 !== null; ) { + if (g3 = Wc(h4), g3 === null) return; + if (k = g3.tag, k === 5 || k === 6) { + d3 = f6 = g3; + continue a; + } + h4 = h4.parentNode; + } + } + d3 = d3.return; + } + Jb(function() { + var d4 = f6, e3 = xb(c3), g4 = []; + a: { + var h5 = df.get(a5); + if (h5 !== void 0) { + var k2 = td, n3 = a5; + switch (a5) { + case "keypress": + if (od(c3) === 0) break a; + case "keydown": + case "keyup": + k2 = Rd; + break; + case "focusin": + n3 = "focus", k2 = Fd; + break; + case "focusout": + n3 = "blur", k2 = Fd; + break; + case "beforeblur": + case "afterblur": + k2 = Fd; + break; + case "click": + if (c3.button === 2) break a; + case "auxclick": + case "dblclick": + case "mousedown": + case "mousemove": + case "mouseup": + case "mouseout": + case "mouseover": + case "contextmenu": + k2 = Bd; + break; + case "drag": + case "dragend": + case "dragenter": + case "dragexit": + case "dragleave": + case "dragover": + case "dragstart": + case "drop": + k2 = Dd; + break; + case "touchcancel": + case "touchend": + case "touchmove": + case "touchstart": + k2 = Vd; + break; + case $e: + case af: + case bf: + k2 = Hd; + break; + case cf: + k2 = Xd; + break; + case "scroll": + k2 = vd; + break; + case "wheel": + k2 = Zd; + break; + case "copy": + case "cut": + case "paste": + k2 = Jd; + break; + case "gotpointercapture": + case "lostpointercapture": + case "pointercancel": + case "pointerdown": + case "pointermove": + case "pointerout": + case "pointerover": + case "pointerup": + k2 = Td; + } + var t2 = (b3 & 4) !== 0, J = !t2 && a5 === "scroll", x2 = t2 ? h5 !== null ? h5 + "Capture" : null : h5; + t2 = []; + for (var w3 = d4, u4; w3 !== null; ) { + u4 = w3; + var F = u4.stateNode; + if (u4.tag === 5 && F !== null && (u4 = F, x2 !== null && (F = Kb(w3, x2), F != null && t2.push(tf(w3, F, u4)))), J) break; + w3 = w3.return; + } + 0 < t2.length && (h5 = new k2(h5, n3, null, c3, e3), g4.push({ event: h5, listeners: t2 })); + } + } + if ((b3 & 7) === 0) { + a: { + if (h5 = a5 === "mouseover" || a5 === "pointerover", k2 = a5 === "mouseout" || a5 === "pointerout", h5 && c3 !== wb && (n3 = c3.relatedTarget || c3.fromElement) && (Wc(n3) || n3[uf])) break a; + if ((k2 || h5) && (h5 = e3.window === e3 ? e3 : (h5 = e3.ownerDocument) ? h5.defaultView || h5.parentWindow : window, k2 ? (n3 = c3.relatedTarget || c3.toElement, k2 = d4, n3 = n3 ? Wc(n3) : null, n3 !== null && (J = Vb(n3), n3 !== J || n3.tag !== 5 && n3.tag !== 6) && (n3 = null)) : (k2 = null, n3 = d4), k2 !== n3)) { + if (t2 = Bd, F = "onMouseLeave", x2 = "onMouseEnter", w3 = "mouse", (a5 === "pointerout" || a5 === "pointerover") && (t2 = Td, F = "onPointerLeave", x2 = "onPointerEnter", w3 = "pointer"), J = k2 == null ? h5 : ue(k2), u4 = n3 == null ? h5 : ue(n3), h5 = new t2(F, w3 + "leave", k2, c3, e3), h5.target = J, h5.relatedTarget = u4, F = null, Wc(e3) === d4 && (t2 = new t2(x2, w3 + "enter", n3, c3, e3), t2.target = u4, t2.relatedTarget = J, F = t2), J = F, k2 && n3) b: { + for (t2 = k2, x2 = n3, w3 = 0, u4 = t2; u4; u4 = vf(u4)) w3++; + for (u4 = 0, F = x2; F; F = vf(F)) u4++; + for (; 0 < w3 - u4; ) t2 = vf(t2), w3--; + for (; 0 < u4 - w3; ) x2 = vf(x2), u4--; + for (; w3--; ) { + if (t2 === x2 || x2 !== null && t2 === x2.alternate) break b; + t2 = vf(t2), x2 = vf(x2); + } + t2 = null; + } + else t2 = null; + k2 !== null && wf(g4, h5, k2, t2, !1), n3 !== null && J !== null && wf(g4, J, n3, t2, !0); + } + } + a: { + if (h5 = d4 ? ue(d4) : window, k2 = h5.nodeName && h5.nodeName.toLowerCase(), k2 === "select" || k2 === "input" && h5.type === "file") var na = ve; + else if (me(h5)) if (we) na = Fe; + else { + na = De; + var xa = Ce; + } + else (k2 = h5.nodeName) && k2.toLowerCase() === "input" && (h5.type === "checkbox" || h5.type === "radio") && (na = Ee); + if (na && (na = na(a5, d4))) { + ne(g4, na, c3, e3); + break a; + } + xa && xa(a5, h5, d4), a5 === "focusout" && (xa = h5._wrapperState) && xa.controlled && h5.type === "number" && cb(h5, "number", h5.value); + } + switch (xa = d4 ? ue(d4) : window, a5) { + case "focusin": + (me(xa) || xa.contentEditable === "true") && (Qe = xa, Re = d4, Se = null); + break; + case "focusout": + Se = Re = Qe = null; + break; + case "mousedown": + Te = !0; + break; + case "contextmenu": + case "mouseup": + case "dragend": + Te = !1, Ue(g4, c3, e3); + break; + case "selectionchange": + if (Pe) break; + case "keydown": + case "keyup": + Ue(g4, c3, e3); + } + var $a; + if (ae) b: { + switch (a5) { + case "compositionstart": + var ba = "onCompositionStart"; + break b; + case "compositionend": + ba = "onCompositionEnd"; + break b; + case "compositionupdate": + ba = "onCompositionUpdate"; + break b; + } + ba = void 0; + } + else ie ? ge(a5, c3) && (ba = "onCompositionEnd") : a5 === "keydown" && c3.keyCode === 229 && (ba = "onCompositionStart"); + ba && (de && c3.locale !== "ko" && (ie || ba !== "onCompositionStart" ? ba === "onCompositionEnd" && ie && ($a = nd()) : (kd = e3, ld = "value" in kd ? kd.value : kd.textContent, ie = !0)), xa = oe(d4, ba), 0 < xa.length && (ba = new Ld(ba, a5, null, c3, e3), g4.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he(c3), $a !== null && (ba.data = $a)))), ($a = ce ? je(a5, c3) : ke(a5, c3)) && (d4 = oe(d4, "onBeforeInput"), 0 < d4.length && (e3 = new Ld("onBeforeInput", "beforeinput", null, c3, e3), g4.push({ event: e3, listeners: d4 }), e3.data = $a)); + } + se(g4, b3); + }); + } + function tf(a5, b3, c3) { + return { instance: a5, listener: b3, currentTarget: c3 }; + } + function oe(a5, b3) { + for (var c3 = b3 + "Capture", d3 = []; a5 !== null; ) { + var e2 = a5, f6 = e2.stateNode; + e2.tag === 5 && f6 !== null && (e2 = f6, f6 = Kb(a5, c3), f6 != null && d3.unshift(tf(a5, f6, e2)), f6 = Kb(a5, b3), f6 != null && d3.push(tf(a5, f6, e2))), a5 = a5.return; + } + return d3; + } + function vf(a5) { + if (a5 === null) return null; + do + a5 = a5.return; + while (a5 && a5.tag !== 5); + return a5 || null; + } + function wf(a5, b3, c3, d3, e2) { + for (var f6 = b3._reactName, g3 = []; c3 !== null && c3 !== d3; ) { + var h4 = c3, k = h4.alternate, l3 = h4.stateNode; + if (k !== null && k === d3) break; + h4.tag === 5 && l3 !== null && (h4 = l3, e2 ? (k = Kb(c3, f6), k != null && g3.unshift(tf(c3, k, h4))) : e2 || (k = Kb(c3, f6), k != null && g3.push(tf(c3, k, h4)))), c3 = c3.return; + } + g3.length !== 0 && a5.push({ event: b3, listeners: g3 }); + } + var xf = /\r\n?/g, yf = /\u0000|\uFFFD/g; + function zf(a5) { + return (typeof a5 == "string" ? a5 : "" + a5).replace(xf, ` +`).replace(yf, ""); + } + function Af(a5, b3, c3) { + if (b3 = zf(b3), zf(a5) !== b3 && c3) throw Error(p5(425)); + } + function Bf() { + } + var Cf = null, Df = null; + function Ef(a5, b3) { + return a5 === "textarea" || a5 === "noscript" || typeof b3.children == "string" || typeof b3.children == "number" || typeof b3.dangerouslySetInnerHTML == "object" && b3.dangerouslySetInnerHTML !== null && b3.dangerouslySetInnerHTML.__html != null; + } + var Ff = typeof setTimeout == "function" ? setTimeout : void 0, Gf = typeof clearTimeout == "function" ? clearTimeout : void 0, Hf = typeof Promise == "function" ? Promise : void 0, Jf = typeof queueMicrotask == "function" ? queueMicrotask : typeof Hf < "u" ? function(a5) { + return Hf.resolve(null).then(a5).catch(If); + } : Ff; + function If(a5) { + setTimeout(function() { + throw a5; + }); + } + function Kf(a5, b3) { + var c3 = b3, d3 = 0; + do { + var e2 = c3.nextSibling; + if (a5.removeChild(c3), e2 && e2.nodeType === 8) if (c3 = e2.data, c3 === "/$") { + if (d3 === 0) { + a5.removeChild(e2), bd(b3); + return; + } + d3--; + } else c3 !== "$" && c3 !== "$?" && c3 !== "$!" || d3++; + c3 = e2; + } while (c3); + bd(b3); + } + function Lf(a5) { + for (; a5 != null; a5 = a5.nextSibling) { + var b3 = a5.nodeType; + if (b3 === 1 || b3 === 3) break; + if (b3 === 8) { + if (b3 = a5.data, b3 === "$" || b3 === "$!" || b3 === "$?") break; + if (b3 === "/$") return null; + } + } + return a5; + } + function Mf(a5) { + a5 = a5.previousSibling; + for (var b3 = 0; a5; ) { + if (a5.nodeType === 8) { + var c3 = a5.data; + if (c3 === "$" || c3 === "$!" || c3 === "$?") { + if (b3 === 0) return a5; + b3--; + } else c3 === "/$" && b3++; + } + a5 = a5.previousSibling; + } + return null; + } + var Nf = Math.random().toString(36).slice(2), Of = "__reactFiber$" + Nf, Pf = "__reactProps$" + Nf, uf = "__reactContainer$" + Nf, of = "__reactEvents$" + Nf, Qf = "__reactListeners$" + Nf, Rf = "__reactHandles$" + Nf; + function Wc(a5) { + var b3 = a5[Of]; + if (b3) return b3; + for (var c3 = a5.parentNode; c3; ) { + if (b3 = c3[uf] || c3[Of]) { + if (c3 = b3.alternate, b3.child !== null || c3 !== null && c3.child !== null) for (a5 = Mf(a5); a5 !== null; ) { + if (c3 = a5[Of]) return c3; + a5 = Mf(a5); + } + return b3; + } + a5 = c3, c3 = a5.parentNode; + } + return null; + } + function Cb(a5) { + return a5 = a5[Of] || a5[uf], !a5 || a5.tag !== 5 && a5.tag !== 6 && a5.tag !== 13 && a5.tag !== 3 ? null : a5; + } + function ue(a5) { + if (a5.tag === 5 || a5.tag === 6) return a5.stateNode; + throw Error(p5(33)); + } + function Db(a5) { + return a5[Pf] || null; + } + var Sf = [], Tf = -1; + function Uf(a5) { + return { current: a5 }; + } + function E2(a5) { + 0 > Tf || (a5.current = Sf[Tf], Sf[Tf] = null, Tf--); + } + function G(a5, b3) { + Tf++, Sf[Tf] = a5.current, a5.current = b3; + } + var Vf = {}, H = Uf(Vf), Wf = Uf(!1), Xf = Vf; + function Yf(a5, b3) { + var c3 = a5.type.contextTypes; + if (!c3) return Vf; + var d3 = a5.stateNode; + if (d3 && d3.__reactInternalMemoizedUnmaskedChildContext === b3) return d3.__reactInternalMemoizedMaskedChildContext; + var e2 = {}, f6; + for (f6 in c3) e2[f6] = b3[f6]; + return d3 && (a5 = a5.stateNode, a5.__reactInternalMemoizedUnmaskedChildContext = b3, a5.__reactInternalMemoizedMaskedChildContext = e2), e2; + } + function Zf(a5) { + return a5 = a5.childContextTypes, a5 != null; + } + function $f() { + E2(Wf), E2(H); + } + function ag(a5, b3, c3) { + if (H.current !== Vf) throw Error(p5(168)); + G(H, b3), G(Wf, c3); + } + function bg(a5, b3, c3) { + var d3 = a5.stateNode; + if (b3 = b3.childContextTypes, typeof d3.getChildContext != "function") return c3; + d3 = d3.getChildContext(); + for (var e2 in d3) if (!(e2 in b3)) throw Error(p5(108, Ra(a5) || "Unknown", e2)); + return A3({}, c3, d3); + } + function cg(a5) { + return a5 = (a5 = a5.stateNode) && a5.__reactInternalMemoizedMergedChildContext || Vf, Xf = H.current, G(H, a5), G(Wf, Wf.current), !0; + } + function dg(a5, b3, c3) { + var d3 = a5.stateNode; + if (!d3) throw Error(p5(169)); + c3 ? (a5 = bg(a5, b3, Xf), d3.__reactInternalMemoizedMergedChildContext = a5, E2(Wf), E2(H), G(H, a5)) : E2(Wf), G(Wf, c3); + } + var eg = null, fg = !1, gg = !1; + function hg(a5) { + eg === null ? eg = [a5] : eg.push(a5); + } + function ig(a5) { + fg = !0, hg(a5); + } + function jg() { + if (!gg && eg !== null) { + gg = !0; + var a5 = 0, b3 = C3; + try { + var c3 = eg; + for (C3 = 1; a5 < c3.length; a5++) { + var d3 = c3[a5]; + do + d3 = d3(!0); + while (d3 !== null); + } + eg = null, fg = !1; + } catch (e2) { + throw eg !== null && (eg = eg.slice(a5 + 1)), ac(fc, jg), e2; + } finally { + C3 = b3, gg = !1; + } + } + return null; + } + var kg = [], lg = 0, mg = null, ng = 0, og = [], pg = 0, qg = null, rg = 1, sg = ""; + function tg(a5, b3) { + kg[lg++] = ng, kg[lg++] = mg, mg = a5, ng = b3; + } + function ug(a5, b3, c3) { + og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, qg = a5; + var d3 = rg; + a5 = sg; + var e2 = 32 - oc(d3) - 1; + d3 &= ~(1 << e2), c3 += 1; + var f6 = 32 - oc(b3) + e2; + if (30 < f6) { + var g3 = e2 - e2 % 5; + f6 = (d3 & (1 << g3) - 1).toString(32), d3 >>= g3, e2 -= g3, rg = 1 << 32 - oc(b3) + e2 | c3 << e2 | d3, sg = f6 + a5; + } else rg = 1 << f6 | c3 << e2 | d3, sg = a5; + } + function vg(a5) { + a5.return !== null && (tg(a5, 1), ug(a5, 1, 0)); + } + function wg(a5) { + for (; a5 === mg; ) mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null; + for (; a5 === qg; ) qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null; + } + var xg = null, yg = null, I = !1, zg = null; + function Ag(a5, b3) { + var c3 = Bg(5, null, null, 0); + c3.elementType = "DELETED", c3.stateNode = b3, c3.return = a5, b3 = a5.deletions, b3 === null ? (a5.deletions = [c3], a5.flags |= 16) : b3.push(c3); + } + function Cg(a5, b3) { + switch (a5.tag) { + case 5: + var c3 = a5.type; + return b3 = b3.nodeType !== 1 || c3.toLowerCase() !== b3.nodeName.toLowerCase() ? null : b3, b3 !== null ? (a5.stateNode = b3, xg = a5, yg = Lf(b3.firstChild), !0) : !1; + case 6: + return b3 = a5.pendingProps === "" || b3.nodeType !== 3 ? null : b3, b3 !== null ? (a5.stateNode = b3, xg = a5, yg = null, !0) : !1; + case 13: + return b3 = b3.nodeType !== 8 ? null : b3, b3 !== null ? (c3 = qg !== null ? { id: rg, overflow: sg } : null, a5.memoizedState = { dehydrated: b3, treeContext: c3, retryLane: 1073741824 }, c3 = Bg(18, null, null, 0), c3.stateNode = b3, c3.return = a5, a5.child = c3, xg = a5, yg = null, !0) : !1; + default: + return !1; + } + } + function Dg(a5) { + return (a5.mode & 1) !== 0 && (a5.flags & 128) === 0; + } + function Eg(a5) { + if (I) { + var b3 = yg; + if (b3) { + var c3 = b3; + if (!Cg(a5, b3)) { + if (Dg(a5)) throw Error(p5(418)); + b3 = Lf(c3.nextSibling); + var d3 = xg; + b3 && Cg(a5, b3) ? Ag(d3, c3) : (a5.flags = a5.flags & -4097 | 2, I = !1, xg = a5); + } + } else { + if (Dg(a5)) throw Error(p5(418)); + a5.flags = a5.flags & -4097 | 2, I = !1, xg = a5; + } + } + } + function Fg(a5) { + for (a5 = a5.return; a5 !== null && a5.tag !== 5 && a5.tag !== 3 && a5.tag !== 13; ) a5 = a5.return; + xg = a5; + } + function Gg(a5) { + if (a5 !== xg) return !1; + if (!I) return Fg(a5), I = !0, !1; + var b3; + if ((b3 = a5.tag !== 3) && !(b3 = a5.tag !== 5) && (b3 = a5.type, b3 = b3 !== "head" && b3 !== "body" && !Ef(a5.type, a5.memoizedProps)), b3 && (b3 = yg)) { + if (Dg(a5)) throw Hg(), Error(p5(418)); + for (; b3; ) Ag(a5, b3), b3 = Lf(b3.nextSibling); + } + if (Fg(a5), a5.tag === 13) { + if (a5 = a5.memoizedState, a5 = a5 !== null ? a5.dehydrated : null, !a5) throw Error(p5(317)); + a: { + for (a5 = a5.nextSibling, b3 = 0; a5; ) { + if (a5.nodeType === 8) { + var c3 = a5.data; + if (c3 === "/$") { + if (b3 === 0) { + yg = Lf(a5.nextSibling); + break a; + } + b3--; + } else c3 !== "$" && c3 !== "$!" && c3 !== "$?" || b3++; + } + a5 = a5.nextSibling; + } + yg = null; + } + } else yg = xg ? Lf(a5.stateNode.nextSibling) : null; + return !0; + } + function Hg() { + for (var a5 = yg; a5; ) a5 = Lf(a5.nextSibling); + } + function Ig() { + yg = xg = null, I = !1; + } + function Jg(a5) { + zg === null ? zg = [a5] : zg.push(a5); + } + var Kg = ua.ReactCurrentBatchConfig; + function Lg(a5, b3, c3) { + if (a5 = c3.ref, a5 !== null && typeof a5 != "function" && typeof a5 != "object") { + if (c3._owner) { + if (c3 = c3._owner, c3) { + if (c3.tag !== 1) throw Error(p5(309)); + var d3 = c3.stateNode; + } + if (!d3) throw Error(p5(147, a5)); + var e2 = d3, f6 = "" + a5; + return b3 !== null && b3.ref !== null && typeof b3.ref == "function" && b3.ref._stringRef === f6 ? b3.ref : (b3 = function(a6) { + var b4 = e2.refs; + a6 === null ? delete b4[f6] : b4[f6] = a6; + }, b3._stringRef = f6, b3); + } + if (typeof a5 != "string") throw Error(p5(284)); + if (!c3._owner) throw Error(p5(290, a5)); + } + return a5; + } + function Mg(a5, b3) { + throw a5 = Object.prototype.toString.call(b3), Error(p5(31, a5 === "[object Object]" ? "object with keys {" + Object.keys(b3).join(", ") + "}" : a5)); + } + function Ng(a5) { + var b3 = a5._init; + return b3(a5._payload); + } + function Og(a5) { + function b3(b4, c4) { + if (a5) { + var d4 = b4.deletions; + d4 === null ? (b4.deletions = [c4], b4.flags |= 16) : d4.push(c4); + } + } + function c3(c4, d4) { + if (!a5) return null; + for (; d4 !== null; ) b3(c4, d4), d4 = d4.sibling; + return null; + } + function d3(a6, b4) { + for (a6 = /* @__PURE__ */ new Map(); b4 !== null; ) b4.key !== null ? a6.set(b4.key, b4) : a6.set(b4.index, b4), b4 = b4.sibling; + return a6; + } + function e2(a6, b4) { + return a6 = Pg(a6, b4), a6.index = 0, a6.sibling = null, a6; + } + function f6(b4, c4, d4) { + return b4.index = d4, a5 ? (d4 = b4.alternate, d4 !== null ? (d4 = d4.index, d4 < c4 ? (b4.flags |= 2, c4) : d4) : (b4.flags |= 2, c4)) : (b4.flags |= 1048576, c4); + } + function g3(b4) { + return a5 && b4.alternate === null && (b4.flags |= 2), b4; + } + function h4(a6, b4, c4, d4) { + return b4 === null || b4.tag !== 6 ? (b4 = Qg(c4, a6.mode, d4), b4.return = a6, b4) : (b4 = e2(b4, c4), b4.return = a6, b4); + } + function k(a6, b4, c4, d4) { + var f7 = c4.type; + return f7 === ya ? m5(a6, b4, c4.props.children, d4, c4.key) : b4 !== null && (b4.elementType === f7 || typeof f7 == "object" && f7 !== null && f7.$$typeof === Ha && Ng(f7) === b4.type) ? (d4 = e2(b4, c4.props), d4.ref = Lg(a6, b4, c4), d4.return = a6, d4) : (d4 = Rg(c4.type, c4.key, c4.props, null, a6.mode, d4), d4.ref = Lg(a6, b4, c4), d4.return = a6, d4); + } + function l3(a6, b4, c4, d4) { + return b4 === null || b4.tag !== 4 || b4.stateNode.containerInfo !== c4.containerInfo || b4.stateNode.implementation !== c4.implementation ? (b4 = Sg(c4, a6.mode, d4), b4.return = a6, b4) : (b4 = e2(b4, c4.children || []), b4.return = a6, b4); + } + function m5(a6, b4, c4, d4, f7) { + return b4 === null || b4.tag !== 7 ? (b4 = Tg(c4, a6.mode, d4, f7), b4.return = a6, b4) : (b4 = e2(b4, c4), b4.return = a6, b4); + } + function q(a6, b4, c4) { + if (typeof b4 == "string" && b4 !== "" || typeof b4 == "number") return b4 = Qg("" + b4, a6.mode, c4), b4.return = a6, b4; + if (typeof b4 == "object" && b4 !== null) { + switch (b4.$$typeof) { + case va: + return c4 = Rg(b4.type, b4.key, b4.props, null, a6.mode, c4), c4.ref = Lg(a6, null, b4), c4.return = a6, c4; + case wa: + return b4 = Sg(b4, a6.mode, c4), b4.return = a6, b4; + case Ha: + var d4 = b4._init; + return q(a6, d4(b4._payload), c4); + } + if (eb(b4) || Ka(b4)) return b4 = Tg(b4, a6.mode, c4, null), b4.return = a6, b4; + Mg(a6, b4); + } + return null; + } + function r3(a6, b4, c4, d4) { + var e3 = b4 !== null ? b4.key : null; + if (typeof c4 == "string" && c4 !== "" || typeof c4 == "number") return e3 !== null ? null : h4(a6, b4, "" + c4, d4); + if (typeof c4 == "object" && c4 !== null) { + switch (c4.$$typeof) { + case va: + return c4.key === e3 ? k(a6, b4, c4, d4) : null; + case wa: + return c4.key === e3 ? l3(a6, b4, c4, d4) : null; + case Ha: + return e3 = c4._init, r3( + a6, + b4, + e3(c4._payload), + d4 + ); + } + if (eb(c4) || Ka(c4)) return e3 !== null ? null : m5(a6, b4, c4, d4, null); + Mg(a6, c4); + } + return null; + } + function y3(a6, b4, c4, d4, e3) { + if (typeof d4 == "string" && d4 !== "" || typeof d4 == "number") return a6 = a6.get(c4) || null, h4(b4, a6, "" + d4, e3); + if (typeof d4 == "object" && d4 !== null) { + switch (d4.$$typeof) { + case va: + return a6 = a6.get(d4.key === null ? c4 : d4.key) || null, k(b4, a6, d4, e3); + case wa: + return a6 = a6.get(d4.key === null ? c4 : d4.key) || null, l3(b4, a6, d4, e3); + case Ha: + var f7 = d4._init; + return y3(a6, b4, c4, f7(d4._payload), e3); + } + if (eb(d4) || Ka(d4)) return a6 = a6.get(c4) || null, m5(b4, a6, d4, e3, null); + Mg(b4, d4); + } + return null; + } + function n3(e3, g4, h5, k2) { + for (var l4 = null, m6 = null, u4 = g4, w3 = g4 = 0, x2 = null; u4 !== null && w3 < h5.length; w3++) { + u4.index > w3 ? (x2 = u4, u4 = null) : x2 = u4.sibling; + var n4 = r3(e3, u4, h5[w3], k2); + if (n4 === null) { + u4 === null && (u4 = x2); + break; + } + a5 && u4 && n4.alternate === null && b3(e3, u4), g4 = f6(n4, g4, w3), m6 === null ? l4 = n4 : m6.sibling = n4, m6 = n4, u4 = x2; + } + if (w3 === h5.length) return c3(e3, u4), I && tg(e3, w3), l4; + if (u4 === null) { + for (; w3 < h5.length; w3++) u4 = q(e3, h5[w3], k2), u4 !== null && (g4 = f6(u4, g4, w3), m6 === null ? l4 = u4 : m6.sibling = u4, m6 = u4); + return I && tg(e3, w3), l4; + } + for (u4 = d3(e3, u4); w3 < h5.length; w3++) x2 = y3(u4, e3, w3, h5[w3], k2), x2 !== null && (a5 && x2.alternate !== null && u4.delete(x2.key === null ? w3 : x2.key), g4 = f6(x2, g4, w3), m6 === null ? l4 = x2 : m6.sibling = x2, m6 = x2); + return a5 && u4.forEach(function(a6) { + return b3(e3, a6); + }), I && tg(e3, w3), l4; + } + function t2(e3, g4, h5, k2) { + var l4 = Ka(h5); + if (typeof l4 != "function") throw Error(p5(150)); + if (h5 = l4.call(h5), h5 == null) throw Error(p5(151)); + for (var u4 = l4 = null, m6 = g4, w3 = g4 = 0, x2 = null, n4 = h5.next(); m6 !== null && !n4.done; w3++, n4 = h5.next()) { + m6.index > w3 ? (x2 = m6, m6 = null) : x2 = m6.sibling; + var t3 = r3(e3, m6, n4.value, k2); + if (t3 === null) { + m6 === null && (m6 = x2); + break; + } + a5 && m6 && t3.alternate === null && b3(e3, m6), g4 = f6(t3, g4, w3), u4 === null ? l4 = t3 : u4.sibling = t3, u4 = t3, m6 = x2; + } + if (n4.done) return c3( + e3, + m6 + ), I && tg(e3, w3), l4; + if (m6 === null) { + for (; !n4.done; w3++, n4 = h5.next()) n4 = q(e3, n4.value, k2), n4 !== null && (g4 = f6(n4, g4, w3), u4 === null ? l4 = n4 : u4.sibling = n4, u4 = n4); + return I && tg(e3, w3), l4; + } + for (m6 = d3(e3, m6); !n4.done; w3++, n4 = h5.next()) n4 = y3(m6, e3, w3, n4.value, k2), n4 !== null && (a5 && n4.alternate !== null && m6.delete(n4.key === null ? w3 : n4.key), g4 = f6(n4, g4, w3), u4 === null ? l4 = n4 : u4.sibling = n4, u4 = n4); + return a5 && m6.forEach(function(a6) { + return b3(e3, a6); + }), I && tg(e3, w3), l4; + } + function J(a6, d4, f7, h5) { + if (typeof f7 == "object" && f7 !== null && f7.type === ya && f7.key === null && (f7 = f7.props.children), typeof f7 == "object" && f7 !== null) { + switch (f7.$$typeof) { + case va: + a: { + for (var k2 = f7.key, l4 = d4; l4 !== null; ) { + if (l4.key === k2) { + if (k2 = f7.type, k2 === ya) { + if (l4.tag === 7) { + c3(a6, l4.sibling), d4 = e2(l4, f7.props.children), d4.return = a6, a6 = d4; + break a; + } + } else if (l4.elementType === k2 || typeof k2 == "object" && k2 !== null && k2.$$typeof === Ha && Ng(k2) === l4.type) { + c3(a6, l4.sibling), d4 = e2(l4, f7.props), d4.ref = Lg(a6, l4, f7), d4.return = a6, a6 = d4; + break a; + } + c3(a6, l4); + break; + } else b3(a6, l4); + l4 = l4.sibling; + } + f7.type === ya ? (d4 = Tg(f7.props.children, a6.mode, h5, f7.key), d4.return = a6, a6 = d4) : (h5 = Rg(f7.type, f7.key, f7.props, null, a6.mode, h5), h5.ref = Lg(a6, d4, f7), h5.return = a6, a6 = h5); + } + return g3(a6); + case wa: + a: { + for (l4 = f7.key; d4 !== null; ) { + if (d4.key === l4) if (d4.tag === 4 && d4.stateNode.containerInfo === f7.containerInfo && d4.stateNode.implementation === f7.implementation) { + c3(a6, d4.sibling), d4 = e2(d4, f7.children || []), d4.return = a6, a6 = d4; + break a; + } else { + c3(a6, d4); + break; + } + else b3(a6, d4); + d4 = d4.sibling; + } + d4 = Sg(f7, a6.mode, h5), d4.return = a6, a6 = d4; + } + return g3(a6); + case Ha: + return l4 = f7._init, J(a6, d4, l4(f7._payload), h5); + } + if (eb(f7)) return n3(a6, d4, f7, h5); + if (Ka(f7)) return t2(a6, d4, f7, h5); + Mg(a6, f7); + } + return typeof f7 == "string" && f7 !== "" || typeof f7 == "number" ? (f7 = "" + f7, d4 !== null && d4.tag === 6 ? (c3(a6, d4.sibling), d4 = e2(d4, f7), d4.return = a6, a6 = d4) : (c3(a6, d4), d4 = Qg(f7, a6.mode, h5), d4.return = a6, a6 = d4), g3(a6)) : c3(a6, d4); + } + return J; + } + var Ug = Og(!0), Vg = Og(!1), Wg = Uf(null), Xg = null, Yg = null, Zg = null; + function $g() { + Zg = Yg = Xg = null; + } + function ah(a5) { + var b3 = Wg.current; + E2(Wg), a5._currentValue = b3; + } + function bh(a5, b3, c3) { + for (; a5 !== null; ) { + var d3 = a5.alternate; + if ((a5.childLanes & b3) !== b3 ? (a5.childLanes |= b3, d3 !== null && (d3.childLanes |= b3)) : d3 !== null && (d3.childLanes & b3) !== b3 && (d3.childLanes |= b3), a5 === c3) break; + a5 = a5.return; + } + } + function ch(a5, b3) { + Xg = a5, Zg = Yg = null, a5 = a5.dependencies, a5 !== null && a5.firstContext !== null && ((a5.lanes & b3) !== 0 && (dh = !0), a5.firstContext = null); + } + function eh(a5) { + var b3 = a5._currentValue; + if (Zg !== a5) if (a5 = { context: a5, memoizedValue: b3, next: null }, Yg === null) { + if (Xg === null) throw Error(p5(308)); + Yg = a5, Xg.dependencies = { lanes: 0, firstContext: a5 }; + } else Yg = Yg.next = a5; + return b3; + } + var fh = null; + function gh(a5) { + fh === null ? fh = [a5] : fh.push(a5); + } + function hh(a5, b3, c3, d3) { + var e2 = b3.interleaved; + return e2 === null ? (c3.next = c3, gh(b3)) : (c3.next = e2.next, e2.next = c3), b3.interleaved = c3, ih(a5, d3); + } + function ih(a5, b3) { + a5.lanes |= b3; + var c3 = a5.alternate; + for (c3 !== null && (c3.lanes |= b3), c3 = a5, a5 = a5.return; a5 !== null; ) a5.childLanes |= b3, c3 = a5.alternate, c3 !== null && (c3.childLanes |= b3), c3 = a5, a5 = a5.return; + return c3.tag === 3 ? c3.stateNode : null; + } + var jh = !1; + function kh(a5) { + a5.updateQueue = { baseState: a5.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null }; + } + function lh(a5, b3) { + a5 = a5.updateQueue, b3.updateQueue === a5 && (b3.updateQueue = { baseState: a5.baseState, firstBaseUpdate: a5.firstBaseUpdate, lastBaseUpdate: a5.lastBaseUpdate, shared: a5.shared, effects: a5.effects }); + } + function mh(a5, b3) { + return { eventTime: a5, lane: b3, tag: 0, payload: null, callback: null, next: null }; + } + function nh(a5, b3, c3) { + var d3 = a5.updateQueue; + if (d3 === null) return null; + if (d3 = d3.shared, (K2 & 2) !== 0) { + var e2 = d3.pending; + return e2 === null ? b3.next = b3 : (b3.next = e2.next, e2.next = b3), d3.pending = b3, ih(a5, c3); + } + return e2 = d3.interleaved, e2 === null ? (b3.next = b3, gh(d3)) : (b3.next = e2.next, e2.next = b3), d3.interleaved = b3, ih(a5, c3); + } + function oh(a5, b3, c3) { + if (b3 = b3.updateQueue, b3 !== null && (b3 = b3.shared, (c3 & 4194240) !== 0)) { + var d3 = b3.lanes; + d3 &= a5.pendingLanes, c3 |= d3, b3.lanes = c3, Cc(a5, c3); + } + } + function ph(a5, b3) { + var c3 = a5.updateQueue, d3 = a5.alternate; + if (d3 !== null && (d3 = d3.updateQueue, c3 === d3)) { + var e2 = null, f6 = null; + if (c3 = c3.firstBaseUpdate, c3 !== null) { + do { + var g3 = { eventTime: c3.eventTime, lane: c3.lane, tag: c3.tag, payload: c3.payload, callback: c3.callback, next: null }; + f6 === null ? e2 = f6 = g3 : f6 = f6.next = g3, c3 = c3.next; + } while (c3 !== null); + f6 === null ? e2 = f6 = b3 : f6 = f6.next = b3; + } else e2 = f6 = b3; + c3 = { baseState: d3.baseState, firstBaseUpdate: e2, lastBaseUpdate: f6, shared: d3.shared, effects: d3.effects }, a5.updateQueue = c3; + return; + } + a5 = c3.lastBaseUpdate, a5 === null ? c3.firstBaseUpdate = b3 : a5.next = b3, c3.lastBaseUpdate = b3; + } + function qh(a5, b3, c3, d3) { + var e2 = a5.updateQueue; + jh = !1; + var f6 = e2.firstBaseUpdate, g3 = e2.lastBaseUpdate, h4 = e2.shared.pending; + if (h4 !== null) { + e2.shared.pending = null; + var k = h4, l3 = k.next; + k.next = null, g3 === null ? f6 = l3 : g3.next = l3, g3 = k; + var m5 = a5.alternate; + m5 !== null && (m5 = m5.updateQueue, h4 = m5.lastBaseUpdate, h4 !== g3 && (h4 === null ? m5.firstBaseUpdate = l3 : h4.next = l3, m5.lastBaseUpdate = k)); + } + if (f6 !== null) { + var q = e2.baseState; + g3 = 0, m5 = l3 = k = null, h4 = f6; + do { + var r3 = h4.lane, y3 = h4.eventTime; + if ((d3 & r3) === r3) { + m5 !== null && (m5 = m5.next = { + eventTime: y3, + lane: 0, + tag: h4.tag, + payload: h4.payload, + callback: h4.callback, + next: null + }); + a: { + var n3 = a5, t2 = h4; + switch (r3 = b3, y3 = c3, t2.tag) { + case 1: + if (n3 = t2.payload, typeof n3 == "function") { + q = n3.call(y3, q, r3); + break a; + } + q = n3; + break a; + case 3: + n3.flags = n3.flags & -65537 | 128; + case 0: + if (n3 = t2.payload, r3 = typeof n3 == "function" ? n3.call(y3, q, r3) : n3, r3 == null) break a; + q = A3({}, q, r3); + break a; + case 2: + jh = !0; + } + } + h4.callback !== null && h4.lane !== 0 && (a5.flags |= 64, r3 = e2.effects, r3 === null ? e2.effects = [h4] : r3.push(h4)); + } else y3 = { eventTime: y3, lane: r3, tag: h4.tag, payload: h4.payload, callback: h4.callback, next: null }, m5 === null ? (l3 = m5 = y3, k = q) : m5 = m5.next = y3, g3 |= r3; + if (h4 = h4.next, h4 === null) { + if (h4 = e2.shared.pending, h4 === null) break; + r3 = h4, h4 = r3.next, r3.next = null, e2.lastBaseUpdate = r3, e2.shared.pending = null; + } + } while (!0); + if (m5 === null && (k = q), e2.baseState = k, e2.firstBaseUpdate = l3, e2.lastBaseUpdate = m5, b3 = e2.shared.interleaved, b3 !== null) { + e2 = b3; + do + g3 |= e2.lane, e2 = e2.next; + while (e2 !== b3); + } else f6 === null && (e2.shared.lanes = 0); + rh |= g3, a5.lanes = g3, a5.memoizedState = q; + } + } + function sh(a5, b3, c3) { + if (a5 = b3.effects, b3.effects = null, a5 !== null) for (b3 = 0; b3 < a5.length; b3++) { + var d3 = a5[b3], e2 = d3.callback; + if (e2 !== null) { + if (d3.callback = null, d3 = c3, typeof e2 != "function") throw Error(p5(191, e2)); + e2.call(d3); + } + } + } + var th = {}, uh = Uf(th), vh = Uf(th), wh = Uf(th); + function xh(a5) { + if (a5 === th) throw Error(p5(174)); + return a5; + } + function yh(a5, b3) { + switch (G(wh, b3), G(vh, a5), G(uh, th), a5 = b3.nodeType, a5) { + case 9: + case 11: + b3 = (b3 = b3.documentElement) ? b3.namespaceURI : lb(null, ""); + break; + default: + a5 = a5 === 8 ? b3.parentNode : b3, b3 = a5.namespaceURI || null, a5 = a5.tagName, b3 = lb(b3, a5); + } + E2(uh), G(uh, b3); + } + function zh() { + E2(uh), E2(vh), E2(wh); + } + function Ah(a5) { + xh(wh.current); + var b3 = xh(uh.current), c3 = lb(b3, a5.type); + b3 !== c3 && (G(vh, a5), G(uh, c3)); + } + function Bh(a5) { + vh.current === a5 && (E2(uh), E2(vh)); + } + var L = Uf(0); + function Ch(a5) { + for (var b3 = a5; b3 !== null; ) { + if (b3.tag === 13) { + var c3 = b3.memoizedState; + if (c3 !== null && (c3 = c3.dehydrated, c3 === null || c3.data === "$?" || c3.data === "$!")) return b3; + } else if (b3.tag === 19 && b3.memoizedProps.revealOrder !== void 0) { + if ((b3.flags & 128) !== 0) return b3; + } else if (b3.child !== null) { + b3.child.return = b3, b3 = b3.child; + continue; + } + if (b3 === a5) break; + for (; b3.sibling === null; ) { + if (b3.return === null || b3.return === a5) return null; + b3 = b3.return; + } + b3.sibling.return = b3.return, b3 = b3.sibling; + } + return null; + } + var Dh = []; + function Eh() { + for (var a5 = 0; a5 < Dh.length; a5++) Dh[a5]._workInProgressVersionPrimary = null; + Dh.length = 0; + } + var Fh = ua.ReactCurrentDispatcher, Gh = ua.ReactCurrentBatchConfig, Hh = 0, M = null, N = null, O = null, Ih = !1, Jh = !1, Kh = 0, Lh = 0; + function P3() { + throw Error(p5(321)); + } + function Mh(a5, b3) { + if (b3 === null) return !1; + for (var c3 = 0; c3 < b3.length && c3 < a5.length; c3++) if (!He(a5[c3], b3[c3])) return !1; + return !0; + } + function Nh(a5, b3, c3, d3, e2, f6) { + if (Hh = f6, M = b3, b3.memoizedState = null, b3.updateQueue = null, b3.lanes = 0, Fh.current = a5 === null || a5.memoizedState === null ? Oh : Ph, a5 = c3(d3, e2), Jh) { + f6 = 0; + do { + if (Jh = !1, Kh = 0, 25 <= f6) throw Error(p5(301)); + f6 += 1, O = N = null, b3.updateQueue = null, Fh.current = Qh, a5 = c3(d3, e2); + } while (Jh); + } + if (Fh.current = Rh, b3 = N !== null && N.next !== null, Hh = 0, O = N = M = null, Ih = !1, b3) throw Error(p5(300)); + return a5; + } + function Sh() { + var a5 = Kh !== 0; + return Kh = 0, a5; + } + function Th() { + var a5 = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; + return O === null ? M.memoizedState = O = a5 : O = O.next = a5, O; + } + function Uh() { + if (N === null) { + var a5 = M.alternate; + a5 = a5 !== null ? a5.memoizedState : null; + } else a5 = N.next; + var b3 = O === null ? M.memoizedState : O.next; + if (b3 !== null) O = b3, N = a5; + else { + if (a5 === null) throw Error(p5(310)); + N = a5, a5 = { memoizedState: N.memoizedState, baseState: N.baseState, baseQueue: N.baseQueue, queue: N.queue, next: null }, O === null ? M.memoizedState = O = a5 : O = O.next = a5; + } + return O; + } + function Vh(a5, b3) { + return typeof b3 == "function" ? b3(a5) : b3; + } + function Wh(a5) { + var b3 = Uh(), c3 = b3.queue; + if (c3 === null) throw Error(p5(311)); + c3.lastRenderedReducer = a5; + var d3 = N, e2 = d3.baseQueue, f6 = c3.pending; + if (f6 !== null) { + if (e2 !== null) { + var g3 = e2.next; + e2.next = f6.next, f6.next = g3; + } + d3.baseQueue = e2 = f6, c3.pending = null; + } + if (e2 !== null) { + f6 = e2.next, d3 = d3.baseState; + var h4 = g3 = null, k = null, l3 = f6; + do { + var m5 = l3.lane; + if ((Hh & m5) === m5) k !== null && (k = k.next = { lane: 0, action: l3.action, hasEagerState: l3.hasEagerState, eagerState: l3.eagerState, next: null }), d3 = l3.hasEagerState ? l3.eagerState : a5(d3, l3.action); + else { + var q = { + lane: m5, + action: l3.action, + hasEagerState: l3.hasEagerState, + eagerState: l3.eagerState, + next: null + }; + k === null ? (h4 = k = q, g3 = d3) : k = k.next = q, M.lanes |= m5, rh |= m5; + } + l3 = l3.next; + } while (l3 !== null && l3 !== f6); + k === null ? g3 = d3 : k.next = h4, He(d3, b3.memoizedState) || (dh = !0), b3.memoizedState = d3, b3.baseState = g3, b3.baseQueue = k, c3.lastRenderedState = d3; + } + if (a5 = c3.interleaved, a5 !== null) { + e2 = a5; + do + f6 = e2.lane, M.lanes |= f6, rh |= f6, e2 = e2.next; + while (e2 !== a5); + } else e2 === null && (c3.lanes = 0); + return [b3.memoizedState, c3.dispatch]; + } + function Xh(a5) { + var b3 = Uh(), c3 = b3.queue; + if (c3 === null) throw Error(p5(311)); + c3.lastRenderedReducer = a5; + var d3 = c3.dispatch, e2 = c3.pending, f6 = b3.memoizedState; + if (e2 !== null) { + c3.pending = null; + var g3 = e2 = e2.next; + do + f6 = a5(f6, g3.action), g3 = g3.next; + while (g3 !== e2); + He(f6, b3.memoizedState) || (dh = !0), b3.memoizedState = f6, b3.baseQueue === null && (b3.baseState = f6), c3.lastRenderedState = f6; + } + return [f6, d3]; + } + function Yh() { + } + function Zh(a5, b3) { + var c3 = M, d3 = Uh(), e2 = b3(), f6 = !He(d3.memoizedState, e2); + if (f6 && (d3.memoizedState = e2, dh = !0), d3 = d3.queue, $h(ai.bind(null, c3, d3, a5), [a5]), d3.getSnapshot !== b3 || f6 || O !== null && O.memoizedState.tag & 1) { + if (c3.flags |= 2048, bi(9, ci.bind(null, c3, d3, e2, b3), void 0, null), Q === null) throw Error(p5(349)); + (Hh & 30) !== 0 || di(c3, b3, e2); + } + return e2; + } + function di(a5, b3, c3) { + a5.flags |= 16384, a5 = { getSnapshot: b3, value: c3 }, b3 = M.updateQueue, b3 === null ? (b3 = { lastEffect: null, stores: null }, M.updateQueue = b3, b3.stores = [a5]) : (c3 = b3.stores, c3 === null ? b3.stores = [a5] : c3.push(a5)); + } + function ci(a5, b3, c3, d3) { + b3.value = c3, b3.getSnapshot = d3, ei(b3) && fi(a5); + } + function ai(a5, b3, c3) { + return c3(function() { + ei(b3) && fi(a5); + }); + } + function ei(a5) { + var b3 = a5.getSnapshot; + a5 = a5.value; + try { + var c3 = b3(); + return !He(a5, c3); + } catch { + return !0; + } + } + function fi(a5) { + var b3 = ih(a5, 1); + b3 !== null && gi(b3, a5, 1, -1); + } + function hi(a5) { + var b3 = Th(); + return typeof a5 == "function" && (a5 = a5()), b3.memoizedState = b3.baseState = a5, a5 = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Vh, lastRenderedState: a5 }, b3.queue = a5, a5 = a5.dispatch = ii.bind(null, M, a5), [b3.memoizedState, a5]; + } + function bi(a5, b3, c3, d3) { + return a5 = { tag: a5, create: b3, destroy: c3, deps: d3, next: null }, b3 = M.updateQueue, b3 === null ? (b3 = { lastEffect: null, stores: null }, M.updateQueue = b3, b3.lastEffect = a5.next = a5) : (c3 = b3.lastEffect, c3 === null ? b3.lastEffect = a5.next = a5 : (d3 = c3.next, c3.next = a5, a5.next = d3, b3.lastEffect = a5)), a5; + } + function ji() { + return Uh().memoizedState; + } + function ki(a5, b3, c3, d3) { + var e2 = Th(); + M.flags |= a5, e2.memoizedState = bi(1 | b3, c3, void 0, d3 === void 0 ? null : d3); + } + function li(a5, b3, c3, d3) { + var e2 = Uh(); + d3 = d3 === void 0 ? null : d3; + var f6 = void 0; + if (N !== null) { + var g3 = N.memoizedState; + if (f6 = g3.destroy, d3 !== null && Mh(d3, g3.deps)) { + e2.memoizedState = bi(b3, c3, f6, d3); + return; + } + } + M.flags |= a5, e2.memoizedState = bi(1 | b3, c3, f6, d3); + } + function mi(a5, b3) { + return ki(8390656, 8, a5, b3); + } + function $h(a5, b3) { + return li(2048, 8, a5, b3); + } + function ni(a5, b3) { + return li(4, 2, a5, b3); + } + function oi(a5, b3) { + return li(4, 4, a5, b3); + } + function pi(a5, b3) { + if (typeof b3 == "function") return a5 = a5(), b3(a5), function() { + b3(null); + }; + if (b3 != null) return a5 = a5(), b3.current = a5, function() { + b3.current = null; + }; + } + function qi(a5, b3, c3) { + return c3 = c3 != null ? c3.concat([a5]) : null, li(4, 4, pi.bind(null, b3, a5), c3); + } + function ri() { + } + function si(a5, b3) { + var c3 = Uh(); + b3 = b3 === void 0 ? null : b3; + var d3 = c3.memoizedState; + return d3 !== null && b3 !== null && Mh(b3, d3[1]) ? d3[0] : (c3.memoizedState = [a5, b3], a5); + } + function ti(a5, b3) { + var c3 = Uh(); + b3 = b3 === void 0 ? null : b3; + var d3 = c3.memoizedState; + return d3 !== null && b3 !== null && Mh(b3, d3[1]) ? d3[0] : (a5 = a5(), c3.memoizedState = [a5, b3], a5); + } + function ui(a5, b3, c3) { + return (Hh & 21) === 0 ? (a5.baseState && (a5.baseState = !1, dh = !0), a5.memoizedState = c3) : (He(c3, b3) || (c3 = yc(), M.lanes |= c3, rh |= c3, a5.baseState = !0), b3); + } + function vi(a5, b3) { + var c3 = C3; + C3 = c3 !== 0 && 4 > c3 ? c3 : 4, a5(!0); + var d3 = Gh.transition; + Gh.transition = {}; + try { + a5(!1), b3(); + } finally { + C3 = c3, Gh.transition = d3; + } + } + function wi() { + return Uh().memoizedState; + } + function xi(a5, b3, c3) { + var d3 = yi(a5); + if (c3 = { lane: d3, action: c3, hasEagerState: !1, eagerState: null, next: null }, zi(a5)) Ai(b3, c3); + else if (c3 = hh(a5, b3, c3, d3), c3 !== null) { + var e2 = R2(); + gi(c3, a5, d3, e2), Bi(c3, b3, d3); + } + } + function ii(a5, b3, c3) { + var d3 = yi(a5), e2 = { lane: d3, action: c3, hasEagerState: !1, eagerState: null, next: null }; + if (zi(a5)) Ai(b3, e2); + else { + var f6 = a5.alternate; + if (a5.lanes === 0 && (f6 === null || f6.lanes === 0) && (f6 = b3.lastRenderedReducer, f6 !== null)) try { + var g3 = b3.lastRenderedState, h4 = f6(g3, c3); + if (e2.hasEagerState = !0, e2.eagerState = h4, He(h4, g3)) { + var k = b3.interleaved; + k === null ? (e2.next = e2, gh(b3)) : (e2.next = k.next, k.next = e2), b3.interleaved = e2; + return; + } + } catch { + } + c3 = hh(a5, b3, e2, d3), c3 !== null && (e2 = R2(), gi(c3, a5, d3, e2), Bi(c3, b3, d3)); + } + } + function zi(a5) { + var b3 = a5.alternate; + return a5 === M || b3 !== null && b3 === M; + } + function Ai(a5, b3) { + Jh = Ih = !0; + var c3 = a5.pending; + c3 === null ? b3.next = b3 : (b3.next = c3.next, c3.next = b3), a5.pending = b3; + } + function Bi(a5, b3, c3) { + if ((c3 & 4194240) !== 0) { + var d3 = b3.lanes; + d3 &= a5.pendingLanes, c3 |= d3, b3.lanes = c3, Cc(a5, c3); + } + } + var Rh = { readContext: eh, useCallback: P3, useContext: P3, useEffect: P3, useImperativeHandle: P3, useInsertionEffect: P3, useLayoutEffect: P3, useMemo: P3, useReducer: P3, useRef: P3, useState: P3, useDebugValue: P3, useDeferredValue: P3, useTransition: P3, useMutableSource: P3, useSyncExternalStore: P3, useId: P3, unstable_isNewReconciler: !1 }, Oh = { readContext: eh, useCallback: function(a5, b3) { + return Th().memoizedState = [a5, b3 === void 0 ? null : b3], a5; + }, useContext: eh, useEffect: mi, useImperativeHandle: function(a5, b3, c3) { + return c3 = c3 != null ? c3.concat([a5]) : null, ki( + 4194308, + 4, + pi.bind(null, b3, a5), + c3 + ); + }, useLayoutEffect: function(a5, b3) { + return ki(4194308, 4, a5, b3); + }, useInsertionEffect: function(a5, b3) { + return ki(4, 2, a5, b3); + }, useMemo: function(a5, b3) { + var c3 = Th(); + return b3 = b3 === void 0 ? null : b3, a5 = a5(), c3.memoizedState = [a5, b3], a5; + }, useReducer: function(a5, b3, c3) { + var d3 = Th(); + return b3 = c3 !== void 0 ? c3(b3) : b3, d3.memoizedState = d3.baseState = b3, a5 = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: a5, lastRenderedState: b3 }, d3.queue = a5, a5 = a5.dispatch = xi.bind(null, M, a5), [d3.memoizedState, a5]; + }, useRef: function(a5) { + var b3 = Th(); + return a5 = { current: a5 }, b3.memoizedState = a5; + }, useState: hi, useDebugValue: ri, useDeferredValue: function(a5) { + return Th().memoizedState = a5; + }, useTransition: function() { + var a5 = hi(!1), b3 = a5[0]; + return a5 = vi.bind(null, a5[1]), Th().memoizedState = a5, [b3, a5]; + }, useMutableSource: function() { + }, useSyncExternalStore: function(a5, b3, c3) { + var d3 = M, e2 = Th(); + if (I) { + if (c3 === void 0) throw Error(p5(407)); + c3 = c3(); + } else { + if (c3 = b3(), Q === null) throw Error(p5(349)); + (Hh & 30) !== 0 || di(d3, b3, c3); + } + e2.memoizedState = c3; + var f6 = { value: c3, getSnapshot: b3 }; + return e2.queue = f6, mi(ai.bind( + null, + d3, + f6, + a5 + ), [a5]), d3.flags |= 2048, bi(9, ci.bind(null, d3, f6, c3, b3), void 0, null), c3; + }, useId: function() { + var a5 = Th(), b3 = Q.identifierPrefix; + if (I) { + var c3 = sg, d3 = rg; + c3 = (d3 & ~(1 << 32 - oc(d3) - 1)).toString(32) + c3, b3 = ":" + b3 + "R" + c3, c3 = Kh++, 0 < c3 && (b3 += "H" + c3.toString(32)), b3 += ":"; + } else c3 = Lh++, b3 = ":" + b3 + "r" + c3.toString(32) + ":"; + return a5.memoizedState = b3; + }, unstable_isNewReconciler: !1 }, Ph = { + readContext: eh, + useCallback: si, + useContext: eh, + useEffect: $h, + useImperativeHandle: qi, + useInsertionEffect: ni, + useLayoutEffect: oi, + useMemo: ti, + useReducer: Wh, + useRef: ji, + useState: function() { + return Wh(Vh); + }, + useDebugValue: ri, + useDeferredValue: function(a5) { + var b3 = Uh(); + return ui(b3, N.memoizedState, a5); + }, + useTransition: function() { + var a5 = Wh(Vh)[0], b3 = Uh().memoizedState; + return [a5, b3]; + }, + useMutableSource: Yh, + useSyncExternalStore: Zh, + useId: wi, + unstable_isNewReconciler: !1 + }, Qh = { readContext: eh, useCallback: si, useContext: eh, useEffect: $h, useImperativeHandle: qi, useInsertionEffect: ni, useLayoutEffect: oi, useMemo: ti, useReducer: Xh, useRef: ji, useState: function() { + return Xh(Vh); + }, useDebugValue: ri, useDeferredValue: function(a5) { + var b3 = Uh(); + return N === null ? b3.memoizedState = a5 : ui(b3, N.memoizedState, a5); + }, useTransition: function() { + var a5 = Xh(Vh)[0], b3 = Uh().memoizedState; + return [a5, b3]; + }, useMutableSource: Yh, useSyncExternalStore: Zh, useId: wi, unstable_isNewReconciler: !1 }; + function Ci(a5, b3) { + if (a5 && a5.defaultProps) { + b3 = A3({}, b3), a5 = a5.defaultProps; + for (var c3 in a5) b3[c3] === void 0 && (b3[c3] = a5[c3]); + return b3; + } + return b3; + } + function Di(a5, b3, c3, d3) { + b3 = a5.memoizedState, c3 = c3(d3, b3), c3 = c3 == null ? b3 : A3({}, b3, c3), a5.memoizedState = c3, a5.lanes === 0 && (a5.updateQueue.baseState = c3); + } + var Ei = { isMounted: function(a5) { + return (a5 = a5._reactInternals) ? Vb(a5) === a5 : !1; + }, enqueueSetState: function(a5, b3, c3) { + a5 = a5._reactInternals; + var d3 = R2(), e2 = yi(a5), f6 = mh(d3, e2); + f6.payload = b3, c3 != null && (f6.callback = c3), b3 = nh(a5, f6, e2), b3 !== null && (gi(b3, a5, e2, d3), oh(b3, a5, e2)); + }, enqueueReplaceState: function(a5, b3, c3) { + a5 = a5._reactInternals; + var d3 = R2(), e2 = yi(a5), f6 = mh(d3, e2); + f6.tag = 1, f6.payload = b3, c3 != null && (f6.callback = c3), b3 = nh(a5, f6, e2), b3 !== null && (gi(b3, a5, e2, d3), oh(b3, a5, e2)); + }, enqueueForceUpdate: function(a5, b3) { + a5 = a5._reactInternals; + var c3 = R2(), d3 = yi(a5), e2 = mh(c3, d3); + e2.tag = 2, b3 != null && (e2.callback = b3), b3 = nh(a5, e2, d3), b3 !== null && (gi(b3, a5, d3, c3), oh(b3, a5, d3)); + } }; + function Fi(a5, b3, c3, d3, e2, f6, g3) { + return a5 = a5.stateNode, typeof a5.shouldComponentUpdate == "function" ? a5.shouldComponentUpdate(d3, f6, g3) : b3.prototype && b3.prototype.isPureReactComponent ? !Ie(c3, d3) || !Ie(e2, f6) : !0; + } + function Gi(a5, b3, c3) { + var d3 = !1, e2 = Vf, f6 = b3.contextType; + return typeof f6 == "object" && f6 !== null ? f6 = eh(f6) : (e2 = Zf(b3) ? Xf : H.current, d3 = b3.contextTypes, f6 = (d3 = d3 != null) ? Yf(a5, e2) : Vf), b3 = new b3(c3, f6), a5.memoizedState = b3.state !== null && b3.state !== void 0 ? b3.state : null, b3.updater = Ei, a5.stateNode = b3, b3._reactInternals = a5, d3 && (a5 = a5.stateNode, a5.__reactInternalMemoizedUnmaskedChildContext = e2, a5.__reactInternalMemoizedMaskedChildContext = f6), b3; + } + function Hi(a5, b3, c3, d3) { + a5 = b3.state, typeof b3.componentWillReceiveProps == "function" && b3.componentWillReceiveProps(c3, d3), typeof b3.UNSAFE_componentWillReceiveProps == "function" && b3.UNSAFE_componentWillReceiveProps(c3, d3), b3.state !== a5 && Ei.enqueueReplaceState(b3, b3.state, null); + } + function Ii(a5, b3, c3, d3) { + var e2 = a5.stateNode; + e2.props = c3, e2.state = a5.memoizedState, e2.refs = {}, kh(a5); + var f6 = b3.contextType; + typeof f6 == "object" && f6 !== null ? e2.context = eh(f6) : (f6 = Zf(b3) ? Xf : H.current, e2.context = Yf(a5, f6)), e2.state = a5.memoizedState, f6 = b3.getDerivedStateFromProps, typeof f6 == "function" && (Di(a5, b3, f6, c3), e2.state = a5.memoizedState), typeof b3.getDerivedStateFromProps == "function" || typeof e2.getSnapshotBeforeUpdate == "function" || typeof e2.UNSAFE_componentWillMount != "function" && typeof e2.componentWillMount != "function" || (b3 = e2.state, typeof e2.componentWillMount == "function" && e2.componentWillMount(), typeof e2.UNSAFE_componentWillMount == "function" && e2.UNSAFE_componentWillMount(), b3 !== e2.state && Ei.enqueueReplaceState(e2, e2.state, null), qh(a5, c3, e2, d3), e2.state = a5.memoizedState), typeof e2.componentDidMount == "function" && (a5.flags |= 4194308); + } + function Ji(a5, b3) { + try { + var c3 = "", d3 = b3; + do + c3 += Pa(d3), d3 = d3.return; + while (d3); + var e2 = c3; + } catch (f6) { + e2 = ` +Error generating stack: ` + f6.message + ` +` + f6.stack; + } + return { value: a5, source: b3, stack: e2, digest: null }; + } + function Ki(a5, b3, c3) { + return { value: a5, source: null, stack: c3 ?? null, digest: b3 ?? null }; + } + function Li(a5, b3) { + try { + console.error(b3.value); + } catch (c3) { + setTimeout(function() { + throw c3; + }); + } + } + var Mi = typeof WeakMap == "function" ? WeakMap : Map; + function Ni(a5, b3, c3) { + c3 = mh(-1, c3), c3.tag = 3, c3.payload = { element: null }; + var d3 = b3.value; + return c3.callback = function() { + Oi || (Oi = !0, Pi = d3), Li(a5, b3); + }, c3; + } + function Qi(a5, b3, c3) { + c3 = mh(-1, c3), c3.tag = 3; + var d3 = a5.type.getDerivedStateFromError; + if (typeof d3 == "function") { + var e2 = b3.value; + c3.payload = function() { + return d3(e2); + }, c3.callback = function() { + Li(a5, b3); + }; + } + var f6 = a5.stateNode; + return f6 !== null && typeof f6.componentDidCatch == "function" && (c3.callback = function() { + Li(a5, b3), typeof d3 != "function" && (Ri === null ? Ri = /* @__PURE__ */ new Set([this]) : Ri.add(this)); + var c4 = b3.stack; + this.componentDidCatch(b3.value, { componentStack: c4 !== null ? c4 : "" }); + }), c3; + } + function Si(a5, b3, c3) { + var d3 = a5.pingCache; + if (d3 === null) { + d3 = a5.pingCache = new Mi(); + var e2 = /* @__PURE__ */ new Set(); + d3.set(b3, e2); + } else e2 = d3.get(b3), e2 === void 0 && (e2 = /* @__PURE__ */ new Set(), d3.set(b3, e2)); + e2.has(c3) || (e2.add(c3), a5 = Ti.bind(null, a5, b3, c3), b3.then(a5, a5)); + } + function Ui(a5) { + do { + var b3; + if ((b3 = a5.tag === 13) && (b3 = a5.memoizedState, b3 = b3 !== null ? b3.dehydrated !== null : !0), b3) return a5; + a5 = a5.return; + } while (a5 !== null); + return null; + } + function Vi(a5, b3, c3, d3, e2) { + return (a5.mode & 1) === 0 ? (a5 === b3 ? a5.flags |= 65536 : (a5.flags |= 128, c3.flags |= 131072, c3.flags &= -52805, c3.tag === 1 && (c3.alternate === null ? c3.tag = 17 : (b3 = mh(-1, 1), b3.tag = 2, nh(c3, b3, 1))), c3.lanes |= 1), a5) : (a5.flags |= 65536, a5.lanes = e2, a5); + } + var Wi = ua.ReactCurrentOwner, dh = !1; + function Xi(a5, b3, c3, d3) { + b3.child = a5 === null ? Vg(b3, null, c3, d3) : Ug(b3, a5.child, c3, d3); + } + function Yi(a5, b3, c3, d3, e2) { + c3 = c3.render; + var f6 = b3.ref; + return ch(b3, e2), d3 = Nh(a5, b3, c3, d3, f6, e2), c3 = Sh(), a5 !== null && !dh ? (b3.updateQueue = a5.updateQueue, b3.flags &= -2053, a5.lanes &= ~e2, Zi(a5, b3, e2)) : (I && c3 && vg(b3), b3.flags |= 1, Xi(a5, b3, d3, e2), b3.child); + } + function $i(a5, b3, c3, d3, e2) { + if (a5 === null) { + var f6 = c3.type; + return typeof f6 == "function" && !aj(f6) && f6.defaultProps === void 0 && c3.compare === null && c3.defaultProps === void 0 ? (b3.tag = 15, b3.type = f6, bj(a5, b3, f6, d3, e2)) : (a5 = Rg(c3.type, null, d3, b3, b3.mode, e2), a5.ref = b3.ref, a5.return = b3, b3.child = a5); + } + if (f6 = a5.child, (a5.lanes & e2) === 0) { + var g3 = f6.memoizedProps; + if (c3 = c3.compare, c3 = c3 !== null ? c3 : Ie, c3(g3, d3) && a5.ref === b3.ref) return Zi(a5, b3, e2); + } + return b3.flags |= 1, a5 = Pg(f6, d3), a5.ref = b3.ref, a5.return = b3, b3.child = a5; + } + function bj(a5, b3, c3, d3, e2) { + if (a5 !== null) { + var f6 = a5.memoizedProps; + if (Ie(f6, d3) && a5.ref === b3.ref) if (dh = !1, b3.pendingProps = d3 = f6, (a5.lanes & e2) !== 0) (a5.flags & 131072) !== 0 && (dh = !0); + else return b3.lanes = a5.lanes, Zi(a5, b3, e2); + } + return cj(a5, b3, c3, d3, e2); + } + function dj(a5, b3, c3) { + var d3 = b3.pendingProps, e2 = d3.children, f6 = a5 !== null ? a5.memoizedState : null; + if (d3.mode === "hidden") if ((b3.mode & 1) === 0) b3.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G(ej, fj), fj |= c3; + else { + if ((c3 & 1073741824) === 0) return a5 = f6 !== null ? f6.baseLanes | c3 : c3, b3.lanes = b3.childLanes = 1073741824, b3.memoizedState = { baseLanes: a5, cachePool: null, transitions: null }, b3.updateQueue = null, G(ej, fj), fj |= a5, null; + b3.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, d3 = f6 !== null ? f6.baseLanes : c3, G(ej, fj), fj |= d3; + } + else f6 !== null ? (d3 = f6.baseLanes | c3, b3.memoizedState = null) : d3 = c3, G(ej, fj), fj |= d3; + return Xi(a5, b3, e2, c3), b3.child; + } + function gj(a5, b3) { + var c3 = b3.ref; + (a5 === null && c3 !== null || a5 !== null && a5.ref !== c3) && (b3.flags |= 512, b3.flags |= 2097152); + } + function cj(a5, b3, c3, d3, e2) { + var f6 = Zf(c3) ? Xf : H.current; + return f6 = Yf(b3, f6), ch(b3, e2), c3 = Nh(a5, b3, c3, d3, f6, e2), d3 = Sh(), a5 !== null && !dh ? (b3.updateQueue = a5.updateQueue, b3.flags &= -2053, a5.lanes &= ~e2, Zi(a5, b3, e2)) : (I && d3 && vg(b3), b3.flags |= 1, Xi(a5, b3, c3, e2), b3.child); + } + function hj(a5, b3, c3, d3, e2) { + if (Zf(c3)) { + var f6 = !0; + cg(b3); + } else f6 = !1; + if (ch(b3, e2), b3.stateNode === null) ij(a5, b3), Gi(b3, c3, d3), Ii(b3, c3, d3, e2), d3 = !0; + else if (a5 === null) { + var g3 = b3.stateNode, h4 = b3.memoizedProps; + g3.props = h4; + var k = g3.context, l3 = c3.contextType; + typeof l3 == "object" && l3 !== null ? l3 = eh(l3) : (l3 = Zf(c3) ? Xf : H.current, l3 = Yf(b3, l3)); + var m5 = c3.getDerivedStateFromProps, q = typeof m5 == "function" || typeof g3.getSnapshotBeforeUpdate == "function"; + q || typeof g3.UNSAFE_componentWillReceiveProps != "function" && typeof g3.componentWillReceiveProps != "function" || (h4 !== d3 || k !== l3) && Hi(b3, g3, d3, l3), jh = !1; + var r3 = b3.memoizedState; + g3.state = r3, qh(b3, d3, g3, e2), k = b3.memoizedState, h4 !== d3 || r3 !== k || Wf.current || jh ? (typeof m5 == "function" && (Di(b3, c3, m5, d3), k = b3.memoizedState), (h4 = jh || Fi(b3, c3, h4, d3, r3, k, l3)) ? (q || typeof g3.UNSAFE_componentWillMount != "function" && typeof g3.componentWillMount != "function" || (typeof g3.componentWillMount == "function" && g3.componentWillMount(), typeof g3.UNSAFE_componentWillMount == "function" && g3.UNSAFE_componentWillMount()), typeof g3.componentDidMount == "function" && (b3.flags |= 4194308)) : (typeof g3.componentDidMount == "function" && (b3.flags |= 4194308), b3.memoizedProps = d3, b3.memoizedState = k), g3.props = d3, g3.state = k, g3.context = l3, d3 = h4) : (typeof g3.componentDidMount == "function" && (b3.flags |= 4194308), d3 = !1); + } else { + g3 = b3.stateNode, lh(a5, b3), h4 = b3.memoizedProps, l3 = b3.type === b3.elementType ? h4 : Ci(b3.type, h4), g3.props = l3, q = b3.pendingProps, r3 = g3.context, k = c3.contextType, typeof k == "object" && k !== null ? k = eh(k) : (k = Zf(c3) ? Xf : H.current, k = Yf(b3, k)); + var y3 = c3.getDerivedStateFromProps; + (m5 = typeof y3 == "function" || typeof g3.getSnapshotBeforeUpdate == "function") || typeof g3.UNSAFE_componentWillReceiveProps != "function" && typeof g3.componentWillReceiveProps != "function" || (h4 !== q || r3 !== k) && Hi(b3, g3, d3, k), jh = !1, r3 = b3.memoizedState, g3.state = r3, qh(b3, d3, g3, e2); + var n3 = b3.memoizedState; + h4 !== q || r3 !== n3 || Wf.current || jh ? (typeof y3 == "function" && (Di(b3, c3, y3, d3), n3 = b3.memoizedState), (l3 = jh || Fi(b3, c3, l3, d3, r3, n3, k) || !1) ? (m5 || typeof g3.UNSAFE_componentWillUpdate != "function" && typeof g3.componentWillUpdate != "function" || (typeof g3.componentWillUpdate == "function" && g3.componentWillUpdate(d3, n3, k), typeof g3.UNSAFE_componentWillUpdate == "function" && g3.UNSAFE_componentWillUpdate(d3, n3, k)), typeof g3.componentDidUpdate == "function" && (b3.flags |= 4), typeof g3.getSnapshotBeforeUpdate == "function" && (b3.flags |= 1024)) : (typeof g3.componentDidUpdate != "function" || h4 === a5.memoizedProps && r3 === a5.memoizedState || (b3.flags |= 4), typeof g3.getSnapshotBeforeUpdate != "function" || h4 === a5.memoizedProps && r3 === a5.memoizedState || (b3.flags |= 1024), b3.memoizedProps = d3, b3.memoizedState = n3), g3.props = d3, g3.state = n3, g3.context = k, d3 = l3) : (typeof g3.componentDidUpdate != "function" || h4 === a5.memoizedProps && r3 === a5.memoizedState || (b3.flags |= 4), typeof g3.getSnapshotBeforeUpdate != "function" || h4 === a5.memoizedProps && r3 === a5.memoizedState || (b3.flags |= 1024), d3 = !1); + } + return jj(a5, b3, c3, d3, f6, e2); + } + function jj(a5, b3, c3, d3, e2, f6) { + gj(a5, b3); + var g3 = (b3.flags & 128) !== 0; + if (!d3 && !g3) return e2 && dg(b3, c3, !1), Zi(a5, b3, f6); + d3 = b3.stateNode, Wi.current = b3; + var h4 = g3 && typeof c3.getDerivedStateFromError != "function" ? null : d3.render(); + return b3.flags |= 1, a5 !== null && g3 ? (b3.child = Ug(b3, a5.child, null, f6), b3.child = Ug(b3, null, h4, f6)) : Xi(a5, b3, h4, f6), b3.memoizedState = d3.state, e2 && dg(b3, c3, !0), b3.child; + } + function kj(a5) { + var b3 = a5.stateNode; + b3.pendingContext ? ag(a5, b3.pendingContext, b3.pendingContext !== b3.context) : b3.context && ag(a5, b3.context, !1), yh(a5, b3.containerInfo); + } + function lj(a5, b3, c3, d3, e2) { + return Ig(), Jg(e2), b3.flags |= 256, Xi(a5, b3, c3, d3), b3.child; + } + var mj = { dehydrated: null, treeContext: null, retryLane: 0 }; + function nj(a5) { + return { baseLanes: a5, cachePool: null, transitions: null }; + } + function oj(a5, b3, c3) { + var d3 = b3.pendingProps, e2 = L.current, f6 = !1, g3 = (b3.flags & 128) !== 0, h4; + if ((h4 = g3) || (h4 = a5 !== null && a5.memoizedState === null ? !1 : (e2 & 2) !== 0), h4 ? (f6 = !0, b3.flags &= -129) : (a5 === null || a5.memoizedState !== null) && (e2 |= 1), G(L, e2 & 1), a5 === null) + return Eg(b3), a5 = b3.memoizedState, a5 !== null && (a5 = a5.dehydrated, a5 !== null) ? ((b3.mode & 1) === 0 ? b3.lanes = 1 : a5.data === "$!" ? b3.lanes = 8 : b3.lanes = 1073741824, null) : (g3 = d3.children, a5 = d3.fallback, f6 ? (d3 = b3.mode, f6 = b3.child, g3 = { mode: "hidden", children: g3 }, (d3 & 1) === 0 && f6 !== null ? (f6.childLanes = 0, f6.pendingProps = g3) : f6 = pj(g3, d3, 0, null), a5 = Tg(a5, d3, c3, null), f6.return = b3, a5.return = b3, f6.sibling = a5, b3.child = f6, b3.child.memoizedState = nj(c3), b3.memoizedState = mj, a5) : qj(b3, g3)); + if (e2 = a5.memoizedState, e2 !== null && (h4 = e2.dehydrated, h4 !== null)) return rj(a5, b3, g3, d3, h4, e2, c3); + if (f6) { + f6 = d3.fallback, g3 = b3.mode, e2 = a5.child, h4 = e2.sibling; + var k = { mode: "hidden", children: d3.children }; + return (g3 & 1) === 0 && b3.child !== e2 ? (d3 = b3.child, d3.childLanes = 0, d3.pendingProps = k, b3.deletions = null) : (d3 = Pg(e2, k), d3.subtreeFlags = e2.subtreeFlags & 14680064), h4 !== null ? f6 = Pg(h4, f6) : (f6 = Tg(f6, g3, c3, null), f6.flags |= 2), f6.return = b3, d3.return = b3, d3.sibling = f6, b3.child = d3, d3 = f6, f6 = b3.child, g3 = a5.child.memoizedState, g3 = g3 === null ? nj(c3) : { baseLanes: g3.baseLanes | c3, cachePool: null, transitions: g3.transitions }, f6.memoizedState = g3, f6.childLanes = a5.childLanes & ~c3, b3.memoizedState = mj, d3; + } + return f6 = a5.child, a5 = f6.sibling, d3 = Pg(f6, { mode: "visible", children: d3.children }), (b3.mode & 1) === 0 && (d3.lanes = c3), d3.return = b3, d3.sibling = null, a5 !== null && (c3 = b3.deletions, c3 === null ? (b3.deletions = [a5], b3.flags |= 16) : c3.push(a5)), b3.child = d3, b3.memoizedState = null, d3; + } + function qj(a5, b3) { + return b3 = pj({ mode: "visible", children: b3 }, a5.mode, 0, null), b3.return = a5, a5.child = b3; + } + function sj(a5, b3, c3, d3) { + return d3 !== null && Jg(d3), Ug(b3, a5.child, null, c3), a5 = qj(b3, b3.pendingProps.children), a5.flags |= 2, b3.memoizedState = null, a5; + } + function rj(a5, b3, c3, d3, e2, f6, g3) { + if (c3) + return b3.flags & 256 ? (b3.flags &= -257, d3 = Ki(Error(p5(422))), sj(a5, b3, g3, d3)) : b3.memoizedState !== null ? (b3.child = a5.child, b3.flags |= 128, null) : (f6 = d3.fallback, e2 = b3.mode, d3 = pj({ mode: "visible", children: d3.children }, e2, 0, null), f6 = Tg(f6, e2, g3, null), f6.flags |= 2, d3.return = b3, f6.return = b3, d3.sibling = f6, b3.child = d3, (b3.mode & 1) !== 0 && Ug(b3, a5.child, null, g3), b3.child.memoizedState = nj(g3), b3.memoizedState = mj, f6); + if ((b3.mode & 1) === 0) return sj(a5, b3, g3, null); + if (e2.data === "$!") { + if (d3 = e2.nextSibling && e2.nextSibling.dataset, d3) var h4 = d3.dgst; + return d3 = h4, f6 = Error(p5(419)), d3 = Ki(f6, d3, void 0), sj(a5, b3, g3, d3); + } + if (h4 = (g3 & a5.childLanes) !== 0, dh || h4) { + if (d3 = Q, d3 !== null) { + switch (g3 & -g3) { + case 4: + e2 = 2; + break; + case 16: + e2 = 8; + break; + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + e2 = 32; + break; + case 536870912: + e2 = 268435456; + break; + default: + e2 = 0; + } + e2 = (e2 & (d3.suspendedLanes | g3)) !== 0 ? 0 : e2, e2 !== 0 && e2 !== f6.retryLane && (f6.retryLane = e2, ih(a5, e2), gi(d3, a5, e2, -1)); + } + return tj(), d3 = Ki(Error(p5(421))), sj(a5, b3, g3, d3); + } + return e2.data === "$?" ? (b3.flags |= 128, b3.child = a5.child, b3 = uj.bind(null, a5), e2._reactRetry = b3, null) : (a5 = f6.treeContext, yg = Lf(e2.nextSibling), xg = b3, I = !0, zg = null, a5 !== null && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a5.id, sg = a5.overflow, qg = b3), b3 = qj(b3, d3.children), b3.flags |= 4096, b3); + } + function vj(a5, b3, c3) { + a5.lanes |= b3; + var d3 = a5.alternate; + d3 !== null && (d3.lanes |= b3), bh(a5.return, b3, c3); + } + function wj(a5, b3, c3, d3, e2) { + var f6 = a5.memoizedState; + f6 === null ? a5.memoizedState = { isBackwards: b3, rendering: null, renderingStartTime: 0, last: d3, tail: c3, tailMode: e2 } : (f6.isBackwards = b3, f6.rendering = null, f6.renderingStartTime = 0, f6.last = d3, f6.tail = c3, f6.tailMode = e2); + } + function xj(a5, b3, c3) { + var d3 = b3.pendingProps, e2 = d3.revealOrder, f6 = d3.tail; + if (Xi(a5, b3, d3.children, c3), d3 = L.current, (d3 & 2) !== 0) d3 = d3 & 1 | 2, b3.flags |= 128; + else { + if (a5 !== null && (a5.flags & 128) !== 0) a: for (a5 = b3.child; a5 !== null; ) { + if (a5.tag === 13) a5.memoizedState !== null && vj(a5, c3, b3); + else if (a5.tag === 19) vj(a5, c3, b3); + else if (a5.child !== null) { + a5.child.return = a5, a5 = a5.child; + continue; + } + if (a5 === b3) break a; + for (; a5.sibling === null; ) { + if (a5.return === null || a5.return === b3) break a; + a5 = a5.return; + } + a5.sibling.return = a5.return, a5 = a5.sibling; + } + d3 &= 1; + } + if (G(L, d3), (b3.mode & 1) === 0) b3.memoizedState = null; + else switch (e2) { + case "forwards": + for (c3 = b3.child, e2 = null; c3 !== null; ) a5 = c3.alternate, a5 !== null && Ch(a5) === null && (e2 = c3), c3 = c3.sibling; + c3 = e2, c3 === null ? (e2 = b3.child, b3.child = null) : (e2 = c3.sibling, c3.sibling = null), wj(b3, !1, e2, c3, f6); + break; + case "backwards": + for (c3 = null, e2 = b3.child, b3.child = null; e2 !== null; ) { + if (a5 = e2.alternate, a5 !== null && Ch(a5) === null) { + b3.child = e2; + break; + } + a5 = e2.sibling, e2.sibling = c3, c3 = e2, e2 = a5; + } + wj(b3, !0, c3, null, f6); + break; + case "together": + wj(b3, !1, null, null, void 0); + break; + default: + b3.memoizedState = null; + } + return b3.child; + } + function ij(a5, b3) { + (b3.mode & 1) === 0 && a5 !== null && (a5.alternate = null, b3.alternate = null, b3.flags |= 2); + } + function Zi(a5, b3, c3) { + if (a5 !== null && (b3.dependencies = a5.dependencies), rh |= b3.lanes, (c3 & b3.childLanes) === 0) return null; + if (a5 !== null && b3.child !== a5.child) throw Error(p5(153)); + if (b3.child !== null) { + for (a5 = b3.child, c3 = Pg(a5, a5.pendingProps), b3.child = c3, c3.return = b3; a5.sibling !== null; ) a5 = a5.sibling, c3 = c3.sibling = Pg(a5, a5.pendingProps), c3.return = b3; + c3.sibling = null; + } + return b3.child; + } + function yj(a5, b3, c3) { + switch (b3.tag) { + case 3: + kj(b3), Ig(); + break; + case 5: + Ah(b3); + break; + case 1: + Zf(b3.type) && cg(b3); + break; + case 4: + yh(b3, b3.stateNode.containerInfo); + break; + case 10: + var d3 = b3.type._context, e2 = b3.memoizedProps.value; + G(Wg, d3._currentValue), d3._currentValue = e2; + break; + case 13: + if (d3 = b3.memoizedState, d3 !== null) + return d3.dehydrated !== null ? (G(L, L.current & 1), b3.flags |= 128, null) : (c3 & b3.child.childLanes) !== 0 ? oj(a5, b3, c3) : (G(L, L.current & 1), a5 = Zi(a5, b3, c3), a5 !== null ? a5.sibling : null); + G(L, L.current & 1); + break; + case 19: + if (d3 = (c3 & b3.childLanes) !== 0, (a5.flags & 128) !== 0) { + if (d3) return xj(a5, b3, c3); + b3.flags |= 128; + } + if (e2 = b3.memoizedState, e2 !== null && (e2.rendering = null, e2.tail = null, e2.lastEffect = null), G(L, L.current), d3) break; + return null; + case 22: + case 23: + return b3.lanes = 0, dj(a5, b3, c3); + } + return Zi(a5, b3, c3); + } + var zj, Aj, Bj, Cj; + zj = function(a5, b3) { + for (var c3 = b3.child; c3 !== null; ) { + if (c3.tag === 5 || c3.tag === 6) a5.appendChild(c3.stateNode); + else if (c3.tag !== 4 && c3.child !== null) { + c3.child.return = c3, c3 = c3.child; + continue; + } + if (c3 === b3) break; + for (; c3.sibling === null; ) { + if (c3.return === null || c3.return === b3) return; + c3 = c3.return; + } + c3.sibling.return = c3.return, c3 = c3.sibling; + } + }; + Aj = function() { + }; + Bj = function(a5, b3, c3, d3) { + var e2 = a5.memoizedProps; + if (e2 !== d3) { + a5 = b3.stateNode, xh(uh.current); + var f6 = null; + switch (c3) { + case "input": + e2 = Ya(a5, e2), d3 = Ya(a5, d3), f6 = []; + break; + case "select": + e2 = A3({}, e2, { value: void 0 }), d3 = A3({}, d3, { value: void 0 }), f6 = []; + break; + case "textarea": + e2 = gb(a5, e2), d3 = gb(a5, d3), f6 = []; + break; + default: + typeof e2.onClick != "function" && typeof d3.onClick == "function" && (a5.onclick = Bf); + } + ub(c3, d3); + var g3; + c3 = null; + for (l3 in e2) if (!d3.hasOwnProperty(l3) && e2.hasOwnProperty(l3) && e2[l3] != null) if (l3 === "style") { + var h4 = e2[l3]; + for (g3 in h4) h4.hasOwnProperty(g3) && (c3 || (c3 = {}), c3[g3] = ""); + } else l3 !== "dangerouslySetInnerHTML" && l3 !== "children" && l3 !== "suppressContentEditableWarning" && l3 !== "suppressHydrationWarning" && l3 !== "autoFocus" && (ea.hasOwnProperty(l3) ? f6 || (f6 = []) : (f6 = f6 || []).push(l3, null)); + for (l3 in d3) { + var k = d3[l3]; + if (h4 = e2?.[l3], d3.hasOwnProperty(l3) && k !== h4 && (k != null || h4 != null)) if (l3 === "style") if (h4) { + for (g3 in h4) !h4.hasOwnProperty(g3) || k && k.hasOwnProperty(g3) || (c3 || (c3 = {}), c3[g3] = ""); + for (g3 in k) k.hasOwnProperty(g3) && h4[g3] !== k[g3] && (c3 || (c3 = {}), c3[g3] = k[g3]); + } else c3 || (f6 || (f6 = []), f6.push( + l3, + c3 + )), c3 = k; + else l3 === "dangerouslySetInnerHTML" ? (k = k ? k.__html : void 0, h4 = h4 ? h4.__html : void 0, k != null && h4 !== k && (f6 = f6 || []).push(l3, k)) : l3 === "children" ? typeof k != "string" && typeof k != "number" || (f6 = f6 || []).push(l3, "" + k) : l3 !== "suppressContentEditableWarning" && l3 !== "suppressHydrationWarning" && (ea.hasOwnProperty(l3) ? (k != null && l3 === "onScroll" && D("scroll", a5), f6 || h4 === k || (f6 = [])) : (f6 = f6 || []).push(l3, k)); + } + c3 && (f6 = f6 || []).push("style", c3); + var l3 = f6; + (b3.updateQueue = l3) && (b3.flags |= 4); + } + }; + Cj = function(a5, b3, c3, d3) { + c3 !== d3 && (b3.flags |= 4); + }; + function Dj(a5, b3) { + if (!I) switch (a5.tailMode) { + case "hidden": + b3 = a5.tail; + for (var c3 = null; b3 !== null; ) b3.alternate !== null && (c3 = b3), b3 = b3.sibling; + c3 === null ? a5.tail = null : c3.sibling = null; + break; + case "collapsed": + c3 = a5.tail; + for (var d3 = null; c3 !== null; ) c3.alternate !== null && (d3 = c3), c3 = c3.sibling; + d3 === null ? b3 || a5.tail === null ? a5.tail = null : a5.tail.sibling = null : d3.sibling = null; + } + } + function S2(a5) { + var b3 = a5.alternate !== null && a5.alternate.child === a5.child, c3 = 0, d3 = 0; + if (b3) for (var e2 = a5.child; e2 !== null; ) c3 |= e2.lanes | e2.childLanes, d3 |= e2.subtreeFlags & 14680064, d3 |= e2.flags & 14680064, e2.return = a5, e2 = e2.sibling; + else for (e2 = a5.child; e2 !== null; ) c3 |= e2.lanes | e2.childLanes, d3 |= e2.subtreeFlags, d3 |= e2.flags, e2.return = a5, e2 = e2.sibling; + return a5.subtreeFlags |= d3, a5.childLanes = c3, b3; + } + function Ej(a5, b3, c3) { + var d3 = b3.pendingProps; + switch (wg(b3), b3.tag) { + case 2: + case 16: + case 15: + case 0: + case 11: + case 7: + case 8: + case 12: + case 9: + case 14: + return S2(b3), null; + case 1: + return Zf(b3.type) && $f(), S2(b3), null; + case 3: + return d3 = b3.stateNode, zh(), E2(Wf), E2(H), Eh(), d3.pendingContext && (d3.context = d3.pendingContext, d3.pendingContext = null), (a5 === null || a5.child === null) && (Gg(b3) ? b3.flags |= 4 : a5 === null || a5.memoizedState.isDehydrated && (b3.flags & 256) === 0 || (b3.flags |= 1024, zg !== null && (Fj(zg), zg = null))), Aj(a5, b3), S2(b3), null; + case 5: + Bh(b3); + var e2 = xh(wh.current); + if (c3 = b3.type, a5 !== null && b3.stateNode != null) Bj(a5, b3, c3, d3, e2), a5.ref !== b3.ref && (b3.flags |= 512, b3.flags |= 2097152); + else { + if (!d3) { + if (b3.stateNode === null) throw Error(p5(166)); + return S2(b3), null; + } + if (a5 = xh(uh.current), Gg(b3)) { + d3 = b3.stateNode, c3 = b3.type; + var f6 = b3.memoizedProps; + switch (d3[Of] = b3, d3[Pf] = f6, a5 = (b3.mode & 1) !== 0, c3) { + case "dialog": + D("cancel", d3), D("close", d3); + break; + case "iframe": + case "object": + case "embed": + D("load", d3); + break; + case "video": + case "audio": + for (e2 = 0; e2 < lf.length; e2++) D(lf[e2], d3); + break; + case "source": + D("error", d3); + break; + case "img": + case "image": + case "link": + D( + "error", + d3 + ), D("load", d3); + break; + case "details": + D("toggle", d3); + break; + case "input": + Za(d3, f6), D("invalid", d3); + break; + case "select": + d3._wrapperState = { wasMultiple: !!f6.multiple }, D("invalid", d3); + break; + case "textarea": + hb(d3, f6), D("invalid", d3); + } + ub(c3, f6), e2 = null; + for (var g3 in f6) if (f6.hasOwnProperty(g3)) { + var h4 = f6[g3]; + g3 === "children" ? typeof h4 == "string" ? d3.textContent !== h4 && (f6.suppressHydrationWarning !== !0 && Af(d3.textContent, h4, a5), e2 = ["children", h4]) : typeof h4 == "number" && d3.textContent !== "" + h4 && (f6.suppressHydrationWarning !== !0 && Af( + d3.textContent, + h4, + a5 + ), e2 = ["children", "" + h4]) : ea.hasOwnProperty(g3) && h4 != null && g3 === "onScroll" && D("scroll", d3); + } + switch (c3) { + case "input": + Va(d3), db(d3, f6, !0); + break; + case "textarea": + Va(d3), jb(d3); + break; + case "select": + case "option": + break; + default: + typeof f6.onClick == "function" && (d3.onclick = Bf); + } + d3 = e2, b3.updateQueue = d3, d3 !== null && (b3.flags |= 4); + } else { + g3 = e2.nodeType === 9 ? e2 : e2.ownerDocument, a5 === "http://www.w3.org/1999/xhtml" && (a5 = kb(c3)), a5 === "http://www.w3.org/1999/xhtml" ? c3 === "script" ? (a5 = g3.createElement("div"), a5.innerHTML = " +``` + +## Use + +```js +import {stringifyEntities} from 'stringify-entities' + +stringifyEntities('alpha © bravo ≠ charlie 𝌆 delta') +// => 'alpha © bravo ≠ charlie 𝌆 delta' + +stringifyEntities('alpha © bravo ≠ charlie 𝌆 delta', {useNamedReferences: true}) +// => 'alpha © bravo ≠ charlie 𝌆 delta' +``` + +## API + +This package exports the identifiers `stringifyEntities` and +`stringifyEntitiesLight`. +There is no default export. + +### `stringifyEntities(value[, options])` + +Encode special characters in `value`. + +##### Core options + +###### `options.escapeOnly` + +Whether to only escape possibly dangerous characters (`boolean`, default: +`false`). +Those characters are `"`, `&`, `'`, `<`, `>`, and `` ` ``. + +###### `options.subset` + +Whether to only escape the given subset of characters (`Array`). +Note that only BMP characters are supported here (so no emoji). + +##### Formatting options + +If you do not care about the following options, use `stringifyEntitiesLight`, +which always outputs hexadecimal character references. + +###### `options.useNamedReferences` + +Prefer named character references (`&`) where possible (`boolean?`, default: +`false`). + +###### `options.useShortestReferences` + +Prefer the shortest possible reference, if that results in less bytes +(`boolean?`, default: `false`). + +> ⚠️ **Note**: `useNamedReferences` can be omitted when using +> `useShortestReferences`. + +###### `options.omitOptionalSemicolons` + +Whether to omit semicolons when possible (`boolean?`, default: `false`). + +> ⚠️ **Note**: This creates what HTML calls “parse errors” but is otherwise +> still valid HTML — don’t use this except when building a minifier. +> Omitting semicolons is possible for certain named and numeric references in +> some cases. + +###### `options.attribute` + +Create character references which don’t fail in attributes (`boolean?`, default: +`false`). + +> ⚠️ **Note**: `attribute` only applies when operating dangerously with +> `omitOptionalSemicolons: true`. + +#### Returns + +Encoded value (`string`). + +## Algorithm + +By default, all dangerous, non-ASCII, and non-printable ASCII characters are +encoded. +A [subset][] of characters can be given to encode just those characters. +Alternatively, pass [`escapeOnly`][escapeonly] to escape just the dangerous +characters (`"`, `'`, `<`, `>`, `&`, `` ` ``). +By default, hexadecimal character references are used. +Pass [`useNamedReferences`][named] to use named character references when +possible, or [`useShortestReferences`][short] to use whichever is shortest: +decimal, hexadecimal, or named. +There is also a `stringifyEntitiesLight` export, which works just like +`stringifyEntities` but without the formatting options: it’s much smaller but +always outputs hexadecimal character references. + +## Types + +This package is fully typed with [TypeScript][]. +It exports the additional types `Options` and `LightOptions` types. + +## Compatibility + +This package is at least compatible with all maintained versions of Node.js. +As of now, that is Node.js 14.14+ and 16.0+. +It also works in Deno and modern browsers. + +## Security + +This package is safe. + +## Related + +* [`parse-entities`](https://github.com/wooorm/parse-entities) + — parse (decode) HTML character references +* [`wooorm/character-entities`](https://github.com/wooorm/character-entities) + — info on character references +* [`wooorm/character-entities-html4`](https://github.com/wooorm/character-entities-html4) + — info on HTML 4 character references +* [`wooorm/character-entities-legacy`](https://github.com/wooorm/character-entities-legacy) + — info on legacy character references +* [`wooorm/character-reference-invalid`](https://github.com/wooorm/character-reference-invalid) + — info on invalid numeric character references + +## Contribute + +Yes please! +See [How to Contribute to Open Source][contribute]. + +## License + +[MIT][license] © [Titus Wormer][author] + + + +[build-badge]: https://github.com/wooorm/stringify-entities/workflows/main/badge.svg + +[build]: https://github.com/wooorm/stringify-entities/actions + +[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/stringify-entities.svg + +[coverage]: https://codecov.io/github/wooorm/stringify-entities + +[downloads-badge]: https://img.shields.io/npm/dm/stringify-entities.svg + +[downloads]: https://www.npmjs.com/package/stringify-entities + +[size-badge]: https://img.shields.io/bundlephobia/minzip/stringify-entities.svg + +[size]: https://bundlephobia.com/result?p=stringify-entities + +[npm]: https://docs.npmjs.com/cli/install + +[esmsh]: https://esm.sh + +[license]: license + +[author]: https://wooorm.com + +[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c + +[typescript]: https://www.typescriptlang.org + +[contribute]: https://opensource.guide/how-to-contribute/ + +[virus]: https://www.telegraph.co.uk/technology/advice/10516839/Why-do-some-apostrophes-get-replaced-with-andapos.html + +[subset]: #optionssubset + +[escapeonly]: #optionsescapeonly + +[named]: #optionsusenamedreferences + +[short]: #optionsuseshortestreferences diff --git a/tools/ui/node_modules/stringify-object/LICENSE b/tools/ui/node_modules/stringify-object/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ff642e65a3a914a1a144ce801ca6f22256ffb791 --- /dev/null +++ b/tools/ui/node_modules/stringify-object/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015, Yeoman team +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tools/ui/node_modules/stringify-object/index.js b/tools/ui/node_modules/stringify-object/index.js new file mode 100644 index 0000000000000000000000000000000000000000..beed5e3ae38c94415ca5dd9b11398b31d6f471db --- /dev/null +++ b/tools/ui/node_modules/stringify-object/index.js @@ -0,0 +1,131 @@ +'use strict'; +const isRegexp = require('is-regexp'); +const isObj = require('is-obj'); +const getOwnEnumPropSymbols = require('get-own-enumerable-property-symbols').default; + +module.exports = (val, opts, pad) => { + const seen = []; + + return (function stringify(val, opts, pad) { + opts = opts || {}; + opts.indent = opts.indent || '\t'; + pad = pad || ''; + + let tokens; + + if (opts.inlineCharacterLimit === undefined) { + tokens = { + newLine: '\n', + newLineOrSpace: '\n', + pad, + indent: pad + opts.indent + }; + } else { + tokens = { + newLine: '@@__STRINGIFY_OBJECT_NEW_LINE__@@', + newLineOrSpace: '@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@', + pad: '@@__STRINGIFY_OBJECT_PAD__@@', + indent: '@@__STRINGIFY_OBJECT_INDENT__@@' + }; + } + + const expandWhiteSpace = string => { + if (opts.inlineCharacterLimit === undefined) { + return string; + } + + const oneLined = string + .replace(new RegExp(tokens.newLine, 'g'), '') + .replace(new RegExp(tokens.newLineOrSpace, 'g'), ' ') + .replace(new RegExp(tokens.pad + '|' + tokens.indent, 'g'), ''); + + if (oneLined.length <= opts.inlineCharacterLimit) { + return oneLined; + } + + return string + .replace(new RegExp(tokens.newLine + '|' + tokens.newLineOrSpace, 'g'), '\n') + .replace(new RegExp(tokens.pad, 'g'), pad) + .replace(new RegExp(tokens.indent, 'g'), pad + opts.indent); + }; + + if (seen.indexOf(val) !== -1) { + return '"[Circular]"'; + } + + if (val === null || + val === undefined || + typeof val === 'number' || + typeof val === 'boolean' || + typeof val === 'function' || + typeof val === 'symbol' || + isRegexp(val)) { + return String(val); + } + + if (val instanceof Date) { + return `new Date('${val.toISOString()}')`; + } + + if (Array.isArray(val)) { + if (val.length === 0) { + return '[]'; + } + + seen.push(val); + + const ret = '[' + tokens.newLine + val.map((el, i) => { + const eol = val.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace; + let value = stringify(el, opts, pad + opts.indent); + if (opts.transform) { + value = opts.transform(val, i, value); + } + return tokens.indent + value + eol; + }).join('') + tokens.pad + ']'; + + seen.pop(); + + return expandWhiteSpace(ret); + } + + if (isObj(val)) { + let objKeys = Object.keys(val).concat(getOwnEnumPropSymbols(val)); + + if (opts.filter) { + objKeys = objKeys.filter(el => opts.filter(val, el)); + } + + if (objKeys.length === 0) { + return '{}'; + } + + seen.push(val); + + const ret = '{' + tokens.newLine + objKeys.map((el, i) => { + const eol = objKeys.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace; + const isSymbol = typeof el === 'symbol'; + const isClassic = !isSymbol && /^[a-z$_][a-z$_0-9]*$/i.test(el); + const key = isSymbol || isClassic ? el : stringify(el, opts); + let value = stringify(val[el], opts, pad + opts.indent); + if (opts.transform) { + value = opts.transform(val, el, value); + } + return tokens.indent + String(key) + ': ' + value + eol; + }).join('') + tokens.pad + '}'; + + seen.pop(); + + return expandWhiteSpace(ret); + } + + val = String(val).replace(/[\r\n]/g, x => x === '\n' ? '\\n' : '\\r'); + + if (opts.singleQuotes === false) { + val = val.replace(/"/g, '\\"'); + return `"${val}"`; + } + + val = val.replace(/\\?'/g, '\\\''); + return `'${val}'`; + })(val, opts, pad); +}; diff --git a/tools/ui/node_modules/stringify-object/package.json b/tools/ui/node_modules/stringify-object/package.json new file mode 100644 index 0000000000000000000000000000000000000000..74d638c008915b542beb02281d5b45d81bb35893 --- /dev/null +++ b/tools/ui/node_modules/stringify-object/package.json @@ -0,0 +1,40 @@ +{ + "name": "stringify-object", + "version": "3.3.0", + "description": "Stringify an object/array like JSON.stringify just without all the double-quotes", + "license": "BSD-2-Clause", + "repository": "yeoman/stringify-object", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "object", + "stringify", + "pretty", + "print", + "dump", + "format", + "type", + "json" + ], + "dependencies": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/tools/ui/node_modules/stringify-object/readme.md b/tools/ui/node_modules/stringify-object/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..d4d6c3d79942c17485de6dc777f2ad34b799312d --- /dev/null +++ b/tools/ui/node_modules/stringify-object/readme.md @@ -0,0 +1,155 @@ +# stringify-object [![Build Status](https://secure.travis-ci.org/yeoman/stringify-object.svg?branch=master)](http://travis-ci.org/yeoman/stringify-object) + +> Stringify an object/array like JSON.stringify just without all the double-quotes + +Useful for when you want to get the string representation of an object in a formatted way. + +It also handles circular references and lets you specify quote type. + + +## Install + +``` +$ npm install stringify-object +``` + + +## Usage + +```js +const stringifyObject = require('stringify-object'); + +const obj = { + foo: 'bar', + 'arr': [1, 2, 3], + nested: { hello: "world" } +}; + +const pretty = stringifyObject(obj, { + indent: ' ', + singleQuotes: false +}); + +console.log(pretty); +/* +{ + foo: "bar", + arr: [ + 1, + 2, + 3 + ], + nested: { + hello: "world" + } +} +*/ +``` + + +## API + +### stringifyObject(input, [options]) + +Circular references will be replaced with `"[Circular]"`. + +#### input + +Type: `Object` `Array` + +#### options + +##### indent + +Type: `string`
+Default: `\t` + +Preferred indentation. + +##### singleQuotes + +Type: `boolean`
+Default: `true` + +Set to false to get double-quoted strings. + +##### filter(obj, prop) + +Type: `Function` + +Expected to return a `boolean` of whether to include the property `prop` of the object `obj` in the output. + +##### transform(obj, prop, originalResult) + +Type: `Function`
+Default: `undefined` + +Expected to return a `string` that transforms the string that resulted from stringifying `obj[prop]`. This can be used to detect special types of objects that need to be stringified in a particular way. The `transform` function might return an alternate string in this case, otherwise returning the `originalResult`. + +Here's an example that uses the `transform` option to mask fields named "password": + +```js +const obj = { + user: 'becky', + password: 'secret' +} + +const pretty = stringifyObject(obj, { + transform: (obj, prop, originalResult) => { + if (prop === 'password') { + return originalResult.replace(/\w/g, '*'); + } else { + return originalResult; + } + } +}); + +console.log(pretty); +/* +{ + user: 'becky', + password: '******' +} +*/ +``` + + +##### inlineCharacterLimit + +Type: `number` + +When set, will inline values up to `inlineCharacterLimit` length for the sake of more terse output. + +For example, given the example at the top of the README: + +```js +const obj = { + foo: 'bar', + 'arr': [1, 2, 3], + nested: { hello: "world" } +}; + +const pretty = stringifyObject(obj, { + indent: ' ', + singleQuotes: false, + inlineCharacterLimit: 12 +}); + +console.log(pretty); +/* +{ + foo: "bar", + arr: [1, 2, 3], + nested: { + hello: "world" + } +} +*/ +``` + +As you can see, `arr` was printed as a one-liner because its string was shorter than 12 characters. + + +## License + +BSD-2-Clause © Yeoman team diff --git a/tools/ui/node_modules/strip-ansi/index.d.ts b/tools/ui/node_modules/strip-ansi/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..44e954d0c724d82e07bbb484f05fcbf817347b03 --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,15 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi from 'strip-ansi'; + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +export default function stripAnsi(string: string): string; diff --git a/tools/ui/node_modules/strip-ansi/index.js b/tools/ui/node_modules/strip-ansi/index.js new file mode 100644 index 0000000000000000000000000000000000000000..0309635491a2e92378a7a3b381d1302c3710b197 --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/index.js @@ -0,0 +1,19 @@ +import ansiRegex from 'ansi-regex'; + +const regex = ansiRegex(); + +export default function stripAnsi(string) { + if (typeof string !== 'string') { + throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); + } + + // Fast path: ANSI codes require ESC (7-bit) or CSI (8-bit) introducer + if (!string.includes('\u001B') && !string.includes('\u009B')) { + return string; + } + + // Even though the regex is global, we don't need to reset the `.lastIndex` + // because unlike `.exec()` and `.test()`, `.replace()` does it automatically + // and doing it manually has a performance penalty. + return string.replace(regex, ''); +} diff --git a/tools/ui/node_modules/strip-ansi/license b/tools/ui/node_modules/strip-ansi/license new file mode 100644 index 0000000000000000000000000000000000000000..fa7ceba3eb4a9657a9db7f3ffca4e4e97a9019de --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7d562e9ca9587112d974ee108bdb884b33c5546e --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts @@ -0,0 +1,33 @@ +export type Options = { + /** + Match only the first ANSI escape. + + @default false + */ + readonly onlyFirst: boolean; +}; + +/** +Regular expression for matching ANSI escape codes. + +@example +``` +import ansiRegex from 'ansi-regex'; + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` +*/ +export default function ansiRegex(options?: Options): RegExp; diff --git a/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2cc5ca2419f1b2f191826b449192354ad5c4a065 --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,14 @@ +export default function ansiRegex({onlyFirst = false} = {}) { + // Valid string terminator sequences are BEL, ESC\, and 0x9c + const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)'; + + // OSC sequences only: ESC ] ... ST (non-greedy until the first ST) + const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`; + + // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte + const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]'; + + const pattern = `${osc}|${csi}`; + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +} diff --git a/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/license b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/license new file mode 100644 index 0000000000000000000000000000000000000000..fa7ceba3eb4a9657a9db7f3ffca4e4e97a9019de --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 0000000000000000000000000000000000000000..2efe9ebbe66be160939aa5e4a1c4e4ada16cad6c --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,61 @@ +{ + "name": "ansi-regex", + "version": "6.2.2", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "funding": "https://github.com/chalk/ansi-regex?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": "./index.js", + "types": "./index.d.ts", + "sideEffects": false, + "engines": { + "node": ">=12" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ansi-escapes": "^5.0.0", + "ava": "^3.15.0", + "tsd": "^0.21.0", + "xo": "^0.54.2" + } +} diff --git a/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..4d3c415a4bec63c03f5f8c158c79c388a4764467 --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,66 @@ +# ansi-regex + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + +## Install + +```sh +npm install ansi-regex +``` + +## Usage + +```js +import ansiRegex from 'ansi-regex'; + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + +## API + +### ansiRegex(options?) + +Returns a regex for matching ANSI escape codes. + +#### options + +Type: `object` + +##### onlyFirst + +Type: `boolean`\ +Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + +## Important + +If you run the regex against untrusted user input in a server context, you should [give it a timeout](https://github.com/sindresorhus/super-regex). + +**I do not consider [ReDoS](https://blog.yossarian.net/2022/12/28/ReDoS-vulnerabilities-and-misaligned-incentives) a valid vulnerability for this package.** + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) diff --git a/tools/ui/node_modules/strip-ansi/package.json b/tools/ui/node_modules/strip-ansi/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a1786b3c5bc9ade04d546961a7055bc04d98c96c --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/package.json @@ -0,0 +1,59 @@ +{ + "name": "strip-ansi", + "version": "7.2.0", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "funding": "https://github.com/chalk/strip-ansi?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": "./index.js", + "types": "./index.d.ts", + "sideEffects": false, + "engines": { + "node": ">=12" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "devDependencies": { + "ava": "^6.4.1", + "tsd": "^0.33.0", + "xo": "^1.2.3" + } +} diff --git a/tools/ui/node_modules/strip-ansi/readme.md b/tools/ui/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..109b692b413c4aaa57168f9a981f5fb1f48525c7 --- /dev/null +++ b/tools/ui/node_modules/strip-ansi/readme.md @@ -0,0 +1,37 @@ +# strip-ansi + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string + +> [!NOTE] +> Node.js has this built-in now with [`stripVTControlCharacters`](https://nodejs.org/api/util.html#utilstripvtcontrolcharactersstr). The benefit of this package is consistent behavior across Node.js versions and faster improvements. The Node.js version is actually based on this package. + +## Install + +```sh +npm install strip-ansi +``` + +## Usage + +```js +import stripAnsi from 'strip-ansi'; + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) diff --git a/tools/ui/node_modules/strip-comments/CHANGELOG.md b/tools/ui/node_modules/strip-comments/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..7d215655e3a08d52b6acd84959abbea92b1529a8 --- /dev/null +++ b/tools/ui/node_modules/strip-comments/CHANGELOG.md @@ -0,0 +1,136 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +

+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ + +## [2.0.0] - 2019-09-14 + +**Changed** + +- Refactored again to use a custom parser that is much faster and supports a number of different languages. + +## [1.0.2] - 2018-05-03 + +- refactored +- Remove default objectRestSpread plugin #40 allows for user configured plugins +- Merge pull request #42 from tallarium/remove-default-transform +- Merge remote-tracking branch 'origin/master' into refactor +- Merge remote-tracking branch 'origin/master' into refactor +- Merge pull request #44 from jonschlinkert/refactor + +## [1.0.1] - 2018-03-24 + +- feat: Allow users to specify their own babylon plugins +- Merge pull request #40 from briandipalma/patch-1 +- adds `allowReturnOutsideFunction` to defaults + +## [1.0.0] - 2018-03-24 + +- adds object-rest-spread plugin + +## [0.4.4] - 2016-02-14 + +- refactor to use babylon + +## [0.4.3] - 2015-12-25 + +- minor tweak + +## [0.4.2] - 2015-12-11 + +- bump extract-comments per issue https://github.com/jonschlinkert/strip-comments/issues/29 +- Merge branch 'master' of https://github.com/lebbe/strip-comments into lebbe-master +- Merge branch 'lebbe-master' + +## [0.4.0] - 2015-11-04 + +- adds more test cases +- closes https://github.com/jonschlinkert/strip-comments/issues/18 +- Handles comments that are substrings of a later comment +- Merge pull request #28 from epicoxymoron/bugfix/27-discard-is-too-greedy +- adds example +- adds json test + +## [0.3.4] - 2015-10-22 + +- refactored +- expose `first` method. code comments, minor formatting +- allow line/block to be specified as options +- Merge pull request #23 from jonschlinkert/dev +- fixes examples +- adds editorconfig + +## [0.3.0] - 2014-09-02 + +- merge fix from origin +- Merge pull request #13 from mk-pmb/tests_literals_nocomment +- Merge pull request #15 from mk-pmb/tests_literals_snake +- Merge pull request #22 from kgryte/patch-1 +- Merge pull request #9 from tunnckoCore/master +- Merge remote-tracking branch 'origin/line-comments' +- Merge remote-tracking branch 'origin/master' +- tests: not a comment: snake-y ASCII art +- tests: string and regexp literals +- adds tests for URLs +- fix globstars +- lint + +## [0.2.0] - 2014-08-10 + +- fixes `use strict` statement + +## [0.1.6] - 2014-02-13 + +- Merge branch 'master' of https://github.com/tunnckoCore/strip-comments into tunnckoCore-master +- Merge branch 'tunnckoCore-master' +- minor formatting + +## [0.1.0] - 2014-02-10 + +- first commit + +[1.0.2]: https://github.com/jonschlinkert/strip-comments/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/jonschlinkert/strip-comments/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/jonschlinkert/strip-comments/compare/0.4.4...1.0.0 +[0.4.4]: https://github.com/jonschlinkert/strip-comments/compare/0.4.3...0.4.4 +[0.4.3]: https://github.com/jonschlinkert/strip-comments/compare/0.4.2...0.4.3 +[0.4.2]: https://github.com/jonschlinkert/strip-comments/compare/0.4.0...0.4.2 +[0.4.0]: https://github.com/jonschlinkert/strip-comments/compare/0.3.4...0.4.0 +[0.3.4]: https://github.com/jonschlinkert/strip-comments/compare/0.3.0...0.3.4 +[0.3.0]: https://github.com/jonschlinkert/strip-comments/compare/0.2.0...0.3.0 +[0.2.0]: https://github.com/jonschlinkert/strip-comments/compare/0.1.6...0.2.0 +[0.1.6]: https://github.com/jonschlinkert/strip-comments/compare/0.1.0...0.1.6 + +[Unreleased]: https://github.com/jonschlinkert/strip-comments/compare/0.1.0...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog + diff --git a/tools/ui/node_modules/strip-comments/LICENSE b/tools/ui/node_modules/strip-comments/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9af4a67d206f24ecdbb5fdff2839041ca0bbd346 --- /dev/null +++ b/tools/ui/node_modules/strip-comments/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tools/ui/node_modules/strip-comments/README.md b/tools/ui/node_modules/strip-comments/README.md new file mode 100644 index 0000000000000000000000000000000000000000..62ec4fece34a0c771f5015a781436349ad1e7f82 --- /dev/null +++ b/tools/ui/node_modules/strip-comments/README.md @@ -0,0 +1,237 @@ +# strip-comments [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/strip-comments.svg?style=flat)](https://www.npmjs.com/package/strip-comments) [![NPM monthly downloads](https://img.shields.io/npm/dm/strip-comments.svg?style=flat)](https://npmjs.org/package/strip-comments) [![NPM total downloads](https://img.shields.io/npm/dt/strip-comments.svg?style=flat)](https://npmjs.org/package/strip-comments) [![Build Status](https://travis-ci.org/jonschlinkert/strip-comments.svg?branch=master)](https://travis-ci.org/jonschlinkert/strip-comments) + +> Strip line and/or block comments from a string. Blazing fast, and works with JavaScript, Sass, CSS, Less.js, and a number of other languages. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +- [Install](#install) +- [What does this do?](#what-does-this-do) +- [Usage](#usage) +- [API](#api) +- [About](#about) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/) (requires [Node.js](https://nodejs.org/en/) >=10): + +```sh +$ npm install --save strip-comments +``` + +## What does this do? + +Takes a string and returns a new string with comments removed. Works with line comments and/or block comments. Optionally removes the first comment only or ignores protected comments. + +Works with: + +* ada +* apl +* applescript +* c +* csharp +* css +* hashbang +* haskell +* html +* java +* javascript +* less +* lua +* matlab +* ocaml +* pascal +* perl +* php +* python +* ruby +* sass +* shebang +* sql +* swift +* typscript +* xml + +## Usage + +By default all comments are stripped. + +```js +const strip = require('strip-comments'); +const str = strip('const foo = "bar";// this is a comment\n /* me too *\/'); +console.log(str); +// => 'const foo = "bar";\n' +``` + +For more use-cases see the [tests](./test/test.js) + +## API + +### [strip](index.js#L33) + +Strip all code comments from the given `input`, including protected comments that start with `!`, unless disabled by setting `options.keepProtected` to true. + +**Params** + +* `input` **{String}**: string from which to strip comments +* `options` **{Object}**: optional options, passed to [extract-comments](https://github.com/jonschlinkert/extract-comments) + +- `line` **{Boolean}**: if `false` strip only block comments, default `true` +- `block` **{Boolean}**: if `false` strip only line comments, default `true` +- `keepProtected` **{Boolean}**: Keep ignored comments (e.g. `/*!` and `//!`) +- `preserveNewlines` **{Boolean}**: Preserve newlines after comments are stripped +* `returns` **{String}**: modified input + +**Example** + +```js +const str = strip('const foo = "bar";// this is a comment\n /* me too */'); +console.log(str); +// => 'const foo = "bar";' +``` + +### [.block](index.js#L54) + +Strip only block comments. + +**Params** + +* `input` **{String}**: string from which to strip comments +* `options` **{Object}**: pass `opts.keepProtected: true` to keep ignored comments (e.g. `/*!`) +* `returns` **{String}**: modified string + +**Example** + +```js +const strip = require('..'); +const str = strip.block('const foo = "bar";// this is a comment\n /* me too */'); +console.log(str); +// => 'const foo = "bar";// this is a comment' +``` + +### [.line](index.js#L74) + +Strip only line comments. + +**Params** + +* `input` **{String}**: string from which to strip comments +* `options` **{Object}**: pass `opts.keepProtected: true` to keep ignored comments (e.g. `//!`) +* `returns` **{String}**: modified string + +**Example** + +```js +const str = strip.line('const foo = "bar";// this is a comment\n /* me too */'); +console.log(str); +// => 'const foo = "bar";\n/* me too */' +``` + +### [.first](index.js#L95) + +Strip the first comment from the given `input`. Or, if `opts.keepProtected` is true, the first non-protected comment will be stripped. + +**Params** + +* `input` **{String}** +* `options` **{Object}**: pass `opts.keepProtected: true` to keep comments with `!` +* `returns` **{String}** + +**Example** + +```js +const output = strip.first(input, { keepProtected: true }); +console.log(output); +// => '//! first comment\nfoo; ' +``` + +### [.block](index.js#L116) + +Parses a string and returns a basic CST (Concrete Syntax Tree). + +**Params** + +* `input` **{String}**: string from which to strip comments +* `options` **{Object}**: pass `opts.keepProtected: true` to keep ignored comments (e.g. `/*!`) +* `returns` **{String}**: modified string + +**Example** + +```js +const strip = require('..'); +const str = strip.block('const foo = "bar";// this is a comment\n /* me too */'); +console.log(str); +// => 'const foo = "bar";// this is a comment' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [code-context](https://www.npmjs.com/package/code-context): Parse a string of javascript to determine the context for functions, variables and comments based… [more](https://github.com/jonschlinkert/code-context) | [homepage](https://github.com/jonschlinkert/code-context "Parse a string of javascript to determine the context for functions, variables and comments based on the code that follows.") +* [extract-comments](https://www.npmjs.com/package/extract-comments): Uses esprima to extract line and block comments from a string of JavaScript. Also optionally… [more](https://github.com/jonschlinkert/extract-comments) | [homepage](https://github.com/jonschlinkert/extract-comments "Uses esprima to extract line and block comments from a string of JavaScript. Also optionally parses code context (the next line of code after a comment).") +* [parse-code-context](https://www.npmjs.com/package/parse-code-context): Fast and simple way to parse code context for use with documentation from code comments… [more](https://github.com/jonschlinkert/parse-code-context) | [homepage](https://github.com/jonschlinkert/parse-code-context "Fast and simple way to parse code context for use with documentation from code comments. Parses context from a single line of JavaScript, for functions, variable declarations, methods, prototype properties, prototype methods etc.") +* [parse-comments](https://www.npmjs.com/package/parse-comments): Parse code comments from JavaScript or any language that uses the same format. | [homepage](https://github.com/jonschlinkert/parse-comments "Parse code comments from JavaScript or any language that uses the same format.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 82 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [tunnckoCore](https://github.com/tunnckoCore) | +| 2 | [mk-pmb](https://github.com/mk-pmb) | +| 1 | [kgryte](https://github.com/kgryte) | +| 1 | [briandipalma](https://github.com/briandipalma) | +| 1 | [epicoxymoron](https://github.com/epicoxymoron) | +| 1 | [XuluWarrior](https://github.com/XuluWarrior) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 13, 2019._ \ No newline at end of file diff --git a/tools/ui/node_modules/strip-comments/index.js b/tools/ui/node_modules/strip-comments/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7dcedb30c2ef03879e7bb93b921261a0eb38041f --- /dev/null +++ b/tools/ui/node_modules/strip-comments/index.js @@ -0,0 +1,116 @@ +/*! + * strip-comments + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +const compile = require('./lib/compile'); +const parse = require('./lib/parse'); + +/** + * Strip all code comments from the given `input`, including protected + * comments that start with `!`, unless disabled by setting `options.keepProtected` + * to true. + * + * ```js + * const str = strip('const foo = "bar";// this is a comment\n /* me too *\/'); + * console.log(str); + * // => 'const foo = "bar";' + * ``` + * @name strip + * @param {String} `input` string from which to strip comments + * @param {Object} `options` optional options, passed to [extract-comments][extract-comments] + * @option {Boolean} [options] `line` if `false` strip only block comments, default `true` + * @option {Boolean} [options] `block` if `false` strip only line comments, default `true` + * @option {Boolean} [options] `keepProtected` Keep ignored comments (e.g. `/*!` and `//!`) + * @option {Boolean} [options] `preserveNewlines` Preserve newlines after comments are stripped + * @return {String} modified input + * @api public + */ + +const strip = module.exports = (input, options) => { + const opts = { ...options, block: true, line: true }; + return compile(parse(input, opts), opts); +}; + +/** + * Strip only block comments. + * + * ```js + * const strip = require('..'); + * const str = strip.block('const foo = "bar";// this is a comment\n /* me too *\/'); + * console.log(str); + * // => 'const foo = "bar";// this is a comment' + * ``` + * @name .block + * @param {String} `input` string from which to strip comments + * @param {Object} `options` pass `opts.keepProtected: true` to keep ignored comments (e.g. `/*!`) + * @return {String} modified string + * @api public + */ + +strip.block = (input, options) => { + const opts = { ...options, block: true }; + return compile(parse(input, opts), opts); +}; + +/** + * Strip only line comments. + * + * ```js + * const str = strip.line('const foo = "bar";// this is a comment\n /* me too *\/'); + * console.log(str); + * // => 'const foo = "bar";\n/* me too *\/' + * ``` + * @name .line + * @param {String} `input` string from which to strip comments + * @param {Object} `options` pass `opts.keepProtected: true` to keep ignored comments (e.g. `//!`) + * @return {String} modified string + * @api public + */ + +strip.line = (input, options) => { + const opts = { ...options, line: true }; + return compile(parse(input, opts), opts); +}; + +/** + * Strip the first comment from the given `input`. Or, if `opts.keepProtected` is true, + * the first non-protected comment will be stripped. + * + * ```js + * const output = strip.first(input, { keepProtected: true }); + * console.log(output); + * // => '//! first comment\nfoo; ' + * ``` + * @name .first + * @param {String} `input` + * @param {Object} `options` pass `opts.keepProtected: true` to keep comments with `!` + * @return {String} + * @api public + */ + +strip.first = (input, options) => { + const opts = { ...options, block: true, line: true, first: true }; + return compile(parse(input, opts), opts); +}; + +/** + * Parses a string and returns a basic CST (Concrete Syntax Tree). + * + * ```js + * const strip = require('..'); + * const str = strip.block('const foo = "bar";// this is a comment\n /* me too *\/'); + * console.log(str); + * // => 'const foo = "bar";// this is a comment' + * ``` + * @name .block + * @param {String} `input` string from which to strip comments + * @param {Object} `options` pass `opts.keepProtected: true` to keep ignored comments (e.g. `/*!`) + * @return {String} modified string + * @api public + */ + +strip.parse = parse; diff --git a/tools/ui/node_modules/strip-comments/lib/Node.js b/tools/ui/node_modules/strip-comments/lib/Node.js new file mode 100644 index 0000000000000000000000000000000000000000..c0c81f71454aba15d6273118579fe6d77da22aeb --- /dev/null +++ b/tools/ui/node_modules/strip-comments/lib/Node.js @@ -0,0 +1,28 @@ +'use strict'; + +class Node { + constructor(node) { + this.type = node.type; + if (node.value) this.value = node.value; + if (node.match) this.match = node.match; + this.newline = node.newline || ''; + } + get protected() { + return Boolean(this.match) && this.match[1] === '!'; + } +} + +class Block extends Node { + constructor(node) { + super(node); + this.nodes = node.nodes || []; + } + push(node) { + this.nodes.push(node); + } + get protected() { + return this.nodes.length > 0 && this.nodes[0].protected === true; + } +} + +module.exports = { Node, Block }; diff --git a/tools/ui/node_modules/strip-comments/lib/compile.js b/tools/ui/node_modules/strip-comments/lib/compile.js new file mode 100644 index 0000000000000000000000000000000000000000..951ff3ed8307d353204bdb100212c7b8cf5c5ef0 --- /dev/null +++ b/tools/ui/node_modules/strip-comments/lib/compile.js @@ -0,0 +1,63 @@ +'use strict'; + +const compile = (cst, options = {}) => { + const keepProtected = options.safe === true || options.keepProtected === true; + let firstSeen = false; + + const walk = (node, parent) => { + let output = ''; + let inner; + let lines; + + for (const child of node.nodes) { + switch (child.type) { + case 'block': + if (options.first && firstSeen === true) { + output += walk(child, node); + break; + } + + if (options.preserveNewlines === true) { + inner = walk(child, node); + lines = inner.split('\n'); + output += '\n'.repeat(lines.length - 1); + break; + } + + if (keepProtected === true && child.protected === true) { + output += walk(child, node); + break; + } + + firstSeen = true; + break; + case 'line': + if (options.first && firstSeen === true) { + output += child.value; + break; + } + + if (keepProtected === true && child.protected === true) { + output += child.value; + } + + firstSeen = true; + break; + case 'open': + case 'close': + case 'text': + case 'newline': + default: { + output += child.value || ''; + break; + } + } + } + + return output; + }; + + return walk(cst); +}; + +module.exports = compile; diff --git a/tools/ui/node_modules/strip-comments/lib/languages.js b/tools/ui/node_modules/strip-comments/lib/languages.js new file mode 100644 index 0000000000000000000000000000000000000000..362776daa593ccaf17415202636bf94e2a2c680d --- /dev/null +++ b/tools/ui/node_modules/strip-comments/lib/languages.js @@ -0,0 +1,85 @@ +'use strict'; + +exports.ada = { LINE_REGEX: /^--.*/ }; +exports.apl = { LINE_REGEX: /^⍝.*/ }; + +exports.applescript = { + BLOCK_OPEN_REGEX: /^\(\*/, + BLOCK_CLOSE_REGEX: /^\*\)/ +}; + +exports.csharp = { + LINE_REGEX: /^\/\/.*/ +}; + +exports.haskell = { + BLOCK_OPEN_REGEX: /^\{-/, + BLOCK_CLOSE_REGEX: /^-\}/, + LINE_REGEX: /^--.*/ +}; + +exports.html = { + BLOCK_OPEN_REGEX: /^\n*/, + BLOCK_CLOSE_LOOSE_REGEX: /^(?/, + BLOCK_CLOSE_STRICT_NEWLINE_REGEX: /^(?(\s*\n+|\n*)/, + BLOCK_CLOSE_STRICT_LOOSE_REGEX: /^(?(\s*\n+|\n*)/ +}; + +exports.javascript = { + BLOCK_OPEN_REGEX: /^\/\*\*?(!?)/, + BLOCK_CLOSE_REGEX: /^\*\/(\n?)/, + LINE_REGEX: /^\/\/(!?).*/ +}; + +exports.lua = { + BLOCK_OPEN_REGEX: /^--\[\[/, + BLOCK_CLOSE_REGEX: /^\]\]/, + LINE_REGEX: /^--.*/ +}; + +exports.matlab = { + BLOCK_OPEN_REGEX: /^%{/, + BLOCK_CLOSE_REGEX: /^%}/, + LINE_REGEX: /^%.*/ +}; + +exports.perl = { + LINE_REGEX: /^#.*/ +}; + +exports.php = { + ...exports.javascript, + LINE_REGEX: /^(#|\/\/).*?(?=\?>|\n)/ +}; + +exports.python = { + BLOCK_OPEN_REGEX: /^"""/, + BLOCK_CLOSE_REGEX: /^"""/, + LINE_REGEX: /^#.*/ +}; + +exports.ruby = { + BLOCK_OPEN_REGEX: /^=begin/, + BLOCK_CLOSE_REGEX: /^=end/, + LINE_REGEX: /^#.*/ +}; + +exports.shebang = exports.hashbang = { + LINE_REGEX: /^#!.*/ +}; + +exports.c = exports.javascript; +exports.csharp = exports.javascript; +exports.css = exports.javascript; +exports.java = exports.javascript; +exports.js = exports.javascript; +exports.less = exports.javascript; +exports.pascal = exports.applescript; +exports.ocaml = exports.applescript; +exports.sass = exports.javascript; +exports.sql = exports.ada; +exports.swift = exports.javascript; +exports.ts = exports.javascript; +exports.typscript = exports.javascript; +exports.xml = exports.html; diff --git a/tools/ui/node_modules/strip-comments/lib/parse.js b/tools/ui/node_modules/strip-comments/lib/parse.js new file mode 100644 index 0000000000000000000000000000000000000000..1097ba375e04bb4b7fa8919c50a2cb9e2fc77769 --- /dev/null +++ b/tools/ui/node_modules/strip-comments/lib/parse.js @@ -0,0 +1,141 @@ +'use strict'; + +const { Node, Block } = require('./Node'); +const languages = require('./languages'); + +const constants = { + ESCAPED_CHAR_REGEX: /^\\./, + QUOTED_STRING_REGEX: /^(['"`])((?:\\.|[^\1])+?)(\1)/, + NEWLINE_REGEX: /^\r*\n/ +}; + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + const cst = new Block({ type: 'root', nodes: [] }); + const stack = [cst]; + const name = (options.language || 'javascript').toLowerCase(); + const lang = languages[name]; + + if (typeof lang === 'undefined') { + throw new Error(`Language "${name}" is not supported by strip-comments`); + } + + const { LINE_REGEX, BLOCK_OPEN_REGEX, BLOCK_CLOSE_REGEX } = lang; + let block = cst; + let remaining = input; + let token; + let prev; + + const source = [BLOCK_OPEN_REGEX, BLOCK_CLOSE_REGEX].filter(Boolean); + let tripleQuotes = false; + + if (source.every(regex => regex.source === '^"""')) { + tripleQuotes = true; + } + + /** + * Helpers + */ + + const consume = (value = remaining[0] || '') => { + remaining = remaining.slice(value.length); + return value; + }; + + const scan = (regex, type = 'text') => { + const match = regex.exec(remaining); + if (match) { + consume(match[0]); + return { type, value: match[0], match }; + } + }; + + const push = node => { + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + block.push(node); + if (node.nodes) { + stack.push(node); + block = node; + } + prev = node; + }; + + const pop = () => { + if (block.type === 'root') { + throw new SyntaxError('Unclosed block comment'); + } + stack.pop(); + block = stack[stack.length - 1]; + }; + + /** + * Parse input string + */ + + while (remaining !== '') { + // escaped characters + if ((token = scan(constants.ESCAPED_CHAR_REGEX, 'text'))) { + push(new Node(token)); + continue; + } + + // quoted strings + if (block.type !== 'block' && (!prev || !/\w$/.test(prev.value)) && !(tripleQuotes && remaining.startsWith('"""'))) { + if ((token = scan(constants.QUOTED_STRING_REGEX, 'text'))) { + push(new Node(token)); + continue; + } + } + + // newlines + if ((token = scan(constants.NEWLINE_REGEX, 'newline'))) { + push(new Node(token)); + continue; + } + + // block comment open + if (BLOCK_OPEN_REGEX && options.block && !(tripleQuotes && block.type === 'block')) { + if ((token = scan(BLOCK_OPEN_REGEX, 'open'))) { + push(new Block({ type: 'block' })); + push(new Node(token)); + continue; + } + } + + // block comment close + if (BLOCK_CLOSE_REGEX && block.type === 'block' && options.block) { + if ((token = scan(BLOCK_CLOSE_REGEX, 'close'))) { + token.newline = token.match[1] || ''; + push(new Node(token)); + pop(); + continue; + } + } + + // line comment + if (LINE_REGEX && block.type !== 'block' && options.line) { + if ((token = scan(LINE_REGEX, 'line'))) { + push(new Node(token)); + continue; + } + } + + // Plain text (skip "C" since some languages use "C" to start comments) + if ((token = scan(/^[a-zABD-Z0-9\t ]+/, 'text'))) { + push(new Node(token)); + continue; + } + + push(new Node({ type: 'text', value: consume(remaining[0]) })); + } + + return cst; +}; + +module.exports = parse; diff --git a/tools/ui/node_modules/strip-comments/package.json b/tools/ui/node_modules/strip-comments/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7926efe3bc88d5b2872edca6bc3393ccd7f313c4 --- /dev/null +++ b/tools/ui/node_modules/strip-comments/package.json @@ -0,0 +1,102 @@ +{ + "name": "strip-comments", + "description": "Strip line and/or block comments from a string. Blazing fast, and works with JavaScript, Sass, CSS, Less.js, and a number of other languages.", + "version": "2.0.1", + "homepage": "https://github.com/jonschlinkert/strip-comments", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/strip-comments", + "bugs": { + "url": "https://github.com/jonschlinkert/strip-comments/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "mocha", + "cover": "nyc --reporter=text --reporter=html mocha" + }, + "devDependencies": { + "gulp-format-md": "^2.0.0", + "mocha": "^6.2.2", + "nyc": "^14.1.1" + }, + "keywords": [ + "ada comments", + "apl comments", + "applescript comments", + "block comment", + "block", + "block-comment", + "c comments", + "code comment", + "comment", + "comments", + "csharp comments", + "css comments", + "css", + "hashbang comments", + "haskell comments", + "html comments", + "java comments", + "javascript comments", + "javascript", + "js", + "less comments", + "less css", + "less", + "less.js", + "lessjs", + "line comment", + "line comments", + "line", + "line-comment", + "line-comments", + "lua comments", + "matlab comments", + "ocaml comments", + "pascal comments", + "perl comments", + "php comments", + "python comments", + "remove", + "ruby comments", + "sass comments", + "sass", + "shebang comments", + "sql comments", + "strip", + "swift comments", + "typscript comments", + "xml comments" + ], + "verb": { + "toc": true, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "helpers": [ + "./examples/support/helpers.js" + ], + "related": { + "list": [ + "code-context", + "extract-comments", + "parse-code-context", + "parse-comments" + ] + }, + "lint": { + "reflinks": true + } + } +} \ No newline at end of file diff --git a/tools/ui/node_modules/strip-indent/index.d.ts b/tools/ui/node_modules/strip-indent/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..44f2304b9d4817c4592b23110348d35d1881816a --- /dev/null +++ b/tools/ui/node_modules/strip-indent/index.d.ts @@ -0,0 +1,21 @@ +/** +Strip leading whitespace from each line in a string. + +The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove. + +@example +``` +import stripIndent = require('strip-indent'); + +const string = '\tunicorn\n\t\tcake'; +// unicorn +// cake + +stripIndent(string); +//unicorn +// cake +``` +*/ +declare function stripIndent(string: string): string; + +export = stripIndent; diff --git a/tools/ui/node_modules/strip-indent/index.js b/tools/ui/node_modules/strip-indent/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7ba3b15b3e60f64a739d049a05fdd1a7df0546d5 --- /dev/null +++ b/tools/ui/node_modules/strip-indent/index.js @@ -0,0 +1,14 @@ +'use strict'; +const minIndent = require('min-indent'); + +module.exports = string => { + const indent = minIndent(string); + + if (indent === 0) { + return string; + } + + const regex = new RegExp(`^[ \\t]{${indent}}`, 'gm'); + + return string.replace(regex, ''); +}; diff --git a/tools/ui/node_modules/strip-indent/license b/tools/ui/node_modules/strip-indent/license new file mode 100644 index 0000000000000000000000000000000000000000..e7af2f77107d73046421ef56c4684cbfdd3c1e89 --- /dev/null +++ b/tools/ui/node_modules/strip-indent/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/ui/node_modules/strip-indent/package.json b/tools/ui/node_modules/strip-indent/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d66a003b8ba555cb3316ee8c95f9f24b8c384cb6 --- /dev/null +++ b/tools/ui/node_modules/strip-indent/package.json @@ -0,0 +1,42 @@ +{ + "name": "strip-indent", + "version": "3.0.0", + "description": "Strip leading whitespace from each line in a string", + "license": "MIT", + "repository": "sindresorhus/strip-indent", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "indent", + "indentation", + "normalize", + "remove", + "delete", + "whitespace", + "space", + "tab", + "string" + ], + "dependencies": { + "min-indent": "^1.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/tools/ui/node_modules/strip-indent/readme.md b/tools/ui/node_modules/strip-indent/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..f14f6ba78912c8d2dfa8df678a6e03075c51a58c --- /dev/null +++ b/tools/ui/node_modules/strip-indent/readme.md @@ -0,0 +1,44 @@ +# strip-indent [![Build Status](https://travis-ci.org/sindresorhus/strip-indent.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-indent) + +> Strip leading whitespace from each line in a string + +The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove. + +Useful for removing redundant indentation. + + +## Install + +``` +$ npm install strip-indent +``` + + +## Usage + +```js +const stripIndent = require('strip-indent'); + +const string = '\tunicorn\n\t\tcake'; +/* + unicorn + cake +*/ + +stripIndent(string); +/* +unicorn + cake +*/ +``` + + +## Related + +- [strip-indent-cli](https://github.com/sindresorhus/strip-indent-cli) - CLI for this module +- [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/tools/ui/node_modules/strip-json-comments/index.d.ts b/tools/ui/node_modules/strip-json-comments/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..28ba3c8a80210203ea53b095dbcc90408e87c3c8 --- /dev/null +++ b/tools/ui/node_modules/strip-json-comments/index.d.ts @@ -0,0 +1,36 @@ +declare namespace stripJsonComments { + interface Options { + /** + Replace comments with whitespace instead of stripping them entirely. + + @default true + */ + readonly whitespace?: boolean; + } +} + +/** +Strip comments from JSON. Lets you use comments in your JSON files! + +It will replace single-line comments `//` and multi-line comments `/**\/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. + +@param jsonString - Accepts a string with JSON. +@returns A JSON string without comments. + +@example +``` +const json = `{ + // Rainbows + "unicorn": "cake" +}`; + +JSON.parse(stripJsonComments(json)); +//=> {unicorn: 'cake'} +``` +*/ +declare function stripJsonComments( + jsonString: string, + options?: stripJsonComments.Options +): string; + +export = stripJsonComments; diff --git a/tools/ui/node_modules/strip-json-comments/index.js b/tools/ui/node_modules/strip-json-comments/index.js new file mode 100644 index 0000000000000000000000000000000000000000..bb00b38bafe41552cc60d825516f479122e86e86 --- /dev/null +++ b/tools/ui/node_modules/strip-json-comments/index.js @@ -0,0 +1,77 @@ +'use strict'; +const singleComment = Symbol('singleComment'); +const multiComment = Symbol('multiComment'); +const stripWithoutWhitespace = () => ''; +const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/\S/g, ' '); + +const isEscaped = (jsonString, quotePosition) => { + let index = quotePosition - 1; + let backslashCount = 0; + + while (jsonString[index] === '\\') { + index -= 1; + backslashCount += 1; + } + + return Boolean(backslashCount % 2); +}; + +module.exports = (jsonString, options = {}) => { + if (typeof jsonString !== 'string') { + throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``); + } + + const strip = options.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; + + let insideString = false; + let insideComment = false; + let offset = 0; + let result = ''; + + for (let i = 0; i < jsonString.length; i++) { + const currentCharacter = jsonString[i]; + const nextCharacter = jsonString[i + 1]; + + if (!insideComment && currentCharacter === '"') { + const escaped = isEscaped(jsonString, i); + if (!escaped) { + insideString = !insideString; + } + } + + if (insideString) { + continue; + } + + if (!insideComment && currentCharacter + nextCharacter === '//') { + result += jsonString.slice(offset, i); + offset = i; + insideComment = singleComment; + i++; + } else if (insideComment === singleComment && currentCharacter + nextCharacter === '\r\n') { + i++; + insideComment = false; + result += strip(jsonString, offset, i); + offset = i; + continue; + } else if (insideComment === singleComment && currentCharacter === '\n') { + insideComment = false; + result += strip(jsonString, offset, i); + offset = i; + } else if (!insideComment && currentCharacter + nextCharacter === '/*') { + result += jsonString.slice(offset, i); + offset = i; + insideComment = multiComment; + i++; + continue; + } else if (insideComment === multiComment && currentCharacter + nextCharacter === '*/') { + i++; + insideComment = false; + result += strip(jsonString, offset, i + 1); + offset = i + 1; + continue; + } + } + + return result + (insideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset)); +}; diff --git a/tools/ui/node_modules/strip-json-comments/license b/tools/ui/node_modules/strip-json-comments/license new file mode 100644 index 0000000000000000000000000000000000000000..fa7ceba3eb4a9657a9db7f3ffca4e4e97a9019de --- /dev/null +++ b/tools/ui/node_modules/strip-json-comments/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/ui/node_modules/strip-json-comments/package.json b/tools/ui/node_modules/strip-json-comments/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ce7875aa0d1963cc7b61f349d6062159af6555f1 --- /dev/null +++ b/tools/ui/node_modules/strip-json-comments/package.json @@ -0,0 +1,47 @@ +{ + "name": "strip-json-comments", + "version": "3.1.1", + "description": "Strip comments from JSON. Lets you use comments in your JSON files!", + "license": "MIT", + "repository": "sindresorhus/strip-json-comments", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "bench": "matcha benchmark.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "json", + "strip", + "comments", + "remove", + "delete", + "trim", + "multiline", + "parse", + "config", + "configuration", + "settings", + "util", + "env", + "environment", + "jsonc" + ], + "devDependencies": { + "ava": "^1.4.1", + "matcha": "^0.7.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/tools/ui/node_modules/strip-json-comments/readme.md b/tools/ui/node_modules/strip-json-comments/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..cc542e50cf10fb29a610af736a312a246acf775a --- /dev/null +++ b/tools/ui/node_modules/strip-json-comments/readme.md @@ -0,0 +1,78 @@ +# strip-json-comments [![Build Status](https://travis-ci.com/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.com/github/sindresorhus/strip-json-comments) + +> Strip comments from JSON. Lets you use comments in your JSON files! + +This is now possible: + +```js +{ + // Rainbows + "unicorn": /* ❤ */ "cake" +} +``` + +It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. + +Also available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[Grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[Broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. + +## Install + +``` +$ npm install strip-json-comments +``` + +## Usage + +```js +const json = `{ + // Rainbows + "unicorn": /* ❤ */ "cake" +}`; + +JSON.parse(stripJsonComments(json)); +//=> {unicorn: 'cake'} +``` + +## API + +### stripJsonComments(jsonString, options?) + +#### jsonString + +Type: `string` + +Accepts a string with JSON and returns a string without comments. + +#### options + +Type: `object` + +##### whitespace + +Type: `boolean`\ +Default: `true` + +Replace comments with whitespace instead of stripping them entirely. + +## Benchmark + +``` +$ npm run bench +``` + +## Related + +- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module +- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS + +--- + + diff --git a/tools/ui/node_modules/style-to-object/LICENSE b/tools/ui/node_modules/style-to-object/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e1090121f38db6c3da72dd438d025bed062de5d1 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2017 Menglin "Mark" Xu + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/ui/node_modules/style-to-object/README.md b/tools/ui/node_modules/style-to-object/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9172d1f1d89e7f37850e068d197434272c354f9a --- /dev/null +++ b/tools/ui/node_modules/style-to-object/README.md @@ -0,0 +1,188 @@ +# style-to-object + +[![NPM](https://nodei.co/npm/style-to-object.png)](https://nodei.co/npm/style-to-object/) + +[![NPM version](https://img.shields.io/npm/v/style-to-object)](https://www.npmjs.com/package/style-to-object) +[![NPM bundle size](https://img.shields.io/bundlephobia/minzip/style-to-object)](https://bundlephobia.com/package/style-to-object) +[![build](https://github.com/remarkablemark/style-to-object/actions/workflows/build.yml/badge.svg)](https://github.com/remarkablemark/style-to-object/actions/workflows/build.yml) +[![codecov](https://codecov.io/gh/remarkablemark/style-to-object/branch/master/graph/badge.svg?token=XWxph9dpa4)](https://codecov.io/gh/remarkablemark/style-to-object) +[![NPM downloads](https://img.shields.io/npm/dm/style-to-object)](https://www.npmjs.com/package/style-to-object) + +Parse CSS inline style to JavaScript object: + +```js +import parse from 'style-to-object'; + +parse('color: #C0FFEE; background: #BADA55;'); +``` + +Output: + +```js +{ color: '#C0FFEE', background: '#BADA55' } +``` + +[JSFiddle](https://jsfiddle.net/remarkablemark/ykz2meot/) | [Examples](https://github.com/remarkablemark/style-to-object/tree/master/examples) + +## Installation + +[NPM](https://www.npmjs.com/package/style-to-object): + +```sh +npm install style-to-object --save +``` + +[Yarn](https://yarn.fyi/style-to-object): + +```sh +yarn add style-to-object +``` + +[CDN](https://unpkg.com/style-to-object/): + +```html + + +``` + +## Usage + +Import with ES Modules: + +```js +import parse from 'style-to-object'; +``` + +Require with CommonJS: + +```js +const parse = require('style-to-object').default; +``` + +Parse single declaration: + +```js +parse('line-height: 42'); +``` + +Output: + +```js +{ 'line-height': '42' } +``` + +Parse multiple declarations: + +```js +parse(` + border-color: #ACE; + z-index: 1337; +`); +``` + +Output: + +```js +{ 'border-color': '#ACE', 'z-index': '1337' } +``` + +Parse unknown declarations: + +```js +parse('answer: 42;'); +``` + +Output: + +```js +{ 'answer': '42' } +``` + +Invalid declarations/arguments: + + + +```js +parse(` + top: ; + right: 1em; +`); // { right: '1em' } + +parse(); // null +parse(null); // null +parse(1); // null +parse(true); // null +parse('top:'); // null +parse(':12px'); // null +parse(':'); // null +parse(';'); // null + +parse('top'); // throws Error +parse('/*'); // throws Error +``` + + + +### Iterator + +If the 2nd argument is a function, then the parser will return `null`: + +```js +parse('color: #f00', () => {}); // null +``` + +But the function will iterate through each declaration: + + + +```js +parse('color: #f00', (name, value, declaration) => { + console.log(name); // 'color' + console.log(value); // '#f00' + console.log(declaration); // { type: 'declaration', property: 'color', value: '#f00' } +}); +``` + + + +This makes it easy to customize the output: + +```js +const style = ` + color: red; + background: blue; +`; +const output = []; + +function iterator(name, value) { + output.push([name, value]); +} + +parse(style, iterator); +console.log(output); // [['color', 'red'], ['background', 'blue']] +``` + +## Migration + +### v1 + +Migrated to TypeScript. Iterator excludes `Comment`. CommonJS requires the `.default` key: + +```js +const parse = require('style-to-object').default; +``` + +## Release + +Release and publish are automated by [Release Please](https://github.com/googleapis/release-please). + +## Special Thanks + +- [inline-style-parser](https://github.com/remarkablemark/inline-style-parser) +- [Contributors](https://github.com/remarkablemark/style-to-object/graphs/contributors) + +## License + +[MIT](https://github.com/remarkablemark/style-to-object/blob/master/LICENSE) diff --git a/tools/ui/node_modules/style-to-object/cjs/index.d.ts b/tools/ui/node_modules/style-to-object/cjs/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8804e046fda128e3de6ab5b6efbe29c99ab910cb --- /dev/null +++ b/tools/ui/node_modules/style-to-object/cjs/index.d.ts @@ -0,0 +1,22 @@ +import type { Declaration } from 'inline-style-parser'; +export { Declaration }; +export interface StyleObject { + [name: string]: string; +} +type Iterator = (property: string, value: string, declaration: Declaration) => void; +/** + * Parses inline style to object. + * + * @param style - Inline style. + * @param iterator - Iterator. + * @returns - Style object or null. + * + * @example Parsing inline style to object: + * + * ```js + * import parse from 'style-to-object'; + * parse('line-height: 42;'); // { 'line-height': '42' } + * ``` + */ +export default function StyleToObject(style: string, iterator?: Iterator): StyleObject | null; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/cjs/index.d.ts.map b/tools/ui/node_modules/style-to-object/cjs/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..10f038cc2e94b414b386e0279d99983c7df4883a --- /dev/null +++ b/tools/ui/node_modules/style-to-object/cjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,MAAM,WAAW,WAAW;IAC1B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,KAAK,QAAQ,GAAG,CACd,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,WAAW,KACrB,IAAI,CAAC;AAEV;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,QAAQ,GAClB,WAAW,GAAG,IAAI,CA0BpB"} \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/cjs/index.js b/tools/ui/node_modules/style-to-object/cjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ddc74fc8106f16da53f65cbb2d3e5124c7ffd1e1 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/cjs/index.js @@ -0,0 +1,44 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = StyleToObject; +const inline_style_parser_1 = __importDefault(require("inline-style-parser")); +/** + * Parses inline style to object. + * + * @param style - Inline style. + * @param iterator - Iterator. + * @returns - Style object or null. + * + * @example Parsing inline style to object: + * + * ```js + * import parse from 'style-to-object'; + * parse('line-height: 42;'); // { 'line-height': '42' } + * ``` + */ +function StyleToObject(style, iterator) { + let styleObject = null; + if (!style || typeof style !== 'string') { + return styleObject; + } + const declarations = (0, inline_style_parser_1.default)(style); + const hasIterator = typeof iterator === 'function'; + declarations.forEach((declaration) => { + if (declaration.type !== 'declaration') { + return; + } + const { property, value } = declaration; + if (hasIterator) { + iterator(property, value, declaration); + } + else if (value) { + styleObject = styleObject || {}; + styleObject[property] = value; + } + }); + return styleObject; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/cjs/index.js.map b/tools/ui/node_modules/style-to-object/cjs/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..55f505e00cce412e39744aac5f31780db66dacf8 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/cjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AA6BA,gCA6BC;AAzDD,8EAAwC;AAcxC;;;;;;;;;;;;;GAaG;AACH,SAAwB,aAAa,CACnC,KAAa,EACb,QAAmB;IAEnB,IAAI,WAAW,GAAuB,IAAI,CAAC;IAE3C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,YAAY,GAAG,IAAA,6BAAK,EAAC,KAAK,CAAC,CAAC;IAClC,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC;IAEnD,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACnC,IAAI,WAAW,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;YACvC,OAAO;QACT,CAAC;QAED,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC;QAExC,IAAI,WAAW,EAAE,CAAC;YAChB,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QACzC,CAAC;aAAM,IAAI,KAAK,EAAE,CAAC;YACjB,WAAW,GAAG,WAAW,IAAI,EAAE,CAAC;YAChC,WAAW,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;QAChC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/dist/style-to-object.js b/tools/ui/node_modules/style-to-object/dist/style-to-object.js new file mode 100644 index 0000000000000000000000000000000000000000..939a28fd361c9ced7c136866eca176a2535a6dea --- /dev/null +++ b/tools/ui/node_modules/style-to-object/dist/style-to-object.js @@ -0,0 +1,305 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.StyleToObject = factory()); +})(this, (function () { 'use strict'; + + // http://www.w3.org/TR/CSS21/grammar.html + // https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027 + var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g; + + var NEWLINE_REGEX = /\n/g; + var WHITESPACE_REGEX = /^\s*/; + + // declaration + var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/; + var COLON_REGEX = /^:\s*/; + var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/; + var SEMICOLON_REGEX = /^[;\s]*/; + + // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill + var TRIM_REGEX = /^\s+|\s+$/g; + + // strings + var NEWLINE = '\n'; + var FORWARD_SLASH = '/'; + var ASTERISK = '*'; + var EMPTY_STRING = ''; + + // types + var TYPE_COMMENT = 'comment'; + var TYPE_DECLARATION = 'declaration'; + + /** + * @param {String} style + * @param {Object} [options] + * @return {Object[]} + * @throws {TypeError} + * @throws {Error} + */ + function index (style, options) { + if (typeof style !== 'string') { + throw new TypeError('First argument must be a string'); + } + + if (!style) return []; + + options = options || {}; + + /** + * Positional. + */ + var lineno = 1; + var column = 1; + + /** + * Update lineno and column based on `str`. + * + * @param {String} str + */ + function updatePosition(str) { + var lines = str.match(NEWLINE_REGEX); + if (lines) lineno += lines.length; + var i = str.lastIndexOf(NEWLINE); + column = ~i ? str.length - i : column + str.length; + } + + /** + * Mark position and patch `node.position`. + * + * @return {Function} + */ + function position() { + var start = { line: lineno, column: column }; + return function (node) { + node.position = new Position(start); + whitespace(); + return node; + }; + } + + /** + * Store position information for a node. + * + * @constructor + * @property {Object} start + * @property {Object} end + * @property {undefined|String} source + */ + function Position(start) { + this.start = start; + this.end = { line: lineno, column: column }; + this.source = options.source; + } + + /** + * Non-enumerable source string. + */ + Position.prototype.content = style; + + /** + * Error `msg`. + * + * @param {String} msg + * @throws {Error} + */ + function error(msg) { + var err = new Error( + options.source + ':' + lineno + ':' + column + ': ' + msg + ); + err.reason = msg; + err.filename = options.source; + err.line = lineno; + err.column = column; + err.source = style; + + if (options.silent) ; else { + throw err; + } + } + + /** + * Match `re` and return captures. + * + * @param {RegExp} re + * @return {undefined|Array} + */ + function match(re) { + var m = re.exec(style); + if (!m) return; + var str = m[0]; + updatePosition(str); + style = style.slice(str.length); + return m; + } + + /** + * Parse whitespace. + */ + function whitespace() { + match(WHITESPACE_REGEX); + } + + /** + * Parse comments. + * + * @param {Object[]} [rules] + * @return {Object[]} + */ + function comments(rules) { + var c; + rules = rules || []; + while ((c = comment())) { + if (c !== false) { + rules.push(c); + } + } + return rules; + } + + /** + * Parse comment. + * + * @return {Object} + * @throws {Error} + */ + function comment() { + var pos = position(); + if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return; + + var i = 2; + while ( + EMPTY_STRING != style.charAt(i) && + (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1)) + ) { + ++i; + } + i += 2; + + if (EMPTY_STRING === style.charAt(i - 1)) { + return error('End of comment missing'); + } + + var str = style.slice(2, i - 2); + column += 2; + updatePosition(str); + style = style.slice(i); + column += 2; + + return pos({ + type: TYPE_COMMENT, + comment: str + }); + } + + /** + * Parse declaration. + * + * @return {Object} + * @throws {Error} + */ + function declaration() { + var pos = position(); + + // prop + var prop = match(PROPERTY_REGEX); + if (!prop) return; + comment(); + + // : + if (!match(COLON_REGEX)) return error("property missing ':'"); + + // val + var val = match(VALUE_REGEX); + + var ret = pos({ + type: TYPE_DECLARATION, + property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)), + value: val + ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) + : EMPTY_STRING + }); + + // ; + match(SEMICOLON_REGEX); + + return ret; + } + + /** + * Parse declarations. + * + * @return {Object[]} + */ + function declarations() { + var decls = []; + + comments(decls); + + // declarations + var decl; + while ((decl = declaration())) { + if (decl !== false) { + decls.push(decl); + comments(decls); + } + } + + return decls; + } + + whitespace(); + return declarations(); + } + + /** + * Trim `str`. + * + * @param {String} str + * @return {String} + */ + function trim(str) { + return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING; + } + + /** + * Parses inline style to object. + * + * @param style - Inline style. + * @param iterator - Iterator. + * @returns - Style object or null. + * + * @example Parsing inline style to object: + * + * ```js + * import parse from 'style-to-object'; + * parse('line-height: 42;'); // { 'line-height': '42' } + * ``` + */ + function StyleToObject(style, iterator) { + let styleObject = null; + if (!style || typeof style !== 'string') { + return styleObject; + } + const declarations = index(style); + const hasIterator = typeof iterator === 'function'; + declarations.forEach((declaration) => { + if (declaration.type !== 'declaration') { + return; + } + const { property, value } = declaration; + if (hasIterator) { + iterator(property, value, declaration); + } + else if (value) { + styleObject = styleObject || {}; + styleObject[property] = value; + } + }); + return styleObject; + } + + return StyleToObject; + +})); +//# sourceMappingURL=style-to-object.js.map diff --git a/tools/ui/node_modules/style-to-object/dist/style-to-object.js.map b/tools/ui/node_modules/style-to-object/dist/style-to-object.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ddfef4bd6bc718909f1d217e4076b684110661d1 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/dist/style-to-object.js.map @@ -0,0 +1 @@ +{"version":3,"file":"style-to-object.js","sources":["../node_modules/inline-style-parser/esm/index.mjs","../src/index.ts"],"sourcesContent":["// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nfunction index (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) ; else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n}\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n\nexport { index as default };\n//# sourceMappingURL=index.mjs.map\n",null],"names":["parse"],"mappings":";;;;;;EAAA;EACA;EACA,IAAI,aAAa,GAAG,iCAAiC;;EAErD,IAAI,aAAa,GAAG,KAAK;EACzB,IAAI,gBAAgB,GAAG,MAAM;;EAE7B;EACA,IAAI,cAAc,GAAG,wCAAwC;EAC7D,IAAI,WAAW,GAAG,OAAO;EACzB,IAAI,WAAW,GAAG,sDAAsD;EACxE,IAAI,eAAe,GAAG,SAAS;;EAE/B;EACA,IAAI,UAAU,GAAG,YAAY;;EAE7B;EACA,IAAI,OAAO,GAAG,IAAI;EAClB,IAAI,aAAa,GAAG,GAAG;EACvB,IAAI,QAAQ,GAAG,GAAG;EAClB,IAAI,YAAY,GAAG,EAAE;;EAErB;EACA,IAAI,YAAY,GAAG,SAAS;EAC5B,IAAI,gBAAgB,GAAG,aAAa;;EAEpC;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE;EAChC,EAAE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;EACjC,IAAI,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC;EAC1D,EAAE;;EAEF,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE;;EAEvB,EAAE,OAAO,GAAG,OAAO,IAAI,EAAE;;EAEzB;EACA;EACA;EACA,EAAE,IAAI,MAAM,GAAG,CAAC;EAChB,EAAE,IAAI,MAAM,GAAG,CAAC;;EAEhB;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,cAAc,CAAC,GAAG,EAAE;EAC/B,IAAI,IAAI,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC;EACxC,IAAI,IAAI,KAAK,EAAE,MAAM,IAAI,KAAK,CAAC,MAAM;EACrC,IAAI,IAAI,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC;EACpC,IAAI,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,GAAG,GAAG,CAAC,MAAM;EACtD,EAAE;;EAEF;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,QAAQ,GAAG;EACtB,IAAI,IAAI,KAAK,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;EAChD,IAAI,OAAO,UAAU,IAAI,EAAE;EAC3B,MAAM,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC;EACzC,MAAM,UAAU,EAAE;EAClB,MAAM,OAAO,IAAI;EACjB,IAAI,CAAC;EACL,EAAE;;EAEF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,QAAQ,CAAC,KAAK,EAAE;EAC3B,IAAI,IAAI,CAAC,KAAK,GAAG,KAAK;EACtB,IAAI,IAAI,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;EAC/C,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;EAChC,EAAE;;EAEF;EACA;EACA;EACA,EAAE,QAAQ,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK;;EAEpC;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,KAAK,CAAC,GAAG,EAAE;EACtB,IAAI,IAAI,GAAG,GAAG,IAAI,KAAK;EACvB,MAAM,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,GAAG,IAAI,GAAG;EAC5D,KAAK;EACL,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG;EACpB,IAAI,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM;EACjC,IAAI,GAAG,CAAC,IAAI,GAAG,MAAM;EACrB,IAAI,GAAG,CAAC,MAAM,GAAG,MAAM;EACvB,IAAI,GAAG,CAAC,MAAM,GAAG,KAAK;;EAEtB,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,MAAM;EAC/B,MAAM,MAAM,GAAG;EACf,IAAI;EACJ,EAAE;;EAEF;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,KAAK,CAAC,EAAE,EAAE;EACrB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;EAC1B,IAAI,IAAI,CAAC,CAAC,EAAE;EACZ,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;EAClB,IAAI,cAAc,CAAC,GAAG,CAAC;EACvB,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;EACnC,IAAI,OAAO,CAAC;EACZ,EAAE;;EAEF;EACA;EACA;EACA,EAAE,SAAS,UAAU,GAAG;EACxB,IAAI,KAAK,CAAC,gBAAgB,CAAC;EAC3B,EAAE;;EAEF;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,QAAQ,CAAC,KAAK,EAAE;EAC3B,IAAI,IAAI,CAAC;EACT,IAAI,KAAK,GAAG,KAAK,IAAI,EAAE;EACvB,IAAI,QAAQ,CAAC,GAAG,OAAO,EAAE,GAAG;EAC5B,MAAM,IAAI,CAAC,KAAK,KAAK,EAAE;EACvB,QAAQ,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;EACrB,MAAM;EACN,IAAI;EACJ,IAAI,OAAO,KAAK;EAChB,EAAE;;EAEF;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,OAAO,GAAG;EACrB,IAAI,IAAI,GAAG,GAAG,QAAQ,EAAE;EACxB,IAAI,IAAI,aAAa,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;;EAEzE,IAAI,IAAI,CAAC,GAAG,CAAC;EACb,IAAI;EACJ,MAAM,YAAY,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;EACrC,OAAO,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,aAAa,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;EAC1E,MAAM;EACN,MAAM,EAAE,CAAC;EACT,IAAI;EACJ,IAAI,CAAC,IAAI,CAAC;;EAEV,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;EAC9C,MAAM,OAAO,KAAK,CAAC,wBAAwB,CAAC;EAC5C,IAAI;;EAEJ,IAAI,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;EACnC,IAAI,MAAM,IAAI,CAAC;EACf,IAAI,cAAc,CAAC,GAAG,CAAC;EACvB,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;EAC1B,IAAI,MAAM,IAAI,CAAC;;EAEf,IAAI,OAAO,GAAG,CAAC;EACf,MAAM,IAAI,EAAE,YAAY;EACxB,MAAM,OAAO,EAAE;EACf,KAAK,CAAC;EACN,EAAE;;EAEF;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,WAAW,GAAG;EACzB,IAAI,IAAI,GAAG,GAAG,QAAQ,EAAE;;EAExB;EACA,IAAI,IAAI,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC;EACpC,IAAI,IAAI,CAAC,IAAI,EAAE;EACf,IAAI,OAAO,EAAE;;EAEb;EACA,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,OAAO,KAAK,CAAC,sBAAsB,CAAC;;EAEjE;EACA,IAAI,IAAI,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;;EAEhC,IAAI,IAAI,GAAG,GAAG,GAAG,CAAC;EAClB,MAAM,IAAI,EAAE,gBAAgB;EAC5B,MAAM,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;EAClE,MAAM,KAAK,EAAE;EACb,UAAU,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC;EAC1D,UAAU;EACV,KAAK,CAAC;;EAEN;EACA,IAAI,KAAK,CAAC,eAAe,CAAC;;EAE1B,IAAI,OAAO,GAAG;EACd,EAAE;;EAEF;EACA;EACA;EACA;EACA;EACA,EAAE,SAAS,YAAY,GAAG;EAC1B,IAAI,IAAI,KAAK,GAAG,EAAE;;EAElB,IAAI,QAAQ,CAAC,KAAK,CAAC;;EAEnB;EACA,IAAI,IAAI,IAAI;EACZ,IAAI,QAAQ,IAAI,GAAG,WAAW,EAAE,GAAG;EACnC,MAAM,IAAI,IAAI,KAAK,KAAK,EAAE;EAC1B,QAAQ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;EACxB,QAAQ,QAAQ,CAAC,KAAK,CAAC;EACvB,MAAM;EACN,IAAI;;EAEJ,IAAI,OAAO,KAAK;EAChB,EAAE;;EAEF,EAAE,UAAU,EAAE;EACd,EAAE,OAAO,YAAY,EAAE;EACvB;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS,IAAI,CAAC,GAAG,EAAE;EACnB,EAAE,OAAO,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,YAAY;EACnE;;ECjPA;;;;;;;;;;;;;EAaG;EACW,SAAU,aAAa,CACnC,KAAa,EACb,QAAmB,EAAA;MAEnB,IAAI,WAAW,GAAuB,IAAI;MAE1C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;EACvC,QAAA,OAAO,WAAW;MACpB;EAEA,IAAA,MAAM,YAAY,GAAGA,KAAK,CAAC,KAAK,CAAC;EACjC,IAAA,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,UAAU;EAElD,IAAA,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,KAAI;EACnC,QAAA,IAAI,WAAW,CAAC,IAAI,KAAK,aAAa,EAAE;cACtC;UACF;EAEA,QAAA,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW;UAEvC,IAAI,WAAW,EAAE;EACf,YAAA,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC;UACxC;eAAO,IAAI,KAAK,EAAE;EAChB,YAAA,WAAW,GAAG,WAAW,IAAI,EAAE;EAC/B,YAAA,WAAW,CAAC,QAAQ,CAAC,GAAG,KAAK;UAC/B;EACF,IAAA,CAAC,CAAC;EAEF,IAAA,OAAO,WAAW;EACpB;;;;;;;;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/dist/style-to-object.min.js b/tools/ui/node_modules/style-to-object/dist/style-to-object.min.js new file mode 100644 index 0000000000000000000000000000000000000000..c88eba97f05878b8e7f661f05e25f107d9284903 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/dist/style-to-object.min.js @@ -0,0 +1,2 @@ +!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).StyleToObject=t()}(this,(function(){"use strict";var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,e=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f="";function s(n){return n?n.replace(c,f):f}return function(c,a){let l=null;if(!c||"string"!=typeof c)return l;const p=function(c,a){if("string"!=typeof c)throw new TypeError("First argument must be a string");if(!c)return[];a=a||{};var l=1,p=1;function h(n){var e=n.match(t);e&&(l+=e.length);var r=n.lastIndexOf("\n");p=~r?n.length-r:p+n.length}function m(){var n={line:l,column:p};return function(t){return t.position=new v(n),g(),t}}function v(n){this.start=n,this.end={line:l,column:p},this.source=a.source}function y(n){var t=new Error(a.source+":"+l+":"+p+": "+n);if(t.reason=n,t.filename=a.source,t.line=l,t.column=p,t.source=c,!a.silent)throw t}function d(n){var t=n.exec(c);if(t){var e=t[0];return h(e),c=c.slice(e.length),t}}function g(){d(e)}function w(n){var t;for(n=n||[];t=A();)!1!==t&&n.push(t);return n}function A(){var n=m();if("/"==c.charAt(0)&&"*"==c.charAt(1)){for(var t=2;f!=c.charAt(t)&&("*"!=c.charAt(t)||"/"!=c.charAt(t+1));)++t;if(t+=2,f===c.charAt(t-1))return y("End of comment missing");var e=c.slice(2,t-2);return p+=2,h(e),c=c.slice(t),p+=2,n({type:"comment",comment:e})}}function b(){var t=m(),e=d(r);if(e){if(A(),!d(o))return y("property missing ':'");var c=d(i),a=t({type:"declaration",property:s(e[0].replace(n,f)),value:c?s(c[0].replace(n,f)):f});return d(u),a}}return v.prototype.content=c,g(),function(){var n,t=[];for(w(t);n=b();)!1!==n&&(t.push(n),w(t));return t}()}(c),h="function"==typeof a;return p.forEach((n=>{if("declaration"!==n.type)return;const{property:t,value:e}=n;h?a(t,e,n):e&&(l=l||{},l[t]=e)})),l}})); +//# sourceMappingURL=style-to-object.min.js.map diff --git a/tools/ui/node_modules/style-to-object/dist/style-to-object.min.js.map b/tools/ui/node_modules/style-to-object/dist/style-to-object.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..19bc6510b0a0383afc3994df30eb2696b84883b3 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/dist/style-to-object.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"style-to-object.min.js","sources":["../node_modules/inline-style-parser/esm/index.mjs","../src/index.ts"],"sourcesContent":["// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nfunction index (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) ; else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n}\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n\nexport { index as default };\n//# sourceMappingURL=index.mjs.map\n",null],"names":["COMMENT_REGEX","NEWLINE_REGEX","WHITESPACE_REGEX","PROPERTY_REGEX","COLON_REGEX","VALUE_REGEX","SEMICOLON_REGEX","TRIM_REGEX","EMPTY_STRING","trim","str","replace","style","iterator","styleObject","declarations","options","TypeError","lineno","column","updatePosition","lines","match","length","i","lastIndexOf","position","start","line","node","Position","whitespace","this","end","source","error","msg","err","Error","reason","filename","silent","re","m","exec","slice","comments","rules","c","comment","push","pos","charAt","type","declaration","prop","val","ret","property","value","prototype","content","decl","decls","parse","hasIterator","forEach"],"mappings":"8OAEA,IAAIA,EAAgB,kCAEhBC,EAAgB,MAChBC,EAAmB,OAGnBC,EAAiB,yCACjBC,EAAc,QACdC,EAAc,uDACdC,EAAkB,UAGlBC,EAAa,aAMbC,EAAe,GA0OnB,SAASC,EAAKC,GACZ,OAAOA,EAAMA,EAAIC,QAAQJ,EAAYC,GAAgBA,CACvD,QCnOc,SACZI,EACAC,GAEA,IAAIC,EAAkC,KAEtC,IAAKF,GAA0B,iBAAVA,EACnB,OAAOE,EAGT,MAAMC,EDNR,SAAgBH,EAAOI,GACrB,GAAqB,iBAAVJ,EACT,MAAM,IAAIK,UAAU,mCAGtB,IAAKL,EAAO,MAAO,GAEnBI,EAAUA,GAAW,CAAA,EAKrB,IAAIE,EAAS,EACTC,EAAS,EAOb,SAASC,EAAeV,GACtB,IAAIW,EAAQX,EAAIY,MAAMrB,GAClBoB,IAAOH,GAAUG,EAAME,QAC3B,IAAIC,EAAId,EAAIe,YAvCF,MAwCVN,GAAUK,EAAId,EAAIa,OAASC,EAAIL,EAAST,EAAIa,MAC9C,CAOA,SAASG,IACP,IAAIC,EAAQ,CAAEC,KAAMV,EAAQC,OAAQA,GACpC,OAAO,SAAUU,GAGf,OAFAA,EAAKH,SAAW,IAAII,EAASH,GAC7BI,IACOF,CACT,CACF,CAUA,SAASC,EAASH,GAChBK,KAAKL,MAAQA,EACbK,KAAKC,IAAM,CAAEL,KAAMV,EAAQC,OAAQA,GACnCa,KAAKE,OAASlB,EAAQkB,MACxB,CAaA,SAASC,EAAMC,GACb,IAAIC,EAAM,IAAIC,MACZtB,EAAQkB,OAAS,IAAMhB,EAAS,IAAMC,EAAS,KAAOiB,GAQxD,GANAC,EAAIE,OAASH,EACbC,EAAIG,SAAWxB,EAAQkB,OACvBG,EAAIT,KAAOV,EACXmB,EAAIlB,OAASA,EACbkB,EAAIH,OAAStB,GAETI,EAAQyB,OACV,MAAMJ,CAEV,CAQA,SAASf,EAAMoB,GACb,IAAIC,EAAID,EAAGE,KAAKhC,GAChB,GAAK+B,EAAL,CACA,IAAIjC,EAAMiC,EAAE,GAGZ,OAFAvB,EAAeV,GACfE,EAAQA,EAAMiC,MAAMnC,EAAIa,QACjBoB,CAJC,CAKV,CAKA,SAASZ,IACPT,EAAMpB,EACR,CAQA,SAAS4C,EAASC,GAChB,IAAIC,EAEJ,IADAD,EAAQA,GAAS,GACTC,EAAIC,MACA,IAAND,GACFD,EAAMG,KAAKF,GAGf,OAAOD,CACT,CAQA,SAASE,IACP,IAAIE,EAAMzB,IACV,GA/IgB,KA+IKd,EAAMwC,OAAO,IA9IvB,KA8IyCxC,EAAMwC,OAAO,GAAjE,CAGA,IADA,IAAI5B,EAAI,EAENhB,GAAgBI,EAAMwC,OAAO5B,KAlJpB,KAmJIZ,EAAMwC,OAAO5B,IApJZ,KAoJmCZ,EAAMwC,OAAO5B,EAAI,OAEhEA,EAIJ,GAFAA,GAAK,EAEDhB,IAAiBI,EAAMwC,OAAO5B,EAAI,GACpC,OAAOW,EAAM,0BAGf,IAAIzB,EAAME,EAAMiC,MAAM,EAAGrB,EAAI,GAM7B,OALAL,GAAU,EACVC,EAAeV,GACfE,EAAQA,EAAMiC,MAAMrB,GACpBL,GAAU,EAEHgC,EAAI,CACTE,KAhKa,UAiKbJ,QAASvC,GAvB0D,CAyBvE,CAQA,SAAS4C,IACP,IAAIH,EAAMzB,IAGN6B,EAAOjC,EAAMnB,GACjB,GAAKoD,EAAL,CAIA,GAHAN,KAGK3B,EAAMlB,GAAc,OAAO+B,EAAM,wBAGtC,IAAIqB,EAAMlC,EAAMjB,GAEZoD,EAAMN,EAAI,CACZE,KAzLiB,cA0LjBK,SAAUjD,EAAK8C,EAAK,GAAG5C,QAAQX,EAAeQ,IAC9CmD,MAAOH,EACH/C,EAAK+C,EAAI,GAAG7C,QAAQX,EAAeQ,IACnCA,IAMN,OAFAc,EAAMhB,GAECmD,CApBI,CAqBb,CAyBA,OA1JA3B,EAAS8B,UAAUC,QAAUjD,EAyJ7BmB,IAjBA,WACE,IAKI+B,EALAC,EAAQ,GAMZ,IAJAjB,EAASiB,GAIDD,EAAOR,MACA,IAATQ,IACFC,EAAMb,KAAKY,GACXhB,EAASiB,IAIb,OAAOA,CACT,CAGOhD,EACT,CC/MuBiD,CAAMpD,GACrBqD,EAAkC,mBAAbpD,EAiB3B,OAfAE,EAAamD,SAASZ,IACpB,GAAyB,gBAArBA,EAAYD,KACd,OAGF,MAAMK,SAAEA,EAAQC,MAAEA,GAAUL,EAExBW,EACFpD,EAAS6C,EAAUC,EAAOL,GACjBK,IACT7C,EAAcA,GAAe,CAAA,EAC7BA,EAAY4C,GAAYC,EAC1B,IAGK7C,CACT","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/esm/index.d.ts b/tools/ui/node_modules/style-to-object/esm/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8804e046fda128e3de6ab5b6efbe29c99ab910cb --- /dev/null +++ b/tools/ui/node_modules/style-to-object/esm/index.d.ts @@ -0,0 +1,22 @@ +import type { Declaration } from 'inline-style-parser'; +export { Declaration }; +export interface StyleObject { + [name: string]: string; +} +type Iterator = (property: string, value: string, declaration: Declaration) => void; +/** + * Parses inline style to object. + * + * @param style - Inline style. + * @param iterator - Iterator. + * @returns - Style object or null. + * + * @example Parsing inline style to object: + * + * ```js + * import parse from 'style-to-object'; + * parse('line-height: 42;'); // { 'line-height': '42' } + * ``` + */ +export default function StyleToObject(style: string, iterator?: Iterator): StyleObject | null; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/esm/index.d.ts.map b/tools/ui/node_modules/style-to-object/esm/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..10f038cc2e94b414b386e0279d99983c7df4883a --- /dev/null +++ b/tools/ui/node_modules/style-to-object/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,MAAM,WAAW,WAAW;IAC1B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,KAAK,QAAQ,GAAG,CACd,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,WAAW,KACrB,IAAI,CAAC;AAEV;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,QAAQ,GAClB,WAAW,GAAG,IAAI,CA0BpB"} \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/esm/index.js b/tools/ui/node_modules/style-to-object/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e774a1842d6059a1333be083217e37bfa282856f --- /dev/null +++ b/tools/ui/node_modules/style-to-object/esm/index.js @@ -0,0 +1,38 @@ +import parse from 'inline-style-parser'; +/** + * Parses inline style to object. + * + * @param style - Inline style. + * @param iterator - Iterator. + * @returns - Style object or null. + * + * @example Parsing inline style to object: + * + * ```js + * import parse from 'style-to-object'; + * parse('line-height: 42;'); // { 'line-height': '42' } + * ``` + */ +export default function StyleToObject(style, iterator) { + let styleObject = null; + if (!style || typeof style !== 'string') { + return styleObject; + } + const declarations = parse(style); + const hasIterator = typeof iterator === 'function'; + declarations.forEach((declaration) => { + if (declaration.type !== 'declaration') { + return; + } + const { property, value } = declaration; + if (hasIterator) { + iterator(property, value, declaration); + } + else if (value) { + styleObject = styleObject || {}; + styleObject[property] = value; + } + }); + return styleObject; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/esm/index.js.map b/tools/ui/node_modules/style-to-object/esm/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5f7670bc1b2562d036e4b3967341ee4e11326312 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAcxC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,KAAa,EACb,QAAmB;IAEnB,IAAI,WAAW,GAAuB,IAAI,CAAC;IAE3C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC;IAEnD,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACnC,IAAI,WAAW,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;YACvC,OAAO;QACT,CAAC;QAED,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC;QAExC,IAAI,WAAW,EAAE,CAAC;YAChB,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QACzC,CAAC;aAAM,IAAI,KAAK,EAAE,CAAC;YACjB,WAAW,GAAG,WAAW,IAAI,EAAE,CAAC;YAChC,WAAW,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;QAChC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/esm/index.mjs b/tools/ui/node_modules/style-to-object/esm/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9db01cbbca8696327467f62b429f6763edc6e9e4 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/esm/index.mjs @@ -0,0 +1,41 @@ +import parse from 'inline-style-parser'; + +/** + * Parses inline style to object. + * + * @param style - Inline style. + * @param iterator - Iterator. + * @returns - Style object or null. + * + * @example Parsing inline style to object: + * + * ```js + * import parse from 'style-to-object'; + * parse('line-height: 42;'); // { 'line-height': '42' } + * ``` + */ +function StyleToObject(style, iterator) { + let styleObject = null; + if (!style || typeof style !== 'string') { + return styleObject; + } + const declarations = parse(style); + const hasIterator = typeof iterator === 'function'; + declarations.forEach((declaration) => { + if (declaration.type !== 'declaration') { + return; + } + const { property, value } = declaration; + if (hasIterator) { + iterator(property, value, declaration); + } + else if (value) { + styleObject = styleObject || {}; + styleObject[property] = value; + } + }); + return styleObject; +} + +export { StyleToObject as default }; +//# sourceMappingURL=index.mjs.map diff --git a/tools/ui/node_modules/style-to-object/esm/index.mjs.map b/tools/ui/node_modules/style-to-object/esm/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4004121a0e9bff2307cd050e7af2940894742097 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/esm/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAeA;;;;;;;;;;;;;AAaG;AACW,SAAU,aAAa,CACnC,KAAa,EACb,QAAmB,EAAA;IAEnB,IAAI,WAAW,GAAuB,IAAI;IAE1C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACvC,QAAA,OAAO,WAAW;IACpB;AAEA,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC;AACjC,IAAA,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,UAAU;AAElD,IAAA,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,KAAI;AACnC,QAAA,IAAI,WAAW,CAAC,IAAI,KAAK,aAAa,EAAE;YACtC;QACF;AAEA,QAAA,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW;QAEvC,IAAI,WAAW,EAAE;AACf,YAAA,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC;QACxC;aAAO,IAAI,KAAK,EAAE;AAChB,YAAA,WAAW,GAAG,WAAW,IAAI,EAAE;AAC/B,YAAA,WAAW,CAAC,QAAQ,CAAC,GAAG,KAAK;QAC/B;AACF,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,WAAW;AACpB;;;;"} \ No newline at end of file diff --git a/tools/ui/node_modules/style-to-object/package.json b/tools/ui/node_modules/style-to-object/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ea5da98402134e8d31a59017b8d7617878673f08 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/package.json @@ -0,0 +1,92 @@ +{ + "name": "style-to-object", + "version": "1.0.14", + "description": "Parse CSS inline style to JavaScript object.", + "author": "Mark ", + "main": "./cjs/index.js", + "module": "./esm/index.mjs", + "types": "./esm/index.d.ts", + "exports": { + "import": { + "types": "./esm/index.d.ts", + "default": "./esm/index.mjs" + }, + "require": { + "types": "./cjs/index.d.ts", + "default": "./cjs/index.js" + } + }, + "scripts": { + "build": "run-s build:*", + "build:cjs": "tsc --project tsconfig.cjs.json", + "build:esm": "tsc --project tsconfig.json", + "build:umd": "rollup --config --failAfterWarnings", + "clean": "rm -rf cjs coverage dist esm", + "lint": "eslint .", + "lint:fix": "npm run lint -- --fix", + "lint:package": "publint", + "lint:tsc": "tsc --noEmit", + "prepare": "husky", + "prepublishOnly": "run-s lint lint:tsc test clean build", + "test": "jest", + "test:ci": "CI=true jest --ci --colors --coverage", + "test:esm": "npm run build && node --test **/*.test.mjs", + "test:watch": "npm run test -- --watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/remarkablemark/style-to-object.git" + }, + "bugs": { + "url": "https://github.com/remarkablemark/style-to-object/issues" + }, + "keywords": [ + "style-to-object", + "inline", + "style", + "parser", + "css", + "object", + "pojo" + ], + "dependencies": { + "inline-style-parser": "0.2.7" + }, + "devDependencies": { + "@commitlint/cli": "20.1.0", + "@commitlint/config-conventional": "20.0.0", + "@eslint/compat": "2.0.0", + "@eslint/eslintrc": "3.3.1", + "@eslint/js": "9.39.1", + "@rollup/plugin-commonjs": "29.0.0", + "@rollup/plugin-node-resolve": "16.0.3", + "@rollup/plugin-terser": "0.4.4", + "@rollup/plugin-typescript": "12.3.0", + "@types/jest": "30.0.0", + "@types/node": "24.10.1", + "@typescript-eslint/eslint-plugin": "8.46.4", + "@typescript-eslint/parser": "8.46.4", + "eslint": "9.39.1", + "eslint-plugin-prettier": "5.5.4", + "eslint-plugin-simple-import-sort": "12.1.1", + "globals": "16.5.0", + "husky": "9.1.7", + "jest": "30.2.0", + "lint-staged": "16.2.6", + "npm-run-all": "4.1.5", + "prettier": "3.6.2", + "publint": "0.3.15", + "rollup": "4.53.2", + "ts-jest": "29.4.5", + "ts-node": "10.9.2", + "tslib": "2.8.1", + "typescript": "5.9.3" + }, + "files": [ + "/cjs", + "/dist", + "/esm", + "/src" + ], + "license": "MIT" +} diff --git a/tools/ui/node_modules/style-to-object/src/index.ts b/tools/ui/node_modules/style-to-object/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..98b95a61bacb59f88a33679505b24816bcd665b5 --- /dev/null +++ b/tools/ui/node_modules/style-to-object/src/index.ts @@ -0,0 +1,59 @@ +import type { Declaration } from 'inline-style-parser'; +import parse from 'inline-style-parser'; + +export { Declaration }; + +export interface StyleObject { + [name: string]: string; +} + +type Iterator = ( + property: string, + value: string, + declaration: Declaration, +) => void; + +/** + * Parses inline style to object. + * + * @param style - Inline style. + * @param iterator - Iterator. + * @returns - Style object or null. + * + * @example Parsing inline style to object: + * + * ```js + * import parse from 'style-to-object'; + * parse('line-height: 42;'); // { 'line-height': '42' } + * ``` + */ +export default function StyleToObject( + style: string, + iterator?: Iterator, +): StyleObject | null { + let styleObject: StyleObject | null = null; + + if (!style || typeof style !== 'string') { + return styleObject; + } + + const declarations = parse(style); + const hasIterator = typeof iterator === 'function'; + + declarations.forEach((declaration) => { + if (declaration.type !== 'declaration') { + return; + } + + const { property, value } = declaration; + + if (hasIterator) { + iterator(property, value, declaration); + } else if (value) { + styleObject = styleObject || {}; + styleObject[property] = value; + } + }); + + return styleObject; +} diff --git a/tools/ui/node_modules/stylis/LICENSE b/tools/ui/node_modules/stylis/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f0b1a9a465e8bc43a5fe504d0b62908de48eac3c --- /dev/null +++ b/tools/ui/node_modules/stylis/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016-present Sultan Tarimo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/stylis/README.md b/tools/ui/node_modules/stylis/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fc02749f88e4af4e4b2f490bd607dda29134ba4f --- /dev/null +++ b/tools/ui/node_modules/stylis/README.md @@ -0,0 +1,161 @@ +# STYLIS + +[![stylis](https://stylis.js.org/assets/logo.svg)](https://github.com/thysultan/stylis.js) + +A Light–weight CSS Preprocessor. + +[![Coverage](https://coveralls.io/repos/github/thysultan/stylis.js/badge.svg?branch=master)](https://coveralls.io/github/thysultan/stylis.js) +[![Size](https://badgen.net/bundlephobia/minzip/stylis)](https://bundlephobia.com/result?p=stylis) +[![Licence](https://badgen.net/badge/license/MIT/blue)](https://github.com/thysultan/stylis.js/blob/master/LICENSE) +[![NPM](https://badgen.net/npm/v/stylis)](https://www.npmjs.com/package/stylis) + +## Installation + +* Use a Direct Download: `` +* Use a CDN: `` +* Use NPM: `npm install stylis --save` + +## Features + +- nesting `a { &:hover {} }` +- selector namespacing +- vendor prefixing (flex-box, etc...) +- minification +- esm module compatible +- tree-shaking-able + +## Abstract Syntax Structure + +```js +const declaration = { + value: 'color:red;', + type: 'decl', + props: 'color', + children: 'red', + line: 1, column: 1 +} + +const comment = { + value: '/*@noflip*/', + type: 'comm', + props: '/', + children: '@noflip', + line: 1, column: 1 +} + +const ruleset = { + value: 'h1,h2', + type: 'rule', + props: ['h1', 'h2'], + children: [/* ... */], + line: 1, column: 1 +} + +const atruleset = { + value: '@media (max-width:100), (min-width:100)', + type: '@media', + props: ['(max-width:100)', '(min-width:100)'], + children: [/* ... */], + line: 1, column: 1 +} +``` + +## Example: + +```js +import {compile, serialize, stringify} from 'stylis' + +serialize(compile(`h1{all:unset}`), stringify) +``` + +### Compile + +```js +compile('h1{all:unset}') === [{value: 'h1', type: 'rule', props: ['h1'], children: [/* ... */]}] +compile('--foo:unset;') === [{value: '--foo:unset;', type: 'decl', props: '--foo', children: 'unset'}] +``` + +### Tokenize + +```js +tokenize('h1 h2 h3 [h4 h5] fn(args) "a b c"') === ['h1', 'h2', 'h3', '[h4 h5]', 'fn', '(args)', '"a b c"'] +``` + +### Serialize + +```js +serialize(compile('h1{all:unset}'), stringify) +``` + +### Vendor Prefixing + +```js +import {compile, serialize, stringify, middleware, prefixer } from 'stylis'; + +serialize(compile('div{display:flex;}'), middleware([prefixer, stringify])) +``` + + +## Middleware + +The middleware helper is a convenient helper utility, that for all intents and purposes you can do without if you intend to implement your own traversal logic. The `stringify` middleware is one such middleware that can be used in conjunction with it. + +Elements passed to middlewares have a `root` property that is the immediate root/parent of the current element **in the compiled output**, so it references the parent in the already expanded CSS-like structure. Elements have also `parent` property that is the immediate parent of the current element **from the input structure** (structure representing the input string). + +### Traversal + +```js +serialize(compile('h1{all:unset}'), middleware([(element, index, children) => { + assert(children === element.root.children && children[index] === element.children) +}, stringify])) === 'h1{all:unset;}' +``` + +The abstract syntax tree also includes an additional `return` property for more niche uses. + +### Prefixing + +```js +serialize(compile('h1{all:unset}'), middleware([(element, index, children, callback) => { + if (element.type === 'decl' && element.props === 'all' && element.children === 'unset') + element.return = 'color:red;' + element.value +}, stringify])) === 'h1{color:red;all:unset;}' +``` + +```js +serialize(compile('h1{all:unset}'), middleware([(element, index, children, callback) => { + if (element.type === 'rule' && element.props.indexOf('h1') > -1) + return serialize([{...element, props: ['h2', 'h3']}], callback) +}, stringify])) === 'h2,h3{all:unset;}h1{all:unset;}' +``` + +### Reading + +```js +serialize(compile('h1{all:unset}'), middleware([stringify, (element, index, children) => { + assert(element.return === 'h1{all:unset;}') +}])) === 'h1{all:unset;color:red;}' +``` + +The middlewares in [src/Middleware.js](src/Middleware.js) dive into tangible examples of how you might implement a middleware, alternatively you could also create your own middleware system as `compile` returns all the nessessary structure to fork from. + +## Variables + +CSS variables are supported but a note should be made about the exotic use of css variables. The css spec mentions the following + +>The allowed syntax for custom properties is extremely permissive. The production matches any sequence of one or more tokens, so long as the sequence does not contain , , unmatched <)-token>, <]-token>, or <}-token>, or top-level tokens or tokens with a value of "!". + +That is to say css variables according to the spec allows: `--foo: if(x > 5) this.width = 10;` and while this value is obviously useless as a variable, and would be invalid in any normal property, it still might be read and acted on by JavaScript and this is supported by Stylis, however things become slightly undefined when we start to include the `{` and `}` productions in our use of exotic css variables. + +For example consider the following: `--foo: {};` + +While this is valid CSS and supported. It is unclear what should happen when the rule collides with the implicit block termination rule that allows i.e `h1{color:red}`(notice the omitted semicolon) to also be a valid CSS production. This results in the following contradiction in: `h1{--example: {}` is it to be treated as `h1{--foo:{;}` or `h1{--foo:{}` the later of which is an unterminated block or in the following: `h1{--foo:{} h1{color:red;}` should it be `h1 {--foo:{}h1{color:red;};` where `{}h1{color:red;` is part of the css variable `--foo` and not a new rule or should it be something else? + +Nevertheless Stylis still supports the exotic forms highlighted in the spec, however you should consider it as a general rule to delimit such exotic uses of variables in strings or parentheses i.e: `h1{--foo:'{'}` or `h1{--foo:({)}`. + +## Benchmark + +Stylis is at-least 2X faster than its predecesor. + +### License + +Stylis is [MIT licensed](./LICENSE). diff --git a/tools/ui/node_modules/stylis/dist/stylis.mjs b/tools/ui/node_modules/stylis/dist/stylis.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9292786d5636737c304df8963978053aa155a225 --- /dev/null +++ b/tools/ui/node_modules/stylis/dist/stylis.mjs @@ -0,0 +1,2 @@ +var e="-ms-";var r="-moz-";var a="-webkit-";var c="comm";var n="rule";var s="decl";var t="@page";var u="@media";var i="@import";var f="@charset";var o="@viewport";var l="@supports";var p="@document";var v="@namespace";var b="@keyframes";var h="@font-face";var w="@counter-style";var d="@font-feature-values";var k="@layer";var g="@scope";var $=Math.abs;var m=String.fromCharCode;var x=Object.assign;function y(e,r){return A(e,0)^45?(((r<<2^A(e,0))<<2^A(e,1))<<2^A(e,2))<<2^A(e,3):0}function j(e){return e.trim()}function z(e,r){return(e=r.exec(e))?e[0]:e}function C(e,r,a){return e.replace(r,a)}function O(e,r){return e.indexOf(r)}function A(e,r){return e.charCodeAt(r)|0}function M(e,r,a){return e.slice(r,a)}function S(e){return e.length}function q(e){return e.length}function B(e,r){return r.push(e),e}function D(e,r){return e.map(r).join("")}function E(e,r){return e.filter((function(e){return!z(e,r)}))}var F=1;var G=1;var H=0;var I=0;var J=0;var K="";function L(e,r,a,c,n,s,t,u){return{value:e,root:r,parent:a,type:c,props:n,children:s,line:F,column:G,length:t,return:"",siblings:u}}function N(e,r){return x(L("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},r)}function P(e){while(e.root)e=N(e.root,{children:[e]});B(e,e.siblings)}function Q(){return J}function R(){J=I>0?A(K,--I):0;if(G--,J===10)G=1,F--;return J}function T(){J=I2||X(J)>3?"":" "}function ae(e){while(T())switch(X(J)){case 0:B(te(I-1),e);break;case 2:B(_(J),e);break;default:B(m(J),e)}return e}function ce(e,r){while(--r&&T())if(J<48||J>102||J>57&&J<65||J>70&&J<97)break;return W(e,V()+(r<6&&U()==32&&T()==32))}function ne(e){while(T())switch(J){case e:return I;case 34:case 39:if(e!==34&&e!==39)ne(J);break;case 40:if(e===41)ne(e);break;case 92:T();break}return I}function se(e,r){while(T())if(e+J===47+10)break;else if(e+J===42+42&&U()===47)break;return"/*"+W(r,I-1)+"*"+m(e===47?e:T())}function te(e){while(!X(U()))T();return W(e,I)}function ue(e){return Z(ie("",null,null,null,[""],e=Y(e),0,[0],e))}function ie(e,r,a,c,n,s,t,u,i){var f=0;var o=0;var l=t;var p=0;var v=0;var b=0;var h=1;var w=1;var d=1;var k=0;var g=0;var $="";var x=n;var y=s;var j=c;var z=$;while(w)switch(b=g,g=T()){case 40:if(b!=108&&A(z,l-1)==58)k++,z+="(";else z+=_(g);break;case 41:k--,z+=")";break;case 34:case 39:case 91:z+=_(g);break;case 9:case 10:case 13:case 32:if(k>0){z+=m(g);break}z+=re(b);break;case 92:z+=ce(V()-1,7);continue;case 47:switch(U()){case 42:case 47:B(oe(se(T(),V()),r,a,i),i);if((X(b||1)==5||X(U()||1)==5)&&S(z)&&M(z,-1,void 0)!==" ")z+=" ";break;default:z+="/"}break;case 123*h:u[f++]=S(z)*d;case 125*h:case 59:case 0:if(k>0&&g){z+=m(g);break}switch(g){case 0:case 125:w=0;case 59+o:if(d==-1)z=C(z,/\f/g,"");if(v>0&&(S(z)-l||h===0))B(v>32?le(z+";",c,a,l-1,i):le(C(z," ","")+";",c,a,l-2,i),i);break;case 59:z+=";";default:B(j=fe(z,r,a,f,o,n,u,$,x=[],y=[],l,s),s);if(g===123)if(o===0)ie(z,r,j,j,x,s,l,u,y);else{switch(p){case 99:if(A(z,3)===110)break;case 108:if(A(z,2)===97)break;default:o=0;case 100:case 109:case 115:}if(o)ie(e,j,j,c&&B(fe(e,j,j,0,0,n,u,$,n,x=[],l,y),y),n,y,l,u,c?x:y);else ie(z,j,j,j,[""],y,0,u,y)}}f=o=v=0,h=d=1,$=z="",l=t;break;case 58:l=1+S(z),v=b;default:if(h<1)if(g==123)--h;else if(g==125&&h++==0&&R()==125)continue;switch(z+=m(g),g*h){case 38:d=o>0?1:(z+="\f",-1);break;case 44:if(k>0)break;u[f++]=(S(z)-1)*d,d=1;break;case 64:if(U()===45)z+=_(T());p=U(),o=l=S($=z+=te(V())),g++;break;case 45:if(b===45&&S(z)==2)h=0}}return s}function fe(e,r,a,c,s,t,u,i,f,o,l,p){var v=s-1;var b=s===0?t:[""];var h=q(b);for(var w=0,d=0,k=0;w0?b[g]+" "+m:C(m,/&\f/g,b[g])))f[k++]=x;return L(e,r,a,s===0?n:i,f,o,l,p)}function oe(e,r,a,n){return L(e,r,a,c,m(Q()),M(e,2,-2),0,n)}function le(e,r,a,c,n){return L(e,r,a,s,M(e,0,c),M(e,c+1,-1),c,n)}function pe(c,n,s){switch(y(c,n)){case 5103:return a+"print-"+c+c;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return a+c+c;case 4855:return a+c.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+c;case 4789:return r+c+c;case 5349:case 4246:case 4810:case 6968:case 2756:return a+c+r+c+e+c+c;case 5936:switch(A(c,n+11)){case 114:return a+c+e+C(c,/[svh]\w+-[tblr]{2}/,"tb")+c;case 108:return a+c+e+C(c,/[svh]\w+-[tblr]{2}/,"tb-rl")+c;case 45:return a+c+e+C(c,/[svh]\w+-[tblr]{2}/,"lr")+c}case 6828:case 4268:case 2903:return a+c+e+c+c;case 6165:return a+c+e+"flex-"+c+c;case 5187:return a+c+C(c,/(\w+).+(:[^]+)/,a+"box-$1$2"+e+"flex-$1$2")+c;case 5443:return a+c+e+"flex-item-"+C(c,/flex-|-self/g,"")+(!z(c,/flex-|baseline/)?e+"grid-row-"+C(c,/flex-|-self/g,""):"")+c;case 4675:return a+c+e+"flex-line-pack"+C(c,/align-content|flex-|-self/g,"")+c;case 5548:return a+c+e+C(c,"shrink","negative")+c;case 5292:return a+c+e+C(c,"basis","preferred-size")+c;case 6060:return a+"box-"+C(c,"-grow","")+a+c+e+C(c,"grow","positive")+c;case 4554:return a+C(c,/([^-])(transform)/g,"$1"+a+"$2")+c;case 6187:return C(C(C(c,/(zoom-|grab)/,a+"$1"),/(image-set)/,a+"$1"),c,"")+c;case 5495:case 3959:return C(c,/(image-set\([^]*)/,a+"$1"+"$`$1");case 4968:return C(C(c,/(.+:)(flex-)?(.*)/,a+"box-pack:$3"+e+"flex-pack:$3"),/space-between/,"justify")+a+c+c;case 4200:if(!z(c,/flex-|baseline/))return e+"grid-column-align"+M(c,n)+c;break;case 2592:case 3360:return e+C(c,"template-","")+c;case 4384:case 3616:if(s&&s.some((function(e,r){return n=r,z(e.props,/grid-\w+-end/)}))){return~O(c+(s=s[n].value),"span")?c:e+C(c,"-start","")+c+e+"grid-row-span:"+(~O(s,"span")?z(s,/\d+/):+z(s,/\d+/)-+z(c,/\d+/))+";"}return e+C(c,"-start","")+c;case 4896:case 4128:return s&&s.some((function(e){return z(e.props,/grid-\w+-start/)}))?c:e+C(C(c,"-end","-span"),"span ","")+c;case 4095:case 3583:case 4068:case 2532:return C(c,/(.+)-inline(.+)/,a+"$1$2")+c;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(S(c)-1-n>6)switch(A(c,n+1)){case 109:if(A(c,n+4)!==45)break;case 102:return C(c,/(.+:)(.+)-([^]+)/,"$1"+a+"$2-$3"+"$1"+r+(A(c,n+3)==108?"$3":"$2-$3"))+c;case 115:return~O(c,"stretch")?pe(C(c,"stretch","fill-available"),n,s)+c:c}break;case 5152:case 5920:return C(c,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(r,a,n,s,t,u,i){return e+a+":"+n+i+(s?e+a+"-span:"+(t?u:+u-+n)+i:"")+c}));case 4949:if(A(c,n+6)===121)return C(c,":",":"+a)+c;break;case 6444:switch(A(c,A(c,14)===45?18:11)){case 120:return C(c,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+a+(A(c,14)===45?"inline-":"")+"box$3"+"$1"+a+"$2$3"+"$1"+e+"$2box$3")+c;case 100:return C(c,":",":"+e)+c}break;case 5719:case 2647:case 2135:case 3927:case 2391:return C(c,"scroll-","scroll-snap-")+c}return c}function ve(e,r){var a="";for(var c=0;c-1)if(!c.return)switch(c.type){case s:c.return=pe(c.value,c.length,u);return;case b:return ve([N(c,{value:C(c.value,"@","@"+a)})],i);case n:if(c.length)return D(u=c.props,(function(n){switch(z(n,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":P(N(c,{props:[C(n,/:(read-\w+)/,":"+r+"$1")]}));P(N(c,{props:[n]}));x(c,{props:E(u,i)});break;case"::placeholder":P(N(c,{props:[C(n,/:(plac\w+)/,":"+a+"input-$1")]}));P(N(c,{props:[C(n,/:(plac\w+)/,":"+r+"$1")]}));P(N(c,{props:[C(n,/:(plac\w+)/,e+"input-$1")]}));P(N(c,{props:[n]}));x(c,{props:E(u,i)});break}return""}))}}function ke(e){switch(e.type){case n:e.props=e.props.map((function(r){return D(ee(r),(function(r,a,c){switch(A(r,0)){case 12:return M(r,1,S(r));case 0:case 40:case 43:case 62:case 126:return r;case 58:if(c[++a]==="global")c[a]="",c[++a]="\f"+M(c[a],a=1,-1);case 32:return a===1?"":r;default:switch(a){case 0:e=r;return q(c)>1?"":r;case a=q(c)-1:case 2:return a===2?r+e+e:r+e;default:return r}}}))}))}}export{f as CHARSET,c as COMMENT,w as COUNTER_STYLE,s as DECLARATION,p as DOCUMENT,h as FONT_FACE,d as FONT_FEATURE_VALUES,i as IMPORT,b as KEYFRAMES,k as LAYER,u as MEDIA,r as MOZ,e as MS,v as NAMESPACE,t as PAGE,n as RULESET,g as SCOPE,l as SUPPORTS,o as VIEWPORT,a as WEBKIT,$ as abs,Y as alloc,B as append,x as assign,V as caret,Q as char,J as character,K as characters,A as charat,G as column,D as combine,oe as comment,se as commenter,ue as compile,N as copy,Z as dealloc,le as declaration,_ as delimit,ne as delimiter,ce as escaping,E as filter,m as from,y as hash,te as identifier,O as indexof,H as length,P as lift,F as line,z as match,he as middleware,ke as namespace,T as next,L as node,ie as parse,U as peek,I as position,pe as prefix,de as prefixer,R as prev,C as replace,fe as ruleset,we as rulesheet,ve as serialize,q as sizeof,W as slice,be as stringify,S as strlen,M as substr,X as token,ee as tokenize,ae as tokenizer,j as trim,re as whitespace}; +//# sourceMappingURL=stylis.mjs.map diff --git a/tools/ui/node_modules/stylis/dist/stylis.mjs.map b/tools/ui/node_modules/stylis/dist/stylis.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a763ca670d1908c504c2bf658b071912987127e6 --- /dev/null +++ b/tools/ui/node_modules/stylis/dist/stylis.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"stylis.mjs","sources":["../src/Enum.js","../src/Utility.js","../src/Tokenizer.js","../src/Parser.js","../src/Prefixer.js","../src/Serializer.js","../src/Middleware.js"],"sourcesContent":["export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\nexport var SCOPE = '@scope'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace} from './Utility.js'\nimport {node, char, prev, next, peek, token, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar parens = 0\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) parens++, characters += '('\n\t\t\t\telse characters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// )\n\t\t\tcase 41:\n\t\t\t\tparens--, characters += ')'\n\t\t\t\tbreak\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tif (parens > 0) {\n\t\t\t\t\tcharacters += from(character)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent, declarations), declarations)\n\t\t\t\t\t\tif ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters) && substr(characters, -1, void 0) !== ' ') characters += ' '\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tif (parens > 0 && character) {\n\t\t\t\t\tcharacters += from(character)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length || variable === 0))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tswitch (atrule) {\n\t\t\t\t\t\t\t\t\t// c(ontainer)\n\t\t\t\t\t\t\t\t\tcase 99:\n\t\t\t\t\t\t\t\t\t\tif (charat(characters, 3) === 110) break\n\t\t\t\t\t\t\t\t\t// l(ayer)\n\t\t\t\t\t\t\t\t\tcase 108:\n\t\t\t\t\t\t\t\t\t\tif (charat(characters, 2) === 97) break\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\toffset = 0\n\t\t\t\t\t\t\t\t\t// d(ocument) m(edia) s(upports)\n\t\t\t\t\t\t\t\t\tcase 100: case 109: case 115:\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (offset) parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\telse parse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tif (parens > 0) break\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace, substr, match} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @param {object[]} children\n * @return {string}\n */\nexport function prefix (value, length, children) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599:\n\t\t\treturn WEBKIT + value + value\n\t\t// mask-composite\n\t\tcase 4855:\n\t\t\treturn WEBKIT + value.replace('add', 'source-over').replace('substract', 'source-out').replace('intersect', 'source-in').replace('exclude', 'xor') + value\n\t\t// tab-size\n\t\tcase 4789:\n\t\t\treturn MOZ + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t\t// default: fallthrough to below\n\t\t\t}\n\t\t// flex, flex-direction, scroll-snap-type, writing-mode\n\t\tcase 6828: case 4268: case 2903:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /space-between/, 'justify') + WEBKIT + value + value\n\t\t// justify-self\n\t\tcase 4200:\n\t\t\tif (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value\n\t\t\tbreak\n\t\t// grid-template-(columns|rows)\n\t\tcase 2592: case 3360:\n\t\t\treturn MS + replace(value, 'template-', '') + value\n\t\t// grid-(row|column)-start\n\t\tcase 4384: case 3616:\n\t\t\tif (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\\w+-end/) })) {\n\t\t\t\treturn ~indexof(value + (children = children[length].value), 'span') ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span') ? match(children, /\\d+/) : +match(children, /\\d+/) - +match(value, /\\d+/)) + ';')\n\t\t\t}\n\t\t\treturn MS + replace(value, '-start', '') + value\n\t\t// grid-(row|column)-end\n\t\tcase 4896: case 4128:\n\t\t\treturn (children && children.some(function (element) { return match(element.props, /grid-\\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// grid-(column|row)\n\t\tcase 5152: case 5920:\n\t\t\treturn replace(value, /(.+?):(\\d+)(\\s*\\/\\s*(span)?\\s*(\\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value })\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// stick(y)?\n\t\t\tif (charat(value, length + 6) === 121)\n\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\tbreak\n\t\t// display: (flex|inline-flex|grid|inline-grid)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {\n\t\t\t\t// (inline-)?fle(x)\n\t\t\t\tcase 120:\n\t\t\t\t\treturn replace(value, /(.+:)([^;\\s!]+)(;|(\\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t\t// (inline-)?gri(d)\n\t\t\t\tcase 100:\n\t\t\t\t\treturn replace(value, ':', ':' + MS) + value\n\t\t\t}\n\t\t\tbreak\n\t\t// scroll-margin, scroll-margin-(top|right|bottom|left)\n\t\tcase 5719: case 2647: case 2135: case 3927: case 2391:\n\t\t\treturn replace(value, 'scroll-', 'scroll-snap-') + value\n\t}\n\n\treturn value\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES, NAMESPACE} from './Enum.js'\nimport {strlen} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case NAMESPACE: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine, filter, assign} from './Utility.js'\nimport {copy, lift, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(children = element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, callback = /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n"],"names":["MS","MOZ","WEBKIT","COMMENT","RULESET","DECLARATION","PAGE","MEDIA","IMPORT","CHARSET","VIEWPORT","SUPPORTS","DOCUMENT","NAMESPACE","KEYFRAMES","FONT_FACE","COUNTER_STYLE","FONT_FEATURE_VALUES","LAYER","SCOPE","abs","Math","from","String","fromCharCode","assign","Object","hash","value","length","charat","trim","match","pattern","exec","replace","replacement","indexof","search","indexOf","index","charCodeAt","substr","begin","end","slice","strlen","sizeof","append","array","push","combine","callback","map","join","filter","line","column","position","character","characters","node","root","parent","type","props","children","siblings","return","copy","lift","char","prev","next","peek","caret","token","alloc","dealloc","delimit","delimiter","tokenize","tokenizer","whitespace","identifier","escaping","count","commenter","compile","parse","rule","rules","rulesets","pseudo","points","declarations","offset","atrule","property","previous","variable","scanning","ampersand","parens","reference","comment","declaration","ruleset","post","size","i","j","k","x","y","z","prefix","some","element","_","a","b","c","d","e","f","serialize","output","stringify","middleware","collection","rulesheet","prefixer","namespace"],"mappings":"AAAU,IAACA,EAAK,OACN,IAACC,EAAM,QACP,IAACC,EAAS,WAEV,IAACC,EAAU,OACX,IAACC,EAAU,OACX,IAACC,EAAc,OAEf,IAACC,EAAO,QACR,IAACC,EAAQ,SACT,IAACC,EAAS,UACV,IAACC,EAAU,WACX,IAACC,EAAW,YACZ,IAACC,EAAW,YACZ,IAACC,EAAW,YACZ,IAACC,EAAY,aACb,IAACC,EAAY,aACb,IAACC,EAAY,aACb,IAACC,EAAgB,iBACjB,IAACC,EAAsB,uBACvB,IAACC,EAAQ,SACT,IAACC,EAAQ,SCjBT,IAACC,EAAMC,KAAKD,IAMZ,IAACE,EAAOC,OAAOC,aAMf,IAACC,EAASC,OAAOD,OAOpB,SAASE,EAAMC,EAAOC,GAC5B,OAAOC,EAAOF,EAAO,GAAK,MAAYC,GAAU,EAAKC,EAAOF,EAAO,KAAO,EAAKE,EAAOF,EAAO,KAAO,EAAKE,EAAOF,EAAO,KAAO,EAAKE,EAAOF,EAAO,GAAK,EAOhJ,SAASG,EAAMH,GACrB,OAAOA,EAAMG,OAQP,SAASC,EAAOJ,EAAOK,GAC7B,OAAQL,EAAQK,EAAQC,KAAKN,IAAUA,EAAM,GAAKA,EASnD,SAAgBO,EAASP,EAAOK,EAASG,GACxC,OAAOR,EAAMO,QAAQF,EAASG,GAQxB,SAASC,EAAST,EAAOU,GAC/B,OAAOV,EAAMW,QAAQD,GAQf,SAASR,EAAQF,EAAOY,GAC9B,OAAOZ,EAAMa,WAAWD,GAAS,EASlC,SAAgBE,EAAQd,EAAOe,EAAOC,GACrC,OAAOhB,EAAMiB,MAAMF,EAAOC,GAOpB,SAASE,EAAQlB,GACvB,OAAOA,EAAMC,OAOP,SAASkB,EAAQnB,GACvB,OAAOA,EAAMC,OAQP,SAASmB,EAAQpB,EAAOqB,GAC9B,OAAOA,EAAMC,KAAKtB,GAAQA,EAQpB,SAASuB,EAASF,EAAOG,GAC/B,OAAOH,EAAMI,IAAID,GAAUE,KAAK,IAQ1B,SAASC,EAAQN,EAAOhB,GAC9B,OAAOgB,EAAMM,QAAO,SAAU3B,GAAS,OAAQI,EAAMJ,EAAOK,MCxHnD,IAACuB,EAAO,EAClB,IAAWC,EAAS,EACpB,IAAW5B,EAAS,EACpB,IAAW6B,EAAW,EACtB,IAAWC,EAAY,EACvB,IAAWC,EAAa,GAYjB,SAASC,EAAMjC,EAAOkC,EAAMC,EAAQC,EAAMC,EAAOC,EAAUrC,EAAQsC,GACzE,MAAO,CAACvC,MAAOA,EAAOkC,KAAMA,EAAMC,OAAQA,EAAQC,KAAMA,EAAMC,MAAOA,EAAOC,SAAUA,EAAUV,KAAMA,EAAMC,OAAQA,EAAQ5B,OAAQA,EAAQuC,OAAQ,GAAID,SAAUA,GAQ5J,SAASE,EAAMP,EAAMG,GAC3B,OAAOxC,EAAOoC,EAAK,GAAI,KAAM,KAAM,GAAI,KAAM,KAAM,EAAGC,EAAKK,UAAWL,EAAM,CAACjC,QAASiC,EAAKjC,QAASoC,GAM9F,SAASK,EAAMR,GACrB,MAAOA,EAAKA,KACXA,EAAOO,EAAKP,EAAKA,KAAM,CAACI,SAAU,CAACJ,KAEpCd,EAAOc,EAAMA,EAAKK,UAMnB,SAAgBI,IACf,OAAOZ,EAMR,SAAgBa,IACfb,EAAYD,EAAW,EAAI5B,EAAO8B,IAAcF,GAAY,EAE5D,GAAID,IAAUE,IAAc,GAC3BF,EAAS,EAAGD,IAEb,OAAOG,EAMR,SAAgBc,IACfd,EAAYD,EAAW7B,EAASC,EAAO8B,EAAYF,KAAc,EAEjE,GAAID,IAAUE,IAAc,GAC3BF,EAAS,EAAGD,IAEb,OAAOG,EAMR,SAAgBe,IACf,OAAO5C,EAAO8B,EAAYF,GAM3B,SAAgBiB,IACf,OAAOjB,EAQD,SAASb,EAAOF,EAAOC,GAC7B,OAAOF,EAAOkB,EAAYjB,EAAOC,GAO3B,SAASgC,EAAOZ,GACtB,OAAQA,GAEP,KAAK,EAAG,KAAK,EAAG,KAAK,GAAI,KAAK,GAAI,KAAK,GACtC,OAAO,EAER,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,IAE3D,KAAK,GAAI,KAAK,IAAK,KAAK,IACvB,OAAO,EAER,KAAK,GACJ,OAAO,EAER,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,GAC/B,OAAO,EAER,KAAK,GAAI,KAAK,GACb,OAAO,EAGT,OAAO,EAOD,SAASa,EAAOjD,GACtB,OAAO4B,EAAOC,EAAS,EAAG5B,EAASiB,EAAOc,EAAahC,GAAQ8B,EAAW,EAAG,GAOvE,SAASoB,EAASlD,GACxB,OAAOgC,EAAa,GAAIhC,EAOlB,SAASmD,EAASf,GACxB,OAAOjC,EAAKc,EAAMa,EAAW,EAAGsB,GAAUhB,IAAS,GAAKA,EAAO,EAAIA,IAAS,GAAKA,EAAO,EAAIA,KAOtF,SAASiB,GAAUrD,GACzB,OAAOkD,EAAQI,GAAUL,EAAMjD,KAOzB,SAASuD,GAAYnB,GAC3B,MAAOL,EAAYe,IAClB,GAAIf,EAAY,GACfc,SAEA,MAEF,OAAOG,EAAMZ,GAAQ,GAAKY,EAAMjB,GAAa,EAAI,GAAK,IAOhD,SAASuB,GAAWhB,GAC1B,MAAOO,IACN,OAAQG,EAAMjB,IACb,KAAK,EAAGX,EAAOoC,GAAW1B,EAAW,GAAIQ,GACxC,MACD,KAAK,EAAGlB,EAAO+B,EAAQpB,GAAYO,GAClC,MACD,QAASlB,EAAO1B,EAAKqC,GAAYO,GAGnC,OAAOA,EAQD,SAASmB,GAAU7C,EAAO8C,GAChC,QAASA,GAASb,IAEjB,GAAId,EAAY,IAAMA,EAAY,KAAQA,EAAY,IAAMA,EAAY,IAAQA,EAAY,IAAMA,EAAY,GAC7G,MAEF,OAAOd,EAAML,EAAOmC,KAAWW,EAAQ,GAAKZ,KAAU,IAAMD,KAAU,KAOhE,SAASO,GAAWhB,GAC1B,MAAOS,IACN,OAAQd,GAEP,KAAKK,EACJ,OAAON,EAER,KAAK,GAAI,KAAK,GACb,GAAIM,IAAS,IAAMA,IAAS,GAC3BgB,GAAUrB,GACX,MAED,KAAK,GACJ,GAAIK,IAAS,GACZgB,GAAUhB,GACX,MAED,KAAK,GACJS,IACA,MAGH,OAAOf,EAQD,SAAS6B,GAAWvB,EAAMxB,GAChC,MAAOiC,IAEN,GAAIT,EAAOL,IAAc,GAAK,GAC7B,WAEI,GAAIK,EAAOL,IAAc,GAAK,IAAMe,MAAW,GACnD,MAEF,MAAO,KAAO7B,EAAML,EAAOkB,EAAW,GAAK,IAAMpC,EAAK0C,IAAS,GAAKA,EAAOS,KAOrE,SAASW,GAAY5C,GAC3B,OAAQoC,EAAMF,KACbD,IAED,OAAO5B,EAAML,EAAOkB,GCvPd,SAAS8B,GAAS5D,GACxB,OAAOkD,EAAQW,GAAM,GAAI,KAAM,KAAM,KAAM,CAAC,IAAK7D,EAAQiD,EAAMjD,GAAQ,EAAG,CAAC,GAAIA,IAehF,SAAgB6D,GAAO7D,EAAOkC,EAAMC,EAAQ2B,EAAMC,EAAOC,EAAUC,EAAQC,EAAQC,GAClF,IAAIvD,EAAQ,EACZ,IAAIwD,EAAS,EACb,IAAInE,EAASgE,EACb,IAAII,EAAS,EACb,IAAIC,EAAW,EACf,IAAIC,EAAW,EACf,IAAIC,EAAW,EACf,IAAIC,EAAW,EACf,IAAIC,EAAY,EAChB,IAAIC,EAAS,EACb,IAAI5C,EAAY,EAChB,IAAIK,EAAO,GACX,IAAIC,EAAQ0B,EACZ,IAAIzB,EAAW0B,EACf,IAAIY,EAAYd,EAChB,IAAI9B,EAAaI,EAEjB,MAAOqC,EACN,OAAQF,EAAWxC,EAAWA,EAAYc,KAEzC,KAAK,GACJ,GAAI0B,GAAY,KAAOrE,EAAO8B,EAAY/B,EAAS,IAAM,GAAI0E,IAAU3C,GAAc,SAChFA,GAAcmB,EAAQpB,GAC3B,MAED,KAAK,GACJ4C,IAAU3C,GAAc,IACxB,MAED,KAAK,GAAI,KAAK,GAAI,KAAK,GACtBA,GAAcmB,EAAQpB,GACtB,MAED,KAAK,EAAG,KAAK,GAAI,KAAK,GAAI,KAAK,GAC9B,GAAI4C,EAAS,EAAG,CACf3C,GAActC,EAAKqC,GACnB,MAEDC,GAAcuB,GAAWgB,GACzB,MAED,KAAK,GACJvC,GAAcyB,GAASV,IAAU,EAAG,GACpC,SAED,KAAK,GACJ,OAAQD,KACP,KAAK,GAAI,KAAK,GACb1B,EAAOyD,GAAQlB,GAAUd,IAAQE,KAAUb,EAAMC,EAAQgC,GAAeA,GACxE,IAAKnB,EAAMuB,GAAY,IAAM,GAAKvB,EAAMF,KAAU,IAAM,IAAM5B,EAAOc,IAAelB,EAAOkB,GAAa,OAAQ,KAAO,IAAKA,GAAc,IAC1I,MACD,QACCA,GAAc,IAEhB,MAED,KAAK,IAAMwC,EACVN,EAAOtD,KAAWM,EAAOc,GAAc0C,EAExC,KAAK,IAAMF,EAAU,KAAK,GAAI,KAAK,EAClC,GAAIG,EAAS,GAAK5C,EAAW,CAC5BC,GAActC,EAAKqC,GACnB,MAED,OAAQA,GAEP,KAAK,EAAG,KAAK,IAAK0C,EAAW,EAE7B,KAAK,GAAKL,EAAQ,GAAIM,IAAc,EAAG1C,EAAazB,EAAQyB,EAAY,MAAO,IAC9E,GAAIsC,EAAW,IAAMpD,EAAOc,GAAc/B,GAAUuE,IAAa,GAChEpD,EAAOkD,EAAW,GAAKQ,GAAY9C,EAAa,IAAK8B,EAAM3B,EAAQlC,EAAS,EAAGkE,GAAgBW,GAAYvE,EAAQyB,EAAY,IAAK,IAAM,IAAK8B,EAAM3B,EAAQlC,EAAS,EAAGkE,GAAeA,GACzL,MAED,KAAK,GAAInC,GAAc,IAEvB,QACCZ,EAAOwD,EAAYG,GAAQ/C,EAAYE,EAAMC,EAAQvB,EAAOwD,EAAQL,EAAOG,EAAQ9B,EAAMC,EAAQ,GAAIC,EAAW,GAAIrC,EAAQ+D,GAAWA,GAEvI,GAAIjC,IAAc,IACjB,GAAIqC,IAAW,EACdP,GAAM7B,EAAYE,EAAM0C,EAAWA,EAAWvC,EAAO2B,EAAU/D,EAAQiE,EAAQ5B,OAC3E,CACJ,OAAQ+B,GAEP,KAAK,GACJ,GAAInE,EAAO8B,EAAY,KAAO,IAAK,MAEpC,KAAK,IACJ,GAAI9B,EAAO8B,EAAY,KAAO,GAAI,MACnC,QACCoC,EAAS,EAEV,KAAK,IAAK,KAAK,IAAK,KAAK,KAE1B,GAAIA,EAAQP,GAAM7D,EAAO4E,EAAWA,EAAWd,GAAQ1C,EAAO2D,GAAQ/E,EAAO4E,EAAWA,EAAW,EAAG,EAAGb,EAAOG,EAAQ9B,EAAM2B,EAAO1B,EAAQ,GAAIpC,EAAQqC,GAAWA,GAAWyB,EAAOzB,EAAUrC,EAAQiE,EAAQJ,EAAOzB,EAAQC,QAC1NuB,GAAM7B,EAAY4C,EAAWA,EAAWA,EAAW,CAAC,IAAKtC,EAAU,EAAG4B,EAAQ5B,IAIvF1B,EAAQwD,EAASE,EAAW,EAAGE,EAAWE,EAAY,EAAGtC,EAAOJ,EAAa,GAAI/B,EAASgE,EAC1F,MAED,KAAK,GACJhE,EAAS,EAAIiB,EAAOc,GAAasC,EAAWC,EAC7C,QACC,GAAIC,EAAW,EACd,GAAIzC,GAAa,MACdyC,OACE,GAAIzC,GAAa,KAAOyC,KAAc,GAAK5B,KAAU,IACzD,SAEF,OAAQZ,GAActC,EAAKqC,GAAYA,EAAYyC,GAElD,KAAK,GACJE,EAAYN,EAAS,EAAI,GAAKpC,GAAc,MAAO,GACnD,MAED,KAAK,GACJ,GAAI2C,EAAS,EAAG,MAChBT,EAAOtD,MAAYM,EAAOc,GAAc,GAAK0C,EAAWA,EAAY,EACpE,MAED,KAAK,GAEJ,GAAI5B,MAAW,GACdd,GAAcmB,EAAQN,KAEvBwB,EAASvB,IAAQsB,EAASnE,EAASiB,EAAOkB,EAAOJ,GAAcwB,GAAWT,MAAWhB,IACrF,MAED,KAAK,GACJ,GAAIwC,IAAa,IAAMrD,EAAOc,IAAe,EAC5CwC,EAAW,GAIjB,OAAOR,EAkBR,SAAgBe,GAAS/E,EAAOkC,EAAMC,EAAQvB,EAAOwD,EAAQL,EAAOG,EAAQ9B,EAAMC,EAAOC,EAAUrC,EAAQsC,GAC1G,IAAIyC,EAAOZ,EAAS,EACpB,IAAIN,EAAOM,IAAW,EAAIL,EAAQ,CAAC,IACnC,IAAIkB,EAAO9D,EAAO2C,GAElB,IAAK,IAAIoB,EAAI,EAAGC,EAAI,EAAGC,EAAI,EAAGF,EAAItE,IAASsE,EAC1C,IAAK,IAAIG,EAAI,EAAGC,EAAIxE,EAAOd,EAAOgF,EAAO,EAAGA,EAAOxF,EAAI2F,EAAIjB,EAAOgB,KAAMK,EAAIvF,EAAOqF,EAAIJ,IAAQI,EAC9F,GAAIE,EAAIpF,EAAKgF,EAAI,EAAIrB,EAAKuB,GAAK,IAAMC,EAAI/E,EAAQ+E,EAAG,OAAQxB,EAAKuB,KAChEhD,EAAM+C,KAAOG,EAEhB,OAAOtD,EAAKjC,EAAOkC,EAAMC,EAAQiC,IAAW,EAAI5F,EAAU4D,EAAMC,EAAOC,EAAUrC,EAAQsC,GAU1F,SAAgBsC,GAAS7E,EAAOkC,EAAMC,EAAQI,GAC7C,OAAON,EAAKjC,EAAOkC,EAAMC,EAAQ5D,EAASmB,EAAKiD,KAAS7B,EAAOd,EAAO,GAAI,GAAI,EAAGuC,GAW3E,SAASuC,GAAa9E,EAAOkC,EAAMC,EAAQlC,EAAQsC,GACzD,OAAON,EAAKjC,EAAOkC,EAAMC,EAAQ1D,EAAaqC,EAAOd,EAAO,EAAGC,GAASa,EAAOd,EAAOC,EAAS,GAAI,GAAIA,EAAQsC,GC3MhH,SAAgBiD,GAAQxF,EAAOC,EAAQqC,GACtC,OAAQvC,EAAKC,EAAOC,IAEnB,KAAK,KACJ,OAAO3B,EAAS,SAAW0B,EAAQA,EAEpC,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAEvE,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAE5D,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAE5D,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAChD,OAAO1B,EAAS0B,EAAQA,EAEzB,KAAK,KACJ,OAAO1B,EAAS0B,EAAMO,QAAQ,MAAO,eAAeA,QAAQ,YAAa,cAAcA,QAAQ,YAAa,aAAaA,QAAQ,UAAW,OAASP,EAEtJ,KAAK,KACJ,OAAO3B,EAAM2B,EAAQA,EAEtB,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAChD,OAAO1B,EAAS0B,EAAQ3B,EAAM2B,EAAQ5B,EAAK4B,EAAQA,EAEpD,KAAK,KACJ,OAAQE,EAAOF,EAAOC,EAAS,KAE9B,KAAK,IACJ,OAAO3B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,qBAAsB,MAAQA,EAE3E,KAAK,IACJ,OAAO1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,qBAAsB,SAAWA,EAE9E,KAAK,GACJ,OAAO1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,qBAAsB,MAAQA,EAI7E,KAAK,KAAM,KAAK,KAAM,KAAK,KAC1B,OAAO1B,EAAS0B,EAAQ5B,EAAK4B,EAAQA,EAEtC,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAK,QAAU4B,EAAQA,EAEhD,KAAK,KACJ,OAAO1B,EAAS0B,EAAQO,EAAQP,EAAO,iBAAkB1B,EAAS,WAAaF,EAAK,aAAe4B,EAEpG,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAK,aAAemC,EAAQP,EAAO,eAAgB,MAAQI,EAAMJ,EAAO,kBAAoB5B,EAAK,YAAcmC,EAAQP,EAAO,eAAgB,IAAM,IAAMA,EAEnL,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAK,iBAAmBmC,EAAQP,EAAO,6BAA8B,IAAMA,EAEpG,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,SAAU,YAAcA,EAErE,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,QAAS,kBAAoBA,EAE1E,KAAK,KACJ,OAAO1B,EAAS,OAASiC,EAAQP,EAAO,QAAS,IAAM1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,OAAQ,YAAcA,EAEnH,KAAK,KACJ,OAAO1B,EAASiC,EAAQP,EAAO,qBAAsB,KAAO1B,EAAS,MAAQ0B,EAE9E,KAAK,KACJ,OAAOO,EAAQA,EAAQA,EAAQP,EAAO,eAAgB1B,EAAS,MAAO,cAAeA,EAAS,MAAO0B,EAAO,IAAMA,EAEnH,KAAK,KAAM,KAAK,KACf,OAAOO,EAAQP,EAAO,oBAAqB1B,EAAS,KAAO,QAE5D,KAAK,KACJ,OAAOiC,EAAQA,EAAQP,EAAO,oBAAqB1B,EAAS,cAAgBF,EAAK,gBAAiB,gBAAiB,WAAaE,EAAS0B,EAAQA,EAElJ,KAAK,KACJ,IAAKI,EAAMJ,EAAO,kBAAmB,OAAO5B,EAAK,oBAAsB0C,EAAOd,EAAOC,GAAUD,EAC/F,MAED,KAAK,KAAM,KAAK,KACf,OAAO5B,EAAKmC,EAAQP,EAAO,YAAa,IAAMA,EAE/C,KAAK,KAAM,KAAK,KACf,GAAIsC,GAAYA,EAASmD,MAAK,SAAUC,EAAS9E,GAAS,OAAOX,EAASW,EAAOR,EAAMsF,EAAQrD,MAAO,mBAAoB,CACzH,OAAQ5B,EAAQT,GAASsC,EAAWA,EAASrC,GAAQD,OAAQ,QAAUA,EAAS5B,EAAKmC,EAAQP,EAAO,SAAU,IAAMA,EAAQ5B,EAAK,mBAAqBqC,EAAQ6B,EAAU,QAAUlC,EAAMkC,EAAU,QAAUlC,EAAMkC,EAAU,QAAUlC,EAAMJ,EAAO,QAAU,IAE9P,OAAO5B,EAAKmC,EAAQP,EAAO,SAAU,IAAMA,EAE5C,KAAK,KAAM,KAAK,KACf,OAAQsC,GAAYA,EAASmD,MAAK,SAAUC,GAAW,OAAOtF,EAAMsF,EAAQrD,MAAO,qBAAwBrC,EAAQ5B,EAAKmC,EAAQA,EAAQP,EAAO,OAAQ,SAAU,QAAS,IAAMA,EAEjL,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KACrC,OAAOO,EAAQP,EAAO,kBAAmB1B,EAAS,QAAU0B,EAE7D,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KACtC,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KACtC,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAErC,GAAIkB,EAAOlB,GAAS,EAAIC,EAAS,EAChC,OAAQC,EAAOF,EAAOC,EAAS,IAE9B,KAAK,IAEJ,GAAIC,EAAOF,EAAOC,EAAS,KAAO,GACjC,MAEF,KAAK,IACJ,OAAOM,EAAQP,EAAO,mBAAoB,KAAO1B,EAAS,QAAU,KAAOD,GAAO6B,EAAOF,EAAOC,EAAS,IAAM,IAAM,KAAO,UAAYD,EAEzI,KAAK,IACJ,OAAQS,EAAQT,EAAO,WAAawF,GAAOjF,EAAQP,EAAO,UAAW,kBAAmBC,EAAQqC,GAAYtC,EAAQA,EAEvH,MAED,KAAK,KAAM,KAAK,KACf,OAAOO,EAAQP,EAAO,6CAA6C,SAAU2F,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,GAAK,OAAQ7H,EAAKwH,EAAI,IAAMC,EAAII,GAAMH,EAAK1H,EAAKwH,EAAI,UAAYG,EAAIC,GAAKA,GAAKH,GAAMI,EAAI,IAAMjG,KAE9L,KAAK,KAEJ,GAAIE,EAAOF,EAAOC,EAAS,KAAO,IACjC,OAAOM,EAAQP,EAAO,IAAK,IAAM1B,GAAU0B,EAC5C,MAED,KAAK,KACJ,OAAQE,EAAOF,EAAOE,EAAOF,EAAO,MAAQ,GAAK,GAAK,KAErD,KAAK,IACJ,OAAOO,EAAQP,EAAO,gCAAiC,KAAO1B,GAAU4B,EAAOF,EAAO,MAAQ,GAAK,UAAY,IAAM,QAAU,KAAO1B,EAAS,OAAS,KAAOF,EAAK,WAAa4B,EAElL,KAAK,IACJ,OAAOO,EAAQP,EAAO,IAAK,IAAM5B,GAAM4B,EAEzC,MAED,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAChD,OAAOO,EAAQP,EAAO,UAAW,gBAAkBA,EAGrD,OAAOA,EC1ID,SAASkG,GAAW5D,EAAUd,GACpC,IAAI2E,EAAS,GAEb,IAAK,IAAIjB,EAAI,EAAGA,EAAI5C,EAASrC,OAAQiF,IACpCiB,GAAU3E,EAASc,EAAS4C,GAAIA,EAAG5C,EAAUd,IAAa,GAE3D,OAAO2E,EAUR,SAAgBC,GAAWV,EAAS9E,EAAO0B,EAAUd,GACpD,OAAQkE,EAAQtD,MACf,KAAK9C,EAAO,GAAIoG,EAAQpD,SAASrC,OAAQ,MACzC,KAAKrB,EAAQ,KAAKK,EAAW,KAAKR,EAAa,OAAOiH,EAAQlD,OAASkD,EAAQlD,QAAUkD,EAAQ1F,MACjG,KAAKzB,EAAS,MAAO,GACrB,KAAKW,EAAW,OAAOwG,EAAQlD,OAASkD,EAAQ1F,MAAQ,IAAMkG,GAAUR,EAAQpD,SAAUd,GAAY,IACtG,KAAKhD,EAAS,IAAK0C,EAAOwE,EAAQ1F,MAAQ0F,EAAQrD,MAAMX,KAAK,MAAO,MAAO,GAG5E,OAAOR,EAAOoB,EAAW4D,GAAUR,EAAQpD,SAAUd,IAAakE,EAAQlD,OAASkD,EAAQ1F,MAAQ,IAAMsC,EAAW,IAAM,GCvBpH,SAAS+D,GAAYC,GAC3B,IAAIrG,EAASkB,EAAOmF,GAEpB,OAAO,SAAUZ,EAAS9E,EAAO0B,EAAUd,GAC1C,IAAI2E,EAAS,GAEb,IAAK,IAAIjB,EAAI,EAAGA,EAAIjF,EAAQiF,IAC3BiB,GAAUG,EAAWpB,GAAGQ,EAAS9E,EAAO0B,EAAUd,IAAa,GAEhE,OAAO2E,GAQF,SAASI,GAAW/E,GAC1B,OAAO,SAAUkE,GAChB,IAAKA,EAAQxD,KACZ,GAAIwD,EAAUA,EAAQlD,OACrBhB,EAASkE,IAUb,SAAgBc,GAAUd,EAAS9E,EAAO0B,EAAUd,GACnD,GAAIkE,EAAQzF,QAAU,EACrB,IAAKyF,EAAQlD,OACZ,OAAQkD,EAAQtD,MACf,KAAK3D,EAAaiH,EAAQlD,OAASgD,GAAOE,EAAQ1F,MAAO0F,EAAQzF,OAAQqC,GACxE,OACD,KAAKpD,EACJ,OAAOgH,GAAU,CAACzD,EAAKiD,EAAS,CAAC1F,MAAOO,EAAQmF,EAAQ1F,MAAO,IAAK,IAAM1B,MAAYkD,GACvF,KAAKhD,EACJ,GAAIkH,EAAQzF,OACX,OAAOsB,EAAQe,EAAWoD,EAAQrD,OAAO,SAAUrC,GAClD,OAAQI,EAAMJ,EAAOwB,EAAW,0BAE/B,IAAK,aAAc,IAAK,cACvBkB,EAAKD,EAAKiD,EAAS,CAACrD,MAAO,CAAC9B,EAAQP,EAAO,cAAe,IAAM3B,EAAM,UACtEqE,EAAKD,EAAKiD,EAAS,CAACrD,MAAO,CAACrC,MAC5BH,EAAO6F,EAAS,CAACrD,MAAOV,EAAOW,EAAUd,KACzC,MAED,IAAK,gBACJkB,EAAKD,EAAKiD,EAAS,CAACrD,MAAO,CAAC9B,EAAQP,EAAO,aAAc,IAAM1B,EAAS,gBACxEoE,EAAKD,EAAKiD,EAAS,CAACrD,MAAO,CAAC9B,EAAQP,EAAO,aAAc,IAAM3B,EAAM,UACrEqE,EAAKD,EAAKiD,EAAS,CAACrD,MAAO,CAAC9B,EAAQP,EAAO,aAAc5B,EAAK,gBAC9DsE,EAAKD,EAAKiD,EAAS,CAACrD,MAAO,CAACrC,MAC5BH,EAAO6F,EAAS,CAACrD,MAAOV,EAAOW,EAAUd,KACzC,MAGF,MAAO,OAUP,SAASiF,GAAWf,GAC1B,OAAQA,EAAQtD,MACf,KAAK5D,EACJkH,EAAQrD,MAAQqD,EAAQrD,MAAMZ,KAAI,SAAUzB,GAC3C,OAAOuB,EAAQ8B,GAASrD,IAAQ,SAAUA,EAAOY,EAAO0B,GACvD,OAAQpC,EAAOF,EAAO,IAErB,KAAK,GACJ,OAAOc,EAAOd,EAAO,EAAGkB,EAAOlB,IAEhC,KAAK,EAAG,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,IACvC,OAAOA,EAER,KAAK,GACJ,GAAIsC,IAAW1B,KAAW,SACzB0B,EAAS1B,GAAS,GAAI0B,IAAW1B,GAAS,KAAOE,EAAOwB,EAAS1B,GAAQA,EAAQ,GAAI,GAEvF,KAAK,GACJ,OAAOA,IAAU,EAAI,GAAKZ,EAC3B,QACC,OAAQY,GACP,KAAK,EAAG8E,EAAU1F,EACjB,OAAOmB,EAAOmB,GAAY,EAAI,GAAKtC,EACpC,KAAKY,EAAQO,EAAOmB,GAAY,EAAG,KAAK,EACvC,OAAO1B,IAAU,EAAIZ,EAAQ0F,EAAUA,EAAU1F,EAAQ0F,EAC1D,QACC,OAAO1F"} \ No newline at end of file diff --git a/tools/ui/node_modules/stylis/dist/umd/package.json b/tools/ui/node_modules/stylis/dist/umd/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a3c15a7a6312b4c27cc889aafeed79bea64ecf55 --- /dev/null +++ b/tools/ui/node_modules/stylis/dist/umd/package.json @@ -0,0 +1 @@ +{ "type": "commonjs" } diff --git a/tools/ui/node_modules/stylis/dist/umd/stylis.js b/tools/ui/node_modules/stylis/dist/umd/stylis.js new file mode 100644 index 0000000000000000000000000000000000000000..248c7c48fbb331d262a33ddaba81ff5d54572e7f --- /dev/null +++ b/tools/ui/node_modules/stylis/dist/umd/stylis.js @@ -0,0 +1,2 @@ +(function(e,r){typeof exports==="object"&&typeof module!=="undefined"?r(exports):typeof define==="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.stylis={}))})(this,(function(e){"use strict";var r="-ms-";var a="-moz-";var c="-webkit-";var t="comm";var n="rule";var s="decl";var i="@page";var u="@media";var o="@import";var l="@charset";var f="@viewport";var p="@supports";var h="@document";var v="@namespace";var b="@keyframes";var d="@font-face";var w="@counter-style";var m="@font-feature-values";var k="@layer";var g="@scope";var $=Math.abs;var x=String.fromCharCode;var E=Object.assign;function y(e,r){return M(e,0)^45?(((r<<2^M(e,0))<<2^M(e,1))<<2^M(e,2))<<2^M(e,3):0}function O(e){return e.trim()}function T(e,r){return(e=r.exec(e))?e[0]:e}function A(e,r,a){return e.replace(r,a)}function C(e,r){return e.indexOf(r)}function M(e,r){return e.charCodeAt(r)|0}function S(e,r,a){return e.slice(r,a)}function R(e){return e.length}function P(e){return e.length}function z(e,r){return r.push(e),e}function N(e,r){return e.map(r).join("")}function j(e,r){return e.filter((function(e){return!T(e,r)}))}e.line=1;e.column=1;e.length=0;e.position=0;e.character=0;e.characters="";function U(r,a,c,t,n,s,i,u){return{value:r,root:a,parent:c,type:t,props:n,children:s,line:e.line,column:e.column,length:i,return:"",siblings:u}}function _(e,r){return E(U("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},r)}function F(e){while(e.root)e=_(e.root,{children:[e]});z(e,e.siblings)}function I(){return e.character}function L(){e.character=e.position>0?M(e.characters,--e.position):0;if(e.column--,e.character===10)e.column=1,e.line--;return e.character}function D(){e.character=e.position2||W(e.character)>3?"":" "}function J(r){while(D())switch(W(e.character)){case 0:z(re(e.position-1),r);break;case 2:z(H(e.character),r);break;default:z(x(e.character),r)}return r}function Q(r,a){while(--a&&D())if(e.character<48||e.character>102||e.character>57&&e.character<65||e.character>70&&e.character<97)break;return V(r,K()+(a<6&&Y()==32&&D()==32))}function X(r){while(D())switch(e.character){case r:return e.position;case 34:case 39:if(r!==34&&r!==39)X(e.character);break;case 40:if(r===41)X(r);break;case 92:D();break}return e.position}function ee(r,a){while(D())if(r+e.character===47+10)break;else if(r+e.character===42+42&&Y()===47)break;return"/*"+V(a,e.position-1)+"*"+x(r===47?r:D())}function re(r){while(!W(Y()))D();return V(r,e.position)}function ae(e){return G(ce("",null,null,null,[""],e=B(e),0,[0],e))}function ce(e,r,a,c,t,n,s,i,u){var o=0;var l=0;var f=s;var p=0;var h=0;var v=0;var b=1;var d=1;var w=1;var m=0;var k=0;var g="";var $=t;var E=n;var y=c;var O=g;while(d)switch(v=k,k=D()){case 40:if(v!=108&&M(O,f-1)==58)m++,O+="(";else O+=H(k);break;case 41:m--,O+=")";break;case 34:case 39:case 91:O+=H(k);break;case 9:case 10:case 13:case 32:if(m>0){O+=x(k);break}O+=q(v);break;case 92:O+=Q(K()-1,7);continue;case 47:switch(Y()){case 42:case 47:z(ne(ee(D(),K()),r,a,u),u);if((W(v||1)==5||W(Y()||1)==5)&&R(O)&&S(O,-1,void 0)!==" ")O+=" ";break;default:O+="/"}break;case 123*b:i[o++]=R(O)*w;case 125*b:case 59:case 0:if(m>0&&k){O+=x(k);break}switch(k){case 0:case 125:d=0;case 59+l:if(w==-1)O=A(O,/\f/g,"");if(h>0&&(R(O)-f||b===0))z(h>32?se(O+";",c,a,f-1,u):se(A(O," ","")+";",c,a,f-2,u),u);break;case 59:O+=";";default:z(y=te(O,r,a,o,l,t,i,g,$=[],E=[],f,n),n);if(k===123)if(l===0)ce(O,r,y,y,$,n,f,i,E);else{switch(p){case 99:if(M(O,3)===110)break;case 108:if(M(O,2)===97)break;default:l=0;case 100:case 109:case 115:}if(l)ce(e,y,y,c&&z(te(e,y,y,0,0,t,i,g,t,$=[],f,E),E),t,E,f,i,c?$:E);else ce(O,y,y,y,[""],E,0,i,E)}}o=l=h=0,b=w=1,g=O="",f=s;break;case 58:f=1+R(O),h=v;default:if(b<1)if(k==123)--b;else if(k==125&&b++==0&&L()==125)continue;switch(O+=x(k),k*b){case 38:w=l>0?1:(O+="\f",-1);break;case 44:if(m>0)break;i[o++]=(R(O)-1)*w,w=1;break;case 64:if(Y()===45)O+=H(D());p=Y(),l=f=R(g=O+=re(K())),k++;break;case 45:if(v===45&&R(O)==2)b=0}}return n}function te(e,r,a,c,t,s,i,u,o,l,f,p){var h=t-1;var v=t===0?s:[""];var b=P(v);for(var d=0,w=0,m=0;d0?v[k]+" "+g:A(g,/&\f/g,v[k])))o[m++]=x;return U(e,r,a,t===0?n:u,o,l,f,p)}function ne(e,r,a,c){return U(e,r,a,t,x(I()),S(e,2,-2),0,c)}function se(e,r,a,c,t){return U(e,r,a,s,S(e,0,c),S(e,c+1,-1),c,t)}function ie(e,t,n){switch(y(e,t)){case 5103:return c+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return c+e+e;case 4855:return c+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return a+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return c+e+a+e+r+e+e;case 5936:switch(M(e,t+11)){case 114:return c+e+r+A(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return c+e+r+A(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return c+e+r+A(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return c+e+r+e+e;case 6165:return c+e+r+"flex-"+e+e;case 5187:return c+e+A(e,/(\w+).+(:[^]+)/,c+"box-$1$2"+r+"flex-$1$2")+e;case 5443:return c+e+r+"flex-item-"+A(e,/flex-|-self/g,"")+(!T(e,/flex-|baseline/)?r+"grid-row-"+A(e,/flex-|-self/g,""):"")+e;case 4675:return c+e+r+"flex-line-pack"+A(e,/align-content|flex-|-self/g,"")+e;case 5548:return c+e+r+A(e,"shrink","negative")+e;case 5292:return c+e+r+A(e,"basis","preferred-size")+e;case 6060:return c+"box-"+A(e,"-grow","")+c+e+r+A(e,"grow","positive")+e;case 4554:return c+A(e,/([^-])(transform)/g,"$1"+c+"$2")+e;case 6187:return A(A(A(e,/(zoom-|grab)/,c+"$1"),/(image-set)/,c+"$1"),e,"")+e;case 5495:case 3959:return A(e,/(image-set\([^]*)/,c+"$1"+"$`$1");case 4968:return A(A(e,/(.+:)(flex-)?(.*)/,c+"box-pack:$3"+r+"flex-pack:$3"),/space-between/,"justify")+c+e+e;case 4200:if(!T(e,/flex-|baseline/))return r+"grid-column-align"+S(e,t)+e;break;case 2592:case 3360:return r+A(e,"template-","")+e;case 4384:case 3616:if(n&&n.some((function(e,r){return t=r,T(e.props,/grid-\w+-end/)}))){return~C(e+(n=n[t].value),"span")?e:r+A(e,"-start","")+e+r+"grid-row-span:"+(~C(n,"span")?T(n,/\d+/):+T(n,/\d+/)-+T(e,/\d+/))+";"}return r+A(e,"-start","")+e;case 4896:case 4128:return n&&n.some((function(e){return T(e.props,/grid-\w+-start/)}))?e:r+A(A(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return A(e,/(.+)-inline(.+)/,c+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(R(e)-1-t>6)switch(M(e,t+1)){case 109:if(M(e,t+4)!==45)break;case 102:return A(e,/(.+:)(.+)-([^]+)/,"$1"+c+"$2-$3"+"$1"+a+(M(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~C(e,"stretch")?ie(A(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return A(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(a,c,t,n,s,i,u){return r+c+":"+t+u+(n?r+c+"-span:"+(s?i:+i-+t)+u:"")+e}));case 4949:if(M(e,t+6)===121)return A(e,":",":"+c)+e;break;case 6444:switch(M(e,M(e,14)===45?18:11)){case 120:return A(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+c+(M(e,14)===45?"inline-":"")+"box$3"+"$1"+c+"$2$3"+"$1"+r+"$2box$3")+e;case 100:return A(e,":",":"+r)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return A(e,"scroll-","scroll-snap-")+e}return e}function ue(e,r){var a="";for(var c=0;c-1)if(!e.return)switch(e.type){case s:e.return=ie(e.value,e.length,i);return;case b:return ue([_(e,{value:A(e.value,"@","@"+c)})],u);case n:if(e.length)return N(i=e.props,(function(t){switch(T(t,u=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":F(_(e,{props:[A(t,/:(read-\w+)/,":"+a+"$1")]}));F(_(e,{props:[t]}));E(e,{props:j(i,u)});break;case"::placeholder":F(_(e,{props:[A(t,/:(plac\w+)/,":"+c+"input-$1")]}));F(_(e,{props:[A(t,/:(plac\w+)/,":"+a+"$1")]}));F(_(e,{props:[A(t,/:(plac\w+)/,r+"input-$1")]}));F(_(e,{props:[t]}));E(e,{props:j(i,u)});break}return""}))}}function he(e){switch(e.type){case n:e.props=e.props.map((function(r){return N(Z(r),(function(r,a,c){switch(M(r,0)){case 12:return S(r,1,R(r));case 0:case 40:case 43:case 62:case 126:return r;case 58:if(c[++a]==="global")c[a]="",c[++a]="\f"+S(c[a],a=1,-1);case 32:return a===1?"":r;default:switch(a){case 0:e=r;return P(c)>1?"":r;case a=P(c)-1:case 2:return a===2?r+e+e:r+e;default:return r}}}))}))}}e.CHARSET=l;e.COMMENT=t;e.COUNTER_STYLE=w;e.DECLARATION=s;e.DOCUMENT=h;e.FONT_FACE=d;e.FONT_FEATURE_VALUES=m;e.IMPORT=o;e.KEYFRAMES=b;e.LAYER=k;e.MEDIA=u;e.MOZ=a;e.MS=r;e.NAMESPACE=v;e.PAGE=i;e.RULESET=n;e.SCOPE=g;e.SUPPORTS=p;e.VIEWPORT=f;e.WEBKIT=c;e.abs=$;e.alloc=B;e.append=z;e.assign=E;e.caret=K;e.char=I;e.charat=M;e.combine=N;e.comment=ne;e.commenter=ee;e.compile=ae;e.copy=_;e.dealloc=G;e.declaration=se;e.delimit=H;e.delimiter=X;e.escaping=Q;e.filter=j;e.from=x;e.hash=y;e.identifier=re;e.indexof=C;e.lift=F;e.match=T;e.middleware=le;e.namespace=he;e.next=D;e.node=U;e.parse=ce;e.peek=Y;e.prefix=ie;e.prefixer=pe;e.prev=L;e.replace=A;e.ruleset=te;e.rulesheet=fe;e.serialize=ue;e.sizeof=P;e.slice=V;e.stringify=oe;e.strlen=R;e.substr=S;e.token=W;e.tokenize=Z;e.tokenizer=J;e.trim=O;e.whitespace=q;Object.defineProperty(e,"__esModule",{value:true})})); +//# sourceMappingURL=stylis.js.map diff --git a/tools/ui/node_modules/stylis/dist/umd/stylis.js.map b/tools/ui/node_modules/stylis/dist/umd/stylis.js.map new file mode 100644 index 0000000000000000000000000000000000000000..eb3f2495b01d396c9bfb6ec69ea621a09de7c10a --- /dev/null +++ b/tools/ui/node_modules/stylis/dist/umd/stylis.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stylis.js","sources":["../../src/Enum.js","../../src/Utility.js","../../src/Tokenizer.js","../../src/Parser.js","../../src/Prefixer.js","../../src/Serializer.js","../../src/Middleware.js"],"sourcesContent":["export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\nexport var SCOPE = '@scope'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace} from './Utility.js'\nimport {node, char, prev, next, peek, token, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar parens = 0\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) parens++, characters += '('\n\t\t\t\telse characters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// )\n\t\t\tcase 41:\n\t\t\t\tparens--, characters += ')'\n\t\t\t\tbreak\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tif (parens > 0) {\n\t\t\t\t\tcharacters += from(character)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent, declarations), declarations)\n\t\t\t\t\t\tif ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters) && substr(characters, -1, void 0) !== ' ') characters += ' '\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tif (parens > 0 && character) {\n\t\t\t\t\tcharacters += from(character)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length || variable === 0))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tswitch (atrule) {\n\t\t\t\t\t\t\t\t\t// c(ontainer)\n\t\t\t\t\t\t\t\t\tcase 99:\n\t\t\t\t\t\t\t\t\t\tif (charat(characters, 3) === 110) break\n\t\t\t\t\t\t\t\t\t// l(ayer)\n\t\t\t\t\t\t\t\t\tcase 108:\n\t\t\t\t\t\t\t\t\t\tif (charat(characters, 2) === 97) break\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\toffset = 0\n\t\t\t\t\t\t\t\t\t// d(ocument) m(edia) s(upports)\n\t\t\t\t\t\t\t\t\tcase 100: case 109: case 115:\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (offset) parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\telse parse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tif (parens > 0) break\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace, substr, match} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @param {object[]} children\n * @return {string}\n */\nexport function prefix (value, length, children) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599:\n\t\t\treturn WEBKIT + value + value\n\t\t// mask-composite\n\t\tcase 4855:\n\t\t\treturn WEBKIT + value.replace('add', 'source-over').replace('substract', 'source-out').replace('intersect', 'source-in').replace('exclude', 'xor') + value\n\t\t// tab-size\n\t\tcase 4789:\n\t\t\treturn MOZ + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t\t// default: fallthrough to below\n\t\t\t}\n\t\t// flex, flex-direction, scroll-snap-type, writing-mode\n\t\tcase 6828: case 4268: case 2903:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /space-between/, 'justify') + WEBKIT + value + value\n\t\t// justify-self\n\t\tcase 4200:\n\t\t\tif (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value\n\t\t\tbreak\n\t\t// grid-template-(columns|rows)\n\t\tcase 2592: case 3360:\n\t\t\treturn MS + replace(value, 'template-', '') + value\n\t\t// grid-(row|column)-start\n\t\tcase 4384: case 3616:\n\t\t\tif (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\\w+-end/) })) {\n\t\t\t\treturn ~indexof(value + (children = children[length].value), 'span') ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span') ? match(children, /\\d+/) : +match(children, /\\d+/) - +match(value, /\\d+/)) + ';')\n\t\t\t}\n\t\t\treturn MS + replace(value, '-start', '') + value\n\t\t// grid-(row|column)-end\n\t\tcase 4896: case 4128:\n\t\t\treturn (children && children.some(function (element) { return match(element.props, /grid-\\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// grid-(column|row)\n\t\tcase 5152: case 5920:\n\t\t\treturn replace(value, /(.+?):(\\d+)(\\s*\\/\\s*(span)?\\s*(\\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value })\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// stick(y)?\n\t\t\tif (charat(value, length + 6) === 121)\n\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\tbreak\n\t\t// display: (flex|inline-flex|grid|inline-grid)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {\n\t\t\t\t// (inline-)?fle(x)\n\t\t\t\tcase 120:\n\t\t\t\t\treturn replace(value, /(.+:)([^;\\s!]+)(;|(\\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t\t// (inline-)?gri(d)\n\t\t\t\tcase 100:\n\t\t\t\t\treturn replace(value, ':', ':' + MS) + value\n\t\t\t}\n\t\t\tbreak\n\t\t// scroll-margin, scroll-margin-(top|right|bottom|left)\n\t\tcase 5719: case 2647: case 2135: case 3927: case 2391:\n\t\t\treturn replace(value, 'scroll-', 'scroll-snap-') + value\n\t}\n\n\treturn value\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES, NAMESPACE} from './Enum.js'\nimport {strlen} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case NAMESPACE: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine, filter, assign} from './Utility.js'\nimport {copy, lift, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(children = element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, callback = /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n"],"names":["MS","MOZ","WEBKIT","COMMENT","RULESET","DECLARATION","PAGE","MEDIA","IMPORT","CHARSET","VIEWPORT","SUPPORTS","DOCUMENT","NAMESPACE","KEYFRAMES","FONT_FACE","COUNTER_STYLE","FONT_FEATURE_VALUES","LAYER","SCOPE","abs","Math","from","String","fromCharCode","assign","Object","hash","value","length","charat","trim","match","pattern","exec","replace","replacement","indexof","search","indexOf","index","charCodeAt","substr","begin","end","slice","strlen","sizeof","append","array","push","combine","callback","map","join","filter","node","root","parent","type","props","children","siblings","line","column","return","copy","lift","char","character","prev","position","characters","next","peek","caret","token","alloc","dealloc","delimit","delimiter","tokenize","tokenizer","whitespace","identifier","escaping","count","commenter","compile","parse","rule","rules","rulesets","pseudo","points","declarations","offset","atrule","property","previous","variable","scanning","ampersand","parens","reference","comment","declaration","ruleset","post","size","i","j","k","x","y","z","prefix","some","element","_","a","b","c","d","e","f","serialize","output","stringify","middleware","collection","rulesheet","prefixer","namespace"],"mappings":"8MAAWA,EAAK,WACLC,EAAM,YACNC,EAAS,eAETC,EAAU,WACVC,EAAU,WACVC,EAAc,WAEdC,EAAO,YACPC,EAAQ,aACRC,EAAS,cACTC,EAAU,eACVC,EAAW,gBACXC,EAAW,gBACXC,EAAW,gBACXC,EAAY,iBACZC,EAAY,iBACZC,EAAY,iBACZC,EAAgB,qBAChBC,EAAsB,2BACtBC,EAAQ,aACRC,EAAQ,aCjBRC,EAAMC,KAAKD,QAMXE,EAAOC,OAAOC,iBAMdC,EAASC,OAAOD,OAOpB,SAASE,EAAMC,EAAOC,GAC5B,OAAOC,EAAOF,EAAO,GAAK,MAAYC,GAAU,EAAKC,EAAOF,EAAO,KAAO,EAAKE,EAAOF,EAAO,KAAO,EAAKE,EAAOF,EAAO,KAAO,EAAKE,EAAOF,EAAO,GAAK,EAOhJ,SAASG,EAAMH,GACrB,OAAOA,EAAMG,OAQP,SAASC,EAAOJ,EAAOK,GAC7B,OAAQL,EAAQK,EAAQC,KAAKN,IAAUA,EAAM,GAAKA,EAS5C,SAASO,EAASP,EAAOK,EAASG,GACxC,OAAOR,EAAMO,QAAQF,EAASG,GAQxB,SAASC,EAAST,EAAOU,GAC/B,OAAOV,EAAMW,QAAQD,GAQf,SAASR,EAAQF,EAAOY,GAC9B,OAAOZ,EAAMa,WAAWD,GAAS,EAS3B,SAASE,EAAQd,EAAOe,EAAOC,GACrC,OAAOhB,EAAMiB,MAAMF,EAAOC,GAOpB,SAASE,EAAQlB,GACvB,OAAOA,EAAMC,OAOP,SAASkB,EAAQnB,GACvB,OAAOA,EAAMC,OAQP,SAASmB,EAAQpB,EAAOqB,GAC9B,OAAOA,EAAMC,KAAKtB,GAAQA,EAQpB,SAASuB,EAASF,EAAOG,GAC/B,OAAOH,EAAMI,IAAID,GAAUE,KAAK,IAQ1B,SAASC,EAAQN,EAAOhB,GAC9B,OAAOgB,EAAMM,QAAO,SAAU3B,GAAS,OAAQI,EAAMJ,EAAOK,aCxH3C,WACE,WACA,aACE,cACC,eACC,GAYjB,SAASuB,EAAM5B,EAAO6B,EAAMC,EAAQC,EAAMC,EAAOC,EAAUhC,EAAQiC,GACzE,MAAO,CAAClC,MAAOA,EAAO6B,KAAMA,EAAMC,OAAQA,EAAQC,KAAMA,EAAMC,MAAOA,EAAOC,SAAUA,EAAUE,KAAMA,OAAMC,OAAQA,SAAQnC,OAAQA,EAAQoC,OAAQ,GAAIH,SAAUA,GAQ5J,SAASI,EAAMT,EAAMG,GAC3B,OAAOnC,EAAO+B,EAAK,GAAI,KAAM,KAAM,GAAI,KAAM,KAAM,EAAGC,EAAKK,UAAWL,EAAM,CAAC5B,QAAS4B,EAAK5B,QAAS+B,GAM9F,SAASO,EAAMV,GACrB,MAAOA,EAAKA,KACXA,EAAOS,EAAKT,EAAKA,KAAM,CAACI,SAAU,CAACJ,KAEpCT,EAAOS,EAAMA,EAAKK,UAMZ,SAASM,IACf,OAAOC,YAMD,SAASC,IACfD,YAAYE,WAAW,EAAIzC,EAAO0C,eAAcD,YAAY,EAE5D,GAAIP,WAAUK,cAAc,GAC3BL,SAAS,EAAGD,SAEb,OAAOM,YAMD,SAASI,IACfJ,YAAYE,WAAW1C,SAASC,EAAO0C,aAAYD,cAAc,EAEjE,GAAIP,WAAUK,cAAc,GAC3BL,SAAS,EAAGD,SAEb,OAAOM,YAMD,SAASK,IACf,OAAO5C,EAAO0C,aAAYD,YAMpB,SAASI,IACf,OAAOJ,WAQD,SAAS1B,EAAOF,EAAOC,GAC7B,OAAOF,EAAO8B,aAAY7B,EAAOC,GAO3B,SAASgC,EAAOjB,GACtB,OAAQA,GAEP,KAAK,EAAG,KAAK,EAAG,KAAK,GAAI,KAAK,GAAI,KAAK,GACtC,OAAO,EAER,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,IAE3D,KAAK,GAAI,KAAK,IAAK,KAAK,IACvB,OAAO,EAER,KAAK,GACJ,OAAO,EAER,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,GAC/B,OAAO,EAER,KAAK,GAAI,KAAK,GACb,OAAO,EAGT,OAAO,EAOD,SAASkB,EAAOjD,GACtB,OAAOmC,OAAOC,SAAS,EAAGnC,SAASiB,EAAO0B,aAAa5C,GAAQ2C,WAAW,EAAG,GAOvE,SAASO,EAASlD,GACxB,OAAO4C,aAAa,GAAI5C,EAOlB,SAASmD,EAASpB,GACxB,OAAO5B,EAAKc,EAAM0B,WAAW,EAAGS,EAAUrB,IAAS,GAAKA,EAAO,EAAIA,IAAS,GAAKA,EAAO,EAAIA,KAOtF,SAASsB,EAAUrD,GACzB,OAAOkD,EAAQI,EAAUL,EAAMjD,KAOzB,SAASuD,EAAYxB,GAC3B,MAAOU,YAAYK,IAClB,GAAIL,YAAY,GACfI,SAEA,MAEF,OAAOG,EAAMjB,GAAQ,GAAKiB,EAAMP,aAAa,EAAI,GAAK,IAOhD,SAASa,EAAWrB,GAC1B,MAAOY,IACN,OAAQG,EAAMP,cACb,KAAK,EAAGrB,EAAOoC,GAAWb,WAAW,GAAIV,GACxC,MACD,KAAK,EAAGb,EAAO+B,EAAQV,aAAYR,GAClC,MACD,QAASb,EAAO1B,EAAK+C,aAAYR,GAGnC,OAAOA,EAQD,SAASwB,EAAU7C,EAAO8C,GAChC,QAASA,GAASb,IAEjB,GAAIJ,YAAY,IAAMA,YAAY,KAAQA,YAAY,IAAMA,YAAY,IAAQA,YAAY,IAAMA,YAAY,GAC7G,MAEF,OAAOxB,EAAML,EAAOmC,KAAWW,EAAQ,GAAKZ,KAAU,IAAMD,KAAU,KAOhE,SAASO,EAAWrB,GAC1B,MAAOc,IACN,OAAQJ,aAEP,KAAKV,EACJ,OAAOY,WAER,KAAK,GAAI,KAAK,GACb,GAAIZ,IAAS,IAAMA,IAAS,GAC3BqB,EAAUX,aACX,MAED,KAAK,GACJ,GAAIV,IAAS,GACZqB,EAAUrB,GACX,MAED,KAAK,GACJc,IACA,MAGH,OAAOF,WAQD,SAASgB,GAAW5B,EAAMnB,GAChC,MAAOiC,IAEN,GAAId,EAAOU,cAAc,GAAK,GAC7B,WAEI,GAAIV,EAAOU,cAAc,GAAK,IAAMK,MAAW,GACnD,MAEF,MAAO,KAAO7B,EAAML,EAAO+B,WAAW,GAAK,IAAMjD,EAAKqC,IAAS,GAAKA,EAAOc,KAOrE,SAASW,GAAY5C,GAC3B,OAAQoC,EAAMF,KACbD,IAED,OAAO5B,EAAML,EAAO+B,YCvPd,SAASiB,GAAS5D,GACxB,OAAOkD,EAAQW,GAAM,GAAI,KAAM,KAAM,KAAM,CAAC,IAAK7D,EAAQiD,EAAMjD,GAAQ,EAAG,CAAC,GAAIA,IAezE,SAAS6D,GAAO7D,EAAO6B,EAAMC,EAAQgC,EAAMC,EAAOC,EAAUC,EAAQC,EAAQC,GAClF,IAAIvD,EAAQ,EACZ,IAAIwD,EAAS,EACb,IAAInE,EAASgE,EACb,IAAII,EAAS,EACb,IAAIC,EAAW,EACf,IAAIC,EAAW,EACf,IAAIC,EAAW,EACf,IAAIC,EAAW,EACf,IAAIC,EAAY,EAChB,IAAIC,EAAS,EACb,IAAIlC,EAAY,EAChB,IAAIV,EAAO,GACX,IAAIC,EAAQ+B,EACZ,IAAI9B,EAAW+B,EACf,IAAIY,EAAYd,EAChB,IAAIlB,EAAab,EAEjB,MAAO0C,EACN,OAAQF,EAAW9B,EAAWA,EAAYI,KAEzC,KAAK,GACJ,GAAI0B,GAAY,KAAOrE,EAAO0C,EAAY3C,EAAS,IAAM,GAAI0E,IAAU/B,GAAc,SAChFA,GAAcO,EAAQV,GAC3B,MAED,KAAK,GACJkC,IAAU/B,GAAc,IACxB,MAED,KAAK,GAAI,KAAK,GAAI,KAAK,GACtBA,GAAcO,EAAQV,GACtB,MAED,KAAK,EAAG,KAAK,GAAI,KAAK,GAAI,KAAK,GAC9B,GAAIkC,EAAS,EAAG,CACf/B,GAAclD,EAAK+C,GACnB,MAEDG,GAAcW,EAAWgB,GACzB,MAED,KAAK,GACJ3B,GAAca,EAASV,IAAU,EAAG,GACpC,SAED,KAAK,GACJ,OAAQD,KACP,KAAK,GAAI,KAAK,GACb1B,EAAOyD,GAAQlB,GAAUd,IAAQE,KAAUlB,EAAMC,EAAQqC,GAAeA,GACxE,IAAKnB,EAAMuB,GAAY,IAAM,GAAKvB,EAAMF,KAAU,IAAM,IAAM5B,EAAO0B,IAAe9B,EAAO8B,GAAa,OAAQ,KAAO,IAAKA,GAAc,IAC1I,MACD,QACCA,GAAc,IAEhB,MAED,KAAK,IAAM4B,EACVN,EAAOtD,KAAWM,EAAO0B,GAAc8B,EAExC,KAAK,IAAMF,EAAU,KAAK,GAAI,KAAK,EAClC,GAAIG,EAAS,GAAKlC,EAAW,CAC5BG,GAAclD,EAAK+C,GACnB,MAED,OAAQA,GAEP,KAAK,EAAG,KAAK,IAAKgC,EAAW,EAE7B,KAAK,GAAKL,EAAQ,GAAIM,IAAc,EAAG9B,EAAarC,EAAQqC,EAAY,MAAO,IAC9E,GAAI0B,EAAW,IAAMpD,EAAO0B,GAAc3C,GAAUuE,IAAa,GAChEpD,EAAOkD,EAAW,GAAKQ,GAAYlC,EAAa,IAAKkB,EAAMhC,EAAQ7B,EAAS,EAAGkE,GAAgBW,GAAYvE,EAAQqC,EAAY,IAAK,IAAM,IAAKkB,EAAMhC,EAAQ7B,EAAS,EAAGkE,GAAeA,GACzL,MAED,KAAK,GAAIvB,GAAc,IAEvB,QACCxB,EAAOwD,EAAYG,GAAQnC,EAAYf,EAAMC,EAAQlB,EAAOwD,EAAQL,EAAOG,EAAQnC,EAAMC,EAAQ,GAAIC,EAAW,GAAIhC,EAAQ+D,GAAWA,GAEvI,GAAIvB,IAAc,IACjB,GAAI2B,IAAW,EACdP,GAAMjB,EAAYf,EAAM+C,EAAWA,EAAW5C,EAAOgC,EAAU/D,EAAQiE,EAAQjC,OAC3E,CACJ,OAAQoC,GAEP,KAAK,GACJ,GAAInE,EAAO0C,EAAY,KAAO,IAAK,MAEpC,KAAK,IACJ,GAAI1C,EAAO0C,EAAY,KAAO,GAAI,MACnC,QACCwB,EAAS,EAEV,KAAK,IAAK,KAAK,IAAK,KAAK,KAE1B,GAAIA,EAAQP,GAAM7D,EAAO4E,EAAWA,EAAWd,GAAQ1C,EAAO2D,GAAQ/E,EAAO4E,EAAWA,EAAW,EAAG,EAAGb,EAAOG,EAAQnC,EAAMgC,EAAO/B,EAAQ,GAAI/B,EAAQgC,GAAWA,GAAW8B,EAAO9B,EAAUhC,EAAQiE,EAAQJ,EAAO9B,EAAQC,QAC1N4B,GAAMjB,EAAYgC,EAAWA,EAAWA,EAAW,CAAC,IAAK3C,EAAU,EAAGiC,EAAQjC,IAIvFrB,EAAQwD,EAASE,EAAW,EAAGE,EAAWE,EAAY,EAAG3C,EAAOa,EAAa,GAAI3C,EAASgE,EAC1F,MAED,KAAK,GACJhE,EAAS,EAAIiB,EAAO0B,GAAa0B,EAAWC,EAC7C,QACC,GAAIC,EAAW,EACd,GAAI/B,GAAa,MACd+B,OACE,GAAI/B,GAAa,KAAO+B,KAAc,GAAK9B,KAAU,IACzD,SAEF,OAAQE,GAAclD,EAAK+C,GAAYA,EAAY+B,GAElD,KAAK,GACJE,EAAYN,EAAS,EAAI,GAAKxB,GAAc,MAAO,GACnD,MAED,KAAK,GACJ,GAAI+B,EAAS,EAAG,MAChBT,EAAOtD,MAAYM,EAAO0B,GAAc,GAAK8B,EAAWA,EAAY,EACpE,MAED,KAAK,GAEJ,GAAI5B,MAAW,GACdF,GAAcO,EAAQN,KAEvBwB,EAASvB,IAAQsB,EAASnE,EAASiB,EAAOa,EAAOa,GAAcY,GAAWT,MAAWN,IACrF,MAED,KAAK,GACJ,GAAI8B,IAAa,IAAMrD,EAAO0B,IAAe,EAC5C4B,EAAW,GAIjB,OAAOR,EAkBD,SAASe,GAAS/E,EAAO6B,EAAMC,EAAQlB,EAAOwD,EAAQL,EAAOG,EAAQnC,EAAMC,EAAOC,EAAUhC,EAAQiC,GAC1G,IAAI8C,EAAOZ,EAAS,EACpB,IAAIN,EAAOM,IAAW,EAAIL,EAAQ,CAAC,IACnC,IAAIkB,EAAO9D,EAAO2C,GAElB,IAAK,IAAIoB,EAAI,EAAGC,EAAI,EAAGC,EAAI,EAAGF,EAAItE,IAASsE,EAC1C,IAAK,IAAIG,EAAI,EAAGC,EAAIxE,EAAOd,EAAOgF,EAAO,EAAGA,EAAOxF,EAAI2F,EAAIjB,EAAOgB,KAAMK,EAAIvF,EAAOqF,EAAIJ,IAAQI,EAC9F,GAAIE,EAAIpF,EAAKgF,EAAI,EAAIrB,EAAKuB,GAAK,IAAMC,EAAI/E,EAAQ+E,EAAG,OAAQxB,EAAKuB,KAChErD,EAAMoD,KAAOG,EAEhB,OAAO3D,EAAK5B,EAAO6B,EAAMC,EAAQsC,IAAW,EAAI5F,EAAUuD,EAAMC,EAAOC,EAAUhC,EAAQiC,GAUnF,SAAS2C,GAAS7E,EAAO6B,EAAMC,EAAQI,GAC7C,OAAON,EAAK5B,EAAO6B,EAAMC,EAAQvD,EAASmB,EAAK8C,KAAS1B,EAAOd,EAAO,GAAI,GAAI,EAAGkC,GAW3E,SAAS4C,GAAa9E,EAAO6B,EAAMC,EAAQ7B,EAAQiC,GACzD,OAAON,EAAK5B,EAAO6B,EAAMC,EAAQrD,EAAaqC,EAAOd,EAAO,EAAGC,GAASa,EAAOd,EAAOC,EAAS,GAAI,GAAIA,EAAQiC,GC3MzG,SAASsD,GAAQxF,EAAOC,EAAQgC,GACtC,OAAQlC,EAAKC,EAAOC,IAEnB,KAAK,KACJ,OAAO3B,EAAS,SAAW0B,EAAQA,EAEpC,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAEvE,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAE5D,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAE5D,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAChD,OAAO1B,EAAS0B,EAAQA,EAEzB,KAAK,KACJ,OAAO1B,EAAS0B,EAAMO,QAAQ,MAAO,eAAeA,QAAQ,YAAa,cAAcA,QAAQ,YAAa,aAAaA,QAAQ,UAAW,OAASP,EAEtJ,KAAK,KACJ,OAAO3B,EAAM2B,EAAQA,EAEtB,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAChD,OAAO1B,EAAS0B,EAAQ3B,EAAM2B,EAAQ5B,EAAK4B,EAAQA,EAEpD,KAAK,KACJ,OAAQE,EAAOF,EAAOC,EAAS,KAE9B,KAAK,IACJ,OAAO3B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,qBAAsB,MAAQA,EAE3E,KAAK,IACJ,OAAO1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,qBAAsB,SAAWA,EAE9E,KAAK,GACJ,OAAO1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,qBAAsB,MAAQA,EAI7E,KAAK,KAAM,KAAK,KAAM,KAAK,KAC1B,OAAO1B,EAAS0B,EAAQ5B,EAAK4B,EAAQA,EAEtC,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAK,QAAU4B,EAAQA,EAEhD,KAAK,KACJ,OAAO1B,EAAS0B,EAAQO,EAAQP,EAAO,iBAAkB1B,EAAS,WAAaF,EAAK,aAAe4B,EAEpG,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAK,aAAemC,EAAQP,EAAO,eAAgB,MAAQI,EAAMJ,EAAO,kBAAoB5B,EAAK,YAAcmC,EAAQP,EAAO,eAAgB,IAAM,IAAMA,EAEnL,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAK,iBAAmBmC,EAAQP,EAAO,6BAA8B,IAAMA,EAEpG,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,SAAU,YAAcA,EAErE,KAAK,KACJ,OAAO1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,QAAS,kBAAoBA,EAE1E,KAAK,KACJ,OAAO1B,EAAS,OAASiC,EAAQP,EAAO,QAAS,IAAM1B,EAAS0B,EAAQ5B,EAAKmC,EAAQP,EAAO,OAAQ,YAAcA,EAEnH,KAAK,KACJ,OAAO1B,EAASiC,EAAQP,EAAO,qBAAsB,KAAO1B,EAAS,MAAQ0B,EAE9E,KAAK,KACJ,OAAOO,EAAQA,EAAQA,EAAQP,EAAO,eAAgB1B,EAAS,MAAO,cAAeA,EAAS,MAAO0B,EAAO,IAAMA,EAEnH,KAAK,KAAM,KAAK,KACf,OAAOO,EAAQP,EAAO,oBAAqB1B,EAAS,KAAO,QAE5D,KAAK,KACJ,OAAOiC,EAAQA,EAAQP,EAAO,oBAAqB1B,EAAS,cAAgBF,EAAK,gBAAiB,gBAAiB,WAAaE,EAAS0B,EAAQA,EAElJ,KAAK,KACJ,IAAKI,EAAMJ,EAAO,kBAAmB,OAAO5B,EAAK,oBAAsB0C,EAAOd,EAAOC,GAAUD,EAC/F,MAED,KAAK,KAAM,KAAK,KACf,OAAO5B,EAAKmC,EAAQP,EAAO,YAAa,IAAMA,EAE/C,KAAK,KAAM,KAAK,KACf,GAAIiC,GAAYA,EAASwD,MAAK,SAAUC,EAAS9E,GAAS,OAAOX,EAASW,EAAOR,EAAMsF,EAAQ1D,MAAO,mBAAoB,CACzH,OAAQvB,EAAQT,GAASiC,EAAWA,EAAShC,GAAQD,OAAQ,QAAUA,EAAS5B,EAAKmC,EAAQP,EAAO,SAAU,IAAMA,EAAQ5B,EAAK,mBAAqBqC,EAAQwB,EAAU,QAAU7B,EAAM6B,EAAU,QAAU7B,EAAM6B,EAAU,QAAU7B,EAAMJ,EAAO,QAAU,IAE9P,OAAO5B,EAAKmC,EAAQP,EAAO,SAAU,IAAMA,EAE5C,KAAK,KAAM,KAAK,KACf,OAAQiC,GAAYA,EAASwD,MAAK,SAAUC,GAAW,OAAOtF,EAAMsF,EAAQ1D,MAAO,qBAAwBhC,EAAQ5B,EAAKmC,EAAQA,EAAQP,EAAO,OAAQ,SAAU,QAAS,IAAMA,EAEjL,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KACrC,OAAOO,EAAQP,EAAO,kBAAmB1B,EAAS,QAAU0B,EAE7D,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KACtC,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KACtC,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAErC,GAAIkB,EAAOlB,GAAS,EAAIC,EAAS,EAChC,OAAQC,EAAOF,EAAOC,EAAS,IAE9B,KAAK,IAEJ,GAAIC,EAAOF,EAAOC,EAAS,KAAO,GACjC,MAEF,KAAK,IACJ,OAAOM,EAAQP,EAAO,mBAAoB,KAAO1B,EAAS,QAAU,KAAOD,GAAO6B,EAAOF,EAAOC,EAAS,IAAM,IAAM,KAAO,UAAYD,EAEzI,KAAK,IACJ,OAAQS,EAAQT,EAAO,WAAawF,GAAOjF,EAAQP,EAAO,UAAW,kBAAmBC,EAAQgC,GAAYjC,EAAQA,EAEvH,MAED,KAAK,KAAM,KAAK,KACf,OAAOO,EAAQP,EAAO,6CAA6C,SAAU2F,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,GAAK,OAAQ7H,EAAKwH,EAAI,IAAMC,EAAII,GAAMH,EAAK1H,EAAKwH,EAAI,UAAYG,EAAIC,GAAKA,GAAKH,GAAMI,EAAI,IAAMjG,KAE9L,KAAK,KAEJ,GAAIE,EAAOF,EAAOC,EAAS,KAAO,IACjC,OAAOM,EAAQP,EAAO,IAAK,IAAM1B,GAAU0B,EAC5C,MAED,KAAK,KACJ,OAAQE,EAAOF,EAAOE,EAAOF,EAAO,MAAQ,GAAK,GAAK,KAErD,KAAK,IACJ,OAAOO,EAAQP,EAAO,gCAAiC,KAAO1B,GAAU4B,EAAOF,EAAO,MAAQ,GAAK,UAAY,IAAM,QAAU,KAAO1B,EAAS,OAAS,KAAOF,EAAK,WAAa4B,EAElL,KAAK,IACJ,OAAOO,EAAQP,EAAO,IAAK,IAAM5B,GAAM4B,EAEzC,MAED,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAAM,KAAK,KAChD,OAAOO,EAAQP,EAAO,UAAW,gBAAkBA,EAGrD,OAAOA,EC1ID,SAASkG,GAAWjE,EAAUT,GACpC,IAAI2E,EAAS,GAEb,IAAK,IAAIjB,EAAI,EAAGA,EAAIjD,EAAShC,OAAQiF,IACpCiB,GAAU3E,EAASS,EAASiD,GAAIA,EAAGjD,EAAUT,IAAa,GAE3D,OAAO2E,EAUD,SAASC,GAAWV,EAAS9E,EAAOqB,EAAUT,GACpD,OAAQkE,EAAQ3D,MACf,KAAKzC,EAAO,GAAIoG,EAAQzD,SAAShC,OAAQ,MACzC,KAAKrB,EAAQ,KAAKK,EAAW,KAAKR,EAAa,OAAOiH,EAAQrD,OAASqD,EAAQrD,QAAUqD,EAAQ1F,MACjG,KAAKzB,EAAS,MAAO,GACrB,KAAKW,EAAW,OAAOwG,EAAQrD,OAASqD,EAAQ1F,MAAQ,IAAMkG,GAAUR,EAAQzD,SAAUT,GAAY,IACtG,KAAKhD,EAAS,IAAK0C,EAAOwE,EAAQ1F,MAAQ0F,EAAQ1D,MAAMN,KAAK,MAAO,MAAO,GAG5E,OAAOR,EAAOe,EAAWiE,GAAUR,EAAQzD,SAAUT,IAAakE,EAAQrD,OAASqD,EAAQ1F,MAAQ,IAAMiC,EAAW,IAAM,GCvBpH,SAASoE,GAAYC,GAC3B,IAAIrG,EAASkB,EAAOmF,GAEpB,OAAO,SAAUZ,EAAS9E,EAAOqB,EAAUT,GAC1C,IAAI2E,EAAS,GAEb,IAAK,IAAIjB,EAAI,EAAGA,EAAIjF,EAAQiF,IAC3BiB,GAAUG,EAAWpB,GAAGQ,EAAS9E,EAAOqB,EAAUT,IAAa,GAEhE,OAAO2E,GAQF,SAASI,GAAW/E,GAC1B,OAAO,SAAUkE,GAChB,IAAKA,EAAQ7D,KACZ,GAAI6D,EAAUA,EAAQrD,OACrBb,EAASkE,IAUN,SAASc,GAAUd,EAAS9E,EAAOqB,EAAUT,GACnD,GAAIkE,EAAQzF,QAAU,EACrB,IAAKyF,EAAQrD,OACZ,OAAQqD,EAAQ3D,MACf,KAAKtD,EAAaiH,EAAQrD,OAASmD,GAAOE,EAAQ1F,MAAO0F,EAAQzF,OAAQgC,GACxE,OACD,KAAK/C,EACJ,OAAOgH,GAAU,CAAC5D,EAAKoD,EAAS,CAAC1F,MAAOO,EAAQmF,EAAQ1F,MAAO,IAAK,IAAM1B,MAAYkD,GACvF,KAAKhD,EACJ,GAAIkH,EAAQzF,OACX,OAAOsB,EAAQU,EAAWyD,EAAQ1D,OAAO,SAAUhC,GAClD,OAAQI,EAAMJ,EAAOwB,EAAW,0BAE/B,IAAK,aAAc,IAAK,cACvBe,EAAKD,EAAKoD,EAAS,CAAC1D,MAAO,CAACzB,EAAQP,EAAO,cAAe,IAAM3B,EAAM,UACtEkE,EAAKD,EAAKoD,EAAS,CAAC1D,MAAO,CAAChC,MAC5BH,EAAO6F,EAAS,CAAC1D,MAAOL,EAAOM,EAAUT,KACzC,MAED,IAAK,gBACJe,EAAKD,EAAKoD,EAAS,CAAC1D,MAAO,CAACzB,EAAQP,EAAO,aAAc,IAAM1B,EAAS,gBACxEiE,EAAKD,EAAKoD,EAAS,CAAC1D,MAAO,CAACzB,EAAQP,EAAO,aAAc,IAAM3B,EAAM,UACrEkE,EAAKD,EAAKoD,EAAS,CAAC1D,MAAO,CAACzB,EAAQP,EAAO,aAAc5B,EAAK,gBAC9DmE,EAAKD,EAAKoD,EAAS,CAAC1D,MAAO,CAAChC,MAC5BH,EAAO6F,EAAS,CAAC1D,MAAOL,EAAOM,EAAUT,KACzC,MAGF,MAAO,OAUP,SAASiF,GAAWf,GAC1B,OAAQA,EAAQ3D,MACf,KAAKvD,EACJkH,EAAQ1D,MAAQ0D,EAAQ1D,MAAMP,KAAI,SAAUzB,GAC3C,OAAOuB,EAAQ8B,EAASrD,IAAQ,SAAUA,EAAOY,EAAOqB,GACvD,OAAQ/B,EAAOF,EAAO,IAErB,KAAK,GACJ,OAAOc,EAAOd,EAAO,EAAGkB,EAAOlB,IAEhC,KAAK,EAAG,KAAK,GAAI,KAAK,GAAI,KAAK,GAAI,KAAK,IACvC,OAAOA,EAER,KAAK,GACJ,GAAIiC,IAAWrB,KAAW,SACzBqB,EAASrB,GAAS,GAAIqB,IAAWrB,GAAS,KAAOE,EAAOmB,EAASrB,GAAQA,EAAQ,GAAI,GAEvF,KAAK,GACJ,OAAOA,IAAU,EAAI,GAAKZ,EAC3B,QACC,OAAQY,GACP,KAAK,EAAG8E,EAAU1F,EACjB,OAAOmB,EAAOc,GAAY,EAAI,GAAKjC,EACpC,KAAKY,EAAQO,EAAOc,GAAY,EAAG,KAAK,EACvC,OAAOrB,IAAU,EAAIZ,EAAQ0F,EAAUA,EAAU1F,EAAQ0F,EAC1D,QACC,OAAO1F"} \ No newline at end of file diff --git a/tools/ui/node_modules/stylis/index.js b/tools/ui/node_modules/stylis/index.js new file mode 100644 index 0000000000000000000000000000000000000000..3c12a38af6633b70fb1e3c80639c8d6415b8f3a0 --- /dev/null +++ b/tools/ui/node_modules/stylis/index.js @@ -0,0 +1,7 @@ +export * from './src/Enum.js' +export * from './src/Utility.js' +export * from './src/Parser.js' +export * from './src/Prefixer.js' +export * from './src/Tokenizer.js' +export * from './src/Serializer.js' +export * from './src/Middleware.js' diff --git a/tools/ui/node_modules/stylis/package.json b/tools/ui/node_modules/stylis/package.json new file mode 100644 index 0000000000000000000000000000000000000000..37b39b28c303f8636fa7592204cc79d22d43479b --- /dev/null +++ b/tools/ui/node_modules/stylis/package.json @@ -0,0 +1,167 @@ +{ + "name": "stylis", + "version": "4.4.0", + "license": "MIT", + "description": "A Light–weight CSS Preprocessor", + "homepage": "https://github.com/thysultan/stylis.js", + "author": "Sultan Tarimo ", + "repository": "https://github.com/thysultan/stylis.js", + "bugs": "https://github.com/thysultan/stylis.js/issues", + "sideEffects": false, + "type": "module", + "main": "dist/umd/stylis.js", + "module": "dist/stylis.mjs", + "react-native": "./index.js", + "exports": { + ".": { + "import": "./index.js", + "require": "./dist/umd/stylis.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "index.js", + "dist/", + "src/" + ], + "scripts": { + "lint": "eslint ./", + "pretest": "npm run lint && npm run build", + "test": "nyc npm run spec", + "spec": "mocha --harmony --require esm script/setup.js --recursive test", + "prebuild": "rimraf dist", + "build": "rollup --config script/build.js --configSrc ./", + "start": "npm run build -- --watch", + "prepare": "npm run build", + "postversion": "git push --follow-tags && npm publish", + "release-major": "npm version major -m '%s'", + "release-minor": "npm version minor -m '%s'", + "release-patch": "npm version patch -m '%s'" + }, + "devDependencies": { + "chai": "4.3.4", + "eslint": "6.8.0", + "esm": "3.2.25", + "mocha": "9.1.1", + "nyc": "15.1.0", + "rimraf": "3.0.2", + "rollup": "1.28.0", + "rollup-plugin-size": "0.2.1", + "rollup-plugin-terser": "5.1.3", + "stylis": "./" + }, + "nyc": { + "temp-dir": "./coverage/.nyc_output", + "exclude": [ + "**/dist/", + "**/test/", + "**/script/" + ], + "reporter": [ + "lcov", + "text" + ] + }, + "esm": { + "cjs": true, + "cache": false + }, + "eslintIgnore": [ + "script/", + "test/", + "dist/", + "docs/" + ], + "eslintConfig": { + "env": { + "commonjs": true, + "browser": true, + "node": true, + "es6": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 7, + "sourceType": "module", + "ecmaFeatures": { + "impliedStrict": true + } + }, + "rules": { + "indent": [ + "error", + "tab", + { + "SwitchCase": 1 + } + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "never" + ], + "no-cond-assign": [ + "off" + ], + "no-redeclare": [ + "off" + ], + "no-fallthrough": [ + "off" + ], + "no-console": [ + "off" + ], + "no-unsafe-finally": [ + "off" + ], + "no-shadow-restricted-names": [ + "error" + ], + "no-whitespace-before-property": [ + "error" + ], + "no-else-return": [ + "error" + ], + "eol-last": [ + "error" + ], + "func-call-spacing": [ + "error", + "never" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "require-jsdoc": [ + "error", + { + "require": { + "FunctionDeclaration": true + } + } + ], + "no-trailing-spaces": [ + "error", + { + "skipBlankLines": true + } + ], + "no-constant-condition": [ + "off" + ] + } + } +} diff --git a/tools/ui/node_modules/stylis/src/Enum.js b/tools/ui/node_modules/stylis/src/Enum.js new file mode 100644 index 0000000000000000000000000000000000000000..5e2ec734349c7a450d90916d86e679c40a1bd24d --- /dev/null +++ b/tools/ui/node_modules/stylis/src/Enum.js @@ -0,0 +1,22 @@ +export var MS = '-ms-' +export var MOZ = '-moz-' +export var WEBKIT = '-webkit-' + +export var COMMENT = 'comm' +export var RULESET = 'rule' +export var DECLARATION = 'decl' + +export var PAGE = '@page' +export var MEDIA = '@media' +export var IMPORT = '@import' +export var CHARSET = '@charset' +export var VIEWPORT = '@viewport' +export var SUPPORTS = '@supports' +export var DOCUMENT = '@document' +export var NAMESPACE = '@namespace' +export var KEYFRAMES = '@keyframes' +export var FONT_FACE = '@font-face' +export var COUNTER_STYLE = '@counter-style' +export var FONT_FEATURE_VALUES = '@font-feature-values' +export var LAYER = '@layer' +export var SCOPE = '@scope' diff --git a/tools/ui/node_modules/stylis/src/Middleware.js b/tools/ui/node_modules/stylis/src/Middleware.js new file mode 100644 index 0000000000000000000000000000000000000000..1d7df2cfb2b3a99d5b9be37987af85e5dd618529 --- /dev/null +++ b/tools/ui/node_modules/stylis/src/Middleware.js @@ -0,0 +1,112 @@ +import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js' +import {match, charat, substr, strlen, sizeof, replace, combine, filter, assign} from './Utility.js' +import {copy, lift, tokenize} from './Tokenizer.js' +import {serialize} from './Serializer.js' +import {prefix} from './Prefixer.js' + +/** + * @param {function[]} collection + * @return {function} + */ +export function middleware (collection) { + var length = sizeof(collection) + + return function (element, index, children, callback) { + var output = '' + + for (var i = 0; i < length; i++) + output += collection[i](element, index, children, callback) || '' + + return output + } +} + +/** + * @param {function} callback + * @return {function} + */ +export function rulesheet (callback) { + return function (element) { + if (!element.root) + if (element = element.return) + callback(element) + } +} + +/** + * @param {object} element + * @param {number} index + * @param {object[]} children + * @param {function} callback + */ +export function prefixer (element, index, children, callback) { + if (element.length > -1) + if (!element.return) + switch (element.type) { + case DECLARATION: element.return = prefix(element.value, element.length, children) + return + case KEYFRAMES: + return serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback) + case RULESET: + if (element.length) + return combine(children = element.props, function (value) { + switch (match(value, callback = /(::plac\w+|:read-\w+)/)) { + // :read-(only|write) + case ':read-only': case ':read-write': + lift(copy(element, {props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]})) + lift(copy(element, {props: [value]})) + assign(element, {props: filter(children, callback)}) + break + // :placeholder + case '::placeholder': + lift(copy(element, {props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]})) + lift(copy(element, {props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]})) + lift(copy(element, {props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]})) + lift(copy(element, {props: [value]})) + assign(element, {props: filter(children, callback)}) + break + } + + return '' + }) + } +} + +/** + * @param {object} element + * @param {number} index + * @param {object[]} children + */ +export function namespace (element) { + switch (element.type) { + case RULESET: + element.props = element.props.map(function (value) { + return combine(tokenize(value), function (value, index, children) { + switch (charat(value, 0)) { + // \f + case 12: + return substr(value, 1, strlen(value)) + // \0 ( + > ~ + case 0: case 40: case 43: case 62: case 126: + return value + // : + case 58: + if (children[++index] === 'global') + children[index] = '', children[++index] = '\f' + substr(children[index], index = 1, -1) + // \s + case 32: + return index === 1 ? '' : value + default: + switch (index) { + case 0: element = value + return sizeof(children) > 1 ? '' : value + case index = sizeof(children) - 1: case 2: + return index === 2 ? value + element + element : value + element + default: + return value + } + } + }) + }) + } +} diff --git a/tools/ui/node_modules/stylis/src/Parser.js b/tools/ui/node_modules/stylis/src/Parser.js new file mode 100644 index 0000000000000000000000000000000000000000..57b14a879e9f099913c8a7dccc6af338c08a80fb --- /dev/null +++ b/tools/ui/node_modules/stylis/src/Parser.js @@ -0,0 +1,214 @@ +import {COMMENT, RULESET, DECLARATION} from './Enum.js' +import {abs, charat, trim, from, sizeof, strlen, substr, append, replace} from './Utility.js' +import {node, char, prev, next, peek, token, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js' + +/** + * @param {string} value + * @return {object[]} + */ +export function compile (value) { + return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value)) +} + +/** + * @param {string} value + * @param {object} root + * @param {object?} parent + * @param {string[]} rule + * @param {string[]} rules + * @param {string[]} rulesets + * @param {number[]} pseudo + * @param {number[]} points + * @param {string[]} declarations + * @return {object} + */ +export function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) { + var index = 0 + var offset = 0 + var length = pseudo + var atrule = 0 + var property = 0 + var previous = 0 + var variable = 1 + var scanning = 1 + var ampersand = 1 + var parens = 0 + var character = 0 + var type = '' + var props = rules + var children = rulesets + var reference = rule + var characters = type + + while (scanning) + switch (previous = character, character = next()) { + // ( + case 40: + if (previous != 108 && charat(characters, length - 1) == 58) parens++, characters += '(' + else characters += delimit(character) + break + // ) + case 41: + parens--, characters += ')' + break + // " ' [ + case 34: case 39: case 91: + characters += delimit(character) + break + // \t \n \r \s + case 9: case 10: case 13: case 32: + if (parens > 0) { + characters += from(character) + break + } + characters += whitespace(previous) + break + // \ + case 92: + characters += escaping(caret() - 1, 7) + continue + // / + case 47: + switch (peek()) { + case 42: case 47: + append(comment(commenter(next(), caret()), root, parent, declarations), declarations) + if ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters) && substr(characters, -1, void 0) !== ' ') characters += ' ' + break + default: + characters += '/' + } + break + // { + case 123 * variable: + points[index++] = strlen(characters) * ampersand + // } ; \0 + case 125 * variable: case 59: case 0: + if (parens > 0 && character) { + characters += from(character) + break + } + switch (character) { + // \0 } + case 0: case 125: scanning = 0 + // ; + case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '') + if (property > 0 && (strlen(characters) - length || variable === 0)) + append(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations) + break + // @ ; + case 59: characters += ';' + // { rule/at-rule + default: + append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets) + + if (character === 123) + if (offset === 0) + parse(characters, root, reference, reference, props, rulesets, length, points, children) + else { + switch (atrule) { + // c(ontainer) + case 99: + if (charat(characters, 3) === 110) break + // l(ayer) + case 108: + if (charat(characters, 2) === 97) break + default: + offset = 0 + // d(ocument) m(edia) s(upports) + case 100: case 109: case 115: + } + if (offset) parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children) + else parse(characters, reference, reference, reference, [''], children, 0, points, children) + } + } + + index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo + break + // : + case 58: + length = 1 + strlen(characters), property = previous + default: + if (variable < 1) + if (character == 123) + --variable + else if (character == 125 && variable++ == 0 && prev() == 125) + continue + + switch (characters += from(character), character * variable) { + // & + case 38: + ampersand = offset > 0 ? 1 : (characters += '\f', -1) + break + // , + case 44: + if (parens > 0) break + points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1 + break + // @ + case 64: + // - + if (peek() === 45) + characters += delimit(next()) + + atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++ + break + // - + case 45: + if (previous === 45 && strlen(characters) == 2) + variable = 0 + } + } + + return rulesets +} + +/** + * @param {string} value + * @param {object} root + * @param {object?} parent + * @param {number} index + * @param {number} offset + * @param {string[]} rules + * @param {number[]} points + * @param {string} type + * @param {string[]} props + * @param {string[]} children + * @param {number} length + * @param {object[]} siblings + * @return {object} + */ +export function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) { + var post = offset - 1 + var rule = offset === 0 ? rules : [''] + var size = sizeof(rule) + + for (var i = 0, j = 0, k = 0; i < index; ++i) + for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) + if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x]))) + props[k++] = z + + return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings) +} + +/** + * @param {number} value + * @param {object} root + * @param {object?} parent + * @param {object[]} siblings + * @return {object} + */ +export function comment (value, root, parent, siblings) { + return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings) +} + +/** + * @param {string} value + * @param {object} root + * @param {object?} parent + * @param {number} length + * @param {object[]} siblings + * @return {object} + */ +export function declaration (value, root, parent, length, siblings) { + return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings) +} diff --git a/tools/ui/node_modules/stylis/src/Prefixer.js b/tools/ui/node_modules/stylis/src/Prefixer.js new file mode 100644 index 0000000000000000000000000000000000000000..f4667f3c7d7fca11d67565bb0db660171a2d8440 --- /dev/null +++ b/tools/ui/node_modules/stylis/src/Prefixer.js @@ -0,0 +1,148 @@ +import {MS, MOZ, WEBKIT} from './Enum.js' +import {hash, charat, strlen, indexof, replace, substr, match} from './Utility.js' + +/** + * @param {string} value + * @param {number} length + * @param {object[]} children + * @return {string} + */ +export function prefix (value, length, children) { + switch (hash(value, length)) { + // color-adjust + case 5103: + return WEBKIT + 'print-' + value + value + // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) + case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: + // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break + case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: + // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) + case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: + // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position + case 6391: case 5879: case 5623: case 6135: case 4599: + return WEBKIT + value + value + // mask-composite + case 4855: + return WEBKIT + value.replace('add', 'source-over').replace('substract', 'source-out').replace('intersect', 'source-in').replace('exclude', 'xor') + value + // tab-size + case 4789: + return MOZ + value + value + // appearance, user-select, transform, hyphens, text-size-adjust + case 5349: case 4246: case 4810: case 6968: case 2756: + return WEBKIT + value + MOZ + value + MS + value + value + // writing-mode + case 5936: + switch (charat(value, length + 11)) { + // vertical-l(r) + case 114: + return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value + // vertical-r(l) + case 108: + return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value + // horizontal(-)tb + case 45: + return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value + // default: fallthrough to below + } + // flex, flex-direction, scroll-snap-type, writing-mode + case 6828: case 4268: case 2903: + return WEBKIT + value + MS + value + value + // order + case 6165: + return WEBKIT + value + MS + 'flex-' + value + value + // align-items + case 5187: + return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value + // align-self + case 5443: + return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value + // align-content + case 4675: + return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value + // flex-shrink + case 5548: + return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value + // flex-basis + case 5292: + return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value + // flex-grow + case 6060: + return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value + // transition + case 4554: + return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value + // cursor + case 6187: + return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value + // background, background-image + case 5495: case 3959: + return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1') + // justify-content + case 4968: + return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /space-between/, 'justify') + WEBKIT + value + value + // justify-self + case 4200: + if (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value + break + // grid-template-(columns|rows) + case 2592: case 3360: + return MS + replace(value, 'template-', '') + value + // grid-(row|column)-start + case 4384: case 3616: + if (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\w+-end/) })) { + return ~indexof(value + (children = children[length].value), 'span') ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span') ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ';') + } + return MS + replace(value, '-start', '') + value + // grid-(row|column)-end + case 4896: case 4128: + return (children && children.some(function (element) { return match(element.props, /grid-\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value + // (margin|padding)-inline-(start|end) + case 4095: case 3583: case 4068: case 2532: + return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value + // (min|max)?(width|height|inline-size|block-size) + case 8116: case 7059: case 5753: case 5535: + case 5445: case 5701: case 4933: case 4677: + case 5533: case 5789: case 5021: case 4765: + // stretch, max-content, min-content, fill-available + if (strlen(value) - 1 - length > 6) + switch (charat(value, length + 1)) { + // (m)ax-content, (m)in-content + case 109: + // - + if (charat(value, length + 4) !== 45) + break + // (f)ill-available, (f)it-content + case 102: + return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value + // (s)tretch + case 115: + return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value + } + break + // grid-(column|row) + case 5152: case 5920: + return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value }) + // position: sticky + case 4949: + // stick(y)? + if (charat(value, length + 6) === 121) + return replace(value, ':', ':' + WEBKIT) + value + break + // display: (flex|inline-flex|grid|inline-grid) + case 6444: + switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) { + // (inline-)?fle(x) + case 120: + return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value + // (inline-)?gri(d) + case 100: + return replace(value, ':', ':' + MS) + value + } + break + // scroll-margin, scroll-margin-(top|right|bottom|left) + case 5719: case 2647: case 2135: case 3927: case 2391: + return replace(value, 'scroll-', 'scroll-snap-') + value + } + + return value +} diff --git a/tools/ui/node_modules/stylis/src/Serializer.js b/tools/ui/node_modules/stylis/src/Serializer.js new file mode 100644 index 0000000000000000000000000000000000000000..5b9f289a5afc17ac9bfac760f39c2fc66e7f8581 --- /dev/null +++ b/tools/ui/node_modules/stylis/src/Serializer.js @@ -0,0 +1,35 @@ +import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES, NAMESPACE} from './Enum.js' +import {strlen} from './Utility.js' + +/** + * @param {object[]} children + * @param {function} callback + * @return {string} + */ +export function serialize (children, callback) { + var output = '' + + for (var i = 0; i < children.length; i++) + output += callback(children[i], i, children, callback) || '' + + return output +} + +/** + * @param {object} element + * @param {number} index + * @param {object[]} children + * @param {function} callback + * @return {string} + */ +export function stringify (element, index, children, callback) { + switch (element.type) { + case LAYER: if (element.children.length) break + case IMPORT: case NAMESPACE: case DECLARATION: return element.return = element.return || element.value + case COMMENT: return '' + case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}' + case RULESET: if (!strlen(element.value = element.props.join(','))) return '' + } + + return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '' +} diff --git a/tools/ui/node_modules/stylis/src/Tokenizer.js b/tools/ui/node_modules/stylis/src/Tokenizer.js new file mode 100644 index 0000000000000000000000000000000000000000..201fb51bf8fc603d358f92787e26cdc0ece210ab --- /dev/null +++ b/tools/ui/node_modules/stylis/src/Tokenizer.js @@ -0,0 +1,257 @@ +import {from, trim, charat, strlen, substr, append, assign} from './Utility.js' + +export var line = 1 +export var column = 1 +export var length = 0 +export var position = 0 +export var character = 0 +export var characters = '' + +/** + * @param {string} value + * @param {object | null} root + * @param {object | null} parent + * @param {string} type + * @param {string[] | string} props + * @param {object[] | string} children + * @param {object[]} siblings + * @param {number} length + */ +export function node (value, root, parent, type, props, children, length, siblings) { + return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings} +} + +/** + * @param {object} root + * @param {object} props + * @return {object} + */ +export function copy (root, props) { + return assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props) +} + +/** + * @param {object} root + */ +export function lift (root) { + while (root.root) + root = copy(root.root, {children: [root]}) + + append(root, root.siblings) +} + +/** + * @return {number} + */ +export function char () { + return character +} + +/** + * @return {number} + */ +export function prev () { + character = position > 0 ? charat(characters, --position) : 0 + + if (column--, character === 10) + column = 1, line-- + + return character +} + +/** + * @return {number} + */ +export function next () { + character = position < length ? charat(characters, position++) : 0 + + if (column++, character === 10) + column = 1, line++ + + return character +} + +/** + * @return {number} + */ +export function peek () { + return charat(characters, position) +} + +/** + * @return {number} + */ +export function caret () { + return position +} + +/** + * @param {number} begin + * @param {number} end + * @return {string} + */ +export function slice (begin, end) { + return substr(characters, begin, end) +} + +/** + * @param {number} type + * @return {number} + */ +export function token (type) { + switch (type) { + // \0 \t \n \r \s whitespace token + case 0: case 9: case 10: case 13: case 32: + return 5 + // ! + , / > @ ~ isolate token + case 33: case 43: case 44: case 47: case 62: case 64: case 126: + // ; { } breakpoint token + case 59: case 123: case 125: + return 4 + // : accompanied token + case 58: + return 3 + // " ' ( [ opening delimit token + case 34: case 39: case 40: case 91: + return 2 + // ) ] closing delimit token + case 41: case 93: + return 1 + } + + return 0 +} + +/** + * @param {string} value + * @return {any[]} + */ +export function alloc (value) { + return line = column = 1, length = strlen(characters = value), position = 0, [] +} + +/** + * @param {any} value + * @return {any} + */ +export function dealloc (value) { + return characters = '', value +} + +/** + * @param {number} type + * @return {string} + */ +export function delimit (type) { + return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type))) +} + +/** + * @param {string} value + * @return {string[]} + */ +export function tokenize (value) { + return dealloc(tokenizer(alloc(value))) +} + +/** + * @param {number} type + * @return {string} + */ +export function whitespace (type) { + while (character = peek()) + if (character < 33) + next() + else + break + + return token(type) > 2 || token(character) > 3 ? '' : ' ' +} + +/** + * @param {string[]} children + * @return {string[]} + */ +export function tokenizer (children) { + while (next()) + switch (token(character)) { + case 0: append(identifier(position - 1), children) + break + case 2: append(delimit(character), children) + break + default: append(from(character), children) + } + + return children +} + +/** + * @param {number} index + * @param {number} count + * @return {string} + */ +export function escaping (index, count) { + while (--count && next()) + // not 0-9 A-F a-f + if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97)) + break + + return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32)) +} + +/** + * @param {number} type + * @return {number} + */ +export function delimiter (type) { + while (next()) + switch (character) { + // ] ) " ' + case type: + return position + // " ' + case 34: case 39: + if (type !== 34 && type !== 39) + delimiter(character) + break + // ( + case 40: + if (type === 41) + delimiter(type) + break + // \ + case 92: + next() + break + } + + return position +} + +/** + * @param {number} type + * @param {number} index + * @return {number} + */ +export function commenter (type, index) { + while (next()) + // // + if (type + character === 47 + 10) + break + // /* + else if (type + character === 42 + 42 && peek() === 47) + break + + return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next()) +} + +/** + * @param {number} index + * @return {string} + */ +export function identifier (index) { + while (!token(peek())) + next() + + return slice(index, position) +} diff --git a/tools/ui/node_modules/stylis/src/Utility.js b/tools/ui/node_modules/stylis/src/Utility.js new file mode 100644 index 0000000000000000000000000000000000000000..8357dbcaef6b02442f0104b3f3d3405819893331 --- /dev/null +++ b/tools/ui/node_modules/stylis/src/Utility.js @@ -0,0 +1,124 @@ +/** + * @param {number} + * @return {number} + */ +export var abs = Math.abs + +/** + * @param {number} + * @return {string} + */ +export var from = String.fromCharCode + +/** + * @param {object} + * @return {object} + */ +export var assign = Object.assign + +/** + * @param {string} value + * @param {number} length + * @return {number} + */ +export function hash (value, length) { + return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0 +} + +/** + * @param {string} value + * @return {string} + */ +export function trim (value) { + return value.trim() +} + +/** + * @param {string} value + * @param {RegExp} pattern + * @return {string?} + */ +export function match (value, pattern) { + return (value = pattern.exec(value)) ? value[0] : value +} + +/** + * @param {string} value + * @param {(string|RegExp)} pattern + * @param {string} replacement + * @return {string} + */ +export function replace (value, pattern, replacement) { + return value.replace(pattern, replacement) +} + +/** + * @param {string} value + * @param {string} search + * @return {number} + */ +export function indexof (value, search) { + return value.indexOf(search) +} + +/** + * @param {string} value + * @param {number} index + * @return {number} + */ +export function charat (value, index) { + return value.charCodeAt(index) | 0 +} + +/** + * @param {string} value + * @param {number} begin + * @param {number} end + * @return {string} + */ +export function substr (value, begin, end) { + return value.slice(begin, end) +} + +/** + * @param {string} value + * @return {number} + */ +export function strlen (value) { + return value.length +} + +/** + * @param {any[]} value + * @return {number} + */ +export function sizeof (value) { + return value.length +} + +/** + * @param {any} value + * @param {any[]} array + * @return {any} + */ +export function append (value, array) { + return array.push(value), value +} + +/** + * @param {string[]} array + * @param {function} callback + * @return {string} + */ +export function combine (array, callback) { + return array.map(callback).join('') +} + +/** + * @param {string[]} array + * @param {RegExp} pattern + * @return {string[]} + */ +export function filter (array, pattern) { + return array.filter(function (value) { return !match(value, pattern) }) +} diff --git a/tools/ui/node_modules/supports-color/browser.js b/tools/ui/node_modules/supports-color/browser.js new file mode 100644 index 0000000000000000000000000000000000000000..62afa3a7425dc6a1eeafd1333afc15d429c5d10d --- /dev/null +++ b/tools/ui/node_modules/supports-color/browser.js @@ -0,0 +1,5 @@ +'use strict'; +module.exports = { + stdout: false, + stderr: false +}; diff --git a/tools/ui/node_modules/supports-color/index.js b/tools/ui/node_modules/supports-color/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6fada390fb88d8e1dae3454216aa3995141a1785 --- /dev/null +++ b/tools/ui/node_modules/supports-color/index.js @@ -0,0 +1,135 @@ +'use strict'; +const os = require('os'); +const tty = require('tty'); +const hasFlag = require('has-flag'); + +const {env} = process; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false') || + hasFlag('color=never')) { + forceColor = 0; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = 1; +} + +if ('FORCE_COLOR' in env) { + if (env.FORCE_COLOR === 'true') { + forceColor = 1; + } else if (env.FORCE_COLOR === 'false') { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + } +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(haveStream, streamIsTTY) { + if (forceColor === 0) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (haveStream && !streamIsTTY && forceColor === undefined) { + return 0; + } + + const min = forceColor || 0; + + if (env.TERM === 'dumb') { + return min; + } + + if (process.platform === 'win32') { + // Windows 10 build 10586 is the first Windows release that supports 256 colors. + // Windows 10 build 14931 is the first release that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream, stream && stream.isTTY); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty.isatty(1))), + stderr: translateLevel(supportsColor(true, tty.isatty(2))) +}; diff --git a/tools/ui/node_modules/supports-color/license b/tools/ui/node_modules/supports-color/license new file mode 100644 index 0000000000000000000000000000000000000000..e7af2f77107d73046421ef56c4684cbfdd3c1e89 --- /dev/null +++ b/tools/ui/node_modules/supports-color/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/ui/node_modules/supports-color/package.json b/tools/ui/node_modules/supports-color/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f7182edcea2baa8778219d4aab2c0c1b21f1a30a --- /dev/null +++ b/tools/ui/node_modules/supports-color/package.json @@ -0,0 +1,53 @@ +{ + "name": "supports-color", + "version": "7.2.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js", + "browser.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "dependencies": { + "has-flag": "^4.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "import-fresh": "^3.0.0", + "xo": "^0.24.0" + }, + "browser": "browser.js" +} diff --git a/tools/ui/node_modules/supports-color/readme.md b/tools/ui/node_modules/supports-color/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..36542285863330887923979b4c00579738907d49 --- /dev/null +++ b/tools/ui/node_modules/supports-color/readme.md @@ -0,0 +1,76 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install supports-color +``` + + +## Usage + +```js +const supportsColor = require('supports-color'); + +if (supportsColor.stdout) { + console.log('Terminal stdout supports color'); +} + +if (supportsColor.stdout.has256) { + console.log('Terminal stdout supports 256 colors'); +} + +if (supportsColor.stderr.has16m) { + console.log('Terminal stderr supports 16 million colors (truecolor)'); +} +``` + + +## API + +Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. + +The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: + +- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) +- `.level = 2` and `.has256 = true`: 256 color support +- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) + + +## Info + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. + +Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +--- diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/.eslintrc b/tools/ui/node_modules/supports-preserve-symlinks-flag/.eslintrc new file mode 100644 index 0000000000000000000000000000000000000000..346ffeca87d3784723773d39f9e52b8c6d12f8c3 --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "rules": { + "id-length": "off", + }, +} diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml b/tools/ui/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..e8d64f37e5fc43885727dc3d086050af7dcc4bb1 --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/supports-preserve-symlink-flag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/.nycrc b/tools/ui/node_modules/supports-preserve-symlinks-flag/.nycrc new file mode 100644 index 0000000000000000000000000000000000000000..bdd626ce91477abbdd489b79988baebadbd3c897 --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/tools/ui/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..61f607f4894beba4e0693c72a6446bf3497bb318 --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-01-02 + +### Commits + +- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) +- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) +- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) +- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) +- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) +- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) +- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) +- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) +- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) +- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) +- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/LICENSE b/tools/ui/node_modules/supports-preserve-symlinks-flag/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2e7b9a3eacf263cb418f4c16b087290ef78c39b2 --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/README.md b/tools/ui/node_modules/supports-preserve-symlinks-flag/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eb05b124ca68ba0312c98834f282a2cd6ce568b5 --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/README.md @@ -0,0 +1,42 @@ +# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the current node version supports the `--preserve-symlinks` flag. + +## Example + +```js +var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); +var assert = require('assert'); + +assert.equal(supportsPreserveSymlinks, null); // in a browser +assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 +assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag +[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag +[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag +[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag +[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/browser.js b/tools/ui/node_modules/supports-preserve-symlinks-flag/browser.js new file mode 100644 index 0000000000000000000000000000000000000000..087be1fe9fda8930ca66a68204bd0112b9d8710b --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/browser.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = null; diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/index.js b/tools/ui/node_modules/supports-preserve-symlinks-flag/index.js new file mode 100644 index 0000000000000000000000000000000000000000..86fd5d331c4a4d44e9a92d46fbb637165cea78d5 --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/index.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = ( +// node 12+ + process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') +) || ( +// node v6.2 - v11 + String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle +); diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/package.json b/tools/ui/node_modules/supports-preserve-symlinks-flag/package.json new file mode 100644 index 0000000000000000000000000000000000000000..56edadcaad850fa1f348aeb0988e98d16eb14a84 --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/package.json @@ -0,0 +1,70 @@ +{ + "name": "supports-preserve-symlinks-flag", + "version": "1.0.0", + "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", + "main": "./index.js", + "browser": "./browser.js", + "exports": { + ".": [ + { + "browser": "./browser.js", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" + }, + "keywords": [ + "node", + "flag", + "symlink", + "symlinks", + "preserve-symlinks" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" + }, + "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.6.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.4.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/tools/ui/node_modules/supports-preserve-symlinks-flag/test/index.js b/tools/ui/node_modules/supports-preserve-symlinks-flag/test/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9938d671691790a75bacefc6100b39d6e4ab937a --- /dev/null +++ b/tools/ui/node_modules/supports-preserve-symlinks-flag/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); +var semver = require('semver'); + +var supportsPreserveSymlinks = require('../'); +var browser = require('../browser'); + +test('supportsPreserveSymlinks', function (t) { + t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean'); + + t.equal(browser, null, 'browser file is `null`'); + t.equal( + supportsPreserveSymlinks, + null, + 'in a browser, is null', + { skip: typeof window === 'undefined' } + ); + + var expected = semver.satisfies(process.version, '>= 6.2'); + t.equal( + supportsPreserveSymlinks, + expected, + 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')', + { skip: typeof window !== 'undefined' } + ); + + t.end(); +}); diff --git a/tools/ui/node_modules/svelte/LICENSE.md b/tools/ui/node_modules/svelte/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..f872adf738de278e2345516eb1cea30d5451914e --- /dev/null +++ b/tools/ui/node_modules/svelte/LICENSE.md @@ -0,0 +1,7 @@ +Copyright (c) 2016-2025 [Svelte Contributors](https://github.com/sveltejs/svelte/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/ui/node_modules/svelte/README.md b/tools/ui/node_modules/svelte/README.md new file mode 100644 index 0000000000000000000000000000000000000000..026bc0d81dc424c515ea8ba1e196847c0db6ae62 --- /dev/null +++ b/tools/ui/node_modules/svelte/README.md @@ -0,0 +1,41 @@ + + + + Svelte - web development for the rest of us + + + +[![npm version](https://img.shields.io/npm/v/svelte.svg)](https://www.npmjs.com/package/svelte) [![license](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat) + +## What is Svelte? + +Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient JavaScript that surgically updates the DOM. + +Learn more at the [Svelte website](https://svelte.dev), or stop by the [Discord chatroom](https://svelte.dev/chat). + +## Getting started + +You can play around with Svelte in the [tutorial](https://svelte.dev/tutorial), [examples](https://svelte.dev/examples), and [REPL](https://svelte.dev/repl). + +When you're ready to build a full-fledge application, we recommend using [SvelteKit](https://svelte.dev/docs/kit): + +```sh +npx sv create my-app +cd my-app +npm install +npm run dev +``` + +See [the SvelteKit documentation](https://svelte.dev/docs/kit) to learn more. + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md). + +## Supporting Svelte + +Svelte is an MIT-licensed open source project with its ongoing development made possible entirely by fantastic volunteers. If you'd like to support their efforts, please consider: + +- [Becoming a backer on Open Collective](https://opencollective.com/svelte). + +Funds donated via Open Collective will be used for compensating expenses related to Svelte's development. diff --git a/tools/ui/node_modules/svelte/action.d.ts b/tools/ui/node_modules/svelte/action.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1a0ce52237a73130684888d5d2963e6e65d6b31 --- /dev/null +++ b/tools/ui/node_modules/svelte/action.d.ts @@ -0,0 +1 @@ +import './types/index.js'; diff --git a/tools/ui/node_modules/svelte/animate.d.ts b/tools/ui/node_modules/svelte/animate.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1a0ce52237a73130684888d5d2963e6e65d6b31 --- /dev/null +++ b/tools/ui/node_modules/svelte/animate.d.ts @@ -0,0 +1 @@ +import './types/index.js'; diff --git a/tools/ui/node_modules/svelte/compiler.d.ts b/tools/ui/node_modules/svelte/compiler.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1a0ce52237a73130684888d5d2963e6e65d6b31 --- /dev/null +++ b/tools/ui/node_modules/svelte/compiler.d.ts @@ -0,0 +1 @@ +import './types/index.js'; diff --git a/tools/ui/node_modules/svelte/compiler/index.js b/tools/ui/node_modules/svelte/compiler/index.js new file mode 100644 index 0000000000000000000000000000000000000000..65da75ae599bfdbcea75c332019850430c463ce1 --- /dev/null +++ b/tools/ui/node_modules/svelte/compiler/index.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).svelte={})}(this,(function(e){"use strict";function t(e,t,s){const r=s._;let a=!1;function i(e,{next:t,state:n}){t(n)}return function e(t,o,l){if(a)return;if(!t.type)return;let c;const p={},u={path:o,state:l,next:(s=l)=>{o.push(t);for(const n in t){if("type"===n)continue;const r=t[n];if(r&&"object"==typeof r)if(Array.isArray(r)){const t={};r.forEach(((n,r)=>{if(n&&"object"==typeof n){const a=e(n,o,s);a&&(t[r]=a)}})),Object.keys(t).length>0&&(p[n]=r.map(((e,n)=>t[n]??e)))}else{const t=e(r,o,s);t&&(p[n]=t)}}if(o.pop(),Object.keys(p).length>0)return n(t,p)},stop:()=>{a=!0},visit:(n,s=l)=>{o.push(t);const r=e(n,o,s)??n;return o.pop(),r}};let d=s[t.type]??i;if(r){let e;c=r(t,{...u,next:(n=l)=>(l=n,e=d(t,{...u,state:n}),e)}),!c&&e&&(c=e)}else c=d(t,u);return c||Object.keys(p).length>0&&(c=n(t,p)),c||void 0}(e,[],t)??e}function n(e,t){const n={},s=Object.getOwnPropertyDescriptors(e);for(const e in s)Object.defineProperty(n,e,s[e]);for(const e in t)n[e]=t[e];return n}const s=/\s+/,r=/^\r?\n/,a=/^\s/,i=/^[ \t\r\n]+/,o=/\s$/,l=/[ \t\r\n]+$/,c=/[^ \t\r\n]/,p=/[ \t\n\r\f]+/g,u=/^[ \t\n\r\f]+$/,d=/[^\n]/g,h=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/,m=/(^[^a-zA-Z_$]|[^a-zA-Z0-9_$])/g,f=/^[aeiou]/,y=/^h[1-6]$/,v=/(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/,g=/[\u202a\u202b\u202c\u202d\u202e\u2066\u2067\u2068\u2069]+/g,b=/^\W*javascript:/i,_=/\b(image|picture|photo)\b/i,x=1,w=2,k=4,C=8,S=16,P=4,E=8,T=1,A=2,$=4,R="http://www.w3.org/2000/svg",I="http://www.w3.org/1998/Math/MathML";function M(e,t){if(0===t.length)return null;const n=new D(t).get(e);return n&&n[0][0]>.7?n[0][1]:null}function q(e,t){if(null===e&&null===t)throw"Trying to compare two null values";if(null===e||null===t)return 0;const n=function(e,t){const n=[];let s=0;for(let r=0;r<=t.length;r++)for(let a=0;a<=e.length;a++){let i;i=r&&a?e.charAt(a-1)===t.charAt(r-1)?s:Math.min(n[a],n[a-1],s)+1:r+a,s=n[a],n[a]=i}return n.pop()}(e=String(e),t=String(t));return 1-n/Math.max(e.length,t.length)}const L=/[^\w, ]+/;function O(e,t=2){const n={},s=function(e,t=2){const n="-"+e.toLowerCase().replace(L,"")+"-",s=t-n.length,r=[];if(s>0)for(let t=0;t=2;--t){const n=this.__get(e,t);if(n.length>0)return n}return null}__get(e,t){const n=e.toLowerCase(),s={},r=O(n,t),a=this.items[t];let i,o,l,c,p,u=0;for(i in r)if(o=r[i],u+=Math.pow(o,2),i in this.match_dict)for(l=0;l{const n=r+e.length+1,s={start:r,end:n,line:t};return r=n,s}));let i=0;return function(t,r){if("string"==typeof t&&(t=e.indexOf(t,r??0)),-1===t)return;let o=a[i];const l=t>=o.end?1:-1;for(;o;){if(j(o,t))return{line:n+o.line,column:s+t-o.start,character:t};i+=l,o=a[i]}}}const F=/\r/g;function V(e){let t=5381,n=(e=e.replace(F,"")).length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return(t>>>0).toString(36)}const H=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function U(e){return H.includes(e)||"!doctype"===e.toLowerCase()}const z=["arguments","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"];function W(e){return z.includes(e)}const G=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];const K=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];function X(e){return K.includes(e)}const Q={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};const Y=[...K,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];const J=["autofocus","muted","defaultValue","defaultChecked"];function Z(e){return J.includes(e)}const ee=["touchstart","touchmove"];const te=["textContent","innerHTML","innerText"];function ne(e){return te.includes(e)}const se=["body","embed","iframe","img","link","object","script","style","track"];function re(e){return se.includes(e)}const ae=["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hatch","hatchpath","hkern","image","line","linearGradient","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tref","tspan","unknown","use","view","vkern"];function ie(e){return ae.includes(e)}const oe=["annotation","annotation-xml","maction","math","merror","mfrac","mi","mmultiscripts","mn","mo","mover","mpadded","mphantom","mprescripts","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msubsup","msup","mtable","mtd","mtext","mtr","munder","munderover","semantics"];function le(e){return oe.includes(e)}const ce=["$state","$state.raw","$derived","$derived.by"],pe=[...ce,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function ue(e){return pe.includes(e)}const de=/^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\-_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*)?$/u;let he,me=[];const fe="(unknown)";let ye,ve,ge,be,_e="",xe=[],we=!1;function ke(e){ye=e,xe=ye.split("\n");const t=B(ye,{offsetLine:1});ge=e=>{const n=t(e);if(!n)throw new Error("An impossible situation occurred");return n}}function Ce(e){const t=ge(e.start);return`${n=he,n?.replace(/\//g,"/​")}:${t?.line}:${t.column}`;var n}let Se=[],Pe=new Map,Ee=null;function Te(e,t){return ve&&!!Pe.get(e)?.some((e=>e.has(t)))}function Ae(e){ve=!1,we=!1,_e=fe,ye="",xe=[],he=(e.filename??fe).replace(/\\/g,"/"),be=e.warning??(()=>!0),me=[]}function $e(e){const t=e.rootDir?.replace(/\\/g,"/");ve=e.dev,we=e.runes,_e=e.component_name??fe,"string"==typeof t&&he.startsWith(t)&&(he=he.replace(t,"").replace(/^[/\\]/,"")),Se=[],Pe.clear(),Ee=null}const Re=/^\t+/;function Ie(e){return e.replace(Re,(e=>e.split("\t").join(" ")))}class Me{name="CompileDiagnostic";constructor(e,t,n){this.code=e,this.message=t,he!==fe&&(this.filename=he),n&&(this.position=n,this.start=ge(n[0]),this.end=ge(n[1]),this.start&&this.end&&(this.frame=function(e,t){const n=xe,s=Math.max(0,e-2),r=Math.min(e+3,n.length),a=String(r+1).length;return n.slice(s,r).map(((n,r)=>{const i=s+r===e,o=String(r+s+1).padStart(a," ");if(i){const e=" ".repeat(a+2+Ie(n.slice(0,t)).length)+"^";return`${o}: ${Ie(n)}\n${e}`}return`${o}: ${Ie(n)}`})).join("\n")}(this.start.line-1,this.end.column)))}toString(){let e=`${this.code}: ${this.message}`;return this.filename&&(e+=`\n${this.filename}`,this.start&&(e+=`:${this.start.line}:${this.start.column}`)),this.frame&&(e+=`\n${this.frame}`),e}toJSON(){return{code:this.code,message:this.message,filename:this.filename,start:this.start,end:this.end,position:this.position,frame:this.frame}}}class qe extends Me{name="CompileWarning";constructor(e,t,n){super(e,t,n)}}function Le(e,t,n){let s=Se;if(e&&(s=Pe.get(e)??Se),s&&s.at(-1)?.has(t))return;const r=new qe(t,n,e&&void 0!==e.start?[e.start,e.end??e.start]:void 0);be(r)&&me.push(r)}function Oe(e){Le(e,"a11y_accesskey","Avoid using accesskey\nhttps://svelte.dev/e/a11y_accesskey")}function Ne(e){Le(e,"a11y_aria_activedescendant_has_tabindex","An element with an aria-activedescendant attribute should have a tabindex value\nhttps://svelte.dev/e/a11y_aria_activedescendant_has_tabindex")}function De(e,t){Le(e,"a11y_aria_attributes",`\`<${t}>\` should not have aria-* attributes\nhttps://svelte.dev/e/a11y_aria_attributes`)}function je(e){Le(e,"a11y_autofocus","Avoid using autofocus\nhttps://svelte.dev/e/a11y_autofocus")}function Be(e,t){Le(e,"a11y_hidden",`\`<${t}>\` element should not be hidden\nhttps://svelte.dev/e/a11y_hidden`)}function Fe(e,t,n){Le(e,"a11y_incorrect_aria_attribute_type",`The value of '${t}' must be a ${n}\nhttps://svelte.dev/e/a11y_incorrect_aria_attribute_type`)}function Ve(e,t){Le(e,"a11y_interactive_supports_focus",`Elements with the '${t}' interactive role must have a tabindex value\nhttps://svelte.dev/e/a11y_interactive_supports_focus`)}function He(e,t){Le(e,"a11y_misplaced_role",`\`<${t}>\` should not have role attribute\nhttps://svelte.dev/e/a11y_misplaced_role`)}function Ue(e){Le(e,"a11y_misplaced_scope","The scope attribute should only be used with `` elements\nhttps://svelte.dev/e/a11y_misplaced_scope")}function ze(e,t,n){Le(e,"a11y_mouse_events_have_key_events",`'${t}' event must be accompanied by '${n}' event\nhttps://svelte.dev/e/a11y_mouse_events_have_key_events`)}function We(e,t){Le(e,"a11y_no_abstract_role",`Abstract role '${t}' is forbidden\nhttps://svelte.dev/e/a11y_no_abstract_role`)}function Ge(e,t,n){Le(e,"a11y_no_interactive_element_to_noninteractive_role",`\`<${t}>\` cannot have role '${n}'\nhttps://svelte.dev/e/a11y_no_interactive_element_to_noninteractive_role`)}function Ke(e,t,n){Le(e,"a11y_no_noninteractive_element_to_interactive_role",`Non-interactive element \`<${t}>\` cannot have interactive role '${n}'\nhttps://svelte.dev/e/a11y_no_noninteractive_element_to_interactive_role`)}function Xe(e,t){Le(e,"a11y_no_redundant_roles",`Redundant role '${t}'\nhttps://svelte.dev/e/a11y_no_redundant_roles`)}function Qe(e){Le(e,"a11y_positive_tabindex","Avoid tabindex values above zero\nhttps://svelte.dev/e/a11y_positive_tabindex")}function Ye(e,t,n){Le(e,"a11y_role_has_required_aria_props",`Elements with the ARIA role "${t}" must have the following attributes defined: ${n}\nhttps://svelte.dev/e/a11y_role_has_required_aria_props`)}function Je(e,t,n){Le(e,"a11y_role_supports_aria_props",`The attribute '${t}' is not supported by the role '${n}'\nhttps://svelte.dev/e/a11y_role_supports_aria_props`)}function Ze(e,t,n,s){Le(e,"a11y_role_supports_aria_props_implicit",`The attribute '${t}' is not supported by the role '${n}'. This role is implicit on the element \`<${s}>\`\nhttps://svelte.dev/e/a11y_role_supports_aria_props_implicit`)}function et(e,t,n){Le(e,"a11y_unknown_aria_attribute",(n?`Unknown aria attribute 'aria-${t}'. Did you mean '${n}'?`:`Unknown aria attribute 'aria-${t}'`)+"\nhttps://svelte.dev/e/a11y_unknown_aria_attribute")}function tt(e,t,n){Le(e,"a11y_unknown_role",(n?`Unknown role '${t}'. Did you mean '${n}'?`:`Unknown role '${t}'`)+"\nhttps://svelte.dev/e/a11y_unknown_role")}function nt(e){Le(e,"bidirectional_control_characters","A bidirectional control character was detected in your code. These characters can be used to alter the visual direction of your code and could have unintended consequences\nhttps://svelte.dev/e/bidirectional_control_characters")}function st(e,t,n){Le(e,"legacy_code",`\`${t}\` is no longer valid — please use \`${n}\` instead\nhttps://svelte.dev/e/legacy_code`)}function rt(e,t,n){Le(e,"unknown_code",(n?`\`${t}\` is not a recognised code (did you mean \`${n}\`?)`:`\`${t}\` is not a recognised code`)+"\nhttps://svelte.dev/e/unknown_code")}function at(e){Le(e,"options_deprecated_accessors","The `accessors` option has been deprecated. It will have no effect in runes mode\nhttps://svelte.dev/e/options_deprecated_accessors")}function it(e){Le(e,"options_deprecated_immutable","The `immutable` option has been deprecated. It will have no effect in runes mode\nhttps://svelte.dev/e/options_deprecated_immutable")}function ot(e){Le(e,"options_missing_custom_element","The `customElement` option is used when generating a custom element. Did you forget the `customElement: true` compile option?\nhttps://svelte.dev/e/options_missing_custom_element")}function lt(e){Le(e,"options_renamed_ssr_dom",'`generate: "dom"` and `generate: "ssr"` options have been renamed to "client" and "server" respectively\nhttps://svelte.dev/e/options_renamed_ssr_dom')}function ct(e,t){Le(e,"export_let_unused",`Component has unused export property '${t}'. If it is for external reference only, please consider using \`export const ${t}\`\nhttps://svelte.dev/e/export_let_unused`)}function pt(e,t){Le(e,"non_reactive_update",`\`${t}\` is updated, but is not declared with \`$state(...)\`. Changing its value will not correctly trigger updates\nhttps://svelte.dev/e/non_reactive_update`)}function ut(e,t){Le(e,"store_rune_conflict",`It looks like you're using the \`$${t}\` rune, but there is a local binding called \`${t}\`. Referencing a local variable with a \`$\` prefix will create a store subscription. Please rename \`${t}\` to avoid the ambiguity\nhttps://svelte.dev/e/store_rune_conflict`)}function dt(e){Le(e,"attribute_avoid_is",'The "is" attribute is not supported cross-browser and should be avoided\nhttps://svelte.dev/e/attribute_avoid_is')}function ht(e,t){Le(e,"attribute_global_event_reference",`You are referencing \`globalThis.${t}\`. Did you forget to declare a variable with that name?\nhttps://svelte.dev/e/attribute_global_event_reference`)}function mt(e,t,n){Le(e,"attribute_invalid_property_name",`'${t}' is not a valid HTML attribute. Did you mean '${n}'?\nhttps://svelte.dev/e/attribute_invalid_property_name`)}function ft(e,t,n){Le(e,"element_implicitly_closed",`This element is implicitly closed by the following \`${t}\`, which can cause an unexpected DOM structure. Add an explicit \`${n}\` to avoid surprises.\nhttps://svelte.dev/e/element_implicitly_closed`)}function yt(e,t){Le(e,"node_invalid_placement_ssr",`${t}. When rendering this component on the server, the resulting HTML will be modified by the browser (by moving, removing, or inserting elements), likely resulting in a \`hydration_mismatch\` warning\nhttps://svelte.dev/e/node_invalid_placement_ssr`)}function vt(e){Le(e,"script_unknown_attribute","Unrecognised attribute — should be one of `generics`, `lang` or `module`. If this exists for a preprocessor, ensure that the preprocessor removes it\nhttps://svelte.dev/e/script_unknown_attribute")}const gt=/^\s*svelte-ignore\s/,bt={"non-top-level-reactive-declaration":"reactive_declaration_invalid_placement","module-script-reactive-declaration":"reactive_declaration_module_script","empty-block":"block_empty","avoid-is":"attribute_avoid_is","invalid-html-attribute":"attribute_invalid_property_name","a11y-structure":"a11y_figcaption_parent","illegal-attribute-character":"attribute_illegal_colon","invalid-rest-eachblock-binding":"bind_invalid_each_rest","unused-export-let":"export_let_unused"},_t=["a11y_accesskey","a11y_aria_activedescendant_has_tabindex","a11y_aria_attributes","a11y_autocomplete_valid","a11y_autofocus","a11y_click_events_have_key_events","a11y_consider_explicit_label","a11y_distracting_elements","a11y_figcaption_index","a11y_figcaption_parent","a11y_hidden","a11y_img_redundant_alt","a11y_incorrect_aria_attribute_type","a11y_incorrect_aria_attribute_type_boolean","a11y_incorrect_aria_attribute_type_id","a11y_incorrect_aria_attribute_type_idlist","a11y_incorrect_aria_attribute_type_integer","a11y_incorrect_aria_attribute_type_token","a11y_incorrect_aria_attribute_type_tokenlist","a11y_incorrect_aria_attribute_type_tristate","a11y_interactive_supports_focus","a11y_invalid_attribute","a11y_label_has_associated_control","a11y_media_has_caption","a11y_misplaced_role","a11y_misplaced_scope","a11y_missing_attribute","a11y_missing_content","a11y_mouse_events_have_key_events","a11y_no_abstract_role","a11y_no_interactive_element_to_noninteractive_role","a11y_no_noninteractive_element_interactions","a11y_no_noninteractive_element_to_interactive_role","a11y_no_noninteractive_tabindex","a11y_no_redundant_roles","a11y_no_static_element_interactions","a11y_positive_tabindex","a11y_role_has_required_aria_props","a11y_role_supports_aria_props","a11y_role_supports_aria_props_implicit","a11y_unknown_aria_attribute","a11y_unknown_role","bidirectional_control_characters","legacy_code","unknown_code","options_deprecated_accessors","options_deprecated_immutable","options_missing_custom_element","options_removed_enable_sourcemap","options_removed_hydratable","options_removed_loop_guard_timeout","options_renamed_ssr_dom","custom_element_props_identifier","export_let_unused","legacy_component_creation","non_reactive_update","perf_avoid_inline_class","perf_avoid_nested_class","reactive_declaration_invalid_placement","reactive_declaration_module_script_dependency","state_referenced_locally","store_rune_conflict","css_unused_selector","attribute_avoid_is","attribute_global_event_reference","attribute_illegal_colon","attribute_invalid_property_name","attribute_quoted","bind_invalid_each_rest","block_empty","component_name_lowercase","element_implicitly_closed","element_invalid_self_closing_tag","event_directive_deprecated","node_invalid_placement_ssr","script_context_deprecated","script_unknown_attribute","slot_element_deprecated","svelte_component_deprecated","svelte_element_invalid_this","svelte_self_deprecated"].concat(["await_waterfall","await_reactivity_loss","state_snapshot_uncloneable","binding_property_non_reactive","hydration_attribute_changed","hydration_html_changed","ownership_invalid_binding","ownership_invalid_mutation"]);function xt(e,t,n){const s=gt.exec(t);if(!s)return[];let r=s[0].length;e+=r;const a=[];if(n)for(const n of t.slice(r).matchAll(/([\w$-]+)(,)?/gm)){const t=n[1];if(_t.includes(t))a.push(t);else{const s=bt[t]??t.replace(/-/g,"_"),r=e+n.index,a=r+t.length;if(_t.includes(s))st({start:r,end:a},t,s);else{rt({start:r,end:a},t,M(t,_t))}}if(!n[2])break}else for(const e of t.slice(r).matchAll(/[\w$-]+/gm)){const t=e[0];if(a.push(t),!_t.includes(t)){const e=bt[t]??t.replace(/-/g,"_");_t.includes(e)&&a.push(e)}}return a}function wt(e){const t=gt.exec(e);if(!t)return e;const n=t[0].length;return e.substring(0,n)+e.substring(n).replace(/\w+-\w+(-\w+)*/g,((t,s,r)=>{let a=bt[t]??t.replace(/-/g,"_");return/\w+-\w+/.test(e.substring(n+r+t.length))&&(a+=","),a}))}function kt(e){const t=e.at(0),n=e.at(-1);"Text"===t?.type&&(c.test(t.data)?t.data=t.data.replace(i,""):e.shift()),"Text"===n?.type&&(c.test(n.data)?n.data=n.data.replace(l,""):e.pop())}var Ct=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],St=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Pt="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Et={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Tt="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",At={5:Tt,"5module":Tt+" export import",6:Tt+" const class extends export import super"},$t=/^in(stanceof)?$/,Rt=new RegExp("["+Pt+"]"),It=new RegExp("["+Pt+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function Mt(e,t){for(var n=65536,s=0;se)return!1;if((n+=t[s+1])>=e)return!0}return!1}function qt(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Rt.test(String.fromCharCode(e)):!1!==t&&Mt(e,St)))}function Lt(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&It.test(String.fromCharCode(e)):!1!==t&&(Mt(e,St)||Mt(e,Ct)))))}var Ot=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function Nt(e,t){return new Ot(e,{beforeExpr:!0,binop:t})}var Dt={beforeExpr:!0},jt={startsExpr:!0},Bt={};function Ft(e,t){return void 0===t&&(t={}),t.keyword=e,Bt[e]=new Ot(e,t)}var Vt={num:new Ot("num",jt),regexp:new Ot("regexp",jt),string:new Ot("string",jt),name:new Ot("name",jt),privateId:new Ot("privateId",jt),eof:new Ot("eof"),bracketL:new Ot("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Ot("]"),braceL:new Ot("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Ot("}"),parenL:new Ot("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Ot(")"),comma:new Ot(",",Dt),semi:new Ot(";",Dt),colon:new Ot(":",Dt),dot:new Ot("."),question:new Ot("?",Dt),questionDot:new Ot("?."),arrow:new Ot("=>",Dt),template:new Ot("template"),invalidTemplate:new Ot("invalidTemplate"),ellipsis:new Ot("...",Dt),backQuote:new Ot("`",jt),dollarBraceL:new Ot("${",{beforeExpr:!0,startsExpr:!0}),eq:new Ot("=",{beforeExpr:!0,isAssign:!0}),assign:new Ot("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Ot("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Ot("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Nt("||",1),logicalAND:Nt("&&",2),bitwiseOR:Nt("|",3),bitwiseXOR:Nt("^",4),bitwiseAND:Nt("&",5),equality:Nt("==/!=/===/!==",6),relational:Nt("/<=/>=",7),bitShift:Nt("<>/>>>",8),plusMin:new Ot("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Nt("%",10),star:Nt("*",10),slash:Nt("/",10),starstar:new Ot("**",{beforeExpr:!0}),coalesce:Nt("??",1),_break:Ft("break"),_case:Ft("case",Dt),_catch:Ft("catch"),_continue:Ft("continue"),_debugger:Ft("debugger"),_default:Ft("default",Dt),_do:Ft("do",{isLoop:!0,beforeExpr:!0}),_else:Ft("else",Dt),_finally:Ft("finally"),_for:Ft("for",{isLoop:!0}),_function:Ft("function",jt),_if:Ft("if"),_return:Ft("return",Dt),_switch:Ft("switch"),_throw:Ft("throw",Dt),_try:Ft("try"),_var:Ft("var"),_const:Ft("const"),_while:Ft("while",{isLoop:!0}),_with:Ft("with"),_new:Ft("new",{beforeExpr:!0,startsExpr:!0}),_this:Ft("this",jt),_super:Ft("super",jt),_class:Ft("class",jt),_extends:Ft("extends",Dt),_export:Ft("export"),_import:Ft("import",jt),_null:Ft("null",jt),_true:Ft("true",jt),_false:Ft("false",jt),_in:Ft("in",{beforeExpr:!0,binop:7}),_instanceof:Ft("instanceof",{beforeExpr:!0,binop:7}),_typeof:Ft("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Ft("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Ft("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ht=/\r\n?|\n|\u2028|\u2029/,Ut=new RegExp(Ht.source,"g");function zt(e){return 10===e||13===e||8232===e||8233===e}function Wt(e,t,n){void 0===n&&(n=e.length);for(var s=t;s>10),56320+(1023&e)))}var sn=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,rn=function(e,t){this.line=e,this.column=t};rn.prototype.offset=function(e){return new rn(this.line,this.column+e)};var an=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function on(e,t){for(var n=1,s=0;;){var r=Wt(e,s,t);if(r<0)return new rn(n,t-s);++n,s=r}}var ln={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},cn=!1;function pn(e){var t={};for(var n in ln)t[n]=e&&Jt(e,n)?e[n]:ln[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!cn&&"object"==typeof console&&console.warn&&(cn=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),Zt(t.onToken)){var s=t.onToken;t.onToken=function(e){return s.push(e)}}if(Zt(t.onComment)&&(t.onComment=function(e,t){return function(n,s,r,a,i,o){var l={type:n?"Block":"Line",value:s,start:r,end:a};e.locations&&(l.loc=new an(this,i,o)),e.ranges&&(l.range=[r,a]),t.push(l)}}(t,t.onComment)),"commonjs"===t.sourceType&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}var un=256,dn=259;function hn(e,t){return 2|(e?4:0)|(t?8:0)}var mn=function(e,t,n){this.options=e=pn(e),this.sourceFile=e.sourceFile,this.keywords=tn(At[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var s="";!0!==e.allowReserved&&(s=Et[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(s+=" await")),this.reservedWords=tn(s);var r=(s?s+" ":"")+Et.strict;this.reservedWordsStrict=tn(r),this.reservedWordsStrictBind=tn(r+" "+Et.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Ht).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=Vt.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?2:1),this.regexpState=null,this.privateNameStack=[]},fn={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};mn.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},fn.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},fn.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},fn.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},fn.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},fn.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},fn.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},fn.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},fn.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},fn.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t||2&t&&!(16&t))return!0}return!1},fn.allowUsing.get=function(){var e=this.currentScope().flags;return!(1024&e)&&!(!this.inModule&&1&e)},fn.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&un)>0},mn.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,s=0;s=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(s+1))}e+=t[0].length,Kt.lastIndex=e,e+=Kt.exec(this.input)[0].length,";"===this.input[e]&&e++}},yn.eat=function(e){return this.type===e&&(this.next(),!0)},yn.isContextual=function(e){return this.type===Vt.name&&this.value===e&&!this.containsEsc},yn.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},yn.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},yn.canInsertSemicolon=function(){return this.type===Vt.eof||this.type===Vt.braceR||Ht.test(this.input.slice(this.lastTokEnd,this.start))},yn.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},yn.semicolon=function(){this.eat(Vt.semi)||this.insertSemicolon()||this.unexpected()},yn.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},yn.expect=function(e){this.eat(e)||this.unexpected()},yn.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var gn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};yn.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},yn.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,s=e.doubleProto;if(!t)return n>=0||s>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")},yn.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case Vt._class:return e&&this.unexpected(),this.parseClass(a,!0);case Vt._if:return this.parseIfStatement(a);case Vt._return:return this.parseReturnStatement(a);case Vt._switch:return this.parseSwitchStatement(a);case Vt._throw:return this.parseThrowStatement(a);case Vt._try:return this.parseTryStatement(a);case Vt._const:case Vt._var:return s=s||this.value,e&&"var"!==s&&this.unexpected(),this.parseVarStatement(a,s);case Vt._while:return this.parseWhileStatement(a);case Vt._with:return this.parseWithStatement(a);case Vt.braceL:return this.parseBlock(!0,a);case Vt.semi:return this.parseEmptyStatement(a);case Vt._export:case Vt._import:if(this.options.ecmaVersion>10&&r===Vt._import){Kt.lastIndex=this.pos;var i=Kt.exec(this.input),o=this.pos+i[0].length,l=this.input.charCodeAt(o);if(40===l||46===l)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===Vt._import?this.parseImport(a):this.parseExport(a,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e);var c=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(c)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),"await using"===c&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(a,!1,c),this.semicolon(),this.finishNode(a,"VariableDeclaration");var p=this.value,u=this.parseExpression();return r===Vt.name&&"Identifier"===u.type&&this.eat(Vt.colon)?this.parseLabeledStatement(a,p,u,e):this.parseExpressionStatement(a,u)}},bn.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(Vt.semi)||this.insertSemicolon()?e.label=null:this.type!==Vt.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s=6?this.eat(Vt.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},bn.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(_n),this.enterScope(0),this.expect(Vt.parenL),this.type===Vt.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===Vt._var||this.type===Vt._const||n){var s=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(e,s,t)}var a=this.isContextual("let"),i=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var l=this.startNode();return this.next(),"await using"===o&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(l,!0,o),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var c=this.containsEsc,p=new gn,u=this.start,d=t>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);return this.type===Vt._in||(i=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===Vt._in&&this.unexpected(t),e.await=!0):i&&this.options.ecmaVersion>=8&&(d.start!==u||c||"Identifier"!==d.type||"async"!==d.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),a&&i&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,p),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(p,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))},bn.parseForAfterInit=function(e,t,n){return(this.type===Vt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===Vt._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},bn.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,kn|(n?0:Cn),!1,t)},bn.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(Vt._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},bn.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(Vt.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},bn.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(Vt.braceL),this.labels.push(xn),this.enterScope(1024);for(var n=!1;this.type!==Vt.braceR;)if(this.type===Vt._case||this.type===Vt._default){var s=this.type===Vt._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(Vt.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},bn.parseThrowStatement=function(e){return this.next(),Ht.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var wn=[];bn.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(Vt.parenR),e},bn.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===Vt._catch){var t=this.startNode();this.next(),this.eat(Vt.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(Vt._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},bn.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},bn.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(_n),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},bn.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},bn.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},bn.parseLabeledStatement=function(e,t,n,s){for(var r=0,a=this.labels;r=0;o--){var l=this.labels[o];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=i}return this.labels.push({name:t,kind:i,statementStart:this.start}),e.body=this.parseStatement(s?-1===s.indexOf("label")?s+"label":s:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},bn.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},bn.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(Vt.braceL),e&&this.enterScope(0);this.type!==Vt.braceR;){var s=this.parseStatement(null);t.body.push(s)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},bn.parseFor=function(e,t){return e.init=t,this.expect(Vt.semi),e.test=this.type===Vt.semi?null:this.parseExpression(),this.expect(Vt.semi),e.update=this.type===Vt.parenR?null:this.parseExpression(),this.expect(Vt.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},bn.parseForIn=function(e,t){var n=this.type===Vt._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(Vt.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},bn.parseVar=function(e,t,n,s){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(Vt.eq)?r.init=this.parseMaybeAssign(t):s||"const"!==n||this.type===Vt._in||this.options.ecmaVersion>=6&&this.isContextual("of")?s||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===Vt._in||this.isContextual("of")?s||"Identifier"===r.id.type||t&&(this.type===Vt._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(Vt.comma))break}return e},bn.parseVarId=function(e,t){e.id="using"===t||"await using"===t?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var kn=1,Cn=2;function Sn(e,t){var n=t.key.name,s=e[n],r="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(r=(t.static?"s":"i")+t.kind),"iget"===s&&"iset"===r||"iset"===s&&"iget"===r||"sget"===s&&"sset"===r||"sset"===s&&"sget"===r?(e[n]="true",!1):!!s||(e[n]=r,!1)}function Pn(e,t){var n=e.computed,s=e.key;return!n&&("Identifier"===s.type&&s.name===t||"Literal"===s.type&&s.value===t)}bn.parseFunction=function(e,t,n,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===Vt.star&&t&Cn&&this.unexpected(),e.generator=this.eat(Vt.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&kn&&(e.id=4&t&&this.type!==Vt.name?null:this.parseIdent(),!e.id||t&Cn||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,i=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(hn(e.async,e.generator)),t&kn||(e.id=this.type===Vt.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,r),this.yieldPos=a,this.awaitPos=i,this.awaitIdentPos=o,this.finishNode(e,t&kn?"FunctionDeclaration":"FunctionExpression")},bn.parseFunctionParams=function(e){this.expect(Vt.parenL),e.params=this.parseBindingList(Vt.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},bn.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),a=!1;for(r.body=[],this.expect(Vt.braceL);this.type!==Vt.braceR;){var i=this.parseClassElement(null!==e.superClass);i&&(r.body.push(i),"MethodDefinition"===i.type&&"constructor"===i.kind?(a&&this.raiseRecoverable(i.start,"Duplicate constructor in the same class"),a=!0):i.key&&"PrivateIdentifier"===i.key.type&&Sn(s,i)&&this.raiseRecoverable(i.key.start,"Identifier '#"+i.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},bn.parseClassElement=function(e){if(this.eat(Vt.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),s="",r=!1,a=!1,i="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(Vt.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===Vt.star?o=!0:s="static"}if(n.static=o,!s&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==Vt.star||this.canInsertSemicolon()?s="async":a=!0),!s&&(t>=9||!a)&&this.eat(Vt.star)&&(r=!0),!s&&!a&&!r){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?i=l:s=l)}if(s?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=s,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===Vt.parenL||"method"!==i||r||a){var c=!n.static&&Pn(n,"constructor"),p=c&&e;c&&"method"!==i&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":i,this.parseClassMethod(n,r,a,p)}else this.parseClassField(n);return n},bn.isClassElementNameStart=function(){return this.type===Vt.name||this.type===Vt.privateId||this.type===Vt.num||this.type===Vt.string||this.type===Vt.bracketL||this.type.keyword},bn.parseClassElementName=function(e){this.type===Vt.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},bn.parseClassMethod=function(e,t,n,s){var r=e.key;"constructor"===e.kind?(t&&this.raise(r.start,"Constructor can't be a generator"),n&&this.raise(r.start,"Constructor can't be an async method")):e.static&&Pn(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,n,s);return"get"===e.kind&&0!==a.params.length&&this.raiseRecoverable(a.start,"getter should have no params"),"set"===e.kind&&1!==a.params.length&&this.raiseRecoverable(a.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===a.params[0].type&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},bn.parseClassField=function(e){return Pn(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Pn(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(Vt.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},bn.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==Vt.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},bn.parseClassId=function(e,t){this.type===Vt.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},bn.parseClassSuper=function(e){e.superClass=this.eat(Vt._extends)?this.parseExprSubscripts(null,!1):null},bn.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},bn.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=0===s?null:this.privateNameStack[s-1],a=0;a=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==Vt.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},bn.parseExport=function(e,t){if(this.next(),this.eat(Vt.star))return this.parseExportAllDeclaration(e,t);if(this.eat(Vt._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==Vt.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,s=e.specifiers;n=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},bn.parseExportDeclaration=function(e){return this.parseStatement(null)},bn.parseExportDefaultDeclaration=function(){var e;if(this.type===Vt._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|kn,!1,e)}if(this.type===Vt._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var s=this.parseMaybeAssign();return this.semicolon(),s},bn.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),Jt(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},bn.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t,t.start);else if("ObjectPattern"===n)for(var s=0,r=t.properties;s=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},bn.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportSpecifier")},bn.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},bn.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportNamespaceSpecifier")},bn.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===Vt.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(Vt.comma)))return e;if(this.type===Vt.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(Vt.braceL);!this.eat(Vt.braceR);){if(t)t=!1;else if(this.expect(Vt.comma),this.afterTrailingComma(Vt.braceR))break;e.push(this.parseImportSpecifier())}return e},bn.parseWithClause=function(){var e=[];if(!this.eat(Vt._with))return e;this.expect(Vt.braceL);for(var t={},n=!0;!this.eat(Vt.braceR);){if(n)n=!1;else if(this.expect(Vt.comma),this.afterTrailingComma(Vt.braceR))break;var s=this.parseImportAttribute(),r="Identifier"===s.key.type?s.key.name:s.key.value;Jt(t,r)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+r+"'"),t[r]=!0,e.push(s)}return e},bn.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===Vt.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(Vt.colon),this.type!==Vt.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},bn.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===Vt.string){var e=this.parseLiteral(this.value);return sn.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},bn.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var En=mn.prototype;En.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var s=0,r=e.properties;s=8&&!o&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(Vt._function))return this.overrideContext(An.f_expr),this.parseFunction(this.startNodeAt(a,i),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(Vt.arrow))return this.parseArrowExpression(this.startNodeAt(a,i),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===Vt.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(Vt.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,i),[l],!0,t)}return l;case Vt.regexp:var c=this.value;return(s=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},s;case Vt.num:case Vt.string:return this.parseLiteral(this.value);case Vt._null:case Vt._true:case Vt._false:return(s=this.startNode()).value=this.type===Vt._null?null:this.type===Vt._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case Vt.parenL:var p=this.start,u=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=p),e.parenthesizedBind<0&&(e.parenthesizedBind=p)),u;case Vt.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(Vt.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case Vt.braceL:return this.overrideContext(An.b_expr),this.parseObj(!1,e);case Vt._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case Vt._class:return this.parseClass(this.startNode(),!1);case Vt._new:return this.parseNew();case Vt.backQuote:return this.parseTemplate();case Vt._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},Rn.parseExprAtomDefault=function(){this.unexpected()},Rn.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===Vt.parenL&&!e)return this.parseDynamicImport(t);if(this.type===Vt.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}this.unexpected()},Rn.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(Vt.parenR)?e.options=null:(this.expect(Vt.comma),this.afterTrailingComma(Vt.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(Vt.parenR)||(this.expect(Vt.comma),this.afterTrailingComma(Vt.parenR)||this.unexpected())));else if(!this.eat(Vt.parenR)){var t=this.start;this.eat(Vt.comma)&&this.eat(Vt.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Rn.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Rn.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=null!=t.value?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Rn.parseParenExpression=function(){this.expect(Vt.parenL);var e=this.parseExpression();return this.expect(Vt.parenR),e},Rn.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Rn.parseParenAndDistinguishExpression=function(e,t){var n,s=this.start,r=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var i,o=this.start,l=this.startLoc,c=[],p=!0,u=!1,d=new gn,h=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==Vt.parenR;){if(p?p=!1:this.expect(Vt.comma),a&&this.afterTrailingComma(Vt.parenR,!0)){u=!0;break}if(this.type===Vt.ellipsis){i=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===Vt.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var f=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(Vt.parenR),e&&this.shouldParseArrow(c)&&this.eat(Vt.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=m,this.parseParenArrowList(s,r,c,t);c.length&&!u||this.unexpected(this.lastTokStart),i&&this.unexpected(i),this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=m||this.awaitPos,c.length>1?((n=this.startNodeAt(o,l)).expressions=c,this.finishNodeAt(n,"SequenceExpression",f,y)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(s,r);return v.expression=n,this.finishNode(v,"ParenthesizedExpression")}return n},Rn.parseParenItem=function(e){return e},Rn.parseParenArrowList=function(e,t,n,s){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,s)};var qn=[];Rn.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===Vt.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(Vt.parenL)?e.arguments=this.parseExprList(Vt.parenR,this.options.ecmaVersion>=8,!1):e.arguments=qn,this.finishNode(e,"NewExpression")},Rn.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===Vt.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===Vt.backQuote,this.finishNode(n,"TemplateElement")},Rn.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(n.quasis=[s];!s.tail;)this.type===Vt.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(Vt.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(Vt.braceR),n.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Rn.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===Vt.name||this.type===Vt.num||this.type===Vt.string||this.type===Vt.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Vt.star)&&!Ht.test(this.input.slice(this.lastTokEnd,this.start))},Rn.parseObj=function(e,t){var n=this.startNode(),s=!0,r={};for(n.properties=[],this.next();!this.eat(Vt.braceR);){if(s)s=!1;else if(this.expect(Vt.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(Vt.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,r,t),n.properties.push(a)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Rn.parseProperty=function(e,t){var n,s,r,a,i=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(Vt.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===Vt.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===Vt.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(r=this.start,a=this.startLoc),e||(n=this.eat(Vt.star)));var o=this.containsEsc;return this.parsePropertyName(i),!e&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(i)?(s=!0,n=this.options.ecmaVersion>=9&&this.eat(Vt.star),this.parsePropertyName(i)):s=!1,this.parsePropertyValue(i,e,n,s,r,a,t,o),this.finishNode(i,"Property")},Rn.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n="get"===e.kind?0:1;if(e.value.params.length!==n){var s=e.value.start;"get"===e.kind?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},Rn.parsePropertyValue=function(e,t,n,s,r,a,i,o){(n||s)&&this.type===Vt.colon&&this.unexpected(),this.eat(Vt.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,i),e.kind="init"):this.options.ecmaVersion>=6&&this.type===Vt.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,s),e.kind="init"):t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===Vt.comma||this.type===Vt.braceR||this.type===Vt.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||s)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),t?e.value=this.parseMaybeDefault(r,a,this.copyNode(e.key)):this.type===Vt.eq&&i?(i.shorthandAssign<0&&(i.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected():((n||s)&&this.unexpected(),this.parseGetterSetter(e))},Rn.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Vt.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(Vt.bracketR),e.key;e.computed=!1}return e.key=this.type===Vt.num||this.type===Vt.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Rn.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Rn.parseMethod=function(e,t,n){var s=this.startNode(),r=this.yieldPos,a=this.awaitPos,i=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|hn(t,s.generator)|(n?128:0)),this.expect(Vt.parenL),s.params=this.parseBindingList(Vt.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=i,this.finishNode(s,"FunctionExpression")},Rn.parseArrowExpression=function(e,t,n,s){var r=this.yieldPos,a=this.awaitPos,i=this.awaitIdentPos;return this.enterScope(16|hn(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=i,this.finishNode(e,"ArrowFunctionExpression")},Rn.parseFunctionBody=function(e,t,n,s){var r=t&&this.type!==Vt.braceL,a=this.strict,i=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);a&&!o||(i=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!a&&!i&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,i&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},Rn.isSimpleParamList=function(e){for(var t=0,n=e;t-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&1&r.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var a=this.currentScope();s=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var i=this.scopeStack.length-1;i>=0;--i){var o=this.scopeStack[i];if(o.lexical.indexOf(e)>-1&&!(32&o.flags&&o.lexical[0]===e)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(e)>-1){s=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],o.flags&dn)break}s&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},On.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},On.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},On.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},On.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags&&!(16&t.flags))return t}};var Dn=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new an(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},jn=mn.prototype;function Bn(e,t,n,s){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=n),e}jn.startNode=function(){return new Dn(this,this.start,this.startLoc)},jn.startNodeAt=function(e,t){return new Dn(this,e,t)},jn.finishNode=function(e,t){return Bn.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},jn.finishNodeAt=function(e,t,n,s){return Bn.call(this,e,t,n,s)},jn.copyNode=function(e){var t=new Dn(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Fn="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Vn=Fn+" Extended_Pictographic",Hn=Vn+" EBase EComp EMod EPres ExtPict",Un={9:Fn,10:Vn,11:Vn,12:Hn,13:Hn,14:Hn},zn={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Wn="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Gn="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Kn=Gn+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Xn=Kn+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Qn=Xn+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Yn=Qn+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Jn={9:Gn,10:Kn,11:Xn,12:Qn,13:Yn,14:Yn+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},Zn={};function es(e){var t=Zn[e]={binary:tn(Un[e]+" "+Wn),binaryOfStrings:tn(zn[e]),nonBinary:{General_Category:tn(Wn),Script:tn(Jn[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var ts=0,ns=[9,10,11,12,13,14];ts=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Zn[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function is(e){return 105===e||109===e||115===e}function os(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function ls(e){return e>=65&&e<=90||e>=97&&e<=122}as.prototype.reset=function(e,t,n){var s=-1!==n.indexOf("v"),r=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=r&&this.parser.options.ecmaVersion>=9)},as.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},as.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,s=n.length;if(e>=s)return-1;var r=n.charCodeAt(e);if(!t&&!this.switchU||r<=55295||r>=57344||e+1>=s)return r;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(r<<10)+a-56613888:r},as.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,s=n.length;if(e>=s)return s;var r,a=n.charCodeAt(e);return!t&&!this.switchU||a<=55295||a>=57344||e+1>=s||(r=n.charCodeAt(e+1))<56320||r>57343?e+1:e+2},as.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},as.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},as.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},as.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},as.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,s=0,r=e;s-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===i&&(s=!0),"v"===i&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(e.start,"Invalid regular expression flag")},ss.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&function(e){for(var t in e)return!0;return!1}(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},ss.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t=16;for(t&&(e.branchID=new rs(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},ss.regexp_alternative=function(e){for(;e.pos=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},ss.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},ss.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},ss.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return-1!==r&&r=16){var n=this.regexp_eatModifiers(e),s=e.eat(45);if(n||s){for(var r=0;r-1&&e.raise("Duplicate regular expression modifiers")}if(s){var i=this.regexp_eatModifiers(e);n||i||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var o=0;o-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},ss.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},ss.regexp_eatModifiers=function(e){for(var t="",n=0;-1!==(n=e.current())&&is(n);)t+=nn(n),e.advance();return t},ss.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},ss.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},ss.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!os(t)&&(e.lastIntValue=t,e.advance(),!0)},ss.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!os(n);)e.advance();return e.pos!==t},ss.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},ss.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var s=0,r=n;s=11,s=e.current(n);return e.advance(n),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(s=e.lastIntValue),function(e){return qt(e,!0)||36===e||95===e}(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)},ss.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,s=e.current(n);return e.advance(n),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(s=e.lastIntValue),function(e){return Lt(e,!0)||36===e||95===e||8204===e||8205===e}(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)},ss.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},ss.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},ss.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},ss.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},ss.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},ss.regexp_eatZero=function(e){return 48===e.current()&&!us(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},ss.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},ss.regexp_eatControlLetter=function(e){var t=e.current();return!!ls(t)&&(e.lastIntValue=t%32,e.advance(),!0)},ss.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n,s=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(r&&a>=55296&&a<=56319){var i=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(a-55296)+(o-56320)+65536,!0}e.pos=i,e.lastIntValue=a}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((n=e.lastIntValue)>=0&&n<=1114111))return!0;r&&e.raise("Invalid unicode escape"),e.pos=s}return!1},ss.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},ss.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};function cs(e){return ls(e)||95===e}function ps(e){return cs(e)||us(e)}function us(e){return e>=48&&e<=57}function ds(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hs(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function ms(e){return e>=48&&e<=55}ss.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=80===t)||112===t)){var s;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&2===s&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return 0},ss.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,s),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r)}return 0},ss.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Jt(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},ss.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},ss.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";cs(t=e.current());)e.lastStringValue+=nn(t),e.advance();return""!==e.lastStringValue},ss.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";ps(t=e.current());)e.lastStringValue+=nn(t),e.advance();return""!==e.lastStringValue},ss.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},ss.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===n&&e.raise("Negated character class may contain strings"),!0}return!1},ss.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},ss.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},ss.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||ms(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return 93!==s&&(e.lastIntValue=s,e.advance(),!0)},ss.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},ss.regexp_classSetExpression=function(e){var t,n=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(n=2);for(var s=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(n=1):e.raise("Invalid character in character class");if(s!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;2===t&&(n=2)}},ss.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return-1!==n&&-1!==s&&n>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},ss.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},ss.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return n&&2===s&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var r=this.regexp_eatCharacterClassEscape(e);if(r)return r;e.pos=t}return null},ss.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},ss.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},ss.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},ss.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1));var n=e.current();return!(n<0||n===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(n))&&(!function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(n)&&(e.advance(),e.lastIntValue=n,!0))},ss.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},ss.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!us(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},ss.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},ss.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;us(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},ss.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;ds(n=e.current());)e.lastIntValue=16*e.lastIntValue+hs(n),e.advance();return e.pos!==t},ss.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},ss.regexp_eatOctalDigit=function(e){var t=e.current();return ms(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},ss.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var s=0;s=this.input.length?this.finishToken(Vt.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ys.readToken=function(e){return qt(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ys.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},ys.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},ys.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var s=void 0,r=t;(s=Wt(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},ys.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&Gt.test(String.fromCharCode(e))))break e;++this.pos}}},ys.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},ys.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(Vt.ellipsis)):(++this.pos,this.finishToken(Vt.dot))},ys.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(Vt.assign,2):this.finishOp(Vt.slash,1)},ys.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,s=42===e?Vt.star:Vt.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,s=Vt.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(Vt.assign,n+1):this.finishOp(s,n)},ys.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(Vt.assign,3);return this.finishOp(124===e?Vt.logicalOR:Vt.logicalAND,2)}return 61===t?this.finishOp(Vt.assign,2):this.finishOp(124===e?Vt.bitwiseOR:Vt.bitwiseAND,1)},ys.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(Vt.assign,2):this.finishOp(Vt.bitwiseXOR,1)},ys.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!Ht.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(Vt.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(Vt.assign,2):this.finishOp(Vt.plusMin,1)},ys.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(Vt.assign,n+1):this.finishOp(Vt.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(Vt.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},ys.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(Vt.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(Vt.arrow)):this.finishOp(61===e?Vt.eq:Vt.prefix,1)},ys.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(Vt.questionDot,2)}if(63===t){if(e>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(Vt.assign,3);return this.finishOp(Vt.coalesce,2)}}return this.finishOp(Vt.question,1)},ys.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,qt(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(Vt.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+nn(e)+"'")},ys.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(Vt.parenL);case 41:return++this.pos,this.finishToken(Vt.parenR);case 59:return++this.pos,this.finishToken(Vt.semi);case 44:return++this.pos,this.finishToken(Vt.comma);case 91:return++this.pos,this.finishToken(Vt.bracketL);case 93:return++this.pos,this.finishToken(Vt.bracketR);case 123:return++this.pos,this.finishToken(Vt.braceL);case 125:return++this.pos,this.finishToken(Vt.braceR);case 58:return++this.pos,this.finishToken(Vt.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(Vt.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(Vt.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+nn(e)+"'")},ys.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},ys.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(Ht.test(s)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===s)t=!0;else if("]"===s&&t)t=!1;else if("/"===s&&!t)break;e="\\"===s}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var a=this.pos,i=this.readWord1();this.containsEsc&&this.unexpected(a);var o=this.regexpState||(this.regexpState=new as(this));o.reset(n,r,i),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(r,i)}catch(e){}return this.finishToken(Vt.regexp,{pattern:r,flags:i,value:l})},ys.readInt=function(e,t,n){for(var s=this.options.ecmaVersion>=12&&void 0===t,r=n&&48===this.input.charCodeAt(this.pos),a=this.pos,i=0,o=0,l=0,c=null==t?1/0:t;l=97?p-97+10:p>=65?p-65+10:p>=48&&p<=57?p-48:1/0)>=e)break;o=p,i=i*e+u}}return s&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||null!=t&&this.pos-a!==t?null:i},ys.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=vs(this.input.slice(t,this.pos)),++this.pos):qt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Vt.num,n)},ys.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===s){var r=vs(this.input.slice(t,this.pos));return++this.pos,qt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Vt.num,r)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==s||n||(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||n||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),qt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,i=(a=this.input.slice(t,this.pos),n?parseInt(a,8):parseFloat(a.replace(/_/g,"")));return this.finishToken(Vt.num,i)},ys.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},ys.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;92===s?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===s||8233===s?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(zt(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(Vt.string,t)};var gs={};ys.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==gs)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},ys.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw gs;this.raise(e,t)},ys.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==Vt.template&&this.type!==Vt.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(Vt.template,e)):36===n?(this.pos+=2,this.finishToken(Vt.dollarBraceL)):(++this.pos,this.finishToken(Vt.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(zt(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},ys.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),"0"===s&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return zt(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},ys.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},ys.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,s=this.options.ecmaVersion>=6;this.pos`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",CannotFindName:({name:e})=>`Cannot find name '${e}'.`,ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:()=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,PrivateMethodsHasAccessibility:({modifier:e})=>`Private methods cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",GenericsEndWithComma:"Trailing comma is not allowed at the end of generics.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations."},As={UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",TrailingDecorator:"Decorators must be attached to a class element.",SpreadElementDecorator:"Decorators can't be used with SpreadElement"};var $s=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function Rs(e){if(!e)throw new Error("Assert fail")}function Is(e){return"accessor"===e}function Ms(e){return"in"===e||"out"===e}var qs={SCOPE_TOP:1,SCOPE_FUNCTION:2,SCOPE_ASYNC:4,SCOPE_GENERATOR:8,SCOPE_ARROW:16,SCOPE_SIMPLE_CATCH:32,SCOPE_SUPER:64,SCOPE_DIRECT_SUPER:128,BIND_NONE:0,BIND_VAR:1,BIND_LEXICAL:2,BIND_FUNCTION:3,BIND_SIMPLE_CATCH:4,BIND_TS_TYPE:6,BIND_TS_INTERFACE:7,BIND_TS_NAMESPACE:1032,BIND_FLAGS_TS_EXPORT_ONLY:1024,BIND_FLAGS_TS_IMPORT:4096,BIND_FLAGS_TS_ENUM:256,BIND_FLAGS_TS_CONST_ENUM:512,BIND_FLAGS_CLASS:128};function Ls(e,t){return qs.SCOPE_FUNCTION|(e?qs.SCOPE_ASYNC:0)|(t?qs.SCOPE_GENERATOR:0)}function Os(e){if("MemberExpression"!==e.type)return!1;const{computed:t,property:n}=e;return(!t||!("TemplateLiteral"!==n.type||n.expressions.length>0))&&Ns(e.object)}function Ns(e){return"Identifier"===e.type||"MemberExpression"===e.type&&(!e.computed&&Ns(e.object))}function Ds(e){return"private"===e||"public"===e||"protected"===e}class js extends Error{message="";#e;constructor(e,t,n){super(t),this.stack="",this.#e=new Me(e,t,n),Object.assign(this,this.#e),this.name="CompileError"}toString(){return this.#e.toString()}toJSON(){return this.#e.toJSON()}}function Bs(e,t,n){const s="number"==typeof e?e:e?.start;throw new js(t,n,void 0!==s?[s,("number"==typeof e?e:e?.end)??s]:void 0)}function Fs(e,t){Bs(e,"options_unrecognised",`Unrecognised compiler option ${t}\nhttps://svelte.dev/e/options_unrecognised`)}function Vs(e,t){Bs(e,"constant_assignment",`Cannot assign to ${t}\nhttps://svelte.dev/e/constant_assignment`)}function Hs(e,t){Bs(e,"declaration_duplicate",`\`${t}\` has already been declared\nhttps://svelte.dev/e/declaration_duplicate`)}function Us(e){Bs(e,"declaration_duplicate_module_import","Cannot declare a variable with the same name as an import from `
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+